elektra-0.7.1/0000777000076400001440000000000011365513215010155 500000000000000elektra-0.7.1/AUTHORS0000644000076400001440000000167311365507605011156 00000000000000Avi Alkalay Concept, architecture, development, manuals, previous website Backends: berkleydb, filesys, fstab Devel/Test on: redhat.ia32, fedora.ia32, redhat.ppc, redhat.s390, aix.ppc Markus Raab unstable development, previous website, documentation, tutorial Backends: ini Binding: cpp Devel/Test on: Debian Etch, Freebsd, Sun OS 4.0, AIX TRu64 Unix Yannick Lecaillez Mandriva packaging, adaptation for using autotools & libtool, website hosting. Devel/Test on: Mandriva x86 Jens Andersen nss-elektra, development and porting. Devel/Test on: Patrick Sabin unstable development, Python kdb Bindings: python Devel/Test on: Debian Testing Pier Luigi Fiorini pkg-config file Devel/Test on: Rèmi XML schema Devel/Test on: Studio-HB Elektra logo, website design. elektra-0.7.1/COPYING0000644000076400001440000000304211365506635011133 00000000000000This is a New BSD license as in http://opensource.org/licenses/bsd-license.php Copyright (c) 2004, Avi Alkalay Some rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - Neither the name of the Elektra Project nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. elektra-0.7.1/ChangeLog0000644000076400001440000014421011365507605011653 00000000000000* Tue 16 Oct 2008 - ksCopy - ksNeedSort removed from public header - ksNeedsSort renamed - ksDup - ksClear removed from public header - ksSort: example, docu - ksGetSize - ksAppendKey, ksAppend - ksPop - ksHead, ksTail - ksGetCursor, ksSetCursor - ksLookup - removed ksLookupByString, ksLookupByBinary - ksNew - errno away from keyset - kdbOpen, kdbClose - kdbGet - stdio.h and errno.h away from kdbos.h - kdbGetByName - kdbGetKey, kdbSetKey - removed kdbStatKey (trivial) - kdbGetString, kdbSetString, kdbRemove * Wed 15 Oct 2008 - keyName, keyBaseName and keyOwner return 0 on 0 pointer - keyOwner, keyGetOwnerSize, keyGetOwner - keySetOwner - keyValue, keyGetValueSize - keyGetString, keySetString, keySetRaw(removed) - keyGetBinary, keySetBinary - comments - keyNew - errno bei key*.c weg - errno in backend docu weg - DESIGN document updated - keyName, keyBaseName, keyOwner, keyValue, keyComment synced - test cases for binary data * Tue 14 Oct 2008 - keySetDir, keyGetMode, keySetMode - enum types are now integer types - hide enum for flags: keyflag_t keyswitch_t - keyGetType, keySetType - ATime, MTime, CTime - keyName - keyGetName - keySetName - keyFullName - keyBaseName - keyAddBaseName, keySetBaseName * Mon 13 Oct 2008 - keyStat, keyRemove - remove SYNC flag when removing key - keyNeedsStat, keyNeedsSync, keyNeedsRemove - keyNeedsStat, keyNeedsSync, keyNeedsRemove renamed to keyNeedStat, keyNeedSync, keyNeedRemove - keyIsSystem, keyIsUser - keyIsBelow, keyIsDirectBelow - keyIsInactive - keyIsDir, keyIsBinary, keyIsString - @errors renamed to @err - keyGetUID, keySetUID, keyGetGID, keySetGID - keyGetType, keySetType * Sat 11 Oct 2008 - Versioning for backends - check all functions again: - keyDup - keyCopy: removed keyClear, keySetName(,0) - keyDel, keyIncRef, keyDecRef, keyGetRef: example * Wed 08 Oct 2008 - print_info outputs limits, constants and sizeof of elektra types - examples now compile - added iterate example - BUG: segfault on xml import/export (reason: closed library too early) - xml is again default mode for exporting - always export recursive - run test_script - add xml tests in scripts - validate -cmp files - now use type_t for types - eliminate [u]int8,16,32_t - eliminate kdbStrError - make examples more iso c - remove keyCompare and ksGetCommonParentName * Thu 07 Oct 2008 - Copy autoconf files instead of linking - exportsymbols.sh now generate more ansi conforming code - libloader: extern in header and more strict function prototype - fstab.h added, better declarations - passwd.h better declarations - template.h better declarations - dont use (), use (void) - small fixes in headers - libelektratools - make not exported functions static - uid, gid at one place - header cleanup - compile with icc -Wall - dont use multiple function calls as parameters - keyIsBelowOrSame static - some casting - dont define DEBUG by flag, use config.h - define VERBOSE (as 0) - only use valgrind when available - check for stdio.h - some things I broke with icc transition - valgrind should now check correctly - kdbOpen(void) does not accept arguments anymore - source environment for zsh works - removed some TODOs - remove some spaces in kdb.h - kdbos.h cleanup: POSIX and WIN32 part - KeyCursor renamed to cursor_t - use the enum option_t instead of unsigned long - KDBOptions renamed to option_t * Thu 02 Oct 2008 - svn version for latest test - ELEKTRA_VERSION_API in configure.ac - check funcs of testing suite - search path - Docu about search path - libdir, ulibdir added in search path - hlvlbackenddir used for libelektratools - typedef corrected * Wed 01 Oct 2008 - BUG 37: uid/gid mismatch - kdbSetKey use const as second parameter - don use name elektra in kdb.h - some updates to KDB in cpp binding - Mac Port - dont use -n or -e for echo - dont use symbols starting with _ * Mon 29 Sep 2008 - add canonical target - remove AC_LIBTOOL_WIN32_DLL - using libtool support from sox - use INCLUDES for -I include and INCLTDL - dont cd to LIBLTDL, it could be -lltdl (on grml 1.1 second install) - check HAVE_LIBLTDL header - dont use ENOKEY (not posix) use EFAULT instead * Fri 26 Sep 2008 - xsltproc works again - don't prefix slash at end of docbook path - check the files and not the path - cleaned up capability (will use other api later on) - dont provide mount API - exclude most of kdbc* functions (not needed) - capability removed from documentation - add get (ByName) in c++ binding - remove subsections in main page - rename keyName to keyname in parameter - give trivial kdbRemoveKey away - regroup kdb* - renaming of libhelper files - module section naming - use singular - KeyDB renamed to KDB - changed pictures - KDBHandle renamed to KDB - kdbGetByName now handles mountpoints correctly (and deserves to be in highlevel) - preload now directly uses /etc/hosts and /etc/fstab for system - but continues to use /tmp for user - kdbGetHelper now used by kdbGetKey and kdbGetByName - hosts comments - use bigger buffer - be more safe on buffer limits - add comments in hosts.xml - write examples and update tutorial - kdbGetKey should set errno to KDB_ERR_NOTFOUND - versions fixed, provide kdbStrVersion - use rm -f instead of -rm - remove keyName functions and keyNext (why was that there?) - the great renaming: bringing key in its modules - bringing keyset in correct order - ksAppendKeys renamed to ksAppend (last plural eliminated) - ksAppend renamed to ksAppendKey - issues on numbers fixed - all numbers may return -1 - removed print_splitted * Thu 25 Sep 2008 - KDB_O_NORECURSIVE now only gives back keys direct below keys - fix a bug in compare_keyset (it removed value/comments on request) - merge details of kdbSet and kdbGet together - doxygen updated (to 1.5.6) - document parameters - UID, GID docu update - make keyIsDir more clearly - removed kdbGetRootKeys - removed kdbSetKeys and kdbGetKeys (plural) - removed kdbGetChildKeys (has swapped parameters) - introduce kdbGetByName with cascading (replaced kdbGetChildKeys) - fixed name bugs in ksLookup() - remove user code of kdb-tool which implemented the same - 32 bit issues - make clean more robust - kdb info prints where key is located * Wed 24 Sep 2008 - introduce libhelper for system dependent but backend independent functions - source and folders in CODING document - helpers is not a backend anymore - remove kdbc properties - check for failed opendir (may fail because of permissions) - place readlock in hosts after check if open failed - use const char for kdbc* char properties - give correct uid, gid so that keys can be compared - use DEBUG && VERBOSE to be only verbose when debugging is enabled - rename access to mode - make uninstall install runs fine again - --help prints default locations - check for sed - remove hook for libelektratools - provide uninstall hook for default backend - will now use "default" backend rather then "filesys" as default * Tue 23 Sep 2008 - add backend helpers - use c++98 std for c++ - add dependency to filesys and preload - kdbbackendhelpers.c disappeared (libelektra should now be clean ansi build, see next commit) - now compiles without warnings (but not ansi flags) - core and cpp binding compile with ansi flags - all parts should have DBG and OPT cflags - added time.h header - remove kdbi* functions out of kdb-tool - ifndef TIME_H should be ifdef! - bring ks and key streaming functions in other order - header files rewriting, always HAVE_FILE_H ifdef around - implement kdbiStrCaseCmp - ctype for islower - move APPROXIMATE_NR_OF_BACKENDS to header - delete langinfo.h, sys/* dependencies - removed kdbPrintError - core can only print something when DEBUG is enabled - changed examples and kdb-tool a bit to work without kdbPrintError - remove unistd.h header files - errnosaver added for filesys, hosts and fstab - dont fill up uid, gid and username properties - dont fill up uid and gid in keyInit - text for keyCompare reformated - dont link against helper library * Mon 22 Sep 2008 - autoconf setup revisited - group together similar setup items - define DEBUG in config.h - define the conditional DEBUG (should always be set together and not confuse) - DESIGN document updates - some more code examples - rename keyGetReference to keyGetRef - don't use KEY_NEW as first parameter, use 0 * Son 21 Sep 2008 - added REGEXP and explanation how to use - regenerate error codes - leave comments of sections in error codes - add url for bug reports - clear returned so that updating keyset works * Fri 19 Sep 2008 - disable iconv conversations by default - Use correct help strings for debug - don't check iconv header file, fork and signal - add tests for code conversations - Filesys will now return -1 on UTF8Engine errors - added tests for UTF8 needed and conversation - added more docu to UTF8 engine about the problem * Thu 18 Sep 2008 - remove dependency from pthread.h - dont store pid and tid in kdbhandle - locking was disabled - check for more headers, funcs - dont fail if no locking in hosts - use KDB_ERR_NOLOCK - make distcheck works - leak: delete append keyset in filesys in error condition - use init() for every testcase - fail without error when backends are not available - srcdir file now works with empty environment - delete own malloc for tests - dont use own setenv declaration (fails when its in header) - dont leave files behind - cleanup in error condition in test_kdb - some more cleanup * Tue 16 Sep 2008 - functional example - remove ksForEach and ksFilter out of elektra (too easy to implement) - delete keyset in test_kdb - ksPop behaves more sane - keyDel is much more safer (hard to do it wrong now) - remove functional from example - decrement is now something else then delete (cpp binding) - keyIncRef and keyDecRef introduced (keyInc renamed) - links will not make it into 0.7.0 * Mon 15 Sep 2008 - kdb -R implemented - passwd no segfault when it cant open file - REMOVEONLY works - missing sort before kdbSet_backend() - document kdbGet() options much better - filesys now only stat and do not open file - propagate KDB_O_NOSTAT to parentKey - add testcases for nostat and statonly - better always duplicate parentKey - done that in fstab (rewrite get) - clear returned before appending appended - filesys now handles stat and lock - filesys optimization: not appending to returned - now remove with KDB_O_REMOVEONLY - use init() in test_kdb - only remove value/comment when backend supports kdbcGetnoStat * Fri 12 Sep 2008 - preserving of comments in /etc/hosts now work - wrote new append_comment function to catch comment and empty lines - wrote find_comment to deduce correct length (sscanf could not do that) - write init() function for tests (clearenv + loadToolsLib) - remove Link keys (not working anyway, not fitting to access logic and not tested...) - remove *parent functions (real C programmers know how to concat strings) - renamed enums - BUG: changed KEY_VALUE flag? in keyNew - BUG: keyCompare returned KEY_FLAG_SYNC - give away the nasty keyCompare code - test keyCompare - renamed warn_if to warn_if_fail - lock/unlock in hosts - kdbbLock functions set errno themselves - making hosts backend much faster * Thu 11 Sep 2008 - The final libelektratools release for 0.7 (more work will be investigated after release) - libelektratools and kdb-tool is not part of the official 0.7 release - remove streaming of cpp binding - add enum for streaming into kdbtools.h - DYN_LINK macro for weak dependency (not shown in ldd) - add -G -O options in kdb-tool to generate c code and output per line - move ksLookupRE and ksCompare to libelektratools (commented out) - asprintf removed (not ansi) one step closer to use only kdbi* memory management - command export now also exports root key * Wed 10 Sep 2008 - Don't track .gdb_history files - document only full get - always add the parentKey in filesys - watch out that all keys clear their KEY_FLAG_SYNC flag - note, every modification resets the sync flag - reorganize kdb options - rename KDB_O_IGNORESYNC to KDB_O_SYNC - rename KDB_O_DELPARENT to KDB_O_DEL - rename KDB_O_POPPARENT to KDB_O_POP - write nomeclature in kdbmain.c - delete not used options - reorganize test_kdb (create_root_key and create_conf) - Test cases reorganized - use setenv - create_root_key now creates for a specific backend - create_conf for a specific file - #ifdef all headers, - remove warings - xml cleanup: #ifdefs in includes - memory leak in ksToStream - remove grp and pwd dependency - remove non-ansi dependence (isdigit, mkstemp, write) - give code example how to check if xml is valid - test uid, gid and access * Tue 09 Sep 2008 - delete ksPop()ed keys - doxygen: sort by group names - update mainpage - make sections in kdbGet() and overview of backends - update and explain conditions more detailed - add an example for kdbGet_backend - add option_t::KDB_O_NOSTAT in docu - define groups for backendhelpers, backendhandle - add section cascading - stat logic changed, STAT remains after key was stated - SYNC will be deleted for every key synced in backend - use POP for returned keyset - Introduced more error codes to be used by backends - explain how to properly update the keyset - give some more links @see in documentation - BUG: ksAppendKeys may be one byte to small * Mon 08 Sep 2008 - Reset the update kdbGet mechanism - add keyCopy and keyClear - fix docu for keyDel - add testcase for keyCopy, keyClear - some warnings less - BUG: keySetName(k,"system*") did not reset owner - add ksCopy, ksClear - make keyset more robust (memory errors) - warnings in test cases - Introduced KDB_O_POP - BUG: ksSetCursor on rewinded keyset - make sections in docu for ksLookup - test cases for lookup with pop * Fri 05 Sep 2008 - KDB_O_WITHOWNER was wrong in docu of ksLookup - extend and test example application - add keyIsDirectBelow() for direct relation ship (parent to son) - update ksLookup Docu (KDB_O_WITHREMOVE?) - BUG: ksLookup() did not sort! - updating of a keyset now works - functional programming: ksForEach, ksFilter added * Thu 04 Sep 2008 - write documentation about ENVIRONMENT - KDB_USER now can override USER - make sure that proper owner is written (+ testcases) - don't add owner in keyGet* methods - KDB_DIR let you specify the exact user-configuration directory - preload where prints the path where your configuration lies - document errors for kdbbGetFullFilename - added KDB_ERR_TOOLONG for a string too long which cant be trunced - added KDB_ERR_CONVERT for utf8 convert errors - BUG: incorrect return values (-1) for keyIsUser and keyIsSystem lead to keyGetNamespace failure, kdbbGetFullFilename was affected - BUG: handle situation correctly where buffer does not fit filename - BUG: dont remove escaped slashes - simplify kdbGetFilesys a lot by using kdbbGetFullKeyName - kdbbFilenameToKeyName handle too long string correctly - test cases for encoding - Locking of files in filesys implemented NOTE: thus only a single key is locked it only prevents from shredded files - keys in kdbGet will now be updated when already in returned * Tue 02 Sep 2008 - introduced internal kdbi* functions in internals.c - renamed strblen to kdbiStrLen - introduced kdbiMalloc, kdbiFree, kdbiStrDup - renamed srealloc to kdbiRealloc - enhanced backendhelpers and renamed to kdbb* functions - renamed kdbbLock and kdbbUnlock - renamed kdbbEncode and kdbbDecode - renamed kdbbEncodeChar and kdbbDecodeChar - all functions are defined in kdbbackend.h - added test for backendhelpers - added test for internals (with small multichar seq test) - distinguish between PATH_SEPARATOR and KEY_SEPARATOR - added MAX_KEY_LENGTH to say explicit that the length of the key name is limited for filesys - KDB_KEY_MOUNTPOINTS holds keyname for mountpoint database (system/elektra/mountpoints) - KDB_KEY_USERS holds keyname for user database (system/users) - the *_LEN makros give their sizeof value - introduced makro variables for KDB_DB_HOME (fallback where /home resides) - keys for user/ hierarchy may have different locations on disk now, see kdbbGetFullFilename - memory leak in passwd backend + fclose was missing - renamed kdbbKeyNameToRelativeFilename and kdbbKeyCalcRelativeFilename and return -1 on failure - preload now return error codes if it worked * Mon 12 May 2008 - updated documentation of kdbGet_backend and kdbSet_backend - use post, invariant and pre conditions to document - introduce @err tag to describe how errno is propagated - add example path to include files in documentation from there - Use @since tag for pluggable backend description - updated kdbSet and kdbGet documentation: - Errors, Post, Pre cond, Return values - Explain return value in @return value - rewind keyset - basic implementation of kdb class in cpp binding - add keyRemove and keyStat in keymeta * Thu 08 May 2008 - enabling and disabling of backends now work - ini compiles again - mntent.h fix - berkleydb compiles fine but does not link - added enabling and disabling of bindings - cpp binding keyset finished except iterator * Thu 24 Apr 2008 - Key support Reference Pointer Semantics - Some Basic Functions for Keyset (non-functional) - Some Basic Tests for Keyset - ksLookup (KeySet, Key,..) added to docu - sed changed for macosx compatibility - 0.7.0rc3 announcement * Mon 21 Apr 2008 - kdb::KeySet output, generate,.. - added test_keyset.cpp - fixed signature ssize_t ksToStream - changed signature keyDel() - added keyInc() (increment Reference) - keyDel() also before appending (always after ksPop()!) - updated documentation for ksPop(), ksCurrent(), ksNext()... - Streaming got its own Module in documentation (group keystream) * Sun 20 Apr 2008 - also set CXXFlags - namespace directly in kdb.h for c++ - Key for cpp binding now complete with lots of tests - use const - casting between kdb::Key and ckdb::Key for KeySets - copy constructors - adding keyVNew and ksVNew to pass va_list and use it in c++ binding * Tue 15 Apr 2008 - Don't output error for positive kdbSet return value - xml pretty printing - fix wrong parent at end in ksToStream - string is default type for xml without type="" - fix extra_dist some missing files - Add version macros - remove , at end of enumeration lists * Sat 22 Mar 2008 - kdbSetKey highlevel now works with capabilities - kdbSet docu - make parentkeys to work in kdbSet - splitting keys now works in n*b instead of n^2*b and preservers order - split keysets in kdbprivate.h, test it in test_split.c - 0.7.0rc2 announcement * Thu 26 Feb 2008 - Cleanup options - Initialized mask removed in keyswitch - Changed indentation to tabs - Lookup and Stream have their own options - don't make uid gid depended on who exports it - some newlines removed - keyOutput: only output what is desired - Adding comparing files in Testcase - ksLookup* set cursor (ksCurrent) correctly - ksCurrent set correctly after failed kdbSet() * Sat 09 Feb 2008 Markus Raab - atime, mtime, ctime document + set functions (kdb.h) - document kdb*_backend functions - document kdb functions - make capabilities obligatory - add authors, licence in capabilites - capabilities workaround in kdbGetKey and kdb get - make mountpoint when mounting a backend with preload - passwd does not need to declare onlyFullGet - add kdbGetCapability and kdbGetMountpoint in namespace kdb - rename kdbGetValue, kdbSetValue, kdbSetValueByParent and kdbSetValueByParent to kdbGetString, kdbSetString, kdbSetStringByParent and kdbSetStringByParent - keyValue unchanged because it is related to value, that means string, binary or any other type - keyGetValueSize also unchanged because of above reason - writing tests for it in test_mount - check return value kdbGet and kdbSet of -1 if you want to check error * Thu 06 Dec 2007 Markus Raab - Renaming of header files - kdbMount now takes a key mountpoint, which has as value the backend - KDBHandle is now like Key and KeySet a private structure with public typedef - KDBBackend is now gone and #define KDBHandle to void too - helpers are now in kdbprivate.h - kdbbackend.h now will do include everything for backends - kdb.h should do include everything needed for extern programs - Documentation for KDBHandle - TODO update - added capability methods - document kdbMount, kdbUnmount - don't rely on private structures in tests.h - fix make dist - 0.7.0rc1 announcement * Wed 05 Dec 2007 Markus Raab - KDB_ERR_NODOMAIN renamed to KDB_ERR_NOOWNER - KDB_O_NOSORT renamed back to KDB_O_SORT - ksLookup KDB_O_NOALL introduced - ksNeedSort() and ksGetAlloc() introduced - lookup: owner strcmp more efficient and also sorted that way - BUG: ksGetCommonParentKeyName works even if nothing found - dont ksDup in ksGetCommonParentKeyName - size_t used for keysets (we also want large keysets) - resize keyset down to KEYSET_SIZE - remove kdbGetBackendName and kdbGetMountpoint - kdbhGetMountpoint is a key: name is point, value is backend - allocation testing - kdbMount, kdbUnmount to kdb.c - use kdbOpenBackend and kdbCloseBackend as only place to open/close backends - OpenMapper, CloseMapper are function pointers to open and close a backend * Wed 21 Nov 2007 Markus Raab, Patrick Sabin - BUG: keyIsLink broken fixed - BUG: when there is no comment, value filesys won't store type fixed - BUG: keyAdd/SetBasename do realloc something wrong and do not set nameSize - rewrite serialization - keyCompose: serialize a key without any malloc - added keyGenerate and ksGenerate - use FILE *stream for Output/Generate * Wed 19 Nov 2007 Markus Raab - Capabilites added - Backends can now represent what they support * Sun 11 Nov 2007 Markus Raab - Make test cases run again - Find memory leaks - Naming conventions - Parameter discarding of qualifiers - Header conventions - File headings - Variable names + delete unneeded variables - make all tests pass again - make fstab compile again * Wed 07 Nov 2007 Markus Raab - Code Coverage Tests included - With --enable-gcov you enable building of code coverage - Use it to see what lines of code are covered by tests * Tue 06 Nov 2007 Patrick Sabin - introduced Trie for lookup of mountpoints - dynamic mounting with kdbMount and kdbUmount - test cases for trie - trie resides in KDBHandle - kdbLibMounting.h introduced - kdbos.h introduced - ksLookup only search in not removed keys * Fri 02 Nov 2007 - Remove next Pointer in Key - Use Array in Keyset - Introduce new style ksNew - ksDup introduced - some const identifiers introduced for keyset - InsertKey(s) is history - Cursor functions added for keyset - next, start and end pointer removed - reference for keys: keysets will only delete keys when they have the only copy of it - ksToStream, ksCompare, ksLookupRE mailfunc, commented out * Wed 24 Oct 2007 - Reintroduce kdbGet recursive code - Now delete keys when not needed - kdbGetKeys needs KDB_O_INACTIVE to get a single key - When pop a key, ks->next is now 0 - Makros in tests now {embraced} - to see if a function failed, take the difference of nbError * Wed 17 Oct 2007 - use old type system - getset tests - access types tests - KEY_SWITCH_MODE renamed to KEY_SWITCH_ACCESS - Introduce ksStart to replace ksRewind * Thu 04 Oct 2007 - valgrind support for tests added - keySet/Get String/Comment for NULL changed - keyGetValue/CommentSize returns 1 to have appropriate space to malloc 1 byte - xml tests commented out, problem with change above - userDomain (?) renamed to owner - updated documentation of _Key - recordSize deleted - benchmarks added: threads, large - keyDir: Use executable bits to mark directories - filesys cleanup: don't support old key-style and remove pointless functions - valgrind integrated for tests and benchmarks - KEY_SWITCH_DOMAIN -> KEY_SWITCH_OWNER * Sun 23 Sep 2007 - kdbHandle and KDBEXPORT only insist of 4 functions (open, close, get, set) - kdbHighLevel only require kdbGet and kdbSet, but considered broken - kdbLibSym returns kdbLibFunc, which is a pointer to a function, not data - added -debug compiler options - removed warnings all over the code - keyvalue cleanup, same meanings and documentation of errno * Mon 03 Sep 2007 Markus Raab and Patrick Sabin - kdbSet restructure: only kdbSetKeys communicate with backend - _KDBInfo added - kdbcapability.c added, old KDBInfo is there - kdbResolveKey is in backendhelpers.c - kdbprivate.h need not to be included if kdbbackend.h is - docu for highlevel functions too - doxygen fixes - BUG: recordSize, not address of operator (resolved) - Sort KEY_FLAG_REMOVE correctly - KEY_FLAG_STAT first hit - BUG: next pointer was missed in kdbSetKey (resolved) - BUG: access not correct for stat key - ksPopLast removed because it needs iterating over all keys * August 2007 Markus Raab and Patrick Sabin - Doxygen warnings/error away for cleaner documentation - Writing exhaustive backend tests: xml, kdb - keyIsInactive added, testcases for inactive keys - .. and . are handled correctly in keySetName - Trailing slashes at system and user are handled correctly - some kdb (1) tests added - keyNeedsRemove added - keyRename test cases - sorting now considers if marked for remove [more testing needed] - tests.c now have the code from tests.h - ksSort testcase added - keyNew supports KEY_SWITCH_REMOVE - bug in keyNeedsSync and keyNeedsRemove, not 1 returned - prefix with 0 in date (-d, -l options) * July 2007 Markus Raab - xml test update - xml files validate - validate .xml files in tests - updated xmlschema documentation - schema marked as unstable - schema licence bsd * May 2007 Markus Raab - kdbKeyChildKeys in backend contains no sort, filter and recursive logic - Getting Code stable to begin implementing * March 2007 Markus Raab - Start support multiple backends - using git-svn - TODO updated - get out binary presentations - kdb doc return value ChildKeys update - added XML tests - get some common code to tests.h * Dezember 2006 Markus Raab - unstable fork - using darcs - c++ compatible includes - amc_time documentation updates - keyDup now really duplicates a key. - Give Link, Rename and Remove away - Remove monitor functions - Support removing with setting type to KDB_TYPE_REMOVE - Support atomic SetKeys - Give kdbOpenDefault, kdbOpenBackend away - Change all function to use KDBHandle * * Mon Oct 23 2006 Avi Alkalay - API started to change to support dir keys with value - Initial support in filesys backend, mainly on kdbSetKey_filesys() * Sun Oct 8 2006 Patrice Dumas - fix under and over quoting in configure.ac * Fri Sep 11 2006 Avi Alkalay - Removed setuid() and +s from kdbd - Changed daemon socket file to /var/run/kdbd/elektra.sock - Created an init script for the daemon - Updated spec for changes - The daemon now creates and removes pid and sock files in/from standard dirs (/var/run/kdbd) * Thu Sep 07 2006 Avi Alkalay 0.6.4 - Fixed a key ownership bug on BDB::keyFromBDB() when running together with the daemon - kdbhGetBackendName() now returns correct daemon backend name - The daemon now calls setuid() for correct access permissions - kdbd now installs with mode u+s with RPM - Closing version 0.6.4 * Thu 24 Aug 2006 Patrice Dumas - build examples as part of make check - fix doc to build out of source - distribute doc files that requires special tools - use $(transform) when installing man pages - condition man2html build on man2html being detected - put doc generic targets out of conditionalized sections - clean a bit doc dependencies, avoid redundancy, try to be more portable * Fri 18 Aug 2006 Patrice Dumas - have static libelektra depend only on backends static libraries - call AC_GNU_SOURCE if CFLAGS is empty - add -std=c99 -pedantic to CFLAGS if CFLAGS is empty * Wed 16 Aug 2006 Patrice Dumas - don't set _GNU_SOURCE in the default case, plus minor fixes - fixes for experimental features * Tue 15 Aug 2006 Patrice Dumas - add a m4 directory for autoconf macros - use an autoconf macro from gnulib to set POSIX exensions on various systems - fix in BSDgetopt * Mon 14 Aug 2006 Patrice Dumas - determine which backends are compiled in and if libelektratools is compiled or not in ./configure, an substitute correct value in SUBDIR (idea of Yannick) - rewrite exportsymbols.sh to only use backend names to recreate exported_symbols.c - autogenerate kdbprivate.h in order to avoid hardcoding /etc/kdb, but instead honor sysconfdir - Fixes to have -std=c99 proceed until the end - Detect a working getopt, and if not found use getopt from openssh * Sun 13 Aug 2006 Patrice Dumas - fixes for compatibility with sunos 5.8 (solaris 2.8, solaris 8) - use LIBICONV in link commands - compile fstab backend conditionally on having glibc-like getmntent and friends - compile daemon conditionally on having struct ucred defined - changes in the nm and amk call to accomodate for solaris 8 - always use install_sh since install -c needs a directory arg on solaris 8 (an autoconf bug?) * Sat 5 Jun 2006 Yannick Lecaillez - fixed keyFileSerialize() in filesys.c : When binary source data - fixed kdbGetKeyWithOptions() in berkeleydb.c : key->next was reset, key lost position in the keyset. - fix keySetRaw() in key.c: When data is NULL or size = 0, key's data was cleaned but key->dataSize wasn't set to 0 was 1 byte long, write to non-allocated address occured. * Fri 4 Jun 2006 Yannick Lecaillez - Add default implementation of kdbRename() - Removed some debugging output from kdbd - Add a static version of kdbd - fixed kdbRename() in kdbd/libelektra-daemon * Thu 3 Jun 2006 Yannick Lecaillez - Fix backends/daemon compilation warnings - Add a testing suite for key struct and backends - Enhance elektra static library generation (exportobjects.sh and exportsymbols.sh) - Add section 'libs.private' into elektra.pc for static compilation - Enhance build dependency - Add a resume text in the end of configure script * Wed 2 Aug 2006 Patrice Dumas - remove -Wall (and -pedantic -ansi) from Makefile.am - add -Wall in configure.ac if CFLAGS is empty and compiler is gcc - change make to $(MAKE) * Sun 30 Jul 2006 Patrice Dumas - fix many compilation warnings * Sat 29 Jul 2006 Patrice Dumas - replace __STATIC by ELEKTRA_STATIC * Wed 26 Jul 2006 Avi Alkalay - Added -s option to 'kdb ls' to make it more scripts friendly - Separated the descriptive help functions of kdb program to help.c * Wed 26 Jul 2006 Patrice Dumas (applyied by Avi) - arrange doxygen for out-of-source build - add some source files for experimental backends and bindings - clean up the clean target in doc/Makefile.am, add an uninstall target - don't test for default_backend presence in ./configure since it breaks out of source builds - really use the --enable-experimental value - libproto.la, backends and tests depends on ../../libelektra/libelektra.la - use ../../libelektra/libelektra.la instead of -lelektra to link against in-source library - add a link for libelektratools in /usr/lib/elektra - build files required by static libelektra before libelektra, and libelektra before the backends - use check_ for tests - put high level backends in /usr/lib/elektra - use .$(OBJEXT) instead of .o - honor default_backend for static libelektra dependencies - add AC_SUBST(default_dbackend) * Tue 27 Jun 2006 Yannick Lecaillez - New kdbd daemon ! - Fix UTF8Engine : Check for a null size string - Fix Berkeleydb backend : - - Check if an UTF8 convertion is done before free memory - (before, there was case where keyToDBD freed Comment and/or Value key pointers.) - - Chown user's kdb-berkeleydb dir. - - Set correct UID/GID for initial creation of the "user" key. - Fix key.c : Set KEY_SWITCH_DOMAIN flags into keySetName() * Wed Jun 06 2006 Markus Raab 0.6.3 - added cascading features to kdb - kdb ls / and kdb ls /path is possible - kdb get /path/to/key gets user or system key - Moved help functions of the 'kdb command' to src/kdb/help.c * Fri Jun 02 2006 Avi and Yannick 0.6.2 - Renamed some sorces on src/libelektra/ - Backends installation directory moved to /lib/elektra/ - Adding testing suite for key's name (examples/tstkeyname.c) - Adding escaping support for filesys backend (filesys/filesys.c) - Fixed segfault when USER env. variable isn't set (libelektra/key.c, filesys/filesys.c) - Changed elektraenv.sh to use mktemp instead of ${RANDOM} - The doc/standards dir is now included in main RPM - Moved bindings dir to src/bindings - Fixed a bug in keyAddBasename() related to multiple '/' cleanup - All string-size_t-returning methods return sizes including ending NULL - Implemented keySetDir() for highlevel dir key permissions and type setup - Implemented keySetUAccess() for correct backend key permissions setup - Added KEY_SWITCH_UMODE to keyNew() - Few backends cleanup to make them more suitable to work under daemon context - Removed all memory problems with Valgrind - Library version changed to 2.0.1 - Fixed many build details - Fixed many spec details to meet Fedora Extras requirements and standards - Updated presentation with some desktop related charts - Converted to OpenDocumentFormat::Presentation - Included presentation german translation from Markus Raab - Presentations taken out from tarball. Now present only on repo - Included note on kdb.1 about the dependency on libelektratools.so * Thu Mar 30 2006 Yannick and Avi 0.6 - Handlerized all kdb*() methods. This is a radical API change thowards a thread-safe API. - Changed all backends to work with this change - Included kdbh*() methods for better backend manipulation, thowards the possibility of having remote backends - Included kdb*Error() methods as suggested by Markus - Added KDB_O_ALL option to ksLookupByName & ksLookupRE - Fixed bug in keySetName which caused faulty write when key name have trailing '/' - Fixed bug in configure.ac to allow installation into lib64 - Fixed bug in keySetName caused segfault on x86_64 - Updated Mandriva spec file to allow x86_64 RPMs build - Updated old Xorg & SysVinit patches for current API - Removed installation of libloader (its a convenient lib) * Sun Mar 03 2006 Avi Alkalay 0.5.9 - Added the ksGetCommonParentName() method to help in XML exporting - ksToStream() now correctly handles KDB_O_HIER flag, for nicer XML exports - keySetName() now removes repeated '/' when setting key names - Fixed a bug in filesys.c::kdbStatKey_filesys() related to link keys - Fixed a very stupid bug in key.c::keyCompare() - Added logic to key.c::keySetName() to remove extra '/' anywhere on key name - Fixed a bug on keyset.c::ksCompare() related to the NEEDSYNC flag - Added kdbprivate.h::KDB_METAINFO_SIZE(Key *key) macro, usefull for backends - Make 'kdb edit' more robust in terms of completeness when exporting to XML - Much improved and working berkeleydb backend. Going towards a high-quality backend. - BDB backend moved out from EXPERIMENTAL backends, to the mainstream, cause it is usable. - Updated scripts/benchmark-createtree to output nice XML - Reorganized #includes - Improved some API documentations - Included some casts to get rid of compiler warnings - Added some screenshots to the documentation - DocBook documentation is being reorganized and improved to soon become part of the site - Updated the presentation - Updated screenshot for 'kdb edit' command - Updated some doxy cosmetics - Updated kdbOpenBackend() documentation and error codes - Updated ksLookupByName() documentation to include more about the method behavior - Organizing the daemon backend * Fri Feb 17 2006 Markus Raab 0.5.7 - ksLookupByValue now supports cascading - Ini Backend is marked experimental - Big updates in Ini Backend: - posix and parser specific parts seperated - support for binary values containing \0 and \n - changed to more performantic kdbSetKeys (very buggy) * Tue Feb 16 2006 Avi Alkalay 0.5.7 - Old libregistry and examples are not being compiled anymore - BerkeleyDB and GConf backend are set as experimental, and removed from main build - Improved documentation for kdbRemoveKey() - Created keyIsString() method - Corrected link handling on src/backends/filesys/filesys.c::keyFromStat() - Benchmark script now sets random key types - ksFromXMLfile() now receives a (const char *) instead of (char *) as filename parameter - Doxygen is generated with a browsing tree pane - Created elektratools.pc for pkg-config * Sun Feb 12 2006 Avi Alkalay 0.5.6 - Fixed a pointer positioning bug in keyStealBaseName() - The filesys backend now correctly sets key permissions - Fixed correct value comparation on keyCompare() * Sat Jan 28 2006 Avi Alkalay 0.5.3 - Added specification for system's user, group and password - Added specification for system initialization - Fixed bug related to setting real binary keys * Sat Dec 03 2005 Avi Alkalay 0.5.2 - Cross platform handling (when possible) for UTF-8 conversions with iconv() - More detailed error messages on kdb command - New kdbGetInfo() and friends for library info gathering - Better XML import for nested s - Multiple s allowed in one on XML - Pretty complete network configuration tree layout specification - Pretty good system signature tree layout specification - Tree layout specification for environment vars and shell aliases - Tree layout specification for a filesystem mount table * Wed Oct 26 2005 Avi Alkalay 0.5.1 - Migrated to autotools, and updated documentation for that - Changed some help stuff on kdb command - Included libltdl for cross-platform compatibility * Sun Oct 02 2005 Avi Alkalay 0.5.0.5 - Some final fixes for the complete libkdb.so -> libelektra.so renaming - Removed a bug in filesys.c::keyFromStat() regarding reuse of folder key struct - Changed some Makefiles to handle the new Homepage/ directory - Fixed Makefile regarding the convert-* scripts * Mon Jul 25 2005 Avi Alkalay 0.5.0.4 - libkdb*.[so|a] renamed to libelektra*.[so|a] to avoid conflicts with Kerberos v4 - Documentation updated to fit - Corrected duplicate error codes in the KDBErr enum - Some realloc robusteness was added with assert(), thanks to Bardur Arantsson - Added in Doxygen: a small guide on how to #include, compile and link with Elektra * Tue Mar 20 2005 Avi Alkalay 0.5 - An almost ready Berkeley DB backend - Key, KeySet and KDB classes earned robusteness through the implementation of a new backend - All size_t-returning functions now return ssize_t, so a -1 can be checked for errors - kdbGetChildKeys() method and similars now return the number of keys retrieved instead of 0 - The import/export XML file can have nested keys, a real tree of hierarchical keys - No need for special XSL stylesheets to build the HTML page. DocBook XSL 1.65.1 is good enough - Markus' ini backend now compiles by default and is included in the main RPM * Tue Jan 23 2005 Avi Alkalay 0.4.11 - kdbOpen() uses $KDB_BACKEND - kdbOpenDefault() ignores env - kdbOpenBackend() is pure workhorse for both. - Created libkdbtools.so intended to have higher level functions that should not be in libkdb.so - libxml dependent code used by kdb.c moved to libkdbtools.so (kdbtools.c) - localkdb.c moved to libkdb.c, finally - Finished GConf backend, including error handling - Added 'undefined' key type to XML schema - Improved documentation for backend API - New layout style and improvements for API documentation with many new links - Better and more examples to the kdb command man page - Moved the dtd/ dir to xmldtd/ * Tue Jan 10 2005 Avi Alkalay 0.4.10 - Added the libkdb-fstab.so backend to treat the /etc/fstab file as a backend storage - Divided Key documentation in several parts - Appeared ksPopLast() - Appeared the keySteal*() methods - Removed env var that defines default backend - Experimental GConf backend * Tue Dec 27 2004 Avi Alkalay 0.4.9 - Full nice elegant documented support for dynamic pluggable backends - kdb now validates an imported XML against an XML schema, thanks to Remi Pouak - -devel RPM includes the framework and examples for backends development - elektraenv script is more secure now, thanks to Johan Kiviniemi (ion at ion.yi.org) - Removed unused #includes - new kdbOpenBackend() and ksPop() methods - install examples in elektra-devel/examples/ directory * Sat Dec 06 2004 Avi Alkalay 0.4.8 - Whish me a happy birthday - All sources moved to src/ - New 'kdb help' to show some usage examples - enum KeyFlags changed to enum KeySwitch (KeyFlags values maps to new KeySwitch for compatibility) - New keyNew(), keyDel(), ksNew(), ksDel() advanced constructors and destructors - All documentation and examples changed to increase usage of keyNew() - ksSort(), ksHead(), ksTail() methods appeared and documented. - ksLookupByName(), ksLookupByValu(), ksLookupRE() appeared as beta and documented. - #ifdef __cplusplus to make it C++ safe. - Many small fixes that appeared in the switch to keyNew() - Many other fixes, code robustness and cleanup. - User-defined key types greatly improved, fixed and tested. - XML export can now supress obvious UID and GID for 'user/*' keys - XML export can now supress user domain for 'user/*' keys - New keyNewExample.c and lookup.c on example/ - New example/keyset.xml with example of complex keys, and how they look XML-exported. - XML DTD were droped. Now we have XML schemas, thanks to Rémi . - pkgconfig support, thanks to Pier Luigi Fiorini - Library now has soname etc, to make binary compatibility safe * Fri Nov 28 2004 Avi Alkalay 0.4.7 - Better BuildPrereq in spec file - Small updates to documentation - New 'kdb mv' command (needs improvement) - Updated kdb.1 manpage to include 'kdb mv' - The KDB_ROOT env var to kdb command (needs manpage), thanks to Markus Raab - Fixed a bug in spec file, section %post - Acknowledged comments from https://bugzilla.fedora.us/show_bug.cgi?id=2250 * Fri Nov 05 2004 Avi Alkalay 0.4.6 - New method: kdbRename() - Updates to spec files, to conform to Fedora conventions - First GPG sign - Ready to be sent to fedora.us * Mon Nov 02 2004 Avi Alkalay 0.4.5 - Fixed a bug in kdbGetKeyByParentKey() - Changed the behavior of kdbSetKeys(): now developer may know where errors occured - Changed kdb to to fit new kdbSetKeys behavior - Small fixes in the doxygen documentation, improved code examples - More efficient documentation build * Sun Oct 25 2004 Avi Alkalay 0.4.4 - Added documentation on how to write new backends - Fixed "kdb get" when getting binary values - Fixed a bug when converting binary key values to hex digits - Fixed a bug in the reverse way: from hex to binary (jens) - Added -b to kdb, to set key values with the content of a file - Trying to fix something wrong in kdbGetKey() * Wed Sep 22 2004 Avi Alkalay 0.4.3 - Removed kdbOption instantiation from kdb.h * Sun Sep 12 2004 Avi Alkalay 0.4.2 - Fixed a gzip problem in the build system - Added ksGetSize() method * Tue Sep 09 2004 Avi Alkalay 0.4.1 - Fixed some wrong charset handling - License changed to BSD - Updates to documentation * Tue Aug 31 2004 Avi Alkalay 0.4 - Name changed to Elektra - rg command changed to kbd - registry.h to kdb.h - libregistry.so to libkbd.so - The former still provided as a wrapper for binary compatibility - Most #defines now are enums - Enums now documented - "*NameSpace()" to "*Namespace()" - Appeared keyClearFlag() - Changed documentation due to new name - Greatly improved documentation. It is now 100% complete - API man pages are now from Doxygen - Tested build in BSD: iconv is a separate library there - Changed some error codes for BSD compatibility - Used the "const" parameter modifier everyplace that is needed - 'kdb export' now allways exports as UTF-8, regardeless of current encoding - 'kdb get' now has a shell mode with -s option - elektrasetenv now uses the new 'kdb get' command, and it is less comples - elektrasetenv now set environment from system/env and user/env - Changes in the XML DTD header due to web site change * Mon Aug 17 2004 Avi Alkalay 0.3.1 - Fixed a bug in keyToStream() regarding XML export of comments - Make rg.c compile with older XML library - .spec now uses gmake instead of make - Moved ENODATA to ENOMSG, for better BSD compatibility - Improved the README documentation with packaging info * Mon Aug 10 2004 Avi Alkalay 0.3 - Registry now supports key and key sets CHANGE NOTIFICATIONS - New 'rg monitor' command, using notifications framework - 100% fully documented methods with Doxygen - Thinking seriously in a project name change. I have an idea for a new name * Fri Jul 30 2004 Avi Alkalay 0.2.9 - Doxygen finaly generates methods documentation. Not very nice though. - Included in -devel RPM - Included Advogato project page in the documentation * Sun Jul 25 2004 Avi Alkalay 0.2.8 - Added the export and import subcommands to rg. - Updated man page for that. - Build environments that don't have xsltproc and the DocBook styles won't fail to build manual pages. * Thu Jul 4 2004 Avi Alkalay 0.2.7 - First atempt to workaround the manpage creation when XSL tools are not available. * Thu Jun 24 2004 Avi Alkalay 0.2.6 - Moved responsability of creating dirs in the installation process from spec to Makefile. - Detected a problem of manpage creation in other distros, thanks to Tim Witham from OSDL. Not fixed yet. * Sat Jun 02 2004 Avi Alkalay 0.2.5 - Fixed the absense of keyClose in some places. Thanks to Victor. - In registryStatKey(), handled error if file can't be found. Thanks to Jens Andersen. - keyInit is now less smart: it will not test if the key is initialized or not. This is now a programmer responsability. - Code migrated to Subversion, thanks to Sean Russel. http://germane-software.com/repositories/tlr/ - Added $Id: etc to source files. - Added 'make commit' to deal with 'svn ci' * Sat May 22 2004 Avi Alkalay 0.2.4 - Improved rgsetenv login script: now set aliases too. - New methods: registryGetKeyByParent, registryGetKeyByParentKey, registryGetValueByParent, registrySetValueByParent - First attempts to create a bianry 'rg' with libxml statically linked. - New libregistry.a provided in -devel package, for creation of static binaries. - API manpages can now be accessed by method name (example: man registryGetKey) * Thu May 06 2004 Avi Alkalay 0.2.3 - Defined an XML DTD for keys - Defined keyToStream() and ksToStream() that dumps a key or keyset to XML format - Defined keyCompare() and ksCompare() - New 'rg edit' subcommand, to XML edit subtrees of the Regitry - Improved registryGetChildKeys() for better handling of symlinks - An /etc/profile.d script to set user environment is available in package now - New "Society of Softwares" section in documentation - Improved CSS of the HTML documentation * Thu Apr 13 2004 Avi Alkalay 0.2.2 - Implemented -u and -g in rg command to set Key UID and GID. - Included RG_O_SORT option for registyrGetChildKeys, to returned a KeySet sorted by key name. - Now every user/* key has an associated Owner defined, which defaults to $USER, when not specified in keySetName(). - Upgrade in the key file format. Changes in the data type field. - New handleOldKeyFileVersion() to keep backwards compatibility with older key files. - Updates to documentation for this version changes. - Symbolic links between keys are now consolidated. There is a formal key type for them: RG_KEY_TYPE_LINK - Fixed a minor problem related to reading last \n in key comments - Updated userd-convert script to be make a more NIS compatible conversion - Included a new migration script: hwconfingKudzu-convert. To migrate kudzu data to the registry * Thu Apr 06 2004 Avi Alkalay 0.2.1 - Change in key names: instead of (.) as hierarchy delimitator, we have (/) now. This is better for POSIX file name compliancy. - Consolidation of inactive keys. - Updates to documentations to include inactive keys concepts, etc. - Written key.3 manual page for key*() methods. - New conversion script to convert /etc/fstab - Removed a bug in UTF8Engine(). Data was written with a \n in the end. Thanks to Jens Andersen. * Thu Apr 01 2004 Avi Alkalay 0.1.6 - Introduction to inactive keys - registryGetChildKeys by default do not include inactive keys in resulting KeySet. Use RG_O_INACTIVE instead. - rg.c changed, specially in the list subcommand, to work with new behavior * Wed Mar 31 2004 Avi Alkalay 0.1.5 - Fixed in registryGetKey: Keys allways needed sync - Fixed bug releated to NEEDSYNC: ~RG_KEY_FLAG_NEEDSYNC needed a special cast to use the right number of bits - Improved HOWTO documentation and manual. Link to ReiserFS. - Started writting of the key.3 manual - One more bug related to strblen in registryFileUnserialize(), causing wrong data size calculation * Mon Mar 29 2004 Avi Alkalay 0.1.4 - Written manual pages rg(1), registry(7), registry(5) and registry(3) using DocBook - Ported the OpenOffice.org specification to DocBook, using the modularized man pages - RPMs include manpages - RPMs have prerequesites now - Fixed bug regarding \0 in end of key names on recursive stats - More robust build system, catching warnings - New method: registryGetRootKeys(KeySet *returned) - Fixed some bugs related to usage of strblen() - Introduction of the RG_O_* method options - Removed bug related to permission when stat()ing keys - Removed bugs in some KeySet methods - Much improved 'rg ls' command, specially in recursive mode - New key flag, NEEDSYNC, to indicate the change status of a key - New method, registrySetKeys, to commit all modified keys on a KeySet * Tue Mar 16 2004 Avi Alkalay 0.1.2 - The Linux Registry API is 100% usable - The rg command is very usable - Full support to UTF-8. Everything stored in the registry is UTF-8, regardeless of user's LANG. Conversions are on the fly. - Fixed bug on keySetName(), regarding wrong keyNameSize - Introduction of registryRemoveKey() - rg subcommands: ls, get, set, rm - rg now supports set octal permissions from command line - Key and Registry support for DIR type - Documentation process (man pages) in the very begining - Include files in a separate package * Sat Mar 06 2004 Avi Alkalay 0.0.9 - Now no more IPC, Berkeley DB, threads, setuid, and other complexities - Simple library that accesses files on disk - rg has 'set' and partial 'ls' subcommands implemented - API can already be used * Sat Feb 15 2004 Avi Alkalay 0.0.2 - Based on IPC, Berkeley DB, Threads, and many other complexities elektra-0.7.1/INSTALL0000644000076400001440000003607511365506635011145 00000000000000Where to Find Elektra ===================== Elektra stable source code as tarballs can be found at: http://sourceforge.net/project/showfiles.php?group_id=117521 Elektra Subversion repository with the latest stable source code can be checked out with these commands: bash:~$ cd src bash:~/src$ svn co https://svn.libelektra.org/svn/elektra/trunk elektra bash:~/src$ cd elektra bash:~/src/elektra$ # files are here You should always prefer using Elektra in a packaged form from your distribution. Skip to the next chapter to learn how to compile from source. To build a rpm package yourself from its source RPM use: $ rpmbuild --rebuild elektra-VERSION.src.rpm or: $ rpmbuild -ta elektra-VERSION.tar.gz The default RPM specifications that come with the source were written to meet the Filesystem Hierarchy Standards. More building info can be found in the elektra.spec.in RPM construction file. Building and Installation Instructions ====================================== Precondition: Make sure you have a compiler, xml2 (for kdb tool) and xsl (see later) installed. ./configure will help you that you don't forget something essential. For Debian it is enough to have build-essential. ./configure --help will print you an exhausting list of all options available. These section only gives specific hints for elektra. To read generic instructions skip to Generic Installation Instructions. To meet the Filesystem Hierarchy Standard use: $ ./configure \ --bindir=/bin \ --libdir=/lib \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --with-docdir=/usr/share/doc/elektra \ --with-develdocdir=/usr/share/doc/elektra-devel \ The shorter version of it is: --prefix=/usr \ --exec-prefix=/ \ If you rather prefer /usr/lib and /usr/bin, you can use: --exec-prefix=/usr \ (or leave it out to be done implict by --prefix) If you rather prefer your homedirectory, do something like: --prefix=/home/markus \ then the files will go to /home/markus/bin, /home/markus/lib asf. for redhat installations try: --with-docbook=/usr/share/sgml/docbook/xsl-stylesheets \ for debian installations try: --with-docbook=/usr/share/xml/docbook/stylesheet/nwalsh \ with package docbook-xsl installed. You can enable and disable backends with --enable- and --disable- You can enable and disable bindings with --enable- and --disable- If you want debug symbols and a debug output analysis, you can try: --enable-debug \ If you want to test latest backends, bindings and features, try: --enable-experimental \ (WARNING! may break, crash or even not compile!) $ make to install everything: # sudo make install You can also call the last as: # make DESTDIR=/some/directory install Building RPMs from the Subversion Repository ============================================ Do not use the fresh files from the Subversion repository, since they might be quite unstable. Doing this requires exactly automake 1.9 and at least autoconf 2.59. If you know what you are doing (Note: read carefully about the configure options), do this: bash:~$ cd src bash:~/src$ svn co https://svn.libelektra.org/svn/elektra/trunk elektra bash:~/src$ cd elektra bash:~/src/elektra$ ./bootstrap.sh bash:~/src/elektra$ ./configure bash:~/src/elektra$ make bash:~/src/elektra$ sudo make install To build a RPM package you can also to do this right after ./configure: bash:~/src/elektra$ make rpm RPMs will be generated under ~/src/elektra/rpmdir Notes for Packagers =================== Elektra should be divided in 2 packages: "elektra" and "elektra-devel". The "elektra" package sugested files: /bin/kdb /etc/profile.d/elektraenv.sh /lib/libelektra.so* /lib/libelektra-*.so (backends) /usr/lib/libelektratools.so* (XML importing methods) /usr/lib/libelektra-*.so (other backends) /usr/share/doc/elektra/ /usr/share/doc/elektra/fstab-convert /usr/share/doc/elektra/hosts-convert /usr/share/doc/elektra/hwconfKudzu-convert /usr/share/doc/elektra/inittab-convert /usr/share/doc/elektra/network-convert /usr/share/doc/elektra/users-convert /usr/share/doc/elektra/xfree-convert /usr/share/man/man1/kdb.1.gz /usr/share/man/man5/elektra.5.gz /usr/share/man/man7/elektra.7.gz /usr/share/sgml/elektra-0.1.1 /usr/share/sgml/elektra-0.1.1/catalog /usr/share/sgml/elektra-0.1.1/elektra.dtd /usr/share/sgml/elektra-0.1.1/elektra.xsd The "elektra-devel" package sugested files: /usr/include/kdb.h (main include) /usr/include/kdbtools.h (higher level functions) /usr/include/kdbbackend.h (backend development) /usr/include/kdbprivate.h (used by kdbbackend.h) /usr/lib/libelektra.a /usr/share/doc/elektra-devel /usr/share/doc/elektra-devel/backend-template/* (backend development examples) /usr/share/doc/elektra-devel/api-html/* (Doxygen API documentation) /usr/share/doc/elektra-devel/examples/* (Many examples in C language) /usr/share/man/man3/kdb*.3.gz (Manpages for the kdb*() methods) /usr/share/man/man3/key*.3.gz (Manpages for the key*() methods) /usr/share/man/man3/ks*.3.gz (Manpages for the ks*() methods) Developer Infos =============== The examples are only scripts which call the executables in .libs. To execute the examples with gdb, just run: libtool --mode=execute gdb Following configure options can be used for debugging: --enable-debug Enables all DEBUG clauses and prints much more information --enable-experimental Enables experimental code Testing environment Run "make check" in tests for a comprehensive test of all API functions. --enable-valgrind-tests Allows you to enable valgrind for testing, a full list of memory leaks is printed after every test. --enable-gcov Use it to see what lines of code are covered by tests. You may want to use --enable-iconv if you need keys and strings in utf8 in a multi language setup. Thus multi language computers normally have utf per default, this option is disabled. (Below, generic installation instructions) Generic Installation Instructions ********************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Basic Installation ================== These are generic installation instructions. 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 only 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. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. 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. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the 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. 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=c89 CFLAGS=-O2 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 must use a version of `make' that supports the `VPATH' variable, such as 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 `..'. If you have to use a `make' that does not support the `VPATH' variable, you have 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. Installation Names ================== By default, `make install' will install the package's files in `/usr/local/bin', `/usr/local/man', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give `configure' the option `--exec-prefix=PREFIX', the package will use PREFIX as the prefix for installing programs and libraries. Documentation and other data files will 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. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE 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. 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 `--target=TYPE' option 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 will cause the specified gcc to be used as the C compiler (unless it is overridden in the site shell script). `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of the options to `configure', and exit. `--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. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. elektra-0.7.1/Makefile.am0000644000076400001440000000125611365507605012137 00000000000000ACLOCAL_AMFLAGS = -I m4 SUBDIRS = libltdl src doc benchmarks examples scripts xmlschema tests EXTRA_DIST=elektra.pc elektratools.pc elektracpp.pc elektra.spec elektra.mandriva.spec elektra.xml pkgconfigdir = $(ulibdir)/pkgconfig pkgconfig_DATA = elektra.pc elektratools.pc elektracpp.pc RPMARCH=`rpmbuild --showrc | awk '/^build arch/ {print $$4}'` rpm: dist mkdir -p rpmdir/BUILD \ rpmdir/SPECS \ rpmdir/SOURCES \ rpmdir/SRPMS \ rpmdir/RPMS/$(RPMARCH) rpmbuild --clean -ta $(PACKAGE)-$(VERSION).tar.gz --define "_topdir $$PWD/rpmdir" @echo "============================================================" @echo "Finished - the packages are in rpmdir/RPMS and rpmdir/SRPMS!" elektra-0.7.1/Makefile.in0000644000076400001440000005523411365511154012147 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = . am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/elektra.pc.in \ $(srcdir)/elektra.spec.in $(srcdir)/elektracpp.pc.in \ $(srcdir)/elektratools.pc.in $(top_srcdir)/configure AUTHORS \ COPYING ChangeLog INSTALL NEWS TODO compile config.guess \ config.sub depcomp install-sh ltmain.sh missing subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/extensions.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno configure.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/config.h CONFIG_CLEAN_FILES = elektra.spec elektra.pc elektratools.pc \ elektracpp.pc SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(pkgconfigdir)" pkgconfigDATA_INSTALL = $(INSTALL_DATA) DATA = $(pkgconfig_DATA) ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d $(distdir) \ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr $(distdir); }; } DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print INSTALL = @INSTALL@ ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BACKENDS = @BACKENDS@ BACKEND_VERSION_API = @BACKEND_VERSION_API@ BINDINGS = @BINDINGS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CDBGFLAGS = @CDBGFLAGS@ CFLAGS = @CFLAGS@ COPTFLAGS = @COPTFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSTDFLAGS = @CSTDFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDBGFLAGS = @CXXDBGFLAGS@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXOPTFLAGS = @CXXOPTFLAGS@ CXXSTDFLAGS = @CXXSTDFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_FALSE = @DEBUG_FALSE@ DEBUG_TRUE = @DEBUG_TRUE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ELEKTRATOOLS_VERSION_API = @ELEKTRATOOLS_VERSION_API@ ELEKTRA_VERSION_API = @ELEKTRA_VERSION_API@ EXEEXT = @EXEEXT@ EXPERIMENTAL_FALSE = @EXPERIMENTAL_FALSE@ EXPERIMENTAL_TRUE = @EXPERIMENTAL_TRUE@ F77 = @F77@ FFLAGS = @FFLAGS@ GENHTML = @GENHTML@ GREP = @GREP@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ HAVE_LIBLTDL_FALSE = @HAVE_LIBLTDL_FALSE@ HAVE_LIBLTDL_TRUE = @HAVE_LIBLTDL_TRUE@ HAVE_MAN2HTML_FALSE = @HAVE_MAN2HTML_FALSE@ HAVE_MAN2HTML_TRUE = @HAVE_MAN2HTML_TRUE@ HAVE_XML_FALSE = @HAVE_XML_FALSE@ HAVE_XML_TRUE = @HAVE_XML_TRUE@ HAVE_XSL_FALSE = @HAVE_XSL_FALSE@ HAVE_XSL_TRUE = @HAVE_XSL_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDB_VERSION = @KDB_VERSION@ KDB_VERSION_MAJOR = @KDB_VERSION_MAJOR@ KDB_VERSION_MAJORMINOR = @KDB_VERSION_MAJORMINOR@ KDB_VERSION_MICRO = @KDB_VERSION_MICRO@ KDB_VERSION_MINOR = @KDB_VERSION_MINOR@ LCOV = @LCOV@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VALGRIND = @VALGRIND@ VALGRINDTESTS_FALSE = @VALGRINDTESTS_FALSE@ VALGRINDTESTS_TRUE = @VALGRINDTESTS_TRUE@ VERSION = @VERSION@ XML2_CONFIG = @XML2_CONFIG@ XML_CPPFLAGS = @XML_CPPFLAGS@ XML_LIBS = @XML_LIBS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ backend_static_libs = @backend_static_libs@ backenddir = @backenddir@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ datarootdir = @datarootdir@ dbroot = @dbroot@ default_backend = @default_backend@ default_dbackend = @default_dbackend@ default_docbook = @default_docbook@ develdocdir = @develdocdir@ docdir = @docdir@ doxygen = @doxygen@ dvidir = @dvidir@ elektratools = @elektratools@ exec_prefix = @exec_prefix@ gconf_CFLAGS = @gconf_CFLAGS@ gconf_LIBS = @gconf_LIBS@ hlvlbackenddir = @hlvlbackenddir@ 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@ man2html = @man2html@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ privatelibs = @privatelibs@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ ulibdir = @ulibdir@ xsltproc = @xsltproc@ ACLOCAL_AMFLAGS = -I m4 SUBDIRS = libltdl src doc benchmarks examples scripts xmlschema tests EXTRA_DIST = elektra.pc elektratools.pc elektracpp.pc elektra.spec elektra.mandriva.spec elektra.xml pkgconfigdir = $(ulibdir)/pkgconfig pkgconfig_DATA = elektra.pc elektratools.pc elektracpp.pc RPMARCH = `rpmbuild --showrc | awk '/^build arch/ {print $$4}'` all: all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ cd $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) cd $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) elektra.spec: $(top_builddir)/config.status $(srcdir)/elektra.spec.in cd $(top_builddir) && $(SHELL) ./config.status $@ elektra.pc: $(top_builddir)/config.status $(srcdir)/elektra.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ elektratools.pc: $(top_builddir)/config.status $(srcdir)/elektratools.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ elektracpp.pc: $(top_builddir)/config.status $(srcdir)/elektracpp.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) test -z "$(pkgconfigdir)" || $(mkdir_p) "$(DESTDIR)$(pkgconfigdir)" @list='$(pkgconfig_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ $(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \ done # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; 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; \ (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" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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 || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) mkdir $(distdir) $(mkdir_p) $(distdir)/. $(distdir)/m4 $(distdir)/src/libelektra @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(mkdir_p) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ distdir) \ || exit 1; \ fi; \ done -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r $(distdir) dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && cd $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' distuninstallcheck: @cd $(distuninstallcheck_dir) \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile $(DATA) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(pkgconfigdir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_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 $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-pkgconfigDATA install-exec-am: install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-info-am uninstall-pkgconfigDATA uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ check-am clean clean-generic clean-libtool clean-recursive \ ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ dist-shar dist-tarZ dist-zip distcheck distclean \ distclean-generic distclean-libtool distclean-recursive \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-exec install-exec-am \ install-info install-info-am install-man install-pkgconfigDATA \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ maintainer-clean-recursive mostlyclean mostlyclean-generic \ mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \ tags tags-recursive uninstall uninstall-am uninstall-info-am \ uninstall-pkgconfigDATA rpm: dist mkdir -p rpmdir/BUILD \ rpmdir/SPECS \ rpmdir/SOURCES \ rpmdir/SRPMS \ rpmdir/RPMS/$(RPMARCH) rpmbuild --clean -ta $(PACKAGE)-$(VERSION).tar.gz --define "_topdir $$PWD/rpmdir" @echo "============================================================" @echo "Finished - the packages are in rpmdir/RPMS and rpmdir/SRPMS!" # 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: elektra-0.7.1/NEWS0000644000076400001440000002762211365506635010611 000000000000000.7.0 Finally it is done, the 0.7.0 API is finished. The API covers everything shown in kdb.h and all releases in 0.7.0 will be 100% ABI and API compatible supported for at least a year. Some bugs might break that rule, but there should not be left many anymore, because every method is at least checked twice and most have hundred of test cases. Please report any bugs you find to http://bugs.libelektra.org - portability and build bugs - mistakes, misspelling in documentation This is not valid for kdb-tools, there are lots of bugs remaining there and a rewrite would be very useful. For that reason there will be a separate release for kdb-tools, libelektratools and the backend interface. The stable APIs of libelektratools and the backend interface will be announced separately, but they will be part of 0.7.x. kdb-tool and kdbedit and so will also have separate releases, but because they are not a library there is no API or ABI issue there. Pages related to 0.7.0: http://www.libelektra.org/GetStartedMounting http://www.libelektra.org/Tutorial http://www.libelektra.org/API-Changes0.7 http://www.libelektra.org/Changes0.7 Marketing issues: - Freshmeat announcment - Sourceforge upload - API docu upload - forums - newsgroups - other mailinglists Download it from: http://www.markus-raab.org/ftp/elektra-0.7.0.tar.gz ftp://www.markus-raab.org/elektra-0.7.0.tar.gz --------------- 0.7.0rc5 The last release candidate before 0.7.0 I am proud to present the finished 0.7.0 external API in kdb.h [0]. A lot changed to 0.6.10 but the fundamentals are clearer then ever before: 3 Classes with their methods, a clear, easy and mature API. It is very hard to use it wrong but you get best results with very short code: http://www.libelektra.org/Tutorial Other parts are not finished, like libelektratools, the kdb-tool and the backend interface. They are not part of the official 0.7 release and get their own release later. The reasons to release within the next week are: - The API is finished - Oyranos needs a stable release from elektra - the last release is long ago - unstable has been much more stable than stable since some time - there have been no commits to the stable branch since unstable existed - Elektra grows just too complex to wait for all parts to finish Now some highlights from one month of work from 333 ChangeLog lines: - many many bugs were fixed - the core completely compiles with -ansi -pedantic -std=c99 - all code compiles with -Wall -Werror - the test-suite is now complete - much cleaner infrastructure within the code - many autoconf/automake issues fixed - static, dynamic building, linking with defaults backends everything works! - many new options to stat and remove all keys and so on.. - environment variables and passwd database allow subtle influence of where the user configuration resides - kdb info now prints where configuration lies on hard disc --------------- 0.7.0rc4 - 12.05.2008 I am proud to present the fourth release candidate of elektra 0.7.0. It is now possible to enable and disable Backends and Bindings with configure switches. The documentation was improved. The c++ binding now basically works, see the tests for examples. Ini and Berkleydb backends now compile again. There were a lot of bug fixes, like mntent.h fix for Mac OS X. --------------- 0.7.0rc3 - 24.04.2008 Call for 0.7 finish Unfortunately there is not much response about the 0.7 release candidates but there is still a lot to do to have a mature library worth to be announced as stable. Specifically there are following things to do and we really need help to achieve that faster than end of this year: There are now only 3 backends working well tested but undistinguished in handling error scenarios. At least 3 more Backends are needed also tested in real world applications. Favoured are existing but not ported backends like berkleydb, ini, winregistry and uniconf. Working bindings have a lot meaning in how complete and useful the API is. It would be preferable to have at least 3 bindings working with at least an example application like kdb-tool. They could be cpp, python and one open. A lot of bug squashing is left open. Please don't hesitate to open and fix more bugs on http://bugs.libelektra.org. Documentation is not yet completely updated to 0.7. Especially the homepage has a lot of outdated information, but also the API documentation needs another eye on it and the tutorial needs a rewrite. There might be some licencing issues in some parts of elektra, everything should be BSD, if you find something please open a bug. A partial blocker is the kdb-tool, where a rewrite would be nice but is not necessary for 0.7 (the library counts not the environment). Other things like portability are taken seriously but are not blockers, they can be fixed later too. What is really good working in elektra is the infrastructure like svn, homepage, bug tracking, many thanks to José Luis Tallón for that! Now some words about 0.7.0rc3: Version macros were added to have static information about the elektra version compiled against. There were many enhancements in the C++ Binding, the Key Class is now quite well complete. While writing the C++ binding I realized that there is need for keyInc() the opposite of keyDel() to increase the viability of a key object. keyVNew() and ksVNew() were added to make it possible to pass the va_list from the C++ binding. The blocker bug that libelektra assumes system/elektra/mountpoints to exist was solved, many thanks to Patrick Sabin. The tests now work without any preloading without memory leaks. And lots of bug fixes (Many thanks to Kai-Uwe Behrmann): - sed changed for macosx compatibility - fixed signature ssize_t ksToStream - also set CXXFlags - fix wrong parent at end in ksToStream - fix return value of successful kdb import - string is default type for xml without type="" - fix extra_dist some missing files - remove , at end of enumeration lists The svn id is unstable@1352: https://svn.libelektra.org/svn/elektra/unstable/ The release candidate is available under: http://www.markus-raab.org/ftp/elektra-0.7.0rc3.tar.gz --------------- 0.7.0rc2 - 23.03.2008 Second Release Candidate of unstable repository. We proudly present the second release candidate for Elektra 0.7.0. Many bugs were fixed, kdbGet() and kdbSet() is now really stable, useful and well documentated. test_kdb also tests hosts and fstab next to filesys with 6598 test cases. kdbSet() now supports a parent key to only set a part of the configuration passed by the keyset, allowing to e.g. save system and user configuration seperately. It only calls kdbSet_backend() when it is actually necessary. The splitting works much more efficient with n*b instead of n^2*b. The highlevel functions kdbGetKey() and kdbSetKey() now work well with Capabilities. This allows very easy changing of keys inside backends even with some lacking capabilities, see GetStartedMounting. Patrick Sabin and I wrote our bachelor thesis about mounting backends for configuration. It gives a detailed introduction in problem and choices and the actual implementation. See: doc/elektra.pdf doc/elektra.ps.gz --------------- 0.7.0rc1 - 06.12.2007 First Release Candidate of unstable repository. = Large Changes = == Multiple Backends == Elektra now supports multiple backends at once. That means every path like user/sw or system/filesystems can reside in a different backend. Use cases for backend mounting: 1. There are many configurationfiles lying on every system that can't be replaced for various reasons. These files can be fade in into the global elektra namespace without any notice by applications using these files. Backends for /etc/fstab, /etc/mtab and /etc/passwd exist right now. 2. Users or administrators might get used by ordained files or syntax without wanting to change the whole configuration using elektra. The mounting technique allows them to choose. 3. Specific programs may have very complex and large configuration. Binary files with index may give them a fairly better performance without missing the connection to the global namespace. 4. Configuration provided by network or local daemons for notification and caching can't be used for every program. Configuration related to bootup or some system users need to be available without them, but should also be accessed by applications needing configuration from network. If you are not convinced - Its just about choice and you can go on using only one backend. See http://www.libelektra.org/Backends what is and might be possible. == kdbOpen(), kdbClose(), kdbGet() and kdbSet() == These 4 core functions do now everything related to backend communication. All the other functions are build upon it. This makes backend writing much easier. Removing and Stat works by setting a flag in a key. KDB * is now a typedef for the _KDB structure and not a void* pointer. == Keyset == Starting with ksNew you can give a hint how large the keyset may grow. You can also give a list of keys which should be added at startup. ksGenerate() makes use out of that and generates you a keyset in C-Code which you can use in your applications or for regression testing. The internal structure of keyset is now a growing (and shrinking) array. Keys may belong to multiple keysets now. The last ksDel() deletes the key automatically (reference counter). This implementation is a lot faster, the benchmark is for 0.7.0rc1 better then for 0.6.*, even though the mounting logic takes a bit of performance, but very little and something about zero when no backend is mounted. == Key == The key now uses sizes for name, owner, value and comment. This allows a complete new technique of serializing: keyCompose(). With that you can serialize a key without a single malloc(). keySerialize() is rewritten for the new key struct too. == Access Types == The directory is now marked by the executable flags. That means you can disallow other users or groups to list your keys. == Capabilites == Some backends fullfill the whole specification of kdbGet_template() and kdbSet_template() and can be used by any program for any purpose. Other backends have principle limitations and do not fullfill the specification, but can do more than enough to be useful. To handle this problem we created a data structure describing what capabilites a backend does not have. With that technique you can use the testing framework from early steps developing the backend on. To do so, just declare your backend can do nothing and delete step by step while your backend evolves. == Testing framework == There is now a large testing framework with 11 collections with up to 8128 tests each. Most conditions of the whole sourcecode are checked, that means if you random change something in the code you have a good chance that a test case will fail. There are 2 new flags: --enable-valgrind-tests Allows you to enable valgrind for testing, a full list of memory leaks is printed after every test. --enable-gcov Use it to see what lines of code are covered by tests. The testcases are without any memory leak (dozens of leaks are fixed, especially in xml code). 0.6.10 - 10.03.2007 Elektra received some stability updated from Patrice Dumas. 0.6.6 - 21.12.2006 support for directories with values and comments on filesys, berkeleydb and daemon backends. 0.6.4 - 08.09.2006 Tons of improvements and standarizations to the build system from Patrice Dumas and Yannick. Many improvements to the daemon backend from Yannick. Several other bug fixes. We are getting closer to a production daemon. 0.6.2 - 02.06.2006 - Includes more robust key name handling and intelligent duplicate "/" removal - Escaping of "/" on key names is now supported - Better automatic UTF-8 conversions - More tunnings for better future daemon backend support - More robust berkeleydb backend - Backends are now installed on /lib/elektra/ - The build system was tunned to be included as a Fedora Extras package 0.6.0 - 30.03.2006 Public release of the new API. Check it out in SF. elektra-0.7.1/README0000644000076400001440000000177211365506635010770 00000000000000ABOUT ===== Elektra provides a universal and secure framework to store configuration parameters in a hierarchical key-value pair mechanism, instead of each program using its own text configuration files. This allows any program to read and save its configuration with a consistent API, and allows them to be aware of other applications' configurations, permitting easy application integration. While architecturally similar to other OS registries, Elektra does not have most of the problems found in those implementations. DOWNLOAD ======== Elektra stable source code as tarballs can be found at: http://sourceforge.net/project/showfiles.php?group_id=117521 Elektra Subversion repository with the latest stable source code can be checked out with these commands: bash:~$ cd src bash:~/src$ svn co https://svn.libelektra.org/svn/elektra/trunk elektra bash:~/src$ cd elektra bash:~/src/elektra$ # files are here INSTALL ======= See the INSTALL document for informations how to install the software. elektra-0.7.1/TODO0000644000076400001440000000542111365506635010573 00000000000000#For bugs and enhancements go to http://bugs.libelektra.org #For visions and drafts go to http://www.libelektra.org #For possible extensions in future, see FUTURE backends: using libraries: nickel libconfig eet using keysets: bind memory update old backends: berkleydb ini winregistry uniconf bindings: using swig cpp python scheme java bugs: bug squashing fix open bugs of http://bugs.libelektra.org documentation: update all parts of docu to 0.7.0 update homepage to 0.7.0 related informatin update Tutorial to 0.7.0 kdbGet() bsd licence: check for documentation, homepage, modules,... kdb rewrite: [partial blocker] kdb-ls alike commands rm -r cp -r mv -r ls pretty format preload (mount, config backends) generate meta-info get/set info about backends add capabilities support in kdb tool export xml validation integration: in other software make autoconf snippet shell-script (like in oyranos) extend: re-add other backends (berkleydb, gconf) build and test without gconf,... installed ksToStream in stream.c Reintroduce and test Regular Expressions in keyset.c ksCompare in keyset.c mount user/elektra hierarchy reliably code: error states in kdbSet mode checks 0-7 error codes dynamic memory management: improve realloc, use srealloc don't use sprintf, asprintf, strdup, strndup use only own functions where available use different compilers, libc too packaging: build with minimal system debian packages fedora packages all exported methods of elektra need to be: useful in current state well documented in behavior having test cases for behavior behavior not overlapping with another function well documented error cases, return and errno values having test cases for error cases otherwise fix or mark it obsolete version: tag everything with 0.7.0 get version with macro get version at runtime check exported symbols use symbol table #portability bugs:: mntent.h fix for macosx dont use libltdl under linux portability: cross compilation bsd, aix,... glibc functions away portability: Build on different platforms Statical build testing build and test without iconv, libxml2 compilers: diet-gcc intel cc #testing testing coverage: -fprofile-arcs -ftest-coverage reasoning which parts are tested advanced testing: get and set a real big amount of keys multithreading testing #performance general: scripts for performance and stability testing testing optimizations (-O2) profile the code and fix optimization leaks profiler: search for slow parts malloc trace: reduce mallocs benchmarks: are large keysets handled? keySet: make statistics how many keys typical applications need be efficient for typical needs integer overflows: sizes must not exceed SSIZE_MAX check for null pointers and return -1 elektra-0.7.1/aclocal.m40000644000076400001440000120313511365511142011733 00000000000000# generated automatically by aclocal 1.9.6 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # 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. # iconv.m4 serial AM6 (gettext-0.17) dnl Copyright (C) 2000-2002, 2007 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], [ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_LIB_LINKFLAGS_BODY([iconv]) ]) AC_DEFUN([AM_ICONV_LINK], [ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and dnl those with the standalone portable GNU libiconv installed). AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) dnl Add $INCICONV to CPPFLAGS before performing the following checks, dnl because if the user has installed libiconv and not disabled its use dnl via --without-libiconv-prefix, he wants to use it. The first dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed. am_save_CPPFLAGS="$CPPFLAGS" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) AC_CACHE_CHECK([for iconv], am_cv_func_iconv, [ am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no AC_TRY_LINK([#include #include ], [iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);], am_cv_func_iconv=yes) if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" AC_TRY_LINK([#include #include ], [iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);], am_cv_lib_iconv=yes am_cv_func_iconv=yes) LIBS="$am_save_LIBS" fi ]) if test "$am_cv_func_iconv" = yes; then AC_CACHE_CHECK([for working iconv], am_cv_func_iconv_works, [ dnl This tests against bugs in AIX 5.1 and HP-UX 11.11. am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi AC_TRY_RUN([ #include #include int main () { /* Test against AIX 5.1 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); if (cd_utf8_to_88591 != (iconv_t)(-1)) { static const char input[] = "\342\202\254"; /* EURO SIGN */ char buf[10]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_utf8_to_88591, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) return 1; } } #if 0 /* This bug could be worked around by the caller. */ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ { iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; char buf[50]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_88591_to_utf8, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) return 1; } } #endif /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is provided. */ if (/* Try standardized names. */ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) /* Try IRIX, OSF/1 names. */ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) /* Try AIX names. */ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) /* Try HP-UX names. */ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) return 1; return 0; }], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no], [case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; esac]) LIBS="$am_save_LIBS" ]) case "$am_cv_func_iconv_works" in *no) am_func_iconv=no am_cv_lib_iconv=no ;; *) am_func_iconv=yes ;; esac else am_func_iconv=no am_cv_lib_iconv=no fi if test "$am_func_iconv" = yes; then AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function and it works.]) fi if test "$am_cv_lib_iconv" = yes; then AC_MSG_CHECKING([how to link with libiconv]) AC_MSG_RESULT([$LIBICONV]) else dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV dnl either. CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= LTLIBICONV= fi AC_SUBST(LIBICONV) AC_SUBST(LTLIBICONV) ]) AC_DEFUN([AM_ICONV], [ AM_ICONV_LINK if test "$am_cv_func_iconv" = yes; then AC_MSG_CHECKING([for iconv declaration]) AC_CACHE_VAL(am_cv_proto_iconv, [ AC_TRY_COMPILE([ #include #include extern #ifdef __cplusplus "C" #endif #if defined(__STDC__) || defined(__cplusplus) size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); #else size_t iconv(); #endif ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const") am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` AC_MSG_RESULT([$]{ac_t:- }[$]am_cv_proto_iconv) AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1, [Define as const if the declaration of iconv() needs const.]) fi ]) # lib-ld.m4 serial 3 (gettext-0.13) dnl Copyright (C) 1996-2003 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Subroutines of libtool.m4, dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision dnl with libtool.m4. dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. AC_DEFUN([AC_LIB_PROG_LD_GNU], [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld, [# I'd rather use --version here, but apparently some GNU ld's only accept -v. case `$LD -v 2>&1 conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by GCC]) 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. [[\\/]* | [A-Za-z]:[\\/]*)] [re_direlt='/[^/][^/]*/\.\./'] # Canonicalize the path of ld ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(acl_cv_path_LD, [if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in *GNU* | *'with BFD'*) test "$with_gnu_ld" != no && break ;; *) test "$with_gnu_ld" != yes && break ;; esac fi done IFS="$ac_save_ifs" else acl_cv_path_LD="$LD" # Let the user override the test with a path. fi]) LD="$acl_cv_path_LD" if test -n "$LD"; then AC_MSG_RESULT($LD) else AC_MSG_RESULT(no) fi test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) AC_LIB_PROG_LD_GNU ]) # lib-link.m4 serial 13 (gettext-0.17) dnl Copyright (C) 2001-2007 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_PREREQ(2.54) dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and dnl the libraries corresponding to explicit and implicit dependencies. dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and dnl augments the CPPFLAGS variable. dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. AC_DEFUN([AC_LIB_LINKFLAGS], [ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) define([Name],[translit([$1],[./-], [___])]) define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ AC_LIB_LINKFLAGS_BODY([$1], [$2]) ac_cv_lib[]Name[]_libs="$LIB[]NAME" ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" ac_cv_lib[]Name[]_cppflags="$INC[]NAME" ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX" ]) LIB[]NAME="$ac_cv_lib[]Name[]_libs" LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" INC[]NAME="$ac_cv_lib[]Name[]_cppflags" LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) AC_SUBST([LIB]NAME) AC_SUBST([LTLIB]NAME) AC_SUBST([LIB]NAME[_PREFIX]) dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the dnl results of this search when this library appears as a dependency. HAVE_LIB[]NAME=yes undefine([Name]) undefine([NAME]) ]) dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode) dnl searches for libname and the libraries corresponding to explicit and dnl implicit dependencies, together with the specified include files and dnl the ability to compile and link the specified testcode. If found, it dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], [ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) define([Name],[translit([$1],[./-], [___])]) define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME dnl accordingly. AC_LIB_LINKFLAGS_BODY([$1], [$2]) dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, dnl because if the user has installed lib[]Name and not disabled its use dnl via --without-lib[]Name-prefix, he wants to use it. ac_save_CPPFLAGS="$CPPFLAGS" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ ac_save_LIBS="$LIBS" LIBS="$LIBS $LIB[]NAME" AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no]) LIBS="$ac_save_LIBS" ]) if test "$ac_cv_lib[]Name" = yes; then HAVE_LIB[]NAME=yes AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.]) AC_MSG_CHECKING([how to link with lib[]$1]) AC_MSG_RESULT([$LIB[]NAME]) else HAVE_LIB[]NAME=no dnl If $LIB[]NAME didn't lead to a usable library, we don't need dnl $INC[]NAME either. CPPFLAGS="$ac_save_CPPFLAGS" LIB[]NAME= LTLIB[]NAME= LIB[]NAME[]_PREFIX= fi AC_SUBST([HAVE_LIB]NAME) AC_SUBST([LIB]NAME) AC_SUBST([LTLIB]NAME) AC_SUBST([LIB]NAME[_PREFIX]) undefine([Name]) undefine([NAME]) ]) dnl Determine the platform dependent parameters needed to use rpath: dnl acl_libext, dnl acl_shlibext, dnl acl_hardcode_libdir_flag_spec, dnl acl_hardcode_libdir_separator, dnl acl_hardcode_direct, dnl acl_hardcode_minus_L. AC_DEFUN([AC_LIB_RPATH], [ dnl Tell automake >= 1.10 to complain if config.rpath is missing. m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done ]) wl="$acl_cv_wl" acl_libext="$acl_cv_libext" acl_shlibext="$acl_cv_shlibext" acl_libname_spec="$acl_cv_libname_spec" acl_library_names_spec="$acl_cv_library_names_spec" acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" acl_hardcode_direct="$acl_cv_hardcode_direct" acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" dnl Determine whether the user wants rpath handling at all. AC_ARG_ENABLE(rpath, [ --disable-rpath do not hardcode runtime library paths], :, enable_rpath=yes) ]) dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and dnl the libraries corresponding to explicit and implicit dependencies. dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem. AC_DEFUN([AC_LIB_LINKFLAGS_BODY], [ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) dnl Autoconf >= 2.61 supports dots in --with options. define([N_A_M_E],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit([$1],[.],[_])],[$1])]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) AC_LIB_ARG_WITH([lib]N_A_M_E[-prefix], [ --with-lib]N_A_M_E[-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib --without-lib]N_A_M_E[-prefix don't search for lib$1 in includedir and libdir], [ if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" fi fi ]) dnl Search the library and its dependencies in $additional_libdir and dnl $LDFLAGS. Using breadth-first-seach. LIB[]NAME= LTLIB[]NAME= INC[]NAME= LIB[]NAME[]_PREFIX= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='$1 $2' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" dnl See if it was already located by an earlier AC_LIB_LINKFLAGS dnl or AC_LIB_HAVE_LINKFLAGS call. uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" else dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined dnl that this library doesn't exist. So just drop it. : fi else dnl Search the library lib$name in $additional_libdir and $LDFLAGS dnl and the already constructed $LIBNAME/$LTLIBNAME. found_dir= found_la= found_so= found_a= eval libname=\"$acl_libname_spec\" # typically: libname=lib$name if test -n "$acl_shlibext"; then shrext=".$acl_shlibext" # typically: shrext=.so else shrext= fi if test $use_additional = yes; then dir="$additional_libdir" dnl The same code as in the loop below: dnl First look for a shared library. if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi dnl Then look for a static library. if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` dnl First look for a shared library. if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi dnl Then look for a static library. if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then dnl Found the library. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then dnl Linking with a shared library. We attempt to hardcode its dnl directory into the executable's runpath, unless it's the dnl standard /usr/lib. if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then dnl No hardcoding is needed. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl Use an explicit option to hardcode DIR into the resulting dnl binary. dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi dnl The hardcoding into $LIBNAME is system dependent. if test "$acl_hardcode_direct" = yes; then dnl Using DIR/libNAME.so during linking hardcodes DIR into the dnl resulting binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then dnl Use an explicit option to hardcode DIR into the resulting dnl binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else dnl Rely on "-L$found_dir". dnl But don't add it if it's already contained in the LDFLAGS dnl or the already constructed $LIBNAME haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" fi if test "$acl_hardcode_minus_L" != no; then dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH dnl here, because this doesn't fit in flags passed to the dnl compiler. So give up. No hardcoding. This affects only dnl very old systems. dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then dnl Linking with a static library. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" else dnl We shouldn't come here, but anyway it's good to have a dnl fallback. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" fi fi dnl Assume the include files are nearby. additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` LIB[]NAME[]_PREFIX="$basedir" additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then dnl Potentially add $additional_includedir to $INCNAME. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's /usr/local/include and we are using GCC on Linux, dnl 3. if it's already present in $CPPFLAGS or the already dnl constructed $INCNAME, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INC[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $INCNAME. INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" fi fi fi fi fi dnl Look for dependencies. if test -n "$found_la"; then dnl Read the .la file. It defines the variables dnl dlname, library_names, old_library, dependency_libs, current, dnl age, revision, installed, dlopen, dlpreopen, libdir. save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" dnl We use only dependency_libs. for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's /usr/local/lib and we are using GCC on Linux, dnl 3. if it's already present in $LDFLAGS or the already dnl constructed $LIBNAME, dnl 4. if it doesn't exist as a directory. if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LIBNAME. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LTLIBNAME. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) dnl Handle this in the next round. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) dnl Handle this in the next round. Throw away the .la's dnl directory; it is already contained in a preceding -L dnl option. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) dnl Most likely an immediate library name. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" ;; esac done fi else dnl Didn't find the library; assume it is in the system directories dnl known to the linker and runtime loader. (All the system dnl directories known to the linker should also be known to the dnl runtime loader, otherwise the system is severely misconfigured.) LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$acl_hardcode_libdir_separator"; then dnl Weird platform: only the last -rpath option counts, the user must dnl pass all path elements in one option. We can arrange that for a dnl single library, but not when more than one $LIBNAMEs are used. alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl. acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" else dnl The -rpath options are cumulative. for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then dnl When using libtool, the option that works for both libraries and dnl executables is -R. The -R options are cumulative. for found_dir in $ltrpathdirs; do LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" done fi ]) dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, dnl unless already present in VAR. dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes dnl contains two or three consecutive elements that belong together. AC_DEFUN([AC_LIB_APPENDTOVAR], [ for element in [$2]; do haveit= for x in $[$1]; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then [$1]="${[$1]}${[$1]:+ }$element" fi done ]) dnl For those cases where a variable contains several -L and -l options dnl referring to unknown libraries and directories, this macro determines the dnl necessary additional linker options for the runtime path. dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) dnl sets LDADDVAR to linker options needed together with LIBSVALUE. dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, dnl otherwise linking without libtool is assumed. AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], [ AC_REQUIRE([AC_LIB_RPATH]) AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) $1= if test "$enable_rpath" != no; then if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then dnl Use an explicit option to hardcode directories into the resulting dnl binary. rpathdirs= next= for opt in $2; do if test -n "$next"; then dir="$next" dnl No need to hardcode the standard /usr/lib. if test "X$dir" != "X/usr/$acl_libdirstem"; then rpathdirs="$rpathdirs $dir" fi next= else case $opt in -L) next=yes ;; -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` dnl No need to hardcode the standard /usr/lib. if test "X$dir" != "X/usr/$acl_libdirstem"; then rpathdirs="$rpathdirs $dir" fi next= ;; *) next= ;; esac fi done if test "X$rpathdirs" != "X"; then if test -n ""$3""; then dnl libtool is used for linking. Use -R options. for dir in $rpathdirs; do $1="${$1}${$1:+ }-R$dir" done else dnl The linker is used for linking directly. if test -n "$acl_hardcode_libdir_separator"; then dnl Weird platform: only the last -rpath option counts, the user dnl must pass all path elements in one option. alldirs= for dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" $1="$flag" else dnl The -rpath options are cumulative. for dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" $1="${$1}${$1:+ }$flag" done fi fi fi fi fi AC_SUBST([$1]) ]) # lib-prefix.m4 serial 5 (gettext-0.15) dnl Copyright (C) 2001-2005 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't dnl require excessive bracketing. ifdef([AC_HELP_STRING], [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed dnl to access previously installed libraries. The basic assumption is that dnl a user will want packages to use other packages he previously installed dnl with the same --prefix option. dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate dnl libraries, but is otherwise very convenient. AC_DEFUN([AC_LIB_PREFIX], [ AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) AC_LIB_ARG_WITH([lib-prefix], [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib --without-lib-prefix don't search for libraries in includedir and libdir], [ if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" fi fi ]) if test $use_additional = yes; then dnl Potentially add $additional_includedir to $CPPFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's already present in $CPPFLAGS, dnl 3. if it's /usr/local/include and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= for x in $CPPFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $CPPFLAGS. CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" fi fi fi fi dnl Potentially add $additional_libdir to $LDFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's already present in $LDFLAGS, dnl 3. if it's /usr/local/lib and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then haveit= for x in $LDFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then if test -n "$GCC"; then case $host_os in linux*) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LDFLAGS. LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" fi fi fi fi fi ]) dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, dnl acl_final_exec_prefix, containing the values to which $prefix and dnl $exec_prefix will expand at the end of the configure script. AC_DEFUN([AC_LIB_PREPARE_PREFIX], [ dnl Unfortunately, prefix and exec_prefix get only finally determined dnl at the end of configure. if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else acl_final_prefix="$prefix" fi if test "X$exec_prefix" = "XNONE"; then acl_final_exec_prefix='${prefix}' else acl_final_exec_prefix="$exec_prefix" fi acl_save_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_save_prefix" ]) dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the dnl variables prefix and exec_prefix bound to the values they will have dnl at the end of the configure script. AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], [ acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" $1 exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" ]) dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing dnl the basename of the libdir, either "lib" or "lib64". AC_DEFUN([AC_LIB_PREPARE_MULTILIB], [ dnl There is no formal standard regarding lib and lib64. The current dnl practice is that on a system supporting 32-bit and 64-bit instruction dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit dnl libraries go under $prefix/lib. We determine the compiler's default dnl mode by looking at the compiler's library search path. If at least dnl of its elements ends in /lib64 or points to a directory whose absolute dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the dnl default, namely "lib". acl_libdirstem=lib searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` if test -n "$searchpath"; then acl_save_IFS="${IFS= }"; IFS=":" for searchdir in $searchpath; do if test -d "$searchdir"; then case "$searchdir" in */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; *) searchdir=`cd "$searchdir" && pwd` case "$searchdir" in */lib64 ) acl_libdirstem=lib64 ;; esac ;; esac fi done IFS="$acl_save_IFS" fi ]) # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # serial 52 Debian 1.5.26-4+lenny1 AC_PROG_LIBTOOL # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) # ----------------------------------------------------------- # If this macro is not defined by Autoconf, define it here. m4_ifdef([AC_PROVIDE_IFELSE], [], [m4_define([AC_PROVIDE_IFELSE], [m4_ifdef([AC_PROVIDE_$1], [$2], [$3])])]) # AC_PROG_LIBTOOL # --------------- AC_DEFUN([AC_PROG_LIBTOOL], [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. AC_PROVIDE_IFELSE([AC_PROG_CXX], [AC_LIBTOOL_CXX], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX ])]) dnl And a similar setup for Fortran 77 support AC_PROVIDE_IFELSE([AC_PROG_F77], [AC_LIBTOOL_F77], [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 ])]) dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [ifdef([AC_PROG_GCJ], [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ifdef([A][M_PROG_GCJ], [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ifdef([LT_AC_PROG_GCJ], [define([LT_AC_PROG_GCJ], defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) ])])# AC_PROG_LIBTOOL # _AC_PROG_LIBTOOL # ---------------- AC_DEFUN([_AC_PROG_LIBTOOL], [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl # Prevent multiple expansion define([AC_PROG_LIBTOOL], []) ])# _AC_PROG_LIBTOOL # AC_LIBTOOL_SETUP # ---------------- AC_DEFUN([AC_LIBTOOL_SETUP], [AC_PREREQ(2.50)dnl AC_REQUIRE([AC_ENABLE_SHARED])dnl AC_REQUIRE([AC_ENABLE_STATIC])dnl AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_LD])dnl AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl AC_REQUIRE([AC_PROG_NM])dnl AC_REQUIRE([AC_PROG_LN_S])dnl AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! AC_REQUIRE([AC_OBJEXT])dnl AC_REQUIRE([AC_EXEEXT])dnl dnl AC_LIBTOOL_SYS_MAX_CMD_LEN AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE AC_LIBTOOL_OBJDIR AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl _LT_AC_PROG_ECHO_BACKSLASH case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e 1s/^X//' [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] # Same as above, but do not quote variable references. [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Constants: rm="rm -f" # Global variables: default_ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" ofile="$default_ofile" with_gnu_ld="$lt_cv_prog_gnu_ld" AC_CHECK_TOOL(AR, ar, false) AC_CHECK_TOOL(RANLIB, ranlib, :) AC_CHECK_TOOL(STRIP, strip, :) old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" test -z "$MAGIC_CMD" && MAGIC_CMD=file test -z "$NM" && NM=nm test -z "$SED" && SED=sed test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$RANLIB" && RANLIB=: test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then AC_PATH_MAGIC fi ;; esac _LT_REQUIRED_DARWIN_CHECKS AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], enable_win32_dll=yes, enable_win32_dll=no) AC_ARG_ENABLE([libtool-lock], [AC_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes AC_ARG_WITH([pic], [AC_HELP_STRING([--with-pic], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [pic_mode="$withval"], [pic_mode=default]) test -z "$pic_mode" && pic_mode=default # Use C for the default configuration in the libtool script tagname= AC_LIBTOOL_LANG_C_CONFIG _LT_AC_TAGCONFIG ])# AC_LIBTOOL_SETUP # _LT_AC_SYS_COMPILER # ------------------- AC_DEFUN([_LT_AC_SYS_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_AC_SYS_COMPILER # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. AC_DEFUN([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` ]) # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. AC_DEFUN([_LT_COMPILER_BOILERPLATE], [AC_REQUIRE([LT_AC_PROG_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. AC_DEFUN([_LT_LINKER_BOILERPLATE], [AC_REQUIRE([LT_AC_PROG_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # -------------------------- # Check for some things on darwin AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 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. echo "int foo(void){return 1;}" > conftest.c $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib ${wl}-single_module conftest.c if test -f libconftest.dylib; then lt_cv_apple_cc_single_mod=yes rm -rf libconftest.dylib* fi rm conftest.c 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" ]) case $host_os in rhapsody* | darwin1.[[0123]]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[[012]]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}" fi if test "$DSYMUTIL" != ":"; then _lt_dsymutil="~$DSYMUTIL \$lib || :" else _lt_dsymutil= fi ;; esac ]) # _LT_AC_SYS_LIBPATH_AIX # ---------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_LINK_IFELSE(AC_LANG_PROGRAM,[ lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ])# _LT_AC_SYS_LIBPATH_AIX # _LT_AC_SHELL_INIT(ARG) # ---------------------- AC_DEFUN([_LT_AC_SHELL_INIT], [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], [AC_DIVERT_PUSH(NOTICE)]) $1 AC_DIVERT_POP ])# _LT_AC_SHELL_INIT # _LT_AC_PROG_ECHO_BACKSLASH # -------------------------- # Add some code to the start of the generated configure script which # will find an echo command which doesn't interpret backslashes. AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], [_LT_AC_SHELL_INIT([ # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` ;; esac echo=${ECHO-echo} if test "X[$]1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X[$]1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} fi if test "X[$]1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null 2>&1 && unset CDPATH if test -z "$ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if (echo_test_string=`eval $cmd`) 2>/dev/null && echo_test_string=`eval $cmd` && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL [$]0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL [$]0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "[$]0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" fi AC_SUBST(ECHO) ])])# _LT_AC_PROG_ECHO_BACKSLASH # _LT_AC_LOCK # ----------- AC_DEFUN([_LT_AC_LOCK], [AC_ARG_ENABLE([libtool-lock], [AC_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) 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* ;; AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], [*-*-cygwin* | *-*-mingw* | *-*-pw32*) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; ]) esac need_locks="$enable_libtool_lock" ])# _LT_AC_LOCK # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [AC_REQUIRE([LT_AC_PROG_SED]) AC_CACHE_CHECK([$1], [$2], [$2=no ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $rm conftest* ]) if test x"[$]$2" = xyes; then ifelse([$5], , :, [$5]) else ifelse([$6], , :, [$6]) fi ])# AC_LIBTOOL_COMPILER_OPTION # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ------------------------------------------------------------ # Check whether the given compiler option works AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $rm -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then ifelse([$4], , :, [$4]) else ifelse([$5], , :, [$5]) fi ])# AC_LIBTOOL_LINKER_OPTION # AC_LIBTOOL_SYS_MAX_CMD_LEN # -------------------------- AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [# find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && new_result=`expr "X$teststring" : ".*" 2>&1` && lt_cv_sys_max_cmd_len=$new_result && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done teststring= # Add a significant safety factor because C++ compilers can tack on massive # amounts of additional arguments before passing them to the linker. # It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi ])# AC_LIBTOOL_SYS_MAX_CMD_LEN # _LT_AC_CHECK_DLFCN # ------------------ AC_DEFUN([_LT_AC_CHECK_DLFCN], [AC_CHECK_HEADERS(dlfcn.h)dnl ])# _LT_AC_CHECK_DLFCN # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # --------------------------------------------------------------------- AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); exit (status); }] EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_AC_TRY_DLOPEN_SELF # AC_LIBTOOL_DLOPEN_SELF # ---------------------- AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_AC_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_AC_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi ])# AC_LIBTOOL_DLOPEN_SELF # AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) # --------------------------------- # Check to see if options -c and -o are simultaneously supported by compiler AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* ]) ])# AC_LIBTOOL_PROG_CC_C_O # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) # ----------------------------------------- # Check to see if we can do hard links to lock some files if needed AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_REQUIRE([_LT_AC_LOCK])dnl hard_links="nottested" if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS # AC_LIBTOOL_OBJDIR # ----------------- AC_DEFUN([AC_LIBTOOL_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir ])# AC_LIBTOOL_OBJDIR # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) # ---------------------------------------------- # Check hardcoding attributes. AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_AC_TAGVAR(hardcode_action, $1)= if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existant directories. if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_AC_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_AC_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_AC_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH # AC_LIBTOOL_SYS_LIB_STRIP # ------------------------ AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], [striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi ])# AC_LIBTOOL_SYS_LIB_STRIP # AC_LIBTOOL_SYS_DYNAMIC_LINKER # ----------------------------- # PORTME Fill in your ld.so characteristics AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_MSG_CHECKING([dynamic linker characteristics]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" m4_if($1,[],[ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` else lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` sys_lib_search_path_spec=`echo $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[[4-9]]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[123]]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[[3-9]]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; 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 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no AC_CACHE_VAL([lt_cv_sys_lib_search_path_spec], [lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"]) sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" AC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec], [lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"]) sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER # _LT_AC_TAGCONFIG # ---------------- AC_DEFUN([_LT_AC_TAGCONFIG], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_ARG_WITH([tags], [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], [include additional configurations @<:@automatic@:>@])], [tagnames="$withval"]) if test -f "$ltmain" && test -n "$tagnames"; then if test ! -f "${ofile}"; then AC_MSG_WARN([output file `$ofile' does not exist]) fi if test -z "$LTCC"; then eval "`$SHELL ${ofile} --config | grep '^LTCC='`" if test -z "$LTCC"; then AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) else AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) fi fi if test -z "$LTCFLAGS"; then eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for tagname in $tagnames; do IFS="$lt_save_ifs" # Check whether tagname contains only valid characters case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in "") ;; *) AC_MSG_ERROR([invalid tag name: $tagname]) ;; esac if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null then AC_MSG_ERROR([tag name \"$tagname\" already exists]) fi # Update the list of available tags. if test -n "$tagname"; then echo appending configuration tag \"$tagname\" to $ofile case $tagname in CXX) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_LIBTOOL_LANG_CXX_CONFIG else tagname="" fi ;; F77) if test -n "$F77" && test "X$F77" != "Xno"; then AC_LIBTOOL_LANG_F77_CONFIG else tagname="" fi ;; GCJ) if test -n "$GCJ" && test "X$GCJ" != "Xno"; then AC_LIBTOOL_LANG_GCJ_CONFIG else tagname="" fi ;; RC) AC_LIBTOOL_LANG_RC_CONFIG ;; *) AC_MSG_ERROR([Unsupported tag name: $tagname]) ;; esac # Append the new tag name to the list of available tags. if test -n "$tagname" ; then available_tags="$available_tags $tagname" fi fi done IFS="$lt_save_ifs" # Now substitute the updated list of available tags. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then mv "${ofile}T" "$ofile" chmod +x "$ofile" else rm -f "${ofile}T" AC_MSG_ERROR([unable to update list of available tagged configurations.]) fi fi ])# _LT_AC_TAGCONFIG # AC_LIBTOOL_DLOPEN # ----------------- # enable checks for dlopen support AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) ])# AC_LIBTOOL_DLOPEN # AC_LIBTOOL_WIN32_DLL # -------------------- # declare package support for building win32 DLLs AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) ])# AC_LIBTOOL_WIN32_DLL # AC_ENABLE_SHARED([DEFAULT]) # --------------------------- # implement the --enable-shared flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_SHARED], [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([shared], [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]AC_ENABLE_SHARED_DEFAULT) ])# AC_ENABLE_SHARED # AC_DISABLE_SHARED # ----------------- # set the default shared flag to --disable-shared AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_SHARED(no) ])# AC_DISABLE_SHARED # AC_ENABLE_STATIC([DEFAULT]) # --------------------------- # implement the --enable-static flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_STATIC], [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([static], [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]AC_ENABLE_STATIC_DEFAULT) ])# AC_ENABLE_STATIC # AC_DISABLE_STATIC # ----------------- # set the default static flag to --disable-static AC_DEFUN([AC_DISABLE_STATIC], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_STATIC(no) ])# AC_DISABLE_STATIC # AC_ENABLE_FAST_INSTALL([DEFAULT]) # --------------------------------- # implement the --enable-fast-install flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_FAST_INSTALL], [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([fast-install], [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) ])# AC_ENABLE_FAST_INSTALL # AC_DISABLE_FAST_INSTALL # ----------------------- # set the default to --disable-fast-install AC_DEFUN([AC_DISABLE_FAST_INSTALL], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_FAST_INSTALL(no) ])# AC_DISABLE_FAST_INSTALL # AC_LIBTOOL_PICMODE([MODE]) # -------------------------- # implement the --with-pic flag # MODE is either `yes' or `no'. If omitted, it defaults to `both'. AC_DEFUN([AC_LIBTOOL_PICMODE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl pic_mode=ifelse($#,1,$1,default) ])# AC_LIBTOOL_PICMODE # AC_PROG_EGREP # ------------- # This is predefined starting with Autoconf 2.54, so this conditional # definition can be removed once we require Autoconf 2.54 or later. m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 then ac_cv_prog_egrep='grep -E' else ac_cv_prog_egrep='egrep' fi]) EGREP=$ac_cv_prog_egrep AC_SUBST([EGREP]) ])]) # AC_PATH_TOOL_PREFIX # ------------------- # find a file program which can recognize shared library AC_DEFUN([AC_PATH_TOOL_PREFIX], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="ifelse([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi ])# AC_PATH_TOOL_PREFIX # AC_PATH_MAGIC # ------------- # find a file program which can recognize a shared library AC_DEFUN([AC_PATH_MAGIC], [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# AC_PATH_MAGIC # AC_PROG_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([AC_PROG_LD], [AC_ARG_WITH([gnu-ld], [AC_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no]) AC_REQUIRE([LT_AC_PROG_SED])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd* | 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=unknown ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown ])# AC_DEPLIBS_CHECK_METHOD # AC_PROG_NM # ---------- # find the pathname to a BSD-compatible name lister AC_DEFUN([AC_PROG_NM], [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi]) NM="$lt_cv_path_NM" ])# AC_PROG_NM # AC_CHECK_LIBM # ------------- # check for math library AC_DEFUN([AC_CHECK_LIBM], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac ])# AC_CHECK_LIBM # AC_LIBLTDL_CONVENIENCE([DIRECTORY]) # ----------------------------------- # sets LIBLTDL to the link flags for the libltdl convenience library and # LTDLINCL to the include flags for the libltdl header and adds # --enable-ltdl-convenience to the configure arguments. Note that # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, # it is assumed to be `libltdl'. LIBLTDL will be prefixed with # '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' # (note the single quotes!). If your package is not flat and you're not # using automake, define top_builddir and top_srcdir appropriately in # the Makefiles. AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl case $enable_ltdl_convenience in no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; "") enable_ltdl_convenience=yes ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; esac LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" ])# AC_LIBLTDL_CONVENIENCE # AC_LIBLTDL_INSTALLABLE([DIRECTORY]) # ----------------------------------- # sets LIBLTDL to the link flags for the libltdl installable library and # LTDLINCL to the include flags for the libltdl header and adds # --enable-ltdl-install to the configure arguments. Note that # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, # and an installed libltdl is not found, it is assumed to be `libltdl'. # LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with # '${top_srcdir}/' (note the single quotes!). If your package is not # flat and you're not using automake, define top_builddir and top_srcdir # appropriately in the Makefiles. # In the future, this macro may have to be called after AC_PROG_LIBTOOL. AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_CHECK_LIB(ltdl, lt_dlinit, [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], [if test x"$enable_ltdl_install" = xno; then AC_MSG_WARN([libltdl not installed, but installation disabled]) else enable_ltdl_install=yes fi ]) if test x"$enable_ltdl_install" = x"yes"; then ac_configure_args="$ac_configure_args --enable-ltdl-install" LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) else ac_configure_args="$ac_configure_args --enable-ltdl-install=no" LIBLTDL="-lltdl" LTDLINCL= fi # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" ])# AC_LIBLTDL_INSTALLABLE # AC_LIBTOOL_CXX # -------------- # enable support for C++ libraries AC_DEFUN([AC_LIBTOOL_CXX], [AC_REQUIRE([_LT_AC_LANG_CXX]) ])# AC_LIBTOOL_CXX # _LT_AC_LANG_CXX # --------------- AC_DEFUN([_LT_AC_LANG_CXX], [AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([_LT_AC_PROG_CXXCPP]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) ])# _LT_AC_LANG_CXX # _LT_AC_PROG_CXXCPP # ------------------ AC_DEFUN([_LT_AC_PROG_CXXCPP], [ AC_REQUIRE([AC_PROG_CXX]) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP fi ])# _LT_AC_PROG_CXXCPP # AC_LIBTOOL_F77 # -------------- # enable support for Fortran 77 libraries AC_DEFUN([AC_LIBTOOL_F77], [AC_REQUIRE([_LT_AC_LANG_F77]) ])# AC_LIBTOOL_F77 # _LT_AC_LANG_F77 # --------------- AC_DEFUN([_LT_AC_LANG_F77], [AC_REQUIRE([AC_PROG_F77]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) ])# _LT_AC_LANG_F77 # AC_LIBTOOL_GCJ # -------------- # enable support for GCJ libraries AC_DEFUN([AC_LIBTOOL_GCJ], [AC_REQUIRE([_LT_AC_LANG_GCJ]) ])# AC_LIBTOOL_GCJ # _LT_AC_LANG_GCJ # --------------- AC_DEFUN([_LT_AC_LANG_GCJ], [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) ])# _LT_AC_LANG_GCJ # AC_LIBTOOL_RC # ------------- # enable support for Windows resource files AC_DEFUN([AC_LIBTOOL_RC], [AC_REQUIRE([LT_AC_PROG_RC]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) ])# AC_LIBTOOL_RC # AC_LIBTOOL_LANG_C_CONFIG # ------------------------ # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) AC_DEFUN([_LT_AC_LANG_C_CONFIG], [lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_SYS_LIB_STRIP AC_LIBTOOL_DLOPEN_SELF # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC="$lt_save_CC" ])# AC_LIBTOOL_LANG_C_CONFIG # AC_LIBTOOL_LANG_CXX_CONFIG # -------------------------- # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], [AC_LANG_PUSH(C++) AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([_LT_AC_PROG_CXXCPP]) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_AC_TAGVAR(no_undefined_flag, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Dependencies to place before and after the object being linked: _LT_AC_TAGVAR(predep_objects, $1)= _LT_AC_TAGVAR(postdep_objects, $1)= _LT_AC_TAGVAR(predeps, $1)= _LT_AC_TAGVAR(postdeps, $1)= _LT_AC_TAGVAR(compiler_lib_search_path, $1)= _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)= # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) # We don't want -fno-exception wen compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration AC_PROG_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ grep 'no-whole-archive' > /dev/null; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_AC_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_AC_TAGVAR(archive_cmds, $1)='' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_AC_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; darwin* | rhapsody*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" if test "$GXX" = yes ; then output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_AC_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_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" if test "$lt_cv_apple_cc_single_mod" != "yes"; then _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" _LT_AC_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 case $cc_basename in xlc*) output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd[[12]]*) # C++ shared libraries reported to be fairly broken before switch to ELF _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_AC_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; hpux9*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' fi fi _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc*) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; openbsd2*) # C++ shared libraries are fairly broken _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd='echo' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; osf3*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; cxx*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; cxx*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ $rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | grep -v '^2\.7' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. # So that behaviour is only enabled if SCOABSPATH is set to a # non-empty value in the environment. Most likely only useful for # creating official distributions of packages. # This is a hack until libtool officially supports absolute path # names for shared libraries. _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_AC_TAGVAR(GCC, $1)="$GXX" _LT_AC_TAGVAR(LD, $1)="$LD" AC_LIBTOOL_POSTDEP_PREDEP($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ldcxx=$with_gnu_ld with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld ])# AC_LIBTOOL_LANG_CXX_CONFIG # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) # ------------------------------------ # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP], [AC_REQUIRE([LT_AC_PROG_SED])dnl dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_AC_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac ])# AC_LIBTOOL_POSTDEP_PREDEP # AC_LIBTOOL_LANG_F77_CONFIG # -------------------------- # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) AC_DEFUN([_LT_AC_LANG_F77_CONFIG], [AC_REQUIRE([AC_PROG_F77]) AC_LANG_PUSH(Fortran 77) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_AC_TAGVAR(no_undefined_flag, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${F77-"f77"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_AC_TAGVAR(GCC, $1)="$G77" _LT_AC_TAGVAR(LD, $1)="$LD" AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC="$lt_save_CC" ])# AC_LIBTOOL_LANG_F77_CONFIG # AC_LIBTOOL_LANG_GCJ_CONFIG # -------------------------- # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], [AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${GCJ-"gcj"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_CONFIG($1) AC_LANG_RESTORE CC="$lt_save_CC" ])# AC_LIBTOOL_LANG_GCJ_CONFIG # AC_LIBTOOL_LANG_RC_CONFIG # ------------------------- # Ensure that the configuration vars for the Windows resource compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) AC_DEFUN([_LT_AC_LANG_RC_CONFIG], [AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${RC-"windres"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes AC_LIBTOOL_CONFIG($1) AC_LANG_RESTORE CC="$lt_save_CC" ])# AC_LIBTOOL_LANG_RC_CONFIG # AC_LIBTOOL_CONFIG([TAGNAME]) # ---------------------------- # If TAGNAME is not passed, then create an initial libtool script # with a default configuration from the untagged config vars. Otherwise # add code to config.status for appending the configuration named by # TAGNAME from the matching tagged config vars. AC_DEFUN([AC_LIBTOOL_CONFIG], [# The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ _LT_AC_TAGVAR(compiler, $1) \ _LT_AC_TAGVAR(CC, $1) \ _LT_AC_TAGVAR(LD, $1) \ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ _LT_AC_TAGVAR(old_archive_cmds, $1) \ _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ _LT_AC_TAGVAR(predep_objects, $1) \ _LT_AC_TAGVAR(postdep_objects, $1) \ _LT_AC_TAGVAR(predeps, $1) \ _LT_AC_TAGVAR(postdeps, $1) \ _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \ _LT_AC_TAGVAR(archive_cmds, $1) \ _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ _LT_AC_TAGVAR(postinstall_cmds, $1) \ _LT_AC_TAGVAR(postuninstall_cmds, $1) \ _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ _LT_AC_TAGVAR(allow_undefined_flag, $1) \ _LT_AC_TAGVAR(no_undefined_flag, $1) \ _LT_AC_TAGVAR(export_symbols_cmds, $1) \ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ _LT_AC_TAGVAR(hardcode_automatic, $1) \ _LT_AC_TAGVAR(module_cmds, $1) \ _LT_AC_TAGVAR(module_expsym_cmds, $1) \ _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ _LT_AC_TAGVAR(fix_srcfile_path, $1) \ _LT_AC_TAGVAR(exclude_expsyms, $1) \ _LT_AC_TAGVAR(include_expsyms, $1); do case $var in _LT_AC_TAGVAR(old_archive_cmds, $1) | \ _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ _LT_AC_TAGVAR(archive_cmds, $1) | \ _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ _LT_AC_TAGVAR(module_cmds, $1) | \ _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\[$]0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` ;; esac ifelse([$1], [], [cfgfile="${ofile}T" trap "$rm \"$cfgfile\"; exit 1" 1 2 15 $rm -f "$cfgfile" AC_MSG_NOTICE([creating $ofile])], [cfgfile="$ofile"]) cat <<__EOF__ >> "$cfgfile" ifelse([$1], [], [#! $SHELL # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="$SED -e 1s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # The names of the tagged configurations supported by this script. available_tags= # ### BEGIN LIBTOOL CONFIG], [# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) # Is the compiler the GNU C compiler? with_gcc=$_LT_AC_TAGVAR(GCC, $1) # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_[]_LT_AC_TAGVAR(LD, $1) # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) # Commands used to build and install a shared archive. archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1) # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) # Flag that forces no undefined symbols. no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) # The commands to list exported symbols. export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) # Symbols that must always be exported. include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) ifelse([$1],[], [# ### END LIBTOOL CONFIG], [# ### END LIBTOOL TAG CONFIG: $tagname]) __EOF__ ifelse([$1],[], [ case $host_os in aix3*) cat <<\EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi EOF ;; esac # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || \ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ]) else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ])# AC_LIBTOOL_CONFIG # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------------------- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE # --------------------------------- AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([LT_AC_PROG_SED]) AC_REQUIRE([AC_PROG_NM]) AC_REQUIRE([AC_OBJEXT]) # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32*) symcode='[[ABCDGISTW]]' ;; hpux*) # Its linker distinguishes data from code symbols if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; linux* | k*bsd*-gnu) if test "$host_cpu" = ia64; then symcode='[[ABCDGIRSTW]]' lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext < $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if grep ' nm_test_var$' "$nlist" >/dev/null; then if grep ' nm_test_func$' "$nlist" >/dev/null; then cat < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else # define lt_ptr_t char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr_t address; } lt_preloaded_symbols[[]] = { EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) # --------------------------------------- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)= AC_MSG_CHECKING([for $compiler option to produce PIC]) ifelse([$1],[CXX],[ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; dgux*) case $cc_basename in ec++*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; icpc* | ecpc*) # Intel C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; vxworks*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; newsos6) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='' ;; esac ;; esac ;; osf3* | osf4* | osf5*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1), [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" ;; esac # # Check to make sure the static flag actually works. # wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) ]) # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) # ------------------------------------ # See if the linker supports building shared libraries. AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) ifelse([$1],[CXX],[ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' else _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw*) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' ;; linux* | k*bsd*-gnu) _LT_AC_TAGVAR(link_all_deplibs, $1)=no ;; *) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] ],[ runpath_var= _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_AC_TAGVAR(archive_cmds, $1)= _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_AC_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_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= # Just being paranoid about ensuring that cc_basename is set. _LT_CC_BASENAME([$compiler]) case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac _LT_AC_TAGVAR(ld_shlibs, $1)=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; interix[[3-9]]*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; *) tmp_sharedflag='-shared' ;; esac _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi _LT_AC_TAGVAR(link_all_deplibs, $1)=no else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=yes _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' else _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_AC_TAGVAR(archive_cmds, $1)='' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_AC_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # see comment about different semantics on the GNU ld section _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; bsdi[[45]]*) _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_AC_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_AC_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}" else case $cc_basename in xlc*) output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ;; dgux*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; freebsd1*) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' if test "$GCC" = yes; then wlarc='${wl}' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_AC_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_AC_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ]) AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_AC_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_MSG_CHECKING([whether -lc should be explicitly linked in]) $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) _LT_AC_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) then _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no else _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) ;; esac fi ;; esac ])# AC_LIBTOOL_PROG_LD_SHLIBS # _LT_AC_FILE_LTDLL_C # ------------------- # Be careful that the start marker always follows a newline. AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ # /* ltdll.c starts here */ # #define WIN32_LEAN_AND_MEAN # #include # #undef WIN32_LEAN_AND_MEAN # #include # # #ifndef __CYGWIN__ # # ifdef __CYGWIN32__ # # define __CYGWIN__ __CYGWIN32__ # # endif # #endif # # #ifdef __cplusplus # extern "C" { # #endif # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); # #ifdef __cplusplus # } # #endif # # #ifdef __CYGWIN__ # #include # DECLARE_CYGWIN_DLL( DllMain ); # #endif # HINSTANCE __hDllInstance_base; # # BOOL APIENTRY # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) # { # __hDllInstance_base = hInst; # return TRUE; # } # /* ltdll.c ends here */ ])# _LT_AC_FILE_LTDLL_C # _LT_AC_TAGVAR(VARNAME, [TAGNAME]) # --------------------------------- AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) # old names AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) # This is just to silence aclocal about the macro not being used ifelse([AC_DISABLE_FAST_INSTALL]) AC_DEFUN([LT_AC_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj, no) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS) ]) AC_DEFUN([LT_AC_PROG_RC], [AC_CHECK_TOOL(RC, windres, no) ]) # Cheap backport of AS_EXECUTABLE_P and required macros # from Autoconf 2.59; we should not use $as_executable_p directly. # _AS_TEST_PREPARE # ---------------- m4_ifndef([_AS_TEST_PREPARE], [m4_defun([_AS_TEST_PREPARE], [if test -x / >/dev/null 2>&1; then as_executable_p='test -x' else as_executable_p='test -f' fi ])])# _AS_TEST_PREPARE # AS_EXECUTABLE_P # --------------- # Check whether a file is executable. m4_ifndef([AS_EXECUTABLE_P], [m4_defun([AS_EXECUTABLE_P], [AS_REQUIRE([_AS_TEST_PREPARE])dnl $as_executable_p $1[]dnl ])])# AS_EXECUTABLE_P # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # # LT_AC_PROG_SED # -------------- # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. AC_DEFUN([LT_AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ]) # Configure paths for LIBXML2 # Mike Hommey 2004-06-19 # use CPPFLAGS instead of CFLAGS # Toshio Kuratomi 2001-04-21 # Adapted from: # Configure paths for GLIB # Owen Taylor 97-11-3 dnl AM_PATH_XML2([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]]) dnl Test for XML, and define XML_CPPFLAGS and XML_LIBS dnl AC_DEFUN([AM_PATH_XML2],[ AC_ARG_WITH(xml-prefix, [ --with-xml-prefix=PFX Prefix where libxml is installed (optional)], xml_config_prefix="$withval", xml_config_prefix="") AC_ARG_WITH(xml-exec-prefix, [ --with-xml-exec-prefix=PFX Exec prefix where libxml is installed (optional)], xml_config_exec_prefix="$withval", xml_config_exec_prefix="") AC_ARG_ENABLE(xmltest, [ --disable-xmltest Do not try to compile and run a test LIBXML program],, enable_xmltest=yes) if test x$xml_config_exec_prefix != x ; then xml_config_args="$xml_config_args" if test x${XML2_CONFIG+set} != xset ; then XML2_CONFIG=$xml_config_exec_prefix/bin/xml2-config fi fi if test x$xml_config_prefix != x ; then xml_config_args="$xml_config_args --prefix=$xml_config_prefix" if test x${XML2_CONFIG+set} != xset ; then XML2_CONFIG=$xml_config_prefix/bin/xml2-config fi fi AC_PATH_PROG(XML2_CONFIG, xml2-config, no) min_xml_version=ifelse([$1], ,2.0.0,[$1]) AC_MSG_CHECKING(for libxml - version >= $min_xml_version) no_xml="" if test "$XML2_CONFIG" = "no" ; then no_xml=yes else XML_CPPFLAGS=`$XML2_CONFIG $xml_config_args --cflags` XML_LIBS=`$XML2_CONFIG $xml_config_args --libs` xml_config_major_version=`$XML2_CONFIG $xml_config_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` xml_config_minor_version=`$XML2_CONFIG $xml_config_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` xml_config_micro_version=`$XML2_CONFIG $xml_config_args --version | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` if test "x$enable_xmltest" = "xyes" ; then ac_save_CPPFLAGS="$CPPFLAGS" ac_save_LIBS="$LIBS" CPPFLAGS="$CPPFLAGS $XML_CPPFLAGS" LIBS="$XML_LIBS $LIBS" dnl dnl Now check if the installed libxml is sufficiently new. dnl (Also sanity checks the results of xml2-config to some extent) dnl rm -f conf.xmltest AC_TRY_RUN([ #include #include #include #include int main() { int xml_major_version, xml_minor_version, xml_micro_version; int major, minor, micro; char *tmp_version; system("touch conf.xmltest"); /* Capture xml2-config output via autoconf/configure variables */ /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = (char *)strdup("$min_xml_version"); if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { printf("%s, bad version string from xml2-config\n", "$min_xml_version"); exit(1); } free(tmp_version); /* Capture the version information from the header files */ tmp_version = (char *)strdup(LIBXML_DOTTED_VERSION); if (sscanf(tmp_version, "%d.%d.%d", &xml_major_version, &xml_minor_version, &xml_micro_version) != 3) { printf("%s, bad version string from libxml includes\n", "LIBXML_DOTTED_VERSION"); exit(1); } free(tmp_version); /* Compare xml2-config output to the libxml headers */ if ((xml_major_version != $xml_config_major_version) || (xml_minor_version != $xml_config_minor_version) || (xml_micro_version != $xml_config_micro_version)) { printf("*** libxml header files (version %d.%d.%d) do not match\n", xml_major_version, xml_minor_version, xml_micro_version); printf("*** xml2-config (version %d.%d.%d)\n", $xml_config_major_version, $xml_config_minor_version, $xml_config_micro_version); return 1; } /* Compare the headers to the library to make sure we match */ /* Less than ideal -- doesn't provide us with return value feedback, * only exits if there's a serious mismatch between header and library. */ LIBXML_TEST_VERSION; /* Test that the library is greater than our minimum version */ if ((xml_major_version > major) || ((xml_major_version == major) && (xml_minor_version > minor)) || ((xml_major_version == major) && (xml_minor_version == minor) && (xml_micro_version >= micro))) { return 0; } else { printf("\n*** An old version of libxml (%d.%d.%d) was found.\n", xml_major_version, xml_minor_version, xml_micro_version); printf("*** You need a version of libxml newer than %d.%d.%d. The latest version of\n", major, minor, micro); printf("*** libxml is always available from ftp://ftp.xmlsoft.org.\n"); printf("***\n"); printf("*** If you have already installed a sufficiently new version, this error\n"); printf("*** probably means that the wrong copy of the xml2-config shell script is\n"); printf("*** being found. The easiest way to fix this is to remove the old version\n"); printf("*** of LIBXML, but you can also set the XML2_CONFIG environment to point to the\n"); printf("*** correct copy of xml2-config. (In this case, you will have to\n"); printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); printf("*** so that the correct libraries are found at run-time))\n"); } return 1; } ],, no_xml=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) CPPFLAGS="$ac_save_CPPFLAGS" LIBS="$ac_save_LIBS" fi fi if test "x$no_xml" = x ; then AC_MSG_RESULT(yes (version $xml_config_major_version.$xml_config_minor_version.$xml_config_micro_version)) ifelse([$2], , :, [$2]) else AC_MSG_RESULT(no) if test "$XML2_CONFIG" = "no" ; then echo "*** The xml2-config script installed by LIBXML could not be found" echo "*** If libxml was installed in PREFIX, make sure PREFIX/bin is in" echo "*** your path, or set the XML2_CONFIG environment variable to the" echo "*** full path to xml2-config." else if test -f conf.xmltest ; then : else echo "*** Could not run libxml test program, checking why..." CPPFLAGS="$CPPFLAGS $XML_CPPFLAGS" LIBS="$LIBS $XML_LIBS" AC_TRY_LINK([ #include #include ], [ LIBXML_TEST_VERSION; return 0;], [ echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding LIBXML or finding the wrong" echo "*** version of LIBXML. If it is not finding LIBXML, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ], [ echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means LIBXML was incorrectly installed" echo "*** or that you have moved LIBXML since it was installed. In the latter case, you" echo "*** may want to edit the xml2-config script: $XML2_CONFIG" ]) CPPFLAGS="$ac_save_CPPFLAGS" LIBS="$ac_save_LIBS" fi fi XML_CPPFLAGS="" XML_LIBS="" ifelse([$3], , :, [$3]) fi AC_SUBST(XML_CPPFLAGS) AC_SUBST(XML_LIBS) rm -f conf.xmltest ]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # # Copyright © 2004 Scott James Remnant . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # # Similar to PKG_CHECK_MODULES, make sure that the first instance of # this or PKG_CHECK_MODULES is called, or make sure to call # PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_ifval([$2], [$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$PKG_CONFIG"; then if test -n "$$1"; then pkg_cv_[]$1="$$1" else PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], [pkg_failed=yes]) fi else pkg_failed=untried fi[]dnl ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac # # # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` else $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD ifelse([$4], , [AC_MSG_ERROR(dnl [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT ])], [AC_MSG_RESULT([no]) $4]) elif test $pkg_failed = untried; then ifelse([$4], , [AC_MSG_FAILURE(dnl [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])], [$4]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) ifelse([$3], , :, [$3]) fi[]dnl ])# PKG_CHECK_MODULES # Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # 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. AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.9.6])]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 7 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE]) AC_SUBST([$1_FALSE]) if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH]) ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. #serial 3 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 12 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.58])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 # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AM_PROG_INSTALL_SH AM_PROG_INSTALL_STRIP AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl ]) ]) # 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_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $1 | $1:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"$am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Copyright (C) 1999, 2000, 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # AM_PROG_CC_C_O # -------------- # Like AC_PROG_CC_C_O, but changed for automake. AC_DEFUN([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC_C_O])dnl AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl # FIXME: we rely on the cache variable name because # there is no other way. set dummy $CC ac_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_MKDIR_P # --------------- # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. # # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories # created by `make install' are always world readable, even if the # installer happens to have an overly restrictive umask (e.g. 077). # This was a mistake. There are at least two reasons why we must not # use `-m 0755': # - it causes special bits like SGID to be ignored, # - it may be too restrictive (some setups expect 775 directories). # # Do not use -m 0755 and let people choose whatever they expect by # setting umask. # # We cannot accept any implementation of `mkdir' that recognizes `-p'. # Some implementations (such as Solaris 8's) are not thread-safe: if a # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' # concurrently, both version can detect that a/ is missing, but only # one can create it and the other will error out. Consequently we # restrict ourselves to GNU make (using the --version option ensures # this.) AC_DEFUN([AM_PROG_MKDIR_P], [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # We used to keeping the `.' as first argument, in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However this is wrong # for two reasons: # 1. if the package is installed by a user who cannot write `.' # make install will fail, # 2. the above comment should most certainly read # $(mkdir_p) $(DESTDIR)$(somedir) # so it does not work when $(somedir) is undefined and # $(DESTDIR) is not. # To support the latter case, we have to write # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), # so the `.' trick is pointless. mkdir_p='mkdir -p --' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi AC_SUBST([mkdir_p])]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([m4/extensions.m4]) elektra-0.7.1/benchmarks/0000777000076400001440000000000011365513215012272 500000000000000elektra-0.7.1/benchmarks/Makefile.am0000644000076400001440000000131311365507605014246 00000000000000AM_CFLAGS = $(COPTFLAGS) $(CDBGFLAGS) AM_CPPFLAGS = -I$(top_srcdir)/src/include $(LTDLINCL) #TESTS = large threads #TESTS = large #check_PROGRAMS = large threads #check_PROGRAMS = large if VALGRINDTESTS TESTS_ENVIRONMENT = $(VALGRIND) --quiet --show-reachable=yes --leak-check=yes else TESTS_ENVIRONMENT = time -p endif EXTRA_DIST = #threads_SOURCES = threads.c benchmarks.c benchmarks.h #threads_LDADD = $(privatelibs) ../src/libelektra/libelektra.a -lpthread #large_SOURCES = large.c benchmarks.c benchmarks.h #large_LDADD = $(privatelibs) ../src/libelektra/libelektra.a ../src/libelektra/libelektra.a: cd ../src/libelektra && $(MAKE) libelektra.a clean-local: rm -rf .kdb rm -f *.gcno *.gcda *.gcno elektra-0.7.1/benchmarks/Makefile.in0000644000076400001440000002617411365511146014266 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = benchmarks DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/extensions.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) INSTALL = @INSTALL@ ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BACKENDS = @BACKENDS@ BACKEND_VERSION_API = @BACKEND_VERSION_API@ BINDINGS = @BINDINGS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CDBGFLAGS = @CDBGFLAGS@ CFLAGS = @CFLAGS@ COPTFLAGS = @COPTFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSTDFLAGS = @CSTDFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDBGFLAGS = @CXXDBGFLAGS@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXOPTFLAGS = @CXXOPTFLAGS@ CXXSTDFLAGS = @CXXSTDFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_FALSE = @DEBUG_FALSE@ DEBUG_TRUE = @DEBUG_TRUE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ELEKTRATOOLS_VERSION_API = @ELEKTRATOOLS_VERSION_API@ ELEKTRA_VERSION_API = @ELEKTRA_VERSION_API@ EXEEXT = @EXEEXT@ EXPERIMENTAL_FALSE = @EXPERIMENTAL_FALSE@ EXPERIMENTAL_TRUE = @EXPERIMENTAL_TRUE@ F77 = @F77@ FFLAGS = @FFLAGS@ GENHTML = @GENHTML@ GREP = @GREP@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ HAVE_LIBLTDL_FALSE = @HAVE_LIBLTDL_FALSE@ HAVE_LIBLTDL_TRUE = @HAVE_LIBLTDL_TRUE@ HAVE_MAN2HTML_FALSE = @HAVE_MAN2HTML_FALSE@ HAVE_MAN2HTML_TRUE = @HAVE_MAN2HTML_TRUE@ HAVE_XML_FALSE = @HAVE_XML_FALSE@ HAVE_XML_TRUE = @HAVE_XML_TRUE@ HAVE_XSL_FALSE = @HAVE_XSL_FALSE@ HAVE_XSL_TRUE = @HAVE_XSL_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDB_VERSION = @KDB_VERSION@ KDB_VERSION_MAJOR = @KDB_VERSION_MAJOR@ KDB_VERSION_MAJORMINOR = @KDB_VERSION_MAJORMINOR@ KDB_VERSION_MICRO = @KDB_VERSION_MICRO@ KDB_VERSION_MINOR = @KDB_VERSION_MINOR@ LCOV = @LCOV@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VALGRIND = @VALGRIND@ VALGRINDTESTS_FALSE = @VALGRINDTESTS_FALSE@ VALGRINDTESTS_TRUE = @VALGRINDTESTS_TRUE@ VERSION = @VERSION@ XML2_CONFIG = @XML2_CONFIG@ XML_CPPFLAGS = @XML_CPPFLAGS@ XML_LIBS = @XML_LIBS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ backend_static_libs = @backend_static_libs@ backenddir = @backenddir@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ datarootdir = @datarootdir@ dbroot = @dbroot@ default_backend = @default_backend@ default_dbackend = @default_dbackend@ default_docbook = @default_docbook@ develdocdir = @develdocdir@ docdir = @docdir@ doxygen = @doxygen@ dvidir = @dvidir@ elektratools = @elektratools@ exec_prefix = @exec_prefix@ gconf_CFLAGS = @gconf_CFLAGS@ gconf_LIBS = @gconf_LIBS@ hlvlbackenddir = @hlvlbackenddir@ 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@ man2html = @man2html@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ privatelibs = @privatelibs@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ ulibdir = @ulibdir@ xsltproc = @xsltproc@ AM_CFLAGS = $(COPTFLAGS) $(CDBGFLAGS) AM_CPPFLAGS = -I$(top_srcdir)/src/include $(LTDLINCL) @VALGRINDTESTS_FALSE@TESTS_ENVIRONMENT = time -p #TESTS = large threads #TESTS = large #check_PROGRAMS = large threads #check_PROGRAMS = large @VALGRINDTESTS_TRUE@TESTS_ENVIRONMENT = $(VALGRIND) --quiet --show-reachable=yes --leak-check=yes 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 \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu benchmarks/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu benchmarks/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: 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-info-am .PHONY: all all-am check check-am clean clean-generic clean-libtool \ clean-local distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am install-man \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am uninstall-info-am #threads_SOURCES = threads.c benchmarks.c benchmarks.h #threads_LDADD = $(privatelibs) ../src/libelektra/libelektra.a -lpthread #large_SOURCES = large.c benchmarks.c benchmarks.h #large_LDADD = $(privatelibs) ../src/libelektra/libelektra.a ../src/libelektra/libelektra.a: cd ../src/libelektra && $(MAKE) libelektra.a clean-local: rm -rf .kdb rm -f *.gcno *.gcda *.gcno # 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: elektra-0.7.1/compile0000755000076400001440000000717311365511147011461 00000000000000#! /bin/sh # Wrapper for compilers which do not understand `-c -o'. scriptversion=2005-05-14.22 # Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand `-c -o'. Remove `-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file `INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; esac ofile= cfile= eat= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as `compile cc -o foo foo.c'. # So we strip `-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no `-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # `.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'` # Create the lock directory. # Note: use `[/.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: elektra-0.7.1/config.guess0000755000076400001440000012753410756112266012431 00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. timestamp='2008-01-23' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[456]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) case ${UNAME_MACHINE} in pc98) echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:[3456]*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; EM64T | authenticamd) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-gnu else echo ${UNAME_MACHINE}-unknown-linux-gnueabi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips #undef mipsel #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mipsel #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips64 #undef mips64el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mips64el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips64 #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. # Set LC_ALL=C to ensure ld outputs messages in English. ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" exit ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) LIBC=gnu #else LIBC=gnuaout #endif #endif #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^LIBC/{ s: ::g p }'`" test x"${LIBC}" != x && { echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit } test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: elektra-0.7.1/config.sub0000755000076400001440000010115310756112266012061 00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. timestamp='2008-01-16' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64vr | mips64vrel \ | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | mt \ | msp430 \ | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | score \ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64vr-* | mips64vrel-* \ | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-*) ;; # Recognize the 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 ;; 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 ;; c90) basic_machine=c90-cray os=-unicos ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; 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 ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; 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 ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; 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) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tile*) basic_machine=tile-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 ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: elektra-0.7.1/configure0000755000076400001440000350035411365511156012014 00000000000000#! /bin/sh # From configure.ac Revision. # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61 for elektra 0.7.1. # # Report bugs to . # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) as_nl=' ' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH if test "x$CONFIG_SHELL" = x; then if (eval ":") 2>/dev/null; then as_have_required=yes else as_have_required=no fi if test $as_have_required = yes && (eval ": (as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=\$LINENO as_lineno_2=\$LINENO test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } ") 2> /dev/null; then : else as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. case $as_dir in /*) for as_base in sh bash ksh sh5; do as_candidate_shells="$as_candidate_shells $as_dir/$as_base" done;; esac done IFS=$as_save_IFS for as_shell in $as_candidate_shells $SHELL; do # Try only shells that exist, to save several forks. if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { ("$as_shell") 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : _ASEOF }; then CONFIG_SHELL=$as_shell as_have_required=yes if { "$as_shell" 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : (as_func_return () { (exit $1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = "$1" ); then : else exitcode=1 echo positional parameters were not saved. fi test $exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } _ASEOF }; then break fi fi done if test "x$CONFIG_SHELL" != x; then for as_var in BASH_ENV ENV do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test $as_have_required = no; then echo This script requires a shell more modern than all the echo shells that I found on your system. Please install a echo modern shell, or manually run the script under such a echo shell if you do have one. { (exit 1); exit 1; } fi fi fi (eval "as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0") || { echo No shell found that supports shell functions. echo Please tell autoconf@gnu.org about your system, echo including any error possibly output before this echo message } as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` ;; esac echo=${ECHO-echo} if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "$0" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null 2>&1 && unset CDPATH if test -z "$ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if (echo_test_string=`eval $cmd`) 2>/dev/null && echo_test_string=`eval $cmd` && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL $0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL $0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "$0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" fi tagnames=${tagnames+${tagnames},}CXX tagnames=${tagnames+${tagnames},}F77 exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='elektra' PACKAGE_TARNAME='elektra' PACKAGE_VERSION='0.7.1' PACKAGE_STRING='elektra 0.7.1' PACKAGE_BUGREPORT='http://bugs.libelektra.org' ac_unique_file="src/libelektra/kdb.c" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir localstatedir includedir oldincludedir docdir infodir htmldir dvidir pdfdir psdir libdir localedir mandir DEFS ECHO_C ECHO_N ECHO_T LIBS build_alias host_alias target_alias KDB_VERSION KDB_VERSION_MAJORMINOR KDB_VERSION_MAJOR KDB_VERSION_MINOR KDB_VERSION_MICRO PACKAGE_URL ELEKTRA_VERSION_API ELEKTRATOOLS_VERSION_API BACKEND_VERSION_API build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP GREP EGREP DEBUG_TRUE DEBUG_FALSE EXPERIMENTAL_TRUE EXPERIMENTAL_FALSE VALGRIND VALGRINDTESTS_TRUE VALGRINDTESTS_FALSE LCOV GENHTML CSTDFLAGS COPTFLAGS CDBGFLAGS CXXSTDFLAGS CXXOPTFLAGS CXXDBGFLAGS ulibdir backenddir hlvlbackenddir develdocdir default_docbook default_backend default_dbackend CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE LN_S SED NM PKG_CONFIG xsltproc dbroot HAVE_XSL_TRUE HAVE_XSL_FALSE man2html HAVE_MAN2HTML_TRUE HAVE_MAN2HTML_FALSE doxygen HAVE_DOXYGEN_TRUE HAVE_DOXYGEN_FALSE ECHO AR RANLIB DSYMUTIL NMEDIT CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBTOOL_DEPS subdirs LIBLTDL LTDLINCL HAVE_LIBLTDL_TRUE HAVE_LIBLTDL_FALSE LIBICONV LTLIBICONV XML2_CONFIG XML_CPPFLAGS XML_LIBS HAVE_XML_TRUE HAVE_XML_FALSE elektratools gconf_CFLAGS gconf_LIBS BACKENDS privatelibs backend_static_libs PYTHON BINDINGS LIBOBJS LTLIBOBJS' ac_subst_files='' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP CXX CXXFLAGS CCC PKG_CONFIG CXXCPP F77 FFLAGS gconf_CFLAGS gconf_LIBS' ac_subdirs_all='libltdl' # Initialize some variables set by options. ac_init_help= ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute directory names. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || { echo "$as_me: error: Working directory cannot be determined" >&2 { (exit 1); exit 1; }; } test "X$ac_ls_di" = "X$ac_pwd_ls_di" || { echo "$as_me: error: pwd does not report name of working directory" >&2 { (exit 1); exit 1; }; } # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$0" || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures elektra 0.7.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/elektra] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] --target=TARGET configure for building compilers for TARGET [HOST] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of elektra 0.7.1:";; esac cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --enable-debug turn on debug symbols and enable debug messages [default=no] --enable-experimental Specify to compile or not experimental parts (could cause compilation failure) [default=no] --enable-valgrind-tests run self tests under valgrind [default=no] --enable-gcov turn on code coverage analysis tools [default=no] --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --enable-iconv turns on automatic UTF-8 conversions. [default=no] --disable-rpath do not hardcode runtime library paths --disable-xmltest Do not try to compile and run a test LIBXML program --enable-filesys compile filesys backend [default=YES] --enable-hosts compile hosts backend [default=YES] --enable-ini compile ini backend [default=NO] --enable-berkeleydb compile berkeleydb backend [default=NO] --enable-gconf compile gconf backend [default=NO] --enable-fstab compile fstab backend [default=NO] --enable-passwd compile passwd backend [default=NO] --enable-daemon compile daemon backend [default=NO] --enable-cpp compile cpp binding [default=YES] --enable-python compile python binding [default=NO] Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-ulibdir=ULIBDIR> Set the path for usr lib. --with-backenddir= Set the path for backend libraries. [LIBDIR/elektra@] --with-hlvl-backenddir= Set the path for high level backend libraries. [ULIBDIR/elektra] --with-docdir= Set the path for documentation. [DATADIR/doc/elektra] --with-develdocdir= Set the path for elektra api documentation. [DATADIR/doc/elektra-devel] --with-docbook= Set path to docbook.xsl used for generate manpage. [/usr/share/sgml/docbook/xsl-stylesheets] --with-kdbschemadir= Set the path for elektra.xsd. DATADIR will be prefixed. [/sgml/elektra-$PACKAGE_VERSION] --with-default-backend= Set backend elektra will be linked to. [filesys] --with-default-dbackend= Set the default backend for the kdbd daemon to use. [berkeleydb] --without-libltdl Don't try to use libltdl for external dynamic library support --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-pic try to use only PIC/non-PIC objects [default=use both] --with-tags[=TAGS] include additional configurations [automatic] --with-gnu-ld assume the C compiler uses GNU ld default=no --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib --without-libiconv-prefix don't search for libiconv in includedir and libdir --with-xml-prefix=PFX Prefix where libxml is installed (optional) --with-xml-exec-prefix=PFX Exec prefix where libxml is installed (optional) Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor CXX C++ compiler command CXXFLAGS C++ compiler flags PKG_CONFIG path to pkg-config utility CXXCPP C++ preprocessor F77 Fortran 77 compiler command FFLAGS Fortran 77 compiler flags gconf_CFLAGS C compiler flags for gconf, overriding pkg-config gconf_LIBS linker flags for gconf, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF elektra configure 0.7.1 generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by elektra $as_me 0.7.1, which was generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo cat confdefs.h echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -n "$CONFIG_SITE"; then set x "$CONFIG_SITE" elif test "x$prefix" != xNONE; then set x "$prefix/share/config.site" "$prefix/etc/config.site" else set x "$ac_default_prefix/share/config.site" \ "$ac_default_prefix/etc/config.site" fi shift for ac_site_file do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu KDB_VERSION="0.7.1" KDB_VERSION_MAJORMINOR="0.7" KDB_VERSION_MAJOR="0" KDB_VERSION_MINOR="7" KDB_VERSION_MICRO="1" PACKAGE_URL=http://www.libelektra.org/ ELEKTRA_VERSION_API=3:0:0 ELEKTRATOOLS_VERSION_API=2:0:0 BACKEND_VERSION_API=0:0:0 # # Os Specific checks # # get host_os variable ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} { (exit 1); exit 1; }; } fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} { (exit 1); exit 1; }; } { echo "$as_me:$LINENO: checking build system type" >&5 echo $ECHO_N "checking build system type... $ECHO_C" >&6; } if test "${ac_cv_build+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: result: $ac_cv_build" >&5 echo "${ECHO_T}$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 echo "$as_me: error: invalid value of canonical build" >&2;} { (exit 1); exit 1; }; };; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { echo "$as_me:$LINENO: checking host system type" >&5 echo $ECHO_N "checking host system type... $ECHO_C" >&6; } if test "${ac_cv_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} { (exit 1); exit 1; }; } fi fi { echo "$as_me:$LINENO: result: $ac_cv_host" >&5 echo "${ECHO_T}$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 echo "$as_me: error: invalid value of canonical host" >&2;} { (exit 1); exit 1; }; };; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac { echo "$as_me:$LINENO: checking target system type" >&5 echo $ECHO_N "checking target system type... $ECHO_C" >&6; } if test "${ac_cv_target+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "x$target_alias" = x; then ac_cv_target=$ac_cv_host else ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;} { (exit 1); exit 1; }; } fi fi { echo "$as_me:$LINENO: result: $ac_cv_target" >&5 echo "${ECHO_T}$ac_cv_target" >&6; } case $ac_cv_target in *-*-*) ;; *) { { echo "$as_me:$LINENO: error: invalid value of canonical target" >&5 echo "$as_me: error: invalid value of canonical target" >&2;} { (exit 1); exit 1; }; };; esac target=$ac_cv_target ac_save_IFS=$IFS; IFS='-' set x $ac_cv_target shift target_cpu=$1 target_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: target_os=$* IFS=$ac_save_IFS case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac # The aliases save the names the user supplied, while $host etc. # will get canonicalized. test -n "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && program_prefix=${target_alias}- { echo "$as_me:$LINENO: checking target system type" >&5 echo $ECHO_N "checking target system type... $ECHO_C" >&6; } if test "${ac_cv_target+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "x$target_alias" = x; then ac_cv_target=$ac_cv_host else ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;} { (exit 1); exit 1; }; } fi fi { echo "$as_me:$LINENO: result: $ac_cv_target" >&5 echo "${ECHO_T}$ac_cv_target" >&6; } case $ac_cv_target in *-*-*) ;; *) { { echo "$as_me:$LINENO: error: invalid value of canonical target" >&5 echo "$as_me: error: invalid value of canonical target" >&2;} { (exit 1); exit 1; }; };; esac target=$ac_cv_target ac_save_IFS=$IFS; IFS='-' set x $ac_cv_target shift target_cpu=$1 target_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: target_os=$* IFS=$ac_save_IFS case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac # The aliases save the names the user supplied, while $host etc. # will get canonicalized. test -n "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && program_prefix=${target_alias}- INSTALL='\$(install_sh)' am__api_version="1.9" # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. { echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done IFS=$as_save_IFS fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { echo "$as_me:$LINENO: checking whether build environment is sane" >&5 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftest.file ) then # Ok. : else { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. echo might interpret backslashes. # By default was `s,x,x', remove it if useless. cat <<\_ACEOF >conftest.sed s/[\\$]/&&/g;s/;s,x,x,$// _ACEOF program_transform_name=`echo $program_transform_name | sed -f conftest.sed` rm -f conftest.sed # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # We used to keeping the `.' as first argument, in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However this is wrong # for two reasons: # 1. if the package is installed by a user who cannot write `.' # make install will fail, # 2. the above comment should most certainly read # $(mkdir_p) $(DESTDIR)$(somedir) # so it does not work when $(somedir) is undefined and # $(DESTDIR) is not. # To support the latter case, we have to write # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), # so the `.' trick is pointless. mkdir_p='mkdir -p --' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$AWK" && break done { echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } SET_MAKE= else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='elektra' VERSION='0.7.1' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} install_sh=${install_sh-"$am_aux_dir/install-sh"} # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' ac_config_headers="$ac_config_headers src/include/config.h" DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi { echo "$as_me:$LINENO: result: $_am_result" >&5 echo "${ECHO_T}$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO: checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # # List of possible output files, starting from the most likely. # The algorithm is not robust to junk in `.', hence go to wildcards (a.*) # only as a last resort. b.out is created by i960 compilers. ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' # # The IRIX 6 linker writes into existing files which may not be # executable, retaining their permissions. Remove them first so a # subsequent execution test works. ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { (ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link_default") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi { echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6; } if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { echo "$as_me:$LINENO: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6; } { echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext { echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT { echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6; } ;; xno) { echo "$as_me:$LINENO: result: unsupported" >&5 echo "${ECHO_T}unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } if test "${ac_cv_path_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Extract the first word of "grep ggrep" to use in msg output if test -z "$GREP"; then set dummy grep ggrep; ac_prog_name=$2 if test "${ac_cv_path_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS fi GREP="$ac_cv_path_GREP" if test -z "$GREP"; then { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_GREP=$GREP fi fi { echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 echo "${ECHO_T}$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else # Extract the first word of "egrep" to use in msg output if test -z "$EGREP"; then set dummy egrep; ac_prog_name=$2 if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS fi EGREP="$ac_cv_path_EGREP" if test -z "$EGREP"; then { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_EGREP=$EGREP fi fi fi { echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { echo "$as_me:$LINENO: checking for AIX" >&5 echo $ECHO_N "checking for AIX... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef _AIX yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "yes" >/dev/null 2>&1; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } cat >>confdefs.h <<\_ACEOF #define _ALL_SOURCE 1 _ACEOF else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi rm -f conftest* { echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test "${ac_cv_header_minix_config_h+set}" = set; then { echo "$as_me:$LINENO: checking for minix/config.h" >&5 echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6; } if test "${ac_cv_header_minix_config_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi { echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5 echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking minix/config.h usability" >&5 echo $ECHO_N "checking minix/config.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking minix/config.h presence" >&5 echo $ECHO_N "checking minix/config.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5 echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ----------------------------------------- ## ## Report this to http://bugs.libelektra.org ## ## ----------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { echo "$as_me:$LINENO: checking for minix/config.h" >&5 echo $ECHO_N "checking for minix/config.h... $ECHO_C" >&6; } if test "${ac_cv_header_minix_config_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_minix_config_h=$ac_header_preproc fi { echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5 echo "${ECHO_T}$ac_cv_header_minix_config_h" >&6; } fi if test $ac_cv_header_minix_config_h = yes; then MINIX=yes else MINIX= fi if test "$MINIX" = yes; then cat >>confdefs.h <<\_ACEOF #define _POSIX_SOURCE 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define _POSIX_1_SOURCE 2 _ACEOF cat >>confdefs.h <<\_ACEOF #define _MINIX 1 _ACEOF fi { echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5 echo $ECHO_N "checking whether it is safe to define __EXTENSIONS__... $ECHO_C" >&6; } if test "${ac_cv_safe_to_define___extensions__+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define __EXTENSIONS__ 1 $ac_includes_default int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_safe_to_define___extensions__=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_safe_to_define___extensions__=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5 echo "${ECHO_T}$ac_cv_safe_to_define___extensions__" >&6; } test $ac_cv_safe_to_define___extensions__ = yes && cat >>confdefs.h <<\_ACEOF #define __EXTENSIONS__ 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define _POSIX_PTHREAD_SEMANTICS 1 _ACEOF #Check whether we are compiling for win32 case $host_os in mingw* | pw32*) # If compiling for windows we need HAVE_WIN32 defined cat >>confdefs.h <<\_ACEOF #define HAVE_WIN32 1 _ACEOF esac # Disable libtool static lib #AC_DISABLE_STATIC # # Compile and test specific flags. # { echo "$as_me:$LINENO: checking whether to enable debugging and take control over compiler flags" >&5 echo $ECHO_N "checking whether to enable debugging and take control over compiler flags... $ECHO_C" >&6; } # Check whether --enable-debug was given. if test "${enable_debug+set}" = set; then enableval=$enable_debug; fi if test "x$enable_debug" = "xyes"; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } CFLAGS=`echo "$CFLAGS" | sed -e 's/-O0-9* *//g'` CXXFLAGS=`echo "$CFLAGS" | sed -e 's/-O0-9* *//g'` CFLAGS=`echo "$CFLAGS" | sed -e 's/-g *//g'` CXXFLAGS=`echo "$CFLAGS" | sed -e 's/-g *//g'` CSTDFLAGS="-std=c99 -ansi -pedantic" COPTFLAGS="-O0" CDBGFLAGS="-g -ggdb" CXXSTDFLAGS="-std=c++98 -ansi -pedantic" CXXOPTFLAGS="-O0" CXXDBGFLAGS="-g -ggdb" cat >>confdefs.h <<\_ACEOF #define DEBUG 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define VERBOSE 0 _ACEOF else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } cat >>confdefs.h <<\_ACEOF #define DEBUG 0 _ACEOF cat >>confdefs.h <<\_ACEOF #define VERBOSE 0 _ACEOF fi #take control over FLAGS #AM_CONDITIONAL (USE_FLAGS, [test "x$enable_debug" = "xyes" ]) if test x$enable_debug = xyes; then DEBUG_TRUE= DEBUG_FALSE='#' else DEBUG_TRUE='#' DEBUG_FALSE= fi # Enable compilation of experimental things (unfinished # backends at this time) # Check whether --enable-experimental was given. if test "${enable_experimental+set}" = set; then enableval=$enable_experimental; elektra_experimental=$enableval else elektra_experimental=no fi # for the c++ binding if test "x$elektra_experimental" = "xyes" ; then EXPERIMENTAL_TRUE= EXPERIMENTAL_FALSE='#' else EXPERIMENTAL_TRUE='#' EXPERIMENTAL_FALSE= fi # Run self-tests under valgrind? { echo "$as_me:$LINENO: checking whether self tests are run under valgrind" >&5 echo $ECHO_N "checking whether self tests are run under valgrind... $ECHO_C" >&6; } # Check whether --enable-valgrind-tests was given. if test "${enable_valgrind_tests+set}" = set; then enableval=$enable_valgrind_tests; fi if test "x$enable_valgrind_tests" = "xyes"; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } for ac_prog in valgrind do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_VALGRIND+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$VALGRIND"; then ac_cv_prog_VALGRIND="$VALGRIND" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_VALGRIND="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi VALGRIND=$ac_cv_prog_VALGRIND if test -n "$VALGRIND"; then { echo "$as_me:$LINENO: result: $VALGRIND" >&5 echo "${ECHO_T}$VALGRIND" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$VALGRIND" && break done else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$VALGRIND" != "x" ; then VALGRINDTESTS_TRUE= VALGRINDTESTS_FALSE='#' else VALGRINDTESTS_TRUE='#' VALGRINDTESTS_FALSE= fi { echo "$as_me:$LINENO: checking whether to enable gcov" >&5 echo $ECHO_N "checking whether to enable gcov... $ECHO_C" >&6; } # Check whether --enable-gcov was given. if test "${enable_gcov+set}" = set; then enableval=$enable_gcov; fi if test "x$enable_gcov" = "xyes"; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } for ac_prog in lcov do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_LCOV+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$LCOV"; then ac_cv_prog_LCOV="$LCOV" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_LCOV="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LCOV=$ac_cv_prog_LCOV if test -n "$LCOV"; then { echo "$as_me:$LINENO: result: $LCOV" >&5 echo "${ECHO_T}$LCOV" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$LCOV" && break done test -n "$LCOV" || LCOV="false" for ac_prog in genhtml do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_GENHTML+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$GENHTML"; then ac_cv_prog_GENHTML="$GENHTML" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_GENHTML="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi GENHTML=$ac_cv_prog_GENHTML if test -n "$GENHTML"; then { echo "$as_me:$LINENO: result: $GENHTML" >&5 echo "${ECHO_T}$GENHTML" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$GENHTML" && break done test -n "$GENHTML" || GENHTML="false" CDBGFLAGS="$CDBGFLAGS -fprofile-arcs -ftest-coverage" CXXDBGFLAGS="$CXXDBGFLAGS -fprofile-arcs -ftest-coverage" LDFLAGS="$LDFLAGS -lgcov" CFLAGS=`echo "$CFLAGS" | sed -e 's/-O0-9* *//g'` CXXFLAGS=`echo "$CFLAGS" | sed -e 's/-O0-9* *//g'` COPTFLAGS="-O0" CXXOPTFLAGS="-O0" else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi # # set some custom path # # usr/lib path echo "LIBDIR=$libdir" # Check whether --with-ulibdir was given. if test "${with_ulibdir+set}" = set; then withval=$with_ulibdir; ulibdir=$withval else ulibdir='${prefix}/'`basename $libdir` fi # backend dlopended libraries path # Check whether --with-backenddir was given. if test "${with_backenddir+set}" = set; then withval=$with_backenddir; backenddir=$withval else backenddir='${libdir}/elektra' fi # high level backend dlopended libraries path # Check whether --with-hlvlbackenddir was given. if test "${with_hlvlbackenddir+set}" = set; then withval=$with_hlvlbackenddir; hlvlbackenddir=$withval else hlvlbackenddir='${ulibdir}' fi # /usr/share/doc path # Check whether --with-docdir was given. if test "${with_docdir+set}" = set; then withval=$with_docdir; docdir=$withval else docdir='${datadir}/doc/elektra' fi # /usr/share/doc/elektra-api # Check whether --with-develdocdir was given. if test "${with_develdocdir+set}" = set; then withval=$with_develdocdir; develdocdir=$withval else develdocdir='${datadir}/doc/elektra-devel' fi # Select docbook.xsl # Check whether --with-docbook was given. if test "${with_docbook+set}" = set; then withval=$with_docbook; default_docbook=$withval else default_docbook=/usr/share/sgml/docbook/xsl-stylesheets fi # sgml/elektra- # Check whether --with-kdbschema was given. if test "${with_kdbschema+set}" = set; then withval=$with_kdbschema; kdbschemadir=$withval else kdbschemadir="/sgml/elektra-$PACKAGE_VERSION" fi cat >>confdefs.h <<_ACEOF #define KDB_SCHEMA_PATH DATADIR "${kdbschemadir}" _ACEOF # Default backend selection (Set to 'filesys' as default) # Check whether --with-backend was given. if test "${with_backend+set}" = set; then withval=$with_backend; default_backend=$withval else default_backend=filesys fi # Default daemon backend selection (Set to 'berkeleydb' as default) # Check whether --with-dbackend was given. if test "${with_dbackend+set}" = set; then withval=$with_dbackend; default_dbackend=$withval else default_dbackend=berkeleydb fi # # Checks for needed programs. # ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO: checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6; } ;; xno) { echo "$as_me:$LINENO: result: unsupported" >&5 echo "${ECHO_T}unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi if test "x$CC" != xcc; then { echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5 echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6; } else { echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5 echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6; } fi set dummy $CC; ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # We do the test twice because some compilers refuse to overwrite an # existing .o file with -o, though they will create one. ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' rm -f conftest2.* if { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -f conftest2.$ac_objext && { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then eval ac_cv_prog_cc_${ac_cc}_c_o=yes if test "x$CC" != xcc; then # Test first that cc exists at all. if { ac_try='cc -c conftest.$ac_ext >&5' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' rm -f conftest2.* if { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -f conftest2.$ac_objext && { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # cc works too. : else # cc exists but doesn't like -o. eval ac_cv_prog_cc_${ac_cc}_c_o=no fi fi fi else eval ac_cv_prog_cc_${ac_cc}_c_o=no fi rm -f core conftest* fi if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } cat >>confdefs.h <<\_ACEOF #define NO_MINUS_C_MINUS_O 1 _ACEOF fi # FIXME: we rely on the cache variable name because # there is no other way. set dummy $CC ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { echo "$as_me:$LINENO: result: $CXX" >&5 echo "${ECHO_T}$CXX" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 echo "${ECHO_T}$ac_ct_CXX" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. echo "$as_me:$LINENO: checking for C++ compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; } if test "${ac_cv_cxx_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; } GXX=`test $ac_compiler_gnu = yes && echo yes` ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cxx_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CXXFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CXX" am_compiler_list= { echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi { echo "$as_me:$LINENO: checking whether ln -s works" >&5 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else { echo "$as_me:$LINENO: result: no, using $LN_S" >&5 echo "${ECHO_T}no, using $LN_S" >&6; } fi { echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6; } if test "${ac_cv_path_SED+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" | sed 99q >conftest.sed $as_unset ac_script || ac_script= # Extract the first word of "sed gsed" to use in msg output if test -z "$SED"; then set dummy sed gsed; ac_prog_name=$2 if test "${ac_cv_path_SED+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS fi SED="$ac_cv_path_SED" if test -z "$SED"; then { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in \$PATH" >&5 echo "$as_me: error: no acceptable $ac_prog_name could be found in \$PATH" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_SED=$SED fi fi { echo "$as_me:$LINENO: result: $ac_cv_path_SED" >&5 echo "${ECHO_T}$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed # Extract the first word of "nm", so it can be a program name with args. set dummy nm; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_NM+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$NM"; then ac_cv_prog_NM="$NM" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_NM="nm" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_NM" && ac_cv_prog_NM="nm-is-missing" fi fi NM=$ac_cv_prog_NM if test -n "$NM"; then { echo "$as_me:$LINENO: result: $NM" >&5 echo "${ECHO_T}$NM" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi { echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } SET_MAKE= else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_PKG_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 echo "${ECHO_T}$PKG_CONFIG" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5 echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } PKG_CONFIG="" fi fi # Check needed programs for generate doc # xsltproc # Extract the first word of "xsltproc", so it can be a program name with args. set dummy xsltproc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_xsltproc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $xsltproc in [\\/]* | ?:[\\/]*) ac_cv_path_xsltproc="$xsltproc" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_xsltproc="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_xsltproc" && ac_cv_path_xsltproc=""no"" ;; esac fi xsltproc=$ac_cv_path_xsltproc if test -n "$xsltproc"; then { echo "$as_me:$LINENO: result: $xsltproc" >&5 echo "${ECHO_T}$xsltproc" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi # Check if have style-sheet too if test "x$default_docbook" != "xno"; then as_ac_File=`echo "ac_cv_file_$default_docbook/manpages/docbook.xsl" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $default_docbook/manpages/docbook.xsl" >&5 echo $ECHO_N "checking for $default_docbook/manpages/docbook.xsl... $ECHO_C" >&6; } if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "$default_docbook/manpages/docbook.xsl"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi ac_res=`eval echo '${'$as_ac_File'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_File'}'` = yes; then dbroot=$default_docbook else dbroot="no" fi if test "x$default_docbook" != "xno"; then as_ac_File=`echo "ac_cv_file_$default_docbook/template/titlepage.xsl" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $default_docbook/template/titlepage.xsl" >&5 echo $ECHO_N "checking for $default_docbook/template/titlepage.xsl... $ECHO_C" >&6; } if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else test "$cross_compiling" = yes && { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} { (exit 1); exit 1; }; } if test -r "$default_docbook/template/titlepage.xsl"; then eval "$as_ac_File=yes" else eval "$as_ac_File=no" fi fi ac_res=`eval echo '${'$as_ac_File'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_File'}'` = yes; then dbroot=$default_docbook else dbroot="no" fi fi else dbroot="no" fi if test x$xsltproc != xno -a x$dbroot != xno; then HAVE_XSL_TRUE= HAVE_XSL_FALSE='#' else HAVE_XSL_TRUE='#' HAVE_XSL_FALSE= fi # man2html # Extract the first word of "man2html", so it can be a program name with args. set dummy man2html; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_man2html+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $man2html in [\\/]* | ?:[\\/]*) ac_cv_path_man2html="$man2html" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_man2html="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_man2html" && ac_cv_path_man2html=""no"" ;; esac fi man2html=$ac_cv_path_man2html if test -n "$man2html"; then { echo "$as_me:$LINENO: result: $man2html" >&5 echo "${ECHO_T}$man2html" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test x$man2html != xno; then HAVE_MAN2HTML_TRUE= HAVE_MAN2HTML_FALSE='#' else HAVE_MAN2HTML_TRUE='#' HAVE_MAN2HTML_FALSE= fi # Doxygen # Extract the first word of "doxygen", so it can be a program name with args. set dummy doxygen; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_doxygen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $doxygen in [\\/]* | ?:[\\/]*) ac_cv_path_doxygen="$doxygen" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_doxygen="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_doxygen" && ac_cv_path_doxygen=""no"" ;; esac fi doxygen=$ac_cv_path_doxygen if test -n "$doxygen"; then { echo "$as_me:$LINENO: result: $doxygen" >&5 echo "${ECHO_T}$doxygen" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test x$doxygen != xno; then HAVE_DOXYGEN_TRUE= HAVE_DOXYGEN_FALSE='#' else HAVE_DOXYGEN_TRUE='#' HAVE_DOXYGEN_FALSE= fi # # Checks for header files. # { echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi for ac_header in ctype.h stdlib.h unistd.h errno.h time.h stdio.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ----------------------------------------- ## ## Report this to http://bugs.libelektra.org ## ## ----------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in langinfo.h locale.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ----------------------------------------- ## ## Report this to http://bugs.libelektra.org ## ## ----------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6; } if test "${ac_cv_header_time+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include int main () { if ((struct tm *) 0) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_time=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_time=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 echo "${ECHO_T}$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then cat >>confdefs.h <<\_ACEOF #define TIME_WITH_SYS_TIME 1 _ACEOF fi #types for ac_header in inttypes.h limits.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ----------------------------------------- ## ## Report this to http://bugs.libelektra.org ## ## ----------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { echo "$as_me:$LINENO: checking for stdbool.h that conforms to C99" >&5 echo $ECHO_N "checking for stdbool.h that conforms to C99... $ECHO_C" >&6; } if test "${ac_cv_header_stdbool_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #ifndef bool "error: bool is not defined" #endif #ifndef false "error: false is not defined" #endif #if false "error: false is not 0" #endif #ifndef true "error: true is not defined" #endif #if true != 1 "error: true is not 1" #endif #ifndef __bool_true_false_are_defined "error: __bool_true_false_are_defined is not defined" #endif struct s { _Bool s: 1; _Bool t; } s; char a[true == 1 ? 1 : -1]; char b[false == 0 ? 1 : -1]; char c[__bool_true_false_are_defined == 1 ? 1 : -1]; char d[(bool) 0.5 == true ? 1 : -1]; bool e = &s; char f[(_Bool) 0.0 == false ? 1 : -1]; char g[true]; char h[sizeof (_Bool)]; char i[sizeof s.t]; enum { j = false, k = true, l = false * true, m = true * 256 }; _Bool n[m]; char o[sizeof n == m * sizeof n[0] ? 1 : -1]; char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; # if defined __xlc__ || defined __GNUC__ /* Catch a bug in IBM AIX xlc compiler version 6.0.0.0 reported by James Lemley on 2005-10-05; see http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html This test is not quite right, since xlc is allowed to reject this program, as the initializer for xlcbug is not one of the forms that C requires support for. However, doing the test right would require a runtime test, and that would make cross-compilation harder. Let us hope that IBM fixes the xlc bug, and also adds support for this kind of constant expression. In the meantime, this test will reject xlc, which is OK, since our stdbool.h substitute should suffice. We also test this with GCC, where it should work, to detect more quickly whether someone messes up the test in the future. */ char digs[] = "0123456789"; int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1); # endif /* Catch a bug in an HP-UX C compiler. See http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html */ _Bool q = true; _Bool *pq = &q; int main () { *pq |= q; *pq |= ! q; /* Refer to every declared value, to avoid compiler optimizations. */ return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l + !m + !n + !o + !p + !q + !pq); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_stdbool_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdbool_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_header_stdbool_h" >&5 echo "${ECHO_T}$ac_cv_header_stdbool_h" >&6; } { echo "$as_me:$LINENO: checking for _Bool" >&5 echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; } if test "${ac_cv_type__Bool+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default typedef _Bool ac__type_new_; int main () { if ((ac__type_new_ *) 0) return 0; if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_type__Bool=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type__Bool=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5 echo "${ECHO_T}$ac_cv_type__Bool" >&6; } if test $ac_cv_type__Bool = yes; then cat >>confdefs.h <<_ACEOF #define HAVE__BOOL 1 _ACEOF fi if test $ac_cv_header_stdbool_h = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_STDBOOL_H 1 _ACEOF fi #posix files and functions (needed by filesys and libhelper) ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include <$ac_hdr> int main () { if ((DIR *) 0) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 _ACEOF ac_header_dirent=$ac_hdr; break fi done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then { echo "$as_me:$LINENO: checking for library containing opendir" >&5 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; } if test "${ac_cv_search_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char opendir (); int main () { return opendir (); ; return 0; } _ACEOF for ac_lib in '' dir; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_search_opendir=$ac_res else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext if test "${ac_cv_search_opendir+set}" = set; then break fi done if test "${ac_cv_search_opendir+set}" = set; then : else ac_cv_search_opendir=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 echo "${ECHO_T}$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir if test "$ac_res" != no; then test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi else { echo "$as_me:$LINENO: checking for library containing opendir" >&5 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; } if test "${ac_cv_search_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char opendir (); int main () { return opendir (); ; return 0; } _ACEOF for ac_lib in '' x; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_search_opendir=$ac_res else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext if test "${ac_cv_search_opendir+set}" = set; then break fi done if test "${ac_cv_search_opendir+set}" = set; then : else ac_cv_search_opendir=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 echo "${ECHO_T}$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir if test "$ac_res" != no; then test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi fi for ac_header in fcntl.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ----------------------------------------- ## ## Report this to http://bugs.libelektra.org ## ## ----------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done # # libltld checks # #copied out from libsox # Check whether --with-libltdl was given. if test "${with_libltdl+set}" = set; then withval=$with_libltdl; fi using_libltdl=no if test "$with_libltdl" != "no"; then if test "$enable_shared" != "no"; then using_libltdl=yes fi case $host_os in pw32* | mingw*) using_libltdl=no ;; esac case $target in *cygwin*) using_libltdl=no ;; esac fi if test "$using_libltdl" != "no"; then { echo "$as_me:$LINENO: checking for lt_dlinit in -lltdl" >&5 echo $ECHO_N "checking for lt_dlinit in -lltdl... $ECHO_C" >&6; } if test "${ac_cv_lib_ltdl_lt_dlinit+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lltdl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char lt_dlinit (); int main () { return lt_dlinit (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_ltdl_lt_dlinit=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_ltdl_lt_dlinit=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_ltdl_lt_dlinit" >&5 echo "${ECHO_T}$ac_cv_lib_ltdl_lt_dlinit" >&6; } if test $ac_cv_lib_ltdl_lt_dlinit = yes; then test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no else if test x"$enable_ltdl_install" = xno; then { echo "$as_me:$LINENO: WARNING: libltdl not installed, but installation disabled" >&5 echo "$as_me: WARNING: libltdl not installed, but installation disabled" >&2;} else enable_ltdl_install=yes fi fi if test x"$enable_ltdl_install" = x"yes"; then ac_configure_args="$ac_configure_args --enable-ltdl-install" LIBLTDL='${top_builddir}/''libltdl'/libltdl.la LTDLINCL='-I${top_srcdir}/''libltdl' else ac_configure_args="$ac_configure_args --enable-ltdl-install=no" LIBLTDL="-lltdl" LTDLINCL= fi # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" fi # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi # Check whether --enable-static was given. if test "${enable_static+set}" = set; then enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=yes fi # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi { echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6; } if test "${lt_cv_path_SED+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$lt_ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$lt_ac_prog$ac_exec_ext"; }; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done fi SED=$lt_cv_path_SED { echo "$as_me:$LINENO: result: $SED" >&5 echo "${ECHO_T}$SED" >&6; } # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { echo "$as_me:$LINENO: checking for GNU ld" >&5 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } else { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } fi if test "${lt_cv_path_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 echo "${ECHO_T}$LD" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } { echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6; } if test "${lt_cv_ld_reload_flag+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_ld_reload_flag='-r' fi { echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac { echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6; } if test "${lt_cv_path_NM+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi fi { echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 echo "${ECHO_T}$lt_cv_path_NM" >&6; } NM="$lt_cv_path_NM" { echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5 echo $ECHO_N "checking how to recognize dependent libraries... $ECHO_C" >&6; } if test "${lt_cv_deplibs_check_method+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in 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 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd* | 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=unknown ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac fi { echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6; } file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line 8995 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" { echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6; } if test "${lt_cv_cc_needs_belf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_cv_cc_needs_belf=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) 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" for ac_header in dlfcn.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ----------------------------------------- ## ## Report this to http://bugs.libelektra.org ## ## ----------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6; } if test -z "$CXXCPP"; then if test "${ac_cv_prog_CXXCPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { echo "$as_me:$LINENO: result: $CXXCPP" >&5 echo "${ECHO_T}$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu fi ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu if test -n "$ac_tool_prefix"; then for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$F77"; then ac_cv_prog_F77="$F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_F77="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi F77=$ac_cv_prog_F77 if test -n "$F77"; then { echo "$as_me:$LINENO: result: $F77" >&5 echo "${ECHO_T}$F77" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$F77" && break done fi if test -z "$F77"; then ac_ct_F77=$F77 for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_F77"; then ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_F77="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_F77=$ac_cv_prog_ac_ct_F77 if test -n "$ac_ct_F77"; then { echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 echo "${ECHO_T}$ac_ct_F77" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$ac_ct_F77" && break done if test "x$ac_ct_F77" = x; then F77="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac F77=$ac_ct_F77 fi fi # Provide some information about the compiler. echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } rm -f a.out # If we don't use `.F' as extension, the preprocessor is not run on the # input file. (Note that this only needs to work for GNU compilers.) ac_save_ext=$ac_ext ac_ext=F { echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6; } if test "${ac_cv_f77_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF program main #ifndef __GNUC__ choke me #endif end _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_f77_compiler_gnu=$ac_compiler_gnu fi { echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6; } ac_ext=$ac_save_ext ac_test_FFLAGS=${FFLAGS+set} ac_save_FFLAGS=$FFLAGS FFLAGS= { echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_f77_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else FFLAGS=-g cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_f77_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_f77_g=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 echo "${ECHO_T}$ac_cv_prog_f77_g" >&6; } if test "$ac_test_FFLAGS" = set; then FFLAGS=$ac_save_FFLAGS elif test $ac_cv_prog_f77_g = yes; then if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-g -O2" else FFLAGS="-g" fi else if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-O2" else FFLAGS= fi fi G77=`test $ac_compiler_gnu = yes && echo yes` ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! # find the maximum length of command line arguments { echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6; } if test "${lt_cv_sys_max_cmd_len+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && new_result=`expr "X$teststring" : ".*" 2>&1` && lt_cv_sys_max_cmd_len=$new_result && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done teststring= # Add a significant safety factor because C++ compilers can tack on massive # amounts of additional arguments before passing them to the linker. # It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6; } else { echo "$as_me:$LINENO: result: none" >&5 echo "${ECHO_T}none" >&6; } fi # Check for command to grab the raw symbol name followed by C symbol from nm. { echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6; } if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32*) symcode='[ABCDGISTW]' ;; hpux*) # Its linker distinguishes data from code symbols if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; linux* | k*bsd*-gnu) if test "$host_cpu" = ia64; then symcode='[ABCDGIRSTW]' lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Now try to grab the symbols. nlist=conftest.nm if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if grep ' nm_test_var$' "$nlist" >/dev/null; then if grep ' nm_test_func$' "$nlist" >/dev/null; then cat < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else # define lt_ptr_t char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr_t address; } lt_preloaded_symbols[] = { EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { echo "$as_me:$LINENO: result: failed" >&5 echo "${ECHO_T}failed" >&6; } else { echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6; } fi { echo "$as_me:$LINENO: checking for objdir" >&5 echo $ECHO_N "checking for objdir... $ECHO_C" >&6; } if test "${lt_cv_objdir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 echo "${ECHO_T}$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e 1s/^X//' sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Constants: rm="rm -f" # Global variables: default_ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" ofile="$default_ofile" with_gnu_ld="$lt_cv_prog_gnu_ld" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="${ac_tool_prefix}ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { echo "$as_me:$LINENO: result: $AR" >&5 echo "${ECHO_T}$AR" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AR="ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 echo "${ECHO_T}$ac_ct_AR" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi else AR="$ac_cv_prog_AR" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { echo "$as_me:$LINENO: result: $RANLIB" >&5 echo "${ECHO_T}$RANLIB" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 echo "${ECHO_T}$ac_ct_RANLIB" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" test -z "$MAGIC_CMD" && MAGIC_CMD=file test -z "$NM" && NM=nm test -z "$SED" && SED=sed test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$RANLIB" && RANLIB=: test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 echo "${ECHO_T}$MAGIC_CMD" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { echo "$as_me:$LINENO: checking for file" >&5 echo $ECHO_N "checking for file... $ECHO_C" >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 echo "${ECHO_T}$MAGIC_CMD" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_DSYMUTIL+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { echo "$as_me:$LINENO: result: $DSYMUTIL" >&5 echo "${ECHO_T}$DSYMUTIL" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { echo "$as_me:$LINENO: result: $ac_ct_DSYMUTIL" >&5 echo "${ECHO_T}$ac_ct_DSYMUTIL" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_NMEDIT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { echo "$as_me:$LINENO: result: $NMEDIT" >&5 echo "${ECHO_T}$NMEDIT" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_NMEDIT="nmedit" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { echo "$as_me:$LINENO: result: $ac_ct_NMEDIT" >&5 echo "${ECHO_T}$ac_ct_NMEDIT" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi { echo "$as_me:$LINENO: checking for -single_module linker flag" >&5 echo $ECHO_N "checking for -single_module linker flag... $ECHO_C" >&6; } if test "${lt_cv_apple_cc_single_mod+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. echo "int foo(void){return 1;}" > conftest.c $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib ${wl}-single_module conftest.c if test -f libconftest.dylib; then lt_cv_apple_cc_single_mod=yes rm -rf libconftest.dylib* fi rm conftest.c fi fi { echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5 echo "${ECHO_T}$lt_cv_apple_cc_single_mod" >&6; } { echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5 echo $ECHO_N "checking for -exported_symbols_list linker flag... $ECHO_C" >&6; } if test "${lt_cv_ld_exported_symbols_list+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_cv_ld_exported_symbols_list=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5 echo "${ECHO_T}$lt_cv_ld_exported_symbols_list" >&6; } case $host_os in rhapsody* | darwin1.[0123]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[012]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}" fi if test "$DSYMUTIL" != ":"; then _lt_dsymutil="~$DSYMUTIL \$lib || :" else _lt_dsymutil= fi ;; esac enable_dlopen=yes enable_win32_dll=no # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Check whether --with-pic was given. if test "${with_pic+set}" = set; then withval=$with_pic; pic_mode="$withval" else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # Use C for the default configuration in the libtool script tagname= lt_save_CC="$CC" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag=' -fno-builtin' { echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:11106: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:11110: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= { echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; *) lt_prog_compiler_pic='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic='-qnocommon' lt_prog_compiler_wl='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; esac ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 echo "${ECHO_T}$lt_prog_compiler_pic" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_pic_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:11396: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:11400: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_static_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $rm -r conftest* LDFLAGS="$save_LDFLAGS" fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_c_o+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:11500: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:11504: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6; } if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } runpath_var= allow_undefined_flag= enable_shared_with_static_runtimes=no archive_cmds= archive_expsym_cmds= old_archive_From_new_cmds= old_archive_from_expsyms_cmds= export_dynamic_flag_spec= whole_archive_flag_spec= thread_safe_flag_spec= hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no hardcode_shlibpath_var=unsupported link_all_deplibs=unknown hardcode_automatic=no module_cmds= module_expsym_cmds= always_export_symbols=no export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; *) tmp_sharedflag='-shared' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi link_all_deplibs=no else ld_shlibs=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_libdir_separator=':' link_all_deplibs=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # see comment about different semantics on the GNU ld section ld_shlibs=no ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported whole_archive_flag_spec='' link_all_deplibs=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs=no ;; esac fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; freebsd1*) ld_shlibs=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld='-rpath $libdir' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: link_all_deplibs=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac fi { echo "$as_me:$LINENO: result: $ld_shlibs" >&5 echo "${ECHO_T}$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc=no else archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 echo "${ECHO_T}$archive_cmds_need_lc" >&6; } ;; esac fi ;; esac { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` else lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` sys_lib_search_path_spec=`echo $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; 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 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" fi sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" fi sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || \ test -n "$runpath_var" || \ test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { echo "$as_me:$LINENO: result: $hardcode_action" >&5 echo "${ECHO_T}$hardcode_action" >&6; } if test "$hardcode_action" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi striplib= old_striplib= { echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi ;; *) { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } ;; esac fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) { echo "$as_me:$LINENO: checking for shl_load" >&5 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; } if test "${ac_cv_func_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define shl_load to an innocuous variant, in case declares shl_load. For example, HP-UX 11i declares gettimeofday. */ #define shl_load innocuous_shl_load /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shl_load (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef shl_load /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_shl_load || defined __stub___shl_load choke me #endif int main () { return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_func_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shl_load=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 echo "${ECHO_T}$ac_cv_func_shl_load" >&6; } if test $ac_cv_func_shl_load = yes; then lt_cv_dlopen="shl_load" else { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } if test $ac_cv_lib_dld_shl_load = yes; then lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else { echo "$as_me:$LINENO: checking for dlopen" >&5 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; } if test "${ac_cv_func_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define dlopen to an innocuous variant, in case declares dlopen. For example, HP-UX 11i declares gettimeofday. */ #define dlopen innocuous_dlopen /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dlopen (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef dlopen /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_dlopen || defined __stub___dlopen choke me #endif int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_func_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 echo "${ECHO_T}$ac_cv_func_dlopen" >&6; } if test $ac_cv_func_dlopen = yes; then lt_cv_dlopen="dlopen" else { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; } if test "${ac_cv_lib_svld_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_svld_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6; } if test $ac_cv_lib_svld_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6; } if test "${ac_cv_lib_dld_dld_link+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_dld_link=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; } if test $ac_cv_lib_dld_dld_link = yes; then lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6; } if test "${lt_cv_dlopen_self+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 echo "${ECHO_T}$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6; } if test "${lt_cv_dlopen_self_static+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi # Report which library types will actually be built { echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $can_build_shared" >&5 echo "${ECHO_T}$can_build_shared" >&6; } { echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { echo "$as_me:$LINENO: result: $enable_shared" >&5 echo "${ECHO_T}$enable_shared" >&6; } { echo "$as_me:$LINENO: checking whether to build static libraries" >&5 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { echo "$as_me:$LINENO: result: $enable_static" >&5 echo "${ECHO_T}$enable_static" >&6; } # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler \ CC \ LD \ lt_prog_compiler_wl \ lt_prog_compiler_pic \ lt_prog_compiler_static \ lt_prog_compiler_no_builtin_flag \ export_dynamic_flag_spec \ thread_safe_flag_spec \ whole_archive_flag_spec \ enable_shared_with_static_runtimes \ old_archive_cmds \ old_archive_from_new_cmds \ predep_objects \ postdep_objects \ predeps \ postdeps \ compiler_lib_search_path \ compiler_lib_search_dirs \ archive_cmds \ archive_expsym_cmds \ postinstall_cmds \ postuninstall_cmds \ old_archive_from_expsyms_cmds \ allow_undefined_flag \ no_undefined_flag \ export_symbols_cmds \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ hardcode_automatic \ module_cmds \ module_expsym_cmds \ lt_cv_prog_compiler_c_o \ fix_srcfile_path \ exclude_expsyms \ include_expsyms; do case $var in old_archive_cmds | \ old_archive_from_new_cmds | \ archive_cmds | \ archive_expsym_cmds | \ module_cmds | \ module_expsym_cmds | \ old_archive_from_expsyms_cmds | \ export_symbols_cmds | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="${ofile}T" trap "$rm \"$cfgfile\"; exit 1" 1 2 15 $rm -f "$cfgfile" { echo "$as_me:$LINENO: creating $ofile" >&5 echo "$as_me: creating $ofile" >&6;} cat <<__EOF__ >> "$cfgfile" #! $SHELL # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="$SED -e 1s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # The names of the tagged configurations supported by this script. available_tags= # ### BEGIN LIBTOOL CONFIG # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler # Is the compiler the GNU C compiler? with_gcc=$GCC # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_compiler_lib_search_dirs # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # ### END LIBTOOL CONFIG __EOF__ case $host_os in aix3*) cat <<\EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi EOF ;; esac # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || \ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" # Check whether --with-tags was given. if test "${with_tags+set}" = set; then withval=$with_tags; tagnames="$withval" fi if test -f "$ltmain" && test -n "$tagnames"; then if test ! -f "${ofile}"; then { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} fi if test -z "$LTCC"; then eval "`$SHELL ${ofile} --config | grep '^LTCC='`" if test -z "$LTCC"; then { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5 echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} else { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} fi fi if test -z "$LTCFLAGS"; then eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for tagname in $tagnames; do IFS="$lt_save_ifs" # Check whether tagname contains only valid characters case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in "") ;; *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5 echo "$as_me: error: invalid tag name: $tagname" >&2;} { (exit 1); exit 1; }; } ;; esac if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null then { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5 echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} { (exit 1); exit 1; }; } fi # Update the list of available tags. if test -n "$tagname"; then echo appending configuration tag \"$tagname\" to $ofile case $tagname in CXX) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu archive_cmds_need_lc_CXX=no allow_undefined_flag_CXX= always_export_symbols_CXX=no archive_expsym_cmds_CXX= export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_libdir_flag_spec_CXX= hardcode_libdir_flag_spec_ld_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_shlibpath_var_CXX=unsupported hardcode_automatic_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no # Dependencies to place before and after the object being linked: predep_objects_CXX= postdep_objects_CXX= predeps_CXX= postdeps_CXX= compiler_lib_search_path_CXX= compiler_lib_search_dirs_CXX= # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o objext_CXX=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC compiler_CXX=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # We don't want -fno-exception wen compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { echo "$as_me:$LINENO: checking for GNU ld" >&5 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } else { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } fi if test "${lt_cv_path_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 echo "${ECHO_T}$LD" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } { echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_CXX= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } ld_shlibs_CXX=yes case $host_os in aix3*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_CXX='' hardcode_direct_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes if test "$GXX" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_CXX=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_CXX=yes hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_libdir_separator_CXX= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_CXX=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_CXX='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_CXX=' ${wl}-bernotok' allow_undefined_flag_CXX=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX='$convenience' archive_cmds_need_lc_CXX=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_CXX=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_CXX=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_CXX='-L$libdir' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=no enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_CXX=no fi ;; darwin* | rhapsody*) archive_cmds_need_lc_CXX=no hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported whole_archive_flag_spec_CXX='' link_all_deplibs_CXX=yes allow_undefined_flag_CXX="$_lt_dar_allow_undefined" if test "$GXX" = yes ; then output_verbose_link_cmd='echo' archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" if test "$lt_cv_apple_cc_single_mod" != "yes"; then archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_CXX=no ;; esac fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; freebsd[12]*) # C++ shared libraries reported to be fairly broken before switch to ELF ld_shlibs_CXX=no ;; freebsd-elf*) archive_cmds_need_lc_CXX=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes ;; gnu*) ;; hpux9*) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='${wl}-E' hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: case $host_cpu in hppa*64*|ia64*) ;; *) export_dynamic_flag_spec_CXX='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no ;; *) hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; interix[3-9]*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' fi fi link_all_deplibs_CXX=yes ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc*) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac archive_cmds_need_lc_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' hardcode_libdir_flag_spec_CXX='-R$libdir' whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; m88k*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; openbsd2*) # C++ shared libraries are fairly broken ld_shlibs_CXX=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' export_dynamic_flag_spec_CXX='${wl}-E' whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd='echo' else ld_shlibs_CXX=no fi ;; osf3*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # the KAI C++ compiler. old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) allow_undefined_flag_CXX=' -expect_unresolved \*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ $rm $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs_CXX=yes output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then no_undefined_flag_CXX=' ${wl}-z ${wl}defs' if $CC --version | grep -v '^2\.7' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" fi hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_CXX='${wl}-z,text' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. # So that behaviour is only enabled if SCOABSPATH is set to a # non-empty value in the environment. Most likely only useful for # creating official distributions of packages. # This is a hack until libtool officially supports absolute path # names for shared libraries. no_undefined_flag_CXX='${wl}-z,text' allow_undefined_flag_CXX='${wl}-z,nodefs' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes export_dynamic_flag_spec_CXX='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac { echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 echo "${ECHO_T}$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no GCC_CXX="$GXX" LD_CXX="$LD" cat > conftest.$ac_ext <&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no # The `*' in the case matches for architectures that use `case' in # $output_verbose_cmd can trigger glob expansion during the loop # eval without this substitution. output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` for p in `eval $output_verbose_link_cmd`; do case $p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" \ || test $p = "-R"; then prev=$p continue else prev= fi if test "$pre_test_object_deps_done" = no; then case $p in -L* | -R*) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$compiler_lib_search_path_CXX"; then compiler_lib_search_path_CXX="${prev}${p}" else compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$postdeps_CXX"; then postdeps_CXX="${prev}${p}" else postdeps_CXX="${postdeps_CXX} ${prev}${p}" fi fi ;; *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$predep_objects_CXX"; then predep_objects_CXX="$p" else predep_objects_CXX="$predep_objects_CXX $p" fi else if test -z "$postdep_objects_CXX"; then postdep_objects_CXX="$p" else postdep_objects_CXX="$postdep_objects_CXX $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling CXX test program" fi $rm -f confest.$objext compiler_lib_search_dirs_CXX= if test -n "$compiler_lib_search_path_CXX"; then compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi # PORTME: override above test on systems where it is broken case $host_os in interix[3-9]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. predep_objects_CXX= postdep_objects_CXX= postdeps_CXX= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; esac case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= { echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_CXX='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac else case $host_os in aix[4-9]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_CXX='-qnocommon' lt_prog_compiler_wl_CXX='-Wl,' ;; esac ;; dgux*) case $cc_basename in ec++*) lt_prog_compiler_pic_CXX='-KPIC' ;; ghcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then lt_prog_compiler_pic_CXX='+Z' fi ;; aCC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_CXX='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; icpc* | ecpc*) # Intel C++ lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fpic' lt_prog_compiler_static_CXX='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) lt_prog_compiler_wl_CXX='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 lt_prog_compiler_pic_CXX='-pic' ;; cxx*) # Digital/Compaq C++ lt_prog_compiler_wl_CXX='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x lt_prog_compiler_pic_CXX='-pic' lt_prog_compiler_static_CXX='-Bstatic' ;; lcc*) # Lucid lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' ;; esac ;; vxworks*) ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; esac fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:16378: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:16382: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_CXX=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_pic_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; esac else lt_prog_compiler_pic_CXX= lt_prog_compiler_can_build_shared_CXX=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= ;; *) lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" { echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_static_works_CXX=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_CXX=yes fi else lt_cv_prog_compiler_static_works_CXX=yes fi fi $rm -r conftest* LDFLAGS="$save_LDFLAGS" fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_CXX" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_static_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then : else lt_prog_compiler_static_CXX= fi { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_CXX=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:16482: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:16486: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6; } if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix[4-9]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) export_symbols_cmds_CXX="$ltdll_cmds" ;; cygwin* | mingw*) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' ;; linux* | k*bsd*-gnu) link_all_deplibs_CXX=no ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' { echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 echo "${ECHO_T}$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_CXX" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_CXX=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_CXX in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_CXX pic_flag=$lt_prog_compiler_pic_CXX compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_CXX allow_undefined_flag_CXX= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_CXX=no else archive_cmds_need_lc_CXX=yes fi allow_undefined_flag_CXX=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6; } ;; esac fi ;; esac { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; 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 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" fi sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" fi sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || \ test -n "$runpath_var_CXX" || \ test "X$hardcode_automatic_CXX" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_CXX" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no && test "$hardcode_minus_L_CXX" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_CXX=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_CXX=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_CXX=unsupported fi { echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 echo "${ECHO_T}$hardcode_action_CXX" >&6; } if test "$hardcode_action_CXX" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_CXX \ CC_CXX \ LD_CXX \ lt_prog_compiler_wl_CXX \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_static_CXX \ lt_prog_compiler_no_builtin_flag_CXX \ export_dynamic_flag_spec_CXX \ thread_safe_flag_spec_CXX \ whole_archive_flag_spec_CXX \ enable_shared_with_static_runtimes_CXX \ old_archive_cmds_CXX \ old_archive_from_new_cmds_CXX \ predep_objects_CXX \ postdep_objects_CXX \ predeps_CXX \ postdeps_CXX \ compiler_lib_search_path_CXX \ compiler_lib_search_dirs_CXX \ archive_cmds_CXX \ archive_expsym_cmds_CXX \ postinstall_cmds_CXX \ postuninstall_cmds_CXX \ old_archive_from_expsyms_cmds_CXX \ allow_undefined_flag_CXX \ no_undefined_flag_CXX \ export_symbols_cmds_CXX \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_flag_spec_ld_CXX \ hardcode_libdir_separator_CXX \ hardcode_automatic_CXX \ module_cmds_CXX \ module_expsym_cmds_CXX \ lt_cv_prog_compiler_c_o_CXX \ fix_srcfile_path_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX; do case $var in old_archive_cmds_CXX | \ old_archive_from_new_cmds_CXX | \ archive_cmds_CXX | \ archive_expsym_cmds_CXX | \ module_cmds_CXX | \ module_expsym_cmds_CXX | \ old_archive_from_expsyms_cmds_CXX | \ export_symbols_cmds_CXX | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_CXX # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_CXX # Is the compiler the GNU C compiler? with_gcc=$GCC_CXX # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_CXX # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_CXX # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_CXX old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_CXX archive_expsym_cmds=$lt_archive_expsym_cmds_CXX postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_CXX module_expsym_cmds=$lt_module_expsym_cmds_CXX # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_CXX # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_CXX # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_CXX # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_CXX # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_CXX # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_CXX # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_CXX # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_CXX # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_CXX # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_CXX # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_CXX # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_CXX # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_CXX # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_CXX # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ldcxx=$with_gnu_ld with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld else tagname="" fi ;; F77) if test -n "$F77" && test "X$F77" != "Xno"; then ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu archive_cmds_need_lc_F77=no allow_undefined_flag_F77= always_export_symbols_F77=no archive_expsym_cmds_F77= export_dynamic_flag_spec_F77= hardcode_direct_F77=no hardcode_libdir_flag_spec_F77= hardcode_libdir_flag_spec_ld_F77= hardcode_libdir_separator_F77= hardcode_minus_L_F77=no hardcode_automatic_F77=no module_cmds_F77= module_expsym_cmds_F77= link_all_deplibs_F77=unknown old_archive_cmds_F77=$old_archive_cmds no_undefined_flag_F77= whole_archive_flag_spec_F77= enable_shared_with_static_runtimes_F77=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o objext_F77=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${F77-"f77"} compiler=$CC compiler_F77=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` { echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $can_build_shared" >&5 echo "${ECHO_T}$can_build_shared" >&6; } { echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { echo "$as_me:$LINENO: result: $enable_shared" >&5 echo "${ECHO_T}$enable_shared" >&6; } { echo "$as_me:$LINENO: checking whether to build static libraries" >&5 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { echo "$as_me:$LINENO: result: $enable_static" >&5 echo "${ECHO_T}$enable_static" >&6; } GCC_F77="$G77" LD_F77="$LD" lt_prog_compiler_wl_F77= lt_prog_compiler_pic_F77= lt_prog_compiler_static_F77= { echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_static_F77='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_F77='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_F77='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_F77='-fno-common' ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared_F77=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_F77=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_F77='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_F77='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl_F77='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_F77='-Bstatic' else lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_F77='-qnocommon' lt_prog_compiler_wl_F77='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_F77='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl_F77='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_F77='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static_F77='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl_F77='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static_F77='-non_shared' ;; newsos6) lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-fpic' lt_prog_compiler_static_F77='-Bstatic' ;; ccc*) lt_prog_compiler_wl_F77='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' lt_prog_compiler_wl_F77='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' lt_prog_compiler_wl_F77='' ;; esac ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl_F77='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; rdos*) lt_prog_compiler_static_F77='-non_shared' ;; solaris*) lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl_F77='-Qoption ld ';; *) lt_prog_compiler_wl_F77='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl_F77='-Qoption ld ' lt_prog_compiler_pic_F77='-PIC' lt_prog_compiler_static_F77='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic_F77='-Kconform_pic' lt_prog_compiler_static_F77='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; unicos*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_can_build_shared_F77=no ;; uts4*) lt_prog_compiler_pic_F77='-pic' lt_prog_compiler_static_F77='-Bstatic' ;; *) lt_prog_compiler_can_build_shared_F77=no ;; esac fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_F77"; then { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_pic_works_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_pic_works_F77=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_F77" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:18080: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:18084: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_F77=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_F77" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_pic_works_F77" >&6; } if test x"$lt_cv_prog_compiler_pic_works_F77" = xyes; then case $lt_prog_compiler_pic_F77 in "" | " "*) ;; *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; esac else lt_prog_compiler_pic_F77= lt_prog_compiler_can_build_shared_F77=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_F77= ;; *) lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" { echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_static_works_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_static_works_F77=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_F77=yes fi else lt_cv_prog_compiler_static_works_F77=yes fi fi $rm -r conftest* LDFLAGS="$save_LDFLAGS" fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_F77" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_static_works_F77" >&6; } if test x"$lt_cv_prog_compiler_static_works_F77" = xyes; then : else lt_prog_compiler_static_F77= fi { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_F77=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:18184: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:18188: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_F77=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6; } if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } runpath_var= allow_undefined_flag_F77= enable_shared_with_static_runtimes_F77=no archive_cmds_F77= archive_expsym_cmds_F77= old_archive_From_new_cmds_F77= old_archive_from_expsyms_cmds_F77= export_dynamic_flag_spec_F77= whole_archive_flag_spec_F77= thread_safe_flag_spec_F77= hardcode_libdir_flag_spec_F77= hardcode_libdir_flag_spec_ld_F77= hardcode_libdir_separator_F77= hardcode_direct_F77=no hardcode_minus_L_F77=no hardcode_shlibpath_var_F77=unsupported link_all_deplibs_F77=unknown hardcode_automatic_F77=no module_cmds_F77= module_expsym_cmds_F77= always_export_symbols_F77=no export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms_F77= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms_F77='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs_F77=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_F77='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_F77= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs_F77=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs_F77=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_F77=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_F77=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_F77='-L$libdir' allow_undefined_flag_F77=unsupported always_export_symbols_F77=no enable_shared_with_static_runtimes_F77=yes export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_F77=no fi ;; interix[3-9]*) hardcode_direct_F77=no hardcode_shlibpath_var_F77=no hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' export_dynamic_flag_spec_F77='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec_F77='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; *) tmp_sharedflag='-shared' ;; esac archive_cmds_F77='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi link_all_deplibs_F77=no else ld_shlibs_F77=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs_F77=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs_F77=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; esac ;; sunos4*) archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; esac if test "$ld_shlibs_F77" = no; then runpath_var= hardcode_libdir_flag_spec_F77= export_dynamic_flag_spec_F77= whole_archive_flag_spec_F77= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag_F77=unsupported always_export_symbols_F77=yes archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L_F77=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_F77=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_F77='' hardcode_direct_F77=yes hardcode_libdir_separator_F77=':' link_all_deplibs_F77=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_F77=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_F77=yes hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_libdir_separator_F77= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_F77=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_F77='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_F77="-z nodefs" archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_F77=' ${wl}-bernotok' allow_undefined_flag_F77=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_F77='$convenience' archive_cmds_need_lc_F77=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes # see comment about different semantics on the GNU ld section ld_shlibs_F77=no ;; bsdi[45]*) export_dynamic_flag_spec_F77=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_F77=' ' allow_undefined_flag_F77=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds_F77='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path_F77='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_F77=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc_F77=no hardcode_direct_F77=no hardcode_automatic_F77=yes hardcode_shlibpath_var_F77=unsupported whole_archive_flag_spec_F77='' link_all_deplibs_F77=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds_F77="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_F77="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_F77="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds_F77="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_F77=no ;; esac fi ;; dgux*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_shlibpath_var_F77=no ;; freebsd1*) ld_shlibs_F77=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_minus_L_F77=yes hardcode_shlibpath_var_F77=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes export_dynamic_flag_spec_F77='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=yes export_dynamic_flag_spec_F77='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: case $host_cpu in hppa*64*|ia64*) hardcode_libdir_flag_spec_ld_F77='+b $libdir' hardcode_direct_F77=no hardcode_shlibpath_var_F77=no ;; *) hardcode_direct_F77=yes export_dynamic_flag_spec_F77='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' fi hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: link_all_deplibs_F77=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; newsos6) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_shlibpath_var_F77=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' export_dynamic_flag_spec_F77='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-R$libdir' ;; *) archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs_F77=no fi ;; os2*) hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes allow_undefined_flag_F77=unsupported archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag_F77=' -expect_unresolved \*' archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_F77=' -expect_unresolved \*' archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_F77='-rpath $libdir' fi hardcode_libdir_separator_F77=: ;; solaris*) no_undefined_flag_F77=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_shlibpath_var_F77=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec_F77='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs_F77=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_direct_F77=yes hardcode_minus_L_F77=yes hardcode_shlibpath_var_F77=no ;; sysv4) case $host_vendor in sni) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds_F77='$CC -r -o $output$reload_objs' hardcode_direct_F77=no ;; motorola) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_F77=no ;; sysv4.3*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no export_dynamic_flag_spec_F77='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs_F77=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_F77='${wl}-z,text' archive_cmds_need_lc_F77=no hardcode_shlibpath_var_F77=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_F77='${wl}-z,text' allow_undefined_flag_F77='${wl}-z,nodefs' archive_cmds_need_lc_F77=no hardcode_shlibpath_var_F77=no hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator_F77=':' link_all_deplibs_F77=yes export_dynamic_flag_spec_F77='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_shlibpath_var_F77=no ;; *) ld_shlibs_F77=no ;; esac fi { echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 echo "${ECHO_T}$ld_shlibs_F77" >&6; } test "$ld_shlibs_F77" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_F77" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_F77=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_F77 in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_F77 pic_flag=$lt_prog_compiler_pic_F77 compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_F77 allow_undefined_flag_F77= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_F77=no else archive_cmds_need_lc_F77=yes fi allow_undefined_flag_F77=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6; } ;; esac fi ;; esac { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; 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 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" fi sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" fi sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } hardcode_action_F77= if test -n "$hardcode_libdir_flag_spec_F77" || \ test -n "$runpath_var_F77" || \ test "X$hardcode_automatic_F77" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_F77" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && test "$hardcode_minus_L_F77" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_F77=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_F77=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_F77=unsupported fi { echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 echo "${ECHO_T}$hardcode_action_F77" >&6; } if test "$hardcode_action_F77" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_F77 \ CC_F77 \ LD_F77 \ lt_prog_compiler_wl_F77 \ lt_prog_compiler_pic_F77 \ lt_prog_compiler_static_F77 \ lt_prog_compiler_no_builtin_flag_F77 \ export_dynamic_flag_spec_F77 \ thread_safe_flag_spec_F77 \ whole_archive_flag_spec_F77 \ enable_shared_with_static_runtimes_F77 \ old_archive_cmds_F77 \ old_archive_from_new_cmds_F77 \ predep_objects_F77 \ postdep_objects_F77 \ predeps_F77 \ postdeps_F77 \ compiler_lib_search_path_F77 \ compiler_lib_search_dirs_F77 \ archive_cmds_F77 \ archive_expsym_cmds_F77 \ postinstall_cmds_F77 \ postuninstall_cmds_F77 \ old_archive_from_expsyms_cmds_F77 \ allow_undefined_flag_F77 \ no_undefined_flag_F77 \ export_symbols_cmds_F77 \ hardcode_libdir_flag_spec_F77 \ hardcode_libdir_flag_spec_ld_F77 \ hardcode_libdir_separator_F77 \ hardcode_automatic_F77 \ module_cmds_F77 \ module_expsym_cmds_F77 \ lt_cv_prog_compiler_c_o_F77 \ fix_srcfile_path_F77 \ exclude_expsyms_F77 \ include_expsyms_F77; do case $var in old_archive_cmds_F77 | \ old_archive_from_new_cmds_F77 | \ archive_cmds_F77 | \ archive_expsym_cmds_F77 | \ module_cmds_F77 | \ module_expsym_cmds_F77 | \ old_archive_from_expsyms_cmds_F77 | \ export_symbols_cmds_F77 | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_F77 # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_F77 # Is the compiler the GNU C compiler? with_gcc=$GCC_F77 # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_F77 # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_F77 # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_F77 pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_F77 # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77 # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_F77 old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_F77 archive_expsym_cmds=$lt_archive_expsym_cmds_F77 postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_F77 module_expsym_cmds=$lt_module_expsym_cmds_F77 # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_F77 # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_F77 # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_F77 # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_F77 # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_F77 # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_F77 # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_F77 # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_F77 # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_F77 # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77 # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77 # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_F77 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_F77 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_F77 # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_F77 # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_F77 # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_F77 # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_F77 # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_F77 # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" else tagname="" fi ;; GCJ) if test -n "$GCJ" && test "X$GCJ" != "Xno"; then # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o objext_GCJ=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${GCJ-"gcj"} compiler=$CC compiler_GCJ=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # GCJ did not exist at the time GCC didn't implicitly link libc in. archive_cmds_need_lc_GCJ=no old_archive_cmds_GCJ=$old_archive_cmds lt_prog_compiler_no_builtin_flag_GCJ= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' { echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:20404: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:20408: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl_GCJ= lt_prog_compiler_pic_GCJ= lt_prog_compiler_static_GCJ= { echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_static_GCJ='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_GCJ='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_GCJ='-fno-common' ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared_GCJ=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_GCJ=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_GCJ='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_GCJ='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl_GCJ='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_GCJ='-Bstatic' else lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_GCJ='-qnocommon' lt_prog_compiler_wl_GCJ='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl_GCJ='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_GCJ='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl_GCJ='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static_GCJ='-non_shared' ;; newsos6) lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-fpic' lt_prog_compiler_static_GCJ='-Bstatic' ;; ccc*) lt_prog_compiler_wl_GCJ='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static_GCJ='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' lt_prog_compiler_wl_GCJ='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' lt_prog_compiler_wl_GCJ='' ;; esac ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl_GCJ='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static_GCJ='-non_shared' ;; rdos*) lt_prog_compiler_static_GCJ='-non_shared' ;; solaris*) lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl_GCJ='-Qoption ld ';; *) lt_prog_compiler_wl_GCJ='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl_GCJ='-Qoption ld ' lt_prog_compiler_pic_GCJ='-PIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic_GCJ='-Kconform_pic' lt_prog_compiler_static_GCJ='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; unicos*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_can_build_shared_GCJ=no ;; uts4*) lt_prog_compiler_pic_GCJ='-pic' lt_prog_compiler_static_GCJ='-Bstatic' ;; *) lt_prog_compiler_can_build_shared_GCJ=no ;; esac fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_GCJ"; then { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_pic_works_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_pic_works_GCJ=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_GCJ" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:20694: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:20698: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_GCJ=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_GCJ" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_pic_works_GCJ" >&6; } if test x"$lt_cv_prog_compiler_pic_works_GCJ" = xyes; then case $lt_prog_compiler_pic_GCJ in "" | " "*) ;; *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; esac else lt_prog_compiler_pic_GCJ= lt_prog_compiler_can_build_shared_GCJ=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_GCJ= ;; *) lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\" { echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_static_works_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_static_works_GCJ=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_GCJ=yes fi else lt_cv_prog_compiler_static_works_GCJ=yes fi fi $rm -r conftest* LDFLAGS="$save_LDFLAGS" fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_GCJ" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_static_works_GCJ" >&6; } if test x"$lt_cv_prog_compiler_static_works_GCJ" = xyes; then : else lt_prog_compiler_static_GCJ= fi { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_GCJ=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:20798: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:20802: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_GCJ=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6; } if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } runpath_var= allow_undefined_flag_GCJ= enable_shared_with_static_runtimes_GCJ=no archive_cmds_GCJ= archive_expsym_cmds_GCJ= old_archive_From_new_cmds_GCJ= old_archive_from_expsyms_cmds_GCJ= export_dynamic_flag_spec_GCJ= whole_archive_flag_spec_GCJ= thread_safe_flag_spec_GCJ= hardcode_libdir_flag_spec_GCJ= hardcode_libdir_flag_spec_ld_GCJ= hardcode_libdir_separator_GCJ= hardcode_direct_GCJ=no hardcode_minus_L_GCJ=no hardcode_shlibpath_var_GCJ=unsupported link_all_deplibs_GCJ=unknown hardcode_automatic_GCJ=no module_cmds_GCJ= module_expsym_cmds_GCJ= always_export_symbols_GCJ=no export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms_GCJ= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms_GCJ='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs_GCJ=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_GCJ='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_GCJ= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs_GCJ=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs_GCJ=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_GCJ=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_GCJ=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_GCJ='-L$libdir' allow_undefined_flag_GCJ=unsupported always_export_symbols_GCJ=no enable_shared_with_static_runtimes_GCJ=yes export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_GCJ=no fi ;; interix[3-9]*) hardcode_direct_GCJ=no hardcode_shlibpath_var_GCJ=no hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' export_dynamic_flag_spec_GCJ='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_GCJ='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec_GCJ='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; *) tmp_sharedflag='-shared' ;; esac archive_cmds_GCJ='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi link_all_deplibs_GCJ=no else ld_shlibs_GCJ=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs_GCJ=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs_GCJ=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; esac ;; sunos4*) archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; esac if test "$ld_shlibs_GCJ" = no; then runpath_var= hardcode_libdir_flag_spec_GCJ= export_dynamic_flag_spec_GCJ= whole_archive_flag_spec_GCJ= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag_GCJ=unsupported always_export_symbols_GCJ=yes archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L_GCJ=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_GCJ=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_GCJ='' hardcode_direct_GCJ=yes hardcode_libdir_separator_GCJ=':' link_all_deplibs_GCJ=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_GCJ=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_GCJ=yes hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_libdir_separator_GCJ= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_GCJ=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_GCJ='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_GCJ="-z nodefs" archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_GCJ=' ${wl}-bernotok' allow_undefined_flag_GCJ=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_GCJ='$convenience' archive_cmds_need_lc_GCJ=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes # see comment about different semantics on the GNU ld section ld_shlibs_GCJ=no ;; bsdi[45]*) export_dynamic_flag_spec_GCJ=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_GCJ=' ' allow_undefined_flag_GCJ=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds_GCJ='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_GCJ='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_GCJ=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc_GCJ=no hardcode_direct_GCJ=no hardcode_automatic_GCJ=yes hardcode_shlibpath_var_GCJ=unsupported whole_archive_flag_spec_GCJ='' link_all_deplibs_GCJ=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds_GCJ="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_GCJ="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_GCJ="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds_GCJ="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_GCJ=no ;; esac fi ;; dgux*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_shlibpath_var_GCJ=no ;; freebsd1*) ld_shlibs_GCJ=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_minus_L_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds_GCJ='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: case $host_cpu in hppa*64*|ia64*) hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' hardcode_direct_GCJ=no hardcode_shlibpath_var_GCJ=no ;; *) hardcode_direct_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir' fi hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: link_all_deplibs_GCJ=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; newsos6) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_shlibpath_var_GCJ=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' export_dynamic_flag_spec_GCJ='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-R$libdir' ;; *) archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs_GCJ=no fi ;; os2*) hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes allow_undefined_flag_GCJ=unsupported archive_cmds_GCJ='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag_GCJ=' -expect_unresolved \*' archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_GCJ=' -expect_unresolved \*' archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_GCJ='-rpath $libdir' fi hardcode_libdir_separator_GCJ=: ;; solaris*) no_undefined_flag_GCJ=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_shlibpath_var_GCJ=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs_GCJ=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_direct_GCJ=yes hardcode_minus_L_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; sysv4) case $host_vendor in sni) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds_GCJ='$CC -r -o $output$reload_objs' hardcode_direct_GCJ=no ;; motorola) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_GCJ=no ;; sysv4.3*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_GCJ=no export_dynamic_flag_spec_GCJ='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_GCJ=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs_GCJ=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_GCJ='${wl}-z,text' archive_cmds_need_lc_GCJ=no hardcode_shlibpath_var_GCJ=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_GCJ='${wl}-z,text' allow_undefined_flag_GCJ='${wl}-z,nodefs' archive_cmds_need_lc_GCJ=no hardcode_shlibpath_var_GCJ=no hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator_GCJ=':' link_all_deplibs_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_shlibpath_var_GCJ=no ;; *) ld_shlibs_GCJ=no ;; esac fi { echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 echo "${ECHO_T}$ld_shlibs_GCJ" >&6; } test "$ld_shlibs_GCJ" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_GCJ" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_GCJ=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_GCJ in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_GCJ pic_flag=$lt_prog_compiler_pic_GCJ compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ allow_undefined_flag_GCJ= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_GCJ=no else archive_cmds_need_lc_GCJ=yes fi allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6; } ;; esac fi ;; esac { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; 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 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" fi sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" fi sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } hardcode_action_GCJ= if test -n "$hardcode_libdir_flag_spec_GCJ" || \ test -n "$runpath_var_GCJ" || \ test "X$hardcode_automatic_GCJ" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_GCJ" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && test "$hardcode_minus_L_GCJ" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_GCJ=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_GCJ=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_GCJ=unsupported fi { echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 echo "${ECHO_T}$hardcode_action_GCJ" >&6; } if test "$hardcode_action_GCJ" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_GCJ \ CC_GCJ \ LD_GCJ \ lt_prog_compiler_wl_GCJ \ lt_prog_compiler_pic_GCJ \ lt_prog_compiler_static_GCJ \ lt_prog_compiler_no_builtin_flag_GCJ \ export_dynamic_flag_spec_GCJ \ thread_safe_flag_spec_GCJ \ whole_archive_flag_spec_GCJ \ enable_shared_with_static_runtimes_GCJ \ old_archive_cmds_GCJ \ old_archive_from_new_cmds_GCJ \ predep_objects_GCJ \ postdep_objects_GCJ \ predeps_GCJ \ postdeps_GCJ \ compiler_lib_search_path_GCJ \ compiler_lib_search_dirs_GCJ \ archive_cmds_GCJ \ archive_expsym_cmds_GCJ \ postinstall_cmds_GCJ \ postuninstall_cmds_GCJ \ old_archive_from_expsyms_cmds_GCJ \ allow_undefined_flag_GCJ \ no_undefined_flag_GCJ \ export_symbols_cmds_GCJ \ hardcode_libdir_flag_spec_GCJ \ hardcode_libdir_flag_spec_ld_GCJ \ hardcode_libdir_separator_GCJ \ hardcode_automatic_GCJ \ module_cmds_GCJ \ module_expsym_cmds_GCJ \ lt_cv_prog_compiler_c_o_GCJ \ fix_srcfile_path_GCJ \ exclude_expsyms_GCJ \ include_expsyms_GCJ; do case $var in old_archive_cmds_GCJ | \ old_archive_from_new_cmds_GCJ | \ archive_cmds_GCJ | \ archive_expsym_cmds_GCJ | \ module_cmds_GCJ | \ module_expsym_cmds_GCJ | \ old_archive_from_expsyms_cmds_GCJ | \ export_symbols_cmds_GCJ | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_GCJ # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_GCJ # Is the compiler the GNU C compiler? with_gcc=$GCC_GCJ # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_GCJ # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_GCJ # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_GCJ pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_GCJ # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_GCJ old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_GCJ archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_GCJ module_expsym_cmds=$lt_module_expsym_cmds_GCJ # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_GCJ # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_GCJ # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_GCJ # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_GCJ # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_GCJ # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_GCJ # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_GCJ # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_GCJ # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_GCJ # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_GCJ # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_GCJ # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_GCJ # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_GCJ # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_GCJ # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_GCJ # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_GCJ # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" else tagname="" fi ;; RC) # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o objext_RC=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${RC-"windres"} compiler=$CC compiler_RC=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` lt_cv_prog_compiler_c_o_RC=yes # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_RC \ CC_RC \ LD_RC \ lt_prog_compiler_wl_RC \ lt_prog_compiler_pic_RC \ lt_prog_compiler_static_RC \ lt_prog_compiler_no_builtin_flag_RC \ export_dynamic_flag_spec_RC \ thread_safe_flag_spec_RC \ whole_archive_flag_spec_RC \ enable_shared_with_static_runtimes_RC \ old_archive_cmds_RC \ old_archive_from_new_cmds_RC \ predep_objects_RC \ postdep_objects_RC \ predeps_RC \ postdeps_RC \ compiler_lib_search_path_RC \ compiler_lib_search_dirs_RC \ archive_cmds_RC \ archive_expsym_cmds_RC \ postinstall_cmds_RC \ postuninstall_cmds_RC \ old_archive_from_expsyms_cmds_RC \ allow_undefined_flag_RC \ no_undefined_flag_RC \ export_symbols_cmds_RC \ hardcode_libdir_flag_spec_RC \ hardcode_libdir_flag_spec_ld_RC \ hardcode_libdir_separator_RC \ hardcode_automatic_RC \ module_cmds_RC \ module_expsym_cmds_RC \ lt_cv_prog_compiler_c_o_RC \ fix_srcfile_path_RC \ exclude_expsyms_RC \ include_expsyms_RC; do case $var in old_archive_cmds_RC | \ old_archive_from_new_cmds_RC | \ archive_cmds_RC | \ archive_expsym_cmds_RC | \ module_cmds_RC | \ module_expsym_cmds_RC | \ old_archive_from_expsyms_cmds_RC | \ export_symbols_cmds_RC | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_RC # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_RC # Is the compiler the GNU C compiler? with_gcc=$GCC_RC # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_RC # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_RC # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_RC pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_RC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_RC old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_RC archive_expsym_cmds=$lt_archive_expsym_cmds_RC postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_RC module_expsym_cmds=$lt_module_expsym_cmds_RC # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_RC # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_RC # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_RC # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_RC # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_RC # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_RC # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_RC # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_RC # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_RC # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_RC # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_RC # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_RC # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_RC # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_RC # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_RC # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_RC # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_RC # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_RC # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" ;; *) { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5 echo "$as_me: error: Unsupported tag name: $tagname" >&2;} { (exit 1); exit 1; }; } ;; esac # Append the new tag name to the list of available tags. if test -n "$tagname" ; then available_tags="$available_tags $tagname" fi fi done IFS="$lt_save_ifs" # Now substitute the updated list of available tags. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then mv "${ofile}T" "$ofile" chmod +x "$ofile" else rm -f "${ofile}T" { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5 echo "$as_me: error: unable to update list of available tagged configurations." >&2;} { (exit 1); exit 1; }; } fi fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' # Prevent multiple expansion subdirs="$subdirs libltdl" if test "$using_libltdl" != "no"; then for ac_header in ltdl.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ----------------------------------------- ## ## Report this to http://bugs.libelektra.org ## ## ----------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define HAVE_LIBLTDL 1 _ACEOF else using_libltdl=no fi done fi if test x$using_libltdl = xyes; then HAVE_LIBLTDL_TRUE= HAVE_LIBLTDL_FALSE='#' else HAVE_LIBLTDL_TRUE='#' HAVE_LIBLTDL_FALSE= fi # # Checks for libraries. # # Check for iconv # If iconv usage is enabled we need to check for iconv. # This may also result in linking against libiconv, # if the system requires this for a working iconv function. { echo "$as_me:$LINENO: checking whether to enable iconv" >&5 echo $ECHO_N "checking whether to enable iconv... $ECHO_C" >&6; } # Check whether --enable-iconv was given. if test "${enable_iconv+set}" = set; then enableval=$enable_iconv; fi if test "x$enable_iconv" = "xyes"; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else acl_final_prefix="$prefix" fi if test "X$exec_prefix" = "XNONE"; then acl_final_exec_prefix='${prefix}' else acl_final_exec_prefix="$exec_prefix" fi acl_save_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_save_prefix" # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { echo "$as_me:$LINENO: checking for ld used by GCC" >&5 echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | [A-Za-z]:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the path of ld ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { echo "$as_me:$LINENO: checking for GNU ld" >&5 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } else { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } fi if test "${acl_cv_path_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in *GNU* | *'with BFD'*) test "$with_gnu_ld" != no && break ;; *) test "$with_gnu_ld" != yes && break ;; esac fi done IFS="$ac_save_ifs" else acl_cv_path_LD="$LD" # Let the user override the test with a path. fi fi LD="$acl_cv_path_LD" if test -n "$LD"; then { echo "$as_me:$LINENO: result: $LD" >&5 echo "${ECHO_T}$LD" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } { echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } if test "${acl_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. case `$LD -v 2>&1 &5 echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6; } with_gnu_ld=$acl_cv_prog_gnu_ld { echo "$as_me:$LINENO: checking for shared library run path origin" >&5 echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6; } if test "${acl_cv_rpath+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done fi { echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5 echo "${ECHO_T}$acl_cv_rpath" >&6; } wl="$acl_cv_wl" acl_libext="$acl_cv_libext" acl_shlibext="$acl_cv_shlibext" acl_libname_spec="$acl_cv_libname_spec" acl_library_names_spec="$acl_cv_library_names_spec" acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" acl_hardcode_direct="$acl_cv_hardcode_direct" acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" # Check whether --enable-rpath was given. if test "${enable_rpath+set}" = set; then enableval=$enable_rpath; : else enable_rpath=yes fi acl_libdirstem=lib searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` if test -n "$searchpath"; then acl_save_IFS="${IFS= }"; IFS=":" for searchdir in $searchpath; do if test -d "$searchdir"; then case "$searchdir" in */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; *) searchdir=`cd "$searchdir" && pwd` case "$searchdir" in */lib64 ) acl_libdirstem=lib64 ;; esac ;; esac fi done IFS="$acl_save_IFS" fi use_additional=yes acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" # Check whether --with-libiconv-prefix was given. if test "${with_libiconv_prefix+set}" = set; then withval=$with_libiconv_prefix; if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" fi fi fi LIBICONV= LTLIBICONV= INCICONV= LIBICONV_PREFIX= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='iconv ' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" else : fi else found_dir= found_la= found_so= found_a= eval libname=\"$acl_libname_spec\" # typically: libname=lib$name if test -n "$acl_shlibext"; then shrext=".$acl_shlibext" # typically: shrext=.so else shrext= fi if test $use_additional = yes; then dir="$additional_libdir" if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$acl_shlibext"; then if test -f "$dir/$libname$shrext"; then found_dir="$dir" found_so="$dir/$libname$shrext" else if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then ver=`(cd "$dir" && \ for f in "$libname$shrext".*; do echo "$f"; done \ | sed -e "s,^$libname$shrext\\\\.,," \ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | sed 1q ) 2>/dev/null` if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then found_dir="$dir" found_so="$dir/$libname$shrext.$ver" fi else eval library_names=\"$acl_library_names_spec\" for f in $library_names; do if test -f "$dir/$f"; then found_dir="$dir" found_so="$dir/$f" break fi done fi fi fi if test "X$found_dir" = "X"; then if test -f "$dir/$libname.$acl_libext"; then found_dir="$dir" found_a="$dir/$libname.$acl_libext" fi fi if test "X$found_dir" != "X"; then if test -f "$dir/$libname.la"; then found_la="$dir/$libname.la" fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi if test "$acl_hardcode_direct" = yes; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else haveit= for x in $LDFLAGS $LIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" fi if test "$acl_hardcode_minus_L" != no; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" else LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" fi fi additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` LIBICONV_PREFIX="$basedir" additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INCICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" fi fi fi fi fi if test -n "$found_la"; then save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" ;; esac done fi else LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$acl_hardcode_libdir_separator"; then alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" else for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$acl_hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then for found_dir in $ltrpathdirs; do LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" done fi am_save_CPPFLAGS="$CPPFLAGS" for element in $INCICONV; do haveit= for x in $CPPFLAGS; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi done { echo "$as_me:$LINENO: checking for iconv" >&5 echo $ECHO_N "checking for iconv... $ECHO_C" >&6; } if test "${am_cv_func_iconv+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then am_cv_func_iconv=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then am_cv_lib_iconv=yes am_cv_func_iconv=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS="$am_save_LIBS" fi fi { echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5 echo "${ECHO_T}$am_cv_func_iconv" >&6; } if test "$am_cv_func_iconv" = yes; then { echo "$as_me:$LINENO: checking for working iconv" >&5 echo $ECHO_N "checking for working iconv... $ECHO_C" >&6; } if test "${am_cv_func_iconv_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi if test "$cross_compiling" = yes; then case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { /* Test against AIX 5.1 bug: Failures are not distinguishable from successful returns. */ { iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); if (cd_utf8_to_88591 != (iconv_t)(-1)) { static const char input[] = "\342\202\254"; /* EURO SIGN */ char buf[10]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_utf8_to_88591, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) return 1; } } #if 0 /* This bug could be worked around by the caller. */ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ { iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); if (cd_88591_to_utf8 != (iconv_t)(-1)) { static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; char buf[50]; const char *inptr = input; size_t inbytesleft = strlen (input); char *outptr = buf; size_t outbytesleft = sizeof (buf); size_t res = iconv (cd_88591_to_utf8, (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) return 1; } } #endif /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is provided. */ if (/* Try standardized names. */ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) /* Try IRIX, OSF/1 names. */ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) /* Try AIX names. */ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) /* Try HP-UX names. */ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) return 1; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then am_cv_func_iconv_works=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) am_cv_func_iconv_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi LIBS="$am_save_LIBS" fi { echo "$as_me:$LINENO: result: $am_cv_func_iconv_works" >&5 echo "${ECHO_T}$am_cv_func_iconv_works" >&6; } case "$am_cv_func_iconv_works" in *no) am_func_iconv=no am_cv_lib_iconv=no ;; *) am_func_iconv=yes ;; esac else am_func_iconv=no am_cv_lib_iconv=no fi if test "$am_func_iconv" = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_ICONV 1 _ACEOF fi if test "$am_cv_lib_iconv" = yes; then { echo "$as_me:$LINENO: checking how to link with libiconv" >&5 echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $LIBICONV" >&5 echo "${ECHO_T}$LIBICONV" >&6; } else CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= LTLIBICONV= fi if test "$am_cv_func_iconv" = yes; then { echo "$as_me:$LINENO: checking for iconv declaration" >&5 echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6; } if test "${am_cv_proto_iconv+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include extern #ifdef __cplusplus "C" #endif #if defined(__STDC__) || defined(__cplusplus) size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); #else size_t iconv(); #endif int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then am_cv_proto_iconv_arg1="" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 am_cv_proto_iconv_arg1="const" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);" fi am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` { echo "$as_me:$LINENO: result: ${ac_t:- }$am_cv_proto_iconv" >&5 echo "${ECHO_T}${ac_t:- }$am_cv_proto_iconv" >&6; } cat >>confdefs.h <<_ACEOF #define ICONV_CONST $am_cv_proto_iconv_arg1 _ACEOF fi else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi privatelibs="" # Check for libxml (Allow compilation of libelektratools) # Check whether --with-xml-prefix was given. if test "${with_xml_prefix+set}" = set; then withval=$with_xml_prefix; xml_config_prefix="$withval" else xml_config_prefix="" fi # Check whether --with-xml-exec-prefix was given. if test "${with_xml_exec_prefix+set}" = set; then withval=$with_xml_exec_prefix; xml_config_exec_prefix="$withval" else xml_config_exec_prefix="" fi # Check whether --enable-xmltest was given. if test "${enable_xmltest+set}" = set; then enableval=$enable_xmltest; else enable_xmltest=yes fi if test x$xml_config_exec_prefix != x ; then xml_config_args="$xml_config_args" if test x${XML2_CONFIG+set} != xset ; then XML2_CONFIG=$xml_config_exec_prefix/bin/xml2-config fi fi if test x$xml_config_prefix != x ; then xml_config_args="$xml_config_args --prefix=$xml_config_prefix" if test x${XML2_CONFIG+set} != xset ; then XML2_CONFIG=$xml_config_prefix/bin/xml2-config fi fi # Extract the first word of "xml2-config", so it can be a program name with args. set dummy xml2-config; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_XML2_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $XML2_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_XML2_CONFIG="$XML2_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_XML2_CONFIG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_XML2_CONFIG" && ac_cv_path_XML2_CONFIG="no" ;; esac fi XML2_CONFIG=$ac_cv_path_XML2_CONFIG if test -n "$XML2_CONFIG"; then { echo "$as_me:$LINENO: result: $XML2_CONFIG" >&5 echo "${ECHO_T}$XML2_CONFIG" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi min_xml_version=2.0.0 { echo "$as_me:$LINENO: checking for libxml - version >= $min_xml_version" >&5 echo $ECHO_N "checking for libxml - version >= $min_xml_version... $ECHO_C" >&6; } no_xml="" if test "$XML2_CONFIG" = "no" ; then no_xml=yes else XML_CPPFLAGS=`$XML2_CONFIG $xml_config_args --cflags` XML_LIBS=`$XML2_CONFIG $xml_config_args --libs` xml_config_major_version=`$XML2_CONFIG $xml_config_args --version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` xml_config_minor_version=`$XML2_CONFIG $xml_config_args --version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` xml_config_micro_version=`$XML2_CONFIG $xml_config_args --version | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` if test "x$enable_xmltest" = "xyes" ; then ac_save_CPPFLAGS="$CPPFLAGS" ac_save_LIBS="$LIBS" CPPFLAGS="$CPPFLAGS $XML_CPPFLAGS" LIBS="$XML_LIBS $LIBS" rm -f conf.xmltest if test "$cross_compiling" = yes; then echo $ac_n "cross compiling; assumed OK... $ac_c" else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main() { int xml_major_version, xml_minor_version, xml_micro_version; int major, minor, micro; char *tmp_version; system("touch conf.xmltest"); /* Capture xml2-config output via autoconf/configure variables */ /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = (char *)strdup("$min_xml_version"); if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { printf("%s, bad version string from xml2-config\n", "$min_xml_version"); exit(1); } free(tmp_version); /* Capture the version information from the header files */ tmp_version = (char *)strdup(LIBXML_DOTTED_VERSION); if (sscanf(tmp_version, "%d.%d.%d", &xml_major_version, &xml_minor_version, &xml_micro_version) != 3) { printf("%s, bad version string from libxml includes\n", "LIBXML_DOTTED_VERSION"); exit(1); } free(tmp_version); /* Compare xml2-config output to the libxml headers */ if ((xml_major_version != $xml_config_major_version) || (xml_minor_version != $xml_config_minor_version) || (xml_micro_version != $xml_config_micro_version)) { printf("*** libxml header files (version %d.%d.%d) do not match\n", xml_major_version, xml_minor_version, xml_micro_version); printf("*** xml2-config (version %d.%d.%d)\n", $xml_config_major_version, $xml_config_minor_version, $xml_config_micro_version); return 1; } /* Compare the headers to the library to make sure we match */ /* Less than ideal -- doesn't provide us with return value feedback, * only exits if there's a serious mismatch between header and library. */ LIBXML_TEST_VERSION; /* Test that the library is greater than our minimum version */ if ((xml_major_version > major) || ((xml_major_version == major) && (xml_minor_version > minor)) || ((xml_major_version == major) && (xml_minor_version == minor) && (xml_micro_version >= micro))) { return 0; } else { printf("\n*** An old version of libxml (%d.%d.%d) was found.\n", xml_major_version, xml_minor_version, xml_micro_version); printf("*** You need a version of libxml newer than %d.%d.%d. The latest version of\n", major, minor, micro); printf("*** libxml is always available from ftp://ftp.xmlsoft.org.\n"); printf("***\n"); printf("*** If you have already installed a sufficiently new version, this error\n"); printf("*** probably means that the wrong copy of the xml2-config shell script is\n"); printf("*** being found. The easiest way to fix this is to remove the old version\n"); printf("*** of LIBXML, but you can also set the XML2_CONFIG environment to point to the\n"); printf("*** correct copy of xml2-config. (In this case, you will have to\n"); printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); printf("*** so that the correct libraries are found at run-time))\n"); } return 1; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) no_xml=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi CPPFLAGS="$ac_save_CPPFLAGS" LIBS="$ac_save_LIBS" fi fi if test "x$no_xml" = x ; then { echo "$as_me:$LINENO: result: yes (version $xml_config_major_version.$xml_config_minor_version.$xml_config_micro_version)" >&5 echo "${ECHO_T}yes (version $xml_config_major_version.$xml_config_minor_version.$xml_config_micro_version)" >&6; } elektra_have_xml="yes" else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } if test "$XML2_CONFIG" = "no" ; then echo "*** The xml2-config script installed by LIBXML could not be found" echo "*** If libxml was installed in PREFIX, make sure PREFIX/bin is in" echo "*** your path, or set the XML2_CONFIG environment variable to the" echo "*** full path to xml2-config." else if test -f conf.xmltest ; then : else echo "*** Could not run libxml test program, checking why..." CPPFLAGS="$CPPFLAGS $XML_CPPFLAGS" LIBS="$LIBS $XML_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { LIBXML_TEST_VERSION; return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding LIBXML or finding the wrong" echo "*** version of LIBXML. If it is not finding LIBXML, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means LIBXML was incorrectly installed" echo "*** or that you have moved LIBXML since it was installed. In the latter case, you" echo "*** may want to edit the xml2-config script: $XML2_CONFIG" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CPPFLAGS="$ac_save_CPPFLAGS" LIBS="$ac_save_LIBS" fi fi XML_CPPFLAGS="" XML_LIBS="" elektra_have_xml="no" fi rm -f conf.xmltest if test x$elektra_have_xml = xyes; then HAVE_XML_TRUE= HAVE_XML_FALSE='#' else HAVE_XML_TRUE='#' HAVE_XML_FALSE= fi if test "x$elektra_have_xml" = "xyes"; then elektratools=libelektratools privatelibs=$privatelibs" -lxml2" fi # # Backends enable and disable logic. # BACKENDS="" TESTBACKENDS="" # $1 is the backend name # $2 is the check for prerequisite # $3 is the default value YES or NO TESTBACKENDS="$TESTBACKENDS filesys check: true, default: YES" if test "YES" == YES; then BACKENDS="$BACKENDS filesys"; fi # Check whether --enable-filesys was given. if test "${enable_filesys+set}" = set; then enableval=$enable_filesys; if test "$enableval" = yes; then if true; then BACKENDS="$BACKENDS filesys"; else #thus only default backends are in BACKENDS and #they don't have prerequisites, don't remove { echo "$as_me:$LINENO: WARNING: not building backend filesys, prerequisite missing" >&5 echo "$as_me: WARNING: not building backend filesys, prerequisite missing" >&2;} fi else #removed backend out of BACKENDS list BACKENDS=$(echo "$BACKENDS" | sed 's/[:space:]*filesys//') fi fi TESTBACKENDS="$TESTBACKENDS hosts check: true, default: YES" if test "YES" == YES; then BACKENDS="$BACKENDS hosts"; fi # Check whether --enable-hosts was given. if test "${enable_hosts+set}" = set; then enableval=$enable_hosts; if test "$enableval" = yes; then if true; then BACKENDS="$BACKENDS hosts"; else #thus only default backends are in BACKENDS and #they don't have prerequisites, don't remove { echo "$as_me:$LINENO: WARNING: not building backend hosts, prerequisite missing" >&5 echo "$as_me: WARNING: not building backend hosts, prerequisite missing" >&2;} fi else #removed backend out of BACKENDS list BACKENDS=$(echo "$BACKENDS" | sed 's/[:space:]*hosts//') fi fi TESTBACKENDS="$TESTBACKENDS ini check: true, default: NO" if test "NO" == YES; then BACKENDS="$BACKENDS ini"; fi # Check whether --enable-ini was given. if test "${enable_ini+set}" = set; then enableval=$enable_ini; if test "$enableval" = yes; then if true; then BACKENDS="$BACKENDS ini"; else #thus only default backends are in BACKENDS and #they don't have prerequisites, don't remove { echo "$as_me:$LINENO: WARNING: not building backend ini, prerequisite missing" >&5 echo "$as_me: WARNING: not building backend ini, prerequisite missing" >&2;} fi else #removed backend out of BACKENDS list BACKENDS=$(echo "$BACKENDS" | sed 's/[:space:]*ini//') fi fi elektra_have_db=no # Check for libdb (Allow compilation of libelektra-berkeley.so) for ac_header in db.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ----------------------------------------- ## ## Report this to http://bugs.libelektra.org ## ## ----------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF { echo "$as_me:$LINENO: checking for db_create in -ldb" >&5 echo $ECHO_N "checking for db_create in -ldb... $ECHO_C" >&6; } if test "${ac_cv_lib_db_db_create+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldb $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char db_create (); int main () { return db_create (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_db_db_create=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_db_db_create=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_db_db_create" >&5 echo "${ECHO_T}$ac_cv_lib_db_db_create" >&6; } if test $ac_cv_lib_db_db_create = yes; then elektra_have_db="yes" fi fi done TESTBACKENDS="$TESTBACKENDS berkeleydb check: test x$elektra_have_db = xyes, default: NO" if test "NO" == YES; then BACKENDS="$BACKENDS berkeleydb"; fi # Check whether --enable-berkeleydb was given. if test "${enable_berkeleydb+set}" = set; then enableval=$enable_berkeleydb; if test "$enableval" = yes; then if test x$elektra_have_db = xyes; then BACKENDS="$BACKENDS berkeleydb"; else #thus only default backends are in BACKENDS and #they don't have prerequisites, don't remove { echo "$as_me:$LINENO: WARNING: not building backend berkeleydb, prerequisite missing" >&5 echo "$as_me: WARNING: not building backend berkeleydb, prerequisite missing" >&2;} fi else #removed backend out of BACKENDS list BACKENDS=$(echo "$BACKENDS" | sed 's/[:space:]*berkeleydb//') fi fi # Check for libGconf (Allow compilation of libelektra-gconf.so) pkg_failed=no { echo "$as_me:$LINENO: checking for gconf" >&5 echo $ECHO_N "checking for gconf... $ECHO_C" >&6; } if test -n "$PKG_CONFIG"; then if test -n "$gconf_CFLAGS"; then pkg_cv_gconf_CFLAGS="$gconf_CFLAGS" else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gconf-2.0\"") >&5 ($PKG_CONFIG --exists --print-errors "gconf-2.0") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_gconf_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$gconf_LIBS"; then pkg_cv_gconf_LIBS="$gconf_LIBS" else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gconf-2.0\"") >&5 ($PKG_CONFIG --exists --print-errors "gconf-2.0") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_gconf_LIBS=`$PKG_CONFIG --libs "gconf-2.0" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then gconf_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gconf-2.0"` else gconf_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gconf-2.0"` fi # Put the nasty error message in config.log where it belongs echo "$gconf_PKG_ERRORS" >&5 { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } elektra_have_gconf="no" elif test $pkg_failed = untried; then elektra_have_gconf="no" else gconf_CFLAGS=$pkg_cv_gconf_CFLAGS gconf_LIBS=$pkg_cv_gconf_LIBS { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } elektra_have_gconf="yes" fi TESTBACKENDS="$TESTBACKENDS gconf check: test x$elektra_have_gconf = xyes, default: NO" if test "NO" == YES; then BACKENDS="$BACKENDS gconf"; fi # Check whether --enable-gconf was given. if test "${enable_gconf+set}" = set; then enableval=$enable_gconf; if test "$enableval" = yes; then if test x$elektra_have_gconf = xyes; then BACKENDS="$BACKENDS gconf"; else #thus only default backends are in BACKENDS and #they don't have prerequisites, don't remove { echo "$as_me:$LINENO: WARNING: not building backend gconf, prerequisite missing" >&5 echo "$as_me: WARNING: not building backend gconf, prerequisite missing" >&2;} fi else #removed backend out of BACKENDS list BACKENDS=$(echo "$BACKENDS" | sed 's/[:space:]*gconf//') fi fi elektra_glibc_mntent=no for ac_header in mntent.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ----------------------------------------- ## ## Report this to http://bugs.libelektra.org ## ## ----------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { struct mntent *m; FILE *f; char *fsname, *dir, *type, *opts; int freq, passno; f=setmntent("/etc/fstab", "r"); m=getmntent(f); fsname=m->mnt_fsname; dir=m->mnt_dir; type=m->mnt_type; opts=m->mnt_opts; freq=m->mnt_freq; passno=m->mnt_passno; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then cat >>confdefs.h <<\_ACEOF #define GETMNTENT_GLIBC 1 _ACEOF elektra_glibc_mntent=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi done { echo "$as_me:$LINENO: checking if mntent follows the glibc conventions" >&5 echo $ECHO_N "checking if mntent follows the glibc conventions... $ECHO_C" >&6; } if test x$elektra_glibc_mntent = xyes; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi TESTBACKENDS="$TESTBACKENDS fstab check: test x$elektra_glibc_mntent = xyes, default: NO" if test "NO" == YES; then BACKENDS="$BACKENDS fstab"; fi # Check whether --enable-fstab was given. if test "${enable_fstab+set}" = set; then enableval=$enable_fstab; if test "$enableval" = yes; then if test x$elektra_glibc_mntent = xyes; then BACKENDS="$BACKENDS fstab"; else #thus only default backends are in BACKENDS and #they don't have prerequisites, don't remove { echo "$as_me:$LINENO: WARNING: not building backend fstab, prerequisite missing" >&5 echo "$as_me: WARNING: not building backend fstab, prerequisite missing" >&2;} fi else #removed backend out of BACKENDS list BACKENDS=$(echo "$BACKENDS" | sed 's/[:space:]*fstab//') fi fi for ac_header in pwd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ----------------------------------------- ## ## Report this to http://bugs.libelektra.org ## ## ----------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF cat >>confdefs.h <<\_ACEOF #define HAVE_PWD_H 1 _ACEOF elektra_pwd_h=yes fi done TESTBACKENDS="$TESTBACKENDS passwd check: test x$elektra_pwd_h = xyes, default: NO" if test "NO" == YES; then BACKENDS="$BACKENDS passwd"; fi # Check whether --enable-passwd was given. if test "${enable_passwd+set}" = set; then enableval=$enable_passwd; if test "$enableval" = yes; then if test x$elektra_pwd_h = xyes; then BACKENDS="$BACKENDS passwd"; else #thus only default backends are in BACKENDS and #they don't have prerequisites, don't remove { echo "$as_me:$LINENO: WARNING: not building backend passwd, prerequisite missing" >&5 echo "$as_me: WARNING: not building backend passwd, prerequisite missing" >&2;} fi else #removed backend out of BACKENDS list BACKENDS=$(echo "$BACKENDS" | sed 's/[:space:]*passwd//') fi fi # daemon depends on struct ucred in ipc.c elektra_ucred=no { echo "$as_me:$LINENO: checking for struct ucred.pid" >&5 echo $ECHO_N "checking for struct ucred.pid... $ECHO_C" >&6; } if test "${ac_cv_member_struct_ucred_pid+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { static struct ucred ac_aggr; if (ac_aggr.pid) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_member_struct_ucred_pid=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { static struct ucred ac_aggr; if (sizeof ac_aggr.pid) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_member_struct_ucred_pid=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_member_struct_ucred_pid=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_member_struct_ucred_pid" >&5 echo "${ECHO_T}$ac_cv_member_struct_ucred_pid" >&6; } if test $ac_cv_member_struct_ucred_pid = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_UCRED_PID 1 _ACEOF elektra_ucred=yes else elektra_ucred=no fi TESTBACKENDS="$TESTBACKENDS daemon check: test x$elektra_ucred = xyes, default: NO" if test "NO" == YES; then BACKENDS="$BACKENDS daemon"; fi # Check whether --enable-daemon was given. if test "${enable_daemon+set}" = set; then enableval=$enable_daemon; if test "$enableval" = yes; then if test x$elektra_ucred = xyes; then BACKENDS="$BACKENDS daemon"; else #thus only default backends are in BACKENDS and #they don't have prerequisites, don't remove { echo "$as_me:$LINENO: WARNING: not building backend daemon, prerequisite missing" >&5 echo "$as_me: WARNING: not building backend daemon, prerequisite missing" >&2;} fi else #removed backend out of BACKENDS list BACKENDS=$(echo "$BACKENDS" | sed 's/[:space:]*daemon//') fi fi backend_static_libs= for backend in $BACKENDS; do backend_static_libs="$backend_static_libs ../backends/${backend}/libelektra-${backend}.a" done # # Bindings enable and disable logic. # BINDINGS="" # $1 is the binding name # $2 is the check for prerequisite # $3 is the default value YES or NO if test "YES" == YES; then BINDINGS="$BINDINGS cpp"; fi # Check whether --enable-cpp was given. if test "${enable_cpp+set}" = set; then enableval=$enable_cpp; if test "$enableval" = yes; then if true; then BINDINGS="$BINDINGS cpp"; else #thus only default bindings are in BINDINGS and #they don't have prerequisites, don't remove { echo "$as_me:$LINENO: WARNING: not building binding cpp, prerequisite missing" >&5 echo "$as_me: WARNING: not building binding cpp, prerequisite missing" >&2;} fi else #removed bindings out of BINDINGS list BINDINGS=$(echo "$BINDINGS" | sed 's/[:space:]*cpp//') fi fi #AC_CHECK_PROGS(SCHEME, scheme, false) #ALLOW_BINDING(scheme, [test "x$SCHEME" = xscheme], NO) for ac_prog in python do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_PYTHON+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$PYTHON"; then ac_cv_prog_PYTHON="$PYTHON" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_PYTHON="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi PYTHON=$ac_cv_prog_PYTHON if test -n "$PYTHON"; then { echo "$as_me:$LINENO: result: $PYTHON" >&5 echo "${ECHO_T}$PYTHON" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$PYTHON" && break done test -n "$PYTHON" || PYTHON="false" if test "NO" == YES; then BINDINGS="$BINDINGS python"; fi # Check whether --enable-python was given. if test "${enable_python+set}" = set; then enableval=$enable_python; if test "$enableval" = yes; then if test "x$PYTHON" = xpython; then BINDINGS="$BINDINGS python"; else #thus only default bindings are in BINDINGS and #they don't have prerequisites, don't remove { echo "$as_me:$LINENO: WARNING: not building binding python, prerequisite missing" >&5 echo "$as_me: WARNING: not building binding python, prerequisite missing" >&2;} fi else #removed bindings out of BINDINGS list BINDINGS=$(echo "$BINDINGS" | sed 's/[:space:]*python//') fi fi # inspired from daemontools for ac_header in signal.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ----------------------------------------- ## ## Report this to http://bugs.libelektra.org ## ## ----------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { sigset_t ss; sigemptyset(&ss); sigaddset(&ss,SIGCHLD); sigprocmask(SIG_SETMASK,&ss,(sigset_t *) 0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then cat >>confdefs.h <<\_ACEOF #define HASSIGPROCMASK _ACEOF else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { int sig; struct sigaction sa;; sa.sa_handler = f; sa.sa_flags = 0; sigemptyset(&sa.sa_mask); sigaction(sig,&sa,(struct sigaction *) 0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then cat >>confdefs.h <<\_ACEOF #define HASSIGACTION _ACEOF else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi done # # Checks for typedefs, structures, and compiler characteristics. # { echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; } if test "${ac_cv_c_const+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset cs; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_const=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 echo "${ECHO_T}$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then cat >>confdefs.h <<\_ACEOF #define const _ACEOF fi { echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; } if test "${ac_cv_type_uid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "uid_t" >/dev/null 2>&1; then ac_cv_type_uid_t=yes else ac_cv_type_uid_t=no fi rm -f conftest* fi { echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 echo "${ECHO_T}$ac_cv_type_uid_t" >&6; } if test $ac_cv_type_uid_t = no; then cat >>confdefs.h <<\_ACEOF #define uid_t int _ACEOF cat >>confdefs.h <<\_ACEOF #define gid_t int _ACEOF fi { echo "$as_me:$LINENO: checking for gid_t" >&5 echo $ECHO_N "checking for gid_t... $ECHO_C" >&6; } if test "${ac_cv_type_gid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default typedef gid_t ac__type_new_; int main () { if ((ac__type_new_ *) 0) return 0; if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_type_gid_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_gid_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_type_gid_t" >&5 echo "${ECHO_T}$ac_cv_type_gid_t" >&6; } if test $ac_cv_type_gid_t = yes; then : else cat >>confdefs.h <<_ACEOF #define gid_t int _ACEOF fi { echo "$as_me:$LINENO: checking for time_t" >&5 echo $ECHO_N "checking for time_t... $ECHO_C" >&6; } if test "${ac_cv_type_time_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default typedef time_t ac__type_new_; int main () { if ((ac__type_new_ *) 0) return 0; if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_type_time_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_time_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5 echo "${ECHO_T}$ac_cv_type_time_t" >&6; } if test $ac_cv_type_time_t = yes; then : else cat >>confdefs.h <<_ACEOF #define time_t unsigned long _ACEOF fi { echo "$as_me:$LINENO: checking for mode_t" >&5 echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; } if test "${ac_cv_type_mode_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default typedef mode_t ac__type_new_; int main () { if ((ac__type_new_ *) 0) return 0; if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_type_mode_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_mode_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 echo "${ECHO_T}$ac_cv_type_mode_t" >&6; } if test $ac_cv_type_mode_t = yes; then : else cat >>confdefs.h <<_ACEOF #define mode_t int _ACEOF fi { echo "$as_me:$LINENO: checking for off_t" >&5 echo $ECHO_N "checking for off_t... $ECHO_C" >&6; } if test "${ac_cv_type_off_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default typedef off_t ac__type_new_; int main () { if ((ac__type_new_ *) 0) return 0; if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_type_off_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_off_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 echo "${ECHO_T}$ac_cv_type_off_t" >&6; } if test $ac_cv_type_off_t = yes; then : else cat >>confdefs.h <<_ACEOF #define off_t long int _ACEOF fi { echo "$as_me:$LINENO: checking for size_t" >&5 echo $ECHO_N "checking for size_t... $ECHO_C" >&6; } if test "${ac_cv_type_size_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default typedef size_t ac__type_new_; int main () { if ((ac__type_new_ *) 0) return 0; if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_type_size_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_size_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 echo "${ECHO_T}$ac_cv_type_size_t" >&6; } if test $ac_cv_type_size_t = yes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi { echo "$as_me:$LINENO: checking for ssize_t" >&5 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; } if test "${ac_cv_type_ssize_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default typedef ssize_t ac__type_new_; int main () { if ((ac__type_new_ *) 0) return 0; if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_type_ssize_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_ssize_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; } if test $ac_cv_type_ssize_t = yes; then : else cat >>confdefs.h <<_ACEOF #define ssize_t int _ACEOF fi { echo "$as_me:$LINENO: checking For a working getopt" >&5 echo $ECHO_N "checking For a working getopt... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { int opt; char** myargv; opt=getopt(1,myargv,"a"); if (optind == 2) {opt = 3;}; ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then cat >>confdefs.h <<\_ACEOF #define HASGETOPT _ACEOF { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext # # Checks for library functions. # #AC_FUNC_MALLOC #AC_FUNC_MEMCMP #AC_FUNC_REALLOC for ac_header in unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ----------------------------------------- ## ## Report this to http://bugs.libelektra.org ## ## ----------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { echo "$as_me:$LINENO: checking for working chown" >&5 echo $ECHO_N "checking for working chown... $ECHO_C" >&6; } if test "${ac_cv_func_chown_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_chown_works=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include int main () { char *f = "conftest.chown"; struct stat before, after; if (creat (f, 0600) < 0) return 1; if (stat (f, &before) < 0) return 1; if (chown (f, (uid_t) -1, (gid_t) -1) == -1) return 1; if (stat (f, &after) < 0) return 1; return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_chown_works=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_chown_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.chown fi { echo "$as_me:$LINENO: result: $ac_cv_func_chown_works" >&5 echo "${ECHO_T}$ac_cv_func_chown_works" >&6; } if test $ac_cv_func_chown_works = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_CHOWN 1 _ACEOF fi { echo "$as_me:$LINENO: checking whether closedir returns void" >&5 echo $ECHO_N "checking whether closedir returns void... $ECHO_C" >&6; } if test "${ac_cv_func_closedir_void+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_closedir_void=yes else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header_dirent> #ifndef __cplusplus int closedir (); #endif int main () { return closedir (opendir (".")) != 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_closedir_void=no else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_closedir_void=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { echo "$as_me:$LINENO: result: $ac_cv_func_closedir_void" >&5 echo "${ECHO_T}$ac_cv_func_closedir_void" >&6; } if test $ac_cv_func_closedir_void = yes; then cat >>confdefs.h <<\_ACEOF #define CLOSEDIR_VOID 1 _ACEOF fi # getmntent is in the standard C library on UNICOS, in -lsun on Irix 4, # -lseq on Dynix/PTX, -lgen on Unixware. { echo "$as_me:$LINENO: checking for library containing getmntent" >&5 echo $ECHO_N "checking for library containing getmntent... $ECHO_C" >&6; } if test "${ac_cv_search_getmntent+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char getmntent (); int main () { return getmntent (); ; return 0; } _ACEOF for ac_lib in '' sun seq gen; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_search_getmntent=$ac_res else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext if test "${ac_cv_search_getmntent+set}" = set; then break fi done if test "${ac_cv_search_getmntent+set}" = set; then : else ac_cv_search_getmntent=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_search_getmntent" >&5 echo "${ECHO_T}$ac_cv_search_getmntent" >&6; } ac_res=$ac_cv_search_getmntent if test "$ac_res" != no; then test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" ac_cv_func_getmntent=yes cat >>confdefs.h <<\_ACEOF #define HAVE_GETMNTENT 1 _ACEOF else ac_cv_func_getmntent=no fi for ac_header in stdlib.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ----------------------------------------- ## ## Report this to http://bugs.libelektra.org ## ## ----------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { echo "$as_me:$LINENO: checking for GNU libc compatible malloc" >&5 echo $ECHO_N "checking for GNU libc compatible malloc... $ECHO_C" >&6; } if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_malloc_0_nonnull=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if defined STDC_HEADERS || defined HAVE_STDLIB_H # include #else char *malloc (); #endif int main () { return ! malloc (0); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_malloc_0_nonnull=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_malloc_0_nonnull=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { echo "$as_me:$LINENO: result: $ac_cv_func_malloc_0_nonnull" >&5 echo "${ECHO_T}$ac_cv_func_malloc_0_nonnull" >&6; } if test $ac_cv_func_malloc_0_nonnull = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_MALLOC 1 _ACEOF else cat >>confdefs.h <<\_ACEOF #define HAVE_MALLOC 0 _ACEOF case " $LIBOBJS " in *" malloc.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS malloc.$ac_objext" ;; esac cat >>confdefs.h <<\_ACEOF #define malloc rpl_malloc _ACEOF fi { echo "$as_me:$LINENO: checking for working memcmp" >&5 echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6; } if test "${ac_cv_func_memcmp_working+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_memcmp_working=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { /* Some versions of memcmp are not 8-bit clean. */ char c0 = '\100', c1 = '\200', c2 = '\201'; if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) return 1; /* The Next x86 OpenStep bug shows up only when comparing 16 bytes or more and with at least one buffer not starting on a 4-byte boundary. William Lewis provided this test program. */ { char foo[21]; char bar[21]; int i; for (i = 0; i < 4; i++) { char *a = foo + i; char *b = bar + i; strcpy (a, "--------01111111"); strcpy (b, "--------10000000"); if (memcmp (a, b, 16) >= 0) return 1; } return 0; } ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_memcmp_working=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_memcmp_working=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5 echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6; } test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in *" memcmp.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;; esac for ac_header in stdlib.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ----------------------------------------- ## ## Report this to http://bugs.libelektra.org ## ## ----------------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { echo "$as_me:$LINENO: checking for GNU libc compatible realloc" >&5 echo $ECHO_N "checking for GNU libc compatible realloc... $ECHO_C" >&6; } if test "${ac_cv_func_realloc_0_nonnull+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_realloc_0_nonnull=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if defined STDC_HEADERS || defined HAVE_STDLIB_H # include #else char *realloc (); #endif int main () { return ! realloc (0, 0); ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_realloc_0_nonnull=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_realloc_0_nonnull=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { echo "$as_me:$LINENO: result: $ac_cv_func_realloc_0_nonnull" >&5 echo "${ECHO_T}$ac_cv_func_realloc_0_nonnull" >&6; } if test $ac_cv_func_realloc_0_nonnull = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_REALLOC 1 _ACEOF else cat >>confdefs.h <<\_ACEOF #define HAVE_REALLOC 0 _ACEOF case " $LIBOBJS " in *" realloc.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS realloc.$ac_objext" ;; esac cat >>confdefs.h <<\_ACEOF #define realloc rpl_realloc _ACEOF fi { echo "$as_me:$LINENO: checking whether lstat dereferences a symlink specified with a trailing slash" >&5 echo $ECHO_N "checking whether lstat dereferences a symlink specified with a trailing slash... $ECHO_C" >&6; } if test "${ac_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else rm -f conftest.sym conftest.file echo >conftest.file if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then if test "$cross_compiling" = yes; then ac_cv_func_lstat_dereferences_slashed_symlink=no else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { struct stat sbuf; /* Linux will dereference the symlink and fail. That is better in the sense that it means we will not have to compile and use the lstat wrapper. */ return lstat ("conftest.sym/", &sbuf) == 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_lstat_dereferences_slashed_symlink=yes else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi else # If the `ln -s' command failed, then we probably don't even # have an lstat function. ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f conftest.sym conftest.file fi { echo "$as_me:$LINENO: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 echo "${ECHO_T}$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && cat >>confdefs.h <<_ACEOF #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 _ACEOF if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then case " $LIBOBJS " in *" lstat.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS lstat.$ac_objext" ;; esac fi { echo "$as_me:$LINENO: checking whether stat accepts an empty string" >&5 echo $ECHO_N "checking whether stat accepts an empty string... $ECHO_C" >&6; } if test "${ac_cv_func_stat_empty_string_bug+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_func_stat_empty_string_bug=yes else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int main () { struct stat sbuf; return stat ("", &sbuf) == 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_func_stat_empty_string_bug=no else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_func_stat_empty_string_bug=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { echo "$as_me:$LINENO: result: $ac_cv_func_stat_empty_string_bug" >&5 echo "${ECHO_T}$ac_cv_func_stat_empty_string_bug" >&6; } if test $ac_cv_func_stat_empty_string_bug = yes; then case " $LIBOBJS " in *" stat.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS stat.$ac_objext" ;; esac cat >>confdefs.h <<_ACEOF #define HAVE_STAT_EMPTY_STRING_BUG 1 _ACEOF fi #old version for ac_func in memset nl_langinfo setenv setlocale strcasecmp strchr strrchr index rindex strtol ctime_r getuid getgid sigprocmask sigaction do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done #for testing suite for ac_func in clearenv setenv do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done #generated by autoscan, TODO. merge together for ac_func in ftruncate getmntent gettimeofday memmove memset mkdir nl_langinfo putenv rmdir setenv setlocale socket strcasecmp strchr strndup strrchr strstr strtol do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done # # Output # ac_config_files="$ac_config_files Makefile" ac_config_files="$ac_config_files elektra.spec" ac_config_files="$ac_config_files src/Makefile src/libhelper/Makefile src/libloader/Makefile src/libelektra/Makefile src/libelektra/exportobjects.sh src/libelektratools/Makefile src/preload/Makefile src/kdb/Makefile src/backends/Makefile src/backends/berkeleydb/Makefile src/backends/filesys/Makefile src/backends/fstab/Makefile src/backends/passwd/Makefile src/backends/hosts/Makefile src/backends/gconf/Makefile src/backends/template/Makefile src/backends/ini/Makefile src/backends/daemon/Makefile src/bindings/Makefile src/bindings/cpp/Makefile src/bindings/cpp/tests/Makefile src/bindings/python/Makefile src/include/Makefile doc/Makefile doc/images/Makefile doc/standards/Makefile scripts/Makefile xmlschema/Makefile elektra.pc elektratools.pc elektracpp.pc benchmarks/Makefile examples/Makefile tests/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && { echo "$as_me:$LINENO: updating cache $cache_file" >&5 echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${DEBUG_TRUE}" && test -z "${DEBUG_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"DEBUG\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"DEBUG\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${EXPERIMENTAL_TRUE}" && test -z "${EXPERIMENTAL_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"EXPERIMENTAL\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"EXPERIMENTAL\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${VALGRINDTESTS_TRUE}" && test -z "${VALGRINDTESTS_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"VALGRINDTESTS\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"VALGRINDTESTS\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_XSL_TRUE}" && test -z "${HAVE_XSL_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"HAVE_XSL\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"HAVE_XSL\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_MAN2HTML_TRUE}" && test -z "${HAVE_MAN2HTML_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"HAVE_MAN2HTML\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"HAVE_MAN2HTML\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_DOXYGEN_TRUE}" && test -z "${HAVE_DOXYGEN_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"HAVE_DOXYGEN\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"HAVE_DOXYGEN\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_LIBLTDL_TRUE}" && test -z "${HAVE_LIBLTDL_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"HAVE_LIBLTDL\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"HAVE_LIBLTDL\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${HAVE_XML_TRUE}" && test -z "${HAVE_XML_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"HAVE_XML\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"HAVE_XML\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) as_nl=' ' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 # Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by elektra $as_me 0.7.1, which was generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ elektra config.status 0.7.1 configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2006 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header { echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; };; --help | --hel | -h ) echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 CONFIG_SHELL=$SHELL export CONFIG_SHELL exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "src/include/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "elektra.spec") CONFIG_FILES="$CONFIG_FILES elektra.spec" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "src/libhelper/Makefile") CONFIG_FILES="$CONFIG_FILES src/libhelper/Makefile" ;; "src/libloader/Makefile") CONFIG_FILES="$CONFIG_FILES src/libloader/Makefile" ;; "src/libelektra/Makefile") CONFIG_FILES="$CONFIG_FILES src/libelektra/Makefile" ;; "src/libelektra/exportobjects.sh") CONFIG_FILES="$CONFIG_FILES src/libelektra/exportobjects.sh" ;; "src/libelektratools/Makefile") CONFIG_FILES="$CONFIG_FILES src/libelektratools/Makefile" ;; "src/preload/Makefile") CONFIG_FILES="$CONFIG_FILES src/preload/Makefile" ;; "src/kdb/Makefile") CONFIG_FILES="$CONFIG_FILES src/kdb/Makefile" ;; "src/backends/Makefile") CONFIG_FILES="$CONFIG_FILES src/backends/Makefile" ;; "src/backends/berkeleydb/Makefile") CONFIG_FILES="$CONFIG_FILES src/backends/berkeleydb/Makefile" ;; "src/backends/filesys/Makefile") CONFIG_FILES="$CONFIG_FILES src/backends/filesys/Makefile" ;; "src/backends/fstab/Makefile") CONFIG_FILES="$CONFIG_FILES src/backends/fstab/Makefile" ;; "src/backends/passwd/Makefile") CONFIG_FILES="$CONFIG_FILES src/backends/passwd/Makefile" ;; "src/backends/hosts/Makefile") CONFIG_FILES="$CONFIG_FILES src/backends/hosts/Makefile" ;; "src/backends/gconf/Makefile") CONFIG_FILES="$CONFIG_FILES src/backends/gconf/Makefile" ;; "src/backends/template/Makefile") CONFIG_FILES="$CONFIG_FILES src/backends/template/Makefile" ;; "src/backends/ini/Makefile") CONFIG_FILES="$CONFIG_FILES src/backends/ini/Makefile" ;; "src/backends/daemon/Makefile") CONFIG_FILES="$CONFIG_FILES src/backends/daemon/Makefile" ;; "src/bindings/Makefile") CONFIG_FILES="$CONFIG_FILES src/bindings/Makefile" ;; "src/bindings/cpp/Makefile") CONFIG_FILES="$CONFIG_FILES src/bindings/cpp/Makefile" ;; "src/bindings/cpp/tests/Makefile") CONFIG_FILES="$CONFIG_FILES src/bindings/cpp/tests/Makefile" ;; "src/bindings/python/Makefile") CONFIG_FILES="$CONFIG_FILES src/bindings/python/Makefile" ;; "src/include/Makefile") CONFIG_FILES="$CONFIG_FILES src/include/Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "doc/images/Makefile") CONFIG_FILES="$CONFIG_FILES doc/images/Makefile" ;; "doc/standards/Makefile") CONFIG_FILES="$CONFIG_FILES doc/standards/Makefile" ;; "scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;; "xmlschema/Makefile") CONFIG_FILES="$CONFIG_FILES xmlschema/Makefile" ;; "elektra.pc") CONFIG_FILES="$CONFIG_FILES elektra.pc" ;; "elektratools.pc") CONFIG_FILES="$CONFIG_FILES elektratools.pc" ;; "elektracpp.pc") CONFIG_FILES="$CONFIG_FILES elektracpp.pc" ;; "benchmarks/Makefile") CONFIG_FILES="$CONFIG_FILES benchmarks/Makefile" ;; "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;; "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } # # Set up the sed scripts for CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "$CONFIG_FILES"; then _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF SHELL!$SHELL$ac_delim PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim PACKAGE_NAME!$PACKAGE_NAME$ac_delim PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim PACKAGE_STRING!$PACKAGE_STRING$ac_delim PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim exec_prefix!$exec_prefix$ac_delim prefix!$prefix$ac_delim program_transform_name!$program_transform_name$ac_delim bindir!$bindir$ac_delim sbindir!$sbindir$ac_delim libexecdir!$libexecdir$ac_delim datarootdir!$datarootdir$ac_delim datadir!$datadir$ac_delim sysconfdir!$sysconfdir$ac_delim sharedstatedir!$sharedstatedir$ac_delim localstatedir!$localstatedir$ac_delim includedir!$includedir$ac_delim oldincludedir!$oldincludedir$ac_delim docdir!$docdir$ac_delim infodir!$infodir$ac_delim htmldir!$htmldir$ac_delim dvidir!$dvidir$ac_delim pdfdir!$pdfdir$ac_delim psdir!$psdir$ac_delim libdir!$libdir$ac_delim localedir!$localedir$ac_delim mandir!$mandir$ac_delim DEFS!$DEFS$ac_delim ECHO_C!$ECHO_C$ac_delim ECHO_N!$ECHO_N$ac_delim ECHO_T!$ECHO_T$ac_delim LIBS!$LIBS$ac_delim build_alias!$build_alias$ac_delim host_alias!$host_alias$ac_delim target_alias!$target_alias$ac_delim KDB_VERSION!$KDB_VERSION$ac_delim KDB_VERSION_MAJORMINOR!$KDB_VERSION_MAJORMINOR$ac_delim KDB_VERSION_MAJOR!$KDB_VERSION_MAJOR$ac_delim KDB_VERSION_MINOR!$KDB_VERSION_MINOR$ac_delim KDB_VERSION_MICRO!$KDB_VERSION_MICRO$ac_delim PACKAGE_URL!$PACKAGE_URL$ac_delim ELEKTRA_VERSION_API!$ELEKTRA_VERSION_API$ac_delim ELEKTRATOOLS_VERSION_API!$ELEKTRATOOLS_VERSION_API$ac_delim BACKEND_VERSION_API!$BACKEND_VERSION_API$ac_delim build!$build$ac_delim build_cpu!$build_cpu$ac_delim build_vendor!$build_vendor$ac_delim build_os!$build_os$ac_delim host!$host$ac_delim host_cpu!$host_cpu$ac_delim host_vendor!$host_vendor$ac_delim host_os!$host_os$ac_delim target!$target$ac_delim target_cpu!$target_cpu$ac_delim target_vendor!$target_vendor$ac_delim target_os!$target_os$ac_delim INSTALL!$INSTALL$ac_delim INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim INSTALL_DATA!$INSTALL_DATA$ac_delim CYGPATH_W!$CYGPATH_W$ac_delim PACKAGE!$PACKAGE$ac_delim VERSION!$VERSION$ac_delim ACLOCAL!$ACLOCAL$ac_delim AUTOCONF!$AUTOCONF$ac_delim AUTOMAKE!$AUTOMAKE$ac_delim AUTOHEADER!$AUTOHEADER$ac_delim MAKEINFO!$MAKEINFO$ac_delim install_sh!$install_sh$ac_delim STRIP!$STRIP$ac_delim INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim mkdir_p!$mkdir_p$ac_delim AWK!$AWK$ac_delim SET_MAKE!$SET_MAKE$ac_delim am__leading_dot!$am__leading_dot$ac_delim AMTAR!$AMTAR$ac_delim am__tar!$am__tar$ac_delim am__untar!$am__untar$ac_delim CC!$CC$ac_delim CFLAGS!$CFLAGS$ac_delim LDFLAGS!$LDFLAGS$ac_delim CPPFLAGS!$CPPFLAGS$ac_delim ac_ct_CC!$ac_ct_CC$ac_delim EXEEXT!$EXEEXT$ac_delim OBJEXT!$OBJEXT$ac_delim DEPDIR!$DEPDIR$ac_delim am__include!$am__include$ac_delim am__quote!$am__quote$ac_delim AMDEP_TRUE!$AMDEP_TRUE$ac_delim AMDEP_FALSE!$AMDEP_FALSE$ac_delim AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim CCDEPMODE!$CCDEPMODE$ac_delim am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim CPP!$CPP$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` if test -n "$ac_eof"; then ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` ac_eof=`expr $ac_eof + 1` fi cat >>$CONFIG_STATUS <<_ACEOF cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof /@[a-zA-Z_][a-zA-Z_0-9]*@/!b _ACEOF sed ' s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g s/^/s,@/; s/!/@,|#_!!_#|/ :n t n s/'"$ac_delim"'$/,g/; t s/$/\\/; p N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n ' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF CEOF$ac_eof _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF GREP!$GREP$ac_delim EGREP!$EGREP$ac_delim DEBUG_TRUE!$DEBUG_TRUE$ac_delim DEBUG_FALSE!$DEBUG_FALSE$ac_delim EXPERIMENTAL_TRUE!$EXPERIMENTAL_TRUE$ac_delim EXPERIMENTAL_FALSE!$EXPERIMENTAL_FALSE$ac_delim VALGRIND!$VALGRIND$ac_delim VALGRINDTESTS_TRUE!$VALGRINDTESTS_TRUE$ac_delim VALGRINDTESTS_FALSE!$VALGRINDTESTS_FALSE$ac_delim LCOV!$LCOV$ac_delim GENHTML!$GENHTML$ac_delim CSTDFLAGS!$CSTDFLAGS$ac_delim COPTFLAGS!$COPTFLAGS$ac_delim CDBGFLAGS!$CDBGFLAGS$ac_delim CXXSTDFLAGS!$CXXSTDFLAGS$ac_delim CXXOPTFLAGS!$CXXOPTFLAGS$ac_delim CXXDBGFLAGS!$CXXDBGFLAGS$ac_delim ulibdir!$ulibdir$ac_delim backenddir!$backenddir$ac_delim hlvlbackenddir!$hlvlbackenddir$ac_delim develdocdir!$develdocdir$ac_delim default_docbook!$default_docbook$ac_delim default_backend!$default_backend$ac_delim default_dbackend!$default_dbackend$ac_delim CXX!$CXX$ac_delim CXXFLAGS!$CXXFLAGS$ac_delim ac_ct_CXX!$ac_ct_CXX$ac_delim CXXDEPMODE!$CXXDEPMODE$ac_delim am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim LN_S!$LN_S$ac_delim SED!$SED$ac_delim NM!$NM$ac_delim PKG_CONFIG!$PKG_CONFIG$ac_delim xsltproc!$xsltproc$ac_delim dbroot!$dbroot$ac_delim HAVE_XSL_TRUE!$HAVE_XSL_TRUE$ac_delim HAVE_XSL_FALSE!$HAVE_XSL_FALSE$ac_delim man2html!$man2html$ac_delim HAVE_MAN2HTML_TRUE!$HAVE_MAN2HTML_TRUE$ac_delim HAVE_MAN2HTML_FALSE!$HAVE_MAN2HTML_FALSE$ac_delim doxygen!$doxygen$ac_delim HAVE_DOXYGEN_TRUE!$HAVE_DOXYGEN_TRUE$ac_delim HAVE_DOXYGEN_FALSE!$HAVE_DOXYGEN_FALSE$ac_delim ECHO!$ECHO$ac_delim AR!$AR$ac_delim RANLIB!$RANLIB$ac_delim DSYMUTIL!$DSYMUTIL$ac_delim NMEDIT!$NMEDIT$ac_delim CXXCPP!$CXXCPP$ac_delim F77!$F77$ac_delim FFLAGS!$FFLAGS$ac_delim ac_ct_F77!$ac_ct_F77$ac_delim LIBTOOL!$LIBTOOL$ac_delim LIBTOOL_DEPS!$LIBTOOL_DEPS$ac_delim subdirs!$subdirs$ac_delim LIBLTDL!$LIBLTDL$ac_delim LTDLINCL!$LTDLINCL$ac_delim HAVE_LIBLTDL_TRUE!$HAVE_LIBLTDL_TRUE$ac_delim HAVE_LIBLTDL_FALSE!$HAVE_LIBLTDL_FALSE$ac_delim LIBICONV!$LIBICONV$ac_delim LTLIBICONV!$LTLIBICONV$ac_delim XML2_CONFIG!$XML2_CONFIG$ac_delim XML_CPPFLAGS!$XML_CPPFLAGS$ac_delim XML_LIBS!$XML_LIBS$ac_delim HAVE_XML_TRUE!$HAVE_XML_TRUE$ac_delim HAVE_XML_FALSE!$HAVE_XML_FALSE$ac_delim elektratools!$elektratools$ac_delim gconf_CFLAGS!$gconf_CFLAGS$ac_delim gconf_LIBS!$gconf_LIBS$ac_delim BACKENDS!$BACKENDS$ac_delim privatelibs!$privatelibs$ac_delim backend_static_libs!$backend_static_libs$ac_delim PYTHON!$PYTHON$ac_delim BINDINGS!$BINDINGS$ac_delim LIBOBJS!$LIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 77; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` if test -n "$ac_eof"; then ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` ac_eof=`expr $ac_eof + 1` fi cat >>$CONFIG_STATUS <<_ACEOF cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof /@[a-zA-Z_][a-zA-Z_0-9]*@/!b end _ACEOF sed ' s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g s/^/s,@/; s/!/@,|#_!!_#|/ :n t n s/'"$ac_delim"'$/,g/; t s/$/\\/; p N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n ' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF :end s/|#_!!_#|//g CEOF$ac_eof _ACEOF # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/ s/:*\${srcdir}:*/:/ s/:*@srcdir@:*/:/ s/^\([^=]*=[ ]*\):*/\1/ s/:*$// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF fi # test -n "$CONFIG_FILES" for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 echo "$as_me: error: Invalid tag $ac_tag." >&2;} { (exit 1); exit 1; }; };; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 echo "$as_me: error: cannot find input file: $ac_f" >&2;} { (exit 1); exit 1; }; };; esac ac_file_inputs="$ac_file_inputs $ac_f" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input="Generated from "`IFS=: echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} fi case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin";; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir="$ac_dir" case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= case `sed -n '/datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p ' $ac_file_inputs` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s&@configure_input@&$configure_input&;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t $ac_datarootdir_hack " $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out"; rm -f "$tmp/out";; *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; esac ;; :H) # # CONFIG_HEADER # _ACEOF # Transform confdefs.h into a sed script `conftest.defines', that # substitutes the proper values into config.h.in to produce config.h. rm -f conftest.defines conftest.tail # First, append a space to every undef/define line, to ease matching. echo 's/$/ /' >conftest.defines # Then, protect against being on the right side of a sed subst, or in # an unquoted here document, in config.status. If some macros were # called several times there might be several #defines for the same # symbol, which is useless. But do not sort them, since the last # AC_DEFINE must be honored. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* # These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where # NAME is the cpp macro being defined, VALUE is the value it is being given. # PARAMS is the parameter list in the macro definition--in most cases, it's # just an empty string. ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' ac_dB='\\)[ (].*,\\1define\\2' ac_dC=' ' ac_dD=' ,' uniq confdefs.h | sed -n ' t rset :rset s/^[ ]*#[ ]*define[ ][ ]*// t ok d :ok s/[\\&,]/\\&/g s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p ' >>conftest.defines # Remove the space that was appended to ease matching. # Then replace #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. # (The regexp can be short, since the line contains either #define or #undef.) echo 's/ $// s,^[ #]*u.*,/* & */,' >>conftest.defines # Break up conftest.defines: ac_max_sed_lines=50 # First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" # Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" # Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" # et cetera. ac_in='$ac_file_inputs' ac_out='"$tmp/out1"' ac_nxt='"$tmp/out2"' while : do # Write a here document: cat >>$CONFIG_STATUS <<_ACEOF # First, check the format of the line: cat >"\$tmp/defines.sed" <<\\CEOF /^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def /^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def b :def _ACEOF sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail grep . conftest.tail >/dev/null || break rm -f conftest.defines mv conftest.tail conftest.defines done rm -f conftest.defines conftest.tail echo "ac_result=$ac_in" >>$CONFIG_STATUS cat >>$CONFIG_STATUS <<\_ACEOF if test x"$ac_file" != x-; then echo "/* $configure_input */" >"$tmp/config.h" cat "$ac_result" >>"$tmp/config.h" if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else rm -f $ac_file mv "$tmp/config.h" $ac_file fi else echo "/* $configure_input */" cat "$ac_result" fi rm -f "$tmp/out12" # Compute $ac_file's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $ac_file | $ac_file:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $ac_file" >`$as_dirname -- $ac_file || $as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X$ac_file : 'X\(//\)[^/]' \| \ X$ac_file : 'X\(//\)$' \| \ X$ac_file : 'X\(/\)' \| . 2>/dev/null || echo X$ac_file | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir=$dirpart/$fdir case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; esac done # for ac_tag { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi # # CONFIG_SUBDIRS section. # if test "$no_recursion" != yes; then # Remove --cache-file and --srcdir arguments so they do not pile up. ac_sub_configure_args= ac_prev= eval "set x $ac_configure_args" shift for ac_arg do if test -n "$ac_prev"; then ac_prev= continue fi case $ac_arg in -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ | --c=*) ;; --config-cache | -C) ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) ;; *) case $ac_arg in *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac ac_sub_configure_args="$ac_sub_configure_args '$ac_arg'" ;; esac done # Always prepend --prefix to ensure using the same prefix # in subdir configurations. ac_arg="--prefix=$prefix" case $ac_arg in *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" # Pass --silent if test "$silent" = yes; then ac_sub_configure_args="--silent $ac_sub_configure_args" fi ac_popdir=`pwd` for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue # Do not complain, so a configure script can configure whichever # parts of a large source tree are present. test -d "$srcdir/$ac_dir" || continue ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" echo "$as_me:$LINENO: $ac_msg" >&5 echo "$ac_msg" >&6 { as_dir="$ac_dir" case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" # Check for guested configure; otherwise get Cygnus style configure. if test -f "$ac_srcdir/configure.gnu"; then ac_sub_configure=$ac_srcdir/configure.gnu elif test -f "$ac_srcdir/configure"; then ac_sub_configure=$ac_srcdir/configure elif test -f "$ac_srcdir/configure.in"; then # This should be Cygnus configure. ac_sub_configure=$ac_aux_dir/configure else { echo "$as_me:$LINENO: WARNING: no configuration information is in $ac_dir" >&5 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} ac_sub_configure= fi # The recursion is here. if test -n "$ac_sub_configure"; then # Make the cache file name correct relative to the subdirectory. case $cache_file in [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; *) # Relative name. ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; esac { echo "$as_me:$LINENO: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5 echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} # The eval makes quoting arguments work. eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || { { echo "$as_me:$LINENO: error: $ac_sub_configure failed for $ac_dir" >&5 echo "$as_me: error: $ac_sub_configure failed for $ac_dir" >&2;} { (exit 1); exit 1; }; } fi cd "$ac_popdir" done fi echo "--------------------------------" echo " libelektra " echo "--------------------------------" echo "" echo "Test backends: $TESTBACKENDS" echo "" echo "Compile backends: $BACKENDS" echo "Compile bindings: $BINDINGS" echo -n "Compile libelektratools: " if test "x$elektra_have_xml" = "xyes"; then echo "yes" else echo "no" fi echo "" echo "type: make && make install" elektra-0.7.1/configure.ac0000644000076400001440000004245211365511005012361 00000000000000# # Autoconf script for Elektra # # Markus Raab # Yannick Lecaillez # AC_PREREQ(2.59) AC_REVISION([$Revision$]) m4_define(VERSION_MAJOR, [0]) m4_define(VERSION_MINOR, [7]) m4_define(VERSION_MICRO, [1]) AC_INIT(elektra, VERSION_MAJOR.VERSION_MINOR.VERSION_MICRO, http://bugs.libelektra.org) AC_SUBST(KDB_VERSION, "VERSION_MAJOR.VERSION_MINOR.VERSION_MICRO") AC_SUBST(KDB_VERSION_MAJORMINOR, "VERSION_MAJOR.VERSION_MINOR") AC_SUBST(KDB_VERSION_MAJOR, "VERSION_MAJOR") AC_SUBST(KDB_VERSION_MINOR, "VERSION_MINOR") AC_SUBST(KDB_VERSION_MICRO, "VERSION_MICRO") AC_SUBST(PACKAGE_URL, [http://www.libelektra.org/]) AC_SUBST(ELEKTRA_VERSION_API, [3:0:0]) AC_SUBST(ELEKTRATOOLS_VERSION_API, [2:0:0]) AC_SUBST(BACKEND_VERSION_API, [0:0:0]) # # Os Specific checks # # get host_os variable AC_CANONICAL_SYSTEM AC_CANONICAL_TARGET dnl workaround an incompatible install on solaris INSTALL='\$(install_sh)' AC_SUBST(INSTALL) AC_CONFIG_SRCDIR([src/libelektra/kdb.c]) AM_INIT_AUTOMAKE AC_CONFIG_HEADER([src/include/config.h]) dnl select POSIX extensions, useful on solaris, for example gl_USE_SYSTEM_EXTENSIONS #Check whether we are compiling for win32 case $host_os in mingw* | pw32*) # If compiling for windows we need HAVE_WIN32 defined AC_DEFINE(HAVE_WIN32, 1, [Define if you are compiling for win32]) esac # Disable libtool static lib #AC_DISABLE_STATIC # # Compile and test specific flags. # dnl this macro is used to get the arguments supplied dnl to the configure script (./configure --enable-debug) dnl Check if we have enabled debug support. AC_MSG_CHECKING(whether to enable debugging and take control over compiler flags) AC_ARG_ENABLE(debug, [AC_HELP_STRING([--enable-debug], [turn on debug symbols and enable debug messages @<:@default=no@:>@])]) if test "x$enable_debug" = "xyes"; then AC_MSG_RESULT(yes) dnl remove the optimization flag dnl gcc has -g -O2 as default (if none given) CFLAGS=`echo "$CFLAGS" | sed -e 's/-O[0-9]*[ ]*//g'` CXXFLAGS=`echo "$CFLAGS" | sed -e 's/-O[0-9]*[ ]*//g'` CFLAGS=`echo "$CFLAGS" | sed -e 's/-g[ ]*//g'` CXXFLAGS=`echo "$CFLAGS" | sed -e 's/-g[ ]*//g'` dnl STD flags will only be included where no POSIX is required CSTDFLAGS="-std=c99 -ansi -pedantic" COPTFLAGS="-O0" CDBGFLAGS="-g -ggdb" CXXSTDFLAGS="-std=c++98 -ansi -pedantic" CXXOPTFLAGS="-O0" CXXDBGFLAGS="-g -ggdb" AC_DEFINE([DEBUG], 1,[enables debug output messages]) AC_DEFINE([VERBOSE], 0,[change here to be very verbose]) else AC_MSG_RESULT(no) AC_DEFINE([DEBUG], 0,[disable debug output messages]) AC_DEFINE([VERBOSE], 0,[disable verbose output messages]) fi #take control over FLAGS #AM_CONDITIONAL (USE_FLAGS, [test "x$enable_debug" = "xyes" ]) AM_CONDITIONAL(DEBUG, test x$enable_debug = xyes) # Enable compilation of experimental things (unfinished # backends at this time) AC_ARG_ENABLE(experimental, [AC_HELP_STRING([--enable-experimental], [Specify to compile or not experimental parts (could cause compilation failure) @<:@default=no@:>@])], [elektra_experimental=$enableval], [elektra_experimental=no]) # for the c++ binding AM_CONDITIONAL(EXPERIMENTAL, [ test "x$elektra_experimental" = "xyes" ]) # Run self-tests under valgrind? AC_MSG_CHECKING([whether self tests are run under valgrind]) AC_ARG_ENABLE(valgrind-tests, AS_HELP_STRING([--enable-valgrind-tests], [run self tests under valgrind @<:@default=no@:>@])) if test "x$enable_valgrind_tests" = "xyes"; then AC_MSG_RESULT(yes) AC_CHECK_PROGS(VALGRIND, valgrind) else AC_MSG_RESULT(no) fi AM_CONDITIONAL(VALGRINDTESTS, [ test "x$VALGRIND" != "x" ]) dnl thanks to the wine project, author: Aaron Arvey dnl Check for --enable-gcov and add appropriate flags for gcc dnl Note that these extra switches are NOT applied to the loader AC_MSG_CHECKING(whether to enable gcov) AC_ARG_ENABLE(gcov, AC_HELP_STRING([--enable-gcov], [turn on code coverage analysis tools @<:@default=no@:>@])) if test "x$enable_gcov" = "xyes"; then AC_MSG_RESULT(yes) AC_CHECK_PROGS(LCOV, lcov, false) AC_CHECK_PROGS(GENHTML, genhtml, false) CDBGFLAGS="$CDBGFLAGS -fprofile-arcs -ftest-coverage" CXXDBGFLAGS="$CXXDBGFLAGS -fprofile-arcs -ftest-coverage" LDFLAGS="$LDFLAGS -lgcov" dnl Turn off optimization so code coverage tool dnl can get accurate line numbers CFLAGS=`echo "$CFLAGS" | sed -e 's/-O[0-9]*[ ]*//g'` CXXFLAGS=`echo "$CFLAGS" | sed -e 's/-O[0-9]*[ ]*//g'` COPTFLAGS="-O0" CXXOPTFLAGS="-O0" else AC_MSG_RESULT(no) fi AC_SUBST(CSTDFLAGS) AC_SUBST(COPTFLAGS) AC_SUBST(CDBGFLAGS) AC_SUBST(CXXSTDFLAGS) AC_SUBST(CXXOPTFLAGS) AC_SUBST(CXXDBGFLAGS) # # set some custom path # # usr/lib path AC_SUBST(libdir) echo "LIBDIR=$libdir" AC_ARG_WITH(ulibdir, [AC_HELP_STRING([--with-ulibdir=ULIBDIR>], [Set the path for usr lib.])], [ulibdir=$withval], [ulibdir='${prefix}/'`basename $libdir`] ) AC_SUBST(ulibdir) # backend dlopended libraries path AC_ARG_WITH(backenddir, [AC_HELP_STRING([--with-backenddir=], [Set the path for backend libraries. @<:@LIBDIR/elektra@@:>@])], [backenddir=$withval], [backenddir='${libdir}/elektra'] ) AC_SUBST(backenddir) # high level backend dlopended libraries path AC_ARG_WITH(hlvlbackenddir, [AC_HELP_STRING([--with-hlvl-backenddir=], [Set the path for high level backend libraries. @<:@ULIBDIR/elektra@:>@])], [hlvlbackenddir=$withval], [hlvlbackenddir='${ulibdir}'] ) AC_SUBST(hlvlbackenddir) # /usr/share/doc path AC_ARG_WITH(docdir, [AC_HELP_STRING([--with-docdir=], [Set the path for documentation. @<:@DATADIR/doc/elektra@:>@])], [docdir=$withval], [docdir='${datadir}/doc/elektra'] ) AC_SUBST(docdir) # /usr/share/doc/elektra-api AC_ARG_WITH(develdocdir, [AC_HELP_STRING([--with-develdocdir=], [Set the path for elektra api documentation. @<:@DATADIR/doc/elektra-devel@:>@])], [develdocdir=$withval], [develdocdir='${datadir}/doc/elektra-devel'] ) AC_SUBST(develdocdir) # Select docbook.xsl AC_ARG_WITH(docbook, [AC_HELP_STRING([--with-docbook=], [Set path to docbook.xsl used for generate manpage. @<:@/usr/share/sgml/docbook/xsl-stylesheets@:>@])], [default_docbook=$withval], [default_docbook=/usr/share/sgml/docbook/xsl-stylesheets] ) AC_SUBST(default_docbook) # sgml/elektra- AC_ARG_WITH(kdbschema, [AC_HELP_STRING([--with-kdbschemadir=], [Set the path for elektra.xsd. DATADIR will be prefixed. @<:@/sgml/elektra-$PACKAGE_VERSION@:>@])], [kdbschemadir=$withval], [kdbschemadir="/sgml/elektra-$PACKAGE_VERSION"] ) AC_DEFINE_UNQUOTED([KDB_SCHEMA_PATH], DATADIR "${kdbschemadir}", path for elektra.xsd) # Default backend selection (Set to 'filesys' as default) AC_ARG_WITH(backend, [AC_HELP_STRING([--with-default-backend=], [Set backend elektra will be linked to. @<:@filesys@:>@])], [default_backend=$withval], [default_backend=filesys] ) AC_SUBST(default_backend) # Default daemon backend selection (Set to 'berkeleydb' as default) AC_ARG_WITH(dbackend, [AC_HELP_STRING([--with-default-dbackend=], [Set the default backend for the kdbd daemon to use. @<:@berkeleydb@:>@])], [default_dbackend=$withval], [default_dbackend=berkeleydb] ) AC_SUBST(default_dbackend) # # Checks for needed programs. # AC_PROG_CC AM_PROG_CC_C_O AC_PROG_CXX AC_PROG_LN_S AC_PROG_SED AC_CHECK_PROG(NM, nm, nm, nm-is-missing) AC_PROG_MAKE_SET PKG_PROG_PKG_CONFIG # Check needed programs for generate doc # xsltproc AC_PATH_PROG(xsltproc, xsltproc, "no") # Check if have style-sheet too if test "x$default_docbook" != "xno"; then AC_CHECK_FILE([$default_docbook/manpages/docbook.xsl], [dbroot=$default_docbook], [dbroot="no"]) if test "x$default_docbook" != "xno"; then AC_CHECK_FILE([$default_docbook/template/titlepage.xsl], [dbroot=$default_docbook], [dbroot="no"]) fi else dbroot="no" fi AC_SUBST(dbroot) AM_CONDITIONAL(HAVE_XSL, test x$xsltproc != xno -a x$dbroot != xno) # man2html AC_PATH_PROG(man2html, man2html, "no") AM_CONDITIONAL(HAVE_MAN2HTML, test x$man2html != xno) # Doxygen AC_PATH_PROG(doxygen, doxygen, "no") AM_CONDITIONAL(HAVE_DOXYGEN, test x$doxygen != xno) # # Checks for header files. # AC_HEADER_STDC AC_CHECK_HEADERS([ ctype.h stdlib.h unistd.h errno.h time.h stdio.h ]) AC_CHECK_HEADERS([ langinfo.h locale.h ]) AC_HEADER_TIME #types AC_CHECK_HEADERS([ inttypes.h limits.h ]) AC_HEADER_STDBOOL #posix files and functions (needed by filesys and libhelper) AC_HEADER_DIRENT AC_CHECK_HEADERS([ fcntl.h ]) # # libltld checks # #copied out from libsox AC_ARG_WITH(libltdl, AC_HELP_STRING([--without-libltdl], [Don't try to use libltdl for external dynamic library support])) using_libltdl=no if test "$with_libltdl" != "no"; then dnl Disable libltdl support when building only static libraries if test "$enable_shared" != "no"; then using_libltdl=yes fi dnl Force off when building on w32, we have specific code for that dnl in libloader. case $host_os in pw32* | mingw*) using_libltdl=no ;; esac dnl Force off using libltdl on targets that are know to have dnl problems. case $target in *cygwin*) using_libltdl=no ;; esac fi if test "$using_libltdl" != "no"; then AC_LIBLTDL_INSTALLABLE AC_LIBTOOL_DLOPEN fi AC_PROG_LIBTOOL AC_SUBST(LIBTOOL_DEPS) AC_CONFIG_SUBDIRS(libltdl) if test "$using_libltdl" != "no"; then AC_SUBST(LIBLTDL) AC_SUBST(LTDLINCL) AC_CHECK_HEADERS(ltdl.h, AC_DEFINE([HAVE_LIBLTDL], 1, [Define to 1 if you have libltdl]), [using_libltdl=no]) fi AM_CONDITIONAL(HAVE_LIBLTDL, test x$using_libltdl = xyes) # # Checks for libraries. # # Check for iconv # If iconv usage is enabled we need to check for iconv. # This may also result in linking against libiconv, # if the system requires this for a working iconv function. dnl Check if the user wants to enable iconv support and dnl hence enable charset conversions. dnl Default: dont enable it AC_MSG_CHECKING(whether to enable iconv) AC_ARG_ENABLE(iconv, [AC_HELP_STRING([--enable-iconv], [turns on automatic UTF-8 conversions. @<:@default=no@:>@])]) if test "x$enable_iconv" = "xyes"; then AC_MSG_RESULT(yes) AM_ICONV() else AC_MSG_RESULT(no) fi privatelibs="" # Check for libxml (Allow compilation of libelektratools) AM_PATH_XML2(, [elektra_have_xml="yes"], [elektra_have_xml="no"]) AM_CONDITIONAL(HAVE_XML, [test x$elektra_have_xml = xyes]) if test "x$elektra_have_xml" = "xyes"; then elektratools=libelektratools privatelibs=$privatelibs" -lxml2" fi AC_SUBST(elektratools) # # Backends enable and disable logic. # BACKENDS="" TESTBACKENDS="" # $1 is the backend name # $2 is the check for prerequisite # $3 is the default value YES or NO AC_DEFUN([ALLOW_BACKEND], [ TESTBACKENDS="$TESTBACKENDS $1 check: $2, default: $3" if test "$3" == YES; then BACKENDS="$BACKENDS $1"; fi AC_ARG_ENABLE([$1], AC_HELP_STRING([--enable-$1], [compile $1 backend @<:@default=$3@:>@]), [if test "$enableval" = yes; then if $2; then BACKENDS="$BACKENDS $1"; else #thus only default backends are in BACKENDS and #they don't have prerequisites, don't remove AC_MSG_WARN([not building backend $1, prerequisite missing]) fi else #removed backend out of BACKENDS list BACKENDS=$(echo "$BACKENDS" | sed 's/[[:space:]]*$1//') fi ]) ]) ALLOW_BACKEND(filesys, true, YES) ALLOW_BACKEND(hosts, true, YES) ALLOW_BACKEND(ini, true, NO) elektra_have_db=no # Check for libdb (Allow compilation of libelektra-berkeley.so) AC_CHECK_HEADERS([db.h],[ AC_CHECK_LIB([db], [db_create], [elektra_have_db="yes"]) ]) ALLOW_BACKEND(berkeleydb, [test x$elektra_have_db = xyes], NO) # Check for libGconf (Allow compilation of libelektra-gconf.so) PKG_CHECK_MODULES(gconf, gconf-2.0, [elektra_have_gconf="yes"], [elektra_have_gconf="no"]) ALLOW_BACKEND(gconf, [test x$elektra_have_gconf = xyes], NO) elektra_glibc_mntent=no AC_CHECK_HEADERS([mntent.h],[ AC_TRY_LINK([#include #include ], [ struct mntent *m; FILE *f; char *fsname, *dir, *type, *opts; int freq, passno; f=setmntent("/etc/fstab", "r"); m=getmntent(f); fsname=m->mnt_fsname; dir=m->mnt_dir; type=m->mnt_type; opts=m->mnt_opts; freq=m->mnt_freq; passno=m->mnt_passno; ], dnl DEFINE is not used in the code [ AC_DEFINE(GETMNTENT_GLIBC, 1, [Define this if mntent follows glibc conventions]) elektra_glibc_mntent=yes], [] )]) AC_MSG_CHECKING([if mntent follows the glibc conventions]) if test x$elektra_glibc_mntent = xyes; then AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi ALLOW_BACKEND(fstab, [test x$elektra_glibc_mntent = xyes], NO) AC_CHECK_HEADERS([pwd.h], [ AC_DEFINE(HAVE_PWD_H, 1, [Define this if pwd.h is present on your system]) elektra_pwd_h=yes] ) ALLOW_BACKEND(passwd, [test x$elektra_pwd_h = xyes], NO) # daemon depends on struct ucred in ipc.c elektra_ucred=no AC_CHECK_MEMBERS([struct ucred.pid], [elektra_ucred=yes], [elektra_ucred=no], [#include ]) ALLOW_BACKEND(daemon, [test x$elektra_ucred = xyes], NO) AC_SUBST(BACKENDS) backend_static_libs= for backend in $BACKENDS; do backend_static_libs="$backend_static_libs ../backends/${backend}/libelektra-${backend}.a" done AC_SUBST(privatelibs) AC_SUBST(backend_static_libs) # # Bindings enable and disable logic. # BINDINGS="" # $1 is the binding name # $2 is the check for prerequisite # $3 is the default value YES or NO AC_DEFUN([ALLOW_BINDING], [ if test "$3" == YES; then BINDINGS="$BINDINGS $1"; fi AC_ARG_ENABLE([$1], AC_HELP_STRING([--enable-$1], [compile $1 binding @<:@default=$3@:>@]), [if test "$enableval" = yes; then if $2; then BINDINGS="$BINDINGS $1"; else #thus only default bindings are in BINDINGS and #they don't have prerequisites, don't remove AC_MSG_WARN([not building binding $1, prerequisite missing]) fi else #removed bindings out of BINDINGS list BINDINGS=$(echo "$BINDINGS" | sed 's/[[:space:]]*$1//') fi ]) ]) ALLOW_BINDING(cpp, true, YES) #AC_CHECK_PROGS(SCHEME, scheme, false) #ALLOW_BINDING(scheme, [test "x$SCHEME" = xscheme], NO) AC_CHECK_PROGS(PYTHON, python, false) ALLOW_BINDING(python, [test "x$PYTHON" = xpython], NO) AC_SUBST(BINDINGS) # inspired from daemontools AC_CHECK_HEADERS([signal.h],[ AC_TRY_LINK([#include ], [ sigset_t ss; sigemptyset(&ss); sigaddset(&ss,SIGCHLD); sigprocmask(SIG_SETMASK,&ss,(sigset_t *) 0); ], [AC_DEFINE([HASSIGPROCMASK],[],[POSIX signal available])]) AC_TRY_LINK([#include ], [ int sig; struct sigaction sa;; sa.sa_handler = f; sa.sa_flags = 0; sigemptyset(&sa.sa_mask); sigaction(sig,&sa,(struct sigaction *) 0); ], [AC_DEFINE([HASSIGACTION],[],[sigaction available])]) ]) # # Checks for typedefs, structures, and compiler characteristics. # AC_C_CONST AC_TYPE_UID_T AC_CHECK_TYPE(gid_t, int) AC_CHECK_TYPE(time_t, unsigned long) AC_TYPE_MODE_T AC_TYPE_OFF_T AC_TYPE_SIZE_T AC_TYPE_SSIZE_T AC_MSG_CHECKING([For a working getopt]) AC_TRY_LINK([#include ], [ int opt; char** myargv; opt=getopt(1,myargv,"a"); if (optind == 2) {opt = 3;}; ], [ AC_DEFINE([HASGETOPT],[],[Working getopt]) AC_MSG_RESULT(yes) ], [AC_MSG_RESULT(no)]) # # Checks for library functions. # #AC_FUNC_MALLOC #AC_FUNC_MEMCMP #AC_FUNC_REALLOC AC_FUNC_CHOWN AC_FUNC_CLOSEDIR_VOID AC_FUNC_GETMNTENT AC_FUNC_MALLOC AC_FUNC_MEMCMP AC_FUNC_REALLOC AC_FUNC_STAT #old version AC_CHECK_FUNCS([memset nl_langinfo setenv setlocale strcasecmp strchr strrchr index rindex strtol ctime_r getuid getgid sigprocmask sigaction]) #for testing suite AC_CHECK_FUNCS([clearenv setenv]) #generated by autoscan, TODO. merge together AC_CHECK_FUNCS([ftruncate getmntent gettimeofday memmove memset mkdir nl_langinfo putenv rmdir setenv setlocale socket strcasecmp strchr strndup strrchr strstr strtol]) # # Output # AC_CONFIG_FILES([Makefile]) AC_CONFIG_FILES([elektra.spec]) AC_OUTPUT([src/Makefile src/libhelper/Makefile src/libloader/Makefile src/libelektra/Makefile src/libelektra/exportobjects.sh src/libelektratools/Makefile src/preload/Makefile src/kdb/Makefile src/backends/Makefile src/backends/berkeleydb/Makefile src/backends/filesys/Makefile src/backends/fstab/Makefile src/backends/passwd/Makefile src/backends/hosts/Makefile src/backends/gconf/Makefile src/backends/template/Makefile src/backends/ini/Makefile src/backends/daemon/Makefile src/bindings/Makefile src/bindings/cpp/Makefile src/bindings/cpp/tests/Makefile src/bindings/python/Makefile src/include/Makefile doc/Makefile doc/images/Makefile doc/standards/Makefile scripts/Makefile xmlschema/Makefile elektra.pc elektratools.pc elektracpp.pc benchmarks/Makefile examples/Makefile tests/Makefile ]) echo "--------------------------------" echo " libelektra " echo "--------------------------------" echo "" echo "Test backends: $TESTBACKENDS" echo "" echo "Compile backends: $BACKENDS" echo "Compile bindings: $BINDINGS" echo -n "Compile libelektratools: " if test "x$elektra_have_xml" = "xyes"; then echo "yes" else echo "no" fi echo "" echo "type: make && make install" elektra-0.7.1/depcomp0000755000076400001440000003710011365511147011451 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2005-07-09.11 # Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputing dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> $depfile echo >> $depfile # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> $depfile else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` tmpdepfile="$stripped.u" if test "$libtool" = yes; then "$@" -Wc,-M else "$@" -M fi stat=$? if test -f "$tmpdepfile"; then : else stripped=`echo "$stripped" | sed 's,^.*/,,'` tmpdepfile="$stripped.u" fi if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi if test -f "$tmpdepfile"; then outname="$stripped.o" # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mecanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # X makedepend shift cleared=no for arg in "$@"; do case $cleared in no) set ""; shift cleared=yes ;; esac case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix="`echo $object | sed 's/^.*\././'`" touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. "$@" || exit $? IFS=" " for arg do case "$arg" in "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: elektra-0.7.1/doc/0000777000076400001440000000000011365513214010721 500000000000000elektra-0.7.1/doc/Makefile.am0000644000076400001440000002042411365507605012702 00000000000000# $Id$ EXTRA_DIST=kdb.1.xml elektra.7.xml elektra.5.xml EXTRA_DIST+=author.xml bestpract.xml rgexample.xml rgcmd.xml storage.xml overview.xml apiexample.xml api.xml compared.xml garbage.xml html-params.xsl html-titlepage-layout.tpl society.xml storage.xml UPLOAD EXTRA_DIST+=docbook.css doxygen.css #EXTRA_DIST+=elektra.odp EXTRA_DIST+=$(all_mans) EXTRA_DIST+= $(HTML_TITLE_LAYOUT_XSL) SUBDIRS=images standards # Dependencies for Doxygen documentation # main... DOXYSOURCES=$(srcdir)/../src/libelektra/*.c $(srcdir)/../src/include/*.h $(srcdir)/../src/Doxyfile # tools... DOXYSOURCES+=$(srcdir)/../src/libelektratools/kdbtools.c # kdb command... DOXYSOURCES+=$(srcdir)/../src/kdb/kdb-tool.c # backend stuff... DOXYSOURCES+=$(srcdir)/../src/backends/doc/backend.c if HAVE_XSL SUFFIXES: .xml .html .pdf .ps .rtf .xsl .fo .tpl # ## Build man documentation # man3_MANS = # man pages are installed in any case, but not distributed if they # annot be built man1_MANS = kdb.1 man5_MANS = elektra.5 man7_MANS = elektra.7 all_mans = $(man1_MANS) $(man5_MANS) $(man7_MANS) kdb.1: kdb.1.xml author.xml bestpract.xml rgexample.xml rgcmd.xml $(xsltproc) $(dbroot)/manpages/docbook.xsl $< elektra.7: elektra.7.xml author.xml overview.xml bestpract.xml rgexample.xml $(xsltproc) $(dbroot)/manpages/docbook.xsl $< elektra.5: elektra.5.xml author.xml storage.xml $(xsltproc) $(dbroot)/manpages/docbook.xsl $< # # HTML and doc targets for the previous web site. Obsolete, unused for now # # howto.html dependencies and target (unused) .xml.html: $(xsltproc) -path . -o $@ ${HTML_TITLE_LAYOUT_XSL} $< howto.html: howto.xml elektra.7.xml author.xml garbage.xml overview.xml bestpract.xml rgexample.xml rgcmd.xml storage.xml api.xml society.xml compared.xml api.xml apiexample.xml xorgpatch.xml initpatch.xml csource.xml ${HTML_TITLE_LAYOUT_XSL} # Layout and configurations to generate HTML for the web site HTML_TITLE_LAYOUT_XSL=html-titlepage-layout.xsl #HTML_TITLE_LAYOUT=html-titlepage-layout.tpl HTML_TITLE_LAYOUT=html-params.xsl $(HTML_TITLE_LAYOUT_XSL): $(HTML_TITLE_LAYOUT) -$(xsltproc) -o ${HTML_TITLE_LAYOUT_XSL} $(dbroot)/template/titlepage.xsl $(srcdir)/${HTML_TITLE_LAYOUT} # web site libelektra.org: howto.xml elektra.7.xml author.xml garbage.xml overview.xml bestpract.xml rgexample.xml rgcmd.xml storage.xml api.xml society.xml compared.xml api.xml apiexample.xml xorgpatch.xml initpatch.xml csource.xml elektra-api.tar.gz $(man_html) ${HTML_TITLE_LAYOUT_XSL} $(xsltproc) -path . -stringparam base.dir $@ ${HTML_TITLE_LAYOUT_XSL} $< -cp $(srcdir)/docbook.css $@/ -mkdir $@/images/ -cp -r images/*png images/*gif $@/images -find elektra-api/html | cpio -pdvm $@ -cp elektra-api.tar.gz $@ -cp $(man_html) $@ else # in case there are no man pages in source dir and the xsl tools # are not installed, make install will fail without the files. # this situation should be very rare, it could only happen # from cvs (and without xsl tools) or after a make maintainer-clean # or after a modification of the xml sources. kdb.1: kdb.1.xml author.xml bestpract.xml rgexample.xml rgcmd.xml touch $< elektra.7: elektra.7.xml author.xml overview.xml bestpract.xml rgexample.xml touch $< elektra.5: elektra.5.xml author.xml storage.xml touch $< endif # html generated from man pages. if HAVE_MAN2HTML man_html = kdb.1.html elektra.7.html elektra.5.html kdb.3.html key.3.html keyset.3.html kdb.1.html: kdb.1 $(man2html) -r $< | sed -e 's|Content-type: text/html||; s|\"\.\.\/man.\/|\"|g; s|\"\.\.\/|\"|g;' > kdb.1.html elektra.5.html: elektra.5 $(man2html) -r $< | sed -e 's|Content-type: text/html||; s|\"\.\.\/man.\/|\"|g; s|\"\.\.\/|\"|g;' > elektra.5.html elektra.7.html: elektra.7 $(man2html) -r $< | sed -e 's|Content-type: text/html||; s|\"\.\.\/man.\/|\"|g; s|\"\.\.\/|\"|g;' > elektra.7.html kdb.3.html: elektra-api dir=.; \ if test -f elektra-api/man/man3/kdb.3; then dir=elektra-api/man/man3 ;\ else \ if test -f $(srcdir)/elektra-api/man/man3/kdb.3; then dir=$(srcdir)/elektra-api/man/man3 ; fi; \ fi; \ $(man2html) -r < $$dir/kdb.3 | sed -e 's|Content-type: text/html||; s|\"\.\.\/man.\/|\"|g; s|\"\.\.\/|\"|g;' > kdb.3.html key.3.html: elektra-api dir=.; \ if test -f elektra-api/man/man3/key.3; then dir=elektra-api/man/man3 ;\ else \ if test -f $(srcdir)/elektra-api/man/man3/key.3; then dir=$(srcdir)/elektra-api/man/man3 ; fi; \ fi; \ $(man2html) -r < $$dir/key.3 | sed -e 's|Content-type: text/html||; s|\"\.\.\/man.\/|\"|g; s|\"\.\.\/|\"|g;' > key.3.html keyset.3.html: elektra-api dir=.; \ if test -f elektra-api/man/man3/keyset.3; then dir=elektra-api/man/man3 ;\ else \ if test -f $(srcdir)/elektra-api/man/man3/keyset.3; then dir=$(srcdir)/elektra-api/man/man3 ; fi; \ fi; \ $(man2html) -r < $$dir/keyset.3 | sed -e 's|Content-type: text/html||; s|\"\.\.\/man.\/|\"|g; s|\"\.\.\/|\"|g;' > keyset.3.html endif # all: documentation # html doxygen # documentation: docbookman doxygen # docbookman: kdb.1 elektra.7 elektra.5 develdoc_DATA = elektra-api apihtmldir = $(develdocdir)/api-html if HAVE_DOXYGEN # # Generate doxygen documentation # This generate man for API too (see src/Doxyfile) # elektra-api.tar.gz: elektra-api tar -zcf elektra-api.tar.gz elektra-api/html elektra-api: $(DOXYSOURCES) @echo "Making Doxygen..." cd ../src/; srcdir=$(top_srcdir)/src $(doxygen) $(top_srcdir)/src/Doxyfile clean-local: rm -rf elektra-api rm -rf libelektra.org else # fake target that is required when doxygen isn't found and the directory # has to be created (make install, make dist) elektra-api: mkdir elektra-api clean-local: rm -rf elektra-api endif CLEANFILES = csource.xml \ $(man_html) \ $(HTML_TITLE_LAYOUT_XSL) \ xorgpatch.xml initpatch.xml \ elektra-api.tar.gz MAINTAINERCLEANFILES = howto.html \ kdb.1 elektra.5 elektra.7 # putting in EXTRA_DIST doesn't work, since in that case it may be # copied from srcdir and also from the current dir, leading to an error dist-hook: if test -d elektra-api/html; \ then cp -pR elektra-api $(distdir); \ else \ if test -d $(srcdir)/elektra-api; \ then cp -pR $(srcdir)/elektra-api $(distdir); \ fi; \ fi install-develdocDATA: $(api_DATA) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(apihtmldir) @if test -d elektra-api/html/; then api_d=elektra-api/html/; \ else api_d=$(srcdir)/elektra-api/html/; \ fi; \ list=`find $$api_d`; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(develdocDATA_INSTALL) $$d$$p $(DESTDIR)$(apihtmldir)/$$f"; \ $(develdocDATA_INSTALL) $$d$$p $(DESTDIR)$(apihtmldir)/$$f; \ done uninstall-develdocDATA: -if test -d elektra-api/html/; then api_d=elektra-api/html/; \ else api_d=$(srcdir)/elektra-api/html/; \ fi; \ list=`find "$$api_d"`; for p in $$list; do \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo "rm -f $(DESTDIR)$(apihtmldir)/$$f"; \ rm -f $(DESTDIR)$(apihtmldir)/$$f; \ done -rmdir $(DESTDIR)$(apihtmldir) # $(mkinstalldirs) $(DESTDIR)$(apimandir) # @list=`find elektra-api/man/man3`; for p in $$list; do \ # if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ # f="`echo $$p | sed -e 's|^.*/||'`"; \ # echo " $(develdocDATA_INSTALL) $$d$$p $(DESTDIR)$(apimandir)/$$f"; \ # $(develdocDATA_INSTALL) $$d$$p $(DESTDIR)$(apimandir)/$$f; \ # done install-man3: $(man3_MANS) @$(NORMAL_INSTALL) test -z "$(man3dir)" || $(mkdir_p) "$(DESTDIR)$(man3dir)" @if test -d elektra-api/man/; then man_d=elektra-api/man/; \ else man_d=$(srcdir)/elektra-api/man/; \ fi; \ list=`find $$man_d -name "k[db,ey,s]*.3"` ; for i in $$list; do \ if test -f "$$i"; then d=; else d="$(srcdir)/"; fi; \ ext='3'; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " $(INSTALL_DATA) $$d$$i $(DESTDIR)$(man3dir)/$$inst"; \ $(INSTALL_DATA) $$d$$i $(DESTDIR)$(man3dir)/$$inst; \ done uninstall-man3: @$(NORMAL_UNINSTALL) -if test -d elektra-api/man/; then man_d=elektra-api/man/; \ else man_d=$(srcdir)/elektra-api/man/; \ fi; \ list=`find $$man_d -name "k[db,ey,s]*.3"` ; for i in $$list; do \ ext='3'; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " rm -f '$(DESTDIR)$(man3dir)/$$inst'"; \ rm -f "$(DESTDIR)$(man3dir)/$$inst"; \ done elektra-0.7.1/doc/Makefile.in0000644000076400001440000007541511365511146012720 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ # $Id$ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = doc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/extensions.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive man1dir = $(mandir)/man1 am__installdirs = "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)" \ "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man7dir)" \ "$(DESTDIR)$(develdocdir)" man3dir = $(mandir)/man3 man5dir = $(mandir)/man5 man7dir = $(mandir)/man7 NROFF = nroff MANS = $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man7_MANS) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; develdocDATA_INSTALL = $(INSTALL_DATA) DATA = $(develdoc_DATA) ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) INSTALL = @INSTALL@ ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BACKENDS = @BACKENDS@ BACKEND_VERSION_API = @BACKEND_VERSION_API@ BINDINGS = @BINDINGS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CDBGFLAGS = @CDBGFLAGS@ CFLAGS = @CFLAGS@ COPTFLAGS = @COPTFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSTDFLAGS = @CSTDFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDBGFLAGS = @CXXDBGFLAGS@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXOPTFLAGS = @CXXOPTFLAGS@ CXXSTDFLAGS = @CXXSTDFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_FALSE = @DEBUG_FALSE@ DEBUG_TRUE = @DEBUG_TRUE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ELEKTRATOOLS_VERSION_API = @ELEKTRATOOLS_VERSION_API@ ELEKTRA_VERSION_API = @ELEKTRA_VERSION_API@ EXEEXT = @EXEEXT@ EXPERIMENTAL_FALSE = @EXPERIMENTAL_FALSE@ EXPERIMENTAL_TRUE = @EXPERIMENTAL_TRUE@ F77 = @F77@ FFLAGS = @FFLAGS@ GENHTML = @GENHTML@ GREP = @GREP@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ HAVE_LIBLTDL_FALSE = @HAVE_LIBLTDL_FALSE@ HAVE_LIBLTDL_TRUE = @HAVE_LIBLTDL_TRUE@ HAVE_MAN2HTML_FALSE = @HAVE_MAN2HTML_FALSE@ HAVE_MAN2HTML_TRUE = @HAVE_MAN2HTML_TRUE@ HAVE_XML_FALSE = @HAVE_XML_FALSE@ HAVE_XML_TRUE = @HAVE_XML_TRUE@ HAVE_XSL_FALSE = @HAVE_XSL_FALSE@ HAVE_XSL_TRUE = @HAVE_XSL_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDB_VERSION = @KDB_VERSION@ KDB_VERSION_MAJOR = @KDB_VERSION_MAJOR@ KDB_VERSION_MAJORMINOR = @KDB_VERSION_MAJORMINOR@ KDB_VERSION_MICRO = @KDB_VERSION_MICRO@ KDB_VERSION_MINOR = @KDB_VERSION_MINOR@ LCOV = @LCOV@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VALGRIND = @VALGRIND@ VALGRINDTESTS_FALSE = @VALGRINDTESTS_FALSE@ VALGRINDTESTS_TRUE = @VALGRINDTESTS_TRUE@ VERSION = @VERSION@ XML2_CONFIG = @XML2_CONFIG@ XML_CPPFLAGS = @XML_CPPFLAGS@ XML_LIBS = @XML_LIBS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ backend_static_libs = @backend_static_libs@ backenddir = @backenddir@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ datarootdir = @datarootdir@ dbroot = @dbroot@ default_backend = @default_backend@ default_dbackend = @default_dbackend@ default_docbook = @default_docbook@ develdocdir = @develdocdir@ docdir = @docdir@ doxygen = @doxygen@ dvidir = @dvidir@ elektratools = @elektratools@ exec_prefix = @exec_prefix@ gconf_CFLAGS = @gconf_CFLAGS@ gconf_LIBS = @gconf_LIBS@ hlvlbackenddir = @hlvlbackenddir@ 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@ man2html = @man2html@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ privatelibs = @privatelibs@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ ulibdir = @ulibdir@ xsltproc = @xsltproc@ #EXTRA_DIST+=elektra.odp EXTRA_DIST = kdb.1.xml elektra.7.xml elektra.5.xml author.xml \ bestpract.xml rgexample.xml rgcmd.xml storage.xml overview.xml \ apiexample.xml api.xml compared.xml garbage.xml \ html-params.xsl html-titlepage-layout.tpl society.xml \ storage.xml UPLOAD docbook.css doxygen.css $(all_mans) \ $(HTML_TITLE_LAYOUT_XSL) SUBDIRS = images standards # Dependencies for Doxygen documentation # main... # tools... # kdb command... # backend stuff... DOXYSOURCES = $(srcdir)/../src/libelektra/*.c \ $(srcdir)/../src/include/*.h $(srcdir)/../src/Doxyfile \ $(srcdir)/../src/libelektratools/kdbtools.c \ $(srcdir)/../src/kdb/kdb-tool.c \ $(srcdir)/../src/backends/doc/backend.c # # @HAVE_XSL_TRUE@man3_MANS = # man pages are installed in any case, but not distributed if they # annot be built @HAVE_XSL_TRUE@man1_MANS = kdb.1 @HAVE_XSL_TRUE@man5_MANS = elektra.5 @HAVE_XSL_TRUE@man7_MANS = elektra.7 @HAVE_XSL_TRUE@all_mans = $(man1_MANS) $(man5_MANS) $(man7_MANS) # Layout and configurations to generate HTML for the web site @HAVE_XSL_TRUE@HTML_TITLE_LAYOUT_XSL = html-titlepage-layout.xsl #HTML_TITLE_LAYOUT=html-titlepage-layout.tpl @HAVE_XSL_TRUE@HTML_TITLE_LAYOUT = html-params.xsl # html generated from man pages. @HAVE_MAN2HTML_TRUE@man_html = kdb.1.html elektra.7.html elektra.5.html kdb.3.html key.3.html keyset.3.html # all: documentation # html doxygen # documentation: docbookman doxygen # docbookman: kdb.1 elektra.7 elektra.5 develdoc_DATA = elektra-api apihtmldir = $(develdocdir)/api-html CLEANFILES = csource.xml \ $(man_html) \ $(HTML_TITLE_LAYOUT_XSL) \ xorgpatch.xml initpatch.xml \ elektra-api.tar.gz MAINTAINERCLEANFILES = howto.html \ kdb.1 elektra.5 elektra.7 all: all-recursive .SUFFIXES: .SUFFIXES: .html .xml $(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 \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu doc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: install-man1: $(man1_MANS) $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man1dir)" || $(mkdir_p) "$(DESTDIR)$(man1dir)" @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ else file=$$i; fi; \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 1*) ;; \ *) ext='1' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \ done uninstall-man1: @$(NORMAL_UNINSTALL) @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.1*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 1*) ;; \ *) ext='1' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \ rm -f "$(DESTDIR)$(man1dir)/$$inst"; \ done install-man5: $(man5_MANS) $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man5dir)" || $(mkdir_p) "$(DESTDIR)$(man5dir)" @list='$(man5_MANS) $(dist_man5_MANS) $(nodist_man5_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.5*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ else file=$$i; fi; \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 5*) ;; \ *) ext='5' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man5dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man5dir)/$$inst"; \ done uninstall-man5: @$(NORMAL_UNINSTALL) @list='$(man5_MANS) $(dist_man5_MANS) $(nodist_man5_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.5*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 5*) ;; \ *) ext='5' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " rm -f '$(DESTDIR)$(man5dir)/$$inst'"; \ rm -f "$(DESTDIR)$(man5dir)/$$inst"; \ done install-man7: $(man7_MANS) $(man_MANS) @$(NORMAL_INSTALL) test -z "$(man7dir)" || $(mkdir_p) "$(DESTDIR)$(man7dir)" @list='$(man7_MANS) $(dist_man7_MANS) $(nodist_man7_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.7*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ else file=$$i; fi; \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 7*) ;; \ *) ext='7' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man7dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man7dir)/$$inst"; \ done uninstall-man7: @$(NORMAL_UNINSTALL) @list='$(man7_MANS) $(dist_man7_MANS) $(nodist_man7_MANS)'; \ l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ for i in $$l2; do \ case "$$i" in \ *.7*) list="$$list $$i" ;; \ esac; \ done; \ for i in $$list; do \ ext=`echo $$i | sed -e 's/^.*\\.//'`; \ case "$$ext" in \ 7*) ;; \ *) ext='7' ;; \ esac; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " rm -f '$(DESTDIR)$(man7dir)/$$inst'"; \ rm -f "$(DESTDIR)$(man7dir)/$$inst"; \ done # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; 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; \ (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" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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 || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(mkdir_p) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ distdir) \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook check-am: all-am check: check-recursive all-am: Makefile $(MANS) $(DATA) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man7dir)" "$(DESTDIR)$(develdocdir)"; 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: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-generic clean-libtool clean-local mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-develdocDATA install-man install-exec-am: install-info: install-info-recursive install-man: install-man1 install-man3 install-man5 install-man7 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: uninstall-develdocDATA uninstall-info-am uninstall-man uninstall-info: uninstall-info-recursive uninstall-man: uninstall-man1 uninstall-man3 uninstall-man5 \ uninstall-man7 .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ clean clean-generic clean-libtool clean-local clean-recursive \ ctags ctags-recursive dist-hook distclean distclean-generic \ distclean-libtool distclean-recursive distclean-tags distdir \ dvi dvi-am html html-am info info-am install install-am \ install-data install-data-am install-develdocDATA install-exec \ install-exec-am install-info install-info-am install-man \ install-man1 install-man3 install-man5 install-man7 \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ maintainer-clean-recursive mostlyclean mostlyclean-generic \ mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \ tags tags-recursive uninstall uninstall-am \ uninstall-develdocDATA uninstall-info-am uninstall-man \ uninstall-man1 uninstall-man3 uninstall-man5 uninstall-man7 @HAVE_XSL_TRUE@SUFFIXES: .xml .html .pdf .ps .rtf .xsl .fo .tpl @HAVE_XSL_TRUE@kdb.1: kdb.1.xml author.xml bestpract.xml rgexample.xml rgcmd.xml @HAVE_XSL_TRUE@ $(xsltproc) $(dbroot)/manpages/docbook.xsl $< @HAVE_XSL_TRUE@elektra.7: elektra.7.xml author.xml overview.xml bestpract.xml rgexample.xml @HAVE_XSL_TRUE@ $(xsltproc) $(dbroot)/manpages/docbook.xsl $< @HAVE_XSL_TRUE@elektra.5: elektra.5.xml author.xml storage.xml @HAVE_XSL_TRUE@ $(xsltproc) $(dbroot)/manpages/docbook.xsl $< # # HTML and doc targets for the previous web site. Obsolete, unused for now # # howto.html dependencies and target (unused) @HAVE_XSL_TRUE@.xml.html: @HAVE_XSL_TRUE@ $(xsltproc) -path . -o $@ ${HTML_TITLE_LAYOUT_XSL} $< @HAVE_XSL_TRUE@howto.html: howto.xml elektra.7.xml author.xml garbage.xml overview.xml bestpract.xml rgexample.xml rgcmd.xml storage.xml api.xml society.xml compared.xml api.xml apiexample.xml xorgpatch.xml initpatch.xml csource.xml ${HTML_TITLE_LAYOUT_XSL} @HAVE_XSL_TRUE@$(HTML_TITLE_LAYOUT_XSL): $(HTML_TITLE_LAYOUT) @HAVE_XSL_TRUE@ -$(xsltproc) -o ${HTML_TITLE_LAYOUT_XSL} $(dbroot)/template/titlepage.xsl $(srcdir)/${HTML_TITLE_LAYOUT} # web site @HAVE_XSL_TRUE@libelektra.org: howto.xml elektra.7.xml author.xml garbage.xml overview.xml bestpract.xml rgexample.xml rgcmd.xml storage.xml api.xml society.xml compared.xml api.xml apiexample.xml xorgpatch.xml initpatch.xml csource.xml elektra-api.tar.gz $(man_html) ${HTML_TITLE_LAYOUT_XSL} @HAVE_XSL_TRUE@ $(xsltproc) -path . -stringparam base.dir $@ ${HTML_TITLE_LAYOUT_XSL} $< @HAVE_XSL_TRUE@ -cp $(srcdir)/docbook.css $@/ @HAVE_XSL_TRUE@ -mkdir $@/images/ @HAVE_XSL_TRUE@ -cp -r images/*png images/*gif $@/images @HAVE_XSL_TRUE@ -find elektra-api/html | cpio -pdvm $@ @HAVE_XSL_TRUE@ -cp elektra-api.tar.gz $@ @HAVE_XSL_TRUE@ -cp $(man_html) $@ # in case there are no man pages in source dir and the xsl tools # are not installed, make install will fail without the files. # this situation should be very rare, it could only happen # from cvs (and without xsl tools) or after a make maintainer-clean # or after a modification of the xml sources. @HAVE_XSL_FALSE@kdb.1: kdb.1.xml author.xml bestpract.xml rgexample.xml rgcmd.xml @HAVE_XSL_FALSE@ touch $< @HAVE_XSL_FALSE@elektra.7: elektra.7.xml author.xml overview.xml bestpract.xml rgexample.xml @HAVE_XSL_FALSE@ touch $< @HAVE_XSL_FALSE@elektra.5: elektra.5.xml author.xml storage.xml @HAVE_XSL_FALSE@ touch $< @HAVE_MAN2HTML_TRUE@kdb.1.html: kdb.1 @HAVE_MAN2HTML_TRUE@ $(man2html) -r $< | sed -e 's|Content-type: text/html||; s|\"\.\.\/man.\/|\"|g; s|\"\.\.\/|\"|g;' > kdb.1.html @HAVE_MAN2HTML_TRUE@elektra.5.html: elektra.5 @HAVE_MAN2HTML_TRUE@ $(man2html) -r $< | sed -e 's|Content-type: text/html||; s|\"\.\.\/man.\/|\"|g; s|\"\.\.\/|\"|g;' > elektra.5.html @HAVE_MAN2HTML_TRUE@elektra.7.html: elektra.7 @HAVE_MAN2HTML_TRUE@ $(man2html) -r $< | sed -e 's|Content-type: text/html||; s|\"\.\.\/man.\/|\"|g; s|\"\.\.\/|\"|g;' > elektra.7.html @HAVE_MAN2HTML_TRUE@kdb.3.html: elektra-api @HAVE_MAN2HTML_TRUE@ dir=.; \ @HAVE_MAN2HTML_TRUE@ if test -f elektra-api/man/man3/kdb.3; then dir=elektra-api/man/man3 ;\ @HAVE_MAN2HTML_TRUE@ else \ @HAVE_MAN2HTML_TRUE@ if test -f $(srcdir)/elektra-api/man/man3/kdb.3; then dir=$(srcdir)/elektra-api/man/man3 ; fi; \ @HAVE_MAN2HTML_TRUE@ fi; \ @HAVE_MAN2HTML_TRUE@ $(man2html) -r < $$dir/kdb.3 | sed -e 's|Content-type: text/html||; s|\"\.\.\/man.\/|\"|g; s|\"\.\.\/|\"|g;' > kdb.3.html @HAVE_MAN2HTML_TRUE@key.3.html: elektra-api @HAVE_MAN2HTML_TRUE@ dir=.; \ @HAVE_MAN2HTML_TRUE@ if test -f elektra-api/man/man3/key.3; then dir=elektra-api/man/man3 ;\ @HAVE_MAN2HTML_TRUE@ else \ @HAVE_MAN2HTML_TRUE@ if test -f $(srcdir)/elektra-api/man/man3/key.3; then dir=$(srcdir)/elektra-api/man/man3 ; fi; \ @HAVE_MAN2HTML_TRUE@ fi; \ @HAVE_MAN2HTML_TRUE@ $(man2html) -r < $$dir/key.3 | sed -e 's|Content-type: text/html||; s|\"\.\.\/man.\/|\"|g; s|\"\.\.\/|\"|g;' > key.3.html @HAVE_MAN2HTML_TRUE@keyset.3.html: elektra-api @HAVE_MAN2HTML_TRUE@ dir=.; \ @HAVE_MAN2HTML_TRUE@ if test -f elektra-api/man/man3/keyset.3; then dir=elektra-api/man/man3 ;\ @HAVE_MAN2HTML_TRUE@ else \ @HAVE_MAN2HTML_TRUE@ if test -f $(srcdir)/elektra-api/man/man3/keyset.3; then dir=$(srcdir)/elektra-api/man/man3 ; fi; \ @HAVE_MAN2HTML_TRUE@ fi; \ @HAVE_MAN2HTML_TRUE@ $(man2html) -r < $$dir/keyset.3 | sed -e 's|Content-type: text/html||; s|\"\.\.\/man.\/|\"|g; s|\"\.\.\/|\"|g;' > keyset.3.html # # Generate doxygen documentation # This generate man for API too (see src/Doxyfile) # @HAVE_DOXYGEN_TRUE@elektra-api.tar.gz: elektra-api @HAVE_DOXYGEN_TRUE@ tar -zcf elektra-api.tar.gz elektra-api/html @HAVE_DOXYGEN_TRUE@elektra-api: $(DOXYSOURCES) @HAVE_DOXYGEN_TRUE@ @echo "Making Doxygen..." @HAVE_DOXYGEN_TRUE@ cd ../src/; srcdir=$(top_srcdir)/src $(doxygen) $(top_srcdir)/src/Doxyfile @HAVE_DOXYGEN_TRUE@clean-local: @HAVE_DOXYGEN_TRUE@ rm -rf elektra-api @HAVE_DOXYGEN_TRUE@ rm -rf libelektra.org # fake target that is required when doxygen isn't found and the directory # has to be created (make install, make dist) @HAVE_DOXYGEN_FALSE@elektra-api: @HAVE_DOXYGEN_FALSE@ mkdir elektra-api @HAVE_DOXYGEN_FALSE@clean-local: @HAVE_DOXYGEN_FALSE@ rm -rf elektra-api # putting in EXTRA_DIST doesn't work, since in that case it may be # copied from srcdir and also from the current dir, leading to an error dist-hook: if test -d elektra-api/html; \ then cp -pR elektra-api $(distdir); \ else \ if test -d $(srcdir)/elektra-api; \ then cp -pR $(srcdir)/elektra-api $(distdir); \ fi; \ fi install-develdocDATA: $(api_DATA) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(apihtmldir) @if test -d elektra-api/html/; then api_d=elektra-api/html/; \ else api_d=$(srcdir)/elektra-api/html/; \ fi; \ list=`find $$api_d`; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo " $(develdocDATA_INSTALL) $$d$$p $(DESTDIR)$(apihtmldir)/$$f"; \ $(develdocDATA_INSTALL) $$d$$p $(DESTDIR)$(apihtmldir)/$$f; \ done uninstall-develdocDATA: -if test -d elektra-api/html/; then api_d=elektra-api/html/; \ else api_d=$(srcdir)/elektra-api/html/; \ fi; \ list=`find "$$api_d"`; for p in $$list; do \ f="`echo $$p | sed -e 's|^.*/||'`"; \ echo "rm -f $(DESTDIR)$(apihtmldir)/$$f"; \ rm -f $(DESTDIR)$(apihtmldir)/$$f; \ done -rmdir $(DESTDIR)$(apihtmldir) # $(mkinstalldirs) $(DESTDIR)$(apimandir) # @list=`find elektra-api/man/man3`; for p in $$list; do \ # if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ # f="`echo $$p | sed -e 's|^.*/||'`"; \ # echo " $(develdocDATA_INSTALL) $$d$$p $(DESTDIR)$(apimandir)/$$f"; \ # $(develdocDATA_INSTALL) $$d$$p $(DESTDIR)$(apimandir)/$$f; \ # done install-man3: $(man3_MANS) @$(NORMAL_INSTALL) test -z "$(man3dir)" || $(mkdir_p) "$(DESTDIR)$(man3dir)" @if test -d elektra-api/man/; then man_d=elektra-api/man/; \ else man_d=$(srcdir)/elektra-api/man/; \ fi; \ list=`find $$man_d -name "k[db,ey,s]*.3"` ; for i in $$list; do \ if test -f "$$i"; then d=; else d="$(srcdir)/"; fi; \ ext='3'; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " $(INSTALL_DATA) $$d$$i $(DESTDIR)$(man3dir)/$$inst"; \ $(INSTALL_DATA) $$d$$i $(DESTDIR)$(man3dir)/$$inst; \ done uninstall-man3: @$(NORMAL_UNINSTALL) -if test -d elektra-api/man/; then man_d=elektra-api/man/; \ else man_d=$(srcdir)/elektra-api/man/; \ fi; \ list=`find $$man_d -name "k[db,ey,s]*.3"` ; for i in $$list; do \ ext='3'; \ inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ inst=`echo $$inst | sed -e 's/^.*\///'`; \ inst=`echo $$inst | sed '$(transform)'`.$$ext; \ echo " rm -f '$(DESTDIR)$(man3dir)/$$inst'"; \ rm -f "$(DESTDIR)$(man3dir)/$$inst"; \ done # 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: elektra-0.7.1/doc/UPLOAD0000644000076400001440000000036711361542114011547 00000000000000 To update http://elektra.sf.net . . . . . Put this in Konqueror and start copying: fish://aviram@shell.sf.net/home/groups/e/el/elektra/htdocs Or scp *html aviram@shell.sf.net:/home/groups/e/el/elektra/htdocs Or simply: make pub elektra-0.7.1/doc/api.xml0000644000076400001440000000435511365506635012150 00000000000000
Example C Program Elektra's API consists of 3 classes of objects and methods to manipulate them. The main implementation of the library is written in C and is fully documented in Doxygen. The classes are: KDB A class of static methods only. You can't instantiate an object of this class. All the business logic for retrieving and commiting key data to physical media is owned by this class. Example methods are kdbSetKey, kdbGetKey, kdbGetValue, kdbGetChildKeys, etc. This last is one of the most powerfull, returning a KeySet containing all child keys of a folder key, with the option to retrieve them recursively, sorted, dereferencing links, etc. Key The obvious entity class. Contains key's name, data and metadata. Example of its methods are keyInit, keySetName, keySetUID, keyGetString, keyIsDir, etc. KeySet A group of Keys. Real applications use to get and set several keys, and this class is used to store corelated keys that were retrieved together in one shot. Example of its methods are ksInsert, ksAppend, ksInsertKeys, etc. The API is documented in manual pages key3 and kdb3 or you can browse or download the full API documentation. &apiexample;
elektra-0.7.1/doc/apiexample.xml0000644000076400001440000000255511365506635013524 00000000000000 Example program Here is an example of how to use the Elektra API. This program will get all keys that matter under system/sw/MyApp manipulate some, and re-save them. &csource; Things to note in this source: The keys are manipulated in changeConfig() after we called kdbClose(). You don't need the key database to be open to manipulate keys. We called kdbOpen() again in saveConfig(), to prepare to commit the changes. We called ksClose() in the end to free all memory resources we used. Compiling and Linking All Elektra methods are declared in the /usr/include/kdb.h file and defined in the /lib/libelektra.so library. So to compile it you simply need to:bash$ cc `pkg-config --libs elektra` -o myapp myapp.c or, if you don't have pkg-config:bash$ cc -L /lib -lelektra -o myapp myapp.c elektra-0.7.1/doc/author.xml0000644000076400001440000000110511365506635012667 00000000000000 2004Avi Alkalay March 2004 Elektra Initiative Avi Alkalay avi at unix.sh Linux Market Developer Senior IT and Software Architect IBM Linux Impact Team :: ibm.com/linux elektra-0.7.1/doc/bestpract.xml0000644000076400001440000000153211365506635013360 00000000000000
Best Practices When Creating Keys When using Elektra to store your application's configuration and state, please keep in mind the following rules: You are not allowed to create keys right under system or user. You are not allowed to create folder keys right under system or user. They are reserved for very essential OS subsystems. The keys for your application, called say MyApp, should be created under system/sw/MyApp and/or user/sw/MyApp.
elektra-0.7.1/doc/compared.xml0000644000076400001440000001561511365506635013172 00000000000000
Elektra and Other Registry-like Softwares In the last years, many hierarchical configuration systems appeared, and all of them have the same goal: avoid configuration code rewriting, integration between applications, and separation of configuration parameters from their mother software, so then other software can use same configurations. Here we will compare some of them with Elektra.
Windows Registry The biggest problem with the Windows Registry is that it is Windows-specific and proprietary in design, API, and key naming conventions. Cross platform applications can't afford to use the winregistry API because there is nothing similar in other systems. Hopefully, Elektra will change that: Elektra is highly portable, and there are developers porting and testing Elektra on Windows. There is a winreg Elektra backend (that works as a wrapper for the Windows Registry), so a cross platform program can use Elektra API, which maps Windows Registry's keys to a more cross platform namespace.
GConf The "G" comes from Gnome, which makes GConf part of the Gnome project. Some GConf characteristics: Architected, designed and written for desktop applications only. Its developers have whishlists to make it system global, but a lot in the essential design will have to change, making it practically a new system, and the redesign did not started yet. GConf's namespaces were not architected for global use. GConf is a daemon, so if one day it will be system global, it will represent a single point of failure. GConf storage backend are XML files, which are big, take long time and system resources to parse or update. GConf seems to be not preocupied with access permissions, making it again a good solution only for single user desktop applications. GConf is a high level software with many library dependencies, perfect for high level desktop frameworks, but its dependencies are unacceptable for low level early boot stage programs like /sbin/init. GConf's dependencies look like this: $ ldd /usr/lib/libgconf-2.so libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0x0024b000) libORBit-2.so.0 => /usr/lib/libORBit-2.so.0 (0x03dc7000) libm.so.6 => /lib/tls/libm.so.6 (0x00b66000) libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0x00dda000) libdl.so.2 => /lib/libdl.so.2 (0x00b8b000) libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 (0x0099d000) libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x00101000) libpthread.so.0 => /lib/tls/libpthread.so.0 (0x00c7c000) libc.so.6 => /lib/tls/libc.so.6 (0x00a3a000) libpopt.so.0 => /usr/lib/libpopt.so.0 (0x0077b000) /lib/ld-linux.so.2 (0x00a21000) This is useless for an early boot stage program (/usr/lib may be still unmounted), and for a very small OS installation that won't require desktop features, like a router, small firewall, or any other appliance. On the other hand, a program that wants to use Elektra will only link to libelektra.so which has a minimum of natural dependencies: $ ldd /lib/libelektra.so libc.so.6 => /lib/tls/libc.so.6 /lib/ld-linux.so.2 => /lib/ld-linux.so.2 All Gnome programs use GConf, which makes them already integrated in the configuration level. In the Gnome context, Elektra fits well as a GConf backend, this way no program needs to be modified. With an additional Elektra backend for KDE's KConfig-XT, this integration will span a single framework, and we'll see KDE programs using Gnome's configurations and vice-versa. Compared to GConf, Elektra is not a daemon, was designed from the begining for global system usage, is lightweight, is concerned about security and avoids any dependencies.
D-Conf D-Conf generated a long discussion on FreeDesktop.org's XDG mailling list. Its objective is to standarize configuration across desktop frameworks like Gnome and KDE, so no focus is being devoted to global non-desktop system configurations. It was very difficult to find the D-Conf website (not found in the end), and seems that all is available is that XDG discussion, and a wiki page containing analisys of what is required, and development directions. Conclusion: D-Conf is vaporware.
LDAP and Other UniConf UniConf started as configuration library and daemon to be used in some specific programs. It claims to be very flexible, capable of having backends and frontends, as any configuration library can have. Its drawbacks are, as in GConf, some dependencies, and a plus (or minus): it was developed in C++ which makes it also dependent on higher level libraries, and require client programs and programmers to be written in C++, unless they get a pure C frontend. Some UniConf developers started to write a UniConf backend for Elektra, which means that you'll be able to use Elektra's simple API and tools, and UniConf will be responsible for all low level I/O. Elektra and UniConf can live together in an entirely Elektrified world, leveraging UniConf flexibility as a storage backend. Config 4 GNU Looks like this is a dead project, since nobody talks about it for long time. Last website update was in 2004. Very ambitious, this project claimed they will write many backends, one for each configuration file available, and after that, some can access say Samba's configurations normalized through their API and tools, what they didn't realized is that to write many different config file parsers (compilers) and keep tracking their changes, is way more difficult than to write patches for each software. Hiveconf This is a dead project. It is a Python library that accesses ini-style configuration files.
elektra-0.7.1/doc/docbook.css0000644000076400001440000001101411361542114012761 00000000000000/* $Id */ elektra-0.7.1/doc/doxygen.css0000644000076400001440000001310311361542114013017 00000000000000 // $Id$ H1 { text-align: center; font-family: Verdana, Bitstream Vera Sans, Helvetica, sans-serif; font-weight: bold; font-size: 28px; color: #ff6600; } H2 { font-family: Verdana, Bitstream Vera Sans, Helvetica, sans-serif; font-weight: bold; font-size: 22px; color: #ff6600; } H3 { font-size: 18px; color: #ff9933; } CAPTION { font-weight: bold } CODE { font-weight: bold; } DIV.qindex { width: 100%; background-color: #eeeeff; border: 4px solid #eeeeff; text-align: center; margin-bottom: 2px } A.qindex { text-decoration: none; font-weight: bold; color: #0000ee } A.qindex:visited { text-decoration: none; font-weight: bold; color: #0000ee } A.qindex:hover { text-decoration: none; background-color: #ddddff } A.qindexHL { text-decoration: none; font-weight: bold; background-color: #6666cc; color: #ffffff } A.qindexHL:hover { text-decoration: none; background-color: #6666cc; color: #ffffff } A.qindexHL:visited { text-decoration: none; background-color: #6666cc; color: #ffffff } A.el { text-decoration: none; font-weight: bold } A.elRef { font-weight: bold } A.code { text-decoration: none; font-weight: normal; color: #4444ee } A.codeRef { font-weight: normal; color: #4444ee } A:hover { text-decoration: none; background-color: #f2f2ff } DL.el { margin-left: -1cm } DL { font-family: Verdana, Bitstream Vera Sans, Helvetica, sans-serif; font-size: 11px; } DIV.fragment { width: 98%; border: 1px solid #CCCCCC; background-color: #f5f5f5; padding-left: 4px; margin: 4px; } DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px } TD.md { color: #ff6600; font-family: Tahoma, Bitstream Vera Sans, Helvetica, sans-serif; font-size: 18px; font-weight: bold; } TD.mdname1 { font-weight: bold; font-size: 18px; color: #ff6600; } TD.mdname { font-weight: bold; font-size: 18px; color: #ff6600; } DIV.groupHeader { margin-left: 16px; margin-top: 12px; margin-bottom: 6px; font-weight: bold } DIV.groupText { margin-left: 16px; font-style: italic; font-size: smaller } BODY { font-family: Verdana, Bitstream Vera Sans, Helvetica, sans-serif; font-size: 11px; background: white; color: black; margin-right: 20px; margin-left: 20px; } P { font-family: Verdana, Bitstream Vera Sans, Helvetica, sans-serif; font-size: 11px; } EM { font-family: Tahoma, Bitstream Vera Sans, Helvetica, sans-serif; color: #ff6600; font-style: normal; text-decoration: underline; } TD { font-family: Verdana, Bitstream Vera Sans, Helvetica, sans-serif; font-size: 11px; } TD.indexkey { background-color: #eeeeff; font-weight: bold; padding-right : 10px; padding-top : 2px; padding-left : 10px; padding-bottom : 2px; margin-left : 0px; margin-right : 0px; margin-top : 2px; margin-bottom : 2px } TD.indexvalue { background-color: #eeeeff; font-style: italic; padding-right : 10px; padding-top : 2px; padding-left : 10px; padding-bottom : 2px; margin-left : 0px; margin-right : 0px; margin-top : 2px; margin-bottom : 2px } TR.memlist { background-color: #f0f0f0; } P.formulaDsp { text-align: center; } IMG.formulaDsp { } IMG.formulaInl { vertical-align: middle; } SPAN.keyword { color: #008000 } SPAN.keywordtype { color: #604020 } SPAN.keywordflow { color: #e08000 } SPAN.comment { color: #800000 } SPAN.preprocessor { color: #806020 } SPAN.stringliteral { color: #002080 } SPAN.charliteral { color: #008080 } .mdTable { margin-top:0pt; margin-bottom:0pt ! important; border-top-style: groove; border-left-style: groove; border-width: 4pt; border-color: #6565FF; } .mdRow { padding: 8px 20px; } .mdescLeft { font-size: smaller; font-family: Tahoma, Bitstream Vera Sans, Helvetica, sans-serif; background-color: #FAFAFA; padding-left: 8px; border-top: 1px none #E0E0E0; border-right: 1px none #E0E0E0; border-bottom: 1px none #E0E0E0; border-left: 1px none #E0E0E0; margin: 0px; } .mdescRight { font-family: Tahoma, Bitstream Vera Sans, Helvetica, sans-serif; background-color: #FAFAFA; padding-left: 4px; border-top: 1px none #E0E0E0; border-right: 1px none #E0E0E0; border-bottom: 1px none #E0E0E0; border-left: 1px none #E0E0E0; margin: 0px; padding-bottom: 0px; padding-right: 8px; } .memItemLeft { padding: 1px 0px 0px 8px; margin: 4px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-top-color: #E0E0E0; border-right-color: #E0E0E0; border-bottom-color: #E0E0E0; border-left-color: #E0E0E0; border-right-style: none; border-bottom-style: none; border-left-style: none; background-color: #FAFAFA; font-family: Tahoma, Bitstream Vera Sans, Helvetica, sans-serif; font-size: 11px; } .memItemRight { padding: 1px 0px 0px 8px; margin: 4px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-top-color: #E0E0E0; border-right-color: #E0E0E0; border-bottom-color: #E0E0E0; border-left-color: #E0E0E0; border-right-style: none; border-bottom-style: none; border-left-style: none; background-color: #FAFAFA; font-family: Tahoma, Bitstream Vera Sans, Helvetica, sans-serif; font-size: 11px; } .search { color: #0000ee; font-weight: bold; } FORM.search { margin-bottom: 0px; margin-top: 0px; } INPUT.search { font-size: 75%; color: #000080; font-weight: normal; background-color: #eeeeff; } TD.tiny { font-size: 75%; } elektra-0.7.1/doc/elektra.5.xml0000644000076400001440000000145711365506635013171 00000000000000 ]> &author; elektra 5 elektra A framework to store configuration atoms hierarchically &storage; See Also kdb1, elektra7 elektra-0.7.1/doc/elektra.7.xml0000644000076400001440000000162311365506635013166 00000000000000 ]> &author; elektra 7 elektra A framework to store configuration atoms hierarchically &overview; &example; See Also kdb1, elektra5 elektra-0.7.1/doc/garbage.xml0000644000076400001440000000114511365506635012761 00000000000000
Unused/Old Keys Left Behind Into the Key Database Old/uninstalled software may leave unused keys into the Elektra database. Actually, this can also happen with regular text configuration files. Garbage collection of keys and files is done by the package manager or the sysadmin. The Elektra API and the kdb command line tool provide ways to find keys that were not accessed for a long time. When a user is removed from the system, his keys disapear when his $HOME dir is removed.
elektra-0.7.1/doc/html-params.xsl0000644000076400001440000000323511365506635013626 00000000000000 text/css 1 8 2 margin-left: 0.5in; margin-right: 1in; figure after example before equation after table before procedure before appendix toc /article toc /book toc,figure,table,example,equation chapter toc part toc preface toc qandadiv toc qandaset toc reference toc section toc set toc elektra-0.7.1/doc/html-titlepage-layout.tpl0000644000076400001440000000124311365506635015622 00000000000000 <pubdate/> <authorgroup> <t:or> <author> <t:or> <firstname/> <affiliation> <t:or> <address/> <orgdiv/> <orgname/> </t:or> </affiliation> </t:or> </author> </t:or> </authorgroup> </t:titlepage-content> <t:titlepage-content t:side="verso"/> </t:titlepage> </t:templates> �������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������elektra-0.7.1/doc/images/���������������������������������������������������������������������������0000777�0000764�0000144�00000000000�11365513214�012166� 5����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������elektra-0.7.1/doc/images/Makefile.am����������������������������������������������������������������0000644�0000764�0000144�00000000306�11365507605�014144� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������ # $Id$ EXTRA_DIST= classes.png img_arrow.png important.gif link_button_1.gif note.gif type-binary.png type-extendedbinary.png type-extendedstring.png type-folder.png type-link.png type-string.png ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������elektra-0.7.1/doc/images/Makefile.in����������������������������������������������������������������0000644�0000764�0000144�00000025127�11365511146�014160� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ # $Id$ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = doc/images DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/extensions.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) INSTALL = @INSTALL@ ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BACKENDS = @BACKENDS@ BACKEND_VERSION_API = @BACKEND_VERSION_API@ BINDINGS = @BINDINGS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CDBGFLAGS = @CDBGFLAGS@ CFLAGS = @CFLAGS@ COPTFLAGS = @COPTFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSTDFLAGS = @CSTDFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDBGFLAGS = @CXXDBGFLAGS@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXOPTFLAGS = @CXXOPTFLAGS@ CXXSTDFLAGS = @CXXSTDFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_FALSE = @DEBUG_FALSE@ DEBUG_TRUE = @DEBUG_TRUE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ELEKTRATOOLS_VERSION_API = @ELEKTRATOOLS_VERSION_API@ ELEKTRA_VERSION_API = @ELEKTRA_VERSION_API@ EXEEXT = @EXEEXT@ EXPERIMENTAL_FALSE = @EXPERIMENTAL_FALSE@ EXPERIMENTAL_TRUE = @EXPERIMENTAL_TRUE@ F77 = @F77@ FFLAGS = @FFLAGS@ GENHTML = @GENHTML@ GREP = @GREP@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ HAVE_LIBLTDL_FALSE = @HAVE_LIBLTDL_FALSE@ HAVE_LIBLTDL_TRUE = @HAVE_LIBLTDL_TRUE@ HAVE_MAN2HTML_FALSE = @HAVE_MAN2HTML_FALSE@ HAVE_MAN2HTML_TRUE = @HAVE_MAN2HTML_TRUE@ HAVE_XML_FALSE = @HAVE_XML_FALSE@ HAVE_XML_TRUE = @HAVE_XML_TRUE@ HAVE_XSL_FALSE = @HAVE_XSL_FALSE@ HAVE_XSL_TRUE = @HAVE_XSL_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDB_VERSION = @KDB_VERSION@ KDB_VERSION_MAJOR = @KDB_VERSION_MAJOR@ KDB_VERSION_MAJORMINOR = @KDB_VERSION_MAJORMINOR@ KDB_VERSION_MICRO = @KDB_VERSION_MICRO@ KDB_VERSION_MINOR = @KDB_VERSION_MINOR@ LCOV = @LCOV@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VALGRIND = @VALGRIND@ VALGRINDTESTS_FALSE = @VALGRINDTESTS_FALSE@ VALGRINDTESTS_TRUE = @VALGRINDTESTS_TRUE@ VERSION = @VERSION@ XML2_CONFIG = @XML2_CONFIG@ XML_CPPFLAGS = @XML_CPPFLAGS@ XML_LIBS = @XML_LIBS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ backend_static_libs = @backend_static_libs@ backenddir = @backenddir@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ datarootdir = @datarootdir@ dbroot = @dbroot@ default_backend = @default_backend@ default_dbackend = @default_dbackend@ default_docbook = @default_docbook@ develdocdir = @develdocdir@ docdir = @docdir@ doxygen = @doxygen@ dvidir = @dvidir@ elektratools = @elektratools@ exec_prefix = @exec_prefix@ gconf_CFLAGS = @gconf_CFLAGS@ gconf_LIBS = @gconf_LIBS@ hlvlbackenddir = @hlvlbackenddir@ 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@ man2html = @man2html@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ privatelibs = @privatelibs@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ ulibdir = @ulibdir@ xsltproc = @xsltproc@ EXTRA_DIST = classes.png img_arrow.png important.gif link_button_1.gif note.gif type-binary.png type-extendedbinary.png type-extendedstring.png type-folder.png type-link.png type-string.png 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 \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/images/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu doc/images/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_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 distclean-libtool dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: 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-info-am .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-exec install-exec-am \ install-info install-info-am install-man install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������elektra-0.7.1/doc/images/classes.png����������������������������������������������������������������0000644�0000764�0000144�00000451374�11361542114�014260� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������PNG  ��� IHDR�������o;���sRGB����bKGD������ pHYs����R0���tIME  /'���tEXtComment�Created with GIMPW�� �IDATxidYvsߋ̬uzi.eHjlZ Kʤ`e6 %xlʖRiٔ [lLZ\Lq3ӳttWWWWWU^UYgF{8w#22ggS/;GQƷ$n |aǼ=ƻ=|D4ըQ{Z`$d9uY[^wqq]{ 5jFSOAߜAJ\D "�K+/QU3 <pRFk^7ԏE^}Ywȱ `8L.|1 5j^Fox~x |ԋ@wf~``/_o4F 5jx@zTeSž?q{NE~?H}#�&5*רQX_TV/.%�{I8 /uT%@]{5i`e%x/j "|w�ry]T]vX_^^QI"Akx!C /rU(~~)DUŏHLDo<TR&�O~DN 9]DD 8@` >bgsc.}rX8wYF 5j/@]J_: > I}U1?]�:SYgPV@%Z-�T�HThx�j "PqN fs ɇ,Y`O A3T\0pH3$&]:Sz 8i`GӻZ~ 5j|GWzx. P8XJ # ;3 J�#b*pDL{Ԏ{H@ H1FDۧ;T! [b ؕ)'!ЌZDCotY$! bV0]fEÌ HmPJsFE`YywUxWF5>�AUR bA*UQ-pr1ZoG+ c&>Bd]m`{};[&1&ct ^ZL/)(bFӶ-/avi8y$N9gN#,/c0 4bH~H,@` éd";d�_E ��ϐgP@(?5kԨ^i2Q1(|m]VsX@ׁ){a{k@|{k^v611f1~&^"b" @|_$84hG#KsI:uz':ӧpqi<u ++-/c(3"14p&DU! �DPfp> oב'Ĕ_:TҊYP6|wXUf6cC@PȻB5ū9NvS0A $V' &=&;;vwUܽsn{v1Gv Z"DZ[kCҌE N.ATŮS M0_YFXcO<G gzgy'N]ZB4Bӌ@ #YrQ�{֪'Ht\/fՓ!ʬgS" 5jT`Q;Cn?Db))"U lyC EP4*ְzn]#ݝmL'v;#oωO6 JqƲ׆- d@F29G}!)жXZY2VNĩ3gO'O?'~g~�0C'7vi54aj\JH緛@G"^{N]ߑ,  tIt+yE?bg>nέ[}&Vb*v1tgݤL@Nz|,U<SH6.� H? y#`G,�hK'Wr$N?({ <xc##2Rc3Wt9J KkT`Q;`~?ӯ%9`$ VE'uHm wyo7/_qUܾy ;[[+u}6pտԁ xKV\7W⼆D& |g)f#"%݆�3" ~$WZ,>3<ǟyO>4|Y<܇pXZv=7 [xԂ[TTzR+ǂq-LmjԨ^Ʒmo{&p?BAH%-Ȫ6b{Wx틸z6a``0(Ta*:T�TtfKtn&Up�SϋGO��5~^T1؛N0hx4ɇ'3~?~Y<ē8L &�!ivg~|ćx<kT`Q;fU08e8Gg� X:鰿ݍMܸ|o&n^Wa}ƛ[@rۢ`{*&ZR�*/tn\# =|ux/YVz ʄHDzL,I8#xgs=g}gyeL `_vg_0C)+E?G,wk7[F5I0/xb $8vEQ�1`gy_Wq26VW1ޅN; 0xPG1FfD�V\^Ϝ#Ű}o;0ONxQHn;{= �b|^c{DVNC='|<sx왧)hӀB@,zy`h/e l{ 5j|�: /`.r%uclYŝ7p7q󝫸x vҴXi[4`XP&.)5M�DF�,767yEtŵg �{t?x=p"`L'EJD!TS1.*CX^Y{O?!<Gũ`iy9wBܽoW!Dq1ny|k�v:X)i6@@mXd-]_}ϾKcgcG hTD#"4h2#9PA P57gۚ]wVk<9É8axc(zQ`;E{"EalNW b|cu$L-/]Yų^<-/R_�no']ȯimi@(rqn+n<W}> g™U> V{#0#.֮7psww$&4hЀhb[eS ` �Ϭ))]gPx;$Y>Zb`ˆe}'<gAjɪ8W#BvSnj)'S폱;wVq>= "?YhFKhT}ף= |_瞎_$E[jT`Q[Vq x۪Zvp( nz ;ܿrw߾/_{ׯ^X+!`�Q`),=1Y@`FV* +4wƜԓeM g�V l?]T ]Oft @X9H2LUMazi_E[A#}N16'lmb{}^ŝ|O<$N>`ɊB}c7@^<^wy"@^{N_ !sY2&4Y�=߸ y,>_n:r% �1air@C`pbvr|c4mz{`D ܩ|mT>ͶDU0ߐ:1bO?ƜPf"H/`3xQK J>Lh@&obgckwO|cN:_%7v>ig�श;@QA HG_ViF%/v| 5j| M)+' D:]׿U,h9B)Zf4 ۑ)h(IKa6Zm(ȍ뾫H:=6 9͉JĈdd"d2٬>$L�t9E,XF51�[g"*^=q9 �3D+o~ Ogc)U@#*uw]g �3B6@ 5*רm,|�pӂĀ=Oyg}8p h<E \ #0F-2F�<UcBX|5vWQ4M2Bj{3�: bBG kꀱULBdI�D@ˡ.ɷ V{G^s(IqH#Wmnۗwⓟ!|҉қ=q҉e P<W }IjԨ^ƷH}']]7w+_/~޾&^01&Ln92<=  eq3Z* >48H/mچ>j6A̰=5j2^Gs(5ȂйxNԴ{o#R8@(c%0t"ŋ'@X]DhQ=s>)*78jz 5j|;C 7ߺg�kef4ZP<Y)M6-ڶRB s OHw&Dd6掠8* *t<1Y�QO4{+rS̬gbۼ>@F>$Hba{cw\{yЏ8S?ǟz DM⻮`T|-I3ZG|k*탱C]@f=݆�J"܋_+~+غrhZuO&k|7A Q ^^6˜&1Z6sdN! 2cw3lnDl嵐ߣxA|L\QΊOb/#H $+ל'sjͫyi]8ƼSߥsW_8ѶhIa7ai}\t)w>` DUcGhF)8=2;F t�Pg/\| 5j| $PT�;Fpl]C+h0 N6{w ĆhP=K?El̘pU%.ͮɹmhmURg L?O wwJ<3m]֦͝3zU( տ94$LHy=YG`/c2c>?{q)Q 9Xjֳp\j(֩hwx{G UpQFy}a^GY{kX(U_&(Xx^z/µ.b% /:14�_eSA&>cw)ԔLpOʯaׄ'\`[[zm59{5+rD@L5Yӥ76}%ȉ"E碔fh_Pm]�QoZQ60ZPX&Fd$Fo;#>'c}9�qa{,/A 6 !rÐ||a&WF5>># 1[jC=\yqi{Mk2KL,A [NpPK%}@ȳlamCsMPkUiogVj網3au'٪ji<1t6T7O T(Y;t'w �zw hT*=\vmN=%0Mhh%17j&&")q71=XWkx8/G4FL 66pE|w }KXz.N-FMc$QvqN Fod4 ޞ1 r ݆E`Ϛھ@@.DU>hAMm 0jZDso֙�A\&&A3cSSL:gZ!h|׃fCL7pװͭ-~O?ah>B]'4 vtڡ<o8xxW(2ī{BkԘܡ>2 uT⚪6 FC#1n\^^Wp5+K90Ђt�^&B`7wa- gp 9J3 "cּLlL34 Rk9=lJᄃU^\2mΜu;*zcቅT|a_+3$/D4̈v.v{P&4<#h֤fٹ9.g ʃl|ŢePqUyר^ �г|7RuXdm[dN;{}*翀[W'lZ4gX0hCAqo_# I?ͤS[ky<6i'Ø:#|=*C@d$T\– a&Xl~s|,0;nuzl% d-i `J09$BvMV Ûo:?#?G O�(Ѐ@vM� + U?:ZF5)*9790�nokn/| _pnƼ5!9'5 '33Z ޒ!19ϐqUd[f%,ﴎIe3gNHfuS^=%Uv{@UqOsd{cs!�M� ú νo9͉̍8LF$} HD{P2m1N,QޭI<nV{x>LJzamS f(DRua]/WC&XN - e@ٶ mZۋnp8Ȇ$x0#&^3Yu @Ȓ9I{jm5Є`{g6P_K ,UmGTr:)$lP R#ߒ\R8C/osOy[@MNRyEN* ZY^7>z 8|GOĩ{mhd{Q@YYIc@3Rfӽ{ 5>�E.m=>CSܻ~|E;ko]DÉ`9 @mӠmzg5v|w`dZ+oJ9n/ WId% 4]C|./~Vմ0pE`ҤC˃lz{}Cje_++r <1d7! P2b]Z�HD:D]&�mm�Nv*>i|''N@4F<3M_hʘw;Q{ԹTZ[Ͽ9`aFK!<0<*g ucwP3ճ.CRysSr0P\d{�� �IDAT.�I2) Wkr�!4Ȇ0˨9WpwJ:te)͹)ፋLSXX4fw)b/ [ouU;{'VpI|qiowB$i; EP.?[AFXPH"@/oM3׾U|~¸)a̷dXIFhMKQh*u" r3M䊝<W:7B?J\s@Yf`ynE*X"2Ө%!N"0C DD\B@ zG.k,{� #FS:#( BqM/̙hB^ڥ%� nb(H.Y;|X5*רqT~SpOy_xooWξ>9}el߾GN2Z0 d"-1v {۬|`*qmDhG-ڜ{J^ ֭HEU:ϼm�.Ƙ u_0.'<2C $ҁL͎N2IM}.3Eg_k y<{Zc6HW}AkÓ؄#H;wZ:}O>4'61"pQEP_SrV*ĊDk8 I_!^ nė3|Mob$d,[f4DzEj Jo8*MczCa?ЖH$DzKssM;g͐EspV$$:#bY>uL3d;p[Z}# 3[plv]" "DbD2aFu^Oaӏ<b뉾 "4VF(Ql,rDkx@pO:ptJ/ {߸7%|~wTԩXRňm*glXP Q~5Qk3YFwr"@% nnhSk>͢6Ӿd2jMd>FڕLП}$'e; d:@@ (.HqV�lEɓ8; Էf(LDzy;c7ϽOaЀczg"r6` ɏac*ר^iuڶ@bdD}o.&hE@4h6Tr`# ]D5;>BQzMX_k2ŁYU&m;IA錉0O&}+ڬ>!vb;Vu0T)Gm|qm$Sq""}D дΌ&sF2!@8tkWG{'N@;j!1C-y`I ) Cʶ?k^{/XxaNo/{j~wΝ_~  a hI:SC?B,\Hf-wM ;S=B{CE4]6ޭV͒6}^°�v&pBν"Qč �wΗ�F&\c~Vv~e5=[k`QUo}'ϜS>vypRG `Uc�v 5* <1! /NS6 5JS~*^/o@q@ #e3i8 kkkv aW"w/Zmln#%@(KnҌܙpf:+*z4X񊙙V4u5iIDwQpu E73f7^=}znii4a$=}^I"X'%Sl͛x_ũB3jsvd�JB@:X"i ?@tD^Q{N`?jM%Z07+W_N/-{A-|"Y&11t(Z9ʍ( <sG}X<* dbWIsy/OnoZ<vR$@<(b.jhzCށa7P vU>-(N(i/'ęGO?vSq?sΝ,kT`tlWsumtQhgn]/p+趶%`9 ,/&"Ì4D.0Ո3[66c0jRg<緙UƁ^DJ[hhq1a�D]bu>gh1(ڊeM6>"vMX �LR>gQ4~ �gqi|cҲ+X֡KH3EsPj| )E ; (}WmiEٗ_7c YYlPpYSg7'Ӗ}gM069S!si4 S`A[JE⨟sY8 4̵ř܅@ytX%١slcgDLvn$8fsLzv;}OBM!v}~MI۷p9?{{g4(d".L,:ԨQ+߽kJiZb`MW_},M{,+!>Ə &(ˢ*FŨi@ۤhfj;ہWD${ GUX_VV|%m/HtR-x^ ftɶz'%Ms{?O}N3A`ӟ-:b%IO':ޣa7͉C2MqF{{z^yU<SXZYе(7 `MqݔZר^XHyG Wߺ׾. F+ZYA75i Tr:s[qPK$(NOĖ0{yɇ{!,+~ ]B %CU+gNqyݵ7JiEHށ]DWߒ\HPFK>ޣ`u['@H6/g < %$$yoEV| ߿iC Y\{";Xmk}JDFmKV@n;|ԶXY^:'ߍьh4r59UQ8<_^,V^M-NnŒ"ZzN"zުwu:g'bv;j[6v=O2OVqoѕߢ?O9-;�n Cw)֖WX} n^n]Ԃ$vzbQ8`OYmo_ąW^M;(`9\ljl*`Ϊh$Ŝ<͇1�y@Y5ݡastTsV%YW` FS h*iC ޽T&ϔH1`֮% ?{OZ٦F � ݅5 #B@"0w>0Z H^tz |G?'z *]gM^,z/j^V5>(H?]@wpet[[G>cQ2%Ѹ*`mp1Oٵ/>79MܐZ/,=WT L@#}>^;ػxSKsim !E>7")�JE.c(䊱مm<„ fb$ƤSrRh/d,Lj;qrĈrG}9H˿PFp;d`K ng^oaok !F( "3s o&|*<K3:ąne-ɩ"Wy,g>Vy͝^뗓i�=f�)AKdƦ5[rRY9?Ov l 7d&`\ r搀V(\"s.? }.?Nll:1`Q5*ר؟~T^kwVqxyeIki `sT]3ݕybs>Z]QVs]R<v(=1,*3$J (y>yIVĪ?002_ Ύ-j�>< 3ٳgqʟtW䋪 F 5j,wCq2͛۸n<U2N5a5yr =('\CL=f ]:ef[;}3 bO$>[]JAe؉UQ#)VJ{U4GySy|)uXyM7n籱nB/?|E.s0_<Wz/XxQw.\ ocQT2#m! x8߹J~hٻ 1ܳ* eF8潜mg#ѪlZąn(ߦlzNx�Dk(:@L0W<H]ܴ$E2M1yJs:w̃?&:j7c:νq?ǟ| ' $Xt9a 8W\ 5>Xa0׾]Wsqm 0/Ǭ 'x>K/vtօ0z&Ӄ#;͖&i.P$�i[�n…b\ztdׂgsS-Z3Wi]/|ޏ?}3JYJG�&1nݺׯ?vԺ|ݞm-RHfF1U>wJV|,pC@=lY/^µw`g#֪o8d)lWtmvlAKb[9;Xssi*Nh@"v^eb^G5c#! `S‰y( 4";=R$qeig2sJ6?8O�-;toJ~ټr?Dڞ._۷onGlv?㮫QV5w1SHho…o`MpTcM<ggVXCe>|jZ0׼5E4*_$'( yrWK)l- a1F{Njzrf{E2ծhM~TWD-_K/z\Y�Nar);:H Z'+z'~ &I;7[o>|ʼn'b IʖuYX_bCzQ֕kUo`94htM3tUgڀ pgTc�{mRK_za+3ĶE!8ln�1-+Cb<s7GfzRݖPn[r@3]!)-chL{@T):}}6^w_AK} _ FHpW�}ݍ \xwoB?c h|]gv Hu`b<@YLJ`^~'iwE=́u�(>81fC8'~ J@]rwm(q%/@'<>ݫ?xO#M @XnCQe٭Hn$}Z7:8sW(vvvp \rG6GzoBV|Z7ov2AO~{޺no1ZCoC@pւ斤_SK6*܌L JԈq!ͯEPEpثt &ӌ_tM J.lq`'ᘼ6r W1AUSw_CQ!g<Ƴ8Oxz[7NgˋIV1ThD&)>{S}I A 3DxxVGxs({+WOOF4:y+qk|GYEߎPUoo۸y:#hM ɿԓZlf߮*< ԹzTp*8m۶$"Dt}?3ZhI-URU2sL 1.LT (:YBVu*Ϯa�MNbc�ԅ百񒮽X`_m>:(xe.PNR&0ŝ'ͭ-ܹsxG1fLo>oZ-[kT`)3.wUX}W.]۷67<jfglk):# %6lCTжW$_O8%L&L&l>NP��<'C'Lb4ln'a_/KcU1N wcL22j!3B٭% 0mɫq 5<s<VìNBucu�xwcĉ3�}Ok|hWA}7o+X_C2B@EŨ,Jq0w*?7_akŋ|<]ZZ7Z|=ˠE`o`^S{~ rUb<wKD>`-``ǴFGU�~y16U٣YWlU|2t̀G[:'dH>Nq}\v ?<x܎? ؓPk|jCľY #&;}n߸~ځeMWԺ|fhحY u<o0\)HcNZY+ncWt]wz;P١$paex#?cH!: `B:enDbw="!0eIR9I|Cyf7t~fqҌlChEߕ,k%ʄAbU<BlmnիXwٶm|l><׶| 5޷A^Ʈ:n]{0 J>ǩK2ps@6X5dr&l5)!467W[{kvx+ܡ wVo4kr[*lBp*WdjV@؅/d�{RQ¼}wgR;:-zf,"YH8AZ{ |=!0T{{u0Lt}'0k_Fj}9juXw`wg'VVm#hI>(}DiD4Ljde ޢjȎA  : :J77>s:K8bT vXBZrz!ϣ� T{X0" s畊Y| =/y:cmm 8}BQ _+{5Cxs\!(1n޼wÅh1Zetge€Ŝ<#R&� mBD0L(".ݧknv<wmQ?eyR>jI@K,v0 gInvR[fYeW}tkY] ]קuNs�ͲxP,>+5c&n޼_Z;FfuoFk| x`oo&�%Q,cZUV}.YdIE|t椳^V\M$ՙф. |)RV4"AHh�rUo4g*;')xR͛ <U6)z9D`2ݻX[[CuX^^^X_h^k|`\Y*;+vp-KE-Is> #)9:}c̐(>JnY'C1g̮:V)Ru[$c9p% s೬w]9vȬլl�N\i*C8D96$,ڜ{,.?�($BĦ8/r$f/p=*b�� �IDATcޚc8q"ׂ?n^Fj'0~:߹ N0Cc8;9jD{B(n.0XH .Ԓ>Ngd?"+0jOҫq'爫H$WݚT�T,psM)2Ap;!ٻZzcrPA/kgR.bk.?p+1, u f[]/ɢ Sd~@iF[X}:Ϣwߥl*ר^թi2ަ%({غ;ۯ*u &F9_e2U�ܸp J՚.mo_>qJi3qg}-!p"~~AO<?x@T9^|f*l'�`V੥x!<VT2yoHʤL2TahZ- h I2|)iP|ݓm2�?h:h! q!-lܿ=s,^p?5Q{:SV3RǻXuȤÈ63xF `r֩%0BF9 ^s`4 w"ǝ.lǛ=D[�`{5!~#,<OkPO~ =lmma}m ooooɝ1'y|W<_?,}xƵy/arc tgq /Pϴi`җ�'ہ!O%?!Y榈({\_&b^d[F Ќ *rx[ǀ6-Ff\kl,w!E =0Tߑ&Ү:ʦt%:ujh= Qٝy>'_G>x~ϙڶ=q4\ë/}W2.簴)\U*-'N?G{S?!7.Ëx:ؘwYŸB4+fG2:#s#Lx*4Fasct Y9BX6aE+p_{  kk' U0wszPȔ_NPAdd0.'9/W%bt|֫e>;c |8wq毿~Qu o#O}'?OI\W+Xy` q|~؏~oy A5rPkUm_{abCt3`hB`w{a:?yy0^uƷ?T>[}Mݽ6QLE~l2*F3^&%*1Ƽ>|)? TDw#_߻*_\xx??~?*:]9>Goٟʣ+Y[>Wnҫ|CwCO_ mHZ:xgA>�/]6j,-Y")!5G�=t]7(Mk|`]%K/n26!1jHێy+Of[+bYԻ3`0a+*6?g7XY|noK:+c??GE+܀A O,�?9S !/sq-E|M+xs8-W"989:@[}9 {yOj"P_; dmvgoomcuu#v=FhBsH[m:HfW7Uu}/3',<Y %O.$%T@+$d|yPqo|r*>-'/#Xxu_ƅ5}Dkǣw7?Wv'ßG?I~1_ ~_v/Ctq|MNh0?/o9?Gpzt ܏w\G_]a킘XN"<~^'ᝁ+1ԍ~R3N~:lx^{mר^/~F# /Y:Y-b<HM6}\9;D˲Ǿ8]xre~;e\8rNOɒBbV6Q(V8 Ïٟ'~g".~xK7dmv66p t7^K'n?o8bxd8sM-т3*Nf#I11UzoVV|T/i7pvwQ5B 6*swU#) M]ԙ]i߳#f}vw{tG{kA:/rSL7?_O?A]5 .~5޽"80i i&- o_G??tDs?mW1pTb᝗$Ź?網* N\^]V3?'IHdK'Eu�H=EE{5jT`M_&Ad-4HFwdB3<s]MϡDy&kZ.SE{L]cT4UG9ڽ_rC\껗/a@}gypTDca̒8;Wg^v 3%G:cݍX6�M秃k&p]VQ=ȶ*};4cF`d` ALLV%&6N .'1ePƀ*Halb VHa5Ҽ4﹏s޿Z>}0HS=ݷ<9go}߰:ߥ uUzN@^/KwpW7F`׸ Od,sC3eZJmB]*YITdlR(r{}?<S1ef4M5"Gy,G<6׾f{ƕʶf�>K|b4g &n`Mx<.do{7{!*yY<&\ 6)H&: rÀ8*pxx(V'U觭QU?Wc=q}^V#ob>G4hTMN&A}qE^ݠu !!pc*{ #Vq)[÷a]q[|?C?g> 6Ӽ~=GT)nsyT㈰{c}_ּ NLvoxz*?gp ;K|Wauמ/̇{xL7{λhr+9j (ϯskf-D#4F4 s 1fӞ4ZDj75LAj=]f\}\5 fѩAluEfZ:B\*l^=3 BD�`ήc\ O'?˝C~#.h9$(Gu(tQTf_旾6m>|mW//.JUlEP,f 46>:G,mQ #n4ʝ~]%>F` OBǻ!4Dhykf ("_L~r7_v^*DRxi0J6H^<boˏX"Z]Ndu۹ﱢ3E-n>N|lᆛ=?a}ڿH BA8Ujk6RP57>)oqQfC>+q>?+h16bAgRDD,8lø\&@ͦ7՛`d�إGⓗEu >=;iDZi$ǎyjL{o1?{s[~Y%zA=BruQWu06QJ~IjwـGĎ>W{q}*s c>QOqEo Y5~z f'TQm/K;DLT ^[w؟_RM4ٳU+Ow~NVw+_^zf$iSƃmF(9Kv^CL!~o|-c"sTk5K^@ieޘ\8SԢ2ZRRs*=~fOJ ~<Tlε^q~54?G~ sG+IVDn ,SO:I<k{/D+J_ctk ;a:~x/s7؋7LyS*ҠlܤGH~ΩaX_@*i QSKZsa^@UNk ]U[m2!l0uE2e4C3lí<BKK}+n)Eޮ9o\?+̯@30E* jPftB�ܜ/0}૏x(?(�8}fll·oگ7GߌKw3֟woOؗJkI*^ &>0FTs'nXDZq}Hŏs>+J;1&52ѕƜU2]JLzuePJ E̬&La?'~S8Z}rn?'}e׹:IznUT4v% 4\co'Ou#..ŏ ~cIiw~8wn2)q:geciR(Ozcz/p3Rÿ:.g`\}\uT/'l Wdi4(E5,OԒx*e *PO `A:xqxo “Kx_F`q=;UWˎG~|ia۰Mp7xȱ׼?pvׄpIDYYɪ r{襸W۠&\Ͳ0E|Ƞ?T)8Jݺ۸5^>0 &Uc3QfuzZl*أ֖ vW*LZji:`e|~?1?.H[jJ)~;U^Ժ'wsowK|zcOf/' bU#ǫ 6qJ>duemr}uwc8$!iWF4Qx7 4%+!*ݧW<َ�p6Ul(Wӗ+oCT݇O?Ų?_W͙ (0:x[?~5&~o=cG3.UЧĶDuQ{}L.dfO#XYt?3a ` =y�&8Uo�U |6 8ΜPAORۏqFܸ>^WfLgJN^ s' � B�ƃ]l9|4.':ܱ�+�*מ ߃|۱5=j5n;hg%ߎc�O=ٽMFꖸ|y=wl>?xa7`>o]K_)^l_9~r Zl {JkպtS+[}${]$ׄ`3Ǵms:V:(C4G׸F`k )WQdfopt3SmhDjɪ`ەFscRׄ{|}t.qjC>bOU&84艛O;s<[RH+OZWsӏzp?}WM_ 7c'~grV ͧo]o_y. x/}GߏuoZKscM_Q?k!g Xy0ʘL@۶bS,er\wn\# rJ `6LB4zA`3-dS9Bp0%yp KDuDůf;%$H[8xNlo(r?;. 7᎞+߁O][O-㠋ş۵x~'__=<w`NS.Kbr)pXJ[! XrT}h2't:3L1ۘPAˠk ? m�kq&(MgQ"l4UejxĶXS1Edi9tz(rG-kٮ9x7#?$T?)xŃxW?_e&\ �J&-P[%5̰A\'QL_@̘L&nl`1>ĬG�z{es vΜAhȲGTjɝƯe=>d1rZIVSo@c�d*y?`ool֬9. ?6GuEW~ck͛WsnO~�w-|.+g9EaciTF*Ri*H=h"}t]3nT2_6FPz-XFkٳgqy66ppxݢZ9xzhI3ӫQ4'wP0Q9-9ܪ^]{x'(=/|=Ξ8rLm/|sTl)]$7ï/g{l+_|_s?ؓ/@({MccDeTLLGBKUW{+_fᓍb6mn`:t>f4q(z:#!4 vvwqllֵGxD $P2Sһ1_|VA*Mg{SJ^իjat% ܻ7\8:%oBb[౟odڬ=b_o?,/>{t@q١[,px&^ʓOG3>O=+/\âqOTrlw w.? �EHUK.٣Һ*_q TaP=\t(n-셦lcMz^I{5F faq{nqr\5丙eWW{}l`R@D߀0c6T(R8ȰZ%pF!~($yjR;hs#' 6@ʗųQ35!WI:3_\pⱫnmv;m|!zjB4U7o=dy^4n(\>ZLG+yA2ѬRDzDŌ&i[k HO( yHɪ4*xםx˿ oGؘm[,h?s2a*kݩzq>H�L1ccs_M"E̫E<yK'S�� �IDATtXΒ ); p0ob~E`F*a.6BLw}NoQtUK">IL[=N[vQIB7QMW?Ob4'I5B9rV{2!*vgk꣐ig[m{X7vbuU%խGP<ZIl*`")wwpfwʹEXf`J*luR둦:U^d] ᖾl9WNf *`|+h @ɭ:C?x *xR&}wA%(⟏EX�N]�*5e9a4<^4nf_0 QgF ;<hM4T"J7pa&)667Ѷm U׸^ PF`ksV;;=Mb`7U^\ #Wlh&6. a !sKy'n@,gh5'/VTUjQՍC2rjE/ ?(!Y45ɚ,WM%HyhTSW9nUcSXLEdJA~7$ewgR[RVƧ)d?Og3lnm7T:=-$`?~;@?V}\gΞw 0`�5fHߛWm(P L\ؿP @c4fi)bV)W7r3HEkw=m IA<~U3ms ePk *CI2^ 3͟�Js[&Gj޶ILx[*ó8~:q/+bzKfJL+V핰ԵB;+R͓/<Âl:!/yU,{ dv llnaYP`šb_ Vi7"F7Q@XҮ#k\=:U瞍MpgKXJ8;."hٚ$a;x/^SSU''CAZ*$p,cy@ŏ>+3ۅ?TKMfzEiU) F%C+\DW!-)]3Z @b"R^O*ǁ;En,m\+Pg[Oy FSuUʘc]ׄrrNChX̦6qA%c<§@kqsWg*V]=wgϟdz 9] :ADh�0hQhwM=WJx Y�JW)FJҿ%~ 3kj�kAJuG K^t9 Qz) \GPU|$xMp.FڤN)-yg0�=}=y`nPlfD& fls` a0u] c3NJz\# fQvIM".< ?rF1!ŕSg\Ti_hXce+[ vswreUNC=3@Y4R np,p#mF,RJ-TKTzXK=Z Y.>141xSvS{-k`OI5H/*<)PVvss ;gv1mZ% No]~:$#{5?|@N& v/\}<mtjW|*!X>z{x JV` ~d=A<.U4UZG$aFgJk!V+_(�m^}UPr;*vbvQ{X2Prp~:Pw 8W<Q<xϕ3S6"oY ^]oۓmd:H 6bxů}|$}@|>YT֓-}Ͻ0C >Ĺef ju]Tnf7:![h]MiN3ܵ|+4ST"_^+kD飴 jMѨ�U^ꤪ؜ HպĹ抋bG%PtO~Ыװڜ{ o͙hNn&AM0�OA1Ԡ*PusCS>WkDs=bBILS 0m1*أ yz  pU+Kbջ0ba `mo]IhPmBU:ĥ_zNǘnO*9WuePNc{zljk(# u/ 8C5ƾ{9y`UmSPtR=}zΞ?$~*WWILWWT7gDS(C;yOy]x%llm= m԰E713CAP^zcJDuX1̤$PvIC>VW`95 hb3]uMֳ2Ȼ6m=lR]k]EdJ]5C1^[eD3;hW3Tȭx۰X {ߊ"Ke&Q lYL'D.1 n-%R5=ysJ\#GZ~qo&N+Ta۶pE}xx Q5W%VP7WR9PPO3\)o-!U>\) TH3.jk�`UX*zmPCYLgUqmjSgo,tu<ۭ^2E-+}Q}naEf`zE'΀za 3JGUbNҏ=>ѩsY 4-Ν?ݳh b*2J=՘֚gUN]S k Uu8J/v/^8xr؈B>|~Ih\"P|B D}xWpWgӋ]kqx¡DyzY&]nQ+pw2ýT+nW_Ȓu:{a>%.ҿJ.\zX=( 4VF$; eRk8]p@B7SiTj}efTqrf" ZMӢ d~.FPѰ=JՈY4�! }_ !E=3FZc jD_Ʀ'?yt{�z(J"~^!Hweb&-@TO~2eKE >^R+6WQ.|賩ͰbOs)Tnĵr3zְ-)}urӓ [([f *\sժN0݆B7_"÷avִmlayL76|~_\ ><%!g>RԄb)>;gD<ͭΙP_; 䏫5>*)?+QB gV:ܞx/clmѩĒ+=Af*n WWSv�iB+A'{VO**tĹd* =y zAK'BmLsy\(􋺾 ~wKqaIBg/v5cf4YE)!v>FT۸zwU4 E$N{q t5%nbI Y3 ܞo\`h o >$x{d&TY4 WĦkA::n7ξ>/TNv7fJ0f9{^�{ȭ[:�QErĝʩ4J5E KZ�^`=h㸚UOU:@YxW:I!gOVWU^'WUMu9^^MNtӢW!/()nԕ״#2Y=Tz9թ0(nt/:<ͦ9{tK ~Mmr@⣃)s&t@zAݿ\o7vÌ\0€JDGG`h+)kZ'֢st*@\L"Lf۸{7 O>nD끐rAv⥈(�A@@@sؓ-I w =SFNוLbP^jbvw7 7�u/Ÿ}SPRTVLePD^+QT*58\zR 锇)SkJaۙQf@yqTAX!)67p.&� Ѓ*r` vP4O`{ X YAYSA5HNF^g-NLJ԰چH iG`gu= p4tS+}] !1ooXHDHM*D�QEp�% �Ϡ~cFxR0Jedo{xWJeOvYu3ͨFsO[̝Y0}TbJ{%=m&#VֳXw yW{j|Un:3*݂J( @o&krBJ47XHxNq..^:ɔAqvB"Ŕl}{+�~ƀpʅ*]UxX*!2fӑA<W~>ی>~D~C#_kqm6w=ߏg~7_z 0M UR"ZCR ٘!WZMM-Vue<ë՗A+1[]Jٲ(Y: &GvP]QUa.Rݔ̸0 pab)\~z)ܗ7 a#jP! �=-0dpAΜ&(�1.6fA%B)Ciz5q`:6 I>ĕ^3Ei뀝Ҝ%*n<TܜZuNX>دq=ԱRc>LJ-5^W)oƓO<kW/c 5sOoA7k;T5e(uY]7TWS )`:Pѕ.VrK ~`-[*m"6g{$mB͈<{B=QҥV_\j NMh +LV_o83GD.66LV=ŀec.v.EBY-H,|M !Ҁ9@G~+試B)Po? *.(1 *_țU�>fG`?ы?_I}~roipY|雿O|]걚*4J*Mj(֥:8)+(Z(.kSEXGY\uWi\JE үQP 2Km yYVN2d@+qpuL1P*e'!PE-{ / "Ǡg.^.bhf$c4@$0o;Q{^}JPeӦQS^{Ko姉t\DW)Y|s۟Q�Rr5^Yh-)~2η`9')z!<Cgqu,bLB3E(؝؅UVLb1. &)*=?֕s򑳔A+u8n/ϰW+3-ѱv7hIuUu^ѭkŤդL*3=ͅwR7XGAEq(:p4/9 (|JJ|$ڀٙ]l^akK  hЀK*ij]MK'>Y7Pc!6O6YX�0O-n^(Xׁύ`>>KMñ$Sڿj~\w/~ޏ~C8yP=c�uP(Ndéf`9U9d!Ju ڥ\ ka2#m5( Ķ{4c:V@Ԧk6%EְzHOl0.69K渝ʜ,xTwY6,jvĈ M^.A8m`LhA\Ħ*h rӈyRB,πDsH|TbO;sN K:!$|q s*U~$K157"bY׿ x߈<C="%HȈ*2] *Vh'C0:p+fS!e}BYˠNTUXQŗ=j=g[߾W)7`fUN8�eBU꽢8gOx^zp+X~1Ʋ-!$V$1p'h` l;vs Zvo�<Q#i=EɽЎpLI]/J4PNQwY9;%cu;bM4VH^3j Ux&.F>ˌ>2b|3Ts8oL/'kUֺ+~Z_h[o{qs&9өk0^2ȥeT-[RSg#vW:5w6j{bװzO1Ϟ3fL20Yf(~h IpLDrJoK~zOJBdM2Iql!l^!S_6`]ZȠ ~Ъ͞sm�1+3"l3liX61*}4iDbj`qq_Б[˦թ5:"D f$dcg"hjUT8j<91W;{팛u>W M5M kN#d^tpEvB-c?V^ߞ .]—<0'g>[L裠sYNI`O7m+I2?v'ɷ]RWcfH:feT.^cY梅6J}V}e3IJjc,CLF30`wpr^쉙Is)�& hbJtfT&v1Yf@D%W=LA .`kgp`[p`cܴMPPjy 5#;Ynds5-oCg̼ph@SC) un\C�`}^F˯ =^ P/>1i stV۠UzuZЎ<iiZnaN%Q�" ^+;^@#ڦnDT_l(i|+|4*L&tm}QSz\>|VYֽd@}àvBVX�5(b̢x0ץ?9trfwt+8d\HN7w![cr<Þثu`}j�9+T`((0>Oh' 667alDOiphB!Έb̈lrn#1ޘɦsE;/!$n90/݆r�s3zM%0|@?}Nu=R#wƐZ}q?[^zӗR%�?ǿ*KNÒr7ǧt[G;VW8 jI$) zRAPM D ~){|P16M@^ZnРt5bP#^y̧lS5Oty՚(W.bOW>P3i @ J5[@=S# N-SzIOڬ7 "ҙ i qE<7;gvpYl`L쵔i"b Y;phݎ88ڣe lr:^"s (�w3Bx!�{\mϢkHZjp?S�'50u2fŔq3wh^/0�� �IDATUR/h .lX�E@bdVlu^H3UCZx:ù{[+' 7n־M@Ii 7,@FJ30S DjV᭵!hym=:E8gxfhG(g0vu@Xn\ŧ޸vT)V5urU//zGU-E֤3I(zJ;f>{ۻg1mʞU'`h18&B 8p4Mpp7cl�<)o"M}T]i{k۔ hV�m@ԀjeW$1$~E5Xُ>@]O�uZ2H264E`Kz"D9Ueb|eס-BΜ$Oܼ$4hB1Mؚ4&o۞z O<<>DH@h܍B6@ 3 @K%;FF/=r=HF HNqz7 2L+njRUYySe7Goi T.g5xN Ϻ0.48Q %7O5N J,XbjZlbh7ϣ"_A�z,@SἁIJ&-ȷA4hI%4`cd8qy<b]/ z0iAח*|T͏>Wf?.2G_BD(*]q�/K{7p}o71_,0_.X./0?\:t}1dXiR`ߘͰ3ƙM\= %7_.Q5NO� > D\h=XV5J>@rXjYhU^UZg'RêSӁ{;] S ?ʑQuZmӺKI"D`|OLKV�k\#;*S<&*gQ;{1WBBlM0ۀlbl9CK,0":!z^Epp8G*ǜ|sY&: 787lm0N1L0ΞĹs6g3llΰI&h�GAG@)߶&p!~>j2&O~jo=]~=Ǒ*-:_NxČyJ@'runao~q}on\Ǎ[pn­X.Vw]Q򃤒TQSJ r3k8`6`sc 6&6&S,s[]Kb|#>ĵ!=xVX;U`lxxw:Bk]ulVxl�z_;\$5+JsPoľyZ$;/ڕadZ '2FH-N6 T`!�<O6p9A ,%pM"@|QFrAerA4h')c{g6&vl¹s8ݝ-lm04hGr)Dd`.vk -Xǁr=li| _T]k޽\6`^Ǽp\޺+{{x<e\Íp\hO@%YoLFr޳Wį}tAS\m(&i0L ]^|ݭ[|9%h!(4j=W;70&<:bӌ}m:s3FV@IyUыث9ᆮSEe'evQ7mN='@ E{~\R:{nz!{נhy h2eGQ萉+0ѩb%Dj9`.ac <݂r'th0BikST gbw1:0 jm&x/]. gpΝ;[SlmL0i1_{׃ًj juz�Uzh0km]sEL[U0WWnŗŗsWkpMαitKN˗`XҦꊭ6' hX.%|^ b~̡0_s#{PtQ^(';1☗/U®s'(PZ6Um(VԈ+aJ/<PQd׉vI6~2t7 VSWy 25ܳ ,iVR<`dmXBXD U�NAO -B3seף iw[iTgթoX%*{쳓apDˏP@hYfSqz~\<Kvqų8 &NǷ}>i}m#2P;)t&KJy"f rŏk?b8}@^p]JĭExe|qu\y(GŢO"drmГR;8cbE G~jB}q{h#$`" H裁x%0?X"{r< �3iQʫZYMԫOw*f3W/ϪH g;*>Fpug*;«M@Ji e" =ݷxQU^ D�T# )J^$ET{с W`)2ÒvDn1'##7XW`ENԴ z6rFdwI\|nt�Em?{1 ҁs�#™7&8v8wDžstڢa ,[1eq f6MKfu3R'̥�ԣtԠjB3胲껺 硳V5d*{C<w {9pz< ^x+a24 dPИ/vݮ3}R~S٦U+h:V&-LU^lL""8 eZv�q.cNF9d7U\dgjqH!aZJ ]t.^CJlF5S<:6CXVyrx4q)"q" 82M@wis?7f& '("bzB z`9,Œ&=t`-z&l1Զ�nԴB@7AL6Bc-XU6n/Q^gy"f[ۆ@Fvc7 >w[O>3[ywݸq8 uN}Z.DM޹ >Z@pJ}M熲̟\=z[5<G_K':6/^$[fDBNb;<ij7nkȓOࣟ|îRtu�3�dN5ǜGnJ꣓bxRQj'Q v:ch*b7Fdd `:Wni:`[[!CK`فbd0By?HfkNz× >P[W=COtP;ioTµ4քr9f**T= 〨G@h 6 ζW("fWr7U [BDbt,y%O-uo [h&@(,la д yk!S+t 9I)(W]e9%6%f*~ 8(.[}h�ТTz,%bks;/=_�q385fcaɢcg@h.u)gaUɝ)1S0w֡[`f6u<&5R񯍊wuhC|)*3QUS �X"+/'ǟx^+7obo"Fl�5}�;TrhNMUz㪟\e@KBM8i MkjջۀR߃s`~Ct>Cd"BhC@lzOGK~•kP ؋P Պ`;"*s צּjf$ H8(!v0OhF)5 sщ")gE2ƨv̕4!f8Ma s+u &iɫM^zdnl`TWъ}*[m;h -{N;�Qr-T dwP-8&'uo:C5*KL=mCؘM1=w݃7>�؃…3L�FvBh0wK@ M3)#pm9@4G Nߗ  UKhP Jc>VUyR]T$`'LE�8qM<sOѧS/nK$4^#VsyNV sy*i6A!*U}ȃ@`krb  8_E)6n1 I [[.},NH=DZGsB@>!n^/Eg=iʉeTٯR*sU']쨯x#r*'@Z3ozW4"Wtl  ":b,fXq@s#` 04@hm!XQ D1_u@M(T5bs8Wetk0ϰ*bߧJ71LՊੂ#"5�HS6K3bpp>p5<3xɧ݃׽n\pI�M6]*r=[(=. b;g9XFhYc=:yksrjoهG*K\?8 WSO?O>{)x:"s� glțң($3$�`C`IWOVh!2XVh4G@btZ?{4("E(EEl= =yC@I^.!-HA9qpO)/~c­U!PU> /g)*e񶒾]l 72IJ,륆g̾)UyTK#ࣆh!`,BChC 8$ƒ,B =H3 4`4LhJ.:nj=6Ȗࡪ+`D`Ek>nBQg6NPVAP6V{Й`Tتuގ I̩AU\2{37>{ .ƬcJO�e<LR ^X#cKJ_`׼O.+{dB6⚐ɖ%MRqc~._Ƨ?Oū/a!hf3`2p@$rM;A3imw6ب'$cVT5VvըWŠEa*36*v'}jƾT}vD ﭚ$g#8&[.%7<89{4>F)wb.Óܡy|Yv>VU5 JqKd&=6>^r@Q$ afX @'-iCjE ޴;)mXDoXDUMĉDi^ut8ϭOns,@5L{9^r.w tC~i pjCE#PQnu܍7!</}ޅ3[&ٴŤiL雰%q3!+q cwM0IkT+sw J@>-tPuK<w}9= ^|:h22 #SLfI %F1jMmDˤ~>z:L+ByzfTNY[u1BN4 M:Fna hmeoiYzc6 j {8Vh&-(9h}[?slݐJR6V\UࡢԹUQrHJ>j`A<PqOQ#E̳ ϏH�:%,њڝgbO'8Kbt[5nBN(k6z>F*1 FA`턓�C`QTE/-I~$nyTj-hW3,F;ztqmo?<<>[߄/1N�JD &;v4a^?IiPXC]08"F`o#h<l/޼Gyq|3bNm x29޷-i}.ǩY45U4 CCU!RRHٳʗ J NsK]T}LP,5gz@La IUbtN%3TzP@@>"pF;Aݭ}9n.WGu*7Jz$6v @bLs> 8�Jr+Rb2Sgidq%xU�"QdKMRmִd3GO͌u6J @,}G�*|pˋ E *TfFFFwYZ&$Qk9q7$#V;/R.Qe pZ 疰 168ń6&Jx)'9CEw'(O#193nm.|P#v62'ѐ@釬 {m@K%ΕQf6Dyweaq3eaϠc7p;){.~?x[ca3e,w,^WG&e)yЬ-ݾ_gUx~]&wS'sH3Žsv.^z-<՛>),O^SBa;<,WH,N@5He1T{(EoZ-*W Ŕۣ,0]NEp~54X* ya7(K{0 (͠Iv9o6m7Nxt{>iE\E9K=`cڠݿ1aw#,?8u;g�X2D6͑"?H B=;إ#pZ3&0,<�'_(hG K`P=0hy jq]afWCJאu_vf_:w"sFAsɯfs7d F`X <Xi89Au3^Cܽ{|p|z?_'|Y]#0 5\TK@+BAfQE}v׫K֍^;\o_Lq>-<{e|;2MH?^adPΠIIYj0TӐ (ۛץ7Xc=p26&zrȚh)Xf b3<nN+$Ҙ0׭'!D-Rf׻bkreSd3dG)A6(ggntxcE:Z4uy- +Fn47fX'­xFxLZ𫆾!_钱bLL!(E)C!r;$Cp  %�nh I 9 JJqX8! 愔7( 7ZJ6gTX~O+ !>v�*\+G d16  xsB7fBDe~ 7: Hϲ-;yn)Ї;xû`R �� �IDATٟ?} F%_`FeaĞaJj<YuEX]JxeWOr[4 & (?{}Ͼ>=?ǎ?L&HHy%qf.6Q!=;\]8*Ḭ7x R#m\'MbW<;[$ wt_} x$�R E' TAiYsQ |H3SOO¢ڄ*C6xV34 St/tPkVwe gҺq)80 !S|9>b(Kqf'p2>#`,A77J@HUg&+$S4DP@$Rvx!\D.:cع^Tki22*$E [<K ʼS!.0x7"e2mPr,-%o((\w;w~ ~}λ?OLP[] g_Vl5g e`吪pz]{a;sx؇[xa!޾{u⣳3,I`<MH".ɽ{Uqċ<(I. ZG|bX¨:KqÖɶy{nK3jV�.Ə s1�Μ!2@ՖSLK HW=şp,A~ g KuHX$Ovv@>�FMku%;@>#&" 5C(ޚB}yi4*Ş8CÒqlx-x` J@D^pIf"1'�B"  v89`nLS`2J5l6@QZ1-j.f |e 6W[]OV'oA\=@X+5/8;{''Ǹ<OO~o|&rNX^bkX9YM!ʫ'S9 z_!{ua ?xUay_Ͻ~}7o %plfnztU]y5DEbˣ?P=lq-\뚹b09 \\^N5OE,~%J@~ؕh@اj K $c-KIf+pI hn$w@JvynX}*ô,^ C˰`s͛:*W?Î~\P׉zk=g$$&kpv8AaeJcSP$-tx` Hx N LI3X۰g)@hRWNu#6=A)m6B z@ wHmMQ%+V_!8j+L -ZQ1_a^B"`Vf,e^I Zpzvۯ||?ɏ{ Llxnݬ *_Aa ٸnWS~] oR@EÄ4J ( 3.[?wcAfߗsN]J iڀT$8%Ic9KXS={`Y�mV5F]Hq[+j "8BokAr׳fH+76.~xΓJB :VӘ !ښ6MHG11՜E"t'H4<;?ӻikIxLrr|"+ Wz.U8a`VwxSb`?Wi:y`!Ip4NT㝶8 D Uq$J>ن#"$ZPiRaPȃ ˥n05oo$jƽIj'EW@ڑ.w#5V* ;5"x>IMG(ˌyCmZ2Baֺy6YxgnS|]_'mJH"XC&-EV|UB<!ZkkX3zvU;g?zylql61ma)KR<EDkb倜oDm |PRED(,2YfWC)>PCS141i]aL1%jD |5,q7%b8%&C3WRŠTb&e6UXjq/=ϼpp~Y75}LlFƣ~mf%KWX9mG5b·U v$8 gPMpj ;٠ X"qQWE@&6䎈(yP3  hL#"AQ$b37E8xւ5>}giX"d}T_{aId JxaP UՆN,h^* ϛx,$ A?^z-!?__'=3}AK)}=Q0DX.쿱|9(fdX]n̫/{=Bqad fG'8Ȅ].b0-|}Zpei'oSzJ D`ݎR[=d h,!'!RCjgƷk ՚fM\"r0^m}@#_)yչ--vD3I,ȅa>Ip}Y:$a gN΋WlOu ʐ7m*B3@p?R؎m©m o� '0g' dz}!&w3R~ IjZS] cFs&@ZJQm�L|M90MLNn4eXYU kY�$D$$u qR8}Ov)>>_xx-ŀf_:]M(ܟr]ԯ ofao g ;U<8; oxYp;a#f 6%'(̰^Xfɐ$P3H1(ROKYb֬tx z4!1U!^WJS!3RK?xr)(tY+7 ZCX&wq373}%jb9T (.znfùzk(_Űpo8ؽ_Ce�JtZ?cH#,g?TCM83b/7rKGGLbA+@\TLvO'Ԭ8<ā%֋8ј8rcuTO a@ rv $54''xS蛡BZ:<</*#,sv53:΍q0>EeHBet{ܻ_9<|')C'obe(Ė*!uAkYʯ/B ua-~p>/ z-_wλ'0ץKqBqJ, ͦbͦ2h4)Ojv ȓ ) R7�5̅ؿ/VS9a=ym{ęeA)#Cs梔`6g·G z kAi8&R%gԠb3s+{^"!&%HĔV%܆=8dpX'am=R]_W n #M;"nB=mpFGx` p آǀ|�a I0Rڀxr*TjZ'x5Z4hG4@+.j7E{aQQk%TVY|5ցH7hԔ SX]⩨kN4#1)؝ sAYTgg'턹(f]dLB!`Tn؉(a|'gŭ7âX`=m 7n@ŴI89DI 71%;v Ml:YS )!e'iX&'3ܦ% 6Mn0:SLe㍝vIRc6RS!G 4pc'2 }jR(Iͨ�jbӀ\+-F@E%2kA!wb|v!nj5p|ft_AU-viLc̔pNQ?.7XdʏA)<S$Ssn8 OwwK +* !Eh :[>.«zay.\ڪ f4a>c2uc<hFJUBl`+.'9Wʥdʼ@M-0/{̦W^ ?GnƙPѡjMϴV4~]ܯ o>ㇸu6_ko*f 8$,Hf$� 2Hr{s<ʘ#W(2%RݪyD=jaf4yIҀ`V?qiTYDkMUǵ|ё] \#0W1Iʈ}OUhPVOK ౓´q 8n_Bpl9o<!foѴ Q~}hw6wҼ"^ϪoQ si~#dIX@ؓ\NLb -#t,[g39o�NPzW V'Qa"UNߑF-P(VE'?(2$*:V_! ~F@Qg'm~pv!.0ĥ"Dy ög2 840h$�2H)kOKA%$n:Rl[�qc;9oh)PrN{E`vyKvB\bW >9~_~ ګ8K Ob'1O ND)^yE!zЁ'/"$ת3`LH9 1"SFY Jhɜ2RRQT,Jn'ǚv>XP{D]J[g:@rSF)CCc1 (0^Qa`�bK] R_cL0.vu20Gz&CCgCîZ$:JAofp_N; ͏"^b]dy c%TٚO,HgOЃ<풢@vab{Ǒ:"?:l^Z>瀄_]1Y:"L}-d [ 1CXoNs%jȜ$ t>2/ 0!c{�6Bl1NppzzcLml'A"C:6~E5 "_?`~] F.5ô6{~/W?�'l{P8yo7H;YH0mĠH7la'ᥣ#X #mJ@ F5Qhph9RJuggg߸B\Y^ YBhﶳZ:!ɬv>hp5ypX~V<$2f0ZM0[ ھlP%h.3u1UmU:k7 NWAkmT[ULQŬK&a@Є8ǘp5#8o]!xJ S#́8fI.nĵTd1 &5ޫ:-PzA9 :' ګHĻwD!7j-\w7x@( q)D縷'awo!H2(Z%/ c؟w?cO՟4d4Xi[`4l' l`ܦL+k5 _,rgjxC7ߞマjУ(P-7]7&9Mh9t k"D7#D#Y )琟qsQd.tKif6ČiżaZڍ] @ڑjP~3! ;a/j򗆾 )-w ,laвVV 岘{['X }zL)o &�[bH䉓)_á@jDA#·qprK䯯uXXb ڌg8 '[K,mY6v SLjF1^>j#e Q˓<ؚHz5@=(%U<I =Fh4_o 952fUBg3O i:gn9+gxgz&Pˁ8e/OW! I%YL:!s uuaMc.)mz`MN o7~9:M,Dd<; W|H)6ݣXYnw(Zƴս*3׽wׯ1~|~Pz4E$�0FX h:3 %Ƽ d\RC?0AxfB;moDf.1dCY͒`njp {%#.4yaW%` /assk+\GXy.Edf^o5(܊7d%q_qFNh8±mp-v|E([Zc &񄰐'1#=݂FLlg� a0 vBD5Փ1W|hŽx f |YlؐR9?L@XB6[  2* Cϼ$/*y䷾$R7AVɛXWA2k}#4j܃ڇ{Ͼ*ͳ'L G7Yy ( P?BCNcIy)@ _v!ڸN/E@🩘v`x340{Fs,n`ӿb O"4QUWgw>4;]Ǔy7V0\aE`97-(D)s`Y~)⓺PHb^"ϯ\ϣ^;9I:o+cT5k '8Y`&b!G$o9 $NPD6gzYLJjV3a㫂>Jk!E}`]uLD}O >[*Ɓklw|5qU9vhz=1*Nxqw*OR}̚Hl9y )5)+t! kŲ' ͯ?ͶŠYv2!>euua 5h{K%f#|vvW}?=兗q9BnSh- e8O^NG De7i'053͍Q,)j8$Eb}Kc)eY]R0MԐs CWz%H2 03/`;o0_OphmH벚 3KCA c`rA$*DMib6hKQT"a(9p{eT/a L\h s6;9]G{)1&=7Zq ѹ_)cƄM8U YP Gʎ8q1҄,8mw@|;A5W v4EE.\v9ʋ۠yfjpbtMTuF-7FCVB6ɲYLMTM_9gTXw\6["LّR8~/2I;?_?XQe^}�-cY�� �IDAT u~ wׅ/ >8 WO�s#̋/ރд2eɒB.)\dWW w'IsરS%I7K#1s0M|] {RJ\Quc{Ng^XQ9v# dΝ f1|Q wn )Rb*tᨇj乻 ĭi$CƊ 3dM UUBVƁGuÏ1eHZ*S_#%aO 8aAnsʘQ8cA"!@!i"n݉p>sDXh@TN 5]Tv t4gzyWLGw+zX1V߯hRhF]95 8!Խ猪T\y `:%-Oҋ/#1'c7o'nB཰S<{1&6 ]4{Ֆj5_6{˗^Ϟ{} &7@d s)(ESb.]04Ձս+QwnSJ NmVt`:KbQg)ʼDNٮ UC\δp3InE7kძioH>_ U]`ʠ( K4/8+Ą 3$g7#R޾25p5'$ĀsSPp5hYP< %2vPKHU98o$mܘ3 ^¹[Q uNp=ǢވhUxR(';7Ҹwo$?t!)8:{Z1Ʀ+m^ 0;CaEZC@ɀ zެ4`ޝ{x֯'?`7,ʮ+CY=z]UH/>`2ϼ[x`#%ŤںNSL澟Nʽxv@)vAXԋi2j먮ORB)kB_<ь78MU@DP<{F~s-Ӣ$%fx ɊK0uxxFҘ't& ]'KC!-(|IAR4QPm΀35 c"H R j\UsG0uxOp͈y(<L 7fcqL[҄m0lQd -3i<mbaQiDvw\}m 5[{t /fl>?OU~?y:3 VvMب aW4]>O >s͓Kp0sg+4`Yf=0G ?Iv=Wp<T3ׅQ 7#KjXeaQC!^y= />h{صS=ll@yfWZ9>\;U( \9Lja~"fs*?eYݼDݿ ~zrƲw'͕K@pT`0Yאvw4( !<khQq]@7eU3}A`+`\@ UȜg1[Q9z |4ڳc5^ۚqe: .kb;[i>^n` A+Jdu8A{[vwi%Es(ԑ5dM!z=jZІcv492=uo0Zo_%{&} D9AH ;< HwK' |߆x,Dմ"VaQLׅw2ͺc6(zpx7R`#hr-l7 ٧tD&3= ΂1݊;\; M6Uzhnra@!7a%U;1Wo nk40,mpM;%]'kVw"MA(v3HʊxY IIh@K˹9BPbq^f27w2gfPh ſ|fnroF!%Sxgp8XcX$l`y [P|=ѫjx~%?{vz-LV&tL uhDY/m_g^I_r(JR' xߦq4s8�ny#ЇOD@T%7@Yf)oQg`H9t >O/oe+DP՛RGUy ֵuaŝDtZc2$\߻[[o <3ǜ,}_;(u/S{ uHMZ@s8 AF+l5D|ž^=v=/h<&e{s'NUǰ~ ^VeevbG2\ 5>yiȋB7o<VHׄ=]%'ҩ) 7SP%xbu05JBt#F#rM P]q "nBC!!u? SĂFZUS}kvױ絃Uo}ޜt ,oV~.m".Hqt|q@}5b0Kװ{(*r#1~*<kd &G nkRN%B28ڐ溰#0Ę wz[}PصقkzKصNjyA+aHMj%}gZmmǩYzj@Sn Qo ՟{#{}GA n"+Œݺz,WJYO# ^ӝ0Jh6Z7UR˘AUF+^MB?%,{~?c6O6$s<!D@jEOმ^SdҚ?57ך)\&1,&$8n T6mK2ixaO^ LQ῏{ ]sWM}?j>/+M0HCZ.[VM] ." f u\(ll%k59.[bNc,0uK<aޟB %J NNNG ԷIȭ9@$hhhWnAzT.(I|gʌB/nݾ7I6`@O9Όqep}G%=$I),j0FN9&u \uM_5d~nf@x/fqQ--Ӯa_Ÿuw^ vLd]܏ ;X+X1xSE7pqon#@ _J50!74 \X&fLWCrok9F ')URsY j :C) 6et !mc"[Q'NKJ>ET'@n1Jֲ%}ӸMWy+}5:4~VW}eԨeam#cT~IsKH>PɩFIS ǽ[ۿ-|kOO?)G|)J`TJg%c!Q>o8ua孺93WR3~z{&0m`9&<rYݡvk__ œ#&v.ꂾG٩c73ct7MT٪QDR^5G!K;{}7a7:*jÈ7Fbj26pa!ryU?)�`l T  5Z ПU = >q;ar"O7L F5erc0IH){0PJPs[ƜuH9W>?;݅_Busm']-Ӏ\6Ώ|*}]q RlUAi+ȗU R` 7Z AQ0G]MK0,޼ |x.я~7_Z +3˚E?HF5BԂt%@a΀>3o㟟<a{&T<ͧo䝱$@Ii/') @fv8H|pxSLӄeY YͻjV3iXʂeY@̌e^,MVpVߗQꦎ13O@]zHa_ddR_NG): t0SzAbsҰRXث̐C ,[J ?FZYЬ *PPܦ-$A=z{HAHizHR5}4wvM<Ƨ6CZ\D^uRx8_F<{܂=ptͻrCuK+7 HeX#MѐF7" )GB⡅3i2P"ɃztZv8=;ǫ?n޼&" z#y:WBތo Q<UԜ�xQݛAIp2;٭g'c*fjGʕ lxHr0&e1c;MDҗѿ~0;??oL%`~'ffvM0aL)03}Fr%~E!4l Uֳ:dmHuz:y B!ׁqOV@-0{Q YZaWDԠ2Ϟ@,ŜD"y.թ 1= O^!G(&0L`>fDyMtM3BäekTmM1":ɵWN4:ȍеB<kÃ`,%poeV[SyAg+j+ Я7VulwE_1<j3Dة)iؐX"cNR}gw񝧾|ȏy`(mWc-CkFXn ݻw6H-LSĮVK*Yn<3J}=Lm ;Eg3M΃e)˲|wv!72-$&ef:%{ۂxFNԂp=VOu@==fkƸAko̾Ck8�z{ ;eO3\k޶եbq�Pdz29EVwC[؛7I\-v=ujX|/qĊpVLCrj2./|Pb ѯq.| r/FM+i{ީh ,M~�|Y=8{{Z~ٴ~M.>ն m? U!DI~_{ |%=>nL2RvG:fi{uj@38mqMuK-ɋ R/=byX's+6Zd hSB{5-Rm b[?('S՛ԭ:jŚu]slح7I*zo6RBZx?#sixAȒ`4UĀ0`vEݾ,#dytE OKH9?<} <Mn@ Hں(qJ s2썇$׬KS] vz@[!.ZMч.TB,a 5NWFP{]7d}1ٺ ?Wil0걃*qyDNSbl{HbaY.KdY$,*AxMfs~|oG?L4RUم_fqҿ.T !vkgx;l)а5F$ٸL-56DR8sIiBV6;:,AJ}H45Z[|6nv tEՋ8reVLXٓlӸAá:xu}@@7Ld=\uJ:.Kkh_K6xPBA< D "S -]kn1- ,dB[dInf%0M>uRFN$yQ70kȋB<vueB8_մP9ޟ!i{ vI\zB#j> _ MU6 9O<7=Z�UO G\dy9JF.ݽ+|{OO=TgpK5H>wI_GѬ*zTIb){U;!΅!?&XXlsUFЋ$%jbAZ%!k!zpT}ś!OE䌀*{fh)IWCW͈:A&B:&vUuy*Pa^c+ܘ%e]G~-œۂ5guq9٭_q 70 â�sE!I.}_IVi$7M0oE1/Ϊ$s$*)P(8Y뷶s%l5.lF;w_q]ZF^D wZ.|{}~ݮ| l@"*d9jB✑p@A 3%G?8> "fA`<a+Cl6?cꚯCUpt_G,#udžO#|wůnƝ{0 ('-(oaL;l77lG΂imNO- eiI ԩCVx95=|ED-&PEyA%N5`^f I|,`{TuuGþ|mW4.jj+�Q�uɘ5AtpUd%0?9aJy.] 4 v1(w3OQ6kEa2kmͷ,g§#l�@x -ҠR q)!{QQ?(4ViS]YC_ ꉺzRacj"`\Gͬ^6JÚsx)9~'!R[O6dU(>҄Egħ=Nzp}+x'v&h({MׅKM܁F9kogiBnQX|:5'GιdrcuKZLtd!>t5BUׯ_,ToyUᯐ5+"9|Wg�lS۱ ~3_sm8&աh!뽲-\i{&{{>)mL^Dy~ц!f8FX· ]Apã Q((҄PYzdxWy0ݫ=rw0{[]s.x/6yi kW卬O.~K%o\cMv"~q܊_lVJ>Ǒu(ôsD:Is֤w($Ucp¼;֭?7/XR] *vG;�{{35w -~i)%dVeW 6R -bFr[M~_w9T;LVJ]y^9@ sL8 an3߻n$ؿY7o~Fwe}O5 ƴ[DZ~Zrf-iZRvUCMk_J*ȓ$@Qtg C1-tFh]f4w)-d{[KٳCQWG tzC2JQĺ.ƄY7ѡ= v7USҊEXV|ٮ^q4?/&+dtI^}�� �IDATM@4@Zl]o-dנc$/! r< 3O 5,̋`<xx{>47Pz/ihxs]د8ɆN{_C-O d <!# y20eX j1@81$yPHKYi_T^//]SDYX~sx,AK1yF SvHZ 3 imn03%A7\G+ RsfX̛^_Rz(7_Cyތiwha饅pSn)FΊaۦl%@\Sl3iEdPnjf9.K9!o2$sPx䒣T2Hj1jPuVkpǞ.e_D/IRn/j$jU:P٪@e1--)l=5S 0.VG߱09<΂Ձ !4&S !okMhKk4Jx>u;LRf Rwmti؂O>g}yM[u1pXYdyh>3( o 5`6|)x;xާpbnF#1ŤlD`997n"nřs@ˮ]wfxLɦ`v(C]B<iE}J'~r;0[ܫeJ}-z) &Y-Tmoyl48^\㶲h}QRUx`VKuм@Vxiw x{h8Dd)mͣ][2Q5Gqui*|RxinDIJapS(Fɕ^nlC֒.IiJJ# /ڧˡ]7Z'}@ӨL644%8]rw \_ SǦb0 a$ ¢TfͬZ>*)iE]8t^O#daGɮ0WIOvQ7,v9ߓ?ZY_Jx{8YfSu$6uX-btE!k"apr1lB^(kE!C&uy^SjNN 2 (TÁ{5$qX0η6h-:b:vZXej88\f#7j 3_ DCpjA+&@r7hȃ:e+`9O1@dmZ׭MSHK)7XbZ54kҁ4rVi~>gs!L_os> G{y삄c$Zbn6lXVyCK@5z?ء] 0؉vH` }`� 5LV5*"f)>o7^?!fPijJ_ _4_~'(ĨIo|1^{2xJL5& :\Y/eY|DF(qc2Dղjx0n3o$%_c S )e8YWsIP2p�+mRgOs+ XYDY"$;qj) 0 6wF0Wi,[U.ūvkL!{0ͮ\﫡!!d ! ((+F@.?z}�0$*H@�AƄ$!IU]M{Z|;OHꫯNZzѱ̉>]Nyr4gZ_gNQx v^k !B-=pR,r=Z6;ĀP%nU83U$8ɸ#ŲNXWVz[crF=p,q~ FRe2tEt+'‘9.?ߝ.اKi y�<lA&+ Lz29gMvڅߏcxp J濒Khd!Cɱ#- xal՝4 %1J0Z6߳S+myD8^:ˬ߷e`Pg6ڦbExm& 4vϠGU0Pq:7uW43g,-XJHFFerZن Aja|R) zjMߛV1V%d.V)=!}+6/Ypz- s9)鵠1 Mz�>FQB%XYyބv.Ėo{,YxhF#Cyb ܮJS Q)ޛH4�睞' Q)aGؔeF I\;j*ө}駒Nt{qJ&@^,u& i+0c LQ≵V`rN8 m `¶mp9`ɒVFnYeeY6F% Or ;'D mص c(@e6M´.{ 9>k6\STENB/[<-hx?%y^Q”%<Kdgl()�Ρ k 0e>O6dLpRK|B{xE)OP`)o#8ҨJ9\q: G)qN$lƔ(L\5-�p /T$\M F98;# :kk:CrZOh6-OuO~뿯iQglHlNv%'\i $ya'dW40z ;C�\ЧYh|ᚱed@FiH@8;wb߾}8ᄵXbBYu5WVy,@Z0GvH:Id?AI+=LN{0`cVsKb?:r+Yps I*%u{c~Ү !4tBbƴ($8BīzٚV@XҢ(EqkD%YƮrOƈM\*1"$ ^z9s~Dw þOP<%arMg] ^ޖE$'&��8kXwϳ n�plF9c=}f3 1{l]=k]i$"jʽ \wKH*H@L"SKd\+*VU|$(Pc\NGp:DnBg G[l=L=߷۶mæMr3"zگBD1pfCb1D->^mjvj}065.&t# Z[\y6S &Su<&".q^J;|9 BZg?6/jZnY]EovЦ,wCO!7R,H4q@G v`3Pbb93#;)Hh9q*%=<cÚXGCT Z<J`]"o,v%R|EPY*7Upʝ޳pǎk?_ɩxC`s8bX_`Ժ|y 1%JS4'IR}LZbz ۫Gq8-^)A!u�T1U.F怵β?x,Q8 ШPևnn;vnaL$Ex xS\ C`~x}؏֩3v߇v Taelf<jXˆ'D`H^2+KG:ٚ� E{5}{[-8.x՟{X^;yp{yD8"dʺcPrZqxO47!�Aa*YO&<ď@::'>eA"(wcdWa*RDjX4wz-.*6ؽoaB:oȺVac_ in=�.ZWR(>j!vU0Ri*?rJ0jK)MPWMbIUv9{)H}h2=6& t}}M6zÉgC Gk5\q3v8nvP"\n{o>uYX4Vr¯Xp.J[Ȇ7/~ [۾Cرw{]V0JTn9t/gf v%pQ WL"Ժ: dLQ```�Eaye{x0q@eJ<M.PӲ(r3r,@N*{LcMXb<,]) � I$|D (L~ZH;FmT!eFV3asg>%ziiW|2fϪ]4,u?go?!@My/ITEIsa$fIrBX'R5]ZV]I*_9i+}r_t+rAC]dW!h"1ΑuS ic\qB485VQ>>+; gqܹs6VZ c`.f{S/yV#R}uc#/Ǻ[P2aj~$z0^-˽YDc&@Z8xIh`G|#di15 BJg"/*JI(FfALeQb`Futy41 ia geYT6M(U&.-~Z2"o|2RFĿRiT 󿵓$rBTܜ;"ѐR2Qzk|ȽW 3G<` M:J'ŰmtN;fcOw p&Cr'@eqnM1]ikc} ^$&po#dcE rN|:\nrnpIrի~(gS0;d)K?QE>?m{1aE<sPɊHZ)G8<P8Y $P?`<7gt:#83mԳV2,H|!G/Љ�ưALZ(]jc`�*oB!ƛS8.d0&Yi32N9FB3.ba`` t~jݾ;џrƒ<DO*鞻i qt2eɒ<6T7}}Oa xsSȴRְTdM}}R9g8riM ˌEIxƾ[O3bO#׹wL9ҔNZqB7+0ԅ6^D/; 7TTyg6E&3dڱܑ"d2[Z,/uU[UHZ1YHbl= =VB]$A+= Skh]!|y1ԒGi/,! njVpWxhWwV&*Yء,[`cJ$H] &bxe˖BTi58CBZH1b]L<ku-pQ;80~�zԞ`cc?cMr+BH wZM@Q,K4M;}7ۇs~;MO\OUsLL)ص#ʼndJLu툇U$Y 'fA 3NCRLv~;͆N=g\}WuJH|UbϮi@C=Lxv,k%K+en^ .TkX>Y vSzP} tNVEȑQ5Y ֟U/U(?9MK!_Ȓ@f2! Xl_RT\[ JeԛsL} cPq¦1=GR}v߇(TioYkk]lwdAD)K3,s!x"ly6iR?c4v",z zD62o\pqѵi N᜝,l n<y قRSڀ s{9W;A0Q~ j )K!DU`3HV DMaa5kspCᥘ/uyhv[Y#v`@{Ɋvn* hd;'s"dki\J1B]Vx &es59l?]D Cl"O\dɫ62Fʒ^́Z];N'7ۥ[{M sH0F$ ^BӞS(>4%Fdjz<pHC6ŕu�sb(85u<B$rr]ڇs'|$Afni92GqXgBsPqQ:\/)KObgfP* |t)n;S.3=V]1Z#Y.}6Myv - 4Lvn7z.LY`DLFdPt;uaZu;a\z.X<ϝAunnwS4=SL2#P qbd::|YL!0uhp3a'1bʇD#@"p9QbP) tU-Zn ϔ 0P0`b[1u͑ԖC$Ttdҫ�"'wOXߩ/Ș6ÀLEֳ,+*ap,A\:]ϊʁ+ 1-3UGiPě@N3%_ —#$q\)vuLX'g9:Q%OC&&.S>]{`~vb]>'5w'Ghu{ zW^n" qx�$N`+Gozﱘ }gډJ� ӱfNjN4>`Mg_tM|܃Bр)nw̗ywqkv ]R$ "{GBIřH| F0nuA&B}%PkAXJK^6P hnO%r5gWHNw$;)iK[՚I'e.ޙʰמw5$KjTeK(IBP<:yyb4v'R gJQTj| z"$}=nڗ x~(c=(h!pUD<K~~na~ae:ϝFC=WfŽ:סDxa?�,t:72y;o(6}Z)J#W%A)r:KRlQPPn EHCYܰUt֊vڧ oX$3k+2nY1,!)\M"&9Y#"E)">UL N(n%pIhn]` I,FKkؘd+ꖼ(kLHܤn.޲ݱM^6 L(Z 0@Z0߅|-sZ`""g#連 "d&E*g_k;(Dn�b^0RO/-nlq#$o<DV qN1֦q\;"4 wބa-„\!ַmpHUZD"U+2Gu߾D ”SmD jZN\w% d=�hݑk [< ~}ޑ̶y0g:Ci8haiaʁؑ+ެwy7Y#oYF^|2�zfggtɒ0їe&lu I[/=c^k<](L={Ћ389<ti ~Rv?/S 7,#'q:Hܷʬ�� �IDAT;xyUCaGρh <Hu_nOEq_*Ot e.` wn*6>:ժC5ΠFU30[};9{o$,>[_Tu ^ Q&$yyoqbApJ`d+~>ZŕW1P ^9Uz@TX\`: r b㦍F j{8ەG<ڇfu,#Vxa?OcA ʆb4 1q)JEiŞ] QE1zsvttl4h-088F6`fz)]c<.KUj sRm8\C /)g!A:-d( FmBAYfb{}5@U"W5{Gψ2U1$O;00 x Ju}e}@dlҾL޼FL8rD%JVwqك+кRPV9Hmª8 *O&ӯOI*uMܐ`u#U Ume25ž% jc]󳰇E¡`b']‚v�&醧4gl<3,1?7ѱQb5:u~D_Lh;4JYMaJ!W-&fBN%EIxHĽҘ0x9]eȠȎ,Bh69@ BZ+dJ5v価7؂s$j&ƑBѩ{MvNg:$@U^f W4zc\)DOvU.Dt3wc>Xf ;0erZ9n#2}=qJg s; * sSAb,r}ݰTS;`%'v23+cQc=u4zIdhLR]t;[%rR׮*Ķs2!{AJo },|^|fT$@-T5GXy`#}FJ  , v<p�شi#EPMT3Asi٨[>R1#}i ONbAAhqڂy p)d;ri|,ěӰ9QKrPF&UAnPf�Z?JFBPcB?TZZ# Π3&p;j߽kkOU/lCztyrv/ &ZJ8\c+Qq^4qHM`ɮ2)t!9[-9ؕN8IŦRUE!ኹ*B*usx(ybQ#0:2,E>SLD-p"傐B5;U"vdIh*ak%tb%r>9.`QI\j!K AK$y GȲ2Eѯ{r;"* J,JLLLbff^prM{ʹXIhDިՑɓ{Peܳ�ZbB*Jʠo{J̴16>R(SYLEg^Sۢ׋ G`q:<B֞@'^RsTNJ9dJK\1"VAFmoIo"IN*j<i"S uт7hNa!MC1K;@㢰h-"i@BϥH$ۑ8@cq=.6m@&y�kBiJ45P9r@[&#QRO)P3Cj?utYOaseQSxC}¾"x@PRc@P%+({.zD!s" & !'f2إ|IUtEH uT'BeDsdwsG(!x]*g|vf33h-0<4-9R3Y Ѣ=DzzO.1GVa" gS6Ʀg**oBgVKلάL6ЀnVF D`Ev9hDd7,Nt-$t=m+@gOģ,M\��2伞C{w2YMQ̞N? yE/=^m.o_?&nX6�u01e N^ @]tݡoa'ĉ(Hc+av֞!�45 CS19 AȡTœ7*Q:B#{{@(#3[] ^*yUHGJTeOyḌA 2w*b#bwUDmsQpV R"{lc_ckM1!_kZ@F LlbRCRExG 8-잭o5VIT fd0vRt\}㭅LO`vf'YT*Ʋ f|6BqA?8n)QU]\ceȪX09;),t{(ۭBd֜<IV G4)d.O|"Al"6YJ!Z٧_'G;i>?5R*) 5 ,:H(3bVk?Ke7b8YCp}:bz[FрBcJ+Wz A7$=8 ޗ-Tqڣ�5JXRT5͑s.ӖaUGx},jΰ>XTIN΃]g1QP*P䗹4;%mrb9WQEOr( UdlƦP{` {WcR88!]5(II k d+cH gѱXtB.a$"Y+WM8S$H B{$J9 V V۝UyTθ>v:!" }Z*H'LͫZWqWĄ%5PZ#-yF=fw晕&v=e\evN.̎ceWx-jpk~3gC"HhkCZGRЙ1 �IhND)HU(wjTNBi(�ܞ½ww]X y^K| {8q 6Q:t:8{V욘0'CkJ>݇isw`)KIO�E22xFBT0PŎ|η)P9C-ll$ (PݳkPh8<@Ty|>!̓b IT#c;֛OQChgw~{?u=ҍ|p`o('ԏ0}_`X:Ԩ=AUcp/b\# !FBS U|ݥ\�UudꩆPld. !?'Swoc|QnsC`ɧ{5B4*KBEK V VPKYwR܏?R 6+>apdg�1[`vD72W蕎syg}ڷ6ϾN9{,F? 񉿿O=g]۱)eMY,Kgg`U\Ĺ-L>&Bc\CB>P!O؟ѧı7DD#y1L~_pb?/\,nŢޓO>^.ىO௶ĖYNB*)?QS WLmAFRYUĄ OX/gCx_%< -Qgkm Y6[XGooUJmdW!ps/J8+&$}.ߒfmo7կ~uoN|_*䭘xoƆõ3>'݇' BzC'p =PJodȘO+J!cV2S8D&x*b{d#CrNhcِ )dž'#h%?Qa"t]-d;b ID2ߦ8`  s92/~Dv7.9pj:BQ'|8>>6X9cF/g%zSY¸v7sFb'pm)YhxScb84<Vݍ1iJ<dyLpƉOVdl>\l>ql98ҟNԷozhHJuHؖN0ϽK}H yC,>x#ZPk 2*xPѪWUJ 0$ U 8  *6 5^:#tߌ;>Mƚekᣟ߃ۺP.D$ Dp $D')miYQYN̈6&7X*U%P'*E%D`k$ٹߓd9=:UDo1hh(K5\a'Xy)rhsګH vSHYr1prvb'$JSBeMdB&^2~8;Qȧ>3G/MKkU1I:׹,u)(!2J-ƔN^5#}XJ*GcCpGo4,6EQ6lkul|>w+~[I$Rc~YЮ 6;P'qSD?|孚 X׆=ћ>)/TʦiH7M䙍ϴf0A +V[+UbJ*^(H:`d>|TT"N]S0{G}/#y\w"grELݸU$.&@3<JcS~9P_Ӡb_d( ~V!HP6k^lsTh@Ԙ(0??9z] 4s(o+hvP"Nr"0qNpH N۹-\2crf3s}2ԅ+р AI_]ub01Ș�TOW|s ~^O! d#9VQH~a�!e$f2IYo s݋~?'HKpћ>ڍE<q*_ :I>HགB: =T A.Zv*WXr*%A ~�{�UA^ֿH-x0R*v䧾b %:ơ[?7=_rѢo>=ήnؑsΖB}YG7*1Ek] FəiLL^GUHCc$a{aa#̞$p&ɤWH�R.'gv,AO9>\ʨѲW'#r;$/.,09=ٹBWJ#sd-:ϡ6w]i8gPeL}X 1wb?KN ~~|×3Әmw0V @gl:Xgl?t@f9=4lw^ƔiCaҰ]:q꬞;7l ;eNT2޶zx3Ϊ=8'_݋oڇ3u5Kp58gZM8i0.@AMS;�3!S)\V ob^s"GQoJA1ƾzXHzvp| oc<lF \V1\p& :AU){Y)j*vޫ?(8(gq@8m*LU'?.Ydz\Ύk @kfמY;qHNIZ%r1ybTt'n#k.&fF $�S4!.n~i3$nn심$ 8:B}<`,, NWqcyAouxacRJY0²]HІuVI LA$Ru CUїTv3ZB{1(K &�m4,)~Z>ofFq>gpiOG?6lZڨ'ܕ>{=4M}yi&J) x ni+c%X14&D7o`&֝SO5x1T+ n\aum?*!-~o%iò6LÓ^v5k)|{Eϙxó>2oa fMn-.>d<3*%ǘ$tٷ1^glXMNªK10�hz843GF0:(ʧ:#0ݎ-QZp^\GZ !ǕdLL빠o~_x4k5'W$ѷsWSVaҝ4snm;:]%uf}MὟۍ[vhF GA9Z%8cjrKh4aL4Ʀ v(5@碑3h3WXqE}F0﫳[~^Xd́j  Gу!2yH{%ZMxTXCeZ aeU_xNUhoz]uZ&ft]tޢL~4t hAg%t#Geb޲Xs00O�~.ZԻއ/FG*%ce6A. tw܎/| / zJX 3 " &g}}-3]qF3|aW)k+a݄Z3?w&]�bڹEe0}򅿆=a|jNpdgǧ=gtu,Vtܵg[v¿q !L{{ =s Nt~w=ڵǶ-+ !^0m| _oo͵?[Fݛex~GGCLj5OIȝk|jjUHR/<I蜳 c Kqz?]ൿxo.1ұy_icD6<j}zYKl6`fg1zh ?Wx2Hg}aWhq؈7nrTQ|{af풧l?>\J lbvnF$uIp~ @Ψ"6IDaW[HJTLw܂};t{ < $Jǝ^׳<5Nb?%U | xѳ7bUSg`Tְ.M*-qhc_> u;~ʟNJfkgYl8psxΓ'߆c*tR9_l4kn?83eZx�fOrl70W><f}ط?yՏot CʘcS",Mns{<xޕҗž+qPfSԣ޿Z#~А^Z4Jf+mYv7{|p6k2{P'fG"-Peqok$ 3OS/uc̡ЧW=4j[2-u?vϗ@Tf=>3/BM,[IJċ/¯o ;{z/jc vV:OԾ:i| &Irsyː ~1ٓĈM3\ x$ŀW*B 0( L)퐢2x;cﴻXXhW!\D\Ku!6ђzB]G;R8j5~&>8DjnfFA^i\g?1,u5e* s#y\p͟~Ѣ+;S6J;i:f"~-L},YW=x9'a{,oP�� �IDAT#rUz=s2m50ݱC8a55�F yf ugŽItO,zp[m&jߙDYK$;=w}xCv+W|˱,$_Rd:W[Ѝ,4Ivtsa/75#e/;]C+\ϧ<X�d2 .n蝹c u%)a1kqS;20G۱܈}9Eqǝcxwb|ԫ\@":.'xZ/6~l8MOUO^!-7ͧ.篅Cd?%WJMQ=aE>0P8ɂKD/ y29st"R:^ƫiiuژo3B'("B\-b}\V7/>\>~F ;PF+|pD193?~,r\ÇF[:X<0wmَ&Хxx3 lAW}3!UyLl..p<v/`AAՍ%{l3s.cm05?cVoijW4람q')ߊ= |w.tnp�n딵ox'iq޽wcŶmh;�:bbnCQ4QenZʹךL80|s5׎ &gAܻw/v?\xs_?}˰v(ed^UK\&6vՐ @t"B?!fT<gHcyUk7Ox3.@Rip˭OC]W4jEŅϸ kWb7{fyLPmCVۀ7xE+f\/a7ek�x36^; {Nnk's;\t<i�L`ׇ``NhCkkDf-u(΢[%j/X$<xU58.괱aS<-؇x[~3xr Uq;W/NQ|m0oaW"qp�p~qcf0Ps>LljFBo^h^~ie eøhz|wjmF{Y[srY$12ߙ]c3N-5܈׼Wq`.lٺ i쟟މ4OX/ D{{_^rrk�|-s~Lε100So•O:Cx^x7> a`媟нn#W21tO (:FWn@<n7Δ[-٠EN,JJ=;JmyU]f/ɮA{% }i)՝q53"/J>O�u,[6'>n%^sOM’kW=mv#)܉?{}c/} NLOݙ1s˱rhuy|{N˸375"c9%%)̦I9L"-r䍆wS^ k[/}F5:)^.'GCzΉɊ HػNR> C a8yJ s�dꗞYB~|QL$zv0c;~㊟ǐ%3Kh{ ^oW'T <mZ\;/A{3]Un.Ksڄ=sap[6k3gg&''019{ۂ7r`ѝ<@1;e란W+?㚯ވvИNOa}a~&׮$§Cz%yPZxk^K_z1nRz+cl2 XޚŽX<gA@C,Ө0Q mMy ؄@׽ >Q?&X혞\-}}xǗcd$ׄ<A�u3ij?ugǦ܍6aWgHNNs𑷿 O9scuk6˟ꨰt^;nB2xϭι+ Yi}5Y|ހ(\+E9h׊m.o7 Xp�F0BTR'wPoܲ,;2jѮAJI&$=ӗ,C-qtԶ3F_"@lTtҧSW7 蕎xW”ev§܋ kOSs}N4;'ӭ*;6U+ۂKl~3{2|*0$_Ɖ6/K^J|#慸br 5 |9x8k7qG ǣӛ$>~un_ge_͸oݻk?[n7ߌo ߿&|[oo^iGL6\Q~ӫZridӿ?Dpw~;U;A2IC{>?CxΘz?fm_֟DQbR{$K(ݏ/:Bp�"ЌiSUwuw<`MwN:?ɵ;om㝴h)ΓXsvވ?"L({u!u!KיOɪ2%Q'!:kˊW|.AgU!YH>șh!K%&5XSٞCon͐U P!Ú])}y-p'?߼$^Y.z, }_!\7ؠ1|Y<}�8} PN ^SjVt8нmkƧfP¹_wzჷk"C8qL>w{M,SlSg=+5NڀDg:wDomNŽ:mGiYet M׍ Q}w+d1GA1oSpf>b~Ñc0YdkϏ朄;b (m>ƪ3.Ies}F+x U}_&Nߔc^b~�~9NJt<a*\yr|{Lk .8ӵzw>F5JV ̐!A,R'JYM"<ڧQ2+"iӻ't O~xqK1,,a&rIK'bdn<U>c2:Vbp*޾s[)w]H_٠vS6վ~7q^}먰jj5 3XLkp3N*KS7Ŷ1c~nl8%N{7܅¸.E<}00W?8uR 7}^W_"`M䍵_yow>kq@]PX(fEL+KcﱝTn1I9W>%'Nlh՗Y"d? $ sAP \^V+k+ٴI^Bn~u}o#@Y^YK·®kp˿݀ݿz).8% X2K.>_o[T7u^v5Vՠbߎ. W0 8kX٩@,#~_O$$qHrl;=O0|%`^SЏ&U{(5 O|(Ja;vC'vЏ̀l|(CgtcL֞Z,2߆ ?% <v@.;a׶Xpr11 g-wup`^k_{n3$Nc:⫷ވo3<O?v5NYAɌx=yń]sÁt4g̹iKv!C ]\v[=5\w5PCĄ >4#vd+xtr`JwjzYs�/|apN+sm "eTR0DxªK.{c{j #k t'W3{yS.< guwcpx/k_N:ezjӚǢOO2]F:_ ("k448#K{tDBe-hb? C-j}kz$E:!e0( L<7l:s~R(n.ҔktJ5# cf.thO_aWJ㼓Ӳ}>= =O=ޱwqLOwm&śGĺK~ja#߸nZU$u'ᒓv@f]l/�vs3{ŒN!*ma; 2dzzx3 ԧy gyp4 1u~$ZaˇyϽZ݆y̱r "RR~M=T�pwά6-9i=x:pzpEskP(a&楛@Y{ԎSt&D'K=dp.>*:q V5ӣՃ ȆMP{tاk(E7e#"T>:emzC~ʦs'5eiZz<u~0@sןDwIkMQڂ'<\}~Ӝ1 {%C=0A12oۂ>i<] >I?v@[,Wb�HG_yYafF;ͺmvں) ?t U ;b\)k 6ȴX!WJ@%R3F"´l7_n|_A^6{S7oX3SBK4J(EEL ,yG(㥯z, oF�A{q=S菼qM(z+6Jkߦ5ʡunT Z*^4)NE4E*(,RMAh+ދeR/VDQ$l+Xss"3Ыӈ;X9Z*t;_~|]BRLH~ ~_߅s z|[.C+oB0G/D #Cz;v4^Th.'/lۍ^:TlBbZ:9{d'uDW(Dv}/-W<PzYAζvaV*H0 cddT dv|u V~~{:j{݋Lp )R2hP�l3pq}ƙB6[%v՘O+^ K2sTFe <Vb5۾�.SQ2-f:FRYRHfɏFC !k.nG;d*]-Yw&&ey"e-7ߎi*;&VUݺwr֥PJg;#%ۘiGTA>*DGV`ֱhըE$u+tϐ4u_>R#p=v윺8/> vå,G@Y1(KY~OSQȴ6xiK7ujf/yl81xhܲ!.h4BU2^=>/M(>*,}Qk&`'o?sP=*\rflj/}r{"g){ jV 4zcݮN] k9ZW`"namnstJ ;:%>(M55:?bm,)]h[o_UCk #maAy#5 VPtqʄ #HHY%d;H5zI%ݍ zmO~^L551<B;?ϐ{RM{6vh6*KN7Nc](Qe+*2&il=q}ky8xz]155/0PXe)Du+BmWLzb\�Sg ܏C+e� UI܍ʆ&j8 HԶHj3pX*9c_?~uA&+ 3=?62:.+7r?Ya%tO;o>POۼ"m!*\192zzvT:sF\ko3O/c{qϡѠ[/~.Z N.M#Z b$fްaV_[ڂ<Vၛ~yA+Lٴ6 S/}sD0 A5BNFG�晸WlMg^gS^$ߑN>Ӎ5(. 7ivNH% `-W!дbGX7jC HrNߝ6=o<f <i]o8]8z ݅er\|&`jϚ\z�^Nq׶־K.׼XS8acﱨKh^NĪjJ>V٭(}`obK$VgA0csiܗ4$g$ #1s®';A`*0HyF{cm%S؎Y۱u/_. )U}NvF:ad2?/Ø/aS\D憈A` 03܎^A_~AMcbT2ԞÛ^|%>?^׬ϑoS{eGP " ,zg1w{hK>}j.͒%I<amCN)nzҽIL'$!4X!, N3p,[%[44TJ{U绷z!ɥRի;{ Gn _w<AI͔HCedsǏbLoobjQ@$s _KUDdQIuo/c=[{ jB ԫXJ^s8/ͶyϏa0}->H8=E{>g7Wxko/õ }N> ;p{qlW\K-Pϒ0su`7Z^^ 5(wڃuwrXk|l{YzC*VohDJʇDrQp*$E*rH r|ѫl=.L{IO$52BICDDv Eݷ.׌oዿU󙧊/ml~.g~žۋc,Yrdؽ1CON m@:q<=s琞;Ï`?dz+o|;.t$Ar4 {=x{?gNn΁9g/g7O=qHgʶ{o:?|qzI=SOKc8qO }x[7CO글 /F<m{c??5{6O'7!)dxcNޅ|w|w7~( 5G=,ӍG7 o8ݻ ٽ?W?\cyװAyr&#|3D؋\B@K|7vE>5a!Fh)nîT,4hw;ɭ-x/߇#g&-w6mjѺ'~S�� �IDAT ߼rd[gbr x<N\zo'oç>7TH* xdF9$;s=Lؚ#r2h> ̛5]YXe)[11Dt*w[~vKk{Խ/RMke{Jѳb rٚF h/T-!Omn_=)܎\{>[0>ulތ }w0<􆙦n޸w}##p1V#x|?^Hٴw?{=|ݟ9Ԇ@i!&[^ۃo7OQ<xɧܩS8{n VvoƝwW?䃸Xv xo-3Wf?u9$ά6l_YU7 /F5yB>Y8w߈y7<?v\]};sPG8 7sfB4 F+.)!QBPj*.2ɽU(UvIɍϾ"37'E:uY;wނv.]rM??1sVA+'>>Uۮlظޯ&O='GbWG}Wo/ވW$|]xOOѯǝs[ 2oxGNMܚC[ Edlhg?Wf\iJ',)CQ 瓹CcDg> 6} 3+Q ayu.fhU2N=x H yICRԊ7'6N}on\՝{oz-QgpX?W}z7}/1nxu7xgϡO;#,m[ V͉MlWv7T<p3oŶ Z 85kCd�'Qpڛpڛ{n9һߏę�nppJb{;(^W ;:Fc,m[>ky/>Cŗ"n?tǗIWCP7?yg*)($A*rƹ.'3j 'U8I%OcjŝF1 X=s$E|?DcKA w=Wq嶸w <w4Ν@00/`ee+wqrpw}\mA?{?0&VXjO{rt[%,nIn2͕Sw6Q�BtlO)TVB1jFƣQqVozkbCk\Sj}!X֐˖/hܞB1 X g'%nA꧈ѧ�&eE_i7b1jO=~:{ V}5Ss8IpHķ|0CZ^^w!WC"=';w?ym;{Ʊj,V!GioW+'>I*k3_i;ͷc⯝U$BSOwW.wxR]6"EP>vpD5իJuO!Ͳ]d WP3)IjW(5b,Jbb8IM[ؽ6:{Fztxw'nط2wky7/݅?Ĝa_?MW &w]{Wt;Sk zܾx{>vUHP< S ~Eh':.pe4+P1:*л^>Qa<?؁˅ _ ; 93N[۶aia`M꧐w)V+ OyD␼{rL|�'ۯy5Q /Ξx<<цk7>1LT{|yK˸SÙt>g6+PHX 7ތ?; ǜ8(~"~JiJlSӇ?~g~ߘ~/¿}Og'd{~/;uh v*y"A2yx[Vв$oFbnQZh+�'y6qR+.Ίo"u ?#{x\{u?&|́I{a)߫osW <~Gc|c8c5q!-ppKc`u2H1ێ\VW<ãQѨ(bdZpys=/T_乯̉ݧHQ{M&vUNfHGY&OAqTXAqIPBAb'[&:-e^�qC~t`ܱlvԭ| ƧŻ8Q[O~M^\uv-,`maх$aLt'67cG/]OfJRaK2&'jinu #8~:[J3x}Wknڏ;ְ}iK,GňCNctcslncOßß3Le-$U3Og;.M/_w؁ضQ@$*bscxxOO>|lbˆEG)_{7_}-8x^.-KyhH2X4X^z"�S " #8p91D$"d;DDh!c)5Tߚ'-v<4@\1{p~{nlχ{?%>8F۾c{6�1[_9r܋1/ƫ_}--WKX^8!r=c2鱱9xI|G=/>}t&\Z?̅< ݃!s�GdP#2Ko:AMgσ4X"R{^-g(%:t1B)f= Ӎ8Kk%y)7i=ݶl"8~}ø_Y%ą%d a<F8ݸh4B]GnP@BQNRV]Tgv2 [ȚC[a3ÅW4D,,ᚵU߶c@Vt8'OԤo^%4G¬Knx=a_{G#�Q H+_E3H-)D^]kع]۰40$(=667쩓xq|J1I'd Nj.*V3s@LnVVwᆫ+b #N8y8~9GyϞ̇RbYAžW.2lc*kV.Xűh2I{$m#H\di\mfCb�bnQ\D ~9FQa@s4fku#!r}^`|)LOƧ3'#t񀿧䩅#ػmޝX[a˖›gpf,=“Ϭck>.7{>Ǹm^wwޅiQFŰ+y~>,GP㚌zx4&laH ZEL&aJ~|Woxk4B#Q&u]7hh.7F3F>;*L|xޟJ̚o3Wwe{jBٍ=wc1LU+Hi؍UT 4sޟ}aJU#z8Z<).LuGIpf PkA0glܸWjjS8y*giK5_Ok"8kK!E.6N`a\<~|Ԥr }s _b!Scñgt={X gKT{ =f ;tlCm4Lvu#٧p5�'5I{$gEQma\A6-OH}QBu=ӴNA!f8!>Dݻ7>S%j k3W Y  tw? sus!YUPý >>^OkJ9 - GzGzFDhEOEU#Tk[{Ϡ[\94g;?#HK4I+Tx雔Kiw@=>"!Ѡ.EԈ_FձK }?hťc0(UǼv_I]RW5D6Bf~:/acLI}dRHEM'fE ybUkJ:RxىFVRll4AR]<1(F,=W2k OΜ}wY`5mz8f[m9=0 'rX5 wݢ)9H 8ު3eA'} (u!f]mpD-5u[Y@JԂfiF(O%H {=HH U5i8 ;tQz̄( m}P|@O>7v>+ػzY&uZ**q@-ma6<g]2(q>x$7 d@u5pep(|aaQ IϮTfc!:FRs&JXKKX]]ʊ" Hhr6mۄ>aa"=q(K_o8;@r3øa]8p~ݽO\69-h/GFe<d*ZcDA2~ efDA״,&$q|Xg!Qo,c i¾v8gXFWGى>Nm|qLeׇJaV-uj#F<ѥj#zHSA$5 pizJzm,3 NgGBjo8j>,pN+:$"`_l~:K�]ԗ@oVjBO2 >C&ٵ+ͤn]S-CFq}mg oE])Y`3L|$-+AA$k�%\{D"8r/N@ߋ~g9,g79ܜ!dlh{?*#g_JTj[*^Uٳ]qaaa۰P9 [u oÄa~YiUI Խξ]{pWs0bU6<F#:W4}EZO1,Ęϫ(@VRP�t'nCv)4 \}?$ڍXgKgNO~' l+lfiȎfXu[8Q},c/u Oy\Sy[ kXj+xȰR6|-Ʃ[GN&"Hu#$N"gߣGn(c5iJb!skb T"a "�q]] =nK¬a*FMt+)Uyxm|`pnoc )ӈ!\)MЀ;O7~)+| iYN&ԗ>7f vEILMsϮ.jcw-VVW}v,//7FpR+[6CBKpŮ=r>,t]>Sʒ7uyBgvuyuR6if2݌`q*^^DIBиjgd ̪?ݨ [~aq.?(=|TQ{Ks; W䊸8!vg8a ϋ=S?JG8yc(<1MXI ~!]ص� 2 E( muƣUz2 * H)x&t !$B睛P(�բ۔%v$V+Mmm/ݖq2CfW%P>yHȫ"^k2 uܠd'X]]}vG6,KCisQȝ_WS ހ 6NN@%^tN!XAWŅ_>i/rav,{,t")>5Sg?# Je&,DjP(N(5YYHӽ~|1g6iG( Ieb(\P~oOO|ִܡ|4; FZهp݁ޜ>&wzNBryv{ORQ3͕O&!V>%n9A.dJēu]^SEmRY ȴjU)!ZmNF:ٛ3A!˔U< ozlecơt &깧`E|w:wODf1XSO[xgV$eZ zNN~%.Gfg :ʉi=7zNbyuѨZdz5H�\_9ݥj `a< #t�) (C}{>EG &̂F]眝$OrlvE @`  ̤;Jr֌ͦ[5]g_:6?|<өBm^ lۅk3i&=>x=ac) =--D&Y -*� LN0usbT +8\ȋ62p+H{i5O& }u BRݟ@T82 z6yoxAy<<Vx6SMzer$s{oLse:'G_[%bmwރyǎ=/~Qү>3$ԢOi=o[ʚ]H1q.ywl3S/T;7e0bm۶6Bv-Rb 9O@$HFVbNO4 JQe+5]2!m*D6<SU#QPRTʀgeg\䦕O*p W]񡳏o;Μ#G $bL^VS.P\/IX2ekp~} 4,̀4z1܈fPau 8GA1:[8+=m{ʐ`#Ĉ�$W<BzA6[BL^JHk)XM24<Q9a&G͹W¬Nv[5L+݊Ds{RD>,Pf {͟ƾ@6-,-T+I ;z>~6([pVKYn`ndo?/m8AѦ!P-Ӻ[X1T_2`aakkX\Xp5#*\ABћ_.urD1ma;M0uؾ} {v£\~i$#(r{>•ZH6.vGHʝu?ime!8̣|~PЩa `+rp|7EVfYfhJcs&fdi\o]IuFbx9,uJ\CHL*UBFYl"@N*/o@^s>&S[ ZC)Rv*$Y̺z5$'|(2C-E w̺ʅ7 Gzr;L"Tig֊/n /`yzI[뙫'(n7�� �IDAT$58ig"-t^WnRe+jZȽNDQ?,vAW~Ȍ:�Gؾ;wbiq)q1߅e܂} ˅%ͳEgΥ0vnǕW\F6N.bDB1RaS>ÛdK[X1tgʙJ@\Y=cAMMu <qMVkYg^nJ&$tb783SBF5vyYÖbk$A C_M8,B^pZ)t%s 3 ~6'{8.Qvb._ dlM)g@VTChdWD6@ e[TdOp*]d{Jk,eRefS;jkn{fѩJ\CC w9PY`.O02VͼxU9MN49Kay"Qoy`y_m�Bx;v`m\jSip50vr%e. ~:l߶+"LϝEXXD:0x2tY}#:K=$}P ginRTKf u])&qrEA~u y y[@t GcJ;}#MLcƻgFK7.hvFd8TnM]K2UXѴL| >vEd=${ t}RQ0O*}ߘg'H$ )& t6,dHĭ9u'ElU]&t ܻ9_n{kFE~L-`N5l6P0=»)<Vi3IpuC2bѩB2pwʾ^jT kN=+FFkW^ b?x9t<Q9ݜw",mUW(%CQFDB�}.;$ Z%XL\N }4tx2 leflUP#j^VNRߗ&_j wod<O'm$<iЉESꎳ8q6 2CC1+#ތ0ӿr8-Qemy窎^%|F'm0 0"gOO2S[+/ALSttyB,Rbc+d aWifF:+ W~OTF_/Z؛*|¥0'4XvTYY4N#bUDG^xvo.e̳ HV*ލN΀'\u6c,VEMl뵀O6eh]}Y4zt{b;a̔'0])%eRϥm ص{;( +ޜ2Uvjc{<Ǹ׾%Ue< e}nZr cqa؇w`!Fh[Sf.^#$ؤW\ TuS"kN[M<Cg S7j.g07 te!r]_lmSq.)3©F*!K7(^=Ե=V^wuT2 nF{ܲg<)j{pN"t:ED6U"A&% A: pIv3}`y@,3"[s^1=\T◝"23Sç5@5ׇ "P5!* Uȏ�7ky7v$~YZafSbBgs*lvǭVyhuYNثF(7Ǹ6DQq JE ϲD]ً3&u$M`ee ;wB`(g;8q/^nk._qfL18oxqc"L0Z8Z%A8 |˜@X_O ry <DgvOx4gٺu/R]_C4:];9\ }Miv3= h9 1M}6蕐bHl]]儠2P<rү *3"||̩xk!+�x:dsӧ[[5պ+G#@SP=QK8Կ Xi ' wސƠn{t;_xqF*mL@IӝgyfԬ=M^-J!I5 gXpz".dTFQ0p)KTe`LB)!4>ASזcvގ#xL'bvٟBz!r ƱÎ5|MЃ8rU�tԨ1AJ)9d.v76(ȐSIyӀ05k3G+.t/'#ӡs-.qb!3r:JsN_<QA_upq5N {)4ozۻ QO<BkdnYIٳs[YZzDdz$k@*@N&E2&ǧ|mkHȚQx÷&F!K/< wUI;.2w1ۀe>]yvN9C jOeuSBY=`g؝6f1CaY95u+-GF e޵;oǸ#B!Qu,VbӸų/�BŅ1\{ßd hHtŅ1Qϩbb^Dˀ֜DG � _,+'{˓pϺsOJ bG'OP3Bs!Y򉝥Tc5jeGp~c=kiBNhD+ƊG\`{F5{N9$(ׂdi<Sld:U;c#WyΙVk�{x3iiS$d`$1RwK.LEl4ܲ`+4~&ݮ +&c7 Kq<uS) �uRO䴼W7ٚ¡H7�ʚ0gZŸB.Q{?jR$\<Ё(K'c ؾ};vލm*3)$Is!]̔R^^,rahQFuUxٍ7$~=3b(`:�! v1k9.< = ̹+D eHS b)a*2fx.2o)>P}ѭ; J}7v]ѬRo6s;jr?Jf;=/|!CSC nxYel:ROAJ1xBsa̔1drc#=LLpu gp/0A'@Ĉ<wJ3 ʤGVKgj0 *zaӶ|푓 d<#)b1 9NJyI6p~mĩ"Mhs š .jY++wfWTc^`PS&1 Ff?Pt]0PXJuT|cطW\ h#;Ptkg |b؎|8__wD;VVq!|'1{~t!dVϐ: @)C!pĤr(Hz)J/~OĪW393O*9I wPCx;Eڿ%BѺOUo橝_̗ :O騡:Z l'/2~$o&R-[AaN>b|NgS]{@7fǯi%n<},KΨЬ{Ҥt,&dkRRdԕ گ.T$`W]"y!K0$1b7L`$m\2z+W@;f}eNpx蝆~7̓k s8[kT]մk4*HG%vIڌT *$QBC39'S سʫX6J,`(Lض+;]&n= Kܷ!/nhWz+>qx$Rň8W/P8L7IS&>O ʶvZh;w U2w)GEv="jf/t$"UݤXxܧ/_.9Y~n;5d2;}zVBpfPeFE=BMq/M3SGT` }&)ϺIS4S1~PFXWL! nl*)5A6uzkYMqcD;yѐhH4zj.5,bxƳy舮戕tj2TdA&Ii/HKCwaFPG͌uwn5ɰZq3> މ+ %-(:yۥccϛW_(˅/H+�ؿon8pŕ8ZJz 󱯾ޤ3B>⚤e<J|!e? yg4*8h;lW^#יSWV:x7y uʫuŭR*yNs,Tŭ3 ъ"剜5&buyDE`$z+f WaLBJSLnbrv3[bxRcd YE %BZs!IS0b2BR;ZٕP>01rW K~*C|Le !"]j�3 �/LwifGk&jccnuJyN5MJ`$ETzM,̻t [ x٦A"} H]X[W`׮XX!LE >`c`A23(l_[ ^2< <}<B-.k nKBazwQ!.'' 'huQ365-`z3ۃK<.CO >UTMBŅg~dE]-a+1EN.L뚄:IcEO&A:HÐ!4eZk=K| 1ZW`z FB?&gsL,gOhS;YҜC8\+ʉruSl,hXGG6Mm~wXr 39GsLs%j9\T En]"q<^4(* 3)Ik#V>]{v dpy.ԤƆw@@bᘧ'ZZS x^fn8={p䳔 ~7F|NsԩJBmkqx!T2y%REw]HDX:߳o|䑧pIB1(rYR %{wF)?(0yJQs~(n<.w0`NN$7XP Vh}8\.2:{^|3o'D%Yqwk|ݴ)Ofk3иU!!HNnf3 G#Ɉ47b$4:6qe_״ߚ__G�& /35Uͱj؈ J2? hєA!C" (INf5SGWiQlh1so/rX4eYk^ZiMKG*΃p~P߹Foީr/RQ=+ie-5¯\J[!:*:ef6y#!3XvYՕm8tJ\uh?�F]@q1�QTEFp O|Ĺ/kI/֋1m7݄믾_#:dF[DP@'H'.68)np(X$ \')*vXDԯ{{@r.r涂3ؿS1lS|ށ^ѝk~xyc8H>g?'p ZHvb'MV`XB_tOT֐ )\uT7[vRT h88=x2@S4)[=;}Yo&Me @z HAY}~}es!ȶ! 7NH J O|lôQF'3u:Scv*͘:5aHm^K7Cr Q!ĹHA 5XƵD;ɑˋ|a[/䟓[.ݢdРɔH25A1 -㪫cmu.b ."E5JS %ojD-cqȓ}b+\u‚.F�2<3sUs�iixB�qCz� j4,)^M佘ӝRvE\MXM9QPʀo2ڛNs~u/:wKj<`ns6`6\[l.N1 XaS y2ʹ m�Hul݅J,�aFM %4KM@ &gg܌ /<Ay'If΋Q *v5  AAXԃ^hƼdU6aqw e[De7xKxv.g8CP 3W?lT& :mW9cb'.dEj kJȒ[md(f\AYicY X^]v}X\!A.B}j wհ%. 2˅Q!ˆ()mpˍ7CWǨ0"5 hVJ@XX\@ '(bwgb[k%"QEnX0 _'4a';M'Ǒe71XfiBN>ѯx6}hx@pge?;ʠS7A.rztuK 8ZЋ<"1$ DՈ^-Jb"E WrHNDuLF_pդϓrp xcT"=O`Jqe!bt6)drݼMrrֽ;DPz tzVՁ3{t ߾@ \\Uj.sr+R@f3\v.P"ĪOj+nMA7<B!Iqr̅5D*`2`G`pؾqM&FJ uUިǑM_Bܹ_.\=',Fkpuam6om!M'HASsE}8BF#Hda[-!zʚ& ` fś?- nҴ},Jx( Y9|8 I{Ųl^caY/u-&]JMY;qęX{D=l�Bc*SdkuAUw:BkLW$t17ś8Ii1&xcNmXe>]r-qҤ1.KK6[EH9: S;brJ^LΦYz|tj&r̅DM߻K78Mԕ:Iڠry{qfS362fv^=K7B!,<x[9:tW_}+躀хXnCp6ZY/˅X]($ س{nfvqa}c4Fct tLX&hqD!5ͬZa8"Vd8"StLկ6p[qu`$*v@~ع2Vf þ R&3|9 [lZ/p6ZhH:jjNjEӰ7́M141#  XJXM}8!$AHəM{Ҥ2%ܜ_a/0:y!/נk'<E=�� �IDATb HI1HMz,]V0sኘeK]yE_ ҴQ*Zt-˞0|l:S;잊LM+1dNuzsRVna.bةP' ,bJet2$zgj5ԲCF$CG]=ػw7߇Q!ŀnԡB,F9! Oq)\.+:"LTbƨA/~7 ٌe2-E4tΙ9؁&9!$@]T"-Rټnjo6,X eͦ'Z;…gΑAd-!LBRג q!ɦ4å[${=#%dq覰|ѤDcF{F0g6dew%qQp6"b!8t禘>:%@҆F&݅R8B*6ك!@@heI(7De_N C2Z9LuQ5<PU@13jT!OW .ŮM*2ZTW>-dbST\l_mjFFBR|M {PK)ɐ}cS}r䳼L:aob�zfF#8pػKn$9Pld3!/:h^]m/;˅<)6!Hp+W <{RmR9! RĄʬch0ݬAN.E՝{TTtҭ˸s íBkĨ,ˣtܞW8,'R,eD"e:gQwTtV(T[U8A4̅B@躶[Aiͨ*(V&ƈW.1c}}[ϝllt#]gS< r.`q+eBE̚{lif=)0j!8 |1]&5F|/{PRȋ׻}:>;H!hs:kV*%q`SVt*޶6́ݹ%TǦmS8X hVz}a{v*BeK)Rc44Η|x"!]$޹7^w-v܁Q5+1Kbr7M>jVpֳCm<G:_/_./H}Ѕkk׼Oy~pv�& H=!2$bZR[1'N zB"GP4f(ÍU6Z?A`Ooۇ͍jtE=FFcZ5,1l(gENZRf- xH]:xd�2&`zz# ٘& ft6|sR9 tc= Ӝ,#>iʐ+"KNrȚ0 Ea^ܥ-S!5קwob@Í@^Nw<eS8Ⱦj}[80 �z2cnף倘1ߑ9?uKnѬ6c@<J>gw]@\4FؽwnZ\{XY^*k̀HNÅX t<Kg}_х },AH=wwz!?,NkGȻa#D]ȲyS3t(&%7rl@w)qfL>ղLΖ-.<.J5U($cv i>&5)I Nj:R 4ޱ[6]ŰJM֚˘g/>U a_mZ(ǰxcrfI%Ιwi)`ns RͽϫC(tsAS�g"hҝ>.yL7Q e$_Ljۼ"i`RC"|w^-H  HqxxU^d.ãJQ{Po)CZA `ٖP_.w?s* Ņ1]w-vމqRKBS=W|X}^Ԁ˅Ÿcʶ%Ͼ<s<I =b芎Z4C$faك[șԷ2VkF!: cHw- ݥw!Fq14udilţZNJ"ZR]3nusײm_ r{lP=cمj ш^į BٵxN cJW.΋k0 Z^\H[gԑc:}Z}|mz?%s!KR$fz?&4ƊFBV ƌq3BT-Sһ<E fV Ff._"g$meTdj? A۳`X'] pn7l'q5z'g<C*OIZ6KJUUFb^quWcy".))Nc6B tׯ`]jb[Ϸ[_.8{IB!.bO35p޽Çx:x2 cޯI vP_!38TI}kdfҪ3,>&ܠZjv~Ouw"XIԃM?R`{{vv3=ILv1&1C#Nw+y #QTDǾf^J¬50$N`;T^Y -LN V1,l9\UriR5/Mv!O4؍RPA![2'r5 uG$Gr3?}jȡdhԕM$EȬMd8;׸@龚1u[8'"wCY 5N5<*Ͽ+ yU5 x%Qjt9٣~D`aqh>\s~ܾHYuJ  {΅Ja3#@G\_B/n%3Q rxu >�E 2% KL�:P`sM*>s99{+.UPn^:i$p]8ZiΥx; X_-$LT荂ڝZXKtĸCZOӗsê(f{J 0[.Ŧ#!KqH;!*,GF6@y%6�:"c$ [q晣'gN sSnEρe `jE�Jd%HwRu!hXB:&#L]ц.Ue>u( .Ct?/|]I?g0rq 9sY\eN\er%Yd'ΥAaЍJQ@,]T79s`0#5L2 F( ľ]X \svA~jz0*9\Mnܭ_,Wla{1Wz=k"ئ╷߁'xG~ g{ ֹ|4| YRIZ"@HEe ]H'~t{tcaUJѪ']PU<9qsq-:f8Uo&HP$j~U8 jk]eAEЩ9۶2\P_x-"Ot&3UȌ:eb ,@I0bFLSgq l:>k9UEsـGF*ưd(*k8AzELdkR*S IW3R2.!'Ճs�"˺LLUƶ \xӚ89SC8q?\r*E: Wa+yӴR߷H7, 08nłUEEX,Ρ^œ>7IlNxz޹oWQB5T2[M,8f@eŝ<<>m|B1 7~ȭj]+ū^ <C8u4<r̂"@I%L.52u, lHiblHh`I@NC{x.Gaٛ;w%r�G[ܹt}}n{aSeokZS"L!=3ŹSgX5&)vG, ^:w :Q ʻD{e)7 L*2=KHgaq=y{o]5<Y<]-rz&�6,HTq!֢c6[@_66Tc4Pvb?Ċ2 qR3q{H]w#)b1oXER fA@$AwowGTyjE@k9xwbS dՍm z5ʊ} !{+6`8jʮ=~Y#C< % ) =b@qUpb5. )Fa;{ҋ|ߗ )AfrAm/slۖp7kqf}<sӔؒl! Ǡ! L|R$Pj%UT\Gsr68ZrZ=CsIu8[Woa)kRnEbjQ06}E&KG.aܿw2lw'W#51;+GpNuQ'} ;f]i6?to=̩+6?Lpi; N=}C!{}yqǡ•Өπ]Uy%$Hѷ1rbٙ+^y}`^S?9H<"�4ODZq(4#vnlw~X׳ٵFPDJdB=23DVUkE!`l @UfC`4_p ޼@aTzQ4'<ɗ9=gS\&ʜnf,Il=ǥ f`b8pV⾝cxJIC̎svpރ\piQkOG9.(YYnr;]o ;1}醔]r*E,Jz;N ?_={~~Ou}$@'ɄC0{%7I"|IES:W&ќկ+V/!Ng=i4ƴ_xź{A|m&ƤUa0…CS+d+'U ) <2C/(LV䝴ޕ]A)$1}>p/1-oݨYN% 4hMoWԏ?Ф!!Q߱JQJ- kXiU W;WP=NǵV=[9;i]CN&gej<[FFfK#+ ![* >vк$I=8b@܈MChzލx{g'`]"&c`Ib&پ-oQM9T!Zgg:{was{^bt,k:kf[o81`9%d&6`NeM'F)mK7gMV-!&6J\,]칌7I:q \ؑlcItS=%?jхhg,@vp&l p+8Xc 4%i劸m>C<98z1pv7./f�]GMTl{ bJd18Wv>d":eqUbaAW:z2AwAP;VDJڙyLŎTkuSuCѲP(FMQң+{ _ءx2d*7џF(\I:#9%Ki\ȕgE?>~W?'|}9>ᆵ߀$2 vtNO7?K߱l:l)DE&1!q&cV,p DZШeOj2&ձQWl z/mQ%ŗ&qYSN!1%6%$$l+;ps @ddVS}*OwI-N?昺Y6&N9�=5j縣r &t/^a%zbk1 xxGY`GŢ&pU0ElKe8?&]HO#\L,* Ԗ; `l[ ?g(Vd-KK^#QSKPzӓ&2*tXޜU.; ]<`{3y:lKL L0 e ` D~Ľ}?W{{|O\AoA}}S7ur!մ7 ֲMIwz}/X^_ߏ]>~Ez(iblп\Dhާ|Q*~ KfMH颥`}z!npQeOLټV')މ&](ic6&ӠXY#Zj#:ԄЖBVy:yn3=v0b ˯cwyB^CgpIsؿDfq ll0If+ !BVYʟzE9ծ:4;m6~1}= 3øOd5_5|g-V[&H–戱:D`s;OiXAM,ɭ1]DH!_gC^(^!70SzO<~#|{IXx[E`z^M&o^]]g.db19<O?ܮWXů~ )uEHؠeLaRAjNw<qRp'z$hg>3ڕDqCE Qbl[F*[L`Y\P HAj 6kgINb�ˡ0ј%n&өOv$Ra &�#v7Kܾxݛ+.Hł*D(=.TA<[TkAۀ>9`b>M~MP8n6ɕ/仛,=镗&6O{~xd4At(LDXTG׷{JA&e Ht}6OlHC/:$^]C1M>4+bfOa;h&eS�v ;w>Ə~~8?AnRD&*ɷ0:wDԭ%x={7,Owx/W/_`r#@:'0hC0Ɓ;qbBO֦uagrx+5#O($^z e"S:jmMbw2)k;Xd|sc.q!硗C zQ͓4ɜ p3X q4M`40uqfׯ}s'6I5A9oV/y߾=innpaN؊(|3W\f FzoQ`Fm|~`^s2qPLҕ8:<V D3J*ͫunrX 3Xpm`"Xc2Ul 0o(l ;aJi"a7lA<daǣ :!= A k A1:CM$}[ثe&ר'qe 9"5Mau{fs7\-olG k*1Tid=E j/Z UBq.'u'5--n.creXR[Qx`g:&O 𤉇_"q^m |PlrRHW�O*_4i~L2Af׸}v 8]þr߉&v X֗S% 1A~ĝs1] H@S3w\gygkT qˑNjAUb'\*6P|N5k,Q1#N` �ѫ0ctA6O:d-lt uRê*' �K�^y,,s|w_wvK5=']6B�� �IDATv|L–]ٱko*3,j52Jɩ0a B0`8?_܈?x}y`rSJ~BC N{xr٧<Avy蝫]uP,u$=Hb:\%k")E: $ѵlH"[Cԯ[ K!P4(LjLִ">+#,/: ː)A mDwܔ|pkts# D0K<y^{{\;NYz%h8å�rJWN Tju=$9Tk߇ǸYf_ <YDŰ'MFF ~A +?3z9cņس އ*N\2„Zv;ȏqߡ/N}|c,: W'ލw9X,B'q!kM"L!0a{Vw':U OroMi*v&\\?ϸ/k8=S8A1'I%7&WAרnЫx5x: YLl6)hyPi*>ZFx(%nԠS ub$0?6k(V)= w"/s(Ą(gsO1C>~Oz5WV0F$RAO=SUa/s:.?Į8T(y Rr=01ES&1BX[LWy" +[v0Wu^5QÏiꓫF=GS 媐T2�b B$2L,`IdkٟDw|sJvw.wdn1.Ԏ  Gt)1S|8;x?ư*9K6AWOhV~nkm ;LG\72y/i>tI ix~a70jرN�[93Fm4)/a.rgS~MTaEoFn2B1$6mJ?dٯZ&|E9t%4&ZTH9֑Ԥ9qxx:S{em5!y`#-o.} +y:�IZ;vE`L_cB` g\N<)^;x7FM>Khr"T4@9f"`>mQnH0S}'DDdaJ'>FL)Du"\ѢX~ lIDRHrG,W ~QCCAamP00py]|Xt~abcoὉ& #-]b%J5aׅ},/VtLk⽿!wg+ʂ)ģ3~^ ?я 6m Θ0n)}`j¤DI]Ҳ}hQqGnلh {8Lf ITSI9'/̌cVwWVž7Uk1N  K^Dْw1W=μ[o0\_c5xIh &AFV@zBፐ2$A f &d)PAs؃#{STc$?q{ {xo$A|nXb*WiBҊkŇ~U#)Yw5M}HZہx.M hw}POє/yQhud $h)PE8x)}N:6+pO}TVDcX!ں<yp9VC;o$ma˩]Ow:(!SPi] %ޅmdA)޻`o[\]_G6$Sĩd qD>&a{G}Le/'RRLsbANM2V}'9BJtR >>lID4.U\үg \q=;vo0\^]]>Q$OԮ:XQAL24 &͒{%T9a7+&=l yC0jX΁ 1ΈMisz<X6~{׼! ZϤp )/=Taϔ?5ٳ*~HM%q#mz͂I�8@t8,hAj3'?/{҂%iO}T 8C�`zƢ[{;b|"h<)b(I$zvno~h 9B0q&7aZbD_p3?7wQcpF]UlRZVALJIԦP UH xM[ٶz&*}zτh8<MUMntP]x\K)0 R YHiwZi&P u!@΃&7+ /_c|1DBYwRf 6 lQe7`{i7,-˭gm=E8 M@ 0 k:Xkk}oq" |լy.rT- -5^.o<]k Eff'+^(LZ(ٿΠKH\rHK I+u 9BKӺi] %<w'N:nVVh4:fN|#L9ĕڷvmɛ {i'RrB׉H s݄8bv'縺`fux3ExCbV)]Zܽ8 )J,]8rvy{46Oa<&jɡL7r+eI_Lꪸg35O߱Ma\x{LNd[>IuabA00`Zo0Vp7+0D<%!V{Z \IqQt}x(TT %@TXXP<GS1j5|A⢢̅&&t_jt.=+hP2iqD*(@* xM2D&rf`lh<85;k2L7+Rqi8 @~k,x4;4^yޢ NOz@ = wE9XkUd?GK }[T"n(;1# a8Mnb&v;\y׸f?WWW>:>aX,CÀupmwυ7%QSZUua7ij,Mvtiz6&4^\w߂hTD U,)ZyޝZn3+7;>}6Aq<pa ' [lo0,Wn;-h7znƉh@T �űhzؔYnfH.qFOD!pT"5_Nsz.'zRnj詨G#Q T5ހQ-) LʅOTΊI.qLjYCxqx9>|Yd:sQ/e}quF-Ŏ+~XGo)F<xp89=)NNNpzz{'gѢ9S^IPڿM=3mnl; 0beeݮq{z(0l0cKKǃRQ/1SDBvLpYXؼoWLA֕ܝHj1g)ꔊ4J_2 UQ'SCX9 I9ض|9STH {):?9an9($>!}牓enqRl|u ^n$ߏ 䄐GpXYDxhH,*4܁ {On#UP5D3k;Փf1ǦlI^H2Ip^}ʍAmhB^eOJ=Q5"h^Jc8{Oq[ơ,,&loor1,}o\d@XB~{qvv"޽SXį`[k,oxU̇avLX.0^ ׷؍#݈f 0M8b\a J�d?\b w1JƖٻ Dǟi 6]4!vf=iIivCC<)UĹ&zF1!NU8'r4g7,艼-RǵZnFE`WBe.OژDHjs᫆0nLӄintpula  :P�{8aɧ4F)U9JZS2\Ppimu}r"`h8b c0"osIbkricBXq_`YÄK+BA͟$z.PFDҖ~EKaL1Xgt]Sdό)NI)ӁWUel>xsH!4�'Xg0Ἓ,upa=NOônbq{xNN8==߿3x!Gu899b-sA1oS-@Am1x($>c*9,K~ 8 o޼ׯA .V1k;,8hX1bs0"Íc`4i`'O`ŗ /^dT8UiRWS>DyUi,&NTԲ>CFy+=QaɉKkj~dtL 'Ŏ~}Q%;vQ Di}Y=0k!0úPԷW}jɡ7bѡfB``:X3FS$OB=͉ ]9o3DzVNQOz&DB`'k->8gѧ)˫~"EQ<ӺB؅dL͂ xLq=s-y*"'M5hO`L{1}pW @/7Ø 4ta+NY=�D~4`yΆE3PYcan7 ϰbqs^ ;wpqqOޙ껮Kܮ9SS^"|`ko'Xd>}<N4m h}e'ƛ7o3\^^b`^caݦ?aH#cgL=]Jnt09qcnY 7nWxq{E0FaaN5s:e: k! ;&6)V] nS(\H E{`zuD01j2[ KB!2qH"� E`'W't?ɡcF &L֗,1,p-0񃢃؄ {jܢ J"H4q FS20 Uo?{[>dT0vmw][uR2qPdE31s"aw]g߳n[QN!x6ٜ&6 31!(bmX#2.i&Xr 2=)qPdb{U4eB##x0[a7 ~ep9X0"!vkM\11|}yw!ɉ<}<|O<C\\\4[& x~s-r(^w\\ ݠnfK\^^UM]."-3c"m&#Ɖ S٫8}o?'&&̈́%{gg_�L06[LgCXtNLr-cҲ4Fg'a8rN1;j6A xɶw89˺T Ln$[&M9JPSuxI ny~h2ca\إ7:vp v7ofxSc *pa{[R`[ZXZ]S/ȧU5kݤ;e&a"R  2(Zc(,'aF„b"JsfMBMb ]k]<+|8y.I,ux,z|}x]1AQDJGr:x# i6#:8tQP95+$PKA'i] �KjaNOOq~~{޽{ 1?~֢p׍n5w]'-w\΢[9ƺb)зi7~ss~Ioy3ƥ\$ 96 h6$zr'1a"t]8 =v.LǝM^GZ)iw4ȶc2 NTTɁyM +K6Sm.*e Pyɧ|ov~]tc5NqLVK쮗phU*%a,@4-'yoKZyHC:?d^`ESz1%.Nqk ΐ'Y&V1%g�OMf FItBL3VYb,̉ &ii5Y3?lAxg�d(Rwi L;`!.#4 !* z/Cs? afrLgwGS<x�<ӇL"KUoE5z:]إź\K'/s.777x]^z>nnn0 C8⛖+75dm([]VCpaG8:fq &_Uф:hַ,\Z28DSY|W6)3"98F M2`iG[ v2Ȟݰ<}~|? )KXL W0fv ^aXbl` vcRJEW>G :*sf=qwE�Ѐa b%Xr( �3 Z ED""eFHj$L*?Ƃ <c4JHTNSɞ!4H ¤#w!buځx� � t6#ED(u~Յ~tZשwy_~%YÇx!<x{}Ϯ[ߒ窃f ERi{v;˗/+y2ȅ.M2 E7sJ EZwt2׈laOv@C%QA)Mv O=ƽ{縺rUji"T֚d#�'ɐ1k$T“DNaJ4).y'B\i.SZό*\' PW\p$"ςأ9rv ـxŰX=1!xK1`m۷nښ\O9'yZkqr@Yn7ai�뢳Zt>#D#�Mg|;Y׋.ʣ g4Typ h/Sfٚ[q[|(1Ptx2j"I~|ᇔ8>s�ii܂ȏ<’Go9^ kCh"\akKֿJRMsE]o-[ffB/ļٿ{x >|{>ymmՋTgi={\__/^ z I&"=Ju)<@v]5MJ{\Կ["pCZr$[t^:i`C.2 x0]؛3@�Z�� �IDATc2).9cN.`F)y'U&f)(Ȧxu#QW$(2~'@H+XEHc %IR%Kv vi12Gvix{ XI ^JzO{͛}d}0dQn}$m{)kZR(+qx&I5gwa:7KqA#wRW33 .=Sf=}I~ Vڏ#-BMJ7dX@sa&>}T})|'i�M[a0%t&XFfպ-?y)!R1|G.// x<yOx!NNNh696&߄m߿ӗ5.///^W_}/_bZC}'~u^Rh͡XsySsc6%һLVjSGÐ{vXlwp~,tdjEsg.B\dBijWk*ބRJ$ǔ6aIlp20w<'~-aɊs7 ,uϑ 4~#0� 88c"NqTJ!XF \ A qK:(9F&Ŷиw2X軠Y,> u 0N.4BCz;emFb;RsQ+$L$xfW\} #礢>XA'_VI^ׅ u`7~�  &YFJM8' %vvGޚW5[[kg>䘊ݹ&KÀjKݓ'OǓ'OqN0h+$z r$<9>s<8&8]LTܐ9Af^.VD:۷fׇUsܒqa!EtF ÐG͈4Ni?;??Gu899rfaA"Ά=o􏖤:(V:h/LӴV 4wg80>Oa,Ж\PɫK&=�8BǂNA.uv1nՍv ]cm9D]]a/%HWUiUeQMC6+)Bk(]ޕ{Ɯa&I�?&8�Dl9Qu&jH|^t5g*э$f3%H'?e#}O$D)E qB>M`FaZwpm]$!$$s\Oz۱E4?'7K_SMOq.9.kjW^O?œ'O㣏>|![VR<o޼W_}> 9^xv$RSޜѰhԽa%zS5{_7-iJWP7Grͪ750L}g|ԯ]\bYfnἇP:ÀM )b$lsx>LҨNTTt.]XML+|컑T<F-9ጵ Ԯ�U#E} d9):ɍ� E5I0^,elSI@mZ=KkM,Sߟ 78'}C7a=F'Py c݄=W*D-eiy҉ɓg.y ?X&h(EM>#Z>&ER"Vl{(/kp�Ob�  9Xta qLv q8:;zol= j\hޟgKi\.+<{ |>C\\\_}S;vl6|Wկ~7x%noo1 C:nVZFͰ7u`kta8 x: p9$2 �A2Bz[h:oɃyqP+BAC3 sя;}b?6If(Si1\ŭ#+5fM&ek9<094SةÍa 3 }==ȗiyN { zCޒj@Öڸ)‘̕f- nS8zlw#6!6K90yLN|ὖnމ,5ٖ9u[yo~GؓQ#`:j<H/xRלТxr5�>= LȡB>`g + e0w49<7뽵ת'szj 777ׯ3?ģGX,|?u d`sӇՍ㈗/___˗1`k(_ܟsL&uY7IN'&DI*La &~�<*4N�EqEcw8N|WS!z4LEsVxr E4%I$3 NSCN$!)kqJ7e΃&.u&! qrCEʫI/gs{ԻV8c¾3W]x}0zD3�,RhDؐy<>nl Ls0b(r,,*מ+CR0|OG`g̊.wJnE F]VIdcy�-w�0NQ%E@X/?3;N5ssn?/]戠Bn5$"MvΥTNyc<}ZXl31!Z_|xy5v->RwvŽpO_C7ncD Mz71#\fHss2&Ҏqd=xa\]a“AX,,hU#n%.NY狻xB5<EL&6aа# dj2dLgጏ}@m= #8wnLr90ps]LFuo*oZ,ZNCe՚k~K.ӤǞS>G qvzn0n/`ч8&'9InUGɫ�ҳ^&1%R]kBV_xY^gÓW;|}{k/q= w40CXXT>(Ucl$vaoljNïޗ3gI[ YǺk9}f7Fo]ժΉOr79o^P1#~$EwnyW?+(~�c\◿%~_˗igJCk7:TZ>hs^Tbη;vVurp$P `'tCL(۸܄F!3N8?;CܮXo'!1Zt"w]fˋ}(Yiwq6YRr.'ON2 �S^bKz١G1`#5ɳϥ]'WiFyG|bhC06sj9b7|xb0wmu-l]*E; -AiU`k ,ݰn1Mov`"PE(' =v9dRopEX,-fS @g k=)5|W@, xTў+"e 84L>dɆ8]$A& 6|t@v ӅP"ォ3s'®v^oyZHlm\"0K> ]kVŋ/|X,9[-7W<^xIRϟc&ơ z^͂$w5f~̨Cǚ'}pv@ r17:X`xh.Ţ8cg/pvz{Xo6VD(CmYRKƤ"NmFbr2s\7@d,n_.PĹk!%\zQU Qr3a}A*m>1ZR|i[KI#+?@LђHk桤$T3`#)Գb48YXtia0 c`O 8ܴQ{ks7PGf9Gj@r VQ>"522IJz1LB$o)Ѷf|,P)M0pa ЉTZ% h` `8w1"gJVw[=z \;GL;ן^;|5Snl6Oqvv'OǩS?1ub?v -^xX* }z dA4wM2Idn8l=O�#sM㽇7YG69ևIڹ8!e̛Hҳ x�sllwXѹ(aخGzlÁ"=˔-@CUO^a2dǡ~`.|ilʐOqn#WIq$A&6a _eU,7FYf_ 69Ukȼ?tc}$z'AJKx/żXB',NN:Lgxl!h@ˢjPemlM6N/d #;AkZ#(_=Z)~4 0c8''Eo".a@bOKc6㡰[m5=!IEf5s(ա1,)VgԼ-Mʫ 96 }~}z_7ŷh{rϭx!6Mb"jr>A;#3hC;Oʋll~ƥ"/tb`=ñ,g''/vÀa11~ 7zq3$US $%3VN%vS"΋iSJ6>3łp|C0Q|n%g2k5ֶ&19B5-65*w-˚o[h&z aSM^%6/EbrkܠAE,<yL8=\PJs.4>b( VRH6 9 U�X.&Z ЪzFvLX;e,`9d Pz#}Mt)%Ɔ Y5}JZa[],[{gWn &v ɐb.{Ҵk.y[Qܿ\qӿn%ev%VUaϪC`1[ąVH4:,k:p!@>^>xc�gSkH1Pݔw.pXχM႟&R\;@dМ"9m"Kׄm&iM)F҂>BgYO_vOYv& J\.F83#9C4~.i[X +%�RcHD!G\ePM NlzwsdrSz\hXvbJm; M F詫|qhKf@\Ejɐ;>I*&!HjL. 扨5.6RĮ^kkk}RCľ1i!kYEB,>+'=~`X^Я-r+Nӄj7o`^ }$EITC#zrdBCfKӻWw3&)\(NM 0q�d X"m& Myp2�ict#&fk0y|Ҙ9L=2 ބjz/wkc|)=~0P;nOVɴ.k5՗?Iɤ&+*iS&fu2``u$95H:Y֓UFKsҚ0W4\#{}&6 /[}.M!8:ݱ1q6-縢DNK\){q^ {q7(v�wbEi䢜 {(B'^ڀ$3ݨN*rO!J#=iu ͭT9+f:'ǝ)/ħ~?/^H'OLk3cyժ/..p~~nrfq xeSyXc}5s҅օWwvCtSOJp݌")Wa%MNnJR`ǝ<t];KqG2X=@`M#,@@e"gTA @k+9r$&~i@6Ѕ]K3 (X0;:4TS{2Ni3fs StSs-[Pd ɧ>HI\dC*IklXaT(Rmz٣V<pM:>XVQ.Ծ!`y^g_Gxb M@np=zŽ8tQEBRκk띵.5Gd@4q,rm. ׯ_>ç~ϟ͛7l778??o;nk[imrӻ8ڽ8;;+,toY̽{Q}C.(nV1deЃٌxX΢gIxrB ҴCM4͈h7wSKn0"&=\Q`{Cȳ6P 8Gd!fW \.lj8f#2X2Qq-Z&&ߒ8uAODneL`2ylgT/uǶ+Ev^ lKWP̦(O,3d-K.h 1TJk٪b&X7I9&d8Tܣ!!ѴBC H3F~Kϣ]ߩ@D҇(@Dom 1wR3kѹֶo:J<[nTxg}/"+A=Ǐ*\ÑܱDZ:5gX$]4Mx6Mi3{<r#31 @XbT!Lܫ_1-?]h{o. lA,"O1ʓS|@:}96G\zQH1>HMq&}!ur{(么&5)-G墏xr s?=U 9Smjjc?g EwƦ7B4_'/4r;5')HmH}i~_^1UCWp>X7\MR%ȈٓN97SA6<[BBlZخ/ Z*l_I{NY_z^{1cxIׯ+\__y%Y> >|'裏pqqQ覅xC vK&&1UznW|4L>ٷ*}>@Ǜ$"Cp6Eth|al\<YM,2&f3S&&ˤb(9_ܵֆ%tN>jxjHOB fp*An@:5LOc>sNjsH nn$u#]Ӂ xx1PM>i%dNo\ܼ3`xkg© 1WVML(PciPP8P4Iʦ�uM:_c*9K38Q N X l[34?y÷'C4Ml6X./puuW^1-X&gϞO>OS{&E<g5ۗ%={z]h"} Enl6XX /UUER-VYϦJ}Z�� �IDAT~v;wݜi)FgwC9f&vϙm%9 U!wSXQ.XȊ5&~T!yJ=ΡR8;* z"NwTToZDc1`ik!CsMsR95rɿ̀<o@ 2wq 0''e%ON1`S\"Opm[opXm(F>̯}.p�Bhp]").qJb‘)r;Cɇ,v퍟8Zvm8Vcj CQ{vrk<<fSsj j\W~ӝ\7:N&~#ss33c^2IZ!�#ER+0)߿i~a`D߂yZՎ\F==WZˡMsle4ܤǺA"J_Wä"L^sE8Q|Țk/S.T-qb⠏ǃ) +?J{.*. n!黤}NyRS^H#Q9g}uq V<"ԍu=U"]xiOF 0?8d]aW̊>MTDsbF))`@:3Za'�J`6~(3H_6gJQMe=MU&t>׍!6 Ϟ=Mall&Pcj?O>_~%NOOSaI;sڜ꿋!ͫWnƱ.s5+XhC1nRNXBLs뀹7C} GHJW@֚͹=i-!@sѕCq]_[A.^9-1cckGYԑZi+=9߂u@F<w]ը&vb WSq()&iеqA96o|{b|Nu~uޒk,`_3s d+%Nqz8l6nXVXVM+ܛT ЮXt~)~_ӧ8??O+8][+?VホŅ=x}}&O QO.uWB/o.^Z~ybm .|H.Zs`h6zd=9鯫:o#KӖAݬar=뾩xoy=o 2qh暹tEFTb6,i[1:Am H+Ǣu?qo)Z?uV}ޟ[+e. fķ${i8p !:6m'5hRWv={_O~O͗|_}'mbonoo\.u]>ӍnFDzzZ콥^]:9y&EPVKDb-M}֓}k?/ՏfAw~ݑ",ֿWZ[!AZܾPnAs^s$}P>t[ W;4_ꩾnVakwsxe.�PLZ^yMU[}ΦFeN: eV,^A_bB.֯\.\.q{{8Vk"u:}n5uXVO_O6?{繹a/pyy,b눾}s|ЇfK_,E(^ S2aD)\uAc-9F\ u_G\?wЯݚ~l67 ϣ]9(MZT߈st=z>XH{jJ?sd /)0}OM:浘{PaKl5svهнcV?s߃i|iإ5/JHnRiax~1pa_|~G%>熁?V,e l͛dH"y[,z-/vu8==-c SЍ@ȗ穻F5 ^O5Qq 9pm=oQ\^[\Ӹ?r!m 1܏cCVj-ܡvhΓsjm 1M:"'GZkLZ"ZI64RnG&I!kӺCfP*d6F-///?q %ln5z5' < pyyHs ۻ% -v}=k|m=r)k~&b n/6{UkpCfhgH}j4\^vsdCЬ&,C{ۉ}R3Զ/&[wKvl5+y>۵흏-o{9un׾p̙lچw[o!LrQy Yeג幜_ z5OjI;߇lv;|g)FЫ}o/ׯ_'_x$zVP~o[1}~nr YO \BsΥ&@3Sor&1,9esw"n|>7;=ARZS{m9׽(>!e}̭qI_Z;9/﹃o?txZs3uZP$q:V (CgMRh@RŎU{RF&B;c?dիT(zk,sDl޼yb$탃ZL֋`߅tS:-Ta}}V.t_owNuƾ4P&stYG"7]>if߶~9ۤ.#$M-~}ro+9n>s9};g}V0z"qLa?9}l6W}hT:v]qvIϭR5?YimyzXl6~> ~!...v-cO®-sk><ULKWw&Cas;V[p;ևnZ_o<}37SK?tX# I-Mۇ&h'5"YK[ZC?W˓a_q;m)Bs?ǁx2ܽ97:2kf}=]#{ho}nSLsz8EY >wBP~A>$QVg::0TMٷΔs9 ?Oq~~VTZ%2_.v-`ŮaZPYkMMuH7~l뜾EwX3R;Џ&=>59%hnS<BUšz밯%缍I\I˺(Ω8YE SiyԍևC¬o~8zzo]Z\ۭZzRP}ɡ׹FZۼp;g uAޛ?I]a_{/K/=+0`�� .Z,;t/pŽERвH$@B"@,  fmz5rC͹y{ꮁU-;έ[0==T*C|+}& rr7ݹRLd9~PF\sJ`z y0PO#fz[bF~`bmW.]U¨v]_)礈Hl+PNz6R]%5qTHf|Ҿ] IDJj돢QfH{jur)vۋ\YDOl{leh:q;wH EХj**VF>MSǮ^?bdh AZOsmm 䥟 PqJCS$2JԱ 4ӧЁ 9f,jg˜lYd]8\]_>nID⑲8Jm%)+W~Z8ꎆ*NTr0qY4VϜi ǽ toώ9]'E(~:j4vAK]ċ:j}ܿcccH6g"Vj[(loBoN(Rkx(ab%QgrΗкaL>SРgΏG:&96RjZlХ Mu.Wk4]Au:&}vM:PF"4b6)eL&QA\ϳ' `﷮oamhf:vI8 ƦsႶQ/>lDZ-iS|]1WWWQ,;?u9:^I�H$3;[Hmi\4j(+WI=R?)vHW挩?{@8\8G&!4 [3zF'M]$l6'[#,Xqmse?x'DN{%Nl3!nI?x6h(\A&voo.\4=ڱ#BI:FR PjqwNr? NVc1m6BIP(MB.S``{ޮR- n/ 3Li\09w _ tN?U|mkx�30\/wMNAXϗ&q٩lG.}A]Sv| vm|Z[ߣw۷F~W iJŹܱBJFOQ):|j! rAKJP4EҲgEҹqBu}AJ/9; /[1%vGpSASxxS9K5O\"7d2mC\k*pSĐ^b9&SC&hY.tij)`pݟU!uﶶp}ܿLlPG9GT2 {{{BZmd]ہ! " 3eս.2[KdjD K(DM*eRUKbz/sJRO3E9P/ŨHWB&RAPM,5vp9VFBK?[ԩKbX.<H8ͶzZan k t :aqrl*]]]1??l65'D_hhi ̱+A-lnnt f*#k|1H^2kqLA-.iD"6Tunڭ!(Z`lk#A91`y Flju2T|Fwz-p LZHK&~(%Q!l9T@FI#cp([R!RZ:tqAs SmΚ&666pu 5砶[UGPX$)E&, 2;I fxXH kDG=(A`}HhdN]g\l6 _sslqCJi N8TNB]7= I�6\k\g-ྦྷ0ċGYQ6BA8?uBH$zޅPZ-lmmƍ>&&&:Js6};eESVV},w&MLD2p/2D .qNA7i;Z)řU$V)CWʄ{ok2M2MM M-sRy@R`_[+ֹ:@F J\7+ܥ"js:?C2wTƭ_CLMu|G%n] T0t:ׄV*0gQowuPհk׮avv^ qz\jkkk(6U; Rx$a3DAt6-~Dp8v-zZ-#\9FaCm8U^7.A.5.ΉH5l ^y͠sU9g;:Q穈ӿϔt~ P ǺyzP{{{Y]i)~(sRئZi-Y8u�l ._%,--uƹҤg .jg4>Y"ME;.EYJNivAgu,:SN]T͞7E@"^q-~uc@{NTeNW2z8֯MgZo{K iƀԑ 4]m(GTZHRP2ܑd%Z;g[ M*..Y4 JWZ2nݺs!#v%0K/#Lorju6MйmFbJ% qs,m:.lSgHp 5JוT2MCdtn4u`RQNLwHT7G16ִ$?&I/ȕ:L#SL+ pSFZ$e  uL/ u0k8TSYӥ<Q"SݻwI$Nn#̱Kpwvv[gֲ9j۠S]\5g{]\A~]K TYd@Rԡua lCelsq]7)P0{n5WoPКɱې2SHzcF7sC6*LkJZ{oox!H \^&K"Sy1bNTm\v ǏG:bˀxFylnnX,v`B wuv ]ݥvesqgf.~GRSQSϥR#*t]r`NftC.i:.&T$'Q&7xҰH4'ij5N}Rt<'Zl(K& \ğL);aqn߾UwJ|-QW{5bssF`9I59A2:< ^~ۚԈjJRBЩQrHEP1zgR3SpY2z)ۡkv2VWMpNRR3)qiRP_ &џB8ya|io3O>\2cSV,Iκf\ۢ ;/kHRۧP&N~P/ZE rv]#^6�e -rc{~u ,t`e4͎C( ("<(z}$sqA$ؙ`kr۠ɹ.YKk> Hן :K\nZE$A4G'N*uhkuUⵗd"TAET=|.]1>>H$ҙv{Cm6.*|gkT]E`"2x!pq&XTst6`jd"9+ܥzk* j5j2@8AӬx׍9[.eqܱiGgߔMBع9&Qht4r19F${Z] Yr!<۾?,ٺr�q=ܻwGE,zݵ:cTE Gsm \mmeWԏFAx) :H\9koffK6iǹlϔq$t68 \x&=$r"WsRGKV) P`;H0Ӏǧ]@hÁtcr@G/Tr =C^.\%d2D}eUuƯmoo\.PҜw襡z(S9Y!IDT`Ls&el]A $R̸m{ kh26zu+D[mu.i~n*C1u<YIιyu!ILA8")q~WF]#< (^rW^ŝ;w0771+X9EZvwwL)Kwqn\5sip1dA2wi#H< FP2s&J|$R�u)1J8Ɉΐ[oL R* $%<7CL+ֹ\+ҔȸB3uQ4iP"�� �IDATsHz~AiM~DjVVVpm<yh6#]GPkkVNG'6MyP(�x<F2iR'e# P4n$CkzgO,c3(gq.ke \?9TM kLF KZs׉mtZt&(kvUițxuE$+Ll&'Zd N]Z6 OݸqǏRgm;|]ٱSZ|>ݮ p%#DE"-W~QzqAzE6z\Kk T_ סx׉iuNAX..l%XA@N<lmo 5ڢ?0H\Aźg$PgpP6iec͛xבd::DCQ d*JnWKJ$:F17}P4nà xq$ v{h ,=M.? h;WS0jCFz<qAI08~<|ׯ_ݻwQ�t]c3w8N:yqH &1(Hd$؟Ԙ= q&L#Q]Um[9 "p;ڸLx7A0mӸZi/pCuLG_SL`09{J%ҥK(�>TT6e@]wnr]BgaS(tC%&2'ja67i^} Ր cAGs>PWc$}:cH{Y$i=H~K˽zw*nꂶ$:(=AL?Lv1lFrtQV;FOg;vurobNnqOu ap@O ۃ~4 pk{+zZ,h]Xq\ Yoz8lP-( z*.^Guޫ yTo^sZ#HyKoeKT;BB-tn =Ak [U_0gbvB&{Z %|Zڥ6ߋS0lzLJrmv4vGYFB敓$y?+<Nu]v 'Nh'k$u:vwwRС$w1 bjzEOT{D<LN؟s b{E4)ߵl}uRsuTJr( &A-0 p ++{6\:o%l6q-ܼyOxGIξ쨓cV.zos&= f+sU8*A_sssZAj-}>z.Jg.0 ""OîPNM2f\ j]WB,]sznj8۷t:D"!"9fcFZ}#\"fы앝4zp)SwK߯K %Zt;ŭYĜ:EfIaZaZR.*l̙$Ο}?T^Ń3g%i&SwN9OXTop{9) ߱!V^pS\[wLU[W,K'%l6OM{..&*sqDQizm麲{pW 2kRRj+҈kSޏƑTȤ?@6>;E7j%ШgQΠ?G w/ck?{]ԙ 'E5. d8Bg(>ȮA dFWwe1 {:F= +ZOV[G-!;Tu>#܈[ӌv.&= "7ն΂2aw$l޽{{aaaDHF} P(_<rJR'[jsRɠ͛*-E7aIea 6^[0RC#bf-\@<C<bd\ak.7_C>HRDC8. Gi伩#nS 2w<ZlgY䮶EZ4lfCLv;1l{ARt۷oF"ՠS*Sh4r0i^9=[vm@  BYLL3p.w,2saX:VSf/ˬCRC<qsGab:~R20:Z_*s [/{Lf$+LjTV$נ]*/ KIUVBCi\J- 'A+ mXڡ*X]]0䇆I->wC"+JD.2<:Fxw6- ٲt=(؏d }5-ve[Ջ`bv/xK#[J^gҵ4 r%q ?ІطARgm%%nLWvmrG6]}c {$aq_h4\.%HZ6]I&؜Z? CIPh(]2HG\# 1:6'Vp 8ge`iZgm BҔ֥+eZ<iu!{%Re.-N25`׎ڞMW.];>HlB> N_%֫XYYcǐH$:N |5sv6* ;4(G)Nxba|.ҽ JL!1>\HDz'ϖit꥽Qܻ7Oi :R"Gq|6bbb Xm`WǠ+a PhnlhQVQlz ^CaX1FVPQPXlY+!#!<UPdZVVe؎= ' !�Fjbz3őF{>a[h6իUk(K՛4ZPEGRs,phbやraJz%)sNS7AtA$r:X}jh=CVCTNGVgmJ0s7p7阮~PYKEXuKMAK2T*( <>VӋ#8a(@80֗O~n-iG8n]?dfGnՏcsk$XD:]@&C2QB2YD,VA$R nr),6Gp6-w229)O1=6R| [<T>R9&[(-ٌM/`anSS <cמ;rn;Ylg&r"Z-MSkőELM1?#;H%wn6Q,ʃ \^^GtJ� Lcq;2LMnbx(x /\CT*!wc2X[J+xzr{,xedgP(%XBίR۸{.=X,hۨg~\cWߨyRA.^il=hؤDe>*[IK#PAC#]NDHj 3k>;/fmg,B)?/{w̋?B L'Wj@BFՊو#[ /h۬E8z^8[ÑFO>Oh=[QZ141fy_O \w~4gNc/4p_`rV Filn׾Z 8Kp:N|#ghh6/L楗'l4l_#ϽSKpo#\ᅫOZQ4q*Il{+LkG\4@`NTo4zf4{Рť;wŭjxnݺg"f|θ lnnvZܸ^GWB6v$qqYA͸t,!WM  z;,~H$!|~6SC(RkG:D#H$FهU.bӏ 8w_íža-> (5x(  XO02>Ͼua?^:Ov ϟHŊFH$W01d>8毰85$gyux^~'N?sj-X/}<>bn99Ā,,o|c޺.l:WC'ꨨ\ @R ;_U~z)M&:EsܹZNo:%DP׻"ΩzˢձJH?ӌc8փM L O+]DTsGZ ~ G)wR;‘:xr oĉ5:^f2=^ɓkt꽾23xӯc6cS=q>ę3q`~MS@ׅ4ed[O.ܘ~@S׊~6"/W 2Ֆ Jhmm wAP蠙 |=j^ nw1乇a@v6yP2OJdA!3uS%2">$]>[ͫ?l\3"D|x(cV#h4<4[OhhlTXӧ.odJ{n 3:{Ž4vr Tkj'jHH%j=6 gFrb!no!!"k޿x|Eđo1lP*ưG+H e哸(u柿3߇Ǵ16j7}4!&:u$b;,z]lܠ!qJd7ȷR!}G֌Zsvww1::x~WR/FbE.Q`V]ֹiE0ku2l3z\tOmP"x!dOiNs�14!`ˏPʍuՙM kFXJ)ܺ=G#BDEHts/c`soy d׵̏;9x7ncA+B4VHqd>ާ#-dƯ/nnG@4VXS{_¹s8mΟܾE\9G[QDg_¯ȕw&oi>LqG|�? h=ߜݕ"&&&KX<ǩpm̎U}(]Y ߈ךwxlIXH&׹.v;lʩDi6]2jX vFK8(sz`:u'DιDr�9as2M$%AQd*ϢFU68+D=AH,iV5|Gᅏ!_AuQ$R\11_Pr"GTs(5NKshgzX+%py/[o>#q̃}f8oǏ.LE ^\c{gs;g}C>^zi32Xz_£Zfaond]9�1Y'_Zƹs;C2!LǫdPx XAn+Woad?{;v_4m/!ӸHrdL/4d6 �aSJ*[5k �|=Wb=Wѣu@nK{ .~sX E Ķ PY)(4B ńf [Ei<<,}| <z�2 qJ5_`g++?99?~-NgHƣ(klvj<>f |oc#KX{[⏾z k16oGWlj Y.^]ZǏ/dQ~m6?3 6U5AP)EZ+wy\e&MvF&gI \9:+N/UlJUWZ&(ǁ"Yӧ;#J!tda- I}D 5iQLYϘ,[M74Eޅ([khvA:E&A<C4x EG�NwlBF<,s܎cw7=r9Tj +d_Gb(,V\B4 !55LpV-_EzQ/D�\ϿPF-QZ!L{2]wq 6r^fn%M#DtqA$es8G#RC%h^ؘ H 4=9d2IRF04MD"boo|+$S׍.CH} ! + ]HF6@8jYS8dzs 8~}tb-D{>7ps]b }'/|4i (f{ +{[wPow`!2>mz"bA>w+=16#o_d cǾ]5| [fV3je<#m+x[.cPy q'~uOQ[Շo z=Af"2IO/'IbqqSsWGAug:nz)UڿN5╠hkHL$~ӫJa%Dܠڲ8'f. Po{ZL�ixb^01wϟN&T} y}rq޿f_.;j<hl#cplQ<wd[Z[[ŕ0:(kǞ_�>X{?1|!T3 c$R{G^,p![YҘ1B8TA8\C*s�pxiw#[2ve/ut^DkXj{ ت"7Oֻ!Q&''q1ts*Sv39x<l6Nz/jN�"{1?hn k B$u̾nZoa%XL9+96_lw[*2ɵsX9kwge$SWt_׽.6\3%$%~W"k[:uXĿڙ'myHt SoSO]v\c唴KR#iYnm&kH-vnrxNH&8y$N<aZ-uj5T}}8&&&dD.Zʱ48gdӋsIZRR/V@o!1=IN /8繽Ŀ7[CGj"k?|nc~!3|,%/�_:'jup|o5ק xcV5ʘ=q}ә}2 YF)]Gf�ܔLk\ sXz9[G@BRpYLL<&ɪNFa�Ŧ P(t4kZ;7hLFv;hޏ>}AdxM2vL9us:fۛϡٌ dV4;#(>P٩w13rOxc+z}۹UIF(x: ՝|>8sf&E ?^rp�� �IDAT/ߛü׵+[Cwqligήk#qs~_üz fY7M>z:? MF|{ ~.Qɇ'ug]6kʂꆟCCiB)9HqO,%]GO4)o K3D"9;wsssFh4]mڂo_zpptSSS}VbObQGO]jчURХͯ67ȝ.xQAgڜ 6֗`w &<Tǫ~tf-Y@fv&cv]6Sow>o|94v?z VNƕcumz~LL01m01§O`d>R-%\2M03_ar<{;.a>6 Qe `/?Zr){S\[kCGYDȎ0;SfgX/bzl̄mcel^y3uRR+7qds\lw׌5xZ:i*}$A*<^x>}CCC}kL+m)Wo6L$& jZGV'jabLȕuk{ |{P~68AgzέGӫ^+=/"[vx*x8Z͈i  k<\Q'Ya-zG6a4QKnq“02U?oƉūLfC8R\fCFvWsi:xo0ޅ)Hh[+7s o&~<Q<Z`BU}T+{Q,087W¯=vM�K}A^qNiI5ug# ~m]*%.El4ܹsfH$AVjGrc0<< Q.;^EĪ$Mz: Uԭt\߳N;@:3+fd)�]#yK-/7rPhtW?2%r"mΉpo T `:v4xy| Xh=m d^N[Cf9wz Sq~L BhȭO`m>_9fƓOߟp8|'";[{ Zl-| DU_F(s/~_/KX:ѵ>'FO d:7?b4(.Т!Z=TA>dK_knvP?ڂΝ*sEӁ8&�ʛH3+L{(!o"W_}NB&ds BH&EŔJ%4 DNQ_8gB"48/d 4UhR|8e+W(ʶ]$8{1F$rĽ I{_C~tg?;r5<"B ! ax ch[:OjMlV˜a*#:^9^OPx"ypK)AƵo̎.sr5b(TOdO >4NAjo㷚Ixg&x\Z brzf@~$d:S|?v#v+ځoxX«K7Q~~4o=\ zG<~T 0&Gq|G>q+scsR!گzo5BX}T+U+Uum=X#S81xWhVF6�[@ZWPۘ~hSK2;85SW[ZmZzr-ަ2Qp333XXXs=9}�U 4�]N)F"Hh( (˝JWi3Q0ʤ~M}QCh\6?/^Ⲡ~r- CQ\k|4ͨ6<~_7%6ƿO|=ˋTh 5ʈDH c%GUv XYqn>O g0vxqvC#E,}3_Xf '@f'řǑۙ6/RIވ�#,,GG6GQ뎫؛gcg{氱5*8"F'X<;5ؕQplzc)26T8KyyoΣZO֑L12V*FE&s} REac4 {sXYY6P(fPŐL71S'-[|vsک,8dS'%m.&۠ۘ Re.\~h4l6<y󘙙A25\3d밗҄O&hZjj(XNa%rCr!˦Hզ!xPՠ虺D'E_G$ZϼbUֹ{~LஇQwvZ+ۯS/uZuN7Ưٌ!nJ51F(\f?<b]B:{]ՊnnP'/nyti+ M. Th7=8Vbp)_ޏ6t[8v-4[QARX&\C(\g2Ij!]*}| Zm@cP+z1 ]\;'d>zbrwܩyYhԀ/}bIEΜ99RWWRg~:'RQ*(ѮJ}!Px^MN\5ӒS2JP :YrܕIx统C~k?71=̟a6/>>m9k <2JBn dG B8\eiy|ͳ(vG:vFƷ9$XJy_(@ x^A(GpWŝW.H ^˚VVW{mA~5GsIcfgg1;;#G`jj ###FE"..  zGj<ҥ} ҈Bj:&n R:,Բ撑sD҈t ex]  ǖZ7.~p# qn!4k <}z Vg}mW 뗑6s|?ş ;k7?F(IٮzkѮ]r ?s3pc7=ܜ+0_O y`՗L!gV;Z9}_&nYtp;0^r_ikO>ԒֵԏLlݙr˾5IɵlIܡȫf˥+4q1ajj x1S;~"nfZJrܑSV*sW6tFb}@78'Ef.e@Kv6sf.st39.2WT*P(T*!aooB`NlZH =/5 eH&ˈE^[0 jRa,;K`c'6c�v/}o~SX^6| n?v͔4ШGP.%9+߾B9O}Μ~Iy2ۼM?NattDXhpphB}T*Q lo o{WQ1/uTL74ڱ=QZ<w/OX3y�>\+z^^*hhQ(c(X7˗&qv,xKM](`lTdx o ?nk4¨}Jlmqp}9n%NׄʦaqmCD'`_viljM>NZcؚzG5 9tPAHJ%yFFF0559,..b||dC8Wnߪ`@#hxX h*{)3Y tW-H;jyr@x|&K9(7t.ɱSkZ k*7ɵu&9vJCGbx9d$UD#uBm4*$͢RHI=/`brcyĢ5F^.1.ãkD?D2:〦 VQ,ıf zةăP t##%e$5c 㠡vSLZ[]WCM ̖0<TD&]E2ق5VP)E% B-0 "#i8R1(&AS@lN[;MX9fD"1TA]s8veԪgIHǮ'rAʁTW9i,..ѣF4=:1bXAqʹYD"qꝿN NWS?2*5lv:!Sȟ뇤f qi:H[gI B[K $m w%]VIb}-5; TJq<;ẇO7<իTHTHaUUVBBr_pdi7#X}0.CT�u Hjac-G)`&rKR8ʙ&l 6q}(_FU触u_*d2$1>>aRsݱU}L]?u%ɴsu=rO u&(ZIr5jAb8wi#ҽD5 EeiE3vhkE~8G.q6\ZL9GIк}`n}z{8wUO5]3l);v%Sn% ײʭ/ mpهҧ K>mxx㘜Lǡ'ɮ,ʩfV\3wZkWjf+Fmt,X, |הՖf.4A BP=5ԤY~-Aצ:dx)K2Lk>aosz9A=zK n *+LNTґzG̤G/-.dTN&VdǜB Mb0vVVT@G]\9dl/MBf199yall Th>Mr럥Xw2v'Pu4Ex&\SpKR@8\ \M0-49![G9Xzb;u&c%m$G/q�&]dduչ7ξНN33[PBz,+ {H*KI(%( EfE>bZY#I 8tTBGY$ƻTRI6= \}^?z圆$011 u*9֑zm]oYSٺrzZn_Bm[zץ2mW7^r JJҁT#=$gfplMNNB]dtM0-Xe\4] v)(ӝxϵ8.M0MrZ\W65h4eZ8[U'% h˹HAT]n{1%L8;&2Nf1::QLNNbttLn8E0rSto;5,R/s~p@zUݡ~Z?\O#*OgKeZsNɹ8kzY9>eS$A,/ A b(QN[ LuDɪM@۵ڔq|]>SE j ؤ@G%5sk%wuNULɉKR2ʅ΃/z~qb1dN|ttcccE:F*b[i N]wNkxNo.ؕCW_G"Zb}{�PXT$y[hLau�qO,r&4dbb$?[#;C}>+Ȉ|!Z. " t9\?^v A8eS)1ȹ )amO}s]4zw7Sp%]STǙ/,,`xx###d2H$ߥP9:9v4(\YZ#C#!] G$HDǧ~'[$ Z0INO \' k]  zP>7  x=Te. ĭU:LĵcmJ^:7i)IA.:Te"q(m&FAKZh`:z5I:[%t`ddt%(4&̕x֮\a\=n^?Wo>'/Ŵ/ȋKPI[ J}4⌸KnY$r"c\.tϖs͆\ҹH\tظ#A躤uj}~ N(hT>me 99@ttSu eB$K_zhR) #"tjtC9$>)b}&]^w\Ʈ;}.SlxjW|/)7W�:iT߫9hSFbFp9.0eL?K}~ ApQs<20 A9~-ЧI*}&.I߁puuФ^\Y.ucytmʙD" I$͠Z*}p E=xC~KRC&A*2L'#D<˱zGD6ҿع�/dعB9uu3TP'ϩ¥.y^(hԢ,BwJc=s6 BIr[0$Q]T8 0}`N RvfO#sj6"N(~HO7]s8X=P^ǩ@/ȄH[ tTQ hVuNKScC]l7}ޒ؎/G]΅ډΐ'wʲʉ'I$ d2 cxxCCCH p(WZl9uc}erإN3 Y8YTo`zʊW;(V?T݈p-R:cӾT*rz-E禍s 4c:oeØ Hr%P%/= )HZj ByA n lPsUk Bplz:t۾qTp]5& }}?Ok,42LNW^󫸲uԿq˥,Bܔ6 bϕiy,j./FEܕ\9`uaݱKN?A^jpRQƽ@)&L(kl[N1d] �mbIIŹH^ԃM(h;q6i8A֯î.1yՃԱMN)(]MN8H \94v:Hf[A-s(P#S k49SxT XbWN]u uMRꯨ;Q 2[d8rcb8禜>v:&V%u2Y}Vb_V;S 뵕NR `g V{rƠs +v6gm,X\fꟜͱOK%͵Pf<W2s8*>a {zɉq&8<m\TD5?&Ͷm8ǕᎯp-\ʴSExSq>")`t𕝧8aLSZCklD2SNZZVuԡM~/":gC z^.T^g8l37k]Z?��IDATԽ ;nc`>j~ig+aGw&W @E"4\7=(]=}t l =%puc):]T ;Sퟞy kj#rσ:wuzso{' \A5tFӾB2h*ꌫ%Zu^^J\iS=$_2K�RZ+6Ǯ_$ s0]:K^w{֩csپ%A4bt W]O-Ų{)f(\sφ) sT!%Jju߬*i lgKK%AoLwi O2HTU9Τ?oDoLSB⥘x!-QQ^q35^Է]?Oչ@:ˡ#" B"UJ1jM)'GbX覲rs;XR)�9H:umLx7]Jm5azf@ n%x^9ynKU\ӬDQEC!}ڻsT&?j\Xn$hET&vvv= pz\}z5eR$F]J[rY='"V>M ǤkEm|<)s{[G-L)/lMRY٦̴D_wKkC\9z:b:G\eh6}n(eRνsL/$l@2v[D*oGpay.AzN9v=Wg87닐MϤLG"jjX9RJ1հ))Xհc}}(J(˝FY4[:hZ$�K! :Di~XyT HM%mo.qA848Eۮ:J}q6 =JT@{DQ&6R}r~})GuMt;L{Xpi¥:$,c"qr6};jZn̽gxiMH_Cʌ] c9M=9@7 Եp 4e&b](|&u| 2iߵ : =zÇCZ'rp,G"uSMUVJ)\V@dyP5S]YbZx X";8ڭI^boKsH&iRYD-[Xi!p}6J&d29uR6*̑ȤK,LD8%8}xW 2MKjy̹9<3zyA֯KՈY}Zt.+] I_@u:HD2zIh4!4 R}A_*ӗ:&f3K5&Gz�ɑ(;ݤW.ea Gxt]ԑHQRPbB$l-aҽrppl˔WV"p-b]㦐> \ZS _1)J9kZ˷9vxRbDhCHUMT25Q]&#Z{S,D"f$ )t9r}I^bmqD5 QKYw^QmaZL)/4ɌU >133X,rEL�T*>@oTH !ٲS {<c}gˑ<MٱiHn1v0XcJڲIטMhp,]J*Оd3hYJzeTٌs\&uH\PCz9[$eac&vSΕCMhJj[2ci$K%gХ[ר ;쨣T/qS#t(])ֳX,Ƣ@plgt֮aS$+`QʯJ0&ƹC*` :H}lkKJLDo41%$.DvL6C!Mґ ) KA<d2yrVLs.z9.8\ Վ9YmN s19^nZ79tOx2!9Ayc\)\ˉd]~/ :iNG՝57:!}sټDv$ґM1h>0ot?xoAR&\F) An)b%йϥ lΩA.Hcr\\pf"I8u"cЃ?Q1.Ԓ6wr?shq62%;@}?(N$,9UlýO?Aq]z*p ס#C}PC蔻U8oqx19 G^kl' 8ge].}.$'F3=n}SH^E!2B7ֵ4L 3ָ$"MeKjPĀ:B=شR_3]KgGf4e6wH%F%׽9`G]LٴI|±֥Mٴ </ ZLk qb&gOY0-wyzf• cSsio`D xם5u씠!e.TS,P!9k\ PLZ!l%T@煘zMe+/} KAHpTџhr슘ƵNJ dI}?9V\9OS{ӑs0 Ԙ˗ ^ű?7sוd%$^#tM{Vi q0 `] dL%!kn.~`A(JQZ¤bʖ2`JzS56{G6uHw6M!(GzUK)w\IZY#RKfOkmN#ڜmkϵ֙ {^N@إ (<)@4hgw1J7\=Tcj,OUl.=S kr-z`%hǦZ�&HUޤ}  ԅasYIMr%1P5nuԄ$'AqAmY;SI1qY8ѐ]8)X�q] GflӂNR͜8 c7LѻddLYnb-S*R+tiS2eR]LǑڌL,LMٖIzw) #B3?`mIm\cp?33M8cN,L\ͱM [W@ %9 9Iڛ\إ<M$<S`kG3!&&ax8/Q&x}%`$)p;Y2(.9#N#o $2tLkz6F<59iI;h@577".Ъmζ+g#H}.5A`ҿFsΌ²&w !IRCL|:-(+sR&8Y \M kSS1^XIy$duB,pLVr:3S/eS6t*G&nl#IɡzM)SIX(lTnpuA_ 6;I6̺׺I7]%iap H%&1x\hՊmm Ww1ͥ]9zߵw�a{LJiz] j- ] @\sՉmCF$^@PX[ڎ p]c6%arǕ(L2.: ɖsEM,Vh q  w4P0eC5cMA&nNSe=}^?U=r!)^)ӗoA2rSL#0߻6:\rRyq #IrL4 \ֵDԒFoLd0b%ؒMʘ鹘E&'M=31iKʖa۲kS%gkjp轰_\xPrG#mm Y:bəIޖ%;Ir! 2jSI@m7OcrmwzVĵmk7dږl\Lkms \'p2l$~&9XC5&B&%Ij#)2M(nw30AæڰKF/9nVI{%d kƲ$K]\b"\&t{0cwY$1l\++\i *LANP+Jiur&ú7۲P s(Aûf.9H|mYVU*]!n)0pY xݱKs.=.%[}?q/5OZ\_B{\Z~cn׿7ɢ vA"Lŵ$𒡷>\Z(@ʘi{/nrsmlmg6Qv)Yq49pU r\Os{]ۢ <mK9 2[/e.e ߺ]y~6{}o#BQR����IENDB`��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������elektra-0.7.1/doc/images/img_arrow.png��������������������������������������������������������������0000644�0000764�0000144�00000000352�11361542114�014573� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������PNG  ��� IHDR��� ��� ��c���gAMA�� a���bKGD������ pHYs�� �� ~���tIME ]b���gIDATxڕ 0 mH ؆ B')̧ ȑx])IvRԉ,#.!y�A�8oz3%mkt'-av����IENDB`��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������elektra-0.7.1/doc/images/important.gif��������������������������������������������������������������0000644�0000764�0000144�00000001251�11361542114�014602� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������GIF87a����c{cck!{{{{kkkccccccR!R1999)))��!�ZεRB1Z9){9ZZ)JssRsc{ZRRRc�9BBBBB1kkB�k1�������������������������������������������������������2�������������������������������������������������������H��������������������������,�������9@9@!,==G-&JK#-,�8:'=,KK*I/2D4H/0ɪK�@CJ$:.7%@9; $@ϫ<F :X˧ A#(8#1 7."$2% HV`ݪcq U`]!n`@ <n�&%J�p1jр6DER- !jXZx'M�;�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������elektra-0.7.1/doc/images/link_button_1.gif����������������������������������������������������������0000644�0000764�0000144�00000004150�11361542114�015336� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������GIF89aX�������uy};EP挥$*1cins[`d37<yz{AMYZk{񬭮} Q_mPU[k~z;?C333GKOdq~kkkzexABBޥRZbIVc""#*/3Zcl킆bs|̼mpsmAJP}DGJXYYJRZPQQ4>Gە]gq(*+2:AYeqfffp} R^kt|xstx}LXd<GR*19lsz@DH��RX^qrsTdsLPS!ަbfjjmqy$):;<DQ]LLL:BJht_m{m{넕*,/µŔX\abjr7<A{sr������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������!��,����X����KH*\pa#JHŋ3R"0 CIɓ(SXG w`( ǚ�@iIN7ugQ@K$/�i4s$ҟXC"M5gϫJTS6H`֯Dwh׻Fe*ُ`ʵ/XzU!7a"\*nL.d~,Rv$F۸mWFbG6Y!HmU.�pED@u`+ n$$0FHzH" X{6H =�D!I,tF}ć‡/p!eLh`Gdr"~]�J `Tpip&$� B xCEbBH X!#!F)fܰ� WG !3P=,F* a&sx@_H"!�z!Q)<�2Q7p QH]1'0-t ,P D04q"pI B5,C�pHFH)#4AX%`o(�@ZSH\PD`� &4'~|CHj pb  ؑC9@Cq|G0o`s(@"_nAaXҁC x (p!R|x1!?D@@� H0C CiM-'FADdqψ$!e0�@Cn�+(��$CUxn(vHXqriI~ByC!z2w�@%(<E ܽSR҄ lT�0L@�u0H" A@F$@C'Ёw_<Hfa0� Gл@eHl"w:P=X D hD|X%T XC0Hb EPRD3tЀ#P@  (p.=<n@",5 q`"0lo0�37"h!tDA!X�@("jb�l  Ij @x :`3D0 0 #ЖP/ & p *%Ò1� AB"#BL@ b$@IX�\ p\�0aBN8x,� Amn/+E�C<PXB�X�=ٷ|HUB'P6юz HGJҒ!(MJWҀ��;������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������elektra-0.7.1/doc/images/note.gif�������������������������������������������������������������������0000644�0000764�0000144�00000001104�11361542114�013527� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������GIF89a�� ����JJJRRRZZZccckkksss{{{������������������������������!���,�������`UUUUUUUI$IUUUUUUUUUUUU,ʲ,TUUUUUUUUMN@N(SUUUUUUIQEQEQ0UUUUUM CQEQEQ5-MUU`UMJCQEQEQEQTUU= EEQEQEQ5-UUUKDQEQREQEQRUBQE9 0M$I(IHM$AO,˲(<H<%=MED@D5)0LL-"QOFBMDQTHKH5)4BQHQ%))2M=QEQ%-`@(O$PEQE-O-5! PEQEMTUCQT$ERREQEQMSUHEQEQEQHQ2UUU1 EQEQEQEQSU`UUULEQEQE=SUUUUUŀ3QEQ%1SUUUUUUUВ,QJѳ$TUUUUUUUUUE(LXUUUU!�;������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������elektra-0.7.1/doc/images/type-binary.png������������������������������������������������������������0000644�0000764�0000144�00000000273�11361542114�015052� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������PNG  ��� IHDR���������a��� pHYs����od���mIDATxQ C{8ř4"%vL$ ` �<�pa@Ye o?;߃�% "l0*l g37d (˝..\����IENDB`�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������elektra-0.7.1/doc/images/type-extendedbinary.png����������������������������������������������������0000644�0000764�0000144�00000000411�11361542114�016565� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������PNG  ��� IHDR���������a��� pHYs����od���IDAT8[ DMqg2GS>'!" "@FK4dRܼs�_6ctnkDB% 㥢VwrFOԛGcY]CgR ˲&R7 w.&R&)ش:o'բmY2kb����IENDB`�������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������elektra-0.7.1/doc/images/type-extendedstring.png����������������������������������������������������0000644�0000764�0000144�00000000413�11361542114�016611� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������PNG  ��� IHDR���������a��� pHYs����od���IDAT8k LܫYɲXi^"A8VR$hww{$zZ/;Z|jfmIJR;Rk"",i�k˲urځgXWq@8ůfgaNZlp?u{Ȉ@ҐCRC|(%h̬7~F3{;����IENDB`�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������elektra-0.7.1/doc/images/type-folder.png������������������������������������������������������������0000644�0000764�0000144�00000001122�11361542114�015033� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������PNG  ��� IHDR���������a��� pHYs�� �� ����gAMA��|Q��� cHRM��z%��������u0��`��:��o_F��IDATxbd300$X\*#�@`dXpAC1H^�b1Ƚ{:_P07f`Ƚ?#HL�ߘ&TPS3@ @q&?�/?hUT �wP3_Bg]aLe3GѺ*Ce�b/@jZ0mJkph(,> .'Cg9@#A_\do�O@;9[@?f@Āğ?�O@{ x#يr =�DPC3̬~0�8 ]W DO2�@L M# .;?M% wԽtjP#B8 @ �0�ÈP:\����IENDB`����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������elektra-0.7.1/doc/images/type-link.png��������������������������������������������������������������0000644�0000764�0000144�00000000611�11361542114�014517� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������PNG  ��� IHDR���������a��� pHYs����od��;IDAT8J@t\a'w"> V+A,qS ͕4X$[5bgaֈR04CD5*u v &VNiz1ˇטE�1zoK2'ok)r�pQ9N:0ݘd H3ZǓ=$��U;ğT(@ێ0P ؿ〭o$i?�\,3_ "Zֿ(o\�nzIk-"D0 ߟB5JѼh`-3ƔE_����IENDB`�����������������������������������������������������������������������������������������������������������������������elektra-0.7.1/doc/images/type-string.png������������������������������������������������������������0000644�0000764�0000144�00000000303�11361542114�015066� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������PNG  ��� IHDR���������a��� pHYs����od���uIDATxQ C{7c?0 4*`IX|0@n2 䋠PzV0tTjAJwX�qJ!%�ꮧ{����IENDB`�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������elektra-0.7.1/doc/kdb.1.xml�������������������������������������������������������������������������0000644�0000764�0000144�00000010124�11365506635�012265� �����������������������������������������������������������������������������������������������������������������������������������������������������������������������������0000000�0000000������������������������������������������������������������������������������������������������������������������������������������������������������������������������<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [ <!ENTITY author SYSTEM "author.xml"> <!ENTITY rgcmd SYSTEM "rgcmd.xml"> <!ENTITY bestpract SYSTEM "bestpract.xml"> <!ENTITY example SYSTEM "rgexample.xml"> ]> <!-- $Id$ --> <refentry id="kdb"> <refentryinfo> &author; </refentryinfo> <refmeta> <refentrytitle>kdb</refentrytitle> <manvolnum>1</manvolnum> </refmeta> <refnamediv> <refname>kdb</refname> <refpurpose>Elektra key database command line administration tool</refpurpose> </refnamediv> <refsynopsisdiv> <cmdsynopsis><command>kdb get</command> <arg choice="opt"> <option>-dlr</option> </arg> <arg choice="plain">key/name</arg> </cmdsynopsis> <cmdsynopsis><command>kdb set</command> <arg choice="opt"> <option>-t</option> <option>type</option> </arg> <arg choice="opt"> <option>-d</option> </arg> <arg choice="opt"> <option>-c</option> <option>"A comment about this key"</option> </arg> <arg choice="opt"> <option>-m</option> <option>mode</option> </arg> <arg choice="opt"> <option>-u</option> <option>uid</option> </arg> <arg choice="opt"> <option>-g</option> <option>gid</option> </arg> <arg choice="plain">key/name</arg> <arg choice="plain">"the value"</arg> </cmdsynopsis> <cmdsynopsis><command>kdb set</command> <arg choice="opt"> <option>-t</option> <option>type</option> </arg> <arg choice="opt"> <option>-m</option> <option>mode</option> </arg> <arg choice="opt"> <option>-c</option> <option>"A comment"</option> </arg> <arg choice="plain">key/name</arg> <arg choice="plain">--</arg> <arg choice="plain">"the value"</arg> </cmdsynopsis> <cmdsynopsis><command>kdb set</command> <arg choice="opt"> <option>-t</option> <option>type</option> </arg> <arg choice="opt"> <option>-b</option> <option>file</option> </arg> <arg choice="plain">key/name</arg> </cmdsynopsis> <cmdsynopsis><command>kdb ls</command> <arg choice="opt"> <option>-lRfvs</option> </arg> <arg choice="opt">key/dir | key/name</arg> </cmdsynopsis> <cmdsynopsis><command>kdb ls</command> <arg choice="opt"> <option>-lRfvx</option> </arg> <arg choice="opt">key/dir | key/name</arg> <arg choice="plain">></arg> <arg choice="plain">keys.xml</arg> </cmdsynopsis> <cmdsynopsis><command>kdb edit</command> <arg choice="opt"> <option>-R</option> </arg> <arg choice="opt">key/dir | key/name</arg> </cmdsynopsis> <cmdsynopsis><command>kdb rm</command> <arg choice="plain">key/name</arg> </cmdsynopsis> <cmdsynopsis><command>kdb mv</command> <arg choice="plain">key/src</arg> <arg choice="plain">key/dest</arg> </cmdsynopsis> <cmdsynopsis><command>kdb ln</command> <arg choice="plain">key/src</arg> <arg choice="plain">key/dest</arg> </cmdsynopsis> <cmdsynopsis><command>kdb export</command> <arg choice="opt"> <option>-f</option> </arg> <arg choice="plain">system/some/tree.root</arg> <arg choice="plain">></arg> <arg choic="plain">file.xml</arg> </cmdsynopsis> <cmdsynopsis><command>kdb import</command> <arg choice="plain"><</arg> <arg choice="plain">file.xml</arg> </cmdsynopsis> <cmdsynopsis><command>kdb import</command> <arg choice="plain">file.xml</arg> </cmdsynopsis> <cmdsynopsis><command>kdb monitor</command> <arg choice="plain">some/key/name</arg> </cmdsynopsis> </refsynopsisdiv> &rgcmd; &bestpract; <refsection><title>Environment KDB_ROOT if defined, prepends it to key names. KDB_BACKEND defines the name of another backend plugin library to use &example; See Also elektra7, elektra5 elektra-0.7.1/doc/overview.xml0000644000076400001440000005262311365506635013246 00000000000000
Library Linkage Architecture The Elektra library (libelektra.so) has 2 layers: public methods and backend access, according to the following architecture (these pictures were taken from the Elektra presentation): When using local backends such as the filesys backend, all key access happens in the actual process space as bellow: A remote daemon backend is also possible as noted bellow:
True Facts About Elektra It is much more an agreement then a piece of software. Relation is 99% to 1%. It is a simple and consistent API to help software developers programatically store and retrieve global and user-specific configuration parameters. All key-value pairs are stored in clear-text files, UTF-8 encoded. All old charsets are also supported, with automatic transparent conversion to and from UTF-8. API supports change notifications and multiple backends. It provides a unique namespace for all values. Anywhere, anytime, any program can preciselly access keys by their names. Security restrictions may obviously apply. It is designed to be secure and lightweight, to let even early boot-stage programs like /sbin/init to use it, instead of /etc/inittab file. It is designed to be easy to administrate with regular command line tools like cat, vi, cp, ls, ln. Its storage is 100% open. It tries to set distribution-independent naming standards to store things like hardware configuration, networking, user's session configuration, system's mime-types, parameters for kernel modules, etc, that are generally stored under /etc. It requires existing software to be changed to use its API. This will substitute hundreds of configuration-text-file parsing code, into clear Elektra's API key-value access methods. It is POSIX compliant. If it doesn't compile and run easily on some POSIX system, it should be easily modified to do so.
Elektra Is Not Is NOT something that accesses SQL/relational databases. Is NOT an OS service that can become unavailable and make system unusable. It is just a library to access files according to a namespace. Is NOT an alternative to network information systems like LDAP or NIS. These are still required for networked environments. Is NOT a Webmin-like or other GUI tool to be used by end users. Is NOT an additional software layer to edit/generate existing configuration files. Is NOT a "configuration system", because one can't be created by simply writing some code. A configuration system is an ecosystem, and the Elektra Project tries to help build one. It doesn't know a thing about the semantics of each data it stores.
Namespaces and Key Names All keys are organized in a hierarchical tree with 2 Namespaces (subtrees) as showed by the picture: system Contains all subsystems and global application keys/configuration. Equivalent to files under /etc directory. user The current user's keys. Equivalent to the dotfiles in a user's $HOME directory. These keys are phisically stored under the owner user home directory. The many user:username in the picture shows the full name of those trees. Read about user domains bellow for more.
User Domains Different from the system namespace, the user namespace is dynamic. For example, the key user/env/PATH may have completely different values for users luciana and valeria. In this example, if valeria wants to access this key at luciana's space, it should refer to user:luciana/env/PATH. Access permissions apply. User domains were implemented also to address situations when different user names ($USER) have same UID. So a user key is stored in his home directory based on the user name, not the UID.
Inactive Keys A great thing about text configuration files is that some configuration items can be there as an example, but inactive or commented. Elektra provides a very simple way to simulate this behavior: if the key name begins with a dot (.), it is considered inactive or commented. In real world applications, the Elektra API will ignore these keys by default, but the keys are still accessible if the developer wants to. These are some keys that have inactive subtrees: system/sw/XFree/InputDevice/.Mouse3/Driver: All keys under .Mouse3/* subtree won't be read by default. user:valeria/env/env2/.PATH: The $PATH environment variable won't be set when valeria login. system/users/.louis/uid: The entire .louis/* subtree is inactive. This is the same as commenting the user entry from a configuration file. See bellow more examples of inactive keys.
Key Examples Here are some valid key names, and their values: The Elektra keys of the combined /etc/passwd and /etc/shadow entry for user 'nobody' would look like: system/users/nobody/uid: 99 system/users/nobody/gid: 99 system/users/nobody/gecos: Nobody system/users/nobody/home: / system/users/nobody/shell: /sbin/nologin system/users/nobody/password: * system/users/nobody/passwdChangeBefore: 0 system/users/nobody/passwdChangeAfter: 99999 system/users/nobody/passwdWarnBefore: 7 system/users/nobody/passwdDisableAfter: system/users/nobody/passwdDisabledSince: system/users/nobody/passwdReserved: The environment variables I want set, when I log in, with their full key name: user:aviram/env/env1/JAVA_HOME: /usr/lib/jvm/java-1.4.1-ibm-1.4.1.0/jre user:aviram/env/env2/PATH: $PATH:~/bin:$JAVA_HOME/bin user:aviram/env/env2/PS1: \h:\w\$ user:aviram/env/env3/PILOTRATE: 57600 The entry in /etc/inittab that is responsible for starting X11 would look: system/init/x/runlevels: 5 system/init/x/action: respawn system/init/x/process: /etc/X11/prefdm -nodaemon The users database files and /etc/inittab were Elektrified to key-value pairs using the users-convert and inittab-convert scripts included with the distribution. An example of an elektrified /etc/X11/xorg.conf or /etc/X11/XF86Config: system/sw/xorg/current/Layouts/Default Layout/Inputs/Keyboard0/CoreKeyboard: system/sw/xorg/current/Layouts/Default Layout/Inputs/Mouse0/CorePointer: system/sw/xorg/current/Layouts/Default Layout/Screens/Screen0/Absolute.x: 0 system/sw/xorg/current/Layouts/Default Layout/Screens/Screen0/Absolute.y: 0 system/sw/xorg/current/Layouts/Default Layout/Screens/Screen0/ScreenNumber: 0 system/sw/xorg/current/Files/FontPath: unix/:7100 system/sw/xorg/current/Files/RgbPath: /usr/X11R6/lib/X11/rgb system/sw/xorg/current/Devices/Videocard0/BoardName: Intel 740 (generic) system/sw/xorg/current/Devices/Videocard0/Driver: i740 system/sw/xorg/current/Devices/Videocard0/VendorName: Videocard vendor system/sw/xorg/current/InputDevices/Keyboard0/Driver: keyboard system/sw/xorg/current/InputDevices/Keyboard0/Options/XkbLayout: us_intl system/sw/xorg/current/InputDevices/Keyboard0/Options/XkbModel: pc105 system/sw/xorg/current/InputDevices/Mouse0/Driver: mouse system/sw/xorg/current/InputDevices/Mouse0/Options/Device: /dev/input/mice system/sw/xorg/current/InputDevices/Mouse0/Options/Emulate3Buttons: yes system/sw/xorg/current/InputDevices/Mouse0/Options/Protocol: IMPS/2 system/sw/xorg/current/InputDevices/Mouse0/Options/ZAxisMapping: 4 5 system/sw/xorg/current/Monitors/Monitor0/DisplaySize.height: 230 system/sw/xorg/current/Monitors/Monitor0/DisplaySize.width: 300 system/sw/xorg/current/Monitors/Monitor0/HorizSync: 30.0 - 61.0 system/sw/xorg/current/Monitors/Monitor0/ModelName: SyncMaster system/sw/xorg/current/Monitors/Monitor0/Options/dpms: system/sw/xorg/current/Monitors/Monitor0/VendorName: Monitor Vendor system/sw/xorg/current/Monitors/Monitor0/VertRefresh: 56.0 - 75.0 system/sw/xorg/current/Monitors/.Monitor1/HorizSync: 30.0 - 61.0 system/sw/xorg/current/Monitors/.Monitor1/ModelName: Impression system/sw/xorg/current/Monitors/.Monitor1/Options/dpms: system/sw/xorg/current/Monitors/.Monitor1/VendorName: Monitor Vendor system/sw/xorg/current/Monitors/.Monitor1/VertRefresh: 56.0 - 75.0 system/sw/xorg/current/Screens/Screen0/DefaultDepth: 16 system/sw/xorg/current/Screens/Screen0/Device: Videocard0 system/sw/xorg/current/Screens/Screen0/Displays/00/Depth: 16 system/sw/xorg/current/Screens/Screen0/Displays/00/Modes: 1024x768,800x600,640x480 system/sw/xorg/current/Screens/Screen0/Displays/00/Viewport.x: 0 system/sw/xorg/current/Screens/Screen0/Displays/00/Viewport.y: 0 system/sw/xorg/current/Screens/Screen0/Monitor: Monitor0 system/sw/xorg/current/Modules/dbe: system/sw/xorg/current/Modules/dri: system/sw/xorg/current/Modules/extmod: system/sw/xorg/current/Modules/fbdevhw: system/sw/xorg/current/Modules/freetype: system/sw/xorg/current/Modules/glx: system/sw/xorg/current/Modules/record: system/sw/xorg/current/Modules/type1: system/sw/xorg/current/DRI/Group: 0 system/sw/xorg/current/DRI/Mode: 0666 Pay attention that the keys bellow system/sw/XFree/current/Monitor/.Monitor1 are inactive because we have .Monitor1 as their parent. So unless special options are used when calling the API, these keys will not be retrieved from the database. Throughout this text you will see other examples of key names.
Key Data Types There are only two types of data that can be stored: Text Handled as pure text. Regardeless of the charset being used, these values are always stored as UTF-8. This ensures very strong internationalization and migration capabilities, while keeping simplicity. If you don't want the Elektra framework to convert your non-ASCII text to UTF-8 (not recomended), you should use the Binary data format. Binary A stream of bytes, not necessarily text. It is recommended that you avoid using binary values because UNIX system administrators tend to consider them as unmanageable blackboxes. Anyway, the value will be encoded into pure text format based on hexadecimal digits, for openness and ease of administration. This data type should also be avoided because it is less efficient. There are very good reasons why types like Integer, Time, Font, List, etc were not implemented: Elektra was designed to be usefull for any type of program, so having more specific data types implicates in the definition of value limits, separators in the storage format, etc, that may be good for some application and bad for other. So the semantics of the data is handled by the application. A program or framework may define its own special data handling methods using these essential basic types. See the keyGetType() and keySetType() methods documentation in the kdb3 man page to understand how to set keys with your own data types. There are more two types of keys: Directory It can't store a value, but, as a directory in a filesystem, it serves as a way to group correlated keys. Link It is a link to another key. They work as symbolic links in the filesystem: when trying to access them, you will actually access the key they point to. The API also provides ways to access these special keys without dereferencing them.
Key Meta Data Besides the key name and the value, each key has other attributes: Owner's User and Group This is a system's UID and GID equal to the ones found in regular files' attributes. Access Permissions Filesystem-like access permissions for user, group and others. Modification, Access and Stat Times Last time a key was modified, readed and stated (listed), respectively. Key Comment Pretty much as a configuration file comment. Not intended to be used in GUI applications, because it isn't internationalizable.
Fine Grained Security Example To show this metadata in action, this screen shows the kdb command listing keys and their attributes related to user nobody. bash$ kdb ls -Rlv system/users/nobody -rw-r--r-- root root 17 Mar 31 09:07 system/users/nobody/uid=99 -rw-r--r-- root root 17 Mar 31 09:07 system/users/nobody/gid=99 -rw-r--r-- root root 21 Mar 31 09:07 system/users/nobody/gecos=Nobody -rw-r--r-- root root 16 Mar 31 09:07 system/users/nobody/home=/ -rw-r--r-- root root 28 Mar 31 09:07 system/users/nobody/shell=/sbin/nologin -rw------- root root 16 Mar 31 09:07 system/users/nobody/password -rw------- root root 16 Mar 31 09:07 system/users/nobody/passwdChangeBefore -rw------- root root 20 Mar 31 09:07 system/users/nobody/passwdChangeAfter -rw------- root root 16 Mar 31 09:07 system/users/nobody/passwdWarnBefore -rw------- root root 15 Mar 31 09:07 system/users/nobody/passwdDisableAfter -rw------- root root 15 Mar 31 09:07 system/users/nobody/passwdDisabledSince -rw------- root root 15 Mar 31 09:07 system/users/nobody/passwdReserved We ran the kdb command without super-user credentials, asking for long (), recursive () listing, and to show each key value (). But (since we are) regular user, we don't have permission to see the values of the system/users/nobody/passwd* fields. The users database files were elektrified to key-value pairs using the users-convert script included with the distribution.
elektra-0.7.1/doc/rgcmd.xml0000644000076400001440000002250711365506635012472 00000000000000
Description The kdb command provide ways to manipulate the Elektra keys database. The subcommands implemented are very similar to regular UNIX commands like ls, and rm, specially in their output and options.
Subcommands get Get the value from the specified key. Accepts options: , , , set Set the value to the specified key. Accepts options: , , , , ls As the ls1 command, list key names for the specified key, or children keys, if specified a folder key. The argument will make it show also the values of each key. The (descriptive) will make it show the comment, key name and its value, as you are watching a plain text file. Accepts options: , , , , , , ln Creates a key that is a symbolic links to another key. mv Move, or renames a key. Currently it can't move keys across different filesystems. rm As the rm1 command, removes the key specified. edit A very powerfull subcommand that lets you edit an XML representation of the keys. The parameters it accepts is usually a parent key, so its child keys will be gathered. Can be used with the flag to work recursively. The editor used is the one set in the $EDITOR environment variable, or vi. After editing the keys, kdb edit will analyze them and commit only the changed keys, remove the keys removed, and add the keys added. This command is only available when /usr/lib/libelektratools.so is available. exportsave Export a subtree of keys to XML. If no subtree is defined right after the export command, system and current user trees will be exported. Output is written to standard output. The output encoding will allways be UTF-8, regardeless of your system encoding. UTF-8 is the most universal charset you can get when exchanging data between multiple systems. Accepts . importload Import an XML representation of keys and save it to the keys database. If no filename is passed right after the import command, standard input is used. This command is only available when /usr/lib/libelektratools.so is available. monitormon Monitor a key for some value change. It will block your command line until a change in the key value is detected, then return its new value.
Options Causes to work recursively. In ls, will list recursively. Makes ls output an XML representation of the keys, instead of an ls-compatible output. Causes to display long results. With ls, will generate lists similar to ls -l. With get, will show also the key name. Causes ls to display also inactive keys. Generate lists similar to ls -a. Inactive keys are keys which basename begins with a '.' (dot). An example of inactive key: system/sw/XFree/current/Monitor/.Monitor1 Causes to work with full key names. A full key name makes sense only on user/* keys, and differentiate from the regular key names in specifying the owner user. If the current user is someuser, the user/some/key full name is user:someuser/some/key. Makes effect in ls, export and get subcommands. Causes get to work descriptivelly. When requesting a key it will show the comment, key name and its value in a fancy format. Causes set to mark the key as a directory key. Causes get and ls to be more friendly to Shell scripts. For example, when requesting user/env/env2/PATH, the output will be PATH="the value", that is, only the basename of the key will be showed and the value will be surrounded by ' " '. When setting a key's value, you can specify the type with this switch. Currently accepted types are string for plain text, bin for binary as-is values, dir to create folder keys and link to create symbolic links between keys. Plain text are always stored as UTF-87 in Elektra, regardeless of your current encoding ($LANG). If you want to force a value to be stored without the UTF-87 encoding (a bad idea), you can set it as binary. Binary values should be avoided, because they are black boxes for system administrators. Set the key value as the content of file filename. This option is more usefull when setting binary keys. For the set command. Will set the key access permission to , which must be an octal number as for chmod1. Create the key with user ID. It can be a user name or a uid number. Create the key with group ID. It can be a group name or a gid number When setting keys, you can use this argument to set a descriptive comment for it. This comment is exactly as a comment in a plain text configuration file. The comment is stored as UTF-87 regardeless of your current encoding ($LANG). With the ls subcommand, will make it show also the value stored in the key. With the set subcommand, everything after it will be considered the value, even text with dashes (-).
elektra-0.7.1/doc/rgexample.xml0000644000076400001440000000524211365506635013357 00000000000000
Examples
Setting Keys bash$ kdb set -c "My first key" user/example/key "Some nice value" bash$ kdb set user:luciana/example/key -- "Some - nice - value with dashes" bash# KDB_ROOT=user:http/sw/httpd kdb set -u nobody -g http key "Some value" bash$ kdb set -b image.png -t bin user/example/binaryKey bash$ kdb set -b file.txt user/example/regularKey bash# kdb set -t link system/sw/XFree/current system/sw/XFree/handmade
Getting Keys bash$ KDB_ROOT=user/example kdb get some/key/name bash$ eval `kdb get -s user/env/env1/PS1` bash$ KDB_BACKEND=gconf kdb get user/sw/gnome-terminal/global/active_encodings
Listing bash$ kdb ls -laR user:valeria bash$ kdb ls -lR system/sw/xorg/current bash$ KDB_ROOT=system/sw kdb ls -lR xorg bash$ KDB_BACKEND=fstab kdb ls -Rv system/filesystems bash$ eval `kdb ls -Rvs user/env/env2`
Miscelaneous bash# kdb ln system/sw/xorg/handmade system/sw/xorg/current bash# kdb mv system/sw/xorg/current system/sw/xorg/old bash# kdb rm system/inittab/rc4 bash$ KDB_BACKEND=gconf kdb rm user/gconfKey
XML Import and Export bash# kdb export user/sw/app | sed -e 's|/app/|/app2/|g' | kdb import bash# KDB_ROOT=system/sw kdb export myapp > myappconf.xml bash# kdb import myappconf.xml bash$ KDB_BACKEND=gconf kdb export user/sw
elektra-0.7.1/doc/society.xml0000644000076400001440000001003711365506635013050 00000000000000
A Society of Softwares, Bureocracy and Integration Let's imagine that every Open Source project (and commercial software) out there are members of a society. They can't live alone each one in its own cave. XFree, Apache, Samba can't work without an OS, and an OS is useless without higher level software. KDE, Gnome need X. Nobody can think about setting up an Internet MTA without an anti-SPAM tool, and strong commercial anti-virus software. Apache needs third party plugins and extensions to add value to what it does. And all of them need a growing number of users to justify a purpose for them to exist. The way these members start to work together - and then really make the society evolve - is through their configurations. As an example, an advanced commodity video card must say to X Window System: "Hey! I'm providing this driver and parameters, and I guarantee for you and your customer super exciting fast graphics!! Let me show you how to do that". And then X must say: "That's great! Please proceed making my customer happy, without taking his and my time to show we can work together. And BTW lets make some co-marketing to advertise the value of our alliance." But the hypothetical conversation happening today is: Commercial Driver: "Hey, XFree, I'd like to reach your customers 'cause they like that 'F' word in your name. I'd put together some code to work with your supply chain specification (driver API), but you have such a big network of brokers (OS distros), and each one showed me its set of paper forms (configuration files) I have to fill to work with you." XFree: "Yeah, thats great. But look, I'm very focused now working on performance and architecture. You should really try to understand how each of these brokers work, and how to fill their forms." Commercial Driver: "Well, thats quite impossible because they are too many, and that's just too much bureocracy for me to handle. So I'll keep myself focused on that other broker that is so easy to plug-and-play. And the best I can do for you is to write a white paper for your customers, explaining how to use a text editor to get us working together. And BTW I'm not able to provide support, because I can't understand your ecosystem of brokers and users." XFree: "OK. That's life." XFree Customer: "Oh boy, why is this Video Driver I just bought so difficult to install and manage? Why is so easy to do that in my other partition? Why the driver installs itself so easily there, and it is so complicated here?" (this conversation received a considerable amount of drama, it is just an example, and this specific entities in real life may not have exactly the issues showed here) How many advanced Linux/*BSD/GNU user have been asked to help a newbie friend to setup his video card? I know plenty of them. Because of the Bazar-way of developing Open Source Software, each software project still dodn't agree in a common way to store configurations, so this part of the software is still like 20 years ago: a human-readable text file format that each project invented for itself. This makes them relatively easy to be managed by human beings, but not sociable at all in this hipotetical software society. It is programatically difficult to make different software have "social relations" in the current way configurations are handled. An application's configuration is its personality. A key-value pair mechanism brings little or no additional value for a software that is using it to store its configurations/state. But it is vital to make it more "easy-going" in a society of softwares. This will benefit the society as a whole, and consequently all of its members.
elektra-0.7.1/doc/standards/0000777000076400001440000000000011365513215012705 500000000000000elektra-0.7.1/doc/standards/Makefile.am0000644000076400001440000000013611365507605014663 00000000000000 # $Id$ EXTRA_DIST= env.xml filesystems.xml network.xml signature.xml userdb.xml sysinit.xml elektra-0.7.1/doc/standards/Makefile.in0000644000076400001440000002477011365511146014701 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ # $Id$ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = doc/standards DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/extensions.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) INSTALL = @INSTALL@ ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BACKENDS = @BACKENDS@ BACKEND_VERSION_API = @BACKEND_VERSION_API@ BINDINGS = @BINDINGS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CDBGFLAGS = @CDBGFLAGS@ CFLAGS = @CFLAGS@ COPTFLAGS = @COPTFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSTDFLAGS = @CSTDFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDBGFLAGS = @CXXDBGFLAGS@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXOPTFLAGS = @CXXOPTFLAGS@ CXXSTDFLAGS = @CXXSTDFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_FALSE = @DEBUG_FALSE@ DEBUG_TRUE = @DEBUG_TRUE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ELEKTRATOOLS_VERSION_API = @ELEKTRATOOLS_VERSION_API@ ELEKTRA_VERSION_API = @ELEKTRA_VERSION_API@ EXEEXT = @EXEEXT@ EXPERIMENTAL_FALSE = @EXPERIMENTAL_FALSE@ EXPERIMENTAL_TRUE = @EXPERIMENTAL_TRUE@ F77 = @F77@ FFLAGS = @FFLAGS@ GENHTML = @GENHTML@ GREP = @GREP@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ HAVE_LIBLTDL_FALSE = @HAVE_LIBLTDL_FALSE@ HAVE_LIBLTDL_TRUE = @HAVE_LIBLTDL_TRUE@ HAVE_MAN2HTML_FALSE = @HAVE_MAN2HTML_FALSE@ HAVE_MAN2HTML_TRUE = @HAVE_MAN2HTML_TRUE@ HAVE_XML_FALSE = @HAVE_XML_FALSE@ HAVE_XML_TRUE = @HAVE_XML_TRUE@ HAVE_XSL_FALSE = @HAVE_XSL_FALSE@ HAVE_XSL_TRUE = @HAVE_XSL_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDB_VERSION = @KDB_VERSION@ KDB_VERSION_MAJOR = @KDB_VERSION_MAJOR@ KDB_VERSION_MAJORMINOR = @KDB_VERSION_MAJORMINOR@ KDB_VERSION_MICRO = @KDB_VERSION_MICRO@ KDB_VERSION_MINOR = @KDB_VERSION_MINOR@ LCOV = @LCOV@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VALGRIND = @VALGRIND@ VALGRINDTESTS_FALSE = @VALGRINDTESTS_FALSE@ VALGRINDTESTS_TRUE = @VALGRINDTESTS_TRUE@ VERSION = @VERSION@ XML2_CONFIG = @XML2_CONFIG@ XML_CPPFLAGS = @XML_CPPFLAGS@ XML_LIBS = @XML_LIBS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ backend_static_libs = @backend_static_libs@ backenddir = @backenddir@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ datarootdir = @datarootdir@ dbroot = @dbroot@ default_backend = @default_backend@ default_dbackend = @default_dbackend@ default_docbook = @default_docbook@ develdocdir = @develdocdir@ docdir = @docdir@ doxygen = @doxygen@ dvidir = @dvidir@ elektratools = @elektratools@ exec_prefix = @exec_prefix@ gconf_CFLAGS = @gconf_CFLAGS@ gconf_LIBS = @gconf_LIBS@ hlvlbackenddir = @hlvlbackenddir@ 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@ man2html = @man2html@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ privatelibs = @privatelibs@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ ulibdir = @ulibdir@ xsltproc = @xsltproc@ EXTRA_DIST = env.xml filesystems.xml network.xml signature.xml userdb.xml sysinit.xml 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 \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/standards/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu doc/standards/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_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 distclean-libtool dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: 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-info-am .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-exec install-exec-am \ install-info install-info-am install-man install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: elektra-0.7.1/doc/standards/env.xml0000644000076400001440000000642511361542115014137 00000000000000 $PATH:$JAVA_HOME/bin Since we are under env2, and $JAVA_HOME was defined in env1, at this point, $JAVA_HOME is already set. elektra-0.7.1/doc/standards/filesystems.xml0000644000076400001440000000626611361542115015721 00000000000000 /dev/hdc The device or label to be mounted /media/cdrecorder Moint point someplace in the filesystem auto Filesystem type. See fs(5) Could be ext3, reiserfs, jfs, ntfs, vfat, etc. pamconsole,exec,noauto,managed Filesystem specific options. See mount(8) 0 Dump frequency in days 0 Pass number on parallel fsck elektra-0.7.1/doc/standards/network.xml0000644000076400001440000003421711361542115015040 00000000000000 default The network configuration profile name that should be used as a default. A profile contains an entire network configuration. example.domain.com The fully qualified host name ns1.domain.com, ns2.domain.com, ns1.organization.org Comma separated list of name servers. domain.com, sub1.domain.com, sub2.domain.com, domain2.com Comma separated search domains. Domains that will be tested together with a non FQDN host. localhost,localhost.localdomain,example.domain.com The localhost. Check that I have also example.domain.com since this is my hostname as noted on system/network/hostname above. mta,mta.domain.com,mailhub The IP address of our mail server, with several aliases. LoopBack This a symbolic name for the device, and use to be identical to this key's parent directory name. This name is intended to be used in user interfaces. If this name is renamed, the parent directory key should be renamed too. lo The Unix device name to be used with 'ifconfig' command 127.0.0.1 The fixed IP address of this interface. 255.0.0.0 127.255.255.255 If you're having problems with gated making 127.0.0.0/8 a martian, you can change this to something else (255.255.255.255, for example). 1 1 for automatic activation on boot, 0 for only manual SymbolicName1 This a symbolic name for the device, and use to be identical to this key's parent directory name. This name is intended to be used in user interfaces. If this name is renamed, the parent directory key should be renamed too. Intel Corporation 82540EP Gigabit Ethernet Controller (Mobile) The device name as returned by its chipset eth0 The UNIX device name. 10.100.8.100 The fixed IP address of this interface. Will be used only if bootproto key for this interface is not dhcp. 255.255.255.0 The netmask. Will be used only if bootproto key for this interface is not dhcp. 00:0D:60:12:A8:C6 The MAC address of this network interface static The protocol type to be used to configure this interface. DHCP, BOOTP or static. 0 Weather this interface should be initialized with IPv6 too. Valid values are 0 or no and 1 or yes. 1 1 for automatic activation on boot, 0 for only manual ethernet The phisical type of this network interface. Ethernet, Wireless, TokenRing, etc 1 1 to let regular users control this interface, 0 to be controled only by root 1 1 or yes means the DNS server will be provided by the remote peer. 10.100.8.1 Default gateway for the LAN connected to this interface. 10.100.8.2 The IP address that provides us a gateway to the symbolic "route1" destination 10.100.9.0 The symbolic "route1" destination is really this IP class plus netmask bellow. 255.255.255.0 The size and details of the destination network through its netmask. 10.100.8.3 The IP address that provides us a gateway to the symbolic "otherroute" destination 10.100.10.0 The symbolic "otherroute" destination is really this IP class plus netmask bellow. 255.255.255.0 The size and details of the destination network through its netmask. WirelessDevice1 This a symbolic name for the device, and use to be identical to this key's parent directory name. This name is intended to be used in user interfaces. If this name is renamed, the parent directory key should be renamed too. AIRONET Wireless Communications Cisco Aironet Wireless 802.11b The device name as returned by its chipset eth1 The UNIX device name. Office Network The wireless session ID name to associate with. If empty, automatic behavior should be assumed. 1 The wireless channel to use infrastructure The wireless mode to use. Mode or Infastructure. 11M The wireless speed to use. Common values are "11M", "auto", "5.5M", "1M" and "2M". ABC123 The wireless key for security. Use to be an hex number without the "0x" prefix. Pay attention to the "mode" attirbute, that differs from others, being more restricted (rw-------) 01:0E:61:13:A9:C7 The MAC address of this network interface dhcp The protocol type to be used to configure this interface. DHCP, BOOTP or static. something.domain.com The hostname we'll tell to the DHCP server, for dynDNS purposes. 0 Weather this interface should be initialized with IPv6 too. Valid values are 0 or no and 1 or yes. 1 1 for automatic activation on boot, 0 for only manual wireless The phisical type of this network interface. Ethernet, Wireless, TokenRing, etc 1 1 to let regular users control this interface, 0 to be controled only by root 1 1 or yes means the DNS server will be provided by the remote peer. 10.100.8.1 Default gateway for the LAN connected to this interface. default The profile name that is used as a base to build this "Office" profile. This way, we don't have to redefine all keys again, but only the keys that change in relation to the inherited profile. In this case, the "default" profile . dhcp The protocol type to be used to configure this interface. DHCP, BOOTP or static. something.domain.com The hostname we'll tell to the DHCP server, for dynDNS purposes. elektra-0.7.1/doc/standards/signature.xml0000644000076400001440000002310011361542115015335 00000000000000 Red Hat The company or organization that provides this operating system. Common values would be SuSE, Debian, CetnOS, Microsoft, etc. Linux The simple name of this OS. Could be "OpenBSD", "Windows", etc redhat A name for whom the system looks like. This is the most important key since it provides the hint about the filesystem layout, packaging naming conventions, etc Could be "redhat" for RHEL, CentOS, Fedora, Mandriva, Whitebox, Scientific Linux, etc. "debian" for Debian, Ubuntu, KUbuntu and all Debian-derived distro's "BSD" for all *BSD systems "suse" for SLES, OpenSuSE and Novell Linux Desktop Or "slackware", "aix", "solaris" etc for other systems Red Hat Enterprise Linux 4 AS A nice human readable system name. Nanant An internal name that providers use to give to their products. Could be "Potato" for Debian, "Vista" for Windows, etc. AS The edition of this OS. Common values are "Home Edition", "ES", "WS", Professional, etc 4 The version of this OS. Could be "95" or "2000" for popular Windows versions, "7.3" for old Red Hat versions, etc. 2 The update or patch level of a system. Could be "SP3" for Windows systems, etc. ia32 The platform this OS is installed on. Popular names are "x86_64", "ppc", "s390", "s390x", "sparc", "ia64". http://www.redhat.com Some URL the provider wants to be published. mozart.br.ibm.com The current hostname. 007f0100 The hostid as from the `hostid` command. -----BEGIN DSA PRIVATE KEY----- MIIBuwIBAAKBgQCguDE4+ZUx0JeKeypSCaGCXpDZ9W7BUykE8JV5aQ1M2cafv/lP LF/nBrHEQ2sY21e8aliuDKLxG6XWlcS1XePzsDVBlPsHwt3C0CfZh6IJkPCqU028 1wV49q3LMJ6q1YfuWP1p3QZ3QuuxNpAiQob7iMNTR276tXy5llzUsgFRaQIVANEB Dc2HPwuN3T46gWatFRGf8SIgsdh54ygfffewfwf42dsxccaChIz2m/ZN7KDp0MxJ PR1Unk8lwY84PGepZcbWM7aJyijnKq1LKf8o8jsAMTV8BL6NR4SgDQ5jCT/VFcEu VZNj1MFHu91R4QGpl4OC0DfNcO8vqbSRwQDIrKP4+ZzrT6z25y1+I9skVlftox4W Fdvv77QCgYAOIP+QDKa0MdFrHsSdW8OwQXzOI9GZ6rMKj8Hnlq6lV5KGk0d1Bw86 7x9zN27EnyT8v4uoagba6SKReXX40znPIH247G4PuntIPNf63OnIptuYwYBG03gZ 6N5Agq6c3VFJMtXfPZOeQEdCRqFzbAkvADsmRUFymwT5KJxwqoKJ5QIVAIoN1f+Y cKz8nTtQbm2eVIXGuJCb -----END DSA PRIVATE KEY----- The SSH host DSA private key, with restricted access rights. ssh-dss AAAAB3NzaC1kc3fsdhtttthwtgvhgerrc4p7KlIJoYJekNn1bsFTKQTwlXlpDUzZxp+/+U8sX+cGscRDaxjbV7xqWK4MovEbpdaVxLVd4/OwNUGU+wfC3cLQJ9mHogmQ8KpTTbzXBXj2rcswnqrVh+5Y/WndBndC67E2kCJChvuIw1NHbvq1fLmWXNSyAVFpAAAAFQDRAQ3Nhz8Ljd0+OoFmrRURlPEiNwAAAIBGli6BpycCe4j6fEjKtoKEjPab9k3soOnQzEk9HVSeTyXBjzg8Z6llxtYztonKKOcqrUsp/yjyOwAxNXwEvo1HhKANDmMJP9UVwS5Vk2PUwUe73VHhAamXg4LQN81w7y+ptJHBAMiso/j5nOtPrPbnLX4j2yRWV+2jHhYV2+/vtAAAAIAOIP+QDKa0MdFrHsSdW8OwQXzOI9GZ6rMKj8Hnlq6lV5KGk0d1Bw867x9zN27EnyT8v4uoagba6SKReXX40znPIH247G4PuntIPNf63OnIptuYwYBG03gZ6N5Agq6c3VFJMtXfPZOeQEdCRqFzbAkvADsmRUFymwT5KJxwqoKJ5Q== The SSH host DSA public key, world readable. 53534820 50524956 41544520 4b455920 46494c45 20464f52 4d415420 312e310a 00000000 00000000 04000400 beab5cd0 35bc1a52 6c17e3c7 a87ecf1b 9158a565 e14470a1 ade7f4c7 ba846eb3 39193529 dc24e0f4 cf16f87e 6ca44868 3f768dd6 7eef557f e8dd23b6 3a055005 8a5811ce 00ed3e89 eb543497 e80113ba 8f5dfa8f 0e2f8574 3914d1b5 104da21c eee90e84 6f47acf0 c82f3e65 51840e79 ed336aa6 d342f579 9ecf67b0 35693f7d 00062300 436bf01a db1adb04 0082bea6 0b1d884c 904a1f02 97897b86 b3d1615b 790f7f63 2d09891c e0ba6970 7ae5531d 2404ab92 f103086f e1a99538 f706f235 5fe20333 506529ec 9a366a0a fb4cacbe 1af84c7d 9ee71ace 083f477e 2b5c1b97 61353e15 0c8d05da 42d0ac87 2e2d7020 ddef6e91 bcd3328f 6316355c 99a44006 604dd958 1e319c97 344e6d9f 6b01ff48 8d79943c e70564ce 6089c609 13984747 518fa7ba d55b1d49 97f21418 a39d0d54 6b320cdb c3676464 578a45c7 dcc609bb 872b87b8 31156dc0 94be1d17 a15d3b02 00d12d26 c26df169 530f33ae 0ece96b4 ffc894d9 3a8cdef6 9060e775 67a5ab14 4091f315 77c4dc88 eaf07b2f bf2f01b7 99ad0303 4c4b80da 840a2775 1bae875e 9f0200e9 59ab243e 36f359cb 196f67bd 221c10e0 7639e6be 560586df da28abfa 519e0e5a b273c902 948f7d23 b4fd8af7 74852adb 5308b8c0 e5251ee1 a39612e9 d7586300 000000 The SSH host private key, with restricted access rights. 1024 35 133892595653256457463456456345345488979733150777187284158956215390108993297627905677371390137055710482921314394380186549930047947484792463530275815344585642129311166497767148739660518671459802791497180732174353699608837459155915281166640936134956874158021502283692507013138334991381984009372215977800337276797 The SSH host public key, world readable. -----BEGIN RSA PRIVATE KEY----- MIICXQIBAAKBgQDqcKzcwbCTe7l11vIdCxvcsNNABW0ASQXn2f3ssRGmjqn08k1y /94uQiVG3bEWdPpkeo3WM8THm+8seLcm/2oEt3IMBpmMDVD44XIpHSI3CBOtYDbU FVa3VP9+0qCFrIzVLJcdlWGpQDeuEcYjcSzqhj3GdmMhviDFBE6iHfk0JwIBIwKB gQCgwkqmASifpUv5CGuBoTetRg0zNuuobJZV108Is+7YnFdI4Koi+JhaO/xN2diE bXh/afrcBj3KtBG4GEMTbVAB6+3L3/KKVQ32ryuIwvOS8dhDGIqwK26ZgNqYLwOI WRXo1zvyGpVLt90xQrpfxhdth4645ggvgrVMRGxccdoTCwJBAPmJ74/o+op/VYJ9 eqBcoAy8Hsta7N99H9JIVa0tjRkS/58l9DKhSEIL2EcdXk4yyWAaKFqWg+DU93cs px/7EYkCQQDwgqh6xDJxcpuff9xgd7YFUYIREaZL2Ez8Iws2OHxm5Iyo5GhRUVKS CUNJWPl1z52EBWLSqc1ZH2fh/WExxhwvAkEA8mi81PDzYfgJ7Hnk1ktZpfiS8W5F MN/zBsns1B2fAmo6JZKVcwMS/lSmNnRM+4HK76RhtxXfMi33tZkXYOVEOwJBAKTr 4T49ZGsMwnv/55KbOvxVJf0TareqQ2sQtzsfaz89okftFFUEkGQjm9qGJ2a6QCAD sXqDEHeggb+JLLRqlvsCQQDZSk/2ZjPyp7t3J1e1dDW82Fxs9XhipCzOMRi7KLWF K8IltIGrmgMfkn3bDDlKAvoHIH+hrmlghEx2MEuDG6nY -----END RSA PRIVATE KEY----- The SSH host RSA private key, with restricted access rights. ssh-rsa AAAAhtrhgrdsfg5gfdfgGREWGEEREFGrefgerrgerdbyHQsb3LDTQAVtAEkF59n97LERpo6p9PJNcv/eLkIlRt2xFnT6ZHqN1jPEx5vvLHi3Jv9qBLdyDAaZjA1Q+OFyKR0iNwgTrWA21BVWt1T/ftKghayM1SyXHZVhqUA3rhHGI3Es6oY9xnZjIb4gxQROoh35NCc= The SSH host RSA public key, world readable. elektra-0.7.1/doc/standards/sysinit.xml0000644000076400001440000000474511361542115015054 00000000000000 Defines the sequence ID entries will be run. Since we migrated from the stream text file (/etc/inittab) to a tree of key-value pairs that doesn't have a sequence at all, we need a way to define the sequence the INIT tasks will be run. We do that using the system/init/sequence key. id,si,l0,l1,l2,l3,l4,l5,l6,ca,pf,pr,1,2,3,4,5,6,x Init ID name Active runlevels to execute this ID Approach Program to execute /sbin/shutdown -f -h +2 "Power Failure; System Shutting Down" elektra-0.7.1/doc/standards/userdb.xml0000644000076400001440000000577211361542115014637 00000000000000 elektra-0.7.1/doc/storage.xml0000644000076400001440000001453611365506635013045 00000000000000 This section is provided for the sake of the openness of Elektra. You should not access the Elektra's key files directly. You should use the API or the kdb1 command for that.
Elektra Key Storage Strategy Elektra implements a very simple way to store the key-value pairs. The value (and some metainfo) for each key is stored in a single file. The key name (and some of its context) is sufficient to find the file name that stores the value. The system/* keys are stored under /etc/kdb/, and the user/* keys can be found under each user's $HOME/.kdb/. Here are some examples of key names, and where Elektra goes to look for them in the disk. system/sw/XFree86/screen0/driver Maps to: /etc/kdb/system/sw/XFree86/screen0/driver user/env/PATH Maps to: ~$USER/.kdb/user/env/PATH user:luciana/env/PATH Maps to: ~luciana/.kdb/user/env/PATH system/mime.types/some.mime Maps to: /etc/kdb/system/mime.types/some.mime Some may think that one file per key will consume many filesystem i-nodes. Actually, when not using Reiser4 filesystem, it may consume some more disk space, and it may also be not so efficient than reading one single text file, as KConfig does. But Elektra's nature lets applications load their keys on demand; so it is possible to avoid the read-all-use-some approach. Writing updated keys back to disk is also more robust, because unchanged keys won't be touched, different from a single file approach, that must be entirelly rewritten. Besides that, big applications (like Mozilla, Konqueror, KDE, Gnome) key gathering time is a very small part of what they have to do to start up. And the benefits of an homogeneous key database to the entire system are much bigger then these issues. Think about a common integration between everything, flexibility, security granularity and openness.
XML, Storage Backends and Elektra This document you are just reading was written in DocBook XML. XML is a wonderfull technology, but brings no value to this software. Two main goals of the Elektra Project are to be lightweight, and to be accessible by early boot stage programs like /sbin/init and the /etc/rc.d scripts. XML parsing libraries are memory eaters, not so fast as we can expect, and they are usualy located under /usr/lib, which may be unavailable to these early boot stage needs. Some discussions asked for a sort of plugin architecture to let user decide the format to store keys content. Well, the info that goes into the key file is not big deal as you'll see, and sometimes, too many options is bad business, and not the path for the Elektra Project. So no XML, no plugin architecture, no sophistication. Lets keep it simple and generic. A very straight forward text based file format was defined to store a single key value.
Key Files Format Inside Elektra key database, each key is a file, and every file is a key. So most of the key's metainformation are actually its file attributes, as you can see in a regular ls1 command output. So what needs to be stored inside the key file is the data type (binary or text), key comment and the actual data. The format of each key file is: File Format Version Data Type As many lines of comments as we want (UTF-8 encoded) <DATA> The data encoded as text So if we set the key system/hw/eth0/driver as type String and value "3com", and comment "The driver for my network interface", we'll find the file /etc/kdb/system/hw/eth0/driver containing: RG002 40 The driver for my network interface <DATA> 3com Other example: setting user/tmp/proprietary as Binary, and value "A groovy data I want to hide", and comment "Stay away from here", you'll get in ~$USER/.kdb/user/tmp/proprietary the following: RG002 20 Stay away from here <DATA> 41206772 6f6f7679 20646174 61204920 77616e74 20746f20 68696465 The current data types are: Between 20 and 39 Binary value. The data will be encoded into a text format. Today only type 20 is used, and means a raw stream of bytes with no special semantics to Elektra. The other values are reserved for future use; being treated still as binary values but possibly with some semantics to Elektra or a higher level application. 40 up to 254 Text, UTF-8 encoded. Values higher then 40 are reserved for future or application specific implementations of more abstract data types, like time/date, color, font, etc. But always represented as pure text that can be edited in any text editor like vi1. Types between 0 and 19 are used only internaly in the API, and will never appear into a key file. They are used to define meta keys as directory, link, etc.
elektra-0.7.1/elektra.mandriva.spec0000644000076400001440000001302011361542115014165 00000000000000%define name elektra %define version 0.6.3 %define release %mkrel 1 Name: %{name} Version: %{version} Release: %{release} Source: http://aleron.dl.sourceforge.net/sourceforge/elektra/%{name}-%{version}.tar.bz2 Group: System Environment/Libraries License: BSD URL: http://elektra.sourceforge.net BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot BuildRequires: doxygen docbook-style-xsl db4-devel libGConf1-devel libxml2-devel libtool libxslt-proc Summary: A key/value pair database to store software configurations %define DTDVERSION 0.1.1 %description The Elektra Project provides a framework to store generic configuration data in an hierarchical key-value pair database, instead of a human-readable only text file. This way any software can read/save his configuration using a consistent API. Also, applications can be aware of other applications configurations, leveraging easy application integration. %package devel Summary: Include files and API documentation for Elektra Project Group: Development/System Requires: elektra = %{version}-%{release} %description devel The Elektra Project provides a framework to store generic configuration data in an hierarchical key-value pair database, instead of a human-readable only text file. This way any software can read/save his configuration using a consistent API. Also, applications can be aware of other applications configurations, leveraging easy application integration. This package contains the include files and API manual pages to use the Elektra API in C. It also provides the framework to create storage backends to libelektra.so %package backend-gconf Summary: A GConf backend for Elektra Group: System Environment/Libraries Requires: elektra %description backend-gconf The Elektra Project provides a framework to store generic configuration data in an hierarchical key-value pair database, instead of a human-readable only text file. This way any software can read/save his configuration using a consistent API. Also, applications can be aware of other applications configurations, leveraging easy application integration. This package contains a GConf backend for Elektra, to let Elektra use a GConf daemon to store its keys. %package backend-berkeleydb Summary: Include files and API documentation for Elektra Project Group: System Environment/Libraries Requires: elektra %description backend-berkeleydb The Elektra Project provides a framework to store generic configuration data in an hierarchical key-value pair database, instead of a human-readable only text file. This way any software can read/save his configuration using a consistent API. Also, applications can be aware of other applications configurations, leveraging easy application integration. This package contains a Berkeley DB backend for Elektra, to let Elektra use Berkeley DB databases to store its keys. %debug_package %prep %setup %build %configure \ --bindir=/bin \ --sbindir=/sbin \ --libdir=/%{_lib} \ --with-docdir=%{_defaultdocdir}/elektra-%{version} \ --with-develdocdir=%{_defaultdocdir}/elektra-devel-%{version} \ --disable-xmltest \ --with-docbook=%{_datadir}/sgml/docbook/xsl-stylesheets %make %install rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install # Move .a files to -devel package mv $RPM_BUILD_ROOT/%{_lib}/libelektra.a $RPM_BUILD_ROOT/%{_libdir} # Prepare devel files rm $RPM_BUILD_ROOT/%{_lib}/libelektra.so ln -sf ../../%{_lib}/libelektra.so.2 $RPM_BUILD_ROOT/%{_libdir}/libelektra.so # Remove old .la files #rm $RPM_BUILD_ROOT/usr/lib/libelektra-*.a rm $RPM_BUILD_ROOT/%{_lib}/*.la rm $RPM_BUILD_ROOT/%{_lib}/elektra/*.la rm $RPM_BUILD_ROOT/%{_libdir}/*.la # Remove a file that conflicts with other packages rm $RPM_BUILD_ROOT/%{_mandir}/man3/key.3* # Remove documentation from 'make install', to let RPM package it allone rm -rf $RPM_BUILD_ROOT/%{_defaultdocdir} rm -rf scripts/Makefile* rm -rf examples/Makefile* rm -rf examples/.deps rm -rf doc/standards/Makefile* mv doc/elektra-api/html doc/elektra-api/api-html %clean rm -rf $RPM_BUILD_ROOT %post /sbin/ldconfig # Backwards compatibility, from the Linux Registry days # if [ -d /etc/registry -a ! -d /etc/kdb ]; then # mv /etc/registry /etc/kdb # ln -s kdb /etc/registry # fi # Create basic key structure for apps kdb set -t dir system/sw kdb set system/sw/kdb/current/schemapath "%{_datadir}/sgml/elektra-0.1.1/elektra.xsd" %postun -p /sbin/ldconfig %files %defattr(-,root,root,-) /bin/* /sbin/* /%{_lib}/*elektra.so* %dir /%{_lib}/elektra /%{_lib}/elektra/*elektra-daemon.so* /%{_lib}/elektra/*elektra-filesys.so* /%{_lib}/elektra/*elektra-default.so* /%{_lib}/elektra/*elektra-ddefault.so* /%{_lib}/elektra/*elektra-fstab.so* #/%{_lib}/elektra/*elektra-ini.so* %{_libdir}/*elektratools.so.* %{_libdir}/elektra/*elektratools.so %{_sysconfdir}/profile.d/* %doc AUTHORS COPYING ChangeLog README INSTALL %doc scripts doc/standards %{_mandir}/man1/* %{_mandir}/man7/* %{_mandir}/man5/* %{_datadir}/sgml/* %files devel %defattr(-,root,root,-) %{_includedir}/* %{_libdir}/*.a %{_libdir}/libelektra.so %{_libdir}/libelektratools.so %{_libdir}/pkgconfig/* %doc examples doc/elektra-api/api-html %{_mandir}/man3/* # %files backend-gconf # %defattr(-,root,root,0755) # %{_prefix}/%{_libdir}/*gconf.so* %files backend-berkeleydb %defattr(-,root,root,0755) /%{_lib}/elektra/*berkeleydb.so* %changelog * Sat Aug 6 2006 Yannick Lecaillez 0.6.3 - Adapted to Mandriva from the spec for Fedora made by Avi Alkalay elektra-0.7.1/elektra.pc0000644000076400001440000000045011365511465012050 00000000000000prefix=/usr/local exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${prefix}/include Name: elektra Description: A key/value pair database to store software configurations Version: 0.7.1 Libs: -L${exec_prefix}/lib -lelektra Libs.private: -lelektra -lxml2 Cflags: -I${prefix}/include elektra-0.7.1/elektra.pc.in0000644000076400001440000000044211365506635012461 00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ Name: @PACKAGE@ Description: A key/value pair database to store software configurations Version: @VERSION@ Libs: -L@libdir@ -lelektra @LIBICONV@ Libs.private: -lelektra @privatelibs@ Cflags: -I@includedir@ elektra-0.7.1/elektra.spec0000644000076400001440000001501111365511463012375 00000000000000%define tempdocdir %{_prefix}/elektra Name: elektra Version: 0.7.1 Release: 9 Source: http://prdownloads.sourceforge.net/elektra/%{name}-%{version}.tar.gz Group: System Environment/Libraries License: BSD URL: http://www.libelektra.org # Requires: libxml2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: doxygen db4-devel libxml2-devel docbook-style-xsl libxslt # Requires section: # libxml2: used only by libkdbtools, to import keys from XML # # BuildRequires section: # doxygen: to build the API documentation # libxslt, docbook-style-xsl: to build man pages from docbook with xsltproc program # db4-devel: for the Berkeley DB backend # libxml2-devel: for the kdbtools library build # gettext-devel: for the autoconf ICONV macro only # automake, autoconf: for the build system # libtool: not sure # GConf2-devel: for the testing GConf2 backend for Elektra Summary: A key/value pair database to store software configurations %description Elektra provides a universal and secure framework to store configuration parameters in a hierarchical key-value pair mechanism, instead of each program using its own text configuration files. This allows any program to read and save its configuration with a consistent API, and allows them to be aware of other applications' configurations, permitting easy application integration. While architecturally similar to other OS registries, Elektra does not have most of the problems found in those implementations. %package devel Summary: Include files and API documentation to build elektrified programs Group: Development/System Requires: pkgconfig elektra = %{version}-%{release} %description devel Elektra provides a universal and secure framework to store configuration parameters in a hierarchical key-value pair tree. This package contains development specific things as include files and static libraries to create elektrified programs. #%package backend-gconf #Summary: A GConf backend for Elektra #Group: System Environment/Libraries #Requires: elektra #add this in the main RPM description: BuildRequires: GConf2-devel #%description backend-gconf #Elektra provides a universal and secure framework to store configuration #parameters in a hierarchical key-value pair mechanism, instead of each #program using its own text configuration files. This allows any program #to read and save its configuration with a consistent API, and allows #them to be aware of other applications' configurations, permitting #easy application integration. While architecturally similar to other OS #registries, Elektra does not have most of the problems found in those #implementations. #This package contains a GConf backend for Elektra, to let Elektra use a GConf #daemon to store its keys. %package backend-berkeleydb Summary: Elektra backend that stores key/value pairs in berkeley DB databases Group: System Environment/Libraries Requires: elektra %description backend-berkeleydb Elektra provides a universal and secure framework to store configuration parameters in a hierarchical key-value pair tree. This package contains a Berkeley DB backend for Elektra, to let Elektra use Berkeley DB databases to store its keys. # Uncomment and join the '%' char to 'debug_package' if you want to build debug RPMs # % debug_package %prep %setup -q %build #CFLAGS="-g -O0" \ %configure \ --bindir=/bin \ --sbindir=/sbin \ --libdir=/%{_lib} \ --with-docdir=%{tempdocdir}/elektra-%{version} \ --with-develdocdir=%{tempdocdir}/elektra-devel-%{version} \ --with-docbook=%{_datadir}/sgml/docbook/xsl-stylesheets # --prefix=%{_prefix} \ # --exec-prefix=/ \ # Add these options if using a plain ./configure instead of RPM's % configure macro # --sysconfdir=%{_sysconfdir} \ # --mandir=%{_mandir} make %{?_smp_mflags} all %install rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install # Remove statically linked kdb rm $RPM_BUILD_ROOT/bin/kdb_static # Move .a files to -devel package mv $RPM_BUILD_ROOT/%{_lib}/libelektra.a $RPM_BUILD_ROOT%{_libdir} # Prepare devel files #mv $RPM_BUILD_ROOT/%{_lib}/libelektra.so $RPM_BUILD_ROOT%{_libdir}/ rm $RPM_BUILD_ROOT/%{_lib}/libelektra.so ln -sf ../../%{_lib}/libelektra.so.2 $RPM_BUILD_ROOT%{_libdir}/libelektra.so #rm $RPM_BUILD_ROOT/%{_lib}/libelektra.so # Remove .la files #rm $RPM_BUILD_ROOT/usr/lib/libelektra-*.a rm $RPM_BUILD_ROOT/%{_lib}/*.la rm $RPM_BUILD_ROOT/%{_lib}/elektra/*.la rm $RPM_BUILD_ROOT%{_libdir}/*.la # Remove a file that conflicts with other packages rm $RPM_BUILD_ROOT%{_mandir}/man3/key.3* # Remove documentation from 'make install', to let RPM package it alone rm -rf $RPM_BUILD_ROOT%{tempdocdir} rm -rf scripts/Makefile* rm -rf examples/Makefile* rm -rf examples/.deps rm -rf doc/standards/Makefile* mv doc/elektra-api/html doc/elektra-api/api-html %clean rm -rf $RPM_BUILD_ROOT #rm -rf $RPM_BUILD_DIR/%{name} %post /sbin/ldconfig # Backwards compatibility, from the Linux Registry days #if [ -d /etc/registry -a ! -d /etc/kdb ]; then # $MOVE /etc/registry /etc/kdb # $LINK -s kdb /etc/registry #fi # Make the daemon startable # chkconfig --add kdbd # Create basic key structure for apps kdb set -t dir system/sw kdb set system/sw/kdb/schemapath "%{_datadir}/sgml/elektra-0.1.1/elektra.xsd" %preun # Remove the daemon from init tasks # chkconfig --del kdbd %postun -p /sbin/ldconfig %files %defattr(-,root,root,-) /bin/* #%attr(4755,root,root) /sbin/kdbd /sbin/kdbd /%{_lib}/*elektra.so* %dir /%{_lib}/elektra /%{_lib}/elektra/*elektra-daemon.so* /%{_lib}/elektra/*elektra-filesys.so* /%{_lib}/elektra/*elektra-default.so* /%{_lib}/elektra/*elektra-ddefault.so* /%{_lib}/elektra/*elektra-fstab.so* #/%{_lib}/elektra/*elektra-ini.so* %{_libdir}/*elektratools.so.* %{_libdir}/elektra/*elektratools.so %{_sysconfdir}/profile.d/* %{_sysconfdir}/init.d/* %doc AUTHORS COPYING ChangeLog README INSTALL %doc scripts doc/standards %{_mandir}/man1/* %{_mandir}/man7/* %{_mandir}/man5/* %{_datadir}/sgml/* %files devel %defattr(-,root,root,-) %{_includedir}/* %{_libdir}/*.a %{_libdir}/libelektra.so %{_libdir}/libelektratools.so %{_libdir}/pkgconfig/* %doc examples doc/elektra-api/api-html %{_mandir}/man3/* #%files backend-gconf #%defattr(-,root,root,-) #%{_libdir}/elektra/*gconf.so* %files backend-berkeleydb %defattr(-,root,root,-) /%{_lib}/elektra/*berkeleydb.so* %changelog * Thu Sep 07 2006 Avi Alkalay 0.6.4-1 - Version update * Thu Jun 02 2006 Avi Alkalay 0.6.2-1 - Initial packaging elektra-0.7.1/elektra.spec.in0000644000076400001440000001501511365506635013013 00000000000000%define tempdocdir %{_prefix}/elektra Name: elektra Version: @VERSION@ Release: 9 Source: http://prdownloads.sourceforge.net/elektra/%{name}-%{version}.tar.gz Group: System Environment/Libraries License: BSD URL: http://www.libelektra.org # Requires: libxml2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: doxygen db4-devel libxml2-devel docbook-style-xsl libxslt # Requires section: # libxml2: used only by libkdbtools, to import keys from XML # # BuildRequires section: # doxygen: to build the API documentation # libxslt, docbook-style-xsl: to build man pages from docbook with xsltproc program # db4-devel: for the Berkeley DB backend # libxml2-devel: for the kdbtools library build # gettext-devel: for the autoconf ICONV macro only # automake, autoconf: for the build system # libtool: not sure # GConf2-devel: for the testing GConf2 backend for Elektra Summary: A key/value pair database to store software configurations %description Elektra provides a universal and secure framework to store configuration parameters in a hierarchical key-value pair mechanism, instead of each program using its own text configuration files. This allows any program to read and save its configuration with a consistent API, and allows them to be aware of other applications' configurations, permitting easy application integration. While architecturally similar to other OS registries, Elektra does not have most of the problems found in those implementations. %package devel Summary: Include files and API documentation to build elektrified programs Group: Development/System Requires: pkgconfig elektra = %{version}-%{release} %description devel Elektra provides a universal and secure framework to store configuration parameters in a hierarchical key-value pair tree. This package contains development specific things as include files and static libraries to create elektrified programs. #%package backend-gconf #Summary: A GConf backend for Elektra #Group: System Environment/Libraries #Requires: elektra #add this in the main RPM description: BuildRequires: GConf2-devel #%description backend-gconf #Elektra provides a universal and secure framework to store configuration #parameters in a hierarchical key-value pair mechanism, instead of each #program using its own text configuration files. This allows any program #to read and save its configuration with a consistent API, and allows #them to be aware of other applications' configurations, permitting #easy application integration. While architecturally similar to other OS #registries, Elektra does not have most of the problems found in those #implementations. #This package contains a GConf backend for Elektra, to let Elektra use a GConf #daemon to store its keys. %package backend-berkeleydb Summary: Elektra backend that stores key/value pairs in berkeley DB databases Group: System Environment/Libraries Requires: elektra %description backend-berkeleydb Elektra provides a universal and secure framework to store configuration parameters in a hierarchical key-value pair tree. This package contains a Berkeley DB backend for Elektra, to let Elektra use Berkeley DB databases to store its keys. # Uncomment and join the '%' char to 'debug_package' if you want to build debug RPMs # % debug_package %prep %setup -q %build #CFLAGS="-g -O0" \ %configure \ --bindir=/bin \ --sbindir=/sbin \ --libdir=/%{_lib} \ --with-docdir=%{tempdocdir}/elektra-%{version} \ --with-develdocdir=%{tempdocdir}/elektra-devel-%{version} \ --with-docbook=%{_datadir}/sgml/docbook/xsl-stylesheets # --prefix=%{_prefix} \ # --exec-prefix=/ \ # Add these options if using a plain ./configure instead of RPM's % configure macro # --sysconfdir=%{_sysconfdir} \ # --mandir=%{_mandir} make %{?_smp_mflags} all %install rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install # Remove statically linked kdb rm $RPM_BUILD_ROOT/bin/kdb_static # Move .a files to -devel package mv $RPM_BUILD_ROOT/%{_lib}/libelektra.a $RPM_BUILD_ROOT%{_libdir} # Prepare devel files #mv $RPM_BUILD_ROOT/%{_lib}/libelektra.so $RPM_BUILD_ROOT%{_libdir}/ rm $RPM_BUILD_ROOT/%{_lib}/libelektra.so ln -sf ../../%{_lib}/libelektra.so.2 $RPM_BUILD_ROOT%{_libdir}/libelektra.so #rm $RPM_BUILD_ROOT/%{_lib}/libelektra.so # Remove .la files #rm $RPM_BUILD_ROOT/usr/lib/libelektra-*.a rm $RPM_BUILD_ROOT/%{_lib}/*.la rm $RPM_BUILD_ROOT/%{_lib}/elektra/*.la rm $RPM_BUILD_ROOT%{_libdir}/*.la # Remove a file that conflicts with other packages rm $RPM_BUILD_ROOT%{_mandir}/man3/key.3* # Remove documentation from 'make install', to let RPM package it alone rm -rf $RPM_BUILD_ROOT%{tempdocdir} rm -rf scripts/Makefile* rm -rf examples/Makefile* rm -rf examples/.deps rm -rf doc/standards/Makefile* mv doc/elektra-api/html doc/elektra-api/api-html %clean rm -rf $RPM_BUILD_ROOT #rm -rf $RPM_BUILD_DIR/%{name} %post /sbin/ldconfig # Backwards compatibility, from the Linux Registry days #if [ -d /etc/registry -a ! -d /etc/kdb ]; then # $MOVE /etc/registry /etc/kdb # $LINK -s kdb /etc/registry #fi # Make the daemon startable # chkconfig --add kdbd # Create basic key structure for apps kdb set -t dir system/sw kdb set system/sw/kdb/schemapath "%{_datadir}/sgml/elektra-0.1.1/elektra.xsd" %preun # Remove the daemon from init tasks # chkconfig --del kdbd %postun -p /sbin/ldconfig %files %defattr(-,root,root,-) /bin/* #%attr(4755,root,root) /sbin/kdbd /sbin/kdbd /%{_lib}/*elektra.so* %dir /%{_lib}/elektra /%{_lib}/elektra/*elektra-daemon.so* /%{_lib}/elektra/*elektra-filesys.so* /%{_lib}/elektra/*elektra-default.so* /%{_lib}/elektra/*elektra-ddefault.so* /%{_lib}/elektra/*elektra-fstab.so* #/%{_lib}/elektra/*elektra-ini.so* %{_libdir}/*elektratools.so.* %{_libdir}/elektra/*elektratools.so %{_sysconfdir}/profile.d/* %{_sysconfdir}/init.d/* %doc AUTHORS COPYING ChangeLog README INSTALL %doc scripts doc/standards %{_mandir}/man1/* %{_mandir}/man7/* %{_mandir}/man5/* %{_datadir}/sgml/* %files devel %defattr(-,root,root,-) %{_includedir}/* %{_libdir}/*.a %{_libdir}/libelektra.so %{_libdir}/libelektratools.so %{_libdir}/pkgconfig/* %doc examples doc/elektra-api/api-html %{_mandir}/man3/* #%files backend-gconf #%defattr(-,root,root,-) #%{_libdir}/elektra/*gconf.so* %files backend-berkeleydb %defattr(-,root,root,-) /%{_lib}/elektra/*berkeleydb.so* %changelog * Thu Sep 07 2006 Avi Alkalay 0.6.4-1 - Version update * Thu Jun 02 2006 Avi Alkalay 0.6.2-1 - Initial packaging elektra-0.7.1/elektra.xml0000644000076400001440000000724611365506635012263 00000000000000 45092 2004-02-25 12:43:19 2005-10-19 04:42:14 elektra Elektra Project A key-value pair framework for storing configurations. Elektra provides a universal and secure framework to store configuration parameters in a hierarchical key-value pair mechanism, instead of each program using its own text configuration files. This allows any program to read and save its configuration with a consistent API, and allows them to be aware of other applications' configurations, permitting easy application integration. While architecturally similar to other OS registries, Elektra does not have most of the problems found in those implementations. 733.70 0.17 868 1782.95 3.23 1132 6.94 13 322 85 Default http://freshmeat.net/projects/elektra/ http://freshmeat.net/redir/elektra/48188/url_homepage/ http://freshmeat.net/redir/elektra/48188/url_tgz/ http://freshmeat.net/redir/elektra/48188/url_cvs/ http://freshmeat.net/redir/elektra/48188/url_bugtracker/ http://freshmeat.net/redir/elektra/48188/url_list/ BSD License (revised) 0.5.1 209675 2005-10-19 04:42:13 http://download.freshmeat.net/screenshots/45092_thumb.png Avi Alkalay http://freshmeat.net/~aviram/ Owner 15 45 810 147 253 4 233 3 200 201 164 1023 11 178 835 185 1089 165 912 955 809 136 188 elektra-0.7.1/elektracpp.pc0000644000076400001440000000036311365511465012556 00000000000000prefix=/usr/local exec_prefix=${prefix} libdir=${prefix}/lib includedir=${prefix}/include Name: elektra Description: A cpp binding for elektra. Version: 0.7.1 Requires: elektra Libs: -L${prefix}/lib -lelektra-cpp Cflags: -I${prefix}/include elektra-0.7.1/elektracpp.pc.in0000644000076400001440000000035111365506635013163 00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@ulibdir@ includedir=@includedir@ Name: @PACKAGE@ Description: A cpp binding for elektra. Version: @VERSION@ Requires: elektra Libs: -L@ulibdir@ -lelektra-cpp Cflags: -I@includedir@ elektra-0.7.1/elektratools.pc0000644000076400001440000000041211365511465013127 00000000000000prefix=/usr/local exec_prefix=${prefix} libdir=${prefix}/lib includedir=${prefix}/include Name: elektra Description: High level elektra functions (XML import/export) Version: 0.7.1 Requires: elektra Libs: -L${prefix}/lib -lelektratools Cflags: -I${prefix}/include elektra-0.7.1/elektratools.pc.in0000644000076400001440000000040011365506635013534 00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@ulibdir@ includedir=@includedir@ Name: @PACKAGE@ Description: High level elektra functions (XML import/export) Version: @VERSION@ Requires: elektra Libs: -L@ulibdir@ -lelektratools Cflags: -I@includedir@ elektra-0.7.1/examples/0000777000076400001440000000000011365513215011773 500000000000000elektra-0.7.1/examples/Makefile.am0000644000076400001440000000303711365507605013754 00000000000000# $Id$ AM_CFLAGS = $(CSTDFLAGS) $(COPTFLAGS) $(CDBGFLAGS) INCLUDES = -I$(top_srcdir)/src/include EXTRA_DIST = small.c application.c binary.c keyNewExample.c lookup.c hellokdb.c hierarchy.xml keyset.xml iterate.c reference.c sort.c getset.c # # Examples will only compile with make check check_PROGRAMS = small application binary keyNewExample lookup cascading keyset hello functional hellokdb iterate reference sort getset application_SOURCES = application.c application_LDADD = ../src/libelektra/libelektra.la binary_SOURCES = binary.c binary_LDADD = ../src/libelektra/libelektra.la keyNewExample_SOURCES = keyNewExample.c keyNewExample_LDADD = ../src/libelektra/libelektra.la lookup_SOURCES = lookup.c lookup_LDADD = ../src/libelektra/libelektra.la cascading_SOURCES = cascading.c cascading_LDADD = ../src/libelektra/libelektra.la keyset_SOURCES = keyset.c keyset_LDADD = ../src/libelektra/libelektra.la hello_SOURCES = hello.c hello_LDADD = ../src/libelektra/libelektra.la functional_SOURCES = functional.c functional_LDADD = ../src/libelektra/libelektra.la small_SOURCES = small.c small_LDADD = ../src/libelektra/libelektra.la hellokdb_SOURCES = hellokdb.c hellokdb_LDADD = ../src/libelektra/libelektra.la iterate_SOURCES = iterate.c iterate_LDADD = ../src/libelektra/libelektra.la reference_SOURCES = reference.c reference_LDADD = ../src/libelektra/libelektra.la sort_SOURCES = sort.c sort_LDADD = ../src/libelektra/libelektra.la getset_SOURCES = getset.c getset_LDADD = ../src/libelektra/libelektra.la clean-local: rm -f *.gcno *.gcda *.gcno elektra-0.7.1/examples/Makefile.in0000644000076400001440000005271411365511147013767 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ # $Id$ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ check_PROGRAMS = small$(EXEEXT) application$(EXEEXT) binary$(EXEEXT) \ keyNewExample$(EXEEXT) lookup$(EXEEXT) cascading$(EXEEXT) \ keyset$(EXEEXT) hello$(EXEEXT) functional$(EXEEXT) \ hellokdb$(EXEEXT) iterate$(EXEEXT) reference$(EXEEXT) \ sort$(EXEEXT) getset$(EXEEXT) subdir = examples DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/extensions.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/config.h CONFIG_CLEAN_FILES = am_application_OBJECTS = application.$(OBJEXT) application_OBJECTS = $(am_application_OBJECTS) application_DEPENDENCIES = ../src/libelektra/libelektra.la am_binary_OBJECTS = binary.$(OBJEXT) binary_OBJECTS = $(am_binary_OBJECTS) binary_DEPENDENCIES = ../src/libelektra/libelektra.la am_cascading_OBJECTS = cascading.$(OBJEXT) cascading_OBJECTS = $(am_cascading_OBJECTS) cascading_DEPENDENCIES = ../src/libelektra/libelektra.la am_functional_OBJECTS = functional.$(OBJEXT) functional_OBJECTS = $(am_functional_OBJECTS) functional_DEPENDENCIES = ../src/libelektra/libelektra.la am_getset_OBJECTS = getset.$(OBJEXT) getset_OBJECTS = $(am_getset_OBJECTS) getset_DEPENDENCIES = ../src/libelektra/libelektra.la am_hello_OBJECTS = hello.$(OBJEXT) hello_OBJECTS = $(am_hello_OBJECTS) hello_DEPENDENCIES = ../src/libelektra/libelektra.la am_hellokdb_OBJECTS = hellokdb.$(OBJEXT) hellokdb_OBJECTS = $(am_hellokdb_OBJECTS) hellokdb_DEPENDENCIES = ../src/libelektra/libelektra.la am_iterate_OBJECTS = iterate.$(OBJEXT) iterate_OBJECTS = $(am_iterate_OBJECTS) iterate_DEPENDENCIES = ../src/libelektra/libelektra.la am_keyNewExample_OBJECTS = keyNewExample.$(OBJEXT) keyNewExample_OBJECTS = $(am_keyNewExample_OBJECTS) keyNewExample_DEPENDENCIES = ../src/libelektra/libelektra.la am_keyset_OBJECTS = keyset.$(OBJEXT) keyset_OBJECTS = $(am_keyset_OBJECTS) keyset_DEPENDENCIES = ../src/libelektra/libelektra.la am_lookup_OBJECTS = lookup.$(OBJEXT) lookup_OBJECTS = $(am_lookup_OBJECTS) lookup_DEPENDENCIES = ../src/libelektra/libelektra.la am_reference_OBJECTS = reference.$(OBJEXT) reference_OBJECTS = $(am_reference_OBJECTS) reference_DEPENDENCIES = ../src/libelektra/libelektra.la am_small_OBJECTS = small.$(OBJEXT) small_OBJECTS = $(am_small_OBJECTS) small_DEPENDENCIES = ../src/libelektra/libelektra.la am_sort_OBJECTS = sort.$(OBJEXT) sort_OBJECTS = $(am_sort_OBJECTS) sort_DEPENDENCIES = ../src/libelektra/libelektra.la DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/src/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(application_SOURCES) $(binary_SOURCES) \ $(cascading_SOURCES) $(functional_SOURCES) $(getset_SOURCES) \ $(hello_SOURCES) $(hellokdb_SOURCES) $(iterate_SOURCES) \ $(keyNewExample_SOURCES) $(keyset_SOURCES) $(lookup_SOURCES) \ $(reference_SOURCES) $(small_SOURCES) $(sort_SOURCES) DIST_SOURCES = $(application_SOURCES) $(binary_SOURCES) \ $(cascading_SOURCES) $(functional_SOURCES) $(getset_SOURCES) \ $(hello_SOURCES) $(hellokdb_SOURCES) $(iterate_SOURCES) \ $(keyNewExample_SOURCES) $(keyset_SOURCES) $(lookup_SOURCES) \ $(reference_SOURCES) $(small_SOURCES) $(sort_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) INSTALL = @INSTALL@ ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BACKENDS = @BACKENDS@ BACKEND_VERSION_API = @BACKEND_VERSION_API@ BINDINGS = @BINDINGS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CDBGFLAGS = @CDBGFLAGS@ CFLAGS = @CFLAGS@ COPTFLAGS = @COPTFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSTDFLAGS = @CSTDFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDBGFLAGS = @CXXDBGFLAGS@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXOPTFLAGS = @CXXOPTFLAGS@ CXXSTDFLAGS = @CXXSTDFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_FALSE = @DEBUG_FALSE@ DEBUG_TRUE = @DEBUG_TRUE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ELEKTRATOOLS_VERSION_API = @ELEKTRATOOLS_VERSION_API@ ELEKTRA_VERSION_API = @ELEKTRA_VERSION_API@ EXEEXT = @EXEEXT@ EXPERIMENTAL_FALSE = @EXPERIMENTAL_FALSE@ EXPERIMENTAL_TRUE = @EXPERIMENTAL_TRUE@ F77 = @F77@ FFLAGS = @FFLAGS@ GENHTML = @GENHTML@ GREP = @GREP@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ HAVE_LIBLTDL_FALSE = @HAVE_LIBLTDL_FALSE@ HAVE_LIBLTDL_TRUE = @HAVE_LIBLTDL_TRUE@ HAVE_MAN2HTML_FALSE = @HAVE_MAN2HTML_FALSE@ HAVE_MAN2HTML_TRUE = @HAVE_MAN2HTML_TRUE@ HAVE_XML_FALSE = @HAVE_XML_FALSE@ HAVE_XML_TRUE = @HAVE_XML_TRUE@ HAVE_XSL_FALSE = @HAVE_XSL_FALSE@ HAVE_XSL_TRUE = @HAVE_XSL_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDB_VERSION = @KDB_VERSION@ KDB_VERSION_MAJOR = @KDB_VERSION_MAJOR@ KDB_VERSION_MAJORMINOR = @KDB_VERSION_MAJORMINOR@ KDB_VERSION_MICRO = @KDB_VERSION_MICRO@ KDB_VERSION_MINOR = @KDB_VERSION_MINOR@ LCOV = @LCOV@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VALGRIND = @VALGRIND@ VALGRINDTESTS_FALSE = @VALGRINDTESTS_FALSE@ VALGRINDTESTS_TRUE = @VALGRINDTESTS_TRUE@ VERSION = @VERSION@ XML2_CONFIG = @XML2_CONFIG@ XML_CPPFLAGS = @XML_CPPFLAGS@ XML_LIBS = @XML_LIBS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ backend_static_libs = @backend_static_libs@ backenddir = @backenddir@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ datarootdir = @datarootdir@ dbroot = @dbroot@ default_backend = @default_backend@ default_dbackend = @default_dbackend@ default_docbook = @default_docbook@ develdocdir = @develdocdir@ docdir = @docdir@ doxygen = @doxygen@ dvidir = @dvidir@ elektratools = @elektratools@ exec_prefix = @exec_prefix@ gconf_CFLAGS = @gconf_CFLAGS@ gconf_LIBS = @gconf_LIBS@ hlvlbackenddir = @hlvlbackenddir@ 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@ man2html = @man2html@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ privatelibs = @privatelibs@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ ulibdir = @ulibdir@ xsltproc = @xsltproc@ AM_CFLAGS = $(CSTDFLAGS) $(COPTFLAGS) $(CDBGFLAGS) INCLUDES = -I$(top_srcdir)/src/include EXTRA_DIST = small.c application.c binary.c keyNewExample.c lookup.c hellokdb.c hierarchy.xml keyset.xml iterate.c reference.c sort.c getset.c application_SOURCES = application.c application_LDADD = ../src/libelektra/libelektra.la binary_SOURCES = binary.c binary_LDADD = ../src/libelektra/libelektra.la keyNewExample_SOURCES = keyNewExample.c keyNewExample_LDADD = ../src/libelektra/libelektra.la lookup_SOURCES = lookup.c lookup_LDADD = ../src/libelektra/libelektra.la cascading_SOURCES = cascading.c cascading_LDADD = ../src/libelektra/libelektra.la keyset_SOURCES = keyset.c keyset_LDADD = ../src/libelektra/libelektra.la hello_SOURCES = hello.c hello_LDADD = ../src/libelektra/libelektra.la functional_SOURCES = functional.c functional_LDADD = ../src/libelektra/libelektra.la small_SOURCES = small.c small_LDADD = ../src/libelektra/libelektra.la hellokdb_SOURCES = hellokdb.c hellokdb_LDADD = ../src/libelektra/libelektra.la iterate_SOURCES = iterate.c iterate_LDADD = ../src/libelektra/libelektra.la reference_SOURCES = reference.c reference_LDADD = ../src/libelektra/libelektra.la sort_SOURCES = sort.c sort_LDADD = ../src/libelektra/libelektra.la getset_SOURCES = getset.c getset_LDADD = ../src/libelektra/libelektra.la all: all-am .SUFFIXES: .SUFFIXES: .c .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 \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu examples/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; for p in $$list; do \ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done application$(EXEEXT): $(application_OBJECTS) $(application_DEPENDENCIES) @rm -f application$(EXEEXT) $(LINK) $(application_LDFLAGS) $(application_OBJECTS) $(application_LDADD) $(LIBS) binary$(EXEEXT): $(binary_OBJECTS) $(binary_DEPENDENCIES) @rm -f binary$(EXEEXT) $(LINK) $(binary_LDFLAGS) $(binary_OBJECTS) $(binary_LDADD) $(LIBS) cascading$(EXEEXT): $(cascading_OBJECTS) $(cascading_DEPENDENCIES) @rm -f cascading$(EXEEXT) $(LINK) $(cascading_LDFLAGS) $(cascading_OBJECTS) $(cascading_LDADD) $(LIBS) functional$(EXEEXT): $(functional_OBJECTS) $(functional_DEPENDENCIES) @rm -f functional$(EXEEXT) $(LINK) $(functional_LDFLAGS) $(functional_OBJECTS) $(functional_LDADD) $(LIBS) getset$(EXEEXT): $(getset_OBJECTS) $(getset_DEPENDENCIES) @rm -f getset$(EXEEXT) $(LINK) $(getset_LDFLAGS) $(getset_OBJECTS) $(getset_LDADD) $(LIBS) hello$(EXEEXT): $(hello_OBJECTS) $(hello_DEPENDENCIES) @rm -f hello$(EXEEXT) $(LINK) $(hello_LDFLAGS) $(hello_OBJECTS) $(hello_LDADD) $(LIBS) hellokdb$(EXEEXT): $(hellokdb_OBJECTS) $(hellokdb_DEPENDENCIES) @rm -f hellokdb$(EXEEXT) $(LINK) $(hellokdb_LDFLAGS) $(hellokdb_OBJECTS) $(hellokdb_LDADD) $(LIBS) iterate$(EXEEXT): $(iterate_OBJECTS) $(iterate_DEPENDENCIES) @rm -f iterate$(EXEEXT) $(LINK) $(iterate_LDFLAGS) $(iterate_OBJECTS) $(iterate_LDADD) $(LIBS) keyNewExample$(EXEEXT): $(keyNewExample_OBJECTS) $(keyNewExample_DEPENDENCIES) @rm -f keyNewExample$(EXEEXT) $(LINK) $(keyNewExample_LDFLAGS) $(keyNewExample_OBJECTS) $(keyNewExample_LDADD) $(LIBS) keyset$(EXEEXT): $(keyset_OBJECTS) $(keyset_DEPENDENCIES) @rm -f keyset$(EXEEXT) $(LINK) $(keyset_LDFLAGS) $(keyset_OBJECTS) $(keyset_LDADD) $(LIBS) lookup$(EXEEXT): $(lookup_OBJECTS) $(lookup_DEPENDENCIES) @rm -f lookup$(EXEEXT) $(LINK) $(lookup_LDFLAGS) $(lookup_OBJECTS) $(lookup_LDADD) $(LIBS) reference$(EXEEXT): $(reference_OBJECTS) $(reference_DEPENDENCIES) @rm -f reference$(EXEEXT) $(LINK) $(reference_LDFLAGS) $(reference_OBJECTS) $(reference_LDADD) $(LIBS) small$(EXEEXT): $(small_OBJECTS) $(small_DEPENDENCIES) @rm -f small$(EXEEXT) $(LINK) $(small_LDFLAGS) $(small_OBJECTS) $(small_LDADD) $(LIBS) sort$(EXEEXT): $(sort_OBJECTS) $(sort_DEPENDENCIES) @rm -f sort$(EXEEXT) $(LINK) $(sort_LDFLAGS) $(sort_OBJECTS) $(sort_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/application.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/binary.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cascading.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/functional.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getset.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hello.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hellokdb.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iterate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/keyNewExample.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/keyset.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lookup.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/reference.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/small.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sort.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_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-checkPROGRAMS clean-generic clean-libtool clean-local \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: 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-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean \ clean-checkPROGRAMS clean-generic clean-libtool clean-local \ ctags distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-info-am clean-local: rm -f *.gcno *.gcda *.gcno # 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: elektra-0.7.1/examples/application.c0000644000076400001440000001103711361542115014355 00000000000000/********************************************************* To compile this example: $ cc `pkg-config --libs elektra` `pkg-config --cflags elektra` -o application application.c or static $ cc -c `pkg-config --cflags elektra` application.c This application shows how to read (resp. update) and save configuration using elektra. **********************************************************/ #include #include #include #include #include #define MY_APP_ROOT "/sw/MyApp/current" int generateConfig(KeySet *myConfig) { ksAppendKey(myConfig, keyNew("user/sw/MyApp/current/dir1", KEY_VALUE, "directory value", KEY_COMMENT, "this is the first directory", KEY_DIR, KEY_END)); ksAppendKey(myConfig, keyNew("user/sw/MyApp/current/dir1/key1", KEY_VALUE, "the first application key", KEY_COMMENT, "some useful comment", KEY_DIR, KEY_END)); ksAppendKey(myConfig, keyNew("user/sw/MyApp/current/dir1/key2", KEY_VALUE, "the second application key", KEY_COMMENT, "some useful comment", KEY_DIR, KEY_END)); ksAppendKey(myConfig, keyNew("user/sw/MyApp/current/dir1/key3", KEY_VALUE, "the third application key", KEY_COMMENT, "some useful comment", KEY_DIR, KEY_END)); ksAppendKey(myConfig, keyNew("user/sw/MyApp/current/dir2", KEY_VALUE, "directory value", KEY_DIR, KEY_END)); ksAppendKey(myConfig, keyNew("user/sw/MyApp/current/dir3", KEY_VALUE, "directory value", KEY_DIR, KEY_END)); ksAppendKey(myConfig, keyNew("user/sw/MyApp/current/dir4", KEY_VALUE, "directory value", KEY_DIR, KEY_END)); } /* Read config keys for this application */ int readConfig(KDB * handle, KeySet *myConfig) { int rc = 0; int size = 0; /* Get all value keys for this application */ if (kdbGetByName(handle, myConfig, "system" MY_APP_ROOT, 0) == -1) { rc = -1; perror("Couldn't get system configuration. Reason"); } else { size = (int)ksGetSize(myConfig); printf("Retrieved %d keys\n", size); } if (kdbGetByName(handle, myConfig,"user" MY_APP_ROOT, 0) == -1) { rc = -1; perror("Couldn't get user configuration. Reason"); } else { size = (int)ksGetSize(myConfig); printf("Retrieved %d keys\n", size); } if (rc == -1) return -1; return size; } /* Change some keys */ void changeConfig(KeySet *myConfig) { Key *current; ksRewind(myConfig); while ((current=ksNext(myConfig))) { char keyName[MAX_KEY_LENGTH]; char value[MAX_KEY_LENGTH]; keyGetFullName(current,keyName,sizeof(keyName)); keyGetString(current,value,sizeof(value)); printf("Key %s was %s. ", keyName, value); /* Add "- modified" to the end of the string */ strcat(value,"- modified"); /* change the key value */ keySetString(current,value); /* reget it, just as an example */ keyGetString(current,value,sizeof(value)); printf("Now is %s\n", value); } } /* Make keys empty */ void emptyConfig(KeySet *myConfig) { ksRewind(myConfig); while (ksNext(myConfig)) { keySetString(ksCurrent(myConfig), ""); } } /* Make keys empty */ void printConfig(KeySet *myConfig) { ksRewind(myConfig); while (ksNext(myConfig)) { printf ("Key %s, Value %s, Comment %s\n", (char*)keyName(ksCurrent(myConfig)), (char*)keyValue(ksCurrent(myConfig)), (char*)keyComment(ksCurrent(myConfig))); } } /* Save the modified keys */ int saveConfig(KDB * handle, KeySet *myConfig) { return kdbSet(handle,myConfig,0,0); } int main(int argc, char **argv) { int command; KeySet *myConfig=ksNew(0); KDB * handle=kdbOpen(); printf ("Following commands are available:\n\n"); printf ("g ... generate new Configuration\n"); printf ("c ... change Configuration\n"); printf ("r ... read Configuration\n"); printf ("s ... save Configuration\n"); printf ("p ... print Configuration\n"); printf ("e ... empty Configuration\n"); printf ("d ... clear Configuration\n"); while (1) { /* Get configuration values, and just continue if there is no error */ command = fgetc (stdin); if (command == 'q') break; switch (command) { case 'g': generateConfig(myConfig); break; case 'c': changeConfig(myConfig); break; case 'r': readConfig(handle, myConfig); break; case 's': saveConfig(handle, myConfig); break; case 'p': printConfig(myConfig); break; case 'e': emptyConfig(myConfig); break; case 'd': ksClear(myConfig); break; case '\n': case '\r': case '\f': break; default: printf ("unkown command\n"); break; } } kdbClose(handle); /* Free all keys and resources in the key set */ ksDel(myConfig); return 0; } elektra-0.7.1/examples/binary.c0000644000076400001440000000151411361542115013335 00000000000000#ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include /* * Save this program as binary.c * Compile and run it as bellow. * * Change the data type of 'i' from int to char, and to float, * and to double, and recompile it. * * You should not use binary types. * Consider a text representation of * your types and write them as string. * * cc -L/lib -lkdb binary.c -o binary; ./binary; cat user/tmp/bin * */ int main(void) { int i=25; Key *key=keyNew("user/examples/bin",KEY_END); Key *back; KDB * handle= kdbOpen(); keySetBinary(key,&i,sizeof(i)); kdbSetKey(handle,key); keyDel(key); back=keyNew("user/examples/bin", KEY_END); kdbGetKey(handle,back); printf("Got back: %d\n",*(int*)keyValue(back)); keyRemove(back); kdbSetKey(handle,key); keyDel(back); kdbClose(handle); return 0; } elektra-0.7.1/examples/cascading.c0000644000076400001440000000145011361542115013764 00000000000000#include #include #include void BailOut (char * msg) { perror (msg); } int main() { KDB * h; KeySet * myConfig = ksNew(0); Key * myKey; char * myValue; /* Open the Key Database */ if ((h = kdbOpen()) != 0) BailOut ("Could not open Key Database"); /* Get myapps keyset */ if (kdbGetByName(h, myConfig, "/examples", 0 ) == -1) BailOut ("Could not get Keys"); /* Find the key in the keyset */ if ((myKey = ksLookupByName (myConfig, "/examples/key", 0)) == NULL) BailOut ("Could not Lookup Key"); /* Get the value of the key */ if ((myValue = (char*) keyValue (myKey)) == NULL) BailOut ("Could not get Keyvalue"); /* Actually print the key */ printf ("%s\n", myValue); /* Close the Key database */ kdbClose(h); ksDel(myConfig); return 0; } elektra-0.7.1/examples/functional.c0000644000076400001440000001007711361542115014217 00000000000000#include #include /**A functional access to keys. * * Instead of writing your own loop you can write * a function working with a key and pass it to * this method. * * The function will be executed for all keys in * the keyset. * * @param ks the keyset to work with * @param func the function to execute on every key of the keyset * @return the sum of all return values * @return -1 if any function returned -1, the execution will stop there, but * ksCurrent() will tell you where it stopped. * @see ksFilter() */ int ksForEach (KeySet *ks, int (*func) (Key *k)) { int rc = 0; int ret = 0; Key *current; cursor_t cursor = ksGetCursor (ks); ksRewind (ks); while ((current = ksNext (ks)) != 0) { rc = func (current); if (rc == -1) return -1; ret += rc; } ksSetCursor(ks, cursor); return ret; } /**Filter a keyset. * * filter is executed for every key in the keyset result. When it returns 0, * the key will be dropped, when it returns 1 it will be ksAppendKey()ed to result, * when it returns -1 the processing will be stopped. You can use ksCurrent() * on input to see where the problem was. Because of this input is not const, * apart from ksCurrent() the input will not be changed. The keys that have * been in result before will stay untouched. * * @param result is the keyset where keys are added. * @param input is the keyset the filter works on. * @param filter is the function to execute on every key of the keyset to decide if * it should be ksAppendKey()ed to the result. * @return the number of keys added on success * @return 0 when nothing was done * @return -1 when filter returned an error (-1), ksCurrent() of input will * be the problematic key. * @see ksForEach() **/ int ksFilter (KeySet *result, KeySet *input, int (*filter) (Key *k)) { int rc = 0; int ret = 0; Key *current; cursor_t cursor = ksGetCursor (input); ksRewind (input); while ((current = ksNext (input)) != 0) { rc = filter (current); if (rc == -1) return -1; else if (rc != 0) { ++ ret; ksAppendKey(result, keyDup (current)); } } ksSetCursor(input, cursor); return ret; } Key *global_a; int add_string (Key *check) { return keySetString (check, "string"); } int add_comment (Key *check) { return keySetComment (check, "comment"); } int has_a (Key *check) { return keyName(check)[5]=='a'; } int below_a (Key *check) { return keyIsBelow(global_a, check); } int direct_below_a (Key *check) { return keyIsDirectBelow(global_a, check); } int sum_helper (Key *check) { return atoi(keyValue(check)); } int below_30 (Key *check) { return atoi(keyValue(check))<30; } int find_80 (Key *check) { int n=atoi(keyValue(check)); return n>70?-1:1; } int main() { Key *found; KeySet *out; KeySet *ks = ksNew (64, keyNew ("user/a/1", KEY_END), keyNew ("user/a/2", KEY_END), keyNew ("user/a/b/1", KEY_END), keyNew ("user/a/b/2", KEY_END), keyNew ("user/ab/2", KEY_END), keyNew ("user/b/1", KEY_END), keyNew ("user/b/2", KEY_END), KS_END); KeySet *values = 0; KeySet *values_below_30 = 0; global_a = keyNew ("user/a", KEY_END); ksForEach (ks, add_string); ksForEach (ks, add_comment); out = ksNew (0); ksFilter (out, ks, has_a); ksDel (out); out = ksNew (0); ksFilter (out, ks, below_a); ksDel (out); out = ksNew (0); ksFilter (out, ks, direct_below_a); ksDel (out); ksDel (ks); keyDel (global_a); global_a = 0; values = ksNew (64, keyNew ("user/a", KEY_VALUE, "40", KEY_END), keyNew ("user/b", KEY_VALUE, "20", KEY_END), keyNew ("user/c", KEY_VALUE, "80", KEY_END), keyNew ("user/d", KEY_VALUE, "24", KEY_END), keyNew ("user/e", KEY_VALUE, "32", KEY_END), keyNew ("user/f", KEY_VALUE, "12", KEY_END), keyNew ("user/g", KEY_VALUE, "43", KEY_END), KS_END); /* add together */ ksForEach (values, sum_helper); values_below_30 = ksNew (0); ksFilter (values_below_30, values, below_30); ksForEach (values_below_30, sum_helper); ksForEach (values, find_80); found = ksCurrent (values); /* here is user/c */ found = ksLookupByName (values, "user/c", 0); /* should find the same */ ksDel (values); ksDel (values_below_30); } elektra-0.7.1/examples/getset.c0000644000076400001440000000061411361542115013344 00000000000000#include #include #define BUFFER_SIZE 4000 int main(void) { char buffer[BUFFER_SIZE+1]; KDB *h = kdbOpen(); kdbSetString(h, "user/example", ""); kdbSetString(h, "user/example/hello", "Hello World"); kdbGetString(h, "user/example/hello", buffer, BUFFER_SIZE); printf ("%s\n", buffer); kdbRemove(h, "user/example/hello"); kdbRemove(h, "user/example"); kdbClose (h); } elektra-0.7.1/examples/hello.c0000644000076400001440000000027311361542115013155 00000000000000#include #include int main(void) { Key *k = keyNew("user/hello", KEY_VALUE, "Hello World", KEY_END); printf ("%s\n", (char*)keyValue(k)); keyDel (k); return 0; } elektra-0.7.1/examples/hellokdb.c0000644000076400001440000000043011361542115013631 00000000000000#include #include int main(void) { Key *k = keyNew ("user/hello", KEY_END); KDB *handle = kdbOpen(); if (kdbGetKey (handle, k) == -1) printf ("could not get key\n"); else printf ("%s\n", (char*) keyValue(k)); kdbClose (handle); keyDel (k); return 0; } elektra-0.7.1/examples/hierarchy.xml0000644000076400001440000000234511361542115014410 00000000000000 abc comment1 xyz comment1 cecece tatata elektra-0.7.1/examples/iterate.c0000644000076400001440000000504411361542115013510 00000000000000/* iterate.c * * This program shows some possibilites how to iterate * over a KeySet in an elegant way. */ #include #include /* * This function demonstrates how easy it is to extend * elektra. We use ksNext() and keyIsBelow() to implement a function * which skips to the next directory. */ Key* ksNextDir(KeySet *ks) { Key *cur; Key *startKey = ksCurrent(ks); if (!startKey) return (ksNext(ks)); while ((cur = ksNext(ks)) != 0) { if(!keyIsBelow(startKey, cur)) return cur; } return 0; } int main(void) { Key *cur=0; Key *found=0; KeySet *ks = ksNew (30, keyNew ("user/dir1", KEY_DIR, KEY_END), keyNew ("user/dir1/key1", KEY_VALUE, "value1", KEY_END), keyNew ("user/dir1/key2", KEY_VALUE, "value2", KEY_END), keyNew ("user/dir1/key3", KEY_VALUE, "value3", KEY_END), keyNew ("user/dir1/key4", KEY_VALUE, "value4", KEY_END), keyNew ("user/dir1/.inactive1", KEY_COMMENT, "key is inactive", KEY_END), keyNew ("user/dir1/.inactive2", KEY_COMMENT, "additional information", KEY_END), keyNew ("user/dir2", KEY_DIR, KEY_END), keyNew ("user/dir2/key1", KEY_VALUE, "value1", KEY_END), keyNew ("user/dir2/key2", KEY_VALUE, "value2", KEY_END), keyNew ("user/dir2/key3", KEY_VALUE, "value3", KEY_END), keyNew ("user/dir2/key4", KEY_VALUE, "value4", KEY_END), keyNew ("user/dir3", KEY_DIR, KEY_END), keyNew ("user/dir3/key1", KEY_VALUE, "value1", KEY_END), keyNew ("user/dir3/.inactive1", KEY_COMMENT, "key is inactive", KEY_END), keyNew ("user/dir3/.inactive2", KEY_COMMENT, "a users comment", KEY_END), keyNew ("user/dir4", KEY_DIR, KEY_END), keyNew ("user/dir5", KEY_DIR, KEY_END), KS_END); printf ("Iterate over all keys:\n"); ksRewind(ks); while ((cur=ksNext(ks)) != 0) { /* Iterates over all keys and prints their name */ printf ("%s\n", keyName(cur)); } printf ("\nIterate over all directories:\n"); ksRewind(ks); while ((cur=ksNextDir(ks)) != 0) { /* Iterates over all keys and prints their name */ printf ("%s\n", keyName(cur)); } printf ("\nLookup and then iterate:\n"); found = ksLookupByName(ks, "user/dir2", 0); printf ("Found key %s\n", keyName(found)); while ((cur=ksNext(ks)) != 0) { /* Iterates over all keys direct below and prints their name */ if (keyIsDirectBelow(found, cur)==0) break; printf ("%s\n", keyName(cur)); } printf ("\nIterate over inactive keys:\n"); ksRewind(ks); while ((cur=ksNext(ks)) != 0) { /* Iterates over inactive keys and prints their name */ if (keyIsInactive(cur)==0) continue; printf ("%s %s\n", keyName(cur), keyComment(cur)); } return 0; } elektra-0.7.1/examples/keyNewExample.c0000644000076400001440000000420211361542115014624 00000000000000#include #include int main() { KeySet *ks=ksNew(0); Key *key=0; printf ("Generate some keys..."); ksAppendKey(ks,keyNew("user/sw",KEY_END)); /* a simple key */ ksAppendKey(ks,keyNew(0)); /* an empty key */ ksAppendKey(ks,keyNew("system/sw", KEY_END)); ksAppendKey(ks,keyNew("user/tmp/ex1", KEY_VALUE,"some data", /* with a simple value */ KEY_END)); /* end of args */ ksAppendKey(ks,keyNew("user/tmp/ex2", KEY_VALUE,"some data", /* with a simple value */ KEY_MODE,0777, /* permissions */ KEY_END)); /* end of args */ ksAppendKey(ks,keyNew("user/tmp/ex4", KEY_TYPE, KEY_TYPE_BINARY, /* type and value size */ KEY_COMMENT,"value is truncated", KEY_SIZE, 7, KEY_VALUE,"some data", /* value that will be truncated to 7 bytes */ KEY_UID,0, /* root uid */ KEY_END)); /* end of args */ ksAppendKey(ks,keyNew("user/tmp/ex5", KEY_VALUE,"some data", /* value */ KEY_OWNER,"root", /* owner (not uid) is root */ KEY_COMMENT,"some comment", /* a comment */ KEY_END)); /* end of args */ ksAppendKey(ks,keyNew("user/env/alias/ls", /* a key we know we have */ KEY_END)); /* do nothing more */ ksAppendKey(ks,keyNew("user/env/alias/ls", /* same key, to compare in output */ KEY_OWNER,"root", /* set new owner (not uid) as root */ KEY_COMMENT,"new comment", /* set new comment */ KEY_END)); /* end of args */ key=keyNew("user/test//", KEY_END); /* we are providing a lot of '/' to see it being removed */ keySetName(key,"system"); keySetName(key,"user"); keySetName(key,"user:aviram"); keySetName(key,"user///abc//////def///"); keySetName(key,"user:root///aaa//////bbb///"); keyAddBaseName(key,"tmp"); keyAddBaseName(key,"////ex6///exx7///"); keySetBaseName(key,"ex8"); keySetBaseName(key,"ex9"); keyAddBaseName(key,"///exxx9///ex10///ex\\/11///"); keySetBaseName(key,"ex12"); keySetBaseName(key,"ex13///"); ksAppendKey(ks,key); ksDel(ks); printf ("finished\n"); return 0; } elektra-0.7.1/examples/keyset.c0000644000076400001440000000217511361542115013361 00000000000000#include #include void f (const Key * source) { Key * dup = keyDup (source); printf ("\tin f\n"); keyDel (dup); } void g (const Key * source, KeySet * ks) { Key * dup = keyDup (source); printf ("\tin g\n"); ksAppendKey (ks, dup); } void h (Key *k) { Key * c = keyNew("user/from/h", KEY_END); printf ("\tin h\n"); keyCopy (k, c); keyDel (c); /* the caller will see the changed key k */ } int main() { Key * origKey; KeySet * ks = ksNew(0); Key * key = keyNew ("user/test/name", KEY_VALUE, "myvalue", KEY_END); printf ("Created key %s with value %s\n", keyName(key), keyValue(key)); f(key); printf ("Key is unchanged with value %s\n", keyValue(key)); g(key, ks); printf ("A duplication was appended in keyset with name %s\n", keyName(ksHead(ks))); h(key); printf ("Key has changed to name %s with value %s\n", keyName(key), keyValue(key)); /* key is yet independent */ keyDel (key); ksRewind (ks); origKey = ksNext (ks); key = keyDup (origKey); printf ("A duplication of the key %s with value %s\n", keyName(key), keyValue(key)); keyDel (key); ksDel (ks); return 0; } elektra-0.7.1/examples/keyset.xml0000644000076400001440000000513711361542115013740 00000000000000 62696e61 72792d73 656d616e 74696320 76616c75 65 =20) and KEY_TYPE_STRING (<40)]]> 7f454c46 01010100 00000000 00000000 02000300 01000000 809d0408 34000000 18480100 00000000 34002000 08002800 1f00 elektra-0.7.1/examples/lookup.c0000644000076400001440000000076311361542115013367 00000000000000#include #include int main(int argc,char **argv) { KeySet *ks; Key *key=0; KDB *handle = kdbOpen(); ks=ksNew(0); kdbGetByName(handle,ks,"system/sw/xorg",0); kdbClose(handle); ksRewind(ks); key=ksLookupByName(ks,"system/sw/xorg/current/screens/screen0/displays/00/depth", KDB_O_NOCASE); printf("*************** Name matching\n\n"); if (key) { /* keyToStream(key,stdout,0); */ key=ksCurrent(ks); /* keyToStream(key,stdout,0); should be the same */ } } elektra-0.7.1/examples/reference.c0000644000076400001440000000130611361542115014006 00000000000000#include #include void f(Key *k) { printf ("\tf called with %s\n", keyName(k)); keySetName (k, "user/delete"); keyDel (k); } void h(Key *k) { printf ("\th called with %s\n", keyName(k)); keyIncRef (k); f(k); keyDecRef (k); } int main(void) { Key *k = keyNew(0); printf ("key has ref %d\n", keyGetRef(k)); f(k); printf ("key is now deleted\n"); k = keyNew(0); keyIncRef (k); printf ("key has ref %d\n", keyGetRef(k)); f(k); printf ("key has now name %s\n", keyName(k)); f(k); keyDecRef (k); printf ("key has ref %d", keyGetRef(k)); keyDel (k); printf ("key is now deleted\n"); k = keyNew(0); h(k); keyDel (k); printf ("key is now deleted\n"); return 0; } elektra-0.7.1/examples/small.c0000644000076400001440000000153011361542115013157 00000000000000#include #include #include void BailOut (char * msg) { fprintf (stderr, "%s\n", msg); exit (1); } int main(void) { KDB * h; KeySet * myConfig = ksNew(0); Key * myKey; char * myValue; /* Open the Key Database */ if (!(h = kdbOpen())) BailOut ("Could not open Key Database"); /* Get the hello world keyset */ if (kdbGetByName(h, myConfig, "/", 0) == -1) BailOut ("Could not get Keys"); /* Find the key in the keyset */ if ((myKey = ksLookupByName (myConfig, "/hello", 0)) == NULL) BailOut ("Could not Lookup Key"); /* Get the value of the key */ if ((myValue = (char*) keyValue (myKey)) == NULL) BailOut ("Could not get Keyvalue"); /* Actually print the key */ printf ("%s\n", myValue); /* Close and free KeySet */ ksDel(myConfig); /* Close the Key database */ kdbClose(h); return 0; } elektra-0.7.1/examples/sort.c0000644000076400001440000001002411361542115013034 00000000000000#include #include #include #include void ksUnsort (KeySet *ks) { Key *cur; size_t size = 0; KeySet *randks=ksNew(0); /*This is the final randomized keyset*/ KeySet *tempks=ksNew(0); /*Temporary storage for keys not chosen to be inserted*/ while (ksGetSize(ks) > 0) { ksRewind(ks); size = ksGetSize(ks); /* printf ("iterating %d\n", size); */ while ((cur=ksPop(ks)) != 0) { /* printf ("\titerating %s\n", keyName(cur)); */ if (!(rand()%size)) ksAppendKey(randks, cur); else ksAppendKey(tempks,cur); } ksAppend(ks, tempks); ksCopy(tempks,0); } ksCopy (ks, randks); ksDel (randks); ksDel (tempks); } int main(void) { Key *cur; Key *found; KeySet *ks = ksNew (30, keyNew ("user/rem2", KEY_REMOVE, KEY_DIR, KEY_END), keyNew ("user/rem1/key2", KEY_REMOVE, KEY_END), keyNew ("user/rem1/key1", KEY_REMOVE, KEY_END), keyNew ("user/rem1", KEY_REMOVE, KEY_DIR, KEY_END), keyNew ("user/dir1", KEY_DIR, KEY_END), keyNew ("user/dir1/key1", KEY_VALUE, "value1", KEY_END), keyNew ("user/dir1/key2", KEY_VALUE, "value2", KEY_END), keyNew ("user/dir1/key3", KEY_VALUE, "value3", KEY_END), keyNew ("user/dir1/key4", KEY_VALUE, "value4", KEY_END), keyNew ("user/dir1/.inactive1", KEY_COMMENT, "key is inactive", KEY_END), keyNew ("user/dir1/.inactive2", KEY_COMMENT, "additional information", KEY_END), keyNew ("user/dir2", KEY_DIR, KEY_END), keyNew ("user/dir2/key1", KEY_VALUE, "value1", KEY_END), keyNew ("user/dir2/key2", KEY_VALUE, "value2", KEY_END), keyNew ("user/dir2/key3", KEY_VALUE, "value3", KEY_END), keyNew ("user/dir2/key4", KEY_VALUE, "value4", KEY_END), keyNew ("user/dir3", KEY_DIR, KEY_END), keyNew ("user/dir3/key1", KEY_VALUE, "value1", KEY_END), keyNew ("user/dir3/.inactive1", KEY_COMMENT, "key is inactive", KEY_END), keyNew ("user/dir3/.inactive2", KEY_COMMENT, "a users comment", KEY_END), keyNew ("user/dir4", KEY_DIR, KEY_END), keyNew ("user/dir5", KEY_DIR, KEY_END), KS_END); srand (23); ksUnsort (ks); printf ("Keys are now unsorted:\n"); ksRewind(ks); while ((cur=ksNext(ks)) != 0) { /* Iterates over all keys and prints their name */ if (keyNeedRemove(cur)) printf ("%s (Need Remove)\n", keyName(cur)); else printf ("%s\n", keyName(cur)); } found = ksLookupByName (ks, "user/dir1/key3", 0); printf ("\nKeys are sorted after ksLookupByName:\n"); ksRewind(ks); while ((cur=ksNext(ks)) != 0) { /* Iterates over all keys and prints their name */ if (keyNeedRemove(cur)) printf ("%s (Need Remove)\n", keyName(cur)); else printf ("%s\n", keyName(cur)); } keySetName(found, "user/something/else"); found = ksLookupByName (ks, "user/something/else", 0); printf ("\nKeys are *not* sorted after ksLookupByName because of changed name.\n"); printf ("The search for user/something/else found: %s\n", keyName(found)); printf ("The order is:\n"); ksRewind(ks); while ((cur=ksNext(ks)) != 0) { /* Iterates over all keys and prints their name */ if (keyNeedRemove(cur)) printf ("%s (Need Remove)\n", keyName(cur)); else printf ("%s\n", keyName(cur)); } printf ("\nSo we have to sort manually using ksSort()!\n"); ksSort (ks); printf ("The same is valid for keyRemove()."); found = ksLookupByName (ks, "user/something/else", 0); keyRemove (found); found = ksLookupByName (ks, "user/something/else", 0); printf ("\nKeys are *not* sorted after ksLookupByName because of changed name.\n"); printf ("The search for user/something/else (Need Remove) found: %s\n", keyName(found)); printf ("The order is:\n"); ksRewind(ks); while ((cur=ksNext(ks)) != 0) { /* Iterates over all keys and prints their name */ if (keyNeedRemove(cur)) printf ("%s (Need Remove)\n", keyName(cur)); else printf ("%s\n", keyName(cur)); } printf ("\nSo we have to sort manually using ksSort()!\n"); ksSort (ks); printf ("Now we get:\n"); ksRewind(ks); while ((cur=ksNext(ks)) != 0) { /* Iterates over all keys and prints their name */ if (keyNeedRemove(cur)) printf ("%s (Need Remove)\n", keyName(cur)); else printf ("%s\n", keyName(cur)); } return 0; } elektra-0.7.1/install-sh0000755000076400001440000002202111365511146012073 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2005-05-14.22 # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" chmodcmd="$chmodprog 0755" chowncmd= chgrpcmd= stripcmd= rmcmd="$rmprog -f" mvcmd="$mvprog" src= dst= dir_arg= dstarg= no_target_directory= usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: -c (ignored) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. --help display this help and exit. --version display version info and exit. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test -n "$1"; do case $1 in -c) shift continue;; -d) dir_arg=true shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; --help) echo "$usage"; exit $?;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -s) stripcmd=$stripprog shift continue;; -t) dstarg=$2 shift shift continue;; -T) no_target_directory=true shift continue;; --version) echo "$0 $scriptversion"; exit $?;; *) # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. test -n "$dir_arg$dstarg" && break # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dstarg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dstarg" shift # fnord fi shift # arg dstarg=$arg done break;; esac done if test -z "$1"; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi for src do # Protect names starting with `-'. case $src in -*) src=./$src ;; esac if test -n "$dir_arg"; then dst=$src src= if test -d "$dst"; then mkdircmd=: chmodcmd= else mkdircmd=$mkdirprog fi else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dstarg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dstarg # Protect names starting with `-'. case $dst in -*) dst=./$dst ;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dstarg: Is a directory" >&2 exit 1 fi dst=$dst/`basename "$src"` fi fi # This sed command emulates the dirname command. dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'` # Make sure that the destination directory exists. # Skip lots of stat calls in the usual case. if test ! -d "$dstdir"; then defaultIFS=' ' IFS="${IFS-$defaultIFS}" oIFS=$IFS # Some sh's can't handle IFS=/ for some reason. IFS='%' set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` shift IFS=$oIFS pathcomp= while test $# -ne 0 ; do pathcomp=$pathcomp$1 shift if test ! -d "$pathcomp"; then $mkdirprog "$pathcomp" # mkdir can fail with a `File exist' error in case several # install-sh are creating the directory concurrently. This # is OK. test -d "$pathcomp" || exit fi pathcomp=$pathcomp/ done fi if test -n "$dir_arg"; then $doit $mkdircmd "$dst" \ && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } else dstfile=`basename "$dst"` # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 trap '(exit $?); exit' 1 2 13 15 # Copy the file name to the temp name. $doit $cpprog "$src" "$dsttmp" && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && # Now rename the file to the real destination. { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \ || { # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { if test -f "$dstdir/$dstfile"; then $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ || { echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 (exit 1); exit 1 } else : fi } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" } } fi || { (exit 1); exit 1; } done # The final little trick to "correctly" pass the exit status to the exit trap. { (exit 0); exit 0 } # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: elektra-0.7.1/libltdl/0000777000076400001440000000000011365513212011600 500000000000000elektra-0.7.1/libltdl/COPYING.LIB0000644000076400001440000006365611312075134013172 00000000000000 GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. ^L Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. ^L GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. ^L Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. ^L 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. ^L 7. 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 not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. ^L 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the 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 specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. ^L 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS ^L How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! elektra-0.7.1/libltdl/Makefile.am0000644000076400001440000000137311312075134013552 00000000000000## Process this file with automake to produce Makefile.in AUTOMAKE_OPTIONS = no-dependencies foreign if INSTALL_LTDL include_HEADERS = ltdl.h lib_LTLIBRARIES = libltdl.la else noinst_HEADERS = ltdl.h endif if CONVENIENCE_LTDL noinst_LTLIBRARIES = libltdlc.la endif ## Make sure these will be cleaned even when they're not built by ## default. CLEANFILES = libltdl.la libltdlc.la libltdl_la_SOURCES = ltdl.c libltdl_la_LDFLAGS = -no-undefined -version-info 4:6:1 libltdl_la_LIBADD = $(LIBADD_DL) libltdlc_la_SOURCES = ltdl.c libltdlc_la_LIBADD = $(LIBADD_DL) ## Because we do not have automatic dependency tracking: ltdl.lo: ltdl.h config.h $(libltdl_la_OBJECTS) $(libltdlc_la_OBJECTS): libtool libtool: $(LIBTOOL_DEPS) $(SHELL) ./config.status --recheck elektra-0.7.1/libltdl/Makefile.in0000644000076400001440000005030611365511166013573 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = . am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ 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@ DIST_COMMON = README $(am__configure_deps) $(am__include_HEADERS_DIST) \ $(am__noinst_HEADERS_DIST) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config-h.in \ $(top_srcdir)/configure COPYING.LIB config.guess config.sub \ install-sh ltmain.sh missing subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno configure.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES) am__DEPENDENCIES_1 = libltdl_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am_libltdl_la_OBJECTS = ltdl.lo libltdl_la_OBJECTS = $(am_libltdl_la_OBJECTS) @INSTALL_LTDL_TRUE@am_libltdl_la_rpath = -rpath $(libdir) libltdlc_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am_libltdlc_la_OBJECTS = ltdl.lo libltdlc_la_OBJECTS = $(am_libltdlc_la_OBJECTS) @CONVENIENCE_LTDL_TRUE@am_libltdlc_la_rpath = DEFAULT_INCLUDES = -I. -I$(srcdir) -I. depcomp = am__depfiles_maybe = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libltdl_la_SOURCES) $(libltdlc_la_SOURCES) DIST_SOURCES = $(libltdl_la_SOURCES) $(libltdlc_la_SOURCES) am__include_HEADERS_DIST = ltdl.h includeHEADERS_INSTALL = $(INSTALL_HEADER) am__noinst_HEADERS_DIST = ltdl.h HEADERS = $(include_HEADERS) $(noinst_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d $(distdir) \ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr $(distdir); }; } DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CONVENIENCE_LTDL_FALSE = @CONVENIENCE_LTDL_FALSE@ CONVENIENCE_LTDL_TRUE = @CONVENIENCE_LTDL_TRUE@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ FFLAGS = @FFLAGS@ GREP = @GREP@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_LTDL_FALSE = @INSTALL_LTDL_FALSE@ INSTALL_LTDL_TRUE = @INSTALL_LTDL_TRUE@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBADD_DL = @LIBADD_DL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ 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@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ AUTOMAKE_OPTIONS = no-dependencies foreign @INSTALL_LTDL_TRUE@include_HEADERS = ltdl.h @INSTALL_LTDL_TRUE@lib_LTLIBRARIES = libltdl.la @INSTALL_LTDL_FALSE@noinst_HEADERS = ltdl.h @CONVENIENCE_LTDL_TRUE@noinst_LTLIBRARIES = libltdlc.la CLEANFILES = libltdl.la libltdlc.la libltdl_la_SOURCES = ltdl.c libltdl_la_LDFLAGS = -no-undefined -version-info 4:6:1 libltdl_la_LIBADD = $(LIBADD_DL) libltdlc_la_SOURCES = ltdl.c libltdlc_la_LIBADD = $(LIBADD_DL) all: config.h $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj am--refresh: @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \ cd $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) cd $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/config-h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config-h.in: $(am__configure_deps) cd $(top_srcdir) && $(AUTOHEADER) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libltdl.la: $(libltdl_la_OBJECTS) $(libltdl_la_DEPENDENCIES) $(LINK) $(am_libltdl_la_rpath) $(libltdl_la_LDFLAGS) $(libltdl_la_OBJECTS) $(libltdl_la_LIBADD) $(LIBS) libltdlc.la: $(libltdlc_la_OBJECTS) $(libltdlc_la_DEPENDENCIES) $(LINK) $(am_libltdlc_la_rpath) $(libltdlc_la_LDFLAGS) $(libltdlc_la_OBJECTS) $(libltdlc_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c .c.o: $(COMPILE) -c $< .c.obj: $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)" @list='$(include_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \ $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \ done uninstall-includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(include_HEADERS)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \ rm -f "$(DESTDIR)$(includedir)/$$f"; \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) config-h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) config-h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) config-h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) config-h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) mkdir $(distdir) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r $(distdir) dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && cd $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' distuninstallcheck: @cd $(distuninstallcheck_dir) \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) config.h installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"; 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: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) 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-libLTLIBRARIES clean-libtool \ clean-noinstLTLIBRARIES mostlyclean-am distclean: distclean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-includeHEADERS install-exec-am: install-libLTLIBRARIES install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-includeHEADERS uninstall-info-am \ uninstall-libLTLIBRARIES .PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ clean-generic clean-libLTLIBRARIES clean-libtool \ clean-noinstLTLIBRARIES ctags dist dist-all dist-bzip2 \ dist-gzip dist-shar dist-tarZ dist-zip distcheck distclean \ distclean-compile distclean-generic distclean-hdr \ distclean-libtool distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-includeHEADERS install-info \ install-info-am install-libLTLIBRARIES install-man \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am \ uninstall-includeHEADERS uninstall-info-am \ uninstall-libLTLIBRARIES ltdl.lo: ltdl.h config.h $(libltdl_la_OBJECTS) $(libltdlc_la_OBJECTS): libtool libtool: $(LIBTOOL_DEPS) $(SHELL) ./config.status --recheck # 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: elektra-0.7.1/libltdl/README0000644000076400001440000000053311312075134012373 00000000000000This is GNU libltdl, a system independent dlopen wrapper for GNU libtool. It supports the following dlopen interfaces: * dlopen (Solaris, Linux and various BSD flavors) * shl_load (HP-UX) * LoadLibrary (Win16 and Win32) * load_add_on (BeOS) * GNU DLD (emulates dynamic linking for static libraries) * dyld (darwin/Mac OS X) * libtool's dlpreopen elektra-0.7.1/libltdl/acinclude.m40000644000076400001440000075500211312075134013714 00000000000000# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- ## Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007, ## 2008 Free Software Foundation, Inc. ## Originally 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. # serial 52 Debian 1.5.26-4+lenny1 AC_PROG_LIBTOOL # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) # ----------------------------------------------------------- # If this macro is not defined by Autoconf, define it here. m4_ifdef([AC_PROVIDE_IFELSE], [], [m4_define([AC_PROVIDE_IFELSE], [m4_ifdef([AC_PROVIDE_$1], [$2], [$3])])]) # AC_PROG_LIBTOOL # --------------- AC_DEFUN([AC_PROG_LIBTOOL], [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. AC_PROVIDE_IFELSE([AC_PROG_CXX], [AC_LIBTOOL_CXX], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX ])]) dnl And a similar setup for Fortran 77 support AC_PROVIDE_IFELSE([AC_PROG_F77], [AC_LIBTOOL_F77], [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 ])]) dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [ifdef([AC_PROG_GCJ], [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ifdef([A][M_PROG_GCJ], [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ifdef([LT_AC_PROG_GCJ], [define([LT_AC_PROG_GCJ], defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) ])])# AC_PROG_LIBTOOL # _AC_PROG_LIBTOOL # ---------------- AC_DEFUN([_AC_PROG_LIBTOOL], [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl # Prevent multiple expansion define([AC_PROG_LIBTOOL], []) ])# _AC_PROG_LIBTOOL # AC_LIBTOOL_SETUP # ---------------- AC_DEFUN([AC_LIBTOOL_SETUP], [AC_PREREQ(2.50)dnl AC_REQUIRE([AC_ENABLE_SHARED])dnl AC_REQUIRE([AC_ENABLE_STATIC])dnl AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_LD])dnl AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl AC_REQUIRE([AC_PROG_NM])dnl AC_REQUIRE([AC_PROG_LN_S])dnl AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! AC_REQUIRE([AC_OBJEXT])dnl AC_REQUIRE([AC_EXEEXT])dnl dnl AC_LIBTOOL_SYS_MAX_CMD_LEN AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE AC_LIBTOOL_OBJDIR AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl _LT_AC_PROG_ECHO_BACKSLASH case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e 1s/^X//' [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] # Same as above, but do not quote variable references. [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Constants: rm="rm -f" # Global variables: default_ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" ofile="$default_ofile" with_gnu_ld="$lt_cv_prog_gnu_ld" AC_CHECK_TOOL(AR, ar, false) AC_CHECK_TOOL(RANLIB, ranlib, :) AC_CHECK_TOOL(STRIP, strip, :) old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" test -z "$MAGIC_CMD" && MAGIC_CMD=file test -z "$NM" && NM=nm test -z "$SED" && SED=sed test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$RANLIB" && RANLIB=: test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then AC_PATH_MAGIC fi ;; esac _LT_REQUIRED_DARWIN_CHECKS AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], enable_win32_dll=yes, enable_win32_dll=no) AC_ARG_ENABLE([libtool-lock], [AC_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes AC_ARG_WITH([pic], [AC_HELP_STRING([--with-pic], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [pic_mode="$withval"], [pic_mode=default]) test -z "$pic_mode" && pic_mode=default # Use C for the default configuration in the libtool script tagname= AC_LIBTOOL_LANG_C_CONFIG _LT_AC_TAGCONFIG ])# AC_LIBTOOL_SETUP # _LT_AC_SYS_COMPILER # ------------------- AC_DEFUN([_LT_AC_SYS_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_AC_SYS_COMPILER # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. AC_DEFUN([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` ]) # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. AC_DEFUN([_LT_COMPILER_BOILERPLATE], [AC_REQUIRE([LT_AC_PROG_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. AC_DEFUN([_LT_LINKER_BOILERPLATE], [AC_REQUIRE([LT_AC_PROG_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # -------------------------- # Check for some things on darwin AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 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. echo "int foo(void){return 1;}" > conftest.c $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib ${wl}-single_module conftest.c if test -f libconftest.dylib; then lt_cv_apple_cc_single_mod=yes rm -rf libconftest.dylib* fi rm conftest.c 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" ]) case $host_os in rhapsody* | darwin1.[[0123]]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[[012]]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}" fi if test "$DSYMUTIL" != ":"; then _lt_dsymutil="~$DSYMUTIL \$lib || :" else _lt_dsymutil= fi ;; esac ]) # _LT_AC_SYS_LIBPATH_AIX # ---------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_LINK_IFELSE(AC_LANG_PROGRAM,[ lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ])# _LT_AC_SYS_LIBPATH_AIX # _LT_AC_SHELL_INIT(ARG) # ---------------------- AC_DEFUN([_LT_AC_SHELL_INIT], [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], [AC_DIVERT_PUSH(NOTICE)]) $1 AC_DIVERT_POP ])# _LT_AC_SHELL_INIT # _LT_AC_PROG_ECHO_BACKSLASH # -------------------------- # Add some code to the start of the generated configure script which # will find an echo command which doesn't interpret backslashes. AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], [_LT_AC_SHELL_INIT([ # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` ;; esac echo=${ECHO-echo} if test "X[$]1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X[$]1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} fi if test "X[$]1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null 2>&1 && unset CDPATH if test -z "$ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if (echo_test_string=`eval $cmd`) 2>/dev/null && echo_test_string=`eval $cmd` && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL [$]0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL [$]0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "[$]0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" fi AC_SUBST(ECHO) ])])# _LT_AC_PROG_ECHO_BACKSLASH # _LT_AC_LOCK # ----------- AC_DEFUN([_LT_AC_LOCK], [AC_ARG_ENABLE([libtool-lock], [AC_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) 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* ;; AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], [*-*-cygwin* | *-*-mingw* | *-*-pw32*) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; ]) esac need_locks="$enable_libtool_lock" ])# _LT_AC_LOCK # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [AC_REQUIRE([LT_AC_PROG_SED]) AC_CACHE_CHECK([$1], [$2], [$2=no ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $rm conftest* ]) if test x"[$]$2" = xyes; then ifelse([$5], , :, [$5]) else ifelse([$6], , :, [$6]) fi ])# AC_LIBTOOL_COMPILER_OPTION # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ------------------------------------------------------------ # Check whether the given compiler option works AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $rm -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then ifelse([$4], , :, [$4]) else ifelse([$5], , :, [$5]) fi ])# AC_LIBTOOL_LINKER_OPTION # AC_LIBTOOL_SYS_MAX_CMD_LEN # -------------------------- AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [# find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && new_result=`expr "X$teststring" : ".*" 2>&1` && lt_cv_sys_max_cmd_len=$new_result && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done teststring= # Add a significant safety factor because C++ compilers can tack on massive # amounts of additional arguments before passing them to the linker. # It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi ])# AC_LIBTOOL_SYS_MAX_CMD_LEN # _LT_AC_CHECK_DLFCN # ------------------ AC_DEFUN([_LT_AC_CHECK_DLFCN], [AC_CHECK_HEADERS(dlfcn.h)dnl ])# _LT_AC_CHECK_DLFCN # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # --------------------------------------------------------------------- AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); exit (status); }] EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_AC_TRY_DLOPEN_SELF # AC_LIBTOOL_DLOPEN_SELF # ---------------------- AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_AC_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_AC_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi ])# AC_LIBTOOL_DLOPEN_SELF # AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) # --------------------------------- # Check to see if options -c and -o are simultaneously supported by compiler AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* ]) ])# AC_LIBTOOL_PROG_CC_C_O # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) # ----------------------------------------- # Check to see if we can do hard links to lock some files if needed AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_REQUIRE([_LT_AC_LOCK])dnl hard_links="nottested" if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS # AC_LIBTOOL_OBJDIR # ----------------- AC_DEFUN([AC_LIBTOOL_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir ])# AC_LIBTOOL_OBJDIR # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) # ---------------------------------------------- # Check hardcoding attributes. AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_AC_TAGVAR(hardcode_action, $1)= if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existant directories. if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_AC_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_AC_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_AC_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH # AC_LIBTOOL_SYS_LIB_STRIP # ------------------------ AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], [striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi ])# AC_LIBTOOL_SYS_LIB_STRIP # AC_LIBTOOL_SYS_DYNAMIC_LINKER # ----------------------------- # PORTME Fill in your ld.so characteristics AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_MSG_CHECKING([dynamic linker characteristics]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" m4_if($1,[],[ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` else lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` sys_lib_search_path_spec=`echo $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[[4-9]]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[123]]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[[3-9]]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; 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 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no AC_CACHE_VAL([lt_cv_sys_lib_search_path_spec], [lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"]) sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" AC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec], [lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"]) sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER # _LT_AC_TAGCONFIG # ---------------- AC_DEFUN([_LT_AC_TAGCONFIG], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_ARG_WITH([tags], [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], [include additional configurations @<:@automatic@:>@])], [tagnames="$withval"]) if test -f "$ltmain" && test -n "$tagnames"; then if test ! -f "${ofile}"; then AC_MSG_WARN([output file `$ofile' does not exist]) fi if test -z "$LTCC"; then eval "`$SHELL ${ofile} --config | grep '^LTCC='`" if test -z "$LTCC"; then AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) else AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) fi fi if test -z "$LTCFLAGS"; then eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for tagname in $tagnames; do IFS="$lt_save_ifs" # Check whether tagname contains only valid characters case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in "") ;; *) AC_MSG_ERROR([invalid tag name: $tagname]) ;; esac if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null then AC_MSG_ERROR([tag name \"$tagname\" already exists]) fi # Update the list of available tags. if test -n "$tagname"; then echo appending configuration tag \"$tagname\" to $ofile case $tagname in CXX) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_LIBTOOL_LANG_CXX_CONFIG else tagname="" fi ;; F77) if test -n "$F77" && test "X$F77" != "Xno"; then AC_LIBTOOL_LANG_F77_CONFIG else tagname="" fi ;; GCJ) if test -n "$GCJ" && test "X$GCJ" != "Xno"; then AC_LIBTOOL_LANG_GCJ_CONFIG else tagname="" fi ;; RC) AC_LIBTOOL_LANG_RC_CONFIG ;; *) AC_MSG_ERROR([Unsupported tag name: $tagname]) ;; esac # Append the new tag name to the list of available tags. if test -n "$tagname" ; then available_tags="$available_tags $tagname" fi fi done IFS="$lt_save_ifs" # Now substitute the updated list of available tags. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then mv "${ofile}T" "$ofile" chmod +x "$ofile" else rm -f "${ofile}T" AC_MSG_ERROR([unable to update list of available tagged configurations.]) fi fi ])# _LT_AC_TAGCONFIG # AC_LIBTOOL_DLOPEN # ----------------- # enable checks for dlopen support AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) ])# AC_LIBTOOL_DLOPEN # AC_LIBTOOL_WIN32_DLL # -------------------- # declare package support for building win32 DLLs AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) ])# AC_LIBTOOL_WIN32_DLL # AC_ENABLE_SHARED([DEFAULT]) # --------------------------- # implement the --enable-shared flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_SHARED], [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([shared], [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]AC_ENABLE_SHARED_DEFAULT) ])# AC_ENABLE_SHARED # AC_DISABLE_SHARED # ----------------- # set the default shared flag to --disable-shared AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_SHARED(no) ])# AC_DISABLE_SHARED # AC_ENABLE_STATIC([DEFAULT]) # --------------------------- # implement the --enable-static flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_STATIC], [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([static], [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]AC_ENABLE_STATIC_DEFAULT) ])# AC_ENABLE_STATIC # AC_DISABLE_STATIC # ----------------- # set the default static flag to --disable-static AC_DEFUN([AC_DISABLE_STATIC], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_STATIC(no) ])# AC_DISABLE_STATIC # AC_ENABLE_FAST_INSTALL([DEFAULT]) # --------------------------------- # implement the --enable-fast-install flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_FAST_INSTALL], [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([fast-install], [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) ])# AC_ENABLE_FAST_INSTALL # AC_DISABLE_FAST_INSTALL # ----------------------- # set the default to --disable-fast-install AC_DEFUN([AC_DISABLE_FAST_INSTALL], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_FAST_INSTALL(no) ])# AC_DISABLE_FAST_INSTALL # AC_LIBTOOL_PICMODE([MODE]) # -------------------------- # implement the --with-pic flag # MODE is either `yes' or `no'. If omitted, it defaults to `both'. AC_DEFUN([AC_LIBTOOL_PICMODE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl pic_mode=ifelse($#,1,$1,default) ])# AC_LIBTOOL_PICMODE # AC_PROG_EGREP # ------------- # This is predefined starting with Autoconf 2.54, so this conditional # definition can be removed once we require Autoconf 2.54 or later. m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 then ac_cv_prog_egrep='grep -E' else ac_cv_prog_egrep='egrep' fi]) EGREP=$ac_cv_prog_egrep AC_SUBST([EGREP]) ])]) # AC_PATH_TOOL_PREFIX # ------------------- # find a file program which can recognize shared library AC_DEFUN([AC_PATH_TOOL_PREFIX], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="ifelse([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi ])# AC_PATH_TOOL_PREFIX # AC_PATH_MAGIC # ------------- # find a file program which can recognize a shared library AC_DEFUN([AC_PATH_MAGIC], [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# AC_PATH_MAGIC # AC_PROG_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([AC_PROG_LD], [AC_ARG_WITH([gnu-ld], [AC_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no]) AC_REQUIRE([LT_AC_PROG_SED])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd* | 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=unknown ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown ])# AC_DEPLIBS_CHECK_METHOD # AC_PROG_NM # ---------- # find the pathname to a BSD-compatible name lister AC_DEFUN([AC_PROG_NM], [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi]) NM="$lt_cv_path_NM" ])# AC_PROG_NM # AC_CHECK_LIBM # ------------- # check for math library AC_DEFUN([AC_CHECK_LIBM], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac ])# AC_CHECK_LIBM # AC_LIBLTDL_CONVENIENCE([DIRECTORY]) # ----------------------------------- # sets LIBLTDL to the link flags for the libltdl convenience library and # LTDLINCL to the include flags for the libltdl header and adds # --enable-ltdl-convenience to the configure arguments. Note that # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, # it is assumed to be `libltdl'. LIBLTDL will be prefixed with # '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' # (note the single quotes!). If your package is not flat and you're not # using automake, define top_builddir and top_srcdir appropriately in # the Makefiles. AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl case $enable_ltdl_convenience in no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; "") enable_ltdl_convenience=yes ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; esac LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" ])# AC_LIBLTDL_CONVENIENCE # AC_LIBLTDL_INSTALLABLE([DIRECTORY]) # ----------------------------------- # sets LIBLTDL to the link flags for the libltdl installable library and # LTDLINCL to the include flags for the libltdl header and adds # --enable-ltdl-install to the configure arguments. Note that # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, # and an installed libltdl is not found, it is assumed to be `libltdl'. # LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with # '${top_srcdir}/' (note the single quotes!). If your package is not # flat and you're not using automake, define top_builddir and top_srcdir # appropriately in the Makefiles. # In the future, this macro may have to be called after AC_PROG_LIBTOOL. AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_CHECK_LIB(ltdl, lt_dlinit, [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], [if test x"$enable_ltdl_install" = xno; then AC_MSG_WARN([libltdl not installed, but installation disabled]) else enable_ltdl_install=yes fi ]) if test x"$enable_ltdl_install" = x"yes"; then ac_configure_args="$ac_configure_args --enable-ltdl-install" LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) else ac_configure_args="$ac_configure_args --enable-ltdl-install=no" LIBLTDL="-lltdl" LTDLINCL= fi # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" ])# AC_LIBLTDL_INSTALLABLE # AC_LIBTOOL_CXX # -------------- # enable support for C++ libraries AC_DEFUN([AC_LIBTOOL_CXX], [AC_REQUIRE([_LT_AC_LANG_CXX]) ])# AC_LIBTOOL_CXX # _LT_AC_LANG_CXX # --------------- AC_DEFUN([_LT_AC_LANG_CXX], [AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([_LT_AC_PROG_CXXCPP]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) ])# _LT_AC_LANG_CXX # _LT_AC_PROG_CXXCPP # ------------------ AC_DEFUN([_LT_AC_PROG_CXXCPP], [ AC_REQUIRE([AC_PROG_CXX]) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP fi ])# _LT_AC_PROG_CXXCPP # AC_LIBTOOL_F77 # -------------- # enable support for Fortran 77 libraries AC_DEFUN([AC_LIBTOOL_F77], [AC_REQUIRE([_LT_AC_LANG_F77]) ])# AC_LIBTOOL_F77 # _LT_AC_LANG_F77 # --------------- AC_DEFUN([_LT_AC_LANG_F77], [AC_REQUIRE([AC_PROG_F77]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) ])# _LT_AC_LANG_F77 # AC_LIBTOOL_GCJ # -------------- # enable support for GCJ libraries AC_DEFUN([AC_LIBTOOL_GCJ], [AC_REQUIRE([_LT_AC_LANG_GCJ]) ])# AC_LIBTOOL_GCJ # _LT_AC_LANG_GCJ # --------------- AC_DEFUN([_LT_AC_LANG_GCJ], [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) ])# _LT_AC_LANG_GCJ # AC_LIBTOOL_RC # ------------- # enable support for Windows resource files AC_DEFUN([AC_LIBTOOL_RC], [AC_REQUIRE([LT_AC_PROG_RC]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) ])# AC_LIBTOOL_RC # AC_LIBTOOL_LANG_C_CONFIG # ------------------------ # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) AC_DEFUN([_LT_AC_LANG_C_CONFIG], [lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE ## 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... AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_SYS_LIB_STRIP AC_LIBTOOL_DLOPEN_SELF # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC="$lt_save_CC" ])# AC_LIBTOOL_LANG_C_CONFIG # AC_LIBTOOL_LANG_CXX_CONFIG # -------------------------- # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], [AC_LANG_PUSH(C++) AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([_LT_AC_PROG_CXXCPP]) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_AC_TAGVAR(no_undefined_flag, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Dependencies to place before and after the object being linked: _LT_AC_TAGVAR(predep_objects, $1)= _LT_AC_TAGVAR(postdep_objects, $1)= _LT_AC_TAGVAR(predeps, $1)= _LT_AC_TAGVAR(postdeps, $1)= _LT_AC_TAGVAR(compiler_lib_search_path, $1)= _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)= # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) # We don't want -fno-exception wen compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration AC_PROG_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ grep 'no-whole-archive' > /dev/null; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_AC_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_AC_TAGVAR(archive_cmds, $1)='' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_AC_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; darwin* | rhapsody*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" if test "$GXX" = yes ; then output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_AC_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_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" if test "$lt_cv_apple_cc_single_mod" != "yes"; then _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" _LT_AC_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 case $cc_basename in xlc*) output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd[[12]]*) # C++ shared libraries reported to be fairly broken before switch to ELF _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_AC_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; hpux9*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' fi fi _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc*) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; openbsd2*) # C++ shared libraries are fairly broken _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd='echo' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; osf3*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; cxx*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; cxx*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ $rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | grep -v '^2\.7' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. # So that behaviour is only enabled if SCOABSPATH is set to a # non-empty value in the environment. Most likely only useful for # creating official distributions of packages. # This is a hack until libtool officially supports absolute path # names for shared libraries. _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_AC_TAGVAR(GCC, $1)="$GXX" _LT_AC_TAGVAR(LD, $1)="$LD" ## 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... AC_LIBTOOL_POSTDEP_PREDEP($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ldcxx=$with_gnu_ld with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld ])# AC_LIBTOOL_LANG_CXX_CONFIG # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) # ------------------------------------ # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP], [AC_REQUIRE([LT_AC_PROG_SED])dnl dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_AC_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac ])# AC_LIBTOOL_POSTDEP_PREDEP # AC_LIBTOOL_LANG_F77_CONFIG # -------------------------- # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)]) AC_DEFUN([_LT_AC_LANG_F77_CONFIG], [AC_REQUIRE([AC_PROG_F77]) AC_LANG_PUSH(Fortran 77) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_AC_TAGVAR(no_undefined_flag, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${F77-"f77"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_AC_TAGVAR(GCC, $1)="$G77" _LT_AC_TAGVAR(LD, $1)="$LD" AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC="$lt_save_CC" ])# AC_LIBTOOL_LANG_F77_CONFIG # AC_LIBTOOL_LANG_GCJ_CONFIG # -------------------------- # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)]) AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG], [AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${GCJ-"gcj"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds ## 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... AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_CONFIG($1) AC_LANG_RESTORE CC="$lt_save_CC" ])# AC_LIBTOOL_LANG_GCJ_CONFIG # AC_LIBTOOL_LANG_RC_CONFIG # ------------------------- # Ensure that the configuration vars for the Windows resource compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)]) AC_DEFUN([_LT_AC_LANG_RC_CONFIG], [AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${RC-"windres"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes AC_LIBTOOL_CONFIG($1) AC_LANG_RESTORE CC="$lt_save_CC" ])# AC_LIBTOOL_LANG_RC_CONFIG # AC_LIBTOOL_CONFIG([TAGNAME]) # ---------------------------- # If TAGNAME is not passed, then create an initial libtool script # with a default configuration from the untagged config vars. Otherwise # add code to config.status for appending the configuration named by # TAGNAME from the matching tagged config vars. AC_DEFUN([AC_LIBTOOL_CONFIG], [# The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ _LT_AC_TAGVAR(compiler, $1) \ _LT_AC_TAGVAR(CC, $1) \ _LT_AC_TAGVAR(LD, $1) \ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \ _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \ _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \ _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \ _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \ _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \ _LT_AC_TAGVAR(old_archive_cmds, $1) \ _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \ _LT_AC_TAGVAR(predep_objects, $1) \ _LT_AC_TAGVAR(postdep_objects, $1) \ _LT_AC_TAGVAR(predeps, $1) \ _LT_AC_TAGVAR(postdeps, $1) \ _LT_AC_TAGVAR(compiler_lib_search_path, $1) \ _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \ _LT_AC_TAGVAR(archive_cmds, $1) \ _LT_AC_TAGVAR(archive_expsym_cmds, $1) \ _LT_AC_TAGVAR(postinstall_cmds, $1) \ _LT_AC_TAGVAR(postuninstall_cmds, $1) \ _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \ _LT_AC_TAGVAR(allow_undefined_flag, $1) \ _LT_AC_TAGVAR(no_undefined_flag, $1) \ _LT_AC_TAGVAR(export_symbols_cmds, $1) \ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \ _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \ _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \ _LT_AC_TAGVAR(hardcode_automatic, $1) \ _LT_AC_TAGVAR(module_cmds, $1) \ _LT_AC_TAGVAR(module_expsym_cmds, $1) \ _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \ _LT_AC_TAGVAR(fix_srcfile_path, $1) \ _LT_AC_TAGVAR(exclude_expsyms, $1) \ _LT_AC_TAGVAR(include_expsyms, $1); do case $var in _LT_AC_TAGVAR(old_archive_cmds, $1) | \ _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \ _LT_AC_TAGVAR(archive_cmds, $1) | \ _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \ _LT_AC_TAGVAR(module_cmds, $1) | \ _LT_AC_TAGVAR(module_expsym_cmds, $1) | \ _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \ _LT_AC_TAGVAR(export_symbols_cmds, $1) | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\[$]0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'` ;; esac ifelse([$1], [], [cfgfile="${ofile}T" trap "$rm \"$cfgfile\"; exit 1" 1 2 15 $rm -f "$cfgfile" AC_MSG_NOTICE([creating $ofile])], [cfgfile="$ofile"]) cat <<__EOF__ >> "$cfgfile" ifelse([$1], [], [#! $SHELL # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="$SED -e 1s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # The names of the tagged configurations supported by this script. available_tags= # ### BEGIN LIBTOOL CONFIG], [# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) # Is the compiler the GNU C compiler? with_gcc=$_LT_AC_TAGVAR(GCC, $1) # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_[]_LT_AC_TAGVAR(LD, $1) # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) # Commands used to build and install a shared archive. archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1) # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) # Flag that forces no undefined symbols. no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) # The commands to list exported symbols. export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) # Symbols that must always be exported. include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) ifelse([$1],[], [# ### END LIBTOOL CONFIG], [# ### END LIBTOOL TAG CONFIG: $tagname]) __EOF__ ifelse([$1],[], [ case $host_os in aix3*) cat <<\EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi EOF ;; esac # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || \ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ]) else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ])# AC_LIBTOOL_CONFIG # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------------------- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE # --------------------------------- AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([LT_AC_PROG_SED]) AC_REQUIRE([AC_PROG_NM]) AC_REQUIRE([AC_OBJEXT]) # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32*) symcode='[[ABCDGISTW]]' ;; hpux*) # Its linker distinguishes data from code symbols if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; linux* | k*bsd*-gnu) if test "$host_cpu" = ia64; then symcode='[[ABCDGIRSTW]]' lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext < $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if grep ' nm_test_var$' "$nlist" >/dev/null; then if grep ' nm_test_func$' "$nlist" >/dev/null; then cat < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else # define lt_ptr_t char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr_t address; } lt_preloaded_symbols[[]] = { EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) # --------------------------------------- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)= AC_MSG_CHECKING([for $compiler option to produce PIC]) ifelse([$1],[CXX],[ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; dgux*) case $cc_basename in ec++*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; icpc* | ecpc*) # Intel C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; vxworks*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; newsos6) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='' ;; esac ;; esac ;; osf3* | osf4* | osf5*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1), [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" ;; esac # # Check to make sure the static flag actually works. # wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) ]) # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) # ------------------------------------ # See if the linker supports building shared libraries. AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_REQUIRE([LT_AC_PROG_SED])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) ifelse([$1],[CXX],[ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' else _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw*) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' ;; linux* | k*bsd*-gnu) _LT_AC_TAGVAR(link_all_deplibs, $1)=no ;; *) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] ],[ runpath_var= _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_AC_TAGVAR(archive_cmds, $1)= _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_AC_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_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= # Just being paranoid about ensuring that cc_basename is set. _LT_CC_BASENAME([$compiler]) case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac _LT_AC_TAGVAR(ld_shlibs, $1)=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; interix[[3-9]]*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; *) tmp_sharedflag='-shared' ;; esac _LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi _LT_AC_TAGVAR(link_all_deplibs, $1)=no else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=yes _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' else _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_AC_TAGVAR(archive_cmds, $1)='' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_AC_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # see comment about different semantics on the GNU ld section _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; bsdi[[45]]*) _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_AC_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_AC_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}" else case $cc_basename in xlc*) output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ;; dgux*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; freebsd1*) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' if test "$GCC" = yes; then wlarc='${wl}' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_AC_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_AC_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ]) AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_AC_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_MSG_CHECKING([whether -lc should be explicitly linked in]) $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) _LT_AC_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) then _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no else _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) ;; esac fi ;; esac ])# AC_LIBTOOL_PROG_LD_SHLIBS # _LT_AC_FILE_LTDLL_C # ------------------- # Be careful that the start marker always follows a newline. AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ # /* ltdll.c starts here */ # #define WIN32_LEAN_AND_MEAN # #include # #undef WIN32_LEAN_AND_MEAN # #include # # #ifndef __CYGWIN__ # # ifdef __CYGWIN32__ # # define __CYGWIN__ __CYGWIN32__ # # endif # #endif # # #ifdef __cplusplus # extern "C" { # #endif # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); # #ifdef __cplusplus # } # #endif # # #ifdef __CYGWIN__ # #include # DECLARE_CYGWIN_DLL( DllMain ); # #endif # HINSTANCE __hDllInstance_base; # # BOOL APIENTRY # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) # { # __hDllInstance_base = hInst; # return TRUE; # } # /* ltdll.c ends here */ ])# _LT_AC_FILE_LTDLL_C # _LT_AC_TAGVAR(VARNAME, [TAGNAME]) # --------------------------------- AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) # old names AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) # This is just to silence aclocal about the macro not being used ifelse([AC_DISABLE_FAST_INSTALL]) AC_DEFUN([LT_AC_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj, no) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS) ]) AC_DEFUN([LT_AC_PROG_RC], [AC_CHECK_TOOL(RC, windres, no) ]) # Cheap backport of AS_EXECUTABLE_P and required macros # from Autoconf 2.59; we should not use $as_executable_p directly. # _AS_TEST_PREPARE # ---------------- m4_ifndef([_AS_TEST_PREPARE], [m4_defun([_AS_TEST_PREPARE], [if test -x / >/dev/null 2>&1; then as_executable_p='test -x' else as_executable_p='test -f' fi ])])# _AS_TEST_PREPARE # AS_EXECUTABLE_P # --------------- # Check whether a file is executable. m4_ifndef([AS_EXECUTABLE_P], [m4_defun([AS_EXECUTABLE_P], [AS_REQUIRE([_AS_TEST_PREPARE])dnl $as_executable_p $1[]dnl ])])# AS_EXECUTABLE_P ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ # LT_AC_PROG_SED # -------------- # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. AC_DEFUN([LT_AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ]) ## ltdl.m4 - Configure ltdl for the target system. -*-Autoconf-*- ## Copyright (C) 1999-2006 Free Software Foundation, Inc. ## ## This file is free software; the Free Software Foundation gives ## unlimited permission to copy and/or distribute it, with or without ## modifications, as long as this notice is preserved. # serial 9 AC_LIB_LTDL # AC_WITH_LTDL # ------------ # Clients of libltdl can use this macro to allow the installer to # choose between a shipped copy of the ltdl sources or a preinstalled # version of the library. AC_DEFUN([AC_WITH_LTDL], [AC_REQUIRE([AC_LIB_LTDL]) AC_SUBST([LIBLTDL]) AC_SUBST([INCLTDL]) # Unless the user asks us to check, assume no installed ltdl exists. use_installed_libltdl=no AC_ARG_WITH([included_ltdl], [ --with-included-ltdl use the GNU ltdl sources included here]) if test "x$with_included_ltdl" != xyes; then # We are not being forced to use the included libltdl sources, so # decide whether there is a useful installed version we can use. AC_CHECK_HEADER([ltdl.h], [AC_CHECK_LIB([ltdl], [lt_dlcaller_register], [with_included_ltdl=no], [with_included_ltdl=yes]) ]) fi if test "x$enable_ltdl_install" != xyes; then # If the user did not specify an installable libltdl, then default # to a convenience lib. AC_LIBLTDL_CONVENIENCE fi if test "x$with_included_ltdl" = xno; then # If the included ltdl is not to be used. then Use the # preinstalled libltdl we found. AC_DEFINE([HAVE_LTDL], [1], [Define this if a modern libltdl is already installed]) LIBLTDL=-lltdl fi # Report our decision... AC_MSG_CHECKING([whether to use included libltdl]) AC_MSG_RESULT([$with_included_ltdl]) AC_CONFIG_SUBDIRS([libltdl]) ])# AC_WITH_LTDL # AC_LIB_LTDL # ----------- # Perform all the checks necessary for compilation of the ltdl objects # -- including compiler checks and header checks. AC_DEFUN([AC_LIB_LTDL], [AC_PREREQ(2.50) AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_C_CONST]) AC_REQUIRE([AC_HEADER_STDC]) AC_REQUIRE([AC_HEADER_DIRENT]) AC_REQUIRE([_LT_AC_CHECK_DLFCN]) AC_REQUIRE([AC_LTDL_ENABLE_INSTALL]) AC_REQUIRE([AC_LTDL_SHLIBEXT]) AC_REQUIRE([AC_LTDL_SHLIBPATH]) AC_REQUIRE([AC_LTDL_SYSSEARCHPATH]) AC_REQUIRE([AC_LTDL_OBJDIR]) AC_REQUIRE([AC_LTDL_DLPREOPEN]) AC_REQUIRE([AC_LTDL_DLLIB]) AC_REQUIRE([AC_LTDL_SYMBOL_USCORE]) AC_REQUIRE([AC_LTDL_DLSYM_USCORE]) AC_REQUIRE([AC_LTDL_SYS_DLOPEN_DEPLIBS]) AC_REQUIRE([AC_LTDL_FUNC_ARGZ]) AC_CHECK_HEADERS([assert.h ctype.h errno.h malloc.h memory.h stdlib.h \ stdio.h unistd.h]) AC_CHECK_HEADERS([dl.h sys/dl.h dld.h mach-o/dyld.h]) AC_CHECK_HEADERS([string.h strings.h], [break]) AC_CHECK_FUNCS([strchr index], [break]) AC_CHECK_FUNCS([strrchr rindex], [break]) AC_CHECK_FUNCS([memcpy bcopy], [break]) AC_CHECK_FUNCS([memmove strcmp]) AC_CHECK_FUNCS([closedir opendir readdir]) ])# AC_LIB_LTDL # AC_LTDL_ENABLE_INSTALL # ---------------------- AC_DEFUN([AC_LTDL_ENABLE_INSTALL], [AC_ARG_ENABLE([ltdl-install], [AC_HELP_STRING([--enable-ltdl-install], [install libltdl])]) AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno) AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno) ])# AC_LTDL_ENABLE_INSTALL # AC_LTDL_SYS_DLOPEN_DEPLIBS # -------------------------- AC_DEFUN([AC_LTDL_SYS_DLOPEN_DEPLIBS], [AC_REQUIRE([AC_CANONICAL_HOST]) AC_CACHE_CHECK([whether deplibs are loaded by dlopen], [libltdl_cv_sys_dlopen_deplibs], [# PORTME does your system automatically load deplibs for dlopen? # or its logical equivalent (e.g. shl_load for HP-UX < 11) # For now, we just catch OSes we know something about -- in the # future, we'll try test this programmatically. libltdl_cv_sys_dlopen_deplibs=unknown case "$host_os" in aix3*|aix4.1.*|aix4.2.*) # Unknown whether this is true for these versions of AIX, but # we want this `case' here to explicitly catch those versions. libltdl_cv_sys_dlopen_deplibs=unknown ;; aix[[4-9]]*) libltdl_cv_sys_dlopen_deplibs=yes ;; darwin*) # Assuming the user has installed a libdl from somewhere, this is true # If you are looking for one http://www.opendarwin.org/projects/dlcompat libltdl_cv_sys_dlopen_deplibs=yes ;; freebsd* | dragonfly*) libltdl_cv_sys_dlopen_deplibs=yes ;; gnu* | linux* | k*bsd*-gnu) # GNU and its variants, using gnu ld.so (Glibc) libltdl_cv_sys_dlopen_deplibs=yes ;; hpux10*|hpux11*) libltdl_cv_sys_dlopen_deplibs=yes ;; interix*) libltdl_cv_sys_dlopen_deplibs=yes ;; irix[[12345]]*|irix6.[[01]]*) # Catch all versions of IRIX before 6.2, and indicate that we don't # know how it worked for any of those versions. libltdl_cv_sys_dlopen_deplibs=unknown ;; irix*) # The case above catches anything before 6.2, and it's known that # at 6.2 and later dlopen does load deplibs. libltdl_cv_sys_dlopen_deplibs=yes ;; netbsd* | netbsdelf*-gnu) libltdl_cv_sys_dlopen_deplibs=yes ;; openbsd*) libltdl_cv_sys_dlopen_deplibs=yes ;; osf[[1234]]*) # dlopen did load deplibs (at least at 4.x), but until the 5.x series, # it did *not* use an RPATH in a shared library to find objects the # library depends on, so we explictly say `no'. libltdl_cv_sys_dlopen_deplibs=no ;; osf5.0|osf5.0a|osf5.1) # dlopen *does* load deplibs and with the right loader patch applied # it even uses RPATH in a shared library to search for shared objects # that the library depends on, but there's no easy way to know if that # patch is installed. Since this is the case, all we can really # say is unknown -- it depends on the patch being installed. If # it is, this changes to `yes'. Without it, it would be `no'. libltdl_cv_sys_dlopen_deplibs=unknown ;; osf*) # the two cases above should catch all versions of osf <= 5.1. Read # the comments above for what we know about them. # At > 5.1, deplibs are loaded *and* any RPATH in a shared library # is used to find them so we can finally say `yes'. libltdl_cv_sys_dlopen_deplibs=yes ;; solaris*) libltdl_cv_sys_dlopen_deplibs=yes ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) libltdl_cv_sys_dlopen_deplibs=yes ;; esac ]) if test "$libltdl_cv_sys_dlopen_deplibs" != yes; then AC_DEFINE([LTDL_DLOPEN_DEPLIBS], [1], [Define if the OS needs help to load dependent libraries for dlopen().]) fi ])# AC_LTDL_SYS_DLOPEN_DEPLIBS # AC_LTDL_SHLIBEXT # ---------------- AC_DEFUN([AC_LTDL_SHLIBEXT], [AC_REQUIRE([AC_LIBTOOL_SYS_DYNAMIC_LINKER]) AC_CACHE_CHECK([which extension is used for loadable modules], [libltdl_cv_shlibext], [ module=yes eval libltdl_cv_shlibext=$shrext_cmds ]) if test -n "$libltdl_cv_shlibext"; then AC_DEFINE_UNQUOTED([LTDL_SHLIB_EXT], ["$libltdl_cv_shlibext"], [Define to the extension used for shared libraries, say, ".so".]) fi ])# AC_LTDL_SHLIBEXT # AC_LTDL_SHLIBPATH # ----------------- AC_DEFUN([AC_LTDL_SHLIBPATH], [AC_REQUIRE([AC_LIBTOOL_SYS_DYNAMIC_LINKER]) AC_CACHE_CHECK([which variable specifies run-time library path], [libltdl_cv_shlibpath_var], [libltdl_cv_shlibpath_var="$shlibpath_var"]) if test -n "$libltdl_cv_shlibpath_var"; then AC_DEFINE_UNQUOTED([LTDL_SHLIBPATH_VAR], ["$libltdl_cv_shlibpath_var"], [Define to the name of the environment variable that determines the dynamic library search path.]) fi ])# AC_LTDL_SHLIBPATH # AC_LTDL_SYSSEARCHPATH # --------------------- AC_DEFUN([AC_LTDL_SYSSEARCHPATH], [AC_REQUIRE([AC_LIBTOOL_SYS_DYNAMIC_LINKER]) AC_CACHE_CHECK([for the default library search path], [libltdl_cv_sys_search_path], [libltdl_cv_sys_search_path="$sys_lib_dlsearch_path_spec"]) if test -n "$libltdl_cv_sys_search_path"; then sys_search_path= for dir in $libltdl_cv_sys_search_path; do if test -z "$sys_search_path"; then sys_search_path="$dir" else sys_search_path="$sys_search_path$PATH_SEPARATOR$dir" fi done AC_DEFINE_UNQUOTED([LTDL_SYSSEARCHPATH], ["$sys_search_path"], [Define to the system default library search path.]) fi ])# AC_LTDL_SYSSEARCHPATH # AC_LTDL_OBJDIR # -------------- AC_DEFUN([AC_LTDL_OBJDIR], [AC_CACHE_CHECK([for objdir], [libltdl_cv_objdir], [libltdl_cv_objdir="$objdir" if test -n "$objdir"; then : else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then libltdl_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. libltdl_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi ]) AC_DEFINE_UNQUOTED([LTDL_OBJDIR], ["$libltdl_cv_objdir/"], [Define to the sub-directory in which libtool stores uninstalled libraries.]) ])# AC_LTDL_OBJDIR # AC_LTDL_DLPREOPEN # ----------------- AC_DEFUN([AC_LTDL_DLPREOPEN], [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE]) AC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen], [libltdl_cv_preloaded_symbols], [if test -n "$lt_cv_sys_global_symbol_pipe"; then libltdl_cv_preloaded_symbols=yes else libltdl_cv_preloaded_symbols=no fi ]) if test x"$libltdl_cv_preloaded_symbols" = xyes; then AC_DEFINE([HAVE_PRELOADED_SYMBOLS], [1], [Define if libtool can extract symbol lists from object files.]) fi ])# AC_LTDL_DLPREOPEN # AC_LTDL_DLLIB # ------------- AC_DEFUN([AC_LTDL_DLLIB], [LIBADD_DL= AC_SUBST(LIBADD_DL) AC_LANG_PUSH([C]) AC_CHECK_FUNC([shl_load], [AC_DEFINE([HAVE_SHL_LOAD], [1], [Define if you have the shl_load function.])], [AC_CHECK_LIB([dld], [shl_load], [AC_DEFINE([HAVE_SHL_LOAD], [1], [Define if you have the shl_load function.]) LIBADD_DL="$LIBADD_DL -ldld"], [AC_CHECK_LIB([dl], [dlopen], [AC_DEFINE([HAVE_LIBDL], [1], [Define if you have the libdl library or equivalent.]) LIBADD_DL="-ldl" libltdl_cv_lib_dl_dlopen="yes"], [AC_TRY_LINK([#if HAVE_DLFCN_H # include #endif ], [dlopen(0, 0);], [AC_DEFINE([HAVE_LIBDL], [1], [Define if you have the libdl library or equivalent.]) libltdl_cv_func_dlopen="yes"], [AC_CHECK_LIB([svld], [dlopen], [AC_DEFINE([HAVE_LIBDL], [1], [Define if you have the libdl library or equivalent.]) LIBADD_DL="-lsvld" libltdl_cv_func_dlopen="yes"], [AC_CHECK_LIB([dld], [dld_link], [AC_DEFINE([HAVE_DLD], [1], [Define if you have the GNU dld library.]) LIBADD_DL="$LIBADD_DL -ldld"], [AC_CHECK_FUNC([_dyld_func_lookup], [AC_DEFINE([HAVE_DYLD], [1], [Define if you have the _dyld_func_lookup function.])]) ]) ]) ]) ]) ]) ]) if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes then lt_save_LIBS="$LIBS" LIBS="$LIBS $LIBADD_DL" AC_CHECK_FUNCS([dlerror]) LIBS="$lt_save_LIBS" fi AC_LANG_POP ])# AC_LTDL_DLLIB # AC_LTDL_SYMBOL_USCORE # --------------------- # does the compiler prefix global symbols with an underscore? AC_DEFUN([AC_LTDL_SYMBOL_USCORE], [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE]) AC_CACHE_CHECK([for _ prefix in compiled symbols], [ac_cv_sys_symbol_underscore], [ac_cv_sys_symbol_underscore=no cat > conftest.$ac_ext < $ac_nlist) && test -s "$ac_nlist"; then # See whether the symbols have a leading underscore. if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then ac_cv_sys_symbol_underscore=yes else if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then : else echo "configure: cannot find nm_test_func in $ac_nlist" >&AC_FD_CC fi fi else echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC fi else echo "configure: failed program was:" >&AC_FD_CC cat conftest.c >&AC_FD_CC fi rm -rf conftest* ]) ])# AC_LTDL_SYMBOL_USCORE # AC_LTDL_DLSYM_USCORE # -------------------- AC_DEFUN([AC_LTDL_DLSYM_USCORE], [AC_REQUIRE([AC_LTDL_SYMBOL_USCORE]) if test x"$ac_cv_sys_symbol_underscore" = xyes; then if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes ; then AC_CACHE_CHECK([whether we have to add an underscore for dlsym], [libltdl_cv_need_uscore], [libltdl_cv_need_uscore=unknown save_LIBS="$LIBS" LIBS="$LIBS $LIBADD_DL" _LT_AC_TRY_DLOPEN_SELF( [libltdl_cv_need_uscore=no], [libltdl_cv_need_uscore=yes], [], [libltdl_cv_need_uscore=cross]) LIBS="$save_LIBS" ]) fi fi if test x"$libltdl_cv_need_uscore" = xyes; then AC_DEFINE([NEED_USCORE], [1], [Define if dlsym() requires a leading underscore in symbol names.]) fi ])# AC_LTDL_DLSYM_USCORE # AC_LTDL_FUNC_ARGZ # ----------------- AC_DEFUN([AC_LTDL_FUNC_ARGZ], [AC_CHECK_HEADERS([argz.h]) AC_CHECK_TYPES([error_t], [], [AC_DEFINE([error_t], [int], [Define to a type to use for `error_t' if it is not otherwise available.])], [#if HAVE_ARGZ_H # include #endif]) AC_CHECK_FUNCS([argz_append argz_create_sep argz_insert argz_next argz_stringify]) ])# AC_LTDL_FUNC_ARGZ elektra-0.7.1/libltdl/aclocal.m40000644000076400001440000007551511365511164013375 00000000000000# generated automatically by aclocal 1.9.6 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. # Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # 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. AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"]) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.9.6])]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 7 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE]) AC_SUBST([$1_FALSE]) if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH]) ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. #serial 3 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 12 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.58])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 # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AM_PROG_INSTALL_SH AM_PROG_INSTALL_STRIP AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl ]) ]) # 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_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $1 | $1:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"$am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_MKDIR_P # --------------- # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. # # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories # created by `make install' are always world readable, even if the # installer happens to have an overly restrictive umask (e.g. 077). # This was a mistake. There are at least two reasons why we must not # use `-m 0755': # - it causes special bits like SGID to be ignored, # - it may be too restrictive (some setups expect 775 directories). # # Do not use -m 0755 and let people choose whatever they expect by # setting umask. # # We cannot accept any implementation of `mkdir' that recognizes `-p'. # Some implementations (such as Solaris 8's) are not thread-safe: if a # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' # concurrently, both version can detect that a/ is missing, but only # one can create it and the other will error out. Consequently we # restrict ourselves to GNU make (using the --version option ensures # this.) AC_DEFUN([AM_PROG_MKDIR_P], [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # We used to keeping the `.' as first argument, in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However this is wrong # for two reasons: # 1. if the package is installed by a user who cannot write `.' # make install will fail, # 2. the above comment should most certainly read # $(mkdir_p) $(DESTDIR)$(somedir) # so it does not work when $(somedir) is undefined and # $(DESTDIR) is not. # To support the latter case, we have to write # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), # so the `.' trick is pointless. mkdir_p='mkdir -p --' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi AC_SUBST([mkdir_p])]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([acinclude.m4]) elektra-0.7.1/libltdl/config-h.in0000644000076400001440000001226511365511510013543 00000000000000/* config-h.in. Generated from configure.ac by autoheader. */ /* Define to 1 if you have the `argz_append' function. */ #undef HAVE_ARGZ_APPEND /* Define to 1 if you have the `argz_create_sep' function. */ #undef HAVE_ARGZ_CREATE_SEP /* Define to 1 if you have the header file. */ #undef HAVE_ARGZ_H /* Define to 1 if you have the `argz_insert' function. */ #undef HAVE_ARGZ_INSERT /* Define to 1 if you have the `argz_next' function. */ #undef HAVE_ARGZ_NEXT /* Define to 1 if you have the `argz_stringify' function. */ #undef HAVE_ARGZ_STRINGIFY /* Define to 1 if you have the header file. */ #undef HAVE_ASSERT_H /* Define to 1 if you have the `bcopy' function. */ #undef HAVE_BCOPY /* Define to 1 if you have the `closedir' function. */ #undef HAVE_CLOSEDIR /* Define to 1 if you have the header file. */ #undef HAVE_CTYPE_H /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_DIRENT_H /* Define if you have the GNU dld library. */ #undef HAVE_DLD /* Define to 1 if you have the header file. */ #undef HAVE_DLD_H /* Define to 1 if you have the `dlerror' function. */ #undef HAVE_DLERROR /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the header file. */ #undef HAVE_DL_H /* Define if you have the _dyld_func_lookup function. */ #undef HAVE_DYLD /* Define to 1 if you have the header file. */ #undef HAVE_ERRNO_H /* Define to 1 if the system has the type `error_t'. */ #undef HAVE_ERROR_T /* Define to 1 if you have the `index' function. */ #undef HAVE_INDEX /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define if you have the libdl library or equivalent. */ #undef HAVE_LIBDL /* Define to 1 if you have the header file. */ #undef HAVE_MACH_O_DYLD_H /* Define to 1 if you have the header file. */ #undef HAVE_MALLOC_H /* Define to 1 if you have the `memcpy' function. */ #undef HAVE_MEMCPY /* Define to 1 if you have the `memmove' function. */ #undef HAVE_MEMMOVE /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_NDIR_H /* Define to 1 if you have the `opendir' function. */ #undef HAVE_OPENDIR /* Define if libtool can extract symbol lists from object files. */ #undef HAVE_PRELOADED_SYMBOLS /* Define to 1 if you have the `readdir' function. */ #undef HAVE_READDIR /* Define to 1 if you have the `rindex' function. */ #undef HAVE_RINDEX /* Define if you have the shl_load function. */ #undef HAVE_SHL_LOAD /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDIO_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `strchr' function. */ #undef HAVE_STRCHR /* Define to 1 if you have the `strcmp' function. */ #undef HAVE_STRCMP /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the `strrchr' function. */ #undef HAVE_STRRCHR /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_SYS_DIR_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_DL_H /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_SYS_NDIR_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define if the OS needs help to load dependent libraries for dlopen(). */ #undef LTDL_DLOPEN_DEPLIBS /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LTDL_OBJDIR /* Define to the name of the environment variable that determines the dynamic library search path. */ #undef LTDL_SHLIBPATH_VAR /* Define to the extension used for shared libraries, say, ".so". */ #undef LTDL_SHLIB_EXT /* Define to the system default library search path. */ #undef LTDL_SYSSEARCHPATH /* Define if dlsym() requires a leading underscore in symbol names. */ #undef NEED_USCORE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to a type to use for `error_t' if it is not otherwise available. */ #undef error_t /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus #undef inline #endif elektra-0.7.1/libltdl/config.guess0000755000076400001440000012753411312075134014046 00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. timestamp='2008-01-23' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[456]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep __LP64__ >/dev/null then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) case ${UNAME_MACHINE} in pc98) echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:[3456]*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; EM64T | authenticamd) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-gnu else echo ${UNAME_MACHINE}-unknown-linux-gnueabi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips #undef mipsel #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mipsel #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips64 #undef mips64el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mips64el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips64 #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. # Set LC_ALL=C to ensure ld outputs messages in English. ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" exit ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) LIBC=gnu #else LIBC=gnuaout #endif #endif #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^LIBC/{ s: ::g p }'`" test x"${LIBC}" != x && { echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit } test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i386. echo i386-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: elektra-0.7.1/libltdl/config.sub0000755000076400001440000010115311312075134013476 00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. timestamp='2008-01-16' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA # 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray) os= basic_machine=$1 ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64vr | mips64vrel \ | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | mt \ | msp430 \ | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | score \ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64vr-* | mips64vrel-* \ | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-*) ;; # Recognize the 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 ;; 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 ;; c90) basic_machine=c90-cray os=-unicos ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; 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 ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; 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 ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; 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) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; tile*) basic_machine=tile-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 ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: elektra-0.7.1/libltdl/configure0000755000076400001440000274671711365511167013462 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61 for libltdl 1.2. # # Report bugs to . # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) as_nl=' ' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH if test "x$CONFIG_SHELL" = x; then if (eval ":") 2>/dev/null; then as_have_required=yes else as_have_required=no fi if test $as_have_required = yes && (eval ": (as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=\$LINENO as_lineno_2=\$LINENO test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } ") 2> /dev/null; then : else as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. case $as_dir in /*) for as_base in sh bash ksh sh5; do as_candidate_shells="$as_candidate_shells $as_dir/$as_base" done;; esac done IFS=$as_save_IFS for as_shell in $as_candidate_shells $SHELL; do # Try only shells that exist, to save several forks. if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { ("$as_shell") 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : _ASEOF }; then CONFIG_SHELL=$as_shell as_have_required=yes if { "$as_shell" 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi : (as_func_return () { (exit $1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = "$1" ); then : else exitcode=1 echo positional parameters were not saved. fi test $exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } _ASEOF }; then break fi fi done if test "x$CONFIG_SHELL" != x; then for as_var in BASH_ENV ENV do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test $as_have_required = no; then echo This script requires a shell more modern than all the echo shells that I found on your system. Please install a echo modern shell, or manually run the script under such a echo shell if you do have one. { (exit 1); exit 1; } fi fi fi (eval "as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0") || { echo No shell found that supports shell functions. echo Please tell autoconf@gnu.org about your system, echo including any error possibly output before this echo message } as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` ;; esac echo=${ECHO-echo} if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "$0" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null 2>&1 && unset CDPATH if test -z "$ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if (echo_test_string=`eval $cmd`) 2>/dev/null && echo_test_string=`eval $cmd` && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL $0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL $0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "$0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" fi tagnames=${tagnames+${tagnames},}CXX tagnames=${tagnames+${tagnames},}F77 exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='libltdl' PACKAGE_TARNAME='libltdl' PACKAGE_VERSION='1.2' PACKAGE_STRING='libltdl 1.2' PACKAGE_BUGREPORT='bug-libtool@gnu.org' ac_unique_file="ltdl.c" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir localstatedir includedir oldincludedir docdir infodir htmldir dvidir pdfdir psdir libdir localedir mandir DEFS ECHO_C ECHO_N ECHO_T LIBS build_alias host_alias target_alias INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE build build_cpu build_vendor build_os host host_cpu host_vendor host_os SED GREP EGREP LN_S ECHO AR RANLIB DSYMUTIL NMEDIT DLLTOOL AS OBJDUMP CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL LIBTOOL_DEPS INSTALL_LTDL_TRUE INSTALL_LTDL_FALSE CONVENIENCE_LTDL_TRUE CONVENIENCE_LTDL_FALSE LIBADD_DL LIBOBJS LTLIBOBJS' ac_subst_files='' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP CXX CXXFLAGS CCC CXXCPP F77 FFLAGS' # Initialize some variables set by options. ac_init_help= ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute directory names. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || { echo "$as_me: error: Working directory cannot be determined" >&2 { (exit 1); exit 1; }; } test "X$ac_ls_di" = "X$ac_pwd_ls_di" || { echo "$as_me: error: pwd does not report name of working directory" >&2 { (exit 1); exit 1; }; } # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$0" || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures libltdl 1.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/libltdl] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of libltdl 1.2:";; esac cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --enable-ltdl-install install libltdl Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-pic try to use only PIC/non-PIC objects [default=use both] --with-tags[=TAGS] include additional configurations [automatic] Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor F77 Fortran 77 compiler command FFLAGS Fortran 77 compiler flags Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF libltdl configure 1.2 generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by libltdl $as_me 1.2, which was generated by GNU Autoconf 2.61. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo cat confdefs.h echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -n "$CONFIG_SITE"; then set x "$CONFIG_SITE" elif test "x$prefix" != xNONE; then set x "$prefix/share/config.site" "$prefix/etc/config.site" else set x "$ac_default_prefix/share/config.site" \ "$ac_default_prefix/etc/config.site" fi shift for ac_site_file do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ## ------------------------------- ## ## Libltdl specific configuration. ## ## ------------------------------- ## ac_aux_dir= for ac_dir in . "$srcdir"/.; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in . \"$srcdir\"/." >&5 echo "$as_me: error: cannot find install-sh or install.sh in . \"$srcdir\"/." >&2;} { (exit 1); exit 1; }; } fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. if test -z "$enable_ltdl_install$enable_ltdl_convenience"; then if test -f ${srcdir}/ltmain.sh; then # if libltdl is libtoolized, it is assumed to be stand-alone and # installed unless the command line overrides it (tested above) enable_ltdl_install=yes else { echo "$as_me:$LINENO: WARNING: *** The top-level configure must select either" >&5 echo "$as_me: WARNING: *** The top-level configure must select either" >&2;} { echo "$as_me:$LINENO: WARNING: *** A\"\"C_LIBLTDL_INSTALLABLE or A\"\"C_LIBLTDL_CONVENIENCE." >&5 echo "$as_me: WARNING: *** A\"\"C_LIBLTDL_INSTALLABLE or A\"\"C_LIBLTDL_CONVENIENCE." >&2;} { { echo "$as_me:$LINENO: error: *** Maybe you want to --enable-ltdl-install?" >&5 echo "$as_me: error: *** Maybe you want to --enable-ltdl-install?" >&2;} { (exit 1); exit 1; }; } fi fi ## ------------------------ ## ## Automake Initialisation. ## ## ------------------------ ## am__api_version="1.9" # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. { echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done IFS=$as_save_IFS fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { echo "$as_me:$LINENO: checking whether build environment is sane" >&5 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftest.file ) then # Ok. : else { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. echo might interpret backslashes. # By default was `s,x,x', remove it if useless. cat <<\_ACEOF >conftest.sed s/[\\$]/&&/g;s/;s,x,x,$// _ACEOF program_transform_name=`echo $program_transform_name | sed -f conftest.sed` rm -f conftest.sed # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then # We used to keeping the `.' as first argument, in order to # allow $(mkdir_p) to be used without argument. As in # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. However this is wrong # for two reasons: # 1. if the package is installed by a user who cannot write `.' # make install will fail, # 2. the above comment should most certainly read # $(mkdir_p) $(DESTDIR)$(somedir) # so it does not work when $(somedir) is undefined and # $(DESTDIR) is not. # To support the latter case, we have to write # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir), # so the `.' trick is pointless. mkdir_p='mkdir -p --' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--version; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$AWK" && break done { echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } SET_MAKE= else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE=libltdl VERSION=1.2 # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} install_sh=${install_sh-"$am_aux_dir/install-sh"} # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' ac_config_headers="$ac_config_headers config.h:config-h.in" ## ------------------ ## ## C compiler checks. ## ## ------------------ ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO: checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # # List of possible output files, starting from the most likely. # The algorithm is not robust to junk in `.', hence go to wildcards (a.*) # only as a last resort. b.out is created by i960 compilers. ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' # # The IRIX 6 linker writes into existing files which may not be # executable, retaining their permissions. Remove them first so a # subsequent execution test works. ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { (ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link_default") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi { echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6; } if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { echo "$as_me:$LINENO: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6; } { echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext { echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT { echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6; } ;; xno) { echo "$as_me:$LINENO: result: unsupported" >&5 echo "${ECHO_T}unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi { echo "$as_me:$LINENO: result: $_am_result" >&5 echo "${ECHO_T}$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CC" am_compiler_list= { echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi { echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; } if test "${ac_cv_c_const+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset cs; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_const=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 echo "${ECHO_T}$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then cat >>confdefs.h <<\_ACEOF #define const _ACEOF fi { echo "$as_me:$LINENO: checking for inline" >&5 echo $ECHO_N "checking for inline... $ECHO_C" >&6; } if test "${ac_cv_c_inline+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo () {return 0; } $ac_kw foo_t foo () {return 0; } #endif _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_inline=$ac_kw else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_inline" != no && break done fi { echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 echo "${ECHO_T}$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; *) case $ac_cv_c_inline in no) ac_val=;; *) ac_val=$ac_cv_c_inline;; esac cat >>confdefs.h <<_ACEOF #ifndef __cplusplus #define inline $ac_val #endif _ACEOF ;; esac ## ----------------------- ## ## Libtool initialisation. ## ## ----------------------- ## # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi # Check whether --enable-static was given. if test "${enable_static+set}" = set; then enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=yes fi # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} { (exit 1); exit 1; }; } { echo "$as_me:$LINENO: checking build system type" >&5 echo $ECHO_N "checking build system type... $ECHO_C" >&6; } if test "${ac_cv_build+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: result: $ac_cv_build" >&5 echo "${ECHO_T}$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 echo "$as_me: error: invalid value of canonical build" >&2;} { (exit 1); exit 1; }; };; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { echo "$as_me:$LINENO: checking host system type" >&5 echo $ECHO_N "checking host system type... $ECHO_C" >&6; } if test "${ac_cv_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} { (exit 1); exit 1; }; } fi fi { echo "$as_me:$LINENO: result: $ac_cv_host" >&5 echo "${ECHO_T}$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 echo "$as_me: error: invalid value of canonical host" >&2;} { (exit 1); exit 1; }; };; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac { echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6; } if test "${lt_cv_path_SED+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$lt_ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$lt_ac_prog$ac_exec_ext"; }; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done fi SED=$lt_cv_path_SED { echo "$as_me:$LINENO: result: $SED" >&5 echo "${ECHO_T}$SED" >&6; } { echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } if test "${ac_cv_path_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Extract the first word of "grep ggrep" to use in msg output if test -z "$GREP"; then set dummy grep ggrep; ac_prog_name=$2 if test "${ac_cv_path_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS fi GREP="$ac_cv_path_GREP" if test -z "$GREP"; then { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_GREP=$GREP fi fi { echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 echo "${ECHO_T}$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else # Extract the first word of "egrep" to use in msg output if test -z "$EGREP"; then set dummy egrep; ac_prog_name=$2 if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break ac_count=`expr $ac_count + 1` if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS fi EGREP="$ac_cv_path_EGREP" if test -z "$EGREP"; then { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_EGREP=$EGREP fi fi fi { echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { echo "$as_me:$LINENO: checking for GNU ld" >&5 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } else { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } fi if test "${lt_cv_path_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 echo "${ECHO_T}$LD" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } { echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6; } if test "${lt_cv_ld_reload_flag+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_ld_reload_flag='-r' fi { echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac { echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6; } if test "${lt_cv_path_NM+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi fi { echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 echo "${ECHO_T}$lt_cv_path_NM" >&6; } NM="$lt_cv_path_NM" { echo "$as_me:$LINENO: checking whether ln -s works" >&5 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else { echo "$as_me:$LINENO: result: no, using $LN_S" >&5 echo "${ECHO_T}no, using $LN_S" >&6; } fi { echo "$as_me:$LINENO: checking how to recognize dependent libraries" >&5 echo $ECHO_N "checking how to recognize dependent libraries... $ECHO_C" >&6; } if test "${lt_cv_deplibs_check_method+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in 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 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd* | 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=unknown ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac fi { echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6; } file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line 4516 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" { echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6; } if test "${lt_cv_cc_needs_belf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_cv_cc_needs_belf=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) 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* ;; *-*-cygwin* | *-*-mingw* | *-*-pw32*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_DLLTOOL+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { echo "$as_me:$LINENO: result: $DLLTOOL" >&5 echo "${ECHO_T}$DLLTOOL" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5 echo "${ECHO_T}$ac_ct_DLLTOOL" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_AS+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AS"; then ac_cv_prog_AS="$AS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AS="${ac_tool_prefix}as" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AS=$ac_cv_prog_AS if test -n "$AS"; then { echo "$as_me:$LINENO: result: $AS" >&5 echo "${ECHO_T}$AS" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_AS"; then ac_ct_AS=$AS # Extract the first word of "as", so it can be a program name with args. set dummy as; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_AS+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_AS"; then ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AS="as" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AS=$ac_cv_prog_ac_ct_AS if test -n "$ac_ct_AS"; then { echo "$as_me:$LINENO: result: $ac_ct_AS" >&5 echo "${ECHO_T}$ac_ct_AS" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_AS" = x; then AS="false" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac AS=$ac_ct_AS fi else AS="$ac_cv_prog_AS" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_OBJDUMP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { echo "$as_me:$LINENO: result: $OBJDUMP" >&5 echo "${ECHO_T}$OBJDUMP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OBJDUMP="objdump" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5 echo "${ECHO_T}$ac_ct_OBJDUMP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi ;; esac need_locks="$enable_libtool_lock" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ---------------------------------- ## ## Report this to bug-libtool@gnu.org ## ## ---------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { echo "$as_me:$LINENO: result: $CXX" >&5 echo "${ECHO_T}$CXX" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 echo "${ECHO_T}$ac_ct_CXX" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. echo "$as_me:$LINENO: checking for C++ compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; } if test "${ac_cv_cxx_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; } GXX=`test $ac_compiler_gnu = yes && echo yes` ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cxx_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CXXFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu depcc="$CXX" am_compiler_list= { echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6; } if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6; } if test -z "$CXXCPP"; then if test "${ac_cv_prog_CXXCPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { echo "$as_me:$LINENO: result: $CXXCPP" >&5 echo "${ECHO_T}$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu fi ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu if test -n "$ac_tool_prefix"; then for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$F77"; then ac_cv_prog_F77="$F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_F77="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi F77=$ac_cv_prog_F77 if test -n "$F77"; then { echo "$as_me:$LINENO: result: $F77" >&5 echo "${ECHO_T}$F77" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$F77" && break done fi if test -z "$F77"; then ac_ct_F77=$F77 for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_F77"; then ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_F77="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_F77=$ac_cv_prog_ac_ct_F77 if test -n "$ac_ct_F77"; then { echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 echo "${ECHO_T}$ac_ct_F77" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$ac_ct_F77" && break done if test "x$ac_ct_F77" = x; then F77="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac F77=$ac_ct_F77 fi fi # Provide some information about the compiler. echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } rm -f a.out # If we don't use `.F' as extension, the preprocessor is not run on the # input file. (Note that this only needs to work for GNU compilers.) ac_save_ext=$ac_ext ac_ext=F { echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6; } if test "${ac_cv_f77_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF program main #ifndef __GNUC__ choke me #endif end _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_f77_compiler_gnu=$ac_compiler_gnu fi { echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6; } ac_ext=$ac_save_ext ac_test_FFLAGS=${FFLAGS+set} ac_save_FFLAGS=$FFLAGS FFLAGS= { echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_f77_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else FFLAGS=-g cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_f77_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_f77_g=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 echo "${ECHO_T}$ac_cv_prog_f77_g" >&6; } if test "$ac_test_FFLAGS" = set; then FFLAGS=$ac_save_FFLAGS elif test $ac_cv_prog_f77_g = yes; then if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-g -O2" else FFLAGS="-g" fi else if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-O2" else FFLAGS= fi fi G77=`test $ac_compiler_gnu = yes && echo yes` ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! # find the maximum length of command line arguments { echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6; } if test "${lt_cv_sys_max_cmd_len+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && new_result=`expr "X$teststring" : ".*" 2>&1` && lt_cv_sys_max_cmd_len=$new_result && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done teststring= # Add a significant safety factor because C++ compilers can tack on massive # amounts of additional arguments before passing them to the linker. # It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6; } else { echo "$as_me:$LINENO: result: none" >&5 echo "${ECHO_T}none" >&6; } fi # Check for command to grab the raw symbol name followed by C symbol from nm. { echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6; } if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32*) symcode='[ABCDGISTW]' ;; hpux*) # Its linker distinguishes data from code symbols if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; linux* | k*bsd*-gnu) if test "$host_cpu" = ia64; then symcode='[ABCDGIRSTW]' lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Now try to grab the symbols. nlist=conftest.nm if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if grep ' nm_test_var$' "$nlist" >/dev/null; then if grep ' nm_test_func$' "$nlist" >/dev/null; then cat < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else # define lt_ptr_t char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr_t address; } lt_preloaded_symbols[] = { EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { echo "$as_me:$LINENO: result: failed" >&5 echo "${ECHO_T}failed" >&6; } else { echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6; } fi { echo "$as_me:$LINENO: checking for objdir" >&5 echo $ECHO_N "checking for objdir... $ECHO_C" >&6; } if test "${lt_cv_objdir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 echo "${ECHO_T}$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e 1s/^X//' sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Constants: rm="rm -f" # Global variables: default_ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" ofile="$default_ofile" with_gnu_ld="$lt_cv_prog_gnu_ld" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="${ac_tool_prefix}ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { echo "$as_me:$LINENO: result: $AR" >&5 echo "${ECHO_T}$AR" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AR="ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 echo "${ECHO_T}$ac_ct_AR" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi else AR="$ac_cv_prog_AR" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { echo "$as_me:$LINENO: result: $RANLIB" >&5 echo "${ECHO_T}$RANLIB" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 echo "${ECHO_T}$ac_ct_RANLIB" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" test -z "$MAGIC_CMD" && MAGIC_CMD=file test -z "$NM" && NM=nm test -z "$SED" && SED=sed test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$RANLIB" && RANLIB=: test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 echo "${ECHO_T}$MAGIC_CMD" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { echo "$as_me:$LINENO: checking for file" >&5 echo $ECHO_N "checking for file... $ECHO_C" >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 echo "${ECHO_T}$MAGIC_CMD" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_DSYMUTIL+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { echo "$as_me:$LINENO: result: $DSYMUTIL" >&5 echo "${ECHO_T}$DSYMUTIL" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { echo "$as_me:$LINENO: result: $ac_ct_DSYMUTIL" >&5 echo "${ECHO_T}$ac_ct_DSYMUTIL" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_NMEDIT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { echo "$as_me:$LINENO: result: $NMEDIT" >&5 echo "${ECHO_T}$NMEDIT" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_NMEDIT="nmedit" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { echo "$as_me:$LINENO: result: $ac_ct_NMEDIT" >&5 echo "${ECHO_T}$ac_ct_NMEDIT" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi { echo "$as_me:$LINENO: checking for -single_module linker flag" >&5 echo $ECHO_N "checking for -single_module linker flag... $ECHO_C" >&6; } if test "${lt_cv_apple_cc_single_mod+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. echo "int foo(void){return 1;}" > conftest.c $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib ${wl}-single_module conftest.c if test -f libconftest.dylib; then lt_cv_apple_cc_single_mod=yes rm -rf libconftest.dylib* fi rm conftest.c fi fi { echo "$as_me:$LINENO: result: $lt_cv_apple_cc_single_mod" >&5 echo "${ECHO_T}$lt_cv_apple_cc_single_mod" >&6; } { echo "$as_me:$LINENO: checking for -exported_symbols_list linker flag" >&5 echo $ECHO_N "checking for -exported_symbols_list linker flag... $ECHO_C" >&6; } if test "${lt_cv_ld_exported_symbols_list+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_cv_ld_exported_symbols_list=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { echo "$as_me:$LINENO: result: $lt_cv_ld_exported_symbols_list" >&5 echo "${ECHO_T}$lt_cv_ld_exported_symbols_list" >&6; } case $host_os in rhapsody* | darwin1.[0123]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[012]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}" fi if test "$DSYMUTIL" != ":"; then _lt_dsymutil="~$DSYMUTIL \$lib || :" else _lt_dsymutil= fi ;; esac enable_dlopen=no enable_win32_dll=yes # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Check whether --with-pic was given. if test "${with_pic+set}" = set; then withval=$with_pic; pic_mode="$withval" else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # Use C for the default configuration in the libtool script tagname= lt_save_CC="$CC" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag=' -fno-builtin' { echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:7868: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:7872: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= { echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; *) lt_prog_compiler_pic='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic='-qnocommon' lt_prog_compiler_wl='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; esac ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 echo "${ECHO_T}$lt_prog_compiler_pic" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_pic_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:8158: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:8162: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_static_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $rm -r conftest* LDFLAGS="$save_LDFLAGS" fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_c_o+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:8262: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:8266: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6; } if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } runpath_var= allow_undefined_flag= enable_shared_with_static_runtimes=no archive_cmds= archive_expsym_cmds= old_archive_From_new_cmds= old_archive_from_expsyms_cmds= export_dynamic_flag_spec= whole_archive_flag_spec= thread_safe_flag_spec= hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no hardcode_shlibpath_var=unsupported link_all_deplibs=unknown hardcode_automatic=no module_cmds= module_expsym_cmds= always_export_symbols=no export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; *) tmp_sharedflag='-shared' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi link_all_deplibs=no else ld_shlibs=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_libdir_separator=':' link_all_deplibs=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # see comment about different semantics on the GNU ld section ld_shlibs=no ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported whole_archive_flag_spec='' link_all_deplibs=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs=no ;; esac fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; freebsd1*) ld_shlibs=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld='-rpath $libdir' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: link_all_deplibs=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac fi { echo "$as_me:$LINENO: result: $ld_shlibs" >&5 echo "${ECHO_T}$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc=no else archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 echo "${ECHO_T}$archive_cmds_need_lc" >&6; } ;; esac fi ;; esac { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'` else lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` sys_lib_search_path_spec=`echo $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; 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 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" fi sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" fi sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || \ test -n "$runpath_var" || \ test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { echo "$as_me:$LINENO: result: $hardcode_action" >&5 echo "${ECHO_T}$hardcode_action" >&6; } if test "$hardcode_action" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi striplib= old_striplib= { echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi ;; *) { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } ;; esac fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) { echo "$as_me:$LINENO: checking for shl_load" >&5 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; } if test "${ac_cv_func_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define shl_load to an innocuous variant, in case declares shl_load. For example, HP-UX 11i declares gettimeofday. */ #define shl_load innocuous_shl_load /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shl_load (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef shl_load /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_shl_load || defined __stub___shl_load choke me #endif int main () { return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_func_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shl_load=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 echo "${ECHO_T}$ac_cv_func_shl_load" >&6; } if test $ac_cv_func_shl_load = yes; then lt_cv_dlopen="shl_load" else { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } if test $ac_cv_lib_dld_shl_load = yes; then lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else { echo "$as_me:$LINENO: checking for dlopen" >&5 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; } if test "${ac_cv_func_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define dlopen to an innocuous variant, in case declares dlopen. For example, HP-UX 11i declares gettimeofday. */ #define dlopen innocuous_dlopen /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dlopen (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef dlopen /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_dlopen || defined __stub___dlopen choke me #endif int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_func_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 echo "${ECHO_T}$ac_cv_func_dlopen" >&6; } if test $ac_cv_func_dlopen = yes; then lt_cv_dlopen="dlopen" else { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; } if test "${ac_cv_lib_svld_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_svld_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6; } if test $ac_cv_lib_svld_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6; } if test "${ac_cv_lib_dld_dld_link+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_dld_link=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; } if test $ac_cv_lib_dld_dld_link = yes; then lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6; } if test "${lt_cv_dlopen_self+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 echo "${ECHO_T}$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6; } if test "${lt_cv_dlopen_self_static+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi # Report which library types will actually be built { echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $can_build_shared" >&5 echo "${ECHO_T}$can_build_shared" >&6; } { echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { echo "$as_me:$LINENO: result: $enable_shared" >&5 echo "${ECHO_T}$enable_shared" >&6; } { echo "$as_me:$LINENO: checking whether to build static libraries" >&5 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { echo "$as_me:$LINENO: result: $enable_static" >&5 echo "${ECHO_T}$enable_static" >&6; } # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler \ CC \ LD \ lt_prog_compiler_wl \ lt_prog_compiler_pic \ lt_prog_compiler_static \ lt_prog_compiler_no_builtin_flag \ export_dynamic_flag_spec \ thread_safe_flag_spec \ whole_archive_flag_spec \ enable_shared_with_static_runtimes \ old_archive_cmds \ old_archive_from_new_cmds \ predep_objects \ postdep_objects \ predeps \ postdeps \ compiler_lib_search_path \ compiler_lib_search_dirs \ archive_cmds \ archive_expsym_cmds \ postinstall_cmds \ postuninstall_cmds \ old_archive_from_expsyms_cmds \ allow_undefined_flag \ no_undefined_flag \ export_symbols_cmds \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ hardcode_automatic \ module_cmds \ module_expsym_cmds \ lt_cv_prog_compiler_c_o \ fix_srcfile_path \ exclude_expsyms \ include_expsyms; do case $var in old_archive_cmds | \ old_archive_from_new_cmds | \ archive_cmds | \ archive_expsym_cmds | \ module_cmds | \ module_expsym_cmds | \ old_archive_from_expsyms_cmds | \ export_symbols_cmds | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="${ofile}T" trap "$rm \"$cfgfile\"; exit 1" 1 2 15 $rm -f "$cfgfile" { echo "$as_me:$LINENO: creating $ofile" >&5 echo "$as_me: creating $ofile" >&6;} cat <<__EOF__ >> "$cfgfile" #! $SHELL # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="$SED -e 1s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # The names of the tagged configurations supported by this script. available_tags= # ### BEGIN LIBTOOL CONFIG # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler # Is the compiler the GNU C compiler? with_gcc=$GCC # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_compiler_lib_search_dirs # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # ### END LIBTOOL CONFIG __EOF__ case $host_os in aix3*) cat <<\EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi EOF ;; esac # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || \ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" # Check whether --with-tags was given. if test "${with_tags+set}" = set; then withval=$with_tags; tagnames="$withval" fi if test -f "$ltmain" && test -n "$tagnames"; then if test ! -f "${ofile}"; then { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} fi if test -z "$LTCC"; then eval "`$SHELL ${ofile} --config | grep '^LTCC='`" if test -z "$LTCC"; then { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5 echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} else { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} fi fi if test -z "$LTCFLAGS"; then eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for tagname in $tagnames; do IFS="$lt_save_ifs" # Check whether tagname contains only valid characters case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in "") ;; *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5 echo "$as_me: error: invalid tag name: $tagname" >&2;} { (exit 1); exit 1; }; } ;; esac if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null then { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5 echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} { (exit 1); exit 1; }; } fi # Update the list of available tags. if test -n "$tagname"; then echo appending configuration tag \"$tagname\" to $ofile case $tagname in CXX) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu archive_cmds_need_lc_CXX=no allow_undefined_flag_CXX= always_export_symbols_CXX=no archive_expsym_cmds_CXX= export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_libdir_flag_spec_CXX= hardcode_libdir_flag_spec_ld_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_shlibpath_var_CXX=unsupported hardcode_automatic_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no # Dependencies to place before and after the object being linked: predep_objects_CXX= postdep_objects_CXX= predeps_CXX= postdeps_CXX= compiler_lib_search_path_CXX= compiler_lib_search_dirs_CXX= # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o objext_CXX=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC compiler_CXX=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # We don't want -fno-exception wen compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { echo "$as_me:$LINENO: checking for GNU ld" >&5 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } else { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } fi if test "${lt_cv_path_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 echo "${ECHO_T}$LD" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } { echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_CXX= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } ld_shlibs_CXX=yes case $host_os in aix3*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_CXX='' hardcode_direct_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes if test "$GXX" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_CXX=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_CXX=yes hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_libdir_separator_CXX= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_CXX=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_CXX='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_CXX=' ${wl}-bernotok' allow_undefined_flag_CXX=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX='$convenience' archive_cmds_need_lc_CXX=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_CXX=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_CXX=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_CXX='-L$libdir' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=no enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_CXX=no fi ;; darwin* | rhapsody*) archive_cmds_need_lc_CXX=no hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported whole_archive_flag_spec_CXX='' link_all_deplibs_CXX=yes allow_undefined_flag_CXX="$_lt_dar_allow_undefined" if test "$GXX" = yes ; then output_verbose_link_cmd='echo' archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" if test "$lt_cv_apple_cc_single_mod" != "yes"; then archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_CXX=no ;; esac fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; freebsd[12]*) # C++ shared libraries reported to be fairly broken before switch to ELF ld_shlibs_CXX=no ;; freebsd-elf*) archive_cmds_need_lc_CXX=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes ;; gnu*) ;; hpux9*) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='${wl}-E' hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: case $host_cpu in hppa*64*|ia64*) ;; *) export_dynamic_flag_spec_CXX='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no ;; *) hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; interix[3-9]*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' fi fi link_all_deplibs_CXX=yes ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc*) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac archive_cmds_need_lc_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' hardcode_libdir_flag_spec_CXX='-R$libdir' whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; m88k*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; openbsd2*) # C++ shared libraries are fairly broken ld_shlibs_CXX=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' export_dynamic_flag_spec_CXX='${wl}-E' whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd='echo' else ld_shlibs_CXX=no fi ;; osf3*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # the KAI C++ compiler. old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) allow_undefined_flag_CXX=' -expect_unresolved \*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ $rm $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs_CXX=yes output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then no_undefined_flag_CXX=' ${wl}-z ${wl}defs' if $CC --version | grep -v '^2\.7' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" fi hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_CXX='${wl}-z,text' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. # So that behaviour is only enabled if SCOABSPATH is set to a # non-empty value in the environment. Most likely only useful for # creating official distributions of packages. # This is a hack until libtool officially supports absolute path # names for shared libraries. no_undefined_flag_CXX='${wl}-z,text' allow_undefined_flag_CXX='${wl}-z,nodefs' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes export_dynamic_flag_spec_CXX='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac { echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 echo "${ECHO_T}$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no GCC_CXX="$GXX" LD_CXX="$LD" ## 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... cat > conftest.$ac_ext <&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no # The `*' in the case matches for architectures that use `case' in # $output_verbose_cmd can trigger glob expansion during the loop # eval without this substitution. output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` for p in `eval $output_verbose_link_cmd`; do case $p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" \ || test $p = "-R"; then prev=$p continue else prev= fi if test "$pre_test_object_deps_done" = no; then case $p in -L* | -R*) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$compiler_lib_search_path_CXX"; then compiler_lib_search_path_CXX="${prev}${p}" else compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$postdeps_CXX"; then postdeps_CXX="${prev}${p}" else postdeps_CXX="${postdeps_CXX} ${prev}${p}" fi fi ;; *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$predep_objects_CXX"; then predep_objects_CXX="$p" else predep_objects_CXX="$predep_objects_CXX $p" fi else if test -z "$postdep_objects_CXX"; then postdep_objects_CXX="$p" else postdep_objects_CXX="$postdep_objects_CXX $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling CXX test program" fi $rm -f confest.$objext compiler_lib_search_dirs_CXX= if test -n "$compiler_lib_search_path_CXX"; then compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi # PORTME: override above test on systems where it is broken case $host_os in interix[3-9]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. predep_objects_CXX= postdep_objects_CXX= postdeps_CXX= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; esac case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= { echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_CXX='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac else case $host_os in aix[4-9]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_CXX='-qnocommon' lt_prog_compiler_wl_CXX='-Wl,' ;; esac ;; dgux*) case $cc_basename in ec++*) lt_prog_compiler_pic_CXX='-KPIC' ;; ghcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then lt_prog_compiler_pic_CXX='+Z' fi ;; aCC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_CXX='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; icpc* | ecpc*) # Intel C++ lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fpic' lt_prog_compiler_static_CXX='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) lt_prog_compiler_wl_CXX='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 lt_prog_compiler_pic_CXX='-pic' ;; cxx*) # Digital/Compaq C++ lt_prog_compiler_wl_CXX='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x lt_prog_compiler_pic_CXX='-pic' lt_prog_compiler_static_CXX='-Bstatic' ;; lcc*) # Lucid lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' ;; esac ;; vxworks*) ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; esac fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:13144: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:13148: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_CXX=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_pic_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; esac else lt_prog_compiler_pic_CXX= lt_prog_compiler_can_build_shared_CXX=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= ;; *) lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" { echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_static_works_CXX=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_CXX=yes fi else lt_cv_prog_compiler_static_works_CXX=yes fi fi $rm -r conftest* LDFLAGS="$save_LDFLAGS" fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_CXX" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_static_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then : else lt_prog_compiler_static_CXX= fi { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_CXX=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:13248: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:13252: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6; } if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix[4-9]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) export_symbols_cmds_CXX="$ltdll_cmds" ;; cygwin* | mingw*) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' ;; linux* | k*bsd*-gnu) link_all_deplibs_CXX=no ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' { echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 echo "${ECHO_T}$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_CXX" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_CXX=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_CXX in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_CXX pic_flag=$lt_prog_compiler_pic_CXX compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_CXX allow_undefined_flag_CXX= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_CXX=no else archive_cmds_need_lc_CXX=yes fi allow_undefined_flag_CXX=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6; } ;; esac fi ;; esac { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; 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 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" fi sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" fi sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || \ test -n "$runpath_var_CXX" || \ test "X$hardcode_automatic_CXX" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_CXX" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no && test "$hardcode_minus_L_CXX" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_CXX=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_CXX=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_CXX=unsupported fi { echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 echo "${ECHO_T}$hardcode_action_CXX" >&6; } if test "$hardcode_action_CXX" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_CXX \ CC_CXX \ LD_CXX \ lt_prog_compiler_wl_CXX \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_static_CXX \ lt_prog_compiler_no_builtin_flag_CXX \ export_dynamic_flag_spec_CXX \ thread_safe_flag_spec_CXX \ whole_archive_flag_spec_CXX \ enable_shared_with_static_runtimes_CXX \ old_archive_cmds_CXX \ old_archive_from_new_cmds_CXX \ predep_objects_CXX \ postdep_objects_CXX \ predeps_CXX \ postdeps_CXX \ compiler_lib_search_path_CXX \ compiler_lib_search_dirs_CXX \ archive_cmds_CXX \ archive_expsym_cmds_CXX \ postinstall_cmds_CXX \ postuninstall_cmds_CXX \ old_archive_from_expsyms_cmds_CXX \ allow_undefined_flag_CXX \ no_undefined_flag_CXX \ export_symbols_cmds_CXX \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_flag_spec_ld_CXX \ hardcode_libdir_separator_CXX \ hardcode_automatic_CXX \ module_cmds_CXX \ module_expsym_cmds_CXX \ lt_cv_prog_compiler_c_o_CXX \ fix_srcfile_path_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX; do case $var in old_archive_cmds_CXX | \ old_archive_from_new_cmds_CXX | \ archive_cmds_CXX | \ archive_expsym_cmds_CXX | \ module_cmds_CXX | \ module_expsym_cmds_CXX | \ old_archive_from_expsyms_cmds_CXX | \ export_symbols_cmds_CXX | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_CXX # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_CXX # Is the compiler the GNU C compiler? with_gcc=$GCC_CXX # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_CXX # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_CXX # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_CXX old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_CXX archive_expsym_cmds=$lt_archive_expsym_cmds_CXX postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_CXX module_expsym_cmds=$lt_module_expsym_cmds_CXX # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_CXX # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_CXX # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_CXX # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_CXX # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_CXX # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_CXX # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_CXX # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_CXX # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_CXX # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_CXX # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_CXX # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_CXX # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_CXX # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_CXX # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ldcxx=$with_gnu_ld with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld else tagname="" fi ;; F77) if test -n "$F77" && test "X$F77" != "Xno"; then ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu archive_cmds_need_lc_F77=no allow_undefined_flag_F77= always_export_symbols_F77=no archive_expsym_cmds_F77= export_dynamic_flag_spec_F77= hardcode_direct_F77=no hardcode_libdir_flag_spec_F77= hardcode_libdir_flag_spec_ld_F77= hardcode_libdir_separator_F77= hardcode_minus_L_F77=no hardcode_automatic_F77=no module_cmds_F77= module_expsym_cmds_F77= link_all_deplibs_F77=unknown old_archive_cmds_F77=$old_archive_cmds no_undefined_flag_F77= whole_archive_flag_spec_F77= enable_shared_with_static_runtimes_F77=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o objext_F77=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${F77-"f77"} compiler=$CC compiler_F77=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` { echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $can_build_shared" >&5 echo "${ECHO_T}$can_build_shared" >&6; } { echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { echo "$as_me:$LINENO: result: $enable_shared" >&5 echo "${ECHO_T}$enable_shared" >&6; } { echo "$as_me:$LINENO: checking whether to build static libraries" >&5 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { echo "$as_me:$LINENO: result: $enable_static" >&5 echo "${ECHO_T}$enable_static" >&6; } GCC_F77="$G77" LD_F77="$LD" lt_prog_compiler_wl_F77= lt_prog_compiler_pic_F77= lt_prog_compiler_static_F77= { echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_static_F77='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_F77='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_F77='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_F77='-fno-common' ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared_F77=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_F77=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_F77='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_F77='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl_F77='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_F77='-Bstatic' else lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_F77='-qnocommon' lt_prog_compiler_wl_F77='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_F77='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl_F77='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_F77='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static_F77='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl_F77='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static_F77='-non_shared' ;; newsos6) lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-fpic' lt_prog_compiler_static_F77='-Bstatic' ;; ccc*) lt_prog_compiler_wl_F77='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' lt_prog_compiler_wl_F77='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' lt_prog_compiler_wl_F77='' ;; esac ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl_F77='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; rdos*) lt_prog_compiler_static_F77='-non_shared' ;; solaris*) lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl_F77='-Qoption ld ';; *) lt_prog_compiler_wl_F77='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl_F77='-Qoption ld ' lt_prog_compiler_pic_F77='-PIC' lt_prog_compiler_static_F77='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic_F77='-Kconform_pic' lt_prog_compiler_static_F77='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; unicos*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_can_build_shared_F77=no ;; uts4*) lt_prog_compiler_pic_F77='-pic' lt_prog_compiler_static_F77='-Bstatic' ;; *) lt_prog_compiler_can_build_shared_F77=no ;; esac fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_F77"; then { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_pic_works_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_pic_works_F77=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_F77" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:14846: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:14850: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_F77=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_F77" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_pic_works_F77" >&6; } if test x"$lt_cv_prog_compiler_pic_works_F77" = xyes; then case $lt_prog_compiler_pic_F77 in "" | " "*) ;; *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; esac else lt_prog_compiler_pic_F77= lt_prog_compiler_can_build_shared_F77=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_F77= ;; *) lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" { echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_static_works_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_static_works_F77=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_F77=yes fi else lt_cv_prog_compiler_static_works_F77=yes fi fi $rm -r conftest* LDFLAGS="$save_LDFLAGS" fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_F77" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_static_works_F77" >&6; } if test x"$lt_cv_prog_compiler_static_works_F77" = xyes; then : else lt_prog_compiler_static_F77= fi { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_F77=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:14950: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:14954: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_F77=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6; } if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } runpath_var= allow_undefined_flag_F77= enable_shared_with_static_runtimes_F77=no archive_cmds_F77= archive_expsym_cmds_F77= old_archive_From_new_cmds_F77= old_archive_from_expsyms_cmds_F77= export_dynamic_flag_spec_F77= whole_archive_flag_spec_F77= thread_safe_flag_spec_F77= hardcode_libdir_flag_spec_F77= hardcode_libdir_flag_spec_ld_F77= hardcode_libdir_separator_F77= hardcode_direct_F77=no hardcode_minus_L_F77=no hardcode_shlibpath_var_F77=unsupported link_all_deplibs_F77=unknown hardcode_automatic_F77=no module_cmds_F77= module_expsym_cmds_F77= always_export_symbols_F77=no export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms_F77= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms_F77='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs_F77=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_F77='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_F77= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs_F77=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs_F77=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_F77=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_F77=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_F77='-L$libdir' allow_undefined_flag_F77=unsupported always_export_symbols_F77=no enable_shared_with_static_runtimes_F77=yes export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_F77=no fi ;; interix[3-9]*) hardcode_direct_F77=no hardcode_shlibpath_var_F77=no hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' export_dynamic_flag_spec_F77='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec_F77='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; *) tmp_sharedflag='-shared' ;; esac archive_cmds_F77='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi link_all_deplibs_F77=no else ld_shlibs_F77=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs_F77=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs_F77=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; esac ;; sunos4*) archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; esac if test "$ld_shlibs_F77" = no; then runpath_var= hardcode_libdir_flag_spec_F77= export_dynamic_flag_spec_F77= whole_archive_flag_spec_F77= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag_F77=unsupported always_export_symbols_F77=yes archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L_F77=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_F77=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_F77='' hardcode_direct_F77=yes hardcode_libdir_separator_F77=':' link_all_deplibs_F77=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_F77=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_F77=yes hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_libdir_separator_F77= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_F77=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_F77='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_F77="-z nodefs" archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_F77=' ${wl}-bernotok' allow_undefined_flag_F77=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_F77='$convenience' archive_cmds_need_lc_F77=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes # see comment about different semantics on the GNU ld section ld_shlibs_F77=no ;; bsdi[45]*) export_dynamic_flag_spec_F77=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_F77=' ' allow_undefined_flag_F77=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds_F77='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path_F77='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_F77=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc_F77=no hardcode_direct_F77=no hardcode_automatic_F77=yes hardcode_shlibpath_var_F77=unsupported whole_archive_flag_spec_F77='' link_all_deplibs_F77=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds_F77="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_F77="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_F77="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds_F77="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_F77=no ;; esac fi ;; dgux*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_shlibpath_var_F77=no ;; freebsd1*) ld_shlibs_F77=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_minus_L_F77=yes hardcode_shlibpath_var_F77=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes export_dynamic_flag_spec_F77='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=yes export_dynamic_flag_spec_F77='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: case $host_cpu in hppa*64*|ia64*) hardcode_libdir_flag_spec_ld_F77='+b $libdir' hardcode_direct_F77=no hardcode_shlibpath_var_F77=no ;; *) hardcode_direct_F77=yes export_dynamic_flag_spec_F77='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' fi hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: link_all_deplibs_F77=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; newsos6) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_shlibpath_var_F77=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' export_dynamic_flag_spec_F77='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-R$libdir' ;; *) archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs_F77=no fi ;; os2*) hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes allow_undefined_flag_F77=unsupported archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag_F77=' -expect_unresolved \*' archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_F77=' -expect_unresolved \*' archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_F77='-rpath $libdir' fi hardcode_libdir_separator_F77=: ;; solaris*) no_undefined_flag_F77=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_shlibpath_var_F77=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec_F77='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs_F77=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_direct_F77=yes hardcode_minus_L_F77=yes hardcode_shlibpath_var_F77=no ;; sysv4) case $host_vendor in sni) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds_F77='$CC -r -o $output$reload_objs' hardcode_direct_F77=no ;; motorola) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_F77=no ;; sysv4.3*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no export_dynamic_flag_spec_F77='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs_F77=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_F77='${wl}-z,text' archive_cmds_need_lc_F77=no hardcode_shlibpath_var_F77=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_F77='${wl}-z,text' allow_undefined_flag_F77='${wl}-z,nodefs' archive_cmds_need_lc_F77=no hardcode_shlibpath_var_F77=no hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator_F77=':' link_all_deplibs_F77=yes export_dynamic_flag_spec_F77='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_shlibpath_var_F77=no ;; *) ld_shlibs_F77=no ;; esac fi { echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 echo "${ECHO_T}$ld_shlibs_F77" >&6; } test "$ld_shlibs_F77" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_F77" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_F77=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_F77 in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_F77 pic_flag=$lt_prog_compiler_pic_F77 compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_F77 allow_undefined_flag_F77= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_F77=no else archive_cmds_need_lc_F77=yes fi allow_undefined_flag_F77=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6; } ;; esac fi ;; esac { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; 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 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" fi sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" fi sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } hardcode_action_F77= if test -n "$hardcode_libdir_flag_spec_F77" || \ test -n "$runpath_var_F77" || \ test "X$hardcode_automatic_F77" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_F77" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && test "$hardcode_minus_L_F77" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_F77=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_F77=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_F77=unsupported fi { echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 echo "${ECHO_T}$hardcode_action_F77" >&6; } if test "$hardcode_action_F77" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_F77 \ CC_F77 \ LD_F77 \ lt_prog_compiler_wl_F77 \ lt_prog_compiler_pic_F77 \ lt_prog_compiler_static_F77 \ lt_prog_compiler_no_builtin_flag_F77 \ export_dynamic_flag_spec_F77 \ thread_safe_flag_spec_F77 \ whole_archive_flag_spec_F77 \ enable_shared_with_static_runtimes_F77 \ old_archive_cmds_F77 \ old_archive_from_new_cmds_F77 \ predep_objects_F77 \ postdep_objects_F77 \ predeps_F77 \ postdeps_F77 \ compiler_lib_search_path_F77 \ compiler_lib_search_dirs_F77 \ archive_cmds_F77 \ archive_expsym_cmds_F77 \ postinstall_cmds_F77 \ postuninstall_cmds_F77 \ old_archive_from_expsyms_cmds_F77 \ allow_undefined_flag_F77 \ no_undefined_flag_F77 \ export_symbols_cmds_F77 \ hardcode_libdir_flag_spec_F77 \ hardcode_libdir_flag_spec_ld_F77 \ hardcode_libdir_separator_F77 \ hardcode_automatic_F77 \ module_cmds_F77 \ module_expsym_cmds_F77 \ lt_cv_prog_compiler_c_o_F77 \ fix_srcfile_path_F77 \ exclude_expsyms_F77 \ include_expsyms_F77; do case $var in old_archive_cmds_F77 | \ old_archive_from_new_cmds_F77 | \ archive_cmds_F77 | \ archive_expsym_cmds_F77 | \ module_cmds_F77 | \ module_expsym_cmds_F77 | \ old_archive_from_expsyms_cmds_F77 | \ export_symbols_cmds_F77 | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_F77 # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_F77 # Is the compiler the GNU C compiler? with_gcc=$GCC_F77 # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_F77 # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_F77 # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_F77 pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_F77 # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77 # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_F77 old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_F77 archive_expsym_cmds=$lt_archive_expsym_cmds_F77 postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_F77 module_expsym_cmds=$lt_module_expsym_cmds_F77 # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_F77 # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_F77 # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_F77 # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_F77 # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_F77 # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_F77 # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_F77 # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_F77 # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_F77 # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77 # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77 # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_F77 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_F77 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_F77 # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_F77 # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_F77 # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_F77 # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_F77 # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_F77 # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" else tagname="" fi ;; GCJ) if test -n "$GCJ" && test "X$GCJ" != "Xno"; then # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o objext_GCJ=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${GCJ-"gcj"} compiler=$CC compiler_GCJ=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # GCJ did not exist at the time GCC didn't implicitly link libc in. archive_cmds_need_lc_GCJ=no old_archive_cmds_GCJ=$old_archive_cmds ## 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_prog_compiler_no_builtin_flag_GCJ= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' { echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:17174: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:17178: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl_GCJ= lt_prog_compiler_pic_GCJ= lt_prog_compiler_static_GCJ= { echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_static_GCJ='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_GCJ='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4' ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_GCJ='-fno-common' ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared_GCJ=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_GCJ=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_GCJ='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_GCJ='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl_GCJ='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_GCJ='-Bstatic' else lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_GCJ='-qnocommon' lt_prog_compiler_wl_GCJ='-Wl,' ;; esac ;; mingw* | cygwin* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl_GCJ='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_GCJ='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl_GCJ='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static_GCJ='-non_shared' ;; newsos6) lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-fpic' lt_prog_compiler_static_GCJ='-Bstatic' ;; ccc*) lt_prog_compiler_wl_GCJ='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static_GCJ='-non_shared' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' lt_prog_compiler_wl_GCJ='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' lt_prog_compiler_wl_GCJ='' ;; esac ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl_GCJ='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static_GCJ='-non_shared' ;; rdos*) lt_prog_compiler_static_GCJ='-non_shared' ;; solaris*) lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl_GCJ='-Qoption ld ';; *) lt_prog_compiler_wl_GCJ='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl_GCJ='-Qoption ld ' lt_prog_compiler_pic_GCJ='-PIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic_GCJ='-Kconform_pic' lt_prog_compiler_static_GCJ='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; unicos*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_can_build_shared_GCJ=no ;; uts4*) lt_prog_compiler_pic_GCJ='-pic' lt_prog_compiler_static_GCJ='-Bstatic' ;; *) lt_prog_compiler_can_build_shared_GCJ=no ;; esac fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_GCJ"; then { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_pic_works_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_pic_works_GCJ=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_GCJ" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:17464: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:17468: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_GCJ=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_pic_works_GCJ" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_pic_works_GCJ" >&6; } if test x"$lt_cv_prog_compiler_pic_works_GCJ" = xyes; then case $lt_prog_compiler_pic_GCJ in "" | " "*) ;; *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; esac else lt_prog_compiler_pic_GCJ= lt_prog_compiler_can_build_shared_GCJ=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_GCJ= ;; *) lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\" { echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_static_works_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_static_works_GCJ=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_GCJ=yes fi else lt_cv_prog_compiler_static_works_GCJ=yes fi fi $rm -r conftest* LDFLAGS="$save_LDFLAGS" fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_static_works_GCJ" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_static_works_GCJ" >&6; } if test x"$lt_cv_prog_compiler_static_works_GCJ" = xyes; then : else lt_prog_compiler_static_GCJ= fi { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_GCJ=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:17568: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:17572: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_GCJ=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6; } if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } runpath_var= allow_undefined_flag_GCJ= enable_shared_with_static_runtimes_GCJ=no archive_cmds_GCJ= archive_expsym_cmds_GCJ= old_archive_From_new_cmds_GCJ= old_archive_from_expsyms_cmds_GCJ= export_dynamic_flag_spec_GCJ= whole_archive_flag_spec_GCJ= thread_safe_flag_spec_GCJ= hardcode_libdir_flag_spec_GCJ= hardcode_libdir_flag_spec_ld_GCJ= hardcode_libdir_separator_GCJ= hardcode_direct_GCJ=no hardcode_minus_L_GCJ=no hardcode_shlibpath_var_GCJ=unsupported link_all_deplibs_GCJ=unknown hardcode_automatic_GCJ=no module_cmds_GCJ= module_expsym_cmds_GCJ= always_export_symbols_GCJ=no export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms_GCJ= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms_GCJ='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs_GCJ=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_GCJ='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_GCJ= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs_GCJ=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs_GCJ=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_GCJ=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_GCJ=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_GCJ='-L$libdir' allow_undefined_flag_GCJ=unsupported always_export_symbols_GCJ=no enable_shared_with_static_runtimes_GCJ=yes export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_GCJ=no fi ;; interix[3-9]*) hardcode_direct_GCJ=no hardcode_shlibpath_var_GCJ=no hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' export_dynamic_flag_spec_GCJ='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_GCJ='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec_GCJ='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; *) tmp_sharedflag='-shared' ;; esac archive_cmds_GCJ='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi link_all_deplibs_GCJ=no else ld_shlibs_GCJ=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs_GCJ=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs_GCJ=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; esac ;; sunos4*) archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; esac if test "$ld_shlibs_GCJ" = no; then runpath_var= hardcode_libdir_flag_spec_GCJ= export_dynamic_flag_spec_GCJ= whole_archive_flag_spec_GCJ= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag_GCJ=unsupported always_export_symbols_GCJ=yes archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L_GCJ=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_GCJ=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_GCJ='' hardcode_direct_GCJ=yes hardcode_libdir_separator_GCJ=':' link_all_deplibs_GCJ=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_GCJ=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_GCJ=yes hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_libdir_separator_GCJ= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_GCJ=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_GCJ='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_GCJ="-z nodefs" archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_GCJ=' ${wl}-bernotok' allow_undefined_flag_GCJ=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_GCJ='$convenience' archive_cmds_need_lc_GCJ=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes # see comment about different semantics on the GNU ld section ld_shlibs_GCJ=no ;; bsdi[45]*) export_dynamic_flag_spec_GCJ=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_GCJ=' ' allow_undefined_flag_GCJ=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds_GCJ='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_GCJ='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_GCJ=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc_GCJ=no hardcode_direct_GCJ=no hardcode_automatic_GCJ=yes hardcode_shlibpath_var_GCJ=unsupported whole_archive_flag_spec_GCJ='' link_all_deplibs_GCJ=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds_GCJ="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_GCJ="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_GCJ="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds_GCJ="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring' module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_GCJ=no ;; esac fi ;; dgux*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_shlibpath_var_GCJ=no ;; freebsd1*) ld_shlibs_GCJ=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_minus_L_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds_GCJ='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: case $host_cpu in hppa*64*|ia64*) hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' hardcode_direct_GCJ=no hardcode_shlibpath_var_GCJ=no ;; *) hardcode_direct_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir' fi hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: link_all_deplibs_GCJ=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; newsos6) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_shlibpath_var_GCJ=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' export_dynamic_flag_spec_GCJ='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-R$libdir' ;; *) archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs_GCJ=no fi ;; os2*) hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes allow_undefined_flag_GCJ=unsupported archive_cmds_GCJ='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag_GCJ=' -expect_unresolved \*' archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_GCJ=' -expect_unresolved \*' archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_GCJ='-rpath $libdir' fi hardcode_libdir_separator_GCJ=: ;; solaris*) no_undefined_flag_GCJ=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_shlibpath_var_GCJ=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs_GCJ=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_direct_GCJ=yes hardcode_minus_L_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; sysv4) case $host_vendor in sni) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds_GCJ='$CC -r -o $output$reload_objs' hardcode_direct_GCJ=no ;; motorola) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_GCJ=no ;; sysv4.3*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_GCJ=no export_dynamic_flag_spec_GCJ='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_GCJ=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs_GCJ=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_GCJ='${wl}-z,text' archive_cmds_need_lc_GCJ=no hardcode_shlibpath_var_GCJ=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_GCJ='${wl}-z,text' allow_undefined_flag_GCJ='${wl}-z,nodefs' archive_cmds_need_lc_GCJ=no hardcode_shlibpath_var_GCJ=no hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator_GCJ=':' link_all_deplibs_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_shlibpath_var_GCJ=no ;; *) ld_shlibs_GCJ=no ;; esac fi { echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 echo "${ECHO_T}$ld_shlibs_GCJ" >&6; } test "$ld_shlibs_GCJ" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_GCJ" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_GCJ=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_GCJ in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_GCJ pic_flag=$lt_prog_compiler_pic_GCJ compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ allow_undefined_flag_GCJ= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_GCJ=no else archive_cmds_need_lc_GCJ=yes fi allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6; } ;; esac fi ;; esac { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; 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 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec" fi sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec" fi sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } hardcode_action_GCJ= if test -n "$hardcode_libdir_flag_spec_GCJ" || \ test -n "$runpath_var_GCJ" || \ test "X$hardcode_automatic_GCJ" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_GCJ" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && test "$hardcode_minus_L_GCJ" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_GCJ=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_GCJ=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_GCJ=unsupported fi { echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 echo "${ECHO_T}$hardcode_action_GCJ" >&6; } if test "$hardcode_action_GCJ" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_GCJ \ CC_GCJ \ LD_GCJ \ lt_prog_compiler_wl_GCJ \ lt_prog_compiler_pic_GCJ \ lt_prog_compiler_static_GCJ \ lt_prog_compiler_no_builtin_flag_GCJ \ export_dynamic_flag_spec_GCJ \ thread_safe_flag_spec_GCJ \ whole_archive_flag_spec_GCJ \ enable_shared_with_static_runtimes_GCJ \ old_archive_cmds_GCJ \ old_archive_from_new_cmds_GCJ \ predep_objects_GCJ \ postdep_objects_GCJ \ predeps_GCJ \ postdeps_GCJ \ compiler_lib_search_path_GCJ \ compiler_lib_search_dirs_GCJ \ archive_cmds_GCJ \ archive_expsym_cmds_GCJ \ postinstall_cmds_GCJ \ postuninstall_cmds_GCJ \ old_archive_from_expsyms_cmds_GCJ \ allow_undefined_flag_GCJ \ no_undefined_flag_GCJ \ export_symbols_cmds_GCJ \ hardcode_libdir_flag_spec_GCJ \ hardcode_libdir_flag_spec_ld_GCJ \ hardcode_libdir_separator_GCJ \ hardcode_automatic_GCJ \ module_cmds_GCJ \ module_expsym_cmds_GCJ \ lt_cv_prog_compiler_c_o_GCJ \ fix_srcfile_path_GCJ \ exclude_expsyms_GCJ \ include_expsyms_GCJ; do case $var in old_archive_cmds_GCJ | \ old_archive_from_new_cmds_GCJ | \ archive_cmds_GCJ | \ archive_expsym_cmds_GCJ | \ module_cmds_GCJ | \ module_expsym_cmds_GCJ | \ old_archive_from_expsyms_cmds_GCJ | \ export_symbols_cmds_GCJ | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_GCJ # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_GCJ # Is the compiler the GNU C compiler? with_gcc=$GCC_GCJ # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_GCJ # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_GCJ # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_GCJ pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_GCJ # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_GCJ old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_GCJ archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_GCJ module_expsym_cmds=$lt_module_expsym_cmds_GCJ # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_GCJ # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_GCJ # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_GCJ # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_GCJ # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_GCJ # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_GCJ # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_GCJ # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_GCJ # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_GCJ # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_GCJ # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_GCJ # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_GCJ # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_GCJ # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_GCJ # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_GCJ # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_GCJ # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" else tagname="" fi ;; RC) # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o objext_RC=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm -r conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${RC-"windres"} compiler=$CC compiler_RC=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` lt_cv_prog_compiler_c_o_RC=yes # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_RC \ CC_RC \ LD_RC \ lt_prog_compiler_wl_RC \ lt_prog_compiler_pic_RC \ lt_prog_compiler_static_RC \ lt_prog_compiler_no_builtin_flag_RC \ export_dynamic_flag_spec_RC \ thread_safe_flag_spec_RC \ whole_archive_flag_spec_RC \ enable_shared_with_static_runtimes_RC \ old_archive_cmds_RC \ old_archive_from_new_cmds_RC \ predep_objects_RC \ postdep_objects_RC \ predeps_RC \ postdeps_RC \ compiler_lib_search_path_RC \ compiler_lib_search_dirs_RC \ archive_cmds_RC \ archive_expsym_cmds_RC \ postinstall_cmds_RC \ postuninstall_cmds_RC \ old_archive_from_expsyms_cmds_RC \ allow_undefined_flag_RC \ no_undefined_flag_RC \ export_symbols_cmds_RC \ hardcode_libdir_flag_spec_RC \ hardcode_libdir_flag_spec_ld_RC \ hardcode_libdir_separator_RC \ hardcode_automatic_RC \ module_cmds_RC \ module_expsym_cmds_RC \ lt_cv_prog_compiler_c_o_RC \ fix_srcfile_path_RC \ exclude_expsyms_RC \ include_expsyms_RC; do case $var in old_archive_cmds_RC | \ old_archive_from_new_cmds_RC | \ archive_cmds_RC | \ archive_expsym_cmds_RC | \ module_cmds_RC | \ module_expsym_cmds_RC | \ old_archive_from_expsyms_cmds_RC | \ export_symbols_cmds_RC | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_RC # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_RC # Is the compiler the GNU C compiler? with_gcc=$GCC_RC # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_RC # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_RC # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_RC pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_RC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_RC old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_RC archive_expsym_cmds=$lt_archive_expsym_cmds_RC postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_RC module_expsym_cmds=$lt_module_expsym_cmds_RC # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_RC # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_RC # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_RC # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_RC # The directories searched by this compiler when creating a shared # library compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_RC # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_RC # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_RC # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_RC # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_RC # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_RC # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_RC # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_RC # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_RC # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_RC # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_RC # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_RC # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_RC # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_RC # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" ;; *) { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5 echo "$as_me: error: Unsupported tag name: $tagname" >&2;} { (exit 1); exit 1; }; } ;; esac # Append the new tag name to the list of available tags. if test -n "$tagname" ; then available_tags="$available_tags $tagname" fi fi done IFS="$lt_save_ifs" # Now substitute the updated list of available tags. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then mv "${ofile}T" "$ofile" chmod +x "$ofile" else rm -f "${ofile}T" { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5 echo "$as_me: error: unable to update list of available tagged configurations." >&2;} { (exit 1); exit 1; }; } fi fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' # Prevent multiple expansion ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include <$ac_hdr> int main () { if ((DIR *) 0) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 _ACEOF ac_header_dirent=$ac_hdr; break fi done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then { echo "$as_me:$LINENO: checking for library containing opendir" >&5 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; } if test "${ac_cv_search_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char opendir (); int main () { return opendir (); ; return 0; } _ACEOF for ac_lib in '' dir; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_search_opendir=$ac_res else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext if test "${ac_cv_search_opendir+set}" = set; then break fi done if test "${ac_cv_search_opendir+set}" = set; then : else ac_cv_search_opendir=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 echo "${ECHO_T}$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir if test "$ac_res" != no; then test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi else { echo "$as_me:$LINENO: checking for library containing opendir" >&5 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; } if test "${ac_cv_search_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char opendir (); int main () { return opendir (); ; return 0; } _ACEOF for ac_lib in '' x; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_search_opendir=$ac_res else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext if test "${ac_cv_search_opendir+set}" = set; then break fi done if test "${ac_cv_search_opendir+set}" = set; then : else ac_cv_search_opendir=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 echo "${ECHO_T}$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir if test "$ac_res" != no; then test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi fi # Check whether --enable-ltdl-install was given. if test "${enable_ltdl_install+set}" = set; then enableval=$enable_ltdl_install; fi if test x"${enable_ltdl_install-no}" != xno; then INSTALL_LTDL_TRUE= INSTALL_LTDL_FALSE='#' else INSTALL_LTDL_TRUE='#' INSTALL_LTDL_FALSE= fi if test x"${enable_ltdl_convenience-no}" != xno; then CONVENIENCE_LTDL_TRUE= CONVENIENCE_LTDL_FALSE='#' else CONVENIENCE_LTDL_TRUE='#' CONVENIENCE_LTDL_FALSE= fi { echo "$as_me:$LINENO: checking which extension is used for loadable modules" >&5 echo $ECHO_N "checking which extension is used for loadable modules... $ECHO_C" >&6; } if test "${libltdl_cv_shlibext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else module=yes eval libltdl_cv_shlibext=$shrext_cmds fi { echo "$as_me:$LINENO: result: $libltdl_cv_shlibext" >&5 echo "${ECHO_T}$libltdl_cv_shlibext" >&6; } if test -n "$libltdl_cv_shlibext"; then cat >>confdefs.h <<_ACEOF #define LTDL_SHLIB_EXT "$libltdl_cv_shlibext" _ACEOF fi { echo "$as_me:$LINENO: checking which variable specifies run-time library path" >&5 echo $ECHO_N "checking which variable specifies run-time library path... $ECHO_C" >&6; } if test "${libltdl_cv_shlibpath_var+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else libltdl_cv_shlibpath_var="$shlibpath_var" fi { echo "$as_me:$LINENO: result: $libltdl_cv_shlibpath_var" >&5 echo "${ECHO_T}$libltdl_cv_shlibpath_var" >&6; } if test -n "$libltdl_cv_shlibpath_var"; then cat >>confdefs.h <<_ACEOF #define LTDL_SHLIBPATH_VAR "$libltdl_cv_shlibpath_var" _ACEOF fi { echo "$as_me:$LINENO: checking for the default library search path" >&5 echo $ECHO_N "checking for the default library search path... $ECHO_C" >&6; } if test "${libltdl_cv_sys_search_path+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else libltdl_cv_sys_search_path="$sys_lib_dlsearch_path_spec" fi { echo "$as_me:$LINENO: result: $libltdl_cv_sys_search_path" >&5 echo "${ECHO_T}$libltdl_cv_sys_search_path" >&6; } if test -n "$libltdl_cv_sys_search_path"; then sys_search_path= for dir in $libltdl_cv_sys_search_path; do if test -z "$sys_search_path"; then sys_search_path="$dir" else sys_search_path="$sys_search_path$PATH_SEPARATOR$dir" fi done cat >>confdefs.h <<_ACEOF #define LTDL_SYSSEARCHPATH "$sys_search_path" _ACEOF fi { echo "$as_me:$LINENO: checking for objdir" >&5 echo $ECHO_N "checking for objdir... $ECHO_C" >&6; } if test "${libltdl_cv_objdir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else libltdl_cv_objdir="$objdir" if test -n "$objdir"; then : else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then libltdl_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. libltdl_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi fi { echo "$as_me:$LINENO: result: $libltdl_cv_objdir" >&5 echo "${ECHO_T}$libltdl_cv_objdir" >&6; } cat >>confdefs.h <<_ACEOF #define LTDL_OBJDIR "$libltdl_cv_objdir/" _ACEOF { echo "$as_me:$LINENO: checking whether libtool supports -dlopen/-dlpreopen" >&5 echo $ECHO_N "checking whether libtool supports -dlopen/-dlpreopen... $ECHO_C" >&6; } if test "${libltdl_cv_preloaded_symbols+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$lt_cv_sys_global_symbol_pipe"; then libltdl_cv_preloaded_symbols=yes else libltdl_cv_preloaded_symbols=no fi fi { echo "$as_me:$LINENO: result: $libltdl_cv_preloaded_symbols" >&5 echo "${ECHO_T}$libltdl_cv_preloaded_symbols" >&6; } if test x"$libltdl_cv_preloaded_symbols" = xyes; then cat >>confdefs.h <<\_ACEOF #define HAVE_PRELOADED_SYMBOLS 1 _ACEOF fi LIBADD_DL= ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { echo "$as_me:$LINENO: checking for shl_load" >&5 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; } if test "${ac_cv_func_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define shl_load to an innocuous variant, in case declares shl_load. For example, HP-UX 11i declares gettimeofday. */ #define shl_load innocuous_shl_load /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shl_load (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef shl_load /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_shl_load || defined __stub___shl_load choke me #endif int main () { return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_func_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shl_load=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 echo "${ECHO_T}$ac_cv_func_shl_load" >&6; } if test $ac_cv_func_shl_load = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_SHL_LOAD 1 _ACEOF else { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } if test $ac_cv_lib_dld_shl_load = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_SHL_LOAD 1 _ACEOF LIBADD_DL="$LIBADD_DL -ldld" else { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } if test $ac_cv_lib_dl_dlopen = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_LIBDL 1 _ACEOF LIBADD_DL="-ldl" libltdl_cv_lib_dl_dlopen="yes" else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if HAVE_DLFCN_H # include #endif int main () { dlopen(0, 0); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then cat >>confdefs.h <<\_ACEOF #define HAVE_LIBDL 1 _ACEOF libltdl_cv_func_dlopen="yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; } if test "${ac_cv_lib_svld_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_svld_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6; } if test $ac_cv_lib_svld_dlopen = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_LIBDL 1 _ACEOF LIBADD_DL="-lsvld" libltdl_cv_func_dlopen="yes" else { echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6; } if test "${ac_cv_lib_dld_dld_link+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_dld_link=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; } if test $ac_cv_lib_dld_dld_link = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_DLD 1 _ACEOF LIBADD_DL="$LIBADD_DL -ldld" else { echo "$as_me:$LINENO: checking for _dyld_func_lookup" >&5 echo $ECHO_N "checking for _dyld_func_lookup... $ECHO_C" >&6; } if test "${ac_cv_func__dyld_func_lookup+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define _dyld_func_lookup to an innocuous variant, in case declares _dyld_func_lookup. For example, HP-UX 11i declares gettimeofday. */ #define _dyld_func_lookup innocuous__dyld_func_lookup /* System header to define __stub macros and hopefully few prototypes, which can conflict with char _dyld_func_lookup (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef _dyld_func_lookup /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char _dyld_func_lookup (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub__dyld_func_lookup || defined __stub____dyld_func_lookup choke me #endif int main () { return _dyld_func_lookup (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_func__dyld_func_lookup=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func__dyld_func_lookup=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func__dyld_func_lookup" >&5 echo "${ECHO_T}$ac_cv_func__dyld_func_lookup" >&6; } if test $ac_cv_func__dyld_func_lookup = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_DYLD 1 _ACEOF fi fi fi fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi fi fi if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes then lt_save_LIBS="$LIBS" LIBS="$LIBS $LIBADD_DL" for ac_func in dlerror do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done LIBS="$lt_save_LIBS" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { echo "$as_me:$LINENO: checking for _ prefix in compiled symbols" >&5 echo $ECHO_N "checking for _ prefix in compiled symbols... $ECHO_C" >&6; } if test "${ac_cv_sys_symbol_underscore+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_sys_symbol_underscore=no cat > conftest.$ac_ext <&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Now try to grab the symbols. ac_nlist=conftest.nm if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist\"") >&5 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s "$ac_nlist"; then # See whether the symbols have a leading underscore. if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then ac_cv_sys_symbol_underscore=yes else if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then : else echo "configure: cannot find nm_test_func in $ac_nlist" >&5 fi fi else echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "configure: failed program was:" >&5 cat conftest.c >&5 fi rm -rf conftest* fi { echo "$as_me:$LINENO: result: $ac_cv_sys_symbol_underscore" >&5 echo "${ECHO_T}$ac_cv_sys_symbol_underscore" >&6; } if test x"$ac_cv_sys_symbol_underscore" = xyes; then if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes ; then { echo "$as_me:$LINENO: checking whether we have to add an underscore for dlsym" >&5 echo $ECHO_N "checking whether we have to add an underscore for dlsym... $ECHO_C" >&6; } if test "${libltdl_cv_need_uscore+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else libltdl_cv_need_uscore=unknown save_LIBS="$LIBS" LIBS="$LIBS $LIBADD_DL" if test "$cross_compiling" = yes; then : libltdl_cv_need_uscore=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) libltdl_cv_need_uscore=no ;; x$lt_dlneed_uscore) libltdl_cv_need_uscore=yes ;; x$lt_dlunknown|x*) ;; esac else : # compilation failed fi fi rm -fr conftest* LIBS="$save_LIBS" fi { echo "$as_me:$LINENO: result: $libltdl_cv_need_uscore" >&5 echo "${ECHO_T}$libltdl_cv_need_uscore" >&6; } fi fi if test x"$libltdl_cv_need_uscore" = xyes; then cat >>confdefs.h <<\_ACEOF #define NEED_USCORE 1 _ACEOF fi { echo "$as_me:$LINENO: checking whether deplibs are loaded by dlopen" >&5 echo $ECHO_N "checking whether deplibs are loaded by dlopen... $ECHO_C" >&6; } if test "${libltdl_cv_sys_dlopen_deplibs+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # PORTME does your system automatically load deplibs for dlopen? # or its logical equivalent (e.g. shl_load for HP-UX < 11) # For now, we just catch OSes we know something about -- in the # future, we'll try test this programmatically. libltdl_cv_sys_dlopen_deplibs=unknown case "$host_os" in aix3*|aix4.1.*|aix4.2.*) # Unknown whether this is true for these versions of AIX, but # we want this `case' here to explicitly catch those versions. libltdl_cv_sys_dlopen_deplibs=unknown ;; aix[4-9]*) libltdl_cv_sys_dlopen_deplibs=yes ;; darwin*) # Assuming the user has installed a libdl from somewhere, this is true # If you are looking for one http://www.opendarwin.org/projects/dlcompat libltdl_cv_sys_dlopen_deplibs=yes ;; freebsd* | dragonfly*) libltdl_cv_sys_dlopen_deplibs=yes ;; gnu* | linux* | k*bsd*-gnu) # GNU and its variants, using gnu ld.so (Glibc) libltdl_cv_sys_dlopen_deplibs=yes ;; hpux10*|hpux11*) libltdl_cv_sys_dlopen_deplibs=yes ;; interix*) libltdl_cv_sys_dlopen_deplibs=yes ;; irix[12345]*|irix6.[01]*) # Catch all versions of IRIX before 6.2, and indicate that we don't # know how it worked for any of those versions. libltdl_cv_sys_dlopen_deplibs=unknown ;; irix*) # The case above catches anything before 6.2, and it's known that # at 6.2 and later dlopen does load deplibs. libltdl_cv_sys_dlopen_deplibs=yes ;; netbsd* | netbsdelf*-gnu) libltdl_cv_sys_dlopen_deplibs=yes ;; openbsd*) libltdl_cv_sys_dlopen_deplibs=yes ;; osf[1234]*) # dlopen did load deplibs (at least at 4.x), but until the 5.x series, # it did *not* use an RPATH in a shared library to find objects the # library depends on, so we explictly say `no'. libltdl_cv_sys_dlopen_deplibs=no ;; osf5.0|osf5.0a|osf5.1) # dlopen *does* load deplibs and with the right loader patch applied # it even uses RPATH in a shared library to search for shared objects # that the library depends on, but there's no easy way to know if that # patch is installed. Since this is the case, all we can really # say is unknown -- it depends on the patch being installed. If # it is, this changes to `yes'. Without it, it would be `no'. libltdl_cv_sys_dlopen_deplibs=unknown ;; osf*) # the two cases above should catch all versions of osf <= 5.1. Read # the comments above for what we know about them. # At > 5.1, deplibs are loaded *and* any RPATH in a shared library # is used to find them so we can finally say `yes'. libltdl_cv_sys_dlopen_deplibs=yes ;; solaris*) libltdl_cv_sys_dlopen_deplibs=yes ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) libltdl_cv_sys_dlopen_deplibs=yes ;; esac fi { echo "$as_me:$LINENO: result: $libltdl_cv_sys_dlopen_deplibs" >&5 echo "${ECHO_T}$libltdl_cv_sys_dlopen_deplibs" >&6; } if test "$libltdl_cv_sys_dlopen_deplibs" != yes; then cat >>confdefs.h <<\_ACEOF #define LTDL_DLOPEN_DEPLIBS 1 _ACEOF fi for ac_header in argz.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ---------------------------------- ## ## Report this to bug-libtool@gnu.org ## ## ---------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { echo "$as_me:$LINENO: checking for error_t" >&5 echo $ECHO_N "checking for error_t... $ECHO_C" >&6; } if test "${ac_cv_type_error_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if HAVE_ARGZ_H # include #endif typedef error_t ac__type_new_; int main () { if ((ac__type_new_ *) 0) return 0; if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_type_error_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_error_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_type_error_t" >&5 echo "${ECHO_T}$ac_cv_type_error_t" >&6; } if test $ac_cv_type_error_t = yes; then cat >>confdefs.h <<_ACEOF #define HAVE_ERROR_T 1 _ACEOF else cat >>confdefs.h <<\_ACEOF #define error_t int _ACEOF fi for ac_func in argz_append argz_create_sep argz_insert argz_next argz_stringify do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in assert.h ctype.h errno.h malloc.h memory.h stdlib.h \ stdio.h unistd.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ---------------------------------- ## ## Report this to bug-libtool@gnu.org ## ## ---------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dl.h sys/dl.h dld.h mach-o/dyld.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ---------------------------------- ## ## Report this to bug-libtool@gnu.org ## ## ---------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in string.h strings.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext if { (ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ( cat <<\_ASBOX ## ---------------------------------- ## ## Report this to bug-libtool@gnu.org ## ## ---------------------------------- ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF break fi done for ac_func in strchr index do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF break fi done for ac_func in strrchr rindex do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF break fi done for ac_func in memcpy bcopy do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF break fi done for ac_func in memmove strcmp do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in closedir opendir readdir do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $ac_func (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done ## -------- ## ## Outputs. ## ## -------- ## ac_config_files="$ac_config_files Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && { echo "$as_me:$LINENO: updating cache $cache_file" >&5 echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${INSTALL_LTDL_TRUE}" && test -z "${INSTALL_LTDL_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"INSTALL_LTDL\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"INSTALL_LTDL\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${CONVENIENCE_LTDL_TRUE}" && test -z "${CONVENIENCE_LTDL_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"CONVENIENCE_LTDL\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"CONVENIENCE_LTDL\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # PATH needs CR # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) as_nl=' ' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. Blame Lee # E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 # Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by libltdl $as_me 1.2, which was generated by GNU Autoconf 2.61. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ libltdl config.status 1.2 configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2006 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header { echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; };; --help | --hel | -h ) echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 CONFIG_SHELL=$SHELL export CONFIG_SHELL exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config-h.in" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } # # Set up the sed scripts for CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "$CONFIG_FILES"; then _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF SHELL!$SHELL$ac_delim PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim PACKAGE_NAME!$PACKAGE_NAME$ac_delim PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim PACKAGE_STRING!$PACKAGE_STRING$ac_delim PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim exec_prefix!$exec_prefix$ac_delim prefix!$prefix$ac_delim program_transform_name!$program_transform_name$ac_delim bindir!$bindir$ac_delim sbindir!$sbindir$ac_delim libexecdir!$libexecdir$ac_delim datarootdir!$datarootdir$ac_delim datadir!$datadir$ac_delim sysconfdir!$sysconfdir$ac_delim sharedstatedir!$sharedstatedir$ac_delim localstatedir!$localstatedir$ac_delim includedir!$includedir$ac_delim oldincludedir!$oldincludedir$ac_delim docdir!$docdir$ac_delim infodir!$infodir$ac_delim htmldir!$htmldir$ac_delim dvidir!$dvidir$ac_delim pdfdir!$pdfdir$ac_delim psdir!$psdir$ac_delim libdir!$libdir$ac_delim localedir!$localedir$ac_delim mandir!$mandir$ac_delim DEFS!$DEFS$ac_delim ECHO_C!$ECHO_C$ac_delim ECHO_N!$ECHO_N$ac_delim ECHO_T!$ECHO_T$ac_delim LIBS!$LIBS$ac_delim build_alias!$build_alias$ac_delim host_alias!$host_alias$ac_delim target_alias!$target_alias$ac_delim INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim INSTALL_DATA!$INSTALL_DATA$ac_delim CYGPATH_W!$CYGPATH_W$ac_delim PACKAGE!$PACKAGE$ac_delim VERSION!$VERSION$ac_delim ACLOCAL!$ACLOCAL$ac_delim AUTOCONF!$AUTOCONF$ac_delim AUTOMAKE!$AUTOMAKE$ac_delim AUTOHEADER!$AUTOHEADER$ac_delim MAKEINFO!$MAKEINFO$ac_delim install_sh!$install_sh$ac_delim STRIP!$STRIP$ac_delim INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim mkdir_p!$mkdir_p$ac_delim AWK!$AWK$ac_delim SET_MAKE!$SET_MAKE$ac_delim am__leading_dot!$am__leading_dot$ac_delim AMTAR!$AMTAR$ac_delim am__tar!$am__tar$ac_delim am__untar!$am__untar$ac_delim CC!$CC$ac_delim CFLAGS!$CFLAGS$ac_delim LDFLAGS!$LDFLAGS$ac_delim CPPFLAGS!$CPPFLAGS$ac_delim ac_ct_CC!$ac_ct_CC$ac_delim EXEEXT!$EXEEXT$ac_delim OBJEXT!$OBJEXT$ac_delim DEPDIR!$DEPDIR$ac_delim am__include!$am__include$ac_delim am__quote!$am__quote$ac_delim AMDEP_TRUE!$AMDEP_TRUE$ac_delim AMDEP_FALSE!$AMDEP_FALSE$ac_delim AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim CCDEPMODE!$CCDEPMODE$ac_delim am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim build!$build$ac_delim build_cpu!$build_cpu$ac_delim build_vendor!$build_vendor$ac_delim build_os!$build_os$ac_delim host!$host$ac_delim host_cpu!$host_cpu$ac_delim host_vendor!$host_vendor$ac_delim host_os!$host_os$ac_delim SED!$SED$ac_delim GREP!$GREP$ac_delim EGREP!$EGREP$ac_delim LN_S!$LN_S$ac_delim ECHO!$ECHO$ac_delim AR!$AR$ac_delim RANLIB!$RANLIB$ac_delim DSYMUTIL!$DSYMUTIL$ac_delim NMEDIT!$NMEDIT$ac_delim DLLTOOL!$DLLTOOL$ac_delim AS!$AS$ac_delim OBJDUMP!$OBJDUMP$ac_delim CPP!$CPP$ac_delim CXX!$CXX$ac_delim CXXFLAGS!$CXXFLAGS$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` if test -n "$ac_eof"; then ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` ac_eof=`expr $ac_eof + 1` fi cat >>$CONFIG_STATUS <<_ACEOF cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof /@[a-zA-Z_][a-zA-Z_0-9]*@/!b _ACEOF sed ' s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g s/^/s,@/; s/!/@,|#_!!_#|/ :n t n s/'"$ac_delim"'$/,g/; t s/$/\\/; p N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n ' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF CEOF$ac_eof _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF ac_ct_CXX!$ac_ct_CXX$ac_delim CXXDEPMODE!$CXXDEPMODE$ac_delim am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim CXXCPP!$CXXCPP$ac_delim F77!$F77$ac_delim FFLAGS!$FFLAGS$ac_delim ac_ct_F77!$ac_ct_F77$ac_delim LIBTOOL!$LIBTOOL$ac_delim LIBTOOL_DEPS!$LIBTOOL_DEPS$ac_delim INSTALL_LTDL_TRUE!$INSTALL_LTDL_TRUE$ac_delim INSTALL_LTDL_FALSE!$INSTALL_LTDL_FALSE$ac_delim CONVENIENCE_LTDL_TRUE!$CONVENIENCE_LTDL_TRUE$ac_delim CONVENIENCE_LTDL_FALSE!$CONVENIENCE_LTDL_FALSE$ac_delim LIBADD_DL!$LIBADD_DL$ac_delim LIBOBJS!$LIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 17; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` if test -n "$ac_eof"; then ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` ac_eof=`expr $ac_eof + 1` fi cat >>$CONFIG_STATUS <<_ACEOF cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof /@[a-zA-Z_][a-zA-Z_0-9]*@/!b end _ACEOF sed ' s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g s/^/s,@/; s/!/@,|#_!!_#|/ :n t n s/'"$ac_delim"'$/,g/; t s/$/\\/; p N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n ' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF :end s/|#_!!_#|//g CEOF$ac_eof _ACEOF # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/ s/:*\${srcdir}:*/:/ s/:*@srcdir@:*/:/ s/^\([^=]*=[ ]*\):*/\1/ s/:*$// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF fi # test -n "$CONFIG_FILES" for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 echo "$as_me: error: Invalid tag $ac_tag." >&2;} { (exit 1); exit 1; }; };; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 echo "$as_me: error: cannot find input file: $ac_f" >&2;} { (exit 1); exit 1; }; };; esac ac_file_inputs="$ac_file_inputs $ac_f" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input="Generated from "`IFS=: echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} fi case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin";; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir="$ac_dir" case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= case `sed -n '/datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p ' $ac_file_inputs` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s&@configure_input@&$configure_input&;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t $ac_datarootdir_hack " $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out"; rm -f "$tmp/out";; *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; esac ;; :H) # # CONFIG_HEADER # _ACEOF # Transform confdefs.h into a sed script `conftest.defines', that # substitutes the proper values into config.h.in to produce config.h. rm -f conftest.defines conftest.tail # First, append a space to every undef/define line, to ease matching. echo 's/$/ /' >conftest.defines # Then, protect against being on the right side of a sed subst, or in # an unquoted here document, in config.status. If some macros were # called several times there might be several #defines for the same # symbol, which is useless. But do not sort them, since the last # AC_DEFINE must be honored. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* # These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where # NAME is the cpp macro being defined, VALUE is the value it is being given. # PARAMS is the parameter list in the macro definition--in most cases, it's # just an empty string. ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' ac_dB='\\)[ (].*,\\1define\\2' ac_dC=' ' ac_dD=' ,' uniq confdefs.h | sed -n ' t rset :rset s/^[ ]*#[ ]*define[ ][ ]*// t ok d :ok s/[\\&,]/\\&/g s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p ' >>conftest.defines # Remove the space that was appended to ease matching. # Then replace #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. # (The regexp can be short, since the line contains either #define or #undef.) echo 's/ $// s,^[ #]*u.*,/* & */,' >>conftest.defines # Break up conftest.defines: ac_max_sed_lines=50 # First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" # Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" # Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" # et cetera. ac_in='$ac_file_inputs' ac_out='"$tmp/out1"' ac_nxt='"$tmp/out2"' while : do # Write a here document: cat >>$CONFIG_STATUS <<_ACEOF # First, check the format of the line: cat >"\$tmp/defines.sed" <<\\CEOF /^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def /^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def b :def _ACEOF sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail grep . conftest.tail >/dev/null || break rm -f conftest.defines mv conftest.tail conftest.defines done rm -f conftest.defines conftest.tail echo "ac_result=$ac_in" >>$CONFIG_STATUS cat >>$CONFIG_STATUS <<\_ACEOF if test x"$ac_file" != x-; then echo "/* $configure_input */" >"$tmp/config.h" cat "$ac_result" >>"$tmp/config.h" if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else rm -f $ac_file mv "$tmp/config.h" $ac_file fi else echo "/* $configure_input */" cat "$ac_result" fi rm -f "$tmp/out12" # Compute $ac_file's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $ac_file | $ac_file:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $ac_file" >`$as_dirname -- $ac_file || $as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X$ac_file : 'X\(//\)[^/]' \| \ X$ac_file : 'X\(//\)$' \| \ X$ac_file : 'X\(/\)' \| . 2>/dev/null || echo X$ac_file | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` { as_dir=$dirpart/$fdir case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; esac done # for ac_tag { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi elektra-0.7.1/libltdl/configure.ac0000644000076400001440000000431411312075134014002 00000000000000## Process this file with autoconf to create configure. -*- autoconf -*- # Copyright 2001 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301 USA dnl FIXME: Is this really new enough? AC_PREREQ(2.50) ## ------------------------ ## ## Autoconf initialisation. ## ## ------------------------ ## AC_INIT([libltdl], [1.2], [bug-libtool@gnu.org]) AC_CONFIG_SRCDIR([ltdl.c]) ## ------------------------------- ## ## Libltdl specific configuration. ## ## ------------------------------- ## AC_CONFIG_AUX_DIR([.]) if test -z "$enable_ltdl_install$enable_ltdl_convenience"; then if test -f ${srcdir}/ltmain.sh; then # if libltdl is libtoolized, it is assumed to be stand-alone and # installed unless the command line overrides it (tested above) enable_ltdl_install=yes else AC_MSG_WARN([*** The top-level configure must select either]) AC_MSG_WARN([*** [A""C_LIBLTDL_INSTALLABLE] or [A""C_LIBLTDL_CONVENIENCE].]) AC_MSG_ERROR([*** Maybe you want to --enable-ltdl-install?]) fi fi ## ------------------------ ## ## Automake Initialisation. ## ## ------------------------ ## AM_INIT_AUTOMAKE(AC_PACKAGE_TARNAME, AC_PACKAGE_VERSION, -) AM_CONFIG_HEADER([config.h:config-h.in]) ## ------------------ ## ## C compiler checks. ## ## ------------------ ## AC_PROG_CC AC_C_CONST AC_C_INLINE ## ----------------------- ## ## Libtool initialisation. ## ## ----------------------- ## AC_LIBTOOL_WIN32_DLL AC_PROG_LIBTOOL AC_SUBST([LIBTOOL_DEPS]) AC_LIB_LTDL ## -------- ## ## Outputs. ## ## -------- ## AC_CONFIG_FILES([Makefile]) AC_OUTPUT elektra-0.7.1/libltdl/install-sh0000755000076400001440000003246411312075134013527 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2006-12-25.00 # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then trap '(exit $?); exit' 1 2 13 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names starting with `-'. case $src in -*) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # Protect names starting with `-'. case $dst in -*) dst=./$dst;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; -*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test -z "$d" && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: elektra-0.7.1/libltdl/ltdl.c0000644000076400001440000030262511312075134012625 00000000000000/* ltdl.c -- system independent dlopen wrapper Copyright (C) 1998, 1999, 2000, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. Originally by Thomas Tanner This file is part of GNU Libtool. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. As a special exception to the GNU Lesser General Public License, if you distribute this file as part of a program or library that is built using GNU libtool, you may include it under the same distribution terms that you use for the rest of that program. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #if HAVE_CONFIG_H # include #endif #if HAVE_UNISTD_H # include #endif #if HAVE_STDIO_H # include #endif /* Include the header defining malloc. On K&R C compilers, that's , on ANSI C and ISO C compilers, that's . */ #if HAVE_STDLIB_H # include #else # if HAVE_MALLOC_H # include # endif #endif #if HAVE_STRING_H # include #else # if HAVE_STRINGS_H # include # endif #endif #if HAVE_CTYPE_H # include #endif #if HAVE_MEMORY_H # include #endif #if HAVE_ERRNO_H # include #endif #ifndef __WINDOWS__ # ifdef __WIN32__ # define __WINDOWS__ # endif #endif #undef LT_USE_POSIX_DIRENT #ifdef HAVE_CLOSEDIR # ifdef HAVE_OPENDIR # ifdef HAVE_READDIR # ifdef HAVE_DIRENT_H # define LT_USE_POSIX_DIRENT # endif /* HAVE_DIRENT_H */ # endif /* HAVE_READDIR */ # endif /* HAVE_OPENDIR */ #endif /* HAVE_CLOSEDIR */ #undef LT_USE_WINDOWS_DIRENT_EMULATION #ifndef LT_USE_POSIX_DIRENT # ifdef __WINDOWS__ # define LT_USE_WINDOWS_DIRENT_EMULATION # endif /* __WINDOWS__ */ #endif /* LT_USE_POSIX_DIRENT */ #ifdef LT_USE_POSIX_DIRENT # include # define LT_D_NAMLEN(dirent) (strlen((dirent)->d_name)) #else # ifdef LT_USE_WINDOWS_DIRENT_EMULATION # define LT_D_NAMLEN(dirent) (strlen((dirent)->d_name)) # else # define dirent direct # define LT_D_NAMLEN(dirent) ((dirent)->d_namlen) # if HAVE_SYS_NDIR_H # include # endif # if HAVE_SYS_DIR_H # include # endif # if HAVE_NDIR_H # include # endif # endif #endif #if HAVE_ARGZ_H # include #endif #if HAVE_ASSERT_H # include #else # define assert(arg) ((void) 0) #endif #include "ltdl.h" #if WITH_DMALLOC # include #endif /* --- WINDOWS SUPPORT --- */ /* DLL building support on win32 hosts; mostly to workaround their ridiculous implementation of data symbol exporting. */ #ifndef LT_GLOBAL_DATA # if defined(__WINDOWS__) || defined(__CYGWIN__) # ifdef DLL_EXPORT /* defined by libtool (if required) */ # define LT_GLOBAL_DATA __declspec(dllexport) # endif # endif # ifndef LT_GLOBAL_DATA /* static linking or !__WINDOWS__ */ # define LT_GLOBAL_DATA # endif #endif /* fopen() mode flags for reading a text file */ #undef LT_READTEXT_MODE #if defined(__WINDOWS__) || defined(__CYGWIN__) # define LT_READTEXT_MODE "rt" #else # define LT_READTEXT_MODE "r" #endif #ifdef LT_USE_WINDOWS_DIRENT_EMULATION #include #define dirent lt_dirent #define DIR lt_DIR struct dirent { char d_name[2048]; int d_namlen; }; typedef struct _DIR { HANDLE hSearch; WIN32_FIND_DATA Win32FindData; BOOL firsttime; struct dirent file_info; } DIR; #endif /* LT_USE_WINDOWS_DIRENT_EMULATION */ /* --- MANIFEST CONSTANTS --- */ /* Standard libltdl search path environment variable name */ #undef LTDL_SEARCHPATH_VAR #define LTDL_SEARCHPATH_VAR "LTDL_LIBRARY_PATH" /* Standard libtool archive file extension. */ #undef LTDL_ARCHIVE_EXT #define LTDL_ARCHIVE_EXT ".la" /* max. filename length */ #ifndef LT_FILENAME_MAX # define LT_FILENAME_MAX 1024 #endif /* This is the maximum symbol size that won't require malloc/free */ #undef LT_SYMBOL_LENGTH #define LT_SYMBOL_LENGTH 128 /* This accounts for the _LTX_ separator */ #undef LT_SYMBOL_OVERHEAD #define LT_SYMBOL_OVERHEAD 5 /* --- MEMORY HANDLING --- */ /* These are the functions used internally. In addition to making use of the associated function pointers above, they also perform error handling. */ static char *lt_estrdup LT_PARAMS((const char *str)); static lt_ptr lt_emalloc LT_PARAMS((size_t size)); static lt_ptr lt_erealloc LT_PARAMS((lt_ptr addr, size_t size)); /* static lt_ptr rpl_realloc LT_PARAMS((lt_ptr ptr, size_t size)); */ #define rpl_realloc realloc /* These are the pointers that can be changed by the caller: */ LT_GLOBAL_DATA lt_ptr (*lt_dlmalloc) LT_PARAMS((size_t size)) = (lt_ptr (*) LT_PARAMS((size_t))) malloc; LT_GLOBAL_DATA lt_ptr (*lt_dlrealloc) LT_PARAMS((lt_ptr ptr, size_t size)) = (lt_ptr (*) LT_PARAMS((lt_ptr, size_t))) rpl_realloc; LT_GLOBAL_DATA void (*lt_dlfree) LT_PARAMS((lt_ptr ptr)) = (void (*) LT_PARAMS((lt_ptr))) free; /* The following macros reduce the amount of typing needed to cast assigned memory. */ #if WITH_DMALLOC #define LT_DLMALLOC(tp, n) ((tp *) xmalloc ((n) * sizeof(tp))) #define LT_DLREALLOC(tp, p, n) ((tp *) xrealloc ((p), (n) * sizeof(tp))) #define LT_DLFREE(p) \ LT_STMT_START { if (p) (p) = (xfree (p), (lt_ptr) 0); } LT_STMT_END #define LT_EMALLOC(tp, n) ((tp *) xmalloc ((n) * sizeof(tp))) #define LT_EREALLOC(tp, p, n) ((tp *) xrealloc ((p), (n) * sizeof(tp))) #else #define LT_DLMALLOC(tp, n) ((tp *) lt_dlmalloc ((n) * sizeof(tp))) #define LT_DLREALLOC(tp, p, n) ((tp *) lt_dlrealloc ((p), (n) * sizeof(tp))) #define LT_DLFREE(p) \ LT_STMT_START { if (p) (p) = (lt_dlfree (p), (lt_ptr) 0); } LT_STMT_END #define LT_EMALLOC(tp, n) ((tp *) lt_emalloc ((n) * sizeof(tp))) #define LT_EREALLOC(tp, p, n) ((tp *) lt_erealloc ((p), (n) * sizeof(tp))) #endif #define LT_DLMEM_REASSIGN(p, q) LT_STMT_START { \ if ((p) != (q)) { if (p) lt_dlfree (p); (p) = (q); (q) = 0; } \ } LT_STMT_END /* --- REPLACEMENT FUNCTIONS --- */ #undef strdup #define strdup rpl_strdup static char *strdup LT_PARAMS((const char *str)); static char * strdup(str) const char *str; { char *tmp = 0; if (str) { tmp = LT_DLMALLOC (char, 1+ strlen (str)); if (tmp) { strcpy(tmp, str); } } return tmp; } #if ! HAVE_STRCMP #undef strcmp #define strcmp rpl_strcmp static int strcmp LT_PARAMS((const char *str1, const char *str2)); static int strcmp (str1, str2) const char *str1; const char *str2; { if (str1 == str2) return 0; if (str1 == 0) return -1; if (str2 == 0) return 1; for (;*str1 && *str2; ++str1, ++str2) { if (*str1 != *str2) break; } return (int)(*str1 - *str2); } #endif #if ! HAVE_STRCHR # if HAVE_INDEX # define strchr index # else # define strchr rpl_strchr static const char *strchr LT_PARAMS((const char *str, int ch)); static const char* strchr(str, ch) const char *str; int ch; { const char *p; for (p = str; *p != (char)ch && *p != LT_EOS_CHAR; ++p) /*NOWORK*/; return (*p == (char)ch) ? p : 0; } # endif #endif /* !HAVE_STRCHR */ #if ! HAVE_STRRCHR # if HAVE_RINDEX # define strrchr rindex # else # define strrchr rpl_strrchr static const char *strrchr LT_PARAMS((const char *str, int ch)); static const char* strrchr(str, ch) const char *str; int ch; { const char *p, *q = 0; for (p = str; *p != LT_EOS_CHAR; ++p) { if (*p == (char) ch) { q = p; } } return q; } # endif #endif /* NOTE: Neither bcopy nor the memcpy implementation below can reliably handle copying in overlapping areas of memory. Use memmove (for which there is a fallback implmentation below) if you need that behaviour. */ #if ! HAVE_MEMCPY # if HAVE_BCOPY # define memcpy(dest, src, size) bcopy (src, dest, size) # else # define memcpy rpl_memcpy static lt_ptr memcpy LT_PARAMS((lt_ptr dest, const lt_ptr src, size_t size)); static lt_ptr memcpy (dest, src, size) lt_ptr dest; const lt_ptr src; size_t size; { const char * s = src; char * d = dest; size_t i = 0; for (i = 0; i < size; ++i) { d[i] = s[i]; } return dest; } # endif /* !HAVE_BCOPY */ #endif /* !HAVE_MEMCPY */ #if ! HAVE_MEMMOVE # define memmove rpl_memmove static lt_ptr memmove LT_PARAMS((lt_ptr dest, const lt_ptr src, size_t size)); static lt_ptr memmove (dest, src, size) lt_ptr dest; const lt_ptr src; size_t size; { const char * s = src; char * d = dest; size_t i; if (d < s) for (i = 0; i < size; ++i) { d[i] = s[i]; } else if (d > s && size > 0) for (i = size -1; ; --i) { d[i] = s[i]; if (i == 0) break; } return dest; } #endif /* !HAVE_MEMMOVE */ #ifdef LT_USE_WINDOWS_DIRENT_EMULATION static void closedir LT_PARAMS((DIR *entry)); static void closedir(entry) DIR *entry; { assert(entry != (DIR *) NULL); FindClose(entry->hSearch); lt_dlfree((lt_ptr)entry); } static DIR * opendir LT_PARAMS((const char *path)); static DIR* opendir (path) const char *path; { char file_specification[LT_FILENAME_MAX]; DIR *entry; assert(path != (char *) NULL); /* allow space for: path + '\\' '\\' '*' '.' '*' + '\0' */ (void) strncpy (file_specification, path, LT_FILENAME_MAX-6); file_specification[LT_FILENAME_MAX-6] = LT_EOS_CHAR; (void) strcat(file_specification,"\\"); entry = LT_DLMALLOC (DIR,sizeof(DIR)); if (entry != (DIR *) 0) { entry->firsttime = TRUE; entry->hSearch = FindFirstFile(file_specification,&entry->Win32FindData); } if (entry->hSearch == INVALID_HANDLE_VALUE) { (void) strcat(file_specification,"\\*.*"); entry->hSearch = FindFirstFile(file_specification,&entry->Win32FindData); if (entry->hSearch == INVALID_HANDLE_VALUE) { LT_DLFREE (entry); return (DIR *) 0; } } return(entry); } static struct dirent *readdir LT_PARAMS((DIR *entry)); static struct dirent *readdir(entry) DIR *entry; { int status; if (entry == (DIR *) 0) return((struct dirent *) 0); if (!entry->firsttime) { status = FindNextFile(entry->hSearch,&entry->Win32FindData); if (status == 0) return((struct dirent *) 0); } entry->firsttime = FALSE; (void) strncpy(entry->file_info.d_name,entry->Win32FindData.cFileName, LT_FILENAME_MAX-1); entry->file_info.d_name[LT_FILENAME_MAX - 1] = LT_EOS_CHAR; entry->file_info.d_namlen = strlen(entry->file_info.d_name); return(&entry->file_info); } #endif /* LT_USE_WINDOWS_DIRENT_EMULATION */ /* According to Alexandre Oliva , ``realloc is not entirely portable'' In any case we want to use the allocator supplied by the user without burdening them with an lt_dlrealloc function pointer to maintain. Instead implement our own version (with known boundary conditions) using lt_dlmalloc and lt_dlfree. */ /* #undef realloc #define realloc rpl_realloc */ #if 0 /* You can't (re)define realloc unless you also (re)define malloc. Right now, this code uses the size of the *destination* to decide how much to copy. That's not right, but you can't know the size of the source unless you know enough about, or wrote malloc. So this code is disabled... */ static lt_ptr realloc (ptr, size) lt_ptr ptr; size_t size; { if (size == 0) { /* For zero or less bytes, free the original memory */ if (ptr != 0) { lt_dlfree (ptr); } return (lt_ptr) 0; } else if (ptr == 0) { /* Allow reallocation of a NULL pointer. */ return lt_dlmalloc (size); } else { /* Allocate a new block, copy and free the old block. */ lt_ptr mem = lt_dlmalloc (size); if (mem) { memcpy (mem, ptr, size); lt_dlfree (ptr); } /* Note that the contents of PTR are not damaged if there is insufficient memory to realloc. */ return mem; } } #endif #if ! HAVE_ARGZ_APPEND # define argz_append rpl_argz_append static error_t argz_append LT_PARAMS((char **pargz, size_t *pargz_len, const char *buf, size_t buf_len)); static error_t argz_append (pargz, pargz_len, buf, buf_len) char **pargz; size_t *pargz_len; const char *buf; size_t buf_len; { size_t argz_len; char *argz; assert (pargz); assert (pargz_len); assert ((*pargz && *pargz_len) || (!*pargz && !*pargz_len)); /* If nothing needs to be appended, no more work is required. */ if (buf_len == 0) return 0; /* Ensure there is enough room to append BUF_LEN. */ argz_len = *pargz_len + buf_len; argz = LT_DLREALLOC (char, *pargz, argz_len); if (!argz) return ENOMEM; /* Copy characters from BUF after terminating '\0' in ARGZ. */ memcpy (argz + *pargz_len, buf, buf_len); /* Assign new values. */ *pargz = argz; *pargz_len = argz_len; return 0; } #endif /* !HAVE_ARGZ_APPEND */ #if ! HAVE_ARGZ_CREATE_SEP # define argz_create_sep rpl_argz_create_sep static error_t argz_create_sep LT_PARAMS((const char *str, int delim, char **pargz, size_t *pargz_len)); static error_t argz_create_sep (str, delim, pargz, pargz_len) const char *str; int delim; char **pargz; size_t *pargz_len; { size_t argz_len; char *argz = 0; assert (str); assert (pargz); assert (pargz_len); /* Make a copy of STR, but replacing each occurrence of DELIM with '\0'. */ argz_len = 1+ LT_STRLEN (str); if (argz_len) { const char *p; char *q; argz = LT_DLMALLOC (char, argz_len); if (!argz) return ENOMEM; for (p = str, q = argz; *p != LT_EOS_CHAR; ++p) { if (*p == delim) { /* Ignore leading delimiters, and fold consecutive delimiters in STR into a single '\0' in ARGZ. */ if ((q > argz) && (q[-1] != LT_EOS_CHAR)) *q++ = LT_EOS_CHAR; else --argz_len; } else *q++ = *p; } /* Copy terminating LT_EOS_CHAR. */ *q = *p; } /* If ARGZ_LEN has shrunk to nothing, release ARGZ's memory. */ if (!argz_len) LT_DLFREE (argz); /* Assign new values. */ *pargz = argz; *pargz_len = argz_len; return 0; } #endif /* !HAVE_ARGZ_CREATE_SEP */ #if ! HAVE_ARGZ_INSERT # define argz_insert rpl_argz_insert static error_t argz_insert LT_PARAMS((char **pargz, size_t *pargz_len, char *before, const char *entry)); static error_t argz_insert (pargz, pargz_len, before, entry) char **pargz; size_t *pargz_len; char *before; const char *entry; { assert (pargz); assert (pargz_len); assert (entry && *entry); /* No BEFORE address indicates ENTRY should be inserted after the current last element. */ if (!before) return argz_append (pargz, pargz_len, entry, 1+ LT_STRLEN (entry)); /* This probably indicates a programmer error, but to preserve semantics, scan back to the start of an entry if BEFORE points into the middle of it. */ while ((before > *pargz) && (before[-1] != LT_EOS_CHAR)) --before; { size_t entry_len = 1+ LT_STRLEN (entry); size_t argz_len = *pargz_len + entry_len; size_t offset = before - *pargz; char *argz = LT_DLREALLOC (char, *pargz, argz_len); if (!argz) return ENOMEM; /* Make BEFORE point to the equivalent offset in ARGZ that it used to have in *PARGZ incase realloc() moved the block. */ before = argz + offset; /* Move the ARGZ entries starting at BEFORE up into the new space at the end -- making room to copy ENTRY into the resulting gap. */ memmove (before + entry_len, before, *pargz_len - offset); memcpy (before, entry, entry_len); /* Assign new values. */ *pargz = argz; *pargz_len = argz_len; } return 0; } #endif /* !HAVE_ARGZ_INSERT */ #if ! HAVE_ARGZ_NEXT # define argz_next rpl_argz_next static char *argz_next LT_PARAMS((char *argz, size_t argz_len, const char *entry)); static char * argz_next (argz, argz_len, entry) char *argz; size_t argz_len; const char *entry; { assert ((argz && argz_len) || (!argz && !argz_len)); if (entry) { /* Either ARGZ/ARGZ_LEN is empty, or ENTRY points into an address within the ARGZ vector. */ assert ((!argz && !argz_len) || ((argz <= entry) && (entry < (argz + argz_len)))); /* Move to the char immediately after the terminating '\0' of ENTRY. */ entry = 1+ strchr (entry, LT_EOS_CHAR); /* Return either the new ENTRY, or else NULL if ARGZ is exhausted. */ return (entry >= argz + argz_len) ? 0 : (char *) entry; } else { /* This should probably be flagged as a programmer error, since starting an argz_next loop with the iterator set to ARGZ is safer. To preserve semantics, handle the NULL case by returning the start of ARGZ (if any). */ if (argz_len > 0) return argz; else return 0; } } #endif /* !HAVE_ARGZ_NEXT */ #if ! HAVE_ARGZ_STRINGIFY # define argz_stringify rpl_argz_stringify static void argz_stringify LT_PARAMS((char *argz, size_t argz_len, int sep)); static void argz_stringify (argz, argz_len, sep) char *argz; size_t argz_len; int sep; { assert ((argz && argz_len) || (!argz && !argz_len)); if (sep) { --argz_len; /* don't stringify the terminating EOS */ while (--argz_len > 0) { if (argz[argz_len] == LT_EOS_CHAR) argz[argz_len] = sep; } } } #endif /* !HAVE_ARGZ_STRINGIFY */ /* --- TYPE DEFINITIONS -- */ /* This type is used for the array of caller data sets in each handler. */ typedef struct { lt_dlcaller_id key; lt_ptr data; } lt_caller_data; /* --- OPAQUE STRUCTURES DECLARED IN LTDL.H --- */ /* Extract the diagnostic strings from the error table macro in the same order as the enumerated indices in ltdl.h. */ static const char *lt_dlerror_strings[] = { #define LT_ERROR(name, diagnostic) (diagnostic), lt_dlerror_table #undef LT_ERROR 0 }; /* This structure is used for the list of registered loaders. */ struct lt_dlloader { struct lt_dlloader *next; const char *loader_name; /* identifying name for each loader */ const char *sym_prefix; /* prefix for symbols */ lt_module_open *module_open; lt_module_close *module_close; lt_find_sym *find_sym; lt_dlloader_exit *dlloader_exit; lt_user_data dlloader_data; }; struct lt_dlhandle_struct { struct lt_dlhandle_struct *next; lt_dlloader *loader; /* dlopening interface */ lt_dlinfo info; int depcount; /* number of dependencies */ lt_dlhandle *deplibs; /* dependencies */ lt_module module; /* system module handle */ lt_ptr system; /* system specific data */ lt_caller_data *caller_data; /* per caller associated data */ int flags; /* various boolean stats */ }; /* Various boolean flags can be stored in the flags field of an lt_dlhandle_struct... */ #define LT_DLGET_FLAG(handle, flag) (((handle)->flags & (flag)) == (flag)) #define LT_DLSET_FLAG(handle, flag) ((handle)->flags |= (flag)) #define LT_DLRESIDENT_FLAG (0x01 << 0) /* ...add more flags here... */ #define LT_DLIS_RESIDENT(handle) LT_DLGET_FLAG(handle, LT_DLRESIDENT_FLAG) #define LT_DLSTRERROR(name) lt_dlerror_strings[LT_CONC(LT_ERROR_,name)] static const char objdir[] = LTDL_OBJDIR; static const char archive_ext[] = LTDL_ARCHIVE_EXT; #ifdef LTDL_SHLIB_EXT static const char shlib_ext[] = LTDL_SHLIB_EXT; #endif #ifdef LTDL_SYSSEARCHPATH static const char sys_search_path[] = LTDL_SYSSEARCHPATH; #endif /* --- MUTEX LOCKING --- */ /* Macros to make it easier to run the lock functions only if they have been registered. The reason for the complicated lock macro is to ensure that the stored error message from the last error is not accidentally erased if the current function doesn't generate an error of its own. */ #define LT_DLMUTEX_LOCK() LT_STMT_START { \ if (lt_dlmutex_lock_func) (*lt_dlmutex_lock_func)(); \ } LT_STMT_END #define LT_DLMUTEX_UNLOCK() LT_STMT_START { \ if (lt_dlmutex_unlock_func) (*lt_dlmutex_unlock_func)();\ } LT_STMT_END #define LT_DLMUTEX_SETERROR(errormsg) LT_STMT_START { \ if (lt_dlmutex_seterror_func) \ (*lt_dlmutex_seterror_func) (errormsg); \ else lt_dllast_error = (errormsg); } LT_STMT_END #define LT_DLMUTEX_GETERROR(errormsg) LT_STMT_START { \ if (lt_dlmutex_geterror_func) \ (errormsg) = (*lt_dlmutex_geterror_func) (); \ else (errormsg) = lt_dllast_error; } LT_STMT_END /* The mutex functions stored here are global, and are necessarily the same for all threads that wish to share access to libltdl. */ static lt_dlmutex_lock *lt_dlmutex_lock_func = 0; static lt_dlmutex_unlock *lt_dlmutex_unlock_func = 0; static lt_dlmutex_seterror *lt_dlmutex_seterror_func = 0; static lt_dlmutex_geterror *lt_dlmutex_geterror_func = 0; static const char *lt_dllast_error = 0; /* Either set or reset the mutex functions. Either all the arguments must be valid functions, or else all can be NULL to turn off locking entirely. The registered functions should be manipulating a static global lock from the lock() and unlock() callbacks, which needs to be reentrant. */ int lt_dlmutex_register (lock, unlock, seterror, geterror) lt_dlmutex_lock *lock; lt_dlmutex_unlock *unlock; lt_dlmutex_seterror *seterror; lt_dlmutex_geterror *geterror; { lt_dlmutex_unlock *old_unlock = lt_dlmutex_unlock_func; int errors = 0; /* Lock using the old lock() callback, if any. */ LT_DLMUTEX_LOCK (); if ((lock && unlock && seterror && geterror) || !(lock || unlock || seterror || geterror)) { lt_dlmutex_lock_func = lock; lt_dlmutex_unlock_func = unlock; lt_dlmutex_seterror_func = seterror; lt_dlmutex_geterror_func = geterror; } else { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_MUTEX_ARGS)); ++errors; } /* Use the old unlock() callback we saved earlier, if any. Otherwise record any errors using internal storage. */ if (old_unlock) (*old_unlock) (); /* Return the number of errors encountered during the execution of this function. */ return errors; } /* --- ERROR HANDLING --- */ static const char **user_error_strings = 0; static int errorcount = LT_ERROR_MAX; int lt_dladderror (diagnostic) const char *diagnostic; { int errindex = 0; int result = -1; const char **temp = (const char **) 0; assert (diagnostic); LT_DLMUTEX_LOCK (); errindex = errorcount - LT_ERROR_MAX; temp = LT_EREALLOC (const char *, user_error_strings, 1 + errindex); if (temp) { user_error_strings = temp; user_error_strings[errindex] = diagnostic; result = errorcount++; } LT_DLMUTEX_UNLOCK (); return result; } int lt_dlseterror (errindex) int errindex; { int errors = 0; LT_DLMUTEX_LOCK (); if (errindex >= errorcount || errindex < 0) { /* Ack! Error setting the error message! */ LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_ERRORCODE)); ++errors; } else if (errindex < LT_ERROR_MAX) { /* No error setting the error message! */ LT_DLMUTEX_SETERROR (lt_dlerror_strings[errindex]); } else { /* No error setting the error message! */ LT_DLMUTEX_SETERROR (user_error_strings[errindex - LT_ERROR_MAX]); } LT_DLMUTEX_UNLOCK (); return errors; } static lt_ptr lt_emalloc (size) size_t size; { lt_ptr mem = lt_dlmalloc (size); if (size && !mem) LT_DLMUTEX_SETERROR (LT_DLSTRERROR (NO_MEMORY)); return mem; } static lt_ptr lt_erealloc (addr, size) lt_ptr addr; size_t size; { lt_ptr mem = lt_dlrealloc (addr, size); if (size && !mem) LT_DLMUTEX_SETERROR (LT_DLSTRERROR (NO_MEMORY)); return mem; } static char * lt_estrdup (str) const char *str; { char *copy = strdup (str); if (LT_STRLEN (str) && !copy) LT_DLMUTEX_SETERROR (LT_DLSTRERROR (NO_MEMORY)); return copy; } /* --- DLOPEN() INTERFACE LOADER --- */ #if HAVE_LIBDL /* dynamic linking with dlopen/dlsym */ #if HAVE_DLFCN_H # include #endif #if HAVE_SYS_DL_H # include #endif /* We may have to define LT_LAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_LAZY_OR_NOW # ifdef RTLD_LAZY # define LT_LAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_LAZY_OR_NOW DL_LAZY # endif # endif /* !RTLD_LAZY */ #endif #ifndef LT_LAZY_OR_NOW # ifdef RTLD_NOW # define LT_LAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_LAZY_OR_NOW DL_NOW # endif # endif /* !RTLD_NOW */ #endif #ifndef LT_LAZY_OR_NOW # define LT_LAZY_OR_NOW 0 #endif /* !LT_LAZY_OR_NOW */ #if HAVE_DLERROR # define DLERROR(arg) dlerror () #else # define DLERROR(arg) LT_DLSTRERROR (arg) #endif static lt_module sys_dl_open (loader_data, filename) lt_user_data loader_data; const char *filename; { lt_module module = dlopen (filename, LT_LAZY_OR_NOW); if (!module) { LT_DLMUTEX_SETERROR (DLERROR (CANNOT_OPEN)); } return module; } static int sys_dl_close (loader_data, module) lt_user_data loader_data; lt_module module; { int errors = 0; if (dlclose (module) != 0) { LT_DLMUTEX_SETERROR (DLERROR (CANNOT_CLOSE)); ++errors; } return errors; } static lt_ptr sys_dl_sym (loader_data, module, symbol) lt_user_data loader_data; lt_module module; const char *symbol; { lt_ptr address = dlsym (module, symbol); if (!address) { LT_DLMUTEX_SETERROR (DLERROR (SYMBOL_NOT_FOUND)); } return address; } static struct lt_user_dlloader sys_dl = { # ifdef NEED_USCORE "_", # else 0, # endif sys_dl_open, sys_dl_close, sys_dl_sym, 0, 0 }; #endif /* HAVE_LIBDL */ /* --- SHL_LOAD() INTERFACE LOADER --- */ #if HAVE_SHL_LOAD /* dynamic linking with shl_load (HP-UX) (comments from gmodule) */ #ifdef HAVE_DL_H # include #endif /* some flags are missing on some systems, so we provide * harmless defaults. * * Mandatory: * BIND_IMMEDIATE - Resolve symbol references when the library is loaded. * BIND_DEFERRED - Delay code symbol resolution until actual reference. * * Optionally: * BIND_FIRST - Place the library at the head of the symbol search * order. * BIND_NONFATAL - The default BIND_IMMEDIATE behavior is to treat all * unsatisfied symbols as fatal. This flag allows * binding of unsatisfied code symbols to be deferred * until use. * [Perl: For certain libraries, like DCE, deferred * binding often causes run time problems. Adding * BIND_NONFATAL to BIND_IMMEDIATE still allows * unresolved references in situations like this.] * BIND_NOSTART - Do not call the initializer for the shared library * when the library is loaded, nor on a future call to * shl_unload(). * BIND_VERBOSE - Print verbose messages concerning possible * unsatisfied symbols. * * hp9000s700/hp9000s800: * BIND_RESTRICTED - Restrict symbols visible by the library to those * present at library load time. * DYNAMIC_PATH - Allow the loader to dynamically search for the * library specified by the path argument. */ #ifndef DYNAMIC_PATH # define DYNAMIC_PATH 0 #endif #ifndef BIND_RESTRICTED # define BIND_RESTRICTED 0 #endif #define LT_BIND_FLAGS (BIND_IMMEDIATE | BIND_NONFATAL | DYNAMIC_PATH) static lt_module sys_shl_open (loader_data, filename) lt_user_data loader_data; const char *filename; { static shl_t self = (shl_t) 0; lt_module module = shl_load (filename, LT_BIND_FLAGS, 0L); /* Since searching for a symbol against a NULL module handle will also look in everything else that was already loaded and exported with the -E compiler flag, we always cache a handle saved before any modules are loaded. */ if (!self) { lt_ptr address; shl_findsym (&self, "main", TYPE_UNDEFINED, &address); } if (!filename) { module = self; } else { module = shl_load (filename, LT_BIND_FLAGS, 0L); if (!module) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CANNOT_OPEN)); } } return module; } static int sys_shl_close (loader_data, module) lt_user_data loader_data; lt_module module; { int errors = 0; if (module && (shl_unload ((shl_t) (module)) != 0)) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CANNOT_CLOSE)); ++errors; } return errors; } static lt_ptr sys_shl_sym (loader_data, module, symbol) lt_user_data loader_data; lt_module module; const char *symbol; { lt_ptr address = 0; /* sys_shl_open should never return a NULL module handle */ if (module == (lt_module) 0) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_HANDLE)); } else if (!shl_findsym((shl_t*) &module, symbol, TYPE_UNDEFINED, &address)) { if (!address) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (SYMBOL_NOT_FOUND)); } } return address; } static struct lt_user_dlloader sys_shl = { 0, sys_shl_open, sys_shl_close, sys_shl_sym, 0, 0 }; #endif /* HAVE_SHL_LOAD */ /* --- LOADLIBRARY() INTERFACE LOADER --- */ #ifdef __WINDOWS__ /* dynamic linking for Win32 */ #include /* Forward declaration; required to implement handle search below. */ static lt_dlhandle handles; static lt_module sys_wll_open (loader_data, filename) lt_user_data loader_data; const char *filename; { lt_dlhandle cur; lt_module module = 0; const char *errormsg = 0; char *searchname = 0; char *ext; char self_name_buf[MAX_PATH]; if (!filename) { /* Get the name of main module */ *self_name_buf = 0; GetModuleFileName (NULL, self_name_buf, sizeof (self_name_buf)); filename = ext = self_name_buf; } else { ext = strrchr (filename, '.'); } if (ext) { /* FILENAME already has an extension. */ searchname = lt_estrdup (filename); } else { /* Append a `.' to stop Windows from adding an implicit `.dll' extension. */ searchname = LT_EMALLOC (char, 2+ LT_STRLEN (filename)); if (searchname) sprintf (searchname, "%s.", filename); } if (!searchname) return 0; { /* Silence dialog from LoadLibrary on some failures. No way to get the error mode, but to set it, so set it twice to preserve any previous flags. */ UINT errormode = SetErrorMode(SEM_FAILCRITICALERRORS); SetErrorMode(errormode | SEM_FAILCRITICALERRORS); #if defined(__CYGWIN__) { char wpath[MAX_PATH]; cygwin_conv_to_full_win32_path (searchname, wpath); module = LoadLibrary (wpath); } #else module = LoadLibrary (searchname); #endif /* Restore the error mode. */ SetErrorMode(errormode); } LT_DLFREE (searchname); /* libltdl expects this function to fail if it is unable to physically load the library. Sadly, LoadLibrary will search the loaded libraries for a match and return one of them if the path search load fails. We check whether LoadLibrary is returning a handle to an already loaded module, and simulate failure if we find one. */ LT_DLMUTEX_LOCK (); cur = handles; while (cur) { if (!cur->module) { cur = 0; break; } if (cur->module == module) { break; } cur = cur->next; } LT_DLMUTEX_UNLOCK (); if (cur || !module) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CANNOT_OPEN)); module = 0; } return module; } static int sys_wll_close (loader_data, module) lt_user_data loader_data; lt_module module; { int errors = 0; if (FreeLibrary(module) == 0) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CANNOT_CLOSE)); ++errors; } return errors; } static lt_ptr sys_wll_sym (loader_data, module, symbol) lt_user_data loader_data; lt_module module; const char *symbol; { lt_ptr address = GetProcAddress (module, symbol); if (!address) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (SYMBOL_NOT_FOUND)); } return address; } static struct lt_user_dlloader sys_wll = { 0, sys_wll_open, sys_wll_close, sys_wll_sym, 0, 0 }; #endif /* __WINDOWS__ */ /* --- LOAD_ADD_ON() INTERFACE LOADER --- */ #ifdef __BEOS__ /* dynamic linking for BeOS */ #include static lt_module sys_bedl_open (loader_data, filename) lt_user_data loader_data; const char *filename; { image_id image = 0; if (filename) { image = load_add_on (filename); } else { image_info info; int32 cookie = 0; if (get_next_image_info (0, &cookie, &info) == B_OK) image = load_add_on (info.name); } if (image <= 0) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CANNOT_OPEN)); image = 0; } return (lt_module) image; } static int sys_bedl_close (loader_data, module) lt_user_data loader_data; lt_module module; { int errors = 0; if (unload_add_on ((image_id) module) != B_OK) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CANNOT_CLOSE)); ++errors; } return errors; } static lt_ptr sys_bedl_sym (loader_data, module, symbol) lt_user_data loader_data; lt_module module; const char *symbol; { lt_ptr address = 0; image_id image = (image_id) module; if (get_image_symbol (image, symbol, B_SYMBOL_TYPE_ANY, address) != B_OK) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (SYMBOL_NOT_FOUND)); address = 0; } return address; } static struct lt_user_dlloader sys_bedl = { 0, sys_bedl_open, sys_bedl_close, sys_bedl_sym, 0, 0 }; #endif /* __BEOS__ */ /* --- DLD_LINK() INTERFACE LOADER --- */ #if HAVE_DLD /* dynamic linking with dld */ #if HAVE_DLD_H #include #endif static lt_module sys_dld_open (loader_data, filename) lt_user_data loader_data; const char *filename; { lt_module module = strdup (filename); if (dld_link (filename) != 0) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CANNOT_OPEN)); LT_DLFREE (module); module = 0; } return module; } static int sys_dld_close (loader_data, module) lt_user_data loader_data; lt_module module; { int errors = 0; if (dld_unlink_by_file ((char*)(module), 1) != 0) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CANNOT_CLOSE)); ++errors; } else { LT_DLFREE (module); } return errors; } static lt_ptr sys_dld_sym (loader_data, module, symbol) lt_user_data loader_data; lt_module module; const char *symbol; { lt_ptr address = dld_get_func (symbol); if (!address) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (SYMBOL_NOT_FOUND)); } return address; } static struct lt_user_dlloader sys_dld = { 0, sys_dld_open, sys_dld_close, sys_dld_sym, 0, 0 }; #endif /* HAVE_DLD */ /* --- DYLD() MACOSX/DARWIN INTERFACE LOADER --- */ #if HAVE_DYLD #if HAVE_MACH_O_DYLD_H #if !defined(__APPLE_CC__) && !defined(__MWERKS__) && !defined(__private_extern__) /* Is this correct? Does it still function properly? */ #define __private_extern__ extern #endif # include #endif #include /* We have to put some stuff here that isn't in older dyld.h files */ #ifndef ENUM_DYLD_BOOL # define ENUM_DYLD_BOOL # undef FALSE # undef TRUE enum DYLD_BOOL { FALSE, TRUE }; #endif #ifndef LC_REQ_DYLD # define LC_REQ_DYLD 0x80000000 #endif #ifndef LC_LOAD_WEAK_DYLIB # define LC_LOAD_WEAK_DYLIB (0x18 | LC_REQ_DYLD) #endif static const struct mach_header * (*ltdl_NSAddImage)(const char *image_name, unsigned long options) = 0; static NSSymbol (*ltdl_NSLookupSymbolInImage)(const struct mach_header *image,const char *symbolName, unsigned long options) = 0; static enum DYLD_BOOL (*ltdl_NSIsSymbolNameDefinedInImage)(const struct mach_header *image, const char *symbolName) = 0; static enum DYLD_BOOL (*ltdl_NSMakePrivateModulePublic)(NSModule module) = 0; #ifndef NSADDIMAGE_OPTION_NONE #define NSADDIMAGE_OPTION_NONE 0x0 #endif #ifndef NSADDIMAGE_OPTION_RETURN_ON_ERROR #define NSADDIMAGE_OPTION_RETURN_ON_ERROR 0x1 #endif #ifndef NSADDIMAGE_OPTION_WITH_SEARCHING #define NSADDIMAGE_OPTION_WITH_SEARCHING 0x2 #endif #ifndef NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED #define NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED 0x4 #endif #ifndef NSADDIMAGE_OPTION_MATCH_FILENAME_BY_INSTALLNAME #define NSADDIMAGE_OPTION_MATCH_FILENAME_BY_INSTALLNAME 0x8 #endif #ifndef NSLOOKUPSYMBOLINIMAGE_OPTION_BIND #define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND 0x0 #endif #ifndef NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW #define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW 0x1 #endif #ifndef NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_FULLY #define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_FULLY 0x2 #endif #ifndef NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR #define NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR 0x4 #endif static const char * lt_int_dyld_error(othererror) char* othererror; { /* return the dyld error string, or the passed in error string if none */ NSLinkEditErrors ler; int lerno; const char *errstr; const char *file; NSLinkEditError(&ler,&lerno,&file,&errstr); if (!errstr || !strlen(errstr)) errstr = othererror; return errstr; } static const struct mach_header * lt_int_dyld_get_mach_header_from_nsmodule(module) NSModule module; { /* There should probably be an apple dyld api for this */ int i=_dyld_image_count(); int j; const char *modname=NSNameOfModule(module); const struct mach_header *mh=NULL; if (!modname) return NULL; for (j = 0; j < i; j++) { if (!strcmp(_dyld_get_image_name(j),modname)) { mh=_dyld_get_image_header(j); break; } } return mh; } static const char* lt_int_dyld_lib_install_name(mh) const struct mach_header *mh; { /* NSAddImage is also used to get the loaded image, but it only works if the lib is installed, for uninstalled libs we need to check the install_names against each other. Note that this is still broken if DYLD_IMAGE_SUFFIX is set and a different lib was loaded as a result */ int j; struct load_command *lc; unsigned long offset = sizeof(struct mach_header); const char* retStr=NULL; for (j = 0; j < mh->ncmds; j++) { lc = (struct load_command*)(((unsigned long)mh) + offset); if (LC_ID_DYLIB == lc->cmd) { retStr=(char*)(((struct dylib_command*)lc)->dylib.name.offset + (unsigned long)lc); } offset += lc->cmdsize; } return retStr; } static const struct mach_header * lt_int_dyld_match_loaded_lib_by_install_name(const char *name) { int i=_dyld_image_count(); int j; const struct mach_header *mh=NULL; const char *id=NULL; for (j = 0; j < i; j++) { id=lt_int_dyld_lib_install_name(_dyld_get_image_header(j)); if ((id) && (!strcmp(id,name))) { mh=_dyld_get_image_header(j); break; } } return mh; } static NSSymbol lt_int_dyld_NSlookupSymbolInLinkedLibs(symbol,mh) const char *symbol; const struct mach_header *mh; { /* Safe to assume our mh is good */ int j; struct load_command *lc; unsigned long offset = sizeof(struct mach_header); NSSymbol retSym = 0; const struct mach_header *mh1; if ((ltdl_NSLookupSymbolInImage) && NSIsSymbolNameDefined(symbol) ) { for (j = 0; j < mh->ncmds; j++) { lc = (struct load_command*)(((unsigned long)mh) + offset); if ((LC_LOAD_DYLIB == lc->cmd) || (LC_LOAD_WEAK_DYLIB == lc->cmd)) { mh1=lt_int_dyld_match_loaded_lib_by_install_name((char*)(((struct dylib_command*)lc)->dylib.name.offset + (unsigned long)lc)); if (!mh1) { /* Maybe NSAddImage can find it */ mh1=ltdl_NSAddImage((char*)(((struct dylib_command*)lc)->dylib.name.offset + (unsigned long)lc), NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED + NSADDIMAGE_OPTION_WITH_SEARCHING + NSADDIMAGE_OPTION_RETURN_ON_ERROR ); } if (mh1) { retSym = ltdl_NSLookupSymbolInImage(mh1, symbol, NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW | NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR ); if (retSym) break; } } offset += lc->cmdsize; } } return retSym; } static int sys_dyld_init() { int retCode = 0; int err = 0; if (!_dyld_present()) { retCode=1; } else { err = _dyld_func_lookup("__dyld_NSAddImage",(unsigned long*)<dl_NSAddImage); err = _dyld_func_lookup("__dyld_NSLookupSymbolInImage",(unsigned long*)<dl_NSLookupSymbolInImage); err = _dyld_func_lookup("__dyld_NSIsSymbolNameDefinedInImage",(unsigned long*)<dl_NSIsSymbolNameDefinedInImage); err = _dyld_func_lookup("__dyld_NSMakePrivateModulePublic",(unsigned long*)<dl_NSMakePrivateModulePublic); } return retCode; } static lt_module sys_dyld_open (loader_data, filename) lt_user_data loader_data; const char *filename; { lt_module module = 0; NSObjectFileImage ofi = 0; NSObjectFileImageReturnCode ofirc; if (!filename) return (lt_module)-1; ofirc = NSCreateObjectFileImageFromFile(filename, &ofi); switch (ofirc) { case NSObjectFileImageSuccess: module = NSLinkModule(ofi, filename, NSLINKMODULE_OPTION_RETURN_ON_ERROR | NSLINKMODULE_OPTION_PRIVATE | NSLINKMODULE_OPTION_BINDNOW); NSDestroyObjectFileImage(ofi); if (module) ltdl_NSMakePrivateModulePublic(module); break; case NSObjectFileImageInappropriateFile: if (ltdl_NSIsSymbolNameDefinedInImage && ltdl_NSLookupSymbolInImage) { module = (lt_module)ltdl_NSAddImage(filename, NSADDIMAGE_OPTION_RETURN_ON_ERROR); break; } default: LT_DLMUTEX_SETERROR (lt_int_dyld_error(LT_DLSTRERROR(CANNOT_OPEN))); return 0; } if (!module) LT_DLMUTEX_SETERROR (lt_int_dyld_error(LT_DLSTRERROR(CANNOT_OPEN))); return module; } static int sys_dyld_close (loader_data, module) lt_user_data loader_data; lt_module module; { int retCode = 0; int flags = 0; if (module == (lt_module)-1) return 0; #ifdef __BIG_ENDIAN__ if (((struct mach_header *)module)->magic == MH_MAGIC) #else if (((struct mach_header *)module)->magic == MH_CIGAM) #endif { LT_DLMUTEX_SETERROR("Can not close a dylib"); retCode = 1; } else { #if 1 /* Currently, if a module contains c++ static destructors and it is unloaded, we get a segfault in atexit(), due to compiler and dynamic loader differences of opinion, this works around that. */ if ((const struct section *)NULL != getsectbynamefromheader(lt_int_dyld_get_mach_header_from_nsmodule(module), "__DATA","__mod_term_func")) { flags += NSUNLINKMODULE_OPTION_KEEP_MEMORY_MAPPED; } #endif #ifdef __ppc__ flags += NSUNLINKMODULE_OPTION_RESET_LAZY_REFERENCES; #endif if (!NSUnLinkModule(module,flags)) { retCode=1; LT_DLMUTEX_SETERROR (lt_int_dyld_error(LT_DLSTRERROR(CANNOT_CLOSE))); } } return retCode; } static lt_ptr sys_dyld_sym (loader_data, module, symbol) lt_user_data loader_data; lt_module module; const char *symbol; { lt_ptr address = 0; NSSymbol *nssym = 0; void *unused; const struct mach_header *mh=NULL; char saveError[256] = "Symbol not found"; if (module == (lt_module)-1) { _dyld_lookup_and_bind(symbol,(unsigned long*)&address,&unused); return address; } #ifdef __BIG_ENDIAN__ if (((struct mach_header *)module)->magic == MH_MAGIC) #else if (((struct mach_header *)module)->magic == MH_CIGAM) #endif { if (ltdl_NSIsSymbolNameDefinedInImage && ltdl_NSLookupSymbolInImage) { mh=module; if (ltdl_NSIsSymbolNameDefinedInImage((struct mach_header*)module,symbol)) { nssym = ltdl_NSLookupSymbolInImage((struct mach_header*)module, symbol, NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW | NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR ); } } } else { nssym = NSLookupSymbolInModule(module, symbol); } if (!nssym) { strncpy(saveError, lt_int_dyld_error(LT_DLSTRERROR(SYMBOL_NOT_FOUND)), 255); saveError[255] = 0; if (!mh) mh=lt_int_dyld_get_mach_header_from_nsmodule(module); nssym = lt_int_dyld_NSlookupSymbolInLinkedLibs(symbol,mh); } if (!nssym) { LT_DLMUTEX_SETERROR (saveError); return NULL; } return NSAddressOfSymbol(nssym); } static struct lt_user_dlloader sys_dyld = { "_", sys_dyld_open, sys_dyld_close, sys_dyld_sym, 0, 0 }; #endif /* HAVE_DYLD */ /* --- DLPREOPEN() INTERFACE LOADER --- */ /* emulate dynamic linking using preloaded_symbols */ typedef struct lt_dlsymlists_t { struct lt_dlsymlists_t *next; const lt_dlsymlist *syms; } lt_dlsymlists_t; static const lt_dlsymlist *default_preloaded_symbols = 0; static lt_dlsymlists_t *preloaded_symbols = 0; static int presym_init (loader_data) lt_user_data loader_data; { int errors = 0; LT_DLMUTEX_LOCK (); preloaded_symbols = 0; if (default_preloaded_symbols) { errors = lt_dlpreload (default_preloaded_symbols); } LT_DLMUTEX_UNLOCK (); return errors; } static int presym_free_symlists () { lt_dlsymlists_t *lists; LT_DLMUTEX_LOCK (); lists = preloaded_symbols; while (lists) { lt_dlsymlists_t *tmp = lists; lists = lists->next; LT_DLFREE (tmp); } preloaded_symbols = 0; LT_DLMUTEX_UNLOCK (); return 0; } static int presym_exit (loader_data) lt_user_data loader_data; { presym_free_symlists (); return 0; } static int presym_add_symlist (preloaded) const lt_dlsymlist *preloaded; { lt_dlsymlists_t *tmp; lt_dlsymlists_t *lists; int errors = 0; LT_DLMUTEX_LOCK (); lists = preloaded_symbols; while (lists) { if (lists->syms == preloaded) { goto done; } lists = lists->next; } tmp = LT_EMALLOC (lt_dlsymlists_t, 1); if (tmp) { memset (tmp, 0, sizeof(lt_dlsymlists_t)); tmp->syms = preloaded; tmp->next = preloaded_symbols; preloaded_symbols = tmp; } else { ++errors; } done: LT_DLMUTEX_UNLOCK (); return errors; } static lt_module presym_open (loader_data, filename) lt_user_data loader_data; const char *filename; { lt_dlsymlists_t *lists; lt_module module = (lt_module) 0; LT_DLMUTEX_LOCK (); lists = preloaded_symbols; if (!lists) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (NO_SYMBOLS)); goto done; } /* Can't use NULL as the reflective symbol header, as NULL is used to mark the end of the entire symbol list. Self-dlpreopened symbols follow this magic number, chosen to be an unlikely clash with a real module name. */ if (!filename) { filename = "@PROGRAM@"; } while (lists) { const lt_dlsymlist *syms = lists->syms; while (syms->name) { if (!syms->address && strcmp(syms->name, filename) == 0) { module = (lt_module) syms; goto done; } ++syms; } lists = lists->next; } LT_DLMUTEX_SETERROR (LT_DLSTRERROR (FILE_NOT_FOUND)); done: LT_DLMUTEX_UNLOCK (); return module; } static int presym_close (loader_data, module) lt_user_data loader_data; lt_module module; { /* Just to silence gcc -Wall */ module = 0; return 0; } static lt_ptr presym_sym (loader_data, module, symbol) lt_user_data loader_data; lt_module module; const char *symbol; { lt_dlsymlist *syms = (lt_dlsymlist*) module; ++syms; while (syms->address) { if (strcmp(syms->name, symbol) == 0) { return syms->address; } ++syms; } LT_DLMUTEX_SETERROR (LT_DLSTRERROR (SYMBOL_NOT_FOUND)); return 0; } static struct lt_user_dlloader presym = { 0, presym_open, presym_close, presym_sym, presym_exit, 0 }; /* --- DYNAMIC MODULE LOADING --- */ /* The type of a function used at each iteration of foreach_dirinpath(). */ typedef int foreach_callback_func LT_PARAMS((char *filename, lt_ptr data1, lt_ptr data2)); /* foreachfile_callback itself calls a function of this type: */ typedef int file_worker_func LT_PARAMS((const char *filename, void *data)); static int foreach_dirinpath LT_PARAMS((const char *search_path, const char *base_name, foreach_callback_func *func, lt_ptr data1, lt_ptr data2)); static int find_file_callback LT_PARAMS((char *filename, lt_ptr data, lt_ptr ignored)); static int find_handle_callback LT_PARAMS((char *filename, lt_ptr data, lt_ptr ignored)); static int foreachfile_callback LT_PARAMS((char *filename, lt_ptr data1, lt_ptr data2)); static int canonicalize_path LT_PARAMS((const char *path, char **pcanonical)); static int argzize_path LT_PARAMS((const char *path, char **pargz, size_t *pargz_len)); static FILE *find_file LT_PARAMS((const char *search_path, const char *base_name, char **pdir)); static lt_dlhandle *find_handle LT_PARAMS((const char *search_path, const char *base_name, lt_dlhandle *handle)); static int find_module LT_PARAMS((lt_dlhandle *handle, const char *dir, const char *libdir, const char *dlname, const char *old_name, int installed)); static int free_vars LT_PARAMS((char *dlname, char *oldname, char *libdir, char *deplibs)); static int load_deplibs LT_PARAMS((lt_dlhandle handle, char *deplibs)); static int trim LT_PARAMS((char **dest, const char *str)); static int try_dlopen LT_PARAMS((lt_dlhandle *handle, const char *filename)); static int tryall_dlopen LT_PARAMS((lt_dlhandle *handle, const char *filename, const char * useloader)); static int unload_deplibs LT_PARAMS((lt_dlhandle handle)); static int lt_argz_insert LT_PARAMS((char **pargz, size_t *pargz_len, char *before, const char *entry)); static int lt_argz_insertinorder LT_PARAMS((char **pargz, size_t *pargz_len, const char *entry)); static int lt_argz_insertdir LT_PARAMS((char **pargz, size_t *pargz_len, const char *dirnam, struct dirent *dp)); static int lt_dlpath_insertdir LT_PARAMS((char **ppath, char *before, const char *dir)); static int list_files_by_dir LT_PARAMS((const char *dirnam, char **pargz, size_t *pargz_len)); static int file_not_found LT_PARAMS((void)); static char *user_search_path= 0; static lt_dlloader *loaders = 0; static lt_dlhandle handles = 0; static int initialized = 0; /* Initialize libltdl. */ int lt_dlinit () { int errors = 0; LT_DLMUTEX_LOCK (); /* Initialize only at first call. */ if (++initialized == 1) { handles = 0; user_search_path = 0; /* empty search path */ #if HAVE_LIBDL errors += lt_dlloader_add (lt_dlloader_next (0), &sys_dl, "dlopen"); #endif #if HAVE_SHL_LOAD errors += lt_dlloader_add (lt_dlloader_next (0), &sys_shl, "dlopen"); #endif #ifdef __WINDOWS__ errors += lt_dlloader_add (lt_dlloader_next (0), &sys_wll, "dlopen"); #endif #ifdef __BEOS__ errors += lt_dlloader_add (lt_dlloader_next (0), &sys_bedl, "dlopen"); #endif #if HAVE_DLD errors += lt_dlloader_add (lt_dlloader_next (0), &sys_dld, "dld"); #endif #if HAVE_DYLD errors += lt_dlloader_add (lt_dlloader_next (0), &sys_dyld, "dyld"); errors += sys_dyld_init(); #endif errors += lt_dlloader_add (lt_dlloader_next (0), &presym, "dlpreload"); if (presym_init (presym.dlloader_data)) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INIT_LOADER)); ++errors; } else if (errors != 0) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (DLOPEN_NOT_SUPPORTED)); ++errors; } } LT_DLMUTEX_UNLOCK (); return errors; } int lt_dlpreload (preloaded) const lt_dlsymlist *preloaded; { int errors = 0; if (preloaded) { errors = presym_add_symlist (preloaded); } else { presym_free_symlists(); LT_DLMUTEX_LOCK (); if (default_preloaded_symbols) { errors = lt_dlpreload (default_preloaded_symbols); } LT_DLMUTEX_UNLOCK (); } return errors; } int lt_dlpreload_default (preloaded) const lt_dlsymlist *preloaded; { LT_DLMUTEX_LOCK (); default_preloaded_symbols = preloaded; LT_DLMUTEX_UNLOCK (); return 0; } int lt_dlexit () { /* shut down libltdl */ lt_dlloader *loader; int errors = 0; LT_DLMUTEX_LOCK (); loader = loaders; if (!initialized) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (SHUTDOWN)); ++errors; goto done; } /* shut down only at last call. */ if (--initialized == 0) { int level; while (handles && LT_DLIS_RESIDENT (handles)) { handles = handles->next; } /* close all modules */ for (level = 1; handles; ++level) { lt_dlhandle cur = handles; int saw_nonresident = 0; while (cur) { lt_dlhandle tmp = cur; cur = cur->next; if (!LT_DLIS_RESIDENT (tmp)) saw_nonresident = 1; if (!LT_DLIS_RESIDENT (tmp) && tmp->info.ref_count <= level) { if (lt_dlclose (tmp)) { ++errors; } /* Make sure that the handle pointed to by 'cur' still exists. lt_dlclose recursively closes dependent libraries which removes them from the linked list. One of these might be the one pointed to by 'cur'. */ if (cur) { for (tmp = handles; tmp; tmp = tmp->next) if (tmp == cur) break; if (! tmp) cur = handles; } } } /* done if only resident modules are left */ if (!saw_nonresident) break; } /* close all loaders */ while (loader) { lt_dlloader *next = loader->next; lt_user_data data = loader->dlloader_data; if (loader->dlloader_exit && loader->dlloader_exit (data)) { ++errors; } LT_DLMEM_REASSIGN (loader, next); } loaders = 0; } done: LT_DLMUTEX_UNLOCK (); return errors; } static int tryall_dlopen (handle, filename, useloader) lt_dlhandle *handle; const char *filename; const char *useloader; { lt_dlhandle cur; lt_dlloader *loader; const char *saved_error; int errors = 0; LT_DLMUTEX_GETERROR (saved_error); LT_DLMUTEX_LOCK (); cur = handles; loader = loaders; /* check whether the module was already opened */ while (cur) { /* try to dlopen the program itself? */ if (!cur->info.filename && !filename) { break; } if (cur->info.filename && filename && strcmp (cur->info.filename, filename) == 0) { break; } cur = cur->next; } if (cur) { ++cur->info.ref_count; *handle = cur; goto done; } cur = *handle; if (filename) { /* Comment out the check of file permissions using access. This call seems to always return -1 with error EACCES. */ /* We need to catch missing file errors early so that file_not_found() can detect what happened. if (access (filename, R_OK) != 0) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (FILE_NOT_FOUND)); ++errors; goto done; } */ cur->info.filename = lt_estrdup (filename); if (!cur->info.filename) { ++errors; goto done; } } else { cur->info.filename = 0; } while (loader) { if (useloader && strcmp(loader->loader_name, useloader)) { loader = loader->next; continue; } lt_user_data data = loader->dlloader_data; cur->module = loader->module_open (data, filename); if (cur->module != 0) { break; } loader = loader->next; } if (!loader) { LT_DLFREE (cur->info.filename); ++errors; goto done; } cur->loader = loader; LT_DLMUTEX_SETERROR (saved_error); done: LT_DLMUTEX_UNLOCK (); return errors; } static int tryall_dlopen_module (handle, prefix, dirname, dlname) lt_dlhandle *handle; const char *prefix; const char *dirname; const char *dlname; { int error = 0; char *filename = 0; size_t filename_len = 0; size_t dirname_len = LT_STRLEN (dirname); assert (handle); assert (dirname); assert (dlname); #ifdef LT_DIRSEP_CHAR /* Only canonicalized names (i.e. with DIRSEP chars already converted) should make it into this function: */ assert (strchr (dirname, LT_DIRSEP_CHAR) == 0); #endif if (dirname_len > 0) if (dirname[dirname_len -1] == '/') --dirname_len; filename_len = dirname_len + 1 + LT_STRLEN (dlname); /* Allocate memory, and combine DIRNAME and MODULENAME into it. The PREFIX (if any) is handled below. */ filename = LT_EMALLOC (char, dirname_len + 1 + filename_len + 1); if (!filename) return 1; sprintf (filename, "%.*s/%s", (int) dirname_len, dirname, dlname); /* Now that we have combined DIRNAME and MODULENAME, if there is also a PREFIX to contend with, simply recurse with the arguments shuffled. Otherwise, attempt to open FILENAME as a module. */ if (prefix) { error += tryall_dlopen_module (handle, (const char *) 0, prefix, filename); } else if (tryall_dlopen (handle, filename, NULL) != 0) { ++error; } LT_DLFREE (filename); return error; } static int find_module (handle, dir, libdir, dlname, old_name, installed) lt_dlhandle *handle; const char *dir; const char *libdir; const char *dlname; const char *old_name; int installed; { /* Try to open the old library first; if it was dlpreopened, we want the preopened version of it, even if a dlopenable module is available. */ if (old_name && tryall_dlopen (handle, old_name, "dlpreload") == 0) { return 0; } /* Try to open the dynamic library. */ if (dlname) { /* try to open the installed module */ if (installed && libdir) { if (tryall_dlopen_module (handle, (const char *) 0, libdir, dlname) == 0) return 0; } /* try to open the not-installed module */ if (!installed) { if (tryall_dlopen_module (handle, dir, objdir, dlname) == 0) return 0; } /* maybe it was moved to another directory */ { if (dir && (tryall_dlopen_module (handle, (const char *) 0, dir, dlname) == 0)) return 0; } } return 1; } static int canonicalize_path (path, pcanonical) const char *path; char **pcanonical; { char *canonical = 0; assert (path && *path); assert (pcanonical); canonical = LT_EMALLOC (char, 1+ LT_STRLEN (path)); if (!canonical) return 1; { size_t dest = 0; size_t src; for (src = 0; path[src] != LT_EOS_CHAR; ++src) { /* Path separators are not copied to the beginning or end of the destination, or if another separator would follow immediately. */ if (path[src] == LT_PATHSEP_CHAR) { if ((dest == 0) || (path[1+ src] == LT_PATHSEP_CHAR) || (path[1+ src] == LT_EOS_CHAR)) continue; } /* Anything other than a directory separator is copied verbatim. */ if ((path[src] != '/') #ifdef LT_DIRSEP_CHAR && (path[src] != LT_DIRSEP_CHAR) #endif ) { canonical[dest++] = path[src]; } /* Directory separators are converted and copied only if they are not at the end of a path -- i.e. before a path separator or NULL terminator. */ else if ((path[1+ src] != LT_PATHSEP_CHAR) && (path[1+ src] != LT_EOS_CHAR) #ifdef LT_DIRSEP_CHAR && (path[1+ src] != LT_DIRSEP_CHAR) #endif && (path[1+ src] != '/')) { canonical[dest++] = '/'; } } /* Add an end-of-string marker at the end. */ canonical[dest] = LT_EOS_CHAR; } /* Assign new value. */ *pcanonical = canonical; return 0; } static int argzize_path (path, pargz, pargz_len) const char *path; char **pargz; size_t *pargz_len; { error_t error; assert (path); assert (pargz); assert (pargz_len); if ((error = argz_create_sep (path, LT_PATHSEP_CHAR, pargz, pargz_len))) { switch (error) { case ENOMEM: LT_DLMUTEX_SETERROR (LT_DLSTRERROR (NO_MEMORY)); break; default: LT_DLMUTEX_SETERROR (LT_DLSTRERROR (UNKNOWN)); break; } return 1; } return 0; } /* Repeatedly call FUNC with each LT_PATHSEP_CHAR delimited element of SEARCH_PATH and references to DATA1 and DATA2, until FUNC returns non-zero or all elements are exhausted. If BASE_NAME is non-NULL, it is appended to each SEARCH_PATH element before FUNC is called. */ static int foreach_dirinpath (search_path, base_name, func, data1, data2) const char *search_path; const char *base_name; foreach_callback_func *func; lt_ptr data1; lt_ptr data2; { int result = 0; int filenamesize = 0; size_t lenbase = LT_STRLEN (base_name); size_t argz_len = 0; char *argz = 0; char *filename = 0; char *canonical = 0; LT_DLMUTEX_LOCK (); if (!search_path || !*search_path) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (FILE_NOT_FOUND)); goto cleanup; } if (canonicalize_path (search_path, &canonical) != 0) goto cleanup; if (argzize_path (canonical, &argz, &argz_len) != 0) goto cleanup; { char *dir_name = 0; while ((dir_name = argz_next (argz, argz_len, dir_name))) { size_t lendir = LT_STRLEN (dir_name); if (lendir +1 +lenbase >= filenamesize) { LT_DLFREE (filename); filenamesize = lendir +1 +lenbase +1; /* "/d" + '/' + "f" + '\0' */ filename = LT_EMALLOC (char, filenamesize); if (!filename) goto cleanup; } assert (filenamesize > lendir); strcpy (filename, dir_name); if (base_name && *base_name) { if (filename[lendir -1] != '/') filename[lendir++] = '/'; strcpy (filename +lendir, base_name); } if ((result = (*func) (filename, data1, data2))) { break; } } } cleanup: LT_DLFREE (argz); LT_DLFREE (canonical); LT_DLFREE (filename); LT_DLMUTEX_UNLOCK (); return result; } /* If FILEPATH can be opened, store the name of the directory component in DATA1, and the opened FILE* structure address in DATA2. Otherwise DATA1 is unchanged, but DATA2 is set to a pointer to NULL. */ static int find_file_callback (filename, data1, data2) char *filename; lt_ptr data1; lt_ptr data2; { char **pdir = (char **) data1; FILE **pfile = (FILE **) data2; int is_done = 0; assert (filename && *filename); assert (pdir); assert (pfile); if ((*pfile = fopen (filename, LT_READTEXT_MODE))) { char *dirend = strrchr (filename, '/'); if (dirend > filename) *dirend = LT_EOS_CHAR; LT_DLFREE (*pdir); *pdir = lt_estrdup (filename); is_done = (*pdir == 0) ? -1 : 1; } return is_done; } static FILE * find_file (search_path, base_name, pdir) const char *search_path; const char *base_name; char **pdir; { FILE *file = 0; foreach_dirinpath (search_path, base_name, find_file_callback, pdir, &file); return file; } static int find_handle_callback (filename, data, ignored) char *filename; lt_ptr data; lt_ptr ignored; { lt_dlhandle *handle = (lt_dlhandle *) data; int notfound = access (filename, R_OK); /* Bail out if file cannot be read... */ if (notfound) return 0; /* Try to dlopen the file, but do not continue searching in any case. */ if (tryall_dlopen (handle, filename,NULL) != 0) *handle = 0; return 1; } /* If HANDLE was found return it, otherwise return 0. If HANDLE was found but could not be opened, *HANDLE will be set to 0. */ static lt_dlhandle * find_handle (search_path, base_name, handle) const char *search_path; const char *base_name; lt_dlhandle *handle; { if (!search_path) return 0; if (!foreach_dirinpath (search_path, base_name, find_handle_callback, handle, 0)) return 0; return handle; } static int load_deplibs (handle, deplibs) lt_dlhandle handle; char *deplibs; { #if LTDL_DLOPEN_DEPLIBS char *p, *save_search_path = 0; int depcount = 0; int i; char **names = 0; #endif int errors = 0; handle->depcount = 0; #if LTDL_DLOPEN_DEPLIBS if (!deplibs) { return errors; } ++errors; LT_DLMUTEX_LOCK (); if (user_search_path) { save_search_path = lt_estrdup (user_search_path); if (!save_search_path) goto cleanup; } /* extract search paths and count deplibs */ p = deplibs; while (*p) { if (!isspace ((int) *p)) { char *end = p+1; while (*end && !isspace((int) *end)) { ++end; } if (strncmp(p, "-L", 2) == 0 || strncmp(p, "-R", 2) == 0) { char save = *end; *end = 0; /* set a temporary string terminator */ if (lt_dladdsearchdir(p+2)) { goto cleanup; } *end = save; } else { ++depcount; } p = end; } else { ++p; } } if (!depcount) { errors = 0; goto cleanup; } names = LT_EMALLOC (char *, depcount * sizeof (char*)); if (!names) goto cleanup; /* now only extract the actual deplibs */ depcount = 0; p = deplibs; while (*p) { if (isspace ((int) *p)) { ++p; } else { char *end = p+1; while (*end && !isspace ((int) *end)) { ++end; } if (strncmp(p, "-L", 2) != 0 && strncmp(p, "-R", 2) != 0) { char *name; char save = *end; *end = 0; /* set a temporary string terminator */ if (strncmp(p, "-l", 2) == 0) { size_t name_len = 3+ /* "lib" */ LT_STRLEN (p + 2); name = LT_EMALLOC (char, 1+ name_len); if (name) sprintf (name, "lib%s", p+2); } else name = lt_estrdup(p); if (!name) goto cleanup_names; names[depcount++] = name; *end = save; } p = end; } } /* load the deplibs (in reverse order) At this stage, don't worry if the deplibs do not load correctly, they may already be statically linked into the loading application for instance. There will be a more enlightening error message later on if the loaded module cannot resolve all of its symbols. */ if (depcount) { int j = 0; handle->deplibs = (lt_dlhandle*) LT_EMALLOC (lt_dlhandle *, depcount); if (!handle->deplibs) goto cleanup_names; for (i = 0; i < depcount; ++i) { handle->deplibs[j] = lt_dlopenext(names[depcount-1-i]); if (handle->deplibs[j]) { ++j; } } handle->depcount = j; /* Number of successfully loaded deplibs */ errors = 0; } cleanup_names: for (i = 0; i < depcount; ++i) { LT_DLFREE (names[i]); } cleanup: LT_DLFREE (names); /* restore the old search path */ if (user_search_path) { LT_DLFREE (user_search_path); user_search_path = save_search_path; } LT_DLMUTEX_UNLOCK (); #endif return errors; } static int unload_deplibs (handle) lt_dlhandle handle; { int i; int errors = 0; if (handle->depcount) { for (i = 0; i < handle->depcount; ++i) { if (!LT_DLIS_RESIDENT (handle->deplibs[i])) { errors += lt_dlclose (handle->deplibs[i]); } } LT_DLFREE (handle->deplibs); } return errors; } static int trim (dest, str) char **dest; const char *str; { /* remove the leading and trailing "'" from str and store the result in dest */ const char *end = strrchr (str, '\''); size_t len = LT_STRLEN (str); char *tmp; LT_DLFREE (*dest); if (!end) return 1; if (len > 3 && str[0] == '\'') { tmp = LT_EMALLOC (char, end - str); if (!tmp) return 1; strncpy(tmp, &str[1], (end - str) - 1); tmp[(end - str) - 1] = LT_EOS_CHAR; *dest = tmp; } else { *dest = 0; } return 0; } static int free_vars (dlname, oldname, libdir, deplibs) char *dlname; char *oldname; char *libdir; char *deplibs; { LT_DLFREE (dlname); LT_DLFREE (oldname); LT_DLFREE (libdir); LT_DLFREE (deplibs); return 0; } static int try_dlopen (phandle, filename) lt_dlhandle *phandle; const char *filename; { const char * ext = 0; const char * saved_error = 0; char * canonical = 0; char * base_name = 0; char * dir = 0; char * name = 0; int errors = 0; lt_dlhandle newhandle; assert (phandle); assert (*phandle == 0); LT_DLMUTEX_GETERROR (saved_error); /* dlopen self? */ if (!filename) { *phandle = (lt_dlhandle) LT_EMALLOC (struct lt_dlhandle_struct, 1); if (*phandle == 0) return 1; memset (*phandle, 0, sizeof(struct lt_dlhandle_struct)); newhandle = *phandle; /* lt_dlclose()ing yourself is very bad! Disallow it. */ LT_DLSET_FLAG (*phandle, LT_DLRESIDENT_FLAG); if (tryall_dlopen (&newhandle, 0, NULL) != 0) { LT_DLFREE (*phandle); return 1; } goto register_handle; } assert (filename && *filename); /* Doing this immediately allows internal functions to safely assume only canonicalized paths are passed. */ if (canonicalize_path (filename, &canonical) != 0) { ++errors; goto cleanup; } /* If the canonical module name is a path (relative or absolute) then split it into a directory part and a name part. */ base_name = strrchr (canonical, '/'); if (base_name) { size_t dirlen = (1+ base_name) - canonical; dir = LT_EMALLOC (char, 1+ dirlen); if (!dir) { ++errors; goto cleanup; } strncpy (dir, canonical, dirlen); dir[dirlen] = LT_EOS_CHAR; ++base_name; } else base_name = canonical; assert (base_name && *base_name); /* Check whether we are opening a libtool module (.la extension). */ ext = strrchr (base_name, '.'); if (ext && strcmp (ext, archive_ext) == 0) { /* this seems to be a libtool module */ FILE * file = 0; char * dlname = 0; char * old_name = 0; char * libdir = 0; char * deplibs = 0; char * line = 0; size_t line_len; /* if we can't find the installed flag, it is probably an installed libtool archive, produced with an old version of libtool */ int installed = 1; /* extract the module name from the file name */ name = LT_EMALLOC (char, ext - base_name + 1); if (!name) { ++errors; goto cleanup; } /* canonicalize the module name */ { size_t i; for (i = 0; i < ext - base_name; ++i) { if (isalnum ((int)(base_name[i]))) { name[i] = base_name[i]; } else { name[i] = '_'; } } name[ext - base_name] = LT_EOS_CHAR; } /* Now try to open the .la file. If there is no directory name component, try to find it first in user_search_path and then other prescribed paths. Otherwise (or in any case if the module was not yet found) try opening just the module name as passed. */ if (!dir) { const char *search_path; LT_DLMUTEX_LOCK (); search_path = user_search_path; if (search_path) file = find_file (user_search_path, base_name, &dir); LT_DLMUTEX_UNLOCK (); if (!file) { search_path = getenv (LTDL_SEARCHPATH_VAR); if (search_path) file = find_file (search_path, base_name, &dir); } #ifdef LTDL_SHLIBPATH_VAR if (!file) { search_path = getenv (LTDL_SHLIBPATH_VAR); if (search_path) file = find_file (search_path, base_name, &dir); } #endif #ifdef LTDL_SYSSEARCHPATH if (!file && *sys_search_path) { file = find_file (sys_search_path, base_name, &dir); } #endif } else { file = fopen (filename, LT_READTEXT_MODE); } /* If we didn't find the file by now, it really isn't there. Set the status flag, and bail out. */ if (!file) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (FILE_NOT_FOUND)); ++errors; goto cleanup; } line_len = LT_FILENAME_MAX; line = LT_EMALLOC (char, line_len); if (!line) { fclose (file); ++errors; goto cleanup; } /* read the .la file */ while (!feof (file)) { line[line_len-2] = '\0'; if (!fgets (line, (int) line_len, file)) { break; } /* Handle the case where we occasionally need to read a line that is longer than the initial buffer size. Behave even if the file contains NUL bytes due to corruption. */ while (line[line_len-2] != '\0' && line[line_len-2] != '\n' && !feof (file)) { line = LT_DLREALLOC (char, line, line_len *2); line[line_len*2 - 2] = '\0'; if (!fgets (&line[line_len -1], (int) line_len +1, file)) { break; } line_len *= 2; } if (line[0] == '\n' || line[0] == '#') { continue; } #undef STR_DLNAME #define STR_DLNAME "dlname=" if (strncmp (line, STR_DLNAME, sizeof (STR_DLNAME) - 1) == 0) { errors += trim (&dlname, &line[sizeof (STR_DLNAME) - 1]); } #undef STR_OLD_LIBRARY #define STR_OLD_LIBRARY "old_library=" else if (strncmp (line, STR_OLD_LIBRARY, sizeof (STR_OLD_LIBRARY) - 1) == 0) { errors += trim (&old_name, &line[sizeof (STR_OLD_LIBRARY) - 1]); } #undef STR_LIBDIR #define STR_LIBDIR "libdir=" else if (strncmp (line, STR_LIBDIR, sizeof (STR_LIBDIR) - 1) == 0) { errors += trim (&libdir, &line[sizeof(STR_LIBDIR) - 1]); } #undef STR_DL_DEPLIBS #define STR_DL_DEPLIBS "dependency_libs=" else if (strncmp (line, STR_DL_DEPLIBS, sizeof (STR_DL_DEPLIBS) - 1) == 0) { errors += trim (&deplibs, &line[sizeof (STR_DL_DEPLIBS) - 1]); } else if (strcmp (line, "installed=yes\n") == 0) { installed = 1; } else if (strcmp (line, "installed=no\n") == 0) { installed = 0; } #undef STR_LIBRARY_NAMES #define STR_LIBRARY_NAMES "library_names=" else if (! dlname && strncmp (line, STR_LIBRARY_NAMES, sizeof (STR_LIBRARY_NAMES) - 1) == 0) { char *last_libname; errors += trim (&dlname, &line[sizeof (STR_LIBRARY_NAMES) - 1]); if (!errors && dlname && (last_libname = strrchr (dlname, ' ')) != 0) { last_libname = lt_estrdup (last_libname + 1); if (!last_libname) { ++errors; goto cleanup; } LT_DLMEM_REASSIGN (dlname, last_libname); } } if (errors) break; } fclose (file); LT_DLFREE (line); /* allocate the handle */ *phandle = (lt_dlhandle) LT_EMALLOC (struct lt_dlhandle_struct, 1); if (*phandle == 0) ++errors; if (errors) { free_vars (dlname, old_name, libdir, deplibs); LT_DLFREE (*phandle); goto cleanup; } assert (*phandle); memset (*phandle, 0, sizeof(struct lt_dlhandle_struct)); if (load_deplibs (*phandle, deplibs) == 0) { newhandle = *phandle; /* find_module may replace newhandle */ if (find_module (&newhandle, dir, libdir, dlname, old_name, installed)) { unload_deplibs (*phandle); ++errors; } } else { ++errors; } free_vars (dlname, old_name, libdir, deplibs); if (errors) { LT_DLFREE (*phandle); goto cleanup; } if (*phandle != newhandle) { unload_deplibs (*phandle); } } else { /* not a libtool module */ *phandle = (lt_dlhandle) LT_EMALLOC (struct lt_dlhandle_struct, 1); if (*phandle == 0) { ++errors; goto cleanup; } memset (*phandle, 0, sizeof (struct lt_dlhandle_struct)); newhandle = *phandle; /* If the module has no directory name component, try to find it first in user_search_path and then other prescribed paths. Otherwise (or in any case if the module was not yet found) try opening just the module name as passed. */ if ((dir || (!find_handle (user_search_path, base_name, &newhandle) && !find_handle (getenv (LTDL_SEARCHPATH_VAR), base_name, &newhandle) #ifdef LTDL_SHLIBPATH_VAR && !find_handle (getenv (LTDL_SHLIBPATH_VAR), base_name, &newhandle) #endif #ifdef LTDL_SYSSEARCHPATH && !find_handle (sys_search_path, base_name, &newhandle) #endif ))) { if (tryall_dlopen (&newhandle, filename, NULL) != 0) { newhandle = NULL; } } if (!newhandle) { LT_DLFREE (*phandle); ++errors; goto cleanup; } } register_handle: LT_DLMEM_REASSIGN (*phandle, newhandle); if ((*phandle)->info.ref_count == 0) { (*phandle)->info.ref_count = 1; LT_DLMEM_REASSIGN ((*phandle)->info.name, name); LT_DLMUTEX_LOCK (); (*phandle)->next = handles; handles = *phandle; LT_DLMUTEX_UNLOCK (); } LT_DLMUTEX_SETERROR (saved_error); cleanup: LT_DLFREE (dir); LT_DLFREE (name); LT_DLFREE (canonical); return errors; } lt_dlhandle lt_dlopen (filename) const char *filename; { lt_dlhandle handle = 0; /* Just incase we missed a code path in try_dlopen() that reports an error, but forgets to reset handle... */ if (try_dlopen (&handle, filename) != 0) return 0; return handle; } /* If the last error messge store was `FILE_NOT_FOUND', then return non-zero. */ static int file_not_found () { const char *error = 0; LT_DLMUTEX_GETERROR (error); if (error == LT_DLSTRERROR (FILE_NOT_FOUND)) return 1; return 0; } /* If FILENAME has an ARCHIVE_EXT or SHLIB_EXT extension, try to open the FILENAME as passed. Otherwise try appending ARCHIVE_EXT, and if a file is still not found try again with SHLIB_EXT appended instead. */ lt_dlhandle lt_dlopenext (filename) const char *filename; { lt_dlhandle handle = 0; char * tmp = 0; char * ext = 0; size_t len; int errors = 0; if (!filename) { return lt_dlopen (filename); } assert (filename); len = LT_STRLEN (filename); ext = strrchr (filename, '.'); /* If FILENAME already bears a suitable extension, there is no need to try appending additional extensions. */ if (ext && ((strcmp (ext, archive_ext) == 0) #ifdef LTDL_SHLIB_EXT || (strcmp (ext, shlib_ext) == 0) #endif )) { return lt_dlopen (filename); } /* First try appending ARCHIVE_EXT. */ tmp = LT_EMALLOC (char, len + LT_STRLEN (archive_ext) + 1); if (!tmp) return 0; strcpy (tmp, filename); strcat (tmp, archive_ext); errors = try_dlopen (&handle, tmp); /* If we found FILENAME, stop searching -- whether we were able to load the file as a module or not. If the file exists but loading failed, it is better to return an error message here than to report FILE_NOT_FOUND when the alternatives (foo.so etc) are not in the module search path. */ if (handle || ((errors > 0) && !file_not_found ())) { LT_DLFREE (tmp); return handle; } #ifdef LTDL_SHLIB_EXT /* Try appending SHLIB_EXT. */ if (LT_STRLEN (shlib_ext) > LT_STRLEN (archive_ext)) { LT_DLFREE (tmp); tmp = LT_EMALLOC (char, len + LT_STRLEN (shlib_ext) + 1); if (!tmp) return 0; strcpy (tmp, filename); } else { tmp[len] = LT_EOS_CHAR; } strcat(tmp, shlib_ext); errors = try_dlopen (&handle, tmp); /* As before, if the file was found but loading failed, return now with the current error message. */ if (handle || ((errors > 0) && !file_not_found ())) { LT_DLFREE (tmp); return handle; } #endif /* Still here? Then we really did fail to locate any of the file names we tried. */ LT_DLMUTEX_SETERROR (LT_DLSTRERROR (FILE_NOT_FOUND)); LT_DLFREE (tmp); return 0; } static int lt_argz_insert (pargz, pargz_len, before, entry) char **pargz; size_t *pargz_len; char *before; const char *entry; { error_t error; /* Prior to Sep 8, 2005, newlib had a bug where argz_insert(pargz, pargz_len, NULL, entry) failed with EINVAL. */ if (before) error = argz_insert (pargz, pargz_len, before, entry); else error = argz_append (pargz, pargz_len, entry, 1 + LT_STRLEN (entry)); if (error) { switch (error) { case ENOMEM: LT_DLMUTEX_SETERROR (LT_DLSTRERROR (NO_MEMORY)); break; default: LT_DLMUTEX_SETERROR (LT_DLSTRERROR (UNKNOWN)); break; } return 1; } return 0; } static int lt_argz_insertinorder (pargz, pargz_len, entry) char **pargz; size_t *pargz_len; const char *entry; { char *before = 0; assert (pargz); assert (pargz_len); assert (entry && *entry); if (*pargz) while ((before = argz_next (*pargz, *pargz_len, before))) { int cmp = strcmp (entry, before); if (cmp < 0) break; if (cmp == 0) return 0; /* No duplicates! */ } return lt_argz_insert (pargz, pargz_len, before, entry); } static int lt_argz_insertdir (pargz, pargz_len, dirnam, dp) char **pargz; size_t *pargz_len; const char *dirnam; struct dirent *dp; { char *buf = 0; size_t buf_len = 0; char *end = 0; size_t end_offset = 0; size_t dir_len = 0; int errors = 0; assert (pargz); assert (pargz_len); assert (dp); dir_len = LT_STRLEN (dirnam); end = dp->d_name + LT_D_NAMLEN(dp); /* Ignore version numbers. */ { char *p; for (p = end; p -1 > dp->d_name; --p) if (strchr (".0123456789", p[-1]) == 0) break; if (*p == '.') end = p; } /* Ignore filename extension. */ { char *p; for (p = end -1; p > dp->d_name; --p) if (*p == '.') { end = p; break; } } /* Prepend the directory name. */ end_offset = end - dp->d_name; buf_len = dir_len + 1+ end_offset; buf = LT_EMALLOC (char, 1+ buf_len); if (!buf) return ++errors; assert (buf); strcpy (buf, dirnam); strcat (buf, "/"); strncat (buf, dp->d_name, end_offset); buf[buf_len] = LT_EOS_CHAR; /* Try to insert (in order) into ARGZ/ARGZ_LEN. */ if (lt_argz_insertinorder (pargz, pargz_len, buf) != 0) ++errors; LT_DLFREE (buf); return errors; } static int list_files_by_dir (dirnam, pargz, pargz_len) const char *dirnam; char **pargz; size_t *pargz_len; { DIR *dirp = 0; int errors = 0; assert (dirnam && *dirnam); assert (pargz); assert (pargz_len); assert (dirnam[LT_STRLEN(dirnam) -1] != '/'); dirp = opendir (dirnam); if (dirp) { struct dirent *dp = 0; while ((dp = readdir (dirp))) if (dp->d_name[0] != '.') if (lt_argz_insertdir (pargz, pargz_len, dirnam, dp)) { ++errors; break; } closedir (dirp); } else ++errors; return errors; } /* If there are any files in DIRNAME, call the function passed in DATA1 (with the name of each file and DATA2 as arguments). */ static int foreachfile_callback (dirname, data1, data2) char *dirname; lt_ptr data1; lt_ptr data2; { file_worker_func *func = *(file_worker_func **) data1; int is_done = 0; char *argz = 0; size_t argz_len = 0; if (list_files_by_dir (dirname, &argz, &argz_len) != 0) goto cleanup; if (!argz) goto cleanup; { char *filename = 0; while ((filename = argz_next (argz, argz_len, filename))) if ((is_done = (*func) (filename, data2))) break; } cleanup: LT_DLFREE (argz); return is_done; } /* Call FUNC for each unique extensionless file in SEARCH_PATH, along with DATA. The filenames passed to FUNC would be suitable for passing to lt_dlopenext. The extensions are stripped so that individual modules do not generate several entries (e.g. libfoo.la, libfoo.so, libfoo.so.1, libfoo.so.1.0.0). If SEARCH_PATH is NULL, then the same directories that lt_dlopen would search are examined. */ int lt_dlforeachfile (search_path, func, data) const char *search_path; int (*func) LT_PARAMS ((const char *filename, lt_ptr data)); lt_ptr data; { int is_done = 0; file_worker_func **fpptr = &func; if (search_path) { /* If a specific path was passed, search only the directories listed in it. */ is_done = foreach_dirinpath (search_path, 0, foreachfile_callback, fpptr, data); } else { /* Otherwise search the default paths. */ is_done = foreach_dirinpath (user_search_path, 0, foreachfile_callback, fpptr, data); if (!is_done) { is_done = foreach_dirinpath (getenv("LTDL_LIBRARY_PATH"), 0, foreachfile_callback, fpptr, data); } #ifdef LTDL_SHLIBPATH_VAR if (!is_done) { is_done = foreach_dirinpath (getenv(LTDL_SHLIBPATH_VAR), 0, foreachfile_callback, fpptr, data); } #endif #ifdef LTDL_SYSSEARCHPATH if (!is_done) { is_done = foreach_dirinpath (getenv(LTDL_SYSSEARCHPATH), 0, foreachfile_callback, fpptr, data); } #endif } return is_done; } int lt_dlclose (handle) lt_dlhandle handle; { lt_dlhandle cur, last; int errors = 0; LT_DLMUTEX_LOCK (); /* check whether the handle is valid */ last = cur = handles; while (cur && handle != cur) { last = cur; cur = cur->next; } if (!cur) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_HANDLE)); ++errors; goto done; } handle->info.ref_count--; /* Note that even with resident modules, we must track the ref_count correctly incase the user decides to reset the residency flag later (even though the API makes no provision for that at the moment). */ if (handle->info.ref_count <= 0 && !LT_DLIS_RESIDENT (handle)) { lt_user_data data = handle->loader->dlloader_data; if (handle != handles) { last->next = handle->next; } else { handles = handle->next; } errors += handle->loader->module_close (data, handle->module); errors += unload_deplibs(handle); /* It is up to the callers to free the data itself. */ LT_DLFREE (handle->caller_data); LT_DLFREE (handle->info.filename); LT_DLFREE (handle->info.name); LT_DLFREE (handle); goto done; } if (LT_DLIS_RESIDENT (handle)) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (CLOSE_RESIDENT_MODULE)); ++errors; } done: LT_DLMUTEX_UNLOCK (); return errors; } lt_ptr lt_dlsym (handle, symbol) lt_dlhandle handle; const char *symbol; { size_t lensym; char lsym[LT_SYMBOL_LENGTH]; char *sym; lt_ptr address; lt_user_data data; if (!handle) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_HANDLE)); return 0; } if (!symbol) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (SYMBOL_NOT_FOUND)); return 0; } lensym = LT_STRLEN (symbol) + LT_STRLEN (handle->loader->sym_prefix) + LT_STRLEN (handle->info.name); if (lensym + LT_SYMBOL_OVERHEAD < LT_SYMBOL_LENGTH) { sym = lsym; } else { sym = LT_EMALLOC (char, lensym + LT_SYMBOL_OVERHEAD + 1); if (!sym) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (BUFFER_OVERFLOW)); return 0; } } data = handle->loader->dlloader_data; if (handle->info.name) { const char *saved_error; LT_DLMUTEX_GETERROR (saved_error); /* this is a libtool module */ if (handle->loader->sym_prefix) { strcpy(sym, handle->loader->sym_prefix); strcat(sym, handle->info.name); } else { strcpy(sym, handle->info.name); } strcat(sym, "_LTX_"); strcat(sym, symbol); /* try "modulename_LTX_symbol" */ address = handle->loader->find_sym (data, handle->module, sym); if (address) { if (sym != lsym) { LT_DLFREE (sym); } return address; } LT_DLMUTEX_SETERROR (saved_error); } /* otherwise try "symbol" */ if (handle->loader->sym_prefix) { strcpy(sym, handle->loader->sym_prefix); strcat(sym, symbol); } else { strcpy(sym, symbol); } address = handle->loader->find_sym (data, handle->module, sym); if (sym != lsym) { LT_DLFREE (sym); } return address; } const char * lt_dlerror () { const char *error; LT_DLMUTEX_GETERROR (error); LT_DLMUTEX_SETERROR (0); return error ? error : NULL; } static int lt_dlpath_insertdir (ppath, before, dir) char **ppath; char *before; const char *dir; { int errors = 0; char *canonical = 0; char *argz = 0; size_t argz_len = 0; assert (ppath); assert (dir && *dir); if (canonicalize_path (dir, &canonical) != 0) { ++errors; goto cleanup; } assert (canonical && *canonical); /* If *PPATH is empty, set it to DIR. */ if (*ppath == 0) { assert (!before); /* BEFORE cannot be set without PPATH. */ assert (dir); /* Without DIR, don't call this function! */ *ppath = lt_estrdup (dir); if (*ppath == 0) ++errors; return errors; } assert (ppath && *ppath); if (argzize_path (*ppath, &argz, &argz_len) != 0) { ++errors; goto cleanup; } /* Convert BEFORE into an equivalent offset into ARGZ. This only works if *PPATH is already canonicalized, and hence does not change length with respect to ARGZ. We canonicalize each entry as it is added to the search path, and don't call this function with (uncanonicalized) user paths, so this is a fair assumption. */ if (before) { assert (*ppath <= before); assert (before - *ppath <= strlen (*ppath)); before = before - *ppath + argz; } if (lt_argz_insert (&argz, &argz_len, before, dir) != 0) { ++errors; goto cleanup; } argz_stringify (argz, argz_len, LT_PATHSEP_CHAR); LT_DLMEM_REASSIGN (*ppath, argz); cleanup: LT_DLFREE (canonical); LT_DLFREE (argz); return errors; } int lt_dladdsearchdir (search_dir) const char *search_dir; { int errors = 0; if (search_dir && *search_dir) { LT_DLMUTEX_LOCK (); if (lt_dlpath_insertdir (&user_search_path, 0, search_dir) != 0) ++errors; LT_DLMUTEX_UNLOCK (); } return errors; } int lt_dlinsertsearchdir (before, search_dir) const char *before; const char *search_dir; { int errors = 0; if (before) { LT_DLMUTEX_LOCK (); if ((before < user_search_path) || (before >= user_search_path + LT_STRLEN (user_search_path))) { LT_DLMUTEX_UNLOCK (); LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_POSITION)); return 1; } LT_DLMUTEX_UNLOCK (); } if (search_dir && *search_dir) { LT_DLMUTEX_LOCK (); if (lt_dlpath_insertdir (&user_search_path, (char *) before, search_dir) != 0) { ++errors; } LT_DLMUTEX_UNLOCK (); } return errors; } int lt_dlsetsearchpath (search_path) const char *search_path; { int errors = 0; LT_DLMUTEX_LOCK (); LT_DLFREE (user_search_path); LT_DLMUTEX_UNLOCK (); if (!search_path || !LT_STRLEN (search_path)) { return errors; } LT_DLMUTEX_LOCK (); if (canonicalize_path (search_path, &user_search_path) != 0) ++errors; LT_DLMUTEX_UNLOCK (); return errors; } const char * lt_dlgetsearchpath () { const char *saved_path; LT_DLMUTEX_LOCK (); saved_path = user_search_path; LT_DLMUTEX_UNLOCK (); return saved_path; } int lt_dlmakeresident (handle) lt_dlhandle handle; { int errors = 0; if (!handle) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_HANDLE)); ++errors; } else { LT_DLSET_FLAG (handle, LT_DLRESIDENT_FLAG); } return errors; } int lt_dlisresident (handle) lt_dlhandle handle; { if (!handle) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_HANDLE)); return -1; } return LT_DLIS_RESIDENT (handle); } /* --- MODULE INFORMATION --- */ const lt_dlinfo * lt_dlgetinfo (handle) lt_dlhandle handle; { if (!handle) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_HANDLE)); return 0; } return &(handle->info); } lt_dlhandle lt_dlhandle_next (place) lt_dlhandle place; { return place ? place->next : handles; } int lt_dlforeach (func, data) int (*func) LT_PARAMS((lt_dlhandle handle, lt_ptr data)); lt_ptr data; { int errors = 0; lt_dlhandle cur; LT_DLMUTEX_LOCK (); cur = handles; while (cur) { lt_dlhandle tmp = cur; cur = cur->next; if ((*func) (tmp, data)) { ++errors; break; } } LT_DLMUTEX_UNLOCK (); return errors; } lt_dlcaller_id lt_dlcaller_register () { static lt_dlcaller_id last_caller_id = 0; int result; LT_DLMUTEX_LOCK (); result = ++last_caller_id; LT_DLMUTEX_UNLOCK (); return result; } lt_ptr lt_dlcaller_set_data (key, handle, data) lt_dlcaller_id key; lt_dlhandle handle; lt_ptr data; { int n_elements = 0; lt_ptr stale = (lt_ptr) 0; int i; /* This needs to be locked so that the caller data can be updated simultaneously by different threads. */ LT_DLMUTEX_LOCK (); if (handle->caller_data) while (handle->caller_data[n_elements].key) ++n_elements; for (i = 0; i < n_elements; ++i) { if (handle->caller_data[i].key == key) { stale = handle->caller_data[i].data; break; } } /* Ensure that there is enough room in this handle's caller_data array to accept a new element (and an empty end marker). */ if (i == n_elements) { lt_caller_data *temp = LT_DLREALLOC (lt_caller_data, handle->caller_data, 2+ n_elements); if (!temp) { stale = 0; goto done; } handle->caller_data = temp; /* We only need this if we needed to allocate a new caller_data. */ handle->caller_data[i].key = key; handle->caller_data[1+ i].key = 0; } handle->caller_data[i].data = data; done: LT_DLMUTEX_UNLOCK (); return stale; } lt_ptr lt_dlcaller_get_data (key, handle) lt_dlcaller_id key; lt_dlhandle handle; { lt_ptr result = (lt_ptr) 0; /* This needs to be locked so that the caller data isn't updated by another thread part way through this function. */ LT_DLMUTEX_LOCK (); /* Locate the index of the element with a matching KEY. */ if (handle->caller_data) { int i; for (i = 0; handle->caller_data[i].key; ++i) { if (handle->caller_data[i].key == key) { result = handle->caller_data[i].data; break; } } } LT_DLMUTEX_UNLOCK (); return result; } /* --- USER MODULE LOADER API --- */ int lt_dlloader_add (place, dlloader, loader_name) lt_dlloader *place; const struct lt_user_dlloader *dlloader; const char *loader_name; { int errors = 0; lt_dlloader *node = 0, *ptr = 0; if ((dlloader == 0) /* diagnose null parameters */ || (dlloader->module_open == 0) || (dlloader->module_close == 0) || (dlloader->find_sym == 0)) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_LOADER)); return 1; } /* Create a new dlloader node with copies of the user callbacks. */ node = LT_EMALLOC (lt_dlloader, 1); if (!node) return 1; node->next = 0; node->loader_name = loader_name; node->sym_prefix = dlloader->sym_prefix; node->dlloader_exit = dlloader->dlloader_exit; node->module_open = dlloader->module_open; node->module_close = dlloader->module_close; node->find_sym = dlloader->find_sym; node->dlloader_data = dlloader->dlloader_data; LT_DLMUTEX_LOCK (); if (!loaders) { /* If there are no loaders, NODE becomes the list! */ loaders = node; } else if (!place) { /* If PLACE is not set, add NODE to the end of the LOADERS list. */ for (ptr = loaders; ptr->next; ptr = ptr->next) { /*NOWORK*/; } ptr->next = node; } else if (loaders == place) { /* If PLACE is the first loader, NODE goes first. */ node->next = place; loaders = node; } else { /* Find the node immediately preceding PLACE. */ for (ptr = loaders; ptr->next != place; ptr = ptr->next) { /*NOWORK*/; } if (ptr->next != place) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_LOADER)); ++errors; } else { /* Insert NODE between PTR and PLACE. */ node->next = place; ptr->next = node; } } LT_DLMUTEX_UNLOCK (); return errors; } int lt_dlloader_remove (loader_name) const char *loader_name; { lt_dlloader *place = lt_dlloader_find (loader_name); lt_dlhandle handle; int errors = 0; if (!place) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_LOADER)); return 1; } LT_DLMUTEX_LOCK (); /* Fail if there are any open modules which use this loader. */ for (handle = handles; handle; handle = handle->next) { if (handle->loader == place) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (REMOVE_LOADER)); ++errors; goto done; } } if (place == loaders) { /* PLACE is the first loader in the list. */ loaders = loaders->next; } else { /* Find the loader before the one being removed. */ lt_dlloader *prev; for (prev = loaders; prev->next; prev = prev->next) { if (!strcmp (prev->next->loader_name, loader_name)) { break; } } place = prev->next; prev->next = prev->next->next; } if (place->dlloader_exit) { errors = place->dlloader_exit (place->dlloader_data); } LT_DLFREE (place); done: LT_DLMUTEX_UNLOCK (); return errors; } lt_dlloader * lt_dlloader_next (place) lt_dlloader *place; { lt_dlloader *next; LT_DLMUTEX_LOCK (); next = place ? place->next : loaders; LT_DLMUTEX_UNLOCK (); return next; } const char * lt_dlloader_name (place) lt_dlloader *place; { const char *name = 0; if (place) { LT_DLMUTEX_LOCK (); name = place ? place->loader_name : 0; LT_DLMUTEX_UNLOCK (); } else { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_LOADER)); } return name; } lt_user_data * lt_dlloader_data (place) lt_dlloader *place; { lt_user_data *data = 0; if (place) { LT_DLMUTEX_LOCK (); data = place ? &(place->dlloader_data) : 0; LT_DLMUTEX_UNLOCK (); } else { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (INVALID_LOADER)); } return data; } lt_dlloader * lt_dlloader_find (loader_name) const char *loader_name; { lt_dlloader *place = 0; LT_DLMUTEX_LOCK (); for (place = loaders; place; place = place->next) { if (strcmp (place->loader_name, loader_name) == 0) { break; } } LT_DLMUTEX_UNLOCK (); return place; } elektra-0.7.1/libltdl/ltdl.h0000644000076400001440000002736011312075134012632 00000000000000/* ltdl.h -- generic dlopen functions Copyright (C) 1998-2001, 2003, 2004, 2007 Free Software Foundation, Inc. Originally by Thomas Tanner This file is part of GNU Libtool. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. As a special exception to the GNU Lesser General Public License, if you distribute this file as part of a program or library that is built using GNU libtool, you may include it under the same distribution terms that you use for the rest of that program. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* Only include this header file once. */ #ifndef LTDL_H #define LTDL_H 1 #include /* for size_t declaration */ /* --- MACROS FOR PORTABILITY --- */ /* Saves on those hard to debug '\0' typos.... */ #define LT_EOS_CHAR '\0' /* LTDL_BEGIN_C_DECLS should be used at the beginning of your declarations, so that C++ compilers don't mangle their names. Use LTDL_END_C_DECLS at the end of C declarations. */ #ifdef __cplusplus # define LT_BEGIN_C_DECLS extern "C" { # define LT_END_C_DECLS } #else # define LT_BEGIN_C_DECLS /* empty */ # define LT_END_C_DECLS /* empty */ #endif LT_BEGIN_C_DECLS /* LT_PARAMS is a macro used to wrap function prototypes, so that compilers that don't understand ANSI C prototypes still work, and ANSI C compilers can issue warnings about type mismatches. */ #if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(WIN32) || defined(__cplusplus) # define LT_PARAMS(protos) protos # define lt_ptr void* #else # define LT_PARAMS(protos) () # define lt_ptr char* #endif /* LT_STMT_START/END are used to create macros which expand to a a single compound statement in a portable way. */ #if defined (__GNUC__) && !defined (__STRICT_ANSI__) && !defined (__cplusplus) # define LT_STMT_START (void)( # define LT_STMT_END ) #else # if (defined (sun) || defined (__sun__)) # define LT_STMT_START if (1) # define LT_STMT_END else (void)0 # else # define LT_STMT_START do # define LT_STMT_END while (0) # endif #endif /* LT_CONC creates a new concatenated symbol for the compiler in a portable way. */ #if defined(__STDC__) || defined(__cplusplus) || defined(_MSC_VER) || defined(_AIX) # define LT_CONC(s,t) s##t #else # define LT_CONC(s,t) s/**/t #endif /* LT_STRLEN can be used safely on NULL pointers. */ #define LT_STRLEN(s) (((s) && (s)[0]) ? strlen (s) : 0) /* --- WINDOWS SUPPORT --- */ /* Canonicalise Windows and Cygwin recognition macros. */ #ifdef __CYGWIN32__ # ifndef __CYGWIN__ # define __CYGWIN__ __CYGWIN32__ # endif #endif #if defined(_WIN32) || defined(WIN32) # ifndef __WINDOWS__ # ifdef _WIN32 # define __WINDOWS__ _WIN32 # else # ifdef WIN32 # define __WINDOWS__ WIN32 # endif # endif # endif #endif #ifdef __WINDOWS__ # ifndef __CYGWIN__ /* LT_DIRSEP_CHAR is accepted *in addition* to '/' as a directory separator when it is set. */ # define LT_DIRSEP_CHAR '\\' # define LT_PATHSEP_CHAR ';' # endif #endif #ifndef LT_PATHSEP_CHAR # define LT_PATHSEP_CHAR ':' #endif /* DLL building support on win32 hosts; mostly to workaround their ridiculous implementation of data symbol exporting. */ #ifndef LT_SCOPE # if defined(__WINDOWS__) || defined(__CYGWIN__) # ifdef DLL_EXPORT /* defined by libtool (if required) */ # define LT_SCOPE __declspec(dllexport) # endif # ifdef LIBLTDL_DLL_IMPORT /* define if linking with this dll */ /* note: cygwin/mingw compilers can rely instead on auto-import */ # define LT_SCOPE extern __declspec(dllimport) # endif # endif # ifndef LT_SCOPE /* static linking or !__WINDOWS__ */ # define LT_SCOPE extern # endif #endif #if defined(_MSC_VER) /* Visual Studio */ # define R_OK 4 #endif /* --- DYNAMIC MODULE LOADING API --- */ typedef struct lt_dlhandle_struct *lt_dlhandle; /* A loaded module. */ /* Initialisation and finalisation functions for libltdl. */ LT_SCOPE int lt_dlinit LT_PARAMS((void)); LT_SCOPE int lt_dlexit LT_PARAMS((void)); /* Module search path manipulation. */ LT_SCOPE int lt_dladdsearchdir LT_PARAMS((const char *search_dir)); LT_SCOPE int lt_dlinsertsearchdir LT_PARAMS((const char *before, const char *search_dir)); LT_SCOPE int lt_dlsetsearchpath LT_PARAMS((const char *search_path)); LT_SCOPE const char *lt_dlgetsearchpath LT_PARAMS((void)); LT_SCOPE int lt_dlforeachfile LT_PARAMS(( const char *search_path, int (*func) (const char *filename, lt_ptr data), lt_ptr data)); /* Portable libltdl versions of the system dlopen() API. */ LT_SCOPE lt_dlhandle lt_dlopen LT_PARAMS((const char *filename)); LT_SCOPE lt_dlhandle lt_dlopenext LT_PARAMS((const char *filename)); LT_SCOPE lt_ptr lt_dlsym LT_PARAMS((lt_dlhandle handle, const char *name)); LT_SCOPE const char *lt_dlerror LT_PARAMS((void)); LT_SCOPE int lt_dlclose LT_PARAMS((lt_dlhandle handle)); /* Module residency management. */ LT_SCOPE int lt_dlmakeresident LT_PARAMS((lt_dlhandle handle)); LT_SCOPE int lt_dlisresident LT_PARAMS((lt_dlhandle handle)); /* --- MUTEX LOCKING --- */ typedef void lt_dlmutex_lock LT_PARAMS((void)); typedef void lt_dlmutex_unlock LT_PARAMS((void)); typedef void lt_dlmutex_seterror LT_PARAMS((const char *errmsg)); typedef const char *lt_dlmutex_geterror LT_PARAMS((void)); LT_SCOPE int lt_dlmutex_register LT_PARAMS((lt_dlmutex_lock *lock, lt_dlmutex_unlock *unlock, lt_dlmutex_seterror *seterror, lt_dlmutex_geterror *geterror)); /* --- MEMORY HANDLING --- */ /* By default, the realloc function pointer is set to our internal realloc implementation which iself uses lt_dlmalloc and lt_dlfree. libltdl relies on a featureful realloc, but if you are sure yours has the right semantics then you can assign it directly. Generally, it is safe to assign just a malloc() and a free() function. */ LT_SCOPE lt_ptr (*lt_dlmalloc) LT_PARAMS((size_t size)); LT_SCOPE lt_ptr (*lt_dlrealloc) LT_PARAMS((lt_ptr ptr, size_t size)); LT_SCOPE void (*lt_dlfree) LT_PARAMS((lt_ptr ptr)); /* --- PRELOADED MODULE SUPPORT --- */ /* A preopened symbol. Arrays of this type comprise the exported symbols for a dlpreopened module. */ typedef struct { const char *name; lt_ptr address; } lt_dlsymlist; LT_SCOPE int lt_dlpreload LT_PARAMS((const lt_dlsymlist *preloaded)); LT_SCOPE int lt_dlpreload_default LT_PARAMS((const lt_dlsymlist *preloaded)); #define LTDL_SET_PRELOADED_SYMBOLS() LT_STMT_START{ \ extern const lt_dlsymlist lt_preloaded_symbols[]; \ lt_dlpreload_default(lt_preloaded_symbols); \ }LT_STMT_END /* --- MODULE INFORMATION --- */ /* Read only information pertaining to a loaded module. */ typedef struct { char *filename; /* file name */ char *name; /* module name */ int ref_count; /* number of times lt_dlopened minus number of times lt_dlclosed. */ } lt_dlinfo; LT_SCOPE const lt_dlinfo *lt_dlgetinfo LT_PARAMS((lt_dlhandle handle)); LT_SCOPE lt_dlhandle lt_dlhandle_next LT_PARAMS((lt_dlhandle place)); LT_SCOPE int lt_dlforeach LT_PARAMS(( int (*func) (lt_dlhandle handle, lt_ptr data), lt_ptr data)); /* Associating user data with loaded modules. */ typedef unsigned lt_dlcaller_id; LT_SCOPE lt_dlcaller_id lt_dlcaller_register LT_PARAMS((void)); LT_SCOPE lt_ptr lt_dlcaller_set_data LT_PARAMS((lt_dlcaller_id key, lt_dlhandle handle, lt_ptr data)); LT_SCOPE lt_ptr lt_dlcaller_get_data LT_PARAMS((lt_dlcaller_id key, lt_dlhandle handle)); /* --- USER MODULE LOADER API --- */ typedef struct lt_dlloader lt_dlloader; typedef lt_ptr lt_user_data; typedef lt_ptr lt_module; /* Function pointer types for creating user defined module loaders. */ typedef lt_module lt_module_open LT_PARAMS((lt_user_data loader_data, const char *filename)); typedef int lt_module_close LT_PARAMS((lt_user_data loader_data, lt_module handle)); typedef lt_ptr lt_find_sym LT_PARAMS((lt_user_data loader_data, lt_module handle, const char *symbol)); typedef int lt_dlloader_exit LT_PARAMS((lt_user_data loader_data)); struct lt_user_dlloader { const char *sym_prefix; lt_module_open *module_open; lt_module_close *module_close; lt_find_sym *find_sym; lt_dlloader_exit *dlloader_exit; lt_user_data dlloader_data; }; LT_SCOPE lt_dlloader *lt_dlloader_next LT_PARAMS((lt_dlloader *place)); LT_SCOPE lt_dlloader *lt_dlloader_find LT_PARAMS(( const char *loader_name)); LT_SCOPE const char *lt_dlloader_name LT_PARAMS((lt_dlloader *place)); LT_SCOPE lt_user_data *lt_dlloader_data LT_PARAMS((lt_dlloader *place)); LT_SCOPE int lt_dlloader_add LT_PARAMS((lt_dlloader *place, const struct lt_user_dlloader *dlloader, const char *loader_name)); LT_SCOPE int lt_dlloader_remove LT_PARAMS(( const char *loader_name)); /* --- ERROR MESSAGE HANDLING --- */ /* Defining error strings alongside their symbolic names in a macro in this way allows us to expand the macro in different contexts with confidence that the enumeration of symbolic names will map correctly onto the table of error strings. */ #define lt_dlerror_table \ LT_ERROR(UNKNOWN, "unknown error") \ LT_ERROR(DLOPEN_NOT_SUPPORTED, "dlopen support not available") \ LT_ERROR(INVALID_LOADER, "invalid loader") \ LT_ERROR(INIT_LOADER, "loader initialization failed") \ LT_ERROR(REMOVE_LOADER, "loader removal failed") \ LT_ERROR(FILE_NOT_FOUND, "file not found") \ LT_ERROR(DEPLIB_NOT_FOUND, "dependency library not found") \ LT_ERROR(NO_SYMBOLS, "no symbols defined") \ LT_ERROR(CANNOT_OPEN, "can't open the module") \ LT_ERROR(CANNOT_CLOSE, "can't close the module") \ LT_ERROR(SYMBOL_NOT_FOUND, "symbol not found") \ LT_ERROR(NO_MEMORY, "not enough memory") \ LT_ERROR(INVALID_HANDLE, "invalid module handle") \ LT_ERROR(BUFFER_OVERFLOW, "internal buffer overflow") \ LT_ERROR(INVALID_ERRORCODE, "invalid errorcode") \ LT_ERROR(SHUTDOWN, "library already shutdown") \ LT_ERROR(CLOSE_RESIDENT_MODULE, "can't close resident module") \ LT_ERROR(INVALID_MUTEX_ARGS, "invalid mutex handler registration") \ LT_ERROR(INVALID_POSITION, "invalid search path insert position") /* Enumerate the symbolic error names. */ enum { #define LT_ERROR(name, diagnostic) LT_CONC(LT_ERROR_, name), lt_dlerror_table #undef LT_ERROR LT_ERROR_MAX }; /* These functions are only useful from inside custom module loaders. */ LT_SCOPE int lt_dladderror LT_PARAMS((const char *diagnostic)); LT_SCOPE int lt_dlseterror LT_PARAMS((int errorcode)); /* --- SOURCE COMPATIBILITY WITH OLD LIBLTDL --- */ #ifdef LT_NON_POSIX_NAMESPACE # define lt_ptr_t lt_ptr # define lt_module_t lt_module # define lt_module_open_t lt_module_open # define lt_module_close_t lt_module_close # define lt_find_sym_t lt_find_sym # define lt_dlloader_exit_t lt_dlloader_exit # define lt_dlloader_t lt_dlloader # define lt_dlloader_data_t lt_user_data #endif LT_END_C_DECLS #endif /* !LTDL_H */ elektra-0.7.1/libltdl/ltmain.sh0000644000076400001440000060646711312075134013355 00000000000000# ltmain.sh - Provide generalized library-building support services. # NOTE: Changing this file will not affect anything until you rerun configure. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, # 2007, 2008 Free Software Foundation, Inc. # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. basename="s,^.*/,,g" # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath="$0" # The name of this program: progname=`echo "$progpath" | $SED $basename` modename="$progname" # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 PROGRAM=ltmain.sh PACKAGE=libtool VERSION="1.5.26 Debian 1.5.26-4+lenny1" TIMESTAMP=" (1.1220.2.493 2008/02/01 16:58:18)" # Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # Check that we have a working $echo. if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then # Yippee, $echo works! : else # Restart under the correct shell, and then maybe $echo will work. exec $SHELL "$progpath" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat <&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit $EXIT_FAILURE fi # Global variables. mode=$default_mode nonopt= prev= prevopt= run= show="$echo" show_help= execute_dlfiles= duplicate_deps=no preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" extracted_archives= extracted_serial=0 ##################################### # Shell function definitions: # This seems to be the best place for them # func_mktempdir [string] # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, STRING is the basename for that directory. func_mktempdir () { my_template="${TMPDIR-/tmp}/${1-$progname}" if test "$run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else # If mktemp works, use that first and foremost my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race my_tmpdir="${my_template}-${RANDOM-0}$$" save_mktempdir_umask=`umask` umask 0077 $mkdir "$my_tmpdir" umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$my_tmpdir" || { $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2 exit $EXIT_FAILURE } fi $echo "X$my_tmpdir" | $Xsed } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. func_win32_libid () { win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then win32_nmres=`eval $NM -f posix -A $1 | \ $SED -n -e '1,100{ / I /{ s,.*,import, p q } }'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $echo $win32_libid_type } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac CC_quoted="$CC_quoted $arg" done case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac CC_quoted="$CC_quoted $arg" done case "$@ " in " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then $echo "$modename: unable to infer tagged configuration" $echo "$modename: specify a tag with \`--tag'" 1>&2 exit $EXIT_FAILURE # else # $echo "$modename: using $tagname tagged configuration" fi ;; esac fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)" $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $? if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2 exit $EXIT_FAILURE fi } # func_extract_archives gentop oldlib ... func_extract_archives () { my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" my_status="" $show "${rm}r $my_gentop" $run ${rm}r "$my_gentop" $show "$mkdir $my_gentop" $run $mkdir "$my_gentop" my_status=$? if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then exit $my_status fi for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) extracted_serial=`expr $extracted_serial + 1` my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir="$my_gentop/$my_xlib_u" $show "${rm}r $my_xdir" $run ${rm}r "$my_xdir" $show "$mkdir $my_xdir" $run $mkdir "$my_xdir" exit_status=$? if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then exit $exit_status fi case $host in *-darwin*) $show "Extracting $my_xabs" # Do not bother doing anything if just a dry run if test -z "$run"; then darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'` darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null` if test -n "$darwin_arches"; then darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= $show "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}" lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" func_extract_an_archive "`pwd`" "${darwin_base_archive}" cd "$darwin_curdir" $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" done # $darwin_arches ## Okay now we have a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` lipo -create -output "$darwin_file" $darwin_files done # $darwin_filelist ${rm}r unfat-$$ cd "$darwin_orig_dir" else cd "$darwin_orig_dir" func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches fi # $run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # End of Shell function definitions ##################################### # Darwin sucks eval std_shrext=\"$shrext_cmds\" disable_libs=no # Parse our command line options once, thoroughly. while test "$#" -gt 0 do arg="$1" shift case $arg in -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; *) optarg= ;; esac # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in execute_dlfiles) execute_dlfiles="$execute_dlfiles $arg" ;; tag) tagname="$arg" preserve_args="${preserve_args}=$arg" # Check whether tagname contains only valid characters case $tagname in *[!-_A-Za-z0-9,/]*) $echo "$progname: invalid tag name: $tagname" 1>&2 exit $EXIT_FAILURE ;; esac case $tagname in CC) # Don't test for the "default" C tag, as we know, it's there, but # not specially marked. ;; *) if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then taglist="$taglist $tagname" # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" else $echo "$progname: ignoring unknown tag $tagname" 1>&2 fi ;; esac ;; *) eval "$prev=\$arg" ;; esac prev= prevopt= continue fi # Have we seen a non-optional argument yet? case $arg in --help) show_help=yes ;; --version) echo "\ $PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP Copyright (C) 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." exit $? ;; --config) ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath # Now print the configurations for the tags. for tagname in $taglist; do ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" done exit $? ;; --debug) $echo "$progname: enabling shell trace mode" set -x preserve_args="$preserve_args $arg" ;; --dry-run | -n) run=: ;; --features) $echo "host: $host" if test "$build_libtool_libs" = yes; then $echo "enable shared libraries" else $echo "disable shared libraries" fi if test "$build_old_libs" = yes; then $echo "enable static libraries" else $echo "disable static libraries" fi exit $? ;; --finish) mode="finish" ;; --mode) prevopt="--mode" prev=mode ;; --mode=*) mode="$optarg" ;; --preserve-dup-deps) duplicate_deps="yes" ;; --quiet | --silent) show=: preserve_args="$preserve_args $arg" ;; --tag) prevopt="--tag" prev=tag preserve_args="$preserve_args --tag" ;; --tag=*) set tag "$optarg" ${1+"$@"} shift prev=tag preserve_args="$preserve_args --tag" ;; -dlopen) prevopt="-dlopen" prev=execute_dlfiles ;; -*) $echo "$modename: unrecognized option \`$arg'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; *) nonopt="$arg" break ;; esac done if test -n "$prevopt"; then $echo "$modename: option \`$prevopt' requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi case $disable_libs in no) ;; shared) build_libtool_libs=no build_old_libs=yes ;; static) build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` ;; esac # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= if test -z "$show_help"; then # Infer the operation mode. if test -z "$mode"; then $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2 case $nonopt in *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) mode=link for arg do case $arg in -c) mode=compile break ;; esac done ;; *db | *dbx | *strace | *truss) mode=execute ;; *install*|cp|mv) mode=install ;; *rm) mode=uninstall ;; *) # If we have no mode, but dlfiles were specified, then do execute mode. test -n "$execute_dlfiles" && mode=execute # Just use the default operation mode. if test -z "$mode"; then if test -n "$nonopt"; then $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 else $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 fi fi ;; esac fi # Only execute mode is allowed to have -dlopen flags. if test -n "$execute_dlfiles" && test "$mode" != execute; then $echo "$modename: unrecognized option \`-dlopen'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$modename --help --mode=$mode' for more information." # These modes are in order of execution frequency so that they run quickly. case $mode in # libtool compile mode compile) modename="$modename: compile" # Get the compilation command and the source file. base_compile= srcfile="$nonopt" # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= for arg do case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile lastarg="$arg" arg_mode=normal ;; target ) libobj="$arg" arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) if test -n "$libobj" ; then $echo "$modename: you cannot specify \`-o' more than once" 1>&2 exit $EXIT_FAILURE fi arg_mode=target continue ;; -static | -prefer-pic | -prefer-non-pic) later="$later $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` lastarg= save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac lastarg="$lastarg $arg" done IFS="$save_ifs" lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` # Add the arguments to base_compile. base_compile="$base_compile $lastarg" continue ;; * ) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg="$srcfile" srcfile="$arg" ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` case $lastarg in # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly # in scan sets, and some SunOS ksh mistreat backslash-escaping # in scan sets (worked around with variable expansion), # and furthermore cannot handle '|' '&' '(' ')' in scan sets # at all, so we specify them separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") lastarg="\"$lastarg\"" ;; esac base_compile="$base_compile $lastarg" done # for arg case $arg_mode in arg) $echo "$modename: you must specify an argument for -Xcompile" exit $EXIT_FAILURE ;; target) $echo "$modename: you must specify a target with \`-o'" 1>&2 exit $EXIT_FAILURE ;; *) # Get the name of the library object. [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo xform='[cCFSifmso]' case $libobj in *.ada) xform=ada ;; *.adb) xform=adb ;; *.ads) xform=ads ;; *.asm) xform=asm ;; *.c++) xform=c++ ;; *.cc) xform=cc ;; *.ii) xform=ii ;; *.class) xform=class ;; *.cpp) xform=cpp ;; *.cxx) xform=cxx ;; *.[fF][09]?) xform=[fF][09]. ;; *.for) xform=for ;; *.java) xform=java ;; *.obj) xform=obj ;; *.sx) xform=sx ;; esac libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` case $libobj in *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; *) $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 exit $EXIT_FAILURE ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -static) build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"` case $qlibobj in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qlibobj="\"$qlibobj\"" ;; esac test "X$libobj" != "X$qlibobj" \ && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \ && $echo "$modename: libobj name \`$libobj' may not contain shell special characters." objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$obj"; then xdir= else xdir=$xdir/ fi lobj=${xdir}$objdir/$objname if test -z "$base_compile"; then $echo "$modename: you must specify a compilation command" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi $run $rm $removelist trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" removelist="$removelist $output_obj $lockfile" trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $run ln "$progpath" "$lockfile" 2>/dev/null; do $show "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $echo "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi $echo "$srcfile" > "$lockfile" fi if test -n "$fix_srcfile_path"; then eval srcfile=\"$fix_srcfile_path\" fi qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"` case $qsrcfile in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qsrcfile="\"$qsrcfile\"" ;; esac $run $rm "$libobj" "${libobj}T" # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. test -z "$run" && cat > ${libobj}T </dev/null`" != "X$srcfile"; then $echo "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then $show "$mv $output_obj $lobj" if $run $mv $output_obj $lobj; then : else error=$? $run $rm $removelist exit $error fi fi # Append the name of the PIC object to the libtool object file. test -z "$run" && cat >> ${libobj}T <> ${libobj}T </dev/null`" != "X$srcfile"; then $echo "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then $show "$mv $output_obj $obj" if $run $mv $output_obj $obj; then : else error=$? $run $rm $removelist exit $error fi fi # Append the name of the non-PIC object the libtool object file. # Only append if the libtool object file exists. test -z "$run" && cat >> ${libobj}T <> ${libobj}T <&2 fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test ;; *) qarg=$arg ;; esac libtool_args="$libtool_args $qarg" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) compile_command="$compile_command @OUTPUT@" finalize_command="$finalize_command @OUTPUT@" ;; esac case $prev in dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. compile_command="$compile_command @SYMFILE@" finalize_command="$finalize_command @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then dlfiles="$dlfiles $arg" else dlprefiles="$dlprefiles $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" if test ! -f "$arg"; then $echo "$modename: symbol file \`$arg' does not exist" exit $EXIT_FAILURE fi prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat $save_arg` do # moreargs="$moreargs $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then pic_object= non_pic_object= # Read the .lo file # If there is no directory component, then add one. case $arg in */* | *\\*) . $arg ;; *) . ./$arg ;; esac if test -z "$pic_object" || \ test -z "$non_pic_object" || test "$pic_object" = none && \ test "$non_pic_object" = none; then $echo "$modename: cannot find name of object for \`$arg'" 1>&2 exit $EXIT_FAILURE fi # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. libobjs="$libobjs $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object non_pic_objects="$non_pic_objects $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi else # Only an error if not doing a dry-run. if test -z "$run"; then $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 exit $EXIT_FAILURE else # Dry-run case. # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` libobjs="$libobjs $pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi fi done else $echo "$modename: link input file \`$save_arg' does not exist" exit $EXIT_FAILURE fi arg=$save_arg prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit $EXIT_FAILURE ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) rpath="$rpath $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) xrpath="$xrpath $arg" ;; esac fi prev= continue ;; xcompiler) compiler_flags="$compiler_flags $qarg" prev= compile_command="$compile_command $qarg" finalize_command="$finalize_command $qarg" continue ;; xlinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $wl$qarg" prev= compile_command="$compile_command $wl$qarg" finalize_command="$finalize_command $wl$qarg" continue ;; xcclinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $qarg" prev= compile_command="$compile_command $qarg" finalize_command="$finalize_command $qarg" continue ;; shrext) shrext_cmds="$arg" prev= continue ;; darwin_framework|darwin_framework_skip) test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" prev= continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then compile_command="$compile_command $link_static_flag" finalize_command="$finalize_command $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 continue ;; -avoid-version) avoid_version=yes continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then $echo "$modename: more than one -exported-symbols argument is not allowed" exit $EXIT_FAILURE fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework|-arch|-isysroot) case " $CC " in *" ${arg} ${1} "* | *" ${arg} ${1} "*) prev=darwin_framework_skip ;; *) compiler_flags="$compiler_flags $arg" prev=darwin_framework ;; esac compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" ;; esac continue ;; -L*) dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 absdir="$dir" notinst_path="$notinst_path $dir" fi dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "*) ;; *) deplibs="$deplibs -L$dir" lib_search_path="$lib_search_path $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; *) dllsearchpath="$dllsearchpath:$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework deplibs="$deplibs -framework System" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test "X$arg" = "X-lc" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi deplibs="$deplibs $arg" continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. -model) compile_command="$compile_command $arg" compiler_flags="$compiler_flags $arg" finalize_command="$finalize_command $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) compiler_flags="$compiler_flags $arg" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" continue ;; -multi_module) single_module="${wl}-multi_module" continue ;; -module) module=yes continue ;; # -64, -mips[0-9] enable 64-bit mode on the SGI compiler # -r[0-9][0-9]* specifies the processor on the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler # +DA*, +DD* enable 64-bit mode on the HP compiler # -q* pass through compiler args for the IBM compiler # -m* pass through architecture-specific compiler args for GCC # -m*, -t[45]*, -txscale* pass through architecture-specific # compiler args for GCC # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC # -F/path gives path to uninstalled frameworks, gcc on darwin # @file GCC response files -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" compiler_flags="$compiler_flags $arg" continue ;; -shrext) prev=shrext continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit $EXIT_FAILURE ;; esac case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -Wc,*) args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" case $flag in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") flag="\"$flag\"" ;; esac arg="$arg $wl$flag" compiler_flags="$compiler_flags $flag" done IFS="$save_ifs" arg=`$echo "X$arg" | $Xsed -e "s/^ //"` ;; -Wl,*) args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" case $flag in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") flag="\"$flag\"" ;; esac arg="$arg $wl$flag" compiler_flags="$compiler_flags $wl$flag" linker_flags="$linker_flags $flag" done IFS="$save_ifs" arg=`$echo "X$arg" | $Xsed -e "s/^ //"` ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # Some other compiler flag. -* | +*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac ;; *.$objext) # A standard object. objs="$objs $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then pic_object= non_pic_object= # Read the .lo file # If there is no directory component, then add one. case $arg in */* | *\\*) . $arg ;; *) . ./$arg ;; esac if test -z "$pic_object" || \ test -z "$non_pic_object" || test "$pic_object" = none && \ test "$non_pic_object" = none; then $echo "$modename: cannot find name of object for \`$arg'" 1>&2 exit $EXIT_FAILURE fi # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. libobjs="$libobjs $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object non_pic_objects="$non_pic_objects $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi else # Only an error if not doing a dry-run. if test -z "$run"; then $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 exit $EXIT_FAILURE else # Dry-run case. # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` libobjs="$libobjs $pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi fi ;; *.$libext) # An archive. deplibs="$deplibs $arg" old_deplibs="$old_deplibs $arg" continue ;; *.la) # A libtool-controlled library. if test "$prev" = dlfiles; then # This library was specified with -dlopen. dlfiles="$dlfiles $arg" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. dlprefiles="$dlprefiles $arg" prev= else deplibs="$deplibs $arg" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" fi done # argument parsing loop if test -n "$prev"; then $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" fi oldlibs= # calculate the name of the file, without its directory outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` if test "X$output_objdir" = "X$output"; then output_objdir="$objdir" else output_objdir="$output_objdir/$objdir" fi # Create the object directory. if test ! -d "$output_objdir"; then $show "$mkdir $output_objdir" $run $mkdir $output_objdir exit_status=$? if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then exit $exit_status fi fi # Determine the type of output case $output in "") $echo "$modename: you must specify an output file" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac case $host in *cygwin* | *mingw* | *pw32*) # don't eliminate duplications in $postdeps and $predeps duplicate_compiler_generated_deps=yes ;; *) duplicate_compiler_generated_deps=$duplicate_deps ;; esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if test "X$duplicate_deps" = "Xyes" ; then case "$libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi libs="$libs $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; esac pre_post_deps="$pre_post_deps $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries case $linkmode in lib) passes="conv link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 exit $EXIT_FAILURE ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS%" test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" ;; esac fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else compiler_flags="$compiler_flags $deplib" fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 continue fi name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` if test "$linkmode" = lib; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then library_names= old_library= case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` test "X$ladir" = "X$lib" && ladir="." lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` ;; *) $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) lib="$deplib" ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` if eval $echo \"$deplib\" 2>/dev/null \ | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then $echo $echo "*** Warning: Trying to link with static lib archive $deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because the file extensions .$libext of this argument makes me believe" $echo "*** that it is just a static archive that I should not used here." else $echo $echo "*** Warning: Linking the shared library $output against the" $echo "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. newdlprefiles="$newdlprefiles $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else newdlfiles="$newdlfiles $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2 exit $EXIT_FAILURE fi # Check to see that this really is a libtool archive. if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` test "X$ladir" = "X$lib" && ladir="." dlname= dlopen= dlpreopen= libdir= library_names= old_library= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && dlfiles="$dlfiles $dlopen" test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 exit $EXIT_FAILURE fi # It is a libtool convenience library, so add in its objects. convenience="$convenience $ladir/$objdir/$old_library" old_convenience="$old_convenience $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done elif test "$linkmode" != prog && test "$linkmode" != lib; then $echo "$modename: \`$lib' is not a convenience library" 1>&2 exit $EXIT_FAILURE fi continue fi # $pass = conv # Get the name of the library we link against. linklib= for l in $old_library $library_names; do linklib="$l" done if test -z "$linklib"; then $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 exit $EXIT_FAILURE fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 exit $EXIT_FAILURE fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. dlprefiles="$dlprefiles $lib $dependency_libs" else newdlfiles="$newdlfiles $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 abs_ladir="$ladir" fi ;; esac laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then $echo "$modename: warning: library \`$lib' was moved." 1>&2 dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$libdir" absdir="$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir="$ladir" absdir="$abs_ladir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" fi fi # $installed = yes name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir"; then $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 exit $EXIT_FAILURE fi # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then newdlprefiles="$newdlprefiles $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then newdlprefiles="$newdlprefiles $dir/$dlname" else newdlprefiles="$newdlprefiles $dir/$linklib" fi fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then newlib_search_path="$newlib_search_path $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { { test "$prefer_static_libs" = no || test "$prefer_static_libs,$installed" = "built,yes"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath " in *" $dir "*) ;; *" $absdir "*) ;; *) temp_rpath="$temp_rpath $absdir" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test "$use_static_libs" = built && test "$installed" = yes ; then use_static_libs=no fi if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then if test "$installed" = no; then notinst_deplibs="$notinst_deplibs $lib" need_relink=yes fi # This is a shared library # Warn about portability, can't link against -module's on # some systems (darwin) if test "$shouldnotlink" = yes && test "$pass" = link ; then $echo if test "$linkmode" = prog; then $echo "*** Warning: Linking the executable $output against the loadable module" else $echo "*** Warning: Linking the shared library $output against the loadable module" fi $echo "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names realname="$2" shift; shift libname=`eval \\$echo \"$libname_spec\"` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw*) major=`expr $current - $age` versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" soname=`$echo $soroot | ${SED} -e 's/^.*\///'` newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else $show "extracting exported symbol list from \`$soname'" save_ifs="$IFS"; IFS='~' cmds=$extract_expsyms_cmds for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else $show "generating import library for \`$soname'" save_ifs="$IFS"; IFS='~' cmds=$old_archive_from_expsyms_cmds for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; *-*-sysv4*uw2*) add_dir="-L$dir" ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a module then we can not link against # it, someone is ignoring the new warnings I added if /usr/bin/file -L $add 2> /dev/null | $EGREP ": [^:]* bundle" >/dev/null ; then $echo "** Warning, lib $linklib is a module, not a shared library" if test -z "$old_library" ; then $echo $echo "** And there doesn't seem to be a static archive available" $echo "** The link will probably fail, sorry" else add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$dir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then $echo "$modename: configuration error: unsupported hardcode properties" exit $EXIT_FAILURE fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && \ test "$hardcode_minus_L" != yes && \ test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. $echo $echo "*** Warning: This system can not link to static lib archive $lib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then $echo "*** But as you try to build a module library, libtool will still create " $echo "*** a static module, that should work as long as the dlopening application" $echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then $echo $echo "*** However, this would only work if libtool was able to extract symbol" $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" $echo "*** not find such a program. So, this module is probably useless." $echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` case " $xrpath " in *" $temp_xrpath "*) ;; *) xrpath="$xrpath $temp_xrpath";; esac;; *) temp_deplibs="$temp_deplibs $libdir";; esac done dependency_libs="$temp_deplibs" fi newlib_search_path="$newlib_search_path $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do case $deplib in -L*) path="$deplib" ;; *.la) dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$deplib" && dir="." # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 absdir="$dir" fi ;; esac if grep "^installed=no" $deplib > /dev/null; then path="$absdir/$objdir" else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi if test "$absdir" != "$libdir"; then $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 fi path="$absdir" fi depdepl= case $host in *-*-darwin*) # we do not want to link against static libs, # but need to link against shared eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` eval deplibdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$deplibdir/$depdepl" ; then depdepl="$deplibdir/$depdepl" elif test -f "$path/$depdepl" ; then depdepl="$path/$depdepl" else # Can't find it, oh well... depdepl= fi # do not add paths which are already there case " $newlib_search_path " in *" $path "*) ;; *) newlib_search_path="$newlib_search_path $path";; esac fi path="" ;; *) path="-L$path" ;; esac ;; -l*) case $host in *-*-darwin*) # Again, we only want to link against shared libraries eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` for tmp in $newlib_search_path ; do if test -f "$tmp/lib$tmp_libs.dylib" ; then eval depdepl="$tmp/lib$tmp_libs.dylib" break fi done path="" ;; *) continue ;; esac ;; *) continue ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac case " $deplibs " in *" $depdepl "*) ;; *) deplibs="$depdepl $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) lib_search_path="$lib_search_path $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) tmp_libs="$tmp_libs $deplib" ;; esac ;; *) tmp_libs="$tmp_libs $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then tmp_libs="$tmp_libs $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) case " $deplibs" in *\ -l* | *\ -L*) $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 ;; esac if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 fi if test -n "$export_symbols" || test -n "$export_symbols_regex"; then $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 fi # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" objs="$objs$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) if test "$module" = no; then $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 exit $EXIT_FAILURE else $echo $echo "*** Warning: Linking the shared library $output against the non-libtool" $echo "*** objects $objs is not portable!" libobjs="$libobjs $objs" fi fi if test "$dlself" != no; then $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 fi set dummy $rpath if test "$#" -gt 2; then $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 fi install_libdir="$2" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 fi else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 IFS="$save_ifs" if test -n "$8"; then $echo "$modename: too many parameters to \`-version-info'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$2" number_minor="$3" number_revision="$4" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in darwin|linux|osf|windows|none) current=`expr $number_major + $number_minor` age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) current=`expr $number_major + $number_minor` age="$number_minor" revision="$number_minor" lt_irix_increment=no ;; *) $echo "$modename: unknown library version type \`$version_type'" 1>&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit $EXIT_FAILURE ;; esac ;; no) current="$2" revision="$3" age="$4" ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac if test "$age" -gt "$current"; then $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header major=.`expr $current - $age` versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... minor_current=`expr $current + 1` xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current"; ;; irix | nonstopux) if test "X$lt_irix_increment" = "Xno"; then major=`expr $current - $age` else major=`expr $current - $age + 1` fi case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do iface=`expr $revision - $loop` loop=`expr $loop - 1` verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) major=.`expr $current - $age` versuffix="$major.$age.$revision" ;; osf) major=.`expr $current - $age` versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do iface=`expr $current - $loop` loop=`expr $loop - 1` verstring="$verstring:${iface}.0" done # Make executables depend on our current version. verstring="$verstring:${current}.0" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. major=`expr $current - $age` versuffix="-$major" ;; *) $echo "$modename: unknown library version type \`$version_type'" 1>&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit $EXIT_FAILURE ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi if test "$mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$echo "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi removelist="$removelist $p" ;; *) ;; esac done if test -n "$removelist"; then $show "${rm}r $removelist" $run ${rm}r $removelist fi fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then oldlibs="$oldlibs $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` # deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` # dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do temp_xrpath="$temp_xrpath -R$libdir" case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) dlfiles="$dlfiles $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) dlprefiles="$dlprefiles $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework deplibs="$deplibs -framework System" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then deplibs="$deplibs -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $rm conftest.c cat > conftest.c </dev/null` for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null \ | grep " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ | ${SED} 10q \ | $EGREP "$file_magic_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $echo $echo "*** Warning: linker path does not have real file for library $a_deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $echo "*** with $libname but no candidates were found. (...for file magic test)" else $echo "*** with $libname and none of the candidates passed a file format test" $echo "*** using a file magic. Last file checked: $potlib" fi fi else # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" fi done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` for a_deplib in $deplibs; do name=`expr $a_deplib : '-l\(.*\)'` # If $name is empty we are operating on a -L argument. if test -n "$name" && test "$name" != "0"; then if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) newdeplibs="$newdeplibs $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval \\$echo \"$libname_spec\"` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval $echo \"$potent_lib\" 2>/dev/null \ | ${SED} 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $echo $echo "*** Warning: linker path does not have real file for library $a_deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $echo "*** with $libname but no candidates were found. (...for regex pattern test)" else $echo "*** with $libname and none of the candidates passed a file format test" $echo "*** using a regex pattern. Last file checked: $potlib" fi fi else # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" fi done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ -e 's/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"` done fi if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \ | grep . >/dev/null; then $echo if test "X$deplibs_check_method" = "Xnone"; then $echo "*** Warning: inter-library dependencies are not supported in this platform." else $echo "*** Warning: inter-library dependencies are not known to be supported." fi $echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes fi ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then $echo $echo "*** Warning: libtool could not satisfy all declared inter-library" $echo "*** dependencies of module $libname. Therefore, libtool will create" $echo "*** a static module, that should work as long as the dlopening" $echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then $echo $echo "*** However, this would only work if libtool was able to extract symbol" $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" $echo "*** not find such a program. So, this module is probably useless." $echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else $echo "*** The inter-library dependencies that have been dropped here will be" $echo "*** automatically added whenever a program is linked with this library" $echo "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then $echo $echo "*** Since this library must not contain undefined symbols," $echo "*** because either the platform does not support them or" $echo "*** it was explicitly requested with -no-undefined," $echo "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) new_libs="$new_libs -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$new_libs $deplib" ;; esac ;; *) new_libs="$new_libs $deplib" ;; esac done deplibs="$new_libs" # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" dep_rpath="$dep_rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" if test -n "$hardcode_libdir_flag_spec_ld"; then case $archive_cmds in *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;; *) eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;; esac else eval dep_rpath=\"$hardcode_libdir_flag_spec\" fi fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names realname="$2" shift; shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" linknames= for link do linknames="$linknames $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then $show "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $run $rm $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" if len=`expr "X$cmd" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then $show "$cmd" $run eval "$cmd" || exit $? skipped_export=false else # The command line is too long to execute in one step. $show "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS="$save_ifs" if test -n "$export_symbols_regex"; then $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' $show "$mv \"${export_symbols}T\" \"$export_symbols\"" $run eval '$mv "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) tmp_deplibs="$tmp_deplibs $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" else gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $convenience libobjs="$libobjs $func_extract_archives_result" fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" linker_flags="$linker_flags $flag" fi # Make a backup of the uninstalled library when relinking if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*" 2>/dev/null` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise. $echo "creating reloadable object files..." # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output output_la=`$echo "X$output" | $Xsed -e "$basename"` # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= delfiles= last_robj= k=1 output=$output_objdir/$output_la-${k}.$objext # Loop over the list of objects to be linked. for obj in $save_libobjs do eval test_cmds=\"$reload_cmds $objlist $last_robj\" if test "X$objlist" = X || { len=`expr "X$test_cmds" : ".*" 2>/dev/null` && test "$len" -le "$max_cmd_len"; }; then objlist="$objlist $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. eval concat_cmds=\"$reload_cmds $objlist $last_robj\" else # All subsequent reloadable object files will link in # the last one created. eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext k=`expr $k + 1` output=$output_objdir/$output_la-${k}.$objext objlist=$obj len=1 fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" if ${skipped_export-false}; then $show "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $run $rm $export_symbols libobjs=$output # Append the command to create the export file. eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" fi # Set up a command to remove the reloadable object files # after they are used. i=0 while test "$i" -lt "$k" do i=`expr $i + 1` delfiles="$delfiles $output_objdir/$output_la-${i}.$objext" done $echo "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi # Append the command to remove the reloadable object files # to the just-reset $cmds. eval cmds=\"\$cmds~\$rm $delfiles\" fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' fi exit $lt_exit } done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then $show "${rm}r $gentop" $run ${rm}r "$gentop" fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) case " $deplibs" in *\ -l* | *\ -L*) $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 ;; esac if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 fi case $output in *.lo) if test -n "$objs$old_deplibs"; then $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 exit $EXIT_FAILURE fi libobj="$output" obj=`$echo "X$output" | $Xsed -e "$lo2o"` ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $run $rm $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec and hope we can get by with # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` else gentop="$output_objdir/${obj}x" generated="$generated $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # Create the old-style object. reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" cmds=$reload_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $run eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" cmds=$reload_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; esac if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 fi if test "$preload" = yes; then if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && test "$dlopen_self_static" = unknown; then $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." fi fi case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` ;; esac case $host in *darwin*) # Don't allow lazy linking, it breaks C++ global constructors if test "$tagname" = CXX ; then compile_command="$compile_command ${wl}-bind_at_load" finalize_command="$finalize_command ${wl}-bind_at_load" fi ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) new_libs="$new_libs -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$new_libs $deplib" ;; esac ;; *) new_libs="$new_libs $deplib" ;; esac done compile_deplibs="$new_libs" compile_command="$compile_command $compile_deplibs" finalize_command="$finalize_command $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; *) dllsearchpath="$dllsearchpath:$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` fi dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then dlsyms="${outputname}S.c" else $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 fi fi if test -n "$dlsyms"; then case $dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${outputname}.nm" $show "$rm $nlist ${nlist}S ${nlist}T" $run $rm "$nlist" "${nlist}S" "${nlist}T" # Parse the name list into a source file. $show "creating $output_objdir/$dlsyms" test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ #ifdef __cplusplus extern \"C\" { #endif /* Prevent the only kind of declaration conflicts we can make. */ #define lt_preloaded_symbols some_other_symbol /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then $show "generating symbol list for \`$output'" test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` for arg in $progfiles; do $show "extracting global C symbols from \`$arg'" $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi if test -n "$export_symbols_regex"; then $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $run $rm $export_symbols $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* ) $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac else $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' $run eval 'mv "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* ) $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac fi fi for arg in $dlprefiles; do $show "extracting global C symbols from \`$arg'" name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` $run eval '$echo ": $name " >> "$nlist"' $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done if test -z "$run"; then # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $mv "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if grep -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else grep -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' else $echo '/* NONE */' >> "$output_objdir/$dlsyms" fi $echo >> "$output_objdir/$dlsyms" "\ #undef lt_preloaded_symbols #if defined (__STDC__) && __STDC__ # define lt_ptr void * #else # define lt_ptr char * # define const #endif /* The mapping between symbol names and symbols. */ " case $host in *cygwin* | *mingw* ) $echo >> "$output_objdir/$dlsyms" "\ /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs */ struct { " ;; * ) $echo >> "$output_objdir/$dlsyms" "\ const struct { " ;; esac $echo >> "$output_objdir/$dlsyms" "\ const char *name; lt_ptr address; } lt_preloaded_symbols[] = {\ " eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" $echo >> "$output_objdir/$dlsyms" "\ {0, (lt_ptr) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " fi pic_flag_for_symtable= case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; esac;; *-*-hpux*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag";; esac esac # Now compile the dynamic symbol file. $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? # Clean up the generated files. $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" # Transform the symbol file into the correct name. case $host in *cygwin* | *mingw* ) if test -f "$output_objdir/${outputname}.def" ; then compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` else compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` fi ;; * ) compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` ;; esac ;; *) $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 exit $EXIT_FAILURE ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` fi if test "$need_relink" = no || test "$build_libtool_libs" != yes; then # Replace the output file specification. compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. $show "$link_command" $run eval "$link_command" exit_status=$? # Delete the generated files. if test -n "$dlsyms"; then $show "$rm $output_objdir/${outputname}S.${objext}" $run $rm "$output_objdir/${outputname}S.${objext}" fi exit $exit_status fi if test -n "$shlibpath_var"; then # We should set the shlibpath_var rpath= for dir in $temp_rpath; do case $dir in [\\/]* | [A-Za-z]:[\\/]*) # Absolute path. rpath="$rpath$dir:" ;; *) # Relative path: add a thisdir entry. rpath="$rpath\$thisdir/$dir:" ;; esac done temp_rpath="$rpath" fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do rpath="$rpath$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $run $rm $output # Link the executable and exit $show "$link_command" $run eval "$link_command" || exit $? exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 $echo "$modename: \`$output' will be relinked during installation" 1>&2 else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname $show "$link_command" $run eval "$link_command" || exit $? # Now create the wrapper script. $show "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` relink_command="$var=\"$var_value\"; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` fi # Quote $echo for shipping. if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then case $progpath in [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; esac qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` else qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` fi # Only actually do things if our run command is non-null. if test -z "$run"; then # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) output_name=`basename $output` output_path=`dirname $output` cwrappersource="$output_path/$objdir/lt-$output_name.c" cwrapper="$output_path/$output_name.exe" $rm $cwrappersource $cwrapper trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 cat > $cwrappersource <> $cwrappersource<<"EOF" #include #include #include #include #include #include #include #include #include #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) # define HAVE_DOS_BASED_FILE_SYSTEM # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) /* -DDEBUG is fairly common in CFLAGS. */ #undef DEBUG #if defined DEBUGWRAPPER # define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__) #else # define DEBUG(format, ...) #endif const char *program_name = NULL; void * xmalloc (size_t num); char * xstrdup (const char *string); const char * base_name (const char *name); char * find_executable(const char *wrapper); int check_executable(const char *path); char * strendzap(char *str, const char *pat); void lt_fatal (const char *message, ...); int main (int argc, char *argv[]) { char **newargz; int i; program_name = (char *) xstrdup (base_name (argv[0])); DEBUG("(main) argv[0] : %s\n",argv[0]); DEBUG("(main) program_name : %s\n",program_name); newargz = XMALLOC(char *, argc+2); EOF cat >> $cwrappersource <> $cwrappersource <<"EOF" newargz[1] = find_executable(argv[0]); if (newargz[1] == NULL) lt_fatal("Couldn't find %s", argv[0]); DEBUG("(main) found exe at : %s\n",newargz[1]); /* we know the script has the same name, without the .exe */ /* so make sure newargz[1] doesn't end in .exe */ strendzap(newargz[1],".exe"); for (i = 1; i < argc; i++) newargz[i+1] = xstrdup(argv[i]); newargz[argc+1] = NULL; for (i=0; i> $cwrappersource <> $cwrappersource <> $cwrappersource <<"EOF" return 127; } void * xmalloc (size_t num) { void * p = (void *) malloc (num); if (!p) lt_fatal ("Memory exhausted"); return p; } char * xstrdup (const char *string) { return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL ; } const char * base_name (const char *name) { const char *base; #if defined (HAVE_DOS_BASED_FILE_SYSTEM) /* Skip over the disk name in MSDOS pathnames. */ if (isalpha ((unsigned char)name[0]) && name[1] == ':') name += 2; #endif for (base = name; *name; name++) if (IS_DIR_SEPARATOR (*name)) base = name + 1; return base; } int check_executable(const char * path) { struct stat st; DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!"); if ((!path) || (!*path)) return 0; if ((stat (path, &st) >= 0) && ( /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */ #if defined (S_IXOTH) ((st.st_mode & S_IXOTH) == S_IXOTH) || #endif #if defined (S_IXGRP) ((st.st_mode & S_IXGRP) == S_IXGRP) || #endif ((st.st_mode & S_IXUSR) == S_IXUSR)) ) return 1; else return 0; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise */ char * find_executable (const char* wrapper) { int has_slash = 0; const char* p; const char* p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; int tmp_len; char* concat_name; DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable(concat_name)) return concat_name; XFREE(concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable(concat_name)) return concat_name; XFREE(concat_name); } #if defined (HAVE_DOS_BASED_FILE_SYSTEM) } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char* path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char* q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR(*q)) break; p_len = q - p; p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); tmp_len = strlen(tmp); concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable(concat_name)) return concat_name; XFREE(concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); tmp_len = strlen(tmp); concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable(concat_name)) return concat_name; XFREE(concat_name); return NULL; } char * strendzap(char *str, const char *pat) { size_t len, patlen; assert(str != NULL); assert(pat != NULL); len = strlen(str); patlen = strlen(pat); if (patlen <= len) { str += len - patlen; if (strcmp(str, pat) == 0) *str = '\0'; } return str; } static void lt_error_core (int exit_status, const char * mode, const char * message, va_list ap) { fprintf (stderr, "%s: %s: ", program_name, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, "FATAL", message, ap); va_end (ap); } EOF # we should really use a build-platform specific compiler # here, but OTOH, the wrappers (shell script and this C one) # are only useful if you want to execute the "real" binary. # Since the "real" binary is built for $host, then this # wrapper might as well be built for $host, too. $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource ;; esac $rm $output trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 $echo > $output "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='${SED} -e 1s/^X//' sed_quote_subst='$sed_quote_subst' # Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variable: notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$echo are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then echo=\"$qecho\" file=\"\$0\" # Make sure echo works. if test \"X\$1\" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then # Yippee, \$echo works! : else # Restart under the correct shell, and then maybe \$echo will work. exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} fi fi\ " $echo >> $output "\ # Find the directory that this script lives in. thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` done # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $echo >> $output "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || \\ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $mkdir \"\$progdir\" else $rm \"\$progdir/\$file\" fi" $echo >> $output "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $echo \"\$relink_command_output\" >&2 $rm \"\$progdir/\$file\" exit $EXIT_FAILURE fi fi $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $rm \"\$progdir/\$program\"; $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } $rm \"\$progdir/\$file\" fi" else $echo >> $output "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $echo >> $output "\ if test -f \"\$progdir/\$program\"; then" # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $echo >> $output "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` export $shlibpath_var " fi # fixup the dll searchpath if we need to. if test -n "$dllsearchpath"; then $echo >> $output "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi $echo >> $output "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2*) $echo >> $output "\ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $echo >> $output "\ exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $echo >> $output "\ \$echo \"\$0: cannot exec \$program \$*\" exit $EXIT_FAILURE fi else # The program doesn't exist. \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$echo \"This script is just a wrapper for \$program.\" 1>&2 $echo \"See the $PACKAGE documentation for more information.\" 1>&2 exit $EXIT_FAILURE fi fi\ " chmod +x $output fi exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $addlibs oldobjs="$oldobjs $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do $echo "X$obj" | $Xsed -e 's%^.*/%%' done | sort | sort -uc >/dev/null 2>&1); then : else $echo "copying selected object files to avoid basename conflicts..." if test -z "$gentop"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" $show "${rm}r $gentop" $run ${rm}r "$gentop" $show "$mkdir $gentop" $run $mkdir "$gentop" exit_status=$? if test "$exit_status" -ne 0 && test ! -d "$gentop"; then exit $exit_status fi fi save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase counter=`expr $counter + 1` case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" $run ln "$obj" "$gentop/$newobj" || $run cp "$obj" "$gentop/$newobj" oldobjs="$oldobjs $gentop/$newobj" ;; *) oldobjs="$oldobjs $obj" ;; esac done fi eval cmds=\"$old_archive_cmds\" if len=`expr "X$cmds" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts $echo "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done for obj in $save_oldobjs do oldobjs="$objlist $obj" objlist="$objlist $obj" eval test_cmds=\"$old_archive_cmds\" if len=`expr "X$test_cmds" : ".*" 2>/dev/null` && test "$len" -le "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do eval cmd=\"$cmd\" IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" done if test -n "$generated"; then $show "${rm}r$generated" $run ${rm}r$generated fi # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" $show "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` relink_command="$var=\"$var_value\"; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. if test -z "$run"; then for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdependency_libs="$newdependency_libs $libdir/$name" ;; *) newdependency_libs="$newdependency_libs $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdlfiles="$newdlfiles $libdir/$name" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdlprefiles="$newdlprefiles $libdir/$name" done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlfiles="$newdlfiles $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlprefiles="$newdlprefiles $abs" done dlprefiles="$newdlprefiles" fi $rm $output # place dlname in correct position for cygwin tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; esac $echo > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $echo >> $output "\ relink_command=\"$relink_command\"" fi done fi # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? ;; esac exit $EXIT_SUCCESS ;; # libtool install mode install) modename="$modename: install" # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. $echo "X$nonopt" | grep shtool > /dev/null; then # Aesthetically quote it. arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac install_prog="$arg " arg="$1" shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac install_prog="$install_prog$arg" # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= for arg do if test -n "$dest"; then files="$files $dest" dest=$arg continue fi case $arg in -d) isdir=yes ;; -f) case " $install_prog " in *[\\\ /]cp\ *) ;; *) prev=$arg ;; esac ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac install_prog="$install_prog $arg" done if test -z "$install_prog"; then $echo "$modename: you must specify an install program" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test -n "$prev"; then $echo "$modename: the \`$prev' option requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test -z "$files"; then if test -z "$dest"; then $echo "$modename: no file or destination specified" 1>&2 else $echo "$modename: you must specify a destination" 1>&2 fi $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Strip any trailing slash from the destination. dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` test "X$destdir" = "X$dest" && destdir=. destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` # Not a directory, so check to see that there is only one file specified. set dummy $files if test "$#" -gt 2; then $echo "$modename: \`$dest' is not a directory" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. staticlibs="$staticlibs $file" ;; *.la) # Check to see that this really is a libtool archive. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi library_names= old_library= relink_command= # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) current_libdirs="$current_libdirs $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) future_libdirs="$future_libdirs $libdir" ;; esac fi dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ test "X$dir" = "X$file/" && dir= dir="$dir$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. if test "$inst_prefix_dir" = "$destdir"; then $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 exit $EXIT_FAILURE fi if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP` else relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP` fi $echo "$modename: warning: relinking \`$file'" 1>&2 $show "$relink_command" if $run eval "$relink_command"; then : else $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 exit $EXIT_FAILURE fi fi # See the names of the shared library. set dummy $library_names if test -n "$2"; then realname="$2" shift shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. $show "$install_prog $dir/$srcname $destdir/$realname" $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? if test -n "$stripme" && test -n "$striplib"; then $show "$striplib $destdir/$realname" $run eval "$striplib $destdir/$realname" || exit $? fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try `ln -sf' first, because the `ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do if test "$linkname" != "$realname"; then $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" fi done fi # Do each command in the postinstall commands. lib="$destdir/$realname" cmds=$postinstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' fi exit $lt_exit } done IFS="$save_ifs" fi # Install the pseudo-library for information purposes. name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` instname="$dir/$name"i $show "$install_prog $instname $destdir/$name" $run eval "$install_prog $instname $destdir/$name" || exit $? # Maybe install the static library, too. test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` ;; *.$objext) staticdest="$destfile" destfile= ;; *) $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac # Install the libtool object if requested. if test -n "$destfile"; then $show "$install_prog $file $destfile" $run eval "$install_prog $file $destfile" || exit $? fi # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` $show "$install_prog $staticobj $staticdest" $run eval "$install_prog \$staticobj \$staticdest" || exit $? fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then file=`$echo $file|${SED} 's,.exe$,,'` stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin*|*mingw*) wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` ;; *) wrapper=$file ;; esac if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then notinst_deplibs= relink_command= # Note that it is not necessary on cygwin/mingw to append a dot to # foo even if both foo and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. # # If there is no directory component, then add one. case $wrapper in */* | *\\*) . ${wrapper} ;; *) . ./${wrapper} ;; esac # Check the variables that should have been set. if test -z "$notinst_deplibs"; then $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 exit $EXIT_FAILURE fi finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then # If there is no directory component, then add one. case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac fi libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 finalize=no fi done relink_command= # Note that it is not necessary on cygwin/mingw to append a dot to # foo even if both foo and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. # # If there is no directory component, then add one. case $wrapper in */* | *\\*) . ${wrapper} ;; *) . ./${wrapper} ;; esac outputname= if test "$fast_install" = no && test -n "$relink_command"; then if test "$finalize" = yes && test -z "$run"; then tmpdir=`func_mktempdir` file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP` $show "$relink_command" if $run eval "$relink_command"; then : else $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 ${rm}r "$tmpdir" continue fi file="$outputname" else $echo "$modename: warning: cannot relink \`$file'" 1>&2 fi else # Install the binary that we compiled earlier. file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` ;; esac ;; esac $show "$install_prog$stripme $file $destfile" $run eval "$install_prog\$stripme \$file \$destfile" || exit $? test -n "$outputname" && ${rm}r "$tmpdir" ;; esac done for file in $staticlibs; do name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` # Set up the ranlib parameters. oldlib="$destdir/$name" $show "$install_prog $file $oldlib" $run eval "$install_prog \$file \$oldlib" || exit $? if test -n "$stripme" && test -n "$old_striplib"; then $show "$old_striplib $oldlib" $run eval "$old_striplib $oldlib" || exit $? fi # Do each command in the postinstall commands. cmds=$old_postinstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" done if test -n "$future_libdirs"; then $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 fi if test -n "$current_libdirs"; then # Maybe just do a dry run. test -n "$run" && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi ;; # libtool finish mode finish) modename="$modename: finish" libdirs="$nonopt" admincmds= if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for dir do libdirs="$libdirs $dir" done for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. cmds=$finish_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || admincmds="$admincmds $cmd" done IFS="$save_ifs" fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $run eval "$cmds" || admincmds="$admincmds $cmds" fi done fi # Exit here if they wanted silent mode. test "$show" = : && exit $EXIT_SUCCESS $echo "X----------------------------------------------------------------------" | $Xsed $echo "Libraries have been installed in:" for libdir in $libdirs; do $echo " $libdir" done $echo $echo "If you ever happen to want to link against installed libraries" $echo "in a given directory, LIBDIR, you must either use libtool, and" $echo "specify the full pathname of the library, or use the \`-LLIBDIR'" $echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then $echo " - add LIBDIR to the \`$shlibpath_var' environment variable" $echo " during execution" fi if test -n "$runpath_var"; then $echo " - add LIBDIR to the \`$runpath_var' environment variable" $echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $echo " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $echo " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi $echo $echo "See any operating system documentation about shared libraries for" $echo "more information, such as the ld(1) and ld.so(8) manual pages." $echo "X----------------------------------------------------------------------" | $Xsed exit $EXIT_SUCCESS ;; # libtool execute mode execute) modename="$modename: execute" # The first argument is the command name. cmd="$nonopt" if test -z "$cmd"; then $echo "$modename: you must specify a COMMAND" 1>&2 $echo "$help" exit $EXIT_FAILURE fi # Handle -dlopen flags immediately. for file in $execute_dlfiles; do if test ! -f "$file"; then $echo "$modename: \`$file' is not a file" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi dir= case $file in *.la) # Check to see that this really is a libtool archive. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Read the libtool library. dlname= library_names= # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" continue fi dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. if test -f "$dir/$objdir/$dlname"; then dir="$dir/$objdir" else if test ! -f "$dir/$dlname"; then $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 exit $EXIT_FAILURE fi fi ;; *.lo) # Just add the directory containing the .lo file. dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. ;; *) $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -*) ;; *) # Do a test to see if this is really a libtool program. if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` args="$args \"$file\"" done if test -z "$run"; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var fi" done # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" $echo "export $shlibpath_var" fi $echo "$cmd$args" exit $EXIT_SUCCESS fi ;; # libtool clean and uninstall mode clean | uninstall) modename="$modename: $mode" rm="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) rm="$rm $arg"; rmforce=yes ;; -*) rm="$rm $arg" ;; *) files="$files $arg" ;; esac done if test -z "$rm"; then $echo "$modename: you must specify an RM program" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi rmdirs= origobjdir="$objdir" for file in $files; do dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` if test "X$dir" = "X$file"; then dir=. objdir="$origobjdir" else objdir="$dir/$origobjdir" fi name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` test "$mode" = uninstall && objdir="$dir" # Remember objdir for removal later, being careful to avoid duplicates if test "$mode" = clean; then case " $rmdirs " in *" $objdir "*) ;; *) rmdirs="$rmdirs $objdir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if (test -L "$file") >/dev/null 2>&1 \ || (test -h "$file") >/dev/null 2>&1 \ || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then . $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do rmfiles="$rmfiles $objdir/$n" done test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" case "$mode" in clean) case " $library_names " in # " " in the beginning catches empty $dlname *" $dlname "*) ;; *) rmfiles="$rmfiles $objdir/$dlname" ;; esac test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. cmds=$postuninstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" if test "$?" -ne 0 && test "$rmforce" != yes; then exit_status=1 fi done IFS="$save_ifs" fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. cmds=$old_postuninstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" if test "$?" -ne 0 && test "$rmforce" != yes; then exit_status=1 fi done IFS="$save_ifs" fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then # Read the .lo file . $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" \ && test "$pic_object" != none; then rmfiles="$rmfiles $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" \ && test "$non_pic_object" != none; then rmfiles="$rmfiles $dir/$non_pic_object" fi fi ;; *) if test "$mode" = clean ; then noexename=$name case $file in *.exe) file=`$echo $file|${SED} 's,.exe$,,'` noexename=`$echo $name|${SED} 's,.exe$,,'` # $file with .exe has already been added to rmfiles, # add $file without .exe rmfiles="$rmfiles $file" ;; esac # Do a test to see if this is a libtool program. if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then relink_command= . $dir/$noexename # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then rmfiles="$rmfiles $objdir/lt-$name" fi if test "X$noexename" != "X$name" ; then rmfiles="$rmfiles $objdir/lt-${noexename}.c" fi fi fi ;; esac $show "$rm $rmfiles" $run $rm $rmfiles || exit_status=1 done objdir="$origobjdir" # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then $show "rmdir $dir" $run rmdir $dir >/dev/null 2>&1 fi done exit $exit_status ;; "") $echo "$modename: you must specify a MODE" 1>&2 $echo "$generic_help" 1>&2 exit $EXIT_FAILURE ;; esac if test -z "$exec_cmd"; then $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$generic_help" 1>&2 exit $EXIT_FAILURE fi fi # test -z "$show_help" if test -n "$exec_cmd"; then eval exec $exec_cmd exit $EXIT_FAILURE fi # We need to display help for each of the modes. case $mode in "") $echo \ "Usage: $modename [OPTION]... [MODE-ARG]... Provide generalized library-building support services. --config show all configuration variables --debug enable verbose shell tracing -n, --dry-run display commands without modifying any files --features display basic configuration information and exit --finish same as \`--mode=finish' --help display this help message and exit --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] --quiet same as \`--silent' --silent don't print informational messages --tag=TAG use configuration variables from tag TAG --version print version information MODE must be one of the following: clean remove files from the build directory compile compile a source file into a libtool object execute automatically set library path, then run a program finish complete the installation of libtool libraries install install libraries or executables link create a library or an executable uninstall remove libraries from an installed directory MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for a more detailed description of MODE. Report bugs to ." exit $EXIT_SUCCESS ;; clean) $echo \ "Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $echo \ "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -prefer-pic try to building PIC objects only -prefer-non-pic try to building non-PIC objects only -static always build a \`.o' file suitable for static linking COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $echo \ "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $echo \ "Usage: $modename [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $echo \ "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $echo \ "Usage: $modename [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $echo \ "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac $echo $echo "Try \`$modename --help' for more information about other modes." exit $? # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared disable_libs=shared # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static disable_libs=static # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: elektra-0.7.1/libltdl/missing0000755000076400001440000002557711312075134013131 00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2006-05-10.23 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006 # Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). case $1 in lex|yacc) # Not GNU programs, they don't have --version. ;; tar) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $1 in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; tar) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case $firstarg in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case $firstarg in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: elektra-0.7.1/ltmain.sh0000644000076400001440000060646711312075134011727 00000000000000# ltmain.sh - Provide generalized library-building support services. # NOTE: Changing this file will not affect anything until you rerun configure. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, # 2007, 2008 Free Software Foundation, Inc. # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. basename="s,^.*/,,g" # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath="$0" # The name of this program: progname=`echo "$progpath" | $SED $basename` modename="$progname" # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 PROGRAM=ltmain.sh PACKAGE=libtool VERSION="1.5.26 Debian 1.5.26-4+lenny1" TIMESTAMP=" (1.1220.2.493 2008/02/01 16:58:18)" # Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # Check that we have a working $echo. if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then # Yippee, $echo works! : else # Restart under the correct shell, and then maybe $echo will work. exec $SHELL "$progpath" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat <&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit $EXIT_FAILURE fi # Global variables. mode=$default_mode nonopt= prev= prevopt= run= show="$echo" show_help= execute_dlfiles= duplicate_deps=no preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" extracted_archives= extracted_serial=0 ##################################### # Shell function definitions: # This seems to be the best place for them # func_mktempdir [string] # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, STRING is the basename for that directory. func_mktempdir () { my_template="${TMPDIR-/tmp}/${1-$progname}" if test "$run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else # If mktemp works, use that first and foremost my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race my_tmpdir="${my_template}-${RANDOM-0}$$" save_mktempdir_umask=`umask` umask 0077 $mkdir "$my_tmpdir" umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$my_tmpdir" || { $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2 exit $EXIT_FAILURE } fi $echo "X$my_tmpdir" | $Xsed } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. func_win32_libid () { win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then win32_nmres=`eval $NM -f posix -A $1 | \ $SED -n -e '1,100{ / I /{ s,.*,import, p q } }'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $echo $win32_libid_type } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac CC_quoted="$CC_quoted $arg" done case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac CC_quoted="$CC_quoted $arg" done case "$@ " in " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then $echo "$modename: unable to infer tagged configuration" $echo "$modename: specify a tag with \`--tag'" 1>&2 exit $EXIT_FAILURE # else # $echo "$modename: using $tagname tagged configuration" fi ;; esac fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)" $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $? if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2 exit $EXIT_FAILURE fi } # func_extract_archives gentop oldlib ... func_extract_archives () { my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" my_status="" $show "${rm}r $my_gentop" $run ${rm}r "$my_gentop" $show "$mkdir $my_gentop" $run $mkdir "$my_gentop" my_status=$? if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then exit $my_status fi for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) extracted_serial=`expr $extracted_serial + 1` my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir="$my_gentop/$my_xlib_u" $show "${rm}r $my_xdir" $run ${rm}r "$my_xdir" $show "$mkdir $my_xdir" $run $mkdir "$my_xdir" exit_status=$? if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then exit $exit_status fi case $host in *-darwin*) $show "Extracting $my_xabs" # Do not bother doing anything if just a dry run if test -z "$run"; then darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'` darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null` if test -n "$darwin_arches"; then darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= $show "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}" lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" func_extract_an_archive "`pwd`" "${darwin_base_archive}" cd "$darwin_curdir" $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" done # $darwin_arches ## Okay now we have a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` lipo -create -output "$darwin_file" $darwin_files done # $darwin_filelist ${rm}r unfat-$$ cd "$darwin_orig_dir" else cd "$darwin_orig_dir" func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches fi # $run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # End of Shell function definitions ##################################### # Darwin sucks eval std_shrext=\"$shrext_cmds\" disable_libs=no # Parse our command line options once, thoroughly. while test "$#" -gt 0 do arg="$1" shift case $arg in -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; *) optarg= ;; esac # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in execute_dlfiles) execute_dlfiles="$execute_dlfiles $arg" ;; tag) tagname="$arg" preserve_args="${preserve_args}=$arg" # Check whether tagname contains only valid characters case $tagname in *[!-_A-Za-z0-9,/]*) $echo "$progname: invalid tag name: $tagname" 1>&2 exit $EXIT_FAILURE ;; esac case $tagname in CC) # Don't test for the "default" C tag, as we know, it's there, but # not specially marked. ;; *) if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then taglist="$taglist $tagname" # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" else $echo "$progname: ignoring unknown tag $tagname" 1>&2 fi ;; esac ;; *) eval "$prev=\$arg" ;; esac prev= prevopt= continue fi # Have we seen a non-optional argument yet? case $arg in --help) show_help=yes ;; --version) echo "\ $PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP Copyright (C) 2008 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." exit $? ;; --config) ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath # Now print the configurations for the tags. for tagname in $taglist; do ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" done exit $? ;; --debug) $echo "$progname: enabling shell trace mode" set -x preserve_args="$preserve_args $arg" ;; --dry-run | -n) run=: ;; --features) $echo "host: $host" if test "$build_libtool_libs" = yes; then $echo "enable shared libraries" else $echo "disable shared libraries" fi if test "$build_old_libs" = yes; then $echo "enable static libraries" else $echo "disable static libraries" fi exit $? ;; --finish) mode="finish" ;; --mode) prevopt="--mode" prev=mode ;; --mode=*) mode="$optarg" ;; --preserve-dup-deps) duplicate_deps="yes" ;; --quiet | --silent) show=: preserve_args="$preserve_args $arg" ;; --tag) prevopt="--tag" prev=tag preserve_args="$preserve_args --tag" ;; --tag=*) set tag "$optarg" ${1+"$@"} shift prev=tag preserve_args="$preserve_args --tag" ;; -dlopen) prevopt="-dlopen" prev=execute_dlfiles ;; -*) $echo "$modename: unrecognized option \`$arg'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; *) nonopt="$arg" break ;; esac done if test -n "$prevopt"; then $echo "$modename: option \`$prevopt' requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi case $disable_libs in no) ;; shared) build_libtool_libs=no build_old_libs=yes ;; static) build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` ;; esac # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= if test -z "$show_help"; then # Infer the operation mode. if test -z "$mode"; then $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2 case $nonopt in *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) mode=link for arg do case $arg in -c) mode=compile break ;; esac done ;; *db | *dbx | *strace | *truss) mode=execute ;; *install*|cp|mv) mode=install ;; *rm) mode=uninstall ;; *) # If we have no mode, but dlfiles were specified, then do execute mode. test -n "$execute_dlfiles" && mode=execute # Just use the default operation mode. if test -z "$mode"; then if test -n "$nonopt"; then $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 else $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 fi fi ;; esac fi # Only execute mode is allowed to have -dlopen flags. if test -n "$execute_dlfiles" && test "$mode" != execute; then $echo "$modename: unrecognized option \`-dlopen'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$modename --help --mode=$mode' for more information." # These modes are in order of execution frequency so that they run quickly. case $mode in # libtool compile mode compile) modename="$modename: compile" # Get the compilation command and the source file. base_compile= srcfile="$nonopt" # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= for arg do case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile lastarg="$arg" arg_mode=normal ;; target ) libobj="$arg" arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) if test -n "$libobj" ; then $echo "$modename: you cannot specify \`-o' more than once" 1>&2 exit $EXIT_FAILURE fi arg_mode=target continue ;; -static | -prefer-pic | -prefer-non-pic) later="$later $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` lastarg= save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac lastarg="$lastarg $arg" done IFS="$save_ifs" lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` # Add the arguments to base_compile. base_compile="$base_compile $lastarg" continue ;; * ) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg="$srcfile" srcfile="$arg" ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` case $lastarg in # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly # in scan sets, and some SunOS ksh mistreat backslash-escaping # in scan sets (worked around with variable expansion), # and furthermore cannot handle '|' '&' '(' ')' in scan sets # at all, so we specify them separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") lastarg="\"$lastarg\"" ;; esac base_compile="$base_compile $lastarg" done # for arg case $arg_mode in arg) $echo "$modename: you must specify an argument for -Xcompile" exit $EXIT_FAILURE ;; target) $echo "$modename: you must specify a target with \`-o'" 1>&2 exit $EXIT_FAILURE ;; *) # Get the name of the library object. [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo xform='[cCFSifmso]' case $libobj in *.ada) xform=ada ;; *.adb) xform=adb ;; *.ads) xform=ads ;; *.asm) xform=asm ;; *.c++) xform=c++ ;; *.cc) xform=cc ;; *.ii) xform=ii ;; *.class) xform=class ;; *.cpp) xform=cpp ;; *.cxx) xform=cxx ;; *.[fF][09]?) xform=[fF][09]. ;; *.for) xform=for ;; *.java) xform=java ;; *.obj) xform=obj ;; *.sx) xform=sx ;; esac libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` case $libobj in *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; *) $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 exit $EXIT_FAILURE ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -static) build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"` case $qlibobj in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qlibobj="\"$qlibobj\"" ;; esac test "X$libobj" != "X$qlibobj" \ && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \ && $echo "$modename: libobj name \`$libobj' may not contain shell special characters." objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$obj"; then xdir= else xdir=$xdir/ fi lobj=${xdir}$objdir/$objname if test -z "$base_compile"; then $echo "$modename: you must specify a compilation command" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi $run $rm $removelist trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" removelist="$removelist $output_obj $lockfile" trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $run ln "$progpath" "$lockfile" 2>/dev/null; do $show "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $echo "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi $echo "$srcfile" > "$lockfile" fi if test -n "$fix_srcfile_path"; then eval srcfile=\"$fix_srcfile_path\" fi qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"` case $qsrcfile in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qsrcfile="\"$qsrcfile\"" ;; esac $run $rm "$libobj" "${libobj}T" # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. test -z "$run" && cat > ${libobj}T </dev/null`" != "X$srcfile"; then $echo "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then $show "$mv $output_obj $lobj" if $run $mv $output_obj $lobj; then : else error=$? $run $rm $removelist exit $error fi fi # Append the name of the PIC object to the libtool object file. test -z "$run" && cat >> ${libobj}T <> ${libobj}T </dev/null`" != "X$srcfile"; then $echo "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then $show "$mv $output_obj $obj" if $run $mv $output_obj $obj; then : else error=$? $run $rm $removelist exit $error fi fi # Append the name of the non-PIC object the libtool object file. # Only append if the libtool object file exists. test -z "$run" && cat >> ${libobj}T <> ${libobj}T <&2 fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test ;; *) qarg=$arg ;; esac libtool_args="$libtool_args $qarg" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) compile_command="$compile_command @OUTPUT@" finalize_command="$finalize_command @OUTPUT@" ;; esac case $prev in dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. compile_command="$compile_command @SYMFILE@" finalize_command="$finalize_command @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then dlfiles="$dlfiles $arg" else dlprefiles="$dlprefiles $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" if test ! -f "$arg"; then $echo "$modename: symbol file \`$arg' does not exist" exit $EXIT_FAILURE fi prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat $save_arg` do # moreargs="$moreargs $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then pic_object= non_pic_object= # Read the .lo file # If there is no directory component, then add one. case $arg in */* | *\\*) . $arg ;; *) . ./$arg ;; esac if test -z "$pic_object" || \ test -z "$non_pic_object" || test "$pic_object" = none && \ test "$non_pic_object" = none; then $echo "$modename: cannot find name of object for \`$arg'" 1>&2 exit $EXIT_FAILURE fi # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. libobjs="$libobjs $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object non_pic_objects="$non_pic_objects $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi else # Only an error if not doing a dry-run. if test -z "$run"; then $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 exit $EXIT_FAILURE else # Dry-run case. # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` libobjs="$libobjs $pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi fi done else $echo "$modename: link input file \`$save_arg' does not exist" exit $EXIT_FAILURE fi arg=$save_arg prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit $EXIT_FAILURE ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) rpath="$rpath $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) xrpath="$xrpath $arg" ;; esac fi prev= continue ;; xcompiler) compiler_flags="$compiler_flags $qarg" prev= compile_command="$compile_command $qarg" finalize_command="$finalize_command $qarg" continue ;; xlinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $wl$qarg" prev= compile_command="$compile_command $wl$qarg" finalize_command="$finalize_command $wl$qarg" continue ;; xcclinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $qarg" prev= compile_command="$compile_command $qarg" finalize_command="$finalize_command $qarg" continue ;; shrext) shrext_cmds="$arg" prev= continue ;; darwin_framework|darwin_framework_skip) test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" prev= continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then compile_command="$compile_command $link_static_flag" finalize_command="$finalize_command $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 continue ;; -avoid-version) avoid_version=yes continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then $echo "$modename: more than one -exported-symbols argument is not allowed" exit $EXIT_FAILURE fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework|-arch|-isysroot) case " $CC " in *" ${arg} ${1} "* | *" ${arg} ${1} "*) prev=darwin_framework_skip ;; *) compiler_flags="$compiler_flags $arg" prev=darwin_framework ;; esac compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" ;; esac continue ;; -L*) dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 absdir="$dir" notinst_path="$notinst_path $dir" fi dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "*) ;; *) deplibs="$deplibs -L$dir" lib_search_path="$lib_search_path $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; *) dllsearchpath="$dllsearchpath:$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework deplibs="$deplibs -framework System" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test "X$arg" = "X-lc" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi deplibs="$deplibs $arg" continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. -model) compile_command="$compile_command $arg" compiler_flags="$compiler_flags $arg" finalize_command="$finalize_command $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) compiler_flags="$compiler_flags $arg" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" continue ;; -multi_module) single_module="${wl}-multi_module" continue ;; -module) module=yes continue ;; # -64, -mips[0-9] enable 64-bit mode on the SGI compiler # -r[0-9][0-9]* specifies the processor on the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler # +DA*, +DD* enable 64-bit mode on the HP compiler # -q* pass through compiler args for the IBM compiler # -m* pass through architecture-specific compiler args for GCC # -m*, -t[45]*, -txscale* pass through architecture-specific # compiler args for GCC # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC # -F/path gives path to uninstalled frameworks, gcc on darwin # @file GCC response files -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" compiler_flags="$compiler_flags $arg" continue ;; -shrext) prev=shrext continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit $EXIT_FAILURE ;; esac case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -Wc,*) args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" case $flag in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") flag="\"$flag\"" ;; esac arg="$arg $wl$flag" compiler_flags="$compiler_flags $flag" done IFS="$save_ifs" arg=`$echo "X$arg" | $Xsed -e "s/^ //"` ;; -Wl,*) args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" case $flag in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") flag="\"$flag\"" ;; esac arg="$arg $wl$flag" compiler_flags="$compiler_flags $wl$flag" linker_flags="$linker_flags $flag" done IFS="$save_ifs" arg=`$echo "X$arg" | $Xsed -e "s/^ //"` ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # Some other compiler flag. -* | +*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac ;; *.$objext) # A standard object. objs="$objs $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then pic_object= non_pic_object= # Read the .lo file # If there is no directory component, then add one. case $arg in */* | *\\*) . $arg ;; *) . ./$arg ;; esac if test -z "$pic_object" || \ test -z "$non_pic_object" || test "$pic_object" = none && \ test "$non_pic_object" = none; then $echo "$modename: cannot find name of object for \`$arg'" 1>&2 exit $EXIT_FAILURE fi # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. libobjs="$libobjs $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object non_pic_objects="$non_pic_objects $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi else # Only an error if not doing a dry-run. if test -z "$run"; then $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 exit $EXIT_FAILURE else # Dry-run case. # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` libobjs="$libobjs $pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi fi ;; *.$libext) # An archive. deplibs="$deplibs $arg" old_deplibs="$old_deplibs $arg" continue ;; *.la) # A libtool-controlled library. if test "$prev" = dlfiles; then # This library was specified with -dlopen. dlfiles="$dlfiles $arg" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. dlprefiles="$dlprefiles $arg" prev= else deplibs="$deplibs $arg" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" fi done # argument parsing loop if test -n "$prev"; then $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" fi oldlibs= # calculate the name of the file, without its directory outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` if test "X$output_objdir" = "X$output"; then output_objdir="$objdir" else output_objdir="$output_objdir/$objdir" fi # Create the object directory. if test ! -d "$output_objdir"; then $show "$mkdir $output_objdir" $run $mkdir $output_objdir exit_status=$? if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then exit $exit_status fi fi # Determine the type of output case $output in "") $echo "$modename: you must specify an output file" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac case $host in *cygwin* | *mingw* | *pw32*) # don't eliminate duplications in $postdeps and $predeps duplicate_compiler_generated_deps=yes ;; *) duplicate_compiler_generated_deps=$duplicate_deps ;; esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if test "X$duplicate_deps" = "Xyes" ; then case "$libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi libs="$libs $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; esac pre_post_deps="$pre_post_deps $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries case $linkmode in lib) passes="conv link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 exit $EXIT_FAILURE ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS%" test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" ;; esac fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else compiler_flags="$compiler_flags $deplib" fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 continue fi name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` if test "$linkmode" = lib; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then library_names= old_library= case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` test "X$ladir" = "X$lib" && ladir="." lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` ;; *) $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) lib="$deplib" ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` if eval $echo \"$deplib\" 2>/dev/null \ | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then $echo $echo "*** Warning: Trying to link with static lib archive $deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because the file extensions .$libext of this argument makes me believe" $echo "*** that it is just a static archive that I should not used here." else $echo $echo "*** Warning: Linking the shared library $output against the" $echo "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. newdlprefiles="$newdlprefiles $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else newdlfiles="$newdlfiles $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2 exit $EXIT_FAILURE fi # Check to see that this really is a libtool archive. if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` test "X$ladir" = "X$lib" && ladir="." dlname= dlopen= dlpreopen= libdir= library_names= old_library= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && dlfiles="$dlfiles $dlopen" test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 exit $EXIT_FAILURE fi # It is a libtool convenience library, so add in its objects. convenience="$convenience $ladir/$objdir/$old_library" old_convenience="$old_convenience $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done elif test "$linkmode" != prog && test "$linkmode" != lib; then $echo "$modename: \`$lib' is not a convenience library" 1>&2 exit $EXIT_FAILURE fi continue fi # $pass = conv # Get the name of the library we link against. linklib= for l in $old_library $library_names; do linklib="$l" done if test -z "$linklib"; then $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 exit $EXIT_FAILURE fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 exit $EXIT_FAILURE fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. dlprefiles="$dlprefiles $lib $dependency_libs" else newdlfiles="$newdlfiles $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 abs_ladir="$ladir" fi ;; esac laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then $echo "$modename: warning: library \`$lib' was moved." 1>&2 dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$libdir" absdir="$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir="$ladir" absdir="$abs_ladir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" fi fi # $installed = yes name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir"; then $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 exit $EXIT_FAILURE fi # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then newdlprefiles="$newdlprefiles $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then newdlprefiles="$newdlprefiles $dir/$dlname" else newdlprefiles="$newdlprefiles $dir/$linklib" fi fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then newlib_search_path="$newlib_search_path $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { { test "$prefer_static_libs" = no || test "$prefer_static_libs,$installed" = "built,yes"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath " in *" $dir "*) ;; *" $absdir "*) ;; *) temp_rpath="$temp_rpath $absdir" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test "$use_static_libs" = built && test "$installed" = yes ; then use_static_libs=no fi if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then if test "$installed" = no; then notinst_deplibs="$notinst_deplibs $lib" need_relink=yes fi # This is a shared library # Warn about portability, can't link against -module's on # some systems (darwin) if test "$shouldnotlink" = yes && test "$pass" = link ; then $echo if test "$linkmode" = prog; then $echo "*** Warning: Linking the executable $output against the loadable module" else $echo "*** Warning: Linking the shared library $output against the loadable module" fi $echo "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names realname="$2" shift; shift libname=`eval \\$echo \"$libname_spec\"` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw*) major=`expr $current - $age` versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" soname=`$echo $soroot | ${SED} -e 's/^.*\///'` newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else $show "extracting exported symbol list from \`$soname'" save_ifs="$IFS"; IFS='~' cmds=$extract_expsyms_cmds for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else $show "generating import library for \`$soname'" save_ifs="$IFS"; IFS='~' cmds=$old_archive_from_expsyms_cmds for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; *-*-sysv4*uw2*) add_dir="-L$dir" ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a module then we can not link against # it, someone is ignoring the new warnings I added if /usr/bin/file -L $add 2> /dev/null | $EGREP ": [^:]* bundle" >/dev/null ; then $echo "** Warning, lib $linklib is a module, not a shared library" if test -z "$old_library" ; then $echo $echo "** And there doesn't seem to be a static archive available" $echo "** The link will probably fail, sorry" else add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$dir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then $echo "$modename: configuration error: unsupported hardcode properties" exit $EXIT_FAILURE fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && \ test "$hardcode_minus_L" != yes && \ test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. $echo $echo "*** Warning: This system can not link to static lib archive $lib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then $echo "*** But as you try to build a module library, libtool will still create " $echo "*** a static module, that should work as long as the dlopening application" $echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then $echo $echo "*** However, this would only work if libtool was able to extract symbol" $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" $echo "*** not find such a program. So, this module is probably useless." $echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` case " $xrpath " in *" $temp_xrpath "*) ;; *) xrpath="$xrpath $temp_xrpath";; esac;; *) temp_deplibs="$temp_deplibs $libdir";; esac done dependency_libs="$temp_deplibs" fi newlib_search_path="$newlib_search_path $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do case $deplib in -L*) path="$deplib" ;; *.la) dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$deplib" && dir="." # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 absdir="$dir" fi ;; esac if grep "^installed=no" $deplib > /dev/null; then path="$absdir/$objdir" else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi if test "$absdir" != "$libdir"; then $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 fi path="$absdir" fi depdepl= case $host in *-*-darwin*) # we do not want to link against static libs, # but need to link against shared eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` eval deplibdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$deplibdir/$depdepl" ; then depdepl="$deplibdir/$depdepl" elif test -f "$path/$depdepl" ; then depdepl="$path/$depdepl" else # Can't find it, oh well... depdepl= fi # do not add paths which are already there case " $newlib_search_path " in *" $path "*) ;; *) newlib_search_path="$newlib_search_path $path";; esac fi path="" ;; *) path="-L$path" ;; esac ;; -l*) case $host in *-*-darwin*) # Again, we only want to link against shared libraries eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` for tmp in $newlib_search_path ; do if test -f "$tmp/lib$tmp_libs.dylib" ; then eval depdepl="$tmp/lib$tmp_libs.dylib" break fi done path="" ;; *) continue ;; esac ;; *) continue ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac case " $deplibs " in *" $depdepl "*) ;; *) deplibs="$depdepl $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) lib_search_path="$lib_search_path $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) tmp_libs="$tmp_libs $deplib" ;; esac ;; *) tmp_libs="$tmp_libs $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then tmp_libs="$tmp_libs $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) case " $deplibs" in *\ -l* | *\ -L*) $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 ;; esac if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 fi if test -n "$export_symbols" || test -n "$export_symbols_regex"; then $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 fi # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" objs="$objs$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) if test "$module" = no; then $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 exit $EXIT_FAILURE else $echo $echo "*** Warning: Linking the shared library $output against the non-libtool" $echo "*** objects $objs is not portable!" libobjs="$libobjs $objs" fi fi if test "$dlself" != no; then $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 fi set dummy $rpath if test "$#" -gt 2; then $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 fi install_libdir="$2" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 fi else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 IFS="$save_ifs" if test -n "$8"; then $echo "$modename: too many parameters to \`-version-info'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$2" number_minor="$3" number_revision="$4" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in darwin|linux|osf|windows|none) current=`expr $number_major + $number_minor` age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) current=`expr $number_major + $number_minor` age="$number_minor" revision="$number_minor" lt_irix_increment=no ;; *) $echo "$modename: unknown library version type \`$version_type'" 1>&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit $EXIT_FAILURE ;; esac ;; no) current="$2" revision="$3" age="$4" ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac if test "$age" -gt "$current"; then $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header major=.`expr $current - $age` versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... minor_current=`expr $current + 1` xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current"; ;; irix | nonstopux) if test "X$lt_irix_increment" = "Xno"; then major=`expr $current - $age` else major=`expr $current - $age + 1` fi case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do iface=`expr $revision - $loop` loop=`expr $loop - 1` verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) major=.`expr $current - $age` versuffix="$major.$age.$revision" ;; osf) major=.`expr $current - $age` versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do iface=`expr $current - $loop` loop=`expr $loop - 1` verstring="$verstring:${iface}.0" done # Make executables depend on our current version. verstring="$verstring:${current}.0" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. major=`expr $current - $age` versuffix="-$major" ;; *) $echo "$modename: unknown library version type \`$version_type'" 1>&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit $EXIT_FAILURE ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi if test "$mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$echo "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi removelist="$removelist $p" ;; *) ;; esac done if test -n "$removelist"; then $show "${rm}r $removelist" $run ${rm}r $removelist fi fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then oldlibs="$oldlibs $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` # deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` # dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do temp_xrpath="$temp_xrpath -R$libdir" case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) dlfiles="$dlfiles $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) dlprefiles="$dlprefiles $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework deplibs="$deplibs -framework System" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then deplibs="$deplibs -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $rm conftest.c cat > conftest.c </dev/null` for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null \ | grep " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ | ${SED} 10q \ | $EGREP "$file_magic_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $echo $echo "*** Warning: linker path does not have real file for library $a_deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $echo "*** with $libname but no candidates were found. (...for file magic test)" else $echo "*** with $libname and none of the candidates passed a file format test" $echo "*** using a file magic. Last file checked: $potlib" fi fi else # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" fi done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` for a_deplib in $deplibs; do name=`expr $a_deplib : '-l\(.*\)'` # If $name is empty we are operating on a -L argument. if test -n "$name" && test "$name" != "0"; then if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) newdeplibs="$newdeplibs $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval \\$echo \"$libname_spec\"` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval $echo \"$potent_lib\" 2>/dev/null \ | ${SED} 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $echo $echo "*** Warning: linker path does not have real file for library $a_deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $echo "*** with $libname but no candidates were found. (...for regex pattern test)" else $echo "*** with $libname and none of the candidates passed a file format test" $echo "*** using a regex pattern. Last file checked: $potlib" fi fi else # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" fi done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ -e 's/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"` done fi if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \ | grep . >/dev/null; then $echo if test "X$deplibs_check_method" = "Xnone"; then $echo "*** Warning: inter-library dependencies are not supported in this platform." else $echo "*** Warning: inter-library dependencies are not known to be supported." fi $echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes fi ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then $echo $echo "*** Warning: libtool could not satisfy all declared inter-library" $echo "*** dependencies of module $libname. Therefore, libtool will create" $echo "*** a static module, that should work as long as the dlopening" $echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then $echo $echo "*** However, this would only work if libtool was able to extract symbol" $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" $echo "*** not find such a program. So, this module is probably useless." $echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else $echo "*** The inter-library dependencies that have been dropped here will be" $echo "*** automatically added whenever a program is linked with this library" $echo "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then $echo $echo "*** Since this library must not contain undefined symbols," $echo "*** because either the platform does not support them or" $echo "*** it was explicitly requested with -no-undefined," $echo "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) new_libs="$new_libs -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$new_libs $deplib" ;; esac ;; *) new_libs="$new_libs $deplib" ;; esac done deplibs="$new_libs" # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" dep_rpath="$dep_rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" if test -n "$hardcode_libdir_flag_spec_ld"; then case $archive_cmds in *\$LD*) eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" ;; *) eval dep_rpath=\"$hardcode_libdir_flag_spec\" ;; esac else eval dep_rpath=\"$hardcode_libdir_flag_spec\" fi fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names realname="$2" shift; shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" linknames= for link do linknames="$linknames $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then $show "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $run $rm $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" if len=`expr "X$cmd" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then $show "$cmd" $run eval "$cmd" || exit $? skipped_export=false else # The command line is too long to execute in one step. $show "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS="$save_ifs" if test -n "$export_symbols_regex"; then $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' $show "$mv \"${export_symbols}T\" \"$export_symbols\"" $run eval '$mv "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) tmp_deplibs="$tmp_deplibs $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" else gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $convenience libobjs="$libobjs $func_extract_archives_result" fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" linker_flags="$linker_flags $flag" fi # Make a backup of the uninstalled library when relinking if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*" 2>/dev/null` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise. $echo "creating reloadable object files..." # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output output_la=`$echo "X$output" | $Xsed -e "$basename"` # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= delfiles= last_robj= k=1 output=$output_objdir/$output_la-${k}.$objext # Loop over the list of objects to be linked. for obj in $save_libobjs do eval test_cmds=\"$reload_cmds $objlist $last_robj\" if test "X$objlist" = X || { len=`expr "X$test_cmds" : ".*" 2>/dev/null` && test "$len" -le "$max_cmd_len"; }; then objlist="$objlist $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. eval concat_cmds=\"$reload_cmds $objlist $last_robj\" else # All subsequent reloadable object files will link in # the last one created. eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext k=`expr $k + 1` output=$output_objdir/$output_la-${k}.$objext objlist=$obj len=1 fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" if ${skipped_export-false}; then $show "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $run $rm $export_symbols libobjs=$output # Append the command to create the export file. eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" fi # Set up a command to remove the reloadable object files # after they are used. i=0 while test "$i" -lt "$k" do i=`expr $i + 1` delfiles="$delfiles $output_objdir/$output_la-${i}.$objext" done $echo "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi # Append the command to remove the reloadable object files # to the just-reset $cmds. eval cmds=\"\$cmds~\$rm $delfiles\" fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' fi exit $lt_exit } done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then $show "${rm}r $gentop" $run ${rm}r "$gentop" fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) case " $deplibs" in *\ -l* | *\ -L*) $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 ;; esac if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 fi case $output in *.lo) if test -n "$objs$old_deplibs"; then $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 exit $EXIT_FAILURE fi libobj="$output" obj=`$echo "X$output" | $Xsed -e "$lo2o"` ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $run $rm $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec and hope we can get by with # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` else gentop="$output_objdir/${obj}x" generated="$generated $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # Create the old-style object. reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" cmds=$reload_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $run eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" cmds=$reload_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; esac if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 fi if test "$preload" = yes; then if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && test "$dlopen_self_static" = unknown; then $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." fi fi case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` ;; esac case $host in *darwin*) # Don't allow lazy linking, it breaks C++ global constructors if test "$tagname" = CXX ; then compile_command="$compile_command ${wl}-bind_at_load" finalize_command="$finalize_command ${wl}-bind_at_load" fi ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) new_libs="$new_libs -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$new_libs $deplib" ;; esac ;; *) new_libs="$new_libs $deplib" ;; esac done compile_deplibs="$new_libs" compile_command="$compile_command $compile_deplibs" finalize_command="$finalize_command $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; *) dllsearchpath="$dllsearchpath:$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` fi dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then dlsyms="${outputname}S.c" else $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 fi fi if test -n "$dlsyms"; then case $dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${outputname}.nm" $show "$rm $nlist ${nlist}S ${nlist}T" $run $rm "$nlist" "${nlist}S" "${nlist}T" # Parse the name list into a source file. $show "creating $output_objdir/$dlsyms" test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ #ifdef __cplusplus extern \"C\" { #endif /* Prevent the only kind of declaration conflicts we can make. */ #define lt_preloaded_symbols some_other_symbol /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then $show "generating symbol list for \`$output'" test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` for arg in $progfiles; do $show "extracting global C symbols from \`$arg'" $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi if test -n "$export_symbols_regex"; then $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $run $rm $export_symbols $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* ) $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac else $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' $run eval 'mv "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* ) $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac fi fi for arg in $dlprefiles; do $show "extracting global C symbols from \`$arg'" name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` $run eval '$echo ": $name " >> "$nlist"' $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done if test -z "$run"; then # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $mv "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if grep -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else grep -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' else $echo '/* NONE */' >> "$output_objdir/$dlsyms" fi $echo >> "$output_objdir/$dlsyms" "\ #undef lt_preloaded_symbols #if defined (__STDC__) && __STDC__ # define lt_ptr void * #else # define lt_ptr char * # define const #endif /* The mapping between symbol names and symbols. */ " case $host in *cygwin* | *mingw* ) $echo >> "$output_objdir/$dlsyms" "\ /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs */ struct { " ;; * ) $echo >> "$output_objdir/$dlsyms" "\ const struct { " ;; esac $echo >> "$output_objdir/$dlsyms" "\ const char *name; lt_ptr address; } lt_preloaded_symbols[] = {\ " eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" $echo >> "$output_objdir/$dlsyms" "\ {0, (lt_ptr) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " fi pic_flag_for_symtable= case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; esac;; *-*-hpux*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag";; esac esac # Now compile the dynamic symbol file. $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? # Clean up the generated files. $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" # Transform the symbol file into the correct name. case $host in *cygwin* | *mingw* ) if test -f "$output_objdir/${outputname}.def" ; then compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` else compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` fi ;; * ) compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` ;; esac ;; *) $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 exit $EXIT_FAILURE ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` fi if test "$need_relink" = no || test "$build_libtool_libs" != yes; then # Replace the output file specification. compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. $show "$link_command" $run eval "$link_command" exit_status=$? # Delete the generated files. if test -n "$dlsyms"; then $show "$rm $output_objdir/${outputname}S.${objext}" $run $rm "$output_objdir/${outputname}S.${objext}" fi exit $exit_status fi if test -n "$shlibpath_var"; then # We should set the shlibpath_var rpath= for dir in $temp_rpath; do case $dir in [\\/]* | [A-Za-z]:[\\/]*) # Absolute path. rpath="$rpath$dir:" ;; *) # Relative path: add a thisdir entry. rpath="$rpath\$thisdir/$dir:" ;; esac done temp_rpath="$rpath" fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do rpath="$rpath$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $run $rm $output # Link the executable and exit $show "$link_command" $run eval "$link_command" || exit $? exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 $echo "$modename: \`$output' will be relinked during installation" 1>&2 else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname $show "$link_command" $run eval "$link_command" || exit $? # Now create the wrapper script. $show "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` relink_command="$var=\"$var_value\"; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` fi # Quote $echo for shipping. if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then case $progpath in [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; esac qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` else qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` fi # Only actually do things if our run command is non-null. if test -z "$run"; then # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) output_name=`basename $output` output_path=`dirname $output` cwrappersource="$output_path/$objdir/lt-$output_name.c" cwrapper="$output_path/$output_name.exe" $rm $cwrappersource $cwrapper trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 cat > $cwrappersource <> $cwrappersource<<"EOF" #include #include #include #include #include #include #include #include #include #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) # define HAVE_DOS_BASED_FILE_SYSTEM # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) /* -DDEBUG is fairly common in CFLAGS. */ #undef DEBUG #if defined DEBUGWRAPPER # define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__) #else # define DEBUG(format, ...) #endif const char *program_name = NULL; void * xmalloc (size_t num); char * xstrdup (const char *string); const char * base_name (const char *name); char * find_executable(const char *wrapper); int check_executable(const char *path); char * strendzap(char *str, const char *pat); void lt_fatal (const char *message, ...); int main (int argc, char *argv[]) { char **newargz; int i; program_name = (char *) xstrdup (base_name (argv[0])); DEBUG("(main) argv[0] : %s\n",argv[0]); DEBUG("(main) program_name : %s\n",program_name); newargz = XMALLOC(char *, argc+2); EOF cat >> $cwrappersource <> $cwrappersource <<"EOF" newargz[1] = find_executable(argv[0]); if (newargz[1] == NULL) lt_fatal("Couldn't find %s", argv[0]); DEBUG("(main) found exe at : %s\n",newargz[1]); /* we know the script has the same name, without the .exe */ /* so make sure newargz[1] doesn't end in .exe */ strendzap(newargz[1],".exe"); for (i = 1; i < argc; i++) newargz[i+1] = xstrdup(argv[i]); newargz[argc+1] = NULL; for (i=0; i> $cwrappersource <> $cwrappersource <> $cwrappersource <<"EOF" return 127; } void * xmalloc (size_t num) { void * p = (void *) malloc (num); if (!p) lt_fatal ("Memory exhausted"); return p; } char * xstrdup (const char *string) { return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL ; } const char * base_name (const char *name) { const char *base; #if defined (HAVE_DOS_BASED_FILE_SYSTEM) /* Skip over the disk name in MSDOS pathnames. */ if (isalpha ((unsigned char)name[0]) && name[1] == ':') name += 2; #endif for (base = name; *name; name++) if (IS_DIR_SEPARATOR (*name)) base = name + 1; return base; } int check_executable(const char * path) { struct stat st; DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!"); if ((!path) || (!*path)) return 0; if ((stat (path, &st) >= 0) && ( /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */ #if defined (S_IXOTH) ((st.st_mode & S_IXOTH) == S_IXOTH) || #endif #if defined (S_IXGRP) ((st.st_mode & S_IXGRP) == S_IXGRP) || #endif ((st.st_mode & S_IXUSR) == S_IXUSR)) ) return 1; else return 0; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise */ char * find_executable (const char* wrapper) { int has_slash = 0; const char* p; const char* p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; int tmp_len; char* concat_name; DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable(concat_name)) return concat_name; XFREE(concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable(concat_name)) return concat_name; XFREE(concat_name); } #if defined (HAVE_DOS_BASED_FILE_SYSTEM) } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char* path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char* q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR(*q)) break; p_len = q - p; p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); tmp_len = strlen(tmp); concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable(concat_name)) return concat_name; XFREE(concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); tmp_len = strlen(tmp); concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable(concat_name)) return concat_name; XFREE(concat_name); return NULL; } char * strendzap(char *str, const char *pat) { size_t len, patlen; assert(str != NULL); assert(pat != NULL); len = strlen(str); patlen = strlen(pat); if (patlen <= len) { str += len - patlen; if (strcmp(str, pat) == 0) *str = '\0'; } return str; } static void lt_error_core (int exit_status, const char * mode, const char * message, va_list ap) { fprintf (stderr, "%s: %s: ", program_name, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, "FATAL", message, ap); va_end (ap); } EOF # we should really use a build-platform specific compiler # here, but OTOH, the wrappers (shell script and this C one) # are only useful if you want to execute the "real" binary. # Since the "real" binary is built for $host, then this # wrapper might as well be built for $host, too. $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource ;; esac $rm $output trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 $echo > $output "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='${SED} -e 1s/^X//' sed_quote_subst='$sed_quote_subst' # Be Bourne compatible (taken from Autoconf:_AS_BOURNE_COMPATIBLE). if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variable: notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$echo are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then echo=\"$qecho\" file=\"\$0\" # Make sure echo works. if test \"X\$1\" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then # Yippee, \$echo works! : else # Restart under the correct shell, and then maybe \$echo will work. exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} fi fi\ " $echo >> $output "\ # Find the directory that this script lives in. thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` done # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $echo >> $output "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || \\ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $mkdir \"\$progdir\" else $rm \"\$progdir/\$file\" fi" $echo >> $output "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $echo \"\$relink_command_output\" >&2 $rm \"\$progdir/\$file\" exit $EXIT_FAILURE fi fi $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $rm \"\$progdir/\$program\"; $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } $rm \"\$progdir/\$file\" fi" else $echo >> $output "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $echo >> $output "\ if test -f \"\$progdir/\$program\"; then" # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $echo >> $output "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` export $shlibpath_var " fi # fixup the dll searchpath if we need to. if test -n "$dllsearchpath"; then $echo >> $output "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi $echo >> $output "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2*) $echo >> $output "\ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $echo >> $output "\ exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $echo >> $output "\ \$echo \"\$0: cannot exec \$program \$*\" exit $EXIT_FAILURE fi else # The program doesn't exist. \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$echo \"This script is just a wrapper for \$program.\" 1>&2 $echo \"See the $PACKAGE documentation for more information.\" 1>&2 exit $EXIT_FAILURE fi fi\ " chmod +x $output fi exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $addlibs oldobjs="$oldobjs $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do $echo "X$obj" | $Xsed -e 's%^.*/%%' done | sort | sort -uc >/dev/null 2>&1); then : else $echo "copying selected object files to avoid basename conflicts..." if test -z "$gentop"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" $show "${rm}r $gentop" $run ${rm}r "$gentop" $show "$mkdir $gentop" $run $mkdir "$gentop" exit_status=$? if test "$exit_status" -ne 0 && test ! -d "$gentop"; then exit $exit_status fi fi save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase counter=`expr $counter + 1` case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" $run ln "$obj" "$gentop/$newobj" || $run cp "$obj" "$gentop/$newobj" oldobjs="$oldobjs $gentop/$newobj" ;; *) oldobjs="$oldobjs $obj" ;; esac done fi eval cmds=\"$old_archive_cmds\" if len=`expr "X$cmds" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts $echo "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done for obj in $save_oldobjs do oldobjs="$objlist $obj" objlist="$objlist $obj" eval test_cmds=\"$old_archive_cmds\" if len=`expr "X$test_cmds" : ".*" 2>/dev/null` && test "$len" -le "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do eval cmd=\"$cmd\" IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" done if test -n "$generated"; then $show "${rm}r$generated" $run ${rm}r$generated fi # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" $show "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` relink_command="$var=\"$var_value\"; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. if test -z "$run"; then for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdependency_libs="$newdependency_libs $libdir/$name" ;; *) newdependency_libs="$newdependency_libs $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdlfiles="$newdlfiles $libdir/$name" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdlprefiles="$newdlprefiles $libdir/$name" done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlfiles="$newdlfiles $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlprefiles="$newdlprefiles $abs" done dlprefiles="$newdlprefiles" fi $rm $output # place dlname in correct position for cygwin tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; esac $echo > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $echo >> $output "\ relink_command=\"$relink_command\"" fi done fi # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? ;; esac exit $EXIT_SUCCESS ;; # libtool install mode install) modename="$modename: install" # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. $echo "X$nonopt" | grep shtool > /dev/null; then # Aesthetically quote it. arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac install_prog="$arg " arg="$1" shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac install_prog="$install_prog$arg" # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= for arg do if test -n "$dest"; then files="$files $dest" dest=$arg continue fi case $arg in -d) isdir=yes ;; -f) case " $install_prog " in *[\\\ /]cp\ *) ;; *) prev=$arg ;; esac ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac install_prog="$install_prog $arg" done if test -z "$install_prog"; then $echo "$modename: you must specify an install program" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test -n "$prev"; then $echo "$modename: the \`$prev' option requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test -z "$files"; then if test -z "$dest"; then $echo "$modename: no file or destination specified" 1>&2 else $echo "$modename: you must specify a destination" 1>&2 fi $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Strip any trailing slash from the destination. dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` test "X$destdir" = "X$dest" && destdir=. destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` # Not a directory, so check to see that there is only one file specified. set dummy $files if test "$#" -gt 2; then $echo "$modename: \`$dest' is not a directory" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. staticlibs="$staticlibs $file" ;; *.la) # Check to see that this really is a libtool archive. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi library_names= old_library= relink_command= # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) current_libdirs="$current_libdirs $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) future_libdirs="$future_libdirs $libdir" ;; esac fi dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ test "X$dir" = "X$file/" && dir= dir="$dir$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. if test "$inst_prefix_dir" = "$destdir"; then $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 exit $EXIT_FAILURE fi if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP` else relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP` fi $echo "$modename: warning: relinking \`$file'" 1>&2 $show "$relink_command" if $run eval "$relink_command"; then : else $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 exit $EXIT_FAILURE fi fi # See the names of the shared library. set dummy $library_names if test -n "$2"; then realname="$2" shift shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. $show "$install_prog $dir/$srcname $destdir/$realname" $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? if test -n "$stripme" && test -n "$striplib"; then $show "$striplib $destdir/$realname" $run eval "$striplib $destdir/$realname" || exit $? fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try `ln -sf' first, because the `ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do if test "$linkname" != "$realname"; then $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" fi done fi # Do each command in the postinstall commands. lib="$destdir/$realname" cmds=$postinstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' fi exit $lt_exit } done IFS="$save_ifs" fi # Install the pseudo-library for information purposes. name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` instname="$dir/$name"i $show "$install_prog $instname $destdir/$name" $run eval "$install_prog $instname $destdir/$name" || exit $? # Maybe install the static library, too. test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` ;; *.$objext) staticdest="$destfile" destfile= ;; *) $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac # Install the libtool object if requested. if test -n "$destfile"; then $show "$install_prog $file $destfile" $run eval "$install_prog $file $destfile" || exit $? fi # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` $show "$install_prog $staticobj $staticdest" $run eval "$install_prog \$staticobj \$staticdest" || exit $? fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then file=`$echo $file|${SED} 's,.exe$,,'` stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin*|*mingw*) wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` ;; *) wrapper=$file ;; esac if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then notinst_deplibs= relink_command= # Note that it is not necessary on cygwin/mingw to append a dot to # foo even if both foo and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. # # If there is no directory component, then add one. case $wrapper in */* | *\\*) . ${wrapper} ;; *) . ./${wrapper} ;; esac # Check the variables that should have been set. if test -z "$notinst_deplibs"; then $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 exit $EXIT_FAILURE fi finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then # If there is no directory component, then add one. case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac fi libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 finalize=no fi done relink_command= # Note that it is not necessary on cygwin/mingw to append a dot to # foo even if both foo and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. # # If there is no directory component, then add one. case $wrapper in */* | *\\*) . ${wrapper} ;; *) . ./${wrapper} ;; esac outputname= if test "$fast_install" = no && test -n "$relink_command"; then if test "$finalize" = yes && test -z "$run"; then tmpdir=`func_mktempdir` file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP` $show "$relink_command" if $run eval "$relink_command"; then : else $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 ${rm}r "$tmpdir" continue fi file="$outputname" else $echo "$modename: warning: cannot relink \`$file'" 1>&2 fi else # Install the binary that we compiled earlier. file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` ;; esac ;; esac $show "$install_prog$stripme $file $destfile" $run eval "$install_prog\$stripme \$file \$destfile" || exit $? test -n "$outputname" && ${rm}r "$tmpdir" ;; esac done for file in $staticlibs; do name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` # Set up the ranlib parameters. oldlib="$destdir/$name" $show "$install_prog $file $oldlib" $run eval "$install_prog \$file \$oldlib" || exit $? if test -n "$stripme" && test -n "$old_striplib"; then $show "$old_striplib $oldlib" $run eval "$old_striplib $oldlib" || exit $? fi # Do each command in the postinstall commands. cmds=$old_postinstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" done if test -n "$future_libdirs"; then $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 fi if test -n "$current_libdirs"; then # Maybe just do a dry run. test -n "$run" && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi ;; # libtool finish mode finish) modename="$modename: finish" libdirs="$nonopt" admincmds= if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for dir do libdirs="$libdirs $dir" done for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. cmds=$finish_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || admincmds="$admincmds $cmd" done IFS="$save_ifs" fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $run eval "$cmds" || admincmds="$admincmds $cmds" fi done fi # Exit here if they wanted silent mode. test "$show" = : && exit $EXIT_SUCCESS $echo "X----------------------------------------------------------------------" | $Xsed $echo "Libraries have been installed in:" for libdir in $libdirs; do $echo " $libdir" done $echo $echo "If you ever happen to want to link against installed libraries" $echo "in a given directory, LIBDIR, you must either use libtool, and" $echo "specify the full pathname of the library, or use the \`-LLIBDIR'" $echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then $echo " - add LIBDIR to the \`$shlibpath_var' environment variable" $echo " during execution" fi if test -n "$runpath_var"; then $echo " - add LIBDIR to the \`$runpath_var' environment variable" $echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $echo " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $echo " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi $echo $echo "See any operating system documentation about shared libraries for" $echo "more information, such as the ld(1) and ld.so(8) manual pages." $echo "X----------------------------------------------------------------------" | $Xsed exit $EXIT_SUCCESS ;; # libtool execute mode execute) modename="$modename: execute" # The first argument is the command name. cmd="$nonopt" if test -z "$cmd"; then $echo "$modename: you must specify a COMMAND" 1>&2 $echo "$help" exit $EXIT_FAILURE fi # Handle -dlopen flags immediately. for file in $execute_dlfiles; do if test ! -f "$file"; then $echo "$modename: \`$file' is not a file" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi dir= case $file in *.la) # Check to see that this really is a libtool archive. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Read the libtool library. dlname= library_names= # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" continue fi dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. if test -f "$dir/$objdir/$dlname"; then dir="$dir/$objdir" else if test ! -f "$dir/$dlname"; then $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 exit $EXIT_FAILURE fi fi ;; *.lo) # Just add the directory containing the .lo file. dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. ;; *) $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -*) ;; *) # Do a test to see if this is really a libtool program. if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` args="$args \"$file\"" done if test -z "$run"; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var fi" done # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" $echo "export $shlibpath_var" fi $echo "$cmd$args" exit $EXIT_SUCCESS fi ;; # libtool clean and uninstall mode clean | uninstall) modename="$modename: $mode" rm="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) rm="$rm $arg"; rmforce=yes ;; -*) rm="$rm $arg" ;; *) files="$files $arg" ;; esac done if test -z "$rm"; then $echo "$modename: you must specify an RM program" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi rmdirs= origobjdir="$objdir" for file in $files; do dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` if test "X$dir" = "X$file"; then dir=. objdir="$origobjdir" else objdir="$dir/$origobjdir" fi name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` test "$mode" = uninstall && objdir="$dir" # Remember objdir for removal later, being careful to avoid duplicates if test "$mode" = clean; then case " $rmdirs " in *" $objdir "*) ;; *) rmdirs="$rmdirs $objdir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if (test -L "$file") >/dev/null 2>&1 \ || (test -h "$file") >/dev/null 2>&1 \ || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then . $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do rmfiles="$rmfiles $objdir/$n" done test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" case "$mode" in clean) case " $library_names " in # " " in the beginning catches empty $dlname *" $dlname "*) ;; *) rmfiles="$rmfiles $objdir/$dlname" ;; esac test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. cmds=$postuninstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" if test "$?" -ne 0 && test "$rmforce" != yes; then exit_status=1 fi done IFS="$save_ifs" fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. cmds=$old_postuninstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" if test "$?" -ne 0 && test "$rmforce" != yes; then exit_status=1 fi done IFS="$save_ifs" fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then # Read the .lo file . $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" \ && test "$pic_object" != none; then rmfiles="$rmfiles $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" \ && test "$non_pic_object" != none; then rmfiles="$rmfiles $dir/$non_pic_object" fi fi ;; *) if test "$mode" = clean ; then noexename=$name case $file in *.exe) file=`$echo $file|${SED} 's,.exe$,,'` noexename=`$echo $name|${SED} 's,.exe$,,'` # $file with .exe has already been added to rmfiles, # add $file without .exe rmfiles="$rmfiles $file" ;; esac # Do a test to see if this is a libtool program. if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then relink_command= . $dir/$noexename # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then rmfiles="$rmfiles $objdir/lt-$name" fi if test "X$noexename" != "X$name" ; then rmfiles="$rmfiles $objdir/lt-${noexename}.c" fi fi fi ;; esac $show "$rm $rmfiles" $run $rm $rmfiles || exit_status=1 done objdir="$origobjdir" # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then $show "rmdir $dir" $run rmdir $dir >/dev/null 2>&1 fi done exit $exit_status ;; "") $echo "$modename: you must specify a MODE" 1>&2 $echo "$generic_help" 1>&2 exit $EXIT_FAILURE ;; esac if test -z "$exec_cmd"; then $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$generic_help" 1>&2 exit $EXIT_FAILURE fi fi # test -z "$show_help" if test -n "$exec_cmd"; then eval exec $exec_cmd exit $EXIT_FAILURE fi # We need to display help for each of the modes. case $mode in "") $echo \ "Usage: $modename [OPTION]... [MODE-ARG]... Provide generalized library-building support services. --config show all configuration variables --debug enable verbose shell tracing -n, --dry-run display commands without modifying any files --features display basic configuration information and exit --finish same as \`--mode=finish' --help display this help message and exit --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] --quiet same as \`--silent' --silent don't print informational messages --tag=TAG use configuration variables from tag TAG --version print version information MODE must be one of the following: clean remove files from the build directory compile compile a source file into a libtool object execute automatically set library path, then run a program finish complete the installation of libtool libraries install install libraries or executables link create a library or an executable uninstall remove libraries from an installed directory MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for a more detailed description of MODE. Report bugs to ." exit $EXIT_SUCCESS ;; clean) $echo \ "Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $echo \ "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -prefer-pic try to building PIC objects only -prefer-non-pic try to building non-PIC objects only -static always build a \`.o' file suitable for static linking COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $echo \ "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $echo \ "Usage: $modename [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $echo \ "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $echo \ "Usage: $modename [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $echo \ "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac $echo $echo "Try \`$modename --help' for more information about other modes." exit $? # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared disable_libs=shared # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static disable_libs=static # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: elektra-0.7.1/m4/0000777000076400001440000000000011365513212010472 500000000000000elektra-0.7.1/m4/extensions.m40000644000076400001440000000264711365507605013071 00000000000000# Enable extensions on systems that normally disable them. # Copyright (C) 2003, 2006 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This file is only needed in autoconf <= 2.59. Newer versions of autoconf # have a macro AC_USE_SYSTEM_EXTENSIONS with identical semantics. # gl_USE_SYSTEM_EXTENSIONS # ------------------------ # Enable extensions on systems that normally disable them, # typically due to standards-conformance issues. AC_DEFUN([gl_USE_SYSTEM_EXTENSIONS], [ AC_BEFORE([$0], [AC_COMPILE_IFELSE]) AC_BEFORE([$0], [AC_RUN_IFELSE]) dnl AC_REQUIRE([AC_GNU_SOURCE]) AC_REQUIRE([AC_AIX]) AC_REQUIRE([AC_MINIX]) AH_VERBATIM([__EXTENSIONS__], [/* Enable extensions on Solaris. */ #ifndef __EXTENSIONS__ # undef __EXTENSIONS__ #endif #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS #endif]) AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__], [ac_cv_safe_to_define___extensions__], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([ #define __EXTENSIONS__ 1 AC_INCLUDES_DEFAULT])], [ac_cv_safe_to_define___extensions__=yes], [ac_cv_safe_to_define___extensions__=no])]) test $ac_cv_safe_to_define___extensions__ = yes && AC_DEFINE([__EXTENSIONS__]) AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) ]) elektra-0.7.1/missing0000755000076400001440000002540611365511146011500 00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2005-06-08.21 # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005 # Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case "$1" in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). case "$1" in lex|yacc) # Not GNU programs, they don't have --version. ;; tar) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case "$1" in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case "$f" in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.h fi ;; esac fi if [ ! -f y.tab.h ]; then echo >y.tab.h fi if [ ! -f y.tab.c ]; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if [ ! -f lex.yy.c ]; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` fi if [ -f "$file" ]; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; tar) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case "$firstarg" in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case "$firstarg" in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-end: "$" # End: elektra-0.7.1/scripts/0000777000076400001440000000000011365513215011644 500000000000000elektra-0.7.1/scripts/Makefile.am0000644000076400001440000000056611365507605013631 00000000000000# $Id$ elektraenvdir = $(sysconfdir)/profile.d elektrainitdir = $(sysconfdir)/init.d elekscriptdir = $(docdir)/scripts dist_elektraenv_SCRIPTS = elektraenv.sh dist_elektrainit_SCRIPTS = kdbd dist_elekscript_DATA = benchmark-createtree convert-hosts convert-inittab \ convert-users convert-fstab convert-hwconfKudzu convert-network \ convert-xfree update-backend kdbd elektra-0.7.1/scripts/Makefile.in0000644000076400001440000003436711365511147013644 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ # $Id$ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = scripts DIST_COMMON = $(dist_elekscript_DATA) $(dist_elektraenv_SCRIPTS) \ $(dist_elektrainit_SCRIPTS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/extensions.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/config.h CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(elektraenvdir)" \ "$(DESTDIR)$(elektrainitdir)" "$(DESTDIR)$(elekscriptdir)" dist_elektraenvSCRIPT_INSTALL = $(INSTALL_SCRIPT) dist_elektrainitSCRIPT_INSTALL = $(INSTALL_SCRIPT) SCRIPTS = $(dist_elektraenv_SCRIPTS) $(dist_elektrainit_SCRIPTS) SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; dist_elekscriptDATA_INSTALL = $(INSTALL_DATA) DATA = $(dist_elekscript_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) INSTALL = @INSTALL@ ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BACKENDS = @BACKENDS@ BACKEND_VERSION_API = @BACKEND_VERSION_API@ BINDINGS = @BINDINGS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CDBGFLAGS = @CDBGFLAGS@ CFLAGS = @CFLAGS@ COPTFLAGS = @COPTFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSTDFLAGS = @CSTDFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDBGFLAGS = @CXXDBGFLAGS@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXOPTFLAGS = @CXXOPTFLAGS@ CXXSTDFLAGS = @CXXSTDFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_FALSE = @DEBUG_FALSE@ DEBUG_TRUE = @DEBUG_TRUE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ELEKTRATOOLS_VERSION_API = @ELEKTRATOOLS_VERSION_API@ ELEKTRA_VERSION_API = @ELEKTRA_VERSION_API@ EXEEXT = @EXEEXT@ EXPERIMENTAL_FALSE = @EXPERIMENTAL_FALSE@ EXPERIMENTAL_TRUE = @EXPERIMENTAL_TRUE@ F77 = @F77@ FFLAGS = @FFLAGS@ GENHTML = @GENHTML@ GREP = @GREP@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ HAVE_LIBLTDL_FALSE = @HAVE_LIBLTDL_FALSE@ HAVE_LIBLTDL_TRUE = @HAVE_LIBLTDL_TRUE@ HAVE_MAN2HTML_FALSE = @HAVE_MAN2HTML_FALSE@ HAVE_MAN2HTML_TRUE = @HAVE_MAN2HTML_TRUE@ HAVE_XML_FALSE = @HAVE_XML_FALSE@ HAVE_XML_TRUE = @HAVE_XML_TRUE@ HAVE_XSL_FALSE = @HAVE_XSL_FALSE@ HAVE_XSL_TRUE = @HAVE_XSL_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDB_VERSION = @KDB_VERSION@ KDB_VERSION_MAJOR = @KDB_VERSION_MAJOR@ KDB_VERSION_MAJORMINOR = @KDB_VERSION_MAJORMINOR@ KDB_VERSION_MICRO = @KDB_VERSION_MICRO@ KDB_VERSION_MINOR = @KDB_VERSION_MINOR@ LCOV = @LCOV@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VALGRIND = @VALGRIND@ VALGRINDTESTS_FALSE = @VALGRINDTESTS_FALSE@ VALGRINDTESTS_TRUE = @VALGRINDTESTS_TRUE@ VERSION = @VERSION@ XML2_CONFIG = @XML2_CONFIG@ XML_CPPFLAGS = @XML_CPPFLAGS@ XML_LIBS = @XML_LIBS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ backend_static_libs = @backend_static_libs@ backenddir = @backenddir@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ datarootdir = @datarootdir@ dbroot = @dbroot@ default_backend = @default_backend@ default_dbackend = @default_dbackend@ default_docbook = @default_docbook@ develdocdir = @develdocdir@ docdir = @docdir@ doxygen = @doxygen@ dvidir = @dvidir@ elektratools = @elektratools@ exec_prefix = @exec_prefix@ gconf_CFLAGS = @gconf_CFLAGS@ gconf_LIBS = @gconf_LIBS@ hlvlbackenddir = @hlvlbackenddir@ 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@ man2html = @man2html@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ privatelibs = @privatelibs@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ ulibdir = @ulibdir@ xsltproc = @xsltproc@ elektraenvdir = $(sysconfdir)/profile.d elektrainitdir = $(sysconfdir)/init.d elekscriptdir = $(docdir)/scripts dist_elektraenv_SCRIPTS = elektraenv.sh dist_elektrainit_SCRIPTS = kdbd dist_elekscript_DATA = benchmark-createtree convert-hosts convert-inittab \ convert-users convert-fstab convert-hwconfKudzu convert-network \ convert-xfree update-backend kdbd 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 \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu scripts/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu scripts/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-dist_elektraenvSCRIPTS: $(dist_elektraenv_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(elektraenvdir)" || $(mkdir_p) "$(DESTDIR)$(elektraenvdir)" @list='$(dist_elektraenv_SCRIPTS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f $$d$$p; then \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " $(dist_elektraenvSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(elektraenvdir)/$$f'"; \ $(dist_elektraenvSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(elektraenvdir)/$$f"; \ else :; fi; \ done uninstall-dist_elektraenvSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(dist_elektraenv_SCRIPTS)'; for p in $$list; do \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " rm -f '$(DESTDIR)$(elektraenvdir)/$$f'"; \ rm -f "$(DESTDIR)$(elektraenvdir)/$$f"; \ done install-dist_elektrainitSCRIPTS: $(dist_elektrainit_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(elektrainitdir)" || $(mkdir_p) "$(DESTDIR)$(elektrainitdir)" @list='$(dist_elektrainit_SCRIPTS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f $$d$$p; then \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " $(dist_elektrainitSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(elektrainitdir)/$$f'"; \ $(dist_elektrainitSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(elektrainitdir)/$$f"; \ else :; fi; \ done uninstall-dist_elektrainitSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(dist_elektrainit_SCRIPTS)'; for p in $$list; do \ f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ echo " rm -f '$(DESTDIR)$(elektrainitdir)/$$f'"; \ rm -f "$(DESTDIR)$(elektrainitdir)/$$f"; \ done mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: install-dist_elekscriptDATA: $(dist_elekscript_DATA) @$(NORMAL_INSTALL) test -z "$(elekscriptdir)" || $(mkdir_p) "$(DESTDIR)$(elekscriptdir)" @list='$(dist_elekscript_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(dist_elekscriptDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(elekscriptdir)/$$f'"; \ $(dist_elekscriptDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(elekscriptdir)/$$f"; \ done uninstall-dist_elekscriptDATA: @$(NORMAL_UNINSTALL) @list='$(dist_elekscript_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(elekscriptdir)/$$f'"; \ rm -f "$(DESTDIR)$(elekscriptdir)/$$f"; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(SCRIPTS) $(DATA) installdirs: for dir in "$(DESTDIR)$(elektraenvdir)" "$(DESTDIR)$(elektrainitdir)" "$(DESTDIR)$(elekscriptdir)"; 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: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_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 distclean-libtool dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-dist_elekscriptDATA \ install-dist_elektraenvSCRIPTS install-dist_elektrainitSCRIPTS install-exec-am: install-info: install-info-am install-man: 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-dist_elekscriptDATA \ uninstall-dist_elektraenvSCRIPTS \ uninstall-dist_elektrainitSCRIPTS uninstall-info-am .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dist_elekscriptDATA \ install-dist_elektraenvSCRIPTS install-dist_elektrainitSCRIPTS \ install-exec install-exec-am install-info install-info-am \ install-man install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am uninstall uninstall-am uninstall-dist_elekscriptDATA \ uninstall-dist_elektraenvSCRIPTS \ uninstall-dist_elektrainitSCRIPTS uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: elektra-0.7.1/scripts/benchmark-createtree0000755000076400001440000000232011361542116015554 00000000000000#!/bin/sh # $Id$ ROOT="user/bench" LEVELS=3 DIRS=5 KEYS=2 genLevel() { local level=$1 local myRoot=$2 local pad local counter=0 while [ $counter -lt $level ]; do pad=`echo -n " $pad"` counter=`expr $counter + 1` done # echo "Generating keys under $myRoot" >&2 # echo "$pad" # Generate local keys local k=0 while [ $k -lt $KEYS ]; do type=`expr $RANDOM$RANDOM % 255` [ $type -lt 20 ] && type=20; echo "$pad${RANDOM}${RANDOM}${RANDOM}${RANDOM}" keyCounter=`expr $keyCounter + 1` # kdb set -t $type -c "${RANDOM}${RANDOM}" \ # "$myRoot/${RANDOM}${RANDOM}" \ # "${RANDOM}${RANDOM}" k=`expr $k + 1` done if [ $level -lt $LEVELS ]; then # Generate sublevels local d=0 while [ $d -lt $DIRS ]; do echo "$pad" keyCounter=`expr $keyCounter + 1` genLevel `expr $level + 1` "${RANDOM}${RANDOM}" echo "$pad" d=`expr $d + 1` done fi } keyCounter=0 echo "" genLevel 1 ${RANDOM} echo "" echo "" elektra-0.7.1/scripts/convert-fstab0000755000076400001440000000307711361542116014270 00000000000000#!/bin/sh ######################################################################## ## ## This script will read /etc/fstab and create an ## equivalent key tree under $ROOT. ## ## The correct way to run it is: ## ## # ./convert-fstab > fstab.xml ## # kdb import fstab.xml ## ## ## To make tests you can do: ## ## $ ROOT=user/test ./convert-fstab ## ## Avi Alkalay ## April 2004 ## ## $Id$ ## ######################################################################## [ -z "$ROOT" ] && ROOT="system/filesystems" num=0 echo "" cat /etc/fstab | while read dev mpoint type options dumpfreq passno; do expr match "$dev" '#.*' > /dev/null && continue test $dev || continue case "$mpoint" in "none") num=$(( $num + 1 )) fsname="$type$num" ;; '/') fsname="roofs" ;; *) fsname=`echo $mpoint | sed -e 's^/^^g'` ;; esac echo " " echo " Device or Label" echo " Mount Point" echo " Filesystem type. See fs(5)" echo " Filesystem specific options. See mount(8)" echo " Dump frequency in days" echo " Pass number on parallel fsck" echo " " echo done echo "" elektra-0.7.1/scripts/convert-hosts0000755000076400001440000000155011361542116014323 00000000000000#!/bin/sh ######################################################################## ## ## This script will read /etc/hosts and create an ## equivalent registry tree under $ROOT. ## ## The correct way to run it is: ## ## # ./hosts-convert | sh -e ## ## ## To make tests you can do: ## ## $ ROOT=user/test ./hosts-convert | sh -e ## ## Vladimir Shabanov ## June 2004 ## ## $Id$ ## ######################################################################## [ -z "$RG" ] && RG="kdb" [ -z "$ROOT" ] && ROOT="system/network/hosts" cat /etc/hosts | sed /"#"/d | while read -a hosts; do echo $RG set -c \"Hostname\" $ROOT/${hosts[0]}/hostname \'${hosts[1]}\' total_words=`echo ${hosts[*]} | wc -w` for (( i=2; $((i < $total_words)); i++ )); do num=$((i-2)) echo $RG set -c \"Hostname alias\" $ROOT/${hosts[0]}/host_alias$num \'${hosts[$i]}\' done done elektra-0.7.1/scripts/convert-hwconfKudzu0000755000076400001440000000463011361542116015474 00000000000000#!/usr/bin/perl ######################################################################## ## ## This script will create a registry tree based on the detected HW ## located in /etc/sysconfig/hwconf. That file is parsed and ## re-generated at every boot by kudzu. ## ## This script must calculate a unique ID for each device. It can't ## be sequential because sequence may change. It can't be only the ## description of device, because you may have 2 identical devices. ## ## It will generate 2 trees for faster searches: ## system/hw/byClass and ## system/hw/byBus ## The entries in the second tree are links to the first. ## ## The correct way to run it is: ## ## bash# ./hwconfKudzu-convert | sh -e ## ## ## To make tests you can do: ## ## bash$ ROOT=user/test ./hwconfKudzu-convert | sh -e ## ## Avi Alkalay ## Apr 2004 ## ## $Id$ ## ######################################################################## $HWFILE="/etc/sysconfig/hwconf"; $ROOT="system/hw"; $RG="kdb"; sub printEntry { if (%entry) { $entry{desc}=~s/^\"(.*)\"$/$1/; # remove " $uniqDevID=$entry{desc}; $uniqDevID=~s/[\W|\s]*//g; if (defined($entry{pcifn})) { $uniqDevID.=$entry{pcifn}; } elsif (defined($entry{usbbus})) { $uniqDevID.=$entry{usbbus}; } elsif (defined($entry{device})) { $uniqDevID.=$entry{device}; } else { printf STDERR "Can't calculate unique identifier for \"$entry{desc}\"\n"; return; } # Some escaping and treatments $entry{desc}=~s/\'/\\'/g; # escape ' $entry{desc}=~s/\"/\\"/g; # escape " $entry{desc}=~s/\(/\\\(/g; # escape ( $entry{desc}=~s/\)/\\\)/g; # escape ) $entry{desc}=~s/\|/\\\|/g; # escape | $entry{desc}=~s/\#/\\\#/g; # escape # foreach $key (keys(%entry)) { print("$RG set $ROOT/byClass/$entry{class}/$uniqDevID/$key " ); print("-- $entry{$key}\n"); } # Make link for the 'byBus' tree # print("$RG set -t dir \"$ROOT/byBus/$entry{bus}\"\n"); print("$RG ln \"$ROOT/byClass/$entry{class}/$uniqDevID\" \"$ROOT/byBus/$entry{bus}/$uniqDevID\"\n\n"); } } open(HWFILE); while() { SWITCH: { if (/^-$/) { printEntry(%entry); undef(%entry); last SWITCH; } # if (/^class\:\s*(.*)/) { # $entry{class}=$1; # last SWITCH; # } # if (/^bus\:\s*(.*)/) { # $entry{bus}=$1; # last SWITCH; # } /(.*)\:\s+(.*)/; $entry{$1}=$2; } } close(HWFILE); # Handle last entry printEntry(%entry); elektra-0.7.1/scripts/convert-inittab0000755000076400001440000000232011361542116014611 00000000000000#!/bin/sh ######################################################################## ## ## This script will read the /etc/inittab and create an ## equivalent key tree under $ROOT. ## ## The correct way to use it is: ## ## $ ./inittab-convert > init.xml ## # kdb import init.xml ## ## To make tests you can do: ## ## $ ROOT=user/test ./inittab-convert > init.xml ## ## Avi Alkalay ## March 2004 ## ## $Id$ ## ######################################################################## [ -z "$RG" ] && RG="kdb" [ -z "$ROOT" ] && ROOT="system" echo "" echo cat /etc/inittab | sed -e "s/\#.*\$//g; s/\"/\'/g;" | grep -v '^$' | awk -F : '{ if (seq) seq=seq","$1; else seq=$1; printf " Active runlevels\n", $1,$2; printf " Approach\n", $1, $3; printf " Program to execute\n", $1, $4; printf "\n"; } END { printf " Sequence the entries will run\n", seq; }' echo echo "" elektra-0.7.1/scripts/convert-network0000755000076400001440000000122411361542116014652 00000000000000#!/bin/sh ######################################################################## ## ## This script will read network configurations under /etc/ and ## create an equivalent registry tree under $ROOT. ## ## The correct way to run it is: ## ## # ./net-convert | sh -e ## ## ## To make tests you can do: ## ## $ ROOT=user/test ./net-convert | sh -e ## ## Avi Alkalay ## March 2004 ## ######################################################################## [ -z "$RG" ] && RG="kdb" [ -z "$ROOT" ] && ROOT="system" PROFILES_HOME="/etc/sysconfig/networking/profiles" # Get list of profiles cd $PROFILES_HOME ls | while read profile; do done elektra-0.7.1/scripts/convert-users0000755000076400001440000000343511361542116014330 00000000000000#!/bin/sh ######################################################################## ## ## This script will read the /etc/{passwd,group,shadow} and create an ## equivalent registry tree under $ROOT. ## ## The correct way to run it is: ## ## # ./users-convert | sh -e ## ## ## To make tests you can do: ## ## $ ROOT=user/test ./users-convert | sh -e ## ## Avi Alkalay ## March 2004 ## ## $Id$ ## ######################################################################## [ -z "$RG" ] && RG="kdb" [ -z "$ROOT" ] && ROOT="system" cat /etc/passwd | awk -F : "{ print \"$RG set $ROOT/users/\" \$1 \"/uid \'\" \$3 \"\'\"; print \"$RG set $ROOT/users/\" \$1 \"/password \'\" \$2 \"\'\"; print \"$RG set $ROOT/users/\" \$1 \"/gid \'\" \$4 \"\'\"; print \"$RG set $ROOT/users/\" \$1 \"/gecos \'\" \$5 \"\'\"; print \"$RG set $ROOT/users/\" \$1 \"/home \'\" \$6 \"\'\"; print \"$RG set $ROOT/users/\" \$1 \"/shell \'\" \$7 \"\'\"; print \"\"; }" echo echo cat /etc/group | awk -F : "{ print \"$RG set $ROOT/groups/\" \$1 \"/gid \'\" \$3 \"\'\"; print \"$RG set $ROOT/groups/\" \$1 \"/members \'\" \$4 \"\'\"; print \"\"; }" echo echo if [ -r /etc/shadow ]; then cat /etc/shadow | awk -F : "{ print \"$RG set -m 0600 $ROOT/users/\" \$1 \"/shadowPassword \'\" \$2 \"\'\"; print \"$RG set -m 0600 $ROOT/users/\" \$1 \"/passwdChangeBefore \'\" \$4 \"\'\"; print \"$RG set -m 0600 $ROOT/users/\" \$1 \"/passwdChangeAfter \'\" \$5 \"\'\"; print \"$RG set -m 0600 $ROOT/users/\" \$1 \"/passwdWarnBefore \'\" \$6 \"\'\"; print \"$RG set -m 0600 $ROOT/users/\" \$1 \"/passwdDisableAfter \'\" \$7 \"\'\"; print \"$RG set -m 0600 $ROOT/users/\" \$1 \"/passwdDisabledSince \'\" \$8 \"\'\"; print \"$RG set -m 0600 $ROOT/users/\" \$1 \"/passwdReserved \'\" \$9 \"\'\"; print \"\"; }" fi elektra-0.7.1/scripts/convert-xfree0000755000076400001440000000670611361542116014304 00000000000000#!/bin/sh ######################################################################## ## ## This script will create a registry tree based on ## my /etc/X11/XF85Config. It doesn't parse anything, since this ## is pretty dificult to do. ## ## The correct way to run it is: ## ## # ./xfree86-convert | sh -e ## ## ## To make tests you can do: ## ## $ ROOT=user/test ./xfree-convert | sh -e ## ## Avi Alkalay ## Apr 2004 ## ######################################################################## [ -z "$RG" ] && RG="kdb" [ -z "$ROOT" ] && ROOT="system/sw/xorg" echo "$RG set $ROOT" echo "$RG set $ROOT/Device" echo "$RG set $ROOT/Device/Videocard0" echo "$RG set $ROOT/Device/Videocard0/BoardName 'ATI Radeon Mobility 7500'" echo "$RG set $ROOT/Device/Videocard0/Driver 'radeon'" echo "$RG set $ROOT/Device/Videocard0/VendorName 'ATI/IBM'" echo echo "$RG set $ROOT/DRI/Group '0'" echo "$RG set $ROOT/DRI/Mode '0666'" echo echo "$RG set $ROOT/Files/FontPath 'unix/:7100'" echo "$RG set $ROOT/Files/RgbPath '/usr/X11R6/lib/X11/rgb'" echo echo "$RG set $ROOT/InputDevice/DevInputMice/Driver 'mouse'" echo "$RG set $ROOT/InputDevice/DevInputMice/Option/Device '/dev/psaux'" echo "$RG set $ROOT/InputDevice/DevInputMice/Option/Emulate3Buttons 'no'" echo "$RG set $ROOT/InputDevice/DevInputMice/Option/Protocol 'PS/2'" echo "$RG set $ROOT/InputDevice/DevInputMice/Option/ZAxisMapping '4 5'" echo echo "$RG set $ROOT/InputDevice/Keyboard0/Driver 'keyboard'" echo "$RG set $ROOT/InputDevice/Keyboard0/Option/XkbLayout 'us_intl'" echo "$RG set $ROOT/InputDevice/Keyboard0/Option/XkbModel 'pc105'" echo "$RG set $ROOT/InputDevice/Keyboard0/Option/XkbRules 'xfree86'" echo echo "$RG set $ROOT/InputDevice/Mouse0/Driver 'mouse'" echo "$RG set $ROOT/InputDevice/Mouse0/Option/Device '/dev/input/mice'" echo "$RG set $ROOT/InputDevice/Mouse0/Option/Emulate3Buttons 'no'" echo "$RG set $ROOT/InputDevice/Mouse0/Option/Protocol 'IMPS/2'" echo "$RG set $ROOT/InputDevice/Mouse0/Option/ZAxisMapping '4 5'" echo echo "$RG set $ROOT/Module/Load 'dbe,extmod,fbdevhw,glx,record,freetype,type1,dri'" echo echo "$RG set $ROOT/Monitor/Monitor0/ModelName 'LCD Panel 1024x768'" echo "$RG set $ROOT/Monitor/Monitor0/VendorName 'IBM T40 monitor'" echo "$RG set $ROOT/Monitor/Monitor0/Option/dpms '1'" echo "$RG set $ROOT/Monitor/Monitor0/HorizSync/max '48.5'" echo "$RG set $ROOT/Monitor/Monitor0/HorizSync/min '31.5'" echo "$RG set $ROOT/Monitor/Monitor0/VertRefresh/max '70'" echo "$RG set $ROOT/Monitor/Monitor0/VertRefresh/min '40'" echo echo "$RG set $ROOT/Screen/Screen0/Monitor 'Monitor0'" echo "$RG set $ROOT/Screen/Screen0/Device 'Videocard0'" echo "$RG set $ROOT/Screen/Screen0/DefaultDepth '16'" echo "$RG set $ROOT/Screen/Screen0/Display/Depth '16'" echo "$RG set $ROOT/Screen/Screen0/Display/Modes '1024x768,800x600,640x480'" echo echo "$RG set $ROOT/ServerLayout/Default/Screen 'Screen0'" echo "$RG set $ROOT/ServerLayout/Default/InputDevice/CoreKeyboard 'Keyboard0'" echo "$RG set $ROOT/ServerLayout/Default/InputDevice/AlwaysCore 'DevInputMice'" echo "$RG set $ROOT/ServerLayout/Default/InputDevice/CorePointer 'Mouse0'" echo echo "$RG ln `basename $ROOT` system/sw/XFree/current" echo echo elektra-0.7.1/scripts/elektraenv.sh0000755000076400001440000000402011361542116014251 00000000000000#!/bin/sh ########################################################################### ## ## This is a /etc/profile.d script to set user environment and aliases ## based on Elektra keys under 'user/env'. ## ## Bellow user/env there must be three priorities for environment ## variables: ## ## user/env/env1 ## user/env/env2 ## user/env/env3 ## ## You should distribute your environment variables according to their ## dependencies. For example, if we want to ## set PATH as $JAVA_HOME/bin:$PATH, we'll have to set ## ## user/env/env1/JAVA_HOME ## user/env/env2/PATH ## ## This way it is guaranteed that the variables under user/env/env1 are ## set before those under user/env/env2, and before those under ## user/env/env3 ## ## The folder user/env/alias contains keys to define shell aliases. ## For instance user/env/alias/ls may contain 'ls -Fh', to set an alias ## to the 'ls' command. ## ## Avi Alkalay ## April 2004 ## ## $Id$ ## ########################################################################### if [ -z "$KDB" ]; then KDB=kdb fi FILE="`mktemp -t elektraenv.XXXXXXXXX`" readEnvTree() { local keysAvailable=0 local stage=0 local key for stage in 1 2 3; do echo "# Stage $stage" $KDB ls $1/env$stage 2>/dev/null | while read key; do if [ -z $keysAvailable ]; then keysAvailable=1 echo "echo Setting environment from the Elektra key database under '$1'" fi # This stuff is so complicated, with sed etc, because # we need to superescape a '\$' for envs like PS1 echo -n "export " $KDB get -s $key | sed -e 's/\([^\\]\)\\\$/\1\\\\\$/g;' done done echo echo "# Aliases" $KDB ls $1/alias 2>/dev/null | while read key; do echo alias `$KDB get -s $key` done } ######################## ## ## Main block ## # set -vx readEnvTree system/env > $FILE (echo; echo; echo) >> $FILE readEnvTree user:$USER/env >> $FILE # Execute it [ -f $FILE ] && . $FILE # Remove it [ -f $FILE ] && rm -f $FILE # Clean temporary environment unset readEnvTree unset FILE unset KDB elektra-0.7.1/scripts/kdbd0000755000076400001440000000472511361542116012420 00000000000000#!/bin/bash # # kdbd: Starts the Elektra Key Database Daemon # # chkconfig: 12345 00 99 # description: This is the overall daemon needed to correctly access Elektra # key databases on backends like BerkeleyDB. # The daemon will use the backend pointed # by /lib/elektra/libelektra-ddefault.so. # Though not recomended, an elektrified program can access a # key database without this daemon. But different permissions # calculations will be performed. # processname: /sbin/kdbd # config: # config: # ### BEGIN INIT INFO # Provides: kdbd # Required-Start: # Default-Stop: 0 6 # Short-Description: Starts the Elektra Key Database access daemon # Description: This is the overall daemon needed to correctly access Elektra # key databases on backends like BerkeleyDB. # The daemon will use the backend pointed # by /lib/elektra/libelektra-ddefault.so. # Though not recomended, an elektrified program can access a # key database without this daemon. But different permissions # calculations will be performed. ### END INIT INFO # # $Id$ # # KDBD_PATH=/sbin RETVAL=0 prog=kdbd pidfile=/var/run/kdbd/$prog.pid # Sanity checks. #[ -f /etc/nscd.conf ] || exit 0 [ -x $KDBD_PATH/kdbd ] || exit 0 # Source function library. . /etc/init.d/functions # Source an auxiliary options file if we have one, and pick up NSCD_OPTIONS. #[ -r /etc/sysconfig/nscd ] && . /etc/sysconfig/nscd start () { [ -d /var/run/$prog ] || mkdir /var/run/$prog # [ -d /var/db/nscd ] || mkdir /var/db/nscd # secure="" echo -n $"Starting $prog: " daemon $KDBD_PATH/$prog # $secure $KDBD_OPTIONS # daemon --check $prog $prog --pidfile=$pidfile RETVAL=$? echo [ $RETVAL -eq 0 ] && touch /var/lock/subsys/kdbd return $RETVAL } stop () { echo -n $"Stopping $prog: " killproc $prog echo RETVAL=$? [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog return $RETVAL } restart() { stop start } # See how we were called. case "$1" in start) start RETVAL=$? ;; stop) stop RETVAL=$? ;; status) status kdbd RETVAL=$? ;; restart) restart RETVAL=$? ;; try-restart | condrestart) [ -e /var/lock/subsys/$prog ] && restart RETVAL=$? ;; force-reload | reload) echo -n $"Reloading $prog: " killproc /usr/sbin/$prog -HUP RETVAL=$? echo ;; *) echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}" RETVAL=1 ;; esac exit $RETVAL elektra-0.7.1/scripts/update-backend0000755000076400001440000000154311361542116014356 00000000000000#!/bin/sh # update-backend # This Tool helps you to select another # backend. Its in a very pre-alpha state, # dont use it. # Author: Markus Raab # Licence: BSD PATH="/bin" DEBUG=echo TMPFILE="/tmp/$$.kdb.xml" if [ ! "$1" ] then echo "Usage: $0 backend" exit 1 fi if [ "$UID" != 0 ] then echo "Only root can run this script" exit 2 fi if [ ! -f "/lib/libelektra-$1.so" ] then echo "Choosen backend not available" exit 3 fi kdb export > "$TMPFILE" if [ "$?" != 0 ] then echo "Exporting was not possible" exit 4 fi $DEBUG rm -f "/lib/libelektra-default.so" $DEBUG ln -s "/lib/libelektra-$1.so" "/lib/libelektra-default.so" kdb import < "$TMPFILE" if [ "$?" != 0 ] then echo "Warning: Import Configuration was not possible!" echo "Check $TMPFILE to fix the problem." exit 5 fi $DEBUG rm "$TMPFILE" echo "Installed new backend $1 successfully!" elektra-0.7.1/src/0000777000076400001440000000000011365513214010743 500000000000000elektra-0.7.1/src/Doxyfile0000644000076400001440000016770211365506635012413 00000000000000# Doxyfile 1.5.6 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project # # All text after a hash (#) is considered a comment and will be ignored # The format is: # TAG = value [value, ...] # For lists items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (" ") #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- # This tag specifies the encoding used for all characters in the config file # that follow. The default is UTF-8 which is also the encoding used for all # text before the first occurrence of this tag. Doxygen uses libiconv (or the # iconv built into libc) for the transcoding. See # http://www.gnu.org/software/libiconv for the list of possible encodings. DOXYFILE_ENCODING = UTF-8 # The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. PROJECT_NAME = "Elektra Projekt" # The PROJECT_NUMBER tag can be used to enter a project or revision number. # This could be handy for archiving the generated documentation or # if some version control system is used. PROJECT_NUMBER = # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. OUTPUT_DIRECTORY = ../doc/elektra-api # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create # 4096 sub-directories (in 2 levels) under the output directory of each output # format and will distribute the generated files over these directories. # Enabling this option can be useful when feeding doxygen a huge amount of # source files, where putting all generated files in the same directory would # otherwise cause performance problems for the file system. CREATE_SUBDIRS = NO # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. # The default language is English, other supported languages are: # Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, # Croatian, Czech, Danish, Dutch, Farsi, Finnish, French, German, Greek, # Hungarian, Italian, Japanese, Japanese-en (Japanese with English messages), # Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, Polish, # Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish, # and Ukrainian. OUTPUT_LANGUAGE = English # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will # include brief member descriptions after the members that are listed in # the file and class documentation (similar to JavaDoc). # Set to NO to disable this. BRIEF_MEMBER_DESC = YES # If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend # the brief description of a member or function before the detailed description. # Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. REPEAT_BRIEF = YES # This tag implements a quasi-intelligent brief description abbreviator # that is used to form the text in various listings. Each string # in this list, if found as the leading text of the brief description, will be # stripped from the text and the result after processing the whole list, is # used as the annotated text. Otherwise, the brief description is used as-is. # If left blank, the following values are used ("$name" is automatically # replaced with the name of the entity): "The $name class" "The $name widget" # "The $name file" "is" "provides" "specifies" "contains" # "represents" "a" "an" "the" ABBREVIATE_BRIEF = "The $name class" \ "The $name widget" \ "The $name file" \ is \ provides \ specifies \ contains \ represents \ a \ an \ the # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # Doxygen will generate a detailed section even if there is only a brief # description. ALWAYS_DETAILED_SEC = NO # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all # inherited members of a class in the documentation of that class as if those # members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. INLINE_INHERITED_MEMB = NO # If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full # path before files name in the file list and in the header files. If set # to NO the shortest path that makes the file name unique will be used. FULL_PATH_NAMES = NO # If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag # can be used to strip a user-defined part of the path. Stripping is # only done if one of the specified strings matches the left-hand part of # the path. The tag can be used to show relative paths in the file list. # If left blank the directory from which doxygen is run is used as the # path to strip. STRIP_FROM_PATH = # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of # the path mentioned in the documentation of a class, which tells # the reader which header file to include in order to use a class. # If left blank only the name of the header file containing the class # definition is used. Otherwise one should specify the include paths that # are normally passed to the compiler using the -I flag. STRIP_FROM_INC_PATH = # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter # (but less readable) file names. This can be useful is your file systems # doesn't support long names like on DOS, Mac, or CD-ROM. SHORT_NAMES = NO # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen # will interpret the first line (until the first dot) of a JavaDoc-style # comment as the brief description. If set to NO, the JavaDoc # comments will behave just like regular Qt-style comments # (thus requiring an explicit @brief command for a brief description.) JAVADOC_AUTOBRIEF = NO # If the QT_AUTOBRIEF tag is set to YES then Doxygen will # interpret the first line (until the first dot) of a Qt-style # comment as the brief description. If set to NO, the comments # will behave just like regular Qt-style comments (thus requiring # an explicit \brief command for a brief description.) QT_AUTOBRIEF = NO # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen # treat a multi-line C++ special comment block (i.e. a block of //! or /// # comments) as a brief description. This used to be the default behaviour. # The new default is to treat a multi-line C++ comment block as a detailed # description. Set this tag to YES if you prefer the old behaviour instead. MULTILINE_CPP_IS_BRIEF = NO # If the DETAILS_AT_TOP tag is set to YES then Doxygen # will output the detailed description near the top, like JavaDoc. # If set to NO, the detailed description appears after the member # documentation. DETAILS_AT_TOP = NO # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented # member inherits the documentation from any documented member that it # re-implements. INHERIT_DOCS = YES # If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce # a new page for each member. If set to NO, the documentation of a member will # be part of the file/class/namespace that contains it. SEPARATE_MEMBER_PAGES = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. TAB_SIZE = 8 # This tag can be used to specify a number of aliases that acts # as commands in the documentation. An alias has the form "name=value". # For example adding "sideeffect=\par Side Effects:\n" will allow you to # put the command \sideeffect (or @sideeffect) in the documentation, which # will result in a user-defined paragraph with heading "Side Effects:". # You can put \n's in the value part of an alias to insert newlines. ALIASES = "err=\xrefitem err \"Error\" \"Error\"" # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C # sources only. Doxygen will then generate output that is more tailored for C. # For instance, some of the names that are used will be different. The list # of all members will be omitted, etc. OPTIMIZE_OUTPUT_FOR_C = YES # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java # sources only. Doxygen will then generate output that is more tailored for # Java. For instance, namespaces will be presented as packages, qualified # scopes will look different, etc. OPTIMIZE_OUTPUT_JAVA = NO # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran # sources only. Doxygen will then generate output that is more tailored for # Fortran. OPTIMIZE_FOR_FORTRAN = NO # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL # sources. Doxygen will then generate output that is tailored for # VHDL. OPTIMIZE_OUTPUT_VHDL = NO # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want # to include (a tag file for) the STL sources as input, then you should # set this tag to YES in order to let doxygen match functions declarations and # definitions whose arguments contain STL classes (e.g. func(std::string); v.s. # func(std::string) {}). This also make the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. BUILTIN_STL_SUPPORT = NO # If you use Microsoft's C++/CLI language, you should set this option to YES to # enable parsing support. CPP_CLI_SUPPORT = NO # Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. # Doxygen will parse them like normal C++ but will assume all classes use public # instead of private inheritance when no explicit protection keyword is present. SIP_SUPPORT = NO # For Microsoft's IDL there are propget and propput attributes to indicate getter # and setter methods for a property. Setting this option to YES (the default) # will make doxygen to replace the get and set methods by a property in the # documentation. This will only work if the methods are indeed getting or # setting a simple type. If this is not the case, or you want to show the # methods anyway, you should set this option to NO. IDL_PROPERTY_SUPPORT = NO # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC # tag is set to YES, then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. DISTRIBUTE_GROUP_DOC = NO # Set the SUBGROUPING tag to YES (the default) to allow class member groups of # the same type (for instance a group of public functions) to be put as a # subgroup of that type (e.g. under the Public Functions section). Set it to # NO to prevent subgrouping. Alternatively, this can be done per class using # the \nosubgrouping command. SUBGROUPING = YES # When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum # is documented as struct, union, or enum with the name of the typedef. So # typedef struct TypeS {} TypeT, will appear in the documentation as a struct # with name TypeT. When disabled the typedef will appear as a member of a file, # namespace, or class. And the struct will be named TypeS. This can typically # be useful for C code in case the coding convention dictates that all compound # types are typedef'ed and only the typedef is referenced, never the tag name. TYPEDEF_HIDES_STRUCT = NO #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in # documentation are documented, even if no documentation was available. # Private class members and static file members will be hidden unless # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES EXTRACT_ALL = NO # If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. EXTRACT_PRIVATE = NO # If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. EXTRACT_STATIC = NO # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) # defined locally in source files will be included in the documentation. # If set to NO only classes defined in header files are included. EXTRACT_LOCAL_CLASSES = YES # This flag is only useful for Objective-C code. When set to YES local # methods, which are defined in the implementation section but not in # the interface are included in the documentation. # If set to NO (the default) only methods in the interface are included. EXTRACT_LOCAL_METHODS = NO # If this flag is set to YES, the members of anonymous namespaces will be # extracted and appear in the documentation as a namespace called # 'anonymous_namespace{file}', where file will be replaced with the base # name of the file that contains the anonymous namespace. By default # anonymous namespace are hidden. EXTRACT_ANON_NSPACES = NO # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all # undocumented members of documented classes, files or namespaces. # If set to NO (the default) these members will be included in the # various overviews, but no documentation section is generated. # This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_MEMBERS = YES # If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. # If set to NO (the default) these classes will be included in the various # overviews. This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_CLASSES = YES # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all # friend (class|struct|union) declarations. # If set to NO (the default) these declarations will be included in the # documentation. HIDE_FRIEND_COMPOUNDS = NO # If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any # documentation blocks found inside the body of a function. # If set to NO (the default) these blocks will be appended to the # function's detailed documentation block. HIDE_IN_BODY_DOCS = NO # The INTERNAL_DOCS tag determines if documentation # that is typed after a \internal command is included. If the tag is set # to NO (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation. INTERNAL_DOCS = NO # If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate # file names in lower-case letters. If set to YES upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. CASE_SENSE_NAMES = YES # If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen # will show members with their full class and namespace scopes in the # documentation. If set to YES the scope will be hidden. HIDE_SCOPE_NAMES = NO # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen # will put a list of the files that are included by a file in the documentation # of that file. SHOW_INCLUDE_FILES = YES # If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen # will sort the (detailed) documentation of file and class members # alphabetically by member name. If set to NO the members will appear in # declaration order. SORT_MEMBER_DOCS = YES # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the # brief documentation of file, namespace and class members alphabetically # by member name. If set to NO (the default) the members will appear in # declaration order. SORT_BRIEF_DOCS = NO # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the # hierarchy of group names into alphabetical order. If set to NO (the default) # the group names will appear in their defined order. SORT_GROUP_NAMES = YES # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be # sorted by fully-qualified names, including namespaces. If set to # NO (the default), the class list will be sorted only by class name, # not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. # Note: This option applies only to the class list, not to the # alphabetical list. SORT_BY_SCOPE_NAME = NO # The GENERATE_TODOLIST tag can be used to enable (YES) or # disable (NO) the todo list. This list is created by putting \todo # commands in the documentation. GENERATE_TODOLIST = YES # The GENERATE_TESTLIST tag can be used to enable (YES) or # disable (NO) the test list. This list is created by putting \test # commands in the documentation. GENERATE_TESTLIST = YES # The GENERATE_BUGLIST tag can be used to enable (YES) or # disable (NO) the bug list. This list is created by putting \bug # commands in the documentation. GENERATE_BUGLIST = YES # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or # disable (NO) the deprecated list. This list is created by putting # \deprecated commands in the documentation. GENERATE_DEPRECATEDLIST= YES # The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. ENABLED_SECTIONS = NO # The MAX_INITIALIZER_LINES tag determines the maximum number of lines # the initial value of a variable or define consists of for it to appear in # the documentation. If the initializer consists of more lines than specified # here it will be hidden. Use a value of 0 to hide initializers completely. # The appearance of the initializer of individual variables and defines in the # documentation can be controlled using \showinitializer or \hideinitializer # command in the documentation regardless of this setting. MAX_INITIALIZER_LINES = 30 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated # at the bottom of the documentation of classes and structs. If set to YES the # list will mention the files that were used to generate the documentation. SHOW_USED_FILES = YES # If the sources in your project are distributed over multiple directories # then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy # in the documentation. The default is NO. SHOW_DIRECTORIES = NO # Set the SHOW_FILES tag to NO to disable the generation of the Files page. # This will remove the Files entry from the Quick Index and from the # Folder Tree View (if specified). The default is YES. SHOW_FILES = YES # Set the SHOW_NAMESPACES tag to NO to disable the generation of the # Namespaces page. This will remove the Namespaces entry from the Quick Index # and from the Folder Tree View (if specified). The default is YES. SHOW_NAMESPACES = YES # The FILE_VERSION_FILTER tag can be used to specify a program or script that # doxygen should invoke to get the current version for each file (typically from # the version control system). Doxygen will invoke the program by executing (via # popen()) the command , where is the value of # the FILE_VERSION_FILTER tag, and is the name of an input file # provided by doxygen. Whatever the program writes to standard output # is used as the file version. See the manual for examples. FILE_VERSION_FILTER = #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- # The QUIET tag can be used to turn on/off the messages that are generated # by doxygen. Possible values are YES and NO. If left blank NO is used. QUIET = YES # The WARNINGS tag can be used to turn on/off the warning messages that are # generated by doxygen. Possible values are YES and NO. If left blank # NO is used. WARNINGS = YES # If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings # for undocumented members. If EXTRACT_ALL is set to YES then this flag will # automatically be disabled. WARN_IF_UNDOCUMENTED = YES # If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for # potential errors in the documentation, such as not documenting some # parameters in a documented function, or documenting parameters that # don't exist or using markup commands wrongly. WARN_IF_DOC_ERROR = YES # This WARN_NO_PARAMDOC option can be abled to get warnings for # functions that are documented, but have no documentation for their parameters # or return value. If set to NO (the default) doxygen will only warn about # wrong or incomplete parameter documentation, but not about the absence of # documentation. WARN_NO_PARAMDOC = YES # The WARN_FORMAT tag determines the format of the warning messages that # doxygen can produce. The string should contain the $file, $line, and $text # tags, which will be replaced by the file and line number from which the # warning originated and the warning text. Optionally the format may contain # $version, which will be replaced by the version of the file (if it could # be obtained via FILE_VERSION_FILTER) WARN_FORMAT = "$file:$line: $text" # The WARN_LOGFILE tag can be used to specify a file to which warning # and error messages should be written. If left blank the output is written # to stderr. WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- # The INPUT tag can be used to specify the files and/or directories that contain # documented source files. You may enter file names like "myfile.cpp" or # directories like "/usr/src/myproject". Separate the files or directories # with spaces. INPUT = $(srcdir)/libelektra \ $(srcdir)/libhelper \ $(srcdir)/libelektratools \ $(srcdir)/include \ $(srcdir)/backends/doc # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is # also the default input encoding. Doxygen uses libiconv (or the iconv built # into libc) for the transcoding. See http://www.gnu.org/software/libiconv for # the list of possible encodings. INPUT_ENCODING = UTF-8 # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank the following patterns are tested: # *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx # *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 FILE_PATTERNS = *.c \ *.cc \ *.cxx \ *.cpp \ *.c++ \ *.d \ *.java \ *.ii \ *.ixx \ *.ipp \ *.i++ \ *.inl \ *.h \ *.hh \ *.hxx \ *.hpp \ *.h++ \ *.idl \ *.odl \ *.cs \ *.php \ *.php3 \ *.inc \ *.m \ *.mm \ *.dox \ *.py \ *.C \ *.CC \ *.C++ \ *.II \ *.I++ \ *.H \ *.HH \ *.H++ \ *.CS \ *.PHP \ *.PHP3 \ *.M \ *.MM \ *.PY # The RECURSIVE tag can be used to turn specify whether or not subdirectories # should be searched for input files as well. Possible values are YES and NO. # If left blank NO is used. RECURSIVE = YES # The EXCLUDE tag can be used to specify files and/or directories that should # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. EXCLUDE = # The EXCLUDE_SYMLINKS tag can be used select whether or not files or # directories that are symbolic links (a Unix filesystem feature) are excluded # from the input. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. Note that the wildcards are matched # against the file with absolute path, so to exclude all test directories # for example use the pattern */test/* EXCLUDE_PATTERNS = # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the # output. The symbol name can be a fully qualified name, a word, or if the # wildcard * is used, a substring. Examples: ANamespace, AClass, # AClass::ANamespace, ANamespace::*Test EXCLUDE_SYMBOLS = # The EXAMPLE_PATH tag can be used to specify one or more files or # directories that contain example code fragments that are included (see # the \include command). EXAMPLE_PATH = $(srcdir)/../examples # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank all files are included. EXAMPLE_PATTERNS = * # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude # commands irrespective of the value of the RECURSIVE tag. # Possible values are YES and NO. If left blank NO is used. EXAMPLE_RECURSIVE = NO # The IMAGE_PATH tag can be used to specify one or more files or # directories that contain image that are included in the documentation (see # the \image command). IMAGE_PATH = $(srcdir)/../doc/images/ # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program # by executing (via popen()) the command , where # is the value of the INPUT_FILTER tag, and is the name of an # input file. Doxygen will then use the output that the filter program writes # to standard output. If FILTER_PATTERNS is specified, this tag will be # ignored. INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern # basis. Doxygen will compare the file name with each pattern and apply the # filter if there is a match. The filters are a list of the form: # pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further # info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER # is applied to all files. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will be used to filter the input files when producing source # files to browse (i.e. when SOURCE_BROWSER is set to YES). FILTER_SOURCE_FILES = NO #--------------------------------------------------------------------------- # configuration options related to source browsing #--------------------------------------------------------------------------- # If the SOURCE_BROWSER tag is set to YES then a list of source files will # be generated. Documented entities will be cross-referenced with these sources. # Note: To get rid of all source code in the generated output, make sure also # VERBATIM_HEADERS is set to NO. SOURCE_BROWSER = NO # Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation. INLINE_SOURCES = NO # Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct # doxygen to hide any special comment blocks from generated source code # fragments. Normal C and C++ comments will always remain visible. STRIP_CODE_COMMENTS = YES # If the REFERENCED_BY_RELATION tag is set to YES # then for each documented function all documented # functions referencing it will be listed. REFERENCED_BY_RELATION = NO # If the REFERENCES_RELATION tag is set to YES # then for each documented function all documented entities # called/used by that function will be listed. REFERENCES_RELATION = NO # If the REFERENCES_LINK_SOURCE tag is set to YES (the default) # and SOURCE_BROWSER tag is set to YES, then the hyperlinks from # functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will # link to the source code. Otherwise they will link to the documentstion. REFERENCES_LINK_SOURCE = YES # If the USE_HTAGS tag is set to YES then the references to source code # will point to the HTML generated by the htags(1) tool instead of doxygen # built-in source browser. The htags tool is part of GNU's global source # tagging system (see http://www.gnu.org/software/global/global.html). You # will need version 4.8.6 or higher. USE_HTAGS = NO # If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen # will generate a verbatim copy of the header file for each class for # which an include is specified. Set to NO to disable this. VERBATIM_HEADERS = NO #--------------------------------------------------------------------------- # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index # of all compounds will be generated. Enable this if the project # contains a lot of classes, structs, unions or interfaces. ALPHABETICAL_INDEX = NO # If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # in which this list will be split (can be a number in the range [1..20]) COLS_IN_ALPHA_INDEX = 5 # In case all classes in a project start with a common prefix, all # classes will be put under the same header in the alphabetical index. # The IGNORE_PREFIX tag can be used to specify one or more prefixes that # should be ignored while generating the index headers. IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- # If the GENERATE_HTML tag is set to YES (the default) Doxygen will # generate HTML output. GENERATE_HTML = YES # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `html' will be used as the default path. HTML_OUTPUT = html # The HTML_FILE_EXTENSION tag can be used to specify the file extension for # each generated HTML page (for example: .htm,.php,.asp). If it is left blank # doxygen will generate files with .html extension. HTML_FILE_EXTENSION = .html # The HTML_HEADER tag can be used to specify a personal HTML header for # each generated HTML page. If it is left blank doxygen will generate a # standard header. HTML_HEADER = # The HTML_FOOTER tag can be used to specify a personal HTML footer for # each generated HTML page. If it is left blank doxygen will generate a # standard footer. HTML_FOOTER = # The HTML_STYLESHEET tag can be used to specify a user-defined cascading # style sheet that is used by each HTML page. It can be used to # fine-tune the look of the HTML output. If the tag is left blank doxygen # will generate a default style sheet. Note that doxygen will try to copy # the style sheet file to the HTML output directory, so don't put your own # stylesheet in the HTML output directory as well, or it will be erased! HTML_STYLESHEET = # If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, # files or namespaces will be aligned in HTML using tables. If set to # NO a bullet list will be used. HTML_ALIGN_MEMBERS = YES # If the GENERATE_HTMLHELP tag is set to YES, additional index files # will be generated that can be used as input for tools like the # Microsoft HTML help workshop to generate a compiled HTML help file (.chm) # of the generated HTML documentation. GENERATE_HTMLHELP = NO # If the GENERATE_DOCSET tag is set to YES, additional index files # will be generated that can be used as input for Apple's Xcode 3 # integrated development environment, introduced with OSX 10.5 (Leopard). # To create a documentation set, doxygen will generate a Makefile in the # HTML output directory. Running make will produce the docset in that # directory and running "make install" will install the docset in # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find # it at startup. GENERATE_DOCSET = NO # When GENERATE_DOCSET tag is set to YES, this tag determines the name of the # feed. A documentation feed provides an umbrella under which multiple # documentation sets from a single provider (such as a company or product suite) # can be grouped. DOCSET_FEEDNAME = "Doxygen generated docs" # When GENERATE_DOCSET tag is set to YES, this tag specifies a string that # should uniquely identify the documentation set bundle. This should be a # reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen # will append .docset to the name. DOCSET_BUNDLE_ID = org.doxygen.Project # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the # page has loaded. For this to work a browser that supports # JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox # Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). HTML_DYNAMIC_SECTIONS = NO # If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can # be used to specify the file name of the resulting .chm file. You # can add a path in front of the file if the result should not be # written to the html output directory. CHM_FILE = # If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can # be used to specify the location (absolute path including file name) of # the HTML help compiler (hhc.exe). If non-empty doxygen will try to run # the HTML help compiler on the generated index.hhp. HHC_LOCATION = # If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag # controls if a separate .chi index file is generated (YES) or that # it should be included in the master .chm file (NO). GENERATE_CHI = NO # If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING # is used to encode HtmlHelp index (hhk), content (hhc) and project file # content. CHM_INDEX_ENCODING = # If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag # controls whether a binary table of contents is generated (YES) or a # normal table of contents (NO) in the .chm file. BINARY_TOC = NO # The TOC_EXPAND flag can be set to YES to add extra items for group members # to the contents of the HTML help documentation and to the tree view. TOC_EXPAND = NO # The DISABLE_INDEX tag can be used to turn on/off the condensed index at # top of each HTML page. The value NO (the default) enables the index and # the value YES disables it. DISABLE_INDEX = NO # This tag can be used to set the number of enum values (range [1..20]) # that doxygen will group on one line in the generated HTML documentation. ENUM_VALUES_PER_LINE = 4 # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index # structure should be generated to display hierarchical information. # If the tag value is set to FRAME, a side panel will be generated # containing a tree-like index structure (just like the one that # is generated for HTML Help). For this to work a browser that supports # JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, # Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are # probably better off using the HTML help feature. Other possible values # for this tag are: HIERARCHIES, which will generate the Groups, Directories, # and Class Hiererachy pages using a tree view instead of an ordered list; # ALL, which combines the behavior of FRAME and HIERARCHIES; and NONE, which # disables this behavior completely. For backwards compatibility with previous # releases of Doxygen, the values YES and NO are equivalent to FRAME and NONE # respectively. GENERATE_TREEVIEW = NO # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be # used to set the initial width (in pixels) of the frame in which the tree # is shown. TREEVIEW_WIDTH = 250 # Use this tag to change the font size of Latex formulas included # as images in the HTML documentation. The default is 10. Note that # when you change the font size after a successful doxygen run you need # to manually remove any form_*.png images from the HTML output directory # to force them to be regenerated. FORMULA_FONTSIZE = 10 #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # generate Latex output. GENERATE_LATEX = YES # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `latex' will be used as the default path. LATEX_OUTPUT = latex # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be # invoked. If left blank `latex' will be used as the default command name. LATEX_CMD_NAME = latex # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to # generate index for LaTeX. If left blank `makeindex' will be used as the # default command name. MAKEINDEX_CMD_NAME = makeindex # If the COMPACT_LATEX tag is set to YES Doxygen generates more compact # LaTeX documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_LATEX = NO # The PAPER_TYPE tag can be used to set the paper type that is used # by the printer. Possible values are: a4, a4wide, letter, legal and # executive. If left blank a4wide will be used. PAPER_TYPE = a4wide # The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX # packages that should be included in the LaTeX output. EXTRA_PACKAGES = # The LATEX_HEADER tag can be used to specify a personal LaTeX header for # the generated latex document. The header should contain everything until # the first chapter. If it is left blank doxygen will generate a # standard header. Notice: only use this tag if you know what you are doing! LATEX_HEADER = # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated # is prepared for conversion to pdf (using ps2pdf). The pdf file will # contain links (just like the HTML output) instead of page references # This makes the output suitable for online browsing using a pdf viewer. PDF_HYPERLINKS = NO # If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of # plain latex in the generated Makefile. Set this option to YES to get a # higher quality PDF documentation. USE_PDFLATEX = NO # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. # command to the generated LaTeX files. This will instruct LaTeX to keep # running if errors occur, instead of asking the user for help. # This option is also used when generating formulas in HTML. LATEX_BATCHMODE = NO # If LATEX_HIDE_INDICES is set to YES then doxygen will not # include the index chapters (such as File Index, Compound Index, etc.) # in the output. LATEX_HIDE_INDICES = NO #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- # If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output # The RTF output is optimized for Word 97 and may not look very pretty with # other RTF readers or editors. GENERATE_RTF = NO # The RTF_OUTPUT tag is used to specify where the RTF docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `rtf' will be used as the default path. RTF_OUTPUT = rtf # If the COMPACT_RTF tag is set to YES Doxygen generates more compact # RTF documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_RTF = NO # If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated # will contain hyperlink fields. The RTF file will # contain links (just like the HTML output) instead of page references. # This makes the output suitable for online browsing using WORD or other # programs which support those fields. # Note: wordpad (write) and others do not support links. RTF_HYPERLINKS = NO # Load stylesheet definitions from file. Syntax is similar to doxygen's # config file, i.e. a series of assignments. You only have to provide # replacements, missing definitions are set to their default value. RTF_STYLESHEET_FILE = # Set optional variables used in the generation of an rtf document. # Syntax is similar to doxygen's config file. RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- # If the GENERATE_MAN tag is set to YES (the default) Doxygen will # generate man pages GENERATE_MAN = YES # The MAN_OUTPUT tag is used to specify where the man pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `man' will be used as the default path. MAN_OUTPUT = man # The MAN_EXTENSION tag determines the extension that is added to # the generated man pages (default is the subroutine's section .3) MAN_EXTENSION = .3 # If the MAN_LINKS tag is set to YES and Doxygen generates man output, # then it will generate one additional man file for each entity # documented in the real man page(s). These additional files # only source the real man page, but without them the man command # would be unable to find the correct page. The default is NO. MAN_LINKS = NO #--------------------------------------------------------------------------- # configuration options related to the XML output #--------------------------------------------------------------------------- # If the GENERATE_XML tag is set to YES Doxygen will # generate an XML file that captures the structure of # the code including all documentation. GENERATE_XML = NO # The XML_OUTPUT tag is used to specify where the XML pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `xml' will be used as the default path. XML_OUTPUT = xml # The XML_SCHEMA tag can be used to specify an XML schema, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_SCHEMA = # The XML_DTD tag can be used to specify an XML DTD, # which can be used by a validating XML parser to check the # syntax of the XML files. XML_DTD = # If the XML_PROGRAMLISTING tag is set to YES Doxygen will # dump the program listings (including syntax highlighting # and cross-referencing information) to the XML output. Note that # enabling this will significantly increase the size of the XML output. XML_PROGRAMLISTING = YES #--------------------------------------------------------------------------- # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- # If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will # generate an AutoGen Definitions (see autogen.sf.net) file # that captures the structure of the code including all # documentation. Note that this feature is still experimental # and incomplete at the moment. GENERATE_AUTOGEN_DEF = NO #--------------------------------------------------------------------------- # configuration options related to the Perl module output #--------------------------------------------------------------------------- # If the GENERATE_PERLMOD tag is set to YES Doxygen will # generate a Perl module file that captures the structure of # the code including all documentation. Note that this # feature is still experimental and incomplete at the # moment. GENERATE_PERLMOD = NO # If the PERLMOD_LATEX tag is set to YES Doxygen will generate # the necessary Makefile rules, Perl scripts and LaTeX code to be able # to generate PDF and DVI output from the Perl module output. PERLMOD_LATEX = NO # If the PERLMOD_PRETTY tag is set to YES the Perl module output will be # nicely formatted so it can be parsed by a human reader. This is useful # if you want to understand what is going on. On the other hand, if this # tag is set to NO the size of the Perl module output will be much smaller # and Perl will parse it just the same. PERLMOD_PRETTY = YES # The names of the make variables in the generated doxyrules.make file # are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. # This is useful so different doxyrules.make files included by the same # Makefile don't overwrite each other's variables. PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the preprocessor #--------------------------------------------------------------------------- # If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will # evaluate all C-preprocessor directives found in the sources and include # files. ENABLE_PREPROCESSING = YES # If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro # names in the source code. If set to NO (the default) only conditional # compilation will be performed. Macro expansion can be done in a controlled # way by setting EXPAND_ONLY_PREDEF to YES. MACRO_EXPANSION = NO # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES # then the macro expansion is limited to the macros specified with the # PREDEFINED and EXPAND_AS_DEFINED tags. EXPAND_ONLY_PREDEF = NO # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # in the INCLUDE_PATH (see below) will be search if a #include is found. SEARCH_INCLUDES = YES # The INCLUDE_PATH tag can be used to specify one or more directories that # contain include files that are not input files but should be processed by # the preprocessor. INCLUDE_PATH = # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard # patterns (like *.h and *.hpp) to filter out the header-files in the # directories. If left blank, the patterns specified with FILE_PATTERNS will # be used. INCLUDE_FILE_PATTERNS = # The PREDEFINED tag can be used to specify one or more macro names that # are defined before the preprocessor is started (similar to the -D option of # gcc). The argument of the tag is a list of macros of the form: name # or name=definition (no spaces). If the definition and the = are # omitted =1 is assumed. To prevent a macro definition from being # undefined via #undef or recursively expanded use the := operator # instead of the = operator. PREDEFINED = # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then # this tag can be used to specify a list of macro names that should be expanded. # The macro definition that is found in the sources will be used. # Use the PREDEFINED tag if you want to use a different macro definition. EXPAND_AS_DEFINED = # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then # doxygen's preprocessor will remove all function-like macros that are alone # on a line, have an all uppercase name, and do not end with a semicolon. Such # function macros are typically used for boiler-plate code, and will confuse # the parser if not removed. SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- # Configuration::additions related to external references #--------------------------------------------------------------------------- # The TAGFILES option can be used to specify one or more tagfiles. # Optionally an initial location of the external documentation # can be added for each tagfile. The format of a tag file without # this location is as follows: # TAGFILES = file1 file2 ... # Adding location for the tag files is done as follows: # TAGFILES = file1=loc1 "file2 = loc2" ... # where "loc1" and "loc2" can be relative or absolute paths or # URLs. If a location is present for each tag, the installdox tool # does not have to be run to correct the links. # Note that each tag file must have a unique name # (where the name does NOT include the path) # If a tag file is not located in the directory in which doxygen # is run, you must also specify the path to the tagfile here. TAGFILES = # When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. GENERATE_TAGFILE = # If the ALLEXTERNALS tag is set to YES all external classes will be listed # in the class index. If set to NO only the inherited external classes # will be listed. ALLEXTERNALS = NO # If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed # in the modules index. If set to NO, only the current project's groups will # be listed. EXTERNAL_GROUPS = YES # The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will # generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base # or super classes. Setting the tag to NO turns the diagrams off. Note that # this option is superseded by the HAVE_DOT option below. This is only a # fallback. It is recommended to install and use dot, since it yields more # powerful graphs. CLASS_DIAGRAMS = NO # You can define message sequence charts within doxygen comments using the \msc # command. Doxygen will then run the mscgen tool (see # http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the # documentation. The MSCGEN_PATH tag allows you to specify the directory where # the mscgen tool resides. If left empty the tool is assumed to be found in the # default search path. MSCGEN_PATH = # If set to YES, the inheritance and collaboration graphs will hide # inheritance and usage relations if the target is undocumented # or is not a class. HIDE_UNDOC_RELATIONS = YES # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is # available from the path. This tool is part of Graphviz, a graph visualization # toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) HAVE_DOT = YES # By default doxygen will write a font called FreeSans.ttf to the output # directory and reference it in all dot files that doxygen generates. This # font does not include all possible unicode characters however, so when you need # these (or just want a differently looking font) you can specify the font name # using DOT_FONTNAME. You need need to make sure dot is able to find the font, # which can be done by putting it in a standard location or by setting the # DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory # containing the font. DOT_FONTNAME = FreeSans # By default doxygen will tell dot to use the output directory to look for the # FreeSans.ttf font (which doxygen will put there itself). If you specify a # different font using DOT_FONTNAME you can set the path where dot # can find it using this tag. DOT_FONTPATH = # If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect inheritance relations. Setting this tag to YES will force the # the CLASS_DIAGRAMS tag to NO. CLASS_GRAPH = YES # If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect implementation dependencies (inheritance, containment, and # class references variables) of the class with other documented classes. COLLABORATION_GRAPH = YES # If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen # will generate a graph for groups, showing the direct groups dependencies GROUP_GRAPHS = YES # If the UML_LOOK tag is set to YES doxygen will generate inheritance and # collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. UML_LOOK = NO # If set to YES, the inheritance and collaboration graphs will show the # relations between templates and their instances. TEMPLATE_RELATIONS = NO # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT # tags are set to YES then doxygen will generate a graph for each documented # file showing the direct and indirect include dependencies of the file with # other documented files. INCLUDE_GRAPH = YES # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and # HAVE_DOT tags are set to YES then doxygen will generate a graph for each # documented header file showing the documented files that directly or # indirectly include this file. INCLUDED_BY_GRAPH = YES # If the CALL_GRAPH and HAVE_DOT options are set to YES then # doxygen will generate a call dependency graph for every global function # or class method. Note that enabling this option will significantly increase # the time of a run. So in most cases it will be better to enable call graphs # for selected functions only using the \callgraph command. CALL_GRAPH = NO # If the CALLER_GRAPH and HAVE_DOT tags are set to YES then # doxygen will generate a caller dependency graph for every global function # or class method. Note that enabling this option will significantly increase # the time of a run. So in most cases it will be better to enable caller # graphs for selected functions only using the \callergraph command. CALLER_GRAPH = NO # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will graphical hierarchy of all classes instead of a textual one. GRAPHICAL_HIERARCHY = YES # If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES # then doxygen will show the dependencies a directory has on other directories # in a graphical way. The dependency relations are determined by the #include # relations between the files in the directories. DIRECTORY_GRAPH = YES # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. Possible values are png, jpg, or gif # If left blank png will be used. DOT_IMAGE_FORMAT = png # The tag DOT_PATH can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found in the path. DOT_PATH = # The DOTFILE_DIRS tag can be used to specify one or more directories that # contain dot files that are included in the documentation (see the # \dotfile command). DOTFILE_DIRS = # The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of # nodes that will be shown in the graph. If the number of nodes in a graph # becomes larger than this value, doxygen will truncate the graph, which is # visualized by representing a node as a red box. Note that doxygen if the # number of direct children of the root node in a graph is already larger than # DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note # that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. DOT_GRAPH_MAX_NODES = 50 # The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the # graphs generated by dot. A depth value of 3 means that only nodes reachable # from the root by following a path via at most 3 edges will be shown. Nodes # that lay further from the root node will be omitted. Note that setting this # option to 1 or 2 may greatly reduce the computation time needed for large # code bases. Also note that the size of a graph can be further restricted by # DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. MAX_DOT_GRAPH_DEPTH = 1000 # Set the DOT_TRANSPARENT tag to YES to generate images with a transparent # background. This is enabled by default, which results in a transparent # background. Warning: Depending on the platform used, enabling this option # may lead to badly anti-aliased labels on the edges of a graph (i.e. they # become hard to read). DOT_TRANSPARENT = NO # Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output # files in one run (i.e. multiple -o and -T options on the command line). This # makes dot run faster, but since only newer versions of dot (>1.8.10) # support this, this feature is disabled by default. DOT_MULTI_TARGETS = NO # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will # generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES # If the DOT_CLEANUP tag is set to YES (the default) Doxygen will # remove the intermediate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES #--------------------------------------------------------------------------- # Configuration::additions related to the search engine #--------------------------------------------------------------------------- # The SEARCHENGINE tag specifies whether or not a search engine should be # used. If set to NO the values of all tags below this one will be ignored. SEARCHENGINE = NO elektra-0.7.1/src/Makefile.am0000644000076400001440000000030211365507605012715 00000000000000std_subdirs = include libloader libhelper libelektra backends kdb bindings preload DIST_SUBDIRS = $(std_subdirs) libelektratools SUBDIRS = $(std_subdirs) $(elektratools) EXTRA_DIST = Doxyfile elektra-0.7.1/src/Makefile.in0000644000076400001440000003751711365511147012744 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = src DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/extensions.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) INSTALL = @INSTALL@ ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BACKENDS = @BACKENDS@ BACKEND_VERSION_API = @BACKEND_VERSION_API@ BINDINGS = @BINDINGS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CDBGFLAGS = @CDBGFLAGS@ CFLAGS = @CFLAGS@ COPTFLAGS = @COPTFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSTDFLAGS = @CSTDFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDBGFLAGS = @CXXDBGFLAGS@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXOPTFLAGS = @CXXOPTFLAGS@ CXXSTDFLAGS = @CXXSTDFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_FALSE = @DEBUG_FALSE@ DEBUG_TRUE = @DEBUG_TRUE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ELEKTRATOOLS_VERSION_API = @ELEKTRATOOLS_VERSION_API@ ELEKTRA_VERSION_API = @ELEKTRA_VERSION_API@ EXEEXT = @EXEEXT@ EXPERIMENTAL_FALSE = @EXPERIMENTAL_FALSE@ EXPERIMENTAL_TRUE = @EXPERIMENTAL_TRUE@ F77 = @F77@ FFLAGS = @FFLAGS@ GENHTML = @GENHTML@ GREP = @GREP@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ HAVE_LIBLTDL_FALSE = @HAVE_LIBLTDL_FALSE@ HAVE_LIBLTDL_TRUE = @HAVE_LIBLTDL_TRUE@ HAVE_MAN2HTML_FALSE = @HAVE_MAN2HTML_FALSE@ HAVE_MAN2HTML_TRUE = @HAVE_MAN2HTML_TRUE@ HAVE_XML_FALSE = @HAVE_XML_FALSE@ HAVE_XML_TRUE = @HAVE_XML_TRUE@ HAVE_XSL_FALSE = @HAVE_XSL_FALSE@ HAVE_XSL_TRUE = @HAVE_XSL_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDB_VERSION = @KDB_VERSION@ KDB_VERSION_MAJOR = @KDB_VERSION_MAJOR@ KDB_VERSION_MAJORMINOR = @KDB_VERSION_MAJORMINOR@ KDB_VERSION_MICRO = @KDB_VERSION_MICRO@ KDB_VERSION_MINOR = @KDB_VERSION_MINOR@ LCOV = @LCOV@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VALGRIND = @VALGRIND@ VALGRINDTESTS_FALSE = @VALGRINDTESTS_FALSE@ VALGRINDTESTS_TRUE = @VALGRINDTESTS_TRUE@ VERSION = @VERSION@ XML2_CONFIG = @XML2_CONFIG@ XML_CPPFLAGS = @XML_CPPFLAGS@ XML_LIBS = @XML_LIBS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ backend_static_libs = @backend_static_libs@ backenddir = @backenddir@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ datarootdir = @datarootdir@ dbroot = @dbroot@ default_backend = @default_backend@ default_dbackend = @default_dbackend@ default_docbook = @default_docbook@ develdocdir = @develdocdir@ docdir = @docdir@ doxygen = @doxygen@ dvidir = @dvidir@ elektratools = @elektratools@ exec_prefix = @exec_prefix@ gconf_CFLAGS = @gconf_CFLAGS@ gconf_LIBS = @gconf_LIBS@ hlvlbackenddir = @hlvlbackenddir@ 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@ man2html = @man2html@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ privatelibs = @privatelibs@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ ulibdir = @ulibdir@ xsltproc = @xsltproc@ std_subdirs = include libloader libhelper libelektra backends kdb bindings preload DIST_SUBDIRS = $(std_subdirs) libelektratools SUBDIRS = $(std_subdirs) $(elektratools) EXTRA_DIST = Doxyfile 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 \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; 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; \ (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" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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 || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(mkdir_p) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ 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: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_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-libtool \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-exec-am: install-info: install-info-recursive install-man: 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: uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ clean clean-generic clean-libtool clean-recursive ctags \ ctags-recursive distclean distclean-generic distclean-libtool \ distclean-recursive distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic maintainer-clean-recursive \ mostlyclean mostlyclean-generic mostlyclean-libtool \ mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: elektra-0.7.1/src/backends/0000777000076400001440000000000011365513213012514 500000000000000elektra-0.7.1/src/backends/Makefile.am0000644000076400001440000000107411365507605014476 00000000000000DIST_SUBDIRS = filesys berkeleydb daemon fstab passwd hosts gconf ini template SUBDIRS = @BACKENDS@ EXTRA_DIST = winregistry doc/backend.c install-exec-hook: cd $(DESTDIR)$(backenddir) && \ test -L libelektra-default.so || \ $(LN_S) libelektra-@default_backend@.so libelektra-default.so cd $(DESTDIR)$(backenddir) && \ test -L libelektra-ddefault.so || \ $(LN_S) libelektra-@default_dbackend@.so libelektra-ddefault.so uninstall-hook: -cd $(DESTDIR)$(backenddir) && \ rm -f libelektra-default.so -cd $(DESTDIR)$(backenddir) && \ rm -f libelektra-ddefault.so elektra-0.7.1/src/backends/Makefile.in0000644000076400001440000004064111365511147014506 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = src/backends DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/extensions.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) INSTALL = @INSTALL@ ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BACKENDS = @BACKENDS@ BACKEND_VERSION_API = @BACKEND_VERSION_API@ BINDINGS = @BINDINGS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CDBGFLAGS = @CDBGFLAGS@ CFLAGS = @CFLAGS@ COPTFLAGS = @COPTFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSTDFLAGS = @CSTDFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDBGFLAGS = @CXXDBGFLAGS@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXOPTFLAGS = @CXXOPTFLAGS@ CXXSTDFLAGS = @CXXSTDFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_FALSE = @DEBUG_FALSE@ DEBUG_TRUE = @DEBUG_TRUE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ELEKTRATOOLS_VERSION_API = @ELEKTRATOOLS_VERSION_API@ ELEKTRA_VERSION_API = @ELEKTRA_VERSION_API@ EXEEXT = @EXEEXT@ EXPERIMENTAL_FALSE = @EXPERIMENTAL_FALSE@ EXPERIMENTAL_TRUE = @EXPERIMENTAL_TRUE@ F77 = @F77@ FFLAGS = @FFLAGS@ GENHTML = @GENHTML@ GREP = @GREP@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ HAVE_LIBLTDL_FALSE = @HAVE_LIBLTDL_FALSE@ HAVE_LIBLTDL_TRUE = @HAVE_LIBLTDL_TRUE@ HAVE_MAN2HTML_FALSE = @HAVE_MAN2HTML_FALSE@ HAVE_MAN2HTML_TRUE = @HAVE_MAN2HTML_TRUE@ HAVE_XML_FALSE = @HAVE_XML_FALSE@ HAVE_XML_TRUE = @HAVE_XML_TRUE@ HAVE_XSL_FALSE = @HAVE_XSL_FALSE@ HAVE_XSL_TRUE = @HAVE_XSL_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDB_VERSION = @KDB_VERSION@ KDB_VERSION_MAJOR = @KDB_VERSION_MAJOR@ KDB_VERSION_MAJORMINOR = @KDB_VERSION_MAJORMINOR@ KDB_VERSION_MICRO = @KDB_VERSION_MICRO@ KDB_VERSION_MINOR = @KDB_VERSION_MINOR@ LCOV = @LCOV@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VALGRIND = @VALGRIND@ VALGRINDTESTS_FALSE = @VALGRINDTESTS_FALSE@ VALGRINDTESTS_TRUE = @VALGRINDTESTS_TRUE@ VERSION = @VERSION@ XML2_CONFIG = @XML2_CONFIG@ XML_CPPFLAGS = @XML_CPPFLAGS@ XML_LIBS = @XML_LIBS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ backend_static_libs = @backend_static_libs@ backenddir = @backenddir@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ datarootdir = @datarootdir@ dbroot = @dbroot@ default_backend = @default_backend@ default_dbackend = @default_dbackend@ default_docbook = @default_docbook@ develdocdir = @develdocdir@ docdir = @docdir@ doxygen = @doxygen@ dvidir = @dvidir@ elektratools = @elektratools@ exec_prefix = @exec_prefix@ gconf_CFLAGS = @gconf_CFLAGS@ gconf_LIBS = @gconf_LIBS@ hlvlbackenddir = @hlvlbackenddir@ 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@ man2html = @man2html@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ privatelibs = @privatelibs@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ ulibdir = @ulibdir@ xsltproc = @xsltproc@ DIST_SUBDIRS = filesys berkeleydb daemon fstab passwd hosts gconf ini template SUBDIRS = @BACKENDS@ EXTRA_DIST = winregistry doc/backend.c 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 \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/backends/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/backends/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; 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; \ (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" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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 || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(mkdir_p) $(distdir)/doc @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(mkdir_p) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ 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: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_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-libtool \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-exec-am: @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-exec-hook install-info: install-info-recursive install-man: 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: uninstall-info-am @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) uninstall-hook uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ clean clean-generic clean-libtool clean-recursive ctags \ ctags-recursive distclean distclean-generic distclean-libtool \ distclean-recursive distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-exec-hook \ install-info install-info-am install-man install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic \ maintainer-clean-recursive mostlyclean mostlyclean-generic \ mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \ tags tags-recursive uninstall uninstall-am uninstall-hook \ uninstall-info-am install-exec-hook: cd $(DESTDIR)$(backenddir) && \ test -L libelektra-default.so || \ $(LN_S) libelektra-@default_backend@.so libelektra-default.so cd $(DESTDIR)$(backenddir) && \ test -L libelektra-ddefault.so || \ $(LN_S) libelektra-@default_dbackend@.so libelektra-ddefault.so uninstall-hook: -cd $(DESTDIR)$(backenddir) && \ rm -f libelektra-default.so -cd $(DESTDIR)$(backenddir) && \ rm -f libelektra-ddefault.so # 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: elektra-0.7.1/src/backends/berkeleydb/0000777000076400001440000000000011365513213014624 500000000000000elektra-0.7.1/src/backends/berkeleydb/Makefile.am0000644000076400001440000000126211365507605016605 00000000000000AM_CPPFLAGS = -I$(top_srcdir)/src/include noinst_LIBRARIES = libelektra-berkeleydb.a libelektra_berkeleydb_a_SOURCES = berkeleydb.c ../../include/kdb.h ../../include/kdbbackend.h libelektra_berkeleydb_a_CFLAGS = -DELEKTRA_STATIC $(COPTFLAGS) $(CDBGFLAGS) backend_LTLIBRARIES = libelektra-berkeleydb.la libelektra_berkeleydb_la_SOURCES = berkeleydb.c ../../include/kdb.h ../../include/kdbbackend.h libelektra_berkeleydb_la_LDFLAGS = -version-info $(BACKEND_VERSION_API) -module libelektra_berkeleydb_la_LIBADD = ../../libelektra/libelektra.la -ldb libelektra_berkeleydb_la_CFLAGS = $(COPTFLAGS) $(CDBGFLAGS) ../../libelektra/libelektra.la: cd ../../libelektra/ && $(MAKE) libelektra.la elektra-0.7.1/src/backends/berkeleydb/Makefile.in0000644000076400001440000005240511365511147016617 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = src/backends/berkeleydb DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/extensions.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/config.h CONFIG_CLEAN_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru libelektra_berkeleydb_a_AR = $(AR) $(ARFLAGS) libelektra_berkeleydb_a_LIBADD = am_libelektra_berkeleydb_a_OBJECTS = \ libelektra_berkeleydb_a-berkeleydb.$(OBJEXT) libelektra_berkeleydb_a_OBJECTS = \ $(am_libelektra_berkeleydb_a_OBJECTS) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(backenddir)" backendLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(backend_LTLIBRARIES) libelektra_berkeleydb_la_DEPENDENCIES = \ ../../libelektra/libelektra.la am_libelektra_berkeleydb_la_OBJECTS = \ libelektra_berkeleydb_la-berkeleydb.lo libelektra_berkeleydb_la_OBJECTS = \ $(am_libelektra_berkeleydb_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/src/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libelektra_berkeleydb_a_SOURCES) \ $(libelektra_berkeleydb_la_SOURCES) DIST_SOURCES = $(libelektra_berkeleydb_a_SOURCES) \ $(libelektra_berkeleydb_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) INSTALL = @INSTALL@ ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BACKENDS = @BACKENDS@ BACKEND_VERSION_API = @BACKEND_VERSION_API@ BINDINGS = @BINDINGS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CDBGFLAGS = @CDBGFLAGS@ CFLAGS = @CFLAGS@ COPTFLAGS = @COPTFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSTDFLAGS = @CSTDFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDBGFLAGS = @CXXDBGFLAGS@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXOPTFLAGS = @CXXOPTFLAGS@ CXXSTDFLAGS = @CXXSTDFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_FALSE = @DEBUG_FALSE@ DEBUG_TRUE = @DEBUG_TRUE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ELEKTRATOOLS_VERSION_API = @ELEKTRATOOLS_VERSION_API@ ELEKTRA_VERSION_API = @ELEKTRA_VERSION_API@ EXEEXT = @EXEEXT@ EXPERIMENTAL_FALSE = @EXPERIMENTAL_FALSE@ EXPERIMENTAL_TRUE = @EXPERIMENTAL_TRUE@ F77 = @F77@ FFLAGS = @FFLAGS@ GENHTML = @GENHTML@ GREP = @GREP@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ HAVE_LIBLTDL_FALSE = @HAVE_LIBLTDL_FALSE@ HAVE_LIBLTDL_TRUE = @HAVE_LIBLTDL_TRUE@ HAVE_MAN2HTML_FALSE = @HAVE_MAN2HTML_FALSE@ HAVE_MAN2HTML_TRUE = @HAVE_MAN2HTML_TRUE@ HAVE_XML_FALSE = @HAVE_XML_FALSE@ HAVE_XML_TRUE = @HAVE_XML_TRUE@ HAVE_XSL_FALSE = @HAVE_XSL_FALSE@ HAVE_XSL_TRUE = @HAVE_XSL_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDB_VERSION = @KDB_VERSION@ KDB_VERSION_MAJOR = @KDB_VERSION_MAJOR@ KDB_VERSION_MAJORMINOR = @KDB_VERSION_MAJORMINOR@ KDB_VERSION_MICRO = @KDB_VERSION_MICRO@ KDB_VERSION_MINOR = @KDB_VERSION_MINOR@ LCOV = @LCOV@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VALGRIND = @VALGRIND@ VALGRINDTESTS_FALSE = @VALGRINDTESTS_FALSE@ VALGRINDTESTS_TRUE = @VALGRINDTESTS_TRUE@ VERSION = @VERSION@ XML2_CONFIG = @XML2_CONFIG@ XML_CPPFLAGS = @XML_CPPFLAGS@ XML_LIBS = @XML_LIBS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ backend_static_libs = @backend_static_libs@ backenddir = @backenddir@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ datarootdir = @datarootdir@ dbroot = @dbroot@ default_backend = @default_backend@ default_dbackend = @default_dbackend@ default_docbook = @default_docbook@ develdocdir = @develdocdir@ docdir = @docdir@ doxygen = @doxygen@ dvidir = @dvidir@ elektratools = @elektratools@ exec_prefix = @exec_prefix@ gconf_CFLAGS = @gconf_CFLAGS@ gconf_LIBS = @gconf_LIBS@ hlvlbackenddir = @hlvlbackenddir@ 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@ man2html = @man2html@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ privatelibs = @privatelibs@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ ulibdir = @ulibdir@ xsltproc = @xsltproc@ AM_CPPFLAGS = -I$(top_srcdir)/src/include noinst_LIBRARIES = libelektra-berkeleydb.a libelektra_berkeleydb_a_SOURCES = berkeleydb.c ../../include/kdb.h ../../include/kdbbackend.h libelektra_berkeleydb_a_CFLAGS = -DELEKTRA_STATIC $(COPTFLAGS) $(CDBGFLAGS) backend_LTLIBRARIES = libelektra-berkeleydb.la libelektra_berkeleydb_la_SOURCES = berkeleydb.c ../../include/kdb.h ../../include/kdbbackend.h libelektra_berkeleydb_la_LDFLAGS = -version-info $(BACKEND_VERSION_API) -module libelektra_berkeleydb_la_LIBADD = ../../libelektra/libelektra.la -ldb libelektra_berkeleydb_la_CFLAGS = $(COPTFLAGS) $(CDBGFLAGS) all: all-am .SUFFIXES: .SUFFIXES: .c .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 \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/backends/berkeleydb/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/backends/berkeleydb/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libelektra-berkeleydb.a: $(libelektra_berkeleydb_a_OBJECTS) $(libelektra_berkeleydb_a_DEPENDENCIES) -rm -f libelektra-berkeleydb.a $(libelektra_berkeleydb_a_AR) libelektra-berkeleydb.a $(libelektra_berkeleydb_a_OBJECTS) $(libelektra_berkeleydb_a_LIBADD) $(RANLIB) libelektra-berkeleydb.a install-backendLTLIBRARIES: $(backend_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(backenddir)" || $(mkdir_p) "$(DESTDIR)$(backenddir)" @list='$(backend_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(backendLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(backenddir)/$$f'"; \ $(LIBTOOL) --mode=install $(backendLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(backenddir)/$$f"; \ else :; fi; \ done uninstall-backendLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(backend_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(backenddir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(backenddir)/$$p"; \ done clean-backendLTLIBRARIES: -test -z "$(backend_LTLIBRARIES)" || rm -f $(backend_LTLIBRARIES) @list='$(backend_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libelektra-berkeleydb.la: $(libelektra_berkeleydb_la_OBJECTS) $(libelektra_berkeleydb_la_DEPENDENCIES) $(LINK) -rpath $(backenddir) $(libelektra_berkeleydb_la_LDFLAGS) $(libelektra_berkeleydb_la_OBJECTS) $(libelektra_berkeleydb_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_berkeleydb_a-berkeleydb.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_berkeleydb_la-berkeleydb.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< libelektra_berkeleydb_a-berkeleydb.o: berkeleydb.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_berkeleydb_a_CFLAGS) $(CFLAGS) -MT libelektra_berkeleydb_a-berkeleydb.o -MD -MP -MF "$(DEPDIR)/libelektra_berkeleydb_a-berkeleydb.Tpo" -c -o libelektra_berkeleydb_a-berkeleydb.o `test -f 'berkeleydb.c' || echo '$(srcdir)/'`berkeleydb.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_berkeleydb_a-berkeleydb.Tpo" "$(DEPDIR)/libelektra_berkeleydb_a-berkeleydb.Po"; else rm -f "$(DEPDIR)/libelektra_berkeleydb_a-berkeleydb.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='berkeleydb.c' object='libelektra_berkeleydb_a-berkeleydb.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_berkeleydb_a_CFLAGS) $(CFLAGS) -c -o libelektra_berkeleydb_a-berkeleydb.o `test -f 'berkeleydb.c' || echo '$(srcdir)/'`berkeleydb.c libelektra_berkeleydb_a-berkeleydb.obj: berkeleydb.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_berkeleydb_a_CFLAGS) $(CFLAGS) -MT libelektra_berkeleydb_a-berkeleydb.obj -MD -MP -MF "$(DEPDIR)/libelektra_berkeleydb_a-berkeleydb.Tpo" -c -o libelektra_berkeleydb_a-berkeleydb.obj `if test -f 'berkeleydb.c'; then $(CYGPATH_W) 'berkeleydb.c'; else $(CYGPATH_W) '$(srcdir)/berkeleydb.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_berkeleydb_a-berkeleydb.Tpo" "$(DEPDIR)/libelektra_berkeleydb_a-berkeleydb.Po"; else rm -f "$(DEPDIR)/libelektra_berkeleydb_a-berkeleydb.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='berkeleydb.c' object='libelektra_berkeleydb_a-berkeleydb.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_berkeleydb_a_CFLAGS) $(CFLAGS) -c -o libelektra_berkeleydb_a-berkeleydb.obj `if test -f 'berkeleydb.c'; then $(CYGPATH_W) 'berkeleydb.c'; else $(CYGPATH_W) '$(srcdir)/berkeleydb.c'; fi` libelektra_berkeleydb_la-berkeleydb.lo: berkeleydb.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_berkeleydb_la_CFLAGS) $(CFLAGS) -MT libelektra_berkeleydb_la-berkeleydb.lo -MD -MP -MF "$(DEPDIR)/libelektra_berkeleydb_la-berkeleydb.Tpo" -c -o libelektra_berkeleydb_la-berkeleydb.lo `test -f 'berkeleydb.c' || echo '$(srcdir)/'`berkeleydb.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_berkeleydb_la-berkeleydb.Tpo" "$(DEPDIR)/libelektra_berkeleydb_la-berkeleydb.Plo"; else rm -f "$(DEPDIR)/libelektra_berkeleydb_la-berkeleydb.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='berkeleydb.c' object='libelektra_berkeleydb_la-berkeleydb.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_berkeleydb_la_CFLAGS) $(CFLAGS) -c -o libelektra_berkeleydb_la-berkeleydb.lo `test -f 'berkeleydb.c' || echo '$(srcdir)/'`berkeleydb.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(backenddir)"; 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: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_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-backendLTLIBRARIES clean-generic clean-libtool \ clean-noinstLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-backendLTLIBRARIES install-exec-am: install-info: install-info-am install-man: 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-backendLTLIBRARIES uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean \ clean-backendLTLIBRARIES clean-generic clean-libtool \ clean-noinstLIBRARIES ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-backendLTLIBRARIES install-data install-data-am \ install-exec install-exec-am install-info install-info-am \ install-man install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-backendLTLIBRARIES uninstall-info-am ../../libelektra/libelektra.la: cd ../../libelektra/ && $(MAKE) libelektra.la # 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: elektra-0.7.1/src/backends/berkeleydb/README0000644000076400001440000000023611361542116015421 00000000000000This backend is almost ready in terms of functionality. kdbRemove(), kdbRename() and some other implementations are missing. It needs some fine tunning also. elektra-0.7.1/src/backends/berkeleydb/berkeleydb.c0000644000076400001440000010035411361542116017017 00000000000000/*************************************************************************** berkeleydb.c - A Berkeley DB backend for Elektra ------------------- begin : Mon Jan 24 2005 copyright : (C) 2005 by Avi Alkalay email : avi@unix.sh ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ /* Subversion stuff $Id$ */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include #include #include #include #include #include #include #define BACKENDNAME "berkeleydb" #define BACKENDVERSION "0.5.5" #define DB_DIR_USER ".kdb-berkeleydb" #define DB_DIR_SYSTEM "/etc/kdb-berkeleydb" #define DB_KEYVALUE "keyvaluepairs" #define DB_PARENTINDEX "parentindex" #define DB_FILE_KEYVALUE "keyvalue.db" #define DB_FILE_PARENTS "parents.idx" /** * Our DB layout uses 2 simple tables: * * - keyValuePairs: table key is key name, and data is a serialization of * key's metadata, value and comment. * * - parentIndex: a secondary index, to make folder searches possible, so * it contains the parent key name as the table key and some DB internal * data to point to keyValuePais table primary key-data pairs. * * So if we have the following Elektra keys: * * user/sw/app1/key1 * user/sw/app1/key2 * user/sw/app1/dir1/ * user/sw/app1/dir1/key1 * user/sw/app1/dir1/key2 * * The keyValuePairs table will contain: * * user/sw/app1/key1 | metadata, value, comment * user/sw/app1/key2 | metadata, value, comment * user/sw/app1/dir1 | metadata * user/sw/app1/dir1/key1 | metadata, value, comment * user/sw/app1/dir1/key2 | metadata, value, comment * * And parentIndex table will contain: * * user/sw/app1 | (BDB internal pointer to key1 on primary table) * user/sw/app1 | (BDB internal pointer to key2 on primary table) * user/sw/app1 | (BDB internal pointer to dir1 on primary table) * user/sw/app1/dir1 | (BDB internal pointer to dir1/key1 on primary table) * user/sw/app1/dir1 | (BDB internal pointer to dir1/key2 on primary table) * * The parentIndex table is written and managed automatically by Berkeley DB * DB->associate() method, with the help of our parentIndexCallback(). * */ /** * A container for the Berkeley DBs related to the same DBTree. */ typedef struct { DB *parentIndex; /* maps folders to the keys they contain */ DB *keyValuePairs; /* maps keynames to their values + metainfo */ } DBInternals; /** * Each DBTree contains all info needed to access an Elektra * root tree. * * Example of root trees: * system/ * {isSystem=1,owner=0,...} * user/ * {isSystem=0,owner=$USER,...} * user:luciana/ * {isSystem=0,owner=luciana,...} * user:denise/ * {isSystem=0,owner=denise,...} * user:tatiana/ * {isSystem=0,owner=tatiana,...} * */ typedef struct _DBTree { /* if isSystem==0 and owner==0, this DB is for the current user */ int isSystem; char *owner; DBInternals db; struct _DBTree *next; } DBTree; /** * A container for all opened DBTrees */ typedef struct { size_t size; /* number of opened databases */ DBTree *cursor; DBTree *first; /* databases */ } DBContainer; /** * Serialize a Key struct into DBT structs, one for key name * (including ending NULL), another for the rest. * * Memory will be allocated for DBT.data part, so it is caller * responsability to deallocate that latter. * */ int keyToBDB(const Key *key, DBT *dbkey, DBT *dbdata) { void *serialized; size_t metaInfoSize; int utf8Conversion=0, utf8CommentConverted=0, utf8ValueConverted = 0; char *convertedName=key->key; size_t sizeName=kdbiStrLen(key->key); char *convertedValue=key->data; size_t sizeValue=key->dataSize; char *convertedComment=key->comment; size_t sizeComment=key->commentSize; /* First convert all to UTF-8 */ if ((utf8Conversion=kdbbNeedsUTF8Conversion())) { if (key->key) { convertedName=malloc(sizeName); memcpy(convertedName,key->key,sizeName); kdbbUTF8Engine(UTF8_TO,&convertedName,&sizeName); } else convertedName=key->key; if (dbdata) { if (!keyIsBinary(key)) { convertedValue=malloc(sizeValue); memcpy(convertedValue,key->data,sizeValue); kdbbUTF8Engine(UTF8_TO,&convertedValue,&sizeValue); utf8ValueConverted = 1; } else convertedValue=key->data; if (key->comment) { convertedComment=malloc(sizeComment); memcpy(convertedComment,key->comment,sizeComment); kdbbUTF8Engine(UTF8_TO,&convertedComment,&sizeComment); utf8CommentConverted = 1; } else convertedComment=key->comment; } } if (dbdata) { memset(dbdata, 0, sizeof(DBT)); metaInfoSize = KEY_METAINFO_SIZE(key); dbdata->size = metaInfoSize + sizeValue + sizeComment; serialized = malloc(dbdata->size); memset(serialized,0,dbdata->size); /* First part: the metainfo */ memcpy(serialized,key,metaInfoSize); /* *((Key *)serialized)=*key; */ /* Second part: the comment */ memcpy(serialized+metaInfoSize,convertedComment,sizeComment); /* adjust comment size from UTF-8 conversion */ if (key->commentSize!=sizeComment) memcpy(serialized+metaInfoSize- sizeof(key->commentSize)-sizeof(key->dataSize), &sizeComment,sizeof(sizeComment)); /* Third part: the value */ memcpy(serialized+metaInfoSize+sizeComment,convertedValue,sizeValue); /* adjust value size from UTF-8 conversion */ if (key->dataSize!=sizeValue) memcpy(serialized+metaInfoSize-sizeof(key->dataSize), &sizeValue,sizeof(sizeValue)); dbdata->data=serialized; if (utf8CommentConverted ) free(convertedComment); if ( utf8ValueConverted ) free(convertedValue); } memset(dbkey, 0, sizeof(DBT)); if (utf8Conversion) { dbkey->size=sizeName; dbkey->data=convertedName; } else { dbkey->size=kdbiStrLen(key->key); dbkey->data=malloc(dbkey->size); strcpy(dbkey->data,key->key); } return 0; } /** * The oposite of keyToBDB. * Will take 2 DBTs (one for key name, other for data) and convert them * into a Key structure. * * WARNING: key->owner must be set outside keyFromBDB(). Someplace more * aware of the context. So everywhere keyFromBDB is called, a call * to keySetOwner() should apper right after it. */ int keyFromBDB(Key *key, const DBT *dbkey, const DBT *dbdata) { size_t metaInfoSize; keyClose(key); metaInfoSize = KEY_METAINFO_SIZE(key); /* Set all metainfo */ memcpy(key, /* destination */ dbdata->data, /* source */ metaInfoSize); /* size */ key->dataSize=dbdata->size; /* Set comment */ if (key->commentSize) keySetComment(key,dbdata->data+metaInfoSize); /* owner must be set outside this function, * someplace more aware of the context */ keySetName(key,dbkey->data); /* Set value. Key type came from the metaInfo importing above. */ keySetRaw(key,dbdata->data+metaInfoSize+key->commentSize,key->dataSize); if (kdbbNeedsUTF8Conversion()) { size_t size=kdbiStrLen(key->key); kdbbUTF8Engine(UTF8_FROM,&key->key,&size); kdbbUTF8Engine(UTF8_FROM,&key->comment,&key->commentSize); if (!keyIsBinary(key)) kdbbUTF8Engine(UTF8_FROM,(char **)&key->data, &key->dataSize); } /* since we just got the key from the storage, it is synced. */ key->flags &= ~KEY_FLAG_SYNC; return 0; } /** * Calculates the secondary index for a key. * In our DB layout, the secondary index is simply the parent of the key. * This method is called everytime DB->get, DB->put etc BDB methods * are called. */ int parentIndexCallback(DB *db, const DBT *rkey, const DBT *rdata, DBT *pkey) { size_t baseNameSize,parentNameSize; char *parentPrivateCopy=0; baseNameSize=keyNameGetBaseNameSize(rkey->data); if (baseNameSize == 0) /* this is a root or empty key */ return DB_DONOTINDEX; memset(pkey, 0, sizeof(DBT)); parentNameSize=rkey->size-baseNameSize; parentPrivateCopy=malloc(parentNameSize); if (parentPrivateCopy) { memcpy(parentPrivateCopy,rkey->data,parentNameSize-1); parentPrivateCopy[parentNameSize-1]=0; } pkey->data=parentPrivateCopy; pkey->size=parentNameSize; pkey->flags=DB_DBT_APPMALLOC; return 0; } /** * Closes databases, frees internal memory and destroys the * DBTree data structure. It is the oposite of dbTreeNew(). */ int dbTreeDel(DBTree *dbtree) { if (dbtree->owner) free(dbtree->owner); if (dbtree->db.keyValuePairs) dbtree->db.keyValuePairs->close(dbtree->db.keyValuePairs,0); if (dbtree->db.parentIndex) dbtree->db.parentIndex->close(dbtree->db.parentIndex,0); free(dbtree); return 0; } /** * Given a created, opened and empty DBTree, initialize its root key. * This is usually called by dbTreeNew(). */ int dbTreeInit(KDB *handle,DBTree *newDB) { Key *root=0; int ret; DBT dbkey,data; /* TODO: review security bits issues on daemon mode */ if (newDB->isSystem) { root=keyNew("system", KEY_UID,0, KEY_GID,0, KEY_END); } else { struct passwd *userOwner; userOwner=getpwnam(newDB->owner); root=keyNew("user", KEY_UID, kdbhGetUID(handle), KEY_GID, kdbhGetGID(handle), KEY_DIR, KEY_END); } keySetDir(root); root->atime=root->mtime=root->ctime=time(0); /* set current time */ keyToBDB(root,&dbkey,&data); ret = newDB->db.keyValuePairs->put(newDB->db.keyValuePairs, 0,&dbkey,&data, 0); if (!ret) printf("db: %s: DB Initialized.\n", (char *)dbkey.data); else { newDB->db.keyValuePairs->err(newDB->db.keyValuePairs, ret, "DB->put"); perror("DB->put"); } keyDel(root); free(dbkey.data); dbkey.data=0; free(data.data); data.data=0; newDB->db.keyValuePairs->sync(newDB->db.keyValuePairs,0); return KDB_ERR_OK; } /** * Tries to open a DB for a key. * If it doesn't exist, try to create it. * The returned new DBTree must be included in the static single * DBContainer by the caller. * The returned DBTree must be deleted later with dbTreeDel(). * * The DB location on the filesystem is something like this: * * if (keyIsUser(forKey)) * ~{keyGetOwner(forKey)}/.kdb-berkeleydb/{dbfiles} * else * /etc/kdb-berkeleydb/{dbfiles} */ DBTree *dbTreeNew(KDB *handle,const Key *forKey) { DBTree *newDB; int ret; int newlyCreated; /* True if this is a new database */ uid_t uid=0; gid_t gid=0; char dbDir[MAX_PATH_LENGTH]; char parentsFile[MAX_PATH_LENGTH]; char keyvalueFile[MAX_PATH_LENGTH]; struct passwd *user=0; struct stat dbDirInfo; /*********** * Calculate path and filenames for the DB files. ***********/ if (keyIsSystem(forKey)) { /* Prepare to open the 'system/ *' database */ strcpy(dbDir,DB_DIR_SYSTEM); uid = 0; gid = 0; } else if (keyIsUser(forKey)) { /* Prepare to open the 'user:????.*' database */ /* TODO: user should be calculated from handle */ user=getpwnam(forKey->owner); sprintf(dbDir,"%s/%s",user->pw_dir,DB_DIR_USER); uid = user->pw_uid; gid = user->pw_gid; } if (stat(dbDir,&dbDirInfo)) { /* Directory does not exist. create it */ int ret; fprintf(stderr,"Going to create dir %s\n",dbDir); ret=mkdir(dbDir,DEFFILEMODE | S_IXUSR); if (ret) return 0; /* propagate errno */ chown(dbDir, uid, gid); } else { /* Something exist there. Check it first */ if (!S_ISDIR(dbDirInfo.st_mode)) { /* It is not a directory ! */ errno=EACCES; return 0; } } sprintf(keyvalueFile,"%s/%s",dbDir,DB_FILE_KEYVALUE); sprintf(parentsFile,"%s/%s",dbDir,DB_FILE_PARENTS); newDB=malloc(sizeof(DBTree)); memset(newDB,0,sizeof(DBTree)); newDB->isSystem=keyIsSystem(forKey); newlyCreated=0; /* We have the files names. Now open/create them */ /**************** * The main database. The one you can find the real key-value pairs *****************/ if ((ret = db_create(&newDB->db.keyValuePairs, NULL, 0)) != 0) { fprintf(stderr, "db_create: %s: %s\n", DB_KEYVALUE, db_strerror(ret)); free(newDB); errno=KDB_ERR_EBACKEND; return 0; } ret=newDB->db.keyValuePairs->open(newDB->db.keyValuePairs,NULL,keyvalueFile, DB_KEYVALUE, DB_BTREE, DB_CREATE | DB_EXCL | DB_THREAD, 0); if (ret == EEXIST || ret == EACCES) { /* DB already exist. Only open it */ ret=newDB->db.keyValuePairs->open(newDB->db.keyValuePairs,NULL, keyvalueFile, DB_KEYVALUE, DB_BTREE, DB_THREAD, 0); if (ret == EACCES) ret=newDB->db.keyValuePairs->open(newDB->db.keyValuePairs,NULL, keyvalueFile, DB_KEYVALUE, DB_BTREE, DB_THREAD | DB_RDONLY, 0); } else newlyCreated=1; if (ret) { newDB->db.keyValuePairs->err(newDB->db.keyValuePairs, ret, "%s", DB_KEYVALUE); dbTreeDel(newDB); errno=KDB_ERR_EBACKEND; return 0; } /* TODO: Check newlyCreated also */ /**************** * The parent index. To make key searches by their parents *****************/ ret=db_create(&newDB->db.parentIndex, NULL, 0); if (ret != 0) { fprintf(stderr, "db_create: %s: %s\n", DB_PARENTINDEX, db_strerror(ret)); dbTreeDel(newDB); errno=KDB_ERR_EBACKEND; return 0; } ret = newDB->db.parentIndex->set_flags(newDB->db.parentIndex, DB_DUP | DB_DUPSORT); if (ret != 0) fprintf(stderr, "set_flags: %s: %d\n",DB_PARENTINDEX,ret); ret = newDB->db.parentIndex->open(newDB->db.parentIndex, NULL, parentsFile, DB_PARENTINDEX, DB_BTREE, DB_CREATE | DB_EXCL | DB_THREAD, 0); if (ret == EEXIST || ret == EACCES) { /* DB already exist. Only open it */ ret=newDB->db.parentIndex->open(newDB->db.parentIndex,NULL, parentsFile, DB_PARENTINDEX, DB_BTREE, DB_THREAD, 0); if (ret == EACCES) ret=newDB->db.parentIndex->open(newDB->db.parentIndex,NULL, parentsFile, DB_PARENTINDEX, DB_BTREE, DB_THREAD | DB_RDONLY, 0); } if (ret) { newDB->db.parentIndex->err(newDB->db.parentIndex, ret, "%s", DB_PARENTINDEX); dbTreeDel(newDB); errno=KDB_ERR_EBACKEND; return 0; } ret = newDB->db.keyValuePairs->associate(newDB->db.keyValuePairs, NULL, newDB->db.parentIndex, parentIndexCallback, DB_DBT_APPMALLOC); if (ret != 0) { fprintf(stderr, "error: %s: %d\n",DB_PARENTINDEX,ret); dbTreeDel(newDB); errno=KDB_ERR_EBACKEND; return 0; } if (!newDB->isSystem) { newDB->owner=malloc(kdbiStrLen(forKey->owner)); strcpy(newDB->owner,forKey->owner); } /* Set file permissions for the DB files */ if (newlyCreated) { if (user) { chown(keyvalueFile, user->pw_uid,user->pw_gid); chown(parentsFile, user->pw_uid,user->pw_gid); } dbTreeInit(handle,newDB); /* populate */ } return newDB; } /** * Return the DB suitable for the key. * Lookup in the list of opened DBs (DBContainer). If not found, tries to * open it with dbTreeNew(). * Key name and user domain will be used to find the correct database. */ DBTree *getDBForKey(KDB *handle, const Key *key) { DBContainer *dbs=kdbhGetBackendData(handle); DBTree *current,*newDB; char rootName[100]; rootName[0]=0; /* just to be sure... */ if (dbs->cursor) current=dbs->cursor; else current=dbs->cursor=dbs->first; /* We found some DB opened. * Browse it starting from the cursor. */ if (current) { /* Look for a DB in our opened DBs */ if (keyIsSystem(key)) do { if (current->isSystem) return dbs->cursor=current; current=current->next; if (!current) current=dbs->first; } while (current && current!=dbs->cursor); else if (keyIsUser(key)) { /* If key is a user key, it can't have an empty owner */ if (key->owner == 0) return 0; do { if (!current->isSystem && !strcmp(key->owner,current->owner)) return dbs->cursor=current; current=current->next; if (!current) current=dbs->first; } while (current && current!=dbs->cursor); } } /* If we reached this point, the DB for our key is not in our container. * Open it and include in the container. */ newDB=dbTreeNew(handle,key); if (newDB) { /* Put the new DB right after the container's current DB (cursor). * And set the cursor to be the new DB. */ if (dbs->cursor) { newDB->next=dbs->cursor->next; dbs->cursor->next=newDB; dbs->cursor=newDB; } else dbs->cursor=dbs->first=newDB; dbs->size++; } /* If some error ocurred inside dbTreeNew(), errno will be propagated */ return dbs->cursor; } /************************************************* * Interface Implementation *************************************************/ /** * Implementation for kdbRemoveKey() method. * * @see kdbRemove() for expected behavior. * @ingroup backend */ int kdbRemoveKey_bdb(KDB *handle, const Key *key) { DBContainer *dbs; DBTree *dbctx; DBT dbkey,data; int ret; uid_t user=kdbhGetUID(handle); gid_t group=kdbhGetGID(handle); int canWrite=0; Key *cast=0; dbs=kdbhGetBackendData(handle); dbctx=getDBForKey(handle,key); if (!dbctx) return 1; /* propagate errno from getDBForKey() */ /* First check if we have write permission to the key */ memset(&dbkey,0,sizeof(DBT)); memset(&data,0,sizeof(DBT)); dbkey.size=dbkey.ulen=kdbiStrLen(key->key); dbkey.data=key->key; data.flags=DB_DBT_REALLOC; ret = dbctx->db.keyValuePairs->get(dbctx->db.keyValuePairs, NULL, &dbkey, &data, 0); if (ret == DB_NOTFOUND) return errno=KDB_ERR_NOTFOUND; if (ret == 0) { cast=(Key *)data.data; /* Check parent permissions to write bellow it. */ if (cast->uid == user) canWrite = cast->mode & S_IWUSR; else if (cast->gid == group) canWrite = cast->mode & S_IWGRP; else canWrite= cast->mode & S_IWOTH; } free(data.data); if (! canWrite) return errno=KDB_ERR_NOCRED; /* Ok, so we can delete the key */ ret=dbctx->db.keyValuePairs->del(dbctx->db.keyValuePairs, NULL, &dbkey, 0); switch (ret) { case 0: return ret; /* success */ break; case EACCES: return errno=KDB_ERR_NOCRED; break; default: dbctx->db.keyValuePairs->err(dbctx->db.keyValuePairs, ret, "DB->del"); } return ret; } int kdbGetKeyWithOptions(KDB *handle, Key *key, uint32_t options) { DBContainer *dbs; DBTree *dbctx; DBT dbkey,data; int ret; uid_t user=kdbhGetUID(handle); gid_t group=kdbhGetGID(handle); int canRead=0; int isLink=0; Key *buffer = keyNew(0);; dbs=kdbhGetBackendData(handle); dbctx=getDBForKey(handle,key); if (!dbctx) return 1; /* propagate errno from getDBForKey() */ keyInit(buffer); memset(&dbkey,0,sizeof(DBT)); memset(&data,0,sizeof(DBT)); dbkey.size=dbkey.ulen=kdbiStrLen(key->key); dbkey.data=key->key; data.flags=DB_DBT_REALLOC; ret = dbctx->db.keyValuePairs->get(dbctx->db.keyValuePairs, NULL, &dbkey, &data, 0); switch (ret) { case 0: { /* Key found and retrieved. Check permissions */ keyFromBDB(buffer,&dbkey,&data); if (keyIsUser(buffer)) keySetOwner(buffer,dbctx->owner); dbkey.data=0; free(data.data); data.data=0; /* End of BDB specific code in this method */ /* Check permissions. */ if (keyGetUID(buffer) == user) canRead = keyGetMode(buffer) & S_IRUSR; else if (keyGetGID(buffer) == group) canRead = keyGetMode(buffer) & S_IRGRP; else canRead = keyGetMode(buffer) & S_IROTH; if (!canRead) { keyClose(buffer); return errno=KDB_ERR_NOCRED; } break; } case DB_NOTFOUND: return errno=KDB_ERR_NOTFOUND; break; } isLink=keyIsLink(buffer); if (canRead) { /* TODO: check if ok? if (!isLink && (options & KDB_O_STATONLY)) keySetRaw(buffer,0,0); */ if (isLink && !(options & KDB_O_NFOLLOWLINK)) { /* If we have a link and user did not specify KDB_O_NFOLLOWLINK, * he want to dereference the link */ Key *target = keyNew(0); keyInit(target); keySetName(target,buffer->data); if (kdbGetKeyWithOptions(handle,target, options) == KDB_ERR_NOTFOUND) { keyDel(target); keyDel(buffer); return errno=KDB_ERR_NOTFOUND; } } } key = keyDup(buffer); keyDel(buffer); return KDB_ERR_OK; /* success */ } int kdbGetKey_bdb(KDB *handle, Key *key) { return kdbGetKeyWithOptions(handle,key,0); } int kdbStatKey_bdb(KDB *handle, Key *key) { return kdbGetKeyWithOptions(handle,key,0); } /** * Implementation for kdbSetKey() method. * * @see kdbSetKey() for expected behavior. * @ingroup backend */ int kdbSetKey_bdb(KDB *handle, Key *key) { DBTree *dbctx; DBT dbkey,data; int ret; uid_t user=kdbhGetUID(handle); gid_t group=kdbhGetGID(handle); int canWrite=0; dbctx=getDBForKey(handle,key); if (!dbctx) return 1; /* propagate errno from getDBForKey() */ /* Check mode permissions. Check if this client can commit this key to the database */ memset(&dbkey,0,sizeof(DBT)); memset(&data,0,sizeof(DBT)); dbkey.size=dbkey.ulen=kdbiStrLen(key->key); dbkey.data=key->key; dbkey.flags=data.flags=DB_DBT_REALLOC; ret = dbctx->db.keyValuePairs->get(dbctx->db.keyValuePairs, NULL, &dbkey, &data, 0); switch (ret) { case 0: { /* Key found and retrieved. Check permissions */ Key *cast; cast=(Key *)data.data; /* Check parent permissions to write bellow it. */ if (cast->uid == user) canWrite = cast->mode & S_IWUSR; else if (cast->gid == group) canWrite = cast->mode & S_IWGRP; else canWrite= cast->mode & S_IWOTH; /* cleanup */ dbkey.data=0; free(data.data); data.data=0; /* keyClose(&buffer); */ break; } case DB_NOTFOUND: { /* We don't have this key yet. Check if we have a parent and its permissions. */ Key *parent=0; size_t parentNameSize; char *parentName; parentNameSize=keyGetParentNameSize(key); parentName=malloc(parentNameSize); keyGetParentName(key,parentName,parentNameSize); memset(&dbkey,0,sizeof(DBT)); memset(&data,0,sizeof(DBT)); dbkey.data=parentName; dbkey.size=parentNameSize; dbkey.flags=data.flags=DB_DBT_REALLOC; ret = dbctx->db.keyValuePairs->get(dbctx->db.keyValuePairs, NULL, &dbkey, &data, 0); if (ret == DB_NOTFOUND) { /* No, we don't have a parent. Create dirs recursivelly */ parent=keyNew(0); /* explicitly set these attributes from the handle cause we * could be running under a daemon context */ keySetUID(parent,user); keySetGID(parent,group); keySetDir(parent); /* Next block exist just to not call * keySetName(), a very expensive method. * This is a not-recomended hack. */ parent->key=parentName; parent->owner=key->owner; /* free(parentName); */ if (kdbSetKey_bdb(handle,parent)) { /* If some error happened in this recursive call. * Propagate errno. */ /* disassociate our hack for deletion */ parent->owner=0; /* parentName will be free()d here too */ keyDel(parent); return 1; } /* disassociate our hack for latter deletion */ parent->owner=0; /* data.data enters and quits this block empty */ } else { /* Yes, we have a parent already. */ /*parent=keyNew(0); keyFromBDB(parent,&dbkey,&data); keySetOwner(parent,dbctx->owner); free(data.data); */ /* we don't need it anymore */ free(parentName); /* we are only interested in some metainfo, so just cast it */ parent=(Key *)data.data; } /* Check parent permissions to write bellow it. */ if (parent->uid == user) canWrite = parent->mode & S_IWUSR; else if (parent->gid == group) canWrite = parent->mode & S_IWGRP; else canWrite= parent->mode & S_IWOTH; if (data.data) free(data.data); if (parent == (Key *)data.data) parent = 0; else if (parent) keyDel(parent); break; } /* case DB_NOTFOUND */ } /* switch */ if (! canWrite) return errno=KDB_ERR_NOCRED; key->mtime=key->atime=time(0); /* set current time into key */ keyToBDB(key,&dbkey,&data); if ((ret = dbctx->db.keyValuePairs->put(dbctx->db.keyValuePairs, NULL, &dbkey, &data, 0)) != 0) { dbctx->db.keyValuePairs->err(dbctx->db.keyValuePairs, ret, "DB->put"); free(dbkey.data); dbkey.data=0; free(data.data); data.data=0; errno=KDB_ERR_NOCRED; /* probably this is the error */ return 1; } free(dbkey.data); dbkey.data=0; free(data.data); data.data=0; /* Mark the key as synced */ key->flags &= ~KEY_FLAG_SYNC; /* dbctx->db.keyValuePairs->sync(dbctx->db.keyValuePairs,0); dbctx->db.parentIndex->sync(dbctx->db.parentIndex,0); */ return 0; /* success */ } /** * Implementation for kdbGetKeyChildKeys() method. * * @see kdbGetKeyChildKeys() for expected behavior. * @ingroup backend */ ssize_t kdbGetKeyChildKeys_bdb(KDB *handle, const Key *parentKey, KeySet *returned, unsigned long options) { DBTree *db=0; DBC *cursor=0; DBT parent,keyName,keyData; Key *currentParent, *retrievedKey; KeySet *folders; uid_t user=kdbhGetUID(handle); gid_t group=kdbhGetGID(handle); mode_t canRead=0; /* wether we have permissions to go ahead */ int ret=0; /* Get/create the DB for the parent key */ db=getDBForKey(handle,parentKey); if (db == 0) { /* Bizarre sitution when a DB (existing or newly creted) can't be associted with the passed key. This is unacceptable and trated as as INVALID, because all DBs are calculated from key name. */ errno=KDB_ERR_INVALIDKEY; return -1; } currentParent=keyNew(0); parentKey = keyDup(currentParent); ret=kdbGetKeyWithOptions(handle,currentParent,0); if (ret==KDB_ERR_NOTFOUND) { keyDel(currentParent); errno=KDB_ERR_NOTFOUND; return -1; } if (! keyIsDir(currentParent)) { /* TODO: dereference link keys */ keyDel(currentParent); errno=ENOTDIR; return -1; } /* Check master parent permissions from DB */ if (currentParent->uid == user) canRead = currentParent->mode & (S_IRUSR | S_IXUSR); else if (currentParent->gid == group) canRead = currentParent->mode & (S_IRGRP | S_IXGRP); else canRead = currentParent->mode & (S_IROTH | S_IXOTH); keyDel(currentParent); if (!canRead) return errno=KDB_ERR_NOCRED; /* initialize the KeySet that will hold the fetched folders */ folders = ksNew(0); /* initialize a cursor to walk through each key under a folder */ ret = db->db.parentIndex->cursor(db->db.parentIndex, NULL, &cursor, 0); currentParent=(Key *)parentKey; /* * Each loop pass reads all keys from a single folder, without recursion. * Recursion is provided by multiple passes on this loop */ do { memset(&parent,0,sizeof(parent)); memset(&keyData,0,sizeof(keyData)); memset(&keyName,0,sizeof(keyName)); /* Memory will be allocated now for the DBTs.... */ keyToBDB((const Key *)currentParent,&parent,0); /* Let BDB allocate memory for next key name and data */ keyName.flags=keyData.flags=DB_DBT_REALLOC; /* position the cursor in the first key of "parent" folder and retrieve it */ ret=cursor->c_pget(cursor, &parent, &keyName, &keyData, DB_SET); if (ret == DB_NOTFOUND) { /* We are probably in a root key, that * doesn't have any subentry in the index. */ free(parent.data); free(keyName.data); free(keyData.data); break; /*return KDB_ERR_NOTFOUND; */ } /* Now start retrieving all child keys */ do { /* next cursor move is in the ending "while" */ /* Check if is inactive before doing higher level operations */ /* if (!(options & KDB_O_INACTIVE)) { char *sep; * If we don't want inactive keys, check if its inactive * * TODO: handle escaping * sep=strrchr((char *)keyName.data,RG_KEY_DELIM); if (sep && sep[1] == '.') { * This is an inactive key, and we don't want it * * Ignore this key, free all, and continue * free(keyName.data); free(keyData.data); memset(&keyName,0,sizeof(keyName)); memset(&keyData,0,sizeof(keyData)); keyName.flags=keyData.flags=DB_DBT_REALLOC; * fetch next * continue; } } */ retrievedKey=keyNew(0); keyFromBDB(retrievedKey,&keyName,&keyData); if (keyIsUser(retrievedKey)) keySetOwner(retrievedKey,db->owner); free(keyName.data); free(keyData.data); memset(&keyName,0,sizeof(keyName)); memset(&keyData,0,sizeof(keyData)); keyName.flags=keyData.flags=DB_DBT_REALLOC; /* End of BDB specific code, ready for next c_pget() */ /* check permissions for this key */ canRead=0; /* if (options & KDB_O_STATONLY) { if (!keyIsLink(retrievedKey)) keySetRaw(retrievedKey,0,0); canRead=1; } else { */ /* If caller wants the value, comment, etc... */ canRead=0; if (retrievedKey->uid == user) { canRead = (retrievedKey->mode & S_IRUSR); } else if (retrievedKey->gid == group) { canRead = (retrievedKey->mode & S_IRGRP); } else canRead = (retrievedKey->mode & S_IROTH); /*}*/ if (!canRead) { keyDel(retrievedKey); continue; } if (keyIsLink(retrievedKey) && !(options & KDB_O_NFOLLOWLINK)) { /* If we have a link and user did not specify KDB_O_NFOLLOWLINK, * means he wants to dereference the link */ Key *target = keyNew (0); keySetName(target,retrievedKey->data); if (kdbGetKeyWithOptions(handle,target, options) == KDB_ERR_NOTFOUND) { /* Invalid link target, so don't include in keyset */ keyDel(target); errno=KDB_ERR_NOTFOUND; /* fetch next */ continue; } else { target = keyDup(retrievedKey); keyDel (target); } } /* if (keyIsDir(retrievedKey)) { if (options & KDB_O_RECURSIVE) { ksAppendKey(folders,retrievedKey); } else if (options & KDB_O_DIR) { ksAppendKey(returned,retrievedKey); } else keyDel(retrievedKey); } else if (options & KDB_O_DIRONLY) { * If key isn't a dir, and user only wants dirs... * keyDel(retrievedKey); retrievedKey=0; } else */ ksAppendKey(returned, retrievedKey); } while (0==(ret=cursor->c_pget(cursor,&parent,&keyName,&keyData,DB_NEXT_DUP))); } while ((currentParent=ksNext(folders))); /* At this point we have all keys we want. Make final adjustments. */ /* if (options & KDB_O_DIR) */ ksAppend(returned,folders); ksDel(folders); /* if ((options & (KDB_O_SORT)) && (returned->size > 1)) ksSort(returned); */ cursor->c_close(cursor); return returned->size; } int kdbOpen_berkeleydb(KDB *handle) { KDBCap *cap = kdbhGetCapability (handle); /* Create only the DB container. * DBs will be allocated on demand */ DBContainer *dbs; cap->onlyFullGet=1; cap->noStat=1; cap->onlyRemoveAll=1; cap->onlyFullSet=1; cap->onlyAddKeys=1; cap->onlySystem=1; cap->onlyUser=1; cap->noOwner=1; cap->noValue=1; cap->noComment=1; cap->noUID=1; cap->noGID=1; cap->noMode=1; cap->noDir=1; cap->noATime=1; cap->noMTime=1; cap->noCTime=1; cap->noRemove=1; cap->noLink=1; cap->noMount=1; cap->noBinary=1; cap->noString=1; cap->noTypes=1; cap->noError=1; cap->noLock=1; cap->noThread=1; dbs=malloc(sizeof(DBContainer)); memset(dbs,0,sizeof(DBContainer)); kdbhSetBackendData(handle,dbs); return 0; } int kdbClose_berkeleydb(KDB *handle) { /* free all backend resources and shut it down */ DBContainer *dbs; dbs=kdbhGetBackendData(handle); if (dbs) { while (dbs->first) { dbs->cursor=dbs->first; dbs->first=dbs->cursor->next; dbTreeDel(dbs->cursor); } free(dbs); dbs=0; } return 0; /* success */ } ssize_t kdbGet_berkeleydb(KDB *handle, KeySet *returned, const Key *parentKey) { ssize_t nr_keys = 0; /* get all keys below parentKey and count them with nr_keys */ nr_keys = kdbGetKeyChildKeys_bdb(handle, parentKey, returned, 0); return nr_keys; /* success */ } ssize_t kdbSet_berkeleydb(KDB *handle, KeySet *returned, const Key *parentKey) { ssize_t nr_keys = 0; Key *current=ksCurrent(returned); /* set all keys below parentKey and count them with nr_keys */ if (!current) current=ksNext(returned); while (current) { if (keyNeedRemove(current)) { if (kdbRemoveKey_bdb (handle, current)) return -1; // TODO: should key be removed? } else if (keyNeedSync(current)) { if (kdbSetKey_bdb (handle,current)) /* check error */ return -1; } current=ksNext(returned); } return nr_keys; } KDBEXPORT(berkeleydb) { return kdbBackendExport(BACKENDNAME, KDB_BE_OPEN, &kdbOpen_berkeleydb, KDB_BE_CLOSE, &kdbClose_berkeleydb, KDB_BE_GET, &kdbGet_berkeleydb, KDB_BE_SET, &kdbSet_berkeleydb, KDB_BE_VERSION, BACKENDVERSION, KDB_BE_AUTHOR, "Full Name ", KDB_BE_LICENCE, "BSD", KDB_BE_DESCRIPTION, "Add description here", KDB_BE_END); } elektra-0.7.1/src/backends/daemon/0000777000076400001440000000000011365513213013757 500000000000000elektra-0.7.1/src/backends/daemon/Makefile.am0000644000076400001440000000273411365507605015745 00000000000000 # $Id$ AM_CPPFLAGS = -I$(top_srcdir)/src/include noinst_LIBRARIES = libelektra-daemon.a noinst_LTLIBRARIES = libproto.la libproto_la_SOURCES = message.h message.c protocol.h protocol.c ipc.h ipc.c sig.h sig.c serial.h serial.c serial_int.h serial_int.c serial_string.h serial_string.c serial_key.h serial_key.c serial_keyset.h serial_keyset.c datatype.h libelektra_daemon_a_SOURCES = daemon.c ../../include/kdb.h ../../include/kdbbackend.h $(libproto_la_SOURCES) libelektra_daemon_a_CFLAGS = -DELEKTRA_STATIC $(COPTFLAGS) $(CDBGFLAGS) backend_LTLIBRARIES = libelektra-daemon.la libelektra_daemon_la_SOURCES = daemon.c libelektra_daemon_la_LDFLAGS = -version-info $(BACKEND_VERSION_API) -module libelektra_daemon_la_LIBADD = ../../libelektra/libelektra.la libproto.la libelektra_daemon_la_CFLAGS = $(COPTFLAGS) $(CDBGFLAGS) sbin_PROGRAMS = kdbd # kdbd_static kdbd_SOURCES = main.c kdbd.h kdbd.c kdb_wrapper.h kdb_wrapper.c thread.h thread.c kdbd_CFLAGS = -DDEFAULT_DBACKEND=\"ddefault\" kdbd_LDADD = libproto.la ../../libelektra/libelektra.la -lpthread $(LIBICONV) # kdbd_static_SOURCES = main.c kdbd.g kdbd.c kdb_wrapper.h kdb_wrapper.c thread.h thread.c # kdbd_static_CFLAGS = -DELEKTRA_STATIC -DDEFAULT_DBACKEND=\"$(default_dbackend)\" # kdbd_static_LDADD = @privatelibs@ libproto.la ../../libelektra/libelektra.a -lpthread ../../libelektra/libelektra.la: cd ../../libelektra/ && $(MAKE) libelektra.la # ../../libelektra/libelektra.a: # cd ../../libelektra/ && $(MAKE) libelektra.a elektra-0.7.1/src/backends/daemon/Makefile.in0000644000076400001440000014665511365511150015757 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ # $Id$ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ sbin_PROGRAMS = kdbd$(EXEEXT) subdir = src/backends/daemon DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/extensions.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/config.h CONFIG_CLEAN_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru libelektra_daemon_a_AR = $(AR) $(ARFLAGS) libelektra_daemon_a_LIBADD = am__objects_1 = libelektra_daemon_a-message.$(OBJEXT) \ libelektra_daemon_a-protocol.$(OBJEXT) \ libelektra_daemon_a-ipc.$(OBJEXT) \ libelektra_daemon_a-sig.$(OBJEXT) \ libelektra_daemon_a-serial.$(OBJEXT) \ libelektra_daemon_a-serial_int.$(OBJEXT) \ libelektra_daemon_a-serial_string.$(OBJEXT) \ libelektra_daemon_a-serial_key.$(OBJEXT) \ libelektra_daemon_a-serial_keyset.$(OBJEXT) am_libelektra_daemon_a_OBJECTS = libelektra_daemon_a-daemon.$(OBJEXT) \ $(am__objects_1) libelektra_daemon_a_OBJECTS = $(am_libelektra_daemon_a_OBJECTS) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(backenddir)" "$(DESTDIR)$(sbindir)" backendLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(backend_LTLIBRARIES) $(noinst_LTLIBRARIES) libelektra_daemon_la_DEPENDENCIES = ../../libelektra/libelektra.la \ libproto.la am_libelektra_daemon_la_OBJECTS = libelektra_daemon_la-daemon.lo libelektra_daemon_la_OBJECTS = $(am_libelektra_daemon_la_OBJECTS) libproto_la_LIBADD = am_libproto_la_OBJECTS = message.lo protocol.lo ipc.lo sig.lo \ serial.lo serial_int.lo serial_string.lo serial_key.lo \ serial_keyset.lo libproto_la_OBJECTS = $(am_libproto_la_OBJECTS) sbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(sbin_PROGRAMS) am_kdbd_OBJECTS = kdbd-main.$(OBJEXT) kdbd-kdbd.$(OBJEXT) \ kdbd-kdb_wrapper.$(OBJEXT) kdbd-thread.$(OBJEXT) kdbd_OBJECTS = $(am_kdbd_OBJECTS) am__DEPENDENCIES_1 = kdbd_DEPENDENCIES = libproto.la ../../libelektra/libelektra.la \ $(am__DEPENDENCIES_1) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/src/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libelektra_daemon_a_SOURCES) \ $(libelektra_daemon_la_SOURCES) $(libproto_la_SOURCES) \ $(kdbd_SOURCES) DIST_SOURCES = $(libelektra_daemon_a_SOURCES) \ $(libelektra_daemon_la_SOURCES) $(libproto_la_SOURCES) \ $(kdbd_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) INSTALL = @INSTALL@ ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BACKENDS = @BACKENDS@ BACKEND_VERSION_API = @BACKEND_VERSION_API@ BINDINGS = @BINDINGS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CDBGFLAGS = @CDBGFLAGS@ CFLAGS = @CFLAGS@ COPTFLAGS = @COPTFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSTDFLAGS = @CSTDFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDBGFLAGS = @CXXDBGFLAGS@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXOPTFLAGS = @CXXOPTFLAGS@ CXXSTDFLAGS = @CXXSTDFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_FALSE = @DEBUG_FALSE@ DEBUG_TRUE = @DEBUG_TRUE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ELEKTRATOOLS_VERSION_API = @ELEKTRATOOLS_VERSION_API@ ELEKTRA_VERSION_API = @ELEKTRA_VERSION_API@ EXEEXT = @EXEEXT@ EXPERIMENTAL_FALSE = @EXPERIMENTAL_FALSE@ EXPERIMENTAL_TRUE = @EXPERIMENTAL_TRUE@ F77 = @F77@ FFLAGS = @FFLAGS@ GENHTML = @GENHTML@ GREP = @GREP@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ HAVE_LIBLTDL_FALSE = @HAVE_LIBLTDL_FALSE@ HAVE_LIBLTDL_TRUE = @HAVE_LIBLTDL_TRUE@ HAVE_MAN2HTML_FALSE = @HAVE_MAN2HTML_FALSE@ HAVE_MAN2HTML_TRUE = @HAVE_MAN2HTML_TRUE@ HAVE_XML_FALSE = @HAVE_XML_FALSE@ HAVE_XML_TRUE = @HAVE_XML_TRUE@ HAVE_XSL_FALSE = @HAVE_XSL_FALSE@ HAVE_XSL_TRUE = @HAVE_XSL_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDB_VERSION = @KDB_VERSION@ KDB_VERSION_MAJOR = @KDB_VERSION_MAJOR@ KDB_VERSION_MAJORMINOR = @KDB_VERSION_MAJORMINOR@ KDB_VERSION_MICRO = @KDB_VERSION_MICRO@ KDB_VERSION_MINOR = @KDB_VERSION_MINOR@ LCOV = @LCOV@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VALGRIND = @VALGRIND@ VALGRINDTESTS_FALSE = @VALGRINDTESTS_FALSE@ VALGRINDTESTS_TRUE = @VALGRINDTESTS_TRUE@ VERSION = @VERSION@ XML2_CONFIG = @XML2_CONFIG@ XML_CPPFLAGS = @XML_CPPFLAGS@ XML_LIBS = @XML_LIBS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ backend_static_libs = @backend_static_libs@ backenddir = @backenddir@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ datarootdir = @datarootdir@ dbroot = @dbroot@ default_backend = @default_backend@ default_dbackend = @default_dbackend@ default_docbook = @default_docbook@ develdocdir = @develdocdir@ docdir = @docdir@ doxygen = @doxygen@ dvidir = @dvidir@ elektratools = @elektratools@ exec_prefix = @exec_prefix@ gconf_CFLAGS = @gconf_CFLAGS@ gconf_LIBS = @gconf_LIBS@ hlvlbackenddir = @hlvlbackenddir@ 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@ man2html = @man2html@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ privatelibs = @privatelibs@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ ulibdir = @ulibdir@ xsltproc = @xsltproc@ AM_CPPFLAGS = -I$(top_srcdir)/src/include noinst_LIBRARIES = libelektra-daemon.a noinst_LTLIBRARIES = libproto.la libproto_la_SOURCES = message.h message.c protocol.h protocol.c ipc.h ipc.c sig.h sig.c serial.h serial.c serial_int.h serial_int.c serial_string.h serial_string.c serial_key.h serial_key.c serial_keyset.h serial_keyset.c datatype.h libelektra_daemon_a_SOURCES = daemon.c ../../include/kdb.h ../../include/kdbbackend.h $(libproto_la_SOURCES) libelektra_daemon_a_CFLAGS = -DELEKTRA_STATIC $(COPTFLAGS) $(CDBGFLAGS) backend_LTLIBRARIES = libelektra-daemon.la libelektra_daemon_la_SOURCES = daemon.c libelektra_daemon_la_LDFLAGS = -version-info $(BACKEND_VERSION_API) -module libelektra_daemon_la_LIBADD = ../../libelektra/libelektra.la libproto.la libelektra_daemon_la_CFLAGS = $(COPTFLAGS) $(CDBGFLAGS) # kdbd_static kdbd_SOURCES = main.c kdbd.h kdbd.c kdb_wrapper.h kdb_wrapper.c thread.h thread.c kdbd_CFLAGS = -DDEFAULT_DBACKEND=\"ddefault\" kdbd_LDADD = libproto.la ../../libelektra/libelektra.la -lpthread $(LIBICONV) all: all-am .SUFFIXES: .SUFFIXES: .c .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 \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/backends/daemon/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/backends/daemon/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libelektra-daemon.a: $(libelektra_daemon_a_OBJECTS) $(libelektra_daemon_a_DEPENDENCIES) -rm -f libelektra-daemon.a $(libelektra_daemon_a_AR) libelektra-daemon.a $(libelektra_daemon_a_OBJECTS) $(libelektra_daemon_a_LIBADD) $(RANLIB) libelektra-daemon.a install-backendLTLIBRARIES: $(backend_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(backenddir)" || $(mkdir_p) "$(DESTDIR)$(backenddir)" @list='$(backend_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(backendLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(backenddir)/$$f'"; \ $(LIBTOOL) --mode=install $(backendLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(backenddir)/$$f"; \ else :; fi; \ done uninstall-backendLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(backend_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(backenddir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(backenddir)/$$p"; \ done clean-backendLTLIBRARIES: -test -z "$(backend_LTLIBRARIES)" || rm -f $(backend_LTLIBRARIES) @list='$(backend_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libelektra-daemon.la: $(libelektra_daemon_la_OBJECTS) $(libelektra_daemon_la_DEPENDENCIES) $(LINK) -rpath $(backenddir) $(libelektra_daemon_la_LDFLAGS) $(libelektra_daemon_la_OBJECTS) $(libelektra_daemon_la_LIBADD) $(LIBS) libproto.la: $(libproto_la_OBJECTS) $(libproto_la_DEPENDENCIES) $(LINK) $(libproto_la_LDFLAGS) $(libproto_la_OBJECTS) $(libproto_la_LIBADD) $(LIBS) install-sbinPROGRAMS: $(sbin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(sbindir)" || $(mkdir_p) "$(DESTDIR)$(sbindir)" @list='$(sbin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ || test -f $$p1 \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(sbinPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(sbindir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(sbinPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(sbindir)/$$f" || exit 1; \ else :; fi; \ done uninstall-sbinPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(sbin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(sbindir)/$$f'"; \ rm -f "$(DESTDIR)$(sbindir)/$$f"; \ done clean-sbinPROGRAMS: @list='$(sbin_PROGRAMS)'; for p in $$list; do \ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done kdbd$(EXEEXT): $(kdbd_OBJECTS) $(kdbd_DEPENDENCIES) @rm -f kdbd$(EXEEXT) $(LINK) $(kdbd_LDFLAGS) $(kdbd_OBJECTS) $(kdbd_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kdbd-kdb_wrapper.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kdbd-kdbd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kdbd-main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kdbd-thread.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_daemon_a-daemon.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_daemon_a-ipc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_daemon_a-message.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_daemon_a-protocol.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_daemon_a-serial.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_daemon_a-serial_int.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_daemon_a-serial_key.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_daemon_a-serial_keyset.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_daemon_a-serial_string.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_daemon_a-sig.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_daemon_la-daemon.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/message.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/protocol.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/serial.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/serial_int.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/serial_key.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/serial_keyset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/serial_string.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sig.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< libelektra_daemon_a-daemon.o: daemon.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_daemon_a_CFLAGS) $(CFLAGS) -MT libelektra_daemon_a-daemon.o -MD -MP -MF "$(DEPDIR)/libelektra_daemon_a-daemon.Tpo" -c -o libelektra_daemon_a-daemon.o `test -f 'daemon.c' || echo '$(srcdir)/'`daemon.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_daemon_a-daemon.Tpo" "$(DEPDIR)/libelektra_daemon_a-daemon.Po"; else rm -f "$(DEPDIR)/libelektra_daemon_a-daemon.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='daemon.c' object='libelektra_daemon_a-daemon.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_daemon_a_CFLAGS) $(CFLAGS) -c -o libelektra_daemon_a-daemon.o `test -f 'daemon.c' || echo '$(srcdir)/'`daemon.c libelektra_daemon_a-daemon.obj: daemon.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_daemon_a_CFLAGS) $(CFLAGS) -MT libelektra_daemon_a-daemon.obj -MD -MP -MF "$(DEPDIR)/libelektra_daemon_a-daemon.Tpo" -c -o libelektra_daemon_a-daemon.obj `if test -f 'daemon.c'; then $(CYGPATH_W) 'daemon.c'; else $(CYGPATH_W) '$(srcdir)/daemon.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_daemon_a-daemon.Tpo" "$(DEPDIR)/libelektra_daemon_a-daemon.Po"; else rm -f "$(DEPDIR)/libelektra_daemon_a-daemon.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='daemon.c' object='libelektra_daemon_a-daemon.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_daemon_a_CFLAGS) $(CFLAGS) -c -o libelektra_daemon_a-daemon.obj `if test -f 'daemon.c'; then $(CYGPATH_W) 'daemon.c'; else $(CYGPATH_W) '$(srcdir)/daemon.c'; fi` libelektra_daemon_a-message.o: message.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_daemon_a_CFLAGS) $(CFLAGS) -MT libelektra_daemon_a-message.o -MD -MP -MF "$(DEPDIR)/libelektra_daemon_a-message.Tpo" -c -o libelektra_daemon_a-message.o `test -f 'message.c' || echo '$(srcdir)/'`message.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_daemon_a-message.Tpo" "$(DEPDIR)/libelektra_daemon_a-message.Po"; else rm -f "$(DEPDIR)/libelektra_daemon_a-message.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='message.c' object='libelektra_daemon_a-message.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_daemon_a_CFLAGS) $(CFLAGS) -c -o libelektra_daemon_a-message.o `test -f 'message.c' || echo '$(srcdir)/'`message.c libelektra_daemon_a-message.obj: message.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_daemon_a_CFLAGS) $(CFLAGS) -MT libelektra_daemon_a-message.obj -MD -MP -MF "$(DEPDIR)/libelektra_daemon_a-message.Tpo" -c -o libelektra_daemon_a-message.obj `if test -f 'message.c'; then $(CYGPATH_W) 'message.c'; else $(CYGPATH_W) '$(srcdir)/message.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_daemon_a-message.Tpo" "$(DEPDIR)/libelektra_daemon_a-message.Po"; else rm -f "$(DEPDIR)/libelektra_daemon_a-message.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='message.c' object='libelektra_daemon_a-message.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_daemon_a_CFLAGS) $(CFLAGS) -c -o libelektra_daemon_a-message.obj `if test -f 'message.c'; then $(CYGPATH_W) 'message.c'; else $(CYGPATH_W) '$(srcdir)/message.c'; fi` libelektra_daemon_a-protocol.o: protocol.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_daemon_a_CFLAGS) $(CFLAGS) -MT libelektra_daemon_a-protocol.o -MD -MP -MF "$(DEPDIR)/libelektra_daemon_a-protocol.Tpo" -c -o libelektra_daemon_a-protocol.o `test -f 'protocol.c' || echo '$(srcdir)/'`protocol.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_daemon_a-protocol.Tpo" "$(DEPDIR)/libelektra_daemon_a-protocol.Po"; else rm -f "$(DEPDIR)/libelektra_daemon_a-protocol.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='protocol.c' object='libelektra_daemon_a-protocol.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_daemon_a_CFLAGS) $(CFLAGS) -c -o libelektra_daemon_a-protocol.o `test -f 'protocol.c' || echo '$(srcdir)/'`protocol.c libelektra_daemon_a-protocol.obj: protocol.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_daemon_a_CFLAGS) $(CFLAGS) -MT libelektra_daemon_a-protocol.obj -MD -MP -MF "$(DEPDIR)/libelektra_daemon_a-protocol.Tpo" -c -o libelektra_daemon_a-protocol.obj `if test -f 'protocol.c'; then $(CYGPATH_W) 'protocol.c'; else $(CYGPATH_W) '$(srcdir)/protocol.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_daemon_a-protocol.Tpo" "$(DEPDIR)/libelektra_daemon_a-protocol.Po"; else rm -f "$(DEPDIR)/libelektra_daemon_a-protocol.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='protocol.c' object='libelektra_daemon_a-protocol.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_daemon_a_CFLAGS) $(CFLAGS) -c -o libelektra_daemon_a-protocol.obj `if test -f 'protocol.c'; then $(CYGPATH_W) 'protocol.c'; else $(CYGPATH_W) '$(srcdir)/protocol.c'; fi` libelektra_daemon_a-ipc.o: ipc.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_daemon_a_CFLAGS) $(CFLAGS) -MT libelektra_daemon_a-ipc.o -MD -MP -MF "$(DEPDIR)/libelektra_daemon_a-ipc.Tpo" -c -o libelektra_daemon_a-ipc.o `test -f 'ipc.c' || echo '$(srcdir)/'`ipc.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_daemon_a-ipc.Tpo" "$(DEPDIR)/libelektra_daemon_a-ipc.Po"; else rm -f "$(DEPDIR)/libelektra_daemon_a-ipc.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ipc.c' object='libelektra_daemon_a-ipc.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_daemon_a_CFLAGS) $(CFLAGS) -c -o libelektra_daemon_a-ipc.o `test -f 'ipc.c' || echo '$(srcdir)/'`ipc.c libelektra_daemon_a-ipc.obj: ipc.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_daemon_a_CFLAGS) $(CFLAGS) -MT libelektra_daemon_a-ipc.obj -MD -MP -MF "$(DEPDIR)/libelektra_daemon_a-ipc.Tpo" -c -o libelektra_daemon_a-ipc.obj `if test -f 'ipc.c'; then $(CYGPATH_W) 'ipc.c'; else $(CYGPATH_W) '$(srcdir)/ipc.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_daemon_a-ipc.Tpo" "$(DEPDIR)/libelektra_daemon_a-ipc.Po"; else rm -f "$(DEPDIR)/libelektra_daemon_a-ipc.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ipc.c' object='libelektra_daemon_a-ipc.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_daemon_a_CFLAGS) $(CFLAGS) -c -o libelektra_daemon_a-ipc.obj `if test -f 'ipc.c'; then $(CYGPATH_W) 'ipc.c'; else $(CYGPATH_W) '$(srcdir)/ipc.c'; fi` libelektra_daemon_a-sig.o: sig.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_daemon_a_CFLAGS) $(CFLAGS) -MT libelektra_daemon_a-sig.o -MD -MP -MF "$(DEPDIR)/libelektra_daemon_a-sig.Tpo" -c -o libelektra_daemon_a-sig.o `test -f 'sig.c' || echo '$(srcdir)/'`sig.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_daemon_a-sig.Tpo" "$(DEPDIR)/libelektra_daemon_a-sig.Po"; else rm -f "$(DEPDIR)/libelektra_daemon_a-sig.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sig.c' object='libelektra_daemon_a-sig.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_daemon_a_CFLAGS) $(CFLAGS) -c -o libelektra_daemon_a-sig.o `test -f 'sig.c' || echo '$(srcdir)/'`sig.c libelektra_daemon_a-sig.obj: sig.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_daemon_a_CFLAGS) $(CFLAGS) -MT libelektra_daemon_a-sig.obj -MD -MP -MF "$(DEPDIR)/libelektra_daemon_a-sig.Tpo" -c -o libelektra_daemon_a-sig.obj `if test -f 'sig.c'; then $(CYGPATH_W) 'sig.c'; else $(CYGPATH_W) '$(srcdir)/sig.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_daemon_a-sig.Tpo" "$(DEPDIR)/libelektra_daemon_a-sig.Po"; else rm -f "$(DEPDIR)/libelektra_daemon_a-sig.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='sig.c' object='libelektra_daemon_a-sig.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_daemon_a_CFLAGS) $(CFLAGS) -c -o libelektra_daemon_a-sig.obj `if test -f 'sig.c'; then $(CYGPATH_W) 'sig.c'; else $(CYGPATH_W) '$(srcdir)/sig.c'; fi` libelektra_daemon_a-serial.o: serial.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_daemon_a_CFLAGS) $(CFLAGS) -MT libelektra_daemon_a-serial.o -MD -MP -MF "$(DEPDIR)/libelektra_daemon_a-serial.Tpo" -c -o libelektra_daemon_a-serial.o `test -f 'serial.c' || echo '$(srcdir)/'`serial.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_daemon_a-serial.Tpo" "$(DEPDIR)/libelektra_daemon_a-serial.Po"; else rm -f "$(DEPDIR)/libelektra_daemon_a-serial.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='serial.c' object='libelektra_daemon_a-serial.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_daemon_a_CFLAGS) $(CFLAGS) -c -o libelektra_daemon_a-serial.o `test -f 'serial.c' || echo '$(srcdir)/'`serial.c libelektra_daemon_a-serial.obj: serial.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_daemon_a_CFLAGS) $(CFLAGS) -MT libelektra_daemon_a-serial.obj -MD -MP -MF "$(DEPDIR)/libelektra_daemon_a-serial.Tpo" -c -o libelektra_daemon_a-serial.obj `if test -f 'serial.c'; then $(CYGPATH_W) 'serial.c'; else $(CYGPATH_W) '$(srcdir)/serial.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_daemon_a-serial.Tpo" "$(DEPDIR)/libelektra_daemon_a-serial.Po"; else rm -f "$(DEPDIR)/libelektra_daemon_a-serial.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='serial.c' object='libelektra_daemon_a-serial.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_daemon_a_CFLAGS) $(CFLAGS) -c -o libelektra_daemon_a-serial.obj `if test -f 'serial.c'; then $(CYGPATH_W) 'serial.c'; else $(CYGPATH_W) '$(srcdir)/serial.c'; fi` libelektra_daemon_a-serial_int.o: serial_int.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_daemon_a_CFLAGS) $(CFLAGS) -MT libelektra_daemon_a-serial_int.o -MD -MP -MF "$(DEPDIR)/libelektra_daemon_a-serial_int.Tpo" -c -o libelektra_daemon_a-serial_int.o `test -f 'serial_int.c' || echo '$(srcdir)/'`serial_int.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_daemon_a-serial_int.Tpo" "$(DEPDIR)/libelektra_daemon_a-serial_int.Po"; else rm -f "$(DEPDIR)/libelektra_daemon_a-serial_int.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='serial_int.c' object='libelektra_daemon_a-serial_int.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_daemon_a_CFLAGS) $(CFLAGS) -c -o libelektra_daemon_a-serial_int.o `test -f 'serial_int.c' || echo '$(srcdir)/'`serial_int.c libelektra_daemon_a-serial_int.obj: serial_int.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_daemon_a_CFLAGS) $(CFLAGS) -MT libelektra_daemon_a-serial_int.obj -MD -MP -MF "$(DEPDIR)/libelektra_daemon_a-serial_int.Tpo" -c -o libelektra_daemon_a-serial_int.obj `if test -f 'serial_int.c'; then $(CYGPATH_W) 'serial_int.c'; else $(CYGPATH_W) '$(srcdir)/serial_int.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_daemon_a-serial_int.Tpo" "$(DEPDIR)/libelektra_daemon_a-serial_int.Po"; else rm -f "$(DEPDIR)/libelektra_daemon_a-serial_int.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='serial_int.c' object='libelektra_daemon_a-serial_int.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_daemon_a_CFLAGS) $(CFLAGS) -c -o libelektra_daemon_a-serial_int.obj `if test -f 'serial_int.c'; then $(CYGPATH_W) 'serial_int.c'; else $(CYGPATH_W) '$(srcdir)/serial_int.c'; fi` libelektra_daemon_a-serial_string.o: serial_string.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_daemon_a_CFLAGS) $(CFLAGS) -MT libelektra_daemon_a-serial_string.o -MD -MP -MF "$(DEPDIR)/libelektra_daemon_a-serial_string.Tpo" -c -o libelektra_daemon_a-serial_string.o `test -f 'serial_string.c' || echo '$(srcdir)/'`serial_string.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_daemon_a-serial_string.Tpo" "$(DEPDIR)/libelektra_daemon_a-serial_string.Po"; else rm -f "$(DEPDIR)/libelektra_daemon_a-serial_string.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='serial_string.c' object='libelektra_daemon_a-serial_string.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_daemon_a_CFLAGS) $(CFLAGS) -c -o libelektra_daemon_a-serial_string.o `test -f 'serial_string.c' || echo '$(srcdir)/'`serial_string.c libelektra_daemon_a-serial_string.obj: serial_string.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_daemon_a_CFLAGS) $(CFLAGS) -MT libelektra_daemon_a-serial_string.obj -MD -MP -MF "$(DEPDIR)/libelektra_daemon_a-serial_string.Tpo" -c -o libelektra_daemon_a-serial_string.obj `if test -f 'serial_string.c'; then $(CYGPATH_W) 'serial_string.c'; else $(CYGPATH_W) '$(srcdir)/serial_string.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_daemon_a-serial_string.Tpo" "$(DEPDIR)/libelektra_daemon_a-serial_string.Po"; else rm -f "$(DEPDIR)/libelektra_daemon_a-serial_string.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='serial_string.c' object='libelektra_daemon_a-serial_string.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_daemon_a_CFLAGS) $(CFLAGS) -c -o libelektra_daemon_a-serial_string.obj `if test -f 'serial_string.c'; then $(CYGPATH_W) 'serial_string.c'; else $(CYGPATH_W) '$(srcdir)/serial_string.c'; fi` libelektra_daemon_a-serial_key.o: serial_key.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_daemon_a_CFLAGS) $(CFLAGS) -MT libelektra_daemon_a-serial_key.o -MD -MP -MF "$(DEPDIR)/libelektra_daemon_a-serial_key.Tpo" -c -o libelektra_daemon_a-serial_key.o `test -f 'serial_key.c' || echo '$(srcdir)/'`serial_key.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_daemon_a-serial_key.Tpo" "$(DEPDIR)/libelektra_daemon_a-serial_key.Po"; else rm -f "$(DEPDIR)/libelektra_daemon_a-serial_key.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='serial_key.c' object='libelektra_daemon_a-serial_key.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_daemon_a_CFLAGS) $(CFLAGS) -c -o libelektra_daemon_a-serial_key.o `test -f 'serial_key.c' || echo '$(srcdir)/'`serial_key.c libelektra_daemon_a-serial_key.obj: serial_key.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_daemon_a_CFLAGS) $(CFLAGS) -MT libelektra_daemon_a-serial_key.obj -MD -MP -MF "$(DEPDIR)/libelektra_daemon_a-serial_key.Tpo" -c -o libelektra_daemon_a-serial_key.obj `if test -f 'serial_key.c'; then $(CYGPATH_W) 'serial_key.c'; else $(CYGPATH_W) '$(srcdir)/serial_key.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_daemon_a-serial_key.Tpo" "$(DEPDIR)/libelektra_daemon_a-serial_key.Po"; else rm -f "$(DEPDIR)/libelektra_daemon_a-serial_key.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='serial_key.c' object='libelektra_daemon_a-serial_key.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_daemon_a_CFLAGS) $(CFLAGS) -c -o libelektra_daemon_a-serial_key.obj `if test -f 'serial_key.c'; then $(CYGPATH_W) 'serial_key.c'; else $(CYGPATH_W) '$(srcdir)/serial_key.c'; fi` libelektra_daemon_a-serial_keyset.o: serial_keyset.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_daemon_a_CFLAGS) $(CFLAGS) -MT libelektra_daemon_a-serial_keyset.o -MD -MP -MF "$(DEPDIR)/libelektra_daemon_a-serial_keyset.Tpo" -c -o libelektra_daemon_a-serial_keyset.o `test -f 'serial_keyset.c' || echo '$(srcdir)/'`serial_keyset.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_daemon_a-serial_keyset.Tpo" "$(DEPDIR)/libelektra_daemon_a-serial_keyset.Po"; else rm -f "$(DEPDIR)/libelektra_daemon_a-serial_keyset.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='serial_keyset.c' object='libelektra_daemon_a-serial_keyset.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_daemon_a_CFLAGS) $(CFLAGS) -c -o libelektra_daemon_a-serial_keyset.o `test -f 'serial_keyset.c' || echo '$(srcdir)/'`serial_keyset.c libelektra_daemon_a-serial_keyset.obj: serial_keyset.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_daemon_a_CFLAGS) $(CFLAGS) -MT libelektra_daemon_a-serial_keyset.obj -MD -MP -MF "$(DEPDIR)/libelektra_daemon_a-serial_keyset.Tpo" -c -o libelektra_daemon_a-serial_keyset.obj `if test -f 'serial_keyset.c'; then $(CYGPATH_W) 'serial_keyset.c'; else $(CYGPATH_W) '$(srcdir)/serial_keyset.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_daemon_a-serial_keyset.Tpo" "$(DEPDIR)/libelektra_daemon_a-serial_keyset.Po"; else rm -f "$(DEPDIR)/libelektra_daemon_a-serial_keyset.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='serial_keyset.c' object='libelektra_daemon_a-serial_keyset.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_daemon_a_CFLAGS) $(CFLAGS) -c -o libelektra_daemon_a-serial_keyset.obj `if test -f 'serial_keyset.c'; then $(CYGPATH_W) 'serial_keyset.c'; else $(CYGPATH_W) '$(srcdir)/serial_keyset.c'; fi` libelektra_daemon_la-daemon.lo: daemon.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_daemon_la_CFLAGS) $(CFLAGS) -MT libelektra_daemon_la-daemon.lo -MD -MP -MF "$(DEPDIR)/libelektra_daemon_la-daemon.Tpo" -c -o libelektra_daemon_la-daemon.lo `test -f 'daemon.c' || echo '$(srcdir)/'`daemon.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_daemon_la-daemon.Tpo" "$(DEPDIR)/libelektra_daemon_la-daemon.Plo"; else rm -f "$(DEPDIR)/libelektra_daemon_la-daemon.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='daemon.c' object='libelektra_daemon_la-daemon.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_daemon_la_CFLAGS) $(CFLAGS) -c -o libelektra_daemon_la-daemon.lo `test -f 'daemon.c' || echo '$(srcdir)/'`daemon.c kdbd-main.o: main.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(kdbd_CFLAGS) $(CFLAGS) -MT kdbd-main.o -MD -MP -MF "$(DEPDIR)/kdbd-main.Tpo" -c -o kdbd-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/kdbd-main.Tpo" "$(DEPDIR)/kdbd-main.Po"; else rm -f "$(DEPDIR)/kdbd-main.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='main.c' object='kdbd-main.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(kdbd_CFLAGS) $(CFLAGS) -c -o kdbd-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c kdbd-main.obj: main.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(kdbd_CFLAGS) $(CFLAGS) -MT kdbd-main.obj -MD -MP -MF "$(DEPDIR)/kdbd-main.Tpo" -c -o kdbd-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/kdbd-main.Tpo" "$(DEPDIR)/kdbd-main.Po"; else rm -f "$(DEPDIR)/kdbd-main.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='main.c' object='kdbd-main.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(kdbd_CFLAGS) $(CFLAGS) -c -o kdbd-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` kdbd-kdbd.o: kdbd.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(kdbd_CFLAGS) $(CFLAGS) -MT kdbd-kdbd.o -MD -MP -MF "$(DEPDIR)/kdbd-kdbd.Tpo" -c -o kdbd-kdbd.o `test -f 'kdbd.c' || echo '$(srcdir)/'`kdbd.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/kdbd-kdbd.Tpo" "$(DEPDIR)/kdbd-kdbd.Po"; else rm -f "$(DEPDIR)/kdbd-kdbd.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kdbd.c' object='kdbd-kdbd.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(kdbd_CFLAGS) $(CFLAGS) -c -o kdbd-kdbd.o `test -f 'kdbd.c' || echo '$(srcdir)/'`kdbd.c kdbd-kdbd.obj: kdbd.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(kdbd_CFLAGS) $(CFLAGS) -MT kdbd-kdbd.obj -MD -MP -MF "$(DEPDIR)/kdbd-kdbd.Tpo" -c -o kdbd-kdbd.obj `if test -f 'kdbd.c'; then $(CYGPATH_W) 'kdbd.c'; else $(CYGPATH_W) '$(srcdir)/kdbd.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/kdbd-kdbd.Tpo" "$(DEPDIR)/kdbd-kdbd.Po"; else rm -f "$(DEPDIR)/kdbd-kdbd.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kdbd.c' object='kdbd-kdbd.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(kdbd_CFLAGS) $(CFLAGS) -c -o kdbd-kdbd.obj `if test -f 'kdbd.c'; then $(CYGPATH_W) 'kdbd.c'; else $(CYGPATH_W) '$(srcdir)/kdbd.c'; fi` kdbd-kdb_wrapper.o: kdb_wrapper.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(kdbd_CFLAGS) $(CFLAGS) -MT kdbd-kdb_wrapper.o -MD -MP -MF "$(DEPDIR)/kdbd-kdb_wrapper.Tpo" -c -o kdbd-kdb_wrapper.o `test -f 'kdb_wrapper.c' || echo '$(srcdir)/'`kdb_wrapper.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/kdbd-kdb_wrapper.Tpo" "$(DEPDIR)/kdbd-kdb_wrapper.Po"; else rm -f "$(DEPDIR)/kdbd-kdb_wrapper.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kdb_wrapper.c' object='kdbd-kdb_wrapper.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(kdbd_CFLAGS) $(CFLAGS) -c -o kdbd-kdb_wrapper.o `test -f 'kdb_wrapper.c' || echo '$(srcdir)/'`kdb_wrapper.c kdbd-kdb_wrapper.obj: kdb_wrapper.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(kdbd_CFLAGS) $(CFLAGS) -MT kdbd-kdb_wrapper.obj -MD -MP -MF "$(DEPDIR)/kdbd-kdb_wrapper.Tpo" -c -o kdbd-kdb_wrapper.obj `if test -f 'kdb_wrapper.c'; then $(CYGPATH_W) 'kdb_wrapper.c'; else $(CYGPATH_W) '$(srcdir)/kdb_wrapper.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/kdbd-kdb_wrapper.Tpo" "$(DEPDIR)/kdbd-kdb_wrapper.Po"; else rm -f "$(DEPDIR)/kdbd-kdb_wrapper.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kdb_wrapper.c' object='kdbd-kdb_wrapper.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(kdbd_CFLAGS) $(CFLAGS) -c -o kdbd-kdb_wrapper.obj `if test -f 'kdb_wrapper.c'; then $(CYGPATH_W) 'kdb_wrapper.c'; else $(CYGPATH_W) '$(srcdir)/kdb_wrapper.c'; fi` kdbd-thread.o: thread.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(kdbd_CFLAGS) $(CFLAGS) -MT kdbd-thread.o -MD -MP -MF "$(DEPDIR)/kdbd-thread.Tpo" -c -o kdbd-thread.o `test -f 'thread.c' || echo '$(srcdir)/'`thread.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/kdbd-thread.Tpo" "$(DEPDIR)/kdbd-thread.Po"; else rm -f "$(DEPDIR)/kdbd-thread.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='thread.c' object='kdbd-thread.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(kdbd_CFLAGS) $(CFLAGS) -c -o kdbd-thread.o `test -f 'thread.c' || echo '$(srcdir)/'`thread.c kdbd-thread.obj: thread.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(kdbd_CFLAGS) $(CFLAGS) -MT kdbd-thread.obj -MD -MP -MF "$(DEPDIR)/kdbd-thread.Tpo" -c -o kdbd-thread.obj `if test -f 'thread.c'; then $(CYGPATH_W) 'thread.c'; else $(CYGPATH_W) '$(srcdir)/thread.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/kdbd-thread.Tpo" "$(DEPDIR)/kdbd-thread.Po"; else rm -f "$(DEPDIR)/kdbd-thread.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='thread.c' object='kdbd-thread.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(kdbd_CFLAGS) $(CFLAGS) -c -o kdbd-thread.obj `if test -f 'thread.c'; then $(CYGPATH_W) 'thread.c'; else $(CYGPATH_W) '$(srcdir)/thread.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(backenddir)" "$(DESTDIR)$(sbindir)"; 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: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_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-backendLTLIBRARIES clean-generic clean-libtool \ clean-noinstLIBRARIES clean-noinstLTLIBRARIES \ clean-sbinPROGRAMS mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-backendLTLIBRARIES install-exec-am: install-sbinPROGRAMS install-info: install-info-am install-man: 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-backendLTLIBRARIES uninstall-info-am \ uninstall-sbinPROGRAMS .PHONY: CTAGS GTAGS all all-am check check-am clean \ clean-backendLTLIBRARIES clean-generic clean-libtool \ clean-noinstLIBRARIES clean-noinstLTLIBRARIES \ clean-sbinPROGRAMS ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-backendLTLIBRARIES install-data install-data-am \ install-exec install-exec-am install-info install-info-am \ install-man install-sbinPROGRAMS install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-backendLTLIBRARIES \ uninstall-info-am uninstall-sbinPROGRAMS # kdbd_static_SOURCES = main.c kdbd.g kdbd.c kdb_wrapper.h kdb_wrapper.c thread.h thread.c # kdbd_static_CFLAGS = -DELEKTRA_STATIC -DDEFAULT_DBACKEND=\"$(default_dbackend)\" # kdbd_static_LDADD = @privatelibs@ libproto.la ../../libelektra/libelektra.a -lpthread ../../libelektra/libelektra.la: cd ../../libelektra/ && $(MAKE) libelektra.la # ../../libelektra/libelektra.a: # cd ../../libelektra/ && $(MAKE) libelektra.a # 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: elektra-0.7.1/src/backends/daemon/daemon.c0000644000076400001440000004153111361542116015306 00000000000000/*************************************************************************** daemon.c - Backend that makes RPCs to a kdb daemon ------------------- begin : Mon Dec 26 2004 copyright : (C) 2005 by Yannick Lecaillez email : yl@itioweb.com ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ /* Subversion stuff $Id$ */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif #include #include #ifdef HAVE_INTTYPES_H #include #endif #include "kdbbackend.h" #include "kdbprivate.h" /* Backend specific includes */ #include "datatype.h" #include "protocol.h" #include "message.h" #include "ipc.h" #include "sig.h" #define BACKENDNAME "daemon" #define REPLY_TIMEOUT 5 #ifndef SOCKET_NAME #define SOCKET_NAME "/var/run/kdbd/elektra.sock" #endif /**Some systems have even longer pathnames */ #ifdef PATH_MAX #define MAX_PATH_LENGTH PATH_MAX /**This value is garanteed on any Posix system */ #elif __USE_POSIX #define MAX_PATH_LENGTH _POSIX_PATH_MAX #else #define MAX_PATH_LENGTH 4096 #endif typedef struct { int socketfd; } DaemonBackendData; static Message *callDaemon(int socketfd, Message *request) { Message *reply; int ret; assert(request != NULL); if ( protocolSendMessage(socketfd, request) == -1 ) { fprintf(stderr, "callDaemon(): Error sending request\n"); return NULL; } /* Wait for a reply for 5 secondes */ reply = protocolReadMessage(socketfd); if ( reply == NULL ) { fprintf(stderr, "callDaemon(): Error reading message\n"); messageDel(reply); return NULL; } /* Check for Internal error */ if ( messageGetProcedure(reply) == INTERNAL_ERROR ) { messageExtractArgs(reply, DATATYPE_INTEGER, &ret); fprintf(stderr, "callDaemon(): An error occured in kdbd: %d.\n", ret); messageDel(reply); return NULL; } return reply; } /** * Initialize the backend. * This is the first method kdbOpenBackend() calls after dynamically loading * the backend library. * * This method is responsible of: * - backend's specific configuration gathering * - all backend's internal structs initialization * - initial setup of all I/O details such as opening a file, connecting to a * database, etc * * @return 0 on success, anything else otherwise. * @see kdbOpenBackend() * @see kdbOpen() * @ingroup backend */ int kdbOpen_daemon(KDB *handle) { DaemonBackendData *data; Message *request, *reply; unsigned long umask; char *real_backend,*tmp; int ret; data = (DaemonBackendData *) malloc(sizeof(DaemonBackendData)); if ( data == NULL ) return 1; memset(data, 0, sizeof(DaemonBackendData)); sig_ignore(sig_pipe); data->socketfd = ipc_stream(); if ( data->socketfd == -1 ) { perror("libelektra-daemon"); free(data); return 1; } if ( ipc_connect(data->socketfd, SOCKET_NAME) == -1 ) { perror("libelektra-daemon"); close(data->socketfd); free(data); return 1; } ndelay_off(data->socketfd); /* Prepare request */ umask = kdbhGetUMask(handle); request = messageNew(MESSAGE_REQUEST, KDB_BE_OPEN, DATATYPE_STRING, kdbhGetUserName(handle), DATATYPE_ULONG, &umask, DATATYPE_LAST); if ( request == NULL ) { fprintf(stderr, "Error building request\n"); close(data->socketfd); free(data); messageDel(request); return 1; } reply = callDaemon(data->socketfd, request); if ( reply == NULL ) { close(data->socketfd); free(data); return 1; } if ( messageExtractArgs(reply, DATATYPE_INTEGER, &ret, DATATYPE_INTEGER, &errno, DATATYPE_STRING, &real_backend, DATATYPE_LAST) ) { fprintf(stderr, "Error extracting args\n"); close(data->socketfd); messageDel(reply); free(real_backend); free(data); return 1; } /* Get the backend name being used by the daemon from the reply... */ tmp=malloc(strlen(BACKENDNAME) + 1 + kdbiStrLen(real_backend)); sprintf(tmp,BACKENDNAME"+%s",real_backend); kdbhSetBackendName(handle, tmp); free(real_backend); messageDel(reply); kdbhSetBackendData(handle, data); return ret; } /** * All finalization logic of the backend should go here. * * Called prior to unloading the backend dynamic module. Should ensure that no * functions or static/global variables from the module will ever be accessed again. * Should free any memory that the backend no longer needs. * After this call, libelektra.so will unload the backend library, so this is * the point to shutdown any affairs with the storage. * * @return 0 on success, anything else otherwise. * @see kdbClose() * @ingroup backend */ int kdbClose_daemon(KDB *handle) { DaemonBackendData *data; Message *request, *reply; int ret = 0; data = (DaemonBackendData *) kdbhGetBackendData(handle); if ( data == NULL ) return 0; /* Prepare request */ request = messageNew(MESSAGE_REQUEST, KDB_BE_CLOSE, DATATYPE_LAST); if ( request == NULL ) { perror("kdbClose_daemon"); return 1; } reply = callDaemon(data->socketfd, request); if ( reply == NULL ) { kdbhSetBackendData(handle, NULL); close(data->socketfd); free(data); return 1; } /* Get reply value */ if ( messageExtractArgs(reply, DATATYPE_INTEGER, &ret, DATATYPE_INTEGER, &errno, DATATYPE_LAST) == -1 ) { kdbhSetBackendData(handle, NULL); close(data->socketfd); free(data); messageDel(reply); return -1; } messageDel(reply); kdbhSetBackendData(handle, NULL); close(data->socketfd); free(data); return ret; } /** * Implementation for kdbStatKey() method. * * This method is responsible of: * - make necessary I/O to retrieve @p key->name's metadata * - fill the @p key struct with its metadata * * @see kdbStatKey() for expected behavior. * @ingroup backend */ int kdbStatKey_daemon(KDB *handle, Key *key) { DaemonBackendData *data; Message *request, *reply; int ret; data = (DaemonBackendData *) kdbhGetBackendData(handle); if ( data == NULL ) return -1; request = messageNew(MESSAGE_REQUEST, KDB_BE_STATKEY, DATATYPE_KEY, key, DATATYPE_LAST); if ( request == NULL ) { perror("kdbStatKey_daemon"); return -1; } reply = callDaemon(data->socketfd, request); if ( reply == NULL ) { return -1; } /* Get result */ if ( messageExtractArgs(reply, DATATYPE_INTEGER, &ret, DATATYPE_INTEGER, &errno, DATATYPE_KEY, key, DATATYPE_LAST) ) { fprintf(stderr, "Error extracting ARGS\n"); messageDel(reply); return 1; } messageDel(reply); return ret; } /** * Implementation for kdbGetKey() method. * * This method is responsible of: * - make necessary I/O to retrieve all @p key->name's value and metadata * - fill the @p key struct with its value and metadata * * @see kdbGetKey() for expected behavior. * @ingroup backend */ int kdbGetKey_daemon(KDB *handle, Key *key) { DaemonBackendData *data; Message *request, *reply; int ret; data = (DaemonBackendData *) kdbhGetBackendData(handle); if ( data == NULL ) return 1; /* Prepare request */ request = messageNew(MESSAGE_REQUEST, KDB_BE_GETKEY, DATATYPE_KEY, key, DATATYPE_LAST); if ( request == NULL ) { perror("kdbGetKey_daemon"); return -1; } reply = callDaemon(data->socketfd, request); if ( reply == NULL ) { return -1; } /* Get result */ if ( messageExtractArgs(reply, DATATYPE_INTEGER, &ret, DATATYPE_INTEGER, &errno, DATATYPE_KEY, key, DATATYPE_LAST) ) { fprintf(stderr, "Error extracting ARGS\n"); messageDel(reply); return -1; } messageDel(reply); return ret; } /** * Implementation for kdbSetKey() method. * * This method is responsible of: * - check the existence of @p key->name on persistent storage * - prepare the backend to receive a new or updated key * - use value and metadata from @p key to store them in the backend storage * - fill the @p key struct with its value and metadata * * @see kdbSetKey() for expected behavior. * @ingroup backend */ int kdbSetKey_daemon(KDB *handle, Key *key) { DaemonBackendData *data; Message *request, *reply; int ret; data = (DaemonBackendData *) kdbhGetBackendData(handle); if ( data == NULL ) return 1; /* Prepare request */ request = messageNew(MESSAGE_REQUEST, KDB_BE_SETKEY, DATATYPE_KEY, key, DATATYPE_LAST); if ( request == NULL ) { perror("kdbSetKey_daemon"); return -1; } reply = callDaemon(data->socketfd, request); if ( reply == NULL ) { return 1; } /* Get result */ if ( messageExtractArgs(reply, DATATYPE_INTEGER, &ret, DATATYPE_INTEGER, &errno, DATATYPE_KEY, key, DATATYPE_LAST) ) { fprintf(stderr, "Error extracting ARGS\n"); messageDel(reply); return -1; } messageDel(reply); return ret; } /** * Implementation for kdbRename() method. * * @see kdbRename() for expected behavior. * @ingroup backend */ int kdbRename_daemon(KDB *handle, Key *key, const char *newName) { DaemonBackendData *data; Message *request, *reply; int ret; data = (DaemonBackendData *) kdbhGetBackendData(handle); if ( data == NULL ) return 1; /* Prepare request */ request = messageNew(MESSAGE_REQUEST, KDB_BE_RENAME, DATATYPE_KEY, key, DATATYPE_STRING, newName, DATATYPE_LAST); if ( request == NULL ) { perror("kdbRename_daemon"); return -1; } reply = callDaemon(data->socketfd, request); if ( reply == NULL ) { return 1; } /* Get result */ if ( messageExtractArgs(reply, DATATYPE_INTEGER, &ret, DATATYPE_INTEGER, &errno, DATATYPE_KEY, key, DATATYPE_LAST) ) { fprintf(stderr, "Error extracting ARGS\n"); messageDel(reply); return -1; } messageDel(reply); return ret; } /** * Implementation for kdbRemoveKey() method. * * @see kdbRemove() for expected behavior. * @ingroup backend */ int kdbRemoveKey_daemon(KDB *handle, const Key *key) { Key copy; DaemonBackendData *data; Message *request, *reply; int ret; data = (DaemonBackendData *) kdbhGetBackendData(handle); if ( data == NULL ) return 1; /* Prepare request */ keyInit(©); if ( keyDup(key, ©) ) { keyClose(©); return -1; } request = messageNew(MESSAGE_REQUEST, KDB_BE_REMOVEKEY, DATATYPE_KEY, ©, DATATYPE_LAST); keyClose(©); if ( request == NULL ) { perror("kdbRemoveKey_daemon"); return 1; } reply = callDaemon(data->socketfd, request); if ( reply == NULL ) { return -1; } /* Get result */ if ( messageExtractArgs(reply, DATATYPE_INTEGER, &ret, DATATYPE_INTEGER, &errno, DATATYPE_LAST) ) { fprintf(stderr, "Error extracting ARGS\n"); messageDel(reply); return -1; } messageDel(reply); return ret; } /** * Implementation for kdbGetKeyChildKeys() method. * * @see kdbGetKeyChildKeys() for expected behavior. * @ingroup backend */ ssize_t kdbGetKeyChildKeys_daemon(KDB *handle, const Key *parentKey, KeySet *returned, unsigned long options) { Key copy; DaemonBackendData *data; Message *request, *reply; int ret; data = (DaemonBackendData *) kdbhGetBackendData(handle); if ( data == NULL ) return 1; /* Prepare request */ keyInit(©); if ( keyDup(parentKey, ©) ) { keyClose(©); return -1; } request = messageNew(MESSAGE_REQUEST, KDB_BE_GETCHILD, DATATYPE_KEY, ©, DATATYPE_ULONG, &options, DATATYPE_LAST); keyClose(©); if ( request == NULL ) { perror("kdbGetKeyChildKeys_daemon"); return -1; } reply = callDaemon(data->socketfd, request); if ( reply == NULL ) { return -1; } /* Get result */ if ( messageExtractArgs(reply, DATATYPE_INTEGER, &ret, DATATYPE_INTEGER, &errno, DATATYPE_KEYSET, returned, DATATYPE_LAST) ) { fprintf(stderr, "Error extracting ARGS\n"); messageDel(reply); return -1; } messageDel(reply); return ret; } /** * Implementation for kdbSetKeys() method. * * The implementation of this method is optional, and a builtin, probablly * inefficient implementation can be explicitly used when exporting the * backend with kdbBackendExport(), using kdbSetKeys_default(). * * @see kdbSetKeys() for expected behavior. * @ingroup backend */ int kdbSetKeys_daemon(KDB *handle, KeySet *ks) { DaemonBackendData *data; Message *request, *reply; int ret; data = (DaemonBackendData *) kdbhGetBackendData(handle); if ( data == NULL ) return 1; /* Prepare request */ request = messageNew(MESSAGE_REQUEST, KDB_BE_SETKEYS, DATATYPE_KEYSET, ks, DATATYPE_LAST); if ( request == NULL ) { perror("kdbSetKeys_daemon"); return -1; } reply = callDaemon(data->socketfd, request); if ( reply == NULL ) { return -1; } /* Get result */ if ( messageExtractArgs(reply, DATATYPE_INTEGER, &ret, DATATYPE_INTEGER, &errno, DATATYPE_KEYSET, ks, DATATYPE_LAST) ) { fprintf(stderr, "Error extracting ARGS\n"); messageDel(reply); return -1; } messageDel(reply); return ret; } /** * The implementation of this method is optional. * The builtin inefficient implementation will use kdbGetKey() for each * key inside @p interests. * * @see kdbMonitorKeys() for expected behavior. * @ingroup backend */ u_int32_t kdbMonitorKeys_daemon(KDB *handle, KeySet *interests, u_int32_t diffMask, unsigned long iterations, unsigned sleep) { DaemonBackendData *data; Message *request, *reply; unsigned long monitorRet; data = (DaemonBackendData *) kdbhGetBackendData(handle); if ( data == NULL ) return 1; /* Prepare request */ request = messageNew(MESSAGE_REQUEST, KDB_BE_MONITORKEYS, DATATYPE_KEYSET, interests, DATATYPE_ULONG, &diffMask, DATATYPE_ULONG, &iterations, DATATYPE_ULONG, &sleep, DATATYPE_LAST); if ( request == NULL ) { perror("kdbMonitorKeys_daemon"); return 1; } reply = callDaemon(data->socketfd, request); if ( reply == NULL ) { return -1; } /* Get result */ if ( messageExtractArgs(reply, DATATYPE_ULONG, &monitorRet, DATATYPE_INTEGER, &errno, DATATYPE_KEYSET, interests, DATATYPE_LAST) ) { fprintf(stderr, "Error extracting ARGS\n"); messageDel(reply); return -1; } messageDel(reply); return monitorRet; } /** * * The implementation of this method is optional. * The builtin inefficient implementation will use kdbGetKey() for * @p interest. * * @see kdbMonitorKey() for expected behavior. * @ingroup backend */ u_int32_t kdbMonitorKey_daemon(KDB *handle, Key *interest, u_int32_t diffMask, unsigned long iterations, unsigned sleep) { DaemonBackendData *data; Message *request, *reply; unsigned long monitorRet; data = (DaemonBackendData *) kdbhGetBackendData(handle); if ( data == NULL ) return 1; /* Prepare request */ request = messageNew(MESSAGE_REQUEST, KDB_BE_MONITORKEY, DATATYPE_KEY, interest, DATATYPE_ULONG, &diffMask, DATATYPE_ULONG, &iterations, DATATYPE_ULONG, &sleep, DATATYPE_LAST); if ( request == NULL ) { perror("kdbMonitorKey_daemon"); return 1; } reply = callDaemon(data->socketfd, request); /* Get result */ if ( messageExtractArgs(reply, DATATYPE_ULONG, &monitorRet, DATATYPE_INTEGER, &errno, DATATYPE_KEY, interest, DATATYPE_LAST) ) { fprintf(stderr, "Error extracting ARGS\n"); messageDel(reply); return -1; } messageDel(reply); return monitorRet; } /** * All KDB methods implemented by the backend can have random names, except * kdbBackendFactory(). This is the single symbol that will be looked up * when loading the backend, and the first method of the backend * implementation that will be called. * * Its purpose is to "publish" the exported methods for libelektra.so. The * implementation inside the provided skeleton is usually enough: simply * call kdbBackendExport() with all methods that must be exported. * * @return whatever kdbBackendExport() returns * @see kdbBackendExport() for an example * @see kdbOpenBackend() * @ingroup backend */ KDBEXPORT(daemon) { return kdbBackendExport(BACKENDNAME, KDB_BE_OPEN, &kdbOpen_daemon, KDB_BE_CLOSE, &kdbClose_daemon, KDB_BE_GETKEY, &kdbGetKey_daemon, KDB_BE_SETKEY, &kdbSetKey_daemon, KDB_BE_STATKEY, &kdbStatKey_daemon, KDB_BE_RENAME, &kdbRename_daemon, KDB_BE_REMOVEKEY, &kdbRemoveKey_daemon, KDB_BE_GETCHILD, &kdbGetKeyChildKeys_daemon, KDB_BE_MONITORKEY, &kdbMonitorKey_daemon, KDB_BE_MONITORKEYS, &kdbMonitorKeys_daemon, KDB_BE_SETKEYS, &kdbSetKeys_daemon, KDB_BE_END); } elektra-0.7.1/src/backends/daemon/datatype.h0000644000076400001440000000270111361542116015657 00000000000000/*************************************************************************** datatype.h - Defines argument datatypes ------------------- begin : Sun Mar 12 2006 copyright : (C) 2006 by Yannick Lecaillez, Avi Alkalay email : avi@unix.sh ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ /* Subversion stuff $Id$ */ #ifndef DATATYPE_H #define DATATYPE_H /** * Arguments type * * Type accepted in @link message Message@endlink * * @ingroup message * @see messageNew() * @see messageExtractArgs() */ typedef enum { DATATYPE_UNKNOW = 1, /*!< Unknown, not initialized */ DATATYPE_INTEGER, /*!< "int" C type */ DATATYPE_ULONG, /*!< "unsigned long" C type */ DATATYPE_STRING, /*!< "char *" C type */ DATATYPE_KEY, /*!< libelektra Key */ DATATYPE_KEYSET, /*!< libelektra KeySet */ DATATYPE_LAST /*!< Must be the last */ } DataType; #endif /* DATATYPE_H */ elektra-0.7.1/src/backends/daemon/ipc.c0000644000076400001440000000711011361542116014611 00000000000000/*************************************************************************** kdb_wrapper.c - The server for the daemon backend ------------------- copyright : (C) 2006 by Yannick Lecaillez email : sizon5@gmail.com ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ /* Subversion stuff $Id$ */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #ifdef HAVE_UNISTD_H #include #endif #include #include #include #include #ifdef HAVE_SYS_TYPES_H #include #endif #include "ipc.h" #define IPCPATH_MAX 100 int ipc_stream(void) { int s; s = socket(AF_UNIX,SOCK_STREAM,0); if (s == -1) return -1; if (ndelay_on(s) == -1) { close(s); return -1; } return s; } static int ipc_bindit(int s,const char *p,int del) { struct sockaddr_un sa; unsigned int l; l = strlen(p); if (l > IPCPATH_MAX) { errno = EISDIR; return -1; } memset(&sa, 0, sizeof(sa)); sa.sun_family = AF_UNIX; memcpy(sa.sun_path, p, l); if (del) unlink(sa.sun_path); return bind(s,(struct sockaddr *) &sa,sizeof sa); } int ipc_bind(int s,const char *p) { return ipc_bindit(s,p,0); } int ipc_bind_reuse(int s,const char *p) { return ipc_bindit(s,p,1); } int ipc_accept(int s,char *p,int l,int *trunc) { int fd; struct sockaddr_un sa; socklen_t dummy = sizeof sa; memset(&sa, 0, sizeof(sa)); fd = accept(s,(struct sockaddr *) &sa,&dummy); if (fd == -1) return -1; memset(sa.sun_path, 0, dummy); *trunc = 1; if (!l) return fd; if (l < (dummy + 1)) dummy = l - 1; else *trunc = 0; memcpy(p, sa.sun_path, dummy); p[dummy] = 0; return fd; } int ipc_local(int s,char *p,int l,int *trunc) { struct sockaddr_un sa; socklen_t dummy = sizeof sa; memset(&sa, 0, sizeof(sa)); if (getsockname(s,(struct sockaddr *) &sa,&dummy) == -1) return -1; memset(sa.sun_path, 0, dummy); *trunc = 1; if (!l) return 0; if (l < (dummy + 1)) dummy = l - 1; else *trunc = 0; memcpy(p, sa.sun_path, dummy); p[dummy] = 0; return 0; } int ipc_connect(int s,const char *p) { struct sockaddr_un sa; unsigned int l; l = strlen(p); if (l > IPCPATH_MAX) { return -1; } memset(&sa, 0, sizeof(sa)); sa.sun_family = AF_UNIX; memcpy(sa.sun_path, p, l); if (connect(s,(struct sockaddr *) &sa,sizeof sa) == -1) return -1; if (ndelay_off(s) == -1) return -1; return 0; } int ipc_listen(int s,int backlog) { return listen(s,backlog); } int ndelay_on(int fd) { return fcntl(fd,F_SETFL,fcntl(fd,F_GETFL,0) | O_NONBLOCK); } int ndelay_off(int fd) { return fcntl(fd,F_SETFL,fcntl(fd,F_GETFL,0) & ~O_NONBLOCK); } int ipc_eid(int s,uid_t *u,gid_t *g, pid_t*p) { uid_t dummyu; gid_t dummyg; pid_t dummyp; if (getpeereid(s,&dummyu,&dummyg,&dummyp) == -1) return -1; *u = dummyu; *g = dummyg; *p = dummyp; return 0; } int getpeereid(int s,uid_t *u,gid_t *g,pid_t *p) { struct ucred dummy = {0}; socklen_t len = sizeof(dummy); if (getsockopt(s,SOL_SOCKET,SO_PEERCRED,&dummy,&len) == -1) return -1; *u = dummy.uid; *g = dummy.gid; *p = dummy.pid; return 0; } elektra-0.7.1/src/backends/daemon/ipc.h0000644000076400001440000000240111361542116014614 00000000000000/*************************************************************************** ipc.h - Interprocess communication methods ------------------- copyright : (C) 2006 by Yannick Lecaillez email : sizon5@gmail.com ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ /* Subversion stuff $Id$ */ int ipc_connect(int s,const char *p); int ipc_stream(void); int ipc_bind(int s,const char *p); int ipc_bind_reuse(int s,const char *p); int ipc_accept(int s,char *p,int l,int *trunc); int ipc_local(int s,char *p,int l,int *trunc); int ipc_listen(int s,int backlog); int ipc_eid(int s,uid_t *u,gid_t *g, pid_t *p); int ndelay_on(int fd); int ndelay_off(int fd); int getpeereid(int s,uid_t *u,gid_t *g,pid_t *p); elektra-0.7.1/src/backends/daemon/kdb_wrapper.c0000644000076400001440000000744211361542116016346 00000000000000/*************************************************************************** kdb_wrapper.c - The server for the daemon backend ------------------- copyright : (C) 2006 by Yannick Lecaillez email : sizon5@gmail.com ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ /* Subversion stuff $Id$ */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_STDLIB_H #include /* malloc */ #endif #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_PWD_H #include #endif #include "kdbbackend.h" #include "datatype.h" #include "message.h" Message *wrapper_kdbStatKey(KDB *handle, Message *request) { Key key; int error, ret; Message *reply; keyInit(&key); if ( messageExtractArgs(request, DATATYPE_KEY, &key, DATATYPE_LAST) ) { keyClose(&key); return NULL; } ret = kdbStatKey(handle, &key); error = errno; reply = messageNew(MESSAGE_REPLY, KDB_BE_STATKEY, DATATYPE_INTEGER, &ret, DATATYPE_INTEGER, &error, DATATYPE_KEY, &key, DATATYPE_LAST); keyClose(&key); return reply; } Message *wrapper_kdbGetKey(KDB *handle, Message *request) { Key key; int error, ret; Message *reply; keyInit(&key); error = 0; if ( messageExtractArgs(request, DATATYPE_KEY, &key, DATATYPE_LAST) ) { keyClose(&key); return NULL; } ret = kdbGetKey(handle, &key); error = errno; reply = messageNew(MESSAGE_REPLY, KDB_BE_GETKEY, DATATYPE_INTEGER, &ret, DATATYPE_INTEGER, &error, DATATYPE_KEY, &key, DATATYPE_LAST); keyClose(&key); return reply; } Message *wrapper_kdbSetKey(KDB *handle, void *request) { Key key; int error, ret; Message *reply; keyInit(&key); error = 0; if ( messageExtractArgs(request, DATATYPE_KEY, &key, DATATYPE_LAST) ) { keyClose(&key); return NULL; } ret = kdbSetKey(handle, &key); error = errno; reply = messageNew(MESSAGE_REPLY, KDB_BE_SETKEY, DATATYPE_INTEGER, &ret, DATATYPE_INTEGER, &error, DATATYPE_KEY, &key, DATATYPE_LAST); keyClose(&key); return reply; } Message *wrapper_kdbSetKeys(KDB *handle, void *request) { KeySet *ks; int error, ret; Message *reply; if ( (ks = ksNew()) == NULL ) return NULL; if ( messageExtractArgs(request, DATATYPE_KEYSET, ks, DATATYPE_LAST) ) { ksDel(ks); return NULL; } ret = kdbSetKeys(handle, ks); error = errno; reply = messageNew(MESSAGE_REPLY, KDB_BE_SETKEYS, DATATYPE_INTEGER, &ret, DATATYPE_INTEGER, &error, DATATYPE_KEYSET, ks, DATATYPE_LAST); ksDel(ks); return reply; } Message *wrapper_kdbGetChild(KDB *handle, Message *request) { Key parentKey; KeySet *ks; int error, ret; unsigned long options; Message *reply; keyInit(&parentKey); if ( messageExtractArgs(request, DATATYPE_KEY, &parentKey, DATATYPE_ULONG, &options, DATATYPE_LAST) ) { keyClose(&parentKey); return NULL; } ks = ksNew(); ret = kdbGetKeyChildKeys(handle, &parentKey, ks, options); error = errno; keyClose(&parentKey); reply = messageNew(MESSAGE_REPLY, KDB_BE_GETCHILD, DATATYPE_INTEGER, &ret, DATATYPE_INTEGER, &error, DATATYPE_KEYSET, ks, DATATYPE_LAST); ksDel(ks); return reply; } elektra-0.7.1/src/backends/daemon/kdb_wrapper.h0000644000076400001440000000307411361542116016350 00000000000000/*************************************************************************** kdb_wrapper.h - The server for the daemon backend ------------------- copyright : (C) 2006 by Yannick Lecaillez email : sizon5@gmail.com ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ /* Subversion stuff $Id$ */ #include "message.h" Message *wrapper_kdbOpen(KDB *handle, Message *request, uid_t remoteeuid, gid_t remoteegid); Message *wrapper_kdbClose(KDB *handle, Message *request); Message *wrapper_kdbStatKey(KDB *handle, Message *request); Message *wrapper_kdbGetKey(KDB *handle, Message *request); Message *wrapper_kdbSetKey(KDB *handle, Message *request); Message *wrapper_kdbSetKeys(KDB *handle, Message *request); Message *wrapper_kdbRename(KDB *handle, Message *request); Message *wrapper_kdbRemoveKey(KDB *handle, Message *request); Message *wrapper_kdbGetChild(KDB *handle, Message *request); Message *wrapper_kdbMonitorKey(KDB *handle, Message *request); Message *wrapper_kdbMonitorKeys(KDB *handle, Message *request); elektra-0.7.1/src/backends/daemon/kdbd.c0000644000076400001440000000743211361542116014751 00000000000000/*************************************************************************** kdbd.c - The server for the daemon backend ------------------- copyright : (C) 2006 by Yannick Lecaillez email : sizon5@gmail.com ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ /* Subversion stuff $Id$ */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "kdbbackend.h" #include "protocol.h" #include "message.h" #include "kdb_wrapper.h" #include "ipc.h" #include "thread.h" static Message *processRequest(Message *request, KDB *handle, uid_t remoteeuid, gid_t remoteegid); static Message *processRequest(Message *request, KDB *handle, uid_t remoteeuid, gid_t remoteegid) { Message *reply; int msgType, procedure; msgType = messageGetType(request); if ( msgType != MESSAGE_REQUEST ) { fprintf(stderr, "processRequest(): Received a non-request message.\n"); return NULL; } procedure = messageGetProcedure(request); switch(procedure) { /* case KDB_BE_OPEN: reply = wrapper_kdbOpen(handle, request, remoteeuid, remoteegid); break; case KDB_BE_CLOSE: reply = wrapper_kdbClose(handle, request); break;*/ case KDB_BE_STATKEY: reply = wrapper_kdbStatKey(handle, request); break; case KDB_BE_GETKEY: reply = wrapper_kdbGetKey(handle, request); break; case KDB_BE_SETKEY: reply = wrapper_kdbSetKey(handle, request); break; case KDB_BE_SETKEYS: reply = wrapper_kdbSetKeys(handle, request); break; case KDB_BE_GETCHILD: reply = wrapper_kdbGetChild(handle, request); break; default: reply = NULL; } if ( reply == NULL ) { /* Internat error from wrapper */ fprintf(stderr, "Internal error\n"); reply = messageNew(MESSAGE_REPLY, INTERNAL_ERROR, DATATYPE_INTEGER, &errno, DATATYPE_LAST); if ( reply == NULL ) fprintf(stderr, "An internal error caused a fatal error. Client will be confused :-(.\n"); } return reply; } int kdbd(void *pIntThreadHandle) { KDB *handle; int threadHandle, socketFd; Message *request, *reply; uid_t remoteeuid; gid_t remoteegid; pid_t remotepid; int closed; handle = kdbOpen(); pthread_cleanup_push(threadExit, pIntThreadHandle); threadHandle = *((int *) pIntThreadHandle); if ( (socketFd = threadGetSocket(threadHandle)) == -1 ) { fprintf(stderr, "Can't get socket :-(\n"); return 1; } if ( ipc_eid(socketFd, &remoteeuid, &remoteegid, &remotepid) == -1 ) { perror("kdbd"); return 1; } fprintf(stderr, "Thread %ld launched to serve PID %d (euid=%d/egid=%d)\n", pthread_self(), remotepid, remoteeuid, remoteegid); closed = 0; while ( !closed ) { request = protocolReadMessage(socketFd); if ( request == NULL ) { if ( (errno == EPIPE) || (errno == EINVAL) ) { /* Client closed the connection or * malformed request */ messageDel(request); return 1; } else { /* They are probably some usefull errno * to check here ... */ continue; } } closed = (messageGetProcedure(request) == KDB_BE_CLOSE); reply = processRequest(request, &handle, remoteeuid, remoteegid); messageDel(request); protocolSendMessage(socketFd, reply); messageDel(reply); } pthread_cleanup_pop(1); kdbClose (handle); return 0; } elektra-0.7.1/src/backends/daemon/kdbd.h0000644000076400001440000000166111361542116014754 00000000000000/*************************************************************************** kdbd.h - The server for the daemon backend ------------------- begin : Mon Dec 26 2004 copyright : (C) 2005 by Yannick Lecaillez email : yl@itioweb.com ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ /* Subversion stuff $Id$ */ void *kdbd(void *pIntThreadHandle); elektra-0.7.1/src/backends/daemon/main.c0000644000076400001440000000577111361542116014775 00000000000000/*************************************************************************** kdbd.c - The server for the daemon backend ------------------- begin : Mon Dec 26 2004 copyright : (C) 2005 by Yannick Lecaillez email : yl@itioweb.com ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ /* Subversion stuff $Id$ */ #if HAVE_CONFIG_H #include "config.h" #endif #include #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_STDLIB_H #include /* for exit() */ #endif #include #ifdef HAVE_SYS_TYPES_H #include #endif #include #include #include "sig.h" #include "ipc.h" #include "thread.h" #include "kdbd.h" #ifndef SOCKET_NAME #define SOCKET_NAME "/var/run/kdbd/elektra.sock" #endif int numchildren = 0; int limit = 20; char remotepath[512]; void printstatus(void) { fprintf(stdout, "kdbd: status: %d/%d\n", numchildren, limit); } int wait_nohang(int *wstat) { #ifdef HASWAITPID return waitpid(-1,wstat,WNOHANG); #else return wait3(wstat,WNOHANG,(struct rusage *) 0); #endif } void sigterm() { unlink(SOCKET_NAME); unlink("/var/run/kdbd/kdbd.pid"); exit(0); } void sigchld() { int wstat; int pid; while ((pid = wait_nohang(&wstat)) > 0) { fprintf(stdout, "kdbd: end %d status %d\n", pid, wstat); if (numchildren) --numchildren; printstatus(); } } int main(int argc, char **argv) { mode_t m; int t, s; int trunc; pid_t pid; /* Uncomment setuid() call if the demon executable file is +s */ /* setuid(0); */ if (pid=fork()) { /* The parent. */ /* Log child pid and quit. */ FILE *pidf; pidf=fopen("/var/run/kdbd/kdbd.pid","w"); fprintf(pidf,"%d",pid); fclose(pidf); exit(0); } /* force a superuniversal modern charset: UTF-8 */ putenv("LANG=en_US.UTF-8"); /* sig_block(sig_child); sig_catch(sig_child,sigchld); sig_catch(sig_term,sigterm); sig_ignore(sig_pipe); */ s = ipc_stream(); if ( s == -1 ) { perror(argv[0]); return 1; } m = umask(0); if ( ipc_bind_reuse(s, SOCKET_NAME) == -1 ) { perror(argv[0]); return 1; } umask(m); if ( ipc_local(s, 0, 0, &trunc) == -1 ) { perror(argv[0]); return 1; } if (ipc_listen(s, 20) == -1) { perror(argv[0]); return 1; } ndelay_off(s); /* fprintf(stderr,"uid=%d, euid=%d\n",getuid(),geteuid()); */ for(;;) { t = ipc_accept(s,remotepath,sizeof(remotepath),&trunc); if (t == -1) { perror("kdbd"); continue; } threadCreate(t, kdbd); } } elektra-0.7.1/src/backends/daemon/message.c0000644000076400001440000001532011361542116015464 00000000000000/*************************************************************************** message.c - Class for a protocol messages ------------------- begin : Sun Mar 12 2006 copyright : (C) 2006 by Yannick Lecaillez, Avi Alkalay email : avi@unix.sh ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ /*************************************************************************** * * * Class for messages, to be passed over a protocol line. * * * ***************************************************************************/ /* Subversion stuff $Id$ */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STRING_H #include #endif #include "datatype.h" #include "serial.h" #include "message.h" #include "kdb.h" #include "kdbprivate.h" /** * @defgroup message Message * @brief Encapsulate procedure call for IPC between libelektra-daemon and kdbd * * To use it: * @code * #include "message.h" * @endcode * * Message is a flat struct (i.e: without pointer) which encapsulate a * procedure with arguments. Its the basis class for elektra daemon IPC. * a Message pointer contain the Message struct and the eventual serialized * arguments. Here a in memory schematic representation: * @code * #|MESSAGE STRUCT|ARG0-SERIALIZED|ARGN-SERIALIZED|# * @endcode * * where # is the boundaries of the memory space allocated for the Message. * Message depends of serializer. * * Refer to @link protocol Protocol@endlink for sending/receiving message. * */ /** * Message constructor. * * Create a new message with associated arguments. * Message is a serialized procedure and arguments targeted to be * send throught a medium. * Arguments are copied, so you could free these after using messageNew * * @code * Message *msg * * // Create a request containing key and integer as arguments * msg = messageNew(MESSAGE_REQUEST, 1, DATATYPE_KEY, key, * DATATYPE_INTEGER, &myInt, * DATATYPE_LAST); * @endcode * * @param msgType Message type (request, reply, internal error) * @param procedure Procedure ID * * @see DataType * @see MessageType * @see messageExtractArgs() * @see messageDel() * @return newly allocated Message (must be freed with messageDel()) or NULL if error occured * * @ingroup message * */ Message *messageNew(MessageType msgType, int procedure, ...) { DataType type; va_list va; Message *msg; int nbArgs; char *buf; size_t size; ssize_t serializedSize; /* Compute size of Message + serialized args */ size = sizeof(Message); va_start(va, procedure); type = va_arg(va, DataType); nbArgs = 0; while ( (type != DATATYPE_LAST) && (nbArgs < MSG_MAX_ARGS) ) { serializedSize = serializeGetSize(type, va_arg(va, void *)); if ( serializedSize == -1 ) { fprintf(stderr, "SerializedGetSize = -1 for args %d of type %d !\n", nbArgs, type); va_end(va); return NULL; } size += serializedSize; nbArgs++; type = va_arg(va, DataType); } va_end(va); if ( nbArgs == MSG_MAX_ARGS ) { errno = ERANGE; return NULL; } /* Allocate some memory */ msg = (Message *) malloc(size); if ( msg == NULL ) return NULL; /* Fill message struct */ memset(msg, 0, size); msg->type = msgType; msg->procId = procedure; msg->nbArgs = nbArgs; msg->size = size; memset(msg->args, 0, sizeof(msg->args)); buf = (char *) msg; buf += sizeof(Message); /* Add serialized args ... */ nbArgs = 0; va_start(va, procedure); type = va_arg(va, DataType); while ( type != DATATYPE_LAST ) { serializedSize = serialize(type, va_arg(va, void *), buf); if ( serializedSize == -1 ) { free(msg); va_end(va); return NULL; } msg->args[nbArgs++] = type; buf += serializedSize; type = va_arg(va, DataType); } va_end(va); return msg; } /** * Get type of a message * * @param msg Message * @return Type of the message * * @see MessageType * @ingroup message */ MessageType messageGetType(const Message *msg) { assert(msg != NULL); return msg->type; } /** * Get procedure of a message * * @param msg Message * @return Type of the message * @ingroup message */ int messageGetProcedure(const Message *msg) { assert(msg != NULL); return msg->procId; } /** * Get number of arguments contained in a message * * @param msg Message * @return # of args * @ingroup message */ int messageGetNbArgs(const Message *msg) { assert(msg != NULL); return msg->nbArgs; } /** * Extract arguments from a message * This methods extract arguments contained from a message * into the suite of arguments passed to this method * * @code * int ret * * ret = messageExtractArgs(msg, DATATYPE_KEY, key, * DATATYPE_INTEGER, &myInt, * DATATYPE_LAST); * @endcode * * @param msg Message * @return 0 if Ok, -1 on error. * * @see messageNew() * @see DataType * @ingroup message */ int messageExtractArgs(const Message *msg, ...) { DataType type; va_list va; const char *buf; ssize_t serializedSize; int args; assert(msg != NULL); /* Skip message struct */ buf = (const char *) msg; buf += sizeof(Message); /* Unserialize args */ args = 0; va_start(va, msg); type = va_arg(va, DataType); while ( (type != DATATYPE_LAST) && (args < MSG_MAX_ARGS) ) { if ( msg->args[args] != type ) { va_end(va); errno = EBADF; return -1; } serializedSize = unserialize(type, buf, va_arg(va, void *)); if ( serializedSize == -1 ) { va_end(va); return -1; } buf += serializedSize; args++; type = va_arg(va, DataType); } va_end(va); if ( args == MSG_MAX_ARGS ) { errno = ERANGE; return -1; } return 0; } /** * Delete a message * Free all memory took by this message. * This doesn't free arguments passed when message was created. * * @param msg Message to delete * * @see messageNew() * @ingroup message */ void messageDel(Message *msg) { free(msg); } elektra-0.7.1/src/backends/daemon/message.h0000644000076400001440000000372611361542116015500 00000000000000/*************************************************************************** message.h - Class for a protocol messages ------------------- begin : Sun Mar 12 2006 copyright : (C) 2006 by Yannick Lecaillez, Avi Alkalay email : avi@unix.sh ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ /*************************************************************************** * * * Class for messages, to be passed over a protocol line. * * * ***************************************************************************/ /* Subversion stuff $Id$ */ #ifndef __MESSAGE__ #define __MESSAGE__ #include "datatype.h" #define MSG_MAX_ARGS 8 typedef enum { MESSAGE_REQUEST, MESSAGE_REPLY } MessageType; #define INTERNAL_ERROR 1<<15 typedef struct { MessageType type; int procId; int nbArgs; DataType args[MSG_MAX_ARGS]; size_t size; /* In memory, this struct is followed by * the serialized arguments. "size" reflect that. */ } Message; Message *messageNew(MessageType msgType, int procedure, ...); MessageType messageGetType(const Message *msg); int messageGetProcedure(const Message *msg); int messageGetNbArgs(const Message *msg); int messageExtractArgs(const Message *msg, ...); void messageDel(Message *msg); #endif /* __MESSAGE__ */ elektra-0.7.1/src/backends/daemon/protocol.c0000644000076400001440000001115411361542116015702 00000000000000/*************************************************************************** protocol.c - Class for a protocol ------------------- begin : Sun Mar 12 2006 copyright : (C) 2006 by Yannick Lecaillez, Avi Alkalay email : sizon5@gmail.com, avi@unix.sh ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ /*************************************************************************** * * * Class for messages, to be passed over a protocol line. * * * ***************************************************************************/ /* Subversion stuff $Id$ */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_UNISTD_H #include #endif #include #ifdef HAVE_STDLIB_H #include #endif #include #ifdef HAVE_STRING_H #include #endif #include "datatype.h" #include "message.h" #include "protocol.h" /* Magic: Magic number for protocol header. Elektra written like l33t ;-) */ #define PROTO_MAGIC 0x0E1E374AL #define PROTO_VERSION 1 static int protocolCheckHeader (const ProtocolHeader *header); /** * @defgroup protocol Protocol * @brief Protocol provide methods for transport Message throught a medium. * * Protocol allow to send & receive @link message Message@endlink securely. It does some sanity check * like checking protocol version & a magic number user for verify @link message message@endlink boundaries. * */ /** * Read a message from file/socket fd * This methods check header, read data and * create a new Message object from data. * * @param fd File Descriptor where data should be readen * @return a newly allocated message (which must be freed * using messageDel()) or NULL if error occured. * * @see protocolCheckHeader() * @see protocolSendMessage() * * @ingroup protocol */ Message *protocolReadMessage(int fd) { Message *msg; char *buf; ProtocolHeader header; size_t toRead; ssize_t ret; /* read header */ memset(&header, 0, sizeof(header)); if ( (ret = read(fd, &header, sizeof(header))) == -1 ) { return NULL; } if ( protocolCheckHeader(&header) ) { return NULL; } /* read message */ msg = (Message *) malloc(header.dataLen); if ( msg == NULL ) { return NULL; } buf = (char *) msg; toRead = header.dataLen; while ( toRead > 0 ) { if ( (ret = read(fd, buf, toRead)) == -1 ) { return NULL; } toRead -= ret; buf += ret; } return msg; } /** * Write a specified message to a file/socket * This methods build a header, and write message to the descriptor. * * @param fd File Descriptor where data should be written * @param message Message to send. * @return 0 if OK, -1 otherwise * * @see protocolReadMessage() * @ingroup protocol */ int protocolSendMessage(int fd, const Message *message) { ProtocolHeader header; const char *buf; size_t toWrite; ssize_t ret; assert(message != NULL); /* Send header */ memset(&header, 0, sizeof(header)); header.magic = PROTO_MAGIC; header.version = PROTO_VERSION; header.dataLen = message->size; if ( (ret = write(fd, &header, sizeof(header))) == -1 ) { return -1; } /* Send message */ toWrite = message->size; buf = (const char *) message; while ( toWrite > 0 ) { if ( (ret = write(fd, buf, message->size)) == -1 ) { return -1; } toWrite -= ret; buf += ret; } return 0; } /** * Check header validity * This methods check a magic number for detect data boundaries. * Check a version number for compatibility between protocol version. * * @param header Header to check * @return 0 if OK, -1 otherwise * * @see protocolReadMessage() */ static int protocolCheckHeader(const ProtocolHeader *header) { assert(header != NULL); if ( header->magic != PROTO_MAGIC ) { errno = EINVAL; return -1; } if ( header->version < PROTO_VERSION ) { errno = EINVAL; return -1; } return 0; } elektra-0.7.1/src/backends/daemon/protocol.h0000644000076400001440000000305111361542116015704 00000000000000/*************************************************************************** protocol.h - Interface for a protocol ------------------- begin : Sun Mar 12 2006 copyright : (C) 2006 by Yannick Lecaillez, Avi Alkalay email : avi@unix.sh ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ /*************************************************************************** * * * Class that implements a protocol. * * * ***************************************************************************/ /* Subversion stuff $Id$ */ #ifndef PROTOCOL_H #define PROTOCOL_H #include "message.h" typedef struct { unsigned long magic; unsigned int version; size_t dataLen; } ProtocolHeader; int protocolSendMessage(int fd, const Message *msg); Message *protocolReadMessage(int fd); #endif /* PROTOCOL_H */ elektra-0.7.1/src/backends/daemon/serial.c0000644000076400001440000001003411361542116015314 00000000000000/*************************************************************************** serial_bin.c - Low level objects serialization etc ------------------- copyright : (C) 2006 by Yannick Lecaillez, Avi Alkalay email : sizon5@gmail.com, avi@unix.sh ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ /* Subversion stuff $Id$ */ #include "datatype.h" #include "serial.h" #include "serial_int.h" #include "serial_string.h" #include "serial_key.h" #include "serial_keyset.h" /* *BEWARE* These funcs must be ordered by datatype in a such way * serialize[DATATYPE] return expected results. * Have a look at datatype.h */ static SerializerFunc serializer[] = { { NULL, NULL, NULL }, /* [0] -> Uninitialized */ { NULL, NULL, NULL }, /* [1] -> Unknown */ /* Integer */ { serialInt_getSize, serialInt_serialize, serialInt_unserialize }, /* Unsigned Long */ { serialUlong_getSize, serialUlong_serialize, serialUlong_unserialize }, /* String */ { serialString_getSize, serialString_serialize, serialString_unserialize }, /* Key */ { serialKey_getSize, serialKey_serialize, serialKey_unserialize }, /* KeySet */ { serialKeySet_getSize, serialKeySet_serialize, serialKeySet_unserialize } }; /** * @defgroup serializer Serializer * @brief Serializer provide methods for serialize/unserialize data of several DataType * * Serializer is used by @link message Message@endlink module for arguments * serialization/unserialization. * * These functions are wrapper to specific methods depending of the DataType of data * they're working on. Each DataType have its own function set for do the real work. * */ /** * Get size of a serialized arguments * * This function compute the size needed for store * the serialized form of an argument of type "type" * and of value "val" * * @param type Type of the argument * @param val Value of the argument * * @return Size of the serialized or -1 if error * * @see DataType * @ingroup serializer */ ssize_t serializeGetSize(DataType type, void *val) { if ( type <= DATATYPE_UNKNOW || type >= DATATYPE_LAST ) { errno = ERANGE; return -1; } return serializer[type].getSizeOfSerialized(val); } /** * Serialize argument * * Serialize an argument into a buffer * @param type Type of the argument to serialize * @param pType Pointer to the argument * @param pBuffer Buffer which will receive serialized version * * @return Size of the serialized or -1 if error * * @see unserialize() * @ingroup serializer */ ssize_t serialize(DataType type, const void *pType, void *pBuffer) { if ( type <= DATATYPE_UNKNOW || type >= DATATYPE_LAST ) { errno = ERANGE; return -1; } return serializer[type].serialize(pType, pBuffer); } /** * Unserialize argument * * Unserialize data from a buffer to "rebuild" argument * * @param type Type of the argument to unserialize * @param pBuffer Buffer containing serialized version of argument * @param pType Pointer to the unserialized argument * *WARNING*: If argument's type have a flexible size (not like a * struct containing pointer but like a string) passed pType should * be a **pType. Unserialized will then allocate needed memory for this * type. You'll have to freed this one * * @return Size of the serialized or -1 if error * @see serialize() * @ingroup serializer */ ssize_t unserialize(DataType type, const void *pBuffer, void *pType) { if ( type <= DATATYPE_UNKNOW || type >= DATATYPE_LAST ) { errno = ERANGE; return -1; } return serializer[type].unserialize(pBuffer, pType); } elektra-0.7.1/src/backends/daemon/serial.h0000644000076400001440000000274511361542116015333 00000000000000/*************************************************************************** serial.h - Abstraction of serialization ----------------------------- begin : Sun Mar 12 2006 copyright : (C) 2006 by Yannick Lecaillez, Avi Alkalay email : sizon5@gmail.com ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ /* Subversion stuff $Id$ */ #ifndef DAEMON_SERIAL_H #define DAEMON_SERIAL_H #ifdef HAVE_CONFIG_H #include "config.h" #endif #ifdef HAVE_UNISTD_H #include #endif #include #include "datatype.h" typedef struct { ssize_t (*getSizeOfSerialized)(const void *data); ssize_t (*serialize)(const void *data, void *into); ssize_t (*unserialize)(const void *data, void *into); } SerializerFunc; ssize_t serializeGetSize(DataType type, void *val); ssize_t serialize(DataType type, const void *pType, void *pBuffer); ssize_t unserialize(DataType type, const void *pBuffer, void *pType); #endif elektra-0.7.1/src/backends/daemon/serial_int.c0000644000076400001440000000420711361542116016173 00000000000000/*************************************************************************** serial_bin.c - Low level objects serialization etc ------------------- begin : Sun Mar 12 2006 copyright : (C) 2006 by Yannick Lecaillez, Avi Alkalay email : sizon5@gmail.com, avi@unix.sh ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ /* Subversion stuff $Id$ */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STRING_H #include #endif #if HAVE_UNISTD_H #include #endif ssize_t serialInt_getSize(const void *pInt) { return sizeof(int); } ssize_t serialInt_serialize(const void *pInt, void *pBuffer) { size_t size; assert(pInt != NULL); assert(pBuffer != NULL); size = serialInt_getSize(pInt); memcpy(pBuffer, pInt, size); return size; } ssize_t serialInt_unserialize(const void *pBuffer, void *pInt) { size_t size; assert(pBuffer != NULL); assert(pInt != NULL); size = serialInt_getSize(pInt); memcpy(pInt, pBuffer, size); return size; } ssize_t serialUlong_getSize(const void *pUlong) { return sizeof(unsigned long); } ssize_t serialUlong_serialize(const void *pUlong, void *pBuffer) { size_t size; assert(pUlong != NULL); assert(pBuffer != NULL); size = serialUlong_getSize(pUlong); memcpy(pBuffer, pUlong, size); return size; } ssize_t serialUlong_unserialize(const void *pBuffer, void *pUlong) { size_t size; assert(pBuffer != NULL); assert(pUlong != NULL); size = serialUlong_getSize(pUlong); memcpy(pUlong, pBuffer, size); return size; } elektra-0.7.1/src/backends/daemon/serial_int.h0000644000076400001440000000237011361542116016177 00000000000000/*************************************************************************** serial_int.c - Low level objects serialization etc ------------------- begin : Sun Mar 12 2006 copyright : (C) 2006 by Yannick Lecaillez, Avi Alkalay email : avi@unix.sh ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ /* Subversion stuff $Id$ */ ssize_t serialInt_getSize(const void *pInt); ssize_t serialInt_serialize(const void *pInt, void *pBuffer); ssize_t serialInt_unserialize(const void *pBuffer, void *pInt); ssize_t serialUlong_getSize(const void *pInt); ssize_t serialUlong_serialize(const void *pInt, void *pBuffer); ssize_t serialUlong_unserialize(const void *pBuffer, void *pInt); elektra-0.7.1/src/backends/daemon/serial_key.c0000644000076400001440000001101011361542116016157 00000000000000/*************************************************************************** serial_bin.c - Low level objects serialization etc ------------------- begin : Sun Mar 12 2006 copyright : (C) 2006 by Yannick Lecaillez, Avi Alkalay email : avi@unix.sh ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ /* Subversion stuff $Id$ */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STRING_H #include #endif #include "kdb.h" #include "kdbprivate.h" #include "datatype.h" #include "message.h" #include "serial_string.h" #include "serial_key.h" ssize_t serialKey_getSize(const void *pKey) { const Key *key; size_t size; key = (const Key *) pKey; if ( !keyIsInitialized(key) ) return -1; size = sizeof(Key); if ( key->flags & KEY_SWITCH_NAME ) size += serialString_getSize(keyName(key)); if ( key->flags & KEY_SWITCH_COMMENT ) size += serialString_getSize(keyComment(key)); if ( key->flags & KEY_SWITCH_OWNER ) size += serialString_getSize(keyOwner(key)); if ( key->flags & KEY_SWITCH_VALUE ) { if ( keyIsString(key) ) size += serialString_getSize(keyValue(key)); else size += keyGetValueSize(key); } return size; } ssize_t serialKey_serialize(const void *pKey, void *pBuffer) { const Key *key; size_t size; char *buf; int convert; key = (const Key *) pKey; if ( !keyIsInitialized(key) ) { return -1; } buf = (char *) pBuffer; /* Serialize metadata */ size = sizeof(Key); memcpy(buf, key, size); buf += size; convert = kdbbNeedsUTF8Conversion(); /* Serialize key name */ if ( key->flags & KEY_SWITCH_NAME ) { size = serialString_serialize(keyName(key), buf); if ( size == -1 ) return -1; buf += size; } /* Serialize key comment */ if ( key->flags & KEY_SWITCH_COMMENT ) { size = serialString_serialize(keyComment(key), buf); if ( size == -1 ) return -1; buf += size; } /* Serialize key owner */ if ( key->flags & KEY_SWITCH_OWNER ) { size = serialString_serialize(keyOwner(key), buf); if ( size == -1 ) return -1; buf += size; } /* Serialize key value */ if ( key->flags & KEY_SWITCH_VALUE ) { if ( keyIsString(key) ) { size = serialString_serialize(keyValue(key), buf); if ( size == -1 ) return -1; buf += size; } else { size = keyGetValueSize(key); memcpy(buf, keyValue(key), size); buf += size; } } return (buf - ((char *) pBuffer)); } ssize_t serialKey_unserialize(const void *pBuffer, void *pKey) { const char *buf; Key *key, save; size_t size; key = (Key *) pKey; if ( !keyIsInitialized(key) ) return -1; buf = (const char *) pBuffer; /* Save current key char pointer * since these one will be overrided. */ memcpy(&save, key, sizeof(Key)); /* Unserialize key struct */ size = sizeof(Key); memcpy(key, buf, size); buf += size; /* Restore original key pointer */ key->key = keyName(&save); key->comment = keyComment(&save); key->userDomain = keyOwner(&save); key->data = keyValue(&save); /* Unserialize keyname */ if ( key->flags & KEY_SWITCH_NAME ) { free(key->key); size = serialString_unserialize(buf, &key->key); if ( size == -1 ) return -1; buf += size; } /* Unserialize comment */ if ( key->flags & KEY_SWITCH_COMMENT ) { free(key->comment); size = serialString_unserialize(buf, &key->comment); if ( size == -1 ) return -1; key->commentSize = size; buf += size; } /* Unserialize userDomain */ if ( key->flags & KEY_SWITCH_OWNER ) { free(key->userDomain); size = serialString_unserialize(buf, &key->userDomain); if ( size == -1 ) return -1; buf += size; } /* Unserialize data */ if ( key->flags & KEY_SWITCH_VALUE ) { if ( keyIsString(key) ) { free(key->data); size = serialString_unserialize(buf, &key->data); } else { size = keySetRaw(key, buf, key->dataSize); } if ( size == -1 ) return -1; key->dataSize = size; buf += size; } return (buf - ((char *) pBuffer)); } elektra-0.7.1/src/backends/daemon/serial_key.h0000644000076400001440000000213111361542116016170 00000000000000/*************************************************************************** serial_key.h - Low level objects serialization etc ------------------- begin : Sun Mar 12 2006 copyright : (C) 2006 by Yannick Lecaillez, Avi Alkalay email : avi@unix.sh ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ /* Subversion stuff $Id$ */ #include "kdb.h" ssize_t serialKey_getSize(const void *pKey); ssize_t serialKey_serialize(const void *pKey, void *pBuffer); ssize_t serialKey_unserialize(const void *pBuffer, void *pKey); elektra-0.7.1/src/backends/daemon/serial_keyset.c0000644000076400001440000000546411361542116016713 00000000000000/*************************************************************************** serial_keyset.c - Low level objects serialization etc ------------------- begin : Sun Mar 12 2006 copyright : (C) 2006 by Yannick Lecaillez, Avi Alkalay email : sizon5@gmail.com, avi@unix.sh ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ /* Subversion stuff $Id$ */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STRING_H #include #endif #include "kdb.h" #include "kdbprivate.h" #include "datatype.h" #include "message.h" #include "serial_key.h" #include "serial_keyset.h" ssize_t serialKeySet_getSize(const void *pKeySet) { const KeySet *ks; size_t size; ssize_t ret; Key *current; ks = (const KeySet *) pKeySet; size = sizeof(ks->size); current = ks->start; while ( current != NULL ) { ret = serialKey_getSize((const void *) current); if ( ret == -1 ) return -1; size += ret; current = current->next; } size += sizeof(size_t); return size; } ssize_t serialKeySet_unserialize(const void *pBuffer, void *pKeySet) { KeySet *ks; const char *buf; ssize_t ret; size_t count, size; Key *current; buf = (const char *) pBuffer; ks = (KeySet *) pKeySet; /* Read size of the keySet */ memcpy(&size, buf, sizeof(size)); buf += sizeof(size); /* Read the key inside the keyset */ count = 0; while ( count < size ) { /* Create a new key */ current = keyNew(KEY_SWITCH_END); if ( current == NULL ) return -1; /* Unserialize key */ ret = serialKey_unserialize(buf, (void *) current); if ( ret == -1 ) return -1; buf += ret; /* Add the key into the keyset */ count = ksAppendKey(ks, current); } return (buf - ((const char *) pBuffer)); } ssize_t serialKeySet_serialize(const void *pKeySet, void *pBuffer) { const KeySet *ks; Key *current; char *buf; ssize_t ret; ks = (const KeySet *) pKeySet; buf = pBuffer; memcpy(buf, &ks->size, sizeof(ks->size)); buf += sizeof(ks->size); /* Store all the keyset */ current = ks->start; while ( current != NULL ) { ret = serialKey_serialize((void *) current, (void *) buf); if ( ret == -1 ) return -1; buf += ret; current = current->next; } return (buf - ((char *) pBuffer)); } elektra-0.7.1/src/backends/daemon/serial_keyset.h0000644000076400001440000000213411361542116016707 00000000000000/*************************************************************************** serial_keyset.h - Low level objects serialization etc ------------------- begin : Sun Mar 12 2006 copyright : (C) 2006 by Yannick Lecaillez, Avi Alkalay email : avi@unix.sh ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ /* Subversion stuff $Id$ */ ssize_t serialKeySet_getSize(const void *pKeySet); ssize_t serialKeySet_unserialize(const void *pBuffer, void *pKeySet); ssize_t serialKeySet_serialize(const void *pKeySet, void *pBuffer); elektra-0.7.1/src/backends/daemon/serial_string.c0000644000076400001440000000612511361542116016710 00000000000000/*************************************************************************** serial_string.c - Low level objects serialization etc ------------------- begin : Sun Mar 12 2006 copyright : (C) 2006 by Yannick Lecaillez, Avi Alkalay email : avi@unix.sh ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ /* Subversion stuff $Id$ */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_LANGINFO_H #include #endif #include #include "kdbbackend.h" /* Daemon works in UTF-8. So, conversion is done * only when we're called from a non-UTF8 client */ ssize_t serialString_getSize(const void *pChar) { size_t size; size = kdbiStrLen(pChar); if ( kdbbNeedsUTF8Conversion() ) size = size * 4; return size; } ssize_t serialString_serialize(const void *pChar, void *pBuffer) { char *currentCharset, *writeCursor; const char *readCursor; iconv_t converter; size_t bufferSize; size_t size; ssize_t len; if ( kdbbNeedsUTF8Conversion() ) { currentCharset=nl_langinfo(CODESET); converter = iconv_open("UTF-8",currentCharset); size = kdbiStrLen(pChar); bufferSize = size * 4; readCursor = (const char *) pChar; writeCursor = (char *) pBuffer; if ( iconv(converter, (ICONV_CONST char **) &readCursor, &size, &writeCursor, &bufferSize) == (size_t)(-1) ) { iconv_close(converter); return -1; } iconv_close(converter); len = writeCursor - ((char *) pBuffer); } else { len = serialString_getSize(pChar); if ( len != -1 ) { memcpy(pBuffer, pChar, len); } } return len; } ssize_t serialString_unserialize(const void *pBuffer, void *ppChar) { char *currentCharset, *writeCursor; const char *readCursor; iconv_t converter; char **dest; size_t bufferSize; size_t size; ssize_t len; dest = (char **) ppChar; if ( kdbbNeedsUTF8Conversion() ) { currentCharset=nl_langinfo(CODESET); converter = iconv_open(currentCharset, "UTF-8"); size = kdbiStrLen(pBuffer); bufferSize = size * 4; *dest = (char *) malloc(bufferSize); readCursor = (const char *) pBuffer; writeCursor = (char *) *dest; if ( iconv(converter, (ICONV_CONST char **) &readCursor, &size, &writeCursor, &bufferSize) == (size_t)(-1) ) { iconv_close(converter); return -1; } iconv_close(converter); len = writeCursor - ((char *) *dest); } else { len = kdbiStrLen(pBuffer); if ( len != -1 ) { *dest = (char *) malloc(len); memcpy(*dest, pBuffer, len); } } return len; } elektra-0.7.1/src/backends/daemon/serial_string.h0000644000076400001440000000212711361542116016713 00000000000000/*************************************************************************** serial_string.h - Low level objects serialization etc ------------------- begin : Sun Mar 12 2006 copyright : (C) 2006 by Yannick Lecaillez, Avi Alkalay email : avi@unix.sh ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ /* Subversion stuff $Id$ */ ssize_t serialString_getSize(const void *pChar); ssize_t serialString_serialize(const void *pChar, void *pBuffer); ssize_t serialString_unserialize(const void *pBuffer, void *ppChar); elektra-0.7.1/src/backends/daemon/sig.c0000644000076400001440000000435511361542116014630 00000000000000/*************************************************************************** sig.c - Handle signals ------------------- copyright : (C) 2006 by Yannick Lecaillez email : sizon5@gmail.com ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ /* Subversion stuff $Id$ */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include "sig.h" int sig_alarm = SIGALRM; int sig_child = SIGCHLD; int sig_cont = SIGCONT; int sig_hangup = SIGHUP; int sig_int = SIGINT; int sig_pipe = SIGPIPE; int sig_term = SIGTERM; void (*sig_defaulthandler)() = SIG_DFL; void (*sig_ignorehandler)() = SIG_IGN; void sig_block(int sig) { /*#ifdef HAVE_SIGPROCMASK*/ #ifdef HASSIGPROCMASK sigset_t ss; sigemptyset(&ss); sigaddset(&ss,sig); sigprocmask(SIG_BLOCK,&ss,(sigset_t *) 0); #else sigblock(1 << (sig - 1)); #endif } void sig_unblock(int sig) { /*#ifdef HAVE_SIGPROCMASK*/ #ifdef HASSIGPROCMASK sigset_t ss; sigemptyset(&ss); sigaddset(&ss,sig); sigprocmask(SIG_UNBLOCK,&ss,(sigset_t *) 0); #else sigsetmask(sigsetmask(~0) & ~(1 << (sig - 1))); #endif } void sig_blocknone(void) { /*#ifdef HAVE_SIGPROCMASK*/ #ifdef HASSIGPROCMASK sigset_t ss; sigemptyset(&ss); sigprocmask(SIG_SETMASK,&ss,(sigset_t *) 0); #else sigsetmask(0); #endif } void sig_catch(int sig,void (*f)()) { /*#ifdef HAVE_SIGACTION*/ #ifdef HASSIGACTION struct sigaction sa; sa.sa_handler = f; sa.sa_flags = 0; sigemptyset(&sa.sa_mask); sigaction(sig,&sa,(struct sigaction *) 0); #else signal(sig,f); /* won't work under System V, even nowadays---dorks */ #endif } void sig_pause(void) { /*#ifdef HAVE_SIGPROCMASK*/ #ifdef HASSIGPROCMASK sigset_t ss; sigemptyset(&ss); sigsuspend(&ss); #else sigpause(0); #endif } elektra-0.7.1/src/backends/daemon/sig.h0000644000076400001440000000245611361542116014635 00000000000000/*************************************************************************** sig.h - Signal processing ------------------- copyright : (C) 2006 by Yannick Lecaillez email : sizon5@gmail.com ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ /* Subversion stuff $Id$ */ extern int sig_alarm; extern int sig_child; extern int sig_cont; extern int sig_hangup; extern int sig_int; extern int sig_pipe; extern int sig_term; void sig_block(int sig); void sig_unblock(int sig); void sig_blocknone(void); void sig_catch(int sig,void (*f)()); void sig_pause(void); extern void (*sig_defaulthandler)(); extern void (*sig_ignorehandler)(); #define sig_ignore(s) (sig_catch((s),sig_ignorehandler)) #define sig_uncatch(s) (sig_catch((s),sig_defaulthandler)) elektra-0.7.1/src/backends/daemon/thread.c0000644000076400001440000001144511361542116015313 00000000000000/*************************************************************************** thread.c - Thread Managment ------------------- copyright : (C) 2006 by Yannick Lecaillez email : sizon5@gmail.com ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ /* Subversion stuff $Id$ */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STRING_H #include #endif #include #include "thread.h" #define THREADS_PREALLOC 5 typedef struct { pthread_t thread; int socketFd; int handle; } ThreadContext; static ThreadContext **threads = NULL; static int threadsArraySize = 0; static pthread_mutex_t threadsMutex = PTHREAD_MUTEX_INITIALIZER; static int threadListAdd(ThreadContext *thread); static ThreadContext *threadListGet(int threadHandle); static int threadListRemove(int threadHandle); /* * Create a new ThreadContext and launch the thread * Launched thread must call threadExit(handle) at end. */ int threadCreate(int socketfd, void *(*start_routine)(void *)) { ThreadContext *new; if ( (new = (ThreadContext *) malloc(sizeof(ThreadContext))) == NULL ) { return -1; } memset(new, 0, sizeof(ThreadContext)); new->socketFd = socketfd; if ( (new->handle = threadListAdd(new)) == -1 ) return -1; /* Execution options (only one should be used): 1. Multithreaded: */ if ( pthread_create(&new->thread, NULL, start_routine, (void *) &new->handle) ) { threadListRemove(new->handle); free(new); return -1; } /* 2. Single thread, for debugging purposes: */ /* kdbd(&new->handle); */ return new->handle; } int threadGetSocket(int threadHandle) { ThreadContext *thread; if ( (thread = threadListGet(threadHandle)) == NULL ) return -1; return thread->socketFd; } pthread_t threadGetId(int threadHandle) { ThreadContext *thread; if ( (thread = threadListGet(threadHandle)) == NULL ) return -1; return thread->thread; } /* * Remove ThreadContext on thread exit * This functions shoudln't be called by hand ! */ void threadExit(void *pIntThreadHandle) { ThreadContext *thread; int threadHandle; threadHandle = *((int *) pIntThreadHandle); if ( (thread = threadListGet(threadHandle)) == NULL ) { fprintf(stderr, "threadExit(): Thread's handle %d doesn't exist.\n", threadHandle); return; } if ( threadListRemove(threadHandle) == -1 ) { fprintf(stderr, "threadExit(): Unable to remove thread's handle %d.\n", threadHandle); return; } close(thread->socketFd); free(thread); fprintf(stderr, "Thread %ld (handle=%d) freed.\n", pthread_self(), threadHandle); } /* * Keep a ThreadContext into an array * return an associated handle */ static int threadListAdd(ThreadContext *thread) { ThreadContext **tmp; int threadHandle; int newSize; newSize = 0; if ( threadsArraySize == 0 ) { newSize = THREADS_PREALLOC; } else { /* Search for a free space ... */ pthread_mutex_lock(&threadsMutex); for(threadHandle = 0 ; threadHandle < threadsArraySize ; threadHandle++) { if ( threads[threadHandle] == NULL ) break; } if ( threadHandle == threadsArraySize ) { /* No free space found, extend array */ newSize = threadsArraySize + THREADS_PREALLOC; } pthread_mutex_unlock(&threadsMutex); } if ( newSize ) { /* No free space found, extend array */ pthread_mutex_lock(&threadsMutex); tmp = realloc(threads, sizeof(pthread_t *) * (newSize)); if ( tmp == NULL ) { pthread_mutex_unlock(&threadsMutex); return -1; } threads = tmp; threadHandle = threadsArraySize; threadsArraySize = newSize; pthread_mutex_unlock(&threadsMutex); } pthread_mutex_lock(&threadsMutex); threads[threadHandle] = thread; pthread_mutex_unlock(&threadsMutex); return threadHandle; } static int threadListRemove(int threadHandle) { if ( threadHandle >= threadsArraySize ) return -1; pthread_mutex_lock(&threadsMutex); threads[threadHandle] = NULL; pthread_mutex_unlock(&threadsMutex); return 0; } static ThreadContext *threadListGet(int threadHandle) { ThreadContext *thread; if ( threadHandle >= threadsArraySize ) return NULL; pthread_mutex_lock(&threadsMutex); thread = threads[threadHandle]; pthread_mutex_unlock(&threadsMutex); return thread; } elektra-0.7.1/src/backends/daemon/thread.h0000644000076400001440000000200611361542116015311 00000000000000/*************************************************************************** thread.h - Thread Managment ------------------- copyright : (C) 2006 by Yannick Lecaillez email : sizon5@gmail.com **************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ /* Subversion stuff $Id$ */ int threadCreate(int socketfd, void * (*start_routine)(void *)); int threadGetSocket(int threadHandle); pthread_t threadGetId(int threadHandle); void threadExit(void *pIntThreadHandle); elektra-0.7.1/src/backends/doc/0000777000076400001440000000000011365513213013261 500000000000000elektra-0.7.1/src/backends/doc/backend.c0000644000076400001440000007155411365506635014756 00000000000000/*************************************************************************** backend.c - Skeleton of backends to access the Key Database ------------------- begin : Mon Dec 26 2004 copyright : (C) 2004 by Avi Alkalay email : avi@unix.sh ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ #include #define BACKENDNAME "backend" #define BACKENDVERSION "1.0.0" /** * @defgroup backend KDB Backends :: Elektra framework for pluggable backends * @brief The tactics to create pluggable backends to libelektra.so * * @section intro Introduction * * @since Since version 0.4.9, Elektra can dynamically load different key storage * backends. * * @since Since version 0.7.0 Elektra can have multiple storage backends, called just * backends henceforth, at once for different purposes. * * @par Definition: You refers to the implementation of the function in this specification. * If you read the documentation about kdbGet_backend(), then the caller is kdbGet() * which is the only function which can and will call (invoke) you. The Preconditions * will always be met by the caller, you can count on them. But you (as said before we * speak about the function) need to take care that all Postconditions are met. * * @subsection overview Overview * * The methods of class KDB that are backend dependent are only kdbOpen_backend(), * kdbClose_backend(), kdbGet_backend(), kdbSet_backend() and KDBEXPORT() to export * these methods. A backend must implement each of them. A detailed * specification of these methods and methods needed in that context * follows in this Documentation Module. * * The other KDB methods are higher level. They use the above methods to * do their job, and generally don't have to be reimplemented for a * different backend, but there might be a solution to do so for higher * performance in future. kdbh* methods are for access to the internals * of KDB, which will be passed to all functions. * * @subsection incl Include Files * * The backend implementation must include: * @code #include * @endcode * to have direct access to the structs, which is currently needed to * access the capability structure. * * Don't include kdb.h, it will be automatically included and some macros will * avoid redefining structs where you have more insight from a backend than * you would normally have. Additionally you get the declaration of all functions * described here, except the one you have to implement. * * @subsection dyn Dynamic Mounting * * An elektrified program will use elektra/libelektra-default.so as its default backend. * This backend provides the system/ hierarchy and some base configuration * in system/elektra for elektra itself. Everything below system/ and the other * hierarchies can be stored in any different backend. This is allowed through the * technique mounting. A backend can be mounted to any path except system/ * and system/elektra. * * A backends is guaranteed to be loaded whenever calling kdbGet() * or kdbSet() requires the backend, but may already be loaded at kdbOpen(). It * might be loaded explizit by kdbMount() at any time after kdbOpen(). * Backends get a chance to initialize by calling kdbOpen_backend() whenever * they are loaded. * * Using kdbUnmount() a backend may closed during runtime. * All backends will be closed when kdbClose() is called. * Backends might be unloaded after some time of inactivity or other reasons. * After loading backends get a chance to cleanup by calling * kdbClose_backend(). * * That means it is not guaranteed that the backend live the whole time nor * it will be loaded only one time. A tactic to handle this well is to build * stateless backends referring to kdbGet_backend() and kdbSet_backend(). * That means that there is no more information present than in the storage itself. * Be aware that you must not have any global variables in your backend. Read more * about that in kdbOpen_backend(). * But to be stateless you also have to consider not to store any other than caching * information into kdbhGetBackendData(). I repeat: it must be possible to restore * everything dynamically stored without exception. * * @subsection lib Library Names * * Elektra source code or development package provides a skeleton and Makefile * to implement a backend. Copy src/backends/template to have a good * starting point. See the CODING document * to know how to integrate the backend in the build system or how to compile * it external. * * A backend is defined by a single name, for example @c BACKENDNAME, that * causes libelektra.so look for its library as @c libelektra-BACKENDNAME.so. * * @par Example of a complete backend: * @code // // This is my implementation for an Elektra backend storage. // // To compile it: // $ cc -fpic `pkg-config --cflags elektra` -o myback.o -c myback.c // $ cc -shared -fpic `pkg-config --libs elektra` -o libelektra-myback.so myback.o // // To use it: // $ preload mount myback system/myback myback /tmp/nofile // $ kdb ls system/myback // $ kdb set system/myback/key "value" // $ kdb get system/myback/key // #include #define BACKENDNAME "backend" int kdbOpen_backend(KDB *handle) {...} int kdbClose_backend(KDB *handle) {...} int kdbGet_backend(KDB handle, KeySet *returned, Key *key) {...} int kdbSet_backend(KDB handle, KeySet *returned, Key *key) {...} KDBEXPORT(backend) { return kdbBackendExport(BACKENDNAME, KDB_BE_OPEN, &kdbOpen_backend, KDB_BE_CLOSE, &kdbClose_backend, KDB_BE_GET, &kdbGet_backend, KDB_BE_SET, &kdbSet_backend, KDB_BE_END); } * @endcode * * In the example, the *_backend() methods can have other random names, * since you'll correctly pass them later to kdbBackendExport(). It is * recommended to use names according to your backendname to avoid * name clashes. Be aware that every symbol name in the linked application * must be unique. * * Don't copy above example out, use src/backends/template, it does * compile as-is and does some initialization and cleanup already. * * Elektra source code tree includes several backend implementations * https://svn.libelektra.org/svn/elektra/trunk/src/backends/ * that can also be used as a reference. * * @section backenddetail Details * * @subsection intro Introduction * * Capabilities may make your live much easier. If it is impossible, * very hard or would impact performance badly you may leave out some * parts described here, but need to declare that you have done so with * capabilites. * * It is allowed to provide additional information, even if you * declared you don't have it. If you declare that you are capable * of doing something, you must provide it without exceptions. * * @subsection owner Owner * * You need to set the owner of keys by keySetOwner(). Owner is the * name to whom a specific key of the user/ hierarchy belongs. * If you declare kdbcGetnoOwner() you need not to set the owner of * the keys. It also means that even if you want to get keys from another * user hierarchy you get yours. * * @subsection value Values * * Values are the central information of keys next to the name * describing what informations it holds. Parse them out of your backend * and put them into the key with keySetString(). The information will * be duplicated, so you might need to free() your string. Don't try * to directly access key->data, things may change there and your * backend might be compiled with a different libc than elektra. * If you support types, you might want to use keySetRaw() to not * change the key type. * If you don't support values for all keys declare kdbcGetnoValue(). * * @subsection id IDs * * You need to set uid respective gid for any key not having the uid * and gid of the current process. This will be set by default in * every key. You can do it with keySetUID() and keySetGID(). * Declaring kdbcGetnoUID() and kdbcGetnoGID() you need not set uid * and gid. * * @subsection mode Mode * * Mode shows what can be done with the key having or not having * the above uid and gid. Use keySetMode() to set the correct * mode description, read the description in keySetMode() * for the semantics of the 3 octal representation. * Declaring kdbcGetnoMode() means mode will remain default. * * The very related method keySetDir() sets the executable bits * of mode. Even if your backend does not support mode, it * might support directories, meaning that keys have the mode * 0664 or 0775 for directories. Declaring kdbcGetnoDir() means * that the backend is flat, no key will be true for keyIsDir() * and so can't have any subkeys. * * @subsection timing Timing * * Keys should have exact timing information of their * modification and access times. Use keySetATime(), keySetMTime() * and keySetCTime() to store appropriate information. * ATime need to be stored in database, if you stat a key * the backend need to return the time kdbGet() was last used * for the keys. * If you don't support this, declare * kdbcGetnoATime() and simple store time(0) in the atime. * This must be the same for every key for a single * kdbGet_backend(). * If you only stat keys with kdbGet(), see below, then the access time * should not be updated. * MTime is the last modification time of value or comment. * If you don't support this, declare * kdbcGetnoMTime() and simple store time(0) in the mtime. * This must be the same for every key for a single * kdbGet_backend(). * CTime is the last change time of any metadata or * add/remove of subkeys. * If you don't support this, declare * kdbcGetnoCTime() and simple store time(0) in the ctime. * This must be the same for every key for a single * kdbGet_backend(). * * @subsection type Types * * Keys having value and comment can be one of two fundamental * types, string or binary, both called value. While string is * a null terminated utf8 character sequence, binary is any data * of a specific length. Be sure to use keySetString() for string * and keySetBinary() if you want to store binary data. * If you do not support one of these, be sure to declare * kdbcGetnoBinary() or kdbcGetnoString(), if you don't support * both make sure to also declare kdbcGetnoValue(). * * Using keySetRaw() does not set the type, be sure to use keySetType() * afterwards. This can be KEY_TYPE_STRING and KEY_TYPE_BINARY * or any other type in #type_t, leading * to same results as explained above, but also any other number * in the range of #type_t. Declare kdbcGetnoTypes() when your * backend does not support arbitrary types. * * */ /** * Initialize the backend. * This is the first method kdbOpenBackend() calls after dynamically loading * the backend library. * * This method is responsible of: * - backend's specific configuration gathering * - all backend's internal structs initialization * - initial setup of all I/O details such as opening a file, connecting to a * database, etc * * If your backend does not support all aspects described in kdbGet_backend() * and kdbSet_backend() you need capabilities to export this information. * Per default you declare to be fully compliant to the specification given * here, to change it get a pointer to KDBCap structure by using * kdbhGetCapability(). * * You may also read the configuration you can get with kdbhGetConfig() and transform it * into other structures used by your backend. * * But be aware that you don't have any global variables. If you do your backend will * not be threadsafe. You can use kdbhSetBackendData() and kdbhGetBackendData() to store * and get any information related to your backend. * * The correct substitute for global variables will be: * @code struct _GlobalData{ int global; }; typedef struct _GlobalData GlobalData; int kdbOpen_backend(KDB *handle) { PasswdData *data; data=malloc(sizeof(PasswdData)); data.global = 20; kdbhSetBackendData(handle,data); } * @endcode * * Make sure to free everything in kdbClose_backend(). * * @return 0 on success * @param handle contains internal information of @link kdbOpen() opened @endlink key database * @see kdbOpen() * @ingroup backend */ int kdbOpen_backend(KDB *handle) { return 0; } /** * Finalize the backend. * Called prior to unloading the backend dynamic module. Should ensure that no * functions or static/global variables from the module will ever be accessed again. * * Make sure to free all memory that your backend requested at runtime. * * Specifically make sure to capDel() all capabilites and free your backendData in * kdbhGetBackendData(). * * After this call, libelektra.so will unload the backend library, so this is * the point to shutdown any affairs with the storage. * * @param handle contains internal information of @link kdbOpen() opened @endlink key database * @return 0 on success, anything else otherwise. * @see kdbClose() * @ingroup backend */ int kdbClose_backend(KDB *handle) { return 0; /* success */ } /** * Retrieve information from a permanent storage to construct * a keyset. * * @section intro Introduction * * This function does everything related to get keys out from a * backend. There is only one function for that purpose to make * implementation and locking much easier. * * The keyset @p returned needs to be filled with information * so that the application using elektra can access it. * See the live cycle of a comment to understand: * @code kdbGet_backend(KDB *handle, KeySet *returned, Key *parentKey) { // the task of kdbGet_backend is to retrieve the comment out of the permanent storage Key *key = keyDup (parentKey); // generate a new key to hold the information char *comment; loadfromdisc (comment); keySetComment (key, comment, size); // set the information ksAppendKey(returned, key); } // Now return to kdbGet int kdbGet(KDB *handle, KeySet *keyset, Key *parentKey, options) { kdbGet_backend (handle, keyset, 0); // postprocess the keyset and return it } // Now return to usercode, waiting for the comment void usercode (Key *key) { kdbGet (handle, keyset, parentKey, 0); key = ksCurrent (keyset, key); // lookup the key from the keyset keyGetComment (key); // now the usercode retrieves the comment } * @endcode * Of course not only the comment, but all information of every key in the keyset * @p returned need to be fetched from permanent storage and stored in the key. * So this specification needs to give * an exhaustive list of information present in a key. * * @section conditions Conditions * * @pre The caller kdbGet() will make sure before you are called * that the parentKey: * - is a valid key (means that it is a system or user key). * - is below (see keyIsBelow()) your mountpoint and that your backend is responsible for it. * - has keyNeedStat() set when you should only stat keys (see later). * and that the returned: * - is a valid keyset. * - has @p all keys with the flag KEY_FLAG_SYNC set. * - @p may has keys with the flag KEY_FLAG_STAT set. * - contains only valid keys direct below (see keyIsDirectBelow()) your parentKey. * That also means, that the parentKey will not be in that keyset. * - have keyIsStat() set when the value/comment information is not necessary. * - is in a sorted order, see ksSort(). * and that the handle: * - is a valid KDB for your backend. * - that kdbhGetBackendHandle() contains the same handle for lifetime kdbOpen_backend() * until kdbClose_backend() was called. * * @pre The caller kdbGet() will make sure that afterwards you were called, * whenever the user requested it with the options, that: * - hidden keys they will be thrown away. * - dirs or only dirs kdbGet() will remove * the other. * - you will be called again recursively with all subdirectories. * - the keyset will be sorted when needed. * - the keys in returned having KEY_FLAG_SYNC will be sorted out. * * @invariant There are no global variables and kdbhGetBackendData() * only stores information which can be regenerated any time. * The handle is the same when it is the same backend. * * @post The keyset @p returned has the @p parentKey and all keys direct * below (keyIsDirectBelow()) with all information from the storage. * Make sure to return all keys, all directories and also all * hidden keys. If some of them are not wished, the caller kdbGet() will * drop these keys, see above. * * @section detail Details * * Now lets look at an example how the typical kdbGet_backend() might be * implemented. To explain we introduce some pseudo functions which do all * the work with the storage (which is of course 90% of the work for a real * backend): * - find_key() gets an key out from the storage and memorize the position. * - next_key() will find the next key and return it (with the name). * - fetch_key() gets out all information of a key from storage * (details see below example). * It removes the keyNeedStat() and keyNeedSync() flag afterwards. * - stat_key() gets all meta information (everything but value and comment). * It removes the key keyNeedSync() flag afterwards. * returns the next key out from the storage. * The typical loop now will be like: * @code ssize_t kdbGet_backend(KDB *handle, KeySet *update, const Key *parentKey) { Key * current; KeySet *returned = ksNew(ksGetSize(update)*2, KS_END); find_key (parentKey); current = keyDup (parentKey); if (keyNeedStat(parentKey)) { current = stat_key(current); } else { current = fetch_key(current); } clear_bit (KEY_FLAG_SYNC, current->flags); ksAppendKey(returned, current); while ((current = next_key()) != 0) { // search if key was passed in update by caller Key * tmp = ksLookup (update, current, KDB_O_WITHOWNER|KDB_O_POP); if (tmp) current = tmp; // key was passed, so use it if (keyNeedStat(parentKey) || keyNeedStat(current)) { current = stat_key (current); set_bit (KEY_FLAG_STAT, current->flags); } else { current = fetch_key(current); } clear_bit (KEY_FLAG_SYNC, current->flags); ksAppendKey(returned, current); // TODO: delete lookup key } if (error_happened()) { errno = restore_errno(); return -1; } ksClear (update); // the rest of update keys is not in storage anymore ksAppend(update, returned); // append the keys ksDel (returned); return nr_keys(); } * @endcode * * @note - returned and update are separated, for details why see ksLookup() * - the bit KEY_FLAG_SYNC is always cleared, see postconditions * * So your mission is simple: Search the @c parentKey and add it and then search * all keys below and add them too, of course with all requested information * (which is only depended on keyNeedStat()). * * @section stat Stat * * Sometimes value and comment are not of interest, but * metadata. To avoid a potential time-consuming kdbGet() * you can keyNeedStat() the @p parentKey. If the backend supports * a less time-consuming method to just get names and * metadata, implement it, otherwise declare kdbcGetnoStat(). * * The implementation works as follows: When the @p parentKey has * keyNeedStat() set, all keys need to be stated instead of getting * them. So the keys you ksAppendKey() don't have a value nor a comment * and make sure that KEY_FLAG_SYNC is not set, but keyNeedStat() * must be set for all keys which are only stated. * * The keys in @p returned may already have keyNeedStat() set. * These keys must keep the status keyNeedStat() and you don't need * to get the value and comment. See the example above for code. * * @section updating Updating * * To get all keys out of the storage over and over again can be very inefficient. * You might know a more efficient method to know if the key needs update or not, * e.g. by stating it or by an external time stamp info. In that case you can make * use of @p returned KeySet. There are following possibilities: * - The key is in returned and up to date. * You just need to remove the KEY_FLAG_SYNC flag. * - The key is in returned but keyNeedStat() is true. * You just need to stat the key and remove the KEY_FLAG_SYNC flag and * set the KEY_FLAG_STAT flag. * - The key is in returned, keyNeedStat() is false (for the key and the @p parentKey) * and you know that the key has changed. You need to fully retrieve the key and * remove the KEY_FLAG_SYNC flag. * - The key is not in returned, the @p parentKey has keyNeedStat(). You just need * to stat the key. Make sure that KEY_FLAG_SYNC is not set, but KEY_FLAG_STAT * needs to be set. Append the key to @p returned. * - The key is not in returned and the @p parentKey keyNeedStat() is false. * You need to fully retrieve the key out of storage, clear KEY_FLAG_STAT and * KEY_FLAG_SYNC and ksAppendKey() it to the @p returned keyset. * * @note You must clear the flag KEY_FLAG_SYNC at the very last point where no more * modification on the key will take place, because any modification on the key will * set the KEY_FLAG_SYNC flag again. With that keyNeedSync() will return true and * the caller will sort this key out. * * @section fullget only Full Get * * In some backends it is not useful to get only a part of the configuration, because * getting all keys would take as long as getting some. For this situation, * you can declare onlyFullGet, see kdbcGetonlyFullGet(). * * The only valid call for your backend is then that @p parentKey equals the @p mountpoint. * For all other @p parentKey you must, add nothing and just return 0. * * @code if (strcmp (keyName(kdbhGetMountpoint(handle)), keyName(parentKey))) return 0; * @endcode * * If the @p parentKey is your mountpoint you will of course fetch all keys, and not only * the keys direct below the @c parentKey. * So @p returned is valid iff: * - every key is below ( keyIsBelow()) the parentKey * - every key has a direct parent (keyIsDirectBelow()) in the keyset * * @note This statement is only valid for backends with kdbcGetonlyFullGet() set. * * @note If any calls you use change errno, make sure to restore the old errno. * * @see kdbGet() for caller. * * @param handle contains internal information of @link kdbOpen() opened @endlink key database * @param returned contains a keyset where the function need to * append the keys got from the storage. There might be also some * keys inside it, see conditions. You may use them to support * efficient updating of keys, see @ref updating. * @param parentKey contains the information below which key * the keys should be gotten. * * @return Return how many keys you added. * * @return -1 on failure, the current key in returned shows the position. * In normal execution cases a positive value will be returned. * But in some cases you are not able to get keys and have to * return -1. If you declare kdbcGetnoError() you are done, but * otherwise you have to set the cause of the error. * (Will be added in 0.7.1) * * @ingroup backend */ ssize_t kdbGet_backend(KDB *handle, KeySet *returned, const Key *parentKey) { return 0; } /** * Store a keyset permanently. * * This function does everything related to set and remove keys in a * backend. There is only one function for that purpose to make * implementation and locking much easier. * * The keyset @p returned was filled in with information from the application * using elektra and the task of this function is to store it in a permanent * way so that a subsequent call of kdbGet_backend() can rebuild the keyset * as it was before. See the live cycle of a comment to understand: * @code void usercode (Key *key) { keySetComment (key, "mycomment"); // the usercode stores a comment for the key ksAppendKey(keyset, key); // append the key to the keyset kdbSet (handle, keyset, 0, 0); } // so now kdbSet is called int kdbSet(KDB *handle, KeySet *keyset, Key *parentKey, options) { // find appropriate backend kdbSet_backend (handle, keyset, 0); // the keyset with the key will be passed to this function } // so now kdbSet_backend(), which is the function described here, is called kdbSet_backend(KDB *handle, KeySet *keyset, Key *parentKey) { // the task of kdbSet_backend is now to store the comment Key *key = ksCurrent (keyset); // get out the key where the user set the comment before char *comment = allocate(size); keyGetComment (key, comment, size); savetodisc (comment); } * @endcode * Of course not only the comment, but all information of every key in the keyset * @p returned need to be stored permanetly. So this specification needs to give * an exhaustive list of information present in a key. * * @pre The keyset @p returned holds all keys which must be saved * permanently for this keyset. The keyset is sorted and rewinded. * All keys having children must be true for keyIsDir(). * * @pre The @p parentKey is the key which is the ancestor for all other keys in the * keyset. The first key of the keyset @p returned has the same keyname. * The parentKey is below the mountpoint, see kdbhGetMountpoint(). * * @pre The caller kdbSet will fulfill following parts: * - If the user does not want hidden keys they will be thrown away. * All keys in @p returned need to be stored permanently. * - If the user does not want dirs or only dirs kdbGet() will remove * the other. * - Sorting of the keyset. It is not important in which order the keys * are appended. * So make sure to set all keys, all directories and also all * hidden keys. If some of them are not wished, the caller kdbSet() will * sort them out. * * @invariant There are no global variables and kdbhGetBackendData() * only stores information which can be regenerated any time. * The handle is the same when it is the same backend. * * @post The information of the keyset @p returned is stored permanently. * * When some keys have KEY_FLAG_REMOVE set, that means return true for * keyNeedRemove(), remove the keys instead of getting them. In this case * the sorting order will be the reverse way, first will be the children, then * the parentKey when iterating over the KeySet returned. * * Lock your permanent storage in an exclusive way, no access of a * concurrent kdbSet_backend() or kdbGet_backend() is possible * and these methods block until the function has finished. * Otherwise declare kdbcGetnoLock(). * * @see kdbSet() for caller. * * @param handle contains internal information of @link kdbOpen() opened @endlink key database * @param returned contains a keyset with relevant keys * @param parentKey contains the information where to set the keys * * @return When everything works gracefully return the number of keys you set. * The cursor position and the keys remaining in the keyset are not important. * * @return Return 0 on success with no changed key in database * * @return Return -1 on failure. * * @note If any calls you use change errno, make sure to restore the old errno. * * @err In normal execution cases a positive value will be returned. * But in some cases you are not able to set keys and have to * return -1. If you declare kdbcGetnoError() you are done, but * otherwise you have to set the cause of the error. * (Will be added with 0.7.1) * * You also have to make sure that ksGetCursor() * shows to the position where the error appeared. * * @ingroup backend */ ssize_t kdbSet_backend(KDB *handle, KeySet *returned, const Key *parentKey) { return 0; } /** * All KDB methods implemented by the backend can have random names, except * kdbBackendFactory(). This is the single symbol that will be looked up * when loading the backend, and the first method of the backend * implementation that will be called. * * Its purpose is to publish the exported methods for libelektra.so. The * implementation inside the provided skeleton is usually enough: simply * call kdbBackendExport() with all methods that must be exported. * * The first paramter is the name of the backend. * Then every backend must have: * @c KDB_BE_OPEN, * @c KDB_BE_CLOSE, * @c KDB_BE_GET and * @c KDB_BE_SET * * You might also give following information by char *: * @c KDB_BE_VERSION, * @c KDB_BE_AUTHOR, * @c KDB_BE_LICENCE and * @c KDB_BE_DESCRIPTION * * You must use static "char arrays" in a read only segment. * Don't allocate storage, it won't be freed. * * With capability you can get that information on * runtime from any backend with kdbGetCapability(). * * The last parameter must be @c KDB_BE_END. * * @return kdbBackendExport() with the above described parameters. * @see kdbBackendExport() for an example * @see kdbOpenBackend() * @ingroup backend */ KDBEXPORT(backend) { return kdbBackendExport(BACKENDNAME, KDB_BE_OPEN, &kdbOpen_backend, KDB_BE_CLOSE, &kdbClose_backend, KDB_BE_GET, &kdbGet_backend, KDB_BE_SET, &kdbSet_backend, KDB_BE_END); } elektra-0.7.1/src/backends/filesys/0000777000076400001440000000000011365513213014172 500000000000000elektra-0.7.1/src/backends/filesys/Makefile.am0000644000076400001440000000131511365507605016152 00000000000000AM_CPPFLAGS = -I$(top_srcdir)/src/include noinst_LIBRARIES = libelektra-filesys.a libelektra_filesys_a_SOURCES = filesys.c filesys.h ../../include/kdb.h ../../include/kdbbackend.h libelektra_filesys_a_CFLAGS = -DELEKTRA_STATIC $(COPTFLAGS) $(CDBGFLAGS) backend_LTLIBRARIES = libelektra-filesys.la libelektra_filesys_la_SOURCES = filesys.c filesys.h ../../include/kdb.h ../../include/kdbbackend.h libelektra_filesys_la_LDFLAGS = -version-info $(BACKEND_VERSION_API) -module libelektra_filesys_la_LIBADD = ../../libelektra/libelektra.la libelektra_filesys_la_CFLAGS = $(COPTFLAGS) $(CDBGFLAGS) clean-local: rm -f *.gcno *.gcda *.gcno ../../libelektra/libelektra.la: cd ../../libelektra/ && $(MAKE) libelektra.la elektra-0.7.1/src/backends/filesys/Makefile.in0000644000076400001440000005167611365511150016170 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = src/backends/filesys DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/extensions.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/config.h CONFIG_CLEAN_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru libelektra_filesys_a_AR = $(AR) $(ARFLAGS) libelektra_filesys_a_LIBADD = am_libelektra_filesys_a_OBJECTS = \ libelektra_filesys_a-filesys.$(OBJEXT) libelektra_filesys_a_OBJECTS = $(am_libelektra_filesys_a_OBJECTS) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(backenddir)" backendLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(backend_LTLIBRARIES) libelektra_filesys_la_DEPENDENCIES = ../../libelektra/libelektra.la am_libelektra_filesys_la_OBJECTS = libelektra_filesys_la-filesys.lo libelektra_filesys_la_OBJECTS = $(am_libelektra_filesys_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/src/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libelektra_filesys_a_SOURCES) \ $(libelektra_filesys_la_SOURCES) DIST_SOURCES = $(libelektra_filesys_a_SOURCES) \ $(libelektra_filesys_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) INSTALL = @INSTALL@ ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BACKENDS = @BACKENDS@ BACKEND_VERSION_API = @BACKEND_VERSION_API@ BINDINGS = @BINDINGS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CDBGFLAGS = @CDBGFLAGS@ CFLAGS = @CFLAGS@ COPTFLAGS = @COPTFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSTDFLAGS = @CSTDFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDBGFLAGS = @CXXDBGFLAGS@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXOPTFLAGS = @CXXOPTFLAGS@ CXXSTDFLAGS = @CXXSTDFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_FALSE = @DEBUG_FALSE@ DEBUG_TRUE = @DEBUG_TRUE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ELEKTRATOOLS_VERSION_API = @ELEKTRATOOLS_VERSION_API@ ELEKTRA_VERSION_API = @ELEKTRA_VERSION_API@ EXEEXT = @EXEEXT@ EXPERIMENTAL_FALSE = @EXPERIMENTAL_FALSE@ EXPERIMENTAL_TRUE = @EXPERIMENTAL_TRUE@ F77 = @F77@ FFLAGS = @FFLAGS@ GENHTML = @GENHTML@ GREP = @GREP@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ HAVE_LIBLTDL_FALSE = @HAVE_LIBLTDL_FALSE@ HAVE_LIBLTDL_TRUE = @HAVE_LIBLTDL_TRUE@ HAVE_MAN2HTML_FALSE = @HAVE_MAN2HTML_FALSE@ HAVE_MAN2HTML_TRUE = @HAVE_MAN2HTML_TRUE@ HAVE_XML_FALSE = @HAVE_XML_FALSE@ HAVE_XML_TRUE = @HAVE_XML_TRUE@ HAVE_XSL_FALSE = @HAVE_XSL_FALSE@ HAVE_XSL_TRUE = @HAVE_XSL_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDB_VERSION = @KDB_VERSION@ KDB_VERSION_MAJOR = @KDB_VERSION_MAJOR@ KDB_VERSION_MAJORMINOR = @KDB_VERSION_MAJORMINOR@ KDB_VERSION_MICRO = @KDB_VERSION_MICRO@ KDB_VERSION_MINOR = @KDB_VERSION_MINOR@ LCOV = @LCOV@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VALGRIND = @VALGRIND@ VALGRINDTESTS_FALSE = @VALGRINDTESTS_FALSE@ VALGRINDTESTS_TRUE = @VALGRINDTESTS_TRUE@ VERSION = @VERSION@ XML2_CONFIG = @XML2_CONFIG@ XML_CPPFLAGS = @XML_CPPFLAGS@ XML_LIBS = @XML_LIBS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ backend_static_libs = @backend_static_libs@ backenddir = @backenddir@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ datarootdir = @datarootdir@ dbroot = @dbroot@ default_backend = @default_backend@ default_dbackend = @default_dbackend@ default_docbook = @default_docbook@ develdocdir = @develdocdir@ docdir = @docdir@ doxygen = @doxygen@ dvidir = @dvidir@ elektratools = @elektratools@ exec_prefix = @exec_prefix@ gconf_CFLAGS = @gconf_CFLAGS@ gconf_LIBS = @gconf_LIBS@ hlvlbackenddir = @hlvlbackenddir@ 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@ man2html = @man2html@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ privatelibs = @privatelibs@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ ulibdir = @ulibdir@ xsltproc = @xsltproc@ AM_CPPFLAGS = -I$(top_srcdir)/src/include noinst_LIBRARIES = libelektra-filesys.a libelektra_filesys_a_SOURCES = filesys.c filesys.h ../../include/kdb.h ../../include/kdbbackend.h libelektra_filesys_a_CFLAGS = -DELEKTRA_STATIC $(COPTFLAGS) $(CDBGFLAGS) backend_LTLIBRARIES = libelektra-filesys.la libelektra_filesys_la_SOURCES = filesys.c filesys.h ../../include/kdb.h ../../include/kdbbackend.h libelektra_filesys_la_LDFLAGS = -version-info $(BACKEND_VERSION_API) -module libelektra_filesys_la_LIBADD = ../../libelektra/libelektra.la libelektra_filesys_la_CFLAGS = $(COPTFLAGS) $(CDBGFLAGS) all: all-am .SUFFIXES: .SUFFIXES: .c .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 \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/backends/filesys/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/backends/filesys/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libelektra-filesys.a: $(libelektra_filesys_a_OBJECTS) $(libelektra_filesys_a_DEPENDENCIES) -rm -f libelektra-filesys.a $(libelektra_filesys_a_AR) libelektra-filesys.a $(libelektra_filesys_a_OBJECTS) $(libelektra_filesys_a_LIBADD) $(RANLIB) libelektra-filesys.a install-backendLTLIBRARIES: $(backend_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(backenddir)" || $(mkdir_p) "$(DESTDIR)$(backenddir)" @list='$(backend_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(backendLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(backenddir)/$$f'"; \ $(LIBTOOL) --mode=install $(backendLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(backenddir)/$$f"; \ else :; fi; \ done uninstall-backendLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(backend_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(backenddir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(backenddir)/$$p"; \ done clean-backendLTLIBRARIES: -test -z "$(backend_LTLIBRARIES)" || rm -f $(backend_LTLIBRARIES) @list='$(backend_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libelektra-filesys.la: $(libelektra_filesys_la_OBJECTS) $(libelektra_filesys_la_DEPENDENCIES) $(LINK) -rpath $(backenddir) $(libelektra_filesys_la_LDFLAGS) $(libelektra_filesys_la_OBJECTS) $(libelektra_filesys_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_filesys_a-filesys.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_filesys_la-filesys.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< libelektra_filesys_a-filesys.o: filesys.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_filesys_a_CFLAGS) $(CFLAGS) -MT libelektra_filesys_a-filesys.o -MD -MP -MF "$(DEPDIR)/libelektra_filesys_a-filesys.Tpo" -c -o libelektra_filesys_a-filesys.o `test -f 'filesys.c' || echo '$(srcdir)/'`filesys.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_filesys_a-filesys.Tpo" "$(DEPDIR)/libelektra_filesys_a-filesys.Po"; else rm -f "$(DEPDIR)/libelektra_filesys_a-filesys.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='filesys.c' object='libelektra_filesys_a-filesys.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_filesys_a_CFLAGS) $(CFLAGS) -c -o libelektra_filesys_a-filesys.o `test -f 'filesys.c' || echo '$(srcdir)/'`filesys.c libelektra_filesys_a-filesys.obj: filesys.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_filesys_a_CFLAGS) $(CFLAGS) -MT libelektra_filesys_a-filesys.obj -MD -MP -MF "$(DEPDIR)/libelektra_filesys_a-filesys.Tpo" -c -o libelektra_filesys_a-filesys.obj `if test -f 'filesys.c'; then $(CYGPATH_W) 'filesys.c'; else $(CYGPATH_W) '$(srcdir)/filesys.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_filesys_a-filesys.Tpo" "$(DEPDIR)/libelektra_filesys_a-filesys.Po"; else rm -f "$(DEPDIR)/libelektra_filesys_a-filesys.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='filesys.c' object='libelektra_filesys_a-filesys.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_filesys_a_CFLAGS) $(CFLAGS) -c -o libelektra_filesys_a-filesys.obj `if test -f 'filesys.c'; then $(CYGPATH_W) 'filesys.c'; else $(CYGPATH_W) '$(srcdir)/filesys.c'; fi` libelektra_filesys_la-filesys.lo: filesys.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_filesys_la_CFLAGS) $(CFLAGS) -MT libelektra_filesys_la-filesys.lo -MD -MP -MF "$(DEPDIR)/libelektra_filesys_la-filesys.Tpo" -c -o libelektra_filesys_la-filesys.lo `test -f 'filesys.c' || echo '$(srcdir)/'`filesys.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_filesys_la-filesys.Tpo" "$(DEPDIR)/libelektra_filesys_la-filesys.Plo"; else rm -f "$(DEPDIR)/libelektra_filesys_la-filesys.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='filesys.c' object='libelektra_filesys_la-filesys.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_filesys_la_CFLAGS) $(CFLAGS) -c -o libelektra_filesys_la-filesys.lo `test -f 'filesys.c' || echo '$(srcdir)/'`filesys.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(backenddir)"; 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: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_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-backendLTLIBRARIES clean-generic clean-libtool \ clean-local clean-noinstLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-backendLTLIBRARIES install-exec-am: install-info: install-info-am install-man: 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-backendLTLIBRARIES uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean \ clean-backendLTLIBRARIES clean-generic clean-libtool \ clean-local clean-noinstLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-backendLTLIBRARIES install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-backendLTLIBRARIES \ uninstall-info-am clean-local: rm -f *.gcno *.gcda *.gcno ../../libelektra/libelektra.la: cd ../../libelektra/ && $(MAKE) libelektra.la # 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: elektra-0.7.1/src/backends/filesys/filesys.c0000644000076400001440000004617311365506635015755 00000000000000/*************************************************************************** filesys.c - A filesystem backend implementation for Elektra ------------------- begin : Mon Dec 25 2004 copyright : (C) 2004 by Avi Alkalay email : avi@unix.sh ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ /*************************************************************************** * * * This is the implementation of a filesystem backend for the * * Elektra. Each Key is a file in the filesystem. * * It is as secure as filesystem security. It is as reliable * * as filesystem. It uses only standards C calls, which makes it * * usable by very low level or early boot stage software, like * * /sbin/init. * * * ***************************************************************************/ #include "filesys.h" int kdbOpen_filesys(KDB *handle) { KDBCap * cap = kdbhGetCapability(handle); cap->noMode=1; cap->noMount=1; cap->noError=1; kdbhSetCapability (handle,cap); #if DEBUG && VERBOSE fprintf (stderr, "you open filesys " BACKENDVERSION "\n"); #endif return 0; } int kdbClose_filesys(KDB *handle) { return 0; } ssize_t kdbGet_filesys(KDB *handle, KeySet *returned, const Key *parentKey) { DIR *parentDir; char buffer[MAX_KEY_LENGTH]; struct dirent *entry; Key *keyEntry; Key *found; KeySet *appended = ksNew (ksGetSize(returned)*2, KS_END); int errnosave = errno; /* - Convert parent key name into a real filename - Check if it is a directory. Open it - Browse, read and include in the KeySet */ if (kdbbGetFullFilename(handle,parentKey,buffer,sizeof(buffer)) == -1) { errno = errnosave; return -1; } parentDir=opendir(buffer); /* Check if Key is not a directory or doesn't exist. * Propagate errno */ if (!parentDir) { errno=KDB_ERR_NODIR; ksDel (appended); errno = errnosave; return -1; } /* add the parentKey itself Return value of kdbGetKey_filesys is irrelevant, because we already know its a directory */ keyEntry=keyDup(parentKey); kdbGetKey_filesys(handle,keyEntry); ksAppendKey(appended,keyEntry); while ((entry=readdir(parentDir))) { /* Ignore '.', '..' and file containing information about directory itself */ if (!strcmp(entry->d_name,".") || !strcmp(entry->d_name,"..") || !strcmp(entry->d_name,DIR_FILENAME)) continue; keyEntry = keyNew(0); if (kdbbGetFullKeyName (handle, entry->d_name, parentKey, keyEntry) == -1) { closedir (parentDir); errno = errnosave; return -1; } found = ksLookup (returned, keyEntry, KDB_O_WITHOWNER|KDB_O_POP); if (found) { keyDel (keyEntry); keyEntry = found; /* use found instead */ } if (keyNeedStat(parentKey)) set_bit (keyEntry->flags, KEY_FLAG_STAT); if (kdbGetKey_filesys(handle,keyEntry) != -1) { keyflag_t semiflag; /* Remove the SYNC flag */ semiflag= KEY_FLAG_SYNC; semiflag=~semiflag; keyEntry->flags &= semiflag; ksAppendKey(appended,keyEntry); } else keyDel (keyEntry); } /* while(readdir) */ closedir(parentDir); ksClear (returned); /* delete all other keys */ ksAppend (returned, appended); ksDel (appended); errno = errnosave; return returned->size; } /** * A probably inefficient implementation for kdbSet() * method, but in case of filesys it is also the most effective one, because every * key is independed. * * @see kdbSet(), kdbSet_backend() * @return 0 on success * @return -1 on failure and @c errno is propagated */ ssize_t kdbSet_filesys(KDB *handle, KeySet *returned, const Key *parentKey) { int errnosave = errno; Key *current=ksCurrent(returned); if (!current) current=ksNext(returned); while (current) { if (keyNeedRemove(current)) { if (kdbRemoveKey_filesys (handle, current)) { errno = errnosave; return -1; } } else if (keyNeedSync(current)) { if (kdbSetKey_filesys(handle,current)) { errno = errnosave; return -1; } } current=ksNext(returned); } errno = errnosave; return 0; } /************************************* * Helpers * *************************************/ int kdbGetKey_filesys(KDB *handle, Key *key) { char keyFilename[MAX_KEY_LENGTH]; struct stat keyFilenameInfo; int fd; ssize_t pos; keyflag_t semiflag; FILE *input; pos=kdbbGetFullFilename(handle,key,keyFilename,sizeof(keyFilename)); if (pos == -1) return -1; /* something is wrong */ stat(keyFilename,&keyFilenameInfo); keyFromStat(key,&keyFilenameInfo); if (keyNeedStat (key)) { /* Remove the SYNC flag */ semiflag= KEY_FLAG_SYNC; semiflag=~semiflag; key->flags &= semiflag; return 0; } if ((fd=open(keyFilename,O_RDONLY))==-1) { if (errno==ENOTDIR) errno=KDB_ERR_NOTFOUND; return -1; } if (keyIsDir(key)) { close(fd); strcat(keyFilename,"/"); strcat(keyFilename,DIR_FILENAME); if ((fd=open(keyFilename,O_RDONLY))!=-1) { input=fdopen(fd,"r"); kdbbReadLock (input); if (keyFileUnserialize(key,input)) { kdbbUnlock (input); fclose(input); return -1; } kdbbUnlock (input); fclose(input); } } else { input=fdopen(fd,"r"); kdbbReadLock (input); if (keyFileUnserialize(key,input)) { kdbbUnlock (input); fclose(input); return -1; } kdbbUnlock (input); fclose(input); } /* Remove the SYNC flag */ semiflag=KEY_FLAG_SYNC; semiflag=~semiflag; key->flags &= semiflag; return 0; } int keyToFile(KDB *handle, Key *key, char *keyFilename) { int fd=0; FILE *output=0; int errnosave; /* Open key file with its full file name */ fd=open(keyFilename,O_CREAT | O_RDWR | O_TRUNC, key->mode); if (fd==-1) return -1; if (!(output=fdopen(fd,"w+"))) return -1; kdbbWriteLock (output); /* Set permissions, might fail without problems */ errnosave = errno; fchown(fd,key->uid,key->gid); fchmod(fd,key->mode); errno = errnosave; /* Write file content */ if (keyFileSerialize(key,output)) { kdbbUnlock (output); fclose(output); return -1; } kdbbUnlock (output); fclose(output); return 0; } int kdbSetKey_filesys(KDB *handle, Key *key) { char keyFilename[MAX_KEY_LENGTH]; char genericBuffer[MAX_PATH_LENGTH]; char *cursor=0, *last=0; ssize_t pos=0; keyflag_t semiflag=0; struct stat stated; int rc=0; int exists=0; int errnosave; pos=kdbbGetFullFilename(handle,key,keyFilename,sizeof(keyFilename)); if (pos == -1) return -1; /* Something is wrong. Propagate errno. */ exists = ! stat(keyFilename,&stated); if (! exists && errno!=ENOENT && errno!=ENOTDIR) return -1; /* propagate errno */ if (! exists) { /* Entry does not exist in the filesystem. */ /* It is our job to create it. */ /* Now this block will take care to check or create entire file path to key */ /* check if parent dir already exists */ last=strrchr(keyFilename,(int)'/'); strncpy(genericBuffer,keyFilename,last-keyFilename); genericBuffer[last-keyFilename]=0; /* first test existence of immediate parent */ if (stat(genericBuffer,&stated) || !S_ISDIR(stated.st_mode)) { /* create all path recursively until before our basename */ mode_t parentMode = 0777; /* KEY_DEF_MODE | KEY_DEF_DIR; */ last = strrchr(keyFilename,'/'); cursor = strchr(keyFilename,'/'); cursor++; /* skip first occurence */ if (!last || !cursor) { /* bizarre key name */ errno=KDB_ERR_INVALIDKEY; return -1; } /* The deep dir maker loop */ for (cursor=strchr(cursor,'/'); cursor && (cursor <= last); cursor=strchr(cursor,'/')) { strncpy(genericBuffer,keyFilename,cursor-keyFilename); genericBuffer[cursor-keyFilename]=0; #ifdef HAVE_WIN32 if (mkdir(genericBuffer)<0) { #else if (mkdir(genericBuffer,parentMode)<0) { #endif if (errno==EEXIST) { /* There is something there already. Check. */ stat(genericBuffer,&stated); if (!S_ISDIR(stated.st_mode)) { /* Trying to create a dir on something that is not. */ /* Convert into a dir in a very low level way. */ char tempName[MAX_PATH_LENGTH]; char finalName[MAX_PATH_LENGTH]; sprintf(tempName,"%s.%d",genericBuffer,rand()); if (rename(genericBuffer,tempName)<0) return -1; /* Now tries to create the dir again */ #ifdef HAVE_WIN32 if (mkdir(genericBuffer)<0) { #else if (mkdir(genericBuffer,parentMode)<0) { #endif /* Rollback on failure */ rename(tempName,genericBuffer); return -1; } sprintf(finalName,"%s/%s",genericBuffer,DIR_FILENAME); if (rename(tempName,finalName)<0) return -1; } /* Regular key converted into a dir key. */ } else return -1; /* propagate errno */ } #ifdef HAVE_WIN32 /* Since mkdir on win32 can't set a mode for us we need to do it manually */ if(chmod(genericBuffer, parentMode) < 0) return -1; #endif cursor++; } /* END OF: dir maker loop */ } /* END OF: parent is not there */ } /* END OF: !exists (or, preparation for key creation) */ if (keyIsDir(key)) { if ( exists && !S_ISDIR(stated.st_mode) ) { /* New key is dir, but file there is not */ /* Remove the file */ rc=unlink(keyFilename); if (rc && errno!=ENOENT) return -1; } #ifdef HAVE_WIN32 if (mkdir(keyFilename)<0 && errno!=EEXIST) return -1; /* propagate errno */ /* Since mkdir on win32 can't set a mode for us we need to do it manually */ if (chmod(keyFilename, key->mode)<0) return -1; #else if (mkdir(keyFilename,key->mode)<0 && errno!=EEXIST) return -1; #endif /* Dir permissions... */ errnosave = errno; chown(keyFilename,key->uid,key->gid); chmod(keyFilename,key->mode); errno = errnosave; /* Save Value, Comment and Type... */ strcat(keyFilename,"/"); /* Append a filename for key data and comment */ strcat(keyFilename,DIR_FILENAME); rc=keyToFile(handle,key,keyFilename); } else { /* key is not dir */ if ( exists && S_ISDIR(stated.st_mode) ) { /* but inode there is a dir */ DIR *dir=0; int hasChild=0; struct dirent *entry=0; /* Check if it has child keys */ dir=opendir(keyFilename); if (!dir) return -1; while ( !hasChild && (entry=readdir(dir)) ) { /* Ignore '.' and '..' directory entries */ if (!strcmp(entry->d_name,".") || !strcmp(entry->d_name,"..") || !strcmp(entry->d_name,DIR_FILENAME)) continue; else hasChild=1; } closedir(dir); if (hasChild) { /* Dir contains files, so can't un-dir it */ errno=KDB_ERR_NOTEMPTY; return -1; } /* We'll have to transform it to a non-dir key, so... */ /* Remove the directory file if any */ sprintf(genericBuffer,"%s/%s",keyFilename,DIR_FILENAME); rc=unlink(genericBuffer); if (rc && errno!=ENOENT) return -1; /* Remove the dir */ rc=rmdir(keyFilename); if (rc) return -1; } /* Its a plain key, so simply write to disk */ rc=keyToFile(handle,key,keyFilename); } /* END OF: key is not dir */ if (rc == 0) { /* Remove the SYNC flag */ semiflag=KEY_FLAG_SYNC; semiflag=~semiflag; key->flags &= semiflag; } return rc; } int kdbRemoveKey_filesys(KDB *handle, Key *key) { char fileName[MAX_PATH_LENGTH]; ssize_t rc; struct stat stated; keyflag_t semiflag; rc=kdbbGetFullFilename(handle,key,fileName,sizeof(fileName)); if (rc == -1) return -1; if (stat(fileName,&stated)) return -1; if ( S_ISDIR(stated.st_mode) ) { /* inode there is a dir */ DIR *dir=0; int hasChild=0; int hasDataEntry=0; char dataFilename[MAX_PATH_LENGTH]; struct dirent *entry=0; /* Check if it has child keys */ dir=opendir(fileName); if (!dir) return -1; while ( !hasChild && (entry=readdir(dir)) ) { /* Ignore DIR_FILENAME, '.' and '..' directory entries */ if (!strcmp(entry->d_name,".") || !strcmp(entry->d_name,"..") || (hasDataEntry=!strcmp(entry->d_name,DIR_FILENAME))) continue; else hasChild=1; } closedir(dir); if (hasChild) { /* Dir contains files, so can't un-dir it */ errno=ENOTEMPTY; return -1; } if (hasDataEntry) { /* We'll have to transform it to a non-dir key, so... */ /* Remove the directory file if any */ sprintf(dataFilename,"%s/%s",fileName,DIR_FILENAME); rc=remove(dataFilename); if (rc && errno!=ENOENT) return -1; } } /* Remove the SYNC flag */ semiflag=KEY_FLAG_SYNC; semiflag=~semiflag; key->flags &= semiflag; return remove(fileName); } /** * Makes a key object from its serialized form, coming from a file. * * @param key the pre-initialized key that will contain our data. * @param input the opened file from which we want to read. * @return 0 on success. * @ingroup internals */ int keyFileUnserialize(Key *key,FILE *input) { char generalBuffer[BUFFER_SIZE]; size_t currentBufferSize; char version[10]; unsigned int nversion=0; char type[5]; char *data=0; size_t dataSize=0; char *comment=0; size_t commentSize=0; int readComment=1; int eof=0; /* The serialized format is ------------------------- RG001\n type\n comment (with newlines)\n \n The data encoded as text ------------------------- */ if (!fgets(version, sizeof(version), input)) return -1; if (strncmp(version,"RG",2)) { /* Doesn't look like a key file */ errno=KDB_ERR_INVALIDKEY; return -1; } nversion=atoi(version+2); if (!nversion || nversion != RG_KEY_FORMAT_VERSION) { errno=KDB_ERR_INVALIDKEY; return -1; } if (!fgets(type, sizeof(type), input)) return -1; while (readComment) { if (fgets(generalBuffer,sizeof(generalBuffer),input)) { if (memcmp(generalBuffer,"\n\0",8)) { /* This is not the beginning of the data part so it is part of comment */ currentBufferSize=kdbiStrLen(generalBuffer); if (!comment) { comment=(char *)malloc(commentSize=currentBufferSize); strcpy(comment,generalBuffer); } else { char *buffer=0; --commentSize; /* remove awareness of previous \0 */ buffer=malloc(commentSize+currentBufferSize); strcpy(buffer,comment); strcat(buffer,generalBuffer); comment=realloc(comment,commentSize+=currentBufferSize); assert(comment!=NULL); strcpy(comment,buffer); free(buffer); } } else readComment=0; } else { readComment=0; eof=1; } } /* Remove last \n */ if (commentSize > 1 && (*(comment+commentSize-2) == '\n')) { *(comment+commentSize-2)=0; --commentSize; } if (comment && kdbbUTF8Engine(UTF8_FROM,&comment,&commentSize)) { free(comment); return -1; } /* Now read the data section */ if (!eof) { while (fgets(generalBuffer,sizeof(generalBuffer),input)) { currentBufferSize=strlen(generalBuffer); if (!data) { data=(char *)malloc(dataSize=(currentBufferSize+1)); strcpy(data,generalBuffer); } else { char *buffer=0; buffer=malloc(dataSize+currentBufferSize); strcpy(buffer,data); strcat(buffer,generalBuffer); data=realloc(data,dataSize+=currentBufferSize); assert(data!=NULL); strcpy(data,buffer); free(buffer); } } } /* Put in the Key object */ keySetComment(key,comment); if (comment) free(comment); keySetType(key,atoi(type)); if (!dataSize) { keySetRaw(key,0,0); return 0; } if (keyIsString (key)) { if (kdbbUTF8Engine(UTF8_FROM,&data,&dataSize)) { free(data); return -1; } keySetRaw(key,data,dataSize); } else if (keyIsBinary(key)) { /* Binary decoded data. */ char *decoded=0; size_t decodedSize; /* raw data is maximum half the size of text-decoded data */ decodedSize=dataSize/2; decoded=malloc(decodedSize); if (!(decodedSize=kdbbDecode(data,decoded))) return -1; keySetRaw(key,decoded,decodedSize); free(decoded); } free(data); return 0; } /** * Writes the serialized form of the given key onto a file. * * This is the counterpart of keyFileUnserialize(). * @param key the key we want to serialize. * @param output the opened file to be written. * @return 0 on success. * @see keyFileUnserialize() * @ingroup internals */ int keyFileSerialize(Key *key, FILE *output) { /* The serialized format is ------------------------- RG001\n type\n comment (with newlines)\n \n The data encoded as text ------------------------- */ fprintf(output,"RG%03d\n",RG_KEY_FORMAT_VERSION); fprintf(output,"%d\n", keyGetType (key)); if (key->comment) { if (kdbbNeedsUTF8Conversion()) { size_t convertedCommentSize=key->commentSize; char *convertedComment=malloc(convertedCommentSize); memcpy(convertedComment,key->comment,key->commentSize); if (kdbbUTF8Engine(UTF8_TO,&convertedComment,&convertedCommentSize)) { free(convertedComment); return -1; } fprintf(output,"%s\n",convertedComment); free(convertedComment); } else fprintf(output,"%s\n",key->comment); } fputs("\n",output); fflush(output); if (key->dataSize) { /* There is some data to write */ if (keyIsString (key)) { /* String or similar type of value */ if (kdbbNeedsUTF8Conversion()) { size_t convertedDataSize=key->dataSize; char *convertedData=malloc(convertedDataSize); memcpy(convertedData,key->data,key->dataSize); if (kdbbUTF8Engine(UTF8_TO,&convertedData,&convertedDataSize)) { free(convertedData); return -1; } fprintf(output,"%s",convertedData); free(convertedData); } else fputs(key->data,output); } else if (keyIsBinary (key)) { /* Binary values */ char *encoded=malloc(3*key->dataSize+1); size_t encodedSize; encodedSize=kdbbEncode(key->data,key->dataSize,encoded); fwrite(encoded,encodedSize,1,output); free(encoded); } // else unhandeled: has data but neighter string nor binary, so drop the data } return 0; } /** * Stats a key file. * Will not open the key file, but only stat it, not changing its last * access time. * The resulting key will have all info, but comment, value and value type. * * @param stat the stat structure to get metadata from * @param key object to be filled with info from stat structure * @return 0 on success, -1 otherwise * @ingroup internals */ int keyFromStat(Key *key,struct stat *stat) { keySetUID(key,stat->st_uid); keySetGID(key,stat->st_gid); // remove directory bit keySetMode(key,stat->st_mode & 0777); key->atime=stat->st_atime; key->mtime=stat->st_mtime; key->ctime=stat->st_ctime; return 0; } KDBEXPORT(filesys) { return kdbBackendExport(BACKENDNAME, KDB_BE_OPEN, &kdbOpen_filesys, KDB_BE_CLOSE, &kdbClose_filesys, KDB_BE_GET, &kdbGet_filesys, KDB_BE_SET, &kdbSet_filesys, KDB_BE_VERSION, BACKENDVERSION, KDB_BE_AUTHOR, "Avi Alkalay ", KDB_BE_LICENCE, "BSD", KDB_BE_DESCRIPTION, "Every key is represented by a single file", KDB_BE_END); } elektra-0.7.1/src/backends/filesys/filesys.h0000644000076400001440000001274511365506635015760 00000000000000/*************************************************************************** filesys.h - A filesystem backend implementation for Elektra ------------------- begin : Mon Dec 25 2004 copyright : (C) 2004 by Avi Alkalay email : avi@unix.sh ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ /*************************************************************************** * * * This is the implementation of a filesystem backend for the * * Elektra. Each Key is a file in the filesystem. * * It is as secure as filesystem security. It is as reliable * * as filesystem. It uses only standards C calls, which makes it * * usable by very low level or early boot stage software, like * * /sbin/init. * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include #include #include #include #include #include #include #include #define BACKENDNAME "filesys" #define BACKENDVERSION "0.2.1" /* When FORMAT_VERSION changes, FORMAT must change too. */ #define RG_KEY_FORMAT_VERSION 2 #define RG_KEY_FORMAT "RG00" RG_KEY_FORMAT_VERSION char *DIR_FILENAME="%%dirdata"; int kdbbWriteLock (FILE *f); int kdbbReadLock (FILE *f); int kdbbUnlock (FILE *f); /* These are some helpers we'll define bellow */ int keyFileUnserialize(Key *key,FILE *input); size_t kdbGetFullFilename(const Key *forKey,char *returned,size_t maxSize); int keyFileSerialize(Key *key, FILE *output); int keyFromStat(Key *key,struct stat *stat); int kdbGetKey_filesys(KDB *handle, Key *key); int kdbRemoveKey_filesys(KDB *handle, Key *key); int kdbSetKey_filesys(KDB *handle, Key *key); /***************** * Error codes *****************/ /* * Error codes. * * Methods return -1 or NULL on failure. To indicate what the problem * was @c errno is propagated to one of the values below. * * The idea is to keep compatibility to POSIX @c errno system, so each library * error code maps to some POSIX E* error. Some mappings really make no sense, * so to detect errors use the following error names, and to detect * system's, use the naming conventions documented in @c errno man page. * * A very robust program should check the return value and @c errno * after each API call. * * @ingroup kdb * @see kdbhGetError(), kdbhSetError() * @see kdbStrError() */ enum KDBErr { KDB_ERR_OK=0, /*!< No error */ /* Errors related to invalid/uninitialized objects */ KDB_ERR_NULLKEY=EINVAL, /*!< Null Key object */ /* Errors related to bad key names or keys not found */ KDB_ERR_NOTFOUND=ENOENT, /*!< Key was not found */ KDB_ERR_INVALIDKEY=ESRCH, /*!< Key name not valid */ /* Errors related to empty internal key properties */ KDB_ERR_NOKEY=EFAULT, /*!< Key has no name */ KDB_ERR_NODATA=ENODEV, /*!< Key has no data */ KDB_ERR_NODESC=ENOMSG, /*!< Key has no comment */ KDB_ERR_NOOWNER=EDOM, /*!< Key has no user domain set */ KDB_ERR_NOGROUP=ECHILD, /*!< Key has no group */ KDB_ERR_NOTIME=ENOTTY, /*!< Key has no access time set */ KDB_ERR_OVERFLOW=EOVERFLOW, /*!< Key has too large value to convert it to type */ /* Errors related to permissions*/ KDB_ERR_NOCRED=EACCES, /*!< No credentials to access resource */ KDB_ERR_NOTEMPTY=ENOTEMPTY, /*!< Tried to delete directory key with children */ /* Errors related to no memory, failed internal operations */ KDB_ERR_TRUNC=ERANGE, /*!< Buffer was too small */ KDB_ERR_TOOLONG=ENAMETOOLONG, /*!< String is too big for buffer */ KDB_ERR_NOMEM=ENOMEM, /*!< Out of memory */ KDB_ERR_TYPEMISMATCH=EBADF, /*!< Failed to convert key data due to data type */ KDB_ERR_CONVERT=EILSEQ, /*!< Could not utf8 convert data or name */ /* Errors related to backend access or opening */ KDB_ERR_NOSYS=ENOSYS, /*!< Backend method not implemented */ KDB_ERR_EBACKEND=EIO, /*!< Error opening backend */ KDB_ERR_BACKEND=EAGAIN, /*!< Error in the backend in reading or writing the data */ KDB_ERR_CONFIG=ENXIO, /*!< Essential configuration for mountpoint missing */ /* Errors related to backend storage */ KDB_ERR_NODIR=ENOTDIR, /*!< The file where key should be is not a directory key */ KDB_ERR_NOSPACE=ENOSPC, /*!< No space left on device */ KDB_ERR_NOLOCK=ENOLCK, /*!< Could not acquire lock */ KDB_ERR_NOTSUP=ENOTSUP, /*!< Operation not supported could not set or delete key */ KDB_ERR_PERM=EPERM, /*!< Could not access data because of permission problem */ KDB_ERR_PIPE=EPIPE, /*!< Broken Pipe */ KDB_ERR_EROFS=EROFS, /*!< Read only filesystem */ KDB_ERR_EXDEV=EXDEV /*!< Improper link */ }; elektra-0.7.1/src/backends/fstab/0000777000076400001440000000000011365513213013613 500000000000000elektra-0.7.1/src/backends/fstab/Makefile.am0000644000076400001440000000125611365507605015577 00000000000000 # $Id$ AM_CPPFLAGS = -I$(top_srcdir)/src/include noinst_LIBRARIES = libelektra-fstab.a libelektra_fstab_a_SOURCES = fstab.c ../../include/kdb.h ../../include/kdbbackend.h libelektra_fstab_a_CFLAGS = -DELEKTRA_STATIC $(COPTFLAGS) $(CDBGFLAGS) backend_LTLIBRARIES = libelektra-fstab.la libelektra_fstab_la_SOURCES = fstab.c ../../include/kdb.h ../../include/kdbbackend.h libelektra_fstab_la_LDFLAGS = -version-info $(BACKEND_VERSION_API) -module libelektra_fstab_la_LIBADD = ../../libelektra/libelektra.la libelektra_fstab_la_CFLAGS = $(COPTFLAGS) $(CDBGFLAGS) clean-local: rm -f *.gcno *.gcda *.gcno ../../libelektra/libelektra.la: cd ../../libelektra/ && $(MAKE) libelektra.la elektra-0.7.1/src/backends/fstab/Makefile.in0000644000076400001440000005126111365511150015577 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ # $Id$ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = src/backends/fstab DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/extensions.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/config.h CONFIG_CLEAN_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru libelektra_fstab_a_AR = $(AR) $(ARFLAGS) libelektra_fstab_a_LIBADD = am_libelektra_fstab_a_OBJECTS = libelektra_fstab_a-fstab.$(OBJEXT) libelektra_fstab_a_OBJECTS = $(am_libelektra_fstab_a_OBJECTS) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(backenddir)" backendLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(backend_LTLIBRARIES) libelektra_fstab_la_DEPENDENCIES = ../../libelektra/libelektra.la am_libelektra_fstab_la_OBJECTS = libelektra_fstab_la-fstab.lo libelektra_fstab_la_OBJECTS = $(am_libelektra_fstab_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/src/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libelektra_fstab_a_SOURCES) $(libelektra_fstab_la_SOURCES) DIST_SOURCES = $(libelektra_fstab_a_SOURCES) \ $(libelektra_fstab_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) INSTALL = @INSTALL@ ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BACKENDS = @BACKENDS@ BACKEND_VERSION_API = @BACKEND_VERSION_API@ BINDINGS = @BINDINGS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CDBGFLAGS = @CDBGFLAGS@ CFLAGS = @CFLAGS@ COPTFLAGS = @COPTFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSTDFLAGS = @CSTDFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDBGFLAGS = @CXXDBGFLAGS@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXOPTFLAGS = @CXXOPTFLAGS@ CXXSTDFLAGS = @CXXSTDFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_FALSE = @DEBUG_FALSE@ DEBUG_TRUE = @DEBUG_TRUE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ELEKTRATOOLS_VERSION_API = @ELEKTRATOOLS_VERSION_API@ ELEKTRA_VERSION_API = @ELEKTRA_VERSION_API@ EXEEXT = @EXEEXT@ EXPERIMENTAL_FALSE = @EXPERIMENTAL_FALSE@ EXPERIMENTAL_TRUE = @EXPERIMENTAL_TRUE@ F77 = @F77@ FFLAGS = @FFLAGS@ GENHTML = @GENHTML@ GREP = @GREP@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ HAVE_LIBLTDL_FALSE = @HAVE_LIBLTDL_FALSE@ HAVE_LIBLTDL_TRUE = @HAVE_LIBLTDL_TRUE@ HAVE_MAN2HTML_FALSE = @HAVE_MAN2HTML_FALSE@ HAVE_MAN2HTML_TRUE = @HAVE_MAN2HTML_TRUE@ HAVE_XML_FALSE = @HAVE_XML_FALSE@ HAVE_XML_TRUE = @HAVE_XML_TRUE@ HAVE_XSL_FALSE = @HAVE_XSL_FALSE@ HAVE_XSL_TRUE = @HAVE_XSL_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDB_VERSION = @KDB_VERSION@ KDB_VERSION_MAJOR = @KDB_VERSION_MAJOR@ KDB_VERSION_MAJORMINOR = @KDB_VERSION_MAJORMINOR@ KDB_VERSION_MICRO = @KDB_VERSION_MICRO@ KDB_VERSION_MINOR = @KDB_VERSION_MINOR@ LCOV = @LCOV@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VALGRIND = @VALGRIND@ VALGRINDTESTS_FALSE = @VALGRINDTESTS_FALSE@ VALGRINDTESTS_TRUE = @VALGRINDTESTS_TRUE@ VERSION = @VERSION@ XML2_CONFIG = @XML2_CONFIG@ XML_CPPFLAGS = @XML_CPPFLAGS@ XML_LIBS = @XML_LIBS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ backend_static_libs = @backend_static_libs@ backenddir = @backenddir@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ datarootdir = @datarootdir@ dbroot = @dbroot@ default_backend = @default_backend@ default_dbackend = @default_dbackend@ default_docbook = @default_docbook@ develdocdir = @develdocdir@ docdir = @docdir@ doxygen = @doxygen@ dvidir = @dvidir@ elektratools = @elektratools@ exec_prefix = @exec_prefix@ gconf_CFLAGS = @gconf_CFLAGS@ gconf_LIBS = @gconf_LIBS@ hlvlbackenddir = @hlvlbackenddir@ 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@ man2html = @man2html@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ privatelibs = @privatelibs@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ ulibdir = @ulibdir@ xsltproc = @xsltproc@ AM_CPPFLAGS = -I$(top_srcdir)/src/include noinst_LIBRARIES = libelektra-fstab.a libelektra_fstab_a_SOURCES = fstab.c ../../include/kdb.h ../../include/kdbbackend.h libelektra_fstab_a_CFLAGS = -DELEKTRA_STATIC $(COPTFLAGS) $(CDBGFLAGS) backend_LTLIBRARIES = libelektra-fstab.la libelektra_fstab_la_SOURCES = fstab.c ../../include/kdb.h ../../include/kdbbackend.h libelektra_fstab_la_LDFLAGS = -version-info $(BACKEND_VERSION_API) -module libelektra_fstab_la_LIBADD = ../../libelektra/libelektra.la libelektra_fstab_la_CFLAGS = $(COPTFLAGS) $(CDBGFLAGS) all: all-am .SUFFIXES: .SUFFIXES: .c .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 \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/backends/fstab/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/backends/fstab/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libelektra-fstab.a: $(libelektra_fstab_a_OBJECTS) $(libelektra_fstab_a_DEPENDENCIES) -rm -f libelektra-fstab.a $(libelektra_fstab_a_AR) libelektra-fstab.a $(libelektra_fstab_a_OBJECTS) $(libelektra_fstab_a_LIBADD) $(RANLIB) libelektra-fstab.a install-backendLTLIBRARIES: $(backend_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(backenddir)" || $(mkdir_p) "$(DESTDIR)$(backenddir)" @list='$(backend_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(backendLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(backenddir)/$$f'"; \ $(LIBTOOL) --mode=install $(backendLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(backenddir)/$$f"; \ else :; fi; \ done uninstall-backendLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(backend_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(backenddir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(backenddir)/$$p"; \ done clean-backendLTLIBRARIES: -test -z "$(backend_LTLIBRARIES)" || rm -f $(backend_LTLIBRARIES) @list='$(backend_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libelektra-fstab.la: $(libelektra_fstab_la_OBJECTS) $(libelektra_fstab_la_DEPENDENCIES) $(LINK) -rpath $(backenddir) $(libelektra_fstab_la_LDFLAGS) $(libelektra_fstab_la_OBJECTS) $(libelektra_fstab_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_fstab_a-fstab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_fstab_la-fstab.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< libelektra_fstab_a-fstab.o: fstab.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_fstab_a_CFLAGS) $(CFLAGS) -MT libelektra_fstab_a-fstab.o -MD -MP -MF "$(DEPDIR)/libelektra_fstab_a-fstab.Tpo" -c -o libelektra_fstab_a-fstab.o `test -f 'fstab.c' || echo '$(srcdir)/'`fstab.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_fstab_a-fstab.Tpo" "$(DEPDIR)/libelektra_fstab_a-fstab.Po"; else rm -f "$(DEPDIR)/libelektra_fstab_a-fstab.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fstab.c' object='libelektra_fstab_a-fstab.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_fstab_a_CFLAGS) $(CFLAGS) -c -o libelektra_fstab_a-fstab.o `test -f 'fstab.c' || echo '$(srcdir)/'`fstab.c libelektra_fstab_a-fstab.obj: fstab.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_fstab_a_CFLAGS) $(CFLAGS) -MT libelektra_fstab_a-fstab.obj -MD -MP -MF "$(DEPDIR)/libelektra_fstab_a-fstab.Tpo" -c -o libelektra_fstab_a-fstab.obj `if test -f 'fstab.c'; then $(CYGPATH_W) 'fstab.c'; else $(CYGPATH_W) '$(srcdir)/fstab.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_fstab_a-fstab.Tpo" "$(DEPDIR)/libelektra_fstab_a-fstab.Po"; else rm -f "$(DEPDIR)/libelektra_fstab_a-fstab.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fstab.c' object='libelektra_fstab_a-fstab.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_fstab_a_CFLAGS) $(CFLAGS) -c -o libelektra_fstab_a-fstab.obj `if test -f 'fstab.c'; then $(CYGPATH_W) 'fstab.c'; else $(CYGPATH_W) '$(srcdir)/fstab.c'; fi` libelektra_fstab_la-fstab.lo: fstab.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_fstab_la_CFLAGS) $(CFLAGS) -MT libelektra_fstab_la-fstab.lo -MD -MP -MF "$(DEPDIR)/libelektra_fstab_la-fstab.Tpo" -c -o libelektra_fstab_la-fstab.lo `test -f 'fstab.c' || echo '$(srcdir)/'`fstab.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_fstab_la-fstab.Tpo" "$(DEPDIR)/libelektra_fstab_la-fstab.Plo"; else rm -f "$(DEPDIR)/libelektra_fstab_la-fstab.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='fstab.c' object='libelektra_fstab_la-fstab.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_fstab_la_CFLAGS) $(CFLAGS) -c -o libelektra_fstab_la-fstab.lo `test -f 'fstab.c' || echo '$(srcdir)/'`fstab.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(backenddir)"; 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: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_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-backendLTLIBRARIES clean-generic clean-libtool \ clean-local clean-noinstLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-backendLTLIBRARIES install-exec-am: install-info: install-info-am install-man: 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-backendLTLIBRARIES uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean \ clean-backendLTLIBRARIES clean-generic clean-libtool \ clean-local clean-noinstLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-backendLTLIBRARIES install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-backendLTLIBRARIES \ uninstall-info-am clean-local: rm -f *.gcno *.gcda *.gcno ../../libelektra/libelektra.la: cd ../../libelektra/ && $(MAKE) libelektra.la # 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: elektra-0.7.1/src/backends/fstab/README0000644000076400001440000000274111361542116014413 00000000000000See http://www.libelektra.org/Fstab for current version Fstab is a implementation of a parser and generator of the /etc/fstab file. It can be used as a [[Backends|Backend]] for Elektra. == Storage == The elektra representation will be: pseudoname/device pseudoname/mpoint pseudoname/type pseudoname/options pseudoname/dumpfreq pseudoname/passno for every column in the /etc/fstab file. The pseudoname can be any name for setting keys, the will be generated when getting keys, so don't expect the same name. the directory / will be called rootfs all swap devices will be called swapXX with a number from 00 on for XX else the mountpoint without / char will be used. == Capabilities == setmntent is used and restrict the capabilities in many ways. At one point you can't use any comments, they will be generated automatically. At the other point there is the issue with the pseudonames, you can't rely on the pseudoname you have set. The biggest issue is that you can't change or delete existing entries. All entries you set will be appended to the other filesystems. So if you get the filesystems and change the type of the filesystem of the rootfs and set it again the resulting fstab will be like: /dev/sda6 / ext3>---- >----defaults,errors=remount-ro 0 1 /dev/sda6 / jfs>---- >----defaults,errors=remount-ro 0 1 which will be not like you desired! == Portability == setmntent is used, so it is only conforming to BSD 4.3 and linux. elektra-0.7.1/src/backends/fstab/fstab.c0000644000076400001440000002115511365506635015010 00000000000000/*************************************************************************** fstab.c - Access the /etc/fstab file ------------------- begin : Mon Dec 26 2004 copyright : (C) 2004 by Markus Raab email : elektra@markus-raab.org ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ /*************************************************************************** * * * This is a backend that takes /etc/fstab file as its backend storage. * * The kdbGet() method will parse /etc/fstab and generate a * * valid key tree. The kdbSet() method will take a KeySet with valid * * filesystem keys and print an equivalent regular fstab in stdout. * * * ***************************************************************************/ #include int kdbOpen_fstab(KDB *handle) { KDBCap * cap = kdbhGetCapability(handle); const void *f; KeySet *ks; Key *k; cap->onlyFullGet=1; cap->noStat=1; cap->onlyRemoveAll=1; cap->onlyAddKeys=1; cap->onlyFullSet=1; cap->noComment=1; cap->noUID=1; cap->noGID=1; cap->noMode=1; cap->noATime=1; cap->noMTime=1; cap->noCTime=1; cap->noRemove=1; cap->noMount=1; cap->noBinary=1; cap->noTypes=1; cap->noError=1; cap->noLock = 1; cap->noThread = 1; ks = kdbhGetConfig (handle); ksRewind (ks); while ((k = ksNext (ks)) != 0) { f = keyName (k); if (f) f = strrchr (f, '/'); if (f && strcmp (f, "/path") == 0) { void *data=malloc(keyGetValueSize(k)); keyGetString (k, data, keyGetValueSize(k)); kdbhSetBackendData (handle, data); } } if (!kdbhGetBackendData (handle)) kdbhSetBackendData (handle, kdbiStrDup (FSTAB_PATH)); /* backend initialization logic */ #if DEBUG && VERBOSE printf ("open fstab backend with %s\n", kdbhGetBackendData (handle)); #endif return 0; } int kdbClose_fstab(KDB *handle) { /* free all backend resources and shutdown */ free(kdbhGetBackendData(handle)); #if DEBUG && VERBOSE printf ("close fstab backend\n"); #endif return 0; /* success */ } #define MAX_NUMBER_SIZE 10 ssize_t kdbGet_fstab(KDB *handle, KeySet *returned, const Key *parentKey) { int errnosave = errno; ssize_t nr_keys = 0; #ifndef __APPLE__ Key *key; Key *dir; FILE *fstab=0; struct mntent *fstabEntry; char fsname[MAX_PATH_LENGTH]; char buffer[MAX_NUMBER_SIZE]; const char *mountpointname = keyName(kdbhGetMountpoint(handle)); const char *parentname = keyName(parentKey); #if DEBUG && VERBOSE printf ("get fstab %s, point: %s\n", keyName(parentKey), mountpointname); #endif if (strcmp (mountpointname, parentname)) return 0; ksClear (returned); key = keyDup (parentKey); keySetDir(key); ksAppendKey(returned, key); nr_keys ++; key->flags &= ~KEY_FLAG_SYNC; fstab=setmntent(kdbhGetBackendData(handle), "r"); if (fstab == 0) { /* propagate errno */ errno = errnosave; return -1; } while ((fstabEntry=getmntent(fstab))) { unsigned int swapIndex=0; nr_keys += 7; /* Some logic to define the filesystem name when it is not * so obvious */ if (!strcmp(fstabEntry->mnt_type,"swap")) { sprintf(fsname,"swap%02d",swapIndex); swapIndex++; } else if (!strcmp(fstabEntry->mnt_dir,"none")) { strcpy(fsname,fstabEntry->mnt_type); } else if (!strcmp(fstabEntry->mnt_dir,"/")) { strcpy(fsname,"rootfs"); } else { /* fsname will be the mount point without '/' char */ char *slash=0; char *curr=fstabEntry->mnt_dir; fsname[0]=0; while((slash=strchr(curr,PATH_SEPARATOR))) { if (slash==curr) { curr++; continue; } strncat(fsname,curr,slash-curr); curr=slash+1; } strcat(fsname,curr); } /* Include only the filesystem pseudo-names */ dir = keyDup (parentKey); keyAddBaseName(dir, fsname); keySetString(dir,""); keySetComment(dir,""); keySetMode(dir, 0664); /* TODO stat */ keySetComment (dir, "Filesystem pseudo-name"); ksAppendKey(returned,dir); key = keyDup (dir); keyAddBaseName(key, "device"); keySetString (key, fstabEntry->mnt_fsname); keySetComment (key, "Device or Label"); ksAppendKey(returned, key); key->flags &= ~KEY_FLAG_SYNC; key = keyDup (dir); keyAddBaseName(key, "mpoint"); keySetString (key, fstabEntry->mnt_dir); keySetComment (key, "Mount point"); ksAppendKey(returned, key); key->flags &= ~KEY_FLAG_SYNC; key = keyDup (dir); keyAddBaseName(key, "type"); keySetString (key, fstabEntry->mnt_type); keySetComment (key, "Filesystem type."); ksAppendKey(returned, key); key->flags &= ~KEY_FLAG_SYNC; key = keyDup (dir); keyAddBaseName(key, "options"); keySetString (key, fstabEntry->mnt_opts); keySetComment (key, "Filesystem specific options"); ksAppendKey(returned, key); key->flags &= ~KEY_FLAG_SYNC; key = keyDup (dir); keyAddBaseName(key, "dumpfreq"); snprintf(buffer, MAX_NUMBER_SIZE, "%d",fstabEntry->mnt_freq); keySetString (key, buffer); keySetComment (key, "Dump frequency in days"); ksAppendKey(returned, key); key->flags &= ~KEY_FLAG_SYNC; key = keyDup (dir); keyAddBaseName(key, "passno"); snprintf(buffer, MAX_NUMBER_SIZE, "%d",fstabEntry->mnt_passno); keySetString (key, buffer); keySetComment (key, "Pass number on parallel fsck"); ksAppendKey(returned, key); key->flags &= ~KEY_FLAG_SYNC; keySetDir (dir); dir->flags &= ~KEY_FLAG_SYNC; } endmntent(fstab); #endif errno = errnosave; return nr_keys; } ssize_t kdbSet_fstab(KDB *handle, KeySet *ks, const Key *parentKey) { int ret = 1; int errnosave = errno; #ifndef __APPLE__ FILE *fstab=0; Key *key=0; char *basename = 0; const void *rootname = 0; struct mntent fstabEntry; const char *mountpointname = keyName(kdbhGetMountpoint(handle)); const char *parentname = keyName(parentKey); #if DEBUG && VERBOSE printf ("set fstab %s, point: %s\n", keyName(parentKey), mountpointname); #endif if (strcmp (mountpointname, parentname)) return 0; ksRewind (ks); if ((key = ksNext (ks)) != 0 && keyNeedRemove (key)) { unlink(kdbhGetBackendData(handle)); return ret; } /*skip parent key*/ fstab=setmntent(kdbhGetBackendData(handle), "w"); memset(&fstabEntry,0,sizeof(struct mntent)); while ((key = ksNext (ks)) != 0) { ret ++; basename=strrchr(keyName(key), '/')+1; #if DEBUG && VERBOSE printf ("key: %s %s\n", keyName(key), basename); #endif if (!strcmp (basename, "device")) { fstabEntry.mnt_fsname=(char *)keyValue(key); } else if (!strcmp (basename, "mpoint")) { fstabEntry.mnt_dir=(char *)keyValue(key); } else if (!strcmp (basename, "type")) { fstabEntry.mnt_type=(char *)keyValue(key); } else if (!strcmp (basename, "options")) { fstabEntry.mnt_opts=(char *)keyValue(key); } else if (!strcmp (basename, "dumpfreq")) { fstabEntry.mnt_freq=atoi((char *)keyValue(key)); } else if (!strcmp (basename, "passno")) { fstabEntry.mnt_passno=atoi((char *)keyValue(key)); } else { // new rootname if (!rootname) { rootname = keyValue(key); } else { rootname = keyValue(key); #if DEBUG && VERBOSE fprintf(stdout, "first: %s %s %s %s %d %d\n", fstabEntry.mnt_fsname, fstabEntry.mnt_dir, fstabEntry.mnt_type, fstabEntry.mnt_opts, fstabEntry.mnt_freq, fstabEntry.mnt_passno); #endif addmntent(fstab, &fstabEntry); memset(&fstabEntry,0,sizeof(struct mntent)); } } } if (rootname) { #if DEBUG && VERBOSE fprintf(stdout, "last: %s %s %s %s %d %d\n", fstabEntry.mnt_fsname, fstabEntry.mnt_dir, fstabEntry.mnt_type, fstabEntry.mnt_opts, fstabEntry.mnt_freq, fstabEntry.mnt_passno); #endif addmntent(fstab, &fstabEntry); } endmntent(fstab); #endif errno = errnosave; return ret; } KDBEXPORT(fstab) { return kdbBackendExport(BACKENDNAME, KDB_BE_OPEN, &kdbOpen_fstab, KDB_BE_CLOSE, &kdbClose_fstab, KDB_BE_GET, &kdbGet_fstab, KDB_BE_SET, &kdbSet_fstab, KDB_BE_VERSION, BACKENDVERSION, KDB_BE_AUTHOR, "Markus Raab ", KDB_BE_LICENCE, "BSD", KDB_BE_DESCRIPTION, "Reads and writes /etc/fstab content", KDB_BE_END); } elektra-0.7.1/src/backends/gconf/0000777000076400001440000000000011365513213013610 500000000000000elektra-0.7.1/src/backends/gconf/Makefile.am0000644000076400001440000000124711365507605015574 00000000000000 # $Id$ # # Compile libelektra-gconf only if GConf was found # #if HAVE_GCONF AM_CPPFLAGS = -I$(top_srcdir)/src/include noinst_LIBRARIES = libelektra-gconf.a libelektra_gconf_a_SOURCES = gconf.c libelektra_gconf_a_CFLAGS = $(gconf_CFLAGS) -DELEKTRA_STATIC $(COPTFLAGS) $(CDBGFLAGS) hlvlbackend_LTLIBRARIES = libelektra-gconf.la libelektra_gconf_la_SOURCES = gconf.c libelektra_gconf_la_CFLAGS = $(gconf_CFLAGS) $(COPTFLAGS) $(CDBGFLAGS) libelektra_gconf_la_LDFLAGS = -version-info $(BACKEND_VERSION_API) -module libelektra_gconf_la_LIBADD = $(gconf_LIBS) ../../libelektra/libelektra.la ../../libelektra/libelektra.la: cd ../../libelektra/ && $(MAKE) libelektra.la #endif elektra-0.7.1/src/backends/gconf/Makefile.in0000644000076400001440000005146111365511150015576 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ # $Id$ # # Compile libelektra-gconf only if GConf was found # srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = src/backends/gconf DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/extensions.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/config.h CONFIG_CLEAN_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru libelektra_gconf_a_AR = $(AR) $(ARFLAGS) libelektra_gconf_a_LIBADD = am_libelektra_gconf_a_OBJECTS = libelektra_gconf_a-gconf.$(OBJEXT) libelektra_gconf_a_OBJECTS = $(am_libelektra_gconf_a_OBJECTS) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(hlvlbackenddir)" hlvlbackendLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(hlvlbackend_LTLIBRARIES) am__DEPENDENCIES_1 = libelektra_gconf_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ ../../libelektra/libelektra.la am_libelektra_gconf_la_OBJECTS = libelektra_gconf_la-gconf.lo libelektra_gconf_la_OBJECTS = $(am_libelektra_gconf_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/src/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libelektra_gconf_a_SOURCES) $(libelektra_gconf_la_SOURCES) DIST_SOURCES = $(libelektra_gconf_a_SOURCES) \ $(libelektra_gconf_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) INSTALL = @INSTALL@ ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BACKENDS = @BACKENDS@ BACKEND_VERSION_API = @BACKEND_VERSION_API@ BINDINGS = @BINDINGS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CDBGFLAGS = @CDBGFLAGS@ CFLAGS = @CFLAGS@ COPTFLAGS = @COPTFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSTDFLAGS = @CSTDFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDBGFLAGS = @CXXDBGFLAGS@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXOPTFLAGS = @CXXOPTFLAGS@ CXXSTDFLAGS = @CXXSTDFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_FALSE = @DEBUG_FALSE@ DEBUG_TRUE = @DEBUG_TRUE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ELEKTRATOOLS_VERSION_API = @ELEKTRATOOLS_VERSION_API@ ELEKTRA_VERSION_API = @ELEKTRA_VERSION_API@ EXEEXT = @EXEEXT@ EXPERIMENTAL_FALSE = @EXPERIMENTAL_FALSE@ EXPERIMENTAL_TRUE = @EXPERIMENTAL_TRUE@ F77 = @F77@ FFLAGS = @FFLAGS@ GENHTML = @GENHTML@ GREP = @GREP@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ HAVE_LIBLTDL_FALSE = @HAVE_LIBLTDL_FALSE@ HAVE_LIBLTDL_TRUE = @HAVE_LIBLTDL_TRUE@ HAVE_MAN2HTML_FALSE = @HAVE_MAN2HTML_FALSE@ HAVE_MAN2HTML_TRUE = @HAVE_MAN2HTML_TRUE@ HAVE_XML_FALSE = @HAVE_XML_FALSE@ HAVE_XML_TRUE = @HAVE_XML_TRUE@ HAVE_XSL_FALSE = @HAVE_XSL_FALSE@ HAVE_XSL_TRUE = @HAVE_XSL_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDB_VERSION = @KDB_VERSION@ KDB_VERSION_MAJOR = @KDB_VERSION_MAJOR@ KDB_VERSION_MAJORMINOR = @KDB_VERSION_MAJORMINOR@ KDB_VERSION_MICRO = @KDB_VERSION_MICRO@ KDB_VERSION_MINOR = @KDB_VERSION_MINOR@ LCOV = @LCOV@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VALGRIND = @VALGRIND@ VALGRINDTESTS_FALSE = @VALGRINDTESTS_FALSE@ VALGRINDTESTS_TRUE = @VALGRINDTESTS_TRUE@ VERSION = @VERSION@ XML2_CONFIG = @XML2_CONFIG@ XML_CPPFLAGS = @XML_CPPFLAGS@ XML_LIBS = @XML_LIBS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ backend_static_libs = @backend_static_libs@ backenddir = @backenddir@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ datarootdir = @datarootdir@ dbroot = @dbroot@ default_backend = @default_backend@ default_dbackend = @default_dbackend@ default_docbook = @default_docbook@ develdocdir = @develdocdir@ docdir = @docdir@ doxygen = @doxygen@ dvidir = @dvidir@ elektratools = @elektratools@ exec_prefix = @exec_prefix@ gconf_CFLAGS = @gconf_CFLAGS@ gconf_LIBS = @gconf_LIBS@ hlvlbackenddir = @hlvlbackenddir@ 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@ man2html = @man2html@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ privatelibs = @privatelibs@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ ulibdir = @ulibdir@ xsltproc = @xsltproc@ #if HAVE_GCONF AM_CPPFLAGS = -I$(top_srcdir)/src/include noinst_LIBRARIES = libelektra-gconf.a libelektra_gconf_a_SOURCES = gconf.c libelektra_gconf_a_CFLAGS = $(gconf_CFLAGS) -DELEKTRA_STATIC $(COPTFLAGS) $(CDBGFLAGS) hlvlbackend_LTLIBRARIES = libelektra-gconf.la libelektra_gconf_la_SOURCES = gconf.c libelektra_gconf_la_CFLAGS = $(gconf_CFLAGS) $(COPTFLAGS) $(CDBGFLAGS) libelektra_gconf_la_LDFLAGS = -version-info $(BACKEND_VERSION_API) -module libelektra_gconf_la_LIBADD = $(gconf_LIBS) ../../libelektra/libelektra.la all: all-am .SUFFIXES: .SUFFIXES: .c .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 \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/backends/gconf/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/backends/gconf/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libelektra-gconf.a: $(libelektra_gconf_a_OBJECTS) $(libelektra_gconf_a_DEPENDENCIES) -rm -f libelektra-gconf.a $(libelektra_gconf_a_AR) libelektra-gconf.a $(libelektra_gconf_a_OBJECTS) $(libelektra_gconf_a_LIBADD) $(RANLIB) libelektra-gconf.a install-hlvlbackendLTLIBRARIES: $(hlvlbackend_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(hlvlbackenddir)" || $(mkdir_p) "$(DESTDIR)$(hlvlbackenddir)" @list='$(hlvlbackend_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(hlvlbackendLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(hlvlbackenddir)/$$f'"; \ $(LIBTOOL) --mode=install $(hlvlbackendLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(hlvlbackenddir)/$$f"; \ else :; fi; \ done uninstall-hlvlbackendLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(hlvlbackend_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(hlvlbackenddir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(hlvlbackenddir)/$$p"; \ done clean-hlvlbackendLTLIBRARIES: -test -z "$(hlvlbackend_LTLIBRARIES)" || rm -f $(hlvlbackend_LTLIBRARIES) @list='$(hlvlbackend_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libelektra-gconf.la: $(libelektra_gconf_la_OBJECTS) $(libelektra_gconf_la_DEPENDENCIES) $(LINK) -rpath $(hlvlbackenddir) $(libelektra_gconf_la_LDFLAGS) $(libelektra_gconf_la_OBJECTS) $(libelektra_gconf_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_gconf_a-gconf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_gconf_la-gconf.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< libelektra_gconf_a-gconf.o: gconf.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_gconf_a_CFLAGS) $(CFLAGS) -MT libelektra_gconf_a-gconf.o -MD -MP -MF "$(DEPDIR)/libelektra_gconf_a-gconf.Tpo" -c -o libelektra_gconf_a-gconf.o `test -f 'gconf.c' || echo '$(srcdir)/'`gconf.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_gconf_a-gconf.Tpo" "$(DEPDIR)/libelektra_gconf_a-gconf.Po"; else rm -f "$(DEPDIR)/libelektra_gconf_a-gconf.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gconf.c' object='libelektra_gconf_a-gconf.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_gconf_a_CFLAGS) $(CFLAGS) -c -o libelektra_gconf_a-gconf.o `test -f 'gconf.c' || echo '$(srcdir)/'`gconf.c libelektra_gconf_a-gconf.obj: gconf.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_gconf_a_CFLAGS) $(CFLAGS) -MT libelektra_gconf_a-gconf.obj -MD -MP -MF "$(DEPDIR)/libelektra_gconf_a-gconf.Tpo" -c -o libelektra_gconf_a-gconf.obj `if test -f 'gconf.c'; then $(CYGPATH_W) 'gconf.c'; else $(CYGPATH_W) '$(srcdir)/gconf.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_gconf_a-gconf.Tpo" "$(DEPDIR)/libelektra_gconf_a-gconf.Po"; else rm -f "$(DEPDIR)/libelektra_gconf_a-gconf.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gconf.c' object='libelektra_gconf_a-gconf.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_gconf_a_CFLAGS) $(CFLAGS) -c -o libelektra_gconf_a-gconf.obj `if test -f 'gconf.c'; then $(CYGPATH_W) 'gconf.c'; else $(CYGPATH_W) '$(srcdir)/gconf.c'; fi` libelektra_gconf_la-gconf.lo: gconf.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_gconf_la_CFLAGS) $(CFLAGS) -MT libelektra_gconf_la-gconf.lo -MD -MP -MF "$(DEPDIR)/libelektra_gconf_la-gconf.Tpo" -c -o libelektra_gconf_la-gconf.lo `test -f 'gconf.c' || echo '$(srcdir)/'`gconf.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_gconf_la-gconf.Tpo" "$(DEPDIR)/libelektra_gconf_la-gconf.Plo"; else rm -f "$(DEPDIR)/libelektra_gconf_la-gconf.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='gconf.c' object='libelektra_gconf_la-gconf.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_gconf_la_CFLAGS) $(CFLAGS) -c -o libelektra_gconf_la-gconf.lo `test -f 'gconf.c' || echo '$(srcdir)/'`gconf.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(hlvlbackenddir)"; 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: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_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-hlvlbackendLTLIBRARIES clean-libtool \ clean-noinstLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-hlvlbackendLTLIBRARIES install-exec-am: install-info: install-info-am install-man: 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-hlvlbackendLTLIBRARIES uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-hlvlbackendLTLIBRARIES clean-libtool \ clean-noinstLIBRARIES ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-exec install-exec-am \ install-hlvlbackendLTLIBRARIES install-info install-info-am \ install-man install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-hlvlbackendLTLIBRARIES \ uninstall-info-am ../../libelektra/libelektra.la: cd ../../libelektra/ && $(MAKE) libelektra.la #endif # 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: elektra-0.7.1/src/backends/gconf/README0000644000076400001440000000030011361542116014375 00000000000000It will make GConf calls to access the conceptual key database. It also lets you access GConf keys through the Elektra API. It is ready to be used but, thanks to GConf, it is extremelly slow. elektra-0.7.1/src/backends/gconf/gconf.c0000644000076400001440000003036411361542116014772 00000000000000/*************************************************************************** gconf.c - A GConf backend for Elektra ------------------- begin : Mon Jan 02 2005 copyright : (C) 2005 by Avi Alkalay email : avi@unix.sh ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/ /* Subversion stuff $Id$ */ #include #include #include #include #define BACKENDNAME "gconf" /**Some systems have even longer pathnames*/ #ifdef PATH_MAX #define MAX_PATH_LENGTH PATH_MAX /**This value is garanteed on any Posixsystem*/ #elif __USE_POSIX #define MAX_PATH_LENGTH _POSIX_PATH_MAX #else #define MAX_PATH_LENGTH 4096 #endif GConfEngine *gconf; /* * * /apps/ <-> user/sw/ * /system/ <-> user/system/ * /desktop/gnome/ <-> user/desktop/gnome/ * * * */ enum KeyGConfType { KEY_GCONFTYPE_STRING= KEY_TYPE_STRING, KEY_GCONFTYPE_INT= KEY_TYPE_STRING+1, KEY_GCONFTYPE_FLOAT= KEY_TYPE_STRING+2, KEY_GCONFTYPE_BOOL= KEY_TYPE_STRING+3, KEY_GCONFTYPE_LIST_STRING= KEY_TYPE_STRING+4, KEY_GCONFTYPE_LIST_INT= KEY_TYPE_STRING+5, KEY_GCONFTYPE_LIST_FLOAT= KEY_TYPE_STRING+6, KEY_GCONFTYPE_LIST_BOOL= KEY_TYPE_STRING+7 }; Key *gEntryToKey(const GConfEntry *gentry) { Key *new=0; char buffer[500]; char *c1=0; GConfValue *gvalue=0; GSList *list=0; GConfValueType listType; new=keyNew("user",KEY_SWITCH_END); c1=(char *)gconf_entry_get_key(gentry); if (!strcmp("/apps",c1) || !strncmp("/apps/",c1,strlen("/apps/"))) { /* convert "/apps/" to "user/sw/" */ c1=strchr(c1+1,'/'); keyAddBaseName(new,"sw"); } keyAddBaseName(new,(const char *)c1); gvalue=gconf_entry_get_value(gentry); if (!gvalue) return new; switch (gvalue->type) { case GCONF_VALUE_PAIR: case GCONF_VALUE_SCHEMA: /* please stop that stupid compiler warnings ! */ break; case GCONF_VALUE_INVALID: case GCONF_VALUE_STRING: keySetString(new,gconf_value_get_string(gvalue)); break; case GCONF_VALUE_INT: sprintf(buffer,"%d",gconf_value_get_int(gvalue)); keySetString(new,buffer); keySetType(new,KEY_GCONFTYPE_INT); break; case GCONF_VALUE_FLOAT: sprintf(buffer,"%g",gconf_value_get_float(gvalue)); keySetString(new,buffer); keySetType(new,KEY_GCONFTYPE_FLOAT); break; case GCONF_VALUE_BOOL: sprintf(buffer,"%d",gconf_value_get_bool(gvalue)); keySetString(new,buffer); keySetType(new,KEY_GCONFTYPE_BOOL); break; case GCONF_VALUE_LIST: listType=gconf_value_get_list_type(gvalue); list=gconf_value_get_list(gvalue); int prev=0; strcpy(buffer,"["); while (list) { GConfValue *val=0; val=(GConfValue *)list->data; if (prev) strcat(buffer,","); switch (listType) { case GCONF_VALUE_SCHEMA: break; case GCONF_VALUE_INVALID: case GCONF_VALUE_STRING: keySetType(new,KEY_GCONFTYPE_LIST_STRING); strcat(buffer,gconf_value_get_string(val)); break; case GCONF_VALUE_INT: keySetType(new,KEY_GCONFTYPE_LIST_INT); sprintf(buffer+kdbiStrLen(buffer)-1,"%d", gconf_value_get_int(val)); break; case GCONF_VALUE_FLOAT: keySetType(new,KEY_GCONFTYPE_LIST_FLOAT); sprintf(buffer+kdbiStrLen(buffer)-1,"%g", gconf_value_get_float(val)); break; case GCONF_VALUE_BOOL: keySetType(new,KEY_GCONFTYPE_LIST_BOOL); if (gconf_value_get_bool(val)) strcat(buffer,"1"); else strcat(buffer,"0"); break; case GCONF_VALUE_LIST: case GCONF_VALUE_PAIR: /* please stop these stupid compiler warnings ! */ break; } prev=1; list=list->next; } strcat(buffer,"]"); keySetRaw(new,buffer,kdbiStrLen(buffer)); break; /* TODO: car+cdr (pair). */ } /* TODO: metainfo */ return new; } GConfEntry *keyToGEntry(const Key *key) { GConfEntry *gentry=0; GConfValue *gval=0; char *keyName=0; size_t size=0; GSList *list=0; char *cursor=0; char *previous=0; char *end=0; char element[300]; GConfValue *valelement=0; if (!keyIsUser(key)) return 0; /* prepare key name */ if (kdbiStrLen(key->key)type) { case KEY_GCONFTYPE_STRING: gval=gconf_value_new(GCONF_VALUE_STRING); gconf_value_set_string(gval,(char *)key->data); break; case KEY_GCONFTYPE_INT: gval=gconf_value_new(GCONF_VALUE_INT); gconf_value_set_int(gval,atoi((char *)key->data)); break; case KEY_GCONFTYPE_FLOAT: gval=gconf_value_new(GCONF_VALUE_FLOAT); gconf_value_set_float(gval,atof((char *)key->data)); break; case KEY_GCONFTYPE_BOOL: gval=gconf_value_new(GCONF_VALUE_BOOL); gconf_value_set_bool(gval,atoi((char *)key->data)); break; case KEY_GCONFTYPE_LIST_INT: case KEY_GCONFTYPE_LIST_FLOAT: case KEY_GCONFTYPE_LIST_BOOL: case KEY_GCONFTYPE_LIST_STRING: gval=gconf_value_new(GCONF_VALUE_LIST); end=strrchr(key->data,']'); previous=key->data+1; // jump '[' while ((cursor=strchr(previous,','))) { strncpy(element,previous,cursor-previous); element[cursor-previous]=0; switch (key->type) { case KEY_GCONFTYPE_LIST_INT: valelement=gconf_value_new(GCONF_VALUE_INT); gconf_value_set_int(valelement,atoi(element)); break; case KEY_GCONFTYPE_LIST_BOOL: valelement=gconf_value_new(GCONF_VALUE_BOOL); gconf_value_set_bool(valelement,atoi(element)); break; case KEY_GCONFTYPE_LIST_FLOAT: valelement=gconf_value_new(GCONF_VALUE_FLOAT); gconf_value_set_float(valelement,atof(element)); break; case KEY_GCONFTYPE_LIST_STRING: valelement=gconf_value_new(GCONF_VALUE_STRING); gconf_value_set_string(valelement,element); break; } list=g_slist_append(list,valelement); previous=cursor+1; } strncpy(element,previous,(char *)key->data+key->dataSize-2-previous); element[(char *)key->data+key->dataSize-2-previous]=0; switch (key->type) { case KEY_GCONFTYPE_LIST_INT: valelement=gconf_value_new(GCONF_VALUE_INT); gconf_value_set_int(valelement,atoi(element)); gconf_value_set_list_type(gval,GCONF_VALUE_INT); break; case KEY_GCONFTYPE_LIST_BOOL: valelement=gconf_value_new(GCONF_VALUE_BOOL); gconf_value_set_bool(valelement,atoi(element)); gconf_value_set_list_type(gval,GCONF_VALUE_BOOL); break; case KEY_GCONFTYPE_LIST_FLOAT: valelement=gconf_value_new(GCONF_VALUE_FLOAT); gconf_value_set_float(valelement,atof(element)); gconf_value_set_list_type(gval,GCONF_VALUE_FLOAT); break; case KEY_GCONFTYPE_LIST_STRING: valelement=gconf_value_new(GCONF_VALUE_STRING); gconf_value_set_string(valelement,element); gconf_value_set_list_type(gval,GCONF_VALUE_STRING); break; } g_slist_append(list,valelement); gconf_value_set_list_nocopy(gval,list); break; } gentry=gconf_entry_new_nocopy(keyName,gval); /* TODO: metainfo */ return gentry; } int kdbOpen_gconf() { gconf=0; gconf=gconf_engine_get_default(); return 0; } int kdbClose_gconf() { gconf_engine_unref(gconf); return 0; /* success */ } int kdbGetKey_gconf(Key *key) { GConfEntry *gentry=0, *gkey; Key *dup; GError *gerr=0; int rc=0; gkey=keyToGEntry(key); if (!gkey) { errno=ENOENT; return -1; } gentry=gconf_engine_get_entry(gconf,gconf_entry_get_key(gkey),0,1,&gerr); g_free(gkey->key); if (gkey->value) gconf_value_free(gkey->value); g_free(gkey); if (gerr != 0) { errno=gerr->code; g_error_free(gerr); g_free(gentry->key); if (gentry->value) gconf_value_free(gentry->value); g_free(gentry); return errno; } if (gentry) { dup=gEntryToKey(gentry); keyDup(dup,key); keyDel(dup); rc=0; } else rc=1; g_free(gentry->key); if (gentry->value) gconf_value_free(gentry->value); g_free(gentry); return rc; } /** * * @see kdbSetKey() for expected behavior. * @ingroup backend */ int kdbSetKey_gconf(Key *key) { GConfEntry *gentry=0; GError *err=0; if (key->type == KEY_TYPE_DIR) return 0; gentry=keyToGEntry(key); gconf_engine_set(gconf,gconf_entry_get_key(gentry),gconf_entry_get_value(gentry),&err); gconf_entry_free(gentry); if (err != 0) { errno=err->code; g_error_free(err); return errno; } return 0; /* success */ } /** * * @see kdbRemove() for expected behavior. * @ingroup backend */ int kdbRemoveKey_gconf(const Key *key) { GError *err=0; GConfEntry *gentry; gboolean rc=0; if (!key || !key->key) { errno=KDB_ERR_NULLKEY; return 1; /* errno is propagated */ } gentry=keyToGEntry(key); rc=gconf_engine_unset(gconf,gentry->key,&err); gconf_entry_free(gentry); /* GConf would not tell us anything about a failure to remove * a directory, so this test block is almost useless for this * purpose. * In fact, it looks like there is no way to remove a directory * in GConf. What a shame. */ if (!rc) { if (err != 0) { errno=err->code; g_error_free(err); } return 1; } return 0; /* success */ } ssize_t kdbGetKeyChildKeys_gconf(const Key *parentKey, KeySet *returned, unsigned long options) { GConfEntry *entry=keyToGEntry(parentKey); GError *gerr=0; GSList *dirs=0,*entries=0,*current=0; if (!entry) { errno=ENOENT; return -1; } dirs=gconf_engine_all_dirs(gconf,entry->key,&gerr); entries=gconf_engine_all_entries(gconf,entry->key,&gerr); gconf_entry_free(entry); entry=0; while (entries) { ksAppendKey(returned,gEntryToKey((GConfEntry *)entries->data)); current=entries; entries=g_slist_remove_link(entries,current); gconf_entry_free((GConfEntry *)current->data); g_slist_free(current); } while (dirs) { Key *toAppend=0; GConfEntry entry; entry.key=dirs->data; entry.value=0; toAppend=gEntryToKey(&entry); keySetType(toAppend,KEY_TYPE_DIR); ksAppendKey(returned,toAppend); /* if (options & KDB_O_RECURSIVE) kdbGetKeyChildKeys_gconf(toAppend,returned,options & ~KDB_O_SORT); */ current=dirs; dirs=g_slist_remove_link(dirs,current); g_free(current->data); g_slist_free(current); } /* if (options & KDB_O_SORT) ksSort(returned); */ return returned->size; /* success */ } int kdbRename_gconf(Key *key, const char *newName) { int rc; if ((rc=kdbGetKey_gconf(key))) return rc; if ((rc=kdbRemoveKey_gconf(key))) return rc; if (! keySetName(key,newName)) return 1; return kdbSetKey_gconf(key); } KDBEXPORT(gconf) { return kdbBackendExport(BACKENDNAME, KDB_BE_OPEN, &kdbOpen_gconf, KDB_BE_CLOSE, &kdbClose_gconf, KDB_BE_GETKEY, &kdbGetKey_gconf, KDB_BE_SETKEY, &kdbSetKey_gconf, KDB_BE_STATKEY, &kdbGetKey_gconf, KDB_BE_RENAME, &kdbRename_gconf, KDB_BE_REMOVEKEY, &kdbRemoveKey_gconf, KDB_BE_GETCHILD, &kdbGetKeyChildKeys_gconf, /* set to default implementation: */ KDB_BE_MONITORKEY, &kdbMonitorKey_default, KDB_BE_MONITORKEYS, &kdbMonitorKeys_default, KDB_BE_SETKEYS, &kdbSetKeys_default, KDB_BE_END); } elektra-0.7.1/src/backends/hosts/0000777000076400001440000000000011365513213013654 500000000000000elektra-0.7.1/src/backends/hosts/Makefile.am0000644000076400001440000000140211365507605015631 00000000000000#elekhostsdir = $(develdocdir)/backend-hosts/ #EXTRA_DIST = hosts.c README AM_CPPFLAGS = -I$(top_srcdir)/src/include noinst_LIBRARIES = libelektra-hosts.a libelektra_hosts_a_SOURCES = hosts.c hosts.h ../../include/kdb.h ../../include/kdbbackend.h libelektra_hosts_a_CFLAGS = -DELEKTRA_STATIC $(COPTFLAGS) $(CDBGFLAGS) backend_LTLIBRARIES = libelektra-hosts.la libelektra_hosts_la_SOURCES = hosts.c hosts.h ../../include/kdb.h ../../include/kdbbackend.h libelektra_hosts_la_LDFLAGS = -version-info $(BACKEND_VERSION_API) -module libelektra_hosts_la_LIBADD = ../../libelektra/libelektra.la libelektra_hosts_la_CFLAGS = $(COPTFLAGS) $(CDBGFLAGS) clean-local: rm -f *.gcno *.gcda *.gcno ../../libelektra/libelektra.la: cd ../../libelektra/ && $(MAKE) libelektra.la elektra-0.7.1/src/backends/hosts/Makefile.in0000644000076400001440000005137611365511151015650 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ #elekhostsdir = $(develdocdir)/backend-hosts/ #EXTRA_DIST = hosts.c README srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = src/backends/hosts DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/extensions.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/config.h CONFIG_CLEAN_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru libelektra_hosts_a_AR = $(AR) $(ARFLAGS) libelektra_hosts_a_LIBADD = am_libelektra_hosts_a_OBJECTS = libelektra_hosts_a-hosts.$(OBJEXT) libelektra_hosts_a_OBJECTS = $(am_libelektra_hosts_a_OBJECTS) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(backenddir)" backendLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(backend_LTLIBRARIES) libelektra_hosts_la_DEPENDENCIES = ../../libelektra/libelektra.la am_libelektra_hosts_la_OBJECTS = libelektra_hosts_la-hosts.lo libelektra_hosts_la_OBJECTS = $(am_libelektra_hosts_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/src/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libelektra_hosts_a_SOURCES) $(libelektra_hosts_la_SOURCES) DIST_SOURCES = $(libelektra_hosts_a_SOURCES) \ $(libelektra_hosts_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) INSTALL = @INSTALL@ ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BACKENDS = @BACKENDS@ BACKEND_VERSION_API = @BACKEND_VERSION_API@ BINDINGS = @BINDINGS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CDBGFLAGS = @CDBGFLAGS@ CFLAGS = @CFLAGS@ COPTFLAGS = @COPTFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSTDFLAGS = @CSTDFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDBGFLAGS = @CXXDBGFLAGS@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXOPTFLAGS = @CXXOPTFLAGS@ CXXSTDFLAGS = @CXXSTDFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_FALSE = @DEBUG_FALSE@ DEBUG_TRUE = @DEBUG_TRUE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ELEKTRATOOLS_VERSION_API = @ELEKTRATOOLS_VERSION_API@ ELEKTRA_VERSION_API = @ELEKTRA_VERSION_API@ EXEEXT = @EXEEXT@ EXPERIMENTAL_FALSE = @EXPERIMENTAL_FALSE@ EXPERIMENTAL_TRUE = @EXPERIMENTAL_TRUE@ F77 = @F77@ FFLAGS = @FFLAGS@ GENHTML = @GENHTML@ GREP = @GREP@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ HAVE_LIBLTDL_FALSE = @HAVE_LIBLTDL_FALSE@ HAVE_LIBLTDL_TRUE = @HAVE_LIBLTDL_TRUE@ HAVE_MAN2HTML_FALSE = @HAVE_MAN2HTML_FALSE@ HAVE_MAN2HTML_TRUE = @HAVE_MAN2HTML_TRUE@ HAVE_XML_FALSE = @HAVE_XML_FALSE@ HAVE_XML_TRUE = @HAVE_XML_TRUE@ HAVE_XSL_FALSE = @HAVE_XSL_FALSE@ HAVE_XSL_TRUE = @HAVE_XSL_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDB_VERSION = @KDB_VERSION@ KDB_VERSION_MAJOR = @KDB_VERSION_MAJOR@ KDB_VERSION_MAJORMINOR = @KDB_VERSION_MAJORMINOR@ KDB_VERSION_MICRO = @KDB_VERSION_MICRO@ KDB_VERSION_MINOR = @KDB_VERSION_MINOR@ LCOV = @LCOV@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VALGRIND = @VALGRIND@ VALGRINDTESTS_FALSE = @VALGRINDTESTS_FALSE@ VALGRINDTESTS_TRUE = @VALGRINDTESTS_TRUE@ VERSION = @VERSION@ XML2_CONFIG = @XML2_CONFIG@ XML_CPPFLAGS = @XML_CPPFLAGS@ XML_LIBS = @XML_LIBS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ backend_static_libs = @backend_static_libs@ backenddir = @backenddir@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ datarootdir = @datarootdir@ dbroot = @dbroot@ default_backend = @default_backend@ default_dbackend = @default_dbackend@ default_docbook = @default_docbook@ develdocdir = @develdocdir@ docdir = @docdir@ doxygen = @doxygen@ dvidir = @dvidir@ elektratools = @elektratools@ exec_prefix = @exec_prefix@ gconf_CFLAGS = @gconf_CFLAGS@ gconf_LIBS = @gconf_LIBS@ hlvlbackenddir = @hlvlbackenddir@ 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@ man2html = @man2html@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ privatelibs = @privatelibs@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ ulibdir = @ulibdir@ xsltproc = @xsltproc@ AM_CPPFLAGS = -I$(top_srcdir)/src/include noinst_LIBRARIES = libelektra-hosts.a libelektra_hosts_a_SOURCES = hosts.c hosts.h ../../include/kdb.h ../../include/kdbbackend.h libelektra_hosts_a_CFLAGS = -DELEKTRA_STATIC $(COPTFLAGS) $(CDBGFLAGS) backend_LTLIBRARIES = libelektra-hosts.la libelektra_hosts_la_SOURCES = hosts.c hosts.h ../../include/kdb.h ../../include/kdbbackend.h libelektra_hosts_la_LDFLAGS = -version-info $(BACKEND_VERSION_API) -module libelektra_hosts_la_LIBADD = ../../libelektra/libelektra.la libelektra_hosts_la_CFLAGS = $(COPTFLAGS) $(CDBGFLAGS) all: all-am .SUFFIXES: .SUFFIXES: .c .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 \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/backends/hosts/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/backends/hosts/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libelektra-hosts.a: $(libelektra_hosts_a_OBJECTS) $(libelektra_hosts_a_DEPENDENCIES) -rm -f libelektra-hosts.a $(libelektra_hosts_a_AR) libelektra-hosts.a $(libelektra_hosts_a_OBJECTS) $(libelektra_hosts_a_LIBADD) $(RANLIB) libelektra-hosts.a install-backendLTLIBRARIES: $(backend_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(backenddir)" || $(mkdir_p) "$(DESTDIR)$(backenddir)" @list='$(backend_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(backendLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(backenddir)/$$f'"; \ $(LIBTOOL) --mode=install $(backendLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(backenddir)/$$f"; \ else :; fi; \ done uninstall-backendLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(backend_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(backenddir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(backenddir)/$$p"; \ done clean-backendLTLIBRARIES: -test -z "$(backend_LTLIBRARIES)" || rm -f $(backend_LTLIBRARIES) @list='$(backend_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libelektra-hosts.la: $(libelektra_hosts_la_OBJECTS) $(libelektra_hosts_la_DEPENDENCIES) $(LINK) -rpath $(backenddir) $(libelektra_hosts_la_LDFLAGS) $(libelektra_hosts_la_OBJECTS) $(libelektra_hosts_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_hosts_a-hosts.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_hosts_la-hosts.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< libelektra_hosts_a-hosts.o: hosts.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_hosts_a_CFLAGS) $(CFLAGS) -MT libelektra_hosts_a-hosts.o -MD -MP -MF "$(DEPDIR)/libelektra_hosts_a-hosts.Tpo" -c -o libelektra_hosts_a-hosts.o `test -f 'hosts.c' || echo '$(srcdir)/'`hosts.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_hosts_a-hosts.Tpo" "$(DEPDIR)/libelektra_hosts_a-hosts.Po"; else rm -f "$(DEPDIR)/libelektra_hosts_a-hosts.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hosts.c' object='libelektra_hosts_a-hosts.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_hosts_a_CFLAGS) $(CFLAGS) -c -o libelektra_hosts_a-hosts.o `test -f 'hosts.c' || echo '$(srcdir)/'`hosts.c libelektra_hosts_a-hosts.obj: hosts.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_hosts_a_CFLAGS) $(CFLAGS) -MT libelektra_hosts_a-hosts.obj -MD -MP -MF "$(DEPDIR)/libelektra_hosts_a-hosts.Tpo" -c -o libelektra_hosts_a-hosts.obj `if test -f 'hosts.c'; then $(CYGPATH_W) 'hosts.c'; else $(CYGPATH_W) '$(srcdir)/hosts.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_hosts_a-hosts.Tpo" "$(DEPDIR)/libelektra_hosts_a-hosts.Po"; else rm -f "$(DEPDIR)/libelektra_hosts_a-hosts.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hosts.c' object='libelektra_hosts_a-hosts.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_hosts_a_CFLAGS) $(CFLAGS) -c -o libelektra_hosts_a-hosts.obj `if test -f 'hosts.c'; then $(CYGPATH_W) 'hosts.c'; else $(CYGPATH_W) '$(srcdir)/hosts.c'; fi` libelektra_hosts_la-hosts.lo: hosts.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_hosts_la_CFLAGS) $(CFLAGS) -MT libelektra_hosts_la-hosts.lo -MD -MP -MF "$(DEPDIR)/libelektra_hosts_la-hosts.Tpo" -c -o libelektra_hosts_la-hosts.lo `test -f 'hosts.c' || echo '$(srcdir)/'`hosts.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_hosts_la-hosts.Tpo" "$(DEPDIR)/libelektra_hosts_la-hosts.Plo"; else rm -f "$(DEPDIR)/libelektra_hosts_la-hosts.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='hosts.c' object='libelektra_hosts_la-hosts.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_hosts_la_CFLAGS) $(CFLAGS) -c -o libelektra_hosts_la-hosts.lo `test -f 'hosts.c' || echo '$(srcdir)/'`hosts.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(backenddir)"; 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: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_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-backendLTLIBRARIES clean-generic clean-libtool \ clean-local clean-noinstLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-backendLTLIBRARIES install-exec-am: install-info: install-info-am install-man: 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-backendLTLIBRARIES uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean \ clean-backendLTLIBRARIES clean-generic clean-libtool \ clean-local clean-noinstLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-backendLTLIBRARIES install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-backendLTLIBRARIES \ uninstall-info-am clean-local: rm -f *.gcno *.gcda *.gcno ../../libelektra/libelektra.la: cd ../../libelektra/ && $(MAKE) libelektra.la # 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: elektra-0.7.1/src/backends/hosts/hosts.c0000644000076400001440000002240211361542116015074 00000000000000/*************************************************************************** hosts.c - Access the /etc/hosts file ------------------- begin : Nov 2007 copyright : (C) 2007 by Markus Raab email : elektra@markus-raab.org ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ /*************************************************************************** * * * This is the skeleton of the methods you'll have to implement in order * * to provide libelektra.so a valid backend. * * Simple fill the empty _hosts functions with your code and you are * * ready to go. * * * ***************************************************************************/ #include "hosts.h" int kdbOpen_hosts(KDB *handle) { KDBCap * cap = kdbhGetCapability(handle); const void *f; KeySet *ks; Key *k; cap->onlyFullGet=1; cap->onlyRemoveAll=1; cap->onlyAddKeys=1; cap->onlyFullSet=1; cap->onlySystem=1; cap->onlyUser=1; cap->noOwner=1; cap->noValue=1; cap->noComment=1; cap->noUID=1; cap->noGID=1; cap->noMode=1; cap->noDir=1; cap->noATime=1; cap->noMTime=1; cap->noCTime=1; cap->noRemove=1; cap->noStat=1; cap->noMount=1; cap->noBinary=1; cap->noString=1; cap->noTypes=1; cap->noError=1; ks = kdbhGetConfig (handle); ksRewind (ks); while ((k = ksNext (ks)) != 0) { f = keyName (k); if (f) f = strrchr (f, '/'); if (f && strcmp (f, "/path") == 0) { void *data=kdbiMalloc(keyGetValueSize(k)); memcpy(data,keyValue(k),keyGetValueSize(k)); kdbhSetBackendData (handle, data); } } if (!kdbhGetBackendData (handle)) kdbhSetBackendData (handle, kdbiStrDup (HOSTS_PATH)); return 0; } int kdbClose_hosts(KDB *handle) { kdbiFree(kdbhGetBackendData(handle)); return 0; /* success */ } /** Appends a comment to key found in line. * * Comments are marked with number signs, also called pound sign (#). * * White spaces are space and tab. * Lines can not start with blank or tab. * Blank lines are allowed and preserved in oomments * Trailing white spaces are allowed. * Only one host entry per line is allowed. * * * * @param line Will be closed with \0 where the comment begins * @return 0 when the caller should go on * @return 1 when the caller should continue (with next iteration) */ static int append_comment (char *comment, char *line) { size_t i; size_t s = kdbiStrLen(line); size_t c = kdbiStrLen(comment); char *endline; if (line[0] == '\n') { strncat (comment, "\n", HOSTS_BUFFER_SIZE-c-1); return 1; /* Empty line, so go on.. */ } if (line[0] == '#') { strncat (comment, line, HOSTS_BUFFER_SIZE-c-2); return 1; /* Complete line is comment, so go on.. */ } for (i=0; iflags, KEY_FLAG_SYNC); nr_keys ++; while (1) { fret = fgets (readbuffer, HOSTS_BUFFER_SIZE, fp); if (fret == 0) { /* success */ kdbbUnlock(fp); fclose (fp); ksClear (returned); ksAppend (returned, append); ksDel (append); errno = errnosave; return nr_keys; } if (append_comment(comment, readbuffer)) continue; sret = find_token (&fieldbuffer, readbuffer); if (sret == 0) continue; key = ksLookupByName(returned, fieldbuffer, KDB_O_POP); if (!key) key = keyDup (parentKey); keySetMode(key, 0664); keySetString (key, fieldbuffer); keySetComment (key, comment); *comment = '\0'; /* Start with a new comment */ readsize = sret; sret = find_token (&fieldbuffer, readbuffer+readsize); keyAddBaseName (key, fieldbuffer); ksAppendKey(append, key); clear_bit (key->flags, KEY_FLAG_SYNC); nr_alias = 0; while (1) /*Read in aliases*/ { readsize += sret; sret = find_token (&fieldbuffer, readbuffer+readsize); if (sret == 0) break; tmp = keyDup (key); aliasname[5] = nr_alias / 10 + '0'; aliasname[6] = nr_alias % 10 + '0'; keyAddBaseName (tmp, aliasname); alias = ksLookup(returned, tmp, KDB_O_POP); if (!alias) alias = tmp; else keyDel (tmp); keySetMode(alias, 0664); keySetString (alias, fieldbuffer); keySetComment (alias, ""); ksAppendKey(append, alias); clear_bit (alias->flags, KEY_FLAG_SYNC); nr_alias ++; if (nr_alias == 1) { keySetDir (key); clear_bit (key->flags, KEY_FLAG_SYNC); } } nr_keys += nr_alias + 1; } #if DEBUG printf ("error at line: %s\n", readbuffer); #endif ksDel (append); kdbbUnlock (fp); fclose (fp); errno = errnosave; return -1; } ssize_t kdbSet_hosts(KDB *handle, KeySet *returned, const Key *parentKey) { int errnosave = errno; ssize_t nr_keys = 0, nr_alias = 0; FILE *fp; Key *key, *alias=0; char * lastline; if (strcmp (keyName(kdbhGetMountpoint(handle)), keyName(parentKey))) return 0; fp = fopen (kdbhGetBackendData(handle), "w"); if (fp == 0) { /*kdbhSetError (handle, KDB_ERR_NODIR);*/ errno = errnosave; return -1; } kdbbWriteLock (fp); ksRewind (returned); key = ksNext (returned); /* skip parentKey */ nr_keys ++; while (1) { if (!alias) key = ksNext (returned); else key = alias; if (!key) break; lastline = strrchr (keyComment(key), '\n'); if (lastline) { *lastline = '\0'; fprintf (fp, "%s\n", keyComment(key)); *lastline = '\n'; /* preserve comment */ } fprintf (fp, "%s\t%s", (char*)keyValue(key), (char*)keyBaseName (key)); nr_alias = 0; if (keyIsDir (key)) { while ((alias = ksNext (returned)) != 0) { if (keyIsDir(alias)) break; if (strncmp (keyName(key), keyName(alias), strlen(keyName(key)))) break;; if (strlen(keyName(key)) + strlen (keyBaseName (alias)) + 1 != strlen (keyName(alias))) goto error; if (strncmp (keyBaseName (alias), "alias", 5)) goto error; fprintf (fp, "\t%s", (char*)keyValue (alias)); nr_alias++; } } else alias = 0; if (lastline) { if (*(lastline+1) != '\0') fprintf (fp, " #%s", lastline+1); } else { if (*keyComment(key) != '\0') fprintf (fp, " #%s", keyComment(key)); } fprintf (fp, "\n"); nr_keys += nr_alias + 1; } kdbbUnlock (fp); fclose (fp); errno = errnosave; return nr_keys; error: kdbbUnlock (fp); fclose (fp); /* Make the file empty */ fp = fopen ("/tmp/hosts", "w"); fclose (fp); errno = errnosave; return -1; } KDBEXPORT(hosts) { return kdbBackendExport(BACKENDNAME, KDB_BE_OPEN, &kdbOpen_hosts, KDB_BE_CLOSE, &kdbClose_hosts, KDB_BE_GET, &kdbGet_hosts, KDB_BE_SET, &kdbSet_hosts, KDB_BE_VERSION, BACKENDVERSION, KDB_BE_AUTHOR, "Markus Raab ", KDB_BE_LICENCE, "BSD", KDB_BE_DESCRIPTION, "Reads and writes /etc/hosts content", KDB_BE_END); } elektra-0.7.1/src/backends/hosts/hosts.h0000644000076400001440000000123011365506635015107 00000000000000#include #include #include #include #define BACKENDNAME "hosts" #define BACKENDVERSION "0.0.2" #define HOSTS_PATH "/etc/passwd" /* Use a buffer so large that it can hold my /etc/hosts :-) * TODO: make it dynamic */ #define HOSTS_BUFFER_SIZE 16384 /*Test size for small buffer #define HOSTS_BUFFER_SIZE 16 */ int kdbbWriteLock (FILE *f); int kdbbReadLock (FILE *f); int kdbbUnlock (FILE *f); int kdbOpen_hosts(KDB *handle); int kdbClose_hosts(KDB *handle); ssize_t kdbGet_hosts(KDB *handle, KeySet *ks, const Key *parentKey); ssize_t kdbSet_hosts(KDB *handle, KeySet *ks, const Key *parentKey); KDBEXPORT(hosts); elektra-0.7.1/src/backends/ini/0000777000076400001440000000000011365513213013273 500000000000000elektra-0.7.1/src/backends/ini/Makefile.am0000644000076400001440000000132111365507605015250 00000000000000# $Id$ #testdir = $(develdocdir)/src/backends/ini/ AM_CPPFLAGS = -I$(top_srcdir)/src/include -DDEBUG -D_POSIX_SOURCE -D_BSD_SOURCE ini_sources = ini.c helpers.c parser.c ini.h ../../include/kdb.h ../../include/kdbbackend.h noinst_LIBRARIES = libelektra-ini.a libelektra_ini_a_SOURCES = $(ini_sources) libelektra_ini_a_CFLAGS = -DELEKTRA_STATIC $(COPTFLAGS) $(CDBGFLAGS) backend_LTLIBRARIES = libelektra-ini.la libelektra_ini_la_SOURCES = $(ini_sources) libelektra_ini_la_LDFLAGS = -version-info $(BACKEND_VERSION_API) -module libelektra_ini_la_LIBADD = ../../libelektra/libelektra.la libelektra_ini_la_CFLAGS = $(COPTFLAGS) $(CDBGFLAGS) ../../libelektra/libelektra.la: cd ../../libelektra/ && $(MAKE) libelektra.la elektra-0.7.1/src/backends/ini/Makefile.in0000644000076400001440000006560711365511151015271 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ # $Id$ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = src/backends/ini DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/extensions.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/config.h CONFIG_CLEAN_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru libelektra_ini_a_AR = $(AR) $(ARFLAGS) libelektra_ini_a_LIBADD = am__objects_1 = libelektra_ini_a-ini.$(OBJEXT) \ libelektra_ini_a-helpers.$(OBJEXT) \ libelektra_ini_a-parser.$(OBJEXT) am_libelektra_ini_a_OBJECTS = $(am__objects_1) libelektra_ini_a_OBJECTS = $(am_libelektra_ini_a_OBJECTS) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(backenddir)" backendLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(backend_LTLIBRARIES) libelektra_ini_la_DEPENDENCIES = ../../libelektra/libelektra.la am__objects_2 = libelektra_ini_la-ini.lo libelektra_ini_la-helpers.lo \ libelektra_ini_la-parser.lo am_libelektra_ini_la_OBJECTS = $(am__objects_2) libelektra_ini_la_OBJECTS = $(am_libelektra_ini_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/src/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libelektra_ini_a_SOURCES) $(libelektra_ini_la_SOURCES) DIST_SOURCES = $(libelektra_ini_a_SOURCES) \ $(libelektra_ini_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) INSTALL = @INSTALL@ ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BACKENDS = @BACKENDS@ BACKEND_VERSION_API = @BACKEND_VERSION_API@ BINDINGS = @BINDINGS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CDBGFLAGS = @CDBGFLAGS@ CFLAGS = @CFLAGS@ COPTFLAGS = @COPTFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSTDFLAGS = @CSTDFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDBGFLAGS = @CXXDBGFLAGS@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXOPTFLAGS = @CXXOPTFLAGS@ CXXSTDFLAGS = @CXXSTDFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_FALSE = @DEBUG_FALSE@ DEBUG_TRUE = @DEBUG_TRUE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ELEKTRATOOLS_VERSION_API = @ELEKTRATOOLS_VERSION_API@ ELEKTRA_VERSION_API = @ELEKTRA_VERSION_API@ EXEEXT = @EXEEXT@ EXPERIMENTAL_FALSE = @EXPERIMENTAL_FALSE@ EXPERIMENTAL_TRUE = @EXPERIMENTAL_TRUE@ F77 = @F77@ FFLAGS = @FFLAGS@ GENHTML = @GENHTML@ GREP = @GREP@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ HAVE_LIBLTDL_FALSE = @HAVE_LIBLTDL_FALSE@ HAVE_LIBLTDL_TRUE = @HAVE_LIBLTDL_TRUE@ HAVE_MAN2HTML_FALSE = @HAVE_MAN2HTML_FALSE@ HAVE_MAN2HTML_TRUE = @HAVE_MAN2HTML_TRUE@ HAVE_XML_FALSE = @HAVE_XML_FALSE@ HAVE_XML_TRUE = @HAVE_XML_TRUE@ HAVE_XSL_FALSE = @HAVE_XSL_FALSE@ HAVE_XSL_TRUE = @HAVE_XSL_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDB_VERSION = @KDB_VERSION@ KDB_VERSION_MAJOR = @KDB_VERSION_MAJOR@ KDB_VERSION_MAJORMINOR = @KDB_VERSION_MAJORMINOR@ KDB_VERSION_MICRO = @KDB_VERSION_MICRO@ KDB_VERSION_MINOR = @KDB_VERSION_MINOR@ LCOV = @LCOV@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VALGRIND = @VALGRIND@ VALGRINDTESTS_FALSE = @VALGRINDTESTS_FALSE@ VALGRINDTESTS_TRUE = @VALGRINDTESTS_TRUE@ VERSION = @VERSION@ XML2_CONFIG = @XML2_CONFIG@ XML_CPPFLAGS = @XML_CPPFLAGS@ XML_LIBS = @XML_LIBS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ backend_static_libs = @backend_static_libs@ backenddir = @backenddir@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ datarootdir = @datarootdir@ dbroot = @dbroot@ default_backend = @default_backend@ default_dbackend = @default_dbackend@ default_docbook = @default_docbook@ develdocdir = @develdocdir@ docdir = @docdir@ doxygen = @doxygen@ dvidir = @dvidir@ elektratools = @elektratools@ exec_prefix = @exec_prefix@ gconf_CFLAGS = @gconf_CFLAGS@ gconf_LIBS = @gconf_LIBS@ hlvlbackenddir = @hlvlbackenddir@ 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@ man2html = @man2html@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ privatelibs = @privatelibs@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ ulibdir = @ulibdir@ xsltproc = @xsltproc@ #testdir = $(develdocdir)/src/backends/ini/ AM_CPPFLAGS = -I$(top_srcdir)/src/include -DDEBUG -D_POSIX_SOURCE -D_BSD_SOURCE ini_sources = ini.c helpers.c parser.c ini.h ../../include/kdb.h ../../include/kdbbackend.h noinst_LIBRARIES = libelektra-ini.a libelektra_ini_a_SOURCES = $(ini_sources) libelektra_ini_a_CFLAGS = -DELEKTRA_STATIC $(COPTFLAGS) $(CDBGFLAGS) backend_LTLIBRARIES = libelektra-ini.la libelektra_ini_la_SOURCES = $(ini_sources) libelektra_ini_la_LDFLAGS = -version-info $(BACKEND_VERSION_API) -module libelektra_ini_la_LIBADD = ../../libelektra/libelektra.la libelektra_ini_la_CFLAGS = $(COPTFLAGS) $(CDBGFLAGS) all: all-am .SUFFIXES: .SUFFIXES: .c .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 \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/backends/ini/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/backends/ini/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libelektra-ini.a: $(libelektra_ini_a_OBJECTS) $(libelektra_ini_a_DEPENDENCIES) -rm -f libelektra-ini.a $(libelektra_ini_a_AR) libelektra-ini.a $(libelektra_ini_a_OBJECTS) $(libelektra_ini_a_LIBADD) $(RANLIB) libelektra-ini.a install-backendLTLIBRARIES: $(backend_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(backenddir)" || $(mkdir_p) "$(DESTDIR)$(backenddir)" @list='$(backend_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(backendLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(backenddir)/$$f'"; \ $(LIBTOOL) --mode=install $(backendLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(backenddir)/$$f"; \ else :; fi; \ done uninstall-backendLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(backend_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(backenddir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(backenddir)/$$p"; \ done clean-backendLTLIBRARIES: -test -z "$(backend_LTLIBRARIES)" || rm -f $(backend_LTLIBRARIES) @list='$(backend_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libelektra-ini.la: $(libelektra_ini_la_OBJECTS) $(libelektra_ini_la_DEPENDENCIES) $(LINK) -rpath $(backenddir) $(libelektra_ini_la_LDFLAGS) $(libelektra_ini_la_OBJECTS) $(libelektra_ini_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_ini_a-helpers.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_ini_a-ini.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_ini_a-parser.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_ini_la-helpers.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_ini_la-ini.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_ini_la-parser.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< libelektra_ini_a-ini.o: ini.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_ini_a_CFLAGS) $(CFLAGS) -MT libelektra_ini_a-ini.o -MD -MP -MF "$(DEPDIR)/libelektra_ini_a-ini.Tpo" -c -o libelektra_ini_a-ini.o `test -f 'ini.c' || echo '$(srcdir)/'`ini.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_ini_a-ini.Tpo" "$(DEPDIR)/libelektra_ini_a-ini.Po"; else rm -f "$(DEPDIR)/libelektra_ini_a-ini.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ini.c' object='libelektra_ini_a-ini.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_ini_a_CFLAGS) $(CFLAGS) -c -o libelektra_ini_a-ini.o `test -f 'ini.c' || echo '$(srcdir)/'`ini.c libelektra_ini_a-ini.obj: ini.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_ini_a_CFLAGS) $(CFLAGS) -MT libelektra_ini_a-ini.obj -MD -MP -MF "$(DEPDIR)/libelektra_ini_a-ini.Tpo" -c -o libelektra_ini_a-ini.obj `if test -f 'ini.c'; then $(CYGPATH_W) 'ini.c'; else $(CYGPATH_W) '$(srcdir)/ini.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_ini_a-ini.Tpo" "$(DEPDIR)/libelektra_ini_a-ini.Po"; else rm -f "$(DEPDIR)/libelektra_ini_a-ini.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ini.c' object='libelektra_ini_a-ini.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_ini_a_CFLAGS) $(CFLAGS) -c -o libelektra_ini_a-ini.obj `if test -f 'ini.c'; then $(CYGPATH_W) 'ini.c'; else $(CYGPATH_W) '$(srcdir)/ini.c'; fi` libelektra_ini_a-helpers.o: helpers.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_ini_a_CFLAGS) $(CFLAGS) -MT libelektra_ini_a-helpers.o -MD -MP -MF "$(DEPDIR)/libelektra_ini_a-helpers.Tpo" -c -o libelektra_ini_a-helpers.o `test -f 'helpers.c' || echo '$(srcdir)/'`helpers.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_ini_a-helpers.Tpo" "$(DEPDIR)/libelektra_ini_a-helpers.Po"; else rm -f "$(DEPDIR)/libelektra_ini_a-helpers.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='helpers.c' object='libelektra_ini_a-helpers.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_ini_a_CFLAGS) $(CFLAGS) -c -o libelektra_ini_a-helpers.o `test -f 'helpers.c' || echo '$(srcdir)/'`helpers.c libelektra_ini_a-helpers.obj: helpers.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_ini_a_CFLAGS) $(CFLAGS) -MT libelektra_ini_a-helpers.obj -MD -MP -MF "$(DEPDIR)/libelektra_ini_a-helpers.Tpo" -c -o libelektra_ini_a-helpers.obj `if test -f 'helpers.c'; then $(CYGPATH_W) 'helpers.c'; else $(CYGPATH_W) '$(srcdir)/helpers.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_ini_a-helpers.Tpo" "$(DEPDIR)/libelektra_ini_a-helpers.Po"; else rm -f "$(DEPDIR)/libelektra_ini_a-helpers.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='helpers.c' object='libelektra_ini_a-helpers.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_ini_a_CFLAGS) $(CFLAGS) -c -o libelektra_ini_a-helpers.obj `if test -f 'helpers.c'; then $(CYGPATH_W) 'helpers.c'; else $(CYGPATH_W) '$(srcdir)/helpers.c'; fi` libelektra_ini_a-parser.o: parser.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_ini_a_CFLAGS) $(CFLAGS) -MT libelektra_ini_a-parser.o -MD -MP -MF "$(DEPDIR)/libelektra_ini_a-parser.Tpo" -c -o libelektra_ini_a-parser.o `test -f 'parser.c' || echo '$(srcdir)/'`parser.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_ini_a-parser.Tpo" "$(DEPDIR)/libelektra_ini_a-parser.Po"; else rm -f "$(DEPDIR)/libelektra_ini_a-parser.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='parser.c' object='libelektra_ini_a-parser.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_ini_a_CFLAGS) $(CFLAGS) -c -o libelektra_ini_a-parser.o `test -f 'parser.c' || echo '$(srcdir)/'`parser.c libelektra_ini_a-parser.obj: parser.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_ini_a_CFLAGS) $(CFLAGS) -MT libelektra_ini_a-parser.obj -MD -MP -MF "$(DEPDIR)/libelektra_ini_a-parser.Tpo" -c -o libelektra_ini_a-parser.obj `if test -f 'parser.c'; then $(CYGPATH_W) 'parser.c'; else $(CYGPATH_W) '$(srcdir)/parser.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_ini_a-parser.Tpo" "$(DEPDIR)/libelektra_ini_a-parser.Po"; else rm -f "$(DEPDIR)/libelektra_ini_a-parser.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='parser.c' object='libelektra_ini_a-parser.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_ini_a_CFLAGS) $(CFLAGS) -c -o libelektra_ini_a-parser.obj `if test -f 'parser.c'; then $(CYGPATH_W) 'parser.c'; else $(CYGPATH_W) '$(srcdir)/parser.c'; fi` libelektra_ini_la-ini.lo: ini.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_ini_la_CFLAGS) $(CFLAGS) -MT libelektra_ini_la-ini.lo -MD -MP -MF "$(DEPDIR)/libelektra_ini_la-ini.Tpo" -c -o libelektra_ini_la-ini.lo `test -f 'ini.c' || echo '$(srcdir)/'`ini.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_ini_la-ini.Tpo" "$(DEPDIR)/libelektra_ini_la-ini.Plo"; else rm -f "$(DEPDIR)/libelektra_ini_la-ini.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ini.c' object='libelektra_ini_la-ini.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_ini_la_CFLAGS) $(CFLAGS) -c -o libelektra_ini_la-ini.lo `test -f 'ini.c' || echo '$(srcdir)/'`ini.c libelektra_ini_la-helpers.lo: helpers.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_ini_la_CFLAGS) $(CFLAGS) -MT libelektra_ini_la-helpers.lo -MD -MP -MF "$(DEPDIR)/libelektra_ini_la-helpers.Tpo" -c -o libelektra_ini_la-helpers.lo `test -f 'helpers.c' || echo '$(srcdir)/'`helpers.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_ini_la-helpers.Tpo" "$(DEPDIR)/libelektra_ini_la-helpers.Plo"; else rm -f "$(DEPDIR)/libelektra_ini_la-helpers.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='helpers.c' object='libelektra_ini_la-helpers.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_ini_la_CFLAGS) $(CFLAGS) -c -o libelektra_ini_la-helpers.lo `test -f 'helpers.c' || echo '$(srcdir)/'`helpers.c libelektra_ini_la-parser.lo: parser.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_ini_la_CFLAGS) $(CFLAGS) -MT libelektra_ini_la-parser.lo -MD -MP -MF "$(DEPDIR)/libelektra_ini_la-parser.Tpo" -c -o libelektra_ini_la-parser.lo `test -f 'parser.c' || echo '$(srcdir)/'`parser.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_ini_la-parser.Tpo" "$(DEPDIR)/libelektra_ini_la-parser.Plo"; else rm -f "$(DEPDIR)/libelektra_ini_la-parser.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='parser.c' object='libelektra_ini_la-parser.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_ini_la_CFLAGS) $(CFLAGS) -c -o libelektra_ini_la-parser.lo `test -f 'parser.c' || echo '$(srcdir)/'`parser.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(backenddir)"; 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: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_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-backendLTLIBRARIES clean-generic clean-libtool \ clean-noinstLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-backendLTLIBRARIES install-exec-am: install-info: install-info-am install-man: 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-backendLTLIBRARIES uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean \ clean-backendLTLIBRARIES clean-generic clean-libtool \ clean-noinstLIBRARIES ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-backendLTLIBRARIES install-data install-data-am \ install-exec install-exec-am install-info install-info-am \ install-man install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-backendLTLIBRARIES uninstall-info-am ../../libelektra/libelektra.la: cd ../../libelektra/ && $(MAKE) libelektra.la # 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: elektra-0.7.1/src/backends/ini/helpers.c0000644000076400001440000002404211365507605015027 00000000000000/*************************************************************************** helpers.c - System depended helper functions (POSIX) ------------------- begin : 01.03.2005 updated : 06.10.2005 copyright : (C) 2005 by Markus Raab email : debian@markus-raab.org ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ #include #define _POSIX_SOURCE 1 /**POSIX include files*/ #include #include #include #include #include #include #include /*For flock*/ #include #include #include /** * Opens a file filename. * The mode might be 'r' or 'w' * (will be mapped to O_RDONLY or O_RDWR.) * * It handles the failures very safty. * Don't use any other open inside the * backend. * * @see close_file * * You have to close it with close_file * because there is also a file locking * done. * * @return -1 on failure, 0 otherwise * @ingroup ini * */ int open_file (KDB *handle, char * filename, char mode) { char buffer [2] = "\0\0"; int ret = 0; int posix_mode; if (mode == 'w') { buffer[0] = 'r'; buffer[1] = '+'; posix_mode = O_RDWR; } else if (mode == 'r') { buffer[0] = 'r'; posix_mode = O_RDONLY; } else { fprintf (stderr, "Mode not useful\n"); return -1; } FILEDES = open (filename, posix_mode); if (FILEDES == -1) { #if DEBUG fprintf (stderr, "Will create new file\n"); #endif FILEDES = open (filename, posix_mode | O_CREAT); if (FILEDES == -1) { fprintf (stderr, "Unable to open file\n"); perror ("Reason: "); return -1; } ret = fchmod (FILEDES, 0644); /* TODO: permissions!*/ if (ret == -1) { fprintf (stderr, "Unable to chmod file\n"); perror ("Reason: "); } } if (flock (FILEDES, LOCK_EX) == -1) { fprintf (stderr, "Unable to lock file\n"); perror ("Reason: "); ret = -1; } FILEPTR = fdopen (FILEDES,buffer); if (FILEPTR == NULL) { fprintf (stderr, "fdopen() failed\n"); perror ("Reason: "); ret = -1; } return ret; } /** * Close previous with open_file() opened file * @return 0 on success, -1 on failure */ int close_file (KDB *handle) { int ret = 0; if (flock (FILEDES, LOCK_UN) == -1) { perror ("Unable to unlock file"); ret = -1; } ret = fclose (FILEPTR); if (ret != 0) { perror ("Could not close file"); ret = -2; } return ret; } /** * stat_file stats the filename filename and write * the information in the key. * * So its possible to stat the real filename, without * changing the keyname (which is normally another * name then the filename). * * @param filename will be stated * @param key will get the information about filename * * @return 0 on success, -1 otherwise * * @ingroup ini */ int stat_file (Key * key, char * filename) { struct stat buf; stat (filename, &buf); keySetMode(key,buf.st_mode); keySetUID(key,buf.st_uid); keySetGID(key,buf.st_gid); if (S_ISDIR (buf.st_mode)) keySetDir(key); if (S_ISREG (buf.st_mode)) keySetType(key, KEY_TYPE_FILE); key->atime=buf.st_atime; key->mtime=buf.st_mtime; key->ctime=buf.st_ctime; return 0; } /** * Enlarges file on place where with space bytes. The new * place will contain the previous text. The text before * where will not be touched. * * @param where: holds the place where a new space is needed * @param space: holds the size of the new needed space * * @return 0 on success, -1 else * @ingroup ini */ int enlarge_file (KDB *handle, long where, long space) { char buffer [BUFFER_RDWR_SIZE+1]; size_t sread; long diff = 0; int err; int finished = 0; long pos; fseek (FILEPTR,0,SEEK_END); /* begin at end*/ pos = ftell (FILEPTR); do { pos -= BUFFER_RDWR_SIZE; if (pos < where) { diff = where - pos; pos = where; finished = 1; } fseek (FILEPTR, pos, SEEK_SET); sread = fread (buffer,1,BUFFER_RDWR_SIZE-diff,FILEPTR); /* read last peace*/ buffer[sread] = 0; /* mark end (not necessary)*/ fseek (FILEPTR,pos+space,SEEK_SET); /* jump to writepos*/ #if DEBUG printf ("buffer: %s, sread: %d\n", buffer, (int)sread); #endif fwrite (buffer,1,sread,FILEPTR); err = ferror (FILEPTR); if (err != 0) { fprintf (stderr, "Error in stream\n"); return -1; } } while (! finished); return 0; } /** * Shrinks file on place where with space bytes. * The old text (length space after where) will * be lost! The text before where will not be touched. * * @param where: The File will be shrinked here * @param space: The size how much the file will be shrinked * * @return 0 on success, -1 on error * @ingroup ini */ int shrink_file (KDB *handle, long where, long space) { char buffer [BUFFER_RDWR_SIZE+1]; size_t sread; int err; long pos; fseek (FILEPTR,where, SEEK_SET); pos = ftell (FILEPTR); do { fseek (FILEPTR,pos+space,SEEK_SET); /* jump to readposition*/ sread = fread (buffer,1,BUFFER_RDWR_SIZE,FILEPTR); /* read a peace*/ buffer[sread] = 0; /* mark end (not necessary)*/ fseek (FILEPTR,pos,SEEK_SET); /* jump to writepos*/ #if DEBUG printf ("buffer: %s, sread: %d\n", buffer, (int)sread); #endif fwrite (buffer,1,sread,FILEPTR); err = ferror (FILEPTR); if (err != 0) { fprintf (stderr, "Error in stream\n"); return -1; } pos += sread; } while (sread == BUFFER_RDWR_SIZE); ftruncate (FILEDES,lseek(FILEDES,0,SEEK_CUR)); return 0; } /** * Get the basename for the Key forKey. * * This might be: * /etc/kdb * /home/markus/.kdb * * There are 2 possibilites. It may be KEY_NS_SYSTEM * or KEY_NS_USER. When the key of a user is asked * for, then environment will be asked what USER is * logged on. * * @see file_name * * @ingroup ini */ size_t base_name (const Key * forKey, char * basename) { size_t length; switch (keyGetNamespace(forKey)) { case KEY_NS_SYSTEM: { /* Prepare to use the 'system/ *' database */ strncpy(basename,KDB_DB_SYSTEM,MAX_PATH_LENGTH); length=strlen(basename); break; } /* If we lack a usable concept of users we simply let the default handle it * and hence disable the entire user/ hiarchy. */ case KEY_NS_USER: { /* * TODO: Change to use elektra internal config. * As fallback use getpwnam (libc bug makes valgrind cry) * And as last solution use environment $HOME? * * Prepare to use the 'user:????/ *' database */ if (getenv("HOME")) { char * home = getenv("HOME"); length=snprintf(basename,MAX_PATH_LENGTH,"%s/%s",home,KDB_DB_USER); break; } #ifdef HAVE_PWD_H else if (forKey->owner) user=getpwnam(forKey->owner); else if ( getenv("USER") ) user=getpwnam(getenv("USER")); if (!user) return 0; /* propagate errno */ length=snprintf(basename,MAX_PATH_LENGTH,"%s/%s",user->pw_dir,KDB_DB_USER); break; #else /*errno=KDB_ERR_INVALIDKEY;*/ return 0; #endif } default: { /*errno=KDB_ERR_INVALIDKEY;*/ return 0; } } return length; } /** * Returns the filename from the Key forKey * * The name returned is normally not correct, because * it may have subdirs and it has the keyname in it. * * @see IniSearchFileName * will cut of the end until it has found a file. * * @param filename: MAX_PATH_LENGTH size char* * @param keyname: MAX_PATH_LENGTH size char* * * @ingroup ini */ size_t file_name (const Key * forKey, char * filename) { size_t length; size_t namesize; char * name; length = base_name (forKey, filename); filename[length]='/'; length++; /* now the Keyname follows*/ namesize = keyGetNameSize (forKey); if (namesize == 0) return 0; name = (char*) malloc (namesize); keyGetName (forKey, name, namesize); if (length > MAX_PATH_LENGTH) return -1; /* too long*/ strncpy (filename + length, name, namesize); length += namesize; free (name); return length; } /**Opens a directory and returns a pointer to a * platform depended unique struct which indentifies * the opened directory. * With the pointer you can get the filenames with * repeated calling from read_dir. * @see read_dir * @return pointer to struct (DIR), or NULL if failed*/ void * open_dir (char * pathname) { return (void *) opendir (pathname); } /**Creates directories recursively up to the filename * @return 0 on success, -1 on failure*/ int create_dir (char * keyFileName) { char * end; char * fil; #if DEBUG fprintf (stderr, "will create_dir() for %s\n", keyFileName); #endif end = strrchr(keyFileName, '/'); /* key abschneiden*/ *end = 0; fil = strrchr(keyFileName, '/'); /* das hier wird file sein*/ end = keyFileName +1; /* fange suche nach dir an*/ while (1) { end = strchr(end+1, '/'); if (end == NULL) break; * end = '\0'; #if DEBUG fprintf (stderr, "Create Folder %s\n", keyFileName); #endif if (mkdir (keyFileName, 0777) == -1) { if (errno == EEXIST) { #if DEBUG /**TODO Check if it is dir. Make more robust with stat*/ fprintf (stderr, "Directory already exists\n"); #endif } else { fprintf (stderr, "Could not create Folder %s\n", keyFileName); perror ("Reason: "); return -1; } } * end = '/'; } return 0; } /**Reads the next filename out of dir. * precondition: * filename size is MAX_PATH_LENGTH and guaranted to be allocated. * @return -1 if no more files, 0 on success, -1 on failure*/ int read_dir (void * dir, char * filename) { struct dirent * n; n= readdir (dir); strncpy (filename, n->d_name, MAX_PATH_LENGTH); if (n == NULL) return -1; /*No more files*/ return 0; } /**Closes previously opened dir * Use pointer from open_dir * @return 0 on success, -1 on failure*/ int close_dir (void * dir) { return close_dir ((DIR *) dir); } elektra-0.7.1/src/backends/ini/ini.c0000644000076400001440000002611111361542117014134 00000000000000/*************************************************************************** ini.c - Backend for ini-style like files ------------------- begin : 01.03.2005 updated : 06.10.2005 copyright : (C) 2005 by Markus Raab email : debian@markus-raab.org ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ #include int kdbOpen_ini(KDB *handle) { KDBCap *cap = kdbhGetCapability (handle); cap->onlyFullGet=1; cap->noStat=1; cap->onlyRemoveAll=1; cap->onlyFullSet=1; cap->onlyAddKeys=1; cap->onlySystem=1; cap->onlyUser=1; cap->noOwner=1; cap->noValue=1; cap->noComment=1; cap->noUID=1; cap->noGID=1; cap->noMode=1; cap->noDir=1; cap->noATime=1; cap->noMTime=1; cap->noCTime=1; cap->noRemove=1; cap->noMount=1; cap->noBinary=1; cap->noString=1; cap->noTypes=1; cap->noError=1; cap->noLock=1; cap->noThread=1; kdbhSetBackendData (handle, malloc (sizeof (backendData))); /* backend initialization logic */ return 0; } int kdbClose_ini(KDB *handle) { free (kdbhGetBackendData (handle)); /* free all backend resources and shut it down */ return 0; /* success */ } ssize_t kdbGet_ini(KDB *handle, KeySet *returned, const Key *parentKey) { int rc = 0; char t [MAX_PATH_LENGTH]; Key * write = keyDup (parentKey); #if DEBUG file_name(write, t); fprintf (stderr, "file_name: %s\n", t); base_name(write, t); fprintf (stderr, "base_name: %s\n", t); #endif /**Immediately call IniChooseFile (will work recursively)*/ rc = IniChooseFile (handle, write, returned, 0); keyDel (write); return rc; } ssize_t kdbSet_ini(KDB *handle, KeySet *ks, const Key *parentKey) { return IniSetKeys (handle, ks); } /** * Returns a filename from the Key which can be opened for forKey * * The name returned should be correct, because * it removes subdirs and the keyname. * * It even tests with kdbStatKey if the File exists. * So be prepaired that stat information is filled * within the key. * * @see IniSearchFileName * @param filename must be allocated MAX_PATH_LENGTH space. * Previous Content of Filename will be destroyed afterwards. * * @ingroup ini */ size_t IniSearchFileName (KDB *handle, Key * forKey, char * filename) { size_t length; uint8_t info = 0; char * end; length = file_name (forKey, filename); do { #if DEBUG fprintf (stderr, "Search %s\n", filename); #endif end = strrchr (filename, '/'); if (end == NULL) { #if DEBUG fprintf (stderr, "Could not find any file\n"); #endif return -1; } *end= '\0'; stat_file (forKey, filename); info = keyGetType (forKey); } while (!(info & KEY_TYPE_FILE)); return length; } /** * Get out all the keys of a file * * @param keyFileName: Name of the file * @param keyRoot: Name of the root of files * The root will be added before the keyName * * @ingroup ini */ ssize_t IniGetKeys (KDB *handle, char * keyFileName, char * keyRoot, KeySet * returned) { Key * key; int pos; if (open_file (handle, keyFileName, O_RDONLY) == -1) { #if DEBUG fprintf (stderr, "Could not open file %s\n", keyFileName); #endif /*errno = KDB_ERR_NOTFOUND;*/ return -1; } key = keyNew(0); #if DEBUG fprintf (stderr, "Call read_key(%s)\n", keyRoot); #endif while ((pos=read_key (handle, key, keyRoot)) == 0) { #if DEBUG fprintf (stderr, "Append key\n"); #endif ksAppendKey(returned,key); key = keyNew(0); } keyDel (key); /* delete the not used key left*/ close_file(handle); return 0; /* success */ } /** * Reads the contents of the whole file which Key * points to. * * The Keys will be added in the Keyset. * * @ingroup ini */ int IniReadFile (KDB *handle, Key * key, KeySet * returned, unsigned long options) { char filename [MAX_PATH_LENGTH]; char * keyname; size_t keyLength; #if DEBUG fprintf (stderr, "IniReadfile\n"); #endif file_name(key, filename); keyLength = keyGetNameSize (key); keyname = malloc (keyLength); keyGetName (key, keyname, keyGetNameSize (key)); #if DEBUG fprintf (stderr, "Call IniGetKeys(filename: %s, keyRoot: %s,returned)\n", filename, keyname); #endif IniGetKeys (handle, filename, keyname, returned); if (keyLength >0) free (keyname); return 0; } /** * This mapper chooses between the different * styles of files to start the correct function. * * For files it starts IniReadFile * For directorys it starts IniReadDir * * @ingroup ini * */ int IniChooseFile(KDB *handle, Key * key, KeySet * returned, unsigned long options) { char filename [MAX_PATH_LENGTH]; char * keyname; size_t keylength; file_name(key, filename); stat_file (key, filename); #if DEBUG fprintf (stderr, "IniChooseFile, pathName: %s\n", filename); #endif if (keyGetType (key) == KEY_TYPE_DIR) { if (filename[strlen(filename)-1] != '/') { keylength = keyGetNameSize(key); keyname = malloc (keylength + 2); keyGetName (key, keyname, keylength); keyname[keylength-1] = '/'; keyname[keylength] = '\0'; keySetName (key, keyname); free (keyname); } return IniReadDir (handle, key, returned, options); } if (keyGetType (key) == KEY_TYPE_FILE) { return IniReadFile (handle, key, returned, options); } #if DEBUG fprintf (stderr, "Not a directory or file!"); #endif return -1; } /** * Reads all Keys of a directory. * * For every key the mapper IniChooseFile * will be called. * * @ingroup ini * */ int IniReadDir(KDB *handle, Key * key, KeySet * returned, unsigned long options) { char pathName [MAX_PATH_LENGTH]; char keyname [MAX_PATH_LENGTH]; char keypath [MAX_PATH_LENGTH]; char filename [MAX_PATH_LENGTH]; void * dir; int ret; #if DEBUG fprintf (stderr, "IniReadDir\n"); #endif file_name (key, pathName); dir = open_dir (pathName); if (dir == NULL) { fprintf (stderr, "Could not open directory %s\n", pathName); return -1; } keyGetName (key, keypath, MAX_PATH_LENGTH); while (read_dir (dir,filename) == 0) { if ( strcmp(filename, ".") == 0 || strcmp(filename, "..") == 0) continue; if (filename[0] == '.' && !(options & KDB_O_INACTIVE)) continue; #if DEBUG fprintf (stderr, "Next entry filename: %s\n", filename); #endif strncpy(keyname, keypath, MAX_PATH_LENGTH); strcat(keyname, filename); keySetName (key, keyname); #if DEBUG fprintf (stderr, "New keyname: %s\n", keyname); #endif ret = IniChooseFile (handle, key, returned, options); } if (close_dir (dir)) { fprintf (stderr, "Could not close directory\n"); return -1; } return ret; } /**Walks through a file and lookups if the first key of a keyset is in the * given Keyset. When found it overwrites the key. It also checks if any * of the other keys can be written in that file under that context. If * not, the keys will remain in the Keyset. * * So, the KeySet will be empty after complete successful writing. At * least one key is guranteed to be written when it was successful. * * The whole idea behind that concept is, that open/close and searching * within a file is complete minimized. The disadvantage is, that a * fast ksLookupKey is required, because every readed key will be compared * with all keys in keyset (its not implemented in elektra right now, * so it will consume linear more time, but only in memory, not on * harddisc). * * When not found it writes out the keys before the sectionend. * This can be: * * setting keys new keys will introduce new folders and files * as needed. * * At least one key will be written! * * @return >=0 on success * @return -1 on failure (Keyset may be changed then!) * @return #nr when #nr keys could not written to file * * */ int IniSetKeys (KDB *handle, KeySet * origKeys) { char keyFileName [MAX_PATH_LENGTH]; int pos; int keySize; char * keyFullName = NULL; char * keyRoot = NULL; char * end; Key * origKey; /*First key which will introduce opening file*/ Key * setKey; /*Used for getting the keys which may be set*/ Key * key = keyNew(0); long oldpos; #if DEBUG fprintf (stderr, "IniSetKeys() entered\n"); #endif ksRewind (origKeys); origKey = ksNext (origKeys); /* Open file for this key*/ key = keyDup (origKey); /* for searching*/ pos = IniSearchFileName(handle, key, keyFileName); #if DEBUG fprintf (stderr, "after SearchFileName ...\n"); #endif if (pos == -1) /* no such file exists*/ { file_name(key,keyFileName); create_dir(keyFileName); } keySize = keyGetNameSize (key); keyFullName = malloc (keySize+1); if (keyFullName == NULL) goto memerror; keyGetName(key, keyFullName, keySize); end = strrchr (keyFullName, '/'); /* dirname*/ if (end) *end = 0; keyRoot = malloc (strlen (keyFullName)); if (keyRoot == NULL) goto memerror; strcpy (keyRoot, keyFullName); if (end) *end = '/'; /*revert keyname*/ #if DEBUG fprintf (stderr, "keyRoot: %s, keyName: %s\n", keyRoot, keyFullName); fprintf (stderr, "Set Key [%d] in File: %s\n",keySize, keyFileName); #endif if (open_file (handle, keyFileName, O_RDWR) == -1) { #if DEBUG fprintf (stderr, "Could not open file %s\n", keyFileName); #endif ksAppendKey(origKeys, origKey); /*errno = KDB_ERR_NOTFOUND;*/ goto fileerror; } while ((pos=read_key (handle, key, keyRoot)) == 0) { if ((setKey = ksLookupByName (origKeys, key->key, 0)) != NULL) { /* right Key found*/ #if DEBUG fprintf (stderr, "Key found\n"); fprintf(stderr, "Name: (%s), Value: (%s), Comment: (%s)\n", keyName (setKey), (char *) keyValue(setKey), (char *) keyComment (setKey)); #endif write_key(handle, setKey, oldpos); if ((keyCompare (key, origKey) & KEY_NAME) == 0) pos = 1; /*Start Key found, good!*/ } oldpos = ftell (FILEPTR); } if (pos != 1) { /* key not found, add to the end*/ #if DEBUG fprintf (stderr, "Key not found!\n"); #endif fseek (FILEPTR, 0, SEEK_END); oldpos = ftell(FILEPTR); /*TODO: write key here if not found * write_key(setKey, oldpos);*/ pos = 0; } else if (pos == 1) { /* key found, everything went ok!*/ pos = 0; } close_file (handle); free (keyFullName); free (keyRoot); keyDel (key); #if DEBUG fprintf (stderr, "leaving IniSetKeys()\n"); #endif return pos; /* success */ memerror: /*errno=KDB_ERR_NOMEM;*/ close_file (handle); #if DEBUG fprintf (stderr, "Memory Error\n"); #endif fileerror: free (keyFullName); free (keyRoot); keyDel (key); return -1; } KDBEXPORT(ini) { return kdbBackendExport(BACKENDNAME, KDB_BE_OPEN, &kdbOpen_ini, KDB_BE_CLOSE, &kdbClose_ini, KDB_BE_GET, &kdbGet_ini, KDB_BE_SET, &kdbSet_ini, KDB_BE_VERSION, BACKENDVERSION, KDB_BE_AUTHOR, "Markus Raab ", KDB_BE_LICENCE, "BSD", KDB_BE_DESCRIPTION, "Key/Value Pairs are stored in files in following scheme: key1=value1;comment", KDB_BE_END); } elektra-0.7.1/src/backends/ini/ini.h0000644000076400001440000000734011365507605014153 00000000000000/*************************************************************************** ini.h - Backend for ini-style like files ------------------- begin : 01.03.2005 updated : 06.10.2005 copyright : (C) 2005 by Markus Raab email : debian@markus-raab.org ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ /*************************************************************************** * * This is a ini-style backend. * Key/Value Pairs are stored in files in following scheme: * * key1=value1;comment * * TODO: * allow subkeys setting/getting * setting existing keys again * setting errno properly (update doc, how it should be) * KDB_ERR_NOMEM bei malloc errors * ***************************************************************************/ #include #include #include #include #define BACKENDNAME "ini" #define BACKENDVERSION "0.1.2" struct _backendData { int fd; FILE *fc; }; typedef struct _backendData backendData; #define FILEDES ((((backendData*)kdbhGetBackendData (handle))->fd)) #define FILEPTR ((((backendData*)kdbhGetBackendData (handle))->fc)) int IniReadDir(KDB *handle, Key * key, KeySet * returned, unsigned long options); int IniChooseFile(KDB *handle, Key * key, KeySet * returned, unsigned long options); int IniReadFile (KDB *handle, Key * key, KeySet * returned, unsigned long options); int IniSetKeys (KDB *handle, KeySet * origKeys); /**Helper functions*/ int open_file (KDB *handle, char * filename, char mode); int close_file (KDB *handle); int enlarge_file (KDB *handle, long where, long space); int shrink_file (KDB *handle, long where, long space); int read_key (KDB *handle, Key * key, char * root); int write_key (KDB *handle, Key * key, long oldpos); int remove_key (KDB *handle, Key * key, long oldpos); int kdbiRealloc (void ** buffer, size_t size); int stat_file (Key * forKey, char * filename); size_t base_name (const Key * forKey, char * basename); size_t file_name (const Key * forKey, char * basename); void * open_dir (char * pathname); int create_dir (char * filename); int read_dir (void * dir, char * filename); int close_dir (void * dir); /**Parsing functions*/ int parse_buffer (char * c); int convert_engine (char * c); int convert_strlen (char * p, int size); int convert_stream (char * buffer, int size, FILE * stream); int make_key (Key * key, char * root, char * buffer_key, char * buffer_value, char * buffer_comment); /**Some systems have even longer pathnames */ #ifdef PATH_MAX #define MAX_PATH_LENGTH PATH_MAX /**This value is garanteed on any Posix system */ #elif _POSIX_PATH_MAX #define MAX_PATH_LENGTH _POSIX_PATH_MAX #else /**Fallback: This value should be useful*/ #define MAX_PATH_LENGTH 4096 #endif /**This buffer size is fastest for reading and writing * in files*/ #define BUFFER_RDWR_SIZE 8024 /**Buffer for holding strings*/ #ifndef BUFFER_SIZE #define BUFFER_SIZE 4048 #endif /**Some more key types needed for ini * FILE ... is a real file on the system * DIR ... is a real directory * SUBDIR ... is a subdirectoy within a file*/ #define KEY_TYPE_FILE 4 #define KEY_TYPE_DIR 8 #define KEY_TYPE_SUBDIR 16 #define O_RDONLY 'r' #define O_RDWR 'w' elektra-0.7.1/src/backends/ini/parser.c0000644000076400001440000003253011361542117014653 00000000000000/*************************************************************************** parser.c - Parsing Functions for Configuration ------------------- begin : 01.03.2005 updated : 06.10.2005 copyright : (C) 2005 by Markus Raab email : debian@markus-raab.org ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ #include /**States of parsing the key*/ #define STATE_BEG 0 #define STATE_KEY 1 #define STATE_VALUE 2 #define STATE_COMMENT 4 #define STATE_END 8 #define STATE_SEC_BEG 16 #define STATE_SEC_END 32 #define STATE_EMPTY 64 #define STATE_CHAR 128 int state; #define CHAR_OK 0 #define CHAR_ADD 1 #define CHAR_SEC 2 #define CHAR_NEWLINE 3 #define CHAR_NULL 4 #define CHAR_ERR 5 /**parses a char * Logic of states is here. If you want a user defined * configuration format, this is your function. * * The pointer points to an array of chars. It must be * null terminated, because the function might try to * read the next char, but it will only change the char * pointed to. * * The change will take place, when a mulitbyte sequence * should be decoded. * @see convert_engine * for more information about that. * * @return CHAR_ERR on error * @return CHAR_OK if char was correctly handeled * @return CHAR_ADD if parsing function could not handle the char * @return CHAR_SEC if section was read in gracefully * * @param: pointer to char, char may be converted if needed * * always check if success, otherwise the char belongs * to key/name/comment*/ int parse_buffer (char * p) { char c = *p; #if DEBUG && VERBOSE fprintf (stderr, "Will parse %c with state %d\n", c, state); #endif if (c == '\0') { /**End found, report that*/ return CHAR_NULL; } else if (c == '\n') { /**Newline (end of key) found, report that*/ return CHAR_NEWLINE; } else if (state & STATE_CHAR) { /*Convert multichar*/ if (c == '0') *p = '\0'; else if (c=='n') *p = '\n'; else if (c=='b') *p = '\\'; else if (c=='w') *p = ' '; else if (c=='e') *p = '='; else if (c=='s') *p = ';'; else if (c=='r') *p = '#'; state &= ~STATE_CHAR; /**Remove char bit*/ return CHAR_ADD; } else if (state == STATE_BEG) /**Check first char*/ { if (c == '[') { state = STATE_SEC_BEG; return CHAR_OK; } else if (c == '#') { state = STATE_EMPTY; return CHAR_ERR; } else { /**char belongs to key*/ state = STATE_KEY; return CHAR_ADD; } } else if (state == STATE_KEY && c == '=') { /* value follows*/ state = STATE_VALUE; return CHAR_OK; } else if (state == STATE_VALUE && c == ';') { /* comment follows*/ state = STATE_COMMENT; return CHAR_OK; } else if (state == STATE_SEC_BEG && c == ']') { /* section correctly ended*/ state = STATE_SEC_END; return CHAR_OK; } else if (c == '\\') { /**Mulitchar sequence appeared*/ state |= STATE_CHAR; return CHAR_OK; } else if (state == STATE_KEY) { /**Stay in that state, and add char*/ return CHAR_ADD; } else if (state == STATE_VALUE) { /**Stay in that state, and add char*/ return CHAR_ADD; } else if (state == STATE_COMMENT) { /**Stay in that state, and add char*/ return CHAR_ADD; } return CHAR_ERR; /* Should not be reached*/ } /**Will decode a char into a char sequence safe for use * in configuration files. * * <0NULL> -> \0 ... 0 byte * -> \n ... newline * \ -> \b ... backslash * -> \w ... whitespace * = -> \e ... equals * ; -> \s ... semikolon * # -> \r ... rhombus * * It will use the next char in the array. The size of the * array needs to be 2. It is not needed to be NULL terminated. * * If it is not a multichar, the second byte is guaranteed to * be NULL ('\0'). Otherwise see above. * * @return 0 on success */ int convert_engine (char * p) { char c = *p; char * n = p+1; *n = '\0'; if (c == '\0') *n = '0'; else if (c=='\n') *n = 'n'; else if (c=='\\') *n = 'b'; else if (c==' ') *n = 'w'; else if (c=='=') *n = 'e'; else if (c==';') *n = 's'; else if (c=='#') *n = 'r'; else return 0; *p = '\\'; #if DEBUG && VERBOSE fprintf (stderr, "Handle %c to %c%c\n", c, *p, *n); #endif return 0; } /**Returns the Stringlen for the char, multichars are handeld * correct. * * @param size: You may find it funny to give a strlen function * a length. But thus null Char are allowed, this is needed. * In fact, the function will only iterate above the size * and will calculate how much more it will need after converting*/ int convert_strlen (char * p, int size) { int i; char c[2]; int s; for (i=0,s=0; iflags &= ~KEY_FLAG_SYNC; /* remove sync flag*/ free (buffer_name); return 0; } /** * Writes out a key into file on pos. * keySet is the key which should be written there * * @ret Returnes 0 on success. * * @ingroup ini */ int write_key (KDB *handle, Key * setKey, long oldpos) { long newpos; long needed_size, sname, svalue, scomment; /**needed sizes*/ char * name; char * value; char * comment; #if DEBUG fprintf (stderr, "write_key (Key, pos: %ld)\n", oldpos); #endif /** use setkey to set the key to wished values*/ newpos = ftell (FILEPTR); name = strrchr (keyName (setKey),'/')+1; value = (char*)keyValue (setKey); comment = (char*)keyComment (setKey); sname = convert_strlen (name, strlen (name)); svalue = convert_strlen (value, keyGetValueSize (setKey)); scomment = convert_strlen (comment, keyGetCommentSize (setKey)); needed_size = sname + svalue + scomment + 1; /* +\n */ if (newpos - oldpos > needed_size) { shrink_file (handle, oldpos, newpos - oldpos -needed_size); } else if (newpos - oldpos < needed_size) { enlarge_file (handle, newpos, needed_size - (newpos - oldpos)); } #if DEBUG fprintf(stderr, "Writing key to disc (pos: %ld|%ld|%ld) ...\n", oldpos, newpos, needed_size); #endif fseek (FILEPTR, oldpos, SEEK_SET); convert_stream (name, sname, FILEPTR); fwrite ("=", 1,1,FILEPTR); convert_stream (value, svalue, FILEPTR); fwrite (";", 1,1,FILEPTR); convert_stream (comment, scomment, FILEPTR); fwrite ("\n", 1,1,FILEPTR); #if DEBUG newpos = ftell (FILEPTR); fprintf (stderr, "Real endpos: %ld\n", newpos); fprintf (stderr, "key: %s, value: %s, comment: %s\n", setKey->key, (char *) setKey->data, setKey->comment); #endif return 0; } /** * Removes a key on pos. * keySet is the key which says the size it has. * So you must get the key first. * * @ret Returnes 0 on success. * * @ingroup ini */ int remove_key (KDB *handle, Key * setKey, long oldpos) { long newpos; long delete_size, sname, svalue, scomment; /**needed sizes*/ char * name; char * value; char * comment; name = strrchr (keyName (setKey),'/')+1; value = (char*) keyValue (setKey); comment = (char*) keyComment (setKey); #if DEBUG fprintf (stderr, "remove_key (Key, pos)\n"); #endif /** use setkey to set the key to wished values*/ newpos = ftell (FILEPTR); sname = convert_strlen (name, strlen (name)); svalue = convert_strlen (value, keyGetValueSize (setKey)); scomment = convert_strlen (comment, keyGetCommentSize (setKey)); delete_size = sname + svalue + scomment + 1; /* +\n */ shrink_file (handle, oldpos, newpos - oldpos - delete_size); #if DEBUG fprintf(stderr, "Deleting key on disc (pos: %ld|%ld|%ld) ...\n", oldpos, newpos, delete_size); #endif return 0; } elektra-0.7.1/src/backends/passwd/0000777000076400001440000000000011365513213014015 500000000000000elektra-0.7.1/src/backends/passwd/Makefile.am0000644000076400001440000000140111365507605015771 00000000000000#elekpasswddir = $(develdocdir)/backend-passwd/ AM_CPPFLAGS = -I$(top_srcdir)/src/include sources = passwd.h passwd.c noinst_LIBRARIES = libelektra-passwd.a libelektra_passwd_a_SOURCES = $(sources) ../../include/kdb.h ../../include/kdbbackend.h libelektra_passwd_a_CFLAGS = -DELEKTRA_STATIC $(COPTFLAGS) $(CDBGFLAGS) backend_LTLIBRARIES = libelektra-passwd.la libelektra_passwd_la_SOURCES = $(sources) ../../include/kdb.h ../../include/kdbbackend.h libelektra_passwd_la_LDFLAGS = -version-info $(BACKEND_VERSION_API) -module libelektra_passwd_la_LIBADD = ../../libelektra/libelektra.la libelektra_passwd_la_CFLAGS = $(COPTFLAGS) $(CDBGFLAGS) clean-local: rm -f *.gcno *.gcda *.gcno ../../libelektra/libelektra.la: cd ../../libelektra/ && $(MAKE) libelektra.la elektra-0.7.1/src/backends/passwd/Makefile.in0000644000076400001440000005167011365511151016006 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ #elekpasswddir = $(develdocdir)/backend-passwd/ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = src/backends/passwd DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/extensions.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/config.h CONFIG_CLEAN_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru libelektra_passwd_a_AR = $(AR) $(ARFLAGS) libelektra_passwd_a_LIBADD = am__objects_1 = libelektra_passwd_a-passwd.$(OBJEXT) am_libelektra_passwd_a_OBJECTS = $(am__objects_1) libelektra_passwd_a_OBJECTS = $(am_libelektra_passwd_a_OBJECTS) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(backenddir)" backendLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(backend_LTLIBRARIES) libelektra_passwd_la_DEPENDENCIES = ../../libelektra/libelektra.la am__objects_2 = libelektra_passwd_la-passwd.lo am_libelektra_passwd_la_OBJECTS = $(am__objects_2) libelektra_passwd_la_OBJECTS = $(am_libelektra_passwd_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/src/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libelektra_passwd_a_SOURCES) \ $(libelektra_passwd_la_SOURCES) DIST_SOURCES = $(libelektra_passwd_a_SOURCES) \ $(libelektra_passwd_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) INSTALL = @INSTALL@ ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BACKENDS = @BACKENDS@ BACKEND_VERSION_API = @BACKEND_VERSION_API@ BINDINGS = @BINDINGS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CDBGFLAGS = @CDBGFLAGS@ CFLAGS = @CFLAGS@ COPTFLAGS = @COPTFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSTDFLAGS = @CSTDFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDBGFLAGS = @CXXDBGFLAGS@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXOPTFLAGS = @CXXOPTFLAGS@ CXXSTDFLAGS = @CXXSTDFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_FALSE = @DEBUG_FALSE@ DEBUG_TRUE = @DEBUG_TRUE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ELEKTRATOOLS_VERSION_API = @ELEKTRATOOLS_VERSION_API@ ELEKTRA_VERSION_API = @ELEKTRA_VERSION_API@ EXEEXT = @EXEEXT@ EXPERIMENTAL_FALSE = @EXPERIMENTAL_FALSE@ EXPERIMENTAL_TRUE = @EXPERIMENTAL_TRUE@ F77 = @F77@ FFLAGS = @FFLAGS@ GENHTML = @GENHTML@ GREP = @GREP@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ HAVE_LIBLTDL_FALSE = @HAVE_LIBLTDL_FALSE@ HAVE_LIBLTDL_TRUE = @HAVE_LIBLTDL_TRUE@ HAVE_MAN2HTML_FALSE = @HAVE_MAN2HTML_FALSE@ HAVE_MAN2HTML_TRUE = @HAVE_MAN2HTML_TRUE@ HAVE_XML_FALSE = @HAVE_XML_FALSE@ HAVE_XML_TRUE = @HAVE_XML_TRUE@ HAVE_XSL_FALSE = @HAVE_XSL_FALSE@ HAVE_XSL_TRUE = @HAVE_XSL_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDB_VERSION = @KDB_VERSION@ KDB_VERSION_MAJOR = @KDB_VERSION_MAJOR@ KDB_VERSION_MAJORMINOR = @KDB_VERSION_MAJORMINOR@ KDB_VERSION_MICRO = @KDB_VERSION_MICRO@ KDB_VERSION_MINOR = @KDB_VERSION_MINOR@ LCOV = @LCOV@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VALGRIND = @VALGRIND@ VALGRINDTESTS_FALSE = @VALGRINDTESTS_FALSE@ VALGRINDTESTS_TRUE = @VALGRINDTESTS_TRUE@ VERSION = @VERSION@ XML2_CONFIG = @XML2_CONFIG@ XML_CPPFLAGS = @XML_CPPFLAGS@ XML_LIBS = @XML_LIBS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ backend_static_libs = @backend_static_libs@ backenddir = @backenddir@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ datarootdir = @datarootdir@ dbroot = @dbroot@ default_backend = @default_backend@ default_dbackend = @default_dbackend@ default_docbook = @default_docbook@ develdocdir = @develdocdir@ docdir = @docdir@ doxygen = @doxygen@ dvidir = @dvidir@ elektratools = @elektratools@ exec_prefix = @exec_prefix@ gconf_CFLAGS = @gconf_CFLAGS@ gconf_LIBS = @gconf_LIBS@ hlvlbackenddir = @hlvlbackenddir@ 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@ man2html = @man2html@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ privatelibs = @privatelibs@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ ulibdir = @ulibdir@ xsltproc = @xsltproc@ AM_CPPFLAGS = -I$(top_srcdir)/src/include sources = passwd.h passwd.c noinst_LIBRARIES = libelektra-passwd.a libelektra_passwd_a_SOURCES = $(sources) ../../include/kdb.h ../../include/kdbbackend.h libelektra_passwd_a_CFLAGS = -DELEKTRA_STATIC $(COPTFLAGS) $(CDBGFLAGS) backend_LTLIBRARIES = libelektra-passwd.la libelektra_passwd_la_SOURCES = $(sources) ../../include/kdb.h ../../include/kdbbackend.h libelektra_passwd_la_LDFLAGS = -version-info $(BACKEND_VERSION_API) -module libelektra_passwd_la_LIBADD = ../../libelektra/libelektra.la libelektra_passwd_la_CFLAGS = $(COPTFLAGS) $(CDBGFLAGS) all: all-am .SUFFIXES: .SUFFIXES: .c .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 \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/backends/passwd/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/backends/passwd/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libelektra-passwd.a: $(libelektra_passwd_a_OBJECTS) $(libelektra_passwd_a_DEPENDENCIES) -rm -f libelektra-passwd.a $(libelektra_passwd_a_AR) libelektra-passwd.a $(libelektra_passwd_a_OBJECTS) $(libelektra_passwd_a_LIBADD) $(RANLIB) libelektra-passwd.a install-backendLTLIBRARIES: $(backend_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(backenddir)" || $(mkdir_p) "$(DESTDIR)$(backenddir)" @list='$(backend_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(backendLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(backenddir)/$$f'"; \ $(LIBTOOL) --mode=install $(backendLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(backenddir)/$$f"; \ else :; fi; \ done uninstall-backendLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(backend_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(backenddir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(backenddir)/$$p"; \ done clean-backendLTLIBRARIES: -test -z "$(backend_LTLIBRARIES)" || rm -f $(backend_LTLIBRARIES) @list='$(backend_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libelektra-passwd.la: $(libelektra_passwd_la_OBJECTS) $(libelektra_passwd_la_DEPENDENCIES) $(LINK) -rpath $(backenddir) $(libelektra_passwd_la_LDFLAGS) $(libelektra_passwd_la_OBJECTS) $(libelektra_passwd_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_passwd_a-passwd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_passwd_la-passwd.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< libelektra_passwd_a-passwd.o: passwd.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_passwd_a_CFLAGS) $(CFLAGS) -MT libelektra_passwd_a-passwd.o -MD -MP -MF "$(DEPDIR)/libelektra_passwd_a-passwd.Tpo" -c -o libelektra_passwd_a-passwd.o `test -f 'passwd.c' || echo '$(srcdir)/'`passwd.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_passwd_a-passwd.Tpo" "$(DEPDIR)/libelektra_passwd_a-passwd.Po"; else rm -f "$(DEPDIR)/libelektra_passwd_a-passwd.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='passwd.c' object='libelektra_passwd_a-passwd.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_passwd_a_CFLAGS) $(CFLAGS) -c -o libelektra_passwd_a-passwd.o `test -f 'passwd.c' || echo '$(srcdir)/'`passwd.c libelektra_passwd_a-passwd.obj: passwd.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_passwd_a_CFLAGS) $(CFLAGS) -MT libelektra_passwd_a-passwd.obj -MD -MP -MF "$(DEPDIR)/libelektra_passwd_a-passwd.Tpo" -c -o libelektra_passwd_a-passwd.obj `if test -f 'passwd.c'; then $(CYGPATH_W) 'passwd.c'; else $(CYGPATH_W) '$(srcdir)/passwd.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_passwd_a-passwd.Tpo" "$(DEPDIR)/libelektra_passwd_a-passwd.Po"; else rm -f "$(DEPDIR)/libelektra_passwd_a-passwd.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='passwd.c' object='libelektra_passwd_a-passwd.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_passwd_a_CFLAGS) $(CFLAGS) -c -o libelektra_passwd_a-passwd.obj `if test -f 'passwd.c'; then $(CYGPATH_W) 'passwd.c'; else $(CYGPATH_W) '$(srcdir)/passwd.c'; fi` libelektra_passwd_la-passwd.lo: passwd.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_passwd_la_CFLAGS) $(CFLAGS) -MT libelektra_passwd_la-passwd.lo -MD -MP -MF "$(DEPDIR)/libelektra_passwd_la-passwd.Tpo" -c -o libelektra_passwd_la-passwd.lo `test -f 'passwd.c' || echo '$(srcdir)/'`passwd.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_passwd_la-passwd.Tpo" "$(DEPDIR)/libelektra_passwd_la-passwd.Plo"; else rm -f "$(DEPDIR)/libelektra_passwd_la-passwd.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='passwd.c' object='libelektra_passwd_la-passwd.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_passwd_la_CFLAGS) $(CFLAGS) -c -o libelektra_passwd_la-passwd.lo `test -f 'passwd.c' || echo '$(srcdir)/'`passwd.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(backenddir)"; 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: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_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-backendLTLIBRARIES clean-generic clean-libtool \ clean-local clean-noinstLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-backendLTLIBRARIES install-exec-am: install-info: install-info-am install-man: 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-backendLTLIBRARIES uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean \ clean-backendLTLIBRARIES clean-generic clean-libtool \ clean-local clean-noinstLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-backendLTLIBRARIES install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-backendLTLIBRARIES \ uninstall-info-am clean-local: rm -f *.gcno *.gcda *.gcno ../../libelektra/libelektra.la: cd ../../libelektra/ && $(MAKE) libelektra.la # 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: elektra-0.7.1/src/backends/passwd/passwd.c0000644000076400001440000002345611365506635015422 00000000000000/*************************************************************************** passwd.c - Access the /etc/passwd file ------------------- begin : Nov 15 2007 copyright : (C) 2007 by Patrick Sabin email : patricksabin@gmx.at ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ #include int kdbOpen_passwd(KDB *handle) { KeySet *ks; Key *key; const char *s, *t; int prefix_len; PasswdData *data; const Key* mnt = kdbhGetMountpoint(handle); KDBCap *cap = kdbhGetCapability (handle); size_t mntsize = keyGetNameSize(mnt)+1; if (mnt==0) { return -1; } data=malloc(sizeof(PasswdData)); kdbhSetBackendData(handle,data); data->mountpoint=0; ks=kdbhGetConfig(handle); ksRewind(ks); key=ksNext(ks); s=keyName(key); t=s+KDB_KEY_MOUNTPOINTS_LEN; /* skip entry name */ while (!(*t=='/'||!*t)) t++; if (!*t) { fprintf(stderr, "Cannot happen\n"); exit(1); } t+=sizeof("/config/")-1; prefix_len=t-s; data->mountpoint=malloc(mntsize); snprintf(data->mountpoint,mntsize,"%s/",keyName(mnt)); data->path="/etc/passwd"; data->backend=BACKENDNAME; for (;key;key=ksNext(ks)) { if (strlen(keyName(key))path=keyValue(key); } } data->mountpointlen=strlen(data->mountpoint); cap->onlyRemoveAll=1; cap->onlyAddKeys=1; cap->onlyFullSet=1; cap->onlySystem=1; cap->onlyUser=1; cap->noOwner=1; cap->noValue=1; cap->noComment=1; cap->noUID=1; cap->noGID=1; cap->noMode=1; cap->noDir=1; cap->noATime=1; cap->noMTime=1; cap->noCTime=1; cap->noRemove=1; cap->noStat=1; cap->noMount=1; cap->noBinary=1; cap->noString=1; cap->noTypes=1; cap->noError=1; return 0; } /** * Finalize the backend. * Called prior to unloading the backend dynamic module. Should ensure that no * functions or static/global variables from the module will ever be accessed again. * * Make sure to free all memory that your backend requested at runtime. * * After this call, libelektra.so will unload the backend library, so this is * the point to shutdown any affairs with the storage. * * @return 0 on success, anything else otherwise. * @see kdbClose() * @ingroup backend */ int kdbClose_passwd(KDB *handle) { /* free all backend resources and shut it down */ PasswdData *data; data=kdbhGetBackendData(handle); free(data->mountpoint); free(data); return 0; /* success */ } /** * Implementation for kdbGet() method. * * @see kdbGet() for caller. * @param handle contains internal information of @link kdbOpen() opened @endlink key database * @param returned contains a keyset with relevant keys * @param parentKey contains the information where to get the keys * @return the number of keys got * @return 0 on success with no changed key * @return -1 on failure, the current key in returned shows the position and/or errno is set * @ingroup backend */ ssize_t kdbGet_passwd(KDB *handle, KeySet *returned, const Key *parentKey) { int errnosave = errno; ssize_t nr_keys = 0; /* get all keys below parentKey and count them with nr_keys */ PasswdData *data; const char *parent; int parent_len; /*KeySet *ks; Key *key; char *s,*t; int prefix_len; */ data=kdbhGetBackendData(handle); parent=keyName(parentKey); parent_len=strlen(parent); if (parent_lenmountpointlen-1 || strncmp(data->mountpoint,parent,data->mountpointlen-1)) { // parentkey covers keys not handled by the backend return -1; } if (parent_len==data->mountpointlen-1 && !strncmp(data->mountpoint, parent,data->mountpointlen-1)) { // return all username directories char *name; FILE *f; struct passwd *pwd; f=fopen(data->path,"r"); if (f==NULL) { /*errno=KDB_ERR_BACKEND;*/ errno = errnosave; return -1; } while ((pwd=fgetpwent(f))) { char *pw_name; int pw_name_len; pw_name=pwd->pw_name; pw_name_len=strlen(pw_name); name=malloc(data->mountpointlen+pw_name_len+1); strncpy(name,data->mountpoint,data->mountpointlen+1); strncat(name,pw_name,pw_name_len); ksAppendKey(returned, keyNew(name,KEY_VALUE,"",0)); nr_keys++; free (name); } fclose(f); } else if (parent_len>data->mountpointlen && !strncmp(data->mountpoint,parent,data->mountpointlen)) { const char *username, *p; p=username=parent+data->mountpointlen; while (!(*p=='/'||*p==0)) p++; if (*p==0) { FILE *f; struct passwd *pwd; int usernamelen; usernamelen=p-username; username=strndup(username,usernamelen); /* get username directory */ f=fopen(data->path,"r"); if (!f) { errno = errnosave; return -1; } while ((pwd=fgetpwent(f))) { if (!strncmp(pwd->pw_name,username,usernamelen)) { char *name; char *id; size_t id_size; name=malloc(data->mountpointlen+usernamelen+sizeof("/gecos")); strncpy(name,data->mountpoint,data->mountpointlen+1); strncat(name,username,usernamelen); strncat(name,"/gecos",sizeof("/gecos")-1); ksAppendKey(returned, keyNew(name,KEY_VALUE,pwd->pw_gecos,0)); nr_keys++; free (name); name=malloc(data->mountpointlen+usernamelen+sizeof("/home")); strncpy(name,data->mountpoint,data->mountpointlen+1); strncat(name,username,usernamelen); strncat(name,"/home",sizeof("/home")-1); ksAppendKey(returned, keyNew(name,KEY_VALUE,pwd->pw_dir,0)); nr_keys++; free (name); name=malloc(data->mountpointlen+usernamelen+sizeof("/shell")); strncpy(name,data->mountpoint,data->mountpointlen+1); strncat(name,username,usernamelen); strncat(name,"/shell",sizeof("/shell")-1); ksAppendKey(returned, keyNew(name,KEY_VALUE,pwd->pw_shell,0)); nr_keys++; free (name); name=malloc(data->mountpointlen+usernamelen+sizeof("/uid")); strncpy(name,data->mountpoint,data->mountpointlen+1); strncat(name,username,usernamelen); strncat(name,"/uid",sizeof("/uid")-1); id_size=snprintf(NULL,0,"%d",(int)pwd->pw_uid); id=malloc(id_size); snprintf(id,id_size,"%d",(int)pwd->pw_uid); ksAppendKey(returned, keyNew(name,KEY_VALUE,id,0)); nr_keys++; free (name); free (id); name=malloc(data->mountpointlen+usernamelen+sizeof("/gid")); strncpy(name,data->mountpoint,data->mountpointlen+1); strncat(name,username,usernamelen); strncat(name,"/gid",sizeof("/gid")-1); id_size=snprintf(NULL,0,"%d",(int)pwd->pw_gid); id=malloc(id_size); snprintf(id,id_size,"%d",(int)pwd->pw_gid); ksAppendKey(returned, keyNew(name,KEY_VALUE,id,0)); nr_keys++; free (name); free (id); break; } } fclose (f); kdbiFree ((void*)username); if (!pwd) { /* entry not found */ /*errno=KDB_ERR_NOTFOUND;*/ errno = errnosave; return -1; } } else { /* parent key not a valid directory */ errno = errnosave; return -1; } } errno = errnosave; return nr_keys; /* success */ } /** * Implementation for kdbSet() method. * * @see kdbSet() for caller. * @param handle contains internal information of @link kdbOpen() opened @endlink key database * @param returned contains a keyset with relevant keys * @param parentKey contains the information where to set the keys * @return the number of keys set * @return 0 on success with no changed key in database * @return -1 on failure, the current key in returned shows the position and/or errno is set * @ingroup backend */ ssize_t kdbSet_passwd(KDB *handle, KeySet *returned, const Key *parentKey) { int errnosave = errno; ssize_t nr_keys = 0; Key *key; PasswdData *data; const char *parent; int parent_len; parent=keyName(parentKey); parent_len=strlen(parent); data=kdbhGetBackendData(handle); if (parent_lenmountpointlen-1 || strncmp(data->mountpoint,parent,data->mountpointlen-1)) { // parentkey covers keys not handled by the backend errno = errnosave; return -1; } ksRewind(returned); key=ksNext(returned); for (;key;ksNext(returned)) { const char *name=keyName(key); int name_len=strlen(name); if (name_len>data->mountpointlen-1 && !strncmp(data->mountpoint,name,name_len)) { /* keyname is mounted name. This key is not writeable */ } else if (name_len>data->mountpointlen && !strncmp(data->mountpoint,name,data->mountpointlen)) { } else { } } /* set all keys below parentKey and count them with nr_keys */ errno = errnosave; return nr_keys; } /** * All KDB methods implemented by the backend can have random names, except * kdbBackendFactory(). This is the single symbol that will be looked up * when loading the backend, and the first method of the backend * implementation that will be called. * * Its purpose is to "publish" the exported methods for libelektra.so. The * implementation inside the provided skeleton is usually enough: simply * call kdbBackendExport() with all methods that must be exported. * * @return whatever kdbBackendExport() returns * @see kdbBackendExport() for an example * @see kdbOpenBackend() * @ingroup backend */ KDBEXPORT(passwd) { return kdbBackendExport(BACKENDNAME, KDB_BE_OPEN, &kdbOpen_passwd, KDB_BE_CLOSE, &kdbClose_passwd, KDB_BE_GET, &kdbGet_passwd, KDB_BE_SET, &kdbSet_passwd, KDB_BE_VERSION, BACKENDVERSION, KDB_BE_AUTHOR, "Patrick Sabin ", KDB_BE_LICENCE, "BSD", KDB_BE_DESCRIPTION, "Reads and writes /etc/passwd content", KDB_BE_END); } elektra-0.7.1/src/backends/passwd/passwd.h0000644000076400001440000000403011365506635015412 00000000000000/*************************************************************************** passwd.h - Access the /etc/passwd file ------------------- begin : Nov 15 2007 copyright : (C) 2007 by Patrick Sabin email : patricksabin@gmx.at ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ #ifndef PASSWD_H #define PASSWD_H #define _GNU_SOURCE #include #include #include #include #include #include #include #include #define BACKENDNAME "passwd" #define BACKENDVERSION "0.0.1" #define BACKENDPATH "system/users" #define BACKENDDESCR "add description here" int kdbbWriteLock (FILE *f); int kdbbReadLock (FILE *f); int kdbbUnlock (FILE *f); struct _PasswdData { char *backend; const char *path; char *mountpoint; /* path of the mountpoint inclusive '/' */ int mountpointlen; /* strlen(root) */ }; typedef struct _PasswdData PasswdData; /** * the passwd backend can be configured with three config variables: * backendname (optional) is the name of this backend. Default: "passwd" * passwd_path (optional) is the path where the passwd file is stored. Default: /etc/passwd * mountpoint (optional) is the mountpoint. Default: take value from handle->mountpoint. */ int kdbOpen_passwd(KDB *handle); int kdbClose_passwd(KDB *handle); ssize_t kdbGet_passwd(KDB *handle, KeySet *ks, const Key *parentKey); ssize_t kdbSet_passwd(KDB *handle, KeySet *ks, const Key *parentKey); KDBEXPORT(passwd); #endif elektra-0.7.1/src/backends/template/0000777000076400001440000000000011365513214014330 500000000000000elektra-0.7.1/src/backends/template/Makefile.am0000644000076400001440000000137411365507605016314 00000000000000#elektemplatedir = $(develdocdir)/backend-template/ #EXTRA_DIST = template.c README AM_CPPFLAGS = -I$(top_srcdir)/src/include template_sources = template.c template.h ../../include/kdb.h ../../include/kdbbackend.h noinst_LIBRARIES = libelektra-template.a libelektra_template_a_SOURCES = $(template_sources) libelektra_template_a_CFLAGS = -DELEKTRA_STATIC $(COPTFLAGS) $(CDBGFLAGS) backend_LTLIBRARIES = libelektra-template.la libelektra_template_la_SOURCES = $(template_sources) libelektra_template_la_LDFLAGS = -version-info $(BACKEND_VERSION_API) -module libelektra_template_la_LIBADD = ../../libelektra/libelektra.la libelektra_template_la_CFLAGS = $(COPTFLAGS) $(CDBGFLAGS) ../../libelektra/libelektra.la: cd ../../libelektra/ && $(MAKE) libelektra.la elektra-0.7.1/src/backends/template/Makefile.in0000644000076400001440000005221511365511151016314 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ #elektemplatedir = $(develdocdir)/backend-template/ #EXTRA_DIST = template.c README srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = src/backends/template DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/extensions.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/config.h CONFIG_CLEAN_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru libelektra_template_a_AR = $(AR) $(ARFLAGS) libelektra_template_a_LIBADD = am__objects_1 = libelektra_template_a-template.$(OBJEXT) am_libelektra_template_a_OBJECTS = $(am__objects_1) libelektra_template_a_OBJECTS = $(am_libelektra_template_a_OBJECTS) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(backenddir)" backendLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(backend_LTLIBRARIES) libelektra_template_la_DEPENDENCIES = ../../libelektra/libelektra.la am__objects_2 = libelektra_template_la-template.lo am_libelektra_template_la_OBJECTS = $(am__objects_2) libelektra_template_la_OBJECTS = $(am_libelektra_template_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/src/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libelektra_template_a_SOURCES) \ $(libelektra_template_la_SOURCES) DIST_SOURCES = $(libelektra_template_a_SOURCES) \ $(libelektra_template_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) INSTALL = @INSTALL@ ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BACKENDS = @BACKENDS@ BACKEND_VERSION_API = @BACKEND_VERSION_API@ BINDINGS = @BINDINGS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CDBGFLAGS = @CDBGFLAGS@ CFLAGS = @CFLAGS@ COPTFLAGS = @COPTFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSTDFLAGS = @CSTDFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDBGFLAGS = @CXXDBGFLAGS@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXOPTFLAGS = @CXXOPTFLAGS@ CXXSTDFLAGS = @CXXSTDFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_FALSE = @DEBUG_FALSE@ DEBUG_TRUE = @DEBUG_TRUE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ELEKTRATOOLS_VERSION_API = @ELEKTRATOOLS_VERSION_API@ ELEKTRA_VERSION_API = @ELEKTRA_VERSION_API@ EXEEXT = @EXEEXT@ EXPERIMENTAL_FALSE = @EXPERIMENTAL_FALSE@ EXPERIMENTAL_TRUE = @EXPERIMENTAL_TRUE@ F77 = @F77@ FFLAGS = @FFLAGS@ GENHTML = @GENHTML@ GREP = @GREP@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ HAVE_LIBLTDL_FALSE = @HAVE_LIBLTDL_FALSE@ HAVE_LIBLTDL_TRUE = @HAVE_LIBLTDL_TRUE@ HAVE_MAN2HTML_FALSE = @HAVE_MAN2HTML_FALSE@ HAVE_MAN2HTML_TRUE = @HAVE_MAN2HTML_TRUE@ HAVE_XML_FALSE = @HAVE_XML_FALSE@ HAVE_XML_TRUE = @HAVE_XML_TRUE@ HAVE_XSL_FALSE = @HAVE_XSL_FALSE@ HAVE_XSL_TRUE = @HAVE_XSL_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDB_VERSION = @KDB_VERSION@ KDB_VERSION_MAJOR = @KDB_VERSION_MAJOR@ KDB_VERSION_MAJORMINOR = @KDB_VERSION_MAJORMINOR@ KDB_VERSION_MICRO = @KDB_VERSION_MICRO@ KDB_VERSION_MINOR = @KDB_VERSION_MINOR@ LCOV = @LCOV@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VALGRIND = @VALGRIND@ VALGRINDTESTS_FALSE = @VALGRINDTESTS_FALSE@ VALGRINDTESTS_TRUE = @VALGRINDTESTS_TRUE@ VERSION = @VERSION@ XML2_CONFIG = @XML2_CONFIG@ XML_CPPFLAGS = @XML_CPPFLAGS@ XML_LIBS = @XML_LIBS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ backend_static_libs = @backend_static_libs@ backenddir = @backenddir@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ datarootdir = @datarootdir@ dbroot = @dbroot@ default_backend = @default_backend@ default_dbackend = @default_dbackend@ default_docbook = @default_docbook@ develdocdir = @develdocdir@ docdir = @docdir@ doxygen = @doxygen@ dvidir = @dvidir@ elektratools = @elektratools@ exec_prefix = @exec_prefix@ gconf_CFLAGS = @gconf_CFLAGS@ gconf_LIBS = @gconf_LIBS@ hlvlbackenddir = @hlvlbackenddir@ 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@ man2html = @man2html@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ privatelibs = @privatelibs@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ ulibdir = @ulibdir@ xsltproc = @xsltproc@ AM_CPPFLAGS = -I$(top_srcdir)/src/include template_sources = template.c template.h ../../include/kdb.h ../../include/kdbbackend.h noinst_LIBRARIES = libelektra-template.a libelektra_template_a_SOURCES = $(template_sources) libelektra_template_a_CFLAGS = -DELEKTRA_STATIC $(COPTFLAGS) $(CDBGFLAGS) backend_LTLIBRARIES = libelektra-template.la libelektra_template_la_SOURCES = $(template_sources) libelektra_template_la_LDFLAGS = -version-info $(BACKEND_VERSION_API) -module libelektra_template_la_LIBADD = ../../libelektra/libelektra.la libelektra_template_la_CFLAGS = $(COPTFLAGS) $(CDBGFLAGS) all: all-am .SUFFIXES: .SUFFIXES: .c .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 \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/backends/template/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/backends/template/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libelektra-template.a: $(libelektra_template_a_OBJECTS) $(libelektra_template_a_DEPENDENCIES) -rm -f libelektra-template.a $(libelektra_template_a_AR) libelektra-template.a $(libelektra_template_a_OBJECTS) $(libelektra_template_a_LIBADD) $(RANLIB) libelektra-template.a install-backendLTLIBRARIES: $(backend_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(backenddir)" || $(mkdir_p) "$(DESTDIR)$(backenddir)" @list='$(backend_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(backendLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(backenddir)/$$f'"; \ $(LIBTOOL) --mode=install $(backendLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(backenddir)/$$f"; \ else :; fi; \ done uninstall-backendLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(backend_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(backenddir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(backenddir)/$$p"; \ done clean-backendLTLIBRARIES: -test -z "$(backend_LTLIBRARIES)" || rm -f $(backend_LTLIBRARIES) @list='$(backend_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libelektra-template.la: $(libelektra_template_la_OBJECTS) $(libelektra_template_la_DEPENDENCIES) $(LINK) -rpath $(backenddir) $(libelektra_template_la_LDFLAGS) $(libelektra_template_la_OBJECTS) $(libelektra_template_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_template_a-template.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_template_la-template.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< libelektra_template_a-template.o: template.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_template_a_CFLAGS) $(CFLAGS) -MT libelektra_template_a-template.o -MD -MP -MF "$(DEPDIR)/libelektra_template_a-template.Tpo" -c -o libelektra_template_a-template.o `test -f 'template.c' || echo '$(srcdir)/'`template.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_template_a-template.Tpo" "$(DEPDIR)/libelektra_template_a-template.Po"; else rm -f "$(DEPDIR)/libelektra_template_a-template.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='template.c' object='libelektra_template_a-template.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_template_a_CFLAGS) $(CFLAGS) -c -o libelektra_template_a-template.o `test -f 'template.c' || echo '$(srcdir)/'`template.c libelektra_template_a-template.obj: template.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_template_a_CFLAGS) $(CFLAGS) -MT libelektra_template_a-template.obj -MD -MP -MF "$(DEPDIR)/libelektra_template_a-template.Tpo" -c -o libelektra_template_a-template.obj `if test -f 'template.c'; then $(CYGPATH_W) 'template.c'; else $(CYGPATH_W) '$(srcdir)/template.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_template_a-template.Tpo" "$(DEPDIR)/libelektra_template_a-template.Po"; else rm -f "$(DEPDIR)/libelektra_template_a-template.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='template.c' object='libelektra_template_a-template.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_template_a_CFLAGS) $(CFLAGS) -c -o libelektra_template_a-template.obj `if test -f 'template.c'; then $(CYGPATH_W) 'template.c'; else $(CYGPATH_W) '$(srcdir)/template.c'; fi` libelektra_template_la-template.lo: template.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_template_la_CFLAGS) $(CFLAGS) -MT libelektra_template_la-template.lo -MD -MP -MF "$(DEPDIR)/libelektra_template_la-template.Tpo" -c -o libelektra_template_la-template.lo `test -f 'template.c' || echo '$(srcdir)/'`template.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_template_la-template.Tpo" "$(DEPDIR)/libelektra_template_la-template.Plo"; else rm -f "$(DEPDIR)/libelektra_template_la-template.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='template.c' object='libelektra_template_la-template.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_template_la_CFLAGS) $(CFLAGS) -c -o libelektra_template_la-template.lo `test -f 'template.c' || echo '$(srcdir)/'`template.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(backenddir)"; 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: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_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-backendLTLIBRARIES clean-generic clean-libtool \ clean-noinstLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-backendLTLIBRARIES install-exec-am: install-info: install-info-am install-man: 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-backendLTLIBRARIES uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean \ clean-backendLTLIBRARIES clean-generic clean-libtool \ clean-noinstLIBRARIES ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-backendLTLIBRARIES install-data install-data-am \ install-exec install-exec-am install-info install-info-am \ install-man install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-backendLTLIBRARIES uninstall-info-am ../../libelektra/libelektra.la: cd ../../libelektra/ && $(MAKE) libelektra.la # 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: elektra-0.7.1/src/backends/template/README0000644000076400001440000000043511361542117015126 00000000000000This is a skeleton for building a backend. You chould copy this files to another dir, rename them and start filling with code that accesses yourspecific backend. See http://elektra.sourceforge.net/elektra-api/html/group__backend.html is the documentation for backend programing. elektra-0.7.1/src/backends/template/template.c0000644000076400001440000000615411361542117016231 00000000000000/*************************************************************************** template.c - Skeleton of backends to access the Key Database ------------------- begin : Mon Dec 26 2004 copyright : (C) 2004 by Avi Alkalay email : avi@unix.sh ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ /*************************************************************************** * * * This is the skeleton of the methods you'll have to implement in order * * to provide libelektra.so a valid backend. * * Simple fill the empty _template functions with your code and you are * * ready to go. * * * ***************************************************************************/ #include int kdbOpen_template(KDB *handle) { int errnosave = errno; KDBCap *cap = kdbhGetCapability (handle); cap->onlyFullGet=1; cap->noStat=1; cap->onlyRemoveAll=1; cap->onlyFullSet=1; cap->onlyAddKeys=1; cap->onlySystem=1; cap->onlyUser=1; cap->noOwner=1; cap->noValue=1; cap->noComment=1; cap->noUID=1; cap->noGID=1; cap->noMode=1; cap->noDir=1; cap->noATime=1; cap->noMTime=1; cap->noCTime=1; cap->noRemove=1; cap->noLink=1; cap->noMount=1; cap->noBinary=1; cap->noString=1; cap->noTypes=1; cap->noError=1; cap->noLock=1; cap->noThread=1; /* backend initialization logic */ errno = errnosave; return 0; } int kdbClose_template(KDB *handle) { int errnosave = errno; /* free all backend resources and shut it down */ errno = errnosave; return 0; /* success */ } ssize_t kdbGet_template(KDB *handle, KeySet *returned, const Key *parentKey) { ssize_t nr_keys = 0; int errnosave = errno; /* get all keys below parentKey and count them with nr_keys */ errno = errnosave; return nr_keys; /* success */ } ssize_t kdbSet_template(KDB *handle, KeySet *returned, const Key *parentKey) { ssize_t nr_keys = 0; int errnosave = errno; /* set all keys below parentKey and count them with nr_keys */ errno = errnosave; return nr_keys; } KDBEXPORT(template) { return kdbBackendExport(BACKENDNAME, KDB_BE_OPEN, &kdbOpen_template, KDB_BE_CLOSE, &kdbClose_template, KDB_BE_GET, &kdbGet_template, KDB_BE_SET, &kdbSet_template, KDB_BE_VERSION, BACKENDVERSION, KDB_BE_AUTHOR, "Full Name ", KDB_BE_LICENCE, "BSD", KDB_BE_DESCRIPTION, "Add description here", KDB_BE_END); } elektra-0.7.1/src/backends/template/template.h0000644000076400001440000000346411361542117016237 00000000000000/*************************************************************************** template.h - Skeleton of backends to access the Key Database ------------------- begin : Mon Dec 26 2004 copyright : (C) 2004 by Avi Alkalay email : avi@unix.sh ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ /*************************************************************************** * * * This is the skeleton of the methods you'll have to implement in order * * to provide libelektra.so a valid backend. * * Simple fill the empty _template functions with your code and you are * * ready to go. * * * ***************************************************************************/ #include #include #define BACKENDNAME "template" #define BACKENDVERSION "0.0.1" int kdbOpen_template(KDB *handle); int kdbClose_template(KDB *handle); ssize_t kdbGet_template(KDB *handle, KeySet *ks, const Key *parentKey); ssize_t kdbSet_template(KDB *handle, KeySet *ks, const Key *parentKey); KDBEXPORT(template); elektra-0.7.1/src/backends/winregistry/0000777000076400001440000000000011361542117015103 500000000000000elektra-0.7.1/src/backends/winregistry/winregistry.cpp0000644000076400001440000002633711361542117020124 00000000000000// winregistry.cpp : Defines the entry point for the DLL application. // $Id$ #include "winregistry.h" #include int mapError(LONG err); BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { switch (ul_reason_for_call) { case DLL_PROCESS_ATTACH: case DLL_THREAD_ATTACH: case DLL_THREAD_DETACH: case DLL_PROCESS_DETACH: break; } return TRUE; } /** * @defgroup backend Elektra framework for pluggable backends * @brief The tactics to create pluggable backends to libelektra.so * * Since version 0.4.9, Elektra can dynamically load different key storage * backends. Fast jump to kdbBackendExport() to see an example of a backend * implementation. * * The methods of class KDB that are backend dependent are kdbOpen(), * kdbClose(), kdbGetKey(), kdbSetKey(), kdbStatKey(), * kdbGetKeyChildKeys(), kdbRemove(), kdbRename(). So a backend must * reimplement these methods. * * And methods that have a builtin default high-level inefficient * implementation are kdbSetKeys(), kdbMonitorKey(), kdbMonitorKeys(). So * it is suggested to reimplement them too, to make them more efficient. * * The other KDB methods are higher level. They use the above methods to * do their job, and generally don't have to be reimplemented for a * different backend. * * The backend must implement a method with name kdbBackendFactory() and no * parameters, that is responsible of exporting the implementations of * libelektra.so backend dependent methods. * * The backend implementation must: * @code #include * @endcode * * Better than that, a skeleton of a backend implementation is provided inside * Elektra development package or source code tree, and should be used as a * base for the implementation. * * An elektrified program will use the backend defined by environment variable * @e $KDB_BACKEND, The backend library is dynamically loaded when the program * calls kdbOpen(), unless if the program is security/authentication/setuid * related, in which it probably uses the more secure kdbOpenDefault() which * completely ignores the @e $KDB_BACKEND environment and will use the * @c "default" named backend defined by the sysadmin. Look at * @c /lib/libelektra-default.so link to see the default backend for your * system. * * Elektra source code or development package provides a skeleton and Makefile * to implement a backend, and we'll document this skeleton here. * * A backend is defined by a single name, for example @c BACKENDNAME, that * causes libelektra.so look for its library as @c libelektra-BACKENDNAME.so. * * Elektra source code tree includes several backend implementations * (http://germane-software.com/repositories/elektra/trunk/src/backends) * that can also be used as a reference. */ /** * Initialize the backend. * This is the first method kdbOpenBackend() calls after dynamically loading * the backend library. * * This method is responsible of: * - backend's specific configuration gathering * - all backend's internal structs initialization * - initial setup of all I/O details such as opening a file, connecting to a * database, etc * * @return 0 on success, anything else otherwise. * @see kdbOpenBackend() * @see kdbOpen() * @ingroup backend */ int kdbOpen_winregistry(KDB *handle) { /* backend initialization logic */ return 0; } /** * All finalization logic of the backend should go here. * * Called prior to unloading the backend dynamic module. Should ensure that no * functions or static/global variables from the module will ever be accessed again. * Should free any memory that the backend no longer needs. * After this call, libelektra.so will unload the backend library, so this is * the point to shutdown any affairs with the storage. * * @return 0 on success, anything else otherwise. * @see kdbClose() * @ingroup backend */ int kdbClose_winregistry(KDB *handle) { /* free all backend resources and shut it down */ return 0; /* success */ } /** * Implementation for kdbStatKey() method. * * This method is responsible of: * - make necessary I/O to retrieve @p key->name's metadata * - fill the @p key struct with its metadata * * @see kdbStatKey() for expected behavior. * @ingroup backend */ int kdbStatKey_winregistry(KDB *handle, Key *key) { /* get the most possible key metainfo */ return 0; /* success */ } /** * Implementation for kdbGetKey() method. * * This method is responsible of: * - make necessary I/O to retrieve all @p key->name's value and metadata * - fill the @p key struct with its value and metadata * * @see kdbGetKey() for expected behavior. * @ingroup backend */ int kdbGetKey_winregistry(KDB *handle, Key *key) { /* fully gets a key */ HKEY rootKey = {0}; HKEY desiredKey = {0}; char path[1024]; DWORD type; char val[1024]; DWORD sizeval = sizeof(val); char *keyName = NULL; LONG err=0; if(!kdbGetRegistryPath(key, rootKey, path, sizeof(path), &keyName)) { return -1; } if(err = RegGetValue(rootKey, path, keyName, RRF_RT_REG_SZ|RRF_RT_REG_MULTI_SZ, &type, val, &sizeval) != ERROR_SUCCESS) { errno = mapError(err); return -1; } keySetType(key,KEY_TYPE_STRING); keySetRaw(key, val, strlen(val)); /*if((err = RegOpenKeyEx(rootKey, path, 0, KEY_READ,&desiredKey)) != ERROR_SUCCESS) { /* Error opening key errno = mapError(err); return -1; } if(RegQueryValueEx(desiredKey, keyName, 0,&type, (LPBYTE)val, &sizeval) != ERROR_SUCCESS) { errno = mapError(err); return -1; }*/ return 0; /* success */ } /** * Implementation for kdbSetKey() method. * * This method is responsible of: * - check the existence of @p key->name on persistent storage * - prepare the backend to receive a new or updated key * - use value and metadata from @p key to store them in the backend storage * - fill the @p key struct with its value and metadata * * @see kdbSetKey() for expected behavior. * @ingroup backend */ int kdbSetKey_winregistry(KDB *handle, Key *key) { /* fully sets a key */ HKEY rootKey = {0}; HKEY desiredKey = {0}; char path[1024]; DWORD type; char *keyName = NULL; LONG err=0; if(!kdbGetRegistryPath(key, rootKey, path, sizeof(path), &keyName)) { return -1; } if((err = RegOpenKeyEx(rootKey, path, 0, KEY_READ,&desiredKey)) != ERROR_SUCCESS) { /* Error opening key */ errno = mapError(err); return -1; } /* TODO: NOT DELETE VALUE HERE!!! */ if((err = RegSet(?)Value(desiredKey, keyName)) != ERROR_SUCCESS) { errno = mapError(err); RegCloseKey(desiredKey); return -1; } RegCloseKey(desiredKey); return 0; /* success */ } /** * Implementation for kdbRename() method. * * @see kdbRename() for expected behavior. * @ingroup backend */ int kdbRename_winregistry(KDB *handle, Key *key, const char *newName) { /* rename a key to another name */ return 0; /* success */ } /** * Implementation for kdbRemoveKey() method. * * @see kdbRemove() for expected behavior. * @ingroup backend */ int kdbRemoveKey_winregistry(KDB *handle, const Key *key) { /* remove a key from the database */ HKEY rootKey = {0}; HKEY desiredKey = {0}; char path[1024]; DWORD type; char *keyName = NULL; LONG err=0; if(!kdbGetRegistryPath(key, rootKey, path, sizeof(path), &keyName)) { return -1; } if((err = RegOpenKeyEx(rootKey, path, 0, KEY_READ,&desiredKey)) != ERROR_SUCCESS) { /* Error opening key */ errno = mapError(err); return -1; } if((err = RegDeleteValue(desiredKey, keyName)) != ERROR_SUCCESS) { errno = mapError(err); RegCloseKey(desiredKey); return -1; } RegCloseKey(desiredKey); return 0; /* success */ } /** * Implementation for kdbGetKeyChildKeys() method. * * @see kdbGetKeyChildKeys() for expected behavior. * @ingroup backend */ ssize_t kdbGetKeyChildKeys_winregistry(KDB *handle, const Key *parentKey, KeySet *returned, unsigned long options) { /* retrieve multiple hierarchical keys */ return (ssize_t)returned->size; /* success */ } /** * Implementation for kdbSetKeys() method. * * The implementation of this method is optional, and a builtin, probablly * inefficient implementation can be explicitly used when exporting the * backend with kdbBackendExport(), using kdbSetKeys_default(). * * @see kdbSetKeys() for expected behavior. * @ingroup backend */ int kdbSetKeys_winregistry(KDB *handle, KeySet *ks) { /* set many keys */ return 0; } /** * The implementation of this method is optional. * The builtin inefficient implementation will use kdbGetKey() for each * key inside @p interests. * * @see kdbMonitorKeys() for expected behavior. * @ingroup backend */ uint32_t kdbMonitorKeys_winregistry(KDB *handle, KeySet *interests, uint32_t diffMask, unsigned long iterations, unsigned sleep) { return 0; } /** * * The implementation of this method is optional. * The builtin inefficient implementation will use kdbGetKey() for * @p interest. * * @see kdbMonitorKey() for expected behavior. * @ingroup backend */ uint32_t kdbMonitorKey_winregistry(KDB *handle, Key *interest, uint32_t diffMask, unsigned long iterations, unsigned sleep) { return 0; } KDBEXPORT(BACKENDNAME) { return kdbBackendExport(BACKENDNAME, KDB_BE_OPEN, &kdbOpen_winregistry, KDB_BE_CLOSE, &kdbClose_winregistry, KDB_BE_GETKEY, &kdbGetKey_winregistry, KDB_BE_SETKEY, &kdbSetKey_winregistry, KDB_BE_STATKEY, &kdbStatKey_winregistry, KDB_BE_RENAME, &kdbRename_winregistry, KDB_BE_REMOVEKEY, &kdbRemoveKey_winregistry, KDB_BE_GETCHILD, &kdbGetKeyChildKeys_winregistry, KDB_BE_END); } /** * Calculate the real file name for a key. * * @param returned the buffer to return the calculated filename * @param maxSize maximum number of bytes that fit the buffer * @see kdbCalcRelativeFilename() * @return number of bytes written to the buffer, or 0 on error * @ingroup internals */ size_t kdbGetRegistryPath(const Key *forKey,HKEY rootkey, char *path, size_t maxSize, char **keyName) { size_t length=0; char *sid = NULL; switch (keyGetNamespace(forKey)) { case KEY_NS_SYSTEM: /* Prepare to use the 'system/ *' database */ rootkey = HKEY_LOCAL_MACHINE; length = snprintf(path, maxSize, "%s/%s", KDB_REGISTRY_PATH, forKey->key); break; case KEY_NS_USER: /* Prepare to use the 'user:????/ *' database */ if (forKey->userDomain) { /* This is unsupported so far */ errno = KDB_ERR_INVALIDKEY; return 0; /* FIXME: The Following code should work immediately as soon as getSID is implemented */ /*rootkey = HKEY_USERS; sid=getSID(forKey->userDomain); if (!sid) return 0; /* propagate errno length = snprintf(path,maxSize, "%s/%s/%s", sid, KDB_REGISTRY_PATH, forKey->key);*/ } else { rootkey = HKEY_CURRENT_USER; length = snprintf(path, maxSize, "%s/%s", KDB_REGISTRY_PATH, forKey->key); } break; default: { errno=KDB_ERR_INVALIDKEY; return 0; } } *keyName = strrchr(path, '/'); *keyName = '\0'; *keyName++; return length; } /* getSID finds the Security identifier of a given username. This is needed to use user:username/ elektra urls */ size_t getSID(char *username, char *sid, int size) { return 0; } int mapError(LONG err) { switch(err) { case ERROR_ACCESS_DENIED: return KDB_ERR_NOCRED; default: return KDB_ERR_NOTFOUND; } } elektra-0.7.1/src/backends/winregistry/winregistry.h0000644000076400001440000000503511361542117017561 00000000000000// $Id$ // The following ifdef block is the standard way of creating macros which make exporting // from a DLL simpler. All files within this DLL are compiled with the WINREGISTRY_EXPORTS // symbol defined on the command line. this symbol should not be defined on any project // that uses this DLL. This way any other project whose source files include this file see // WINREGISTRY_API functions as being imported from a DLL, whereas this DLL sees symbols // defined with this macro as being exported. #ifdef WINREGISTRY_EXPORTS #define WINREGISTRY_API __declspec(dllexport) #else #define WINREGISTRY_API __declspec(dllimport) #endif #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #define BACKENDNAME "winregistry" #define KDB_REGISTRY_PATH "SOFTWARE/Elektra" /* Private functions */ size_t kdbGetRegistryPath(const Key *forKey,HKEY rootkey, char *path, size_t maxSize, char **keyName); size_t getSID(char *username, char *sid, int size); /* Exported functions */ #ifdef __cplusplus extern "C" { #endif int kdbOpen_winregistry(KDB *handle); int kdbClose_winregistry(KDB *handle); int kdbStatKey_winregistry(KDB handle, Key *key); int kdbGetKey_winregistry(KDB handle, Key *key); int kdbSetKey_winregistry(KDB handle, Key *key); int kdbRename_winregistry(KDB handle, Key *key, const char *newName); int kdbRemoveKey_winregistry(const Key *key); ssize_t kdbGetKeyChildKeys_winregistry(const Key *parentKey, KeySet *returned, unsigned long options); /* While the windows registry does provide a far more efficient implementation of these, it's fine to live without them for now */ /*int kdbSetKeys_winregistry(KeySet *ks); uint32_t kdbMonitorKeys_winregistry(KeySet *interests, uint32_t diffMask, unsigned long iterations, unsigned sleep); uint32_t kdbMonitorKey_winregistry(Key *interest, uint32_t diffMask, unsigned long iterations, unsigned sleep);*/ /** * All KDB methods implemented by the backend can have random names, except * kdbBackendFactory(). This is the single symbol that will be looked up * when loading the backend, and the first method of the backend * implementation that will be called. * * Its purpose is to "publish" the exported methods for libelektra.so. The * implementation inside the provided skeleton is usually enough: simply * call kdbBackendExport() with all methods that must be exported. * * @return whatever kdbBackendExport() returns * @see kdbBackendExport() for an example * @see kdbOpenBackend() * @ingroup backend */ WINREGISTRY_API KDBEXPORT(BACKENDNAME); #ifdef __cplusplus } #endif elektra-0.7.1/src/bindings/0000777000076400001440000000000011365513214012540 500000000000000elektra-0.7.1/src/bindings/Makefile.am0000644000076400001440000000014711365507605014521 00000000000000 # $Id: Makefile.am 658 2006-03-05 11:31:26Z aviram $ DIST_SUBDIRS = cpp python SUBDIRS = @BINDINGS@ elektra-0.7.1/src/bindings/Makefile.in0000644000076400001440000003742211365511151014527 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ # $Id: Makefile.am 658 2006-03-05 11:31:26Z aviram $ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = src/bindings DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/extensions.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) INSTALL = @INSTALL@ ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BACKENDS = @BACKENDS@ BACKEND_VERSION_API = @BACKEND_VERSION_API@ BINDINGS = @BINDINGS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CDBGFLAGS = @CDBGFLAGS@ CFLAGS = @CFLAGS@ COPTFLAGS = @COPTFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSTDFLAGS = @CSTDFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDBGFLAGS = @CXXDBGFLAGS@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXOPTFLAGS = @CXXOPTFLAGS@ CXXSTDFLAGS = @CXXSTDFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_FALSE = @DEBUG_FALSE@ DEBUG_TRUE = @DEBUG_TRUE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ELEKTRATOOLS_VERSION_API = @ELEKTRATOOLS_VERSION_API@ ELEKTRA_VERSION_API = @ELEKTRA_VERSION_API@ EXEEXT = @EXEEXT@ EXPERIMENTAL_FALSE = @EXPERIMENTAL_FALSE@ EXPERIMENTAL_TRUE = @EXPERIMENTAL_TRUE@ F77 = @F77@ FFLAGS = @FFLAGS@ GENHTML = @GENHTML@ GREP = @GREP@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ HAVE_LIBLTDL_FALSE = @HAVE_LIBLTDL_FALSE@ HAVE_LIBLTDL_TRUE = @HAVE_LIBLTDL_TRUE@ HAVE_MAN2HTML_FALSE = @HAVE_MAN2HTML_FALSE@ HAVE_MAN2HTML_TRUE = @HAVE_MAN2HTML_TRUE@ HAVE_XML_FALSE = @HAVE_XML_FALSE@ HAVE_XML_TRUE = @HAVE_XML_TRUE@ HAVE_XSL_FALSE = @HAVE_XSL_FALSE@ HAVE_XSL_TRUE = @HAVE_XSL_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDB_VERSION = @KDB_VERSION@ KDB_VERSION_MAJOR = @KDB_VERSION_MAJOR@ KDB_VERSION_MAJORMINOR = @KDB_VERSION_MAJORMINOR@ KDB_VERSION_MICRO = @KDB_VERSION_MICRO@ KDB_VERSION_MINOR = @KDB_VERSION_MINOR@ LCOV = @LCOV@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VALGRIND = @VALGRIND@ VALGRINDTESTS_FALSE = @VALGRINDTESTS_FALSE@ VALGRINDTESTS_TRUE = @VALGRINDTESTS_TRUE@ VERSION = @VERSION@ XML2_CONFIG = @XML2_CONFIG@ XML_CPPFLAGS = @XML_CPPFLAGS@ XML_LIBS = @XML_LIBS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ backend_static_libs = @backend_static_libs@ backenddir = @backenddir@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ datarootdir = @datarootdir@ dbroot = @dbroot@ default_backend = @default_backend@ default_dbackend = @default_dbackend@ default_docbook = @default_docbook@ develdocdir = @develdocdir@ docdir = @docdir@ doxygen = @doxygen@ dvidir = @dvidir@ elektratools = @elektratools@ exec_prefix = @exec_prefix@ gconf_CFLAGS = @gconf_CFLAGS@ gconf_LIBS = @gconf_LIBS@ hlvlbackenddir = @hlvlbackenddir@ 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@ man2html = @man2html@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ privatelibs = @privatelibs@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ ulibdir = @ulibdir@ xsltproc = @xsltproc@ DIST_SUBDIRS = cpp python SUBDIRS = @BINDINGS@ 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 \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/bindings/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/bindings/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; 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; \ (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" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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 || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(mkdir_p) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ 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: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_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-libtool \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-exec-am: install-info: install-info-recursive install-man: 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: uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ clean clean-generic clean-libtool clean-recursive ctags \ ctags-recursive distclean distclean-generic distclean-libtool \ distclean-recursive distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic maintainer-clean-recursive \ mostlyclean mostlyclean-generic mostlyclean-libtool \ mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: elektra-0.7.1/src/bindings/cpp/0000777000076400001440000000000011365513214013322 500000000000000elektra-0.7.1/src/bindings/cpp/Makefile.am0000644000076400001440000000170311365507605015302 00000000000000INCLUDES = -I$(top_srcdir)/src/include -I$(top_srcdir)/src/bindings/cpp/include AM_CXXFLAGS = $(CXXSTDFLAGS) $(CXXOPTFLAGS) $(CXXDBGFLAGS) SUBDIRS = tests DIST_SUBDIRS = tests include_HEADERS = include/kdb include/key include/keyset dependencies = ../../include/kdb.h sources = kdb.cpp key.cpp keyset.cpp include/kdb include/key include/keyset objects = kdb.o key.o keyset.o lib_LIBRARIES = libelektra-cpp.a libelektra_cpp_a_SOURCES = $(sources) libelektra_cpp_a_DEPENDENCIES = libelektra_cpp_a_CXXFLAGS = $(cxxflags) libelektra_cpp_a_CPPFLAGS = -DELEKTRA_STATIC $(cppflags) libelektra_cpp_a_LIBADD = BUILT_SOURCES = lib_LTLIBRARIES = libelektra-cpp.la libelektra_cpp_la_SOURCES = $(sources) libelektra_cpp_la_DEPENDENCIES = libelektra_cpp_la_CXXFLAGS = $(cxxflags) libelektra_cpp_la_CPPFLAGS = $(cppflags) libelektra_cpp_la_LDFLAGS = -version-info 0:0:0 libelektra_cpp_la_LIBADD = ../../libelektra/libelektra.la clean-local: rm -f *.gcno *.gcda *.gcno elektra-0.7.1/src/bindings/cpp/Makefile.in0000644000076400001440000010215111365511152015302 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = src/bindings/cpp DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/extensions.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/config.h CONFIG_CLEAN_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libdir)" \ "$(DESTDIR)$(includedir)" libLIBRARIES_INSTALL = $(INSTALL_DATA) LIBRARIES = $(lib_LIBRARIES) ARFLAGS = cru libelektra_cpp_a_AR = $(AR) $(ARFLAGS) am__objects_1 = libelektra_cpp_a-kdb.$(OBJEXT) \ libelektra_cpp_a-key.$(OBJEXT) \ libelektra_cpp_a-keyset.$(OBJEXT) am_libelektra_cpp_a_OBJECTS = $(am__objects_1) libelektra_cpp_a_OBJECTS = $(am_libelektra_cpp_a_OBJECTS) libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) am__objects_2 = libelektra_cpp_la-kdb.lo libelektra_cpp_la-key.lo \ libelektra_cpp_la-keyset.lo am_libelektra_cpp_la_OBJECTS = $(am__objects_2) libelektra_cpp_la_OBJECTS = $(am_libelektra_cpp_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/src/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libelektra_cpp_a_SOURCES) $(libelektra_cpp_la_SOURCES) DIST_SOURCES = $(libelektra_cpp_a_SOURCES) \ $(libelektra_cpp_la_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-exec-recursive install-info-recursive \ install-recursive installcheck-recursive installdirs-recursive \ pdf-recursive ps-recursive uninstall-info-recursive \ uninstall-recursive includeHEADERS_INSTALL = $(INSTALL_HEADER) HEADERS = $(include_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) INSTALL = @INSTALL@ ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BACKENDS = @BACKENDS@ BACKEND_VERSION_API = @BACKEND_VERSION_API@ BINDINGS = @BINDINGS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CDBGFLAGS = @CDBGFLAGS@ CFLAGS = @CFLAGS@ COPTFLAGS = @COPTFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSTDFLAGS = @CSTDFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDBGFLAGS = @CXXDBGFLAGS@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXOPTFLAGS = @CXXOPTFLAGS@ CXXSTDFLAGS = @CXXSTDFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_FALSE = @DEBUG_FALSE@ DEBUG_TRUE = @DEBUG_TRUE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ELEKTRATOOLS_VERSION_API = @ELEKTRATOOLS_VERSION_API@ ELEKTRA_VERSION_API = @ELEKTRA_VERSION_API@ EXEEXT = @EXEEXT@ EXPERIMENTAL_FALSE = @EXPERIMENTAL_FALSE@ EXPERIMENTAL_TRUE = @EXPERIMENTAL_TRUE@ F77 = @F77@ FFLAGS = @FFLAGS@ GENHTML = @GENHTML@ GREP = @GREP@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ HAVE_LIBLTDL_FALSE = @HAVE_LIBLTDL_FALSE@ HAVE_LIBLTDL_TRUE = @HAVE_LIBLTDL_TRUE@ HAVE_MAN2HTML_FALSE = @HAVE_MAN2HTML_FALSE@ HAVE_MAN2HTML_TRUE = @HAVE_MAN2HTML_TRUE@ HAVE_XML_FALSE = @HAVE_XML_FALSE@ HAVE_XML_TRUE = @HAVE_XML_TRUE@ HAVE_XSL_FALSE = @HAVE_XSL_FALSE@ HAVE_XSL_TRUE = @HAVE_XSL_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDB_VERSION = @KDB_VERSION@ KDB_VERSION_MAJOR = @KDB_VERSION_MAJOR@ KDB_VERSION_MAJORMINOR = @KDB_VERSION_MAJORMINOR@ KDB_VERSION_MICRO = @KDB_VERSION_MICRO@ KDB_VERSION_MINOR = @KDB_VERSION_MINOR@ LCOV = @LCOV@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VALGRIND = @VALGRIND@ VALGRINDTESTS_FALSE = @VALGRINDTESTS_FALSE@ VALGRINDTESTS_TRUE = @VALGRINDTESTS_TRUE@ VERSION = @VERSION@ XML2_CONFIG = @XML2_CONFIG@ XML_CPPFLAGS = @XML_CPPFLAGS@ XML_LIBS = @XML_LIBS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ backend_static_libs = @backend_static_libs@ backenddir = @backenddir@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ datarootdir = @datarootdir@ dbroot = @dbroot@ default_backend = @default_backend@ default_dbackend = @default_dbackend@ default_docbook = @default_docbook@ develdocdir = @develdocdir@ docdir = @docdir@ doxygen = @doxygen@ dvidir = @dvidir@ elektratools = @elektratools@ exec_prefix = @exec_prefix@ gconf_CFLAGS = @gconf_CFLAGS@ gconf_LIBS = @gconf_LIBS@ hlvlbackenddir = @hlvlbackenddir@ 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@ man2html = @man2html@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ privatelibs = @privatelibs@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ ulibdir = @ulibdir@ xsltproc = @xsltproc@ INCLUDES = -I$(top_srcdir)/src/include -I$(top_srcdir)/src/bindings/cpp/include AM_CXXFLAGS = $(CXXSTDFLAGS) $(CXXOPTFLAGS) $(CXXDBGFLAGS) SUBDIRS = tests DIST_SUBDIRS = tests include_HEADERS = include/kdb include/key include/keyset dependencies = ../../include/kdb.h sources = kdb.cpp key.cpp keyset.cpp include/kdb include/key include/keyset objects = kdb.o key.o keyset.o lib_LIBRARIES = libelektra-cpp.a libelektra_cpp_a_SOURCES = $(sources) libelektra_cpp_a_DEPENDENCIES = libelektra_cpp_a_CXXFLAGS = $(cxxflags) libelektra_cpp_a_CPPFLAGS = -DELEKTRA_STATIC $(cppflags) libelektra_cpp_a_LIBADD = BUILT_SOURCES = lib_LTLIBRARIES = libelektra-cpp.la libelektra_cpp_la_SOURCES = $(sources) libelektra_cpp_la_DEPENDENCIES = libelektra_cpp_la_CXXFLAGS = $(cxxflags) libelektra_cpp_la_CPPFLAGS = $(cppflags) libelektra_cpp_la_LDFLAGS = -version-info 0:0:0 libelektra_cpp_la_LIBADD = ../../libelektra/libelektra.la all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) 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 \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/bindings/cpp/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/bindings/cpp/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-libLIBRARIES: $(lib_LIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" @list='$(lib_LIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(libLIBRARIES_INSTALL) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(libLIBRARIES_INSTALL) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done @$(POST_INSTALL) @list='$(lib_LIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ p=$(am__strip_dir) \ echo " $(RANLIB) '$(DESTDIR)$(libdir)/$$p'"; \ $(RANLIB) "$(DESTDIR)$(libdir)/$$p"; \ else :; fi; \ done uninstall-libLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(libdir)/$$p'"; \ rm -f "$(DESTDIR)$(libdir)/$$p"; \ done clean-libLIBRARIES: -test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES) libelektra-cpp.a: $(libelektra_cpp_a_OBJECTS) $(libelektra_cpp_a_DEPENDENCIES) -rm -f libelektra-cpp.a $(libelektra_cpp_a_AR) libelektra-cpp.a $(libelektra_cpp_a_OBJECTS) $(libelektra_cpp_a_LIBADD) $(RANLIB) libelektra-cpp.a install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libelektra-cpp.la: $(libelektra_cpp_la_OBJECTS) $(libelektra_cpp_la_DEPENDENCIES) $(CXXLINK) -rpath $(libdir) $(libelektra_cpp_la_LDFLAGS) $(libelektra_cpp_la_OBJECTS) $(libelektra_cpp_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_cpp_a-kdb.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_cpp_a-key.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_cpp_a-keyset.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_cpp_la-kdb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_cpp_la-key.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_cpp_la-keyset.Plo@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< libelektra_cpp_a-kdb.o: kdb.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libelektra_cpp_a_CPPFLAGS) $(CPPFLAGS) $(libelektra_cpp_a_CXXFLAGS) $(CXXFLAGS) -MT libelektra_cpp_a-kdb.o -MD -MP -MF "$(DEPDIR)/libelektra_cpp_a-kdb.Tpo" -c -o libelektra_cpp_a-kdb.o `test -f 'kdb.cpp' || echo '$(srcdir)/'`kdb.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libelektra_cpp_a-kdb.Tpo" "$(DEPDIR)/libelektra_cpp_a-kdb.Po"; else rm -f "$(DEPDIR)/libelektra_cpp_a-kdb.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='kdb.cpp' object='libelektra_cpp_a-kdb.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libelektra_cpp_a_CPPFLAGS) $(CPPFLAGS) $(libelektra_cpp_a_CXXFLAGS) $(CXXFLAGS) -c -o libelektra_cpp_a-kdb.o `test -f 'kdb.cpp' || echo '$(srcdir)/'`kdb.cpp libelektra_cpp_a-kdb.obj: kdb.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libelektra_cpp_a_CPPFLAGS) $(CPPFLAGS) $(libelektra_cpp_a_CXXFLAGS) $(CXXFLAGS) -MT libelektra_cpp_a-kdb.obj -MD -MP -MF "$(DEPDIR)/libelektra_cpp_a-kdb.Tpo" -c -o libelektra_cpp_a-kdb.obj `if test -f 'kdb.cpp'; then $(CYGPATH_W) 'kdb.cpp'; else $(CYGPATH_W) '$(srcdir)/kdb.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libelektra_cpp_a-kdb.Tpo" "$(DEPDIR)/libelektra_cpp_a-kdb.Po"; else rm -f "$(DEPDIR)/libelektra_cpp_a-kdb.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='kdb.cpp' object='libelektra_cpp_a-kdb.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libelektra_cpp_a_CPPFLAGS) $(CPPFLAGS) $(libelektra_cpp_a_CXXFLAGS) $(CXXFLAGS) -c -o libelektra_cpp_a-kdb.obj `if test -f 'kdb.cpp'; then $(CYGPATH_W) 'kdb.cpp'; else $(CYGPATH_W) '$(srcdir)/kdb.cpp'; fi` libelektra_cpp_a-key.o: key.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libelektra_cpp_a_CPPFLAGS) $(CPPFLAGS) $(libelektra_cpp_a_CXXFLAGS) $(CXXFLAGS) -MT libelektra_cpp_a-key.o -MD -MP -MF "$(DEPDIR)/libelektra_cpp_a-key.Tpo" -c -o libelektra_cpp_a-key.o `test -f 'key.cpp' || echo '$(srcdir)/'`key.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libelektra_cpp_a-key.Tpo" "$(DEPDIR)/libelektra_cpp_a-key.Po"; else rm -f "$(DEPDIR)/libelektra_cpp_a-key.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='key.cpp' object='libelektra_cpp_a-key.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libelektra_cpp_a_CPPFLAGS) $(CPPFLAGS) $(libelektra_cpp_a_CXXFLAGS) $(CXXFLAGS) -c -o libelektra_cpp_a-key.o `test -f 'key.cpp' || echo '$(srcdir)/'`key.cpp libelektra_cpp_a-key.obj: key.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libelektra_cpp_a_CPPFLAGS) $(CPPFLAGS) $(libelektra_cpp_a_CXXFLAGS) $(CXXFLAGS) -MT libelektra_cpp_a-key.obj -MD -MP -MF "$(DEPDIR)/libelektra_cpp_a-key.Tpo" -c -o libelektra_cpp_a-key.obj `if test -f 'key.cpp'; then $(CYGPATH_W) 'key.cpp'; else $(CYGPATH_W) '$(srcdir)/key.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libelektra_cpp_a-key.Tpo" "$(DEPDIR)/libelektra_cpp_a-key.Po"; else rm -f "$(DEPDIR)/libelektra_cpp_a-key.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='key.cpp' object='libelektra_cpp_a-key.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libelektra_cpp_a_CPPFLAGS) $(CPPFLAGS) $(libelektra_cpp_a_CXXFLAGS) $(CXXFLAGS) -c -o libelektra_cpp_a-key.obj `if test -f 'key.cpp'; then $(CYGPATH_W) 'key.cpp'; else $(CYGPATH_W) '$(srcdir)/key.cpp'; fi` libelektra_cpp_a-keyset.o: keyset.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libelektra_cpp_a_CPPFLAGS) $(CPPFLAGS) $(libelektra_cpp_a_CXXFLAGS) $(CXXFLAGS) -MT libelektra_cpp_a-keyset.o -MD -MP -MF "$(DEPDIR)/libelektra_cpp_a-keyset.Tpo" -c -o libelektra_cpp_a-keyset.o `test -f 'keyset.cpp' || echo '$(srcdir)/'`keyset.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libelektra_cpp_a-keyset.Tpo" "$(DEPDIR)/libelektra_cpp_a-keyset.Po"; else rm -f "$(DEPDIR)/libelektra_cpp_a-keyset.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='keyset.cpp' object='libelektra_cpp_a-keyset.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libelektra_cpp_a_CPPFLAGS) $(CPPFLAGS) $(libelektra_cpp_a_CXXFLAGS) $(CXXFLAGS) -c -o libelektra_cpp_a-keyset.o `test -f 'keyset.cpp' || echo '$(srcdir)/'`keyset.cpp libelektra_cpp_a-keyset.obj: keyset.cpp @am__fastdepCXX_TRUE@ if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libelektra_cpp_a_CPPFLAGS) $(CPPFLAGS) $(libelektra_cpp_a_CXXFLAGS) $(CXXFLAGS) -MT libelektra_cpp_a-keyset.obj -MD -MP -MF "$(DEPDIR)/libelektra_cpp_a-keyset.Tpo" -c -o libelektra_cpp_a-keyset.obj `if test -f 'keyset.cpp'; then $(CYGPATH_W) 'keyset.cpp'; else $(CYGPATH_W) '$(srcdir)/keyset.cpp'; fi`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libelektra_cpp_a-keyset.Tpo" "$(DEPDIR)/libelektra_cpp_a-keyset.Po"; else rm -f "$(DEPDIR)/libelektra_cpp_a-keyset.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='keyset.cpp' object='libelektra_cpp_a-keyset.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libelektra_cpp_a_CPPFLAGS) $(CPPFLAGS) $(libelektra_cpp_a_CXXFLAGS) $(CXXFLAGS) -c -o libelektra_cpp_a-keyset.obj `if test -f 'keyset.cpp'; then $(CYGPATH_W) 'keyset.cpp'; else $(CYGPATH_W) '$(srcdir)/keyset.cpp'; fi` libelektra_cpp_la-kdb.lo: kdb.cpp @am__fastdepCXX_TRUE@ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libelektra_cpp_la_CPPFLAGS) $(CPPFLAGS) $(libelektra_cpp_la_CXXFLAGS) $(CXXFLAGS) -MT libelektra_cpp_la-kdb.lo -MD -MP -MF "$(DEPDIR)/libelektra_cpp_la-kdb.Tpo" -c -o libelektra_cpp_la-kdb.lo `test -f 'kdb.cpp' || echo '$(srcdir)/'`kdb.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libelektra_cpp_la-kdb.Tpo" "$(DEPDIR)/libelektra_cpp_la-kdb.Plo"; else rm -f "$(DEPDIR)/libelektra_cpp_la-kdb.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='kdb.cpp' object='libelektra_cpp_la-kdb.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libelektra_cpp_la_CPPFLAGS) $(CPPFLAGS) $(libelektra_cpp_la_CXXFLAGS) $(CXXFLAGS) -c -o libelektra_cpp_la-kdb.lo `test -f 'kdb.cpp' || echo '$(srcdir)/'`kdb.cpp libelektra_cpp_la-key.lo: key.cpp @am__fastdepCXX_TRUE@ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libelektra_cpp_la_CPPFLAGS) $(CPPFLAGS) $(libelektra_cpp_la_CXXFLAGS) $(CXXFLAGS) -MT libelektra_cpp_la-key.lo -MD -MP -MF "$(DEPDIR)/libelektra_cpp_la-key.Tpo" -c -o libelektra_cpp_la-key.lo `test -f 'key.cpp' || echo '$(srcdir)/'`key.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libelektra_cpp_la-key.Tpo" "$(DEPDIR)/libelektra_cpp_la-key.Plo"; else rm -f "$(DEPDIR)/libelektra_cpp_la-key.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='key.cpp' object='libelektra_cpp_la-key.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libelektra_cpp_la_CPPFLAGS) $(CPPFLAGS) $(libelektra_cpp_la_CXXFLAGS) $(CXXFLAGS) -c -o libelektra_cpp_la-key.lo `test -f 'key.cpp' || echo '$(srcdir)/'`key.cpp libelektra_cpp_la-keyset.lo: keyset.cpp @am__fastdepCXX_TRUE@ if $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libelektra_cpp_la_CPPFLAGS) $(CPPFLAGS) $(libelektra_cpp_la_CXXFLAGS) $(CXXFLAGS) -MT libelektra_cpp_la-keyset.lo -MD -MP -MF "$(DEPDIR)/libelektra_cpp_la-keyset.Tpo" -c -o libelektra_cpp_la-keyset.lo `test -f 'keyset.cpp' || echo '$(srcdir)/'`keyset.cpp; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/libelektra_cpp_la-keyset.Tpo" "$(DEPDIR)/libelektra_cpp_la-keyset.Plo"; else rm -f "$(DEPDIR)/libelektra_cpp_la-keyset.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='keyset.cpp' object='libelektra_cpp_la-keyset.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libelektra_cpp_la_CPPFLAGS) $(CPPFLAGS) $(libelektra_cpp_la_CXXFLAGS) $(CXXFLAGS) -c -o libelektra_cpp_la-keyset.lo `test -f 'keyset.cpp' || echo '$(srcdir)/'`keyset.cpp mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)" @list='$(include_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \ $(includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \ done uninstall-includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(include_HEADERS)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \ rm -f "$(DESTDIR)$(includedir)/$$f"; \ done # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; 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; \ (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" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ 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 || \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(mkdir_p) $(distdir)/include @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(mkdir_p) "$(distdir)/$$subdir" \ || exit 1; \ distdir=`$(am__cd) $(distdir) && pwd`; \ top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$top_distdir" \ distdir="$$distdir/$$subdir" \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-recursive all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(HEADERS) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) 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: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-recursive clean-am: clean-generic clean-libLIBRARIES clean-libLTLIBRARIES \ clean-libtool clean-local mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive info: info-recursive info-am: install-data-am: install-includeHEADERS install-exec-am: install-libLIBRARIES install-libLTLIBRARIES install-info: install-info-recursive install-man: 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-includeHEADERS uninstall-info-am \ uninstall-libLIBRARIES uninstall-libLTLIBRARIES uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ clean clean-generic clean-libLIBRARIES clean-libLTLIBRARIES \ clean-libtool clean-local clean-recursive ctags \ ctags-recursive distclean distclean-compile distclean-generic \ distclean-libtool distclean-recursive distclean-tags distdir \ dvi dvi-am html html-am info info-am install install-am \ install-data install-data-am install-exec install-exec-am \ install-includeHEADERS install-info install-info-am \ install-libLIBRARIES install-libLTLIBRARIES install-man \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ maintainer-clean-recursive mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \ pdf pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \ uninstall-includeHEADERS uninstall-info-am \ uninstall-libLIBRARIES uninstall-libLTLIBRARIES clean-local: rm -f *.gcno *.gcda *.gcno # 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: elektra-0.7.1/src/bindings/cpp/include/0000777000076400001440000000000011365513214014745 500000000000000elektra-0.7.1/src/bindings/cpp/include/kdb0000644000076400001440000000173611365506635015364 00000000000000#ifndef CPP_KDB_H #define CPP_KDB_H #include #include #include #include namespace kdb { class KDBException : public std::exception { const char* what() {return "KDB Exception";} }; class KDB { public: KDB (); ~KDB (); size_t get (KeySet & returned, const Key &parentKey, option_t options = KDB_O_NONE); size_t get (KeySet & returned, const std::string &parentName, option_t options = KDB_O_NONE); size_t get (KeySet & returned, const char * parentName, option_t options = KDB_O_NONE); size_t set (KeySet & returned, const Key &parentKey, option_t options = KDB_O_NONE); void get (Key & toGet); void set (const Key & toSet); void getString (const std::string &keyname, std::string value, size_t maxSize); void setString (const std::string &keyname, const std::string &value); void remove (const std::string &keyname); protected: /**You may use the KDB in an inherited class*/ ckdb::KDB* handle; }; } // end of namespace kdb #endif elektra-0.7.1/src/bindings/cpp/include/key0000644000076400001440000000771111365506635015413 00000000000000#ifndef CPP_KEY_H #define CPP_KEY_H #include #include #include namespace kdb { class KeyException : public std::exception { const char* what() {return "Key Exception";} }; class KeyInvalidName : public KeyException { const char* what() {return "Invalid Keyname";} }; /**Key represents an elektra key.*/ class Key { public: Key () :key (ckdb::keyNew (0)) { operator++(); } Key (ckdb::Key *k) :key(k) { operator++(); } Key (Key &k) :key (k.key) { operator++(); } Key (const Key &k) :key (k.key) { operator++(); } Key (const char * name, va_list ap); Key (const char * name, ...); Key (const std::string name, ...); void del () { operator --(); ckdb::keyDel(key); } void copy (const Key &other) { ckdb::keyCopy(key,other.key); } void clear () { ckdb::keyCopy(key,0); } ~Key () { del(); } void operator ++(int) { operator++(); } void operator ++() { ckdb::keyIncRef(key); } void operator --(int) { operator--(); } void operator --() { ckdb::keyDecRef(key); } bool operator ==(const Key &k) const { return key == k.key; } template T get() { T x; std::string str; str = getString(); std::istringstream ist(str); ist >> x; // convert string to type return x; } template void set(T x) { std::string str; std::ostringstream ost; ost << x; // convert type to string setString (ost.str()); } /*Passes out the pointer, maybe directly changing this object*/ ckdb::Key* getKey () const { return key; } ckdb::Key* operator* () const { return key; } ckdb::Key* dup () const { return ckdb::keyDup(getKey()); } Key& operator= (ckdb::Key *k); Key& operator= (const Key &k); Key& operator= (const std::string &name); Key& operator+= (const std::string &name); Key& operator-= (const std::string &name); Key& operator= (const char *name); Key& operator+= (const char *name); Key& operator-= (const char *name); type_t getType() const; void setType(type_t type = KEY_TYPE_STRING); std::string getName() const; const char* name() const; size_t getNameSize() const; std::string getBaseName() const; const char* baseName() const; size_t getBaseNameSize() const; void setName (const std::string &name); void setBaseName (const std::string &basename); size_t getFullNameSize() const; std::string getFullName() const; std::string getComment() const; const char* comment() const; size_t getCommentSize() const; void setComment(const std::string &comment); uid_t getUID() const; void setUID(uid_t uid); gid_t getGID() const; void setGID(gid_t gid); mode_t getMode() const; void setMode(mode_t mode); std::string getOwner() const; const char* owner() const; size_t getOwnerSize() const; void setOwner(const std::string &owner); const void* value() const; size_t getValueSize() const; std::string getString() const; void setString(std::string newString); size_t getBinary(void *returnedBinary, size_t maxSize) const; size_t setBinary(const void *newBinary, size_t dataSize); void setDir (); void setMTime(time_t time); void setATime(time_t time); void setCTime(time_t time); time_t getMTime() const; time_t getATime() const; time_t getCTime() const; bool isSystem() const; bool isUser() const; int getNamespace() const; size_t getReference() const; bool isDir() const; bool isString() const; bool isBinary() const; bool isInactive() const; bool isBelow(const Key &k) const; bool isDirectBelow(const Key &k) const; bool needSync() const; bool needRemove() const; bool needStat() const; void remove(); void stat(); /* ssize_t toStream(FILE* stream = stdout, unsigned long options = 0) const; ssize_t output(FILE* stream = stdout, unsigned long options = 0) const; ssize_t generate(FILE* stream = stdout, unsigned long options = 0) const; */ friend std::ostream & operator << (std::ostream & os, const Key &d); friend std::istream & operator >> (std::istream & os, Key &d); private: ckdb::Key * key; // holds elektra key struct }; } // end of namespace kdb #endif elektra-0.7.1/src/bindings/cpp/include/keyset0000644000076400001440000000373711365506635016133 00000000000000#ifndef CPP_KEYSET_H #define CPP_KEYSET_H #include #include #include namespace kdb { class KeySetException : public std::exception { const char* what() {return "Key Exception";} }; class KeySetOutOfRange : public KeySetException { const char* what() {return "Out of range in KeySet";} }; class KeySetNotFound : public KeySetException { const char* what() {return "Could not find Key in KeySet";} }; /**Key represents an elektra key.*/ class KeySet { public: KeySet () :ks (ckdb::ksNew(0)) {} KeySet (ckdb::KeySet *k) :ks(k) {} KeySet (const KeySet &other); KeySet (size_t alloc, va_list ap); KeySet (size_t alloc, ...); ~KeySet (); ckdb::KeySet * getKeySet () const { return ks; } void setKeySet (ckdb::KeySet * k) { ks = k; } ckdb::KeySet* dup () const { return ckdb::ksDup(ks); } void copy (const KeySet &other) { ckdb::ksCopy(ks,other.ks); } void clear () { ckdb::ksCopy(ks,0); } void sort(); size_t size () const; size_t append (const Key &toAppend); size_t append (const KeySet &toAppend); Key pop(); void rewind () const; Key next(); Key current() const; Key head() const; Key tail() const; void setCursor(cursor_t cursor); cursor_t getCursor() const; Key lookup (const Key &k, const option_t options = KDB_O_NONE) const; Key lookup (const std::string &name, const option_t options = KDB_O_NONE) const; Key lookup (const char *name, const option_t options = KDB_O_NONE) const; /* ssize_t toStream(FILE* stream = stdout, option_t options = (option_t)0) const; ssize_t output(FILE* stream = stdout, option_t options = 0) const; ssize_t generate(FILE* stream = stdout, option_t options = 0) const; */ friend std::ostream & operator << (std::ostream & os, const KeySet &d); friend std::istream & operator >> (std::istream & os, KeySet &d); private: /* KeySet (KeySet &k) :ks (k.ks) { } KeySet (const KeySet &k) :ks (k.ks) { } */ private: ckdb::KeySet * ks; // holds elektra keyset struct }; } // end of namespace kdb #endif elektra-0.7.1/src/bindings/cpp/kdb.cpp0000644000076400001440000000412111365506635014511 00000000000000#include #include namespace kdb { /** * Constructs a class KDB. */ KDB::KDB () { handle = ckdb::kdbOpen(); } /** * The destructor closes the database. */ KDB::~KDB () { ckdb::kdbClose(handle); } /** * Get all keys below parentKey inside returned. * * @param returned the keyset where the keys will be in * @param parentKey the parentKey of returned * @param options to change the behaviour which keys to fetch */ size_t KDB::get (KeySet & returned, const Key & parentKey, option_t options) { ssize_t ret = ckdb::kdbGet (handle, returned.getKeySet(), parentKey.getKey(), options); if (ret == -1) throw KDBException(); return ret; } size_t KDB::set (KeySet & returned, const Key & parentKey, option_t options) { ssize_t ret = ckdb::kdbSet(handle, returned.getKeySet(), parentKey.getKey(), options); if (ret == -1) throw KDBException(); return ret; } size_t KDB::get (KeySet & returned, const std::string &parentName, option_t options) { ssize_t ret = ckdb::kdbGetByName (handle, returned.getKeySet(), parentName.c_str(), options); if (ret == -1) throw KDBException(); return ret; } size_t KDB::get (KeySet & returned, const char * parentName, option_t options) { ssize_t ret = ckdb::kdbGetByName (handle, returned.getKeySet(), parentName, options); if (ret == -1) throw KDBException(); return ret; } void KDB::getString (const std::string &keyname, std::string value, size_t maxSize) { char *c = new char[maxSize]; ckdb::kdbGetString(handle, keyname.c_str(), c, maxSize); value = c; delete (c); } void KDB::setString (const std::string &keyname, const std::string &value) { ckdb::kdbSetString(handle, keyname.c_str(), value.c_str()); } void KDB::remove (const std::string &keyname) { ckdb::kdbRemove(handle, keyname.c_str()); } /** * Get a single key. * * @param toGet the key to get */ void KDB::get (Key & toGet) { int ret = ckdb::kdbGetKey(handle, toGet.getKey()); if (ret == -1) throw KDBException(); } void KDB::set (const Key & toSet) { int ret = ckdb::kdbSetKey(handle, toSet.getKey()); if (ret == -1) throw KDBException(); } } // end of namespace kdb elektra-0.7.1/src/bindings/cpp/key.cpp0000644000076400001440000001777711365506635014566 00000000000000#include #include #include namespace kdb { Key::Key (const char * str, va_list ap) { key = ckdb::keyVNew (str, ap); operator++(); } Key::Key (const char * str, ...) { va_list ap; va_start(ap, str); key = ckdb::keyVNew (str, ap); va_end(ap); operator++(); } Key::Key (const std::string str, ...) { va_list ap; va_start(ap, str); key = ckdb::keyVNew (str.c_str(), ap); va_end(ap); operator++(); } Key& Key::operator= (ckdb::Key *k) { if (key != k) { del(); key = k; operator++(); } return *this; } Key& Key::operator= (const Key &k) { if (this != &k) { del(); key = k.key; operator++(); } return *this; } Key& Key::operator= (const std::string &name) { ckdb::keySetName(getKey(), name.c_str()); return *this; } Key& Key::operator+= (const std::string &name) { ckdb::keyAddBaseName(getKey(), name.c_str()); return *this; } Key& Key::operator-= (const std::string &name) { ckdb::keySetBaseName(getKey(), name.c_str()); return *this; } Key& Key::operator= (const char *name) { ckdb::keySetName(getKey(), name); return *this; } Key& Key::operator+= (const char *name) { ckdb::keyAddBaseName(getKey(), name); return *this; } Key& Key::operator-= (const char *name) { ckdb::keySetBaseName(getKey(), name); return *this; } /**Returns the type of the Key*/ type_t Key::getType() const { return ckdb::keyGetType (key); } /**Sets the type of the Key*/ void Key::setType(type_t type) { ckdb::keySetType (getKey(), type); } size_t Key::getNameSize() const { return ckdb::keyGetNameSize (getKey()); } std::string Key::getName() const { return std::string (ckdb::keyName(key)); } const char* Key::name() const { return ckdb::keyName(getKey()); } size_t Key::getBaseNameSize() const { return ckdb::keyGetBaseNameSize (getKey()); } std::string Key::getBaseName() const { return std::string (ckdb::keyBaseName(key)); } const char* Key::baseName() const { return ckdb::keyBaseName(getKey()); } /**Sets a name for a key. * Throws kdb::KeyInvalidName when the name is not valid*/ void Key::setName (const std::string &name) { if (ckdb::keySetName (getKey(), name.c_str()) == -1) throw KeyInvalidName(); } /**Sets a base name for a key. * Throws kdb::KeyInvalidName when the name is not valid*/ void Key::setBaseName (const std::string &name) { if (ckdb::keySetBaseName (getKey(), name.c_str()) == -1) throw KeyInvalidName(); } size_t Key::getFullNameSize() const { return ckdb::keyGetFullNameSize (getKey()); } std::string Key::getFullName() const { size_t csize = ckdb::keyGetFullNameSize (getKey()); std::string str; char * field = new char [csize]; ckdb::keyGetFullName (getKey(), field, csize); str = field; delete [] field; return str; } /**Returns the comment for the key.*/ std::string Key::getComment() const { return std::string(ckdb::keyComment(key)); } const char* Key::comment() const { return ckdb::keyComment (key); } /**Returns the size of the comment*/ size_t Key::getCommentSize() const { return ckdb::keyGetCommentSize (key); } /**Sets a comment for the specified key.*/ void Key::setComment(const std::string &comment) { ckdb::keySetComment (getKey(), comment.c_str()); } /**Returns the UID of the the key. It always * returs the current UID*/ uid_t Key::getUID() const { return ckdb::keyGetUID (getKey()); } /**Sets another UID for a key. This will always * fail, because you are a user.*/ void Key::setUID(uid_t uid) { ckdb::keySetUID (getKey(), uid); } /**Gets the Groupid from a specific key.*/ gid_t Key::getGID() const { return ckdb::keyGetGID (getKey()); } /**Sets the Groupid for a specific key. Only * groups where the user is a member a valid.*/ void Key::setGID(gid_t gid) { ckdb::keySetGID (getKey(), gid); } /**Returns the Mode of a key. * It is based on 4 Octets: special, user, group and other * The first bit is execute (not used for kdb) * The second bit is write mode. * The third bit is read mode. * See more in chmod (2). * An easier description may be in chmod (1), but * the +-rwx method is not supported.*/ mode_t Key::getMode() const { return ckdb::keyGetMode(getKey()); } /**Sets the Mode of a key. For more info see * getMode (std::string ).*/ void Key::setMode(mode_t mode) { ckdb::keySetMode (getKey(),mode); } /**Returns the Owner of the Key. It will always return * the current user.*/ std::string Key::getOwner() const { return std::string (ckdb::keyOwner(key)); } const char* Key::owner() const { return ckdb::keyOwner(key); } size_t Key::getOwnerSize() const { return ckdb::keyGetOwnerSize(key); } /**Sets the Owner of the Key. It will fail, because * you are not root.*/ void Key::setOwner(const std::string &owner) { ckdb::keySetOwner(getKey(), owner.c_str()); } const void*Key::value() const { return ckdb::keyValue (key); } /**Returns the DataSize of the Binary or String. It is used * for the internal malloc().*/ size_t Key::getValueSize() const { return ckdb::keyGetValueSize (key); } /**Returns the string directly from the key. It should be * the same as get().*/ std::string Key::getString() const { size_t csize = ckdb::keyGetValueSize (getKey()); std::string str; char * field = new char [csize]; ckdb::keyGetString (getKey(), field, csize); str = field; delete [] field; return str; } /**Sets the String of a key.*/ void Key::setString(std::string newString) { ckdb::keySetString (getKey(), newString.c_str()); } /**Returns the binary Value of the key. It will not be encoded * or decoded.*/ size_t Key::getBinary(void *returnedBinary, size_t maxSize) const { return ckdb::keyGetBinary (getKey(), returnedBinary, maxSize); } /**Sets a binary Value of a key*/ size_t Key::setBinary(const void *newBinary, size_t dataSize) { size_t s = ckdb::keySetBinary (getKey(), newBinary, dataSize); return s; } void Key::setDir () { ckdb::keySetDir (key); } void Key::setMTime (time_t time) { ckdb::keySetMTime (key, time); } void Key::setATime (time_t time) { ckdb::keySetATime (key, time); } void Key::setCTime (time_t time) { ckdb::keySetCTime (key, time); } /**Returns the time the Key was modified*/ time_t Key::getMTime() const { return ckdb::keyGetMTime(key); } /**Returns the last access time.*/ time_t Key::getATime() const { return ckdb::keyGetATime(key); } /**Returns when the Key last was changed.*/ time_t Key::getCTime() const { return ckdb::keyGetCTime(key); } bool Key::isSystem() const { return ckdb::keyIsSystem(key); } bool Key::isUser() const { return ckdb::keyIsUser(key); } size_t Key::getReference() const { return ckdb::keyGetRef(key); } bool Key::isDir() const { return ckdb::keyIsDir(key); } bool Key::isString() const { return ckdb::keyIsString(key); } bool Key::isBinary() const { return ckdb::keyIsBinary(key); } bool Key::isInactive () const { return ckdb::keyIsInactive (key); } bool Key::isBelow(const Key & k) const { return ckdb::keyIsBelow(key, k.getKey()); } bool Key::isDirectBelow(const Key & k) const { return ckdb::keyIsDirectBelow(key, k.getKey()); } bool Key::needSync() const { return ckdb::keyNeedSync(key); } bool Key::needRemove() const { return ckdb::keyNeedRemove(key); } bool Key::needStat() const { return ckdb::keyNeedStat(key); } void Key::remove() { ckdb::keyRemove (key); } void Key::stat() { ckdb::keyStat (key); } /* ssize_t Key::toStream(FILE* stream, unsigned long options) const { return ckdb::keyToStream (getKey(), stream, options); } ssize_t Key::output(FILE* stream, unsigned long options) const { return ckdb::keyOutput (getKey(), stream, options); } ssize_t Key::generate(FILE* stream, unsigned long options) const { return ckdb::keyGenerate(getKey(), stream, options); } */ std::ostream & operator << (std::ostream & os, const Key &k) { os << "Name: " << k.getName() << " Value: " << k.getString() << " Comment: " << k.getComment() << " Domain: " << (k.isUser() ? "user" : "system"); return os; } std::istream & operator >> (std::istream & is, Key &k) { std::string name, value, comment; is >> name >> value >> comment; k.setName(name); k.set(value); k.setComment(comment); return is; } } // end of namespace kdb elektra-0.7.1/src/bindings/cpp/keyset.cpp0000644000076400001440000000460211365506635015261 00000000000000#include namespace kdb { KeySet::KeySet (size_t alloc, va_list ap) { ks = ckdb::ksVNew (alloc, ap); } KeySet::KeySet (size_t alloc, ...) { va_list va; va_start (va, alloc); ks = ckdb::ksVNew (alloc, va); va_end (va); } KeySet::KeySet (const KeySet &other) { ks = ckdb::ksNew(0); ckdb::ksCopy(ks, other.ks); } KeySet::~KeySet () { ckdb::ksDel (ks); } size_t KeySet::size () const { return ckdb::ksGetSize(ks); } void KeySet::rewind () const { ckdb::ksRewind(ks); } void KeySet::setCursor(cursor_t cursor) { ckdb::ksSetCursor(ks, cursor); } cursor_t KeySet::getCursor() const { return ckdb::ksGetCursor(ks); } Key KeySet::next() { ckdb::Key *k = ckdb::ksNext(ks); if (k==0) throw KeySetOutOfRange(); return Key(k); } Key KeySet::current() const { return Key(ckdb::ksCurrent(ks)); } Key KeySet::head() const { return Key(ckdb::ksHead(ks)); } Key KeySet::tail() const { return Key(ckdb::ksTail(ks)); } Key KeySet::pop() { ckdb::Key *k = ckdb::ksPop(ks); if (k==0) throw KeySetOutOfRange(); Key key(k); return key; } Key KeySet::lookup (const Key &key, const option_t options) const { ckdb::Key *k = ckdb::ksLookup(ks, key.getKey(), options); if (k==0) throw KeySetNotFound(); return Key(k); } Key KeySet::lookup (const std::string &name, const option_t options) const { ckdb::Key *k = ckdb::ksLookupByName(ks, name.c_str(), options); if (k==0) throw KeySetNotFound(); return Key(k); } Key KeySet::lookup (const char *name, const option_t options) const { ckdb::Key *k = ckdb::ksLookupByName(ks, name, options); if (k==0) throw KeySetNotFound(); return Key(k); } size_t KeySet::append (const Key &toAppend) { return ckdb::ksAppendKey(ks, toAppend.getKey()); } size_t KeySet::append (const KeySet &toAppend) { return ckdb::ksAppend(ks, toAppend.getKeySet()); } void KeySet::sort() { ckdb::ksSort(ks); } /* ssize_t KeySet::toStream(FILE* stream, option_t options) const { return ckdb::ksToStream (getKeySet(), stream, options); } ssize_t KeySet::output(FILE* stream, option_t options) const { return ckdb::ksOutput (getKeySet(), stream, options); } ssize_t KeySet::generate(FILE* stream, option_t options) const { return ckdb::ksGenerate(getKeySet(), stream, options); } */ std::ostream & operator << (std::ostream & os, const KeySet &k) { os << "Keyset"; return os; } std::istream & operator >> (std::istream & is, KeySet &k) { return is; } } // end of KeySet elektra-0.7.1/src/bindings/cpp/tests/0000777000076400001440000000000011365513214014464 500000000000000elektra-0.7.1/src/bindings/cpp/tests/Makefile.am0000644000076400001440000000160411365507605016444 00000000000000INCLUDES = -I$(top_srcdir)/src/include -I$(top_srcdir)/src/bindings/cpp/include AM_CXXFLAGS= $(CXXOPTFLAGS) $(CXXDBGFLAGS) TESTS=test_key test_ks test_kdb check_PROGRAMS=test_key test_ks test_kdb if VALGRINDTESTS TESTS_ENVIRONMENT = $(VALGRIND) --quiet --show-reachable=yes --leak-check=yes endif test_key_SOURCES = test_key.cpp tests.h tests.cpp test_key_LDADD = $(privatelibs) ../libelektra-cpp.a ../../../libelektra/libelektra.a test_ks_SOURCES = test_ks.cpp tests.h tests.cpp test_ks_LDADD = $(privatelibs) ../libelektra-cpp.a ../../../libelektra/libelektra.a test_kdb_SOURCES = test_kdb.cpp tests.h tests.cpp test_kdb_LDADD = $(privatelibs) ../libelektra-cpp.a ../../../libelektra/libelektra.a ../libelektra-cpp.a: cd .. && $(MAKE) libelektra-cpp.a ../../../libelektra/libelektra.a: cd ../../../libelektra && $(MAKE) libelektra.a clean-local: rm -rf .kdb rm -f *.gcno *.gcda *.gcno elektra-0.7.1/src/bindings/cpp/tests/Makefile.in0000644000076400001440000004640411365511152016454 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../../../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ check_PROGRAMS = test_key$(EXEEXT) test_ks$(EXEEXT) test_kdb$(EXEEXT) subdir = src/bindings/cpp/tests DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/extensions.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/config.h CONFIG_CLEAN_FILES = am_test_kdb_OBJECTS = test_kdb.$(OBJEXT) tests.$(OBJEXT) test_kdb_OBJECTS = $(am_test_kdb_OBJECTS) am__DEPENDENCIES_1 = test_kdb_DEPENDENCIES = $(am__DEPENDENCIES_1) ../libelektra-cpp.a \ ../../../libelektra/libelektra.a am_test_key_OBJECTS = test_key.$(OBJEXT) tests.$(OBJEXT) test_key_OBJECTS = $(am_test_key_OBJECTS) test_key_DEPENDENCIES = $(am__DEPENDENCIES_1) ../libelektra-cpp.a \ ../../../libelektra/libelektra.a am_test_ks_OBJECTS = test_ks.$(OBJEXT) tests.$(OBJEXT) test_ks_OBJECTS = $(am_test_ks_OBJECTS) test_ks_DEPENDENCIES = $(am__DEPENDENCIES_1) ../libelektra-cpp.a \ ../../../libelektra/libelektra.a DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/src/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(test_kdb_SOURCES) $(test_key_SOURCES) $(test_ks_SOURCES) DIST_SOURCES = $(test_kdb_SOURCES) $(test_key_SOURCES) \ $(test_ks_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) INSTALL = @INSTALL@ ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BACKENDS = @BACKENDS@ BACKEND_VERSION_API = @BACKEND_VERSION_API@ BINDINGS = @BINDINGS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CDBGFLAGS = @CDBGFLAGS@ CFLAGS = @CFLAGS@ COPTFLAGS = @COPTFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSTDFLAGS = @CSTDFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDBGFLAGS = @CXXDBGFLAGS@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXOPTFLAGS = @CXXOPTFLAGS@ CXXSTDFLAGS = @CXXSTDFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_FALSE = @DEBUG_FALSE@ DEBUG_TRUE = @DEBUG_TRUE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ELEKTRATOOLS_VERSION_API = @ELEKTRATOOLS_VERSION_API@ ELEKTRA_VERSION_API = @ELEKTRA_VERSION_API@ EXEEXT = @EXEEXT@ EXPERIMENTAL_FALSE = @EXPERIMENTAL_FALSE@ EXPERIMENTAL_TRUE = @EXPERIMENTAL_TRUE@ F77 = @F77@ FFLAGS = @FFLAGS@ GENHTML = @GENHTML@ GREP = @GREP@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ HAVE_LIBLTDL_FALSE = @HAVE_LIBLTDL_FALSE@ HAVE_LIBLTDL_TRUE = @HAVE_LIBLTDL_TRUE@ HAVE_MAN2HTML_FALSE = @HAVE_MAN2HTML_FALSE@ HAVE_MAN2HTML_TRUE = @HAVE_MAN2HTML_TRUE@ HAVE_XML_FALSE = @HAVE_XML_FALSE@ HAVE_XML_TRUE = @HAVE_XML_TRUE@ HAVE_XSL_FALSE = @HAVE_XSL_FALSE@ HAVE_XSL_TRUE = @HAVE_XSL_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDB_VERSION = @KDB_VERSION@ KDB_VERSION_MAJOR = @KDB_VERSION_MAJOR@ KDB_VERSION_MAJORMINOR = @KDB_VERSION_MAJORMINOR@ KDB_VERSION_MICRO = @KDB_VERSION_MICRO@ KDB_VERSION_MINOR = @KDB_VERSION_MINOR@ LCOV = @LCOV@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VALGRIND = @VALGRIND@ VALGRINDTESTS_FALSE = @VALGRINDTESTS_FALSE@ VALGRINDTESTS_TRUE = @VALGRINDTESTS_TRUE@ VERSION = @VERSION@ XML2_CONFIG = @XML2_CONFIG@ XML_CPPFLAGS = @XML_CPPFLAGS@ XML_LIBS = @XML_LIBS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ backend_static_libs = @backend_static_libs@ backenddir = @backenddir@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ datarootdir = @datarootdir@ dbroot = @dbroot@ default_backend = @default_backend@ default_dbackend = @default_dbackend@ default_docbook = @default_docbook@ develdocdir = @develdocdir@ docdir = @docdir@ doxygen = @doxygen@ dvidir = @dvidir@ elektratools = @elektratools@ exec_prefix = @exec_prefix@ gconf_CFLAGS = @gconf_CFLAGS@ gconf_LIBS = @gconf_LIBS@ hlvlbackenddir = @hlvlbackenddir@ 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@ man2html = @man2html@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ privatelibs = @privatelibs@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ ulibdir = @ulibdir@ xsltproc = @xsltproc@ INCLUDES = -I$(top_srcdir)/src/include -I$(top_srcdir)/src/bindings/cpp/include AM_CXXFLAGS = $(CXXOPTFLAGS) $(CXXDBGFLAGS) TESTS = test_key test_ks test_kdb @VALGRINDTESTS_TRUE@TESTS_ENVIRONMENT = $(VALGRIND) --quiet --show-reachable=yes --leak-check=yes test_key_SOURCES = test_key.cpp tests.h tests.cpp test_key_LDADD = $(privatelibs) ../libelektra-cpp.a ../../../libelektra/libelektra.a test_ks_SOURCES = test_ks.cpp tests.h tests.cpp test_ks_LDADD = $(privatelibs) ../libelektra-cpp.a ../../../libelektra/libelektra.a test_kdb_SOURCES = test_kdb.cpp tests.h tests.cpp test_kdb_LDADD = $(privatelibs) ../libelektra-cpp.a ../../../libelektra/libelektra.a 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 \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/bindings/cpp/tests/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/bindings/cpp/tests/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; for p in $$list; do \ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done test_kdb$(EXEEXT): $(test_kdb_OBJECTS) $(test_kdb_DEPENDENCIES) @rm -f test_kdb$(EXEEXT) $(CXXLINK) $(test_kdb_LDFLAGS) $(test_kdb_OBJECTS) $(test_kdb_LDADD) $(LIBS) test_key$(EXEEXT): $(test_key_OBJECTS) $(test_key_DEPENDENCIES) @rm -f test_key$(EXEEXT) $(CXXLINK) $(test_key_LDFLAGS) $(test_key_OBJECTS) $(test_key_LDADD) $(LIBS) test_ks$(EXEEXT): $(test_ks_OBJECTS) $(test_ks_DEPENDENCIES) @rm -f test_ks$(EXEEXT) $(CXXLINK) $(test_ks_LDFLAGS) $(test_ks_OBJECTS) $(test_ks_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_kdb.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_key.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_ks.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests.Po@am__quote@ .cpp.o: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ if $(CXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ if $(LTCXXCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCXX_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list='$(TESTS)'; \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *" $$tst "*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ echo "XPASS: $$tst"; \ ;; \ *) \ echo "PASS: $$tst"; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *" $$tst "*) \ xfail=`expr $$xfail + 1`; \ echo "XFAIL: $$tst"; \ ;; \ *) \ failed=`expr $$failed + 1`; \ echo "FAIL: $$tst"; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ echo "SKIP: $$tst"; \ fi; \ done; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="All $$all tests passed"; \ else \ banner="All $$all tests behaved as expected ($$xfail expected failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all tests failed"; \ else \ banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ skipped="($$skip tests were not run)"; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ echo "$$dashes"; \ echo "$$banner"; \ test -z "$$skipped" || echo "$$skipped"; \ test -z "$$report" || echo "$$report"; \ echo "$$dashes"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_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-checkPROGRAMS clean-generic clean-libtool clean-local \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: 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-info-am .PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ clean-checkPROGRAMS clean-generic clean-libtool clean-local \ ctags distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-info-am ../libelektra-cpp.a: cd .. && $(MAKE) libelektra-cpp.a ../../../libelektra/libelektra.a: cd ../../../libelektra && $(MAKE) libelektra.a clean-local: rm -rf .kdb rm -f *.gcno *.gcda *.gcno # 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: elektra-0.7.1/src/bindings/cpp/tests/test_kdb.cpp0000644000076400001440000000217611365506635016722 00000000000000#include void test_kdbGetSet() { bool ok; cout << "testing kdbSet() and kdbGet()" << endl; KeySet ks_set (5, *Key ("user/tests/key3", KEY_DIR, KEY_END), *Key ("user/tests/key3/1", KEY_END), *Key ("user/tests/key3/2", KEY_END), *Key ("user/tests/key3/3", KEY_VALUE, "value", KEY_END), KS_END); KDB kdb; kdb.set (ks_set, Key("user/tests/key3", KEY_END)); Key nonexist ("user/this/key/shuld/really/not/exist",KEY_END); ok = false; try { kdb.get (nonexist); } catch (KDBException) { ok = true; } succeed_if (ok, "get did not throw KDBException"); KeySet ks_get; kdb.get (ks_get, Key("user/tests/key3", KEY_END)); // ks_get.toStream(); // ks_set.generate(); // now remove keys kdb.set (ks_set, Key("user/tests", KEY_END), KDB_O_REMOVEONLY); } #include int main() { cout << "KDB CLASS TESTS" << endl; cout << "==================" << endl << endl; #ifdef HAVE_CLEARENV clearenv(); #endif #ifdef HAVE_SETENV setenv ("KDB_HOME",".",1); #endif test_kdbGetSet(); cout << endl; cout << "test_key RESULTS: " << nbTest << " test(s) done. " << nbError << " error(s)." << endl; return nbError; } elektra-0.7.1/src/bindings/cpp/tests/test_key.cpp0000644000076400001440000002703211365506635016750 00000000000000#include void test_keynew() { cout << "testing keynew" << endl; char array[] = "here is some data stored"; char * getBack; Key key0; succeed_if(!key0.needSync(), "key1 need sync"); succeed_if(!key0.needRemove(), "key1 need remove"); succeed_if( key0.getName() == "", "key0 has wrong name"); // Empty key Key key1 ("", KEY_END); succeed_if(!key1.needSync(), "key1 need sync"); succeed_if(!key1.needRemove(), "key1 need remove"); succeed_if( key1.getName() == "", "key0 has wrong name"); // Key with name Key key2 ("system/sw/test", KEY_END); succeed_if( key2.needSync(), "key2 does not need sync"); succeed_if(!key2.needRemove(), "key2 need remove"); succeed_if (key2.getBaseName() == "test", "wrong base name"); succeed_if( key2.getName() == "system/sw/test", "key2 has wrong name"); key2.copy(key0); succeed_if( key2.getName() == "", "key0 has wrong name"); succeed_if (key2.getBaseName() == "", "wrong base name"); // Key with name Key key3 ("system/sw/test", KEY_REMOVE, KEY_END); succeed_if(key3.needRemove(), "KEY_REMOVE not set"); succeed_if(key3.getName() == "system/sw/test", "key3 has wrong name"); succeed_if(key3.getBaseName() == "test", "wrong base name"); key3 = "system/other/name"; succeed_if(key3.getName() == "system/other/name", "key3 has wrong name"); succeed_if(key3.getBaseName() == "name", "wrong base name"); key3 += "base"; succeed_if(key3.getName() == "system/other/name/base", "key3 has wrong name"); succeed_if(key3.getBaseName() == "base", "wrong base name"); key3 -= "name"; succeed_if(key3.getName() == "system/other/name/name", "key3 has wrong name"); succeed_if(key3.getBaseName() == "name", "wrong base name"); // Key with name + value (default type must be KEY_TYPE_STRING) Key key4 ("system/sw/test", KEY_VALUE, "test", KEY_END); succeed_if(key4.getName() == "system/sw/test", "key4 has wrong name"); succeed_if(key4.get() == "test", "key4 has wrong name"); // key4.generate(stdout, 0); cout << endl; // Key with name + UID/GID Key key5 ("system/sw/test", KEY_UID, 123, KEY_GID, 456, KEY_END); succeed_if(key5.getUID() == 123, "key5 UID no set correctly"); succeed_if(key5.getGID() == 456, "key5 GID not set correctly"); succeed_if(key5.getName() == "system/sw/test", "key5 has wrong name"); // key5.output(stdout, 0); // Key with name + MODE Key key6 ("system/sw/test", KEY_MODE, 0642, KEY_END); succeed_if(key6.getMode() == 0642, "key6 mode no set correctly"); succeed_if(key6.getName() == "system/sw/test", "key6 has wrong name"); // Key with name + owner Key key7 ("system/sw/test", KEY_OWNER, "yl", KEY_END); succeed_if( key7.getOwner() == "yl", "key7 owner not set correctly"); succeed_if (!key7.isInactive(), "key should not be inactive"); Key key8 ("system/valid/there", KEY_TYPE, KEY_TYPE_BINARY, KEY_SIZE, sizeof(array), KEY_VALUE, array, KEY_END); succeed_if(key8.getName() == "system/valid/there", "key8 has wrong name"); succeed_if(key8.isBinary (), "Could not set type to binary"); succeed_if(key8.getValueSize() == sizeof(array), "Value size not correct"); getBack = new char [key8.getValueSize()]; key8.getBinary(getBack, key8.getValueSize()); succeed_if(memcmp(getBack, array, sizeof(array)) == 0, "could not get correct value with keyGetBinary"); delete [] getBack; succeed_if (key8.getBaseName() == "there", "wrong base name"); Key key9("system/valid/.inactive", KEY_COMMENT, "inactive key", KEY_END); succeed_if (key9.isInactive(), "key should be inactive"); succeed_if (key9.getComment() == "inactive key", "comment failed"); succeed_if (key9.getBaseName() == ".inactive", "wrong base name"); } void test_constructor() { cout << "testing constructor" << endl; ckdb::Key *ck = ckdb::keyNew(0); Key k = ck; // constructor with (ckdb::Key) cout << "ck: " << (void*)ck << endl; cout << "k: " << (void*)&k << endl; cout << "k.ck: " << (void*)k.getKey() << endl; k.set(30); succeed_if (k.get () == 30, "could not get same int"); } void test_setkey() { cout << "testing setkey" << endl; ckdb::Key *ck; Key k; ck = ckdb::keyNew(0); k = ck; // operator= alias for setKey() cout << "ck: " << (void*)ck << endl; cout << "k: " << (void*)&k << endl; cout << "k.ck: " << (void*)k.getKey() << endl; k.set(30); succeed_if (k.get () == 30, "could not get same int"); } void test_cast() { cout << "testing cast" << endl; ckdb::Key *ck; Key *k; ck = ckdb::keyNew(0); k = (Key*) &ck; // no copy, just a cast cout << "&ck: " << (void*)&ck << endl; cout << "k: " << (void*)&k << endl; cout << "ck: " << (void*)ck << endl; cout << "k.ck: " << (void*)k->getKey() << endl; k->set(30); succeed_if (k->get () == 30, "could not get same int"); ckdb::keyDel (ck); } void test_value () { cout << "testing value" << endl; Key test; test.setString ("23.3"); succeed_if (test.get () == 23.3, "could not get same double"); succeed_if (test.getValueSize () == 5, "value size not correct"); test.setString ("401"); succeed_if (test.get () == 401, "could not get same int"); succeed_if (test.getValueSize () == 4, "value size not correct"); test.setString ("mystr"); succeed_if (test.get () == "mystr", "could not get same string"); succeed_if (test.getValueSize () == 6, "value size not correct"); test.setString ("myoth"); succeed_if (test.get () == "myoth", "could not get same string"); succeed_if (test.getValueSize () == 6, "value size not correct"); test.set (23.3); succeed_if (test.getString() == "23.3", "could not get same double"); succeed_if (test.getValueSize () == 5, "value size not correct"); test.set (401); succeed_if (test.getString() == "401", "could not get same int"); succeed_if (test.getValueSize () == 4, "value size not correct"); test.set ("mystr"); succeed_if (test.getString() == "mystr", "could not get same string"); succeed_if (test.getValueSize () == 6, "value size not correct"); test.set ("myoth"); succeed_if (test.getString () == "myoth", "could not get same string"); succeed_if (test.getValueSize () == 6, "value size not correct"); test.setComment ("mycomment"); succeed_if (test.getComment () == "mycomment", "could not get same comment"); succeed_if (test.getCommentSize () == 10, "comment size not correct"); } void test_exceptions () { cout << "testing exceptions" << endl; Key test; try { test.setName("no"); } catch (kdb::KeyInvalidName) { succeed_if (test.getName() == "", "not set to noname"); } test.setName ("user/name"); succeed_if (test.getName() == "user/name", "could not get same name"); try { test.setName("no"); } catch (kdb::KeyInvalidName) { succeed_if (test.getName() == "", "not set to noname"); } } void test_name() { cout << "testing name" << endl; Key test; test.setName("user:markus/test"); succeed_if (std::string(test.name()) == "user/test", "Wrong name"); succeed_if (test.getName() == "user/test", "Wrong name"); succeed_if (test.getFullName() == "user:markus/test", "Wrong full name"); succeed_if (std::string(test.owner()) == "markus", "Wrong owner"); succeed_if (test.getOwner() == "markus", "Wrong owner"); succeed_if (test.getNameSize() == 10, "wrong name size"); succeed_if (test.getFullNameSize() == 17, "wrong full name size"); succeed_if (!test.isSystem(), "key is system"); succeed_if ( test.isUser(), "key is not user"); test.setOwner("gerald"); succeed_if (std::string(test.name()) == "user/test", "Wrong name"); succeed_if (test.getName() == "user/test", "Wrong name"); succeed_if (test.getFullName() == "user:gerald/test", "Wrong full name"); succeed_if (test.getNameSize() == 10, "wrong name size"); succeed_if (test.getFullNameSize() == 17, "wrong full name size"); succeed_if (!test.isSystem(), "key is system"); succeed_if ( test.isUser(), "key is not user"); test.setName("system/test"); test.setOwner("markus"); // has no semantics... succeed_if (std::string(test.name()) == "system/test", "Wrong name"); succeed_if (test.getName() == "system/test", "Wrong name"); succeed_if (test.getFullName() == "system/test", "Wrong full name"); succeed_if (std::string(test.owner()) == "markus", "Wrong owner"); succeed_if (test.getOwner() == "markus", "Wrong owner"); succeed_if (test.getNameSize() == 12, "wrong name size"); succeed_if (test.getFullNameSize() == 12, "wrong full name size"); succeed_if ( test.isSystem(), "key is system"); succeed_if (!test.isUser(), "key is not user"); test.setName("user/dir/test"); test.setBaseName ("mykey"); succeed_if (test.getName() == "user/dir/mykey", "Basename did not work"); test.setName (test.getName() + "/onedeeper"); // add basename is trivial succeed_if (test.getName() == "user/dir/mykey/onedeeper", "Basename did not work"); succeed_if (test.getName().find('/') == 4, "user length"); // keyGetRootNameSize trivial succeed_if (test.isBelow (Key("user/dir/mykey/onedeeper/below", KEY_END)), "key is below"); succeed_if (!test.isBelow (Key("user/dir/mykey/twodeeper/below", KEY_END)), "key is below"); succeed_if (test.isDirectBelow (Key("user/dir/mykey/onedeeper/below", KEY_END)), "key is direct below"); succeed_if (!test.isDirectBelow (Key("user/dir/mykey/onedeeper/twodeeper/below", KEY_END)), "key is direct below"); succeed_if (!test.isDirectBelow (Key("user/dir/mykey/twodeeper/below", KEY_END)), "key is direct below"); } void test_meta() { cout << "testing metainfo" << endl; Key test; test.setUID(50); succeed_if (test.getUID() == 50, "could not set UID"); test.setGID(50); succeed_if (test.getGID() == 50, "could not set GID"); succeed_if (test.getMode() == 0664, "not correct default mode"); test.setDir (); succeed_if (test.isDir(), "is not dir"); succeed_if (test.getMode() == 0775, "not correct default mode for dir"); test.setMTime (200); succeed_if (test.getMTime() == 200, "could not set MTime"); test.setATime (200); succeed_if (test.getATime() == 200, "could not set ATime"); test.setCTime (200); succeed_if (test.getCTime() == 200, "could not set CTime"); } void f(Key k) { Key h ("user/infunction", KEY_END); } void test_ref() { cout << "testing ref" << endl; Key zgr1 ("user/zgr1", KEY_END); { Key zgr2 ("user/zgr2", KEY_END); Key zgr3 ("user/zgr3", KEY_END); Key zgr4 ("user/zgr4", KEY_END); Key zgr5 ("user/zgr5", KEY_END); zgr2=zgr1; zgr3=zgr1; zgr4=zgr1; } f(zgr1); f(Key ("user/passed", KEY_END)); Key test; test.setName("user:markus/test"); Key ref1; ref1 = test; // operator = succeed_if (test.getName() == "user/test", "wrong name"); succeed_if (ref1.getName() == "user/test", "ref key wrong name"); Key ref2 = test; // copy constructor succeed_if (test.getName() == "user/test", "wrong name"); succeed_if (ref2.getName() == "user/test", "ref key wrong name"); const Key consttest ("user/test", KEY_END); Key ref3 = consttest; // const copy constructor succeed_if (consttest.getName() == "user/test", "wrong name"); succeed_if (ref3.getName() == "user/test", "ref key wrong name"); } void test_dup() { cout << "testing dup" << endl; Key test; test.setName("user:markus/test"); Key dup0 = test.dup(); // directly call of dup() succeed_if (test.getName() == "user/test", "wrong name"); succeed_if (dup0.getName() == "user/test", "dup key wrong name"); } int main() { cout << "KEY CLASS TESTS" << endl; cout << "===============" << endl << endl; /* test_constructor(); test_setkey(); test_cast(); */ test_keynew(); test_name(); test_value(); test_exceptions(); test_meta(); test_dup(); test_ref(); cout << endl; cout << "test_key RESULTS: " << nbTest << " test(s) done. " << nbError << " error(s)." << endl; return nbError; } elektra-0.7.1/src/bindings/cpp/tests/test_ks.cpp0000644000076400001440000001440011365506635016570 00000000000000#include void test_ksnew() { cout << "testing keyset new" << endl; KeySet ks1; KeySet ks2 (5, ckdb::keyNew ("user/key2", KEY_END), KS_END); KeySet ks3 (5, *Key ("user/key3/1", KEY_END), *Key ("user/key3/2", KEY_REMOVE, KEY_END), *Key ("user/key3/3", KEY_VALUE, "value", KEY_END), KS_END); // ks3.toStream(stdout, 0); Key k1("user/key4/1", KEY_END); Key k2("user/key4/2", KEY_REMOVE, KEY_END); Key k3("user/key4/3", KEY_VALUE, "value", KEY_END); KeySet ks4 (5, *k1, // k1 will lose its key and pass it to keyset *k2, *k3, KS_END); // ks4.toStream(stdout, 0); Key k4("user/key5/1", KEY_END); Key k5("user/key5/2", KEY_REMOVE, KEY_END); Key k6("user/key5/3", KEY_VALUE, "value", KEY_END); KeySet ks5 (5, k4.dup(), k5.dup(), k6.dup(), KS_END); // ks5.toStream(stdout, 0); // k4, k5, k6 can still be used } void test_ksdup() { cout << "testing ksdup" << endl; KeySet ks3 (5, *Key ("user/key3/1", KEY_END), *Key ("user/key3/2", KEY_REMOVE, KEY_END), *Key ("user/key3/3", KEY_VALUE, "value", KEY_END), KS_END); KeySet ks4 (ks3.dup()); succeed_if (ks3.size() == 3, "size not correct"); succeed_if (ks4.size() == 3, "size not correct"); // ks3.toStream(stdout, 0); // ks4.toStream(stdout, 0); } void test_kscopy() { cout << "testing ksdup" << endl; KeySet ks3 (5, *Key ("user/key3/1", KEY_END), *Key ("user/key3/2", KEY_REMOVE, KEY_END), *Key ("user/key3/3", KEY_VALUE, "value", KEY_END), KS_END); KeySet ks4 (ks3); succeed_if (ks3.size() == 3, "size not correct"); succeed_if (ks4.size() == 3, "size not correct"); KeySet ks5; ks5.copy(ks4); succeed_if (ks4.size() == 3, "size not correct"); succeed_if (ks5.size() == 3, "size not correct"); ks5.clear(); succeed_if (ks5.size() == 0, "size not correct"); // ks3.toStream(stdout, 0); // ks4.toStream(stdout, 0); } void test_iterate() { cout << "testing iterate" << endl; KeySet ks3 (5, *Key ("user/key3/1", KEY_END), *Key ("user/key3/2", KEY_REMOVE, KEY_END), *Key ("user/key3/3", KEY_VALUE, "value", KEY_END), KS_END); ks3.rewind(); Key k1 = ks3.next(); succeed_if (k1.getName() == "user/key3/1", "wrong keyname"); succeed_if (k1 == ks3.head(), "first key not head key"); Key k2 = ks3.next(); succeed_if (k2.getName() == "user/key3/2", "wrong keyname"); succeed_if (k2.needRemove(), "remove not set"); Key k3 = ks3.next(); succeed_if (k3.getName() == "user/key3/3", "wrong keyname"); succeed_if (k3.getString() == "value", "wrong value"); succeed_if (k3 == ks3.tail(), "last key not tail key"); try { ks3.next(); succeed_if (false, "Out of Range not thrown"); } catch (KeySetOutOfRange) { } ks3.rewind(); for (size_t i=0; i0; i--) { Key k = ks4.pop(); char str[] = "user/key3/X"; str [10] = i+'1'; succeed_if (k.getName() == str, str); } } void test_lookup() { cout << "testing lookup" << endl; KeySet ks3 (5, *Key ("user/key3/1", KEY_END), *Key ("user/key3/2", KEY_REMOVE, KEY_END), *Key ("user/key3/3", KEY_VALUE, "value", KEY_END), KS_END); Key k1 = ks3.lookup("user/key3/1"); succeed_if (k1.getName() == "user/key3/1", "wrong keyname"); Key k3 = ks3.lookup("user/key3/3"); succeed_if (k3.getName() == "user/key3/3", "wrong keyname"); succeed_if (k3.getString() == "value", "wrong value"); try { ks3.lookup("user/key3/2"); succeed_if (false, "Not Found not thrown for removed key"); } catch (KeySetNotFound) { } try { ks3.lookup("user/key3/4"); succeed_if (false, "Not Found not thrown for not existing key"); } catch (KeySetNotFound) { } } void test_append() { cout << "testing keyset append" << endl; KeySet ks1; KeySet ks2 (5, ckdb::keyNew ("user/key2", KEY_END), KS_END); ks1.append (ks2); KeySet ks3 (5, *Key ("user/key3/1", KEY_END), *Key ("user/key3/2", KEY_REMOVE, KEY_END), *Key ("user/key3/3", KEY_VALUE, "value", KEY_END), KS_END); ks2.append (ks3); ks1.append (ks3); ks3.append (ks2); Key k1("user/key4/1", KEY_END); Key k2("user/key4/2", KEY_REMOVE, KEY_END); Key k3("user/key4/3", KEY_VALUE, "value", KEY_END); ks1.append (k1); ks1.append (k2); ks1.append (k3); ks2.append (k1); ks2.append (k2); ks2.append (k3); ks3.append (k1); ks3.append (k2); ks3.append (k3); KeySet ks4 (5, *Key ("user/key3/1", KEY_END), *Key ("user/key3/2", KEY_REMOVE, KEY_END), *Key ("user/key3/3", KEY_VALUE, "value", KEY_END), KS_END); // ks1.toStream(); // ks2.toStream(); // ks3.toStream(); } int main() { cout << "KEYSET CLASS TESTS" << endl; cout << "==================" << endl << endl; test_ksnew(); test_ksdup(); test_kscopy(); test_iterate(); test_cursor(); test_pop(); test_lookup(); test_append(); cout << endl; cout << "test_key RESULTS: " << nbTest << " test(s) done. " << nbError << " error(s)." << endl; return nbError; } elektra-0.7.1/src/bindings/cpp/tests/tests.cpp0000644000076400001440000000005511361542117016246 00000000000000#include int nbError; int nbTest; elektra-0.7.1/src/bindings/cpp/tests/tests.h0000644000076400001440000000207711361542117015721 00000000000000/**Some common functions in use for testing framework*/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ #include #include #include #include #include using namespace std; using namespace kdb; extern int nbError; extern int nbTest; #define warn_if_fail(x,y) {nbTest++; if (!(x)) { printf("%s:%d: warn in %s: %s\n", __FILE__, __LINE__, __FUNCTION__, y); }} #define succeed_if(x,y) nbTest++; if (!(x)) { nbError++; printf("%s:%d: error in %s: %s\n", __FILE__, __LINE__, __FUNCTION__, y);} #define exit_if_fail(x,y) nbTest++; if (!(x)) { printf("%s:%d: fatal in %s: %s\n", __FILE__, __LINE__, __FUNCTION__, y); exit(1); } elektra-0.7.1/src/bindings/python/0000777000076400001440000000000011365513214014061 500000000000000elektra-0.7.1/src/bindings/python/ChangeLog0000644000076400001440000000564611361542117015562 00000000000000Mon Mar 26 19:30:32 CEST 2007 patrick@sabin.at * Added a test file Mon Mar 26 17:48:46 CEST 2007 patrick@sabin.at * fixed Typos Mon Mar 26 17:02:01 CEST 2007 patrick@sabin.at * Added kdbRemove and examples Mon Mar 26 16:21:09 CEST 2007 patrick@sabin.at * moved examples to new directories Mon Mar 26 16:09:57 CEST 2007 patrick@sabin.at * Fixed bugs to make getset/el_getset work. ksNew has now name as parameter Mon Mar 26 13:40:53 CEST 2007 patrick@sabin.at * Adapted libelektra to new version of elektra Mon Mar 26 08:51:10 CEST 2007 patrick@sabin.at * Added get/set example program Tue Mar 13 12:10:13 CET 2007 patrick@sabin.at * fixed bug in el_hello.py Tue Mar 13 11:27:52 CET 2007 patrick@sabin.at * Added example hello World for elektra Tue Mar 13 11:26:48 CET 2007 patrick@sabin.at * Added all essential methods to elektra Mon Mar 12 18:38:49 CET 2007 patrick@sabin.at * Added help messages for all key methods Mon Mar 12 17:51:59 CET 2007 patrick@sabin.at * Added all help messages for all kdb and ks functions in libelektra Mon Mar 12 16:26:52 CET 2007 patrick@sabin.at * Added some help messages for kdb core methods in libelektra.c Mon Mar 12 16:03:07 CET 2007 patrick@sabin.at * Added core methods to class Key and class KeySet in elektra.py Mon Mar 12 15:04:23 CET 2007 patrick@sabin.at * added help some messages Mon Dec 18 22:06:47 CET 2006 patrick@sabin.at * Implemented elektra library on the top of libelektra; Only class Kdb Mon Dec 18 14:48:10 CET 2006 patrick@sabin.at * Implemented bindings for all keySet methods Sun Dec 17 21:38:09 CET 2006 patrick@sabin.at * Implemented bindings for all key methods Sat Dec 16 19:21:35 CET 2006 patrick@sabin.at * Implemented bindings for Error handling methods Sat Dec 16 19:12:39 CET 2006 patrick@sabin.at * Implemented bindings for all-kdb functions Fri Dec 15 21:54:44 CET 2006 patrick@sabin.at * cleaned up code using splint Fri Dec 15 21:04:51 CET 2006 patrick@sabin.at * Compiles now with the update Version of the API Fri Dec 15 20:04:24 CET 2006 patrick@sabin.at * Implemented bindings for functions for implementing the application.c example in python; There is a segfault, which I believe correspondens to the elektra library Fri Dec 15 13:11:38 CET 2006 patrick@sabin.at * Implemented bindings for functions for implementing the application.c example in python Thu Dec 14 21:26:08 CET 2006 patrick@sabin.at * Implemented bindings for functions for implementing the cascading.c example in python Thu Dec 14 20:53:53 CET 2006 patrick@sabin.at * Implemented bindings for functions for implementing the binary.c example in python Thu Dec 14 19:24:37 CET 2006 patrick@sabin.at * Implemented bindings for functions for implementing the hello.c example in python Thu Dec 14 15:47:30 CET 2006 patrick@sabin.at * Added a example extension module Mon Dec 11 21:16:33 CET 2006 patrick@sabin.at * First try elektra-0.7.1/src/bindings/python/Makefile.am0000644000076400001440000000046011365507605016040 00000000000000PYVER = 2.4 lib_LTLIBRARIES = libelektra.la libelektra_la_SOURCES = libpyelektra.c libelektra_la_LIBADD = ../../libelektra/libelektra.la -lpython$(PYVER) libelektra_la_CFLAGS = -I../../include -I/usr/include/python$(PYVER) EXTRA_DIST = examples application.py binary.py cascading.py elektra.py test.py elektra-0.7.1/src/bindings/python/Makefile.in0000644000076400001440000004267511365511152016057 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = src/bindings/python DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/extensions.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/config.h CONFIG_CLEAN_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(libdir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) libelektra_la_DEPENDENCIES = ../../libelektra/libelektra.la am_libelektra_la_OBJECTS = libelektra_la-libpyelektra.lo libelektra_la_OBJECTS = $(am_libelektra_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/src/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libelektra_la_SOURCES) DIST_SOURCES = $(libelektra_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) INSTALL = @INSTALL@ ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BACKENDS = @BACKENDS@ BACKEND_VERSION_API = @BACKEND_VERSION_API@ BINDINGS = @BINDINGS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CDBGFLAGS = @CDBGFLAGS@ CFLAGS = @CFLAGS@ COPTFLAGS = @COPTFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSTDFLAGS = @CSTDFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDBGFLAGS = @CXXDBGFLAGS@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXOPTFLAGS = @CXXOPTFLAGS@ CXXSTDFLAGS = @CXXSTDFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_FALSE = @DEBUG_FALSE@ DEBUG_TRUE = @DEBUG_TRUE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ELEKTRATOOLS_VERSION_API = @ELEKTRATOOLS_VERSION_API@ ELEKTRA_VERSION_API = @ELEKTRA_VERSION_API@ EXEEXT = @EXEEXT@ EXPERIMENTAL_FALSE = @EXPERIMENTAL_FALSE@ EXPERIMENTAL_TRUE = @EXPERIMENTAL_TRUE@ F77 = @F77@ FFLAGS = @FFLAGS@ GENHTML = @GENHTML@ GREP = @GREP@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ HAVE_LIBLTDL_FALSE = @HAVE_LIBLTDL_FALSE@ HAVE_LIBLTDL_TRUE = @HAVE_LIBLTDL_TRUE@ HAVE_MAN2HTML_FALSE = @HAVE_MAN2HTML_FALSE@ HAVE_MAN2HTML_TRUE = @HAVE_MAN2HTML_TRUE@ HAVE_XML_FALSE = @HAVE_XML_FALSE@ HAVE_XML_TRUE = @HAVE_XML_TRUE@ HAVE_XSL_FALSE = @HAVE_XSL_FALSE@ HAVE_XSL_TRUE = @HAVE_XSL_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDB_VERSION = @KDB_VERSION@ KDB_VERSION_MAJOR = @KDB_VERSION_MAJOR@ KDB_VERSION_MAJORMINOR = @KDB_VERSION_MAJORMINOR@ KDB_VERSION_MICRO = @KDB_VERSION_MICRO@ KDB_VERSION_MINOR = @KDB_VERSION_MINOR@ LCOV = @LCOV@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VALGRIND = @VALGRIND@ VALGRINDTESTS_FALSE = @VALGRINDTESTS_FALSE@ VALGRINDTESTS_TRUE = @VALGRINDTESTS_TRUE@ VERSION = @VERSION@ XML2_CONFIG = @XML2_CONFIG@ XML_CPPFLAGS = @XML_CPPFLAGS@ XML_LIBS = @XML_LIBS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ backend_static_libs = @backend_static_libs@ backenddir = @backenddir@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ datarootdir = @datarootdir@ dbroot = @dbroot@ default_backend = @default_backend@ default_dbackend = @default_dbackend@ default_docbook = @default_docbook@ develdocdir = @develdocdir@ docdir = @docdir@ doxygen = @doxygen@ dvidir = @dvidir@ elektratools = @elektratools@ exec_prefix = @exec_prefix@ gconf_CFLAGS = @gconf_CFLAGS@ gconf_LIBS = @gconf_LIBS@ hlvlbackenddir = @hlvlbackenddir@ 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@ man2html = @man2html@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ privatelibs = @privatelibs@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ ulibdir = @ulibdir@ xsltproc = @xsltproc@ PYVER = 2.4 lib_LTLIBRARIES = libelektra.la libelektra_la_SOURCES = libpyelektra.c libelektra_la_LIBADD = ../../libelektra/libelektra.la -lpython$(PYVER) libelektra_la_CFLAGS = -I../../include -I/usr/include/python$(PYVER) EXTRA_DIST = examples application.py binary.py cascading.py elektra.py test.py all: all-am .SUFFIXES: .SUFFIXES: .c .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 \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/bindings/python/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/bindings/python/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libelektra.la: $(libelektra_la_OBJECTS) $(libelektra_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libelektra_la_LDFLAGS) $(libelektra_la_OBJECTS) $(libelektra_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_la-libpyelektra.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< libelektra_la-libpyelektra.lo: libpyelektra.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_la_CFLAGS) $(CFLAGS) -MT libelektra_la-libpyelektra.lo -MD -MP -MF "$(DEPDIR)/libelektra_la-libpyelektra.Tpo" -c -o libelektra_la-libpyelektra.lo `test -f 'libpyelektra.c' || echo '$(srcdir)/'`libpyelektra.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_la-libpyelektra.Tpo" "$(DEPDIR)/libelektra_la-libpyelektra.Plo"; else rm -f "$(DEPDIR)/libelektra_la-libpyelektra.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='libpyelektra.c' object='libelektra_la-libpyelektra.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_la_CFLAGS) $(CFLAGS) -c -o libelektra_la-libpyelektra.lo `test -f 'libpyelektra.c' || echo '$(srcdir)/'`libpyelektra.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_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-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-libLTLIBRARIES install-info: install-info-am install-man: 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-info-am uninstall-libLTLIBRARIES .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-exec \ install-exec-am install-info install-info-am \ install-libLTLIBRARIES install-man install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-info-am \ uninstall-libLTLIBRARIES # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: elektra-0.7.1/src/bindings/python/application.py0000644000076400001440000000153111361542117016652 00000000000000#!/usr/bin/python from libelektra import * import sys MY_APP_ROOT="system/sw/MyApp/current" def readConfig(handle,myConfig): return kdbGetChildKeys(handle,MY_APP_ROOT,myConfig,0) def changeConfig(myConfig): ksRewind(myConfig) current=1 while True: current=ksNext(myConfig) if current==0: break keyName=keyGetFullName(current) value=keyGetString(current) value=value+"- modified" print 'Key %s was %s'%(keyName,value) keySetString(current, value) value=keyGetString(current) def saveConfig(handle,myConfig): return kdbSetKeys(handle,myConfig) myConfig=ksNew() (handle,r)=kdbOpen() if readConfig(handle,myConfig)==-1: sys.stderr.write("Couldn't get my configuration. Reason\n") sys.exit(1) else: print "retrieved %d keys"%ksGetSize(myConfig) changeConfig(myConfig) saveConfig(handle,myConfig) kdbClose(handle) ksDel(myConfig) elektra-0.7.1/src/bindings/python/binary.py0000644000076400001440000000024211361542117015631 00000000000000#!/usr/bin/python from libelektra import * key=keyNew() keySetName(key,"user/tmp/bin") (h,r)=kdbOpen() keySetBinary(key,"\000ABC") kdbSetKey(h,key) kdbClose(h) elektra-0.7.1/src/bindings/python/cascading.py0000644000076400001440000000113611361542117016264 00000000000000#!/usr/bin/python # try: # > kdb set user/myapp "hello world!" # > kdb set system/myapp "hi world!" # > python cascading.py from libelektra import * import sys def BailOut(msg): print 'msg' print kdbStrError(kdbhGetError(0)) sys.exit(1) ks=ksNew() (h,r)=kdbOpen() if r==-1: BailOut('Could not open key database') if kdbGetChildKeys(h,"user/myapp",ks,0)==-1: BailOut('Could not get keys') if kdbGetChildKeys(h,"system/myapp",ks,0)==-1: BailOut('Could not get keys') k=ksLookupByName(ks,"/myapp/key",0); if k==0: BailOut('Could not lookup keys') print keyStealValue(k) ksDel(ks) kdbClose(h) elektra-0.7.1/src/bindings/python/elektra.py0000644000076400001440000003312511361542117016002 00000000000000#!/usr/bin/python import libpyelektra class ElektraException(Exception): def __init__(self,msg): self.msg=msg def __str__(self): return self.msg class Kdb: """General methods to acces the key database """ def __init__(self): self.__kdb__pointer__=libpyelektra.kdbOpen() def __del__(self): libpyelektra.kdbClose(self.__kdb__pointer__) #def close(self): # """Closes the backend.""" # libpyelektra.kdbClose(self.__kdb__pointer__) def getKey(self,key): """Gets key from backend storage.""" return libpyelektra.kdbGetKey(self.__kdb__pointer__,key.__key__pointer__) def getKeyChildKeys(self, key, *args, **kargs): options=0 if 'norecursive' in kargs and kargs['norecursive']: options+=1 if 'excldir' in kargs and kargs['excldir']: options+=2 if 'dironly' in kargs and kargs['dironly']: options+=4 if 'noempty' in kargs and kargs['noempty']: options+=8 if 'statonly' in kargs and kargs['statonly']: options+=16 if 'inactive' in kargs and kargs['inactive']: options+=32 if 'unsort' in kargs and kargs['unsort']: options+=64 if 'nfollowlink' in kargs and kargs['nfollowlink']: options+=128 #if kargs['condensed']: options+=256 #if kargs['numbers']: options+=512 #if kargs['xmlheaders']: options+=1024 #if kargs['fullname']: options+=2048 #if kargs['fullugid']: options+=4096 #if kargs['hier']: options+=8192 #if kargs['nocase']: options+=16384 #if kargs['nospanparent']: options+=32768 #if kargs['all']: options+=131072 keySet=KeySet(libpyelektra.ksNew()) libpyelektra.kdbGetKeyChildKeys(self.__kdb__pointer__,key,keySet.__keyset__pointer__,options) return keySet def getChildKeys(self, name, *args, **kargs): options=0 if 'norecursive' in kargs and kargs['norecursive']: options+=1 if 'excldir' in kargs and kargs['excldir']: options+=2 if 'dironly' in kargs and kargs['dironly']: options+=4 if 'noempty' in kargs and kargs['noempty']: options+=8 if 'statonly' in kargs and kargs['statonly']: options+=16 if 'inactive' in kargs and kargs['inactive']: options+=32 if 'unsort' in kargs and kargs['unsort']: options+=64 if 'nfollowlink' in kargs and kargs['nfollowlink']: options+=128 #if kargs['condensed']: options+=256 #if kargs['numbers']: options+=512 #if kargs['xmlheaders']: options+=1024 #if kargs['fullname']: options+=2048 #if kargs['fullugid']: options+=4096 #if kargs['hier']: options+=8192 #if kargs['nocase']: options+=16384 #if kargs['nospanparent']: options+=32768 #if kargs['all']: options+=131072 keySet=KeySet(libpyelektra.ksNew()) libpyelektra.kdbGetChildKeys(self.__kdb__pointer__,name,keySet.__keyset__pointer__,options) return keySet def setKey(self,key): """Sets key in the backend storage.""" return libpyelektra.kdbSetKey(self.__kdb__pointer__,key.__key__pointer__) def setKeys(self,keyset): """Commits the ks KeySet to the backend storage, starting from ks's current position until its end. This is why it is suggested that you call rewind() on ks before calling this method. Each key is checked with keyNeedSync() before being actually commited. So only changed keys are updated. If some error occurs, SetKeys() will stop. In this situation the KeySet internal cursor is left on the key that generated the error. """ return libpyelektra.setKey(self.__kdb__pointer__,keyset.__keyset__pointer__) def getRootKeys(self): """Returns a KeySet with all root keys currently recognized and present on the system. Currently, the system and current user's user keys are returned. This is the only valid way to get to know of the root keys. """ keyset=ksNew() libpyelektra.getRootKeys(self.__keyset_pointer__,self.__keyset__pointer__) return keyset def error(self,no): """Provides an error string associated with errnum""" return libpyelektra.kdbStrError(no) def errno(self): """return the errno of the last error""" return libpyelektra.kdbGetErrno(self.__kdb__pointer__) def remove(self,name): """remove the key with the name """ return libpyelektra.kdbRemove(self.__kdb__pointer__,name) class Key: """Is a representation of a key, that can be modified by the following methods""" def __init__(self,*args,**kargs): #if len(args)==1: # self.__key__pointer__=args[0] if kargs.has_key('name'): self.__key__pointer__=libpyelektra.keyNew(kargs['name']) del kargs['name'] else: self.__key__pointer__=libpyelektra.keyNew('') self.set(**kargs) if kargs.has_key('value'): libpyelektra.keySetString(self.__key__pointer__,kargs['value']) if kargs.has_key('lookup'): try: libpyelektra.kdbGetKey(kargs['lookup'].__kdb__pointer__,self.__key__pointer__) except AttributeError: raise ElektraException('lookup needs a initialised kdb object') #def new(self,name): # """creates new key""" # self.__key__pointer__=libpyelektra.keyNew(name) def set(self, **kargs): if kargs.has_key('name'): self.setName(kargs['name']) if kargs.has_key('value'): libpyelektra.keySetString(self.__key__pointer__,kargs['value']) if kargs.has_key('lookup'): try: libpyelektra.kdbGetKey(kargs['lookup'].__kdb__pointer__,self.__key__pointer__) except AttributeError: raise ElektraException('lookup needs a initialised kdb object') if kargs.has_key('set'): try: libpyelektra.kdbSetKey(kargs['set'].__kdb__pointer__,self.__key__pointer__) except AttributeError: raise ElektraException('lookup needs a initialised kdb object') return self def setName(self,name,**kargs): """give the key a new name""" ret= libpyelektra.keySetName(self.__key__pointer__,name) if ret == -1: raise ElektraException('Keyname invalid') if kargs.has_key('lookup'): try: libpyelektra.kdbGetKey(kargs['lookup'].__kdb__pointer__,self.__key__pointer__) except AttributeError: raise ElektraException('lookup needs a initialised kdb object') def setBinary(self): """Set the binary value of a key""" libpyelektra.keySetBinary(self.__key__pointer__,value) def getFullName(self): """Set the full name of a key""" return libpyelektra.keyGetFullName(self.__key__pointer__) def getString(self): """Get the string value of a key""" return libpyelektra.keyGetString(self.__key__pointer__) def setString(self,s): """Set the full name of a key""" return libpyelektra.keySetString(self.__key__pointer__,s) def getNameSize(self): """returns the name size""" return libpyelektra.keyGetNameSize(self.__key__pointer__) def getDataSize(self): """returns the data size""" return libpyelektra.keyGetDataSize(self.__key__pointer__) def getCommentSize(self): """returns the comment size""" return libpyelektra.keyGetCommentSize(self.__key__pointer__) def getComment(self): """returns the comment""" return libpyelektra.keyGetComment(self.__key__pointer__) def getName(self): """returns the key name""" return libpyelektra.keyGetName(self.__key__pointer__) def dup(self): """returns the duplicate""" return Key(libpyelektra.keyDup(self.__key__pointer__)) def getType(self): """return type of the key""" return libpyelektra.keyGetType(self.__key__pointer__) def setType(self,type): """set the key type""" libpyelektra.keySetType(self.__key__pointer__,type) def getRecordSize(self,type): """get the record size of the key""" libpyelektra.keyGetRecordSize(self.__key__pointer__) def getFullNameSize(self): """get the fullname size""" return libpyelektra.keyGetFullNameSize(self.__key__pointer__) def name(self): """returns the name of the key""" return libpyelektra.keyName(self.__key__pointer__) def comment(self): """returns the comment of the key""" return libpyelektra.keyComment(self.__key__pointer__) def setComment(self,s): """set the key comment""" libpyelektra.keySetComment(self.__key__pointer__,s) def getUID(self): """return the uid""" return libpyelektra.keyGetUID(self.__key__pointer__) def setUID(self,uid): """set the uid of the key""" return libpyelektra.keySetUID(self.__key__pointer__,uid) def getGID(self): """get the GID of the key""" return libpyelektra.getGID(self.__key__pointer__) def setGID(self,gid): """set the GID of the key""" return libpyelektra.setGID(self.__key__pointer__,gid) def getMode(self): """get the mode of the key""" return libpyelektra.keyGetMode(self.__key__pointer__) def setMode(self,a): """set the mode of the key""" return libpyelektra.keySetMode(self.__key__pointer__,a) def getOwnerSize(self): """returns the owner size""" return libpyelektra.keyGetOwnerSize(self.__key__pointer__) def owner(self): """returns the owner""" return libpyelektra.keyOwner(self.__key__pointer__) def setOwner(self): """sets a new owner""" return libpyelektra.keySetOwner(self.__key__pointer__) def getLink(self): """returns the link""" return libpyelektra.keyGetLink(self.__key__pointer__) def setLink(self,value): """sets the link""" return libpyelektra.keySetLink(self.__key__pointer__) def getMTime(self): """returns the MTime""" return libpyelektra.keyGetMTime(self.__key__pointer__) def getATime(self): """returns the ATime""" return libpyelektra.keyGetATime(self.__key__pointer__) def getCTime(self): """returns the CTime""" return libpyelektra.keyGetCTime(self.__key__pointer__) def isSystem(self): """check whether the key is under the system namespace or not""" if libpyelektra.keyIsSystem(self.__key__pointer__)==0: return False return True def isUser(self): """check whether the key is under the user namespace or not""" if libpyelektra.keyIsUser(self.__key__pointer__)==0: return False return True def isDir(self): """check if the key is a folder key or not""" if libpyelektra.keyIsDir(self.__key__pointer__)==0: return False return True def isLink(self): """check if the key is a Link key or not""" if libpyelektra.keyIsLink(self.__key__pointer__)==0: return False return True def isBin(self): """check if the key is a binary type""" if libpyelektra.keyIsBin(self.__key__pointer__)==0: return False return True def isString(self): """check if the key is a string type""" if libpyelektra.keyIsBin(self.__key__pointer__)==0: return False return True #def close(self): # libpyelektra.keyClose(self.__key__pointer__) def __del__(self): libpyelektra.keyClose(self.__key__pointer__) class KeySet: """Methods to manipulate KeySets. A KeySet is a linked list to group a number of Keys. KeySets have an internal cursor to help in the Key navigation.""" def __init__(self,*args): if len(args)==1: self.__keyset__pointer__=args[0] def new(self): """new() creates a new keyset""" self.__keyset__pointer__=libpyelektra.ksNew() def del_(self): """del_() deletes the keyset""" libpyelektra.ksDel(self.__keyset__pointer__) def rewind(self): """resets the cursor""" libpyelektra.ksRewind(self.__keyset__pointer__) def next(self): """returns the next keyset in the keyset""" libpyelektra.ksNext(self.__keyset__pointer__) def getSize(self): """returns the number of elements in the keyset""" libpyelektra.ksGetSize(self.__keyset__pointer__) def insert(self,key): """inserts a new Key in the beginning of the KeySet.""" return libpyelektra.ksInsert(self.__keyset__pointer__,key.__key__pointer__) def append(self,key): """appends a new Key at the end of the KeySet.""" return libpyelektra.ksInsert(self.__keyset__pointer__,key.__key__pointer__) def pop(self): """Remove and return the last key of ks""" return libpyelektra.ksPop(self.__keyset__pointer__) def insertKeys(self,toInsert): """ks.insertKeys(toInsert) transfers all keys from toInsert to the begining of ks. After this call, toInsert will be empty and can be deleted with toInsert.del() Returns: the size of the KeySet after transfer.""" return libpyelektra.ksInsertKeys(self.__keyset__pointer__,toInsert.__keyset__pointer__) def appendKeys(self,toAppend): """ks.insertKeys(toAppend) transfers all keys from toInsert to the begining of ks. After this call, toInsert will be empty and can be deleted with toInsert.del() Returns: the size of the KeySet after transfer.""" return libpyelektra.ksInsertKeys(self.__keyset__pointer__,toAppend.__keyset__pointer__) def sort(self): """sort the keys in the keyset""" libpyelektra.ksSort(self.__keyset__pointer__) def lookupByString(self,value,*args,**kargs): """Look for a Key contained in ks that matches name, starting from ks' ksNext() position. Options: nocase\tignore case""" options=0 if 'nocase' in kargs and kargs['nocase']: options+=32768 t=libpyelektra.ksLookupByString(self.__keyset__pointer__,value,options) if t==0: return None return Key(t) def lookupByName(self,value,*args,**kargs): """Look for a Key contained in ks that matches name, starting from ks' ksNext() position. Options: nocase\tignore case""" options=0 if 'nocase' in kargs and kargs['nocase']: options+=32768 if 'all' in kargs and kargs['all']: options+=131072 t=libpyelektra.ksLookupByName(self.__keyset__pointer__,value,options) if t==0: return None return Key(t) def lookupByBinary(self,value,options): """Look for a Key contained in ks that matches name, starting from ks' ksNext() position. Options: nocase\tignore case""" options=0 if 'nocase' in kargs and kargs['nocase']: options+=32768 t=libpyelektra.ksLookupByBinary(self.__keyset__pointer__,value,options) if t==0: return None return Key(t) def current(self): """returns the current Key or None if you reached the end""" t=libpyelektra.ksCurrent(self.__keyset__pointer__) if t==0: return None return Key(t) def head(self): """returns the first key in the KeySet, without changing the KeySet's internal cursor.""" return Key(libpyelektra.ksHead(self.__keyset__pointer__)) def tail(self): """returns the last key in the KeySet, without changing the KeySet's internal cursor.""" return Key(libpyelektra.ksTail(self.__keyset__pointer__)) elektra-0.7.1/src/bindings/python/examples/0000777000076400001440000000000011345465032015701 500000000000000elektra-0.7.1/src/bindings/python/examples/elektra/0000777000076400001440000000000011361542117017326 500000000000000elektra-0.7.1/src/bindings/python/examples/elektra/getset.py0000644000076400001440000000046611361542117021115 00000000000000#!/usr/bin/python # try: # > python hello.py import elektra import sys kdb=elektra.Kdb() kdb.open() k=elektra.Key() k.new("user/key") k.setName("/key") k.setString("hi") kdb.setKey(k) ks=kdb.getChildKeys("user",norecursive=True) key=ks.lookupByName("/key") print key.getString() ks.del_() kdb.close() elektra-0.7.1/src/bindings/python/examples/elektra/hello.py0000644000076400001440000000043711361542117020723 00000000000000#!/usr/bin/python # try: # > kdb set user/hello "Hello World!" # > python hello.py import elektra import sys #ks=elektra.KeySet() kdb=elektra.Kdb() kdb.open() ks=kdb.getChildKeys("user",norecursive=True) key=ks.lookupByName("/hello",0) print key.getString() ks.del_() kdb.close() elektra-0.7.1/src/bindings/python/examples/elektra/remove.py0000644000076400001440000000031611361542117021111 00000000000000#!/usr/bin/python # try: # > kdb set user/key "to remove" # > python remove.py # > kdb get user/key "to remove" from elektra import * import sys kdb=Kdb() kdb.open() kdb.remove("user/key") kdb.close() elektra-0.7.1/src/bindings/python/examples/libelektra/0000777000076400001440000000000011361542117020015 500000000000000elektra-0.7.1/src/bindings/python/examples/libelektra/getset.py0000644000076400001440000000045211361542117021577 00000000000000#!/usr/bin/python # try: # > python getset.py from libelektra import * import sys ks=ksNew() h=kdbOpen() k=keyNew("user/key") keySetName(k,"key") keySetString(k,"hi") kdbSetKey(h,k) kdbGetChildKeys(h,"user",ks,1) k=ksLookupByName(ks,"/key",0) print keyGetString(k) kdbClose(h) keyClose(k) elektra-0.7.1/src/bindings/python/examples/libelektra/hello.py0000644000076400001440000000075411361542117021414 00000000000000#!/usr/bin/python # try: # > kdb set user/hello "Hello World!" # > python hello.py from libelektra import * import sys def BailOut(msg): print msg print kdbStrError(kdbhGetError(0)) sys.exit(1) ks=ksNew() h=kdbOpen() if h==0: BailOut('Could not open key database') if kdbGetChildKeys(h,"user",ks,1)==-1: BailOut('Could not get keys') k=ksLookupByName(ks,"/hello",0); if k==0: BailOut('Could not lookup keys') #print keyStealValue(k) print keyGetString(k) ksDel(ks) kdbClose(h) elektra-0.7.1/src/bindings/python/examples/libelektra/remove.py0000644000076400001440000000031111361542117021573 00000000000000#!/usr/bin/python # try: # > kdb set user/key "to remove" # > python remove.py # > kdb get user/key "to remove" from libelektra import * import sys h=kdbOpen() kdbRemove(h,"user/key") kdbClose(h) elektra-0.7.1/src/bindings/python/libpyelektra.c0000644000076400001440000012025311361542117016633 00000000000000#include #include #include #include //#include static PyObject* py_kdbOpen (PyObject *self, PyObject *args) { KDB *handle; PyObject *LongPtr; if (!PyArg_Parse(args, "")) return NULL; else { handle=kdbOpen(); LongPtr=PyLong_FromVoidPtr(handle); return LongPtr; } } static PyObject* py_kdbGetChildKeys(PyObject *self, PyObject *args) { PyObject *py_ks; PyObject *py_h; char *s; long opt; unsigned long options; ssize_t ret; int r; KDB *h; KeySet *ks; if (!PyArg_Parse(args,"(OsOl)",&py_h,&s,&py_ks,&opt)) return NULL; else { options=(unsigned long) opt; h=PyLong_AsVoidPtr(py_h); ks=PyLong_AsVoidPtr(py_ks); ret=kdbGetChildKeys(h,s,ks,options); r=(int) ret; return Py_BuildValue("i",r); } } static PyObject* py_kdbGetKeyChildKeys(PyObject *self, PyObject *args) { PyObject *py_ks; PyObject *py_k; PyObject *py_h; long opt; unsigned long options; ssize_t ret; int r; KDB *h; KeySet *ks; Key *k; if (!PyArg_Parse(args,"(OOOl)",&py_h,&py_k,&py_ks,&opt)) return NULL; else { options=(unsigned long) opt; h=PyLong_AsVoidPtr(py_h); k=PyLong_AsVoidPtr(py_k); ks=PyLong_AsVoidPtr(py_ks); ret=kdbGetKeyChildKeys(h,k,ks,options); r=(int) ret; return Py_BuildValue("i",r); } } static PyObject* py_ksNew(PyObject *self, PyObject *args) { KeySet *ks; PyObject* LongPtr; if (!PyArg_Parse(args, "")) return NULL; else { ks=ksNew(); LongPtr=PyLong_FromVoidPtr(ks); return LongPtr; } } static PyObject* py_ksLookupByName(PyObject *self, PyObject *args) { KeySet *ks; PyObject *py_ks, *LongPtr; char *s; long l; unsigned long ul; Key *ret; if (!PyArg_Parse(args, "(Osi)",&py_ks,&s,&l)) return NULL; else { ul=(unsigned long) l; ks=PyLong_AsVoidPtr(py_ks); ret=ksLookupByName(ks,s,ul); LongPtr=PyLong_FromVoidPtr(ret); //return Py_BuildValue("O", LongPtr); return LongPtr; } } /* static PyObject* py_keyStealValue(PyObject *self, PyObject *args) { Key *k; PyObject *py_k; char *s; if (!PyArg_Parse(args, "(O)",&py_k)) return NULL; else { k=PyLong_AsVoidPtr(py_k); s=keyStealValue(k); return Py_BuildValue("s", s); } } */ static PyObject* py_kdbClose(PyObject *self, PyObject *args) { PyObject *py_h; KDB *h; if (!PyArg_Parse(args, "(O)",&py_h)) return NULL; else { h=PyLong_AsVoidPtr(py_h); return Py_BuildValue("i", kdbClose(h)); } } static PyObject* py_ksDel(PyObject *self, PyObject *args) { PyObject *py_ks; KeySet *ks; if (!PyArg_Parse(args, "(O)",&py_ks)) return NULL; else { ks=PyLong_AsVoidPtr(py_ks); return Py_BuildValue("i", ksDel(ks)); } } /* keyNew is only implement without parameters. Options can be set with * the correspondending functions */ static PyObject* py_keyNew(PyObject *self, PyObject *args) { PyObject *LongPtr; Key *k; char *s; if (!PyArg_Parse(args, "(s)",&s)) return NULL; else { k=keyNew(s,KEY_SWITCH_END); LongPtr=PyLong_FromVoidPtr(k); //return Py_BuildValue("O",LongPtr); return LongPtr; } } static PyObject* py_keySetName(PyObject *self, PyObject *args) { PyObject *py_k; Key *k; char *s; ssize_t ret; int r; if (!PyArg_Parse(args, "(Os)",&py_k,&s)) return NULL; else { k=PyLong_AsVoidPtr(py_k); ret=keySetName(k,s); r=(int) ret; return Py_BuildValue("i",r); } } static PyObject* py_keySetBinary(PyObject *self, PyObject *args) { PyObject *py_k; Key *k; char *s; ssize_t ret; int r; int i; if (!PyArg_Parse(args, "(Os#)",&py_k,&s,&i)) return NULL; else { k=PyLong_AsVoidPtr(py_k); ret=keySetBinary(k,s,(size_t)i); r=(int) ret; return Py_BuildValue("i",r); } } static PyObject* py_kdbSetKey(PyObject *self, PyObject *args) { PyObject *py_k; PyObject *py_h; Key *k; KDB *h; int ret; if (!PyArg_Parse(args, "(OO)",&py_h,&py_k)) return NULL; else { k=PyLong_AsVoidPtr(py_k); h=PyLong_AsVoidPtr(py_h); ret=kdbSetKey(h,k); return Py_BuildValue("i",ret); } } static PyObject* py_ksRewind(PyObject *self, PyObject *args) { PyObject *py_ks; KeySet *ks; int ret; if (!PyArg_Parse(args, "(O)",&py_ks)) return NULL; else { ks=PyLong_AsVoidPtr(py_ks); ret=ksRewind(ks); return Py_BuildValue("i",ret); } } static PyObject* py_ksNext(PyObject *self, PyObject *args) { PyObject *py_ks; KeySet *ks; Key *k; PyObject *py_k; if (!PyArg_Parse(args, "(O)",&py_ks)) return NULL; else { ks=PyLong_AsVoidPtr(py_ks); k=ksNext(ks); py_k=PyLong_FromVoidPtr(k); //return Py_BuildValue("O",py_k); return py_k; } } static PyObject* py_ksGetSize(PyObject *self, PyObject *args) { PyObject *py_ks; KeySet *ks; int ret; if (!PyArg_Parse(args, "(O)",&py_ks)) return NULL; else { ks=PyLong_AsVoidPtr(py_ks); ret=(int)ksGetSize(ks); return Py_BuildValue("i",ret); } } static PyObject* py_keyGetFullName(PyObject *self, PyObject *args) { Key *k; PyObject *py_k; char result[1024]; if (!PyArg_Parse(args, "(O)",&py_k)) return NULL; else { k=PyLong_AsVoidPtr(py_k); (void) keyGetFullName(k,result,1023); // TODO return value not used return Py_BuildValue("s",result); } } static PyObject* py_keyGetString(PyObject *self, PyObject *args) { Key *k; PyObject *py_k; char result[1024]; if (!PyArg_Parse(args, "(O)",&py_k)) return NULL; else { k=PyLong_AsVoidPtr(py_k); (void) keyGetString(k,result,1023); // TODO return value not used return Py_BuildValue("s",result); } } static PyObject* py_keySetString(PyObject *self, PyObject *args) { Key *k; PyObject *py_k; char *s; int ret; if (!PyArg_Parse(args, "(Os)",&py_k,&s)) return NULL; else { k=PyLong_AsVoidPtr(py_k); ret=(int)keySetString(k,s); return Py_BuildValue("i",ret); } } static PyObject* py_kdbSetKeys(PyObject *self, PyObject *args) { KeySet *ks; KDB *h; PyObject *py_ks; PyObject *py_h; int ret; if (!PyArg_Parse(args, "(OO)",&py_h,&py_ks)) return NULL; else { ks=PyLong_AsVoidPtr(py_ks); h=PyLong_AsVoidPtr(py_h); ret=kdbSetKeys(h,ks); return Py_BuildValue("i",ret); } } static PyObject* py_keyGetNameSize(PyObject *self, PyObject *args) { Key *k; PyObject *py_k; int ret; if (!PyArg_Parse(args, "(O)",&py_k)) return NULL; else { k=PyLong_AsVoidPtr(py_k); ret=(int)keyGetNameSize(k); return Py_BuildValue("i",ret); } } /* static PyObject* py_keyGetDataSize(PyObject *self, PyObject *args) { Key *k; PyObject *py_k; int ret; if (!PyArg_Parse(args, "(O)",&py_k)) return NULL; else { k=PyLong_AsVoidPtr(py_k); ret=(int)keyGetDataSize(k); return Py_BuildValue("i",ret); } }*/ static PyObject* py_keyGetCommentSize(PyObject *self, PyObject *args) { Key *k; PyObject *py_k; ssize_t ret; if (!PyArg_Parse(args, "(O)",&py_k)) return NULL; else { k=PyLong_AsVoidPtr(py_k); ret=keyGetCommentSize(k); return Py_BuildValue("i",ret); } } static PyObject* py_keyGetName(PyObject *self, PyObject *args) { Key *k; PyObject *py_k; char result[1024]; if (!PyArg_Parse(args, "(O)",&py_k)) return NULL; else { k=PyLong_AsVoidPtr(py_k); (void) keyGetName(k,result,1023); // TODO return value not used return Py_BuildValue("s",result); } } static PyObject* py_keyGetComment(PyObject *self, PyObject *args) { Key *k; PyObject *py_k; char result[1024]; result[0]='\0'; if (!PyArg_Parse(args, "(O)",&py_k)) return NULL; else { k=PyLong_AsVoidPtr(py_k); (void) keyGetComment(k,result,1023); // TODO return value not used return Py_BuildValue("s",result); } } static PyObject* py_kdbGetValue(PyObject *self, PyObject *args) { KDB *h; PyObject *py_h; char result[1024]; char *s; if (!PyArg_Parse(args, "(Os)",&py_h,&s)) return NULL; else { h=PyLong_AsVoidPtr(py_h); (void) kdbGetValue(h,s,result,1023); // TODO return value not used return Py_BuildValue("s",result); } } static PyObject* py_kdbGetKeyByParent(PyObject *self, PyObject *args) { KDB *h; PyObject *py_h; Key *k; PyObject *py_k; char result[1024]; char *s1; char *s2; int ret; if (!PyArg_Parse(args, "(OssO)",&py_h,&s1,&s2,&py_k)) return NULL; else { h=PyLong_AsVoidPtr(py_h); k=PyLong_AsVoidPtr(py_k); ret = kdbGetKeyByParent(h,s1,s2,k); return Py_BuildValue("i",ret); } } static PyObject* py_kdbGetKeyByParentKey(PyObject *self, PyObject *args) { KDB *h; PyObject *py_h; Key *k1; PyObject *py_k1; Key *k2; PyObject *py_k2; char *s; int ret; if (!PyArg_Parse(args, "(OssO)",&py_h,&py_k1,&s,&py_k2)) return NULL; else { h=PyLong_AsVoidPtr(py_h); k1=PyLong_AsVoidPtr(py_k1); k2=PyLong_AsVoidPtr(py_k2); ret = kdbGetKeyByParentKey(h,k1,s,k2); return Py_BuildValue("i",ret); } } static PyObject* py_kdbGetValueByParent(PyObject *self, PyObject *args) { KDB *h; PyObject *py_h; char result[1024]; char *s1; char *s2; if (!PyArg_Parse(args, "(Oss)",&py_h,&s1,&s2)) return NULL; else { h=PyLong_AsVoidPtr(py_h); (void) kdbGetValueByParent(h,s1,s2,result,1023); // TODO return value not used return Py_BuildValue("s",result); } } static PyObject* py_kdbSetValue(PyObject *self, PyObject *args) { KDB *h; PyObject *py_h; char *s1; char *s2; int ret; if (!PyArg_Parse(args, "(Oss)",&py_h,&s1,&s2)) return NULL; else { h=PyLong_AsVoidPtr(py_h); ret = kdbSetValue(h,s1,s2); return Py_BuildValue("i",ret); } } static PyObject* py_kdbSetValueByParent(PyObject *self, PyObject *args) { KDB *h; PyObject *py_h; char *s1; char *s2; char *s3; int ret; if (!PyArg_Parse(args, "(Osss)",&py_h,&s1,&s2,&s3)) return NULL; else { h=PyLong_AsVoidPtr(py_h); ret = kdbSetValueByParent(h,s1,s2,s3); return Py_BuildValue("i",ret); } } static PyObject* py_kdbGetKey(PyObject *self, PyObject *args) { KDB *h; PyObject *py_h; Key *k; PyObject *py_k; int ret; if (!PyArg_Parse(args, "(OO)",&py_h,&py_k)) return NULL; else { h=PyLong_AsVoidPtr(py_h); k=PyLong_AsVoidPtr(py_k); ret = kdbGetKey(h,k); return Py_BuildValue("i",ret); } } static PyObject* py_kdbStrErr(PyObject *self, PyObject *args) { int no; char *s; if (!PyArg_Parse(args, "(i)",&no)) return NULL; else { s = kdbStrError(no); return Py_BuildValue("s",s); } } static PyObject* py_kdbGetErrno(PyObject *self, PyObject *args) { int no; KDB *h; PyObject *py_h; if (!PyArg_Parse(args, "(O)",&py_h)) return NULL; else { h=PyLong_AsVoidPtr(py_h); no = kdbGetErrno(); return Py_BuildValue("i",no); } } static PyObject* py_keyInit(PyObject *self, PyObject *args) { Key *k; PyObject *py_k; int ret; if (!PyArg_Parse(args, "(O)",&py_k)) return NULL; else { k=PyLong_AsVoidPtr(py_k); ret = keyInit(k); return Py_BuildValue("i",ret); } } static PyObject* py_keyClose(PyObject *self, PyObject *args) { Key *k; PyObject *py_k; int ret; if (!PyArg_Parse(args, "(O)",&py_k)) return NULL; else { k=PyLong_AsVoidPtr(py_k); ret = keyClose(k); return Py_BuildValue("i",ret); } } /* static PyObject* py_keyIsInitialized(PyObject *self, PyObject *args) { Key *k; PyObject *py_k; int ret; if (!PyArg_Parse(args, "(O)",&py_k)) return NULL; else { k=PyLong_AsVoidPtr(py_k); ret = keyIsInitialized(k); return Py_BuildValue("i",ret); } }*/ static PyObject* py_keyNeedSync(PyObject *self, PyObject *args) { Key *k; PyObject *py_k; int ret; if (!PyArg_Parse(args, "(O)",&py_k)) return NULL; else { k=PyLong_AsVoidPtr(py_k); ret = keyNeedSync(k); return Py_BuildValue("i",ret); } } static PyObject* py_keyDup(PyObject *self, PyObject *args) { Key *k1; Key *k2; PyObject *py_k1; int ret; if (!PyArg_Parse(args, "(O)",&py_k1)) return NULL; else { k1=PyLong_AsVoidPtr(py_k1); k2 = keyDup(k1); return PyLong_FromVoidPtr(k2); } } static PyObject* py_keyGetType(PyObject *self, PyObject *args) { Key *k; PyObject *py_k; int ret; if (!PyArg_Parse(args, "(O)",&py_k)) return NULL; else { k=PyLong_AsVoidPtr(py_k); ret = keyGetType(k); return Py_BuildValue("i",ret); } } static PyObject* py_keySetType(PyObject *self, PyObject *args) { Key *k; PyObject *py_k; int type; int ret; if (!PyArg_Parse(args, "(Oi)",&py_k,&type)) return NULL; else { k=PyLong_AsVoidPtr(py_k); ret = keySetType(k,type); return Py_BuildValue("i",ret); } } /* TODO static PyObject* py_keySetDir(PyObject *self, PyObject *args) { Key *k; PyObject *py_k; int ret; if (!PyArg_Parse(args, "(O)",&py_k)) return NULL; else { k=PyLong_AsVoidPtr(py_k); ret = keyNeedSync(k); return Py_BuildValue("i",ret); } }*/ /* static PyObject* py_keySetFlag(PyObject *self, PyObject *args) { Key *k; PyObject *py_k; int ret; if (!PyArg_Parse(args, "(O)",&py_k)) return NULL; else { k=PyLong_AsVoidPtr(py_k); ret = keySetFlag(k); return Py_BuildValue("i",ret); } }*/ /* static PyObject* py_keyClearFlag(PyObject *self, PyObject *args) { Key *k; PyObject *py_k; int ret; if (!PyArg_Parse(args, "(O)",&py_k)) return NULL; else { k=PyLong_AsVoidPtr(py_k); ret = keyClearFlag(k); return Py_BuildValue("i",ret); } }*/ /* static PyObject* py_keyGetFlag(PyObject *self, PyObject *args) { Key *k; PyObject *py_k; int ret; if (!PyArg_Parse(args, "(O)",&py_k)) return NULL; else { k=PyLong_AsVoidPtr(py_k); ret = keyGetFlag(k); return Py_BuildValue("i",ret); } }*/ static PyObject* py_keyGetRecordSize(PyObject *self, PyObject *args) { Key *k; PyObject *py_k; int ret; if (!PyArg_Parse(args, "(O)",&py_k)) return NULL; else { k=PyLong_AsVoidPtr(py_k); ret = keyGetRecordSize(k); return Py_BuildValue("i",ret); } } static PyObject* py_keyGetFullNameSize(PyObject *self, PyObject *args) { Key *k; PyObject *py_k; int ret; if (!PyArg_Parse(args, "(O)",&py_k)) return NULL; else { k=PyLong_AsVoidPtr(py_k); ret = keyGetFullNameSize(k); return Py_BuildValue("i",ret); } } static PyObject* py_keyName(PyObject *self, PyObject *args) { Key *k; PyObject *py_k; const char *ret; if (!PyArg_Parse(args, "(O)",&py_k)) return NULL; else { k=PyLong_AsVoidPtr(py_k); ret = keyName(k); return Py_BuildValue("s",ret); } } static PyObject* py_keyGetRootName(PyObject *self, PyObject *args) { Key *k; PyObject *py_k; char result[1024]; if (!PyArg_Parse(args, "(O)",&py_k)) return NULL; else { k=PyLong_AsVoidPtr(py_k); (void) keyGetRootName(k,result,1023); // TODO return value not used return Py_BuildValue("s",result); } } static PyObject* py_keyGetFullRootName(PyObject *self, PyObject *args) { Key *k; PyObject *py_k; char result[1024]; if (!PyArg_Parse(args, "(O)",&py_k)) return NULL; else { k=PyLong_AsVoidPtr(py_k); (void) keyGetFullRootName(k,result,1023); // TODO return value not used return Py_BuildValue("s",result); } } static PyObject* py_keyBaseName(PyObject *self, PyObject *args) { Key *k; PyObject *py_k; const char *s; if (!PyArg_Parse(args, "(O)",&py_k)) return NULL; else { k=PyLong_AsVoidPtr(py_k); s = keyBaseName(k); return Py_BuildValue("s",s); } } static PyObject* py_keyNameGetBaseNameSize(PyObject *self, PyObject *args) { char *s; int size; if (!PyArg_Parse(args, "(s)",&s)) return NULL; else { size = keyNameGetBaseNameSize(s); return Py_BuildValue("i",size); } } static PyObject* py_keyGetBaseNameSize(PyObject *self, PyObject *args) { Key *k; PyObject *py_k; int size; if (!PyArg_Parse(args, "(O)",&py_k)) return NULL; else { k=PyLong_AsVoidPtr(py_k); size = keyGetBaseNameSize(k); return Py_BuildValue("i",size); } } static PyObject* py_keyAddBaseName(PyObject *self, PyObject *args) { Key *k; PyObject *py_k; char *s; int size; if (!PyArg_Parse(args, "(Os)",&py_k,&s)) return NULL; else { k=PyLong_AsVoidPtr(py_k); size = keyAddBaseName(k,s); return Py_BuildValue("i",size); } } static PyObject* py_keySetBaseName(PyObject *self, PyObject *args) { Key *k; PyObject *py_k; char *s; int size; if (!PyArg_Parse(args, "(Os)",&py_k,&s)) return NULL; else { k=PyLong_AsVoidPtr(py_k); size = keySetBaseName(k,s); return Py_BuildValue("i",size); } } /* TODO static PyObject* py_keyNameGetOneLevel(PyObject *self, PyObject *args) { Key *k; PyObject *py_k; char *s; char *name; int size; if (!PyArg_Parse(args, "(si)",&name,&size)) return NULL; else { k=PyLong_AsVoidPtr(py_k); s = keyNameGetOneLevel(name,&size); return Py_BuildValue("s",s); } } */ /* static PyObject* py_keyGetParentName(PyObject *self, PyObject *args) { Key *k; PyObject *py_k; char result[1024]; if (!PyArg_Parse(args, "(O)",&py_k)) return NULL; else { k=PyLong_AsVoidPtr(py_k); (void) keyNameGetParentName(k,result,1023); // TODO return value not used return Py_BuildValue("s",result); } } static PyObject* py_keyGetParentNameSize(PyObject *self, PyObject *args) { Key *k; PyObject *py_k; int size; if (!PyArg_Parse(args, "(O)",&py_k)) return NULL; else { k=PyLong_AsVoidPtr(py_k); size = keyGetParentNameSize(k); return Py_BuildValue("i",size); } } */ static PyObject* py_keyNameGetRootNameSize(PyObject *self, PyObject *args) { char *s; int size; if (!PyArg_Parse(args, "(s)",&s)) return NULL; else { size = keyNameGetRootNameSize(s); return Py_BuildValue("i",size); } } static PyObject* py_keyGetRootNameSize(PyObject *self, PyObject *args) { Key *k; PyObject *py_k; int size; if (!PyArg_Parse(args, "(O)",&py_k)) return NULL; else { k=PyLong_AsVoidPtr(py_k); size = keyGetRootNameSize(k); return Py_BuildValue("i",size); } } static PyObject* py_keyComment(PyObject *self, PyObject *args) { Key *k; PyObject *py_k; const char *s; if (!PyArg_Parse(args, "(O)",&py_k)) return NULL; else { k=PyLong_AsVoidPtr(py_k); s = keyComment(k); return Py_BuildValue("s",s); } } static PyObject* py_keySetComment(PyObject *self, PyObject *args) { Key *k; PyObject *py_k; int size; char *s; if (!PyArg_Parse(args, "(Os)",&py_k,&s)) return NULL; else { k=PyLong_AsVoidPtr(py_k); size = keySetComment(k,s); return Py_BuildValue("i",size); } } static PyObject* py_keyGetUID(PyObject *self, PyObject *args) { Key *k; PyObject *py_k; int size; char *s; if (!PyArg_Parse(args, "(O)",&py_k)) return NULL; else { k=PyLong_AsVoidPtr(py_k); size = keyGetUID(k); return Py_BuildValue("i",size); } } static PyObject* py_keySetUID(PyObject *self, PyObject *args) { Key *k; PyObject *py_k; int ret; char *s; int uid; if (!PyArg_Parse(args, "(Oi)",&py_k,&uid)) return NULL; else { k=PyLong_AsVoidPtr(py_k); ret = keySetUID(k,uid); return Py_BuildValue("i",ret); } } static PyObject* py_keyGetGID(PyObject *self, PyObject *args) { Key *k; PyObject *py_k; int size; char *s; if (!PyArg_Parse(args, "(O)",&py_k)) return NULL; else { k=PyLong_AsVoidPtr(py_k); size = keyGetGID(k); return Py_BuildValue("i",size); } } static PyObject* py_keySetGID(PyObject *self, PyObject *args) { Key *k; PyObject *py_k; int ret; int gid; if (!PyArg_Parse(args, "(Oi)",&py_k,&gid)) return NULL; else { k=PyLong_AsVoidPtr(py_k); ret = keySetGID(k,gid); return Py_BuildValue("i",ret); } } static PyObject* py_keyGetMode(PyObject *self, PyObject *args) { Key *k; PyObject *py_k; int mode; if (!PyArg_Parse(args, "(O)",&py_k)) return NULL; else { k=PyLong_AsVoidPtr(py_k); mode = keyGetMode(k); return Py_BuildValue("i",mode); } } static PyObject* py_keySetMode(PyObject *self, PyObject *args) { Key *k; PyObject *py_k; int ret; int mode; if (!PyArg_Parse(args, "(Oi)",&py_k,&mode)) return NULL; else { k=PyLong_AsVoidPtr(py_k); ret = keySetMode(k,mode); return Py_BuildValue("i",ret); } } static PyObject* py_keyGetOwnerSize(PyObject *self, PyObject *args) { Key *k; PyObject *py_k; int ret; if (!PyArg_Parse(args, "(O)",&py_k)) return NULL; else { k=PyLong_AsVoidPtr(py_k); ret = keyGetOwnerSize(k); return Py_BuildValue("i",ret); } } static PyObject* py_keyOwner(PyObject *self, PyObject *args) { Key *k; PyObject *py_k; char *s; if (!PyArg_Parse(args, "(O)",&py_k)) return NULL; else { k=PyLong_AsVoidPtr(py_k); s = keyOwner(k); return Py_BuildValue("s",s); } } static PyObject* py_keySetOwner(PyObject *self, PyObject *args) { Key *k; PyObject *py_k; int ret; char *s; if (!PyArg_Parse(args, "(Os)",&py_k,&s)) return NULL; else { k=PyLong_AsVoidPtr(py_k); ret = keySetOwner(k,s); return Py_BuildValue("i",ret); } } static PyObject* py_keyGetValueSize(PyObject *self, PyObject *args) { Key *k; PyObject *py_k; int ret; if (!PyArg_Parse(args, "(O)",&py_k)) return NULL; else { k=PyLong_AsVoidPtr(py_k); ret = keyGetValueSize(k); return Py_BuildValue("i",ret); } } static PyObject* py_keyGetLink(PyObject *self, PyObject *args) { Key *k; PyObject *py_k; int mode; char result[1024]; if (!PyArg_Parse(args, "(O)",&py_k)) return NULL; else { k=PyLong_AsVoidPtr(py_k); (void) keyGetLink(k,result,1023); // TODO return value not used return Py_BuildValue("s",result); } } static PyObject* py_keySetLink(PyObject *self, PyObject *args) { Key *k; PyObject *py_k; int ret; char *s; if (!PyArg_Parse(args, "(Os)",&py_k,&s)) return NULL; else { k=PyLong_AsVoidPtr(py_k); ret = keySetLink(k,s); return Py_BuildValue("i",ret); } } static PyObject* py_keyGetMTime(PyObject *self, PyObject *args) { Key *k; PyObject *py_k; int ret; if (!PyArg_Parse(args, "(O)",&py_k)) return NULL; else { k=PyLong_AsVoidPtr(py_k); ret = keyGetMTime(k); return Py_BuildValue("l",ret); } } static PyObject* py_keyGetATime(PyObject *self, PyObject *args) { Key *k; PyObject *py_k; int ret; if (!PyArg_Parse(args, "(O)",&py_k)) return NULL; else { k=PyLong_AsVoidPtr(py_k); ret = keyGetATime(k); return Py_BuildValue("l",ret); } } static PyObject* py_keyGetCTime(PyObject *self, PyObject *args) { Key *k; PyObject *py_k; int ret; if (!PyArg_Parse(args, "(O)",&py_k)) return NULL; else { k=PyLong_AsVoidPtr(py_k); ret = keyGetCTime(k); return Py_BuildValue("l",ret); } } static PyObject* py_keyIsSystem(PyObject *self, PyObject *args) { Key *k; PyObject *py_k; int ret; if (!PyArg_Parse(args, "(O)",&py_k)) return NULL; else { k=PyLong_AsVoidPtr(py_k); ret = keyIsSystem(k); return Py_BuildValue("i",ret); } } static PyObject* py_keyIsUser(PyObject *self, PyObject *args) { Key *k; PyObject *py_k; int ret; if (!PyArg_Parse(args, "(O)",&py_k)) return NULL; else { k=PyLong_AsVoidPtr(py_k); ret = keyIsUser(k); return Py_BuildValue("i",ret); } } static PyObject* py_keyGetNamespace(PyObject *self, PyObject *args) { Key *k; PyObject *py_k; int ret; if (!PyArg_Parse(args, "(O)",&py_k)) return NULL; else { k=PyLong_AsVoidPtr(py_k); ret = keyGetNamespace(k); return Py_BuildValue("i",ret); } } static PyObject* py_keyIsDir(PyObject *self, PyObject *args) { Key *k; PyObject *py_k; int ret; if (!PyArg_Parse(args, "(O)",&py_k)) return NULL; else { k=PyLong_AsVoidPtr(py_k); ret = keyIsDir(k); return Py_BuildValue("i",ret); } } static PyObject* py_keyIsLink(PyObject *self, PyObject *args) { Key *k; PyObject *py_k; int ret; if (!PyArg_Parse(args, "(O)",&py_k)) return NULL; else { k=PyLong_AsVoidPtr(py_k); ret = keyIsLink(k); return Py_BuildValue("i",ret); } } static PyObject* py_keyIsBin(PyObject *self, PyObject *args) { Key *k; PyObject *py_k; int ret; if (!PyArg_Parse(args, "(O)",&py_k)) return NULL; else { k=PyLong_AsVoidPtr(py_k); ret = keyIsBin(k); return Py_BuildValue("i",ret); } } static PyObject* py_keyIsString(PyObject *self, PyObject *args) { Key *k; PyObject *py_k; int ret; if (!PyArg_Parse(args, "(O)",&py_k)) return NULL; else { k=PyLong_AsVoidPtr(py_k); ret = keyIsString(k); return Py_BuildValue("i",ret); } } static PyObject* py_ksInsert(PyObject *self, PyObject *args) { Key *k; PyObject *py_k; KeySet *ks; PyObject *py_ks; int ret; if (!PyArg_Parse(args, "(OO)",&py_ks,&py_k)) return NULL; else { ks=PyLong_AsVoidPtr(py_ks); k=PyLong_AsVoidPtr(py_k); ret = ksInsert(ks,k); return Py_BuildValue("i",ret); } } static PyObject* py_ksAppendKey(PyObject *self, PyObject *args) { Key *k; PyObject *py_k; KeySet *ks; PyObject *py_ks; int ret; if (!PyArg_Parse(args, "(OO)",&py_ks,&py_k)) return NULL; else { ks=PyLong_AsVoidPtr(py_ks); k=PyLong_AsVoidPtr(py_k); ret = ksAppendKey(ks,k); return Py_BuildValue("i",ret); } } static PyObject* py_ksPop(PyObject *self, PyObject *args) { Key *k; PyObject *py_k; KeySet *ks; PyObject *py_ks; int ret; if (!PyArg_Parse(args, "(O)",&py_ks)) return NULL; else { ks=PyLong_AsVoidPtr(py_ks); k = ksPop(ks); py_k=PyLong_FromVoidPtr(k); return Py_BuildValue("i",ret); } } static PyObject* py_ksInsertKeys(PyObject *self, PyObject *args) { KeySet *ks1; PyObject *py_ks1; KeySet *ks2; PyObject *py_ks2; int ret; if (!PyArg_Parse(args, "(OO)",&py_ks1,&py_ks2)) return NULL; else { ks1=PyLong_AsVoidPtr(py_ks1); ks2=PyLong_AsVoidPtr(py_ks2); ret = ksInsertKeys(ks1,ks2); return Py_BuildValue("i",ret); } } static PyObject* py_ksAppend(PyObject *self, PyObject *args) { KeySet *ks1; PyObject *py_ks1; KeySet *ks2; PyObject *py_ks2; int ret; if (!PyArg_Parse(args, "(OO)",&py_ks1,&py_ks2)) return NULL; else { ks1=PyLong_AsVoidPtr(py_ks1); ks2=PyLong_AsVoidPtr(py_ks2); ret = ksInsertKeys(ks1,ks2); return Py_BuildValue("i",ret); } } static PyObject* py_ksSort(PyObject *self, PyObject *args) { KeySet *ks; PyObject *py_ks; int ret; if (!PyArg_Parse(args, "(O)",&py_ks)) return NULL; else { ks=PyLong_AsVoidPtr(py_ks); ksSort(ks); return Py_BuildValue(""); } } static PyObject* py_ksLookupByString(PyObject *self, PyObject *args) { KeySet *ks; PyObject *py_ks, *LongPtr; char *s; long l; unsigned long ul; Key *ret; if (!PyArg_Parse(args, "(Osi)",&py_ks,&s,&l)) return NULL; else { ul=(unsigned long) l; ks=PyLong_AsVoidPtr(py_ks); ret=ksLookupByString(ks,s,ul); LongPtr=PyLong_FromVoidPtr(ret); return LongPtr; } } static PyObject* py_ksLookupByBinary(PyObject *self, PyObject *args) { KeySet *ks; PyObject *py_ks, *LongPtr; char *s; int len; long l; unsigned long ul; Key *ret; if (!PyArg_Parse(args, "(Os#i)",&py_ks,&s,&len,&l)) return NULL; else { ul=(unsigned long) l; ks=PyLong_AsVoidPtr(py_ks); ret=ksLookupByBinary(ks,s,len,ul); LongPtr=PyLong_FromVoidPtr(ret); return LongPtr; } } static PyObject* py_ksCurrent(PyObject *self, PyObject *args) { PyObject *py_ks; KeySet *ks; Key *k; PyObject *py_k; if (!PyArg_Parse(args, "(O)",&py_ks)) return NULL; else { ks=PyLong_AsVoidPtr(py_ks); k=ksCurrent(ks); py_k=PyLong_FromVoidPtr(k); return py_k; } } static PyObject* py_ksHead(PyObject *self, PyObject *args) { PyObject *py_ks; KeySet *ks; Key *k; PyObject *py_k; if (!PyArg_Parse(args, "(O)",&py_ks)) return NULL; else { ks=PyLong_AsVoidPtr(py_ks); k=ksHead(ks); py_k=PyLong_FromVoidPtr(k); return py_k; } } static PyObject* py_ksTail(PyObject *self, PyObject *args) { PyObject *py_ks; KeySet *ks; Key *k; PyObject *py_k; if (!PyArg_Parse(args, "(O)",&py_ks)) return NULL; else { ks=PyLong_AsVoidPtr(py_ks); k=ksTail(ks); py_k=PyLong_FromVoidPtr(k); return py_k; } } static PyObject* py_kdbRemove(PyObject *self, PyObject *args) { PyObject *py_kdb; KDB *kdb; char *s; int ret; if (!PyArg_Parse(args, "(Os)",&py_kdb,&s)) return NULL; else { kdb=PyLong_AsVoidPtr(py_kdb); ret=kdbRemove(kdb,s); return Py_BuildValue("i",ret); } } static struct PyMethodDef elektra_methods[] = { // Tested {"kdbGetChildKeys",py_kdbGetChildKeys,1,"kdbGetChildKeys(handle,parentName,keySet,options) is similar and calls kdbGetKeyChildKeys().\n" "It is provided for convenience." "Instead of passing the parentName with a key it directly uses a string.\n" "Parameters: \n" "\thandle\t key Database handle\n" "\tparentName\t Name of the parent key\n" "\tkeySet\t key Set handle, the result is stored in this ks\n" "\toptions\t options bits\n" "Return: handle to the key, 0 otherwise"}, {"kdbGetKeyChildKeys",py_kdbGetKeyChildKeys,1, "kdbGetKeyChildKeys(handle,parentKey,ks,options) Retrieve a number of inter-related keys\n" "at once. This is one of the most practical methods of the library, and you should use\n" "it to retrieve in one shot all keys needed by your application.\n" "Parameters: \n" "\thandle\t key Database handle\n" "\tparentName\t Name of the parent key\n" "\tkeySet\t key Set handle, the result is stored in this ks\n" "\toptions\t options bits\n" "Return: handle to the key, 0 otherwise"}, {"kdbOpen",py_kdbOpen,0,"kdbOpen() opens the session to the key database and returns a handle."}, {"ksNew",py_ksNew,0,"ksNew() creates a new keyset."}, {"ksDel",py_ksDel,1,"ksDel(ks) deletes a keyset."}, {"kdbClose",py_kdbClose,1,"kdbClose() closes the session to the key database"}, {"ksLookupByName",py_ksLookupByName,1, "ksLookupByName(ks,name,options)\nLook for a Key contained in ks that matches name, starting from ks' ksNext() position.\n" "Parameters: \n" "\tks\t where to look for\n" "\tname\t key name you are looking for\n" "\toptions\t options bits\n" "Return: handle to the key, 0 otherwise" }, // {"keyStealValue",py_keyStealValue,1}, {"keyNew",py_keyNew,1,"keyNew(name) creates a new key with name . Returns a key handle."}, {"keySetName",py_keySetName,0, "keySetName(key,name) sets a new name to the key.\n" "Parameters: \n" "\tkey\t the key handle\n" "\tname\t new key name\n" "Return: size in bytes of this new key" }, {"keySetBinary",py_keySetBinary,1, "keySetBinary(key,value) sets the binary value of a key.\n" "Parameters: \n" "\tkey\t the key handle\n" "\tvalue\t new key value\n" "Return: size in bytes of this new key" }, {"kdbSetKey",py_kdbSetKey,1,"kdbSetKey(handle,key) sets key in the backend storage.\n" "Parameters: \n" "\thandle\t kdb handle\n" "\tkey\t key to set\n" "Return: 0 on succes, -1 on failure" }, {"ksRewind",py_ksRewind,1, "ksRewind(ks) Resets a keySet internal cursor.\n" "Parameter:\n" "\tks\tKeySet\n" "Returns: always 0"}, {"ksNext",py_ksNext,1, "ksNext(ks) returns the next Key in a KeySet.\n" "Parameter:\n" "\tks\tKeySet\n" "Returns: the new current key"}, {"keyGetFullName",py_keyGetFullName,1, "keyGetFullName(key) returns the full name of the key.\n" "Parameter:\n" "\tkey\tthe key, which name should be requested\n" "Returns: full name of the key"}, {"ksGetSize",py_ksGetSize,1, "ksGetSize(ks) Return the number of keys that ks contains.\n" "Parameter:\n" "\tks\tKeySet\n" "Returns: the number of keys that ks contains."}, {"keyGetString",py_keyGetString,1, "keyGetString(key) returns the string value of the key.\n" "Parameter:\n" "\tkey\tthe key\n" "Returns: the string value of the key"}, {"keySetString",py_keySetString,1,"keySetString(key,string) sets the string value of the key.\n" "Parameter:\n" "\tkey\tthe key\n" "\tstring\tthe string to be set\n" "Returns: number of characters of the string"}, {"kdbSetKeys",py_kdbSetKeys,1, "kdbSetKeys(handle,ks) commits the ks KeySet to the backend storage, starting from ks's current " "position until its end.\n" "Parameters: \n" "\thandle\t kdb handle\n" "\tks\t keySet handle\n" "Return: 0 on succes, -1 on failure" }, {"keyGetNameSize",py_keyGetNameSize,1,"keyGetNameSize(key) returns the length of the key name"}, {"keyGetCommentSize",py_keyGetCommentSize,1,"keyGetCommentSize(key) returns the length of the comment"}, {"keyGetName",py_keyGetName,1,"keyGetName(key) returns the key name."}, {"keyGetComment",py_keyGetComment,1,"keyGetComment(key) returns the key comment."}, {"keyClose",py_keyClose,1,"keyClose free the key."}, // Not tested // The following commented functions are not essential /*{"kdbGetValue",py_kdbGetValue,1,"kdbGetValue help message"}, //{"keyGetDataSize",py_keyGetDataSize,1,"keyGetDataSize(key) returns the length of the key data"}, {"kdbGetKeyByParent",py_kdbGetKeyByParent,1,"kdbGetKeyByParent help message"}, {"kdbGetKeyByParentKey",py_kdbGetKeyByParentKey,1,"kdbGetKeyByParentKey help message"}, {"kdbGetValueByParent",py_kdbGetValueByParent,1,"kdbGetValueByParent help message"}, {"kdbSetValue",py_kdbSetValue,1,"kdbSetValue help message"}, {"kdbSetValueByParent",py_kdbSetValueByParent,1,"kdbSetValueByParent help message"}, {"keyInit",py_keyInit,1,"keyInit help message"}, {"keyIsInitialized",py_keyIsInitialized,1," help message"}, {"keyNeedSync",py_keyNeedSync,1,"keyNeedSync help message"}, {"keySetFlag",py_keySetFlag,1,"keySetFlag help message"}, {"keyClearFlag",py_keyClearFlag,1,"keyClearFlag help message"}, {"keyGetFlag",py_keyGetFlag,1,"keyGetFlag help message"}, {"keyGetRootName",py_keyGetRootName,1,"keyGetRootName help message"}, {"keyGetFullRootName",py_keyGetFullRootName,1,"keyGetFullRootName help message"}, {"keyNameGetRootNameSize",py_keyNameGetRootNameSize,1,"keyNameGetRootNameSize help message"}, {"keyGetRootNameSize",py_keyNameGetRootNameSize,1,"keyNameGetRootNameSize help message"}, {"keyBaseName",py_keyBaseName,1,"keyBaseName help message"}, {"keyNameGetBaseNameSize",py_keyNameGetBaseNameSize,1,"keyNameGetBaseNameSize help message"}, {"keyGetBaseNameSize",py_keyGetBaseNameSize,1,"keyGetBaseNameSize help message"}, {"keyAddBaseName",py_keyAddBaseName,1,"keyAddBaseName help message"}, {"keySetBaseName",py_keySetBaseName,1,"keySetBaseName help message"}, */ {"kdbGetKey",py_kdbGetKey,1, "kdbGetKey(handle,key) Fully retrieves the passed key from the backend storage.\n" "The backend will try to get the key, identified through its name.\n" "Parameters: \n" "\thandle\t kdb handle\n" "\tkey\t a key that has the name set\n" "Return: 0 on succes, -1 on failure"}, {"kdbStrError",py_kdbStrErr,1,"kdbStrError returns the string for the errno"}, {"kdbGetErrno",py_kdbGetErrno,1,"kdbGetErrno returns the last errno"}, {"kdbRemove",py_kdbRemove,1,"kdbRemove(kdb_handle,name) removes a key from the database"}, {"keyDup",py_keyDup,1,"keyDup(src,dest) creates a duplicate of src in dest. src and dest are key handles."}, {"keyGetType",py_keyGetType,1,"keyGetType(key) -> returns the type of the key"}, {"keySetType",py_keySetType,1,"keySetType(key,type) sets the key type to type."}, //{"keySetDir",py_keySetDir,1,"keySetDir help message"}, {"keyGetRecordSize",py_keyGetRecordSize,1,"keyGetRecordSize(key) -> int \nreturns the record size of the key."}, {"keyGetFullNameSize",py_keyGetFullNameSize,1,"keyGetFullNameSize(key) -> int\nreturns the fullname size of the key "}, {"keyName",py_keyName,1,"keyName(key) -> String\nreturns the name of the key."}, //{"keyNameGetOneLevel",py_keyNameGetOneLevel,1,"keyNameGetOneLevel help message"}, // TODO //{"keyGetParentName",py_keyGetParentName,1,"keyGetParentName help message"}, //{"keyGetParentNameSize",py_keyGetParentNameSize,1,"keyGetParentNameSize help message"}, {"keyComment",py_keyComment,1,"keyComment(key) -> String returns the comment of key."}, {"keySetComment",py_keySetComment,1,"keySetComment(key,value) sets the comment with value."}, {"keyGetUID",py_keyGetUID,1,"keyGetUID(key) -> int\nreturns the UID."}, {"keySetUID",py_keySetUID,1,"keySetUID(key,uid) \nsets the UID."}, {"keyGetGID",py_keyGetGID,1,"keyGetGID(key) -> int\nreturns the GID."}, {"keySetGID",py_keySetGID,1,"keySetGID(key,gid) sets the gid."}, {"keyGetMode",py_keyGetMode,1,"keyGetMode(key) -> int returns the mode for the key."}, {"keySetMode",py_keySetMode,1,"keySetMode(key,int) sets mode."}, {"keyGetOwnerSize",py_keyGetOwnerSize,1,"keyGetOwnerSize(key) -> int\n returns the size of the owner."}, {"keyOwner",py_keyOwner,1,"keyOwner(key) -> string\nreturns the owner of the key."}, {"keySetOwner",py_keySetOwner,1,"keySetOwner(key,owner) sets the key owner to owner."}, // The following methods are not supported in python binding // {"keyGetValueSize",py_keyGetValueSize,1,"keyGetValueSize(key) returns the size of the value."}, // {"keyValue",py_keyValue,1,"keyValue help message"}, // {"keyGetBinary",py_keyGetBinary,1,"keyGetBinary help message"}, {"keyGetLink",py_keyGetLink,1,"keyGetLink(key) -> string\nreturns the link"}, {"keySetLink",py_keySetLink,1,"keySetLink(key,value)\n sets the link value"}, {"keyGetMTime",py_keyGetMTime,1,"keyGetMTime(key) -> int\nreturns the MTime."}, {"keyGetATime",py_keyGetATime,1,"keyGetATime(key) -> int\nreturns the ATime."}, {"keyGetCTime",py_keyGetCTime,1,"keyGetCTime(key) -> int\nreturns the CTime."}, {"keyIsSystem",py_keyIsSystem,1,"keyIsSystem(key) -> int\nCheck whether a key is under the system namespace or not.\n" "Returns: 1 if key name begins with system, 0 otherwise." }, {"keyIsUser",py_keyIsUser,1,"keyIsUser(key) -> int\nCheck whether a key is under the user namespace or not.\n" "Returns: 1 if key name begins with user, 0 otherwise." }, //{"keyGetNamespace",py_keyGetNamespace,1,"keyGetNamespace help message"}, //redundant {"keyIsDir",py_keyIsDir,1, "keyIsDir(key) -> int\nCheck if a key is folder key.\n" "Returns: 1 if key is a folder, 0 otherwise." }, {"keyIsLink",py_keyIsLink,1, "keyIsLink(key) -> int\nCheck if a key is a link key.\n" "Returns: 1 if key is a link, 0 otherwise." }, {"keyIsBin",py_keyIsBin,1, "keyIsBin(key) -> int\nCheck if a key is binary type.\n" "Returns: 1 if it is binary." }, {"keyIsString",py_keyIsString,1,"keyIsString(key) -> int\nCheck if a key is a string type.\n" "Returns: 1 if it is not binary." }, //{"keyToStream",py_keyToStream,1,"keyToStream help message"}, //TODO //{"keyToStreamBasename",py_keyToStreamBasename,1,"keyToStreamBasename help message"}, //TODO {"ksInsert",py_ksInsert,1, "ksInsert(ks,key) inserts a new Key in the beginning of the KeySet. A reference to the key will be\n" "stored, and not a copy of the key. So a future ksClose() or ksDel() on ks will keyDel() the key object.\n" "Parameters: \n" "\tks\t the keyset\n" "\tkey\t key that will be inserted in the keyset\n" "Return: size of keyset after insertion." }, {"ksAppend",py_ksAppend,1, "ksAppendKey(ks,key) appends a new Key at the end of the KeySet. A reference to the key will be stored\n" ", and not a copy of the key. So a future ksClose() or ksDel() on ks will keyDel() the key object.\n" "Parameters: \n" "\tks\t the keyset\n" "\tkey\t key that will be appended in the keyset\n" "Return: size of keyset after insertion." }, {"ksPop",py_ksPop,1, "ksPop(ks) Remove and return the first key of ks." "If ks' cursor was positioned in the poped key, ks will be ksRewind()ed. " }, {"ksPopLast",py_ksPopLast,1,"ksPop(ks) Remove and return the last key of ks." "If ks' cursor was positioned in the poped key, ks will be ksRewind()ed. " }, {"ksInsertKeys",py_ksInsertKeys,1, "ksInsertKeys(ks,toInsert) transfers all keys from toInsert to the begining of ks.\n" "After this call, toInsert will be empty and can be deleted with ksDel()\n" "Returns: the size of the KeySet after transfer." }, {"ksAppend",py_ksAppend,1, "ksAppend(ks,toAppend) Transfers all toAppend contained keys to the end of the ks\n" "After this call, toAppend will be empty and can be deleted with ksDel()\n" "Returns: the size of the KeySet after transfer." }, //{"ksToStream",py_ksToStream,1,"ksToStream help message"}, // TODO {"ksSort",py_ksSort,1,"ksSort(ks) sorts a KeySet aphabetically by Key name, using qsort()." }, {"ksLookupByString",py_ksLookupByString,1, "ksLookupByString(ks,value,options) lookups for a Key contained in ks KeySet that\n" "matches value, starting from ks' ksNext() position.\n" "Parameters: \n" "\tks\t where to look for\n" "\tvalue\t the value which owner key you want to find\n" "\toptions\t option bits\n" "Returns: the key found, 0 otherwise." }, {"ksLookupByBinary",py_ksLookupByBinary,1, "ksLookupByBinary(ks,value,options) lookups for a Key contained in ks KeySet that\n" "matches the binary value, starting from ks' ksNext() position.\n" "Parameters: \n" "\tks\t where to look for\n" "\tvalue\t the value which owner key you want to find\n" "\toptions\t option bits\n" "Returns: the key found, 0 otherwise." }, //{"ksLookupRE",py_ksLookupRE,1,"ksLookupRE help message"}, {"ksCurrent",py_ksCurrent,1,"ksCurrent(ks) returns the current Key or 0 if you reached the end"}, {"ksHead",py_ksHead,1,"ksHead(ks) returns the first key in the KeySet, without changing the KeySet's internal cursor."}, {"ksTail",py_ksTail,1,"ksTail(ks) returns the last key in the KeySet, without changing the KeySet's internal cursor."}, {NULL,NULL,0,NULL} }; void initlibpyelektra() { (void) Py_InitModule("libpyelektra", elektra_methods); } elektra-0.7.1/src/bindings/python/test.py0000644000076400001440000000310711361542117015327 00000000000000#!/usr/bin/python # try: # python test.py -v # You need the kdb tool installed """ >>> ###################### libelektra tests ######################## >>> # Set user/key using the kdbtool and then remove it using kdbRemove >>> import libelektra >>> import elektra >>> import os >>> import string >>> os.system("kdb set user/key 'text'") 0 >>> kdb=libelektra.kdbOpen() >>> libelektra.kdbRemove(kdb,"user/key") 0 >>> ks=libelektra.ksNew() >>> string.strip(os.popen("kdb get user/key").read()) '' >>> # Create a new key using libelektra and check the new key using kdb >>> k=libelektra.keyNew("user/key") >>> libelektra.keySetString(k,"text")!=0 True >>> libelektra.kdbSetKey(kdb,k) 0 >>> string.strip(os.popen("kdb get user/key").read()) 'text' >>> libelektra.kdbGetChildKeys(kdb,"user",ks,1)!=-1 True >>> k=libelektra.ksLookupByName(ks,"/key",0) >>> libelektra.keyGetString(k) 'text' >>> # Close the handles >>> libelektra.keyClose(k) 0 >>> libelektra.kdbClose(kdb) 0 >>> ####################### elektra tests ####################### >>> kdb=elektra.Kdb() >>> kdb.open() >>> os.system("kdb set user/key 'text'") 0 >>> # Remove key >>> kdb.remove("user/key") 0 >>> # Set Key >>> ks=elektra.KeySet() >>> ks.new() >>> k=elektra.Key() >>> k.new("user/key") >>> k.setString("text") 5 >>> kdb.setKey(k) 0 >>> string.strip(os.popen("kdb get user/key").read()) 'text' >>> ks=kdb.getChildKeys("user",norecursive=True) >>> key=ks.lookupByName("/key") >>> key.getString() 'text' >>> k.close() >>> kdb.close() """ def _test(): import doctest doctest.testmod() if __name__ == "__main__": _test() elektra-0.7.1/src/include/0000777000076400001440000000000011365513212012364 500000000000000elektra-0.7.1/src/include/Makefile.am0000644000076400001440000000115111365507605014343 00000000000000 # $Id$ nobase_include_HEADERS = kdb.h kdbloader.h kdbbackend.h kdbtools.h kdbprivate.h kdbos.h EXTRA_DIST = kdbprivate.h.in kdb.h.in kdbprivate.h: kdbprivate.h.in ../../config.status sed -e "s:[@]KDB_DB_SYSTEM[@]:$(sysconfdir)/kdb:" "$(srcdir)/kdbprivate.h.in" > kdbprivate.h kdb.h: kdb.h.in ../../config.status sed -e "s:[@]KDB_VERSION[@]:\"$(KDB_VERSION)\":" "$(srcdir)/kdb.h.in" |\ sed -e "s:[@]KDB_VERSION_MAJOR[@]:$(KDB_VERSION_MAJOR):" |\ sed -e "s:[@]KDB_VERSION_MINOR[@]:$(KDB_VERSION_MINOR):" |\ sed -e "s:[@]KDB_VERSION_MICRO[@]:$(KDB_VERSION_MICRO):" > kdb.h DISTCLEANFILES = kdbprivate.h kdb.h elektra-0.7.1/src/include/Makefile.in0000644000076400001440000003470011365511152014352 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ # $Id$ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = src/include DIST_COMMON = $(nobase_include_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/extensions.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(includedir)" nobase_includeHEADERS_INSTALL = $(install_sh_DATA) HEADERS = $(nobase_include_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) INSTALL = @INSTALL@ ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BACKENDS = @BACKENDS@ BACKEND_VERSION_API = @BACKEND_VERSION_API@ BINDINGS = @BINDINGS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CDBGFLAGS = @CDBGFLAGS@ CFLAGS = @CFLAGS@ COPTFLAGS = @COPTFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSTDFLAGS = @CSTDFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDBGFLAGS = @CXXDBGFLAGS@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXOPTFLAGS = @CXXOPTFLAGS@ CXXSTDFLAGS = @CXXSTDFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_FALSE = @DEBUG_FALSE@ DEBUG_TRUE = @DEBUG_TRUE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ELEKTRATOOLS_VERSION_API = @ELEKTRATOOLS_VERSION_API@ ELEKTRA_VERSION_API = @ELEKTRA_VERSION_API@ EXEEXT = @EXEEXT@ EXPERIMENTAL_FALSE = @EXPERIMENTAL_FALSE@ EXPERIMENTAL_TRUE = @EXPERIMENTAL_TRUE@ F77 = @F77@ FFLAGS = @FFLAGS@ GENHTML = @GENHTML@ GREP = @GREP@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ HAVE_LIBLTDL_FALSE = @HAVE_LIBLTDL_FALSE@ HAVE_LIBLTDL_TRUE = @HAVE_LIBLTDL_TRUE@ HAVE_MAN2HTML_FALSE = @HAVE_MAN2HTML_FALSE@ HAVE_MAN2HTML_TRUE = @HAVE_MAN2HTML_TRUE@ HAVE_XML_FALSE = @HAVE_XML_FALSE@ HAVE_XML_TRUE = @HAVE_XML_TRUE@ HAVE_XSL_FALSE = @HAVE_XSL_FALSE@ HAVE_XSL_TRUE = @HAVE_XSL_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDB_VERSION = @KDB_VERSION@ KDB_VERSION_MAJOR = @KDB_VERSION_MAJOR@ KDB_VERSION_MAJORMINOR = @KDB_VERSION_MAJORMINOR@ KDB_VERSION_MICRO = @KDB_VERSION_MICRO@ KDB_VERSION_MINOR = @KDB_VERSION_MINOR@ LCOV = @LCOV@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VALGRIND = @VALGRIND@ VALGRINDTESTS_FALSE = @VALGRINDTESTS_FALSE@ VALGRINDTESTS_TRUE = @VALGRINDTESTS_TRUE@ VERSION = @VERSION@ XML2_CONFIG = @XML2_CONFIG@ XML_CPPFLAGS = @XML_CPPFLAGS@ XML_LIBS = @XML_LIBS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ backend_static_libs = @backend_static_libs@ backenddir = @backenddir@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ datarootdir = @datarootdir@ dbroot = @dbroot@ default_backend = @default_backend@ default_dbackend = @default_dbackend@ default_docbook = @default_docbook@ develdocdir = @develdocdir@ docdir = @docdir@ doxygen = @doxygen@ dvidir = @dvidir@ elektratools = @elektratools@ exec_prefix = @exec_prefix@ gconf_CFLAGS = @gconf_CFLAGS@ gconf_LIBS = @gconf_LIBS@ hlvlbackenddir = @hlvlbackenddir@ 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@ man2html = @man2html@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ privatelibs = @privatelibs@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ ulibdir = @ulibdir@ xsltproc = @xsltproc@ nobase_include_HEADERS = kdb.h kdbloader.h kdbbackend.h kdbtools.h kdbprivate.h kdbos.h EXTRA_DIST = kdbprivate.h.in kdb.h.in DISTCLEANFILES = kdbprivate.h kdb.h all: config.h $(MAKE) $(AM_MAKEFLAGS) 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 \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/include/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/include/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status src/include/config.h $(srcdir)/config.h.in: $(am__configure_deps) cd $(top_srcdir) && $(AUTOHEADER) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: install-nobase_includeHEADERS: $(nobase_include_HEADERS) @$(NORMAL_INSTALL) test -z "$(includedir)" || $(mkdir_p) "$(DESTDIR)$(includedir)" @$(am__vpath_adj_setup) \ list='$(nobase_include_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ $(am__vpath_adj) \ echo " $(nobase_includeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(includedir)/$$f'"; \ $(nobase_includeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(includedir)/$$f"; \ done uninstall-nobase_includeHEADERS: @$(NORMAL_UNINSTALL) @$(am__vpath_adj_setup) \ list='$(nobase_include_HEADERS)'; for p in $$list; do \ $(am__vpath_adj) \ echo " rm -f '$(DESTDIR)$(includedir)/$$f'"; \ rm -f "$(DESTDIR)$(includedir)/$$f"; \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(HEADERS) config.h installdirs: for dir in "$(DESTDIR)$(includedir)"; 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: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-nobase_includeHEADERS install-exec-am: install-info: install-info-am install-man: 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-info-am uninstall-nobase_includeHEADERS .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool ctags distclean distclean-generic distclean-hdr \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-nobase_includeHEADERS \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-info-am \ uninstall-nobase_includeHEADERS kdbprivate.h: kdbprivate.h.in ../../config.status sed -e "s:[@]KDB_DB_SYSTEM[@]:$(sysconfdir)/kdb:" "$(srcdir)/kdbprivate.h.in" > kdbprivate.h kdb.h: kdb.h.in ../../config.status sed -e "s:[@]KDB_VERSION[@]:\"$(KDB_VERSION)\":" "$(srcdir)/kdb.h.in" |\ sed -e "s:[@]KDB_VERSION_MAJOR[@]:$(KDB_VERSION_MAJOR):" |\ sed -e "s:[@]KDB_VERSION_MINOR[@]:$(KDB_VERSION_MINOR):" |\ sed -e "s:[@]KDB_VERSION_MICRO[@]:$(KDB_VERSION_MICRO):" > kdb.h # 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: elektra-0.7.1/src/include/config.h.in0000644000076400001440000001751611365511145014340 00000000000000/* src/include/config.h.in. Generated from configure.ac by autoheader. */ /* Define to 1 if the `closedir' function returns void instead of `int'. */ #undef CLOSEDIR_VOID /* disable debug output messages */ #undef DEBUG /* Define this if mntent follows glibc conventions */ #undef GETMNTENT_GLIBC /* Working getopt */ #undef HASGETOPT /* sigaction available */ #undef HASSIGACTION /* POSIX signal available */ #undef HASSIGPROCMASK /* Define to 1 if your system has a working `chown' function. */ #undef HAVE_CHOWN /* Define to 1 if you have the `clearenv' function. */ #undef HAVE_CLEARENV /* Define to 1 if you have the `ctime_r' function. */ #undef HAVE_CTIME_R /* Define to 1 if you have the header file. */ #undef HAVE_CTYPE_H /* Define to 1 if you have the header file. */ #undef HAVE_DB_H /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_DIRENT_H /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the header file. */ #undef HAVE_ERRNO_H /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* Define to 1 if you have the `ftruncate' function. */ #undef HAVE_FTRUNCATE /* Define to 1 if you have the `getgid' function. */ #undef HAVE_GETGID /* Define to 1 if you have the `getmntent' function. */ #undef HAVE_GETMNTENT /* Define to 1 if you have the `gettimeofday' function. */ #undef HAVE_GETTIMEOFDAY /* Define to 1 if you have the `getuid' function. */ #undef HAVE_GETUID /* Define if you have the iconv() function and it works. */ #undef HAVE_ICONV /* Define to 1 if you have the `index' function. */ #undef HAVE_INDEX /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_LANGINFO_H /* Define to 1 if you have libltdl */ #undef HAVE_LIBLTDL /* Define to 1 if you have the header file. */ #undef HAVE_LIMITS_H /* Define to 1 if you have the header file. */ #undef HAVE_LOCALE_H /* Define to 1 if you have the header file. */ #undef HAVE_LTDL_H /* Define to 1 if your system has a GNU libc compatible `malloc' function, and to 0 otherwise. */ #undef HAVE_MALLOC /* Define to 1 if you have the `memmove' function. */ #undef HAVE_MEMMOVE /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `memset' function. */ #undef HAVE_MEMSET /* Define to 1 if you have the `mkdir' function. */ #undef HAVE_MKDIR /* Define to 1 if you have the header file. */ #undef HAVE_MNTENT_H /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_NDIR_H /* Define to 1 if you have the `nl_langinfo' function. */ #undef HAVE_NL_LANGINFO /* Define to 1 if you have the `putenv' function. */ #undef HAVE_PUTENV /* Define this if pwd.h is present on your system */ #undef HAVE_PWD_H /* Define to 1 if your system has a GNU libc compatible `realloc' function, and to 0 otherwise. */ #undef HAVE_REALLOC /* Define to 1 if you have the `rindex' function. */ #undef HAVE_RINDEX /* Define to 1 if you have the `rmdir' function. */ #undef HAVE_RMDIR /* Define to 1 if you have the `setenv' function. */ #undef HAVE_SETENV /* Define to 1 if you have the `setlocale' function. */ #undef HAVE_SETLOCALE /* Define to 1 if you have the `sigaction' function. */ #undef HAVE_SIGACTION /* Define to 1 if you have the header file. */ #undef HAVE_SIGNAL_H /* Define to 1 if you have the `sigprocmask' function. */ #undef HAVE_SIGPROCMASK /* Define to 1 if you have the `socket' function. */ #undef HAVE_SOCKET /* Define to 1 if `stat' has the bug that it succeeds when given the zero-length file name argument. */ #undef HAVE_STAT_EMPTY_STRING_BUG /* Define to 1 if stdbool.h conforms to C99. */ #undef HAVE_STDBOOL_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDIO_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `strcasecmp' function. */ #undef HAVE_STRCASECMP /* Define to 1 if you have the `strchr' function. */ #undef HAVE_STRCHR /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the `strndup' function. */ #undef HAVE_STRNDUP /* Define to 1 if you have the `strrchr' function. */ #undef HAVE_STRRCHR /* Define to 1 if you have the `strstr' function. */ #undef HAVE_STRSTR /* Define to 1 if you have the `strtol' function. */ #undef HAVE_STRTOL /* Define to 1 if `pid' is member of `struct ucred'. */ #undef HAVE_STRUCT_UCRED_PID /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_SYS_DIR_H /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_SYS_NDIR_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define if you are compiling for win32 */ #undef HAVE_WIN32 /* Define to 1 if the system has the type `_Bool'. */ #undef HAVE__BOOL /* Define as const if the declaration of iconv() needs const. */ #undef ICONV_CONST /* path for elektra.xsd */ #undef KDB_SCHEMA_PATH /* Define to 1 if `lstat' dereferences a symlink specified with a trailing slash. */ #undef LSTAT_FOLLOWS_SLASHED_SYMLINK /* Define to 1 if your C compiler doesn't accept -c and -o together. */ #undef NO_MINUS_C_MINUS_O /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME /* disable verbose output messages */ #undef VERBOSE /* Version number of package */ #undef VERSION /* Define to 1 if on AIX 3. System headers sometimes define this. We just want to avoid a redefinition error message. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif /* Define to 1 if on MINIX. */ #undef _MINIX /* Define to 2 if the system does not provide POSIX.1 features except with this defined. */ #undef _POSIX_1_SOURCE /* Define to 1 if you need to in order for `stat' and other things to work. */ #undef _POSIX_SOURCE /* Enable extensions on Solaris. */ #ifndef __EXTENSIONS__ # undef __EXTENSIONS__ #endif #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS #endif /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `int' if does not define. */ #undef gid_t /* Define to rpl_malloc if the replacement function should be used. */ #undef malloc /* Define to `int' if does not define. */ #undef mode_t /* Define to `long int' if does not define. */ #undef off_t /* Define to rpl_realloc if the replacement function should be used. */ #undef realloc /* Define to `unsigned int' if does not define. */ #undef size_t /* Define to `int' if does not define. */ #undef ssize_t /* Define to `unsigned long' if does not define. */ #undef time_t /* Define to `int' if doesn't define. */ #undef uid_t elektra-0.7.1/src/include/kdb.h0000644000076400001440000001446411365511510013221 00000000000000/*************************************************************************** kdb.h - Exported methods of the Library ------------------- begin : Mon Dec 29 2003 copyright : (C) 2003 by Avi Alkalay copyright : (C) 2008 by Markus Raab email : avi@unix.sh, elektra@markus-raab.org ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ #ifndef KDB_H #define KDB_H #include "kdbos.h" #define KDB_VERSION "0.7.1" #define KDB_VERSION_MAJOR 0 #define KDB_VERSION_MINOR 7 #define KDB_VERSION_MICRO 1 #define KS_END ((Key*)0) enum { KEY_TYPE_UNDEFINED=0, KEY_TYPE_BINARY=20, KEY_TYPE_STRING=40, KEY_TYPE_MAX=256 }; enum { KEY_END=0, KEY_NAME=1, KEY_VALUE=1<<1, KEY_OWNER=1<<2, KEY_COMMENT=1<<3, KEY_TYPE=1<<4, KEY_UID=1<<5, KEY_GID=1<<6, KEY_MODE=1<<7, KEY_ATIME=1<<8, KEY_MTIME=1<<9, KEY_CTIME=1<<10, KEY_SIZE=1<<11, KEY_REMOVE=1<<12, KEY_STAT=1<<13, KEY_DIR=1<<14 }; enum { KDB_O_NONE=0, KDB_O_DEL=1, KDB_O_POP=1<<1, KDB_O_NODIR=1<<2, KDB_O_DIRONLY=1<<3, KDB_O_NOSTAT=1<<4, KDB_O_STATONLY=1<<5, KDB_O_NOREMOVE=1<<6, KDB_O_REMOVEONLY=1<<7, KDB_O_INACTIVE=1<<8, KDB_O_SYNC=1<<9, KDB_O_SORT=1<<10, KDB_O_NORECURSIVE=1<<11, KDB_O_NOCASE=1<<12, KDB_O_WITHOWNER=1<<13, KDB_O_NOALL=1<<14 }; #ifdef __cplusplus namespace ckdb { extern "C" { #endif typedef struct _KDB KDB; typedef struct _Key Key; typedef struct _KeySet KeySet; /************************************** * * KDB methods * **************************************/ KDB * kdbOpen(void); int kdbClose(KDB *handle); ssize_t kdbGet(KDB *handle, KeySet *returned, Key * parentKey, option_t options); ssize_t kdbSet(KDB *handle, KeySet *returned, Key * parentKey, option_t options); ssize_t kdbGetByName(KDB *handle, KeySet *returned, const char *parentName, option_t options); int kdbGetKey(KDB *handle, Key *key); int kdbSetKey(KDB *handle, const Key *key); int kdbGetString(KDB *handle, const char *keyname, char *returned, size_t maxSize); int kdbSetString(KDB *handle, const char *keyname, const char *value); int kdbRemove(KDB *handle, const char *keyname); /************************************** * * Key methods * **************************************/ /* Basic Methods */ Key *keyNew(const char *keyname, ...); Key *keyVNew(const char *keyname, va_list ap); Key *keyDup(const Key *source); int keyCopy(Key *dest, const Key *source); int keyDel(Key *key); ssize_t keyIncRef(Key *key); ssize_t keyDecRef(Key *key); ssize_t keyGetRef(const Key *key); /* Meta Info */ int keyStat(Key *key); int keyRemove(Key *key); uid_t keyGetUID(const Key *key); int keySetUID(Key *key, uid_t uid); gid_t keyGetGID(const Key *key); int keySetGID(Key *key, gid_t gid); int keySetDir(Key *key); mode_t keyGetMode(const Key *key); int keySetMode(Key *key, mode_t mode); type_t keyGetType(const Key *key); int keySetType(Key *key, type_t type); time_t keyGetATime(const Key *key); int keySetATime(Key *key, time_t atime); time_t keyGetMTime(const Key *key); int keySetMTime(Key *key, time_t mtime); time_t keyGetCTime(const Key *key); int keySetCTime(Key *key, time_t ctime); /* Methods for Making Tests */ int keyNeedStat(const Key *key); int keyNeedSync(const Key *key); int keyNeedRemove(const Key *key); int keyIsSystem(const Key *key); int keyIsUser(const Key *key); int keyIsBelow(const Key *key, const Key *check); int keyIsDirectBelow(const Key *key, const Key *check); int keyIsInactive(const Key *key); int keyIsDir(const Key *key); int keyIsBinary(const Key *key); int keyIsString(const Key *key); /* Name Manipulation Methods */ const char *keyName(const Key *key); ssize_t keyGetNameSize(const Key *key); ssize_t keyGetName(const Key *key, char *returnedName, size_t maxSize); ssize_t keySetName(Key *key, const char *newname); ssize_t keyGetFullNameSize(const Key *key); ssize_t keyGetFullName(const Key *key, char *returnedName, size_t maxSize); const char *keyBaseName(const Key *key); ssize_t keyGetBaseNameSize(const Key *key); ssize_t keyGetBaseName(const Key *key, char *returned, size_t maxSize); ssize_t keyAddBaseName(Key *key,const char *baseName); ssize_t keySetBaseName(Key *key,const char *baseName); const char *keyOwner(const Key *key); ssize_t keyGetOwnerSize(const Key *key); ssize_t keyGetOwner(const Key *key, char *returned, size_t maxSize); ssize_t keySetOwner(Key *key, const char *owner); /* Value Manipulation Methods */ const void *keyValue(const Key *key); ssize_t keyGetValueSize(const Key *key); ssize_t keyGetString(const Key *key, char *returnedString, size_t maxSize); ssize_t keySetString(Key *key, const char *newString); ssize_t keyGetBinary(const Key *key, void *returnedBinary, size_t maxSize); ssize_t keySetBinary(Key *key, const void *newBinary, size_t dataSize); const char *keyComment(const Key *key); ssize_t keyGetCommentSize(const Key *key); ssize_t keyGetComment(const Key *key, char *returnedDesc, size_t maxSize); ssize_t keySetComment(Key *key, const char *newDesc); /************************************** * * KeySet methods * **************************************/ KeySet *ksNew(size_t alloc, ...); KeySet *ksVNew(size_t alloc, va_list ap); KeySet *ksDup(const KeySet * source); int ksCopy(KeySet *dest, const KeySet *source); int ksDel(KeySet *ks); void ksSort(KeySet *ks); ssize_t ksGetSize(const KeySet *ks); ssize_t ksAppendKey(KeySet *ks, Key *toAppend); ssize_t ksAppend(KeySet *ks, const KeySet *toAppend); Key *ksPop(KeySet *ks); int ksRewind(KeySet *ks); Key *ksNext(KeySet *ks); Key *ksCurrent(const KeySet *ks); Key *ksHead(const KeySet *ks); Key *ksTail(const KeySet *ks); cursor_t ksGetCursor(const KeySet *ks); int ksSetCursor(KeySet *ks, cursor_t cursor); Key *ksLookup(KeySet *ks, Key *k, option_t options); Key *ksLookupByName(KeySet *ks, const char *name, option_t options); #ifdef __cplusplus } } #endif #endif /* KDB_H */ elektra-0.7.1/src/include/kdb.h.in0000644000076400001440000001456011365506635013637 00000000000000/*************************************************************************** kdb.h - Exported methods of the Library ------------------- begin : Mon Dec 29 2003 copyright : (C) 2003 by Avi Alkalay copyright : (C) 2008 by Markus Raab email : avi@unix.sh, elektra@markus-raab.org ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ #ifndef KDB_H #define KDB_H #include "kdbos.h" #define KDB_VERSION @KDB_VERSION@ #define KDB_VERSION_MAJOR @KDB_VERSION_MAJOR@ #define KDB_VERSION_MINOR @KDB_VERSION_MINOR@ #define KDB_VERSION_MICRO @KDB_VERSION_MICRO@ #define KS_END ((Key*)0) enum { KEY_TYPE_UNDEFINED=0, KEY_TYPE_BINARY=20, KEY_TYPE_STRING=40, KEY_TYPE_MAX=256 }; enum { KEY_END=0, KEY_NAME=1, KEY_VALUE=1<<1, KEY_OWNER=1<<2, KEY_COMMENT=1<<3, KEY_TYPE=1<<4, KEY_UID=1<<5, KEY_GID=1<<6, KEY_MODE=1<<7, KEY_ATIME=1<<8, KEY_MTIME=1<<9, KEY_CTIME=1<<10, KEY_SIZE=1<<11, KEY_REMOVE=1<<12, KEY_STAT=1<<13, KEY_DIR=1<<14 }; enum { KDB_O_NONE=0, KDB_O_DEL=1, KDB_O_POP=1<<1, KDB_O_NODIR=1<<2, KDB_O_DIRONLY=1<<3, KDB_O_NOSTAT=1<<4, KDB_O_STATONLY=1<<5, KDB_O_NOREMOVE=1<<6, KDB_O_REMOVEONLY=1<<7, KDB_O_INACTIVE=1<<8, KDB_O_SYNC=1<<9, KDB_O_SORT=1<<10, KDB_O_NORECURSIVE=1<<11, KDB_O_NOCASE=1<<12, KDB_O_WITHOWNER=1<<13, KDB_O_NOALL=1<<14 }; #ifdef __cplusplus namespace ckdb { extern "C" { #endif typedef struct _KDB KDB; typedef struct _Key Key; typedef struct _KeySet KeySet; /************************************** * * KDB methods * **************************************/ KDB * kdbOpen(void); int kdbClose(KDB *handle); ssize_t kdbGet(KDB *handle, KeySet *returned, Key * parentKey, option_t options); ssize_t kdbSet(KDB *handle, KeySet *returned, Key * parentKey, option_t options); ssize_t kdbGetByName(KDB *handle, KeySet *returned, const char *parentName, option_t options); int kdbGetKey(KDB *handle, Key *key); int kdbSetKey(KDB *handle, const Key *key); int kdbGetString(KDB *handle, const char *keyname, char *returned, size_t maxSize); int kdbSetString(KDB *handle, const char *keyname, const char *value); int kdbRemove(KDB *handle, const char *keyname); /************************************** * * Key methods * **************************************/ /* Basic Methods */ Key *keyNew(const char *keyname, ...); Key *keyVNew(const char *keyname, va_list ap); Key *keyDup(const Key *source); int keyCopy(Key *dest, const Key *source); int keyDel(Key *key); ssize_t keyIncRef(Key *key); ssize_t keyDecRef(Key *key); ssize_t keyGetRef(const Key *key); /* Meta Info */ int keyStat(Key *key); int keyRemove(Key *key); uid_t keyGetUID(const Key *key); int keySetUID(Key *key, uid_t uid); gid_t keyGetGID(const Key *key); int keySetGID(Key *key, gid_t gid); int keySetDir(Key *key); mode_t keyGetMode(const Key *key); int keySetMode(Key *key, mode_t mode); type_t keyGetType(const Key *key); int keySetType(Key *key, type_t type); time_t keyGetATime(const Key *key); int keySetATime(Key *key, time_t atime); time_t keyGetMTime(const Key *key); int keySetMTime(Key *key, time_t mtime); time_t keyGetCTime(const Key *key); int keySetCTime(Key *key, time_t ctime); /* Methods for Making Tests */ int keyNeedStat(const Key *key); int keyNeedSync(const Key *key); int keyNeedRemove(const Key *key); int keyIsSystem(const Key *key); int keyIsUser(const Key *key); int keyIsBelow(const Key *key, const Key *check); int keyIsDirectBelow(const Key *key, const Key *check); int keyIsInactive(const Key *key); int keyIsDir(const Key *key); int keyIsBinary(const Key *key); int keyIsString(const Key *key); /* Name Manipulation Methods */ const char *keyName(const Key *key); ssize_t keyGetNameSize(const Key *key); ssize_t keyGetName(const Key *key, char *returnedName, size_t maxSize); ssize_t keySetName(Key *key, const char *newname); ssize_t keyGetFullNameSize(const Key *key); ssize_t keyGetFullName(const Key *key, char *returnedName, size_t maxSize); const char *keyBaseName(const Key *key); ssize_t keyGetBaseNameSize(const Key *key); ssize_t keyGetBaseName(const Key *key, char *returned, size_t maxSize); ssize_t keyAddBaseName(Key *key,const char *baseName); ssize_t keySetBaseName(Key *key,const char *baseName); const char *keyOwner(const Key *key); ssize_t keyGetOwnerSize(const Key *key); ssize_t keyGetOwner(const Key *key, char *returned, size_t maxSize); ssize_t keySetOwner(Key *key, const char *owner); /* Value Manipulation Methods */ const void *keyValue(const Key *key); ssize_t keyGetValueSize(const Key *key); ssize_t keyGetString(const Key *key, char *returnedString, size_t maxSize); ssize_t keySetString(Key *key, const char *newString); ssize_t keyGetBinary(const Key *key, void *returnedBinary, size_t maxSize); ssize_t keySetBinary(Key *key, const void *newBinary, size_t dataSize); const char *keyComment(const Key *key); ssize_t keyGetCommentSize(const Key *key); ssize_t keyGetComment(const Key *key, char *returnedDesc, size_t maxSize); ssize_t keySetComment(Key *key, const char *newDesc); /************************************** * * KeySet methods * **************************************/ KeySet *ksNew(size_t alloc, ...); KeySet *ksVNew(size_t alloc, va_list ap); KeySet *ksDup(const KeySet * source); int ksCopy(KeySet *dest, const KeySet *source); int ksDel(KeySet *ks); void ksSort(KeySet *ks); ssize_t ksGetSize(const KeySet *ks); ssize_t ksAppendKey(KeySet *ks, Key *toAppend); ssize_t ksAppend(KeySet *ks, const KeySet *toAppend); Key *ksPop(KeySet *ks); int ksRewind(KeySet *ks); Key *ksNext(KeySet *ks); Key *ksCurrent(const KeySet *ks); Key *ksHead(const KeySet *ks); Key *ksTail(const KeySet *ks); cursor_t ksGetCursor(const KeySet *ks); int ksSetCursor(KeySet *ks, cursor_t cursor); Key *ksLookup(KeySet *ks, Key *k, option_t options); Key *ksLookupByName(KeySet *ks, const char *name, option_t options); #ifdef __cplusplus } } #endif #endif /* KDB_H */ elektra-0.7.1/src/include/kdbbackend.h0000644000076400001440000001315111365506635014535 00000000000000/*************************************************************************** kdbbackend.h - Methods for backend programing ------------------- begin : Mon Dec 25 2004 copyright : (C) 2004 by Avi Alkalay email : avi@unix.sh ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ /*You have to include this file in order to write backends or for internal *source files for elektra. You do not need this functions to use elektra!*/ #ifndef KDBBACKEND_H #define KDBBACKEND_H #include #include #ifdef ELEKTRA_STATIC #define KDBEXPORT(module) KDB *libelektra_##module##_LTX_kdbBackendFactory(void) #else #define KDBEXPORT(module) KDB *kdbBackendFactory(void) #endif /** * Switches to denote the backend methods. Used in calls to kdbBackendExport(). * * @ingroup backend */ typedef enum { KDB_BE_OPEN=1, /*!< Next arg is backend for kdbOpen() */ KDB_BE_CLOSE=1<<1, /*!< Next arg is backend for kdbClose() */ KDB_BE_GET=1<<2, /*!< Next arg is backend for kdbGet() */ KDB_BE_SET=1<<3, /*!< Next arg is backend for kdbSet() */ KDB_BE_VERSION=1<<4, /*!< Next arg is char * for Version */ KDB_BE_DESCRIPTION=1<<5,/*!< Next arg is char * for Description */ KDB_BE_AUTHOR=1<<6, /*!< Next arg is char * for Author*/ KDB_BE_LICENCE=1<<7, /*!< Next arg is char * for Licence*/ KDB_BE_END=0 /*!< End of arguments */ } backend_t; #ifdef __cplusplus extern "C" { #endif KDB *kdbBackendExport(const char *backendName, ...); /* Mounting API */ int kdbMount(KDB *handle, const Key *mountpoint, const KeySet *config); int kdbUnmount(KDB *handle, const Key *mountpoint); Key *kdbGetMountpoint(KDB *handle, const Key *where); /* Idea for new api... unsigned long kdbGetCapability(KDB *handle, const Key *where, unsigned long mask); const char *kdbGetString(KDB *handle, const Key *where, unsigned long which); */ /* Old capability API */ KDBCap *kdbGetCapability(KDB *handle, const Key *where); int kdbhGetErrno(const KDB *handle); /* Some internal methods */ int kdbiRealloc (void ** buffer, size_t size); void* kdbiMalloc (size_t size); void kdbiFree (void *ptr); char *kdbiStrDup (const char *s); size_t kdbiStrLen(const char *s); ssize_t kdbbEncode(void *kdbbDecoded, size_t size, char *returned); ssize_t kdbbDecode(char *kdbbEncoded,void *returned); int kdbbNeedsUTF8Conversion(void); int kdbbkdbbUTF8Engine(int direction, char **string, size_t *inputOutputByteSize); int kdbbEncodeChar(char c, char *buffer, size_t bufSize); int kdbbDecodeChar(const char *from, char *into); int kdbbFilenameToKeyName(const char *string, char *buffer, int bufSize); int kdbbKeyNameToRelativeFilename(const char *string, char *buffer, size_t bufSize); ssize_t kdbbKeyCalcRelativeFilename(const Key *key,char *relativeFilename,size_t maxSize); ssize_t kdbbGetFullKeyName (KDB *handle, const char *forFilename, const Key *parentKey, Key *returned); ssize_t kdbbGetFullFilename(KDB *handle, const Key *forKey,char *returned,size_t maxSize); /* Some handle manipulation methods */ void *kdbhGetBackendData(const KDB *handle); void *kdbhSetBackendData(KDB *handle, void *data); KDBCap* kdbhSetCapability(KDB *handle, KDBCap *cap); KDBCap* kdbhGetCapability(const KDB *handle); Trie *kdbhGetTrie(const KDB *handle); void kdbhSetTrie(KDB *handle, Trie *trie); const Key *kdbhGetMountpoint(KDB *handle); void kdbhSetMountpoint(KDB *handle, const Key* mountpoint); KeySet *kdbhGetConfig(KDB *handle); /* Capability methods */ KDBCap *capNew (void); void capDel (KDBCap *cap); const char *kdbcGetName (const KDBCap *cap); const char *kdbcGetVersion (const KDBCap *cap); const char *kdbcGetDescription (const KDBCap *cap); const char *kdbcGetAuthor (const KDBCap *cap); const char *kdbcGetLicence (const KDBCap *cap); /* too many functions, use flags */ unsigned int kdbcGetonlyFullGet (const KDBCap *cap); unsigned int kdbcGetonlyFullSet (const KDBCap *cap); unsigned int kdbcGetonlyRemoveAll (const KDBCap *cap); unsigned int kdbcGetonlyAddKeys (const KDBCap *cap); unsigned int kdbcGetonlySystem (const KDBCap *cap); unsigned int kdbcGetonlyUser (const KDBCap *cap); unsigned int kdbcGetonlyFullSync (const KDBCap *cap); unsigned int kdbcGetnoOwner (const KDBCap *cap); unsigned int kdbcGetnoValue (const KDBCap *cap); unsigned int kdbcGetnoComment (const KDBCap *cap); unsigned int kdbcGetnoUID (const KDBCap *cap); unsigned int kdbcGetnoGID (const KDBCap *cap); unsigned int kdbcGetnoMode (const KDBCap *cap); unsigned int kdbcGetnoDir (const KDBCap *cap); unsigned int kdbcGetnoATime (const KDBCap *cap); unsigned int kdbcGetnoMTime (const KDBCap *cap); unsigned int kdbcGetnoCTime (const KDBCap *cap); unsigned int kdbcGetnoRemove (const KDBCap *cap); unsigned int kdbcGetnoStat (const KDBCap *cap); unsigned int kdbcGetnoMount (const KDBCap *cap); unsigned int kdbcGetnoBinary (const KDBCap *cap); unsigned int kdbcGetnoString (const KDBCap *cap); unsigned int kdbcGetnoTypes (const KDBCap *cap); unsigned int kdbcGetnoError (const KDBCap *cap); unsigned int kdbcGetnoLock (const KDBCap *cap); unsigned int kdbcGetnoThread (const KDBCap *cap); #ifdef __cplusplus } #endif #endif /* KDBBACKEND_H */ elektra-0.7.1/src/include/kdbloader.h0000644000076400001440000000202111365506635014406 00000000000000/* $Id$ */ #ifndef KDBLIBLOADER_H #define KDBLIBLOADER_H #ifdef ELEKTRA_STATIC /* The static case * * Struct which contain export symbols * Format : * -------- * * filename, NULL * symbol1, &func1, * symbol2, &func2, * filename2, NULL * symbol3, &func3, * symboln, &funcn, * NULL, NULL */ typedef struct { const char *name; void (*function)(void); } kdblib_symbol; typedef kdblib_symbol* kdbLibHandle; extern kdblib_symbol kdb_exported_syms[]; #else # ifdef WIN32 /* Windows case, non static */ # include typedef HMODULE kdbLibHandle; # else /* Default case */ # include typedef lt_dlhandle kdbLibHandle; # endif #endif /* General pointer to kdbLib Functions and pointer to kdbLibBackend function */ typedef void (*kdbLibFunc)(void); /* Functions */ int kdbLibInit(void); kdbLibHandle kdbLibLoad(const char *backendName); kdbLibFunc kdbLibSym(kdbLibHandle handle, const char *symbol); int kdbLibClose(kdbLibHandle handle); const char *kdbLibError(void); #endif /* KDBLIBLOADER_H */ elektra-0.7.1/src/include/kdbos.h0000644000076400001440000001163311365506635013572 00000000000000/*************************************************************************** kdbos.h - operating system specific workarounds ------------------- begin : Mon Dec 29 2003 copyright : (C) 2003 by Avi Alkalay email : avi@unix.sh ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ /* This header purpose is that afterwards following types are defined: * .. means don't care, just enough for your system * For more information on that types read POSIX documentation. * * Type Purpose Limits * size_t size of array or string 0, SIZE_MAX * ssize_t size with error cond. -1, SSIZE_MAX(. * * Go ahead and write a #ifdef block for your operating system * when the POSIX defaults are not ok. */ #ifndef KDBOS_H #define KDBOS_H /* Include essential headers used in kdb.h */ #include #ifndef WIN32 /*************************************************** * Posix Compatible ***************************************************/ #ifndef __USE_POSIX #define __USE_POSIX #endif #include /* Conforming C++ programs are not allowed to * include inttypes.h*/ #include #include /**Separator for Path names*/ #define PATH_SEPARATOR '/' /**MAX_PATH_LENGTH will be the value for longest * possible filenames on the system.*/ /*Some systems have even longer pathnames*/ #ifdef PATH_MAX #define MAX_PATH_LENGTH PATH_MAX /*This value is garanteed on any Posixsystem*/ #elif defined __USE_POSIX #define MAX_PATH_LENGTH _POSIX_PATH_MAX #else #define MAX_PATH_LENGTH 4096 #endif /*Type to point to every position within the keyset*/ typedef ssize_t cursor_t; /*Integer types*/ typedef int type_t; typedef int keyswitch_t; typedef int option_t; /**Separator for key names. * This character will be used to separate key names*/ #define KEY_SEPARATOR '/' /**Default Mode. * This mode will be used for fresh keys*/ #define KEY_DEF_MODE 0664 /**Default directory mode. * This mode will be ORed to have a directory key*/ #define KEY_DEF_DIR 0111 /**Lets assume that the namespace + relative path is shorter then the absolute path. * So the maximum length of key is what the system allows for the path.*/ #define MAX_KEY_LENGTH MAX_PATH_LENGTH #else /* WIN32 */ /*************************************************** * Windows ***************************************************/ # include # include # define usleep(x) Sleep(x) # define ssize_t int # define snprintf _snprintf /**Separator for Path names*/ #define PATH_SEPARATOR '\\' #define MAX_PATH_LENGTH 4096 /*Type to point to every position within the keyset*/ typedef ssize_t cursor_t; /*Integer types*/ typedef int type_t; typedef int keyswitch_t; typedef int option_t; /**Separator for key names. * This character will be used to separate key names*/ #define KEY_SEPARATOR '/' /**Default Mode. * This mode will be used for fresh keys*/ #define KEY_DEF_MODE 0664 /**Default directory mode. * This mode will be ORed to have a directory key*/ #define KEY_DEF_DIR 0111 /**Lets assume that the namespace + relative path is shorter then the absolute path. * So the maximum length of key is what the system allows for the path.*/ #define MAX_KEY_LENGTH MAX_PATH_LENGTH #endif /* WIN32 */ #endif /* KDBOS_H */ elektra-0.7.1/src/include/kdbprivate.h0000644000076400001440000004366311365511510014617 00000000000000/*************************************************************************** kdbprivate.h - Private classes definition ------------------- begin : Mon Apr 12 2004 copyright : (C) 2004 by Avi Alkalay email : avi@unix.sh ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ #ifndef KDB_H #error dont include kdbprivate.h directly, use kdbbackend.h instead #else #ifndef KDBPRIVATE_H #define KDBPRIVATE_H #include #include #ifndef KDB_DB_SYSTEM /**Below this directory the system configuration (system/) will be searched.*/ #define KDB_DB_SYSTEM "/usr/local/etc/kdb" #endif #ifndef KDB_DB_USER /**This directory will be concatenated with a prefix which will be searched * at runtime inside kdbbGetFullFilename(). *@see kdbbGetFullFilename */ #define KDB_DB_USER ".kdb" #endif #ifndef KDB_DB_HOME /**This directory will be used as fallback when no other method of * kdbbGetFullFilename() works. *@see kdbbGetFullFilename */ #define KDB_DB_HOME "/home" #endif #ifndef KDB_KEY_MOUNTPOINTS /**Backend information. * * This key directory tells you where each backend is mounted * to which mountpoint. */ #define KDB_KEY_MOUNTPOINTS "system/elektra/mountpoints" #endif #define KDB_KEY_MOUNTPOINTS_LEN (sizeof (KDB_KEY_MOUNTPOINTS)) #ifndef KDB_KEY_USERS /**Users information. * * This key directory tells you the users existing on the system. */ #define KDB_KEY_USERS "system/users" #endif #define KDB_KEY_USERS_LEN (sizeof (KDB_KEY_USERS)) #ifndef MAX_UCHAR #define MAX_UCHAR (UCHAR_MAX+1) #endif #ifndef KEYSET_SIZE #define KEYSET_SIZE 16 #endif #ifndef APPROXIMATE_NR_OF_BACKENDS #define APPROXIMATE_NR_OF_BACKENDS 16 #endif #ifndef ESCAPE_CHAR #define ESCAPE_CHAR '\\' #endif /**BUFFER_SIZE can be used as value for any I/O buffer * on files. * * It may be used for optimization on various * systems.*/ #ifndef BUFFER_SIZE #define BUFFER_SIZE 256 #endif #ifdef UT_NAMESIZE #define USER_NAME_SIZE UT_NAMESIZE #else #define USER_NAME_SIZE 100 #endif #ifndef DEFFILEMODE #define DEFFILEMODE 0666 #endif #define UTF8_TO 1 #define UTF8_FROM 0 typedef struct _Trie Trie; typedef struct _Split Split; typedef struct _KDBCap KDBCap; /* These define the type for pointers to all the kdb functions */ typedef KDB* (*kdbOpenPtr)(); typedef int (*kdbClosePtr)(KDB *); typedef ssize_t (*kdbGetPtr)(KDB *handle, KeySet *returned, const Key *parentKey); typedef ssize_t (*kdbSetPtr)(KDB *handle, KeySet *returned, const Key *parentKey); typedef KDB* (*OpenMapper)(const char *,const char *,KeySet *); typedef int (*CloseMapper)(KDB *); /***************** * Key Flags *****************/ /** * Key Flags * * Flags are used to communicate between backends and the library. * The flags are for internal reasons only, you should not need to * modify them. * * Backend <-> Library * * There are three possible ways to use the flag, * to communicate: * - from backend to library (referred as in) * - from library to backend (referred as out) * - two-way communication (referred as in/out) * * @ingroup backend */ typedef enum { KEY_FLAG_SYNC=1, /*!< Key need sync. (in/out) If value, comment or metadata are changed this flag will be set, so that the backend will sync the key to database.*/ KEY_FLAG_REMOVE=1<<1, /*!< Key will be removed. (out) The key is marked to be removed.*/ KEY_FLAG_STAT=1<<2 /*!< Only stat the key. (in) don't get value and comment, if the backend supports it. */ } keyflag_t; /***************** * KeySet Flags *****************/ /* * KeySet Flags * * @ingroup ks */ typedef enum { KS_FLAG_DIRTY=1<<1 /*!< KeySet is dirty. * KeySet will be sorted before next kdbSet() and ksLookupByName().*/ } ksflag_t; /** * The private Key struct. * * Its internal private attributes should not be accessed directly by regular * programs. Use the @ref key "Key access methods" instead. * Only a backend writer needs to have access to the private attributes of the * Key object which is defined as: * @code typedef struct _Key Key; * @endcode * * @ingroup backend */ struct _Key { /** * Type of the value, from #type_t. * @see keyGetType(), keySetType(), keyIsBin() */ type_t type; /** * System UID of this key. * @see keyGetUID(), keySetUID() */ uid_t uid; /** * System GID of this key. * @see keyGetGID(), keySetGID() */ gid_t gid; /** * File-like mode control * @see keyGetMode(), keySetMode() */ mode_t mode; /** * Time for last access(stat). * @see keyGetATime() */ time_t atime; /** * Time for last modification. * @see keyGetMTime() */ time_t mtime; /** * Time for last change (meta info) * @see keyGetCTime() */ time_t ctime; /** * A comment about the key. * @see keySetComment(), keyGetComment() */ char * comment; /** * Size of the comment of description string, including ending NULL. * @see keyGetCommentSize(), keySetComment(), keyGetComment() */ size_t commentSize; /** * The value, which is a NULL terminated string or binary. * @see keyGetString(), keyGetBinary(), keySetRaw() */ void * data; /** * Size of the value, in bytes, including ending NULL. * @see keyGetCommentSize(), keySetComment(), keyGetComment() */ size_t dataSize; /** * The name of the key. * @see keySetName(), keySetName() */ char * key; /** * Size of the name, in bytes, including ending NULL. * @see keyGetName(), keyGetNameSize(), keySetName() */ size_t keySize; /** * The user that owns the key. * @see keySetOwner(), keyGetOwner() */ char * owner; /** * Size of the owner, in bytes, including ending NULL. * @see keyGetCommentSize(), keySetComment(), keyGetComment() */ size_t ownerSize; /** * Some control and internal flags. */ keyflag_t flags; /** * In how many keysets the key resists. * keySetName() and keyRemove() are only allowed if ksReference is 0. * @see ksPop(), ksAppendKey(), ksAppend() */ size_t ksReference; }; /** * Macro to calculates the real size in bytes of the metainfo of the Key struct. * The metainfo part of the struct is composed by _Key::type, _Key::uid, * _Key::gid, _Key::mode, _Key::atime, _Key::mtime, _Key::ctime, * _Key::commentSize, _Key::dataSize, _Key::keySize, _Key::ownerSize * * This macro is usefull in Key serialization and de-serialization methods * of your backend. * * @ingroup backend */ #define KEY_METAINFO_SIZE(k) (sizeof (k->type) + sizeof (k->uid) + sizeof (k->gid) +\ sizeof (k->mode) + sizeof (k->atime) + sizeof (k->mtime) + sizeof (k->ctime) +\ sizeof (k->commentSize) + sizeof (k->dataSize) + sizeof (k->keySize) +\ sizeof (k->ownerSize) ) /** * The private KeySet structure. * * Its internal private attributes should not be accessed directly by regular * programs. Use the @ref keyset "KeySet access methods" instead. * Only a backend writer needs to have access to the private attributes of the * KeySet object which is defined as: * @code typedef struct _KeySet KeySet; * @endcode * * @ingroup backend */ struct _KeySet { struct _Key **array; /** #include #ifndef KDB_DB_SYSTEM /**Below this directory the system configuration (system/) will be searched.*/ #define KDB_DB_SYSTEM "@KDB_DB_SYSTEM@" #endif #ifndef KDB_DB_USER /**This directory will be concatenated with a prefix which will be searched * at runtime inside kdbbGetFullFilename(). *@see kdbbGetFullFilename */ #define KDB_DB_USER ".kdb" #endif #ifndef KDB_DB_HOME /**This directory will be used as fallback when no other method of * kdbbGetFullFilename() works. *@see kdbbGetFullFilename */ #define KDB_DB_HOME "/home" #endif #ifndef KDB_KEY_MOUNTPOINTS /**Backend information. * * This key directory tells you where each backend is mounted * to which mountpoint. */ #define KDB_KEY_MOUNTPOINTS "system/elektra/mountpoints" #endif #define KDB_KEY_MOUNTPOINTS_LEN (sizeof (KDB_KEY_MOUNTPOINTS)) #ifndef KDB_KEY_USERS /**Users information. * * This key directory tells you the users existing on the system. */ #define KDB_KEY_USERS "system/users" #endif #define KDB_KEY_USERS_LEN (sizeof (KDB_KEY_USERS)) #ifndef MAX_UCHAR #define MAX_UCHAR (UCHAR_MAX+1) #endif #ifndef KEYSET_SIZE #define KEYSET_SIZE 16 #endif #ifndef APPROXIMATE_NR_OF_BACKENDS #define APPROXIMATE_NR_OF_BACKENDS 16 #endif #ifndef ESCAPE_CHAR #define ESCAPE_CHAR '\\' #endif /**BUFFER_SIZE can be used as value for any I/O buffer * on files. * * It may be used for optimization on various * systems.*/ #ifndef BUFFER_SIZE #define BUFFER_SIZE 256 #endif #ifdef UT_NAMESIZE #define USER_NAME_SIZE UT_NAMESIZE #else #define USER_NAME_SIZE 100 #endif #ifndef DEFFILEMODE #define DEFFILEMODE 0666 #endif #define UTF8_TO 1 #define UTF8_FROM 0 typedef struct _Trie Trie; typedef struct _Split Split; typedef struct _KDBCap KDBCap; /* These define the type for pointers to all the kdb functions */ typedef KDB* (*kdbOpenPtr)(); typedef int (*kdbClosePtr)(KDB *); typedef ssize_t (*kdbGetPtr)(KDB *handle, KeySet *returned, const Key *parentKey); typedef ssize_t (*kdbSetPtr)(KDB *handle, KeySet *returned, const Key *parentKey); typedef KDB* (*OpenMapper)(const char *,const char *,KeySet *); typedef int (*CloseMapper)(KDB *); /***************** * Key Flags *****************/ /** * Key Flags * * Flags are used to communicate between backends and the library. * The flags are for internal reasons only, you should not need to * modify them. * * Backend <-> Library * * There are three possible ways to use the flag, * to communicate: * - from backend to library (referred as in) * - from library to backend (referred as out) * - two-way communication (referred as in/out) * * @ingroup backend */ typedef enum { KEY_FLAG_SYNC=1, /*!< Key need sync. (in/out) If value, comment or metadata are changed this flag will be set, so that the backend will sync the key to database.*/ KEY_FLAG_REMOVE=1<<1, /*!< Key will be removed. (out) The key is marked to be removed.*/ KEY_FLAG_STAT=1<<2 /*!< Only stat the key. (in) don't get value and comment, if the backend supports it. */ } keyflag_t; /***************** * KeySet Flags *****************/ /* * KeySet Flags * * @ingroup ks */ typedef enum { KS_FLAG_DIRTY=1<<1 /*!< KeySet is dirty. * KeySet will be sorted before next kdbSet() and ksLookupByName().*/ } ksflag_t; /** * The private Key struct. * * Its internal private attributes should not be accessed directly by regular * programs. Use the @ref key "Key access methods" instead. * Only a backend writer needs to have access to the private attributes of the * Key object which is defined as: * @code typedef struct _Key Key; * @endcode * * @ingroup backend */ struct _Key { /** * Type of the value, from #type_t. * @see keyGetType(), keySetType(), keyIsBin() */ type_t type; /** * System UID of this key. * @see keyGetUID(), keySetUID() */ uid_t uid; /** * System GID of this key. * @see keyGetGID(), keySetGID() */ gid_t gid; /** * File-like mode control * @see keyGetMode(), keySetMode() */ mode_t mode; /** * Time for last access(stat). * @see keyGetATime() */ time_t atime; /** * Time for last modification. * @see keyGetMTime() */ time_t mtime; /** * Time for last change (meta info) * @see keyGetCTime() */ time_t ctime; /** * A comment about the key. * @see keySetComment(), keyGetComment() */ char * comment; /** * Size of the comment of description string, including ending NULL. * @see keyGetCommentSize(), keySetComment(), keyGetComment() */ size_t commentSize; /** * The value, which is a NULL terminated string or binary. * @see keyGetString(), keyGetBinary(), keySetRaw() */ void * data; /** * Size of the value, in bytes, including ending NULL. * @see keyGetCommentSize(), keySetComment(), keyGetComment() */ size_t dataSize; /** * The name of the key. * @see keySetName(), keySetName() */ char * key; /** * Size of the name, in bytes, including ending NULL. * @see keyGetName(), keyGetNameSize(), keySetName() */ size_t keySize; /** * The user that owns the key. * @see keySetOwner(), keyGetOwner() */ char * owner; /** * Size of the owner, in bytes, including ending NULL. * @see keyGetCommentSize(), keySetComment(), keyGetComment() */ size_t ownerSize; /** * Some control and internal flags. */ keyflag_t flags; /** * In how many keysets the key resists. * keySetName() and keyRemove() are only allowed if ksReference is 0. * @see ksPop(), ksAppendKey(), ksAppend() */ size_t ksReference; }; /** * Macro to calculates the real size in bytes of the metainfo of the Key struct. * The metainfo part of the struct is composed by _Key::type, _Key::uid, * _Key::gid, _Key::mode, _Key::atime, _Key::mtime, _Key::ctime, * _Key::commentSize, _Key::dataSize, _Key::keySize, _Key::ownerSize * * This macro is usefull in Key serialization and de-serialization methods * of your backend. * * @ingroup backend */ #define KEY_METAINFO_SIZE(k) (sizeof (k->type) + sizeof (k->uid) + sizeof (k->gid) +\ sizeof (k->mode) + sizeof (k->atime) + sizeof (k->mtime) + sizeof (k->ctime) +\ sizeof (k->commentSize) + sizeof (k->dataSize) + sizeof (k->keySize) +\ sizeof (k->ownerSize) ) /** * The private KeySet structure. * * Its internal private attributes should not be accessed directly by regular * programs. Use the @ref keyset "KeySet access methods" instead. * Only a backend writer needs to have access to the private attributes of the * KeySet object which is defined as: * @code typedef struct _KeySet KeySet; * @endcode * * @ingroup backend */ struct _KeySet { struct _Key **array; /** This file is part of GNU Libtool. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. As a special exception to the GNU Lesser General Public License, if you distribute this file as part of a program or library that is built using GNU libtool, you may include it under the same distribution terms that you use for the rest of that program. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ /* Only include this header file once. */ #ifndef LTDL_H #define LTDL_H 1 #include /* for size_t declaration */ /* --- MACROS FOR PORTABILITY --- */ /* Saves on those hard to debug '\0' typos.... */ #define LT_EOS_CHAR '\0' /* LTDL_BEGIN_C_DECLS should be used at the beginning of your declarations, so that C++ compilers don't mangle their names. Use LTDL_END_C_DECLS at the end of C declarations. */ #ifdef __cplusplus # define LT_BEGIN_C_DECLS extern "C" { # define LT_END_C_DECLS } #else # define LT_BEGIN_C_DECLS /* empty */ # define LT_END_C_DECLS /* empty */ #endif LT_BEGIN_C_DECLS /* LT_PARAMS is a macro used to wrap function prototypes, so that compilers that don't understand ANSI C prototypes still work, and ANSI C compilers can issue warnings about type mismatches. */ #if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(WIN32) || defined(__cplusplus) # define LT_PARAMS(protos) protos # define lt_ptr void* #else # define LT_PARAMS(protos) () # define lt_ptr char* #endif /* LT_STMT_START/END are used to create macros which expand to a a single compound statement in a portable way. */ #if defined (__GNUC__) && !defined (__STRICT_ANSI__) && !defined (__cplusplus) # define LT_STMT_START (void)( # define LT_STMT_END ) #else # if (defined (sun) || defined (__sun__)) # define LT_STMT_START if (1) # define LT_STMT_END else (void)0 # else # define LT_STMT_START do # define LT_STMT_END while (0) # endif #endif /* LT_CONC creates a new concatenated symbol for the compiler in a portable way. */ #if defined(__STDC__) || defined(__cplusplus) || defined(_MSC_VER) # define LT_CONC(s,t) s##t #else # define LT_CONC(s,t) s/**/t #endif /* LT_STRLEN can be used safely on NULL pointers. */ #define LT_STRLEN(s) (((s) && (s)[0]) ? strlen (s) : 0) /* --- WINDOWS SUPPORT --- */ /* Canonicalise Windows and Cygwin recognition macros. */ #ifdef __CYGWIN32__ # ifndef __CYGWIN__ # define __CYGWIN__ __CYGWIN32__ # endif #endif #if defined(_WIN32) || defined(WIN32) # ifndef __WINDOWS__ # ifdef _WIN32 # define __WINDOWS__ _WIN32 # else # ifdef WIN32 # define __WINDOWS__ WIN32 # endif # endif # endif #endif #ifdef __WINDOWS__ # ifndef __CYGWIN__ /* LT_DIRSEP_CHAR is accepted *in addition* to '/' as a directory separator when it is set. */ # define LT_DIRSEP_CHAR '\\' # define LT_PATHSEP_CHAR ';' # endif #endif #ifndef LT_PATHSEP_CHAR # define LT_PATHSEP_CHAR ':' #endif /* DLL building support on win32 hosts; mostly to workaround their ridiculous implementation of data symbol exporting. */ #ifndef LT_SCOPE # ifdef __WINDOWS__ # ifdef DLL_EXPORT /* defined by libtool (if required) */ # define LT_SCOPE __declspec(dllexport) # endif # ifdef LIBLTDL_DLL_IMPORT /* define if linking with this dll */ # define LT_SCOPE extern __declspec(dllimport) # endif # endif # ifndef LT_SCOPE /* static linking or !__WINDOWS__ */ # define LT_SCOPE extern # endif #endif #if defined(_MSC_VER) /* Visual Studio */ # define R_OK 4 #endif /* --- DYNAMIC MODULE LOADING API --- */ typedef struct lt_dlhandle_struct *lt_dlhandle; /* A loaded module. */ /* Initialisation and finalisation functions for libltdl. */ LT_SCOPE int lt_dlinit LT_PARAMS((void)); LT_SCOPE int lt_dlexit LT_PARAMS((void)); /* Module search path manipulation. */ LT_SCOPE int lt_dladdsearchdir LT_PARAMS((const char *search_dir)); LT_SCOPE int lt_dlinsertsearchdir LT_PARAMS((const char *before, const char *search_dir)); LT_SCOPE int lt_dlsetsearchpath LT_PARAMS((const char *search_path)); LT_SCOPE const char *lt_dlgetsearchpath LT_PARAMS((void)); LT_SCOPE int lt_dlforeachfile LT_PARAMS(( const char *search_path, int (*func) (const char *filename, lt_ptr data), lt_ptr data)); /* Portable libltdl versions of the system dlopen() API. */ LT_SCOPE lt_dlhandle lt_dlopen LT_PARAMS((const char *filename)); LT_SCOPE lt_dlhandle lt_dlopenext LT_PARAMS((const char *filename)); LT_SCOPE lt_ptr lt_dlsym LT_PARAMS((lt_dlhandle handle, const char *name)); LT_SCOPE const char *lt_dlerror LT_PARAMS((void)); LT_SCOPE int lt_dlclose LT_PARAMS((lt_dlhandle handle)); /* Module residency management. */ LT_SCOPE int lt_dlmakeresident LT_PARAMS((lt_dlhandle handle)); LT_SCOPE int lt_dlisresident LT_PARAMS((lt_dlhandle handle)); /* --- MUTEX LOCKING --- */ typedef void lt_dlmutex_lock LT_PARAMS((void)); typedef void lt_dlmutex_unlock LT_PARAMS((void)); typedef void lt_dlmutex_seterror LT_PARAMS((const char *errmsg)); typedef const char *lt_dlmutex_geterror LT_PARAMS((void)); LT_SCOPE int lt_dlmutex_register LT_PARAMS((lt_dlmutex_lock *lock, lt_dlmutex_unlock *unlock, lt_dlmutex_seterror *seterror, lt_dlmutex_geterror *geterror)); /* --- MEMORY HANDLING --- */ /* By default, the realloc function pointer is set to our internal realloc implementation which iself uses lt_dlmalloc and lt_dlfree. libltdl relies on a featureful realloc, but if you are sure yours has the right semantics then you can assign it directly. Generally, it is safe to assign just a malloc() and a free() function. */ LT_SCOPE lt_ptr (*lt_dlmalloc) LT_PARAMS((size_t size)); LT_SCOPE lt_ptr (*lt_dlrealloc) LT_PARAMS((lt_ptr ptr, size_t size)); LT_SCOPE void (*lt_dlfree) LT_PARAMS((lt_ptr ptr)); /* --- PRELOADED MODULE SUPPORT --- */ /* A preopened symbol. Arrays of this type comprise the exported symbols for a dlpreopened module. */ typedef struct { const char *name; lt_ptr address; } lt_dlsymlist; LT_SCOPE int lt_dlpreload LT_PARAMS((const lt_dlsymlist *preloaded)); LT_SCOPE int lt_dlpreload_default LT_PARAMS((const lt_dlsymlist *preloaded)); #define LTDL_SET_PRELOADED_SYMBOLS() LT_STMT_START{ \ extern const lt_dlsymlist lt_preloaded_symbols[]; \ lt_dlpreload_default(lt_preloaded_symbols); \ }LT_STMT_END /* --- MODULE INFORMATION --- */ /* Read only information pertaining to a loaded module. */ typedef struct { char *filename; /* file name */ char *name; /* module name */ int ref_count; /* number of times lt_dlopened minus number of times lt_dlclosed. */ } lt_dlinfo; LT_SCOPE const lt_dlinfo *lt_dlgetinfo LT_PARAMS((lt_dlhandle handle)); LT_SCOPE lt_dlhandle lt_dlhandle_next LT_PARAMS((lt_dlhandle place)); LT_SCOPE int lt_dlforeach LT_PARAMS(( int (*func) (lt_dlhandle handle, lt_ptr data), lt_ptr data)); /* Associating user data with loaded modules. */ typedef unsigned lt_dlcaller_id; LT_SCOPE lt_dlcaller_id lt_dlcaller_register LT_PARAMS((void)); LT_SCOPE lt_ptr lt_dlcaller_set_data LT_PARAMS((lt_dlcaller_id key, lt_dlhandle handle, lt_ptr data)); LT_SCOPE lt_ptr lt_dlcaller_get_data LT_PARAMS((lt_dlcaller_id key, lt_dlhandle handle)); /* --- USER MODULE LOADER API --- */ typedef struct lt_dlloader lt_dlloader; typedef lt_ptr lt_user_data; typedef lt_ptr lt_module; /* Function pointer types for creating user defined module loaders. */ typedef lt_module lt_module_open LT_PARAMS((lt_user_data loader_data, const char *filename)); typedef int lt_module_close LT_PARAMS((lt_user_data loader_data, lt_module handle)); typedef lt_ptr lt_find_sym LT_PARAMS((lt_user_data loader_data, lt_module handle, const char *symbol)); typedef int lt_dlloader_exit LT_PARAMS((lt_user_data loader_data)); struct lt_user_dlloader { const char *sym_prefix; lt_module_open *module_open; lt_module_close *module_close; lt_find_sym *find_sym; lt_dlloader_exit *dlloader_exit; lt_user_data dlloader_data; }; LT_SCOPE lt_dlloader *lt_dlloader_next LT_PARAMS((lt_dlloader *place)); LT_SCOPE lt_dlloader *lt_dlloader_find LT_PARAMS(( const char *loader_name)); LT_SCOPE const char *lt_dlloader_name LT_PARAMS((lt_dlloader *place)); LT_SCOPE lt_user_data *lt_dlloader_data LT_PARAMS((lt_dlloader *place)); LT_SCOPE int lt_dlloader_add LT_PARAMS((lt_dlloader *place, const struct lt_user_dlloader *dlloader, const char *loader_name)); LT_SCOPE int lt_dlloader_remove LT_PARAMS(( const char *loader_name)); /* --- ERROR MESSAGE HANDLING --- */ /* Defining error strings alongside their symbolic names in a macro in this way allows us to expand the macro in different contexts with confidence that the enumeration of symbolic names will map correctly onto the table of error strings. */ #define lt_dlerror_table \ LT_ERROR(UNKNOWN, "unknown error") \ LT_ERROR(DLOPEN_NOT_SUPPORTED, "dlopen support not available") \ LT_ERROR(INVALID_LOADER, "invalid loader") \ LT_ERROR(INIT_LOADER, "loader initialization failed") \ LT_ERROR(REMOVE_LOADER, "loader removal failed") \ LT_ERROR(FILE_NOT_FOUND, "file not found") \ LT_ERROR(DEPLIB_NOT_FOUND, "dependency library not found") \ LT_ERROR(NO_SYMBOLS, "no symbols defined") \ LT_ERROR(CANNOT_OPEN, "can't open the module") \ LT_ERROR(CANNOT_CLOSE, "can't close the module") \ LT_ERROR(SYMBOL_NOT_FOUND, "symbol not found") \ LT_ERROR(NO_MEMORY, "not enough memory") \ LT_ERROR(INVALID_HANDLE, "invalid module handle") \ LT_ERROR(BUFFER_OVERFLOW, "internal buffer overflow") \ LT_ERROR(INVALID_ERRORCODE, "invalid errorcode") \ LT_ERROR(SHUTDOWN, "library already shutdown") \ LT_ERROR(CLOSE_RESIDENT_MODULE, "can't close resident module") \ LT_ERROR(INVALID_MUTEX_ARGS, "invalid mutex handler registration") \ LT_ERROR(INVALID_POSITION, "invalid search path insert position") /* Enumerate the symbolic error names. */ enum { #define LT_ERROR(name, diagnostic) LT_CONC(LT_ERROR_, name), lt_dlerror_table #undef LT_ERROR LT_ERROR_MAX }; /* These functions are only useful from inside custom module loaders. */ LT_SCOPE int lt_dladderror LT_PARAMS((const char *diagnostic)); LT_SCOPE int lt_dlseterror LT_PARAMS((int errorcode)); /* --- SOURCE COMPATIBILITY WITH OLD LIBLTDL --- */ #ifdef LT_NON_POSIX_NAMESPACE # define lt_ptr_t lt_ptr # define lt_module_t lt_module # define lt_module_open_t lt_module_open # define lt_module_close_t lt_module_close # define lt_find_sym_t lt_find_sym # define lt_dlloader_exit_t lt_dlloader_exit # define lt_dlloader_t lt_dlloader # define lt_dlloader_data_t lt_user_data #endif LT_END_C_DECLS #endif /* !LTDL_H */ elektra-0.7.1/src/kdb/0000777000076400001440000000000011365513214011503 500000000000000elektra-0.7.1/src/kdb/BSDgetopt.c0000644000076400001440000000731411361542117013423 00000000000000/* * Copyright (c) 1987, 1993, 1994 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. */ /* OPENBSD ORIGINAL: lib/libc/stdlib/getopt.c */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "BSDgetopt.h" #ifndef HASGETOPT #if defined(LIBC_SCCS) && !defined(lint) static char *rcsid = "$OpenBSD: getopt.c,v 1.5 2003/06/02 20:18:37 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include #include #include #define BADCH (int)'?' #define BADARG (int)':' #define EMSG "" int BSDopterr = 1; /* if error message should be printed */ int BSDoptind = 1; /* index into parent argv vector */ /* * getopt -- * Parse argc/argv argument vector. */ int BSDgetopt(nargc, nargv, ostr) int nargc; char * const *nargv; const char *ostr; { extern char *__progname; static char *place = EMSG; /* option letter processing */ char *oli; /* option letter list index */ if (ostr == NULL) return (-1); if (BSDoptreset || !*place) { /* update scanning pointer */ BSDoptreset = 0; if (BSDoptind >= nargc || *(place = nargv[BSDoptind]) != '-') { place = EMSG; return (-1); } if (place[1] && *++place == '-') { /* found "--" */ ++BSDoptind; place = EMSG; return (-1); } } /* option letter okay? */ if ((BSDoptopt = (int)*place++) == (int)':' || !(oli = strchr(ostr, BSDoptopt))) { /* * if the user didn't specify '-' as an option, * assume it means -1. */ if (BSDoptopt == (int)'-') return (-1); if (!*place) ++BSDoptind; if (BSDopterr && *ostr != ':') (void)fprintf(stderr, "%s: illegal option -- %c\n", __progname, BSDoptopt); return (BADCH); } if (*++oli != ':') { /* don't need argument */ BSDoptarg = NULL; if (!*place) ++BSDoptind; } else { /* need an argument */ if (*place) /* no white space */ BSDoptarg = place; else if (nargc <= ++BSDoptind) { /* no arg */ place = EMSG; if (*ostr == ':') return (BADARG); if (BSDopterr) (void)fprintf(stderr, "%s: option requires an argument -- %c\n", __progname, BSDoptopt); return (BADCH); } else /* white space */ BSDoptarg = nargv[BSDoptind]; place = EMSG; ++BSDoptind; } return (BSDoptopt); /* dump back option letter */ } #endif elektra-0.7.1/src/kdb/BSDgetopt.h0000644000076400001440000000432511361542117013427 00000000000000 /* * Copyright (c) 1987, 1993, 1994 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS 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 REGENTS 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. */ /* OPENBSD ORIGINAL: lib/libc/stdlib/getopt.c */ #ifndef KDB_BSDGETOPT_H #define KDB_BSDGETOPT_H # define getopt(ac, av, o) BSDgetopt(ac, av, o) # define opterr BSDopterr # define optind BSDoptind # define optopt BSDoptopt # define optreset BSDoptreset # define optarg BSDoptarg int BSDgetopt(int argc, char * const *argv, const char *opts); int BSDopterr, /* if error message should be printed */ BSDoptind, /* index into parent argv vector */ BSDoptopt, /* character checked for validity */ BSDoptreset; /* reset getopt */ char *BSDoptarg; /* argument associated with option */ #endif elektra-0.7.1/src/kdb/Makefile.am0000644000076400001440000000117711365510474013466 00000000000000 # $Id$ AM_CPPFLAGS = -I$(top_srcdir)/src/include $(LTDLINCL) kdb_source = kdb-tool.c kdb-tool.h help.c BSDgetopt.c BSDgetopt.h ../include/kdb.h ../include/kdbloader.h ../include/kdbtools.h bin_PROGRAMS = kdb kdb_static kdb_SOURCES = $(kdb_source) kdb_LDADD = ../libelektra/libelektra.la $(LIBLTDL) $(LIBICONV) kdb_CFLAGS = $(COPTFLAGS) $(CDBGFLAGS) kdb_static_SOURCES = $(kdb_source) kdb_static_LDADD = ../libelektra/libelektra.a $(privatelibs) $(LIBICONV) kdb_static_CFLAGS = -DELEKTRA_STATIC $(COPTFLAGS) $(CDBGFLAGS) ../libelektra/libelektra.a: cd ../libelektra && $(MAKE) libelektra.a clean-local: rm -f *.gcno *.gcda *.gcno elektra-0.7.1/src/kdb/Makefile.in0000644000076400001440000006755111365511152013501 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ # $Id$ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ bin_PROGRAMS = kdb$(EXEEXT) kdb_static$(EXEEXT) subdir = src/kdb DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/extensions.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/config.h CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(bindir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am__objects_1 = kdb-kdb-tool.$(OBJEXT) kdb-help.$(OBJEXT) \ kdb-BSDgetopt.$(OBJEXT) am_kdb_OBJECTS = $(am__objects_1) kdb_OBJECTS = $(am_kdb_OBJECTS) am__DEPENDENCIES_1 = kdb_DEPENDENCIES = ../libelektra/libelektra.la $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) am__objects_2 = kdb_static-kdb-tool.$(OBJEXT) \ kdb_static-help.$(OBJEXT) kdb_static-BSDgetopt.$(OBJEXT) am_kdb_static_OBJECTS = $(am__objects_2) kdb_static_OBJECTS = $(am_kdb_static_OBJECTS) kdb_static_DEPENDENCIES = ../libelektra/libelektra.a \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/src/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(kdb_SOURCES) $(kdb_static_SOURCES) DIST_SOURCES = $(kdb_SOURCES) $(kdb_static_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) INSTALL = @INSTALL@ ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BACKENDS = @BACKENDS@ BACKEND_VERSION_API = @BACKEND_VERSION_API@ BINDINGS = @BINDINGS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CDBGFLAGS = @CDBGFLAGS@ CFLAGS = @CFLAGS@ COPTFLAGS = @COPTFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSTDFLAGS = @CSTDFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDBGFLAGS = @CXXDBGFLAGS@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXOPTFLAGS = @CXXOPTFLAGS@ CXXSTDFLAGS = @CXXSTDFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_FALSE = @DEBUG_FALSE@ DEBUG_TRUE = @DEBUG_TRUE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ELEKTRATOOLS_VERSION_API = @ELEKTRATOOLS_VERSION_API@ ELEKTRA_VERSION_API = @ELEKTRA_VERSION_API@ EXEEXT = @EXEEXT@ EXPERIMENTAL_FALSE = @EXPERIMENTAL_FALSE@ EXPERIMENTAL_TRUE = @EXPERIMENTAL_TRUE@ F77 = @F77@ FFLAGS = @FFLAGS@ GENHTML = @GENHTML@ GREP = @GREP@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ HAVE_LIBLTDL_FALSE = @HAVE_LIBLTDL_FALSE@ HAVE_LIBLTDL_TRUE = @HAVE_LIBLTDL_TRUE@ HAVE_MAN2HTML_FALSE = @HAVE_MAN2HTML_FALSE@ HAVE_MAN2HTML_TRUE = @HAVE_MAN2HTML_TRUE@ HAVE_XML_FALSE = @HAVE_XML_FALSE@ HAVE_XML_TRUE = @HAVE_XML_TRUE@ HAVE_XSL_FALSE = @HAVE_XSL_FALSE@ HAVE_XSL_TRUE = @HAVE_XSL_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDB_VERSION = @KDB_VERSION@ KDB_VERSION_MAJOR = @KDB_VERSION_MAJOR@ KDB_VERSION_MAJORMINOR = @KDB_VERSION_MAJORMINOR@ KDB_VERSION_MICRO = @KDB_VERSION_MICRO@ KDB_VERSION_MINOR = @KDB_VERSION_MINOR@ LCOV = @LCOV@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VALGRIND = @VALGRIND@ VALGRINDTESTS_FALSE = @VALGRINDTESTS_FALSE@ VALGRINDTESTS_TRUE = @VALGRINDTESTS_TRUE@ VERSION = @VERSION@ XML2_CONFIG = @XML2_CONFIG@ XML_CPPFLAGS = @XML_CPPFLAGS@ XML_LIBS = @XML_LIBS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ backend_static_libs = @backend_static_libs@ backenddir = @backenddir@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ datarootdir = @datarootdir@ dbroot = @dbroot@ default_backend = @default_backend@ default_dbackend = @default_dbackend@ default_docbook = @default_docbook@ develdocdir = @develdocdir@ docdir = @docdir@ doxygen = @doxygen@ dvidir = @dvidir@ elektratools = @elektratools@ exec_prefix = @exec_prefix@ gconf_CFLAGS = @gconf_CFLAGS@ gconf_LIBS = @gconf_LIBS@ hlvlbackenddir = @hlvlbackenddir@ 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@ man2html = @man2html@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ privatelibs = @privatelibs@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ ulibdir = @ulibdir@ xsltproc = @xsltproc@ AM_CPPFLAGS = -I$(top_srcdir)/src/include $(LTDLINCL) kdb_source = kdb-tool.c kdb-tool.h help.c BSDgetopt.c BSDgetopt.h ../include/kdb.h ../include/kdbloader.h ../include/kdbtools.h kdb_SOURCES = $(kdb_source) kdb_LDADD = ../libelektra/libelektra.la $(LIBLTDL) $(LIBICONV) kdb_CFLAGS = $(COPTFLAGS) $(CDBGFLAGS) kdb_static_SOURCES = $(kdb_source) kdb_static_LDADD = ../libelektra/libelektra.a $(privatelibs) $(LIBICONV) kdb_static_CFLAGS = -DELEKTRA_STATIC $(COPTFLAGS) $(CDBGFLAGS) all: all-am .SUFFIXES: .SUFFIXES: .c .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 \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/kdb/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/kdb/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ || test -f $$p1 \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done kdb$(EXEEXT): $(kdb_OBJECTS) $(kdb_DEPENDENCIES) @rm -f kdb$(EXEEXT) $(LINK) $(kdb_LDFLAGS) $(kdb_OBJECTS) $(kdb_LDADD) $(LIBS) kdb_static$(EXEEXT): $(kdb_static_OBJECTS) $(kdb_static_DEPENDENCIES) @rm -f kdb_static$(EXEEXT) $(LINK) $(kdb_static_LDFLAGS) $(kdb_static_OBJECTS) $(kdb_static_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kdb-BSDgetopt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kdb-help.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kdb-kdb-tool.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kdb_static-BSDgetopt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kdb_static-help.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kdb_static-kdb-tool.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< kdb-kdb-tool.o: kdb-tool.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(kdb_CFLAGS) $(CFLAGS) -MT kdb-kdb-tool.o -MD -MP -MF "$(DEPDIR)/kdb-kdb-tool.Tpo" -c -o kdb-kdb-tool.o `test -f 'kdb-tool.c' || echo '$(srcdir)/'`kdb-tool.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/kdb-kdb-tool.Tpo" "$(DEPDIR)/kdb-kdb-tool.Po"; else rm -f "$(DEPDIR)/kdb-kdb-tool.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kdb-tool.c' object='kdb-kdb-tool.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(kdb_CFLAGS) $(CFLAGS) -c -o kdb-kdb-tool.o `test -f 'kdb-tool.c' || echo '$(srcdir)/'`kdb-tool.c kdb-kdb-tool.obj: kdb-tool.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(kdb_CFLAGS) $(CFLAGS) -MT kdb-kdb-tool.obj -MD -MP -MF "$(DEPDIR)/kdb-kdb-tool.Tpo" -c -o kdb-kdb-tool.obj `if test -f 'kdb-tool.c'; then $(CYGPATH_W) 'kdb-tool.c'; else $(CYGPATH_W) '$(srcdir)/kdb-tool.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/kdb-kdb-tool.Tpo" "$(DEPDIR)/kdb-kdb-tool.Po"; else rm -f "$(DEPDIR)/kdb-kdb-tool.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kdb-tool.c' object='kdb-kdb-tool.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(kdb_CFLAGS) $(CFLAGS) -c -o kdb-kdb-tool.obj `if test -f 'kdb-tool.c'; then $(CYGPATH_W) 'kdb-tool.c'; else $(CYGPATH_W) '$(srcdir)/kdb-tool.c'; fi` kdb-help.o: help.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(kdb_CFLAGS) $(CFLAGS) -MT kdb-help.o -MD -MP -MF "$(DEPDIR)/kdb-help.Tpo" -c -o kdb-help.o `test -f 'help.c' || echo '$(srcdir)/'`help.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/kdb-help.Tpo" "$(DEPDIR)/kdb-help.Po"; else rm -f "$(DEPDIR)/kdb-help.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='help.c' object='kdb-help.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(kdb_CFLAGS) $(CFLAGS) -c -o kdb-help.o `test -f 'help.c' || echo '$(srcdir)/'`help.c kdb-help.obj: help.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(kdb_CFLAGS) $(CFLAGS) -MT kdb-help.obj -MD -MP -MF "$(DEPDIR)/kdb-help.Tpo" -c -o kdb-help.obj `if test -f 'help.c'; then $(CYGPATH_W) 'help.c'; else $(CYGPATH_W) '$(srcdir)/help.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/kdb-help.Tpo" "$(DEPDIR)/kdb-help.Po"; else rm -f "$(DEPDIR)/kdb-help.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='help.c' object='kdb-help.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(kdb_CFLAGS) $(CFLAGS) -c -o kdb-help.obj `if test -f 'help.c'; then $(CYGPATH_W) 'help.c'; else $(CYGPATH_W) '$(srcdir)/help.c'; fi` kdb-BSDgetopt.o: BSDgetopt.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(kdb_CFLAGS) $(CFLAGS) -MT kdb-BSDgetopt.o -MD -MP -MF "$(DEPDIR)/kdb-BSDgetopt.Tpo" -c -o kdb-BSDgetopt.o `test -f 'BSDgetopt.c' || echo '$(srcdir)/'`BSDgetopt.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/kdb-BSDgetopt.Tpo" "$(DEPDIR)/kdb-BSDgetopt.Po"; else rm -f "$(DEPDIR)/kdb-BSDgetopt.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='BSDgetopt.c' object='kdb-BSDgetopt.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(kdb_CFLAGS) $(CFLAGS) -c -o kdb-BSDgetopt.o `test -f 'BSDgetopt.c' || echo '$(srcdir)/'`BSDgetopt.c kdb-BSDgetopt.obj: BSDgetopt.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(kdb_CFLAGS) $(CFLAGS) -MT kdb-BSDgetopt.obj -MD -MP -MF "$(DEPDIR)/kdb-BSDgetopt.Tpo" -c -o kdb-BSDgetopt.obj `if test -f 'BSDgetopt.c'; then $(CYGPATH_W) 'BSDgetopt.c'; else $(CYGPATH_W) '$(srcdir)/BSDgetopt.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/kdb-BSDgetopt.Tpo" "$(DEPDIR)/kdb-BSDgetopt.Po"; else rm -f "$(DEPDIR)/kdb-BSDgetopt.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='BSDgetopt.c' object='kdb-BSDgetopt.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(kdb_CFLAGS) $(CFLAGS) -c -o kdb-BSDgetopt.obj `if test -f 'BSDgetopt.c'; then $(CYGPATH_W) 'BSDgetopt.c'; else $(CYGPATH_W) '$(srcdir)/BSDgetopt.c'; fi` kdb_static-kdb-tool.o: kdb-tool.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(kdb_static_CFLAGS) $(CFLAGS) -MT kdb_static-kdb-tool.o -MD -MP -MF "$(DEPDIR)/kdb_static-kdb-tool.Tpo" -c -o kdb_static-kdb-tool.o `test -f 'kdb-tool.c' || echo '$(srcdir)/'`kdb-tool.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/kdb_static-kdb-tool.Tpo" "$(DEPDIR)/kdb_static-kdb-tool.Po"; else rm -f "$(DEPDIR)/kdb_static-kdb-tool.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kdb-tool.c' object='kdb_static-kdb-tool.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(kdb_static_CFLAGS) $(CFLAGS) -c -o kdb_static-kdb-tool.o `test -f 'kdb-tool.c' || echo '$(srcdir)/'`kdb-tool.c kdb_static-kdb-tool.obj: kdb-tool.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(kdb_static_CFLAGS) $(CFLAGS) -MT kdb_static-kdb-tool.obj -MD -MP -MF "$(DEPDIR)/kdb_static-kdb-tool.Tpo" -c -o kdb_static-kdb-tool.obj `if test -f 'kdb-tool.c'; then $(CYGPATH_W) 'kdb-tool.c'; else $(CYGPATH_W) '$(srcdir)/kdb-tool.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/kdb_static-kdb-tool.Tpo" "$(DEPDIR)/kdb_static-kdb-tool.Po"; else rm -f "$(DEPDIR)/kdb_static-kdb-tool.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kdb-tool.c' object='kdb_static-kdb-tool.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(kdb_static_CFLAGS) $(CFLAGS) -c -o kdb_static-kdb-tool.obj `if test -f 'kdb-tool.c'; then $(CYGPATH_W) 'kdb-tool.c'; else $(CYGPATH_W) '$(srcdir)/kdb-tool.c'; fi` kdb_static-help.o: help.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(kdb_static_CFLAGS) $(CFLAGS) -MT kdb_static-help.o -MD -MP -MF "$(DEPDIR)/kdb_static-help.Tpo" -c -o kdb_static-help.o `test -f 'help.c' || echo '$(srcdir)/'`help.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/kdb_static-help.Tpo" "$(DEPDIR)/kdb_static-help.Po"; else rm -f "$(DEPDIR)/kdb_static-help.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='help.c' object='kdb_static-help.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(kdb_static_CFLAGS) $(CFLAGS) -c -o kdb_static-help.o `test -f 'help.c' || echo '$(srcdir)/'`help.c kdb_static-help.obj: help.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(kdb_static_CFLAGS) $(CFLAGS) -MT kdb_static-help.obj -MD -MP -MF "$(DEPDIR)/kdb_static-help.Tpo" -c -o kdb_static-help.obj `if test -f 'help.c'; then $(CYGPATH_W) 'help.c'; else $(CYGPATH_W) '$(srcdir)/help.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/kdb_static-help.Tpo" "$(DEPDIR)/kdb_static-help.Po"; else rm -f "$(DEPDIR)/kdb_static-help.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='help.c' object='kdb_static-help.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(kdb_static_CFLAGS) $(CFLAGS) -c -o kdb_static-help.obj `if test -f 'help.c'; then $(CYGPATH_W) 'help.c'; else $(CYGPATH_W) '$(srcdir)/help.c'; fi` kdb_static-BSDgetopt.o: BSDgetopt.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(kdb_static_CFLAGS) $(CFLAGS) -MT kdb_static-BSDgetopt.o -MD -MP -MF "$(DEPDIR)/kdb_static-BSDgetopt.Tpo" -c -o kdb_static-BSDgetopt.o `test -f 'BSDgetopt.c' || echo '$(srcdir)/'`BSDgetopt.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/kdb_static-BSDgetopt.Tpo" "$(DEPDIR)/kdb_static-BSDgetopt.Po"; else rm -f "$(DEPDIR)/kdb_static-BSDgetopt.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='BSDgetopt.c' object='kdb_static-BSDgetopt.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(kdb_static_CFLAGS) $(CFLAGS) -c -o kdb_static-BSDgetopt.o `test -f 'BSDgetopt.c' || echo '$(srcdir)/'`BSDgetopt.c kdb_static-BSDgetopt.obj: BSDgetopt.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(kdb_static_CFLAGS) $(CFLAGS) -MT kdb_static-BSDgetopt.obj -MD -MP -MF "$(DEPDIR)/kdb_static-BSDgetopt.Tpo" -c -o kdb_static-BSDgetopt.obj `if test -f 'BSDgetopt.c'; then $(CYGPATH_W) 'BSDgetopt.c'; else $(CYGPATH_W) '$(srcdir)/BSDgetopt.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/kdb_static-BSDgetopt.Tpo" "$(DEPDIR)/kdb_static-BSDgetopt.Po"; else rm -f "$(DEPDIR)/kdb_static-BSDgetopt.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='BSDgetopt.c' object='kdb_static-BSDgetopt.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(kdb_static_CFLAGS) $(CFLAGS) -c -o kdb_static-BSDgetopt.obj `if test -f 'BSDgetopt.c'; then $(CYGPATH_W) 'BSDgetopt.c'; else $(CYGPATH_W) '$(srcdir)/BSDgetopt.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; 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: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_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 clean-local \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-binPROGRAMS install-info: install-info-am install-man: 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-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool clean-local ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-binPROGRAMS install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-binPROGRAMS \ uninstall-info-am ../libelektra/libelektra.a: cd ../libelektra && $(MAKE) libelektra.a clean-local: rm -f *.gcno *.gcda *.gcno # 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: elektra-0.7.1/src/kdb/help.c0000644000076400001440000002243211365506635012527 00000000000000/*************************************************************************** help.c - Functions used by 'kdb help' command ------------------- begin : Sat Jul 22 2006 copyright : (C) 2003 by Avi Alkalay email : avi@unix.sh ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ #include /** * Prints out help to the kdb (1) command. * --help does not work * * @par Example: * @code * bash$ kdb help * bash$ kdb -h * @endcode */ int commandHelp() { printf("Usage: kdb [OPTION] [ [value ...]]\n"); printf("Use kdb to manipulate the Key Database.\n"); printf("\n"); printf("libelektra " VERSION " is used\n"); printf("\n"); printf("ARGUMENTS\n"); printf("Commands are explained with kdb -h command\n"); printf(" is the name of the key. It can be prefixed\n"); printf(" with environment KDB_ROOT. The slash between will\n"); printf("be inserted.\n"); printf(" export KDB_ROOT=\"user/test/dir\"\n"); printf(" kdb get file/key ... will expand to user/test/dir/file/key\n"); printf("[value ...] hold the value which should be set\n"); printf("\n"); printf("COMMANDS\n"); printf(" kdb get [-dlfs] key/name\n"); printf(" kdb set [-t type] [-c \"A comment about this key\"] [-m mode] [-u uid]\n"); printf(" [-g gid] key/name \"the value\"\n"); printf(" kdb set [-t type] [-m mode] [-c \"A comment\"] key/name -- \"the value\"\n"); printf(" kdb set [-t type] [-b file] key/name\n"); printf(" kdb ls [-lRfvs] [key/dir | key/name]\n"); printf(" kdb ls [-lRfvx] [key/dir | key/name] > keys.xml\n"); printf(" kdb edit [-R] [key/dir | key/name]\n"); printf(" kdb rm key/name\n"); printf(" kdb mv key/src key/dest\n"); printf(" kdb ln key/src key/dest\n"); printf(" kdb export system/some/tree.root > file.xml\n"); printf(" kdb import < file.xml\n"); printf(" kdb import file.xml\n"); printf(" kdb monitor some/key/name\n"); printf(" kdb info\n"); printf("\n"); return 0; } void optionr() { printf("-R -r\n"); printf(" Causes to work recursively. In ls, will list recursively. \n"); printf("\n"); } void optionx() { printf("-x\n"); printf(" Makes ls output an XML representation of the keys, instead of an ls-compatible output. \n"); printf("\n"); } void optionl() { printf("-l\n"); printf(" Causes to display long results. With ls, will generate lists similar to ls -l. With get, will show also the key name. \n"); printf("\n"); } void optiona() { printf("-a\n"); printf(" Causes ls to display also inactive keys. Generate lists similar to ls -a. Inactive keys are keys which basename begins with a '.' (dot). An example of inactive key: system/sw/XFree/current/Monitor/.Monitor1 \n"); printf("\n"); } void optionf() { printf("-f\n"); printf(" Causes to work with full key names. A full key name makes sense only on user/* keys, and differentiate from the regular key names in specifying the owner user. If the current user is someuser, the user/some/key full name is user:someuser/some/key. Makes effect in ls, export and get subcommands. \n"); printf("\n"); } void optiond() { printf("-d\n"); printf(" Causes get to work descriptivelly. When requesting a key it will show the comment, key name and its value in a fancy format \n"); printf("\n"); } void options() { printf("-s\n"); printf(" Causes get and ls to be more friendly to Shell scripts. For example, when requesting user/env/env2/PATH, the output will be PATH=\"the value\", that is, only the basename of the key will be showed and the value will be surrounded by \".\n"); printf("\n"); } void optiont() { printf("-t type\n"); printf("When setting a key's value, you can specify the type with this switch.\n"); printf("Currently accepted types are:\n"); printf(" string for plain text\n"); printf(" binary for binary as-is values, should be avoided\n"); printf(" link to create symbolic links between keys\n"); printf(" dir to create folder keys, is obsolete now, every key can contain subkeys\n"); printf("Plain text are always stored as UTF-8(7) in Elektra, regardeless of your current encoding ($LANG). Binary values should be avoided, because they are black boxes for system administrators. \n"); printf("\n"); } void optionb() { printf("-b filename\n"); printf(" Set the key value as the content of file filename. This option is more usefull when setting binary keys. \n"); printf("\n"); } void optionm() { printf("-m mode\n"); printf(" For the set command. Will set the key mode permission to mode, which must be an octal number as for chmod(1). \n"); printf("\n"); } void optionu() { printf("-u uid\n"); printf(" Create the key with uid user ID. It can be a user name or a uid number. \n"); printf("\n"); } void optiong() { printf("-g gid\n"); printf(" Create the key with gid group ID. It can be a group name or a gid number \n"); printf("\n"); } void optionc() { printf("-c comment\n"); printf(" When setting keys, you can use this argument to set a descriptive comment for it. This comment is exactly as a comment in a plain text configuration file. The comment is stored as UTF-8(7) regardeless of your current encoding ($LANG). \n"); printf("\n"); } void optionv() { printf("-v\n"); printf(" With the ls subcommand, will make it show also the value stored in the key. \n"); printf("\n"); } void commandGetHelp () { printf("get\n"); printf(" Get the value from the specified key. Accepts options: -d, -l, -f, -s \n"); printf("\n"); optiond(); optionl(); optionf(); options(); } void commandSetHelp () { printf("set\n"); printf(" Set the value to the specified key. Accepts options: -c, -t, -m, -b \n"); printf("\n"); optionc(); optiont(); optionm(); optionb(); } void commandListHelp () { printf("ls\n"); printf(" As the ls(1) command, list key names for the specified key, or children keys, if specified a folder key. The -v argument will make it show also the values of each key. The -d (descriptive) will make it show the comment, key name and its value, as you are watching a plain text file. Accepts options: -x, -d, -l, -f, -v, -R, -s \n"); printf("\n"); optionx(); optiond(); optionl(); optionf(); optionv(); optionr(); } void commandLinkHelp () { printf("ln\n"); printf("Creates a key that is a symbolic links to another key. \n"); printf("\n"); } void commandMoveHelp() { printf("mv\n"); printf("Move, or renames a key. Currently it can't move keys across different filesystems.\n"); printf("\n"); } void commandRemoveHelp() { printf("rm\n"); printf("As the rm(1) command, removes the key specified. \n"); printf("\n"); } void commandEditHelp() { printf("edit\n"); printf("A very powerfull subcommand that lets you edit an XML representation of the keys. The parameters it accepts is usually a parent key, so its child keys will be gathered. Can be used with the -R flag to work recursively. The editor used is the one set in the $EDITOR environment variable, or vi. After editing the keys, kdb edit will analyze them and commit only the changed keys, remove the keys removed, and add the keys added. \n"); printf("\n"); } void commandExportHelp() { printf("export, save \n"); printf("Export a subtree of keys to XML. If no subtree is defined right after the export command, system and current user trees will be exported. Output is written to standard output. The output encoding will always be UTF-8, regardeless of your system encoding. UTF-8 is the most universal charset you can get when exchanging data between multiple systems. Accepts -f. \n"); printf("\n"); optionf(); } void commandImportHelp() { printf("import, load \n"); printf("Import an XML representation of keys and save it to the keys database. If no filename is passed right after the import command, standard input is used. \n"); printf("\n"); } void commandInfoHelp() { printf("info\n"); printf("Displays some information about the Elektra library being used, version, backends, etc.\n"); printf("\n"); } void commandMonitorHelp() { printf("monitor, mon, \n"); printf("Monitor a key for some value change. It will block your command line until a change in the key value is detected, then return its new value.\n"); printf("\n"); } int helpCommand(int command) { switch (command) { case CMD_SET: commandSetHelp(); break; case CMD_LIST: commandListHelp(); break; case CMD_LINK: commandLinkHelp(); break; case CMD_GET: commandGetHelp(); break; case CMD_REMOVE: commandRemoveHelp(); break; case CMD_EDIT: commandEditHelp(); break; case CMD_LOAD: commandImportHelp(); break; case CMD_SAVE: commandExportHelp(); break; case CMD_MONITOR: commandMonitorHelp(); break; case CMD_MOVE: commandMoveHelp(); break; case CMD_INFO: commandInfoHelp(); break; } exit (0); } /** * @} */ elektra-0.7.1/src/kdb/kdb-tool.c0000644000076400001440000010230611365507605013307 00000000000000/*************************************************************************** kdb-tool.c - Tool for the kdb administration ------------------- begin : Mon Mar 02 2003 copyright : (C) 2003 by Avi Alkalay email : avi@unix.sh ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ #include /* * @defgroup libexample The kdb Command Source Code: Example of Full Library Utilization * @{ */ char *argComment=0; char *argFile=0; char *argData=0; char *argKeyName=0; char *argDomain=0; uid_t *argUID=0; uid_t *argGID=0; int argCommand=0; int argNoRecursive=KDB_O_NORECURSIVE; int argLong=0; int argValue=0; int argAll=0; int argSort=0; int argDescriptive=0; int argFullName=0; int argShell=0; int argGenerate=0; int argOutput=0; int argXML=0; int argDir=0; int argHelp=0; mode_t argMode=0; int argType=KEY_TYPE_UNDEFINED; /* We'll load this methods dynamically to avoid libxml dependencies */ KSFromXMLfile ksFromXMLfile; KSFromXML ksFromXML; output ksToStream; output ksOutput; output ksGenerate; /* * Prints an error message related to @c errno on standard error, prefixed by @p msg. * @see kdbStrError() * @ingroup kdb */ int kdbPrintError(const char * msg) { fprintf (stderr, "%s\n", msg); return 0; } /** * Uses getopt to parse commandline options **/ int parseCommandLine(int argc, char *argv[]) { char sargType[ARGSIZE],argUser[ARGSIZE],argGroup[ARGSIZE]; char sargMode[ARGSIZE],sargCommand[ARGSIZE]; char * keyEnv; size_t keyEnvLength=0, keyOptLength=0, keyOldLength; int opt; *sargType=*argUser=*argGroup=*sargCommand=*sargMode=0; while ((opt=getopt(argc,argv,"ab:c:dfg:Ghilm:nOrRst:u:vXx"))!=-1) { if (opt == EOF) break; switch (opt) { case 'a': argAll=1; break; case 'b': argFile=realloc(argFile,strlen(optarg)+1); assert(argFile!=NULL); strcpy(argFile,optarg); break; case 'c': argComment=realloc(argComment,strlen(optarg)+1); assert(argComment!=NULL); strcpy(argComment,optarg); break; case 'd': argDescriptive=1; argLong=1; argDir=1; break; case 'f': argFullName=1; break; case 'g': strncpy(argGroup,optarg,ARGSIZE); break; case 'G': argGenerate=1; break; case 'h': argHelp=1; break; case 'l': argLong=1; break; case 'm': strncpy(sargMode,optarg,ARGSIZE); break; case 'n': argSort=1; break; case 'O': argOutput=1; break; case 'R': case 'r': argNoRecursive=0; break; case 's': argShell=1; break; case 't': strncpy(sargType,optarg,ARGSIZE); break; case 'u': strncpy(argUser,optarg,ARGSIZE); break; case 'v': argValue=1; break; case 'X': case 'x': argXML=1; break; default: fprintf(stderr, "Unknown error (%d %c) in parsing arguments\n", opt,opt); break; } } if (optind < argc) /*parse command*/ { strncpy(sargCommand,argv[optind],ARGSIZE); optind ++; } else { commandHelp(); exit(0); } keyEnv = getenv ("KDB_ROOT"); if (keyEnv) keyEnvLength = strlen (keyEnv) + 1; else keyEnvLength = 0; if (optind < argc) /*parse key name*/ { keyOptLength = strlen (argv[optind]) + 1; argKeyName=realloc(argKeyName, keyEnvLength + keyOptLength + 1); assert(argKeyName!=NULL); if (keyEnv) strncpy (argKeyName, keyEnv, keyEnvLength); strncpy(argKeyName + keyEnvLength, argv[optind], keyOptLength); if (keyEnv) *(argKeyName+keyEnvLength-1) = '/'; optind ++; } else if (keyEnv) { argKeyName=realloc(argKeyName, keyEnvLength + 1); assert(argKeyName!=NULL); if (keyEnv) strncpy (argKeyName, keyEnv, keyEnvLength); } keyOptLength = 0; keyOldLength = 0; while (optind < argc) /* parse value (rest of arguments) */ { keyOptLength += strlen(argv[optind]) + 1; argData=realloc(argData,keyOptLength + 1); assert(argData!=NULL); if (keyOldLength > 0) *(argData+keyOldLength-1) = ' '; strcpy(argData+keyOldLength, argv[optind]); optind ++; keyOldLength = keyOptLength; } /* see if parsing worked: fprintf (stderr, "command: %s\n", sargCommand); fprintf (stderr, "key name: %s\n", argKeyName); fprintf (stderr, "value: %s\n", argData); exit (0); */ /* End of command line argument reading. Now parse and finalize */ /* Check parsed command */ if (!strcmp(sargCommand,"ls")) argCommand=CMD_LIST; else if (!strcmp(sargCommand,"set")) argCommand=CMD_SET; else if (!strcmp(sargCommand,"get")) argCommand=CMD_GET; else if (!strcmp(sargCommand,"rm")) argCommand=CMD_REMOVE; else if (!strcmp(sargCommand,"vi")) argCommand=CMD_EDIT; else if (!strcmp(sargCommand,"edit")) argCommand=CMD_EDIT; else if (!strcmp(sargCommand,"load")) argCommand=CMD_LOAD; else if (!strcmp(sargCommand,"import")) argCommand=CMD_LOAD; else if (!strcmp(sargCommand,"save")) argCommand=CMD_SAVE; else if (!strcmp(sargCommand,"export")) argCommand=CMD_SAVE; else if (!strcmp(sargCommand,"mon")) argCommand=CMD_MONITOR; else if (!strcmp(sargCommand,"monitor")) argCommand=CMD_MONITOR; else if (!strcmp(sargCommand,"mv")) argCommand=CMD_MOVE; else if (!strcmp(sargCommand,"info")) argCommand=CMD_INFO; else if (!strcmp(sargCommand,"help")) argCommand=CMD_HELP; else { fprintf(stderr,"kdb: Invalid subcommand.\n"); return 1; } /* Parse type */ if (*sargType!=0) { /* TODO: use regex */ if (!strcmp(sargType,"string")) argType=KEY_TYPE_STRING; else if (!strcmp(sargType,"bin")) argType=KEY_TYPE_BINARY; else if (!strcmp(sargType,"binary")) argType=KEY_TYPE_BINARY; else if (!strcmp(sargType,"dir")) argDir=1; /* bkwrds compatibility */ else { argType=strtol(sargType,0,10); if (errno == ERANGE || errno == EINVAL) /* handle undefined later */ argType=KEY_TYPE_UNDEFINED; } } else if (argCommand==CMD_SET) { /* We must have a type */ argType=KEY_TYPE_STRING; } #ifdef HAVE_PWD_H /* Parse UID */ if (*argUser) { if (isdigit(*argUser)) { argUID=malloc(sizeof(uid_t)); *argUID=atoi(argUser); } else { struct passwd *pwd; pwd=getpwnam(argUser); if (pwd) { argUID=malloc(sizeof(uid_t)); *argUID=pwd->pw_uid; } else { fprintf(stderr,"kdb: Invalid user \'%s\'. Ignoring\n", argUser); } } } #endif #ifdef HAVE_GRP_H /* Parse GID */ if (*argGroup) { if (isdigit(*argGroup)) { argGID=malloc(sizeof(gid_t)); *argGID=atoi(argGroup); } else { struct group *grp; grp=getgrnam(argGroup); if (grp) { argGID=malloc(sizeof(gid_t)); *argGID=grp->gr_gid; } else { fprintf(stderr,"kdb: Invalid group \'%s\'. Ignoring\n",argGroup); } } } #endif /* Parse permissions */ if (*sargMode!=0) argMode=strtol(sargMode,0,8); return argCommand; } /* * Helper for the 'kdb ls' command * */ int listMode(Key *key,char *readable) { mode_t mode=keyGetMode(key); if (keyIsDir(key)) readable[0]='d'; else readable[0]='-'; readable[1] = mode & S_IRUSR ? 'r' : '-'; readable[2] = mode & S_IWUSR ? 'w' : '-'; readable[3] = mode & S_IXUSR ? 'x' : '-'; #ifdef HAVE_WIN32 return 3; #else readable[4] = mode & S_IRGRP ? 'r' : '-'; readable[5] = mode & S_IWGRP ? 'w' : '-'; readable[6] = mode & S_IXGRP ? 'x' : '-'; readable[7] = mode & S_IROTH ? 'r' : '-'; readable[8] = mode & S_IWOTH ? 'w' : '-'; readable[9] = mode & S_IXOTH ? 'x' : '-'; return 9; #endif } /* * Helper for the 'kdb ls' command * */ int listTime(time_t when,char *readable) { time_t current_time=time(0); char buf[26]; #ifndef HAVE_CTIME_R char *ctimep = NULL; #endif time_t six_months_ago; int recent; /* If the file appears to be in the future, update the current time, in case the file happens to have been modified since the last time we checked the clock. */ /* Consider a time to be recent if it is within the past six months. A Gregorian year has 365.2425 * 24 * 60 * 60 == 31556952 seconds on the average. Write this value as an integer constant to avoid floating point hassles. */ six_months_ago = current_time - 31556952 / 2; recent = (six_months_ago <= when) && (when <= current_time); #ifdef HAVE_CTIME_R ctime_r(&when,buf); #else ctimep = ctime(&when); strncpy(buf, ctimep, sizeof(buf)); #endif /* buf now is like "Wed Jun 30 21:49:08 1993\n" fprintf (stderr, "(%d), recent: %d buf: %s", strlen(buf), recent, buf); */ if (recent) { memcpy(readable,buf+4,12); // copy "Jun 30 21:49" /* in readable are now the parts "Jun 30 21:49" */ } else { memcpy(readable,buf+4,7); // copy "Jun 30 " /* in readable are now the parts "Jun 30 " */ readable[7]=' '; memcpy(readable+8,buf+20,4); // copy date } if (readable[4] == 32) readable[4] = '0'; // prefix date return 12; } /* * Helper for the 'kdb ls' command * */ void listSingleKey(Key *key) { char buffer[400]; char *p=buffer; char *unknown = ""; int unknown_length= strlen (unknown); char *binary = ""; int binary_length = strlen (binary); struct passwd *pwd; if (argLong) { p+=listMode(key,p); *p=' '; p++; *p=' '; p++; *p=' '; p++; #ifdef HAVE_PWD_H if ( (pwd=getpwuid(keyGetUID(key))) != NULL ) { strcpy(p,pwd->pw_name); p+=strlen(pwd->pw_name); *p=' '; p++; *p=' '; p++; } else { strcpy(p, unknown); p+=unknown_length; *p=' '; p++; *p=' '; p++; } #endif #ifdef HAVE_GRP_H if ( (grp=getgrgid(keyGetGID(key))) != NULL ) { strcpy(p,grp->gr_name); p+=strlen(grp->gr_name); *p=' '; p++; } else { strcpy(p, unknown); p+=unknown_length; *p=' '; p++; *p=' '; p++; } #endif /*sprintf(p,"%*d ",5,keyGetRecordSize(key)); p+=strlen(p);*/ p+=listTime(keyGetMTime(key),p); *p=' '; p++; } if (argFullName) p+=keyGetFullName(key,p,sizeof(buffer)-(p-buffer))-1; else p+=keyGetName(key,p,sizeof(buffer)-(p-buffer))-1; if (argValue && (keyGetValueSize(key)>1)) { *p='='; p++; if (keyIsString (key)) { p+=keyGetString(key,p,sizeof(buffer)-(p-buffer))-1; } else if (keyIsBinary(key)) { strcpy (p, binary); p+=binary_length; } } puts(buffer); } /* * Helper for the 'kdb ls' command * */ void listAllKeys (KeySet * ks) { size_t listSize=ksGetSize(ks); Key *walker; if (listSize == 1) listSingleKey(ksHead(ks)); else if (listSize > 1) { ksRewind(ks); while ((walker=ksNext(ks))) listSingleKey(walker); } } /* * Helper for the 'kdb ls -s' command * */ void listAllKeysForShell(KeySet *ks) { Key *walker=0; char *isParent=0; size_t parentNameSize=strlen(argKeyName); const char *keyname=0; const void *keyvalue=0; char *child=0; ksRewind(ks); while ((walker=ksNext(ks))) { keyname=keyName(walker); isParent=strstr(keyname,argKeyName); if (isParent) { keyname+=parentNameSize; while (*keyname && *keyname == '/') keyname++; } else { keyname=0; } /* At this point keyname points to the begining of the trailing key name after stripping argKeyName */ if (keyname) { /* output key name */ while ((child=strchr(keyname,'/'))) { fwrite(keyname,child-keyname,1,stdout); fputc('_',stdout); keyname=child+1; } fputs(keyname,stdout); /* writes remaining stuff */ /* now output the value surrounded by '"' */ fputs("=\"",stdout); keyvalue=keyValue(walker); if (keyvalue) fputs(keyvalue,stdout); fputs("\";\n",stdout); } } } /** * The business logic behind 'kdb rm' command * @par Example: * @code * bash$ kdb rm user/env/alias/ls # get rid to the ls alias * @endcode * * @see kdbRemove() * @param argKeyName name of the key that will be removed */ int commandRemove(KDB *handle) { if (!argKeyName) { fprintf(stderr,"kdb rm: No key name\n"); return -1; } if (argNoRecursive) { if (kdbRemove(handle,argKeyName) == -1) { char error[300]; sprintf(error,"kdb rm: \'%s\'",argKeyName); kdbPrintError(error); return -1; } } else { /* -R set */ Key *key; KeySet *ks = ksNew(0); key=keyNew(argKeyName,KEY_END); if (!key) { fprintf(stderr,"kdb rm: No valid key name\n"); return -1; } if (kdbGet(handle, ks, key, KDB_O_INACTIVE) == -1) { char error[500]; if (ksCurrent(ks)) sprintf(error,"kdb rm: Could not get keys, problem appeared at \'%s\'", keyName(ksCurrent(ks))); else sprintf(error,"kdb rm: Could not get keys below \'%s\'", argKeyName); kdbPrintError(error); keyDel (key); ksDel (ks); return -1; } if (kdbSet(handle, ks, key, KDB_O_REMOVEONLY) == -1) { char error[500]; if (ksCurrent(ks)) sprintf(error,"kdb rm: Could not rm keys, problem appeared at \'%s\'", keyName(ksCurrent(ks))); else sprintf(error,"kdb rm: Could not remove keys below \'%s\'", argKeyName); kdbPrintError(error); keyDel (key); ksDel (ks); return -1; } ksDel (ks); keyDel (key); } return 0; } /* * Renames the key to a given newname in backend in an atomic way. * * @note the key will not exist afterwards in database * * @param handle contains internal information of @link kdbOpen() opened @endlink key database * @param key an initialized Key retrieved from backend * @param newname the new name which the name should have in backend * @return 0 on success * @return -1 on failure and @c errno is propagated * @see kdbSet() * @ingroup kdb */ int kdbRename(KDB *handle, const Key *key, const char *newname) { KeySet * ks = ksNew(0); Key * toRename = keyDup(key); Key * toRemove = keyDup(key); keyRemove (toRemove); ksAppendKey(ks, toRemove); if (keySetName (toRename, newname) == -1) { ksDel (ks); return -1; } ksAppendKey(ks, toRename); if (kdbSet (handle, ks,0,0) == -1) { #if DEBUG printf ("kdbRename: kdbSet failed\n"); #endif ksDel (ks); return -1; } ksDel (ks); return 0; } /** * The business logic behind 'kdb mv' command. * The central method used is kdbRename() but this function is * way more robust, and is an example on how to handle errors. * @par Example: * @code * bash# kdb mv user/env user:tatiana/env * @endcode * * @see kdbRename() * @param argKeyName name of the source key * @param argData name of the target key */ int commandMove(KDB *handle) { Key *key; size_t size=0; int rc; /* Consistency */ if (!argKeyName) { fprintf(stderr,"kdb mv: No target specified\n"); return -1; } if (!argData) { fprintf(stderr,"kdb mv: \'%s\': No destination specified\n",argKeyName); return -1; } key=keyNew(argKeyName,KEY_END); size=keyGetNameSize(key); if (size == 0) { char error[100]; sprintf(error,"kdb mv: \'%s\'", argKeyName); kdbPrintError(error); keyDel(key); return 1; } rc=kdbRename(handle,key,argData); if (rc != 0) { /* Handle a non-zero rc, with same behavior of Unix mv command */ switch (errno) { } } keyDel(key); return rc; } /** * The business logic behind 'kdb set' command. * Sets value to a single key. * * @par Example: * @code * bash$ kdb set -c "My shell prompt" user/env/env1/PS1 '\h:\w\$' * @endcode * * @param argKeyName name of the key that will be set * @param argComment comment to be set to key (-c) * @param argType type of the key (-t) * @param argMode mode permissions that will be set to sey (-m) * @param argUID UID to be set to sey * @param argGID GID to be set to sey * @param argData the value to the key * @param argFile a filename to use as the input for the value * @see kdbSetKey() */ int commandSet(KDB *handle) { Key *key=0; int ret=0; char error[200]; size_t offset=0; /* Consistency */ if (!argKeyName) { fprintf(stderr,"kdb set: No key name\n"); return -1; } key=keyNew(argKeyName,KEY_END); if (!key) { fprintf(stderr,"kdb set: No key name\n"); return -1; } ret=kdbGetKey(handle,key); if (ret == 0) { /* Key already exists. Good. */ /* Use existed key type if user didn't give us one */ if (argType==KEY_TYPE_UNDEFINED) argType=keyGetType(key); } /* Set or overwrite everything else... */ if (argUID) keySetUID(key,*argUID); if (argGID) keySetGID(key,*argGID); if (argMode) keySetMode(key,argMode); if (argDir) { keySetDir(key); } if (argComment) keySetComment(key,argComment); if (argFile) { FILE *f; int end=0; if (argData) free(argData); argData=0; f=fopen(argFile,"r"); if (!f) { sprintf(error,"kdb set: \'%s\'",argFile); kdbPrintError(error); return -1; } while (! end) { char buffer[100]; ssize_t r; r=read(fileno(f),buffer,sizeof(buffer)); switch (r) { case 0: r=lseek(fileno(f),0,SEEK_END)-offset; end=1; break; case -1: /* those bizarre errors */ fprintf(stderr,"kdb set: \'%s\': problem reading file\n",argFile); fclose(f); return -1; } argData=realloc(argData,offset+r); assert(argData!=NULL); memcpy(argData+offset,buffer,r); offset+=r; } fclose(f); } /* Set key value . . . */ if (argType == KEY_TYPE_UNDEFINED) keySetString(key,argData); /* the most common here */ else if (argData) { /* Handle special type values . . . */ /* set raw data */ if (offset) keySetRaw(key,argData,offset); else if (KEY_TYPE_BINARY <= argType && argType < KEY_TYPE_STRING) /* command-line-passed bin values have unwanted \0 in the end */ keySetRaw(key,argData,strlen(argData)); else keySetRaw(key,argData,strlen(argData)+1); /* set type explicitly */ keySetType(key,argType); } ret=kdbSetKey(handle,key); if (ret) { sprintf(error,"kdb set: \'%s\'",argKeyName); kdbPrintError(error); } keyDel(key); return ret; } /** * The business logic behind 'kdb ls' command. * @param argKeyName key name to be listed * @param argNoRecursive whether to act recursively (-R) * @param argValue whether to show key values or not (-v) * @param argAll whether to list also inactive keys (-a) * @param argShell operate in a shell script friendly mode (-s) * @param argXML whether to create XML output (-x) * * @par Example: * @code * bash$ kdb ls -R # list all keys from system and user trees * bash$ kdb ls -Ra # list them all plus the hidden/inactive keys * bash$ kdb ls -Rav # list all showing value * bash# kdb ls -Rxv # equivalent to 'kdb export' * bash$ kdb ls -Rv user/env # list my aliases and environment vars * @endcode * * @see keyToStream(), ksToStream() * @see commandExport() for the 'kdb export' command */ int commandList(KDB *handle) { KeySet *ks; /* this is the container for all keys we'll collect bellow */ ssize_t ret; unsigned long options=0; /* Build our option set */ if (argSort) options |= KDB_O_SORT; if (argNoRecursive) options |= KDB_O_NORECURSIVE; if (argAll) options |= KDB_O_INACTIVE; if (!argValue) options |= KDB_O_STATONLY; /* these options make sense only to ksToStream() */ if (argFullName) options |= KDB_O_FULLNAME; /* ksToStream() defaults */ options |= KDB_O_HEADER | KDB_O_HIER; ks=ksNew(0); if (!argKeyName || strcmp(argKeyName, "/") == 0) { Key *walker=0; KeySet *tmp = ksNew(0); /* User don't want a specific key, so list the root keys */ kdbGet(handle,tmp,0,0); if (! argNoRecursive) { while ((walker=ksPop(tmp))) { /* walk root by root, retrieve entire subtree * and append it to ks */ KeySet *thisRoot=ksNew(0); ret=kdbGet(handle,thisRoot,walker,options | KDB_O_POP); /* A hack to transfer a key from a keyset to another. * Don't do this at home. */ ksAppendKey(ks,walker); ksAppend(ks,thisRoot); ksDel(thisRoot); /* we don't need the container anymore */ } } else ksAppend(ks,tmp); ksDel(tmp); } else { /* User gave us a specific key to start with */ ret=kdbGetByName (handle,ks,argKeyName,options); if (ret<0) { /* We got an error. Check if it is because its not a folder key */ if (errno==ENOTDIR) { /* We still have a chance, since there is something there */ Key *key=keyNew(argKeyName,KEY_END); if (!key) { char error[200]; keyDel(key); ksDel(ks); sprintf(error,"kdb ls: %s",argKeyName); kdbPrintError(error); return ret; } if (argValue) ret=kdbGetKey(handle,key); else ret=kdbStatKey(handle,key); if (ret == 0) ksAppendKey(ks,key); else { /* There is absolutely nothing there */ char error[200]; keyDel(key); ksDel(ks); sprintf(error,"kdb ls: %s",argKeyName); kdbPrintError(error); return ret; } keyDel (key); } else { /* A real error */ char error[200]; ksDel(ks); sprintf(error,"kdb ls: %s",argKeyName); kdbPrintError(error); return ret; } } } /* Better give it a sort */ if (ksNeedSort (ks)) ksSort (ks); if (argXML) ksToStream(ks,stdout,options); else if (argShell) listAllKeysForShell(ks); else if (argGenerate) ksGenerate(ks,stdout, 0); else if (argOutput) ksOutput(ks,stdout, KEY_VALUE|KEY_COMMENT); else listAllKeys(ks); ksDel(ks); return 0; } /** * Business logic behind the 'kdb get' command. * Get a key and return its value to you. * * @par Example: * @code * bash$ kdb get user/env/alias/ls * ls -Fh --color=tty * @endcode * * @param argKeyName key to get value * @param argDescriptive show also the key comment (-d) * @param argShell output suitable for shell scripts (-s) * @param argLong show also the key name (-l) * @param argFullName with @p argLong, show the user domain too (-f) * * @see kdbGetKey(), kdbGetBaseName(), keyGetComment(), keyGetString() * */ int commandGet(KDB *handle) { int ret; Key *key = 0; char *buffer = 0; // used two times char *p; size_t size,cs=0; type_t keyType; char error[200]; if (!argKeyName) { fprintf(stderr,"kdb get: No key name\n"); fprintf(stderr,"run kdb get -h for more info\n"); return -1; } key=keyNew(argKeyName,KEY_END); if (argKeyName[0] == '/') { buffer = malloc (strlen (argKeyName)+sizeof("system\0")); strcpy (buffer, "user\0"); keySetName(key, strcat (buffer, argKeyName)); ret=kdbGetKey(handle,key); if (ret == 0) goto done; strcpy (buffer, "system\0"); keySetName(key, strcat (buffer, argKeyName)); ret=kdbGetKey(handle,key); if (ret == 0) goto done; } else { ret=kdbGetKey(handle,key); } if (ret) { sprintf(error,"kdb get: %s",argKeyName); kdbPrintError(error); goto cleanup; } done: size=keyGetValueSize(key); if (argDescriptive) { cs=keyGetCommentSize(key); if (cs) size+=cs+3; } if (argShell) { size+=keyGetBaseNameSize(key); size+=2; /* for 2 '"' to wrap the value */ } else if (argLong) { if (argFullName) size+=keyGetFullNameSize(key); else size+=keyGetNameSize(key); } if (buffer) free (buffer); p=buffer=malloc(size); if (argDescriptive) { if (cs>1) { p+=sprintf(p,"# "); p+=keyGetComment(key,p,size-(p-buffer)); *--p='\n'; p++; } } if (argShell) { p+=keyGetBaseName(key,p,size-(p-buffer)); *--p='='; p++; *p='\"'; p++; } else if (argLong) { if (argFullName) p+=keyGetFullName(key,p,size-(p-buffer)); else p+=keyGetName(key,p,size-(p-buffer)); *--p='='; p++; } keyType=keyGetType(key); if (keyIsBinary(key)) p+=keyGetBinary(key,p,size-(p-buffer)); else p+=keyGetString(key,p,size-(p-buffer)); if (argShell) { *--p='\"'; p++; *p=0; } if (keyIsBinary(key)) fwrite(buffer,size,1,stdout); else printf("%s\n",buffer); ret = 0; cleanup: free(buffer); keyDel(key); return ret; } /** * Opens an editor to edit an XML representation of the keys. * This is one of the most complex commands of the kdb program. * It will * -# retrieve the desired keys * -# put them inside an editor in an XML format to let the user change them * -# wait for the editor to finish * -# reread the edited XML, converting to an internal KeySet * -# compare original and edited KeySets, with ksCompare(), to detect * differences * -# remove removed keys * -# update updated keys * -# add added keys * -# leave untouched the not-changed keys * * @par Example: * @code * bash$ EDITOR=kedit kdb edit -R user/env # edit with kedit * bash# kdb edit -R system/sw/MyApp # defaults to vi editor * @endcode * * @param argKeyName the parent key name (and children) that will be edited * @param argRecursive whether to act recursivelly or not * @param argAll whether to edit inactive keys or not * @param EDITOR environment var that defines editor to use, or @p vi * @see keyCompare(), ksCompare(), kdbGetByName() * ksToStream(), kdbRemoveKey() */ int commandEdit(KDB *handle) { KeySet *ks; KeySet *ksEdited; KeySet *toRemove; Key *current; int ret; char filename[]="/var/tmp/kdbeditXXXXXX"; char command[300]; //FILE *xmlfile=0; char choice[5]; if (!ksFromXMLfile) return 1; ks=ksNew(0); kdbGetByName(handle, ks, argKeyName, (argAll?KDB_O_INACTIVE:0) | (argNoRecursive?KDB_O_NORECURSIVE:0)); if (! ksGetSize(ks)) { /* Maybe the user parameter is not a parent key, but a single key */ current=keyNew(argKeyName,KEY_END); if (kdbGetKey(handle,current)) { /* Failed. Cleanup */ keyDel(current); current=0; } else { /* We have something. */ ksAppendKey(ks,current); current=0; } } /* for (current=ks.start; current; current=current->next) { if (keyNeedSync(current)) { printf("%s needs sync\n",current->key); } } */ /* TODO xmlfile=fdopen(mkstemp(filename),"rw+"); ksToStream(ks,xmlfile,KDB_O_XMLHEADERS | KDB_O_HIER | KDB_O_FULLNAME | KDB_O_FULLUGID); fclose(xmlfile); */ do { /* execute the editor and wait for it to finish */ sprintf(command,"[ -z \"$EDITOR\" ] && EDITOR=vi; $EDITOR %s",filename); system(command); toRemove=ksNew(0); ksEdited=ksNew(0); /* ksFromXML is not a library function. * It is implemented in and for this program only. * It is pretty reusable code, though. */ ret=ksFromXMLfile(ksEdited,filename); if (ret!=0) { printf("kdb cannot import this file, because it is not valid !\n"); strcpy(choice,""); while (choice[0]!='E' && choice[0]!='C') { printf("Do you want to edit it again or to cancel ? (E/C) : "); fgets(choice,4, stdin ); } } } while (ret!=0 && choice[0]=='E'); remove(filename); if (ret==0) { /*TODO ksCompare ksCompare(ks,ksEdited,toRemove); */ /* Discard ksEdited because there is nothing else here * after keyCompare() */ ksDel(ksEdited); /* Commit changed keys */ ksRewind(ks); while ((ret=kdbSet(handle,ks,0,0))) { /* We got an error. Warn user. */ Key *problem; char error[500]; char keyname[300]=""; problem=ksCurrent(ks); if (problem) keyGetFullName(problem,keyname,sizeof(keyname)); sprintf(error,"kdb edit: while setting/updating %s", keyname); kdbPrintError(error); /* And try to set keys again starting from the next key, * unless we reached the end of the KeySet */ if (ksNext(ks) == 0) break; } ksDel(ks); /* Finished with this KeySet */ /* Remove removed keys */ ksRewind(toRemove); while ((current=ksNext(toRemove))) { char keyname[800]; keyGetFullName(current,keyname,sizeof(keyname)); ret=kdbRemove(handle,keyname); if (ret != 0) { char error[850]; sprintf(error,"kdb edit: while removing %s",keyname); kdbPrintError(error); } } /* Finished with this KeySet too */ ksDel(toRemove); } return 0; } ssize_t kdbbGetFullFilename(KDB *handle, const Key *forKey,char *returned,size_t maxSize); /** * Business logic behind the 'kdb info' command. * Displays some information about the Elektra library, version, backend, etc. * * @par Example: * @code * bash$ kdb info * @endcode * * @see kdbGetInfo(), kdbInfoToString(), kdbFreeInfo() */ int commandInfo(KDB *handle) { char buffer [MAX_PATH_LENGTH]; Key *k; int rc; if (!argKeyName) { printf ("Supply a keyname as second argument to deduce where the key will be stored on disk.\n"); return 1; } k = keyNew (argKeyName, KEY_END); if (!k) { printf ("Supply a valid keyname.\n"); return 1; } rc = kdbbGetFullFilename(handle, k, buffer, MAX_PATH_LENGTH); if (rc == -1) { printf ("failure\n"); return 1; } else { printf ("%s\n", buffer); return 0; } } /** * Business logic behind the 'kdb import' command. * Import an XML file (or standard input) into the key database. * This is usefull to import full application's keys, or restore backups. * * @par Example: * @code * bash$ kdb import myAppDefaultKeys.xml * bash$ generateKeys | kdb import * @endcode * * @see commandExport() */ int commandImport(KDB *handle) { KeySet *ks; int ret; if (!ksFromXMLfile || !ksFromXML) return 1; ks=ksNew(0); /* The command line parsing function will put the XML filename in the argKeyName global. */ if (argKeyName) ksFromXMLfile(ks,argKeyName); else ksFromXML(ks,fileno(stdin) /* more elegant then just '0' */); ksRewind(ks); while ((ret=kdbSet(handle,ks,0,0))==-1) { /* We got an error. Warn user. */ Key *problem; char error[500]=""; char keyname[300]=""; problem=ksCurrent(ks); if (problem) keyGetFullName(problem,keyname,sizeof(keyname)); sprintf(error,"kdb import: while importing %s", keyname); kdbPrintError(error); /* And try to set keys again starting from the next key, * unless we reached the end of KeySet */ if (ksNext(ks) == 0) break; } ksDel(ks); return ret; } /** * Business logic behind the 'kdb export' command. * Export a set of keys to an XML format. Usefull to make backups or copy * keys to other machine or user. * Equivalent to 'kdb ls -xRv base/key/name' * * @par Example: * @code * bash# kdb export system > systemConfigurationBackup.xml * bash# kdb export system/sw/MyApp > myAppConfiguration.xml * bash$ kdb export system/sw/MyApp | sed -e 's|system/sw|user/sw|g' | kdb import * @endcode * * @see commandList(), commandImport() * */ int commandExport(KDB *handle) { KeySet *ks; ssize_t ret; if (!argKeyName) { printf ("You have to pass a keyname as argument\n"); return 1; } ks = ksNew (0); ret = kdbGetByName(handle, ks, argKeyName, KDB_O_INACTIVE); if (ret == 0) { fprintf (stderr, "You try to print in the middle of a backend which does not support\n"); fprintf (stderr, "getting only some keys.\n"); return 1; } else if (ret == -1) { kdbPrintError ("Could not get keys, reason:"); ksDel (ks); return 2; } else if (argGenerate) ksGenerate(ks,stdout, 0); else if (argOutput) ksOutput(ks,stdout, KEY_VALUE|KEY_COMMENT); else ksToStream(ks,stdout,0); ksDel (ks); return 0; } /** * Business logic behind 'kdb mon' command. * * Will block your command line until some change happens to the * interested key. * * @par Example: * @code * bash$ kdb mon system/sw/MyApp/someKey * @endcode * * @see kdbMonitorKey(), kdbMonitorKeys() */ int commandMonitor(KDB *handle) { #if 0 Key *toMonitor; uint32_t diff; toMonitor=keyNew(argKeyName,KEY_NEEDSYNC,handle,KEY_END); diff=kdbMonitorKey(handle, toMonitor, /* key to monitor */ KEY_VALUE, /* key info we are interested in */ 0, /* how many times to poll. 0 = ad-infinitum */ 500 /* usecs between polls. 0 defaults to 1 second */); /* * Since in our case we'll hang completelly until we get a key's * value change, we don't have to check diff. * So if method returned, the value has changed, and toMonitor has it. */ printf("New value is %s\n",(char *)keyValue(toMonitor)); keyDel(toMonitor); #endif return 0; } kdbLibHandle dlhandle=0; void closeToolsLib(void) { kdbLibClose (dlhandle); } int loadToolsLib(void) { kdbLibInit(); dlhandle=kdbLibLoad("libelektratools"); if (dlhandle == 0) { return 1; } ksFromXMLfile=(KSFromXMLfile)kdbLibSym(dlhandle,"ksFromXMLfile"); ksFromXML=(KSFromXML)kdbLibSym(dlhandle,"ksFromXML"); ksToStream = (output) kdbLibSym (dlhandle, "ksToStream"); ksOutput = (output) kdbLibSym (dlhandle, "ksOutput"); ksGenerate = (output) kdbLibSym (dlhandle, "ksGenerate"); atexit(closeToolsLib); return 0; } int doCommand(int command, KDB *handle) { switch (command) { case CMD_SET: return commandSet(handle); case CMD_LIST: return commandList(handle); case CMD_GET: return commandGet(handle); case CMD_REMOVE: return commandRemove(handle); case CMD_EDIT: return commandEdit(handle); case CMD_LOAD: return commandImport(handle); case CMD_SAVE: return commandExport(handle); case CMD_MONITOR: return commandMonitor(handle); case CMD_MOVE: return commandMove(handle); case CMD_INFO: return commandInfo(handle); case CMD_HELP: return commandHelp(handle); } return 0; } int main(int argc, char **argv) { KDB *handle=0; int command=0; int ret=0; if (loadToolsLib()) fprintf(stderr,"kdb: XML importing and editing disabled\n"); /* Parse the command line */ command=parseCommandLine(argc,argv); /* Check if user only wants some help (kdb -h {command})*/ if (argHelp) helpCommand(command); /* Open key database */ handle = kdbOpen(); if (handle == 0) { fprintf (stderr, "kdb: could not open key database\n"); exit (1); } /* Execute command with parameters from command line and exit * program afterwards.*/ ret = doCommand(command,handle); kdbClose(handle); return ret; } /* * @} */ elektra-0.7.1/src/kdb/kdb-tool.h0000644000076400001440000000370611365506635013322 00000000000000/*************************************************************************** kdb.h - Tool for the kdb administration ------------------- begin : Fri Feb 22 2008 copyright : (C) 2008 by Markus Raab email : elektra@markus-raab.org ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif #ifndef HASGETOPT #include "BSDgetopt.h" #endif #include #include #include #include #include #include #include #include #include #ifdef HAVE_GRP_H #include #endif #ifdef HAVE_PWD_H #include #endif #include #include #include /* We need fcntl.h for open and related constants used in our definition of mkstemp */ #ifdef HAVE_WIN32 #include #endif #define DYN_LINK #include #include #include #define CMD_GET 1 #define CMD_SET 2 #define CMD_REMOVE 3 #define CMD_LIST 4 #define CMD_LINK 5 #define CMD_EDIT 6 #define CMD_LOAD 7 #define CMD_SAVE 8 #define CMD_MONITOR 9 #define CMD_MOVE 10 #define CMD_INFO 25 #define CMD_HELP 30 #define ARGSIZE 30 #ifdef HAVE_WIN32 #define mkstemp(m) open(mktemp(m), O_RDWR) #endif /* Exported functions from help.c */ int commandHelp(); int helpCommand(int command); elektra-0.7.1/src/libelektra/0000777000076400001440000000000011365513212013057 500000000000000elektra-0.7.1/src/libelektra/Makefile.am0000644000076400001440000000717411365507605015051 00000000000000AM_CPPFLAGS = -I$(top_srcdir)/src/include $(LTDLINCL) elektra_sources = kdb.c kdbhandle.c key.c keyset.c trie.c \ kdbhighlevel.c kdbcapability.c keyhelpers.c \ keymeta.c keyname.c keytest.c keyvalue.c \ serialize.c split.c elektra_dependencies = ../include/kdbprivate.h \ ../include/kdb.h \ ../include/kdbos.h \ ../include/kdbbackend.h \ ../include/kdbloader.h lib_LIBRARIES = libelektra.a libelektra_a_SOURCES = $(elektra_sources) \ exported_symbols.c libelektra_a_DEPENDENCIES = $(elektra_dependencies) objects libelektra_a_CFLAGS = -DELEKTRA_STATIC -DDEFAULT_BACKEND=\"$(default_backend)\" $(CSTDFLAGS) $(COPTFLAGS) $(CDBGFLAGS) libelektra_a_LIBADD = `cat objects` BUILT_SOURCES = exported_symbols.c lib_LTLIBRARIES = libelektra.la libelektra_la_SOURCES = $(elektra_sources) libelektra_la_DEPENDENCIES = $(elektra_dependencies) ../libloader/libloader-dynamic.la ../libhelper/libhelper-dynamic.la libelektra_la_CFLAGS = -DDEFAULT_BACKEND=\"default\" $(CSTDFLAGS) $(COPTFLAGS) $(CDBGFLAGS) libelektra_la_LDFLAGS = -version-info $(ELEKTRA_VERSION_API) libelektra_la_LIBADD = ../libloader/libloader-dynamic.la ../libhelper/libhelper-dynamic.la $(LIBICONV) EXTRA_DIST = exportsymbols.sh ../include/kdbprivate.h: cd ../include && $(MAKE) kdbprivate.h ../libloader/libloader-static.a: cd ../libloader && $(MAKE) libloader-static.a ../libloader/libloader-dynamic.la: cd ../libloader && $(MAKE) libloader-dynamic.la ../libhelper/libhelper-static.a: cd ../libhelper && $(MAKE) libhelper-static.a ../libhelper/libhelper-dynamic.la: cd ../libhelper && $(MAKE) libhelper-dynamic.la if HAVE_XML ../libelektratools/libelektratools.a: cd ../libelektratools && $(MAKE) libelektratools.a endif #all_backends: # cd ../backends && $(MAKE) all ../backends/filesys/libelektra-filesys.a: cd ../backends/filesys && $(MAKE) libelektra-filesys.a ../backends/ini/libelektra-ini.a: cd ../backends/ini && $(MAKE) libelektra-ini.a ../backends/fstab/libelektra-fstab.a: cd ../backends/fstab && $(MAKE) libelektra-fstab.a ../backends/passwd/libelektra-passwd.a: cd ../backends/passwd && $(MAKE) libelektra-passwd.a ../backends/hosts/libelektra-hosts.a: cd ../backends/hosts && $(MAKE) libelektra-hosts.a ../backends/template/libelektra-template.a: cd ../backends/template && $(MAKE) libelektra-template.a ../backends/daemon/libelektra-daemon.a: cd ../backends/daemon && $(MAKE) libelektra-daemon.a ../backends/berkeleydb/libelektra-berkeleydb.a: cd ../backends/berkeleydb && $(MAKE) libelektra-berkeleydb.a ../backends/gconf/libelektra-gconf.a: cd ../backends/gconf && $(MAKE) libelektra-gconf.a #objects: ../libloader/libloader-static.a all_backends ../libelektratools/libelektratools.a # @list='$(backends)'; for backend in $$list; do \ # bck_list=$$bck_list" ../backends/$$backend/libelektra-$$backend.a "; \ # done; \ # $(SHELL) exportobjects.sh ../libloader/libloader-static.a $$bck_list ../libelektratools/libelektratools.a object_deps = ../libloader/libloader-static.a ../libhelper/libhelper-static.a $(backend_static_libs) if HAVE_XML object_deps += ../libelektratools/libelektratools.a endif objects: $(object_deps) $(SHELL) exportobjects.sh $(object_deps) exported_symbols.c: ../../config.status $(SHELL) $(srcdir)/exportsymbols.sh $(default_backend) $(BACKENDS) $(elektratools) #exported_symbols.c: all_backends ../libelektratools/libelektratools.a # @list='$(backends)'; for backend in $$list; do \ # bck_list=$$bck_list" ../backends/$$backend/libelektra-$$backend.a"; \ # done; \ # $(SHELL) exportsymbols.sh $$bck_list ../libelektratools/libelektratools.a clean-local: rm -f objects rm -f exported_symbols.c exported_symbols.h rm -f *.gcno *.gcda *.gcno elektra-0.7.1/src/libelektra/Makefile.in0000644000076400001440000020573211365511153015053 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ @HAVE_XML_TRUE@am__append_1 = ../libelektratools/libelektratools.a subdir = src/libelektra DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/exportobjects.sh.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/extensions.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/config.h CONFIG_CLEAN_FILES = exportobjects.sh am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libdir)" libLIBRARIES_INSTALL = $(INSTALL_DATA) LIBRARIES = $(lib_LIBRARIES) ARFLAGS = cru libelektra_a_AR = $(AR) $(ARFLAGS) am__objects_1 = libelektra_a-kdb.$(OBJEXT) \ libelektra_a-kdbhandle.$(OBJEXT) libelektra_a-key.$(OBJEXT) \ libelektra_a-keyset.$(OBJEXT) libelektra_a-trie.$(OBJEXT) \ libelektra_a-kdbhighlevel.$(OBJEXT) \ libelektra_a-kdbcapability.$(OBJEXT) \ libelektra_a-keyhelpers.$(OBJEXT) \ libelektra_a-keymeta.$(OBJEXT) libelektra_a-keyname.$(OBJEXT) \ libelektra_a-keytest.$(OBJEXT) libelektra_a-keyvalue.$(OBJEXT) \ libelektra_a-serialize.$(OBJEXT) libelektra_a-split.$(OBJEXT) am_libelektra_a_OBJECTS = $(am__objects_1) \ libelektra_a-exported_symbols.$(OBJEXT) libelektra_a_OBJECTS = $(am_libelektra_a_OBJECTS) libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) am__DEPENDENCIES_1 = am__objects_2 = libelektra_la-kdb.lo libelektra_la-kdbhandle.lo \ libelektra_la-key.lo libelektra_la-keyset.lo \ libelektra_la-trie.lo libelektra_la-kdbhighlevel.lo \ libelektra_la-kdbcapability.lo libelektra_la-keyhelpers.lo \ libelektra_la-keymeta.lo libelektra_la-keyname.lo \ libelektra_la-keytest.lo libelektra_la-keyvalue.lo \ libelektra_la-serialize.lo libelektra_la-split.lo am_libelektra_la_OBJECTS = $(am__objects_2) libelektra_la_OBJECTS = $(am_libelektra_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/src/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libelektra_a_SOURCES) $(libelektra_la_SOURCES) DIST_SOURCES = $(libelektra_a_SOURCES) $(libelektra_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) INSTALL = @INSTALL@ ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BACKENDS = @BACKENDS@ BACKEND_VERSION_API = @BACKEND_VERSION_API@ BINDINGS = @BINDINGS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CDBGFLAGS = @CDBGFLAGS@ CFLAGS = @CFLAGS@ COPTFLAGS = @COPTFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSTDFLAGS = @CSTDFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDBGFLAGS = @CXXDBGFLAGS@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXOPTFLAGS = @CXXOPTFLAGS@ CXXSTDFLAGS = @CXXSTDFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_FALSE = @DEBUG_FALSE@ DEBUG_TRUE = @DEBUG_TRUE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ELEKTRATOOLS_VERSION_API = @ELEKTRATOOLS_VERSION_API@ ELEKTRA_VERSION_API = @ELEKTRA_VERSION_API@ EXEEXT = @EXEEXT@ EXPERIMENTAL_FALSE = @EXPERIMENTAL_FALSE@ EXPERIMENTAL_TRUE = @EXPERIMENTAL_TRUE@ F77 = @F77@ FFLAGS = @FFLAGS@ GENHTML = @GENHTML@ GREP = @GREP@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ HAVE_LIBLTDL_FALSE = @HAVE_LIBLTDL_FALSE@ HAVE_LIBLTDL_TRUE = @HAVE_LIBLTDL_TRUE@ HAVE_MAN2HTML_FALSE = @HAVE_MAN2HTML_FALSE@ HAVE_MAN2HTML_TRUE = @HAVE_MAN2HTML_TRUE@ HAVE_XML_FALSE = @HAVE_XML_FALSE@ HAVE_XML_TRUE = @HAVE_XML_TRUE@ HAVE_XSL_FALSE = @HAVE_XSL_FALSE@ HAVE_XSL_TRUE = @HAVE_XSL_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDB_VERSION = @KDB_VERSION@ KDB_VERSION_MAJOR = @KDB_VERSION_MAJOR@ KDB_VERSION_MAJORMINOR = @KDB_VERSION_MAJORMINOR@ KDB_VERSION_MICRO = @KDB_VERSION_MICRO@ KDB_VERSION_MINOR = @KDB_VERSION_MINOR@ LCOV = @LCOV@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VALGRIND = @VALGRIND@ VALGRINDTESTS_FALSE = @VALGRINDTESTS_FALSE@ VALGRINDTESTS_TRUE = @VALGRINDTESTS_TRUE@ VERSION = @VERSION@ XML2_CONFIG = @XML2_CONFIG@ XML_CPPFLAGS = @XML_CPPFLAGS@ XML_LIBS = @XML_LIBS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ backend_static_libs = @backend_static_libs@ backenddir = @backenddir@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ datarootdir = @datarootdir@ dbroot = @dbroot@ default_backend = @default_backend@ default_dbackend = @default_dbackend@ default_docbook = @default_docbook@ develdocdir = @develdocdir@ docdir = @docdir@ doxygen = @doxygen@ dvidir = @dvidir@ elektratools = @elektratools@ exec_prefix = @exec_prefix@ gconf_CFLAGS = @gconf_CFLAGS@ gconf_LIBS = @gconf_LIBS@ hlvlbackenddir = @hlvlbackenddir@ 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@ man2html = @man2html@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ privatelibs = @privatelibs@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ ulibdir = @ulibdir@ xsltproc = @xsltproc@ AM_CPPFLAGS = -I$(top_srcdir)/src/include $(LTDLINCL) elektra_sources = kdb.c kdbhandle.c key.c keyset.c trie.c \ kdbhighlevel.c kdbcapability.c keyhelpers.c \ keymeta.c keyname.c keytest.c keyvalue.c \ serialize.c split.c elektra_dependencies = ../include/kdbprivate.h \ ../include/kdb.h \ ../include/kdbos.h \ ../include/kdbbackend.h \ ../include/kdbloader.h lib_LIBRARIES = libelektra.a libelektra_a_SOURCES = $(elektra_sources) \ exported_symbols.c libelektra_a_DEPENDENCIES = $(elektra_dependencies) objects libelektra_a_CFLAGS = -DELEKTRA_STATIC -DDEFAULT_BACKEND=\"$(default_backend)\" $(CSTDFLAGS) $(COPTFLAGS) $(CDBGFLAGS) libelektra_a_LIBADD = `cat objects` BUILT_SOURCES = exported_symbols.c lib_LTLIBRARIES = libelektra.la libelektra_la_SOURCES = $(elektra_sources) libelektra_la_DEPENDENCIES = $(elektra_dependencies) ../libloader/libloader-dynamic.la ../libhelper/libhelper-dynamic.la libelektra_la_CFLAGS = -DDEFAULT_BACKEND=\"default\" $(CSTDFLAGS) $(COPTFLAGS) $(CDBGFLAGS) libelektra_la_LDFLAGS = -version-info $(ELEKTRA_VERSION_API) libelektra_la_LIBADD = ../libloader/libloader-dynamic.la ../libhelper/libhelper-dynamic.la $(LIBICONV) EXTRA_DIST = exportsymbols.sh #objects: ../libloader/libloader-static.a all_backends ../libelektratools/libelektratools.a # @list='$(backends)'; for backend in $$list; do \ # bck_list=$$bck_list" ../backends/$$backend/libelektra-$$backend.a "; \ # done; \ # $(SHELL) exportobjects.sh ../libloader/libloader-static.a $$bck_list ../libelektratools/libelektratools.a object_deps = ../libloader/libloader-static.a \ ../libhelper/libhelper-static.a $(backend_static_libs) \ $(am__append_1) all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .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 \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/libelektra/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/libelektra/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh exportobjects.sh: $(top_builddir)/config.status $(srcdir)/exportobjects.sh.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-libLIBRARIES: $(lib_LIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" @list='$(lib_LIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(libLIBRARIES_INSTALL) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(libLIBRARIES_INSTALL) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done @$(POST_INSTALL) @list='$(lib_LIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ p=$(am__strip_dir) \ echo " $(RANLIB) '$(DESTDIR)$(libdir)/$$p'"; \ $(RANLIB) "$(DESTDIR)$(libdir)/$$p"; \ else :; fi; \ done uninstall-libLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(libdir)/$$p'"; \ rm -f "$(DESTDIR)$(libdir)/$$p"; \ done clean-libLIBRARIES: -test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES) libelektra.a: $(libelektra_a_OBJECTS) $(libelektra_a_DEPENDENCIES) -rm -f libelektra.a $(libelektra_a_AR) libelektra.a $(libelektra_a_OBJECTS) $(libelektra_a_LIBADD) $(RANLIB) libelektra.a install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(lib_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libelektra.la: $(libelektra_la_OBJECTS) $(libelektra_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libelektra_la_LDFLAGS) $(libelektra_la_OBJECTS) $(libelektra_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_a-exported_symbols.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_a-kdb.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_a-kdbcapability.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_a-kdbhandle.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_a-kdbhighlevel.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_a-key.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_a-keyhelpers.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_a-keymeta.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_a-keyname.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_a-keyset.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_a-keytest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_a-keyvalue.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_a-serialize.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_a-split.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_a-trie.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_la-kdb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_la-kdbcapability.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_la-kdbhandle.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_la-kdbhighlevel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_la-key.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_la-keyhelpers.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_la-keymeta.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_la-keyname.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_la-keyset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_la-keytest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_la-keyvalue.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_la-serialize.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_la-split.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektra_la-trie.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< libelektra_a-kdb.o: kdb.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -MT libelektra_a-kdb.o -MD -MP -MF "$(DEPDIR)/libelektra_a-kdb.Tpo" -c -o libelektra_a-kdb.o `test -f 'kdb.c' || echo '$(srcdir)/'`kdb.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_a-kdb.Tpo" "$(DEPDIR)/libelektra_a-kdb.Po"; else rm -f "$(DEPDIR)/libelektra_a-kdb.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kdb.c' object='libelektra_a-kdb.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -c -o libelektra_a-kdb.o `test -f 'kdb.c' || echo '$(srcdir)/'`kdb.c libelektra_a-kdb.obj: kdb.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -MT libelektra_a-kdb.obj -MD -MP -MF "$(DEPDIR)/libelektra_a-kdb.Tpo" -c -o libelektra_a-kdb.obj `if test -f 'kdb.c'; then $(CYGPATH_W) 'kdb.c'; else $(CYGPATH_W) '$(srcdir)/kdb.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_a-kdb.Tpo" "$(DEPDIR)/libelektra_a-kdb.Po"; else rm -f "$(DEPDIR)/libelektra_a-kdb.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kdb.c' object='libelektra_a-kdb.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -c -o libelektra_a-kdb.obj `if test -f 'kdb.c'; then $(CYGPATH_W) 'kdb.c'; else $(CYGPATH_W) '$(srcdir)/kdb.c'; fi` libelektra_a-kdbhandle.o: kdbhandle.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -MT libelektra_a-kdbhandle.o -MD -MP -MF "$(DEPDIR)/libelektra_a-kdbhandle.Tpo" -c -o libelektra_a-kdbhandle.o `test -f 'kdbhandle.c' || echo '$(srcdir)/'`kdbhandle.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_a-kdbhandle.Tpo" "$(DEPDIR)/libelektra_a-kdbhandle.Po"; else rm -f "$(DEPDIR)/libelektra_a-kdbhandle.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kdbhandle.c' object='libelektra_a-kdbhandle.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -c -o libelektra_a-kdbhandle.o `test -f 'kdbhandle.c' || echo '$(srcdir)/'`kdbhandle.c libelektra_a-kdbhandle.obj: kdbhandle.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -MT libelektra_a-kdbhandle.obj -MD -MP -MF "$(DEPDIR)/libelektra_a-kdbhandle.Tpo" -c -o libelektra_a-kdbhandle.obj `if test -f 'kdbhandle.c'; then $(CYGPATH_W) 'kdbhandle.c'; else $(CYGPATH_W) '$(srcdir)/kdbhandle.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_a-kdbhandle.Tpo" "$(DEPDIR)/libelektra_a-kdbhandle.Po"; else rm -f "$(DEPDIR)/libelektra_a-kdbhandle.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kdbhandle.c' object='libelektra_a-kdbhandle.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -c -o libelektra_a-kdbhandle.obj `if test -f 'kdbhandle.c'; then $(CYGPATH_W) 'kdbhandle.c'; else $(CYGPATH_W) '$(srcdir)/kdbhandle.c'; fi` libelektra_a-key.o: key.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -MT libelektra_a-key.o -MD -MP -MF "$(DEPDIR)/libelektra_a-key.Tpo" -c -o libelektra_a-key.o `test -f 'key.c' || echo '$(srcdir)/'`key.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_a-key.Tpo" "$(DEPDIR)/libelektra_a-key.Po"; else rm -f "$(DEPDIR)/libelektra_a-key.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='key.c' object='libelektra_a-key.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -c -o libelektra_a-key.o `test -f 'key.c' || echo '$(srcdir)/'`key.c libelektra_a-key.obj: key.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -MT libelektra_a-key.obj -MD -MP -MF "$(DEPDIR)/libelektra_a-key.Tpo" -c -o libelektra_a-key.obj `if test -f 'key.c'; then $(CYGPATH_W) 'key.c'; else $(CYGPATH_W) '$(srcdir)/key.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_a-key.Tpo" "$(DEPDIR)/libelektra_a-key.Po"; else rm -f "$(DEPDIR)/libelektra_a-key.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='key.c' object='libelektra_a-key.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -c -o libelektra_a-key.obj `if test -f 'key.c'; then $(CYGPATH_W) 'key.c'; else $(CYGPATH_W) '$(srcdir)/key.c'; fi` libelektra_a-keyset.o: keyset.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -MT libelektra_a-keyset.o -MD -MP -MF "$(DEPDIR)/libelektra_a-keyset.Tpo" -c -o libelektra_a-keyset.o `test -f 'keyset.c' || echo '$(srcdir)/'`keyset.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_a-keyset.Tpo" "$(DEPDIR)/libelektra_a-keyset.Po"; else rm -f "$(DEPDIR)/libelektra_a-keyset.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='keyset.c' object='libelektra_a-keyset.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -c -o libelektra_a-keyset.o `test -f 'keyset.c' || echo '$(srcdir)/'`keyset.c libelektra_a-keyset.obj: keyset.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -MT libelektra_a-keyset.obj -MD -MP -MF "$(DEPDIR)/libelektra_a-keyset.Tpo" -c -o libelektra_a-keyset.obj `if test -f 'keyset.c'; then $(CYGPATH_W) 'keyset.c'; else $(CYGPATH_W) '$(srcdir)/keyset.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_a-keyset.Tpo" "$(DEPDIR)/libelektra_a-keyset.Po"; else rm -f "$(DEPDIR)/libelektra_a-keyset.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='keyset.c' object='libelektra_a-keyset.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -c -o libelektra_a-keyset.obj `if test -f 'keyset.c'; then $(CYGPATH_W) 'keyset.c'; else $(CYGPATH_W) '$(srcdir)/keyset.c'; fi` libelektra_a-trie.o: trie.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -MT libelektra_a-trie.o -MD -MP -MF "$(DEPDIR)/libelektra_a-trie.Tpo" -c -o libelektra_a-trie.o `test -f 'trie.c' || echo '$(srcdir)/'`trie.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_a-trie.Tpo" "$(DEPDIR)/libelektra_a-trie.Po"; else rm -f "$(DEPDIR)/libelektra_a-trie.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='trie.c' object='libelektra_a-trie.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -c -o libelektra_a-trie.o `test -f 'trie.c' || echo '$(srcdir)/'`trie.c libelektra_a-trie.obj: trie.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -MT libelektra_a-trie.obj -MD -MP -MF "$(DEPDIR)/libelektra_a-trie.Tpo" -c -o libelektra_a-trie.obj `if test -f 'trie.c'; then $(CYGPATH_W) 'trie.c'; else $(CYGPATH_W) '$(srcdir)/trie.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_a-trie.Tpo" "$(DEPDIR)/libelektra_a-trie.Po"; else rm -f "$(DEPDIR)/libelektra_a-trie.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='trie.c' object='libelektra_a-trie.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -c -o libelektra_a-trie.obj `if test -f 'trie.c'; then $(CYGPATH_W) 'trie.c'; else $(CYGPATH_W) '$(srcdir)/trie.c'; fi` libelektra_a-kdbhighlevel.o: kdbhighlevel.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -MT libelektra_a-kdbhighlevel.o -MD -MP -MF "$(DEPDIR)/libelektra_a-kdbhighlevel.Tpo" -c -o libelektra_a-kdbhighlevel.o `test -f 'kdbhighlevel.c' || echo '$(srcdir)/'`kdbhighlevel.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_a-kdbhighlevel.Tpo" "$(DEPDIR)/libelektra_a-kdbhighlevel.Po"; else rm -f "$(DEPDIR)/libelektra_a-kdbhighlevel.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kdbhighlevel.c' object='libelektra_a-kdbhighlevel.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -c -o libelektra_a-kdbhighlevel.o `test -f 'kdbhighlevel.c' || echo '$(srcdir)/'`kdbhighlevel.c libelektra_a-kdbhighlevel.obj: kdbhighlevel.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -MT libelektra_a-kdbhighlevel.obj -MD -MP -MF "$(DEPDIR)/libelektra_a-kdbhighlevel.Tpo" -c -o libelektra_a-kdbhighlevel.obj `if test -f 'kdbhighlevel.c'; then $(CYGPATH_W) 'kdbhighlevel.c'; else $(CYGPATH_W) '$(srcdir)/kdbhighlevel.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_a-kdbhighlevel.Tpo" "$(DEPDIR)/libelektra_a-kdbhighlevel.Po"; else rm -f "$(DEPDIR)/libelektra_a-kdbhighlevel.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kdbhighlevel.c' object='libelektra_a-kdbhighlevel.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -c -o libelektra_a-kdbhighlevel.obj `if test -f 'kdbhighlevel.c'; then $(CYGPATH_W) 'kdbhighlevel.c'; else $(CYGPATH_W) '$(srcdir)/kdbhighlevel.c'; fi` libelektra_a-kdbcapability.o: kdbcapability.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -MT libelektra_a-kdbcapability.o -MD -MP -MF "$(DEPDIR)/libelektra_a-kdbcapability.Tpo" -c -o libelektra_a-kdbcapability.o `test -f 'kdbcapability.c' || echo '$(srcdir)/'`kdbcapability.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_a-kdbcapability.Tpo" "$(DEPDIR)/libelektra_a-kdbcapability.Po"; else rm -f "$(DEPDIR)/libelektra_a-kdbcapability.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kdbcapability.c' object='libelektra_a-kdbcapability.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -c -o libelektra_a-kdbcapability.o `test -f 'kdbcapability.c' || echo '$(srcdir)/'`kdbcapability.c libelektra_a-kdbcapability.obj: kdbcapability.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -MT libelektra_a-kdbcapability.obj -MD -MP -MF "$(DEPDIR)/libelektra_a-kdbcapability.Tpo" -c -o libelektra_a-kdbcapability.obj `if test -f 'kdbcapability.c'; then $(CYGPATH_W) 'kdbcapability.c'; else $(CYGPATH_W) '$(srcdir)/kdbcapability.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_a-kdbcapability.Tpo" "$(DEPDIR)/libelektra_a-kdbcapability.Po"; else rm -f "$(DEPDIR)/libelektra_a-kdbcapability.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kdbcapability.c' object='libelektra_a-kdbcapability.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -c -o libelektra_a-kdbcapability.obj `if test -f 'kdbcapability.c'; then $(CYGPATH_W) 'kdbcapability.c'; else $(CYGPATH_W) '$(srcdir)/kdbcapability.c'; fi` libelektra_a-keyhelpers.o: keyhelpers.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -MT libelektra_a-keyhelpers.o -MD -MP -MF "$(DEPDIR)/libelektra_a-keyhelpers.Tpo" -c -o libelektra_a-keyhelpers.o `test -f 'keyhelpers.c' || echo '$(srcdir)/'`keyhelpers.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_a-keyhelpers.Tpo" "$(DEPDIR)/libelektra_a-keyhelpers.Po"; else rm -f "$(DEPDIR)/libelektra_a-keyhelpers.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='keyhelpers.c' object='libelektra_a-keyhelpers.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -c -o libelektra_a-keyhelpers.o `test -f 'keyhelpers.c' || echo '$(srcdir)/'`keyhelpers.c libelektra_a-keyhelpers.obj: keyhelpers.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -MT libelektra_a-keyhelpers.obj -MD -MP -MF "$(DEPDIR)/libelektra_a-keyhelpers.Tpo" -c -o libelektra_a-keyhelpers.obj `if test -f 'keyhelpers.c'; then $(CYGPATH_W) 'keyhelpers.c'; else $(CYGPATH_W) '$(srcdir)/keyhelpers.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_a-keyhelpers.Tpo" "$(DEPDIR)/libelektra_a-keyhelpers.Po"; else rm -f "$(DEPDIR)/libelektra_a-keyhelpers.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='keyhelpers.c' object='libelektra_a-keyhelpers.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -c -o libelektra_a-keyhelpers.obj `if test -f 'keyhelpers.c'; then $(CYGPATH_W) 'keyhelpers.c'; else $(CYGPATH_W) '$(srcdir)/keyhelpers.c'; fi` libelektra_a-keymeta.o: keymeta.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -MT libelektra_a-keymeta.o -MD -MP -MF "$(DEPDIR)/libelektra_a-keymeta.Tpo" -c -o libelektra_a-keymeta.o `test -f 'keymeta.c' || echo '$(srcdir)/'`keymeta.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_a-keymeta.Tpo" "$(DEPDIR)/libelektra_a-keymeta.Po"; else rm -f "$(DEPDIR)/libelektra_a-keymeta.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='keymeta.c' object='libelektra_a-keymeta.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -c -o libelektra_a-keymeta.o `test -f 'keymeta.c' || echo '$(srcdir)/'`keymeta.c libelektra_a-keymeta.obj: keymeta.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -MT libelektra_a-keymeta.obj -MD -MP -MF "$(DEPDIR)/libelektra_a-keymeta.Tpo" -c -o libelektra_a-keymeta.obj `if test -f 'keymeta.c'; then $(CYGPATH_W) 'keymeta.c'; else $(CYGPATH_W) '$(srcdir)/keymeta.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_a-keymeta.Tpo" "$(DEPDIR)/libelektra_a-keymeta.Po"; else rm -f "$(DEPDIR)/libelektra_a-keymeta.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='keymeta.c' object='libelektra_a-keymeta.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -c -o libelektra_a-keymeta.obj `if test -f 'keymeta.c'; then $(CYGPATH_W) 'keymeta.c'; else $(CYGPATH_W) '$(srcdir)/keymeta.c'; fi` libelektra_a-keyname.o: keyname.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -MT libelektra_a-keyname.o -MD -MP -MF "$(DEPDIR)/libelektra_a-keyname.Tpo" -c -o libelektra_a-keyname.o `test -f 'keyname.c' || echo '$(srcdir)/'`keyname.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_a-keyname.Tpo" "$(DEPDIR)/libelektra_a-keyname.Po"; else rm -f "$(DEPDIR)/libelektra_a-keyname.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='keyname.c' object='libelektra_a-keyname.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -c -o libelektra_a-keyname.o `test -f 'keyname.c' || echo '$(srcdir)/'`keyname.c libelektra_a-keyname.obj: keyname.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -MT libelektra_a-keyname.obj -MD -MP -MF "$(DEPDIR)/libelektra_a-keyname.Tpo" -c -o libelektra_a-keyname.obj `if test -f 'keyname.c'; then $(CYGPATH_W) 'keyname.c'; else $(CYGPATH_W) '$(srcdir)/keyname.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_a-keyname.Tpo" "$(DEPDIR)/libelektra_a-keyname.Po"; else rm -f "$(DEPDIR)/libelektra_a-keyname.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='keyname.c' object='libelektra_a-keyname.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -c -o libelektra_a-keyname.obj `if test -f 'keyname.c'; then $(CYGPATH_W) 'keyname.c'; else $(CYGPATH_W) '$(srcdir)/keyname.c'; fi` libelektra_a-keytest.o: keytest.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -MT libelektra_a-keytest.o -MD -MP -MF "$(DEPDIR)/libelektra_a-keytest.Tpo" -c -o libelektra_a-keytest.o `test -f 'keytest.c' || echo '$(srcdir)/'`keytest.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_a-keytest.Tpo" "$(DEPDIR)/libelektra_a-keytest.Po"; else rm -f "$(DEPDIR)/libelektra_a-keytest.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='keytest.c' object='libelektra_a-keytest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -c -o libelektra_a-keytest.o `test -f 'keytest.c' || echo '$(srcdir)/'`keytest.c libelektra_a-keytest.obj: keytest.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -MT libelektra_a-keytest.obj -MD -MP -MF "$(DEPDIR)/libelektra_a-keytest.Tpo" -c -o libelektra_a-keytest.obj `if test -f 'keytest.c'; then $(CYGPATH_W) 'keytest.c'; else $(CYGPATH_W) '$(srcdir)/keytest.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_a-keytest.Tpo" "$(DEPDIR)/libelektra_a-keytest.Po"; else rm -f "$(DEPDIR)/libelektra_a-keytest.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='keytest.c' object='libelektra_a-keytest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -c -o libelektra_a-keytest.obj `if test -f 'keytest.c'; then $(CYGPATH_W) 'keytest.c'; else $(CYGPATH_W) '$(srcdir)/keytest.c'; fi` libelektra_a-keyvalue.o: keyvalue.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -MT libelektra_a-keyvalue.o -MD -MP -MF "$(DEPDIR)/libelektra_a-keyvalue.Tpo" -c -o libelektra_a-keyvalue.o `test -f 'keyvalue.c' || echo '$(srcdir)/'`keyvalue.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_a-keyvalue.Tpo" "$(DEPDIR)/libelektra_a-keyvalue.Po"; else rm -f "$(DEPDIR)/libelektra_a-keyvalue.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='keyvalue.c' object='libelektra_a-keyvalue.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -c -o libelektra_a-keyvalue.o `test -f 'keyvalue.c' || echo '$(srcdir)/'`keyvalue.c libelektra_a-keyvalue.obj: keyvalue.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -MT libelektra_a-keyvalue.obj -MD -MP -MF "$(DEPDIR)/libelektra_a-keyvalue.Tpo" -c -o libelektra_a-keyvalue.obj `if test -f 'keyvalue.c'; then $(CYGPATH_W) 'keyvalue.c'; else $(CYGPATH_W) '$(srcdir)/keyvalue.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_a-keyvalue.Tpo" "$(DEPDIR)/libelektra_a-keyvalue.Po"; else rm -f "$(DEPDIR)/libelektra_a-keyvalue.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='keyvalue.c' object='libelektra_a-keyvalue.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -c -o libelektra_a-keyvalue.obj `if test -f 'keyvalue.c'; then $(CYGPATH_W) 'keyvalue.c'; else $(CYGPATH_W) '$(srcdir)/keyvalue.c'; fi` libelektra_a-serialize.o: serialize.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -MT libelektra_a-serialize.o -MD -MP -MF "$(DEPDIR)/libelektra_a-serialize.Tpo" -c -o libelektra_a-serialize.o `test -f 'serialize.c' || echo '$(srcdir)/'`serialize.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_a-serialize.Tpo" "$(DEPDIR)/libelektra_a-serialize.Po"; else rm -f "$(DEPDIR)/libelektra_a-serialize.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='serialize.c' object='libelektra_a-serialize.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -c -o libelektra_a-serialize.o `test -f 'serialize.c' || echo '$(srcdir)/'`serialize.c libelektra_a-serialize.obj: serialize.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -MT libelektra_a-serialize.obj -MD -MP -MF "$(DEPDIR)/libelektra_a-serialize.Tpo" -c -o libelektra_a-serialize.obj `if test -f 'serialize.c'; then $(CYGPATH_W) 'serialize.c'; else $(CYGPATH_W) '$(srcdir)/serialize.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_a-serialize.Tpo" "$(DEPDIR)/libelektra_a-serialize.Po"; else rm -f "$(DEPDIR)/libelektra_a-serialize.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='serialize.c' object='libelektra_a-serialize.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -c -o libelektra_a-serialize.obj `if test -f 'serialize.c'; then $(CYGPATH_W) 'serialize.c'; else $(CYGPATH_W) '$(srcdir)/serialize.c'; fi` libelektra_a-split.o: split.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -MT libelektra_a-split.o -MD -MP -MF "$(DEPDIR)/libelektra_a-split.Tpo" -c -o libelektra_a-split.o `test -f 'split.c' || echo '$(srcdir)/'`split.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_a-split.Tpo" "$(DEPDIR)/libelektra_a-split.Po"; else rm -f "$(DEPDIR)/libelektra_a-split.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='split.c' object='libelektra_a-split.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -c -o libelektra_a-split.o `test -f 'split.c' || echo '$(srcdir)/'`split.c libelektra_a-split.obj: split.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -MT libelektra_a-split.obj -MD -MP -MF "$(DEPDIR)/libelektra_a-split.Tpo" -c -o libelektra_a-split.obj `if test -f 'split.c'; then $(CYGPATH_W) 'split.c'; else $(CYGPATH_W) '$(srcdir)/split.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_a-split.Tpo" "$(DEPDIR)/libelektra_a-split.Po"; else rm -f "$(DEPDIR)/libelektra_a-split.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='split.c' object='libelektra_a-split.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -c -o libelektra_a-split.obj `if test -f 'split.c'; then $(CYGPATH_W) 'split.c'; else $(CYGPATH_W) '$(srcdir)/split.c'; fi` libelektra_a-exported_symbols.o: exported_symbols.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -MT libelektra_a-exported_symbols.o -MD -MP -MF "$(DEPDIR)/libelektra_a-exported_symbols.Tpo" -c -o libelektra_a-exported_symbols.o `test -f 'exported_symbols.c' || echo '$(srcdir)/'`exported_symbols.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_a-exported_symbols.Tpo" "$(DEPDIR)/libelektra_a-exported_symbols.Po"; else rm -f "$(DEPDIR)/libelektra_a-exported_symbols.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='exported_symbols.c' object='libelektra_a-exported_symbols.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -c -o libelektra_a-exported_symbols.o `test -f 'exported_symbols.c' || echo '$(srcdir)/'`exported_symbols.c libelektra_a-exported_symbols.obj: exported_symbols.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -MT libelektra_a-exported_symbols.obj -MD -MP -MF "$(DEPDIR)/libelektra_a-exported_symbols.Tpo" -c -o libelektra_a-exported_symbols.obj `if test -f 'exported_symbols.c'; then $(CYGPATH_W) 'exported_symbols.c'; else $(CYGPATH_W) '$(srcdir)/exported_symbols.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_a-exported_symbols.Tpo" "$(DEPDIR)/libelektra_a-exported_symbols.Po"; else rm -f "$(DEPDIR)/libelektra_a-exported_symbols.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='exported_symbols.c' object='libelektra_a-exported_symbols.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_a_CFLAGS) $(CFLAGS) -c -o libelektra_a-exported_symbols.obj `if test -f 'exported_symbols.c'; then $(CYGPATH_W) 'exported_symbols.c'; else $(CYGPATH_W) '$(srcdir)/exported_symbols.c'; fi` libelektra_la-kdb.lo: kdb.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_la_CFLAGS) $(CFLAGS) -MT libelektra_la-kdb.lo -MD -MP -MF "$(DEPDIR)/libelektra_la-kdb.Tpo" -c -o libelektra_la-kdb.lo `test -f 'kdb.c' || echo '$(srcdir)/'`kdb.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_la-kdb.Tpo" "$(DEPDIR)/libelektra_la-kdb.Plo"; else rm -f "$(DEPDIR)/libelektra_la-kdb.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kdb.c' object='libelektra_la-kdb.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_la_CFLAGS) $(CFLAGS) -c -o libelektra_la-kdb.lo `test -f 'kdb.c' || echo '$(srcdir)/'`kdb.c libelektra_la-kdbhandle.lo: kdbhandle.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_la_CFLAGS) $(CFLAGS) -MT libelektra_la-kdbhandle.lo -MD -MP -MF "$(DEPDIR)/libelektra_la-kdbhandle.Tpo" -c -o libelektra_la-kdbhandle.lo `test -f 'kdbhandle.c' || echo '$(srcdir)/'`kdbhandle.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_la-kdbhandle.Tpo" "$(DEPDIR)/libelektra_la-kdbhandle.Plo"; else rm -f "$(DEPDIR)/libelektra_la-kdbhandle.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kdbhandle.c' object='libelektra_la-kdbhandle.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_la_CFLAGS) $(CFLAGS) -c -o libelektra_la-kdbhandle.lo `test -f 'kdbhandle.c' || echo '$(srcdir)/'`kdbhandle.c libelektra_la-key.lo: key.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_la_CFLAGS) $(CFLAGS) -MT libelektra_la-key.lo -MD -MP -MF "$(DEPDIR)/libelektra_la-key.Tpo" -c -o libelektra_la-key.lo `test -f 'key.c' || echo '$(srcdir)/'`key.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_la-key.Tpo" "$(DEPDIR)/libelektra_la-key.Plo"; else rm -f "$(DEPDIR)/libelektra_la-key.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='key.c' object='libelektra_la-key.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_la_CFLAGS) $(CFLAGS) -c -o libelektra_la-key.lo `test -f 'key.c' || echo '$(srcdir)/'`key.c libelektra_la-keyset.lo: keyset.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_la_CFLAGS) $(CFLAGS) -MT libelektra_la-keyset.lo -MD -MP -MF "$(DEPDIR)/libelektra_la-keyset.Tpo" -c -o libelektra_la-keyset.lo `test -f 'keyset.c' || echo '$(srcdir)/'`keyset.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_la-keyset.Tpo" "$(DEPDIR)/libelektra_la-keyset.Plo"; else rm -f "$(DEPDIR)/libelektra_la-keyset.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='keyset.c' object='libelektra_la-keyset.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_la_CFLAGS) $(CFLAGS) -c -o libelektra_la-keyset.lo `test -f 'keyset.c' || echo '$(srcdir)/'`keyset.c libelektra_la-trie.lo: trie.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_la_CFLAGS) $(CFLAGS) -MT libelektra_la-trie.lo -MD -MP -MF "$(DEPDIR)/libelektra_la-trie.Tpo" -c -o libelektra_la-trie.lo `test -f 'trie.c' || echo '$(srcdir)/'`trie.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_la-trie.Tpo" "$(DEPDIR)/libelektra_la-trie.Plo"; else rm -f "$(DEPDIR)/libelektra_la-trie.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='trie.c' object='libelektra_la-trie.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_la_CFLAGS) $(CFLAGS) -c -o libelektra_la-trie.lo `test -f 'trie.c' || echo '$(srcdir)/'`trie.c libelektra_la-kdbhighlevel.lo: kdbhighlevel.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_la_CFLAGS) $(CFLAGS) -MT libelektra_la-kdbhighlevel.lo -MD -MP -MF "$(DEPDIR)/libelektra_la-kdbhighlevel.Tpo" -c -o libelektra_la-kdbhighlevel.lo `test -f 'kdbhighlevel.c' || echo '$(srcdir)/'`kdbhighlevel.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_la-kdbhighlevel.Tpo" "$(DEPDIR)/libelektra_la-kdbhighlevel.Plo"; else rm -f "$(DEPDIR)/libelektra_la-kdbhighlevel.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kdbhighlevel.c' object='libelektra_la-kdbhighlevel.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_la_CFLAGS) $(CFLAGS) -c -o libelektra_la-kdbhighlevel.lo `test -f 'kdbhighlevel.c' || echo '$(srcdir)/'`kdbhighlevel.c libelektra_la-kdbcapability.lo: kdbcapability.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_la_CFLAGS) $(CFLAGS) -MT libelektra_la-kdbcapability.lo -MD -MP -MF "$(DEPDIR)/libelektra_la-kdbcapability.Tpo" -c -o libelektra_la-kdbcapability.lo `test -f 'kdbcapability.c' || echo '$(srcdir)/'`kdbcapability.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_la-kdbcapability.Tpo" "$(DEPDIR)/libelektra_la-kdbcapability.Plo"; else rm -f "$(DEPDIR)/libelektra_la-kdbcapability.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kdbcapability.c' object='libelektra_la-kdbcapability.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_la_CFLAGS) $(CFLAGS) -c -o libelektra_la-kdbcapability.lo `test -f 'kdbcapability.c' || echo '$(srcdir)/'`kdbcapability.c libelektra_la-keyhelpers.lo: keyhelpers.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_la_CFLAGS) $(CFLAGS) -MT libelektra_la-keyhelpers.lo -MD -MP -MF "$(DEPDIR)/libelektra_la-keyhelpers.Tpo" -c -o libelektra_la-keyhelpers.lo `test -f 'keyhelpers.c' || echo '$(srcdir)/'`keyhelpers.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_la-keyhelpers.Tpo" "$(DEPDIR)/libelektra_la-keyhelpers.Plo"; else rm -f "$(DEPDIR)/libelektra_la-keyhelpers.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='keyhelpers.c' object='libelektra_la-keyhelpers.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_la_CFLAGS) $(CFLAGS) -c -o libelektra_la-keyhelpers.lo `test -f 'keyhelpers.c' || echo '$(srcdir)/'`keyhelpers.c libelektra_la-keymeta.lo: keymeta.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_la_CFLAGS) $(CFLAGS) -MT libelektra_la-keymeta.lo -MD -MP -MF "$(DEPDIR)/libelektra_la-keymeta.Tpo" -c -o libelektra_la-keymeta.lo `test -f 'keymeta.c' || echo '$(srcdir)/'`keymeta.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_la-keymeta.Tpo" "$(DEPDIR)/libelektra_la-keymeta.Plo"; else rm -f "$(DEPDIR)/libelektra_la-keymeta.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='keymeta.c' object='libelektra_la-keymeta.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_la_CFLAGS) $(CFLAGS) -c -o libelektra_la-keymeta.lo `test -f 'keymeta.c' || echo '$(srcdir)/'`keymeta.c libelektra_la-keyname.lo: keyname.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_la_CFLAGS) $(CFLAGS) -MT libelektra_la-keyname.lo -MD -MP -MF "$(DEPDIR)/libelektra_la-keyname.Tpo" -c -o libelektra_la-keyname.lo `test -f 'keyname.c' || echo '$(srcdir)/'`keyname.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_la-keyname.Tpo" "$(DEPDIR)/libelektra_la-keyname.Plo"; else rm -f "$(DEPDIR)/libelektra_la-keyname.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='keyname.c' object='libelektra_la-keyname.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_la_CFLAGS) $(CFLAGS) -c -o libelektra_la-keyname.lo `test -f 'keyname.c' || echo '$(srcdir)/'`keyname.c libelektra_la-keytest.lo: keytest.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_la_CFLAGS) $(CFLAGS) -MT libelektra_la-keytest.lo -MD -MP -MF "$(DEPDIR)/libelektra_la-keytest.Tpo" -c -o libelektra_la-keytest.lo `test -f 'keytest.c' || echo '$(srcdir)/'`keytest.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_la-keytest.Tpo" "$(DEPDIR)/libelektra_la-keytest.Plo"; else rm -f "$(DEPDIR)/libelektra_la-keytest.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='keytest.c' object='libelektra_la-keytest.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_la_CFLAGS) $(CFLAGS) -c -o libelektra_la-keytest.lo `test -f 'keytest.c' || echo '$(srcdir)/'`keytest.c libelektra_la-keyvalue.lo: keyvalue.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_la_CFLAGS) $(CFLAGS) -MT libelektra_la-keyvalue.lo -MD -MP -MF "$(DEPDIR)/libelektra_la-keyvalue.Tpo" -c -o libelektra_la-keyvalue.lo `test -f 'keyvalue.c' || echo '$(srcdir)/'`keyvalue.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_la-keyvalue.Tpo" "$(DEPDIR)/libelektra_la-keyvalue.Plo"; else rm -f "$(DEPDIR)/libelektra_la-keyvalue.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='keyvalue.c' object='libelektra_la-keyvalue.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_la_CFLAGS) $(CFLAGS) -c -o libelektra_la-keyvalue.lo `test -f 'keyvalue.c' || echo '$(srcdir)/'`keyvalue.c libelektra_la-serialize.lo: serialize.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_la_CFLAGS) $(CFLAGS) -MT libelektra_la-serialize.lo -MD -MP -MF "$(DEPDIR)/libelektra_la-serialize.Tpo" -c -o libelektra_la-serialize.lo `test -f 'serialize.c' || echo '$(srcdir)/'`serialize.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_la-serialize.Tpo" "$(DEPDIR)/libelektra_la-serialize.Plo"; else rm -f "$(DEPDIR)/libelektra_la-serialize.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='serialize.c' object='libelektra_la-serialize.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_la_CFLAGS) $(CFLAGS) -c -o libelektra_la-serialize.lo `test -f 'serialize.c' || echo '$(srcdir)/'`serialize.c libelektra_la-split.lo: split.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_la_CFLAGS) $(CFLAGS) -MT libelektra_la-split.lo -MD -MP -MF "$(DEPDIR)/libelektra_la-split.Tpo" -c -o libelektra_la-split.lo `test -f 'split.c' || echo '$(srcdir)/'`split.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektra_la-split.Tpo" "$(DEPDIR)/libelektra_la-split.Plo"; else rm -f "$(DEPDIR)/libelektra_la-split.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='split.c' object='libelektra_la-split.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektra_la_CFLAGS) $(CFLAGS) -c -o libelektra_la-split.lo `test -f 'split.c' || echo '$(srcdir)/'`split.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-generic clean-libLIBRARIES clean-libLTLIBRARIES \ clean-libtool clean-local mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-libLIBRARIES install-libLTLIBRARIES install-info: install-info-am install-man: 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-info-am uninstall-libLIBRARIES \ uninstall-libLTLIBRARIES .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLIBRARIES clean-libLTLIBRARIES clean-libtool \ clean-local ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-exec install-exec-am \ install-info install-info-am install-libLIBRARIES \ install-libLTLIBRARIES install-man install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-info-am \ uninstall-libLIBRARIES uninstall-libLTLIBRARIES ../include/kdbprivate.h: cd ../include && $(MAKE) kdbprivate.h ../libloader/libloader-static.a: cd ../libloader && $(MAKE) libloader-static.a ../libloader/libloader-dynamic.la: cd ../libloader && $(MAKE) libloader-dynamic.la ../libhelper/libhelper-static.a: cd ../libhelper && $(MAKE) libhelper-static.a ../libhelper/libhelper-dynamic.la: cd ../libhelper && $(MAKE) libhelper-dynamic.la @HAVE_XML_TRUE@../libelektratools/libelektratools.a: @HAVE_XML_TRUE@ cd ../libelektratools && $(MAKE) libelektratools.a #all_backends: # cd ../backends && $(MAKE) all ../backends/filesys/libelektra-filesys.a: cd ../backends/filesys && $(MAKE) libelektra-filesys.a ../backends/ini/libelektra-ini.a: cd ../backends/ini && $(MAKE) libelektra-ini.a ../backends/fstab/libelektra-fstab.a: cd ../backends/fstab && $(MAKE) libelektra-fstab.a ../backends/passwd/libelektra-passwd.a: cd ../backends/passwd && $(MAKE) libelektra-passwd.a ../backends/hosts/libelektra-hosts.a: cd ../backends/hosts && $(MAKE) libelektra-hosts.a ../backends/template/libelektra-template.a: cd ../backends/template && $(MAKE) libelektra-template.a ../backends/daemon/libelektra-daemon.a: cd ../backends/daemon && $(MAKE) libelektra-daemon.a ../backends/berkeleydb/libelektra-berkeleydb.a: cd ../backends/berkeleydb && $(MAKE) libelektra-berkeleydb.a ../backends/gconf/libelektra-gconf.a: cd ../backends/gconf && $(MAKE) libelektra-gconf.a objects: $(object_deps) $(SHELL) exportobjects.sh $(object_deps) exported_symbols.c: ../../config.status $(SHELL) $(srcdir)/exportsymbols.sh $(default_backend) $(BACKENDS) $(elektratools) #exported_symbols.c: all_backends ../libelektratools/libelektratools.a # @list='$(backends)'; for backend in $$list; do \ # bck_list=$$bck_list" ../backends/$$backend/libelektra-$$backend.a"; \ # done; \ # $(SHELL) exportsymbols.sh $$bck_list ../libelektratools/libelektratools.a clean-local: rm -f objects rm -f exported_symbols.c exported_symbols.h rm -f *.gcno *.gcda *.gcno # 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: elektra-0.7.1/src/libelektra/exported_symbols.c0000644000076400001440000000154311365511511016544 00000000000000/* exported_symbols.c generated by exportsymbols.sh */ #include kdblib_symbol kdb_exported_syms[] = { {"libelektra-default", 0 }, {"kdbBackendFactory", &libelektra_filesys_LTX_kdbBackendFactory }, {"libelektra-filesys", 0 }, {"kdbBackendFactory", &libelektra_filesys_LTX_kdbBackendFactory }, {"libelektra-hosts", 0 }, {"kdbBackendFactory", &libelektra_hosts_LTX_kdbBackendFactory }, {"libelektratools", 0 }, {"ksFromXMLfile", &libelektratools_LTX_ksFromXMLfile }, {"ksFromXML", &libelektratools_LTX_ksFromXML }, {"ksToStream", &libelektratools_LTX_ksToStream }, {"ksOutput", &libelektratools_LTX_ksOutput }, {"ksGenerate", &libelektratools_LTX_ksGenerate }, {"keyToStream", &libelektratools_LTX_keyToStream }, {"keyOutput", &libelektratools_LTX_keyOutput }, {"keyGenerate", &libelektratools_LTX_keyGenerate }, { 0 , 0 } }; elektra-0.7.1/src/libelektra/exportobjects.sh.in0000644000076400001440000000066011361542117016633 00000000000000#!/bin/sh -x # exportobjects.sh # ---------------- # # Export the list of all backend's objects files # to be included in the static version libelektra # # (c) 2006 Yannick Lecaillez for lib in "$@" do if [ -r $lib ]; then echo "Get objects files for $lib ..." @AR@ t $lib | @AWK@ -v "dir=`dirname $lib`" '/^[^_]/ {printf "%s/%s ", dir,$0}' >> objects else echo "SKIPED: $lib doesn't exist." fi done echo "" >> objects elektra-0.7.1/src/libelektra/exportsymbols.sh0000644000076400001440000000326211361542117016266 00000000000000#!/bin/sh -x # exportsymbols.sh # ---------------- # # Export kdbBackendFactory entry point symbols # for each compiled backend # # (c) 2006 Yannick Lecaillez func=kdbBackendFactory toolsfuncs='ksFromXMLfile ksFromXML ksToStream ksOutput ksGenerate keyToStream keyOutput keyGenerate' echo '/* exported_symbols.h generated by exportsymbols.sh */ #include ' > exported_symbols.h for lib in "$@" do if test $lib = libelektratools; then for toolsfunc in $toolsfuncs; do symbol=${lib}_LTX_${toolsfunc} echo "extern void $symbol (void);" >> exported_symbols.h done else symbol=libelektra_${lib}_LTX_${func} echo "extern void $symbol (void);" >> exported_symbols.h fi done echo '/* exported_symbols.c generated by exportsymbols.sh */ #include kdblib_symbol kdb_exported_syms[] = { ' > exported_symbols.c lib="$1" echo "Exporting symbols for default ..." fname="libelektra-default" symbol=libelektra_${lib}_LTX_${func} echo " {\"$fname\", 0 }," >> exported_symbols.c echo " {\"$func\", &$symbol }," >> exported_symbols.c echo "" >> exported_symbols.c shift for lib in "$@" do if test $lib = libelektratools; then fname=libelektratools echo " {\"$fname\", 0 }," >> exported_symbols.c for toolsfunc in $toolsfuncs; do symbol=${fname}_LTX_${toolsfunc} echo " {\"$toolsfunc\", &$symbol }," >> exported_symbols.c done else echo "Exporting symbols for $lib ..." fname="libelektra-${lib}" symbol=libelektra_${lib}_LTX_${func} echo " {\"$fname\", 0 }," >> exported_symbols.c echo " {\"$func\", &$symbol }," >> exported_symbols.c fi echo "" >> exported_symbols.c done echo " { 0 , 0 }" >> exported_symbols.c echo "};" >> exported_symbols.c elektra-0.7.1/src/libelektra/kdb.c0000644000076400001440000007174411365507605013725 00000000000000/*************************************************************************** kdb.c - Low level functions for access the Key Database ------------------- begin : Mon Dec 29 2003 copyright : (C) 2003 by Avi Alkalay email : avi@unix.sh ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ /** * @defgroup kdb KDB :: Low Level Methods * @brief General methods to access the Key database. * * To use them: * @code * #include * @endcode * * The kdb*() class of methods are used to access the storage, to get and set * @link key Keys @endlink or @link keyset KeySets @endlink. * * The most important functions are: * - kdbOpen() * - kdbClose() * - kdbGet() * - kdbSet() * * The two essential functions for dynamic information about backends are: * - kdbGetMountpoint() * - kdbGetCapability() * * They use some backend implementation to know the details about how to access * the storage. Currently we have this backends: * - @c berkeleydb: the keys are stored in a Berkeley DB database, providing * very small footprint, speed, and other advantages. * - @c filesys: the key hierarchy and data are saved as plain text files in * the filesystem. * - @c ini: the key hierarchy are saved into configuration files. * @see http://www.libelektra.org/Ini * - @c fstab: a reference backend used to interpret the @c /etc/fstab file as * a set of keys under @c system/filesystems . * - @c gconf: makes Elektra use the GConf daemon to access keys. Only the * @c user/ tree is available since GConf is not system wide. * * Backends are physically a library named @c /lib/libelektra-{NAME}.so. * * See @link backend writing a new backend @endlink for information * about how to write a backend. * * Language binding writers should follow the same rules: * - You must relay completely on the backend-dependent methods. * - You may use or reimplement the second set of methods. * - You should completely reimplement in your language the higher * lever methods. * - Many methods are just for comfort in C. These methods are marked * and need not to be implemented if the binding language has e.g. string * operators which can do the operation easily. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #if DEBUG && HAVE_STDIO_H #include #endif #ifdef HAVE_LOCALE_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STDARG_H #include #endif #ifdef HAVE_CTYPE_H #include #endif #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_STDIO_H #include #endif #include KDB* kdbOpenBackend(const char *backendname, const char *mountpoint, KeySet *config) { KDB * handle; char* backend_name; kdbLibHandle dlhandle=0; typedef KDB *(*KDBBackendFactory) (void); KDBBackendFactory kdbBackendFactory=0; backend_name = malloc(sizeof("libelektra-")+strlen(backendname)); strncpy(backend_name,"libelektra-",sizeof("libelektra-")); strncat(backend_name,backendname,strlen(backendname)); dlhandle=kdbLibLoad(backend_name); if (dlhandle == 0) { /*errno=KDB_ERR_EBACKEND;*/ goto err_clup; /* error */ } /* load the "kdbBackendFactory" symbol from backend */ kdbBackendFactory=(KDBBackendFactory)kdbLibSym(dlhandle, "kdbBackendFactory"); if (kdbBackendFactory == 0) { /*errno=KDB_ERR_NOSYS;*/ goto err_clup; /* error */ } handle=kdbBackendFactory(); if (handle == 0) { /*errno=KDB_ERR_NOSYS;*/ goto err_clup; /* error */ } /* save the libloader handle for future use */ handle->dlHandle=dlhandle; handle->trie = 0; handle->mountpoint=keyNew(mountpoint,KEY_VALUE,backendname,0); /* let the backend initialize itself */ if (handle->kdbOpen) { handle->config = config; handle->kdbOpen(handle); } else { /*errno=KDB_ERR_NOSYS;*/ goto err_clup; } #if DEBUG && VERBOSE printf("Finished loading Backend %s\n", backend_name); #endif free(backend_name); return handle; err_clup: #if DEBUG fprintf(stderr,"Failed to load backend %s\n", backend_name); #endif free(backend_name); return 0; } int kdbCloseBackend(KDB *handle) { int rc=0; if (handle->kdbClose) rc=handle->kdbClose(handle); if (rc == 0) { kdbLibClose(handle->dlHandle); capDel (handle->capability); keyDel(handle->mountpoint); if (handle->config) ksDel(handle->config); free(handle); } return rc; } /** * Dynamically mount a single backend. * * Maps the mountpoint, defined through its name and value, into the global elektra * hierachy. If successfull, under the mountpoint another backend will reside. * * This only works for a single KDB, that means a single thread in a single process. * You may want statically mounting by editing system/elektra/mountpoints. * * If you allocated mountpoint and config first, make sure that you free it! * It is ok to free it immediately afterwards. * * @param handle handle to the kdb data structure * @param mountpoint the keyName() of this key is the mountpoint, keyValue() the backend * @param config the configuration passed for that backend * @return 0 on success, -1 if an error occurred * @ingroup kdb */ int kdbMount(KDB *handle, const Key *mountpoint, const KeySet *config) { char *mountpoint_slash; const char *key_name; const char *backend; size_t size; KDB *h; Trie *trie; KeySet *c; key_name=keyName(mountpoint); backend=keyValue(mountpoint); size = kdbiStrLen(key_name); mountpoint_slash = malloc (size + 1); strcpy (mountpoint_slash, key_name); mountpoint_slash [size-1] = '/'; mountpoint_slash [size] = 0; h=kdbOpenBackend(backend,mountpoint_slash,c=ksDup(config)); if (!h) { free(mountpoint_slash); ksDel(c); return -1; } trie=insert_trie(kdbhGetTrie(handle), mountpoint_slash, h); kdbhSetTrie(handle,trie); free(mountpoint_slash); return 0; } /** * Dynamically unmount a single backend. * * Unmount a backend that was mounted with kdbMount() before. * * @param handle handle to the kdb data structure * @param mountpoint directory where backend is mounted to, that should be unmounted * @return 0 on success, -1 if an error ocurred. * @ingroup kdb */ int kdbUnmount(KDB *handle, const Key *mountpoint) { size_t size; const char *key_name; char *mountpoint_slash; if (mountpoint==NULL) { return -1; } if (kdbGetBackend(handle,mountpoint)==NULL) { return -1; } key_name=keyName(mountpoint); size = kdbiStrLen(key_name); mountpoint_slash = malloc (size + 1); strcpy (mountpoint_slash, key_name); mountpoint_slash [size-1] = '/'; mountpoint_slash [size] = 0; delete_trie(kdbhGetTrie(handle), mountpoint_slash,kdbCloseBackend); free(mountpoint_slash); return 0; } /** * Lookup a mountpoint in a handle for a specific key. * * Will return a key representing the mountpoint or null * if there is no appropriate mountpoint e.g. its the * root mountpoint. * * Together with kdbGetCapability() the two essential * informations about mounted backends. * * @par Example: * @code Key * key = keyNew ("system/template"); KDB * handle = kdbOpen(); Key *mountpoint=0; mountpoint=kdbGetMountpoint(handle, key); printf("The library I am using is %s mounted in %s\n", keyValue(mountpoint), keyName(mountpoint)); kdbClose (handle); keyDel (key); * @endcode * * * @param handle is the data structure, where the mounted directories are saved. * @param where the key, that should be looked up. * @return the mountpoint associated with the key * @ingroup kdb */ Key* kdbGetMountpoint (KDB *handle, const Key *where) { KDB *backend_handle; backend_handle=kdbGetBackend(handle,where); if (!backend_handle) { /*errno = KDB_ERR_EBACKEND;*/ return 0; } return backend_handle->mountpoint; } /* * Returns a structure of information about the internals * of the library and the backend used. * * This is mainly used to check the capabilities of a specific * backend. * * @par Example: * @code Key * key = keyNew ("system/template"); KDB * handle = kdbOpen(); KDBCap *capability=0; capability=kdbGetCapability(handle, key); printf("The library I am using is %s in version %s\n", kdbcGetName(capability), kdbcGetVersion(capability)); if (kdbcGetnoError(capability)) printf ("Ohh! Error states are not supported\n"); else printf ("Puhh! Error states are supported\n"); kdbClose (handle); keyDel (key); * @endcode * * Together with kdbGetMountpoint() the two essential * informations about mounted backends. * * @param handle contains internal information of @link kdbOpen() opened @endlink key database * @param where lets you choose the position of where you want the information from * @return info on sucess, 0 if @p info is NULL * errno will be set to KDB_ERR_EBACKEND if no backend is found * @see commandInfo() * @ingroup kdb */ KDBCap *kdbGetCapability(KDB *handle, const Key *where) { KDB *backend_handle; backend_handle=kdbGetBackend(handle,where); if (!backend_handle) { /*errno = KDB_ERR_EBACKEND;*/ return 0; } return backend_handle->capability; } /** * Opens the session with the Key database. * * The first step is to open the default backend. With it * system/elektra/mountpoints will be loaded and all needed * libraries and mountpoints will be determined. * These libraries for backends will be loaded and with it the * @p KDB datastructure will be initialized. * * You must always call this method before retrieving or commiting any * keys to the database. In the end of the program, * after using the key database, you must not forget to kdbClose(). * You can use the atexit () handler for it. * * The pointer to the @p KDB structure returned will be initialized * like described above, and it must be passed along on any kdb*() * method your application calls. * * Get a @p KDB handle for every thread using elektra. Don't share the * handle across threads, and also not the pointer accessing it: * @code thread1 { KDB * h; h = kdbOpen(); // fetch keys and work with them kdbClose(h); } thread2 { KDB * h; h = kdbOpen(); // fetch keys and work with them kdbClose(h); } * @endcode * * You don't need to use the kdbOpen() if you only want to * manipulate plain in-memory Key or KeySet objects without any affairs with * the backend key database, * * @see kdbClose() to end all affairs to the key database. * @return a KDB pointer on success * @return NULL on failure * @ingroup kdb */ KDB * kdbOpen() { KDB * handle; KeySet *keys; Trie *trie; #if DEBUG && VERBOSE fprintf (stderr, "open elektra " VERSION "\n"); #endif if (kdbLibInit()) { /*errno=KDB_ERR_NOSYS;*/ return 0; } /* Open default backend */ handle=kdbOpenBackend("default",0,0); if (!handle) { #if DEBUG printf ("failed to open default backend"); #endif return 0; } /* get mount config from root backend */ keys=ksNew(0); kdbGet(handle,keys,keyNew(KDB_KEY_MOUNTPOINTS,KEY_END),KDB_O_DEL); #if DEBUG && VERBOSE ksRewind(keys); for (key=ksNext(keys);key;key=ksNext(keys)) { printf("mount %s as %s\n",keyName(key),(char*) keyValue(key)); } #endif trie=createTrie(keys,kdbOpenBackend); kdbhSetTrie(handle, trie); ksDel(keys); return handle; } /** * Closes the session with the Key database. * * You should call this method when you finished your affairs with the key * database. You can manipulate Key and KeySet objects also after kdbClose(). * You must not use any kdb* call afterwards. You can implement kdbClose() * in the atexit() handler. * * This is the counterpart of kdbOpen(). * * The @p handle parameter will be finalized and all resources associated to it * will be freed. After a kdbClose(), this @p handle can't be used anymore, * unless it gets initialized again with another call to kdbOpen(). * * @see kdbOpen() * @param handle contains internal information of @link kdbOpen() opened @endlink key database * @return 0 on success * @return -1 on NULL pointer * @ingroup kdb */ int kdbClose(KDB *handle) { if (!handle) { /*errno=KDB_ERR_NOSYS;*/ return -1; } if (handle->trie) kdbDelTrie (handle->trie,kdbCloseBackend); kdbCloseBackend (handle); return 0; } /** * Retrieve keys in an atomic and universal way, all other kdbGet Functions * rely on that one. * * The @p returned KeySet must be initialized or may already contain some * keys. The new retrieved keys will be appended using ksAppendKey(). * * In default behaviour (@p options = 0) it will fully retrieve all keys * under the @p parentKey folder, with all subfolders and their children * but not inactive keys or folders. * * The keyset will not be sorted at first place, but will be marked dirty and * sorted afterwards when needed. That could be a subsequent ksLookup(), * ksLookupByName() or kdbSet(). See ksSort() on that issue. * * The behaviour can be fine-tuned with options in various ways to make kdbGet() more * comfortable. * * @section kdbgetoption Options * * The @p option is an array of the following ORed flags: * * - @p option_t::KDB_O_DEL \n * Its often useful to keyDel() the parentKey in the line after kdbGet(). * Using this flag, you can just pass a key allocated with keyNew(), * kdbGet() will free it for you in the end. * - @p option_t::KDB_O_POP \n * The @p parentKey itself will always be added to @p returned. * If you only want the children * of the parentKey in @p returned, but not the parentKey itself, use this flag. * This is only valid for the first parentKey, the one you passed. * The other recursive parentKeys will stay in the keyset. * To get only the leaves of the tree, without any parentKey, * see @ref option_t::KDB_O_NODIR below. * - @p option_t::KDB_O_NODIR \n * Don't include folders in the @p returned KeySet, so only keys without * subkeys. You can picture it best that you only get the leaves of the * tree of keys. * - @p option_t::KDB_O_DIRONLY \n * Put in @p returned only the folder keys. The resulting * KeySet will be only the skeleton of the tree. This option must not be * ORed together with KDB_O_DIR. * - @p option_t::KDB_O_NOSTAT \n * Don't stat they keys, whatever keyNeedStat() says. * That means that also the key value and comment will be retrieved. * The flag will result in that all keys in @p returned don't have * keyNeedStat() set. * - @p option_t::KDB_O_STATONLY \n * Only stat the keys. It means that key value and comment will * not be retrieved. The resulting keys will contain only meta info such * as user and group IDs, owner, mode permissions and modification times. * You don't need that flag if the keys already have keyNeedStat() set. * The flag will result in that all keys in @p returned have * keyNeedStat() set. * - @p option_t::KDB_O_INACTIVE \n * Will make it not ignore inactive keys, so @p returned will contain also * inactive keys. Inactive keys are those that have names * begining with '.' (dot). * Please be sure that you know what you are doing, inactive keys must not * have any semantics to the application. This flag should only be set in * key browsers after explicit user request. * You might also get inactive keys when you plan to remove a whole * hierarchy. * - @p option_t::KDB_O_SORT \n * Force @p returned to be ksSort()ed. Normally you don't want that the * @p returned is sorted immediately because you might add other keys or * go for another kdbGet(). Sorting will * take place automatically when needed by ksLookup() or kdbSet(), * also without this option set. * But you need to sort the keyset for yourself, when you just iterate * over it. If you want to do that, pass this flag at the last kdbGet(). * - @p option_t::KDB_O_NORECURSIVE \n * Dont get the keys recursive. Only receive keys from one folder. * This might not work if the backend does not support it. Be prepared * for more keys and use ksLookup() and avoid static assumptions * on how many keys you get. * * @par Example: * @code KDB *handle; KeySet *myConfig; Key *key; myConfig=ksNew(0); handle = kdbOpen(); key=keyNew("system/sw/MyApp",KEY_END); rc=kdbGet(handle,key, myConfig, 0); keyDel(key); key=keyNew("user/sw/MyApp",KEY_END); rc=kdbGet(handle,key, myConfig, 0); keyDel(key); // will sort keyset here key=ksLookupByName(myConfig,"/sw/MyApp/key", 0); // check if key is not 0 and work with it... ksDel (myConfig); // delete the in-memory configuration // maybe you want kdbSet() myConfig here kdbClose(handle); // no more affairs with the key database. * @endcode * * @section kdbgetdetail Details * * When no backend could be found (e.g. no backend mounted) * the default backend will be used. * * If you pass a NULL pointer as handle and/or returned kdbGet() will * return -1 and do nothing but keyDel() the parentKey when requested * and not a NULL pointer. * * If you pass NULL as parentKey the root keys of all namespaces * will be appended to returned. * * For every directory key (keyIsDir()) the appropriate backend * will be chosen and keys in it will be requested. * * If any backend reports an failure the recursive getting of * keys will be stopped. Backends only report failure when they * are not able to get keys for any problems. * * @param handle contains internal information of @link kdbOpen() opened @endlink key database * @param parentKey parent key or NULL to get the root keys * @param returned the (pre-initialized) KeySet returned with all keys found * @param options ORed options to control approaches * @see #option_t * @see @link kdbhighlevel kdb higher level Methods @endlink that rely on kdbGet() * @see ksLookupByName(), ksLookupByString() for powerful * lookups after the KeySet was retrieved * @see commandList() code in kdb command for usage example * @see commandEdit() code in kdb command for usage example * @see commandExport() code in kdb command for usage example * @return number of keys contained by @p returned * @return -1 on failure * @ingroup kdb * */ ssize_t kdbGet (KDB *handle, KeySet *returned, Key * parentKey, option_t options) { ssize_t size = 0; /* nr of keys get */ ssize_t ret = 0; KeySet *keys; KeySet *tmp; Key *current; KDB *backend_handle; if (!handle || !returned) { if (parentKey && (options & KDB_O_DEL)) keyDel (parentKey); /* errno=KDB_ERR_NOSYS; */ return -1; } if (!parentKey) { ksAppendKey(returned, keyNew("user", KEY_DIR, KEY_END)); ret ++; ksAppendKey(returned, keyNew("system", KEY_DIR, KEY_END)); ret ++; return ret; } #if DEBUG && VERBOSE fprintf (stderr, "now in new kdbGet (%s)\n", keyName(parentKey)); #endif backend_handle=kdbGetBackend(handle,parentKey); if (backend_handle==NULL) backend_handle=handle; if (options & KDB_O_NOSTAT) parentKey->flags &= ~KEY_FLAG_STAT; else if (options & KDB_O_STATONLY) keyStat (parentKey); keys = ksNew (0); tmp = ksNew (0); ksRewind (returned); while ((current = ksPop(returned)) != 0) { if (options & KDB_O_NOSTAT) current->flags &= ~KEY_FLAG_STAT; else if (options & KDB_O_STATONLY) keyStat(current); if (keyIsDirectBelow(parentKey, current)) { if (keyNeedStat(parentKey)) keyStat (current); set_bit (current->flags, KEY_FLAG_SYNC); ksAppendKey(keys, current); } else { ksAppendKey(tmp, current); } } ksAppend (returned, tmp); ksDel (tmp); if (ksNeedSort (keys)) ksSort (keys); ret = backend_handle->kdbGet(backend_handle,keys,parentKey); if (ret == -1) { if (options & KDB_O_DEL) keyDel (parentKey); ksDel (keys); #if DEBUG && VERBOSE fprintf (stderr, "call of handle->kdbGet failed\n"); #endif return -1; } else if (ret == 0) { ksRewind (keys); while ((current = ksNext(keys)) != 0) clear_bit (current->flags, KEY_FLAG_SYNC); ksAppend (returned, keys); ksDel (keys); return 0; } ksRewind(keys); while ((current = ksPop(keys)) != 0) { const char *parentName = keyName(parentKey); const char *currentName = keyName(current); if (keyNeedSync(current)) { /* Key was not updated, throw it away */ keyDel (current); continue; } if ((options & KDB_O_NORECURSIVE) && !(!strcmp (parentName, currentName) || keyIsDirectBelow(parentKey, current))) { /* Only parentKey itself or keys direct below */ keyDel (current); continue; } if (strcmp (parentName, currentName) == 0) { if (! (options & KDB_O_POP)) { if (keyIsDir(current)) { if (options & KDB_O_NODIR) { keyDel (current); continue; } } else if (options & KDB_O_DIRONLY) { keyDel (current); continue; } size ++; ksAppendKey(returned, current); } else { keyDel (current); } continue; } if ((!(options & KDB_O_INACTIVE)) && keyIsInactive (current)) { keyDel (current); continue; } if (keyIsDir (current)) { if (! (options & KDB_O_NORECURSIVE)) { ret = kdbGet(handle, returned, current, options & ~KDB_O_DEL & ~KDB_O_SORT & ~KDB_O_POP); if (ret == -1) { #if DEBUG && VERBOSE fprintf (stderr, "recursive call failed\n"); #endif size = -1; keyDel (current); break; } else if (ret > 0) { size += ret; keyDel (current); continue; /*current was already handeled*/ } /* Fallthrough if ret == 0, add current */ } if (options & KDB_O_NODIR) { keyDel (current); continue; } } else if (options & KDB_O_DIRONLY) { keyDel (current); continue; } if (size > -1) { size ++; ksAppendKey(returned, current); } } ksDel(keys); if (options & KDB_O_SORT) ksSort (returned); if (options & KDB_O_DEL) keyDel (parentKey); return size; } /** * Set keys in an atomic and universal way, all other kdbSet Functions * rely on that one. * * The given handle and keyset are the objects to work with. * * With parentKey you can only store a part of the given keyset. * Otherwise pass a null pointer or a parentKey without a name. * * @code KeySet *ks = ksNew(0); kdbGet (h, ks, keyNew("system/myapp",0), KDB_O_DEL); kdbGet (h, ks, keyNew("user/myapp",0), KDB_O_DEL); //now only set everything below user, because you can't write to system kdbSet (h, ks, keyNew("user/myapp",0), KDB_O_DEL); ksDel (ks); * @endcode * * * Each key is checked with keyNeedSync() before being actually committed. So * only changed keys are updated. If no key of a backend needs to be synced * the kdbSet_backend() will be omitted. * * If some error occurs, kdbSet() will stop. In this situation the KeySet * internal cursor will be set on the key that generated the error. * This specific key and all behind it were not set. * To be failsafe jump over it and try to set the rest, but report the error * to the user. * * @par Example of how this method can be used: * @code int i; KeySet *ks; // the KeySet I want to set // fill ks with some keys for (i=0; i< 10; i++) // limit to 10 tries { ret=kdbSet(handle,ks, 0, 0); if (ret == -1) { // We got an error. Warn user. Key *problem; problem=ksCurrent(ks); if (problem) { char keyname[300]=""; keyGetFullName(problem,keyname,sizeof(keyname)); fprintf(stderr,"kdb import: while importing %s", keyname); } else break; // And try to set keys again starting from the next key, // unless we reached the end of KeySet if (ksNext(ks) == 0) break; } } * @endcode * * @section kdbsetoption Options * * There are some options changing the behaviour of kdbSet(): * * - @p option_t::KDB_O_DEL \n * Its often useful to keyDel() the parentKey in the line after kdbGet(). * Using this flag, you can just pass a key allocated with keyNew(), * kdbGet() will free it for you in the end. * - @p option_t::KDB_O_SYNC \n * Will force to save all keys, independent of their sync state. * - @p option_t::KDB_O_NOREMOVE \n * Don't remove any key from disk, even if keyRemove() was set. * With that flag removing keys can't happen unintentional. * The flag will result in that all keys in @p returned don't have * keyNeedRemove() set. * - @p option_t::KDB_O_REMOVEONLY \n * Remove all keys instead of setting them. All keys in @p returned * will have keyNeedRemove() set, but not keyNeedStat() saying to you * that the key was deleted permanently. * This option implicit also activates @p option_t::KDB_O_SYNC * because the sync state will be changed when they are marked remove. * You might need @ref option_t::KDB_O_INACTIVE set for the previous call * of kdbGet() if there are any. Otherwise the recursive remove will fail, * because removing directories is only possible when all subkeys are * removed. * * @section kdbsetdetail Details * * When you dont have a parentKey or its name empty, then all keys will * be set. * * You can remove some keys instead of setting them by marking them with keyRemove(). * The keyNeedSync() flag will be unset after successful removing. But the keyNeedRemove() * flag will stay, but its safe to delete the key. * * @param handle contains internal information of @link kdbOpen() opened @endlink key database * @param ks a KeySet which should contain changed keys, otherwise nothing is done * @param parentKey holds the information below which key keys should be set * @param options see in kdbSet() documentation * @return 0 on success * @return -1 on failure * @see keyNeedSync(), ksNext(), ksCurrent() * @see keyRemove(), keyNeedRemove() * @see commandEdit(), commandImport() code in kdb command for usage and error * handling example * @ingroup kdb */ ssize_t kdbSet (KDB *handle, KeySet *ks, Key * parentKey, option_t options) { int i; int t=0; KDB *h; Key *errorKey; int size = 0; int errors_occurred=0; Split *keysets; if (parentKey && !parentKey->key) { if (options & KDB_O_DEL) keyDel (parentKey); parentKey = 0; } if (!handle || !ks) { if (parentKey && (options & KDB_O_DEL)) keyDel (parentKey); /*errno=KDB_ERR_NOSYS;*/ return -1; } if (ksNeedSort(ks) || (options & KDB_O_SORT)) ksSort (ks); if (!kdbhGetTrie(handle)) { /* Fallback code without mounting */ ksRewind (ks); return handle->kdbSet(handle,ks,parentKey); } keysets=split_keyset(handle, ks, parentKey, options); for (i=0; ino;i++) { t=0; h=keysets->handles[i]; /* if there is no backend in the trie use the default */ if (h==NULL) { h=handle; } if (keysets->syncbits[i] && keysets->belowparents[i]) { if (ksNeedSort(keysets->keysets[i])) ksSort(keysets->keysets[i]); ksRewind (keysets->keysets[i]); t=h->kdbSet(h,keysets->keysets[i],keysets->parents[i]); } if (t==-1) { errors_occurred=1; errorKey = ksCurrent (keysets->keysets[i]); if (errorKey) ksLookup(ks, errorKey, KDB_O_WITHOWNER); break; } else { size+=t; } } free_splitted_keysets(keysets); if (options & KDB_O_DEL) keyDel (parentKey); if (errors_occurred) return -1; return size; } /** * This function must be called by a backend's kdbBackendFactory() to * define the backend's methods that will be exported. * * See KDBEXPORT() how to use it for backends. * * The order and number of arguments are flexible (as in keyNew() and ksNew()) to let * libelektra.so evolve without breaking its ABI compatibility with backends. * So for each method a backend must export, there is a flag defined by * #backend_t. Each flag tells kdbBackendExport() which method comes * next. A backend can have no implementation for a few methods that have * default inefficient high-level implementations and to use these defaults, simply * don't pass anything to kdbBackendExport() about them. * * @param backendName a simple name for this backend * @return an object that contains all backend informations needed by * libelektra.so * @ingroup backend */ KDB *kdbBackendExport(const char *backendName, ...) { va_list va; KDB *returned; backend_t method=0; if (backendName == 0) return 0; returned=malloc(sizeof(KDB)); memset(returned,0,sizeof(KDB)); returned->capability = capNew(); returned->capability->name = backendName; returned->capability->version = ""; returned->capability->description = ""; returned->capability->author = ""; returned->capability->licence = ""; /* Start processing parameters */ va_start(va,backendName); while ((method=va_arg(va,backend_t))) { switch (method) { case KDB_BE_OPEN: returned->kdbOpen=va_arg(va,kdbOpenPtr); break; case KDB_BE_CLOSE: returned->kdbClose=va_arg(va,kdbClosePtr); break; case KDB_BE_GET: returned->kdbGet=va_arg(va,kdbGetPtr); break; case KDB_BE_SET: returned->kdbSet=va_arg(va,kdbSetPtr); break; case KDB_BE_VERSION: returned->capability->version=va_arg(va, char *); break; case KDB_BE_DESCRIPTION: returned->capability->description=va_arg(va, char *); break; case KDB_BE_AUTHOR: returned->capability->author=va_arg(va, char *); break; case KDB_BE_LICENCE: returned->capability->licence=va_arg(va, char *); break; } } va_end(va); return returned; } elektra-0.7.1/src/libelektra/kdbcapability.c0000644000076400001440000002333011365506635015755 00000000000000/*************************************************************************** kdbcapability.c - Capability and attribute functions for backends ------------------- begin : Mon Dec 29 2003 copyright : (C) 2003 by Avi Alkalay email : avi@unix.sh ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ /* * @defgroup capability KDB Backends :: Capabilities of backends * @brief The tactics to consider different possibilites of different backends. * * Since version 0.7 with the vast new possiblities of backends used * together in a global namespace the fact that not every backend can * fulfill any requirement as datastore and the intersection would * lead to a useless limited storage, capabilities were introduced. * * Applications heavily using kdbGet() and kdbSet() together with metadata * may be interested if what they show are default values or something you * can rely on. * * On the other hand backends may be interested to tell that they * can't fullfill the requriements described in kdbGet_backend() and * kdbSet_backend(). * * Many backends are very limited in how granular the metadata is. If * many keys are stored in the same file, it is of course not possible * that one key has e.g. another owner than another key in the same * file. * * There might even be a limit in what names can be accepted by a * backend, because of syntax in a configuration file. A formal description * needed for that problem would be out of scope and not very useful. * For that reason capabilites are limited to yes/no questions * if something is provided or not. * * Capabilites are also very useful for testing driven or * iterative development. Beginning with simple reading everything out * transformed to keyset in kdbGet_backend() and generating a new * file with the keyset of kdbSet_backend() you can iterative * delete handicaps of your backend until you hit the full specification, * if it is possible. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #if DEBUG && HAVE_STDIO_H #include #endif #ifdef HAVE_LOCALE_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STDARG_H #include #endif #ifdef HAVE_CTYPE_H #include #endif #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_ERRNO_H #include #endif #include KDBCap *capNew () { KDBCap * cap = (KDBCap *)malloc(sizeof(KDBCap)); if (!cap) return 0; memset(cap,0,sizeof(KDBCap)); return cap; } void capDel (KDBCap *cap) { free (cap); } /*Version of the library. * * @param cap the obsolete cap object * @ingroup capability*/ const char * kdbcGetVersion (const KDBCap *cap) { return cap->version; } /*Name of backend being or that will be used * * @param cap the obsolete cap object * @ingroup capability*/ const char * kdbcGetName (const KDBCap *cap) { return cap->name; } /*Any text describing the backend. * * @param cap the obsolete cap object * @ingroup capability*/ const char * kdbcGetDescription (const KDBCap *cap) { return cap->description; } /*The author of the backend. * * Best is format "Full Name " * e.g.: * * Avi Alkalay * Markus Raab * Yannick Lecaillez * Jens Andersen * Patrick Sabin * Pier Luigi Fiorini * Rèmi * Studio-HB * * * @param cap the obsolete cap object * @ingroup capability*/ const char * kdbcGetAuthor (const KDBCap *cap) { return cap->author; } /*The licence of the backend. * * - Must be "BSD" for bsd licence, this is the licence for elektra core. * - Must be "GPL2" for gpl version 2. * - Must be "GPL3" for gpl version 3. * - Must be "LGPL" for lgpl. * * Because of BSD licence even commercial is allowed. * * * @param cap the obsolete cap object * @ingroup capability*/ const char * kdbcGetLicence (const KDBCap *cap){ return cap->licence; } /*You cant get specific keys. * * The specification of kdbGet_backend() says that you must * get a key with its subkey and nothing more or less. Declaring * onlyFullGet you are allowed to get all keys when you get * a kdbGet_backend() request of your mountpoint, but you need * to return 0 for any subkeys to avoid an infinite loop. * * * @param cap the obsolete cap object * @see kdbGet_backend() * @ingroup capability * */ unsigned int kdbcGetonlyFullGet (const KDBCap *cap) { return cap->onlyFullGet; } /*All keys need to be in keyset when setting. * * Backends have not problem with setting single keys, when the * gap between those keys is already filled out with previous * calls of kdbSet(). The keys in between may not be in the * keyset. * * Declaring onlyFullSet requires the caller to kdbGet() all * keys of the backend and manipulating this full set. This * allows the backend to regenerate the whole config, making * implementation much easier. * * * @param cap the obsolete cap object * @see kdbSet_backend() * @ingroup capability **/ unsigned int kdbcGetonlyFullSet (const KDBCap *cap) { return cap->onlyFullSet; } /*When getting keys they cant be stated. * * @see keyStat(), keyNeedStat() * @see kdbGet_backend() * @ingroup capability **/ unsigned int kdbcGetnoStat (const KDBCap *cap) { return cap->noStat; } /*You can only remove all keys at once. * * @see kdbSet_backend() * @ingroup capability **/ unsigned int kdbcGetonlyRemoveAll (const KDBCap *cap) { return cap->onlyRemoveAll; } /*When setting keys with new name below parentKey, they will be added. * * Otherwise (changing keys) all keys are required. * * @see kdbSet_backend() * @ingroup capability * */ unsigned int kdbcGetonlyAddKeys (const KDBCap *cap) { return cap->onlyAddKeys; } /*The backend does not support a owner of keys. * * * @see keySetOwner() and keyGetOwner() * @ingroup capability * */ unsigned int kdbcGetnoOwner (const KDBCap *cap) { return cap->noOwner; } /*No value is supported in the backend. * * A backend might be useful only having comments, metadata or only * names without any values as information for applications. Declare * this if your backend is not capable of storing values. * * @see keySetRaw() * @see keySetString() and keyGetString() * @see keyValue() (togehter with keyGetValueSize() if it is binary) * @ingroup capability * */ unsigned int kdbcGetnoValue (const KDBCap *cap) { return cap->noValue; } /*No comment is supported in the backend. * * @see keySetComment() and keyGetComment() * @ingroup capability **/ unsigned int kdbcGetnoComment (const KDBCap *cap) { return cap->noComment; } /*No uid is supported in the backend. * * @see keySetUID() * @ingroup capability **/ unsigned int kdbcGetnoUID (const KDBCap *cap) { return cap->noUID; } /*No gid is supported in the backend. * * @see keySetGID() * @ingroup capability **/ unsigned int kdbcGetnoGID (const KDBCap *cap) { return cap->noGID; } /*No mode is supported in the backend. * * Means that keys will only have 664 or * 775 as mode values. * * @see keySetMode() * @ingroup capability **/ unsigned int kdbcGetnoMode (const KDBCap *cap) { return cap->noMode; } /*Directories are not supported in the backend. * * Tells that mode won't have any executable * bits set. * * Declaring kdbcGetnoDir() means * that the backend is flat, no key will be true for keyIsDir() * and so can't have any subkeys. * * @see keySetDir() * @ingroup capability **/ unsigned int kdbcGetnoDir (const KDBCap *cap) { return cap->noDir; } /*Access Time not supported. * * @see keySetATime() * @ingroup capability **/ unsigned int kdbcGetnoATime (const KDBCap *cap) { return cap->noATime; } /*Modification Time not supported. * * @see keySetMTime() * @ingroup capability **/ unsigned int kdbcGetnoMTime (const KDBCap *cap) { return cap->noMTime; } /*Meta Info and Subkeys Change Time not supported. * * @see keySetCTime() * @ingroup capability **/ unsigned int kdbcGetnoCTime (const KDBCap *cap) { return cap->noCTime; } /*The backend does not support removing keys.*/ unsigned int kdbcGetnoRemove (const KDBCap *cap) { return cap->noRemove; } /*Mount type not supported.*/ unsigned int kdbcGetnoMount (const KDBCap *cap) { return cap->noMount; } /*Binary types not supported. * * @see keySetBinary() * @ingroup capability **/ unsigned int kdbcGetnoBinary (const KDBCap *cap) { return cap->noBinary; } /*String types not supported. * * @see keySetString() * @ingroup capability **/ unsigned int kdbcGetnoString (const KDBCap *cap) { return cap->noString; } /*Typing of keys is not supported. * * @see keySetRaw() and keySetType() * @ingroup capability **/ unsigned int kdbcGetnoTypes (const KDBCap *cap) { return cap->noTypes; } /*Do not expect errno to be set correctly. * * @see kdbhSetError() * @ingroup capability **/ unsigned int kdbcGetnoError (const KDBCap *cap) { return cap->noError; } /*Backend does not lock. * * @ingroup capability **/ unsigned int kdbcGetnoLock (const KDBCap *cap) { return cap->noLock; } /*Backend uses global variables and is not threadsafe. * * @ingroup capability **/ unsigned int kdbcGetnoThread (const KDBCap *cap) { return cap->noThread; } elektra-0.7.1/src/libelektra/kdbhandle.c0000644000076400001440000001453111365506635015072 00000000000000/*************************************************************************** kdbhandle.c - Functions which operate on the private kdbhandle struct ------------------- begin : Mon Dec 29 2003 copyright : (C) 2003 by Avi Alkalay email : avi@unix.sh ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ /** * @defgroup backendhandle KDB Backends :: KDB access functions * @brief Methods to access the backend handle. * * To use them: * @code * #include * @endcode * * These functions provide access to the information stored in * Backend Handles. * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #if DEBUG && HAVE_STDIO_H #include #endif #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_LOCALE_H #include #endif #include "kdbbackend.h" /** * Set some backend-specific @p data in the @p handle. * * This is useful when your backend have a backend-global context or * environment. * * @param handle contains internal information of @link kdbOpen() opened @endlink key database * @param data a pointer to general data specific to a backend implementation. * @see kdbhGetBackendData() * @ingroup backendhandle */ void *kdbhSetBackendData(KDB *handle, void *data) { return handle->backendData = data; } /** * Get the previously set backend-specific @p data from the @p handle. * * This is useful when your backend have a backend-global context or * environment. * * This method will probably be called everytime one of your kdb*() * implementations is called. And if you change something inside the data, you * don't have to kdbhSetBackendData() again, bacause you are manipulating your * data, and not a copy of it. * * @par Example: * @code struct MyBackendData { int context1; int context2; }; int kdbOpen_mybackend(KDB *handle) { struct MyBackendData *context; context=malloc(sizeof(struct MyBackendData)); // a random initialization... context->context1=1; context->context2=2; kdbhSetBackendData(*handle,context); return 0; } int kdbGetKey_maybackend(KDB handle) { struct MyBackendData *context; context=kdbhGetBackendData(handle); // No do something with the context . . . return 0; } * @endcode * * On the kdbClose() implementation of your backend, you must remember to * free all resources associated to your data. * * @par Example of kdbClose() implementation that correctly cleans the context: * @code int kdbClose_mybackend(KDB &handle) { struct MyBackendData *context; context=kdbhGetBackendData(handle); free(context); return 0; } * @endcode * @return a pointer to the data previously set be kdbhSetBackendData() * @param handle contains internal information of @link kdbOpen() opened @endlink key database * @ingroup backendhandle */ void *kdbhGetBackendData(const KDB *handle) { return handle->backendData; } /** * Sets capabilty for handle. * * @param cap a pointer to capability structure * @param handle contains internal information of @link kdbOpen() opened @endlink key database * @return The backend name set in @p handle. * @ingroup backendhandle */ KDBCap* kdbhSetCapability(KDB *handle, KDBCap *cap) { return handle->capability = cap; } /** * Gets capability for handle. * * @param handle contains internal information of @link kdbOpen() opened @endlink key database * @return The backend name set in @p handle. * @ingroup backendhandle */ KDBCap* kdbhGetCapability(const KDB *handle) { return handle->capability; } /** * Gets trie for handle. * * The trie is a datastructure containing the mounted backends. * * @param handle contains internal information of @link kdbOpen() opened @endlink key database * @see kdbhSetTrie() * @return The backend name set in @p handle. * @ingroup backendhandle */ Trie *kdbhGetTrie(const KDB *handle) { return handle->trie; } /** * Sets trie for handle. * * The trie is a datastructure containing the mounted backends. This must not done inside * backends, it was set correctly already for you. * * @param handle contains internal information of @link kdbOpen() opened @endlink key database * @param trie the datastructure referencing to the other handles of backends * @see kdbhGetTrie() * @return nothing * @ingroup backendhandle */ void kdbhSetTrie(KDB *handle, Trie *trie) { handle->trie = trie; } /** * Gets mountpoint for handle. * * Every mounted backend has a specific mountpoint where it is mounted. You may need to know * where you were mounted inside a backend to calculate relative pathes. * * The keyName() is where the backend is mounted, keyString() gives the name of which * backend is mounted. * * @param handle contains internal information of @link kdbOpen() opened @endlink key database * @see kdbhSetMountpoint() * @return The Key containing the mountpoint. * @ingroup backendhandle */ const Key *kdbhGetMountpoint(KDB *handle) { return handle->mountpoint; } /** * Sets mountpoint for handle. * * You must not change the mountpoint inside your backend, it was set correctly already * for you. * * @param handle contains internal information of @link kdbOpen() opened @endlink key database * @param mountpoint the key containing as name where backend is mounted and as value the backendname * @see kdbhGetMountpoint() * @return nothing * @ingroup backendhandle */ void kdbhSetMountpoint(KDB *handle, const Key* mountpoint) { if (handle->mountpoint) keyDel(handle->mountpoint); handle->mountpoint = keyDup(mountpoint); } /** * Returns configuration for handle. * * Every backend may have its own configuration using a Keyset. * * @param handle contains internal information of @link kdbOpen() opened @endlink key database * @return the keyset containing configuration for a backend * @ingroup backendhandle * */ KeySet *kdbhGetConfig(KDB *handle) { return handle->config; } elektra-0.7.1/src/libelektra/kdbhighlevel.c0000644000076400001440000003227711365506635015615 00000000000000/*************************************************************************** kdbhighlevel.c - Highlevel interface for accessing the Key Database ------------------- begin : Mon Dec 29 2003 copyright : (C) 2003 by Avi Alkalay email : avi@unix.sh ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ /** * @defgroup kdbhighlevel KDB :: High Level methods * @brief High level methods to access the Key database. * * To use them: * @code * #include * @endcode * * These methods are higher level. They use kdbOpen(), kdbClose(), * kdbGet() and kdbSet() methods to do their * job, and don't have to be reimplemented for a different backend. * * These functions avoid limitations through not implemented capabilities. * This will of course cost some effort, so read through the description * carefully and decide if it is appropriate for your problem. * * Binding writers don't have to implement these functions, use features * of the binding language instead. But you can use these functions as * ideas what high level methods may be useful. * * Don't use writing single keys in a loop, prefer always writing out * a keyset! * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #if DEBUG && HAVE_STDIO_H #include #endif #ifdef HAVE_LOCALE_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STDARG_H #include #endif #ifdef HAVE_CTYPE_H #include #endif #ifdef HAVE_STRING_H #include #endif #include "kdbbackend.h" static ssize_t kdbGetHelper(KDB *handle, KeySet *returned, Key *key, unsigned long options) { Key *dir = keyNew(keyName(key), KEY_END); KDBCap * cap = kdbGetCapability(handle, key); Key *mp; Key *current; KeySet *keys; ssize_t ret; /* Check where the mountpoint is */ if (kdbcGetonlyFullGet(cap)) { mp = kdbGetMountpoint(handle, key); if (mp && strlen(keyName(mp)) > 1) { keySetName (dir, keyName(mp)); } else { keySetBaseName (dir, ""); /* delete basename */ } } else { keySetBaseName (dir, ""); /* delete basename */ } if (strlen(keyName(dir)) <= 2) /* copy root (user, system) */ { keySetName (dir, keyName(key)); } #if DEBUG && VERBOSE printf ("using %s\n", keyName(dir)); #endif /* We are ready, get the keys * Without recursion it does not make sense because we stepped * one level higher */ keys = ksNew(0); ret=kdbGet (handle, keys, dir, options & ~KDB_O_NORECURSIVE); /* Now filter the keys */ ksRewind (keys); while ((current = ksNext(keys)) != 0) { const char * namekey = keyName(key); const char * namecur = keyName(current); if ( (strcmp (namekey, namecur) == 0) || ( (options & KDB_O_NORECURSIVE) && keyIsDirectBelow(key, current)) || (!(options & KDB_O_NORECURSIVE) && keyIsBelow(key, current))) { ksAppendKey(returned, current); } } ksDel (keys); keyDel (dir); return ret; } /** * Fully retrieves the passed @p key from the backend storage. * * The backend will try to get the key, identified through its * name. * * It uses kdbGet() for retrieving the key and copies the found data * to dest. * * While kdbGetKey() is perfect for a simple get of a specific key, * kdbGet() and kdbGetByName() gives you more control over the * keyset. * * @param handle contains internal information of @link kdbOpen() opened @endlink key database * @param dest a pointer to a Key that has a name set * @return 0 on success * @return -1 on failure * @return -1 on NULL pointer * @see kdbSetKey() to set a single key * @see commandGet() code in kdb command for usage example * @see kdbGet() and kdbGetByName() to have more control over keyset and options * @ingroup kdbhighlevel */ int kdbGetKey(KDB *handle, Key * dest) { Key * source; KeySet *ks = 0; ssize_t ret; if (!handle || !dest) return -1; ks = ksNew(0); ret = kdbGetHelper (handle, ks, dest, KDB_O_INACTIVE); if (ret == -1) { ksDel (ks); /*errno = KDB_ERR_NOTFOUND;*/ return -1; } source = ksLookup (ks, dest, 0); if (!source) { ksDel (ks); /*errno = KDB_ERR_NOTFOUND;*/ return -1; } if (keyCopy(dest, source) == -1) { ksDel (ks); return -1; } ksDel (ks); return 0; } /** * Sets @p key in the backend storage. * * While kdbSetKey() is perfect for a simple get of a specific key, * kdbGet() and kdbGetByName() gives you more control over the * keyset. * * * @param handle contains internal information of @link kdbOpen() opened @endlink key database * @param key Key to set * @return 0 on success * @return -1 on failure * @return -1 on NULL pointer * @see kdbGetKey() to get a single key * @see kdbSet() for more control over keyset and options * @see commandSet() code in kdb command for usage example * @ingroup kdbhighlevel */ int kdbSetKey(KDB * handle, const Key *key) { int rc=0; Key *dest=0; Key *parent=0; Key *mp = 0; Key *dir = 0; KeySet *ks = 0; KDBCap * cap = 0; if (!handle || !key) return -1; cap = kdbGetCapability(handle, key); ks = ksNew(0); dir = keyNew(keyName(key), KEY_END); mp = keyDup (kdbGetMountpoint(handle, key)); if (kdbcGetonlyFullSet(cap)) { if (mp && strlen(keyName(mp)) > 1) { keySetName (dir, keyName(mp)); } else { keySetBaseName (dir, ""); /* delete basename */ } if (strlen(keyName(dir)) <= 2) /* copy root (user, system) */ { keySetName (dir, keyName(key)); } #if DEBUG && VERBOSE printf ("kdbGetKey using %s\n", keyName(dir)); #endif kdbGet (handle, ks, dir, KDB_O_NORECURSIVE | KDB_O_INACTIVE); dest = ksLookupByName (ks, keyName(key), 0); if (!dest) { parent = keyDup (key); keySetBaseName(parent, ""); dest = ksLookupByName (ks, keyName(parent), 0); keyDel (parent); if (dest) keySetDir (dest); else { ksDel (ks); keyDel (dir); keyDel (mp); /*errno = KDB_ERR_NOTFOUND;*/ return -1; /* no parent found */ } ksAppendKey(ks, keyDup (key)); } else keyCopy(dest, key); } else ksAppendKey(ks, keyDup (key)); rc = kdbSet(handle, ks, mp, 0); ksDel (ks); keyDel (dir); keyDel (mp); if (rc >= 0) return 0; return -1; } /** * A high-level method to get a key value, by key name. * * This method gets a backend from any backend with kdbGetKey() and * extracts the string and store it into returned. It only works with * string keys. * * This method gives you the direct relation between a keyname and * the value, without any kdb specific structures. Use it when * you just want some values out of the kdb namespace. * * You need to know the maximum string length of the object. That * could be the case when you e.g. save a path which is limited * with MAX_PATH. * * @code KDB *handle = kdbOpen(); char buffer [MAX_PATH]; if (kdbGetString(handle, "user/key/to/get/pathname", buffer, sizeof(buffer)) == -1) { // handle error cases } else { printf ("The keys value is %s\n", buffer); } kdbClose(handle); * @endcode * * @param handle contains internal information of @link kdbOpen() opened @endlink key database * @param keyname the name of the key to receive the value * @param returned a buffer to put the key value * @param maxSize the size of the buffer * @return 0 on success * @return -1 on failure * @return -1 on NULL pointers * @return -1 if maxSize is 0 or larger than SSIZE_MAX * @see kdbSetString() and kdbRemove() to set and remove a string * @see kdbGetKey(), keySetKey() to work with Keys * @see kdbGet() and kdbGetByName() for full access to internal datastructures * @ingroup kdbhighlevel * */ int kdbGetString(KDB * handle,const char *keyname, char *returned,size_t maxSize) { Key *key = 0; int rc = 0; if (!handle || !keyname || !returned) return -1; if (!maxSize) return -1; if (maxSize > SSIZE_MAX) return -1; key=keyNew(0); if (!key) return -1; rc=keySetName(key,keyname); if (rc == -1) { keyDel (key); return -1; } rc=kdbGetKey(handle, key); if (rc == 0) rc = keyGetString(key,returned,maxSize); keyDel(key); return rc; } /** * A high-level method to set a value to a key, by key name. * * It will check if key exists first, and keep its metadata. * So you'll not loose the previous key comment. * * This will set a text key. So if the key was previously a binary * it will be retyped as string. * * @param handle contains internal information of @link kdbOpen() opened @endlink key database * @param keyname the name of the key to receive the value * @param value the value to be set * @return 0 on success * @return -1 on NULL pointers * @return -1 on failure * @see kdbGetString(), keySetString(), kdbSetKey() * @ingroup kdbhighlevel */ int kdbSetString(KDB * handle, const char *keyname, const char *value) { Key *key = 0; int rc = 0; if (!handle || !keyname || !value) return -1; key=keyNew(0); if (!key) return -1; rc=keySetName(key,keyname); if (rc == -1) { keyDel (key); return -1; } kdbGetKey(handle,key); keySetString(key,value); rc=kdbSetKey(handle,key); keyDel(key); return rc; } /** * Remove a key by its name from the backend storage. * * With kdbSetString() its only possible to set a key with an empty * string. To really remove a key in a highlevel way you can use * this method. * * @param handle contains internal information of @link kdbOpen() opened @endlink key database * @param keyname the name of the key to be removed * @return 0 on success * @return -1 on failure * @return -1 on NULL pointers * @see together with kdbSetString() and kdbGetString() a highlevel interface for kdb * @see commandRemove() code in kdb command for usage example * @ingroup kdbhighlevel */ int kdbRemove(KDB *handle, const char *keyname) { int rc=0; Key *key=0; if (!handle || !keyname) return -1; key=keyNew(0); if (!key) return -1; rc=keySetName(key,keyname); if (rc == -1) { keyDel(key); return -1; } keyRemove (key); rc=kdbSetKey(handle,key); keyDel(key); return rc; } /** * This method is similar kdbGet() but the path is given * by a string. * * When it is not possible to make a key out of that string * -1 is returned . * * When parentName starts with / cascading will be used and both * keys from user and system will be fetched. * * A typically app with about 3000 keys may have this line: * *@code KDB *handle = kdbOpen(); KeySet *myConfig = (4096, KS_END); ssize_t ret = kdbGetByName (handle, myConfig, "/sw/app/current", 0); // check ret and work with keyset myConfig ksDel (myConfig); kdbClose (handle); *@endcode * * myConfig will be loaded with keys from system/sw/app/current but * also user/sw/app/current. * * When one of these kdbGet() fails -1 will be returned, but the other * kdbGet() will be tried too. * * @param handle contains internal information of @link kdbOpen() opened @endlink key database * @param name the name where to get the keys below * @param returned the (pre-initialized) KeySet returned with all keys found * @param options ORed options to control approaches * Unlike to kdbGet() is KDB_O_POP set per default. * @return number of keys contained by @p returned * @return -1 on failure * @return -1 when @p name is no valid key * @return -1 on NULL pointer * @see kdbGet() * @ingroup kdbhighlevel */ ssize_t kdbGetByName(KDB *handle, KeySet *returned, const char *name, option_t options) { Key *parentKey; ssize_t ret, ret2; char *newname; if (!handle || !returned || !name) return -1; if (name[0] == '/') { newname = kdbiMalloc (strlen (name) + sizeof ("system") + 1); if (!newname) { /*errno = KDB_ERR_NOMEM;*/ return -1; } strncpy (newname+2, "user", 4); strcpy (newname+6, name); parentKey = keyNew (newname+2, KEY_END); ret = kdbGetHelper(handle, returned, parentKey, options & ~KDB_O_DEL); keyDel (parentKey); strncpy (newname, "system",6); parentKey = keyNew (newname, KEY_END); ret2 = kdbGetHelper(handle, returned, parentKey, options & ~KDB_O_DEL); keyDel (parentKey); kdbiFree (newname); if (ret == -1 || ret2 == -1) return -1; else return returned->size; } else { parentKey=keyNew(name,KEY_END); if (parentKey == 0) { /*errno = KDB_ERR_NOKEY;*/ return -1; } ret = kdbGet(handle, returned,(Key *) parentKey, (options & ~KDB_O_DEL) | KDB_O_POP); keyDel(parentKey); if (ret == -1) return -1; else return returned->size; } } /* * Stats the key only for its meta-info from the backend storage. * * The key may not hold value and comment after using kdbStatKey(). * * Info like comments and key data type will not be retrieved. * * @param handle contains internal information of @link kdbOpen() opened @endlink key database * @param key an initialized Key pointer to be filled. * @return 0 on success * @return -1 on failure * @ingroup kdbhighlevel */ int kdbStatKey(KDB *handle, Key *key) { if (!handle || !key) return -1; keyStat(key); return kdbGetKey (handle, key); } elektra-0.7.1/src/libelektra/key.c0000644000076400001440000004241111365506635013744 00000000000000 /*************************************************************************** key.c - Methods for Key manipulation ------------------- begin : Mon Dec 29 2003 copyright : (C) 2003 by Avi Alkalay email : avi@unix.sh ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ /** * @defgroup key Key :: Basic Methods * @brief Key construction and initialization methods. * * To use them: * @code #include * @endcode * * A Key is the essential class that encapsulates key @link keyname name @endlink, * @link keyvalue value @endlink and @link keymeta metainfo @endlink. * Key properties are: * - @link keyname Key name @endlink * - @link keyvalue Key value @endlink * - @link keySetType() Data type @endlink * - @link keyGetComment() Key comment @endlink * - @link keyGetOwner() Key owner @endlink * - @link keymeta UID, GID and filesystem-like mode permissions @endlink * - @link keymeta Mode, change and modification times @endlink * * Described here the methods to allocate and free the key. * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #if DEBUG && HAVE_STDIO_H #include #endif #ifdef HAVE_STDARG_H #include #endif #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #include "kdb.h" #include "kdbprivate.h" /** * A practical way to fully create a Key object in one step. * * This function tries to mimic the C++ way for constructors. * * To just get a key object, simple do: * @code Key *k = keyNew(0); // work with it keyDel (k); * @endcode * * If you want the key object to contain a name, value, comment and other * meta info read on. * * @note When you already have a key with similar properties its * easier and cheaper to keyDup() the key. * * Due to ABI compatibility, the @p Key structure is not defined in kdb.h, * only declared. So you can only declare @p pointers to @p Keys in your * program, and allocate and free memory for them with keyNew() * and keyDel() respectively. * See http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html#AEN135 * * You can call it in many different ways depending on the attribute tags you * pass as parameters. Tags are represented as the #keyswitch_t values, * and tell keyNew() which Key attribute comes next. * * The simplest and minimum way to use it is with no tags, only a key name: * @code Key *nullKey,*emptyNamedKey; // Create a key that has no name, is completely empty, but is initialized nullKey=keyNew(0); keyDel (nullKey); // Is the same as above nullKey=keyNew("", KEY_END); keyDel (nullKey); // Create and initialize a key with a name and nothing else emptyNamedKey=keyNew("user/some/example",KEY_END); keyDel (emptyNamedKey); * @endcode * * keyNew() allocates memory for a key object and cleans everything up. After * that, it processes the given argument list. * * The Key attribute tags are the following: * - keyswitch_t::KEY_TYPE \n * Next parameter is a type of the value. Default assumed is KEY_TYPE_UNDEFINED. * Set this attribute so that a subsequent KEY_VALUE can toggle to keySetString() * or keySetBinary() regarding to keyIsString() or keyIsBinary(). * If you don't use KEY_TYPE but a KEY_VALUE follows afterwards, KEY_TYPE_STRING * will be used. * - keyswitch_t::KEY_SIZE \n * Define a maximum length of the value. This is especially useful for setting * a binary key. So make sure you use that before you KEY_VALUE for * binary keys. * - keyswitch_t::KEY_VALUE \n * Next parameter is a pointer to the value that will be set to the key * If no keyswitch_t::KEY_TYPE was used before, * keyswitch_t::KEY_TYPE_STRING is assumed. If KEY_TYPE was previously * passed with a KEY_TYPE_BINARY, * you should have passed KEY_SIZE before! Otherwise it will be cut of * with first \\0 in string! * - keyswitch_t::KEY_UID, @p keyswitch_t::KEY_GID \n * Next parameter is taken as the UID (uid_t) or GID (gid_t) that will * be defined on the key. See keySetUID() and keySetGID(). * - keyswitch_t::KEY_MODE \n * Next parameter is taken as mode permissions (mode_t) to the key. * See keySetMode(). * - keyswitch_t::KEY_DIR \n * Define that the key is a directory rather than a ordinary key. * This means its executable bits in its mode are set. This option * allows the key to have subkeys. * See keySetDir(). * - keyswitch_t::KEY_OWNER \n * Next parameter is the owner. See keySetOwner(). * - keyswitch_t::KEY_COMMENT \n * Next parameter is a comment. See keySetComment(). * - keyswitch_t::KEY_REMOVE \n * Mark the key to be removed instead of set it. * See keyRemove(). * - keyswitch_t::KEY_STAT \n * Mark the key to be stated instead of get it. * See keyStat(). * - keyswitch_t::KEY_END \n * Must be the last parameter passed to keyNew(). It is always * required, unless the @p keyName is 0. * * @par Example: * @code KeySet *ks=ksNew(0); ksAppendKey(ks,keyNew(0)); // an empty key ksAppendKey(ks,keyNew("user/sw", // the name of the key KEY_END)); // no more args ksAppendKey(ks,keyNew("user/tmp/ex1", KEY_VALUE,"some data", // set a string value KEY_END)); // end of args ksAppendKey(ks,keyNew("user/tmp/ex2", KEY_VALUE,"some data", // with a simple value KEY_MODE,0777, // permissions KEY_END)); // end of args ksAppendKey(ks,keyNew("user/tmp/ex4", KEY_TYPE,KEY_TYPE_BINARY, // key type KEY_SIZE,7, // assume binary length 7 KEY_VALUE,"some data", // value that will be truncated in 7 bytes KEY_COMMENT,"value is truncated", KEY_OWNER,"root", // owner (not uid) is root KEY_UID,0, // root uid KEY_END)); // end of args ksAppendKey(ks,keyNew("user/tmp/ex5", KEY_TYPE, KEY_TYPE_DIR | KEY_TYPE_BINARY,// dir key with a binary value KEY_SIZE,7, KEY_VALUE,"some data", // value that will be truncated in 7 bytes KEY_COMMENT,"value is truncated", KEY_OWNER,"root", // owner (not uid) is root KEY_UID,0, // root uid KEY_END)); // end of args ksDel(ks); * @endcode * * The reference counter (see keyGetRef()) will be initialized * with 0, that means a subsequent call of keyDel() will delete * the key. If you append the key to a keyset the reference counter * will be incremented by one (see keyInc()) and the key can't be * be deleted by a keyDel(). * *@code Key *k = keyNew(0); // ref counter 0 ksAppendKey(ks, k); // ref counter of key 1 ksDel(ks); // key will be deleted with keyset *@endcode * * If you increment only by one with keyInc() the same as said above * is valid: * *@code Key *k = keyNew(0); // ref counter 0 keyIncRef(k); // ref counter of key 1 keyDel(k); // has no effect keyDecRef(k); // ref counter back to 0 keyDel(k); // key is now deleted *@endcode * * If you add the key to more keySets: * *@code Key *k = keyNew(0); // ref counter 0 ksAppendKey(ks1, k); // ref counter of key 1 ksAppendKey(ks2, k); // ref counter of key 2 ksDel(ks1); // ref counter of key 1 ksDel(ks2); // k is now deleted *@endcode * * or use keyInc() more than once: * *@code Key *k = keyNew(0); // ref counter 0 keyIncRef(k); // ref counter of key 1 keyDel (k); // has no effect keyIncRef(k); // ref counter of key 2 keyDel (k); // has no effect keyDecRef(k); // ref counter of key 1 keyDel (k); // has no effect keyDecRef(k); // ref counter is now 0 keyDel (k); // k is now deleted *@endcode * * they key won't be deleted by a keyDel() as long refcounter is not 0. * * The key's sync bit will always be set for any call, except: * @code Key *k = keyNew(0); // keyNeedSync() will be false * @endcode * * @param keyName a valid name to the key, or NULL to get a simple * initialized, but really empty, object * @see keyDel() * @return a pointer to a new allocated and initialized Key object, * or NULL if an invalid @p keyName was passed (see keySetName()). * @ingroup key * */ Key *keyNew(const char *keyName, ...) { Key * k; va_list va; if (keyName) va_start(va,keyName); k = keyVNew (keyName, va); if (keyName) va_end (va); return k; } Key *keyVNew (const char *keyName, va_list va) { Key *key=0; type_t type=0; keyswitch_t action=0; void * value=0; ssize_t valueSize=-1; key=(Key *)malloc(sizeof(Key)); if (!key) return 0; keyInit(key); if (keyName) { keySetName(key,keyName); action=va_arg(va, keyswitch_t); while (action) { switch (action) { case KEY_TYPE: type = (type_t) va_arg(va, type_t); keySetType(key, type); break; case KEY_SIZE: valueSize=va_arg(va, size_t); break; case KEY_VALUE: value = va_arg(va, void *); if (valueSize>=0 && keyIsBinary(key)) { keySetBinary(key,value, valueSize); } else if (keyIsBinary(key)) { valueSize = (ssize_t) kdbiStrLen (value); keySetBinary(key,value, valueSize); } else { keySetString(key,value); } break; case KEY_UID: keySetUID(key,va_arg(va,uid_t)); break; case KEY_GID: keySetGID(key,va_arg(va,gid_t)); break; case KEY_MODE: keySetMode(key,va_arg(va, mode_t)); break; case KEY_OWNER: keySetOwner(key,va_arg(va,char *)); break; case KEY_COMMENT: keySetComment(key,va_arg(va,char *)); break; case KEY_REMOVE: keyRemove(key); break; case KEY_STAT: keyStat(key); break; case KEY_DIR: keySetDir(key); break; default: #if DEBUG fprintf (stderr, "Unknown option in keyNew %ld\n", (long int)action); #endif break; } action=va_arg(va, keyswitch_t); } } return key; } /** * Return a duplicate of a key. * * Memory will be allocated as needed for dynamic properties. * * The new key will not be member of any KeySet and * will start with a new reference counter at 0. A * subsequent keyDel() will delete the key. * * @code int f (const Key * source) { Key * dup = keyDup (source); // work with duplicate keyDel (dup); // everything related to dup is freed // and source is unchanged } * @endcode * * Like for a new key after keyNew() a subsequent ksAppend() * makes a KeySet to take care of the lifecycle of the key. * * @code int g (const Key * source, KeySet * ks) { Key * dup = keyDup (source); // work with duplicate ksAppendKey (ks, dup); // ksDel(ks) will also free the duplicate // source remains unchanged. } * @endcode * * Duplication of keys should be preferred to keyNew(), * because data like owner can be filled with a copy * of the key instead of asking the environment. * It can also be optimized in the checks, because the keyname * is known to be valid. * * @param source has to be an initializised source Key * @return 0 failure or on NULL pointer * @return a fully copy of source on success * @see ksAppend(), keyDel() * @see keyClear(), keyNew() * @ingroup key */ Key* keyDup(const Key *source) { Key * dest = 0; if (!source) return 0; dest = (Key *)malloc(sizeof(Key)); if (!dest) return 0; keyInit(dest); /* Copy the struct data, including the "next" pointer */ *dest=*source; /* prepare to set dynamic properties */ dest->key= dest->comment= dest->owner= dest->data=0; dest->ksReference = 0; if (source->key && keySetName(dest,source->key) == -1) goto memerror; if (source->comment && keySetComment(dest,source->comment) == -1) goto memerror; if (source->owner && keySetOwner(dest,source->owner) == -1) goto memerror; if (source->data && keySetRaw(dest,source->data,source->dataSize) == -1) goto memerror; return dest; memerror: keyDel (dest); return 0; } /** * Copy or Clear a key. * * Most often you may prefer keyDup() which allocates * a new key and returns a duplication of another key. * * But when you need to copy into an existing key, e.g. * because it was passed by a pointer in a function * you can do so: * * @code int h (Key *k) { // receive key c keyCopy (k, c); // the caller will see the changed key k } * @endcode * * The reference counter will not change for * the destination key. Affiliation to keysets * are also not affected. * * When you pass a NULL-pointer as source the * data of dest will be cleaned completely and * you get a fresh dest key. * * @code int g (Key *k) { keyCopy (k, 0); // k is now an empty and fresh key } * @endcode * * @param dest the key which will be written to * @param source the key which should be copied * or NULL to clean the destination key * @ingroup key * @return -1 on failure when a NULL pointer * was passed for dest or a dynamic property could not * be written. * @return 0 when dest was cleaned * @return 1 when source was successfully copied * @see keyDup() to get a duplication of a key */ int keyCopy (Key *dest, const Key *source) { size_t destref = 0; if (!dest) return -1; destref = dest->ksReference; /* free everything in dest */ keySetName (dest, 0); keySetComment (dest,0); keySetOwner (dest, 0); keySetRaw (dest, 0, 0); keyClear (dest); if (!source) return 0; /* copy all data of structure */ *dest=*source; /* Set reference properties */ dest->ksReference = destref; /* prepare to set dynamic properties */ dest->key= dest->comment= dest->owner= dest->data=0; if (keySetName(dest,source->key) == -1) return -1; if (keySetComment(dest,source->comment) == -1) return -1; if (keySetOwner(dest,source->owner) == -1) return -1; if (keySetRaw(dest,source->data,source->dataSize) == -1) return -1; return 1; } /** * A destructor for Key objects. * * Every key created by keyNew() must be * deleted with keyDel(). * * It is save to delete keys which are * in a keyset, the number of references * will be returned then. * * It is save to delete a nullpointer, * -1 will be returned then. * * @param key the key object to delete * @see keyNew(), keyInc(), keyGetRef() * @return the value of the reference counter * if the key is within keyset(s) * @return 0 when the key was freed * @return -1 on null pointers * @ingroup key * */ int keyDel(Key *key) { int rc; if (!key) return -1; if (key->ksReference > 0) { return key->ksReference; } rc=keyClear(key); kdbiFree (key); return rc; } /* * Key Object Cleaner. * * Will reset all internal data. * * After this call you will receive a fresh * key. * * @code int f (Key *k) { keyClear (k); // you have a fresh key k here keySetString (k, "value"); // the caller will get an empty key k with an value } * @endcode * * @param key the key object to work with * @ingroup key */ int keyClear(Key *key) { if (key->key) free(key->key); if (key->data) free(key->data); if (key->comment) free(key->comment); if (key->owner) free(key->owner); memset(key,0,sizeof(Key)); keyInit (key); return 0; } /** * Increment the viability of a key object. * * This function is intended for applications * using their own reference counter for * key objects. With it you can increment * the reference and thus avoid destruction * of the object in a subsequent keyDel(). * * @code Key *k; keyInc (k); function_that_keyDec(k); // work with k keyDel (k); // now really free it * @endcode * * The reference counter can't be incremented * once it reached SSIZE_MAX. In that situation * nothing will happen and SSIZE_MAX will be * returned. * * @return the value of the new reference counter * @return -1 on null pointer * @return SSIZE_MAX when maximum exceeded * @param key the key object to work with * @see keyGetRef(), keyDecRef(), keyDel() * @ingroup key */ ssize_t keyIncRef(Key *key) { if (!key) return -1; if (key->ksReference < SSIZE_MAX) return ++ key->ksReference; else return SSIZE_MAX; } /** * Decrement the viability of a key object. * * The reference counter can't be decremented * once it reached 0. In that situation * nothing will happen and 0 will be * returned. * * @return the value of the new reference counter * @return -1 on null pointer * @return 0 when the key is ready to be freed * @param key the key object to work with * @see keyGetRef(), keyDel(), keyIncRef() * @ingroup key */ ssize_t keyDecRef(Key *key) { if (!key) return -1; if (key->ksReference>0) return -- key->ksReference; else return 0; } /** * Return how many references the key has. * * The references will be incremented when ksAppendKey() * or ksAppend() uses the key and will be decremented when * ksPop() is used. * * keyDup() will reset the references for dupped * key. * * For your own applications you can use * keyIncRef() and keyDelRef() for reference * counting. Keys with zero references * will be deleted when using keyDel(). * * @param key the key object to work with * @return the number of references * @return -1 on null pointer * @see keyIncRef() and keyDecRef() * @ingroup key **/ ssize_t keyGetRef(const Key *key) { if (!key) return -1; return key->ksReference; } elektra-0.7.1/src/libelektra/keyhelpers.c0000644000076400001440000002760011365506635015332 00000000000000/*************************************************************************** keyhelpers.c - Methods for Key manipulation ------------------- begin : Mon Dec 29 2003 copyright : (C) 2003 by Avi Alkalay email : avi@unix.sh ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif #if DEBUG && HAVE_STDIO_H #include #endif #ifdef HAVE_STDARG_H #include #endif #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #include "kdb.h" #include "kdbprivate.h" /* * Returns one level of the key name. * * This method is used to skip repeating '/' and to find escaping chars. * Given @p keyName, this method returns a pointer to the next name level * found and changes @p size to the number of bytes on this level name. * * This method is used by keySetName() to cleanup parameters * before being accepted in the Key object. * * @code // Lets define a key name with a lot of repeating '/' and escaped '/' char *keyName="user////abc/def\/ghi////jkl///"; char *p; size_t size=0; int level=0; char buffer[20]; p=keyName; while (*(p=keyNameGetOneLevel(p+size,&size))) { level++; // copy what we found to a buffer, so we can NULL-terminate it strncpy(buffer,p,size); buffer[size]=0; printf("Level %d name: \"%s\"\n",level,buffer); } * The above example will produce the following output: * * @code Level 1 name: user Level 2 name: abc Level 3 name: def\/ghi Level 4 name: jkl * @endcode * * @param name the string that will be searched * @param size the number of bytes of level name found in @p keyName until * the next delimiter ('/') * @return a pointer to the first char of the next level name, it will point to * NULL when done. * @ingroup keyname */ char *keyNameGetOneLevel(const char *name, size_t *size) { char *real=(char *)name; size_t cursor=0; int escapeNext=0; int end=0; /* skip all repeating '/' in the begining */ while (*real && *real == PATH_SEPARATOR) real++; /* now see where this basename ends handling escaped chars with '\' */ while (real[cursor] && ! end) { switch (real[cursor]) { case '\\': escapeNext=1; break; case PATH_SEPARATOR: if (! escapeNext) end=1; default: escapeNext=0; } ++cursor; } /* if a '/' stopped our loop, balance the counter */ if (end) --cursor; *size=cursor; return real; } /* * Gets number of bytes needed to store root name of a key name * * Possible root key names are @p system, @p user or @p "user:someuser" . * * @return number of bytes needed with ending NULL * @param keyName the name of the key * @see keyGetFullRootNameSize() * @ingroup keyname */ ssize_t keyNameGetFullRootNameSize(const char *keyName) { char *end; int length=strlen(keyName); if (!length) return 0; /* Possible situations: user:someuser user:someuser/ user:someuser/key/name user:some.user/key/name . \. (empty) */ end=strchr(keyName,PATH_SEPARATOR); if (!end) /* Reached end of string. Root is entire key. */ end = (char *)keyName + length; return end-keyName+1; } /* * Gets number of bytes needed to store root name of a key. * * Possible root key names are @p system or @p user . * This method does not consider the user domain in @p user:username keys. * * @param key the key object to work with * @return number of bytes needed with the ending NULL * @see keyGetFullRootNameSize() * @ingroup keyname */ ssize_t keyGetRootNameSize(const Key *key) { if (!key->key) return 0; if (keyIsUser(key)) return sizeof("user"); else return sizeof("system"); } /* * Copy to @p returned the root name of @p key. * * Some examples: * - root of @p system/some/key is @p system * - root of @p user:denise/some/key is @p user * - root of @p user/env/env1 is @p user * * Use keyGetFullRootName() to get also the user domain. * * @param key the key to extract root from * @param returned a pre-allocated buffer to store the rootname * @param maxSize size of the @p returned buffer * @return number of bytes needed with ending NULL * @see keyGetRootNameSize(), keyGetFullRootName() * @ingroup keyname */ ssize_t keyGetRootName(const Key *key, char *returned, size_t maxSize) { size_t size; if (!key->key) { /*errno=KDB_ERR_NOKEY;*/ return -1; } if (!(size=keyGetRootNameSize(key))) { /*errno=KDB_ERR_NOKEY;*/ return -1; } if (maxSize < size) { /*errno=KDB_ERR_TRUNC;*/ return -1; } else strncpy(returned,key->key,size-1); returned[size-1]=0; /* null terminate it */ return size; } /* * Gets number of bytes needed to store root name of a key name without * user domain. * * Some examples: * - root of @p system/some/key is @p system * - root of @p user:denise/some/key is @p user * - root of @p user/env/env1 is @p user * * @param keyName the name of the key * @return number of bytes needed with ending NULL or -1 if @p keyName is * not a valid name and @c errno is set to KDBErr::KDB_ERR_INVALIDKEY * @see keyGetRootNameSize() * @ingroup keyname */ ssize_t keyNameGetRootNameSize(const char *keyName) { int length=strlen(keyName); if (!length) return 0; /* Possible situations: user user/ user/blabla user:someuser user:someuser/ user:someuser/key/name system system/ system/blabla (empty) */ if (keyNameIsUser(keyName)) return sizeof("user"); else if (keyNameIsSystem(keyName)) return sizeof("system"); else { /*errno=KDB_ERR_INVALIDKEY;*/ return -1; } } /* * Calculates number of bytes needed to store full root name of a key. * * Possible root key names are @p system, @p user or @p user:someuser. * In contrast to keyGetRootNameSize(), this method considers the user * domain part, and you should prefer this one. * * @param key the key object to work with * @return number of bytes needed with ending NULL * @see keyGetRootNameSize() * @ingroup keyname */ ssize_t keyGetFullRootNameSize(const Key *key) { size_t size=0; if (keyIsUser(key)) { if (key->owner) size=kdbiStrLen(key->owner); return size+sizeof("user"); } else { return keyNameGetRootNameSize(key->key); } } /* * Copy to @p returned the full root name of the key. * * Some examples: * - root of @p system/some/key is @p system * - root of @p user:denise/some/key is @p user:denise * - root of @p user/env/env1 is @p user:$USER * * This method is more robust then keyGetRootName() * * @param key the key to extract root from * @param returned a pre-allocated buffer to store the rootname * @param maxSize size of the @p returned buffer * @return number of bytes written to @p returned including ending NULL * @see keyGetFullRootNameSize(), keyGetRootName() * @ingroup keyname */ ssize_t keyGetFullRootName(const Key *key, char *returned, size_t maxSize) { size_t size; size_t rootSize; char *cursor; if (!key->key) { /*errno=KDB_ERR_NOKEY;*/ return 0; } if (!(size=keyGetFullRootNameSize(key))) { /*errno=KDB_ERR_NOKEY;*/ return 0; } if (maxSize < size) { /*errno=KDB_ERR_TRUNC;*/ return -1; } rootSize = keyGetRootNameSize(key)-1; strncpy(returned,key->key, rootSize); /* copy "user" or "system" */ if (keyIsUser(key)) { cursor = returned + rootSize; *cursor = ':'; cursor++; if (key->owner) { strncpy (cursor, key->owner, size - rootSize - 1); /* -1 for : */ } } else { returned[rootSize]=0; } return size; } /* * Get the number of bytes needed to store this key's parent name without * user domain, and with the ending NULL. * * @param key the key object to work with * @see keyGetParentName() for example * @ingroup keyname */ ssize_t keyGetParentNameSize(const Key *key) { char *parentNameEnd=0; char *p; size_t size; if (!key->key) { /*errno=KDB_ERR_NOKEY;*/ return 0; } /* user (size=0) user/parent/base (size=sizeof("user/parent")) user/parent/base/ (size=sizeof("user/parent")) user/parent/base\/name (size=sizeof("user/parent")) */ /* initialize */ p=key->key; size=0; /* iterate over level names */ while (*(p=keyNameGetOneLevel(p+size,&size))) parentNameEnd=p; /* handle NULL or root key ("user" or "system") */ if (!parentNameEnd || parentNameEnd==key->key) return 0; /* at this point, parentNameEnd points to the first char of the basename */ /* example: it points to the 'b' of "user/key/basename" */ /* the delta is the size we want */ return parentNameEnd - key->key; } /* * Copy this key's parent name (without owner) into a pre-allocated buffer. * * @par Example: * @code Key *key=keyNew("system/parent/base",KEY_SWITCH_END); char *parentName; size_t parentSize; parentSize=keyGetParentNameSize(key); parentName=malloc(parentSize); keyGetParentName(key,parentName,parentSize); // work with parentName free (parentName); * @endcode * @see keyGetParentNameSize() * @param key the key object to work with * @param returnedParent pre-allocated buffer to copy parent name to * @param maxSize number of bytes pre-allocated * @return number of bytes copied including ending NULL * @ingroup keyname */ ssize_t keyGetParentName(const Key *key, char *returnedParent, size_t maxSize) { ssize_t parentSize; parentSize=keyGetParentNameSize(key); if (parentSize > maxSize) { /*errno=KDB_ERR_TRUNC;*/ return 0; } else strncpy(returnedParent,key->key,parentSize); returnedParent[parentSize-1]=0; /* ending NULL */ return parentSize; } /* * Return the namespace of a key name. * * Currently valid namespaces are KeyNamespace::KEY_NS_SYSTEM and KeyNamespace::KEY_NS_USER. * * @param keyName the name to deduce the namespace from * @return KeyNamespace::KEY_NS_SYSTEM, KeyNamespace::KEY_NS_USER * @return 0 for no valid namespace found (key has no name) * @see keyGetNamespace(), keyIsUser(), keyIsSystem() * @see #KeyNamespace * @ingroup keytest * */ int keyNameGetNamespace(const char *keyName) { if (keyNameIsSystem(keyName)) return KEY_NS_SYSTEM; if (keyNameIsUser(keyName)) return KEY_NS_USER; return 0; } /* * Return the namespace of a key * * Currently valid namespaces are KeyNamespace::KEY_NS_SYSTEM and KeyNamespace::KEY_NS_USER. * * @param key the key object to work with * @return 0 * @see keyIsUser(), keyIsSystem() * @ingroup keytest * */ int keyGetNamespace(const Key *key) { if (keyIsUser (key)) return KEY_NS_USER; else if (keyIsSystem (key)) return KEY_NS_SYSTEM; else return 0; } /* * Check whether a key name is under the @p system namespace or not * * @return 1 if string begins with @p system , 0 otherwise * @param keyName the name of a key * @see keyIsSystem(), keyIsUser(), keyNameIsUser() * @ingroup keyname * */ int keyNameIsSystem(const char *keyName) { if (!strncmp("system",keyName,sizeof("system")-1)) return 1; return 0; } /* * Check whether a key name is under the @p user namespace or not * * @return 1 if string begins with @p user, 0 otherwise * @param keyName the name of a key * @see keyIsSystem(), keyIsUser(), keyNameIsSystem() * @ingroup keyname * */ int keyNameIsUser(const char *keyName) { if (!strncmp("user",keyName,sizeof("user")-1)) return 1; return 0; } /********************************************************************* * Data constructors (protected) * *********************************************************************/ int keyInit(Key *key) { memset(key,0,sizeof(Key)); key->type = KEY_TYPE_UNDEFINED; key->uid = (uid_t)-1; key->gid = (gid_t)-1; key->mode = KEY_DEF_MODE; return 0; } elektra-0.7.1/src/libelektra/keymeta.c0000644000076400001440000003755011365506635014623 00000000000000 /*************************************************************************** keymeta.c - Methods for Key manipulation ------------------- begin : Fri Sep 26 2008 copyright : (C) 2008 by Markus Raab email : elektra@markus-raab.org ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ /** * @defgroup keymeta Key :: Meta Info Manipulation Methods * @brief Methods to do various operations on Key metainfo * * To use them: * @code #include * @endcode * * Next to \link keyname Name (key and owner) \endlink and * \link keyvalue Value (data and comment) \endlink there * is the so called metainfo inside every key. * * Key metainfo insists of: * - UID, the user id * - GID, the group id * - filesystem-like mode permissions (rwx) * - Mode, change and modification times * * The comment can contain userdata which directly * belong to that key. * * Owner is the user that owns the key. It only * works for the user/ hierachy. * * Every user and group of your System has a uniqe ID. * These values are used in the keys too. They are * very important for the mode. See man 2 chown. * * With the mode mode you can choose if a user, group * or the world can mode your key. See man 2 chmod. * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #if DEBUG && HAVE_STDIO_H #include #endif #ifdef HAVE_STDARG_H #include #endif #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #include "kdb.h" #include "kdbprivate.h" /** * Only stat a key instead of receiving value, comment and key type. * * Only stat the key in the database when doing * kdbGet(). The key may not have any value, comment * or key type set. * * It is not possible to revert the action on per-key basis. * When you want to remove the flag you have to pass * option_t::KDB_O_NOSTAT to the next kdbGet(). * * @see keyNeedStat(), kdbGet() * @param key the key object to work with * @return 1 on succuess * @return -1 on NULL pointer * * @ingroup keymeta */ int keyStat(Key *key) { if (!key) return -1; key->flags |= KEY_FLAG_STAT; return 1; } /** * Permanently remove a key after committing to database. * * This functions sets a flag that the key needs to be removed. * It also sets a flag that it is not synced. * * Remove the key instead of writing it in the key database when doing * kdbSet() and related functions. * * This key will be ignored and it is save to delete it afterwards. * To be sure that it was removed, check if it needs sync with * keyNeedSync(). * * @note Delete in elektra terminology means to free memory, * remove means to free permanent storage. * * @warning You should not change a key's remove status once it belongs to a keyset. * See ksSort() for more information. * * @see keyNeedRemove(), kdbSet(), kdbRemove() * @param key the key object to work with * @return 1 on success * @return -1 on NULL pointer * * @ingroup keymeta */ int keyRemove(Key *key) { if (!key) return -1; key->flags |= KEY_FLAG_REMOVE; key->flags |= KEY_FLAG_SYNC; return 1; } /********************************************* * UID, GID access methods * *********************************************/ /** * Get the user ID of a key. * * @section UID UID * * The user ID is a unique identification for every user present on a * system. Keys will belong to root (0) as long as you did not get their * real UID with kdbGet(). * * Although usually the same, the UID of a key is not related to its owner. * * A fresh key will have (uid_t)-1 also known as the user nobody. * It means that the key is not related to a user ID at the moment. * * @param key the key object to work with * @return the system's UID of the key * @return (uid_t)-1 on NULL key or currently unknown ID * @see keyGetGID(), keySetUID(), keyGetOwner() * @ingroup keymeta */ uid_t keyGetUID(const Key *key) { if (!key) return (uid_t)-1; return key->uid; } /** * Set the user ID of a key. * * See @ref UID for more information about user IDs. * * @param key the key object to work with * @param uid the user ID to set * @return 0 on success * @return -1 on NULL key * @see keySetGID(), keyGetUID(), keyGetOwner() * @ingroup keymeta */ int keySetUID(Key *key, uid_t uid) { if (!key) return -1; key->uid=uid; key->flags |= KEY_FLAG_SYNC; return 0; } /** * Get the group ID of a key. * * @section GID GID * * The group ID is a unique identification for every group present on * a system. Keys will belong to root (0) as long as you did not get their * real GID with kdbGet(). * * Unlike UID users might change their group. This makes it possible to * share configuration between some users. * * A fresh key will have (gid_t)-1 also known as the group nogroup. * It means that the key is not related to a group ID at the moment. * * @param key the key object to work with * @return the system's GID of the key * @return (gid_t)-1 on NULL key or currently unknown ID * @see keySetGID(), keyGetUID() * @ingroup keymeta */ gid_t keyGetGID(const Key *key) { if (!key) return (gid_t)-1; return key->gid; } /** * Set the group ID of a key. * * See @ref GID for more information about group IDs. * * @param key the key object to work with * @param gid is the group ID * @return 0 on success * @return -1 on NULL key * @see keyGetGID(), keySetUID() * @ingroup keymeta */ int keySetGID(Key *key, gid_t gid) { if (!key) return -1; key->gid=gid; key->flags |= KEY_FLAG_SYNC; return 0; } /** * Set mode so that key will be recognized as directory. * * The function will add all executable bits. * * - Mode 0200 will be translated to 0311 * - Mode 0400 will be translated to 0711 * - Mode 0664 will be translated to 0775 * * The macro KEY_DEF_DIR (defined to 0111) will be used for that. * * The executable bits show that child keys are allowed and listable. There * is no way to have child keys which are not listable for anyone, but it is * possible to restrict listing the keys to the owner only. * * - Mode 0000 means that it is a key not read or writable to anyone. * - Mode 0111 means that it is a directory not read or writable to anyone. * But it is recognized as directory to anyone. * * For more about mode see keySetMode(). * * It is not possible to access keys below a not executable key. * If a key is not writeable and executable kdbSet() will fail to access the * keys below. * If a key is not readable and executable kdbGet() will fail to access the * keys below. * * @param key the key to set permissions to be recognized as directory. * @return 0 on success * @return -1 on NULL pointer * @see keySetMode() * @ingroup keymeta */ int keySetDir(Key *key) { if (!key) return -1; key->mode |= KEY_DEF_DIR; key->flags |= KEY_FLAG_SYNC; return 0; } /** * Return the key mode permissions. * * Default is 0664 (octal) for keys and 0775 for directory keys * which used keySetDir(). * * The defaults are defined with the macros KEY_DEF_MODE and KEY_DEF_DIR. * * For more information about the mode permissions see @ref mode. * * @param key the key object to work with * @return mode permissions of the key * @return (mode_t)-1 on NULL pointer * @see keySetMode() * @ingroup keymeta */ mode_t keyGetMode(const Key *key) { if (!key) return (mode_t) -1; return key->mode; } /** * Set the key mode permissions. * * The mode consists of 9 individual bits for mode permissions. * In the following explanation the octal notation with leading * zero will be used. * * Default is 0664 (octal) for keys and 0775 for directory keys * which used keySetDir(). * * The defaults are defined with the macros KEY_DEF_MODE and KEY_DEF_DIR. * * @note libelektra 0.7.0 only allows 0775 (directory keys) and * 0664 (other keys). More will be added later in a sense of the * description below. * * @section mode Modes * * 0000 is the most restrictive mode. No user might read, write * or execute the key. * * Reading the key means to get the value and comment by kdbGet() * or all highlevel methods. * * Writing the key means to set the value and comment by kdbSet() * or all highlevel methods. * * Execute the key means to make a step deeper in the hierarchy. * But you must be able to read the key to be able to list the * keys below. See also keySetDir() in that context. * But you must be able to write the key to be able to add or * remove keys below. * * 0777 is the most relaxing mode. Every user is allowed to * read, write and execute the key, if he is allowed to execute * and read all keys below. * * 0700 allows every action for the current user, identified by * the uid. See keyGetUID() and keySetUID(). * * To be more specific for the user the single bits can elect * the mode for read, write and execute. 0100 only allows * executing which gives the information that it is a directory * for that user, but not accessable. 0200 only allows reading. * This information may be combined to 0300, which allows execute * and reading of the directory. Last 0400 decides about the * writing permissions. * * The same as above is also valid for the 2 other octal digits. * 0070 decides about the group permissions, in that case full * access. Groups are identified by the gid. See keyGetGID() and * keySetGID(). In that example everyone with a different uid, * but the gid of the the key, has full access. * * 0007 decides about the world permissions. This is taken into * account when neighter the uid nor the gid matches. So that * example would allow everyone with a different uid and gid * of that key gains full access. * * @param key the key to set mode permissions * @param mode the mode permissions * @return 0 on success * @return -1 on NULL key * @see keyGetMode() * @ingroup keymeta */ int keySetMode(Key *key, mode_t mode) { if (!key) return -1; key->mode=mode; key->flags |= KEY_FLAG_SYNC; return 0; } /** * Returns the key data type. * * See #type_t for the type definition. * * @see keySetType() * @see keyIsBinary() and keyIsString() * @see keyIsDir() is not related to the type system * @param key key where to get the type. * @return the key type * @return KEY_TYPE_UNDEFINED on keys without type * @return -1 on NULL pointer * @ingroup keymeta * */ type_t keyGetType(const Key *key) { if (!key) return -1; return key->type; } /** * Set a new key type. * * This method is usually not needed, unless you are working with more * semantic value types, or want to force a specific value type for a key. * It is not usually needed because the data type is automatically set * when setting the key value. * * See #type_t for the type defintion. * * @par Example: * @code // here we define the new type enum { KEY_TYPE_COLOR=KEY_TYPE_STRING+4 }; // here we make a new key with the type Key *k1 = keyNew ("user/sw/oyranos/current/color1", KEY_VALUE, "#4B52CA", KEY_COMMENT, "a custom color", KEY_TYPE, KEY_TYPE_COLOR, KEY_END); // lets check if it is really correct type if (keyGetType(k1) == KEY_TYPE_COLOR) printf ("correct type"); * @endcode * * When using type_t::KEY_TYPE_DIR, this method will not set mode * permissions to the key. You'll have to set it manually after * keySetType(), calling keySetMode() with appropriate permissions. * Or use the keySetDir(). * * @see keyGetType() * @see keySetDir() to see that the directory concept is independent of types * @param key the key object to work with * @param newType contains the new type * @return 0 on sucess * @return -1 on NULL pointer and when newType >= KEY_TYPE_MAX * @ingroup keymeta * */ int keySetType(Key *key, type_t newType) { if (!key) return -1; if (newType >= KEY_TYPE_MAX) return -1; key->type=newType; key->flags |= KEY_FLAG_SYNC; return 0; } /********************************************* * Access times methods * *********************************************/ /** * Get last time the key data was read from disk. * * Every kdbGet() might update the access time * of a key. You get information when the key * was read the last time from the database. * * You will get 0 when the key was not read already. * * Beware that multiple copies of keys with keyDup() might have different * atimes because you kdbGet() one, but not the * other. You can use this information to decide which * key is the latest. * * @param key Key to get information from. * @return the time you got the key with kdbGet() * @return 0 on key that was never kdbGet() * @return (time_t)-1 on NULL pointer * @see keySetATime() * @see kdbGet() * @ingroup keymeta */ time_t keyGetATime(const Key *key) { if (!key) return (time_t)-1; return key->atime; } /** * Update the atime information for a key. * * When you do manual sync of keys you might also * update the atime to make them indistinguishable. * * It can also be useful if you work with * keys not using a keydatabase. * * @param key The Key object to work with * @param atime The new access time for the key * @return 0 on success * @return -1 on NULL pointer * @see keyGetATime() * @ingroup keymeta */ int keySetATime(Key *key, time_t atime) { if (!key) return -1; key->atime = atime; return 0; } /** * Get last modification time of the key on disk. * * You will get 0 when the key was not read already. * * Everytime you change value or comment and kdbSet() * the key the mtime will be updated. When you kdbGet() * the key, the atime is set appropriate. * * Not changed keys may not even passed to kdbSet_backend() * so it will not update this time, even after kdbSet(). * * It is possible that other keys written to disc * influence this time if the backend is not grained * enough. * * If you add or remove a key the key thereunder * in the hierarchy will update the mtime * if written with kdbSet() to disc. * * @param key Key to get information from. * @see keySetMTime() * @return the last modification time * @return (time_t)-1 on NULL pointer * @ingroup keymeta */ time_t keyGetMTime(const Key *key) { if (!key) return (time_t)-1; return key->mtime; } /** * Update the mtime information for a key. * * @param key The Key object to work with * @param mtime The new modification time for the key * @return 0 on success * @see keyGetMTime() * @ingroup keymeta */ int keySetMTime(Key *key, time_t mtime) { if (!key) return -1; key->mtime = mtime; return 0; } /** * Get last time the key metadata was changed from disk. * * You will get 0 when the key was not read already. * * Any changed field in metadata will influence the * ctime of a key. * * This time is not updated if only value * or comment are changed. * * Not changed keys will not update this time, * even after kdbSet(). * * It is possible that other keys written to disc * influence this time if the backend is not grained * enough. * * @param key Key to get information from. * @see keySetCTime() * @return (time_t)-1 on NULL pointer * @return the metadata change time * @ingroup keymeta */ time_t keyGetCTime(const Key *key) { if (!key) return (time_t)-1; return key->ctime; } /** * Update the ctime information for a key. * * @param key The Key object to work with * @param ctime The new change metadata time for the key * @return 0 on success * @return -1 on NULL pointer * @see keyGetCTime() * @ingroup keymeta */ int keySetCTime(Key *key, time_t ctime) { if (!key) return -1; key->ctime = ctime; return 0; } elektra-0.7.1/src/libelektra/keyname.c0000644000076400001440000006154611365506635014617 00000000000000 /*************************************************************************** keyname.c - Methods for Key manipulation ------------------- begin : Fri Sep 26 2008 copyright : (C) 2008 by Markus Raab email : elektra@markus-raab.org ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ /** * @defgroup keyname Key :: Name Manipulation Methods * @brief Methods to do various operations on Key names. * * To use them: * @code #include * @endcode * * These functions make it easier for c programmers to work with key names. * Everything here can also be done with keySetName, described in key. * * * @par Rules for Key Names * * When using Elektra to store your application's configuration and state, * please keep in mind the following rules: * - You are not allowed to create keys right under @p system or @p user. * - You are not allowed to create folder keys right under @p system or @p user. * They are reserved for very essential OS subsystems. * - The keys for your application, called say @e MyApp, should be created under * @p system/sw/MyApp and/or @p user/sw/MyApp. * - It is suggested to make your application look for default keys under * @p system/sw/MyApp/current and/or @p user/sw/MyApp/current. This way, from * a sysadmin perspective, it will be possible to copy the * @p system/sw/MyApp/current tree to something like @p system/sw/MyApp/old, * and keep system clean and organized. * - \\0 must not occur in names. * - / is the seperator. * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #if DEBUG && HAVE_STDIO_H #include #endif #ifdef HAVE_STDARG_H #include #endif #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #include "kdb.h" #include "kdbprivate.h" /******************************************* * General name manipulation methods * *******************************************/ /** * Returns a pointer to the abbreviated real internal @p key name. * * This is a much more efficient version of keyGetName() and can use * it if you are responsible enough to not mess up things. You are not allowed * to change anything in the returned array. The content of that string * may change after keySetName() and similar functions. If you need a copy of the name, * consider using keyGetName(). * * The name will be without owner, see keyGetFullName() if * you need the name with its owner. * * keyName() returns "" when there is no keyName. The reason is * @code key=keyNew(0); keySetName(key,""); keyName(key); // you would expect "" here keyDel(key); * @endcode * * @note Note that the Key structure keeps its own size field that is calculated * by library internal calls, so to avoid inconsistencies, you * must never use the pointer returned by keyName() method to set a new * value. Use keySetName() instead. * * @param key the key object to work with * @return a pointer to the keyname which must not be changed. * @return "" when there is no (a empty) keyname * @return 0 on NULL pointer * @see keyGetNameSize() for the string length * @see keyGetFullName(), keyGetFullNameSize() to get the full name * @see keyGetName() as alternative to get a copy * @see keyOwner() to get a pointer to owner * @ingroup keyname */ const char *keyName(const Key *key) { if (!key) return 0; if (!key->key) { /*errno=KDB_ERR_NOKEY;*/ return ""; } return key->key; } /** * Bytes needed to store the key name without owner. * * For an empty key name you need one byte to store the ending NULL. * For that reason 1 is returned. * * @param key the key object to work with * @return number of bytes needed, including ending NULL, to store key name * without owner * @return 1 if there is is no key Name * @return -1 on NULL pointer * @see keyGetName(), keyGetFullNameSize() * @ingroup keyname */ ssize_t keyGetNameSize(const Key *key) { if (!key) return -1; if (!key->key) { /*errno = KDB_ERR_NOKEY;*/ return 1; } else return key->keySize; } /** * Get abbreviated key name (without owner name). * * When there is not enough space to write the name, * nothing will be written and -1 will be returned. * * maxSize is limited to SSIZE_MAX. When this value * is exceeded -1 will be returned. The reason for that * is that any value higher is just a negative return * value passed by accident. Of course malloc is not * as failure tolerant and will try to allocate. * * @return number of bytes written to @p returnedName * @return 1 when only a null was written * @return -1 when keyname is longer then maxSize or 0 or any NULL pointer * @param key the key object to work with * @param returnedName pre-allocated memory to write the key name * @param maxSize maximum number of bytes that will fit in returnedName, including the final NULL * @see keyGetNameSize(), keyGetFullName(), keyGetFullNameSize() * @ingroup keyname */ ssize_t keyGetName(const Key *key, char *returnedName, size_t maxSize) { if (!key) return -1; if (!returnedName) return -1; if (!maxSize) return -1; if (maxSize > SSIZE_MAX) return -1; if (!key->key) { /*errno=KDB_ERR_NOKEY;*/ returnedName[0]=0; return 1; } if (key->keySize > maxSize) { /*errno=KDB_ERR_TRUNC;*/ return -1; } strncpy(returnedName,key->key,maxSize); return key->keySize; } /** * Set a new name to a key. * * A valid name is of the forms: * - @p system/something * - @p user/something * - @p user:username/something * * The last form has explicitly set the owner, to let the library * know in which user folder to save the key. A owner is a user name. * If not defined (the second form) current user is calculated and used * as default. * * You should always follow the guidelines for key tree structure creation. * * A private copy of the key name will be stored, and the @p newName * parameter can be freed after this call. * * .., . and / will be handled correctly. A valid name will be build * out of the (valid) name what you pass, e.g. user///sw/../sw//././MyApp -> user/sw/MyApp * * On invalid names, NULL or "" the name will be "" afterwards. * * @warning You should not change a keys name once it belongs to a keyset. * See ksSort() for more information. * * @return size in bytes of this new key name including ending NULL * @return -1 if @p newName is empty or invalid or any NULL pointer * @param key the key object to work with * @param newName the new key name * @see keyNew(), keySetOwner() * @see keyGetName(), keyGetFullName(), keyName() * @see keySetBaseName(), keyAddBaseName() to manipulate a name * @ingroup keyname */ ssize_t keySetName(Key *key, const char *newName) { size_t length; size_t rootLength, userLength, systemLength, ownerLength; char *p=0; size_t size=0; if (!key) return -1; if (key->key) free (key->key); key->key = 0; key->keySize=1; /* equal to length plus room for \\0 */ /* handle null new key name, removing the old name */ if (!newName || !(length=kdbiStrLen(newName)-1)) { if (key->key) { key->keySize = 0; free(key->key); key->key=0; } key->type = 0; return 0; } rootLength=keyNameGetFullRootNameSize(newName)-1; if (!rootLength) { /*errno=KDB_ERR_INVALIDKEY;*/ return -1; } userLength=sizeof("user")-1; systemLength=sizeof("system")-1; ownerLength=rootLength-userLength; if (ownerLength>0) --ownerLength; if (keyNameIsUser(newName)) { /* handle "user*" */ if (length > userLength) { /* handle "user?*" */ if (*(newName+userLength)==':') { /* handle "user:*" */ if (ownerLength > 0) { p=realloc(key->owner,ownerLength+1); if (NULL==p) goto error_mem; key->owner=p; strncpy(key->owner,newName+userLength+1,ownerLength); key->owner[ownerLength]=0; key->ownerSize = ownerLength+1; } key->keySize+=length-ownerLength-1; /* -1 is for the ':' */ } else if (*(newName+userLength)!=PATH_SEPARATOR) { /* handle when != "user/ *" */ /*errno=KDB_ERR_INVALIDKEY;*/ key->key = 0; key->keySize = 1; return -1; } else { /* handle regular "user/ *" */ key->keySize+=length; } } else { /* handle "user" */ key->keySize+=userLength; } if (!key->owner) { char *envVar; envVar = getenv("KDB_USER"); if ( envVar ) { keySetOwner(key, envVar); } else { envVar = getenv ("USER"); if ( envVar ) { keySetOwner(key, envVar); } else { keySetOwner(key, NULL); } } } rootLength = userLength; } else if (keyNameIsSystem(newName)) { /* handle "system*" */ if (length > systemLength && *(newName+systemLength)!=PATH_SEPARATOR) { /* handle when != "system/ *" */ /*errno=KDB_ERR_INVALIDKEY;*/ key->key = 0; key->keySize = 1; return -1; } key->keySize+=length; keySetOwner (key, NULL); rootLength = systemLength; } else { /* Given newName is neither "system" or "user" */ /*errno=KDB_ERR_INVALIDKEY;*/ key->key = 0; key->keySize = 1; keySetOwner (key, NULL); return -1; } /* At this point: - key->key has no memory (re)allocated yet - key->keySize has number of bytes that will be allocated for key name with already removed owner. - key->owner is already set - rootLength is sizeof("user")-1 or sizeof("system")-1 */ /* Allocate memory for key->key */ p=malloc(key->keySize); if (NULL==p) goto error_mem; if (key->key) free(key->key); key->key=p; /* here key->key must have a correct size allocated buffer */ if (!key->key) return -1; /* copy the root of newName to final destination */ strncpy(key->key,newName,rootLength); /* skip the root */ p=(char *)newName; size=0; p=keyNameGetOneLevel(p+size,&size); /* iterate over each single folder name removing repeated '/' and escaping when needed */ key->keySize=rootLength; while (*(p=keyNameGetOneLevel(p+size,&size))) { /* printf ("level: %s, size: %d\n", p, size); */ if (size == 1 && strncmp (p, ".",1) == 0) { /* printf ("ignore .\n"); */ continue; /* just ignore current directory */ } else if (size == 2 && strncmp (p, "..",2) == 0) /* give away directory */ { key->key[key->keySize] = 0; /* initialize first (valgrind) */ while (key->keySize > rootLength && key->key[key->keySize] != PATH_SEPARATOR) key->keySize--; /* printf ("do .. (key->keySize: %d), key->key: %s, rootLength: %d, key->keySize: %d\n", key->keySize, key->key, rootLength, key->keySize); */ continue; } /* Add a '/' to the end of key name */ key->key[key->keySize]=PATH_SEPARATOR; key->keySize++; /* carefully append basenames */ memcpy(key->key+key->keySize,p,size); key->keySize+=size; } /* remove unescaped trailing slashes */ while (key->key[key->keySize-1] == PATH_SEPARATOR && key->key[key->keySize-2] != '\\') key->keySize--; key->key[key->keySize]=0; /* finalize string */ key->flags |= KEY_FLAG_SYNC; key->keySize ++; /*for \0 ending*/ return key->keySize; error_mem: /*errno=KDB_ERR_NOMEM;*/ return -1; } /** * Bytes needed to store the key name including user domain and ending NULL. * * @param key the key object to work with * @return number of bytes needed to store key name including user domain * @return 1 on empty name * @return -1 on NULL pointer * @see keyGetFullName(), keyGetNameSize() * @ingroup keyname */ ssize_t keyGetFullNameSize(const Key *key) { size_t returnedSize=0; if (!key) return -1; if (!key->key) return 1; returnedSize=kdbiStrLen(key->key); if (keyNameIsUser(key->key) && key->owner) returnedSize+=kdbiStrLen(key->owner); /* After 2 kdbiStrLen() calls looks like we counted one more NULL. But we need this byte count because a full key name has an additional ':' char. */ return returnedSize; } /** * Get key full name, including the user domain name. * * @return number of bytes written * @return 1 on empty name * @return -1 on NULL pointers * @return -1 if maxSize is 0 or larger than SSIZE_MAX * @param key the key object * @param returnedName pre-allocated memory to write the key name * @param maxSize maximum number of bytes that will fit in returnedName, including the final NULL * @ingroup keyname */ ssize_t keyGetFullName(const Key *key, char *returnedName, size_t maxSize) { size_t userSize=sizeof("user")-1; size_t ownerSize; ssize_t length; char *cursor; if (!key) return -1; if (!returnedName) return -1; if (!maxSize) return -1; if (maxSize > SSIZE_MAX) return -1; length=keyGetFullNameSize(key); if (length == 1) { /*errno=KDB_ERR_NOKEY;*/ returnedName[0]=0; return length; } else if (length < 0) return length; else if (length > maxSize) { /* errno=KDB_ERR_TRUNC; */ return -1; } cursor=returnedName; if (keyIsUser(key)) { strncpy(cursor,key->key,userSize); cursor+=userSize; if (key->owner) { *cursor=':'; ++cursor; ownerSize=kdbiStrLen(key->owner)-1; strcpy(cursor,key->owner); cursor+=ownerSize; } strcpy(cursor,key->key+userSize); } else strcpy(cursor,key->key); return length; } /** * Returns a pointer to the real internal key name where the @p basename starts. * * This is a much more efficient version of keyGetBaseName() and you should * use it if you are responsible enough to not mess up things. The name might * change or even point to a wrong place after a keySetName(). If you need * a copy of the basename consider to use keyGetBaseName(). * * keyBaseName() returns "" when there is no keyBaseName. The reason is * @code key=keyNew(0); keySetName(key,""); keyName(key); // you would expect "" here keySetName(key,"user"); keyName(key); // you would expect "" here keyDel(key); * @endcode * * @note Note that the Key structure keeps its own size field that is calculated * by library internal calls, so to avoid inconsistencies, you * must never use the pointer returned by keyBaseName() method to set a new * value. Use keySetBaseName() instead. * * @param key the object to obtain the basename from * @return a pointer to the basename * @return "" on null pointer or when the key has no name * @return 0 on NULL pointer * @see keyGetBaseName(), keyGetBaseNameSize() * @see keyName() to get a pointer to the name * @see keyOwner() to get a pointer to the owner * @ingroup keyname */ const char *keyBaseName(const Key *key) { char *p=0; char *base=0; size_t size=0; if (!key) return 0; p = key->key; if (!p) return ""; while (*(p=keyNameGetOneLevel(p+size,&size))) base=p; if (base != key->key) return base; else return ""; } /** * Calculates number of bytes needed to store basename of @p key. * * Key names that have only root names (e.g. @c "system" or @c "user" * or @c "user:domain" ) does not have basenames, thus the function will * return 1 bytes to store "". * * Basenames are denoted as: * - @c system/some/thing/basename -> @c basename * - @c user:domain/some/thing/base\/name > @c base\/name * * @param key the key object to work with * @return size in bytes of @p key's basename including ending NULL * @see keyBaseName(), keyGetBaseName() * @see keyName(), keyGetName(), keySetName() * @ingroup keyname */ ssize_t keyGetBaseNameSize(const Key *key) { char *p=0; char *base=0; size_t size=0; size_t baseSize=0; if (!key) return -1; p = key->key;; if (!p) return 1; while (*(p=keyNameGetOneLevel(p+size,&size))) { base=p; baseSize=size; } if (base == key->key) return 1; else return baseSize+1; } /** * Calculate the basename of a key name and put it in @p returned finalizing * the string with NULL. * * Some examples: * - basename of @c system/some/keyname is @c keyname * - basename of @c "user/tmp/some key" is @c "some key" * * @param key the key to extract basename from * @param returned a pre-allocated buffer to store the basename * @param maxSize size of the @p returned buffer * @return number of bytes copied to @p returned * @return 1 on empty name * @return -1 on NULL pointers * @return -1 when maxSize is 0 or larger than SSIZE_MAX * @see keyBaseName(), keyGetBaseNameSize() * @see keyName(), keyGetName(), keySetName() * @ingroup keyname */ ssize_t keyGetBaseName(const Key *key, char *returned, size_t maxSize) { size_t size=0; char *p=0; char *baseName=0; size_t baseSize=0; if (!key) return -1; if (!returned) return -1; if (!maxSize) return -1; if (maxSize > SSIZE_MAX) return -1; p = key->key; if (!p) { returned[0] = 0; return 1; } while (*(p=keyNameGetOneLevel(p+size,&size))) { baseName=p; baseSize=size+1; } if (!baseName || baseName==key->key) { returned[0] = 0; return 1; } if (maxSize < baseSize) { /*strncpy(returned,baseName,maxSize);*/ /*errno=KDB_ERR_TRUNC;*/ return -1; } else { strncpy(returned,baseName,baseSize); return baseSize; } } /** * Adds @p baseName to the current key name. * * Assumes that @p key is a directory. @p baseName is appended to it. * The function adds @c '/' if needed while concatenating. * * So if @p key has name @c "system/dir1/dir2" and this method is called with * @p baseName @c "mykey", the resulting key will have name * @c "system/dir1/dir2/mykey". * * When baseName is 0 or "" nothing will happen and the size of the name is returned. * * @warning You should not change a keys name once it belongs to a keyset. * See ksSort() for more information. * * @param key the key object to work with * @param baseName the string to append to the name * @return the size in bytes of the new key name including the ending NULL * @return -1 if the key had no name * @return -1 on NULL pointers * @see keySetBaseName() * @see keySetName() to set a new name. * @ingroup keyname * */ ssize_t keyAddBaseName(Key *key, const char *baseName) { size_t size=0; const char *p=0; if (!key) return -1; if (!baseName || !baseName[0]) return key->keySize; if (key->key) { p = baseName; while (*(p=keyNameGetOneLevel(p+size,&size))) { key->keySize += size+1; key->key=realloc(key->key,key->keySize); key->key[key->keySize-size-2]=PATH_SEPARATOR; memcpy(key->key+key->keySize-size-1,p,size); } key->key[key->keySize-1]=0; /* finalize string */ return key->keySize; } else return keySetName(key,baseName); } /** * Sets @c baseName as the new basename for @c key. * * All text after the last @c '/' in the @p key keyname is erased and * @p baseName is appended. * * So lets suppose @p key has name @c "system/dir1/dir2/key1". If @p baseName * is @c "key2", the resulting key name will be @c "system/dir1/dir2/key2". * If @p baseName is empty or NULL, the resulting key name will * be @c "system/dir1/dir2". * * @warning You should not change a keys name once it belongs to a keyset. * See ksSort() for more information. * * @param key the key object to work with * @param baseName the string used to overwrite the basename of the key * @return the size in bytes of the new key name * @return -1 on NULL pointers * @see keyAddBaseName() * @see keySetName() to set a new name * @ingroup keyname */ ssize_t keySetBaseName(Key *key, const char *baseName) { size_t size=0; const char *p=0; if (!key) return -1; if (key->key) { /*Throw away basename of key->key*/ p=strrchr (key->key, '/'); if (p == 0) return keySetName(key, baseName); key->keySize -= (key->key+key->keySize-1)-p; key->key=realloc(key->key,key->keySize); key->key[key->keySize-1]=0; /* finalize string */ /*Now add new baseName*/ p = baseName; while (*(p=keyNameGetOneLevel(p+size,&size))) { key->keySize += size+1; key->key=realloc(key->key,key->keySize); key->key[key->keySize-size-2]=PATH_SEPARATOR; memcpy(key->key+key->keySize-size-1,p,size); } key->key[key->keySize-1]=0; /* finalize string */ return key->keySize; } else return keySetName(key,baseName); } /***************************************************** * General owner manipulation methods * *****************************************************/ /** * Return a pointer to the real internal @p key owner. * * This is a much more efficient version of keyGetOwner() and you * should use it if you are responsible enough to not mess up things. * You are not allowed to modify the returned string in any way. * If you need a copy of the string, consider to use keyGetOwner() instead. * * keyOwner() returns "" when there is no keyOwner. The reason is * @code key=keyNew(0); keySetOwner(key,""); keyOwner(key); // you would expect "" here keySetOwner(key,"system"); keyOwner(key); // you would expect "" here * @endcode * * @note Note that the Key structure keeps its own size field that is calculated * by library internal calls, so to avoid inconsistencies, you * must never use the pointer returned by keyOwner() method to set a new * value. Use keySetOwner() instead. * * @param key the key object to work with * @return a pointer to internal owner * @return "" when there is no (a empty) owner * @return 0 on NULL pointer * @see keyGetOwnerSize() for the size of the string with concluding 0 * @see keyGetOwner(), keySetOwner() * @see keyName() for name without owner * @see keyGetFullName() for name with owner * @ingroup keyname */ const char *keyOwner(const Key *key) { if (!key) return 0; if (!key->owner) { /*errno=KDB_ERR_NOKEY;*/ return ""; } return key->owner; } /** * Return the size of the owner of the Key with concluding 0. * * The returned number can be used to allocate a string. * 1 will returned on an empty owner to store the concluding 0 * on using keyGetOwner(). * * @code char * buffer; buffer = malloc (keyGetOwnerSize (key)); // use buffer and keyGetOwnerSize (key) for maxSize * @endcode * * @note that -1 might be returned on null pointer, so when you * directly allocate afterwards its best to check if you will pass * a null pointer before. * * @param key the key object to work with * @return number of bytes * @return 1 if there is no owner * @return -1 on NULL pointer * @see keyGetOwner() * @ingroup keyname */ ssize_t keyGetOwnerSize(const Key *key) { if (!key) return -1; if (!key->owner) { /*errno=KDB_ERR_NOOWNER;*/ return 1; } return key->ownerSize; } /** * Return the owner of the key. * - Given @p user:someuser/..... return @p someuser * - Given @p user:some.user/.... return @p some.user * - Given @p user/.... return the current user * * Only @p user/... keys have a owner. * For @p system/... keys (that doesn't have a key owner) an empty * string ("") is returned. * * Although usually the same, the owner of a key is not related to its * UID. Owner are related to WHERE the key is stored on disk, while * UIDs are related to mode controls of a key. * * @param key the object to work with * @param returned a pre-allocated space to store the owner * @param maxSize maximum number of bytes that fit returned * @return number of bytes written to buffer * @return 1 if there is no owner * @return -1 on NULL pointers * @return -1 when maxSize is 0, larger than SSIZE_MAX or too small for ownername * @see keySetName(), keySetOwner(), keyOwner(), keyGetFullName() * @ingroup keyname */ ssize_t keyGetOwner(const Key *key, char *returned, size_t maxSize) { if (!key) return -1; if (!maxSize) return -1; if (!returned) return -1; if (maxSize > SSIZE_MAX) return -1; if (!key->owner) { /*errno=KDB_ERR_NOOWNER;*/ returned[0]=0; return 1; } if (maxSize < key->ownerSize) { /*errno=KDB_ERR_TRUNC;*/ return -1; } else strcpy(returned,key->owner); return key->ownerSize; } /** * Set the owner of a key. * * A owner is a name of a system user related to a UID. * The owner decides on which location on the disc the key * goes. * * A private copy is stored, so the passed parameter can be freed after * the call. * * @param key the key object to work with * @param owner the owner (or user name) * @return the number of bytes actually saved including final NULL * @return 1 when owner is freed (by setting 0 or "") * @return -1 on null pointer or memory problems * @see keySetName(), keyGetOwner(), keyGetFullName() * @ingroup keyname */ ssize_t keySetOwner(Key *key, const char *owner) { if (!key) return -1; if (owner && (key->ownerSize=kdbiStrLen(owner)) > 1) { if (key->owner) { char *p=0; p=realloc(key->owner,key->ownerSize); if (NULL==p) { /*errno=KDB_ERR_NOMEM;*/ return -1; } key->owner=p; } else { key->owner=malloc(key->ownerSize); if (!key->owner) { /*errno=KDB_ERR_NOMEM;*/ return -1; } } strcpy(key->owner,owner); key->flags |= KEY_FLAG_SYNC; } else if (key->owner) { free(key->owner); key->ownerSize=1; key->owner=0; key->flags |= KEY_FLAG_SYNC; } return key->ownerSize; } elektra-0.7.1/src/libelektra/keyset.c0000644000076400001440000013175111365507605014464 00000000000000/*************************************************************************** keyset.c - Methods for KeySet manipulation ------------------- begin : Sun Oct 02 2005 copyright : (C) 2005 by Avi Alkalay email : avi@unix.sh ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ /** * @defgroup keyset KeySet :: Class Methods * @brief Methods to manipulate KeySets. * * A KeySet is a unsorted set of keys. * * Terminate with ksNew(0) or ksNew(20, ..., KS_END) * This is because there is a list of Key* required and * KS_END has the length of (Key*). * * It can be implemented in various ways like a linked list or with a * dynamically allocated array. * * With ksNew() you can create a new KeySet. * * You can add keys with ksAppendKey() in the keyset. ksGetSize() tells you * the current size of the keyset. * * With ksRewind() and ksNext() you can navigate through the keyset. Don't * expect any particular order, but it is assured that you will get every * key of the set. * * KeySets have an @link ksCurrent() internal cursor @endlink. This is used * for ksLookup() and kdbSet(). * * KeySet has a fundamental meaning inside elektra. It makes it possible * to get and store many keys at once inside the database. In addition to * that the class can be used as high level datastructure in applications. * With ksLookupByName() it is possible to fetch easily specific keys * out of the list of keys. * * You can easily create and iterate keys: * @code #include // create a new keyset with 3 keys // with a hint that about 20 keys will be inside KeySet *myConfig = ksNew(20, keyNew ("user/name1", 0), keyNew ("user/name2", 0), keyNew ("user/name3", 0), KS_END); // append a key in the keyset ksAppendKey(myConfig, keyNew("user/name4", 0)); Key *current; ksRewind(myConfig); while ((current=ksNext(myConfig))!=0) { printf("Key name is %s.\n", keyName (current)); } ksDel (myConfig); // delete keyset and all keys appended * @endcode * * @{ */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #if DEBUG && HAVE_STDIO_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STDARG_H #include #endif #ifdef HAVE_STRING_H #include #endif #include "kdbbackend.h" /** * Allocate, initialize and return a new KeySet object. * * Objects created with ksNew() must be destroyed with ksDel(). * * You can use a various long list of parameters to preload the keyset * with a list of keys. Either your first and only parameter is 0 or * your last parameter must be KEY_END. * * For most uses * @code KeySet *keys = ksNew(0); // work with it ksDel (keys); * @endcode * goes ok, the alloc size will be 16, defined in kdbprivate.h. * The alloc size will be doubled whenever size reaches alloc size, * so it also performs out large keysets. * * But if you have any clue how large your keyset may be you should * read the next statements. * * If you want a keyset with length 15 (because you know of your * application that you normally need about 12 up to 14 keys), use: * @code KeySet * keys = ksNew (15, KS_END); // work with it ksDel (keys); * @endcode * * If you start having 3 keys, and your application needs approximately * 200-500 keys, you can use: * @code KeySet * config = ksNew (500, keyNew ("user/sw/app/fixedConfiguration/key1", KEY_SWITCH_VALUE, "value1", 0), keyNew ("user/sw/app/fixedConfiguration/key2", KEY_SWITCH_VALUE, "value2", 0), keyNew ("user/sw/app/fixedConfiguration/key3", KEY_SWITCH_VALUE, "value3", 0), KS_END); // don't forget the KS_END at the end! // work with it ksDel (config); * @endcode * Alloc size is 500, the size of the keyset will be 3 after ksNew. * This means the keyset will reallocate when appending more than * 497 keys. * * The main benefit of taking a list of variant length parameters is to be able * to have one C-Statement for any possible KeySet. * * Due to ABI compatibility, the @p KeySet structure is only declared in kdb.h, * and not defined. So you can only declare @p pointers to @p KeySets in your * program. * See http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html#AEN135 * * @see ksDel() to free the keyset afterwards * @see ksDup() to duplicate an existing keyset * @param alloc gives a hint for the size how many Keys may be stored initially * @return a ready to use KeySet object * @return 0 on memory error */ KeySet *ksNew(size_t alloc, ...) { KeySet *ks; va_list va; if (alloc) va_start(va, alloc); ks = ksVNew (alloc, va); if (alloc) va_end (va); return ks; } KeySet *ksVNew (size_t alloc, va_list va) { KeySet *keyset=0; Key *key = 0; keyset= (KeySet *)kdbiMalloc(sizeof(KeySet)); if (!keyset) { /*errno = KDB_ERR_NOMEM;*/ return 0; } ksInit(keyset); if (alloc < KEYSET_SIZE) keyset->alloc=KEYSET_SIZE; else keyset->alloc=alloc; keyset->array = kdbiMalloc (sizeof(struct _Key *) * keyset->alloc); if (!keyset->array) { /*errno = KDB_ERR_NOMEM;*/ return 0; } keyset->array[0] = 0; if (alloc) { key = (struct _Key *) va_arg (va, struct _Key *); while (key) { ksAppendKey(keyset, key); key = (struct _Key *) va_arg (va, struct _Key *); } } return keyset; } /** * Return a duplicate of a keyset. * * Objects created with ksDup() must be destroyed with ksDel(). * * Memory will be allocated as needed for dynamic properties, * so you need to ksDel() the returned pointer. * * A flat copy is made, so the keys will not be duplicated, * but there reference counter is updated, so both keysets * need ksDel(). * * @param source has to be an initializised source KeySet * @return a flat copy of source on success * @return 0 on NULL pointer * @see ksNew(), ksDel() * @see keyDup() for key duplication */ KeySet *ksDup (const KeySet * source) { KeySet *keyset=0; if (!source) return 0; keyset = ksNew(source->alloc,KS_END); ksAppend (keyset, source); return keyset; } /** * Copy a keyset. * * Most often you may want a duplicate of a keyset, see * ksDup() or append keys, see ksAppend(). * But in some situations you need to copy a * keyset to a existing keyset, for that this function * exists. * * You can also use it to clear a keyset when you pass * a NULL pointer as @p source. * * Note that all keys in @p dest will be deleted. Afterwards * the content of the source will be added to the destination * and the ksCurrent() is set properly in @p dest. * * A flat copy is made, so the keys will not be duplicated, * but there reference counter is updated, so both keysets * need to be ksDel(). * * @code int f (KeySet *ks) { KeySet *c = ksNew (20, ..., KS_END); // c receives keys ksCopy (ks, c); // pass the keyset to the caller ksDel (c); } // caller needs to ksDel (ks) * @endcode * * @param source has to be an initialized source KeySet or NULL * @param dest has to be an initialized KeySet where to write the keys * @return 1 on success * @return 0 if dest was cleared successfully (source is NULL) * @return -1 on NULL pointer * @see ksNew(), ksDel(), ksDup() * @see keyCopy() for copying keys */ int ksCopy (KeySet *dest, const KeySet *source) { if (!dest) return -1; ksClear (dest); if (!source) return 0; ksAppend (dest, source); ksSetCursor (dest, ksGetCursor (source)); return 1; } /** * A destructor for KeySet objects. * * Cleans all internal dynamic attributes, decrement all reference pointers * to all keys and then keyDel() all contained Keys, * and free()s the release the KeySet object memory (that was previously * allocated by ksNew()). * * @param ks the keyset object to work with * @return 0 when the keyset was freed * @return -1 on null pointer * @see ksNew() */ int ksDel(KeySet *ks) { int rc; if (!ks) return -1; rc=ksClose(ks); kdbiFree(ks); return rc; } /* * KeySet object cleaner. * * Will keyDel() all contained keys, reset internal pointers and counters. * * After this call you can use the empty keyset again. * * @param ks the keyset object to work with * @see ksAppendKey() for details on how keys are inserted in KeySets * @return 0 on sucess * @return -1 on failure */ int ksClear(KeySet *ks) { ksClose (ks); if (ks->array) { /* go back to standard size KEYSET_SIZE */ if (kdbiRealloc ((void**) &ks->array, sizeof(struct _Key *) * KEYSET_SIZE) == -1) { /*errno = KDB_ERR_NOMEM;*/ kdbiFree (ks->array); ks->array = 0; ks->size = 0; return -1; } } else { if ((ks->array = kdbiMalloc (sizeof(struct _Key *) * KEYSET_SIZE)) == 0) { /*errno = KDB_ERR_NOMEM;*/ ks->size = 0; return -1; } } ks->alloc = KEYSET_SIZE; return 0; } /* * Returns if keyset needs sort. * * It is very inefficient to resort the keyset every time when a * key or a keyset is appended, so only a flag will be set to * show that the keyset is not sorted any more. * * Before operations where the code depends on a sorted keyset, * namely in kdbGet(), kdbSet() and ksLookup(), this simple code * sorts when needed: * * @code if (ksNeedSort(ks)) ksSort(ks); * @endcode * * @warning ksNeedSort() does not track every change which actually * affects sorting: changing of names with keySetName() and * marking keys remove with keyRemove() won't be recognized. * But any ks* Method will leave the KeySet sorted or * set the flag. * * So if your code might rename keys or flag them to remove, * make sure that you use * * @code ksSort(ks); * @endcode * * somewhere afterwards before using ksLookup(). Otherwise the * renamed key won't be found. * * kdbSet() will have no problems with that issue, because it * duplicates its keysets using ksDup(). * * @param ks the keyset object to work with * @see ksAppendKey(), ksAppend() and ksSort() * @return 1 if sort is needed * 0 if the keyset is sorted */ int ksNeedSort (const KeySet *ks) { return (ks->flags & KS_FLAG_DIRTY) == KS_FLAG_DIRTY; } /* Used as a callback by the qsort() function */ static int keyCompareWithRemove(const void *p1, const void *p2) { Key *key1=*(Key **)p1; Key *key2=*(Key **)p2; const char *name1 = keyName(key1); const char *name2 = keyName(key2); int ret = strcmp(name1, name2); /* one key remove, sort in order of KEY_FLAG_REMOVE */ if (keyNeedRemove(key1) && !keyNeedRemove(key2)) return -1; else if (!keyNeedRemove(key1) && keyNeedRemove(key2)) return 1; if (keyNeedRemove(key1) && keyNeedRemove(key2)) { /* both keys remove, sort reverse */ if (ret < 0) return 1; else if (ret > 0) return -1; else return 0; } else { /* sort by owner */ if (ret == 0) { const char *owner1 = keyOwner(key1); const char *owner2 = keyOwner(key2); return strcmp(owner1, owner2); } else return ret; } } /** * Sorts a KeySet alphabetically by Key name. * * You need ksSort() only in few cases directly. * * @section sortlookup Don't need to sort before using ksLookup * * You don't need it if you just just kdbGet() and subsequent * ksLookup(). * @code KeySet *ks = ksNew(0); kdbGet(h, ks, k, 0); // ksPop(), ksAppend() and ksAppendKey() allowed here ksLookup(ks, s, 0); // you dont need to sort ks * @endcode * * This is because the KeySet tracks if it needs to be sorted * and ksLookup() will sort when needed. * * @section sortiterate Sort when iterating * * Before you iterate over a keyset you have to sort it, if * you need it in a sorted way. * * To achieve that you can pass option_t::KDB_O_SORT to kdbGet() * and kdbSet(). Then you will receive a already sorted keyset * over which you can iterate. * @code KeySet *ks = ksNew(0); kdbGet(h, ks, k, KDB_O_SORT); // no changes to keyset allowed ksRewind(ks); // now you can iterate over a sorted keyset * @endcode * * Its of course also possible to use ksLookup() once, because it * will sort the keyset too. * * @section sortkey Sort when changing key * * @warning You should not use keySetName() or keyRemove() when a * key belongs to a keyset. When you are doing this, you always need to @p manually * sort @p all keysets where the key was before using ksLookup() (otherwise ksLookup() * won't find that keys), kdbGet() or kdbSet() methods. * * When you change a key's name or its remove status the order * which was previously correctly is then wrong. The keyset * does not recognize this, so the programmer has to take care * that ksSort() is called before any operation which needs * a sorted keyset (which are all ksLookup(), all kdbGet() * and all kdbSet() functions). * * @note You can remember that easily that all functions which get options * require one of the following: * - that you did not manipulate a keys name or a remove status * - that you pass KDB_O_SORT when you know that you manipulated at least one key * - that you ksSort() yourself after manipulating keys * * @section dirty Dirty KeySet * * When you use ksAppend(), ksAppendKey(), ksPop() the keyset is dirty * afterwards, which means that it needs to be sorted. This is done * automatically using a ksLookup() method and in ksGet() or ksSet() * (All methods which accept options). * * It won't be done if you just iterate over the keyset, so you might * use a ksLookup() or ksSort() first. ksLookup() will be more efficient * in that case, because it will only sort when needed. Don't pass * KDB_O_NOALL (it will deactivate the sorting feature), * see ksLookup() for more information. * * @param ks KeySet to be sorted * @see kdbGet(), kdbSet(), ksLookup() for some functions which may * need sorting before they are called. (All functions which take * options as arguments) * @see keySetName(), keySetBaseName(), keyAddBaseName() and keyRemove() * for all methods which change the sorting state where the keyset * can't track the change. * @see ksAppend(), ksAppendKey(), ksPop() for all methods which make * a keyset dirty. */ void ksSort(KeySet *ks) { if (!ks) return; ks->flags = ~KS_FLAG_DIRTY & ks->flags; if (! ks->size) return; qsort(ks->array,ks->size,sizeof(Key *),keyCompareWithRemove); } /** * Return the number of keys that @p ks contains. * * @param ks the keyset object to work with * @return the number of keys that @p ks contains. * @return -1 on NULL pointer * @see ksNew(0), ksDel() */ ssize_t ksGetSize(const KeySet *ks) { if (!ks) return -1; return ks->size; } /******************************************* * Filling up KeySets * *******************************************/ /** * Appends a Key to the end of @p ks. * * A pointer to the key will * be stored, and not a private copy. So a future ksDel() on * @p ks may keyDel() the @p toAppend object, see keyGetRef(). * * The reference counter of the key will be incremented, and * thus toAppend is not const. * * The KeySet internal cursor is not moved. * * Makes the keyset dirty, see ksSort(). * * @return the size of the KeySet after insertion * @return -1 on NULL pointers * @param ks KeySet that will receive the key * @param toAppend Key that will be appended to ks * @see ksInsert(), ksInsertKeys(), ksAppend(), keyNew(), ksDel() * @see keyIncRef() * */ ssize_t ksAppendKey(KeySet *ks, Key *toAppend) { if (!ks) return -1; if (!toAppend) return -1; ks->flags |= KS_FLAG_DIRTY; ++ ks->size; if (keyNeedRemove (toAppend)) ++ ks->rsize; if (ks->size >= ks->alloc) ksResize (ks, ks->alloc * 2); keyIncRef (toAppend); ks->array[ks->size-1] = toAppend; ks->array[ks->size] = 0; return ks->size; } /** * Append all @p toAppend contained keys to the end of the @p ks. * * @p toAppend KeySet will be left unchanged. * * Makes the keyset dirty, see ksSort(). * * @return the size of the KeySet after transfer * @return -1 on NULL pointers * @param ks the KeySet that will receive the keys * @param toAppend the KeySet that provides the keys that will be transfered * @see ksAppendKey(), ksInsert(), ksInsertKeys() * */ ssize_t ksAppend(KeySet *ks, const KeySet *toAppend) { size_t oldSize = 0; int i = 0; int toAlloc = 0; if (!ks) return -1; if (!toAppend) return -1; oldSize = ks->size; toAlloc = ks->alloc; if (toAppend->size <= 0) return ks->size; ks->flags |= KS_FLAG_DIRTY; ks->size += toAppend->size; ks->rsize += toAppend->rsize; while (ks->size >= toAlloc) toAlloc *= 2; ksResize (ks, toAlloc); for (i=0; isize; i++) keyIncRef(toAppend->array[i]); memcpy (ks->array + oldSize, toAppend->array, toAppend->size * sizeof (Key *)); ks->array[ks->size] = 0; return ks->size; } /** * Remove and return the last key of @p ks. * * The reference counter will be decremented by one. * * The KeySets cursor will not be effected if it did not * point to the popped key. * * @note You need to keyDel() the key afterwards, if * you don't append it to another keyset. It has the * same semantics like a key allocated with keyNew() * or keyDup(). * *@code ks1=ksNew(0); ks2=ksNew(0); k1=keyNew(0); // ref counter 0 ksAppendKey(ks1, k1); // ref counter 1 ksAppendKey(ks2, k1); // ref counter 2 k1=ksPop (ks1); // ref counter 1 k1=ksPop (ks2); // ref counter 0, like after keyNew() ksAppendKey(ks1, k1); // ref counter 1 ksDel (ks1); // key is deleted too ksDel (ks2); *@endcode * * @return the last key of @p ks * @return NULL if @p ks is empty or on NULL pointer * @param ks KeySet to work with * @see ksAppendKey(), ksAppend() * @see commandList() for an example * */ Key *ksPop(KeySet *ks) { Key *ret=0; if (!ks) return 0; if (ks->size <= 0) return 0; -- ks->size; if (ks->size+1 < ks->alloc/2) ksResize (ks, ks->alloc / 2); ret = ks->array[ks->size]; ks->array[ks->size] = 0; keyDecRef(ret); return ret; } /******************************************* * KeySet browsing methods * *******************************************/ /** * Rewinds the KeySet internal cursor. * * Use it to set the cursor to the beginning of the KeySet. * ksCurrent() will then always return NULL afterwards. So * you want to ksNext() first. * * @code ksRewind (ks); while ((key = keyNext (ks))!=0) {} * @endcode * * @param ks the keyset object to work with * @return 0 on success * @return -1 on NULL pointer * @see ksNext(), ksCurrent() */ int ksRewind(KeySet *ks) { if (!ks) return -1; ks->cursor=0; ks->current=0; return 0; } /** * Returns the next Key in a KeySet. * * KeySets have an internal cursor that can be reset with ksRewind(). Every * time ksNext() is called the cursor is incremented and the new current Key * is returned. * * You'll get a NULL pointer if the key after the end of the KeySet was reached. * It will set the cursor to the beginning of * the KeySet and the next time the first key is returned. * * The @p ks internal cursor will be changed, so it is not const. * * @note You must not delete or change the key, use ksPop() if you want to delete it. * * @param ks the keyset object to work with * @return the new current Key * @return 0 when the end is reached * @return 0 on NULL pointer * @see ksRewind(), ksCurrent() */ Key *ksNext(KeySet *ks) { if (!ks) return 0; if (ks->size == 0) return 0; if (ks->current >= ks->size) { return 0; } if (ks->cursor) ks->current++; return ks->cursor = ks->array[ks->current]; } /** * Return the current Key. * * The pointer is NULL if you reached the end or after * ksRewind(). * * @note You must not delete the key or change the key, * use ksPop() if you want to delete it. * * @param ks the keyset object to work with * @return pointer to the Key pointed by @p ks's cursor * @return 0 on NULL pointer * @see ksNext(), ksRewind() * @see kdbMonitorKeys() for a usage example */ Key *ksCurrent(const KeySet *ks) { if (!ks) return 0; return ks->cursor; } /** * Return the first key in the KeySet. * * The KeySets cursor will not be effected. * * If ksCurrent()==ksHead() you know you are * on the first key. * * @param ks the keyset object to work with * @return the first Key of a keyset * @return 0 on NULL pointer or empty keyset * @see ksTail() for the last key * @see ksRewind(), ksCurrent() and ksNext() for iterating over the keyset */ Key *ksHead(const KeySet *ks) { if (!ks) return 0; if (ks->size > 0) return ks->array[0]; else return 0; } /** * Return the last key in the KeySet. * * The KeySets cursor will not be effected. * * If ksCurrent()==ksTail() you know you * are on the last key. ksNext() will return * a NULL pointer afterwards. * * @param ks the keyset object to work with * @return the last Key of a keyset * @return 0 on NULL pointer or empty keyset * @see ksHead() for the first key * @see ksRewind(), ksCurrent() and ksNext() for iterating over the keyset */ Key *ksTail(const KeySet *ks) { if (!ks) return 0; if (ks->size > 0) return ks->array[ks->size-1]; else return 0; } /** * Get the KeySet internal cursor. * * Use it to get the cursor of the actual position. * * @warning Cursors are getting invalid when the key * was ksPop()ed or ksLookup() with KDB_O_POP was * used. * * @section readahead Read ahead * * With the cursors it is possible to read ahead * in a keyset: * * @code cursor_t jump; ksRewind (ks); while ((key = keyNext (ks))!=0) { // now mark this key jump = ksGetCursor(ks); //code.. keyNext (ks); // now browse on // use ksCurrent(ks) to check the keys //code.. // jump back to the position marked before ksSetCursor(ks, jump); } * @endcode * * @section restore Restoring state * * It can also be used to restore the state of a * keyset in a function * * @code int f (KeySet *ks) { cursor_t state = ksGetCursor(ks); // work with keyset // now bring the keyset to the state before ksSetCursor (ks, state); } * @endcode * * It is of course possible to make the KeySet const * and cast its const away to set the cursor. * Another way to achieve * the same is to ksDup() the keyset, but it is * not as efficient. * * An invalid cursor will be returned directly after * ksRewind(). When you set an invalid cursor ksCurrent() * is 0 and ksNext() == ksHead(). * * @note Only use a cursor for the same keyset which it was * made for. * * @param ks the keyset object to work with * @return a valid cursor on success * @return an invalid cursor on NULL pointer or after ksRewind() * @see ksNext(), ksSetCursor() */ cursor_t ksGetCursor(const KeySet *ks) { if (!ks) return (cursor_t) -1; if (ks->cursor == 0) return (cursor_t) -1; else return (cursor_t) ks->current; } /** * Set the KeySet internal cursor. * * Use it to set the cursor to a stored position. * ksCurrent() will then be the position which you got with. * * @warning Cursors may get invalid when the key * was ksPop()ed or ksLookup() was used together * with KDB_O_POP. * * @code cursor_t cursor; .. // key now in any position here cursor = ksGetCursor (ks); while ((key = keyNext (ks))!=0) {} ksSetCursor (ks, cursor); // reset state ksCurrent(ks); // in same position as before * @endcode * * An invalid cursor will set the keyset to its beginning like * ksRewind(). When you set an invalid cursor ksCurrent() * is 0 and ksNext() == ksHead(). * * @param cursor the cursor to use * @param ks the keyset object to work with * @return 0 when the keyset is ksRewind()ed * @return 1 otherwise * @return -1 on NULL pointer * @see ksNext(), ksGetCursor() */ int ksSetCursor(KeySet *ks, cursor_t cursor) { if (!ks) return -1; if ((cursor_t) -1 == cursor) { ksRewind (ks); return 0; } ks->current= (size_t)cursor; ks->cursor=ks->array[ks->current]; return 1; } /* * Returns the previous Key in a KeySet. * * KeySets have an internal cursor that can be reset with ksRewind(). Every * time ksPrev() is called the cursor is decremented and the new current Key * is returned. * * You'll get a NULL pointer if the key before begin of the KeySet was reached. * * Don't delete the key, use ksPop() if you want to delete it. * * @return the new current Key * @see ksRewind(), ksCurrent() * */ static Key *ksPrev(KeySet *ks) { if (ks->size == 0) return 0; if (ks->current <= 0) { ksRewind (ks); return 0; } ks->current--; return ks->cursor = ks->array[ks->current]; } /******************************************* * Looking up Keys inside KeySets * *******************************************/ static int keyCompareByName(const void *p1, const void *p2) { Key *key1=*(Key **)p1; Key *key2=*(Key **)p2; const char *name1 = keyName(key1); const char *name2 = keyName(key2); return strcmp(name1, name2); } static int keyCompareByNameCase(const void *p1, const void *p2) { Key *key1=*(Key **)p1; Key *key2=*(Key **)p2; const char *name1 = keyName(key1); const char *name2 = keyName(key2); return kdbiStrCaseCmp(name1, name2); } static int keyCompareByNameOwner(const void *p1, const void *p2) { Key *key1=*(Key **)p1; Key *key2=*(Key **)p2; const char *name1 = keyName(key1); const char *name2 = keyName(key2); int result = strcmp(name1, name2); if (result == 0) { const char *owner1 = keyOwner(key1); const char *owner2 = keyOwner(key2); return strcmp(owner1, owner2); } else return result; } static int keyCompareByNameOwnerCase(const void *p1, const void *p2) { Key *key1=*(Key **)p1; Key *key2=*(Key **)p2; const char *name1 = keyName(key1); const char *name2 = keyName(key2); int result = kdbiStrCaseCmp(name1, name2); if (result == 0) { const char *owner1 = keyOwner(key1); const char *owner2 = keyOwner(key2); return kdbiStrCaseCmp(owner1, owner2); } else return result; } /** * Look for a Key contained in @p ks that matches the name of the @p key. * * @section Introduction * * @p ksLookup() is designed to let you work with * entirely pre-loaded KeySets, so instead of kdbGetKey(), key by key, the * idea is to fully kdbGet() for your application root key and * process it all at once with @p ksLookup(). * * This function is very efficient by using binary search. Together with * kdbGet() which can you load the whole configuration with only * some communication to backends you can write very effective but short * code for configuration. * * @section Usage * * If found, @p ks internal cursor will be positioned in the matched key * (also accessible by ksCurrent()), and a pointer to the Key is returned. * If not found, @p ks internal cursor will not move, and a NULL pointer is * returned. * * Cascading is done if the first character is a /. This leads to ignoring * the prefix like system/ and user/. * @code if (kdbGet(handle, "user/myapp", myConfig, 0 ) == -1) ErrorHandler ("Could not get Keys"); if (kdbGet(handle, "system/myapp", myConfig, 0 ) == -1) ErrorHandler ("Could not get Keys"); if ((myKey = ksLookup(myConfig, key, 0)) == NULL) ErrorHandler ("Could not Lookup Key"); * @endcode * * This is the way multi user Programs should get there configuration and * search after the values. It is guaranteed that more namespaces can be * added easily and that all values can be set by admin and user. * * @subsection KDB_O_NOALL * * When KDB_O_NOALL is set the keyset will be only searched from ksCurrent() * to ksTail(). You need to ksRewind() the keyset yourself. ksCurrent() is * always set properly after searching a key, so you can go on searching * another key after the found key. * * When KDB_O_NOALL is not set the cursor will stay untouched and all keys * are considered. A much more efficient binary search will be used then. * * So if you change keys, e.g. rename (keySetName()) or remove (keyRemove()) them * make sure to sort the keyset with ksSort(). When the keyset is dirty, * see ksNeedSort() it will be sorted automatically when needed. * * @subsection KDB_O_POP * * When KDB_O_POP is set the key which was found will be ksPop()ed. ksCurrent() * will not be changed, only iff ksCurrent() is the searched key, then the keyset * will be ksRewind()ed. * * @note Note that keyRemove() keys won't be found after the first time the keyset * is resorted. Lookup automatically sorts the keyset, if needed, but it * can't find it out when only keys are changed, not the keyset. * * @note Like in ksPop() the popped key always needs to be keyDel() afterwards, even * if it is appended to another keyset. * * @warning All cursors on the keyset will be invalid * iff you use KDB_O_POP, so don't use this if you rely on a cursor, see ksGetCursor(). * * @note Never use ksLookup() with KDB_O_POP and ksAppendKey() or ksAppend() together in a loop. * Otherwise ksLookup() will need to resort the keyset every iteration and spend 99.96% of the * time in ksSort() (benchmarked with above 500k iterations). * * You can solve this problem by using KDB_O_NOALL, risking you have to iterate n^2 instead of n. * * The more elegant way is to separate the keyset you use for ksLookup() and ksAppendKey(): * @code int f(KeySet *iterator, KeySet *lookup) { KeySet *append = ksNew (ksGetSize(lookup), KS_END); Key *key; Key *current; ksRewind(iterator); while (current=ksNext(iterator)) { key = ksLookup (lookup, current, KDB_O_POP); // do something... ksAppendKey(append, key); // now append it to append, not lookup! keyDel (key); // make sure to ALWAYS delete poped keys. } ksAppend(lookup, append); // now lookup needs to be sorted only once, append never ksDel (append); } * @endcode * * @param ks where to look for * @param key the key object you are looking for * @param options some @p KDB_O_* option bits: * - @p KDB_O_NOCASE @n * Lookup ignoring case. * - @p KDB_O_WITHOWNER @n * Also consider correct owner. * - @p KDB_O_NOALL @n * Only search from ksCurrent() to end of keyset, see above text. * - @p KDB_O_POP @n * Pop the key which was found. * - @p KDB_O_SORT @n * Force sorting before searching, see ksSort(). * Together with KDB_O_NOALL the search will start from beginning. * @return pointer to the Key found, 0 otherwise * @return 0 on NULL pointers * @see ksLookupByName() to search by a name given by a string * @see ksCurrent(), ksRewind(), ksNext() for iterating over a keyset * @see ksSort() to understand how keyset sort themself */ Key *ksLookup(KeySet *ks, Key * key, option_t options) { Key *current; Key ** found; cursor_t cursor = 0; size_t jump = 0; if (!ks) return 0; jump = ks->rsize; cursor = ksGetCursor (ks); if (options & KDB_O_SORT) { ksSort (ks); ksRewind (ks); } else if (!(options & KDB_O_NOALL) && ks->flags & KS_FLAG_DIRTY) ksSort(ks); if (!key) return 0; if (options & KDB_O_NOALL) { while ((current=ksNext(ks)) != 0) { if ((options & KDB_O_WITHOWNER) && (options & KDB_O_NOCASE)) { if (!keyCompareByNameOwnerCase(&key, ¤t)) break; } else if (options & KDB_O_WITHOWNER) { if (!keyCompareByNameOwner(&key, ¤t)) break; } else if (options & KDB_O_NOCASE) { if (!keyCompareByNameCase(&key, ¤t)) break; } else if (!keyCompareByName(&key, ¤t)) break; } if (options & KDB_O_DEL) keyDel (key); if (current == 0) ksSetCursor (ks, cursor); return current; } else { if ((options & KDB_O_WITHOWNER) && (options & KDB_O_NOCASE)) found = (Key **) bsearch (&key, ks->array+jump, ks->size-jump, sizeof (Key *), keyCompareByNameOwnerCase); else if (options & KDB_O_WITHOWNER) found = (Key **) bsearch (&key, ks->array+jump, ks->size-jump, sizeof (Key *), keyCompareByNameOwner); else if (options & KDB_O_NOCASE) found = (Key **) bsearch (&key, ks->array+jump, ks->size-jump, sizeof (Key *), keyCompareByNameCase); else found = (Key **) bsearch (&key, ks->array+jump, ks->size-jump, sizeof (Key *), keyCompareByName); if (options & KDB_O_DEL) keyDel (key); if (found) { if (options & KDB_O_POP) { Key * k = *found; /* Move the array over the place where key was found */ memmove (found, found+1, ks->size*sizeof(Key *)-(found-ks->array)-sizeof(Key *)); *(ks->array+ks->size-1) = k; if (found < ks->array+ks->current) { ksPrev(ks); } else if (found == ks->array+ks->current) { ksRewind(ks); } return ksPop(ks); } else { cursor = found-ks->array; ksSetCursor(ks, cursor); return (*found); } } else { /*Reset Cursor to old position*/ ksSetCursor(ks, cursor); return 0; } } } /** * Look for a Key contained in @p ks that matches @p name. * * @p ksLookupByName() is designed to let you work with * entirely pre-loaded KeySets, so instead of kdbGetKey(), key by key, the * idea is to fully kdbGetByName() for your application root key and * process it all at once with @p ksLookupByName(). * * This function is very efficient by using binary search. Together with * kdbGetByName() which can you load the whole configuration with only * some communication to backends you can write very effective but short * code for configuration. * * If found, @p ks internal cursor will be positioned in the matched key * (also accessible by ksCurrent()), and a pointer to the Key is returned. * If not found, @p ks internal cursor will not move, and a NULL pointer is * returned. * * @section cascading Cascading * * Cascading is done if the first character is a /. This leads to ignoring * the prefix like system/ and user/. * @code if (kdbGetByName(handle, "/sw/myapp/current", myConfig, 0 ) == -1) ErrorHandler ("Could not get Keys"); if ((myKey = ksLookupByName (myConfig, "/myapp/current/key", 0)) == NULL) ErrorHandler ("Could not Lookup Key"); * @endcode * * This is the way multi user Programs should get there configuration and * search after the values. It is guaranteed that more namespaces can be * added easily and that all values can be set by admin and user. * * @section fullsearch Full Search * * When KDB_O_NOALL is set the keyset will be only searched from ksCurrent() * to ksTail(). You need to ksRewind() the keyset yourself. ksCurrent() is * always set properly after searching a key, so you can go on searching * another key after the found key. * * When KDB_O_NOALL is not set the cursor will stay untouched and all keys * are considered. A much more efficient binary search will be used then. * * @param ks where to look for * @param name key name you are looking for * @param options some @p KDB_O_* option bits: * - @p KDB_O_NOCASE @n * Lookup ignoring case. * - @p KDB_O_WITHOWNER @n * Also consider correct owner. * - @p KDB_O_NOALL @n * Only search from ksCurrent() to end of keyset, see above text. * - @p KDB_O_POP @n * Pop the key which was found. * - @p KDB_O_SORT @n * Force sorting before searching, see ksSort(). * Together with KDB_O_NOALL the search will start from beginning. * * Currently no options supported. * @return pointer to the Key found, 0 otherwise * @return 0 on NULL pointers * @see keyCompare() for very powerfull Key lookups in KeySets * @see ksCurrent(), ksRewind(), ksNext() */ Key *ksLookupByName(KeySet *ks, const char *name, option_t options) { Key * key=0; Key * found=0; char * newname=0; if (!ks) return 0; if (!name) return 0; if (! ks->size) return 0; if (name[0] == '/') { /* Will be freed by second key */ newname = kdbiMalloc (strlen (name) + sizeof ("system") + 1); if (!newname) { /*errno = KDB_ERR_NOMEM;*/ return 0; } strncpy (newname+2, "user",4); strcpy (newname+6, name); key = keyNew (newname+2, KEY_END); found = ksLookup(ks, key, options); keyDel (key); if (!found) { strncpy (newname, "system",6); key = keyNew (newname, KEY_END); found = ksLookup(ks, key, options); keyDel (key); } kdbiFree (newname); return found; } else { key = keyNew (name, KEY_END); if (!key) return 0; found = ksLookup(ks, key, options); keyDel (key); return found; } } /* * Lookup for a Key contained in @p ks KeySet that matches @p value, * starting from ks' ksNext() position. * * If found, @p ks internal cursor will be positioned in the matched key * (also accessible by ksCurrent()), and a pointer to the Key is returned. * If not found, @p ks internal cursor won't move, and a NULL pointer is * returned. * * This method skips binary keys. * * @par Example: * @code ksRewind(ks); while (key=ksLookupByString(ks,"my value",0)) { // show all keys which value="my value" keyToStream(key,stdout,0); } * @endcode * * @param ks where to look for * @param value the value which owner key you want to find * @param options some @p KDB_O_* option bits. Currently supported: * - @p KDB_O_NOALL @n * Only search from ksCurrent() to end of keyset, see ksLookup(). * - @p KDB_O_SORT @n * Force sorting before searching, see ksSort(). * Together with KDB_O_NOALL the search will start from beginning. * - @p KDB_O_NOCASE @n * Lookup ignoring case. * @return the Key found, 0 otherwise * @see ksLookupByBinary() * @see keyCompare() for very powerfull Key lookups in KeySets * @see ksCurrent(), ksRewind(), ksNext() */ Key *ksLookupByString(KeySet *ks, const char *value, option_t options) { cursor_t init=0; Key *current=0; if (!ks) return 0; if (options & KDB_O_SORT) { ksSort (ks); ksRewind (ks); } else if (!(options & KDB_O_NOALL) && ks->flags & KS_FLAG_DIRTY) ksSort(ks); if (!(options & KDB_O_NOALL)) { ksRewind (ks); init=ksGetCursor(ks); } if (!value) return 0; while ((current=ksNext(ks)) != 0) { if (!keyIsString(current)) continue; /*fprintf (stderr, "Compare %s with %s\n", keyValue(current), value);*/ if ((options & KDB_O_NOCASE) && !kdbiStrCaseCmp(keyValue(current),value)) break; else if (!strcmp(keyValue(current),value)) break; } /* reached end of KeySet */ if (!(options & KDB_O_NOALL)) { ksSetCursor (ks, init); } return current; } /* * Lookup for a Key contained in @p ks KeySet that matches the binary @p value, * starting from ks' ksNext() position. * * If found, @p ks internal cursor will be positioned in the matched key. * That means it is also accessible by ksCurrent(). A pointer to the Key * is returned. If not found, @p ks internal cursor won't move, and a * NULL pointer is returned. * * This method skips string keys. * * @param ks where to look for * @param value the value which owner key you want to find * @param size the size of @p value * @param options some @p KDB_O_* option bits: * - @p KDB_O_NOALL @n * Only search from ksCurrent() to end of keyset, see above text. * - @p KDB_O_SORT @n * Force sorting before searching, see ksSort(). * Together with KDB_O_NOALL the search will start from beginning. * @return the Key found, NULL otherwise * @return 0 on NULL pointer * @see ksLookupByString() * @see keyCompare() for very powerfull Key lookups in KeySets * @see ksCurrent(), ksRewind(), ksNext() */ Key *ksLookupByBinary(KeySet *ks, const void *value, size_t size, option_t options) { cursor_t init=0; Key *current=0; if (!ks) return 0; if (options & KDB_O_SORT) { ksSort (ks); ksRewind (ks); } else if (!(options & KDB_O_NOALL) && ks->flags & KS_FLAG_DIRTY) ksSort(ks); if (!(options & KDB_O_NOALL)) { ksRewind (ks); init=ksGetCursor(ks); } while ((current=ksNext(ks))) { if (!keyIsBinary(current)) continue; if (size != current->dataSize) continue; if (!value) { if (!current->data) break; else continue; } if (current->data && !memcmp(current->data,value,size)) break; } /* reached end of KeySet */ if (!(options & KDB_O_NOALL)) { ksSetCursor (ks, init); } return 0; } /******************************************* * Other operations * *******************************************/ /* * Calculates the common parent to all keys in @p ks. * * This is a c-helper function, you need not implement it in bindings. * * Given the @p ks KeySet, calculates the parent name for all the keys. * So if @p ks contains this keys: * * @code * system/sw/xorg/Monitors/Monitor1/vrefresh * system/sw/xorg/Monitors/Monitor1/hrefresh * system/sw/xorg/Devices/Device1/driver * system/sw/xorg/Devices/Device1/mode * @endcode * * The common parent is @p system/sw/xorg . * * On the other hand, if we have this KeySet: * * @code * system/some/thing * system/other/thing * user/unique/thing * @endcode * * No common parent is possible, so @p returnedCommonParent will contain nothing. * * This method will work correctly only on @link ksSort() sorted KeySets @endlink. * * @param working the Keyset to work with * @param returnedCommonParent a pre-allocated buffer that will receive the * common parent, if found * @param maxSize size of the pre-allocated @p returnedCommonParent buffer * @return size in bytes of the parent name, or 0 if there is no common parent, * or -1 to indicate an error, then @p errno must be checked. */ ssize_t ksGetCommonParentName(const KeySet *working,char *returnedCommonParent, size_t maxSize) { size_t parentSize=0; Key *current=0; cursor_t init; KeySet *ks; init = ksGetCursor (working); ks = (KeySet *) working; if (ks->size < 1) return 0; ksRewind(ks); current = ksNext(ks); if (keyGetNameSize(current) > maxSize) { /*errno=KDB_ERR_TRUNC;*/ returnedCommonParent[0]=0; return -1; } strcpy(returnedCommonParent,keyName(current)); parentSize=kdbiStrLen(returnedCommonParent); while (*returnedCommonParent) { ksRewind(ks); while ((current = ksNext(ks)) != 0) { /* Test if a key doesn't match */ if (memcmp(returnedCommonParent,keyName(current),parentSize-1)) break; } if (current) { /* some key failed to be a child */ /* parent will be the parent of current parent... */ char *delim=0; if ((delim=strrchr(returnedCommonParent,PATH_SEPARATOR))) { *delim=0; parentSize=kdbiStrLen(returnedCommonParent); } else { *returnedCommonParent=0; parentSize=0; break; /* Better don't make comparision with parentSize-1 now */ } } else { /* All keys matched (current==0) */ /* We have our common parent to return in commonParent */ ksSetCursor (ks, init ); return parentSize; } } ksSetCursor (ks, init ); return parentSize; /* if reached, will be zero */ } /********************************************************************* * Data constructors (protected) * *********************************************************************/ /* * Resize keyset. * * For internal useage only. * * Don't use that function to be portable. You can give an hint * how large the keyset should be in ksNew(). * * Subsequent is the description of the implementation with array. * ksResize() enlarge or shrink the internal array to wished * size alloc. * * If you resize it to n, you can be sure to fill in n-1 elements, * the n-th element will do an automatic resize to n*2. So give * some spare to avoid wasteful duplication. * * @param ks the keyset which should be resized * @param alloc the size to which the array will be resized * @return 1 on success * @return 0 on nothing done because keyset would be too small. * @return -1 if alloc is smaller then current size of keyset. * @return -1 on memory error */ int ksResize (KeySet *ks, size_t alloc) { if (alloc == ks->alloc) return 1; if (alloc < ks->size) return 0; if (alloc < KEYSET_SIZE) { if (ks->alloc != KEYSET_SIZE) alloc = KEYSET_SIZE; else return 0; } if (ks->array == NULL) { /* Not allocated up to now */ ks->alloc = alloc; ks->size = 0; ks->array = kdbiMalloc (sizeof(struct _Key *) * ks->alloc); if (!ks->array) { /*errno = KDB_ERR_NOMEM;*/ return -1; } } #if DEBUG && VERBOSE printf ("Resize from %d to %d\n",(int) ks->alloc,(int) alloc); #endif ks->alloc=alloc; if (kdbiRealloc((void**) &ks->array, sizeof(struct _Key *) * ks->alloc) == -1) { #if DEBUG fprintf (stderr, "Reallocation error\n"); #endif kdbiFree (ks->array); ks->array = 0; /*errno = KDB_ERR_NOMEM;*/ return -1; } return 1; } /* * Returns current allocation size. * * @param ks the keyset object to work with * @return allocated size*/ size_t ksGetAlloc (const KeySet *ks) { return ks->alloc; } /* * KeySet object initializer. * * You should always use ksNew() instead of ksInit(). * * Every KeySet object that will be used must be initialized first, to setup * pointers, counters, etc. After use, all ksInit()ialized KeySets must be * cleaned with ksClear(). * * @deprecated Thus you can't get a Keyset without ksNew, this function is useless. * @see ksNew(), ksClose(), keyInit() * @return 1 on success */ int ksInit(KeySet *ks) { ks->array = 0; ks->flags = KS_FLAG_DIRTY; ks->size=0; ks->rsize=0; ks->alloc=0; ksRewind(ks); return 1; } /* * KeySet object initializer. * * @deprecated Thus you can't get a Keyset without ksNew, this function is useless. * @see ksDel(), ksNew(), keyInit() * @return 1 on success */ int ksClose(KeySet *ks) { Key * k; ksRewind(ks); while ((k = ksNext(ks)) != 0) { keyDecRef (k); keyDel (k); } if (ks->array) kdbiFree (ks->array); ks->array = 0; ks->alloc = 0; ks->size = 0; ks->rsize= 0; return 0; } /** * @} */ elektra-0.7.1/src/libelektra/keytest.c0000644000076400001440000003037611365506635014653 00000000000000 /*************************************************************************** keytest.c - Methods for Key manipulation ------------------- begin : Fri Sep 26 2008 copyright : (C) 2008 by Markus Raab email : elektra@markus-raab.org ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ /** * @defgroup keytest Key :: Methods for Making Tests * @brief Methods to do various tests on Keys * * To use them: * @code #include * @endcode * * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #if DEBUG && HAVE_STDIO_H #include #endif #ifdef HAVE_STDARG_H #include #endif #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #include "kdb.h" #include "kdbprivate.h" /** * Ask if key is marked for stat only. * * Ask if the key will be stat instead of get it from the key database * completely doing kdbGetKey() or kdbGet(). This is useful * if you are not interested in the value, comment or key type. * * @see keyStat(), kdbGet() * @param key the key object to work with * @return 1 if it is marked, 0 otherwise * @return -1 on NULL pointer * @ingroup keytest **/ int keyNeedStat(const Key *key) { if (!key) return -1; return (key->flags & KEY_FLAG_STAT) == KEY_FLAG_STAT; } /** * Test if a key needs to be synced to backend storage. * * If any key modification took place the key will be flagged with * KEY_FLAG_SYNC so that kdbSet() knows which keys were modified * and which not. * * After keyNew() the flag will normally be set, but after kdbGet() * and kdbSet() the flag will be removed. When you modify the key * the flag will be set again. * * In your application you can make use of that flag to know * if you changed something in a key after a kdbGet() or kdbSet(). * * @note Note that also changes in the meta data will set that flag. * * @see keyNew() * @param key the key object to work with * @return 1 if @p key was changed in memory, 0 otherwise * @return -1 on NULL pointer * @ingroup keytest */ int keyNeedSync(const Key *key) { if (!key) return -1; return (key->flags & KEY_FLAG_SYNC) == KEY_FLAG_SYNC; } /** * Ask if key is marked for permanent remove. * * Ask if the key will be removed instead of writing in the key database * when doing kdbSetKey() or kdbSet(). * * @see keyRemove() * @see kdbSet(), kdbSetKey(), kdbRemove() * @param key the key object to work with * @return 1 if it is marked, 0 otherwise * @return -1 on NULL pointer * @ingroup keytest*/ int keyNeedRemove(const Key *key) { if (!key) return -1; return (key->flags & KEY_FLAG_REMOVE) == KEY_FLAG_REMOVE; } /** * Check whether a key is under the @p system namespace or not * * @param key the key object to work with * @return 1 if key name begins with @p system, 0 otherwise * @return -1 on NULL pointer * @see keyIsUser(), keySetName(), keyName() * @ingroup keytest * */ int keyIsSystem(const Key *key) { if (!key) return -1; if (key->key) return keyNameIsSystem(key->key); else return 0; } /** * Check whether a key is under the @p user namespace or not. * * @param key the key object to work with * @return 1 if key name begins with @p user, 0 otherwise * @return -1 on NULL pointer * @see keyIsSystem(), keySetName(), keyName() * @ingroup keytest * */ int keyIsUser(const Key *key) { if (!key) return -1; if (key->key) return keyNameIsUser(key->key); else return 0; } /** * Check if the key check is below the key key or not. * * @code Example: key user/sw/app check user/sw/app/key returns true because check is below key Example: key user/sw/app check user/sw/app/folder/key returns also true because check is indirect below key * @endcode * * @param key the key object to work with * @param check the key to find the relative position of * @return 1 if check is below key * @return 0 if it is not below or if it is the same key * @see keySetName(), keyGetName(), keyIsDirectBelow() * @ingroup keytest * */ int keyIsBelow(const Key *key, const Key *check) { const char * keyname = 0; const char * checkname = 0; ssize_t keysize = 0; ssize_t checksize = 0; if (!key || !check) return -1; keyname = keyName(key); checkname = keyName(check); keysize = keyGetNameSize(key); checksize = keyGetNameSize(check); if (keysize > checksize + 1) return 0; if (strncmp (keyname, checkname, keysize - 1)) return 0; if (checkname[keysize - 1] != '/') return 0; return 1; } /** * Check if the key check is direct below the key key or not. * * @code Example: key user/sw/app check user/sw/app/key returns true because check is below key Example: key user/sw/app check user/sw/app/folder/key does not return true, because there is only a indirect relation * @endcode * * @param key the key object to work with * @param check the key to find the relative position of * @return 1 if check is below key * @return 0 if it is not below or if it is the same key * @return -1 on null pointer * @see keyIsBelow(), keySetName(), keyGetName() * @ingroup keytest * */ int keyIsDirectBelow(const Key *key, const Key *check) { const char * checkname = 0; ssize_t keysize = 0; if (!key || !check) return -1; checkname = keyName(check); keysize = keyGetNameSize(key); if (!keyIsBelow(key, check)) return 0; if (strchr(checkname + keysize, '/')) return 0; return 1; } /** * Check whether a key is inactive or not. * * In elektra terminology any key is inactive if the * it's basename starts with '.'. Inactive keys * must not have any meaning to applications, they * are reserved for users and administrators. * * To remove a whole hierarchy in elektra, don't * forget to pass option_t::KDB_O_INACTIVE to * kdbGet() to receive the inactive keys in order * to remove them. * * Otherwise you should not fetch these keys. * * @param key the key object to work with * @return 1 if the key is inactive, 0 otherwise * @return -1 on NULL pointer or when key has no name * @ingroup keytest * */ int keyIsInactive (const Key *key) { char *name = 0; if (!key) return -1; name = strrchr (keyName(key), '/'); if (!name) return -1; /* the slash can't be a trailing slash but there might be no name at all! */ if (name[1] == '.') return 1; else return 0; } /** * Check if a key is directory key. * * Folder keys may also have value and comment. * They are discern by having a executable bit * set. * * If any executable bit is set it will be recognized * as a directory. * * @note keyIsDir may return true even though you * can't access the directory. * * To know if you can access the directory, you * need to check, if your * - user ID is equal the key's * user ID and the mode & 100 is true * - group ID is equal the key's * group ID and the mode & 010 is true * - mode & 001 is true * * Accessing does not mean that you can get any value or * comments below, see @ref mode for more information. * * @param key the key object to work with * @return 1 if key is a directory, 0 otherwise * @return -1 on NULL pointer * @see keySetDir(), keySetMode() * @ingroup keytest */ int keyIsDir(const Key *key) { if (!key) return -1; return ((key->mode & KEY_DEF_DIR) != 0); } /** * Check if a key is binary type. * * The function checks if the keytype is in the range between KEY_TYPE_BINARY and * less than excluding KEY_TYPE_STRING. Then it will be interpreted as binary. * * Make sure to use this function and don't test the binary type another way to * ensure compatibility and to write less error prone programs. * * @return 1 if it is binary * @return 0 if it is not * @return -1 on NULL pointer * @see keySetType() for more information on types * @see keyGetBinary(), keySetBinary() * @param key the key to check * @ingroup keytest */ int keyIsBinary(const Key *key) { if (!key) return -1; return (KEY_TYPE_BINARY <= key->type && key->type < KEY_TYPE_STRING); } /** * Check if a key is string type. * * The function checks if the keytype is larger or equal KEY_TYPE_STRING. * Then it will be considered as string type. * * Make sure to use this function and don't test the string type another way to * ensure compatibility and to write less error prone programs. * * @return 1 if it is string * @return 0 if it is not * @return -1 on NULL pointer * @see keySetType for more information on types * @see keyGetString(), keySetString() * @param key the key to check * @ingroup keytest */ int keyIsString(const Key *key) { if (!key) return -1; return (key->type >= KEY_TYPE_STRING); } /* * Compare 2 keys. * * The returned flags bit array has 1s (differ) or 0s (equal) for each key * meta info compared, that can be logically ORed using @c #keyswitch_t flags. * The flags you can use are @link keyswitch_t::KEY_TYPE KEY_TYPE * @endlink, @link keyswitch_t::KEY_NAME KEY_NAME @endlink, * @link keyswitch_t::KEY_VALUE KEY_VALUE @endlink, * @link keyswitch_t::KEY_OWNER KEY_OWNER @endlink, * @link keyswitch_t::KEY_COMMENT KEY_COMMENT @endlink, * @link keyswitch_t::KEY_UID KEY_UID @endlink, * @link keyswitch_t::KEY_GID KEY_GID @endlink, * @link keyswitch_t::KEY_MODE KEY_MODE @endlink and * * @par A very simple example would be * @code Key *key1, *key; uint32_t changes; // omited key1 and key2 initialization and manipulation changes=keyCompare(key1,key2); if (changes == 0) printf("key1 and key2 are identicall\n"); if (changes & KEY_VALUE) printf("key1 and key2 have different values\n"); if (changes & KEY_UID) printf("key1 and key2 have different UID\n"); * * @endcode * * * @par Example of very powerfull specific Key lookup in a KeySet: * @code KDB *handle = kdbOpen(); KeySet *ks=ksNew(0); Key *base = keyNew ("user/sw/MyApp/something", KEY_END); Key *current; uint32_t match; uint32_t interests; kdbGetByName(handle, ks, "user/sw/MyApp", 0); // we are interested only in key type and access permissions interests=(KEY_TYPE | KEY_MODE); ksRewind(ks); // put cursor in the begining while ((curren=ksNext(ks))) { match=keyCompare(current,base); if ((~match & interests) == interests) printf("Key %s has same type and permissions of base key",keyName(current)); // continue walking in the KeySet.... } // now we want same name and/or value interests=(KEY_NAME | KEY_VALUE); // we don't really need ksRewind(), since previous loop achieved end of KeySet ksRewind(ks); while ((current=ksNext(ks))) { match=keyCompare(current,base); if ((~match & interests) == interests) { printf("Key %s has same name, value, and sync status of base key",keyName(current)); } // continue walking in the KeySet.... } keyDel(base); ksDel(ks); kdbClose (handle); * @endcode * * @return a bit array pointing the differences * @param key1 first key * @param key2 second key * @see #keyswitch_t * @ingroup keytest */ keyswitch_t keyCompare(const Key *key1, const Key *key2) { keyswitch_t ret=0; const char *name1 = keyName(key1); const char *name2 = keyName(key2); const char *comment1 = keyComment(key1); const char *comment2 = keyComment(key2); const char *owner1 = keyOwner(key1); const char *owner2 = keyOwner(key2); const void *value1 = keyValue(key1); const void *value2 = keyValue(key2); int remove1 = keyNeedRemove(key1); int remove2 = keyNeedRemove(key2); ssize_t size1 = keyGetValueSize(key1); ssize_t size2 = keyGetValueSize(key2); if (key1->uid != key2->uid) ret|=KEY_UID; if (key1->gid != key2->gid) ret|=KEY_GID; if (key1->type != key2->type) ret|=KEY_TYPE; if ((key1->mode) != (key2->mode)) ret|=KEY_MODE; if (remove1 != remove2) ret|=KEY_REMOVE; if (strcmp(name1, name2)) ret|=KEY_NAME; if (strcmp(comment1, comment2)) ret|=KEY_COMMENT; if (strcmp(owner1, owner2)) ret|=KEY_OWNER; if (size1 != size2) ret|=KEY_VALUE; if (memcmp(value1, value2, size1)) ret|=KEY_VALUE; return ret; } elektra-0.7.1/src/libelektra/keyvalue.c0000644000076400001440000004437111365506635015010 00000000000000 /*************************************************************************** keyvalue.c - Methods for Key manipulation ------------------- begin : Fri Sep 26 2008 copyright : (C) 2008 by Markus Raab email : elektra@markus-raab.org ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ /** * @defgroup keyvalue Key :: Value Manipulation Methods * @brief Methods to do various operations on Key values. * * A key can contain a value in different format. The most * likely situation is, that the value is interpreted as * text. Use keyGetString() for that. * You can save any Unicode Symbols and Elektra will * take care that you get the same back, independent of * your current environment. * * In some situations this idea fails. When you need exactly * the same value back without any interpretation of the * characters, there is keySetBinary(). If you use that, its * very likely that your Configuration is not according * to the standard. Also for Numbers, Booleans and Date you * should use keyGetString(). To do so, you might use strtod() * strtol() and then atol() or atof() to convert back. * * To use them: * @code #include * @endcode * * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #if DEBUG && HAVE_STDIO_H #include #endif #ifdef HAVE_STDARG_H #include #endif #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #include "kdb.h" #include "kdbprivate.h" /******************************************* * General value manipulation methods * *******************************************/ /** * Return a pointer to the real internal @p key value. * * This is a much more efficient version of keyGetString() * keyGetBinary(), and you should use it if you are responsible enough to * not mess up things. You are not allowed to modify anything * in the returned string. If you need a copy of the Value, consider * to use keyGetString() or keyGetBinary() instead. * * @section string String Handling * * If @p key is string (keyIsString()), you may cast the returned as a * @c "char *" because you'll get a NULL terminated regular string. * * keyValue() returns "" in string mode when there is no value. The reason is * @code key=keyNew(0); keySetString(key,""); keyValue(key); // you would expect "" here keyDel(key); * @endcode * * @section binary Binary Data Handling * * If the data is binary, the size of the value must be determined by * keyGetValueSize(), any strlen() operations are not suitable to determine * the size. * * keyValue() returns 0 in binary mode when there is no value. The reason is * @code int i=23; key=keyNew(0); keySetBinary(key, 0, 0); keyValue(key); // you would expect 0 here keySetBinary(key,"", 1); keyValue(key); // you would expect "" (a pointer to '\0') here keySetBinary(key, (void*)&i, 4); (int*)keyValue(key); // you would expect a pointer to (int)23 here keyDel(key); * @endcode * * @note Note that the Key structure keeps its own size field that is calculated * by library internal calls, so to avoid inconsistencies, you * must never use the pointer returned by keyValue() method to set a new * value. Use keySetString() or keySetBinary() instead. * * @warning Binary keys will return a NULL pointer when there is no data in contrast * to keyName(), keyBaseName(), keyOwner() and keyComment(). For string value the * behaviour is the same. * * @par Example: * @code KDB *handle = kdbOpen(); KeySet *ks=ksNew(0); Key *current=0; kdbGetByName(handle,ks,"system/sw/my",KDB_O_SORT|KDB_O_RECURSIVE); ksRewind(ks); while(current=ksNext(ks)) { size_t size=0; if (keyIsBin(current)) { size=keyGetValueSize(current); printf("Key %s has a value of size %d bytes. Value: \nComment: %s", keyName(current), size, keyComment(current)); } else { size=kdbiStrLen((char *)keyValue(current)); printf("Key %s has a value of size %d bytes. Value: %s\nComment: %s", keyName(current), size, (char *)keyValue(current), keyComment(current)); } } ksDel (ks); kdbClose (handle); * @endcode * * @param key the key object to work with * @return a pointer to internal value * @return "" when there is no data and key is not binary * @return 0 where there is no data and key is binary * @return 0 on NULL pointer * @see keyGetValueSize(), keyGetString(), keyGetBinary() * @ingroup keyvalue */ const void *keyValue(const Key *key) { if (!key) return 0; if (!key->data) { /*errno=KDB_ERR_NOKEY;*/ if (keyIsBinary(key)) return 0; else return ""; } return key->data; } /** * Returns the number of bytes needed to store the key value, including the * NULL terminator. * * It returns the correct size, independent of the Key Type. * If it is a binary there might be '\\0' values in it. * * For an empty string you need one byte to store the ending NULL. * For that reason 1 is returned. This is not true for binary data, * so there might be returned 0 too. * * A binary key has no '\\0' termination. String types have it, so to there * length will be added 1 to have enough space to store it. * * This method can be used with malloc() before keyGetString() or keyGetBinary() * is called. * * @code char *buffer; buffer = malloc (keyGetValueSize (key)); // use this buffer to store the value (binary or string) // pass keyGetValueSize (key) for maxSize * @endcode * * @param key the key object to work with * @return the number of bytes needed to store the key value * @return 1 when there is no data and type is not binary * @return 0 when there is no data and type is binary * @return -1 on null pointer * @see keyGetString(), keyGetBinary(), keyValue() * @ingroup keyvalue */ ssize_t keyGetValueSize(const Key *key) { if (!key) return -1; if (!key->data) { /*errno=KDB_ERR_NODATA;*/ if (keyIsBinary(key)) return 0; else return 1; } return key->dataSize; } /** * Get the value of a key as a string. * * When there is no value inside the string, 1 will * be returned and the returnedString will be empty * "" to avoid programming errors that old strings are * shown to the user. * * For binary values see keyGetBinary() and keyIsBinary(). * * @par Example: * @code Key *key = keyNew ("user/keyname", KEY_END); char buffer[300]; if (keyGetString(key,buffer,sizeof(buffer)) == -1) { // handle error } else { printf ("buffer: %s\n", buffer); } * @endcode * * @param key the object to gather the value from * @param returnedString pre-allocated memory to store a copy of the key value * @param maxSize number of bytes of allocated memory in @p returnedString * @return the number of bytes actually copied to @p returnedString, including * final NULL * @return 1 if the string is empty * @return -1 on NULL pointer * @return -1 on type mismatch * @return maxSize is 0, too small for string or is larger than SSIZE_MAX * @see keyValue(), keyGetValueSize(), keySetString() * @see keyGetBinary() for working with binary data * @ingroup keyvalue */ ssize_t keyGetString(const Key *key, char *returnedString, size_t maxSize) { if (!key) return -1; if (!maxSize) return -1; if (!returnedString) return -1; if (maxSize > SSIZE_MAX) return -1; if (!keyIsString(key)) { /*errno=KDB_ERR_TYPEMISMATCH;*/ return -1; } if (!key->data) { returnedString[0]=0; return 1; } if (key->dataSize > maxSize) { /*errno=KDB_ERR_TRUNC;*/ return -1; } strncpy(returnedString,key->data, maxSize); return key->dataSize; } /** * Set the value for @p key as @p newStringValue. * * The function will allocate and save a private copy of @p newStringValue, so * the parameter can be freed after the call. * * String values will be saved in backend storage, when kdbSetKey() will be * called, in UTF-8 universal encoding, regardless of the program's current * encoding, when compiled with --enable-iconv. * * The type will be set to KEY_TYPE_STRING. * When the type of the key is already a string type it won't be changed. * * @param key the key to set the string value * @param newStringValue NULL-terminated text string to be set as @p key's * value * @return the number of bytes actually saved in private struct including final * NULL * @return -1 on NULL pointer * @see keyGetString(), keyValue() * @ingroup keyvalue */ ssize_t keySetString(Key *key, const char *newStringValue) { ssize_t ret=0; if (!key) return -1; if (!newStringValue || newStringValue[0] == '\0') ret=keySetRaw(key,0,0); else ret=keySetRaw(key,newStringValue,kdbiStrLen(newStringValue)); if (!keyIsString(key)) keySetType(key, KEY_TYPE_STRING); return ret; } /** * Get the value of a key as a binary. * * If the type is not binary -1 will be returned. * * When the binary data is empty (this is not the same as ""!) * 0 will be returned and the returnedBinary will not be changed. * * For string values see keyGetString() and keyIsString(). * * When the returnedBinary is to small to hold the data * (its maximum size is given by maxSize), * the returnedBinary will not be changed and -1 is returned. * * @par Example: * @code Key *key = keyNew ("user/keyname", KEY_TYPE, KEY_TYPE_BINARY, KEY_END); char buffer[300]; if (keyGetBinary(key,buffer,sizeof(buffer)) == -1) { // handle error } * @endcode * * @param key the object to gather the value from * @param returnedBinary pre-allocated memory to store a copy of the key value * @param maxSize number of bytes of pre-allocated memory in @p returnedBinary * @return the number of bytes actually copied to @p returnedBinary * @return 0 if the binary is empty * @return -1 on NULL pointers * @return -1 when maxSize is 0, too small to hold the value or larger than SSIZE_MAX * @return -1 on typing error when the key is not binary * @see keyValue(), keyGetValueSize(), keySetBinary() * @see keyGetString() and keySetString() as preferred alternative to binary * @see keyIsBinary() to see how to check for binary type * @ingroup keyvalue */ ssize_t keyGetBinary(const Key *key, void *returnedBinary, size_t maxSize) { if (!key) return -1; if (!returnedBinary) return -1; if (!maxSize) return -1; if (maxSize > SSIZE_MAX) return -1; if (!keyIsBinary(key)) { /*errno=KDB_ERR_TYPEMISMATCH;*/ return -1; } if (!key->data) { return 0; } if (key->dataSize > maxSize) { /*errno=KDB_ERR_TRUNC;*/ return -1; } memcpy(returnedBinary,key->data,key->dataSize); return key->dataSize; } /** * Set the value of a key as a binary. * * A private copy of @p newBinary will allocated and saved inside @p key, * so the parameter can be deallocated after the call. * * The @c filesys backend, when used through a kdbSetKey(), will make the * value be kdbbEncoded into a human readable hex-digit text format. * * Consider using a string key instead. * * When newBinary is a NULL pointer the binary will be freed and 0 will * be returned. * * @note When the type of the key is already a binary type it won't be changed. * * @param key the object on which to set the value * @param newBinary is a pointer to any binary data or NULL to free the previous set data * @param dataSize number of bytes to copy from @p newBinary * @return the number of bytes actually copied to internal struct storage * @return 0 when the internal binary was freed * @return -1 on NULL pointer * @return -1 when dataSize is 0 (but newBinary not NULL) or larger than SSIZE_MAX * @see keyGetBinary() * @see keyIsBinary() to check if the type is binary * @see keyGetString() and keySetString() as preferred alternative to binary * @ingroup keyvalue */ ssize_t keySetBinary(Key *key, const void *newBinary, size_t dataSize) { ssize_t ret=0; if (!key) return -1; if (!dataSize && newBinary) return -1; if (dataSize > SSIZE_MAX) return -1; ret = keySetRaw(key,newBinary,dataSize); if (!keyIsBinary(key)) keySetType(key, KEY_TYPE_BINARY); return ret; } /* * Set raw data as the value of a key. * If NULL pointers are passed, key value is cleaned. * This method will not change or set the key type, and should not be * used unless working with user-defined value types. * * @param key the key object to work with * @param newBinary array of bytes to set as the value * @param dataSize number bytes to use from newBinary, including the final NULL * @return The number of bytes actually set in internall buffer. * @see keySetType(), keySetString(), keySetBinary() * @ingroup keyvalue */ ssize_t keySetRaw(Key *key, const void *newBinary, size_t dataSize) { if (!dataSize || !newBinary) { if (key->data) { free(key->data); key->data=0; } key->dataSize = 0; key->flags |= KEY_FLAG_SYNC; if (keyIsBinary(key)) return 0; return 1; } key->dataSize=dataSize; if (key->data) { char *p=0; p=realloc(key->data,key->dataSize); if (NULL==p) return -1; key->data=p; } else { key->data=malloc(key->dataSize); } if (!key->data) return -1; memcpy(key->data,newBinary,key->dataSize); key->flags |= KEY_FLAG_SYNC; return keyGetValueSize (key); } /********************************************* * General comment manipulation methods * *********************************************/ /** * Return a pointer to the real internal @p key comment. * * This is a much more efficient version of keyGetComment() and you * should use it if you are responsible enough to not mess up things. * You are not allowed to change anything in the memory region the * returned pointer points to. * * keyComment() returns "" when there is no keyComment. The reason is * @code key=keyNew(0); keySetComment(key,""); keyComment(key); // you would expect "" here keyDel(key); * @endcode * * See keySetComment() for more information on comments. * * @note Note that the Key structure keeps its own size field that is calculated * by library internal calls, so to avoid inconsistencies, you * must never use the pointer returned by keyComment() method to set a new * value. Use keySetComment() instead. * * @param key the key object to work with * @return a pointer to the internal managed comment * @return "" when there is no comment * @return 0 on NULL pointer * @see keyGetCommentSize() for size and keyGetComment() as alternative * @ingroup keyvalue */ const char *keyComment(const Key *key) { if (!key) return 0; if (!key->comment) { /*errno=KDB_ERR_NOKEY;*/ return ""; } return key->comment; } /** * Calculates number of bytes needed to store a key comment, including * final NULL. * * Use this method to know to size for allocated memory to retrieve * a key comment. * * See keySetComment() for more information on comments. * * For an empty key name you need one byte to store the ending NULL. * For that reason 1 is returned. * * @code char *buffer; buffer = malloc (keyGetCommentSize (key)); // use this buffer to store the comment // pass keyGetCommentSize (key) for maxSize * @endcode * * @param key the key object to work with * @return number of bytes needed * @return 1 if there is no comment * @return -1 on NULL pointer * @see keyGetComment(), keySetComment() * @ingroup keyvalue */ ssize_t keyGetCommentSize(const Key *key) { if (!key) return -1; if (!key->comment) { /*errno=KDB_ERR_NODESC;*/ return 1; } return key->commentSize; } /** * Get the key comment. * * @section comment Comments * * A Key comment is description for humans what this key is for. It may be a * textual explanation of valid values, when and why a user or administrator * changed the key or any other text that helps the user or administrator related * to that key. * * Don't depend on a comment in your program. A user is * always allowed to remove or change it in any way he wants to. But you are * allowed or even encouraged to always show the content of the comment * to the user and allow him to change it. * * @param key the key object to work with * @param returnedComment pre-allocated memory to copy the comments to * @param maxSize number of bytes that will fit returnedComment * @return the number of bytes actually copied to @p returnedString, including * final NULL * @return 1 if the string is empty * @return -1 on NULL pointer * @return -1 if maxSize is 0, not enough to store the comment or when larger then SSIZE_MAX * @see keyGetCommentSize(), keySetComment() * @ingroup keyvalue */ ssize_t keyGetComment(const Key *key, char *returnedComment, size_t maxSize) { if (!key) return -1; if (!maxSize) return -1; if (!returnedComment) return -1; if (maxSize > SSIZE_MAX) return -1; if (!key->comment) { /*errno=KDB_ERR_NODESC;*/ returnedComment[0]=0; return 1; } strncpy(returnedComment,key->comment,maxSize); if (maxSize < key->commentSize) { /*errno=KDB_ERR_TRUNC;*/ return -1; } return key->commentSize; } /** * Set a comment for a key. * * A key comment is like a configuration file comment. * See keySetComment() for more information. * * @param key the key object to work with * @param newComment the comment, that can be freed after this call. * @return the number of bytes actually saved including final NULL * @return 1 when the comment was freed * @return -1 on NULL pointer or memory problems * @see keyGetComment() * @ingroup keyvalue */ ssize_t keySetComment(Key *key, const char *newComment) { ssize_t size=0; if (!key) return -1; if (newComment && (size=kdbiStrLen(newComment)) > 1) { if (key->comment) { char *p=0; p=realloc(key->comment,size); if (NULL==p) { key->commentSize = 0; /*errno=KDB_ERR_NOMEM;*/ return -1; } key->comment=p; } else { key->comment=malloc(size); if (!key->comment) { key->commentSize = 0; /*errno=KDB_ERR_NOMEM;*/ return -1; } } strcpy(key->comment,newComment); key->flags |= KEY_FLAG_SYNC; key->commentSize=size; } else if (key->comment) { free(key->comment); key->comment=0; key->commentSize=1; key->flags |= KEY_FLAG_SYNC; } return key->commentSize; } elektra-0.7.1/src/libelektra/serialize.c0000644000076400001440000001226111365506635015143 00000000000000/*************************************************************************** serialze.c - Serializing Methods ------------------- begin : Sat Nov 23 2007 copyright : (C) 2007 by Markus Raab email : elektra@markus-raab.org ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif #if DEBUG && HAVE_STDIO_H #include #endif #ifdef HAVE_STDARG_H #include #endif #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #include "kdb.h" #include "kdbprivate.h" /** * Returns the size of a key. * * This is the space needed for metainfo, * data, comment, name and owner. * * @param key the key object to work with */ size_t keyGetSerializedSize(const Key *key) { return sizeof (Key) + key->dataSize + key->commentSize + key->keySize + key->ownerSize; } /** * Writes a block of memory with the entire key serialized, including * metainfo, value, comment and full name. * * @param key the key object to work with * @param serialized where to store the serialized data * @param maxSize size in buffer reserved for serialized data * @return -1 on failure * @return 0 on success * @see keyUnserialize() * @ingroup keymisc */ int keySerialize(const Key *key, void *serialized, size_t maxSize) { size_t recordSize=0; recordSize=keyGetSerializedSize(key); if (recordSize > maxSize) { /*errno = KDB_ERR_TRUNC;*/ return -1; } memset(serialized,0,recordSize); /* First part: the struct */ memcpy(serialized,key,sizeof(Key)); /* Second part: the comment */ if (key->comment) memcpy((char *)(serialized)+sizeof(Key), key->comment,key->commentSize); /* Third part: the value */ if (key->data) memcpy((char *)(serialized)+sizeof(Key)+key->commentSize, key->data,key->dataSize); /* Fourth part: the name */ if (key->key) memcpy((char *)(serialized)+sizeof(Key)+key->commentSize+key->dataSize, key->key,key->keySize); /* Fifth part: the owner */ if (key->owner) memcpy((char *)(serialized)+sizeof(Key)+key->commentSize+key->dataSize+key->keySize, key->owner,key->ownerSize); return recordSize; } /** * Given a membory block created by keySerialize(), unserialize it into * a Key structure and return it * * The @p serialized can be freed after this call, because memory will be * allocated for all elements of the new key; * * keyDel() the key. * * @param serialized points to memory block where serialized key resides * @see keySerialize() * @ingroup keymisc */ Key *keyUnserialize(const void *serialized) { Key *key=0; if (!serialized) return 0; key=malloc(sizeof(Key)); /* First part: the struct */ memcpy(key,serialized,sizeof(Key)); /* Second part: the comment */ if (key->commentSize) { key->comment=malloc(key->commentSize); memcpy(key->comment, (char *)(serialized)+sizeof(Key), key->commentSize); } /* Third part: the value */ if (key->dataSize) { key->data=malloc(key->dataSize); memcpy(key->data, (char *)(serialized)+sizeof(Key)+key->commentSize, key->dataSize); } /* Fourth part: the key name */ if (key->keySize) { key->key=malloc(key->keySize); memcpy(key->key, (char *)(serialized)+sizeof(Key)+key->commentSize+key->dataSize, key->keySize); } /* Fifth part: the owner */ if (key->ownerSize) { key->owner=malloc(key->ownerSize); memcpy(key->owner, (char *)(serialized)+sizeof(Key)+key->commentSize+key->dataSize+key->keySize, key->ownerSize); } return key; } /** * Compose a key out of a memoryblock created by keySerialize(). * * No additional memory will be allocated. Make sure not to free or munmap * @p serialized. * * keyDel() actually does not del the key, so it can be saftely be used in keySets. * To get rid of the key just delete @p serialized, but be sure that all references * are gone: remove it from any keyset and no pointer should be left pointing on * the key. * * @param serialized points to memory block where serialized key resides * @see keySerialize() * @ingroup keymisc */ Key *keyCompose(const void *serialized) { Key *key=0; if (!serialized) return 0; key=(Key *)serialized; /* First part: the metainfo */ if (key->commentSize) key->comment=(char *)(serialized)+sizeof(Key); /* Third part: the value */ if (key->dataSize) key->data= (char *)(serialized)+sizeof(Key)+key->commentSize; /* Fourth part: the name */ if (key->keySize) key->key=(char *)(serialized)+sizeof(Key)+key->commentSize+key->dataSize; /* Fifth part: the owner*/ if (key->ownerSize) key->owner=(char *)(serialized)+sizeof(Key)+key->commentSize+key->dataSize+key->keySize; key->ksReference = SSIZE_MAX; return key; } elektra-0.7.1/src/libelektra/split.c0000644000076400001440000000765211365506635014317 00000000000000/*************************************************************************** split.c - Functions for splitting keysets for kdbSet ------------------- begin : Fri 21 Mar 2008 copyright : (C) 2008 by Markus Raab email : elektra@markus-raab.org ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif #if DEBUG && HAVE_STDIO_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STDARG_H #include #endif #ifdef HAVE_CTYPE_H #include #endif #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_ERRNO_H #include #endif #include void free_splitted_keysets(Split *keysets) { int i; for (i=0;ino;i++) { ksDel(keysets->keysets[i]); } free (keysets->keysets); free (keysets->handles); free (keysets->parents); free (keysets->syncbits); free (keysets->belowparents); free (keysets); } void init_splitted_keysets(Split *ret) { ret->no=0; ret->keysets=malloc(sizeof(KeySet*)); ret->keysets[0]=NULL; ret->handles=malloc(sizeof(KDB *)); ret->handles[0]=NULL; ret->parents=malloc(sizeof(Key *)); ret->parents[0]=NULL; ret->syncbits=malloc(sizeof(int)); ret->syncbits[0] = 0; ret->belowparents=malloc(sizeof(int)); ret->belowparents[0] = 0; } void resize_splitted_keysets(Split *ret) { ret->no++; ret->keysets=realloc(ret->keysets,(ret->no+1)*sizeof(KeySet *)); ret->keysets[ret->no]=NULL; ret->handles=realloc(ret->handles,(ret->no+1)*sizeof(KDB *)); ret->handles[ret->no]=NULL; ret->parents=realloc(ret->parents,(ret->no+1)*sizeof(Key *)); ret->parents[ret->no]=NULL; ret->syncbits=realloc(ret->syncbits,(ret->no+1)*sizeof(int)); ret->syncbits[ret->no]=0; ret->belowparents=realloc(ret->belowparents,(ret->no+1)*sizeof(int)); ret->belowparents[ret->no]=0; } static int keyIsBelowOrSame (Key *key1, Key *key2) { const char *name1 = keyName(key1); const char *name2 = keyName(key2); if (keyIsBelow (key1, key2)) return 1; else if (!strcmp (name1, name2)) return 1; return 0; } /* Split keysets. * Make sure that parentKey has a name or is a null pointer*/ Split *split_keyset(KDB *handle, KeySet *ks, Key *parentKey, unsigned long options) { Split *ret; Key *curKey; KDB *curHandle; int curFound; int i; ret = malloc (sizeof (Split)); init_splitted_keysets (ret); ksRewind (ks); while ((curKey = ksNext (ks)) != 0) { curHandle = kdbGetBackend(handle, curKey); curFound = 0; if (options & KDB_O_SYNC) curKey->flags |= KEY_FLAG_SYNC; if (options & KDB_O_NOREMOVE) curKey->flags &= ~KEY_FLAG_REMOVE; else if (options & KDB_O_REMOVEONLY) keyRemove(curKey); for (i=0; ino; i++) { if (curHandle == ret->handles[i] && (!parentKey || keyIsBelowOrSame(ret->parents[i], curKey))) { curFound = 1; ksAppendKey(ret->keysets[i],curKey); if (keyNeedSync (curKey) == 1) ret->syncbits[i]=1; } } if (!curFound) { resize_splitted_keysets (ret); ret->keysets[ret->no-1] = ksNew (ksGetSize (ks) / APPROXIMATE_NR_OF_BACKENDS + 2, KS_END); ksAppendKey(ret->keysets[ret->no-1],curKey); ret->handles[ret->no-1] = curHandle; ret->parents[ret->no-1] = curKey; if (parentKey) { ret->belowparents[ret->no-1] = keyIsBelowOrSame (parentKey, curKey); } else ret->belowparents[ret->no-1] = 1; if (keyNeedSync (curKey) == 1) ret->syncbits[ret->no-1]=1; } } return ret; } elektra-0.7.1/src/libelektra/trie.c0000644000076400001440000002544111365506635014123 00000000000000/*************************************************************************** trie.c - low level functions for backend mounting. ------------------- begin : Sat Nov 3 copyright : (C) 2007 by Patrick Sabin email : patricksabin@gmx.at ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif #if DEBUG && HAVE_STDIO_H #include #endif #ifdef HAVE_LOCALE_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_STDIO_H #include #endif #include "kdbbackend.h" static char *getEntryName(const char *path); static void* prefix_lookup(Trie *trie, const char *name); static int isOfEntryMountpoint(Key *key, char *entry); static int isOfEntryBackend(Key *key, char *entry); static int isOfEntryConfig(Key *key, char *entry); static int isOfEntry(Key *key, char *entry); static char* starts_with(const char *str, char *substr); static void* prefix_lookup(Trie *trie, const char *name); /** * Lookup a backend handle for a specific key. * * The required canonical name is ensured by using a key as parameter, * which will transform the key to canonical representation. * * Will return handle when no more specific KDB could be * found. * * @param handle is the data structure, where the mounted directories are saved. * @param key the key, that should be looked up. * @return the backend handle associated with the key */ KDB* kdbGetBackend(KDB *handle, const Key *key) { char *s; KDB *ret; int len; if (kdbhGetTrie(handle)==NULL) { return handle; } len=strlen(keyName(key))+2; s=malloc(len); strncpy(s,keyName(key),len); s[len-2]='/'; s[len-1]=0; ret = prefix_lookup(kdbhGetTrie(handle),s); free (s); if (!ret) return handle; return ret; } /** Delete a complete trie, close backends and free memory. * * @param trie the data structure, that should be freed * @returns always 0 */ int kdbDelTrie(Trie *trie, CloseMapper close_backend) { int i; if (trie==NULL) return 0; for (i=0;itext[i]!=NULL) { kdbDelTrie(trie->childs[i],close_backend); if (trie->value[i]) close_backend(trie->value[i]); free(trie->text[i]); } } if (trie->empty_value) close_backend(trie->empty_value); free(trie); return 0; } /** Creates a trie from a keyset. * * @param handle data structure where the trie will be stored. * @param ks is a keyset, that contains name/value-pairs. The name is the * directory where the backend will mounted to, prefixed by KDB_KEY_MOUNTPOINTS "/"; value is a pointer to the backend. * @param mapper is a funtion, that maps the string of the backend name plus the mountpoint to a new created * KDB * return created trie on success, null on failure */ Trie* createTrie(KeySet *ks, OpenMapper mapper) { Key *key; cursor_t current; Trie *trie=0; char *entry_name; /* KDB_KEY_MOUNTPOINTS "/", e.g. system/elektra/mountpoints/fstab" */ /* Sort the keys alphapetically */ ksSort(ks); current=ksGetCursor(ks); ksRewind(ks); key=ksNext(ks); for (;key;) { KeySet *config; char *mountpoint=0; const char *backend_name=0; if (!strncmp(KDB_KEY_MOUNTPOINTS, keyName(key),KDB_KEY_MOUNTPOINTS_LEN+1)) { key=ksNext(ks); continue; } config=ksNew(0); entry_name = getEntryName(keyName(key)); for (;key;key=ksNext(ks)) { if (!isOfEntry(key,entry_name)) { break; } if (isOfEntryBackend(key,entry_name)) { backend_name=keyValue(key); } else if (isOfEntryMountpoint(key,entry_name)) { if (*(const char*)keyValue(key)=='\0') { mountpoint=kdbiStrDup(""); } else { Key *mnt_pnt_key = keyNew (keyValue(key), KEY_END); if (! mnt_pnt_key) { key=ksNext(ks); ksDel(config); break; } mountpoint = kdbiMalloc (keyGetNameSize(mnt_pnt_key)+1); sprintf(mountpoint,"%s/",keyName(mnt_pnt_key)); keyDel(mnt_pnt_key); } } else if (isOfEntryConfig(key,entry_name)) { ksAppendKey(config,key); } } if (backend_name && mountpoint) { void *p; p=mapper(backend_name,mountpoint,config); if (p) { trie=insert_trie(trie,mountpoint,p); } else { ksDel(config); } } free(entry_name); if (mountpoint) { free(mountpoint); } } ksSetCursor(ks,current); return trie; } /** Creates a trie from a keyset. * * @param handle data structure where the trie will be stored. * @param ks is a keyset, that contains name/value-pairs. The name is the * directory where the backend will mounted to, prefixed by KDB_KEY_MOUNTPOINTS; value is a pointer to the backend. * @param mapper is a function, that maps the string of the backend name plus the mountpoint to a new created * KDB * return 0 on success, -1 on failure */ int kdbCreateTrie(KDB *handle, KeySet *ks, OpenMapper mapper) { Trie *trie=0; if (kdbhGetTrie(handle)!=0) { return -1; } trie=createTrie(ks,mapper); kdbhSetTrie(handle,trie); if (trie==0) { return -1; } return 0; } Trie* insert_trie(Trie *trie, const char *name, const void *value) { char* p; int i; unsigned int idx; if (name==0) name=""; idx=(unsigned int) name[0]; if (trie==NULL) { trie=malloc(sizeof(Trie)); trie->empty_value=0; for (i=0;ichilds[i]=0; trie->text[i]=0; trie->textlen[i]=0; trie->value[i]=0; } if (!strcmp("",name)) { trie->empty_value=(void*)value; return trie; } trie->textlen[idx]=strlen(name); trie->text[idx]=kdbiStrDup(name); trie->value[idx]=(void*)value; return trie; } if (!strcmp("",name)) { trie->empty_value=(void*)value; return trie; } if (trie->text[idx]) { /* there exists an entry with the same first character */ if ((p=starts_with(name, trie->text[idx]))==0) { /* the name in the trie is part of the searched name --> continue search */ trie->childs[idx]=insert_trie(trie->childs[idx],name+trie->textlen[idx],value); } else { /* name in trie doesn't match name --> split trie */ char *newname; Trie *child; unsigned int idx2; newname=kdbiStrDup(p); *p=0; /* shorten the old name in the trie */ trie->textlen[idx]=strlen(trie->text[idx]); child=trie->childs[idx]; /* insert the name given as a parameter into the new trie entry */ trie->childs[idx]=insert_trie(NULL, name+(p-trie->text[idx]), value); /* insert the splitted try into the new trie entry */ idx2=(unsigned int) newname[0]; trie->childs[idx]->text[idx2]=newname; trie->childs[idx]->textlen[idx2]=strlen(newname); trie->childs[idx]->value[idx2]=trie->value[idx]; trie->childs[idx]->childs[idx2]=child; trie->value[idx]=0; } } else { /* there doesn't exist an entry with the same first character */ trie->text[idx]=kdbiStrDup(name); trie->value[idx]=(void*)value; trie->textlen[idx]=strlen(name); } return trie; } Trie *delete_trie(Trie *trie, char *name, CloseMapper closemapper) { Trie *tr; unsigned int idx; if (trie==NULL) { return NULL; } idx=(unsigned int) name[0]; if (trie->text[idx]==NULL) { return NULL; } if (starts_with(name,trie->text[idx])==0) { tr=delete_trie(trie->childs[idx],name+trie->textlen[idx],closemapper); if (tr==NULL) { /* child trie has been deleted */ trie->childs[idx]=NULL; free(trie->text[idx]); closemapper(trie->value[idx]); trie->text[idx]=NULL; } return trie; } return NULL; } /****************** * Private static declarations ******************/ static char *getEntryName(const char *path) { int len; char *ret,*p,*q; len=strlen(path); if (len<=KDB_KEY_MOUNTPOINTS_LEN) return 0; p=(char*)path+KDB_KEY_MOUNTPOINTS_LEN; for (q=p;!(*q==0 ||*q=='/');q++); ret = malloc (q-p+1); strncpy (ret, p, q-p); ret[q-p] = 0; return ret; } static int isOfEntryMountpoint(Key *key, char *entry) { const char *s; int len; int entrylen; s=keyName(key); len=strlen(s); entrylen=strlen(entry); if (len<=KDB_KEY_MOUNTPOINTS_LEN) return 0; if (strncmp(s,KDB_KEY_MOUNTPOINTS "/",KDB_KEY_MOUNTPOINTS_LEN)) return 0; if (strncmp(s+KDB_KEY_MOUNTPOINTS_LEN, entry, entrylen)) return 0; if (strncmp(s+KDB_KEY_MOUNTPOINTS_LEN+entrylen, "/mountpoint", sizeof("/mountpoint"))) return 0; return 1; } static int isOfEntryBackend(Key *key, char *entry) { const char *s; int len; int entrylen; s=keyName(key); len=strlen(s); entrylen=strlen(entry); if (len<=KDB_KEY_MOUNTPOINTS_LEN) return 0; if (strncmp(s,KDB_KEY_MOUNTPOINTS "/",KDB_KEY_MOUNTPOINTS_LEN)) return 0; if (strncmp(s+KDB_KEY_MOUNTPOINTS_LEN, entry, entrylen)) return 0; if (strncmp(s+KDB_KEY_MOUNTPOINTS_LEN+entrylen, "/backend", sizeof("/backend"))) return 0; return 1; } static int isOfEntryConfig(Key *key, char *entry) { const char *s; int len; int entrylen; s=keyName(key); len=strlen(s); entrylen=strlen(entry); if (len<=KDB_KEY_MOUNTPOINTS_LEN) return 0; if (strncmp(s,KDB_KEY_MOUNTPOINTS "/",KDB_KEY_MOUNTPOINTS_LEN)) return 0; if (strncmp(s+KDB_KEY_MOUNTPOINTS_LEN, entry, entrylen)) return 0; if (strncmp(s+KDB_KEY_MOUNTPOINTS_LEN+entrylen, "/config", sizeof("/config")-1)) return 0; return 1; } static int isOfEntry(Key *key, char *entry) { const char *s; int len; int entrylen; s=keyName(key); len=strlen(s); entrylen=strlen(entry); if (len<=KDB_KEY_MOUNTPOINTS_LEN) return 0; if (strncmp(s,KDB_KEY_MOUNTPOINTS "/",KDB_KEY_MOUNTPOINTS_LEN)) return 0; if (strncmp(s+KDB_KEY_MOUNTPOINTS_LEN, entry, entrylen)) return 0; if (*(s+KDB_KEY_MOUNTPOINTS_LEN+entrylen)!=0 && *(s+KDB_KEY_MOUNTPOINTS_LEN+entrylen) !='/') return 0; return 1; } /* return NULL if string starts with substring, except for the terminating '\0', * otherwise return a pointer to the first mismatch in substr. */ static char* starts_with(const char *str, char *substr) { int i = 0; int sublen = strlen(substr); for (i=0;itext[idx]==NULL) { return trie->empty_value; } if (starts_with((char*)name, (char*)trie->text[idx])==0) { ret=prefix_lookup(trie->childs[idx],name+trie->textlen[idx]); } else { return trie->empty_value; } if (ret==NULL && trie->value[idx]==NULL) { return trie->empty_value; } if (ret==NULL) return trie->value[idx]; return ret; } elektra-0.7.1/src/libelektratools/0000777000076400001440000000000011365513214014142 500000000000000elektra-0.7.1/src/libelektratools/Makefile.am0000644000076400001440000000157411365507605016130 00000000000000# NOTE: on INCLUDES i added $(XML_CFLAGS) too because # it seems previous version of libxml macro export # path in XML_CFLAGS rather than XML_CPPFLAGS # -- Yannick if HAVE_XML AM_CPPFLAGS = -DDATADIR=\"$(datadir)\" \ -I$(top_srcdir)/src/include $(XML_CPPFLAGS) $(XML_CFLAGS) elektratools_sources = kdbtools.c stream.c ../include/kdbtools.h ../include/kdbprivate.h ../include/kdb.h hlvlbackend_LIBRARIES = libelektratools.a libelektratools_a_SOURCES = $(elektratools_sources) libelektratools_a_CFLAGS = -DELEKTRA_STATIC $(COPTFLAGS) $(CDBGFLAGS) hlvlbackend_LTLIBRARIES = libelektratools.la libelektratools_la_SOURCES = $(elektratools_sources) libelektratools_la_LDFLAGS = -version-info $(ELEKTRATOOLS_VERSION_API) libelektratools_la_LIBADD = ../libelektra/libelektra.la $(XML_LIBS) libelektratools_la_CFLAGS = $(COPTFLAGS) $(CDBGFLAGS) clean-local: rm -f *.gcno *.gcda *.gcno endif elektra-0.7.1/src/libelektratools/Makefile.in0000644000076400001440000006436211365511153016136 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ # NOTE: on INCLUDES i added $(XML_CFLAGS) too because # it seems previous version of libxml macro export # path in XML_CFLAGS rather than XML_CPPFLAGS # -- Yannick srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = src/libelektratools DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/extensions.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/config.h CONFIG_CLEAN_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(hlvlbackenddir)" \ "$(DESTDIR)$(hlvlbackenddir)" hlvlbackendLIBRARIES_INSTALL = $(INSTALL_DATA) LIBRARIES = $(hlvlbackend_LIBRARIES) ARFLAGS = cru libelektratools_a_AR = $(AR) $(ARFLAGS) libelektratools_a_LIBADD = am__libelektratools_a_SOURCES_DIST = kdbtools.c stream.c \ ../include/kdbtools.h ../include/kdbprivate.h ../include/kdb.h @HAVE_XML_TRUE@am__objects_1 = libelektratools_a-kdbtools.$(OBJEXT) \ @HAVE_XML_TRUE@ libelektratools_a-stream.$(OBJEXT) @HAVE_XML_TRUE@am_libelektratools_a_OBJECTS = $(am__objects_1) libelektratools_a_OBJECTS = $(am_libelektratools_a_OBJECTS) hlvlbackendLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(hlvlbackend_LTLIBRARIES) am__DEPENDENCIES_1 = @HAVE_XML_TRUE@libelektratools_la_DEPENDENCIES = \ @HAVE_XML_TRUE@ ../libelektra/libelektra.la \ @HAVE_XML_TRUE@ $(am__DEPENDENCIES_1) am__libelektratools_la_SOURCES_DIST = kdbtools.c stream.c \ ../include/kdbtools.h ../include/kdbprivate.h ../include/kdb.h @HAVE_XML_TRUE@am__objects_2 = libelektratools_la-kdbtools.lo \ @HAVE_XML_TRUE@ libelektratools_la-stream.lo @HAVE_XML_TRUE@am_libelektratools_la_OBJECTS = $(am__objects_2) libelektratools_la_OBJECTS = $(am_libelektratools_la_OBJECTS) @HAVE_XML_TRUE@am_libelektratools_la_rpath = -rpath $(hlvlbackenddir) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/src/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libelektratools_a_SOURCES) $(libelektratools_la_SOURCES) DIST_SOURCES = $(am__libelektratools_a_SOURCES_DIST) \ $(am__libelektratools_la_SOURCES_DIST) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) INSTALL = @INSTALL@ ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BACKENDS = @BACKENDS@ BACKEND_VERSION_API = @BACKEND_VERSION_API@ BINDINGS = @BINDINGS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CDBGFLAGS = @CDBGFLAGS@ CFLAGS = @CFLAGS@ COPTFLAGS = @COPTFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSTDFLAGS = @CSTDFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDBGFLAGS = @CXXDBGFLAGS@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXOPTFLAGS = @CXXOPTFLAGS@ CXXSTDFLAGS = @CXXSTDFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_FALSE = @DEBUG_FALSE@ DEBUG_TRUE = @DEBUG_TRUE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ELEKTRATOOLS_VERSION_API = @ELEKTRATOOLS_VERSION_API@ ELEKTRA_VERSION_API = @ELEKTRA_VERSION_API@ EXEEXT = @EXEEXT@ EXPERIMENTAL_FALSE = @EXPERIMENTAL_FALSE@ EXPERIMENTAL_TRUE = @EXPERIMENTAL_TRUE@ F77 = @F77@ FFLAGS = @FFLAGS@ GENHTML = @GENHTML@ GREP = @GREP@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ HAVE_LIBLTDL_FALSE = @HAVE_LIBLTDL_FALSE@ HAVE_LIBLTDL_TRUE = @HAVE_LIBLTDL_TRUE@ HAVE_MAN2HTML_FALSE = @HAVE_MAN2HTML_FALSE@ HAVE_MAN2HTML_TRUE = @HAVE_MAN2HTML_TRUE@ HAVE_XML_FALSE = @HAVE_XML_FALSE@ HAVE_XML_TRUE = @HAVE_XML_TRUE@ HAVE_XSL_FALSE = @HAVE_XSL_FALSE@ HAVE_XSL_TRUE = @HAVE_XSL_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDB_VERSION = @KDB_VERSION@ KDB_VERSION_MAJOR = @KDB_VERSION_MAJOR@ KDB_VERSION_MAJORMINOR = @KDB_VERSION_MAJORMINOR@ KDB_VERSION_MICRO = @KDB_VERSION_MICRO@ KDB_VERSION_MINOR = @KDB_VERSION_MINOR@ LCOV = @LCOV@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VALGRIND = @VALGRIND@ VALGRINDTESTS_FALSE = @VALGRINDTESTS_FALSE@ VALGRINDTESTS_TRUE = @VALGRINDTESTS_TRUE@ VERSION = @VERSION@ XML2_CONFIG = @XML2_CONFIG@ XML_CPPFLAGS = @XML_CPPFLAGS@ XML_LIBS = @XML_LIBS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ backend_static_libs = @backend_static_libs@ backenddir = @backenddir@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ datarootdir = @datarootdir@ dbroot = @dbroot@ default_backend = @default_backend@ default_dbackend = @default_dbackend@ default_docbook = @default_docbook@ develdocdir = @develdocdir@ docdir = @docdir@ doxygen = @doxygen@ dvidir = @dvidir@ elektratools = @elektratools@ exec_prefix = @exec_prefix@ gconf_CFLAGS = @gconf_CFLAGS@ gconf_LIBS = @gconf_LIBS@ hlvlbackenddir = @hlvlbackenddir@ 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@ man2html = @man2html@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ privatelibs = @privatelibs@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ ulibdir = @ulibdir@ xsltproc = @xsltproc@ @HAVE_XML_TRUE@AM_CPPFLAGS = -DDATADIR=\"$(datadir)\" \ @HAVE_XML_TRUE@ -I$(top_srcdir)/src/include $(XML_CPPFLAGS) $(XML_CFLAGS) @HAVE_XML_TRUE@elektratools_sources = kdbtools.c stream.c ../include/kdbtools.h ../include/kdbprivate.h ../include/kdb.h @HAVE_XML_TRUE@hlvlbackend_LIBRARIES = libelektratools.a @HAVE_XML_TRUE@libelektratools_a_SOURCES = $(elektratools_sources) @HAVE_XML_TRUE@libelektratools_a_CFLAGS = -DELEKTRA_STATIC $(COPTFLAGS) $(CDBGFLAGS) @HAVE_XML_TRUE@hlvlbackend_LTLIBRARIES = libelektratools.la @HAVE_XML_TRUE@libelektratools_la_SOURCES = $(elektratools_sources) @HAVE_XML_TRUE@libelektratools_la_LDFLAGS = -version-info $(ELEKTRATOOLS_VERSION_API) @HAVE_XML_TRUE@libelektratools_la_LIBADD = ../libelektra/libelektra.la $(XML_LIBS) @HAVE_XML_TRUE@libelektratools_la_CFLAGS = $(COPTFLAGS) $(CDBGFLAGS) all: all-am .SUFFIXES: .SUFFIXES: .c .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 \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/libelektratools/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/libelektratools/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-hlvlbackendLIBRARIES: $(hlvlbackend_LIBRARIES) @$(NORMAL_INSTALL) test -z "$(hlvlbackenddir)" || $(mkdir_p) "$(DESTDIR)$(hlvlbackenddir)" @list='$(hlvlbackend_LIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(hlvlbackendLIBRARIES_INSTALL) '$$p' '$(DESTDIR)$(hlvlbackenddir)/$$f'"; \ $(hlvlbackendLIBRARIES_INSTALL) "$$p" "$(DESTDIR)$(hlvlbackenddir)/$$f"; \ else :; fi; \ done @$(POST_INSTALL) @list='$(hlvlbackend_LIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ p=$(am__strip_dir) \ echo " $(RANLIB) '$(DESTDIR)$(hlvlbackenddir)/$$p'"; \ $(RANLIB) "$(DESTDIR)$(hlvlbackenddir)/$$p"; \ else :; fi; \ done uninstall-hlvlbackendLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(hlvlbackend_LIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(hlvlbackenddir)/$$p'"; \ rm -f "$(DESTDIR)$(hlvlbackenddir)/$$p"; \ done clean-hlvlbackendLIBRARIES: -test -z "$(hlvlbackend_LIBRARIES)" || rm -f $(hlvlbackend_LIBRARIES) libelektratools.a: $(libelektratools_a_OBJECTS) $(libelektratools_a_DEPENDENCIES) -rm -f libelektratools.a $(libelektratools_a_AR) libelektratools.a $(libelektratools_a_OBJECTS) $(libelektratools_a_LIBADD) $(RANLIB) libelektratools.a install-hlvlbackendLTLIBRARIES: $(hlvlbackend_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(hlvlbackenddir)" || $(mkdir_p) "$(DESTDIR)$(hlvlbackenddir)" @list='$(hlvlbackend_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=install $(hlvlbackendLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(hlvlbackenddir)/$$f'"; \ $(LIBTOOL) --mode=install $(hlvlbackendLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(hlvlbackenddir)/$$f"; \ else :; fi; \ done uninstall-hlvlbackendLTLIBRARIES: @$(NORMAL_UNINSTALL) @set -x; list='$(hlvlbackend_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(hlvlbackenddir)/$$p'"; \ $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(hlvlbackenddir)/$$p"; \ done clean-hlvlbackendLTLIBRARIES: -test -z "$(hlvlbackend_LTLIBRARIES)" || rm -f $(hlvlbackend_LTLIBRARIES) @list='$(hlvlbackend_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libelektratools.la: $(libelektratools_la_OBJECTS) $(libelektratools_la_DEPENDENCIES) $(LINK) $(am_libelektratools_la_rpath) $(libelektratools_la_LDFLAGS) $(libelektratools_la_OBJECTS) $(libelektratools_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektratools_a-kdbtools.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektratools_a-stream.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektratools_la-kdbtools.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libelektratools_la-stream.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< libelektratools_a-kdbtools.o: kdbtools.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektratools_a_CFLAGS) $(CFLAGS) -MT libelektratools_a-kdbtools.o -MD -MP -MF "$(DEPDIR)/libelektratools_a-kdbtools.Tpo" -c -o libelektratools_a-kdbtools.o `test -f 'kdbtools.c' || echo '$(srcdir)/'`kdbtools.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektratools_a-kdbtools.Tpo" "$(DEPDIR)/libelektratools_a-kdbtools.Po"; else rm -f "$(DEPDIR)/libelektratools_a-kdbtools.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kdbtools.c' object='libelektratools_a-kdbtools.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektratools_a_CFLAGS) $(CFLAGS) -c -o libelektratools_a-kdbtools.o `test -f 'kdbtools.c' || echo '$(srcdir)/'`kdbtools.c libelektratools_a-kdbtools.obj: kdbtools.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektratools_a_CFLAGS) $(CFLAGS) -MT libelektratools_a-kdbtools.obj -MD -MP -MF "$(DEPDIR)/libelektratools_a-kdbtools.Tpo" -c -o libelektratools_a-kdbtools.obj `if test -f 'kdbtools.c'; then $(CYGPATH_W) 'kdbtools.c'; else $(CYGPATH_W) '$(srcdir)/kdbtools.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektratools_a-kdbtools.Tpo" "$(DEPDIR)/libelektratools_a-kdbtools.Po"; else rm -f "$(DEPDIR)/libelektratools_a-kdbtools.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kdbtools.c' object='libelektratools_a-kdbtools.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektratools_a_CFLAGS) $(CFLAGS) -c -o libelektratools_a-kdbtools.obj `if test -f 'kdbtools.c'; then $(CYGPATH_W) 'kdbtools.c'; else $(CYGPATH_W) '$(srcdir)/kdbtools.c'; fi` libelektratools_a-stream.o: stream.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektratools_a_CFLAGS) $(CFLAGS) -MT libelektratools_a-stream.o -MD -MP -MF "$(DEPDIR)/libelektratools_a-stream.Tpo" -c -o libelektratools_a-stream.o `test -f 'stream.c' || echo '$(srcdir)/'`stream.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektratools_a-stream.Tpo" "$(DEPDIR)/libelektratools_a-stream.Po"; else rm -f "$(DEPDIR)/libelektratools_a-stream.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='stream.c' object='libelektratools_a-stream.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektratools_a_CFLAGS) $(CFLAGS) -c -o libelektratools_a-stream.o `test -f 'stream.c' || echo '$(srcdir)/'`stream.c libelektratools_a-stream.obj: stream.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektratools_a_CFLAGS) $(CFLAGS) -MT libelektratools_a-stream.obj -MD -MP -MF "$(DEPDIR)/libelektratools_a-stream.Tpo" -c -o libelektratools_a-stream.obj `if test -f 'stream.c'; then $(CYGPATH_W) 'stream.c'; else $(CYGPATH_W) '$(srcdir)/stream.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektratools_a-stream.Tpo" "$(DEPDIR)/libelektratools_a-stream.Po"; else rm -f "$(DEPDIR)/libelektratools_a-stream.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='stream.c' object='libelektratools_a-stream.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektratools_a_CFLAGS) $(CFLAGS) -c -o libelektratools_a-stream.obj `if test -f 'stream.c'; then $(CYGPATH_W) 'stream.c'; else $(CYGPATH_W) '$(srcdir)/stream.c'; fi` libelektratools_la-kdbtools.lo: kdbtools.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektratools_la_CFLAGS) $(CFLAGS) -MT libelektratools_la-kdbtools.lo -MD -MP -MF "$(DEPDIR)/libelektratools_la-kdbtools.Tpo" -c -o libelektratools_la-kdbtools.lo `test -f 'kdbtools.c' || echo '$(srcdir)/'`kdbtools.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektratools_la-kdbtools.Tpo" "$(DEPDIR)/libelektratools_la-kdbtools.Plo"; else rm -f "$(DEPDIR)/libelektratools_la-kdbtools.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kdbtools.c' object='libelektratools_la-kdbtools.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektratools_la_CFLAGS) $(CFLAGS) -c -o libelektratools_la-kdbtools.lo `test -f 'kdbtools.c' || echo '$(srcdir)/'`kdbtools.c libelektratools_la-stream.lo: stream.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektratools_la_CFLAGS) $(CFLAGS) -MT libelektratools_la-stream.lo -MD -MP -MF "$(DEPDIR)/libelektratools_la-stream.Tpo" -c -o libelektratools_la-stream.lo `test -f 'stream.c' || echo '$(srcdir)/'`stream.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libelektratools_la-stream.Tpo" "$(DEPDIR)/libelektratools_la-stream.Plo"; else rm -f "$(DEPDIR)/libelektratools_la-stream.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='stream.c' object='libelektratools_la-stream.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libelektratools_la_CFLAGS) $(CFLAGS) -c -o libelektratools_la-stream.lo `test -f 'stream.c' || echo '$(srcdir)/'`stream.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(hlvlbackenddir)" "$(DESTDIR)$(hlvlbackenddir)"; 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: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." @HAVE_XML_FALSE@clean-local: clean: clean-am clean-am: clean-generic clean-hlvlbackendLIBRARIES \ clean-hlvlbackendLTLIBRARIES clean-libtool clean-local \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-hlvlbackendLIBRARIES \ install-hlvlbackendLTLIBRARIES install-exec-am: install-info: install-info-am install-man: 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-hlvlbackendLIBRARIES \ uninstall-hlvlbackendLTLIBRARIES uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-hlvlbackendLIBRARIES clean-hlvlbackendLTLIBRARIES \ clean-libtool clean-local ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-exec install-exec-am \ install-hlvlbackendLIBRARIES install-hlvlbackendLTLIBRARIES \ install-info install-info-am install-man install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-hlvlbackendLIBRARIES \ uninstall-hlvlbackendLTLIBRARIES uninstall-info-am @HAVE_XML_TRUE@clean-local: @HAVE_XML_TRUE@ rm -f *.gcno *.gcda *.gcno # 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: elektra-0.7.1/src/libelektratools/README0000644000076400001440000000133711361542117014742 00000000000000Warning! This library is part of the stable libelektra 0.7.0 suite. Incompatible work on it is not prohibited, you are encouraged to do so. Note that in the static case, that is when the macro ELEKTRA_STATIC is set you need to rename all symbols to libelektratools_LTX_symbols. This must only take place in the source files, not in the header, otherwise the users symbols will be renamed too, leading to name clashes. In addition to that you must add all symbols in the exportsymbols.sh script, located at src/libelektra. When you do that, the same code of the user can compile easily to a static and dynamic variant. The static variant just "renames" the symbols, while the dynamic really loads the library and lookup the symbols. elektra-0.7.1/src/libelektratools/kdbtools.c0000644000076400001440000003272611365506635016066 00000000000000/*************************************************************************** kdbtools.c - Elektra High Level Methods ------------------- begin : Sat Jan 22 2005 copyright : (C) 2005 by Avi Alkalay email : avi@unix.sh ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ /* Subversion stuff $Id$ */ #ifdef HAVE_CONFIG_H #include #endif #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_SYS_STAT_H #include #endif #ifdef HAVE_ERRNO_H #include #endif #include #include #include #include #ifdef ELEKTRA_STATIC #define ksFromXMLfile libelektratools_LTX_ksFromXMLfile #define ksFromXML libelektratools_LTX_ksFromXML #endif /* ELEKTRA_STATIC */ /* * Processes the current node from reader, converting from XML * to a Key object, and ksAppendKey() it to ks. * * See keyToStream() for an example of a node. * * This function is completelly dependent on libxml. * * @param ks where to put the resulting reded key * @param context a prent key name, so a full name can be calculated * if the XML node for the current key only provides a basename * @param reader where to read from */ static int consumeKeyNode(KeySet *ks, const char *context, xmlTextReaderPtr reader) { xmlChar *nodeName=0; xmlChar *keyNodeName=0; xmlChar *buffer=0; xmlChar *privateContext=0; Key *newKey=0; int appended=0; /* printf("%s", KDB_SCHEMA_PATH); */ keyNodeName=xmlTextReaderName(reader); if (!strcmp((char *)keyNodeName,"key")) { type_t type=KEY_TYPE_STRING; /* default type */ mode_t isdir=0; int end=0; newKey=keyNew(0); /* a must have one of the following: - a "name" attribute, used as an absolute name overriding the context - a "basename" attribute, that will be appended to the current context - a "parent" plus "basename" attributes, both appended to current context - only a "parent", appended to current context */ buffer=xmlTextReaderGetAttribute(reader,(const xmlChar *)"name"); if (buffer) { /* set absolute name */ keySetName(newKey,(char *)buffer); xmlFree(buffer); buffer=0; } else { /* logic for relative name calculation */ privateContext=xmlTextReaderGetAttribute(reader, (const xmlChar *)"parent"); buffer=xmlTextReaderGetAttribute(reader, (const xmlChar *)"basename"); if (context) keySetName(newKey,context); if (privateContext) keyAddBaseName(newKey, (char *)privateContext); if (buffer) keyAddBaseName(newKey,(char *)buffer); xmlFree(privateContext); privateContext=0; xmlFree(buffer); buffer=0; } /* test for a short value attribute, instead of bellow */ buffer=xmlTextReaderGetAttribute(reader,(const xmlChar *)"value"); if (buffer) { keySetRaw(newKey,buffer,kdbiStrLen((char *)buffer)); xmlFree(buffer); buffer=0; } /* Parse UID */ buffer=xmlTextReaderGetAttribute(reader,(const xmlChar *)"uid"); if (buffer) { int errsave = errno; char * endptr; long int uid = strtol ((const char *)buffer, &endptr, 10); errno = errsave; if (endptr != '\0' && *endptr == '\0') { keySetUID(newKey,uid); } xmlFree(buffer); buffer=0; } /* Parse GID */ buffer=xmlTextReaderGetAttribute(reader,(const xmlChar *)"gid"); if (buffer) { int errsave = errno; char * endptr; long int gid = strtol ((const char *)buffer, &endptr, 10); errno = errsave; if (endptr != '\0' && *endptr == '\0') { keySetGID(newKey,gid); } xmlFree(buffer); buffer=0; } /* Parse mode permissions */ buffer=xmlTextReaderGetAttribute(reader,(const xmlChar *)"mode"); int errsave = errno; if (buffer) keySetMode(newKey,strtol((char *)buffer,0,0)); errno = errsave; xmlFree(buffer); if (xmlTextReaderIsEmptyElement(reader)) { /* we have a element */ if (newKey && !appended) { ksAppendKey(ks,newKey); appended=1; end=1; } } buffer=xmlTextReaderGetAttribute(reader,(const xmlChar *)"type"); if (buffer) { if (!strcmp((char *)buffer,"string")) type=KEY_TYPE_STRING; else if (!strcmp((char *)buffer,"directory")) isdir=1; else if (!strcmp((char *)buffer,"binary")) type=KEY_TYPE_BINARY; else if (!strcmp((char *)buffer,"undefined")) type=KEY_TYPE_UNDEFINED; else { /* special numerical user-defined value types */ void *converter=0; type=strtol((char *)buffer,(char **)&converter,10); if ((void *)buffer==converter) /* in case of error, fallback to undefined type again */ type=KEY_TYPE_UNDEFINED; } } xmlFree(buffer); /* If "isdir" appears, everything different from "0", "false" or "no" marks it as a dir key */ buffer=xmlTextReaderGetAttribute(reader,(const xmlChar *)"isdir"); if (!isdir && buffer) { if ( strcmp((char *)buffer,"0") && strcmp((char *)buffer,"false") && strcmp((char *)buffer,"no")) isdir = 1; else isdir = 0; } xmlFree(buffer); if (isdir) keySetDir(newKey); keySetType(newKey,type); /* Parse everything else */ while (!end) { xmlTextReaderRead(reader); nodeName=xmlTextReaderName(reader); if (!strcmp((char *)nodeName,"value")) { if (xmlTextReaderIsEmptyElement(reader) || xmlTextReaderNodeType(reader)==15) { xmlFree (nodeName); continue; } xmlTextReaderRead(reader); buffer=xmlTextReaderValue(reader); if (buffer) { /* Key's value type was already set above */ if (keyIsBinary(newKey)) { char *unencoded=0; size_t unencodedSize; unencodedSize=kdbiStrLen((char *)buffer)/2; unencoded=malloc(unencodedSize); unencodedSize=kdbbDecode((char *)buffer,unencoded); if (!unencodedSize) return -1; keySetRaw(newKey,unencoded,unencodedSize); free(unencoded); } else keySetRaw(newKey,buffer,kdbiStrLen((char *)buffer)); } xmlFree(buffer); } else if (!strcmp((char *)nodeName,"comment")) { ssize_t commentSize=0; if (xmlTextReaderIsEmptyElement(reader) || xmlTextReaderNodeType(reader)==15) { xmlFree (nodeName); continue; } xmlTextReaderRead(reader); buffer=xmlTextReaderValue(reader); if ((commentSize=keyGetCommentSize(newKey)) > 1) { /*Multiple line comment*/ char *tmpComment=0; tmpComment=malloc(commentSize+ xmlStrlen(buffer)*sizeof(xmlChar)+1); if (tmpComment) { keyGetComment(newKey,tmpComment,commentSize); strcat(tmpComment,"\n"); strcat(tmpComment,(char *)buffer); keySetComment(newKey,tmpComment); free(tmpComment); tmpComment=0; } } else keySetComment(newKey,(char *)buffer); xmlFree(buffer); } else if (!strcmp((char *)nodeName,"key")) { /* Here we found or a sub . So include current key in the KeySet. */ if (newKey && !appended) { ksAppendKey(ks,newKey); appended=1; } if (xmlTextReaderNodeType(reader)==15) /* found a */ end=1; else { /* found a sub */ if (! keyIsDir(newKey)) { keySetDir(newKey); } /* prepare the context (parent) */ consumeKeyNode(ks,newKey->key,reader); } } xmlFree (nodeName); } if (privateContext) xmlFree(privateContext); /* seems like we forgot the key, lets delete it */ if (newKey && !appended) { keyDel (newKey); appended=1; } } xmlFree(keyNodeName); return 0; } static int consumeKeySetNode(KeySet *ks, const char *context, xmlTextReaderPtr reader) { xmlChar *nodeName=0; xmlChar *keySetNodeName=0; xmlChar *privateContext=0; xmlChar fullContext[800]=""; keySetNodeName=xmlTextReaderName(reader); if (!strcmp((char *)keySetNodeName,"keyset")) { int end=0; privateContext=xmlTextReaderGetAttribute(reader,(const xmlChar *)"parent"); if (context && privateContext) { xmlStrPrintf(fullContext,sizeof(fullContext), (const xmlChar *)"%s/%s", context, privateContext); } /* Parse everything else */ while (!end) { xmlTextReaderRead(reader); nodeName=xmlTextReaderName(reader); if (!strcmp((char *)nodeName,"key")) { if (privateContext) consumeKeyNode(ks,(char *)(*fullContext?fullContext:privateContext),reader); else consumeKeyNode(ks,context,reader); } else if (!strcmp((char *)nodeName,"keyset")) { /* A can have nested s */ if (xmlTextReaderNodeType(reader)==15) /* found a */ end=1; else if (privateContext) consumeKeySetNode(ks, (char *)(*fullContext?fullContext:privateContext), reader); else consumeKeySetNode(ks, context, reader); } xmlFree(nodeName); } if (privateContext) xmlFree(privateContext),privateContext=0; } xmlFree (keySetNodeName); return 0; } /* * This is the workhorse behind for ksFromXML() and ksFromXMLfile(). * It will process the entire XML document in reader and convert and * save it in ks KeySet. Each node is processed by the processNode() function. * * This function is completelly dependent on libxml. */ static int ksFromXMLReader(KeySet *ks,xmlTextReaderPtr reader) { int ret; xmlChar *nodeName=0; ret = xmlTextReaderRead(reader); /* go to first node */ while (ret == 1) { /* walk node per node until the end of the stream */ nodeName=xmlTextReaderName(reader); if (!strcmp((char *)nodeName,"key")) consumeKeyNode(ks, 0, reader); else if (!strcmp((char *)nodeName,"keyset")) consumeKeySetNode(ks, 0, reader); ret = xmlTextReaderRead(reader); xmlFree (nodeName); } if (ret) fprintf(stderr,"kdb: Failed to parse XML input\n"); return ret; } /* static int isValidXML(xmlDocPtr doc,char *schemaPath) { xmlSchemaPtr wxschemas = NULL; xmlSchemaValidCtxtPtr ctxt; xmlSchemaParserCtxtPtr ctxt2=NULL; int ret=0; ctxt2 = xmlSchemaNewParserCtxt(schemaPath); if (ctxt2==NULL) { xmlFreeDoc(doc); return 1; } xmlSchemaSetParserErrors(ctxt2, (xmlSchemaValidityErrorFunc) fprintf, (xmlSchemaValidityWarningFunc) fprintf, stderr); wxschemas = xmlSchemaParse(ctxt2); if (wxschemas==NULL) { xmlSchemaFreeParserCtxt(ctxt2); xmlFreeDoc(doc); return 1; } ctxt = xmlSchemaNewValidCtxt(wxschemas); xmlSchemaSetValidErrors(ctxt, (xmlSchemaValidityErrorFunc) fprintf, (xmlSchemaValidityWarningFunc) fprintf, stderr); if (ctxt==NULL) { xmlSchemaFree(wxschemas); xmlSchemaFreeParserCtxt(ctxt2); xmlFreeDoc(doc); return 1; } ret = xmlSchemaValidateDoc(ctxt, doc); xmlSchemaFreeValidCtxt(ctxt); xmlSchemaFree(wxschemas); xmlSchemaFreeParserCtxt(ctxt2); return ret; } */ /** * Given an XML @p filename, open it, validate schema, process nodes, * convert and save it in the @p ks KeySet. * * Currently, the XML file can have many root @c @ and @c @ nodes. * They will all be reduced to simple keys returned in @p ks. * * To check if the xml file is valid (best before you read from it): * @code #include char schemaPath[513]; schemaPath[0]=0; ret=kdbGetString(handle, KDB_SCHEMA_PATH_KEY,schemaPath,sizeof(schemaPath)); if (ret==0) ret = isValidXML(filename,schemaPath); else ret = isValidXML(filename,KDB_SCHEMA_PATH); * @endcode * * @param ks the keyset * @param filename the file to parse * @ingroup stream */ int ksFromXMLfile(KeySet *ks,const char *filename) { xmlTextReaderPtr reader; xmlDocPtr doc; int ret=0; doc = xmlParseFile(filename); if (doc==NULL) return 1; if (!ret) { reader=xmlReaderWalker(doc); if (reader) ret=ksFromXMLReader(ks,reader); else { perror("kdb"); return 1; } xmlFreeTextReader (reader); } xmlFreeDoc(doc); xmlCleanupParser(); return ret; } /** * FIXME: not working when fd is stdin * Given a file descriptor (that can be @p stdin) for an XML file, validate * schema, process nodes, convert and save it in the @p ks KeySet. * * @param ks keyset * @param fd Filedeskriptor?? should be FILE* * @ingroup stream */ int ksFromXML(KeySet *ks, int fd) { /* Start of support for old XML library (no xmlReaderForFd()) */ char filename[]="/var/tmp/kdbeditXXXXXX"; FILE *xmlfile=0; /* xmlfile=fopen(tmpnam("/var/tmp/kdbedit"),"rw+"); */ xmlfile = tmpfile(); while (! feof(xmlfile)) { char buffer[1000]; ssize_t readed, writen; readed=read(fd,buffer,sizeof(buffer)); if (readed<0) { perror("kdb"); fclose(xmlfile); remove(filename); return 1; } writen=fwrite(buffer,sizeof(char),readed,xmlfile); if (writen<0) { perror("kdb"); fclose(xmlfile); remove(filename); return 1; } } fclose(xmlfile); return ksFromXMLfile(ks,filename); /* This code requires a newer version of XML library, not present in all Linux/BSD/Unix distros. Don't use it yet. // a complete XML document is expected xmlTextReaderPtr reader=0; int ret; reader=xmlReaderForFd(fd,"file:/tmp/imp.xml",0,0); if (reader) { ret=ksFromXMLReader(ks,reader); } else { printf("kdb: Unable to open file descriptor %d for XML reading\n", fd); return 1; } return ret; // end of newer code */ } elektra-0.7.1/src/libelektratools/stream.c0000644000076400001440000005063711365506635015541 00000000000000/*************************************************************************** stream.c - Streaming Methods ------------------- begin : Sat Nov 23 2007 copyright : (C) 2007 by Markus Raab email : elektra@markus-raab.org ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif #ifdef HAVE_UNISTD_H #include #else #error need unistd for getuid and getgid #endif #ifdef HAVE_STDIO_H #include #endif #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_TIME_H #include #endif #include #include #ifdef ELEKTRA_STATIC #define ksToStream libelektratools_LTX_ksToStream #define ksOutput libelektratools_LTX_ksOutput #define ksGenerate libelektratools_LTX_ksGenerate #define keyToStream libelektratools_LTX_keyToStream #define keyOutput libelektratools_LTX_keyOutput #define keyGenerate libelektratools_LTX_keyGenerate #endif /* ELEKTRA_STATIC */ /** * @defgroup stream Streaming * @brief Methods to output, generate and toXML Keys and Keysets. * * Here are some functions that are in a separate library because they * depend on non-basic libraries as libxml. Link against kdbtools library if your * program won't be installed in /bin, or is not essential in early boot * stages. * * It is also possible to have a dynamic linkage, see the * sourcecode from kdb-tool or testing framework how to achieve * that. * * Output prints keys line per line, meaned to be read by humans. * - keyOutput() * - ksOutput() * * Generate prints keys and keysets as C-Structs, meaned to be * read by a C-Compiler. * - keyGenerate() * - ksGenerate() * * toXML prints keys and keysets as XML, meaned to be used * as exchange format. * - keyToStream() * - ksToStream() * * To use them: * @code #include * @endcode * * */ /********************************************* * Textual XML methods * *********************************************/ /** * Prints an XML representation of the key. * * String generated is of the form: * @verbatim Samsung TFT panel My monitor @endverbatim * @verbatim Samsung TFT panel My monitor @endverbatim * * @param key the key object to work with * @param stream where to write output: a file or stdout * @param options Some #option_t ORed: * - @p option_t::KDB_O_NUMBERS \n * Do not convert UID and GID into user and group names * - @p option_t::KDB_O_CONDENSED \n * Less human readable, more condensed output * - @p option_t::KDB_O_FULLNAME \n * The @p user keys are exported with their full names (including * user domains) * * @see ksToStream() * @return number of bytes written to output * @ingroup stream */ ssize_t keyToStream(const Key *key, FILE* stream, option_t options) { return keyToStreamBasename(key,stream,0,0,options); } /** * Same as keyToStream() but tries to strip @p parentSize bytes from * @p key name if it matches @p parent . * * Taking the example from keyToStream(), if @p parent is * @c "system/sw/xorg", the generated string is of the form: * @verbatim Samsung TFT panel My monitor @endverbatim * * It usefull to produce more human readable XML output of a key when * it is being represented in a context that defines the parent key name. * For example: * * @verbatim @endverbatim * * In the bove example, each @p @ entry was generated by a call to * keyToStreamBasename() having @c "user/sw" as @p parent . * * This method is used when ksToStream() is called with * KDBOption::KDB_O_HIER option. * * @param key the key object to work with * @param stream the FILE where to send the stream * @param parentSize the maximum size of @p parent that will be used. * If 0, the entire @p parent will be used. * @param parent the string (or part of it, defined by @p parentSize ) that * will be used to strip from the key name. * @param options Some #option_t ORed: * - @p option_t::KDB_O_NUMBERS \n * Do not convert UID and GID into user and group names * - @p option_t::KDB_O_CONDENSED \n * Less human readable, more condensed output * - @p option_t::KDB_O_FULLNAME \n * The @p user keys are exported with their full names (including * user domains) * * @return number of bytes written to output * @ingroup stream */ ssize_t keyToStreamBasename(const Key *key, FILE *stream, const char *parent, const size_t parentSize, option_t options) { ssize_t written=0; char buffer[MAX_PATH_LENGTH]; uid_t uid = getuid(); gid_t gid = getgid(); /* Write key name */ if (parent) { /* some logic to see if we should print only the relative basename */ int found; size_t skip=parentSize ? parentSize : kdbiStrLen(parent)-1; found=memcmp(parent,key->key,skip); if (found == 0) { while (*(key->key+skip) == PATH_SEPARATOR) ++skip; if (*(key->key+skip) != 0) /* we don't want a null basename */ written+=fprintf(stream,"key+skip); } } if (written == 0) { /* no "key); } if (options & KDB_O_CONDENSED) written+=fprintf(stream," "); else written+=fprintf(stream,"\n "); /* Key type TODO: xml schema does not output type if (options & KDB_O_NUMBERS) { written+=fprintf(stream," type=\"%d\"", key->type); } else { buffer[0]=0; if (key->type & KEY_TYPE_DIR) written+=fprintf(stream, " isdir=\"yes\""); if (key->type & KEY_TYPE_REMOVE) written+=fprintf(stream, " isremove=\"yes\""); if (key->type & KEY_TYPE_BINARY) written+=fprintf(stream, " isbinary=\"yes\""); } */ if (keyGetUID (key) != uid) written+=fprintf(stream," uid=\"%d\"", (int)keyGetUID (key)); if (keyGetGID (key) != gid) written+=fprintf(stream," gid=\"%d\"", (int)keyGetGID (key)); #if defined(S_IRWXU) && defined(S_IRWXG) && defined(S_IRWXO) written+=fprintf(stream," mode=\"0%o\"", key->mode & (S_IRWXU|S_IRWXG|S_IRWXO)); #else written+=fprintf(stream," mode=\"0%o\"", key->mode); #endif if (!key->data && !key->comment) { /* no data AND no comment */ written+=fprintf(stream,"/>"); if (!(options & KDB_O_CONDENSED)) written+=fprintf(stream,"\n\n"); return written; /* end of */ } else { if (key->data) { if ((key->dataSize <= 16) && keyIsString (key) && /*TODO: is this for string?*/ !strchr(key->data,'\n')) { /* we'll use a "value" attribute instead of a node, for readability, so the cut size will be 16, which is the maximum size of an IPv4 address */ if (options & KDB_O_CONDENSED) written+=fprintf(stream," "); else written+=fprintf(stream,"\n\t"); written+=fprintf(stream,"value=\"%s\"",(char *)key->data); if (key->comment) written+=fprintf(stream,">\n"); else { written+=fprintf(stream,"/>"); if (!(options & KDB_O_CONDENSED)) written+=fprintf(stream,"\n"); return written; } } else { /* value is bigger than 16 bytes: deserves own */ written+=fprintf(stream,">"); if (!(options & KDB_O_CONDENSED)) written+=fprintf(stream,"\n\n "); written+=fprintf(stream,""); if (keyIsString(key)) { /*TODO: is this for string?*/ written+=fprintf(stream,"data,sizeof(char),key->dataSize-1,stream); written+=fprintf(stream,"]]>"); } else { /* Binary values */ char *encoded=malloc(3*key->dataSize); size_t encodedSize; written+=fprintf(stream,"\n"); encodedSize=kdbbEncode(key->data,key->dataSize,encoded); fflush(stream); written+=fwrite(encoded,sizeof(char),encodedSize,stream); free(encoded); written+=fprintf(stream,"\n"); } /* fflush(stream); */ written+=fprintf(stream,""); } } else { /* we have no data */ if (key->comment) { written+=fprintf(stream,">"); if (!(options & KDB_O_CONDENSED)) written+=fprintf(stream,"\n"); } else { written+=fprintf(stream,"/>"); if (!(options & KDB_O_CONDENSED)) written+=fprintf(stream,"\n\n"); return written; } } } if (!(options & KDB_O_CONDENSED)) { written+=fprintf(stream,"\n"); if (key->comment) written+=fprintf(stream," "); } if (key->comment) { written+=fprintf(stream,"", key->comment); if (!(options & KDB_O_CONDENSED)) written+=fprintf(stream,"\n"); } written+=fprintf(stream,""); if (!(options & KDB_O_CONDENSED)) written+=fprintf(stream,"\n\n"); return written; } /** * Writes to @p stream an XML version of the @p ks object. * * String generated is of the form: * @verbatim ... ... ... * @endverbatim * * or if KDB_O_HIER is used, the form will be: * @verbatim ... ... ... * @endverbatim * * KDB_O_HEADER will additionally generate a header like: * @verbatim * @endverbatim * * @param ks the KeySet to serialize * @param stream where to write output: a file or stdout * @param options accepted #option_t ORed: * - @p option_t::KDB_O_NUMBERS \n * Do not convert UID and GID into user and group names. * - @p option_t::KDB_O_FULLNAME \n * The @c user keys are exported with their full names (including * user domains) * - @p option_t::KDB_O_CONDENSED \n * Less human readable, more condensed output. * - @p option_t::KDB_O_XMLHEADERS \n * Exclude the correct XML headers in the output. If not used, the * <?xml?> and schema info inside the <keyset> object will not be generated. * - @p option_t::KDB_O_HIER \n * Will generate a <keyset> node containing a @c parent attribute, and * <key> nodes with a @c basename relative to that @c parent. The @c parent * is calculated by taking the smallest key name in the keyset, so it is a * good idea to have only related keys on the keyset. Otherwise, a valid * consistent XML document still will be generated with regular absolute * @c name attribute for the <key> nodes, due to a * clever keyToStreamBasename() implementation. * * @see keyToStream() * @see commandList() for usage example * @return number of bytes written to output, or -1 if some error occurs * @ingroup stream * @param ks The keyset to output * @param stream the file pointer where to send the stream * @param options see above text */ ssize_t ksToStream(const KeySet *ks, FILE* stream, option_t options) { size_t written=0; Key *key=0; char *codeset = "UTF-8"; KeySet *cks = ksDup (ks); if (ksNeedSort(cks)) ksSort (cks); ksRewind (cks); if (options & KDB_O_HEADER) { written+=fprintf(stream,"", codeset); if (~options & KDB_O_CONDENSED) written+=fprintf(stream, "\n\n",(int)cks->size); if (~options & KDB_O_CONDENSED) written+=fprintf(stream,"\n", commonParent); ksRewind (cks); while ((key=ksNext (cks)) != 0) written+=keyToStreamBasename(key,stream,commonParent,0,options); } else { written+=fprintf(stream,">\n"); ksRewind (cks); while ((key=ksNext (cks)) != 0) written+=keyToStream(key,stream,options); } } else { /* No KDB_O_HIER*/ written+=fprintf(stream,">\n"); ksRewind (cks); while ((key=ksNext (cks)) != 0) written+=keyToStream(key,stream,options); } written+=fprintf(stream,"\n"); ksDel (cks); return written; } /** * Output every information of a single key depending on options. * * The format is not very strict and only intend to be read * by human eyes for debugging purposes. Don't rely on the * format in your applications. * * @param k the key object to work with * @param stream the file pointer where to send the stream * @param options see text above * @see ksOutput() * @return 1 on success * @return -1 on allocation errors * @ingroup stream */ int keyOutput (const Key * k, FILE *stream, option_t options) { time_t t; size_t s; char * tmc; char * str; size_t c; char * com; size_t n; char * nam; n = keyGetNameSize (k); if (n>1) { nam = (char*) malloc (n); if (nam == NULL) return -1; keyGetName (k, nam, n); fprintf(stream,"Name[%d]: %s : ", (int)n, nam); free (nam); } s = keyGetValueSize (k); if (options & KEY_VALUE && s>1) { str = (char*) malloc (s); if (str == NULL) return -1; if (keyIsBinary(k)) { /* char * bin; bin = (char*) malloc (s*3+1); keyGetBinary(k, str, s); kdbbEncode (str, s, bin); free (bin); */ keyGetBinary (k, str, s); fprintf(stream,"Binary[%d]: %s : ", (int)s, str); } else { keyGetString (k, str, s); fprintf(stream,"String[%d]: %s : ", (int)s, str); } free (str); } c = keyGetCommentSize (k); if (options & KEY_COMMENT && c>1) { com = (char*) malloc (c); if (com == NULL) return -1; keyGetComment (k, com, c); fprintf(stream,"Comment[%d]: %s : ", (int)c, com); free (com); } if (options & KDB_O_SHOWMETA) fprintf(stream," : "); if (options & KEY_TYPE) fprintf(stream,"Type: %d : ", keyGetType (k)); if (options & KEY_UID) fprintf(stream,"UID: %d : ", (int)keyGetUID (k)); if (options & KEY_GID) fprintf(stream,"GID: %d : ", (int)keyGetGID (k)); if (options & KEY_MODE) fprintf(stream,"Mode: %o : ", (int)keyGetMode (k)); if (options & KEY_ATIME) { t=keyGetATime(k); tmc = ctime (& t); tmc[24] = '\0'; fprintf(stream,"ATime: %s : ", tmc); } if (options & KEY_MTIME) { t=keyGetMTime(k); tmc = ctime (& t); tmc[24] = '\0'; fprintf(stream,"MTime: %s : ", tmc); } if (options & KEY_CTIME) { t=keyGetCTime(k); tmc = ctime (& t); tmc[24] = '\0'; fprintf(stream,"CTime: %s : ", tmc); } if (options & KDB_O_SHOWFLAGS) { if (!(options & KDB_O_SHOWMETA)) fprintf(stream, " "); fprintf (stream,"Flags: "); if (keyIsBinary(k)) fprintf(stream,"b"); if (keyIsString(k)) fprintf(stream,"s"); if (keyIsDir(k)) fprintf(stream,"d"); if (keyIsInactive(k)) fprintf(stream,"i"); if (keyNeedRemove(k)) fprintf(stream,"r"); if (keyNeedSync(k)) fprintf(stream,"s"); } fprintf(stream,"\n"); return 1; } /** * Output all information of a keyset. * * The format is not very strict and only intend to be read * by human eyes for debugging purposes. Don't rely on the * format in your applications. * * Keys are printed line per line with keyOutput(). * * The same options as keyOutput() are taken and passed * to them. * * Additional KDB_O_HEADER will print the number of keys * as first line. * * @param ks the keyset to work with * @param stream the file pointer where to send the stream * @param options * @see keyOutput() * @return 1 on success * @return -1 on allocation errors * @ingroup stream */ int ksOutput(const KeySet *ks, FILE *stream, option_t options) { Key *key; KeySet *cks = ksDup (ks); size_t size = 0; if (ksNeedSort(cks)) ksSort (cks); ksRewind (cks); if (KDB_O_HEADER & options) { fprintf(stream,"Output keyset of size %d\n", (int)ksGetSize(cks)); } while ( (key = ksNext(cks)) != NULL) { if (options & KDB_O_SHOWINDICES) fprintf(stream, "[%d] ", (int)size); keyOutput (key,stream,options); size ++; } ksDel (cks); return 1; } /** * Generate a C-Style key and stream it. * * This keyset can be used to include as c-code for * applikations using elektra. * * @param key the key object to work with * @param stream the file pointer where to send the stream * @param options KDB_O_SHOWINDICES, KDB_O_IGNORE_COMMENT, KDB_O_SHOWINFO * @return 1 on success * @ingroup stream */ int keyGenerate(const Key * key, FILE *stream, option_t options) { size_t s; char * str; size_t c; char * com; size_t n; char * nam; n = keyGetNameSize (key); if (n>1) { nam = (char*) malloc (n); if (nam == NULL) return -1; keyGetName (key, nam, n); fprintf(stream,"\n\tkeyNew (\"%s\"", nam); free (nam); } if (keyIsDir(key)) fprintf(stream,"\n\t\t, KEY_DIR"); s = keyGetValueSize (key); if (s>1) { str = (char*) malloc (s); if (str == NULL) return -1; if (keyIsBinary(key)) keyGetBinary(key, str, s); else keyGetString (key, str, s); fprintf(stream,"\n\t\t, KEY_VALUE, \"%s\"", str); free (str); } c = keyGetCommentSize (key); if (c>1) { com = (char*) malloc (c); if (com == NULL) return -1; keyGetComment (key, com, c); fprintf(stream,"\n\t\t, KEY_COMMENT, \"%s\"", com); free (com); } if (keyGetType(key) == KEY_TYPE_BINARY) fprintf(stream,"\n\t\t, KEY_TYPE, KEY_TYPE_BINARY"); else if (keyGetType(key) == KEY_TYPE_STRING) fprintf(stream,"\n\t\t, KEY_TYPE, KEY_TYPE_STRING"); else fprintf(stream,"\n\t\t, KEY_TYPE, %d", keyGetType(key)); // if (keyIsInactive(key)) fprintf(stream,"inactive"); // if (keyIsSystem(key)) fprintf(stream,"system"); // if (keyIsUser(key)) fprintf(stream,"user"); if (keyNeedRemove(key)) fprintf(stream, "\n\t\t, KEY_REMOVE"); if (keyNeedStat(key)) fprintf(stream, "\n\t\t, KEY_STAT"); if (! (keyGetMode(key) == 0664 || (keyGetMode(key) == 0775 && keyIsDir(key)))) { fprintf(stream,"\n\t\t, KEY_MODE, 0%3o", keyGetMode(key)); } fprintf(stream,"\n\t, KEY_END)"); if (options == 0) return 1; /* dummy to make icc happy */ return 1; } /** * Generate a C-Style keyset and stream it. * * This keyset can be used to include as c-code for * applikations using elektra. * * The options takes the same options as kdbGet() * and kdbSet(). * * @param ks the keyset to work with * @param stream the file pointer where to send the stream * @param options which keys not to output * @return 1 on success * @ingroup stream */ int ksGenerate (const KeySet *ks, FILE *stream, option_t options) { Key *key; size_t s = 0; KeySet *cks = ksDup (ks); if (ksNeedSort(cks)) ksSort (cks); ksRewind (cks); fprintf(stream,"ksNew( %d ,", (int)ksGetSize(cks)+10); while ((key=ksNext(cks)) != 0) { if (options & KDB_O_NODIR) if (key && keyIsDir (key)) continue; if (options & KDB_O_DIRONLY) if (key && !keyIsDir (key)) continue; if (options & KDB_O_INACTIVE) if (key && keyIsInactive (key)) continue; if (options & KDB_O_STATONLY) { keySetRaw (key, "", 0); keySetComment (key, ""); } s++; keyGenerate(key, stream, options); fprintf(stream,","); } fprintf(stream,"KS_END);\n"); ksDel (cks); return 1; } elektra-0.7.1/src/libhelper/0000777000076400001440000000000011365513212012707 500000000000000elektra-0.7.1/src/libhelper/Makefile.am0000644000076400001440000000071111365507606014670 00000000000000AM_CPPFLAGS = -I$(top_srcdir)/src/include sources = internal.c helper.c helper.h ../include/kdb.h ../include/kdbbackend.h noinst_LIBRARIES = libhelper-static.a libhelper_static_a_SOURCES = $(sources) libhelper_static_a_CFLAGS = -DELEKTRA_STATIC $(COPTFLAGS) $(CDBGFLAGS) noinst_LTLIBRARIES = libhelper-dynamic.la libhelper_dynamic_la_SOURCES = $(sources) libhelper_dynamic_la_CFLAGS = $(COPTFLAGS) $(CDBGFLAGS) clean-local: rm -f *.gcno *.gcda *.gcno elektra-0.7.1/src/libhelper/Makefile.in0000644000076400001440000005504711365511153014705 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = src/libhelper DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/extensions.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/config.h CONFIG_CLEAN_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru libhelper_static_a_AR = $(AR) $(ARFLAGS) libhelper_static_a_LIBADD = am__objects_1 = libhelper_static_a-internal.$(OBJEXT) \ libhelper_static_a-helper.$(OBJEXT) am_libhelper_static_a_OBJECTS = $(am__objects_1) libhelper_static_a_OBJECTS = $(am_libhelper_static_a_OBJECTS) LTLIBRARIES = $(noinst_LTLIBRARIES) libhelper_dynamic_la_LIBADD = am__objects_2 = libhelper_dynamic_la-internal.lo \ libhelper_dynamic_la-helper.lo am_libhelper_dynamic_la_OBJECTS = $(am__objects_2) libhelper_dynamic_la_OBJECTS = $(am_libhelper_dynamic_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/src/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libhelper_static_a_SOURCES) \ $(libhelper_dynamic_la_SOURCES) DIST_SOURCES = $(libhelper_static_a_SOURCES) \ $(libhelper_dynamic_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) INSTALL = @INSTALL@ ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BACKENDS = @BACKENDS@ BACKEND_VERSION_API = @BACKEND_VERSION_API@ BINDINGS = @BINDINGS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CDBGFLAGS = @CDBGFLAGS@ CFLAGS = @CFLAGS@ COPTFLAGS = @COPTFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSTDFLAGS = @CSTDFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDBGFLAGS = @CXXDBGFLAGS@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXOPTFLAGS = @CXXOPTFLAGS@ CXXSTDFLAGS = @CXXSTDFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_FALSE = @DEBUG_FALSE@ DEBUG_TRUE = @DEBUG_TRUE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ELEKTRATOOLS_VERSION_API = @ELEKTRATOOLS_VERSION_API@ ELEKTRA_VERSION_API = @ELEKTRA_VERSION_API@ EXEEXT = @EXEEXT@ EXPERIMENTAL_FALSE = @EXPERIMENTAL_FALSE@ EXPERIMENTAL_TRUE = @EXPERIMENTAL_TRUE@ F77 = @F77@ FFLAGS = @FFLAGS@ GENHTML = @GENHTML@ GREP = @GREP@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ HAVE_LIBLTDL_FALSE = @HAVE_LIBLTDL_FALSE@ HAVE_LIBLTDL_TRUE = @HAVE_LIBLTDL_TRUE@ HAVE_MAN2HTML_FALSE = @HAVE_MAN2HTML_FALSE@ HAVE_MAN2HTML_TRUE = @HAVE_MAN2HTML_TRUE@ HAVE_XML_FALSE = @HAVE_XML_FALSE@ HAVE_XML_TRUE = @HAVE_XML_TRUE@ HAVE_XSL_FALSE = @HAVE_XSL_FALSE@ HAVE_XSL_TRUE = @HAVE_XSL_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDB_VERSION = @KDB_VERSION@ KDB_VERSION_MAJOR = @KDB_VERSION_MAJOR@ KDB_VERSION_MAJORMINOR = @KDB_VERSION_MAJORMINOR@ KDB_VERSION_MICRO = @KDB_VERSION_MICRO@ KDB_VERSION_MINOR = @KDB_VERSION_MINOR@ LCOV = @LCOV@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VALGRIND = @VALGRIND@ VALGRINDTESTS_FALSE = @VALGRINDTESTS_FALSE@ VALGRINDTESTS_TRUE = @VALGRINDTESTS_TRUE@ VERSION = @VERSION@ XML2_CONFIG = @XML2_CONFIG@ XML_CPPFLAGS = @XML_CPPFLAGS@ XML_LIBS = @XML_LIBS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ backend_static_libs = @backend_static_libs@ backenddir = @backenddir@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ datarootdir = @datarootdir@ dbroot = @dbroot@ default_backend = @default_backend@ default_dbackend = @default_dbackend@ default_docbook = @default_docbook@ develdocdir = @develdocdir@ docdir = @docdir@ doxygen = @doxygen@ dvidir = @dvidir@ elektratools = @elektratools@ exec_prefix = @exec_prefix@ gconf_CFLAGS = @gconf_CFLAGS@ gconf_LIBS = @gconf_LIBS@ hlvlbackenddir = @hlvlbackenddir@ 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@ man2html = @man2html@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ privatelibs = @privatelibs@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ ulibdir = @ulibdir@ xsltproc = @xsltproc@ AM_CPPFLAGS = -I$(top_srcdir)/src/include sources = internal.c helper.c helper.h ../include/kdb.h ../include/kdbbackend.h noinst_LIBRARIES = libhelper-static.a libhelper_static_a_SOURCES = $(sources) libhelper_static_a_CFLAGS = -DELEKTRA_STATIC $(COPTFLAGS) $(CDBGFLAGS) noinst_LTLIBRARIES = libhelper-dynamic.la libhelper_dynamic_la_SOURCES = $(sources) libhelper_dynamic_la_CFLAGS = $(COPTFLAGS) $(CDBGFLAGS) all: all-am .SUFFIXES: .SUFFIXES: .c .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 \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/libhelper/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/libhelper/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libhelper-static.a: $(libhelper_static_a_OBJECTS) $(libhelper_static_a_DEPENDENCIES) -rm -f libhelper-static.a $(libhelper_static_a_AR) libhelper-static.a $(libhelper_static_a_OBJECTS) $(libhelper_static_a_LIBADD) $(RANLIB) libhelper-static.a clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libhelper-dynamic.la: $(libhelper_dynamic_la_OBJECTS) $(libhelper_dynamic_la_DEPENDENCIES) $(LINK) $(libhelper_dynamic_la_LDFLAGS) $(libhelper_dynamic_la_OBJECTS) $(libhelper_dynamic_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhelper_dynamic_la-helper.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhelper_dynamic_la-internal.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhelper_static_a-helper.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhelper_static_a-internal.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< libhelper_static_a-internal.o: internal.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhelper_static_a_CFLAGS) $(CFLAGS) -MT libhelper_static_a-internal.o -MD -MP -MF "$(DEPDIR)/libhelper_static_a-internal.Tpo" -c -o libhelper_static_a-internal.o `test -f 'internal.c' || echo '$(srcdir)/'`internal.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libhelper_static_a-internal.Tpo" "$(DEPDIR)/libhelper_static_a-internal.Po"; else rm -f "$(DEPDIR)/libhelper_static_a-internal.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='internal.c' object='libhelper_static_a-internal.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhelper_static_a_CFLAGS) $(CFLAGS) -c -o libhelper_static_a-internal.o `test -f 'internal.c' || echo '$(srcdir)/'`internal.c libhelper_static_a-internal.obj: internal.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhelper_static_a_CFLAGS) $(CFLAGS) -MT libhelper_static_a-internal.obj -MD -MP -MF "$(DEPDIR)/libhelper_static_a-internal.Tpo" -c -o libhelper_static_a-internal.obj `if test -f 'internal.c'; then $(CYGPATH_W) 'internal.c'; else $(CYGPATH_W) '$(srcdir)/internal.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libhelper_static_a-internal.Tpo" "$(DEPDIR)/libhelper_static_a-internal.Po"; else rm -f "$(DEPDIR)/libhelper_static_a-internal.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='internal.c' object='libhelper_static_a-internal.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhelper_static_a_CFLAGS) $(CFLAGS) -c -o libhelper_static_a-internal.obj `if test -f 'internal.c'; then $(CYGPATH_W) 'internal.c'; else $(CYGPATH_W) '$(srcdir)/internal.c'; fi` libhelper_static_a-helper.o: helper.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhelper_static_a_CFLAGS) $(CFLAGS) -MT libhelper_static_a-helper.o -MD -MP -MF "$(DEPDIR)/libhelper_static_a-helper.Tpo" -c -o libhelper_static_a-helper.o `test -f 'helper.c' || echo '$(srcdir)/'`helper.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libhelper_static_a-helper.Tpo" "$(DEPDIR)/libhelper_static_a-helper.Po"; else rm -f "$(DEPDIR)/libhelper_static_a-helper.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='helper.c' object='libhelper_static_a-helper.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhelper_static_a_CFLAGS) $(CFLAGS) -c -o libhelper_static_a-helper.o `test -f 'helper.c' || echo '$(srcdir)/'`helper.c libhelper_static_a-helper.obj: helper.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhelper_static_a_CFLAGS) $(CFLAGS) -MT libhelper_static_a-helper.obj -MD -MP -MF "$(DEPDIR)/libhelper_static_a-helper.Tpo" -c -o libhelper_static_a-helper.obj `if test -f 'helper.c'; then $(CYGPATH_W) 'helper.c'; else $(CYGPATH_W) '$(srcdir)/helper.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libhelper_static_a-helper.Tpo" "$(DEPDIR)/libhelper_static_a-helper.Po"; else rm -f "$(DEPDIR)/libhelper_static_a-helper.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='helper.c' object='libhelper_static_a-helper.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhelper_static_a_CFLAGS) $(CFLAGS) -c -o libhelper_static_a-helper.obj `if test -f 'helper.c'; then $(CYGPATH_W) 'helper.c'; else $(CYGPATH_W) '$(srcdir)/helper.c'; fi` libhelper_dynamic_la-internal.lo: internal.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhelper_dynamic_la_CFLAGS) $(CFLAGS) -MT libhelper_dynamic_la-internal.lo -MD -MP -MF "$(DEPDIR)/libhelper_dynamic_la-internal.Tpo" -c -o libhelper_dynamic_la-internal.lo `test -f 'internal.c' || echo '$(srcdir)/'`internal.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libhelper_dynamic_la-internal.Tpo" "$(DEPDIR)/libhelper_dynamic_la-internal.Plo"; else rm -f "$(DEPDIR)/libhelper_dynamic_la-internal.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='internal.c' object='libhelper_dynamic_la-internal.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhelper_dynamic_la_CFLAGS) $(CFLAGS) -c -o libhelper_dynamic_la-internal.lo `test -f 'internal.c' || echo '$(srcdir)/'`internal.c libhelper_dynamic_la-helper.lo: helper.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhelper_dynamic_la_CFLAGS) $(CFLAGS) -MT libhelper_dynamic_la-helper.lo -MD -MP -MF "$(DEPDIR)/libhelper_dynamic_la-helper.Tpo" -c -o libhelper_dynamic_la-helper.lo `test -f 'helper.c' || echo '$(srcdir)/'`helper.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libhelper_dynamic_la-helper.Tpo" "$(DEPDIR)/libhelper_dynamic_la-helper.Plo"; else rm -f "$(DEPDIR)/libhelper_dynamic_la-helper.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='helper.c' object='libhelper_dynamic_la-helper.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libhelper_dynamic_la_CFLAGS) $(CFLAGS) -c -o libhelper_dynamic_la-helper.lo `test -f 'helper.c' || echo '$(srcdir)/'`helper.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-local \ clean-noinstLIBRARIES clean-noinstLTLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: 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-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-local clean-noinstLIBRARIES \ clean-noinstLTLIBRARIES ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-exec install-exec-am \ install-info install-info-am install-man install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-info-am clean-local: rm -f *.gcno *.gcda *.gcno # 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: elektra-0.7.1/src/libhelper/helper.c0000644000076400001440000004756511365506635014302 00000000000000/*************************************************************************** helper.c - Helpers for backends ------------------- begin : Mon Dec 29 2003 copyright : (C) 2003 by Avi Alkalay email : avi@unix.sh ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ #include "helper.h" /** * @defgroup backendhelper KDB Backends :: Backend Helper for Elektra * @brief Backend helper Methods for Elektra and Backends. * * To use them: * @code * #include * @endcode * * These backend helper methods provide * functionality commonly used by backends to make backend * development easier and to provide the same behaviour * between backends. * */ /** * Locks file for exclusive write mode. * * This function will block until all reader * and writer have left the file. * * @param f is a valid filedescriptor * @return 0 on success * @return -1 on failure * @ingroup backendhelper * @err sets KDB_ERR_NOLOCK when locking failed */ int kdbbWriteLock (FILE *f) { #ifdef HAVE_FCNTL_H int fd = fileno(f); struct flock l; int ret=0; l.l_type = F_WRLCK; /*Do exclusive Lock*/ l.l_start= 0; /*Start at begin*/ l.l_whence = SEEK_SET; l.l_len = 0; /*Do it with whole file*/ ret = fcntl (fd, F_SETLKW, &l); return ret; #else return 0; #endif } /** * Locks file for read mode. * * Other processes and threads are allowed to read the * file too simultaneous. * * @param f is a valid filedescriptor * @return 0 on success * @return -1 on failure * @ingroup backendhelper * @err sets KDB_ERR_NOLOCK when locking failed */ int kdbbReadLock (FILE *f) { #ifdef HAVE_FCNTL_H int ret=0; int fd = fileno(f); struct flock l; l.l_type = F_WRLCK; /*Do exclusive Lock*/ l.l_start= 0; /*Start at begin*/ l.l_whence = SEEK_SET; l.l_len = 0; /*Do it with whole file*/ ret = fcntl (fd, F_SETLKW, &l); return ret; #else return 0; #endif } /** * Unlocks file. * * @param f is a valid filedescriptor * @return 0 on success * @return -1 on failure * @ingroup backendhelper * @err sets KDB_ERR_NOLOCK when locking failed */ int kdbbUnlock (FILE *f) { #ifdef HAVE_FCNTL_H int ret=0; int fd = fileno(f); struct flock l; l.l_type = F_UNLCK; /*Give Lock away*/ l.l_start= 0; /*Start at begin*/ l.l_whence = SEEK_SET; l.l_len = 0; /*Do it with whole file*/ ret = fcntl (fd, F_SETLKW, &l); return ret; #else return 0; #endif } /** * Encodes a buffer of data onto hexadecimal ASCII. * * The resulting data is made up of pairs of ASCII hex-digits, * space- and newline-separated. This is the counterpart of * kdbbDecode(). * * The @c returned must allocated prior you call this function and won't * be bigger than 3 times the size of the source @c kdbbDecoded + 1 byte. * * * @param kdbbDecoded the source buffer. * @param size the size of the source buffer in bytes. * @param returned the preallocated destination for the ASCII-kdbbEncoded data. * @return the amount of bytes used in the resulting kdbbEncoded buffer. * @see kdbbDecode() * @ingroup backendhelper */ ssize_t kdbbEncode(void *kdbbDecoded, size_t size, char *returned) { char *readCursor=kdbbDecoded; char *writeCursor=returned; int blockStep=4; /* 4 bytes per block */ int lineStep=8*blockStep; /* 8 blocks per line */ int currentInBlock=0; int currentInLine=0; if ( size == 0 ) return 0; while ((readCursor-(char *)kdbbDecoded)= (3*sizeof(char)) ) { memcpy(buffer, "%25", sizeof("%25")); return (3*sizeof(char)); } return -1; case '+': if ( bufSize >= (3*sizeof(char)) ) { memcpy(buffer, "%2B", sizeof("%2B")); return (3*sizeof(char)); } return -1; case ' ': if ( bufSize >= 1*sizeof(char) ) { *(buffer) = '+'; return (1*sizeof(char)); } return -1; case '/': if ( bufSize >= (3*sizeof(char)) ) { memcpy(buffer, "%2F", sizeof("%2F")); return (3*sizeof(char)); } return -1; case '\\': if ( bufSize >= (3*sizeof(char)) ) { memcpy(buffer, "%5C", sizeof("%5C")); return (3*sizeof(char)); } return -1; default: if ( bufSize >= (1*sizeof(char)) ) { *(buffer++) = c; return (1*sizeof(char)); } return -1; } return 0; } /** * Char decoding. * * Decode one char from %25, %2B, %2F, %2C following * RFC 2396 or copy char untouched if different. * * @param from String containing sequence to decode * @param into Decoded char * @return: Positive size of byte read from "from" for decoding * the sequence if sucess or -1 if error (into untouched) * @ingroup backendhelper * @see kdbbEncodeChar * * NOTE: No '\\0' is added at the end of buffer. * */ int kdbbDecodeChar(const char *from, char *into) { switch(*from) { case '%': if ( strlen(from) >= (3*sizeof(char)) ) { switch(*(from+2)) { case '5': *into = '%'; break; case 'B': *into = '+'; break; case 'F': *into = '/'; break; case 'C': *into = '\\'; break; default: return -1; } return (3*sizeof(char)); } return -1; case '+': *into = ' '; return (1*sizeof(char)); default: *into = *from; return (1*sizeof(char)); } return 0; } /** * Translate a relative file name to a key name * applying decoding. * * @param string Filename * @param buffer decoded keyName * @param bufSize Size of buffer * @return 0 on success * @return -1 on failure * @ingroup backendhelper * @see kdbbKeyNameToRelativeFilename * */ int kdbbFilenameToKeyName(const char *string, char *buffer, int bufSize) { char decoded; int j; while (*string != '\0') { if (bufSize <= sizeof(char)) { /*errno = KDB_ERR_TOOLONG;*/ return -1; } if ( *string == PATH_SEPARATOR ) { /* Translate PATH_SEPARATOR into KEY_SEPARATOR */ *(buffer++) = KEY_SEPARATOR; bufSize -= sizeof(char); string++; } else { /* Decode char */ if ( (j = kdbbDecodeChar(string, &decoded)) != -1 ) { string += j; *(buffer++) = decoded; bufSize -= sizeof(char); } else { *(buffer) = '\0'; /*errno = KDB_ERR_CONVERT;*/ return -1; } } } *buffer = '\0'; return 0; } /**Calculates the keyname out of a relative filename. * * @param handle The kdb handle to work with * @param forFilename needs to be the a null terminated string containing the relative filename * @param parentKey is the key above the key which will be returned * @param returned The proper keyname and owner will be stored in returned. A valid key must be passed. * @return number of bytes written to the buffer, or 0 on error * @ingroup backendhelper * @return length of returned string on success * @return -1 on failure * @see kdbbKeyNameToRelativeFilename() */ ssize_t kdbbGetFullKeyName (KDB *handle, const char *forFilename, const Key *parentKey, Key *returned) { size_t size=0; char *transformedName=0; char *name; /* Next 2 ifs are required to transform filename from UTF-8 */ transformedName = malloc(size=kdbiStrLen(forFilename)); strcpy(transformedName,forFilename); if (kdbbUTF8Engine(UTF8_FROM,&transformedName,&size)) { free(transformedName); /*errno = KDB_ERR_CONVERT;*/ return -1; } /* Translate from filename -> keyname and concat it into name */ name = (char *) malloc(size*3 + keyGetNameSize(parentKey)); strcpy (name, keyName(parentKey)); name[keyGetNameSize(parentKey)-1] = '/'; kdbbFilenameToKeyName(transformedName, name+keyGetNameSize(parentKey), size*3); /* Now set the name and owner */ keySetName (returned, name); keySetOwner(returned, keyOwner(parentKey)); free(transformedName); free(name); return 0; } /** * Translate a key name to a relative file name * applying encoding. * * @param string Keyname * @param buffer kdbbEncoded filename * @param bufSize Size of buffer * @return Number of byte written in buffer on success, * @return -1 on failure * @ingroup backendhelper * @see kdbbKeyNameToRelativeFilename * **/ int kdbbKeyNameToRelativeFilename(const char *string, char *buffer, size_t bufSize) { size_t written; int j; written = 0; while (*string != '\0') { if (bufSize <= sizeof(char)) { /*errno = KDB_ERR_TOOLONG;*/ return -1; } if ( *string == ESCAPE_CHAR && *(string+1) == PATH_SEPARATOR ) { /* Key delimiter escaped, kdbbEncode these two (escape + delim) */ if ( (j = kdbbEncodeChar(*(string++), buffer, bufSize)) != -1 ) { bufSize -= j*sizeof(char); buffer += j; written += j*sizeof(char); } else { /*errno = KDB_ERR_CONVERT;*/ return -1; } if ( (j = kdbbEncodeChar(*(string++), buffer, bufSize)) != -1 ) { bufSize -= j*sizeof(char); written += j*sizeof(char); buffer += j; } else { /*errno = KDB_ERR_CONVERT;*/ return -1; } } else if ( *string == PATH_SEPARATOR ) { /* Replace unescaped KEY_DELIM to PATH_SEPARATOR */ *(buffer++) = PATH_SEPARATOR; bufSize -= sizeof(char); written += sizeof(char); string++; } else { /* Encode ... */ if ( (j = kdbbEncodeChar(*(string++), buffer, bufSize)) != -1 ) { bufSize -= j*sizeof(char); written += j*sizeof(char); buffer += j; } else { /*errno = KDB_ERR_CONVERT;*/ return -1; } } } *buffer = '\0'; written++; return written; } /** * This is a helper to kdbGetFullFilename() * * @param key has the relevant name for the relative filename * @param relativeFilename the buffer to return the calculated filename * @param maxSize maximum number of bytes that fit the buffer * @see kdbGetFullFilename() * @return number of bytes written to the buffer * @return -1 on failure * @ingroup backendhelper */ ssize_t kdbbKeyCalcRelativeFilename(const Key *key,char *relativeFilename,size_t maxSize) { if (kdbbNeedsUTF8Conversion()) { char *converted; size_t size; if (!(size=keyGetNameSize(key))) return -1; converted = (char *) malloc(MAX_PATH_LENGTH); size = kdbbKeyNameToRelativeFilename(keyName(key), converted, MAX_PATH_LENGTH); /* memcpy(converted,relativeFilename,convertedSize); */ if (kdbbUTF8Engine(UTF8_TO,&converted,&size)) { free(converted); /*errno = KDB_ERR_CONVERT;*/ return -1; } if (size>maxSize) { free(converted); /*errno=KDB_ERR_TOOLONG;*/ return -1; } memcpy(relativeFilename,converted,size); free(converted); return size; } else { return kdbbKeyNameToRelativeFilename(keyName(key), relativeFilename, maxSize); } return -1; } /** * Calculate the real file name for a key. * * system/ keys will get the prefix KDB_DB_SYSTEM * * For the user/ keys the algorithm works as follow: * 1.) When the override environment KDB_HOME exists the configuration will be searched below KDB_HOME/KDB_DB_USER * 2.) When the owner of the key exists in the elektra user database steps a.) and b.) will be tested: * a.) The specific value for configuration storage of the user below system/users/\/kdb * b.) The home variable in system/users/\/home will be merged together with KDB_DB_USER * 3.) When the environment HOME exists the configuration will be searched below HOME/KDB_DB_USER * 4.) Otherwise the KDB_DB_HOME/\/KDB_DB_USER will be used * * @param forKey the key object to work with * @param handle the kdb handle to work with * @param returned the buffer to return the calculated filename * @param maxSize maximum number of bytes that fit the buffer * @see kdbCalcRelativeFilename() * @return number of bytes written to the buffer, or 0 on error * @ingroup backendhelper * @return length of returned string on success * @return -1 on failure */ ssize_t kdbbGetFullFilename(KDB *handle, const Key *forKey,char *returned,size_t maxSize) { ssize_t length=0; char * home; char buffer [MAX_PATH_LENGTH] = KDB_KEY_USERS; ssize_t rc; switch (keyGetNamespace(forKey)) { case KEY_NS_SYSTEM: { /* Prepare to use the 'system/ *' database */ strncpy(returned,KDB_DB_SYSTEM,maxSize); length=strlen(returned); break; } /* If we lack a usable concept of users we simply let the default handle it * and hence disable the entire user/ hiarchy. */ case KEY_NS_USER: { if ((home = getenv("KDB_DIR")) != 0) { length=snprintf(returned,maxSize,"%s",home); break; } if ((home = getenv("KDB_HOME")) != 0) { length=snprintf(returned,maxSize,"%s/%s",home,KDB_DB_USER); break; } strcat (buffer, "/"); strcat (buffer, keyOwner(forKey)); strcat (buffer, "/kdb"); length=kdbGetString (handle, buffer, returned, maxSize)-1; if (length > 0) { break; } strcpy (buffer, KDB_KEY_USERS); strcat (buffer, "/"); strcat (buffer, keyOwner(forKey)); strcat (buffer, "/home"); length=kdbGetString (handle, buffer, returned, maxSize)-1; if (length > 0) { strcpy (buffer, returned); length=snprintf(returned,maxSize,"%s/%s",buffer, KDB_DB_USER); break; } if ((home = getenv("HOME")) != 0) { length=snprintf(returned,maxSize,"%s/%s",home,KDB_DB_USER); break; } length=snprintf(returned,maxSize,"%s/%s/%s",KDB_DB_HOME, keyOwner(forKey), KDB_DB_USER); break; } default: { /*errno=KDB_ERR_INVALIDKEY;*/ return -1; } } returned[length]='/'; length++; if (maxSize <= length) { /*errno=KDB_ERR_TOOLONG;*/ return -1; } rc=kdbbKeyCalcRelativeFilename(forKey,returned+length,maxSize-length); if (rc == -1) return -1; else length += rc; return length; } elektra-0.7.1/src/libhelper/helper.h0000644000076400001440000000131511365506635014266 00000000000000#ifndef HELPERS_H #define HELPERS_H #ifdef HAVE_CONFIG_H #include "config.h" #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_ICONV #include #endif #ifdef HAVE_LOCALE_H #include #endif #ifdef HAVE_LANGINFO_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_SYS_STAT_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_FCNTL_H #include #endif #ifdef HAVE_STDIO_H #include #endif #ifdef HAVE_CTYPE_H #include #endif #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #include #endif elektra-0.7.1/src/libhelper/internal.c0000644000076400001440000001060211365506635014615 00000000000000/*************************************************************************** internal.c - Helper functions for elektra ------------------- begin : Mon Dec 29 2003 copyright : (C) 2003 by Avi Alkalay email : avi@unix.sh ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ /** * @defgroup internal KDB Backends :: Internal Helper for Elektra * @brief Internal Methods for Elektra and Backends. * * To use them: * @code * #include * @endcode * * There are some areas where libraries have to reimplement * some basic functions to archive support for non-standard * systems, for testing purposes or to provide a little more * convenience. * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #if DEBUG && HAVE_STDIO_H #include #endif #ifdef HAVE_STDARG_H #include #endif #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_ERRNO_H #include #endif #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_CTYPE_H #include #endif #include "kdbbackend.h" /**Compare Strings ignoring case. * * @param s1 The first string to be compared * @param s2 The second string to be compared * * @ingroup internal * @return a negative number if s1 is less than s2 * @return 0 if s1 matches s2 * @return a positive number if s1 is greater than s2 **/ int kdbiStrCaseCmp (const char *s1, const char *s2) { const unsigned char *p1 = (const unsigned char *)s1; const unsigned char *p2 = (const unsigned char *)s2; int result; if (p1 == p2) return 0; while ((result = tolower(*p1)-tolower(*p2 ++)) == 0) { if (*p1++ == '\0') break; } return result; } /**Reallocate Storage in a save way. * *@code if (kdbiRealloc ((void **) & buffer, new_length) < 0) { // here comes the failure handler // you can still use the old buffer #if DEBUG fprintf (stderr, "Reallocation error\n"); #endif free (buffer); buffer = 0; // return with error } *@endcode * * @param buffer is a pointer to a malloc * @param size is the new size for the memory * @return -1 on failure * @return 0 on success * @ingroup internal */ int kdbiRealloc (void ** buffer, size_t size) { void * ptr; void * svr = *buffer; ptr = realloc(*buffer, size); if (ptr == NULL) { *buffer = svr; /* restore old buffer*/ return -1; } else { *buffer = ptr; return 0; } } /**Allocate memory for elektra or backends. * *@code if ((buffer = kdbiMalloc (length)) == 0) { // here comes the failure handler // no allocation happened here, so dont use buffer #if DEBUG fprintf (stderr, "Allocation error"); #endif // return with error } *@endcode * *@param size the requested size * * This function is compatible to ANSI-C malloc *@see kdbiFree*/ void* kdbiMalloc (size_t size) { return malloc (size); } /**Free memory of elektra or its backends. * *@param ptr the pointer to free * * @ingroup internal *@see kdbiMalloc */ void kdbiFree (void *ptr) { free (ptr); } /**Copy string into new allocated memory. * * You need to free the memory yourself. * * @param s the null-terminated string to duplicate * * @ingroup internal * @see kdbiFree * @see kdbiStrLen */ char *kdbiStrDup (const char *s) { void *tmp = 0; if (s) { tmp = kdbiMalloc (kdbiStrLen(s)); if (tmp) strcpy (tmp, s); } return tmp; } /** * Calculates the length in bytes of a string. * * This function differs from strlen() because it is Unicode and multibyte * chars safe. While strlen() counts characters and ignores the final NULL, * kdbiStrLen() count bytes including the ending NULL. * * @ingroup internal * @param s the string to get the length from * @return number of bytes used by the string, including the final NULL. * @ingroup internal */ size_t kdbiStrLen(const char *s) { char *found=strchr(s,0); if (found) return found-s+1; return 0; } elektra-0.7.1/src/libloader/0000777000076400001440000000000011365513212012676 500000000000000elektra-0.7.1/src/libloader/Makefile.am0000644000076400001440000000121111365507606014653 00000000000000# $Id$ AM_CPPFLAGS = -DBACKEND_LIBDIR="\"$(backenddir):$(hlvlbackenddir):$(ulibdir):$(libdir)\"" INCLUDES = -I$(top_srcdir)/src/include if HAVE_LIBLTDL INCLUDES += $(INCLTDL) endif noinst_LIBRARIES = libloader-static.a libloader_static_a_SOURCES = kdbLibLoader.c ../include/kdbloader.h ../include/ltdl.h libloader_static_a_CFLAGS = -DELEKTRA_STATIC $(COPTFLAGS) $(CDBGFLAGS) noinst_LTLIBRARIES = libloader-dynamic.la libloader_dynamic_la_SOURCES = kdbLibLoader.c ../include/kdbloader.h ../include/ltdl.h libloader_dynamic_la_LIBADD = $(LIBLTDL) libloader_dynamic_la_CFLAGS = $(COPTFLAGS) $(CDBGFLAGS) clean-local: rm -f *.gcno *.gcda *.gcno elektra-0.7.1/src/libloader/Makefile.in0000644000076400001440000004727211365511154014676 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ # $Id$ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ @HAVE_LIBLTDL_TRUE@am__append_1 = $(INCLTDL) subdir = src/libloader DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/extensions.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/config.h CONFIG_CLEAN_FILES = LIBRARIES = $(noinst_LIBRARIES) ARFLAGS = cru libloader_static_a_AR = $(AR) $(ARFLAGS) libloader_static_a_LIBADD = am_libloader_static_a_OBJECTS = \ libloader_static_a-kdbLibLoader.$(OBJEXT) libloader_static_a_OBJECTS = $(am_libloader_static_a_OBJECTS) LTLIBRARIES = $(noinst_LTLIBRARIES) am__DEPENDENCIES_1 = libloader_dynamic_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am_libloader_dynamic_la_OBJECTS = \ libloader_dynamic_la-kdbLibLoader.lo libloader_dynamic_la_OBJECTS = $(am_libloader_dynamic_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/src/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libloader_static_a_SOURCES) \ $(libloader_dynamic_la_SOURCES) DIST_SOURCES = $(libloader_static_a_SOURCES) \ $(libloader_dynamic_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) INSTALL = @INSTALL@ ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BACKENDS = @BACKENDS@ BACKEND_VERSION_API = @BACKEND_VERSION_API@ BINDINGS = @BINDINGS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CDBGFLAGS = @CDBGFLAGS@ CFLAGS = @CFLAGS@ COPTFLAGS = @COPTFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSTDFLAGS = @CSTDFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDBGFLAGS = @CXXDBGFLAGS@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXOPTFLAGS = @CXXOPTFLAGS@ CXXSTDFLAGS = @CXXSTDFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_FALSE = @DEBUG_FALSE@ DEBUG_TRUE = @DEBUG_TRUE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ELEKTRATOOLS_VERSION_API = @ELEKTRATOOLS_VERSION_API@ ELEKTRA_VERSION_API = @ELEKTRA_VERSION_API@ EXEEXT = @EXEEXT@ EXPERIMENTAL_FALSE = @EXPERIMENTAL_FALSE@ EXPERIMENTAL_TRUE = @EXPERIMENTAL_TRUE@ F77 = @F77@ FFLAGS = @FFLAGS@ GENHTML = @GENHTML@ GREP = @GREP@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ HAVE_LIBLTDL_FALSE = @HAVE_LIBLTDL_FALSE@ HAVE_LIBLTDL_TRUE = @HAVE_LIBLTDL_TRUE@ HAVE_MAN2HTML_FALSE = @HAVE_MAN2HTML_FALSE@ HAVE_MAN2HTML_TRUE = @HAVE_MAN2HTML_TRUE@ HAVE_XML_FALSE = @HAVE_XML_FALSE@ HAVE_XML_TRUE = @HAVE_XML_TRUE@ HAVE_XSL_FALSE = @HAVE_XSL_FALSE@ HAVE_XSL_TRUE = @HAVE_XSL_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDB_VERSION = @KDB_VERSION@ KDB_VERSION_MAJOR = @KDB_VERSION_MAJOR@ KDB_VERSION_MAJORMINOR = @KDB_VERSION_MAJORMINOR@ KDB_VERSION_MICRO = @KDB_VERSION_MICRO@ KDB_VERSION_MINOR = @KDB_VERSION_MINOR@ LCOV = @LCOV@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VALGRIND = @VALGRIND@ VALGRINDTESTS_FALSE = @VALGRINDTESTS_FALSE@ VALGRINDTESTS_TRUE = @VALGRINDTESTS_TRUE@ VERSION = @VERSION@ XML2_CONFIG = @XML2_CONFIG@ XML_CPPFLAGS = @XML_CPPFLAGS@ XML_LIBS = @XML_LIBS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ backend_static_libs = @backend_static_libs@ backenddir = @backenddir@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ datarootdir = @datarootdir@ dbroot = @dbroot@ default_backend = @default_backend@ default_dbackend = @default_dbackend@ default_docbook = @default_docbook@ develdocdir = @develdocdir@ docdir = @docdir@ doxygen = @doxygen@ dvidir = @dvidir@ elektratools = @elektratools@ exec_prefix = @exec_prefix@ gconf_CFLAGS = @gconf_CFLAGS@ gconf_LIBS = @gconf_LIBS@ hlvlbackenddir = @hlvlbackenddir@ 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@ man2html = @man2html@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ privatelibs = @privatelibs@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ ulibdir = @ulibdir@ xsltproc = @xsltproc@ AM_CPPFLAGS = -DBACKEND_LIBDIR="\"$(backenddir):$(hlvlbackenddir):$(ulibdir):$(libdir)\"" INCLUDES = -I$(top_srcdir)/src/include $(am__append_1) noinst_LIBRARIES = libloader-static.a libloader_static_a_SOURCES = kdbLibLoader.c ../include/kdbloader.h ../include/ltdl.h libloader_static_a_CFLAGS = -DELEKTRA_STATIC $(COPTFLAGS) $(CDBGFLAGS) noinst_LTLIBRARIES = libloader-dynamic.la libloader_dynamic_la_SOURCES = kdbLibLoader.c ../include/kdbloader.h ../include/ltdl.h libloader_dynamic_la_LIBADD = $(LIBLTDL) libloader_dynamic_la_CFLAGS = $(COPTFLAGS) $(CDBGFLAGS) all: all-am .SUFFIXES: .SUFFIXES: .c .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 \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/libloader/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/libloader/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libloader-static.a: $(libloader_static_a_OBJECTS) $(libloader_static_a_DEPENDENCIES) -rm -f libloader-static.a $(libloader_static_a_AR) libloader-static.a $(libloader_static_a_OBJECTS) $(libloader_static_a_LIBADD) $(RANLIB) libloader-static.a clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libloader-dynamic.la: $(libloader_dynamic_la_OBJECTS) $(libloader_dynamic_la_DEPENDENCIES) $(LINK) $(libloader_dynamic_la_LDFLAGS) $(libloader_dynamic_la_OBJECTS) $(libloader_dynamic_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libloader_dynamic_la-kdbLibLoader.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libloader_static_a-kdbLibLoader.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< libloader_static_a-kdbLibLoader.o: kdbLibLoader.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libloader_static_a_CFLAGS) $(CFLAGS) -MT libloader_static_a-kdbLibLoader.o -MD -MP -MF "$(DEPDIR)/libloader_static_a-kdbLibLoader.Tpo" -c -o libloader_static_a-kdbLibLoader.o `test -f 'kdbLibLoader.c' || echo '$(srcdir)/'`kdbLibLoader.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libloader_static_a-kdbLibLoader.Tpo" "$(DEPDIR)/libloader_static_a-kdbLibLoader.Po"; else rm -f "$(DEPDIR)/libloader_static_a-kdbLibLoader.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kdbLibLoader.c' object='libloader_static_a-kdbLibLoader.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libloader_static_a_CFLAGS) $(CFLAGS) -c -o libloader_static_a-kdbLibLoader.o `test -f 'kdbLibLoader.c' || echo '$(srcdir)/'`kdbLibLoader.c libloader_static_a-kdbLibLoader.obj: kdbLibLoader.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libloader_static_a_CFLAGS) $(CFLAGS) -MT libloader_static_a-kdbLibLoader.obj -MD -MP -MF "$(DEPDIR)/libloader_static_a-kdbLibLoader.Tpo" -c -o libloader_static_a-kdbLibLoader.obj `if test -f 'kdbLibLoader.c'; then $(CYGPATH_W) 'kdbLibLoader.c'; else $(CYGPATH_W) '$(srcdir)/kdbLibLoader.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libloader_static_a-kdbLibLoader.Tpo" "$(DEPDIR)/libloader_static_a-kdbLibLoader.Po"; else rm -f "$(DEPDIR)/libloader_static_a-kdbLibLoader.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kdbLibLoader.c' object='libloader_static_a-kdbLibLoader.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libloader_static_a_CFLAGS) $(CFLAGS) -c -o libloader_static_a-kdbLibLoader.obj `if test -f 'kdbLibLoader.c'; then $(CYGPATH_W) 'kdbLibLoader.c'; else $(CYGPATH_W) '$(srcdir)/kdbLibLoader.c'; fi` libloader_dynamic_la-kdbLibLoader.lo: kdbLibLoader.c @am__fastdepCC_TRUE@ if $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libloader_dynamic_la_CFLAGS) $(CFLAGS) -MT libloader_dynamic_la-kdbLibLoader.lo -MD -MP -MF "$(DEPDIR)/libloader_dynamic_la-kdbLibLoader.Tpo" -c -o libloader_dynamic_la-kdbLibLoader.lo `test -f 'kdbLibLoader.c' || echo '$(srcdir)/'`kdbLibLoader.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/libloader_dynamic_la-kdbLibLoader.Tpo" "$(DEPDIR)/libloader_dynamic_la-kdbLibLoader.Plo"; else rm -f "$(DEPDIR)/libloader_dynamic_la-kdbLibLoader.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='kdbLibLoader.c' object='libloader_dynamic_la-kdbLibLoader.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libloader_dynamic_la_CFLAGS) $(CFLAGS) -c -o libloader_dynamic_la-kdbLibLoader.lo `test -f 'kdbLibLoader.c' || echo '$(srcdir)/'`kdbLibLoader.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-local \ clean-noinstLIBRARIES clean-noinstLTLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: 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-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-local clean-noinstLIBRARIES \ clean-noinstLTLIBRARIES ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-exec install-exec-am \ install-info install-info-am install-man install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-info-am clean-local: rm -f *.gcno *.gcda *.gcno # 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: elektra-0.7.1/src/libloader/kdbLibLoader.c0000644000076400001440000000546711365506635015323 00000000000000/*************************************************************************** kdbloader.c - Dynamically loading backends ------------------- begin : Sun Mar 19 2006 copyright : (C) 2004 by Avi Alkalay email : avi@unix.sh ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif #ifdef HAVE_STRING_H #include #endif #include "kdbloader.h" #ifdef ELEKTRA_STATIC /* Static case */ int kdbLibInit(void) { return 0; } kdbLibHandle kdbLibLoad(const char *module) { kdblib_symbol *current; current = kdb_exported_syms; while ( current->name != NULL ) { /* Skip symbols, we're searching for * the module name */ if ( current->function == NULL && strcmp(current->name, module) == 0 ) { /* Go to the first symbol for this file */ current++; return current; } current++; } return NULL; } kdbLibFunc kdbLibSym(kdbLibHandle handle, const char *symbol) { kdblib_symbol *current; current = handle; /* For each symbol about this module */ while ( current->function != NULL ) { if ( strcmp(current->name, symbol) == 0 ) return current->function; current++; } return NULL; } int kdbLibClose(kdbLibHandle handle) { return 0; } #else #ifdef WIN32 /* Windows dynamic case */ int kdbLibInit(void) { return 0; } kdbLibHandle kdbLibLoad(const char *module) { char *modulename = malloc((sizeof(char)*strlen(module))+sizeof(".dll")); kdbLibHandle handle; strcpy(modulename, module); strcat(modulename, ".dll"); handle = LoadLibrary(modulename); free(modulename); return handle; } kdbLibFunc kdbLibSym(kdbLibHandle handle, const char *symbol) { return GetProcAddress(handle, symbol); } int kdbLibClose(kdbLibHandle handle) { return FreeLibrary(handle); } #else /* Generic case using libltdl */ int kdbLibInit(void) { int init_errors = 0; init_errors = lt_dlinit(); if (init_errors) return init_errors; return lt_dladdsearchdir(BACKEND_LIBDIR); } kdbLibHandle kdbLibLoad(const char *module) { kdbLibHandle handle; handle = lt_dlopenext(module); return handle; } kdbLibFunc kdbLibSym(kdbLibHandle handle, const char *symbol) { return (kdbLibFunc) lt_dlsym(handle, symbol); } int kdbLibClose(kdbLibHandle handle) { return lt_dlclose(handle); } #endif #endif elektra-0.7.1/src/preload/0000777000076400001440000000000011365513214012371 500000000000000elektra-0.7.1/src/preload/Makefile.am0000644000076400001440000000114711365510527014350 00000000000000AM_CPPFLAGS = -DDATADIR=\"$(datadir)\" \ -I$(top_srcdir)/src/include $(LTDLINCL) preload_source = preload.c ../include/kdb.h bin_PROGRAMS = preload preload_static preload_SOURCES = $(preload_source) preload_LDADD = ../libelektra/libelektra.la $(LIBLTDL) $(LIBICONV) preload_CFLAGS = $(COPTFLAGS) $(CDBGFLAGS) preload_static_SOURCES = $(preload_source) preload_static_LDADD = ../libelektra/libelektra.a $(privatelibs) $(LIBICONV) preload_static_CFLAGS = -DELEKTRA_STATIC $(COPTFLAGS) $(CDBGFLAGS) ../libelektra/libelektra.a: cd ../libelektra && $(MAKE) libelektra.a clean-local: rm -f *.gcno *.gcda *.gcno elektra-0.7.1/src/preload/Makefile.in0000644000076400001440000005131411365511154014357 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = ../.. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ bin_PROGRAMS = preload$(EXEEXT) preload_static$(EXEEXT) subdir = src/preload DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/extensions.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/config.h CONFIG_CLEAN_FILES = am__installdirs = "$(DESTDIR)$(bindir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am__objects_1 = preload-preload.$(OBJEXT) am_preload_OBJECTS = $(am__objects_1) preload_OBJECTS = $(am_preload_OBJECTS) am__DEPENDENCIES_1 = preload_DEPENDENCIES = ../libelektra/libelektra.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) am__objects_2 = preload_static-preload.$(OBJEXT) am_preload_static_OBJECTS = $(am__objects_2) preload_static_OBJECTS = $(am_preload_static_OBJECTS) preload_static_DEPENDENCIES = ../libelektra/libelektra.a \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/src/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(preload_SOURCES) $(preload_static_SOURCES) DIST_SOURCES = $(preload_SOURCES) $(preload_static_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) INSTALL = @INSTALL@ ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BACKENDS = @BACKENDS@ BACKEND_VERSION_API = @BACKEND_VERSION_API@ BINDINGS = @BINDINGS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CDBGFLAGS = @CDBGFLAGS@ CFLAGS = @CFLAGS@ COPTFLAGS = @COPTFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSTDFLAGS = @CSTDFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDBGFLAGS = @CXXDBGFLAGS@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXOPTFLAGS = @CXXOPTFLAGS@ CXXSTDFLAGS = @CXXSTDFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_FALSE = @DEBUG_FALSE@ DEBUG_TRUE = @DEBUG_TRUE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ELEKTRATOOLS_VERSION_API = @ELEKTRATOOLS_VERSION_API@ ELEKTRA_VERSION_API = @ELEKTRA_VERSION_API@ EXEEXT = @EXEEXT@ EXPERIMENTAL_FALSE = @EXPERIMENTAL_FALSE@ EXPERIMENTAL_TRUE = @EXPERIMENTAL_TRUE@ F77 = @F77@ FFLAGS = @FFLAGS@ GENHTML = @GENHTML@ GREP = @GREP@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ HAVE_LIBLTDL_FALSE = @HAVE_LIBLTDL_FALSE@ HAVE_LIBLTDL_TRUE = @HAVE_LIBLTDL_TRUE@ HAVE_MAN2HTML_FALSE = @HAVE_MAN2HTML_FALSE@ HAVE_MAN2HTML_TRUE = @HAVE_MAN2HTML_TRUE@ HAVE_XML_FALSE = @HAVE_XML_FALSE@ HAVE_XML_TRUE = @HAVE_XML_TRUE@ HAVE_XSL_FALSE = @HAVE_XSL_FALSE@ HAVE_XSL_TRUE = @HAVE_XSL_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDB_VERSION = @KDB_VERSION@ KDB_VERSION_MAJOR = @KDB_VERSION_MAJOR@ KDB_VERSION_MAJORMINOR = @KDB_VERSION_MAJORMINOR@ KDB_VERSION_MICRO = @KDB_VERSION_MICRO@ KDB_VERSION_MINOR = @KDB_VERSION_MINOR@ LCOV = @LCOV@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VALGRIND = @VALGRIND@ VALGRINDTESTS_FALSE = @VALGRINDTESTS_FALSE@ VALGRINDTESTS_TRUE = @VALGRINDTESTS_TRUE@ VERSION = @VERSION@ XML2_CONFIG = @XML2_CONFIG@ XML_CPPFLAGS = @XML_CPPFLAGS@ XML_LIBS = @XML_LIBS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ backend_static_libs = @backend_static_libs@ backenddir = @backenddir@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ datarootdir = @datarootdir@ dbroot = @dbroot@ default_backend = @default_backend@ default_dbackend = @default_dbackend@ default_docbook = @default_docbook@ develdocdir = @develdocdir@ docdir = @docdir@ doxygen = @doxygen@ dvidir = @dvidir@ elektratools = @elektratools@ exec_prefix = @exec_prefix@ gconf_CFLAGS = @gconf_CFLAGS@ gconf_LIBS = @gconf_LIBS@ hlvlbackenddir = @hlvlbackenddir@ 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@ man2html = @man2html@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ privatelibs = @privatelibs@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ ulibdir = @ulibdir@ xsltproc = @xsltproc@ AM_CPPFLAGS = -DDATADIR=\"$(datadir)\" \ -I$(top_srcdir)/src/include $(LTDLINCL) preload_source = preload.c ../include/kdb.h preload_SOURCES = $(preload_source) preload_LDADD = ../libelektra/libelektra.la $(LIBLTDL) $(LIBICONV) preload_CFLAGS = $(COPTFLAGS) $(CDBGFLAGS) preload_static_SOURCES = $(preload_source) preload_static_LDADD = ../libelektra/libelektra.a $(privatelibs) $(LIBICONV) preload_static_CFLAGS = -DELEKTRA_STATIC $(COPTFLAGS) $(CDBGFLAGS) all: all-am .SUFFIXES: .SUFFIXES: .c .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 \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/preload/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/preload/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ || test -f $$p1 \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ rm -f "$(DESTDIR)$(bindir)/$$f"; \ done clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done preload$(EXEEXT): $(preload_OBJECTS) $(preload_DEPENDENCIES) @rm -f preload$(EXEEXT) $(LINK) $(preload_LDFLAGS) $(preload_OBJECTS) $(preload_LDADD) $(LIBS) preload_static$(EXEEXT): $(preload_static_OBJECTS) $(preload_static_DEPENDENCIES) @rm -f preload_static$(EXEEXT) $(LINK) $(preload_static_LDFLAGS) $(preload_static_OBJECTS) $(preload_static_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/preload-preload.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/preload_static-preload.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< preload-preload.o: preload.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(preload_CFLAGS) $(CFLAGS) -MT preload-preload.o -MD -MP -MF "$(DEPDIR)/preload-preload.Tpo" -c -o preload-preload.o `test -f 'preload.c' || echo '$(srcdir)/'`preload.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/preload-preload.Tpo" "$(DEPDIR)/preload-preload.Po"; else rm -f "$(DEPDIR)/preload-preload.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='preload.c' object='preload-preload.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(preload_CFLAGS) $(CFLAGS) -c -o preload-preload.o `test -f 'preload.c' || echo '$(srcdir)/'`preload.c preload-preload.obj: preload.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(preload_CFLAGS) $(CFLAGS) -MT preload-preload.obj -MD -MP -MF "$(DEPDIR)/preload-preload.Tpo" -c -o preload-preload.obj `if test -f 'preload.c'; then $(CYGPATH_W) 'preload.c'; else $(CYGPATH_W) '$(srcdir)/preload.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/preload-preload.Tpo" "$(DEPDIR)/preload-preload.Po"; else rm -f "$(DEPDIR)/preload-preload.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='preload.c' object='preload-preload.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(preload_CFLAGS) $(CFLAGS) -c -o preload-preload.obj `if test -f 'preload.c'; then $(CYGPATH_W) 'preload.c'; else $(CYGPATH_W) '$(srcdir)/preload.c'; fi` preload_static-preload.o: preload.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(preload_static_CFLAGS) $(CFLAGS) -MT preload_static-preload.o -MD -MP -MF "$(DEPDIR)/preload_static-preload.Tpo" -c -o preload_static-preload.o `test -f 'preload.c' || echo '$(srcdir)/'`preload.c; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/preload_static-preload.Tpo" "$(DEPDIR)/preload_static-preload.Po"; else rm -f "$(DEPDIR)/preload_static-preload.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='preload.c' object='preload_static-preload.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(preload_static_CFLAGS) $(CFLAGS) -c -o preload_static-preload.o `test -f 'preload.c' || echo '$(srcdir)/'`preload.c preload_static-preload.obj: preload.c @am__fastdepCC_TRUE@ if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(preload_static_CFLAGS) $(CFLAGS) -MT preload_static-preload.obj -MD -MP -MF "$(DEPDIR)/preload_static-preload.Tpo" -c -o preload_static-preload.obj `if test -f 'preload.c'; then $(CYGPATH_W) 'preload.c'; else $(CYGPATH_W) '$(srcdir)/preload.c'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/preload_static-preload.Tpo" "$(DEPDIR)/preload_static-preload.Po"; else rm -f "$(DEPDIR)/preload_static-preload.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='preload.c' object='preload_static-preload.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(preload_static_CFLAGS) $(CFLAGS) -c -o preload_static-preload.obj `if test -f 'preload.c'; then $(CYGPATH_W) 'preload.c'; else $(CYGPATH_W) '$(srcdir)/preload.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; 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: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_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 clean-local \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-binPROGRAMS install-info: install-info-am install-man: 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-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool clean-local ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-binPROGRAMS install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-binPROGRAMS \ uninstall-info-am ../libelektra/libelektra.a: cd ../libelektra && $(MAKE) libelektra.a clean-local: rm -f *.gcno *.gcda *.gcno # 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: elektra-0.7.1/src/preload/preload.c0000644000076400001440000002724311365506635014120 00000000000000/*************************************************************************** preload.c - Preload your system with configuration ------------------- begin : Mon 12 Nov 2007 copyright : (C) 2007 by Markus Raab email : registry@markus-raab.org ***************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ #include #include #include #include int preload_user (KDB *handle); int preload_system (KDB *handle); int preload_tests (KDB *handle); int preload_mountpoint(KDB *handle, char* name, char *mountpoint, char *backend, char *path); int preload_user (KDB *handle) { KeySet *ks = ksNew (100, keyNew( "user", KEY_DIR, KEY_VALUE, "", KEY_COMMENT, "User configuration", KEY_END), keyNew( "user/env", KEY_DIR, KEY_VALUE, "", KEY_COMMENT, "User environment", KEY_END), keyNew( "user/env/PATH", KEY_VALUE, "/usr/local/bin:/usr/bin:/bin", KEY_COMMENT, "User environment", KEY_END), keyNew( "user/bindkey", KEY_DIR, KEY_VALUE, "", KEY_COMMENT, "User bindkey configuration", KEY_END), keyNew( "user/bindkey/menu", KEY_DIR, KEY_VALUE, "", KEY_COMMENT, "Menu shortcuts", KEY_END), keyNew( "user/bindkey/menu/open", KEY_VALUE, "CTRL_O", KEY_COMMENT, "Open a new file", KEY_END), keyNew( "user/bindkey/menu/quit", KEY_VALUE, "CTRL_Q", KEY_COMMENT, "Open a new file", KEY_END), keyNew( "user/bindkey/menu/find", KEY_VALUE, "CTRL_F", KEY_COMMENT, "Open a new file", KEY_END), keyNew( "user/bindkey/clipboard", KEY_DIR, KEY_VALUE, "", KEY_COMMENT, "Clipboard configuration", KEY_END), keyNew( "user/bindkey/clipboard/paste", KEY_VALUE, "CTRL_V", KEY_COMMENT, "Paste clipboard content", KEY_END), keyNew( "user/bindkey/clipboard/copy", KEY_VALUE, "CTRL_C", KEY_COMMENT, "Copy clipboard content", KEY_END), keyNew( "user/bindkey/clipboard/cut", KEY_VALUE, "CTRL_C", KEY_COMMENT, "Cut clipboard content", KEY_END), keyNew( "user/sw", KEY_DIR, KEY_VALUE, "", KEY_COMMENT, "User software configuration", KEY_END), keyNew( "user/sw/lib", KEY_DIR, KEY_VALUE, "", KEY_COMMENT, "Library configuration", KEY_END), keyNew( "user/sw/sound", KEY_DIR, KEY_VALUE, "", KEY_COMMENT, "Sound configuration", KEY_END), keyNew( "user/sw/gnome", KEY_DIR, KEY_VALUE, "", KEY_COMMENT, "Gnome configuration", KEY_END), keyNew( "user/sw/kde", KEY_DIR, KEY_VALUE, "", KEY_COMMENT, "Kde configuration", KEY_END), keyNew( "user/sw/science", KEY_DIR, KEY_VALUE, "", KEY_COMMENT, "Science configuration", KEY_END), keyNew( "user/sw/shells", KEY_DIR, KEY_VALUE, "", KEY_COMMENT, "Shells configuration", KEY_END), keyNew( "user/sw/shells/zsh", KEY_DIR, KEY_VALUE, "", KEY_COMMENT, "Zsh configuration", KEY_END), keyNew( "user/sw/shells/zsh/env", KEY_DIR, KEY_VALUE, "", KEY_COMMENT, "Environment specific" "for zsh which will be additional to user/env for zsh", KEY_END), keyNew( "user/sw/shells/bash", KEY_DIR, KEY_VALUE, "", KEY_COMMENT, "Bash configuration", KEY_END), KS_END); printf ("Set user configuration... "); if (kdbSet (handle, ks, keyNew("user",0), KDB_O_DEL) == -1) { printf ("failure\n"); return 1; } else { printf ("done\n"); return 0; } } int preload_system (KDB *handle) { KeySet *ks = ksNew (100, keyNew( "system", KEY_DIR, KEY_VALUE, "", KEY_COMMENT, "System configuration", KEY_END), keyNew( "system/hosts", KEY_DIR, KEY_VALUE, "", KEY_COMMENT, "Hosts configuration for this system.\n" "Setup hosts, ip adresses and aliases.", KEY_END), keyNew( "system/filesystems", KEY_DIR, KEY_VALUE, "", KEY_COMMENT, "Filesystem configuration for this system.\n" "Setup mountpoints, types and options.", KEY_END), keyNew( "system/users", KEY_DIR, KEY_VALUE, "", KEY_COMMENT, "User configuration for this system.\n" "Add users and set passwords.", KEY_END), KS_END); printf ("Set system configuration... "); if (kdbSet (handle, ks, keyNew("system",0), KDB_O_DEL) == -1) { printf ("failure\n"); return 1; } else { printf ("done\n"); return 0; } } int preload_tests (KDB *handle) { KeySet *ks = ksNew (100, keyNew( "user/tests", KEY_DIR, KEY_VALUE, "", KEY_COMMENT, "Place for tests.\n" "Used by elektra testframework.", KEY_END), keyNew( "user/benchmarks", KEY_DIR, KEY_VALUE, "", KEY_COMMENT, "Place for benchmarks.\n" "Used by elektra benchmarkframework.", KEY_END), KS_END); printf ("Set test directories... "); if (kdbSet (handle, ks, keyNew("user",0), KDB_O_DEL) == -1) { printf ("failure\n"); return 1; } else { printf ("done\n"); return 0; } } int preload_configuration(KDB *handle) { KeySet *ks = ksNew (100, keyNew( "system/elektra", KEY_DIR, KEY_VALUE, "", KEY_COMMENT, "Configuration for libelektra.", KEY_END), keyNew( "system/elektra/xml", KEY_DIR, KEY_VALUE, "", KEY_COMMENT, "Configuration for libelektratools.", KEY_END), keyNew( "system/elektra/xml/schemapath", KEY_VALUE, KDB_SCHEMA_PATH, KEY_COMMENT, "Schemapath to elektra xml-schema.\n" "The schema is needed to validate xml files for in- and export.", KEY_END), keyNew( "system/elektra/mountpoints", KEY_DIR, KEY_VALUE, "", KEY_COMMENT, "Mountpoints for elektra.\n" "Place a directory here to make a mountpoint.\n" "A mountpoint decides to use a different backend for that path and below.\n" "See system/mountpoints/template how to create it.", KEY_END), KS_END); printf ("Set mountpoints... "); if (kdbSet (handle, ks, keyNew("system",0), KDB_O_DEL) == -1) { printf ("failure\n"); return 1; } else { printf ("done\n"); return 0; } } char * location (char *buffer, char *name, char *point) { buffer[0] = 0; strcat (buffer, "system/elektra/mountpoints/"); strcat (buffer, name); strcat (buffer, point); return buffer; } int preload_mountpoint(KDB *handle, char* name, char *mountpoint, char *backend, char *path) { char buffer [MAX_PATH_LENGTH]; KeySet *ks = ksNew (100, keyNew( mountpoint, KEY_DIR, KEY_VALUE, backend, KEY_COMMENT, "This is a mounted backend.", KEY_END), keyNew( location (buffer, name, ""), KEY_DIR, KEY_VALUE, "", KEY_COMMENT, "This is a mounted backend, see subkeys for more information", KEY_END), keyNew( location (buffer, name, "/mountpoint"), KEY_VALUE, mountpoint, KEY_COMMENT, "The mountpoint says the location where the backend should be mounted.\n" "It must be a valid, canonical elektra path. There are no ., .. or multiple slashes allowed.\n" "You are not allowed to mount inside system/elektra.", KEY_END), keyNew( location (buffer, name, "/backend"), KEY_VALUE, backend, KEY_COMMENT, "The name of the backend library.\n" "This name describes which .so should be loaded for that backend.\n" "You are allowed to mount the same backend multiple times.", KEY_END), keyNew( location (buffer, name, "/config"), KEY_DIR, KEY_VALUE, "", KEY_COMMENT, "The configuration for the specific backend.\n" "All keys below that directory will be passed to backend.\n" "These keys have backend specific meaning.\n" "See documentation http://www.libelektra.org for which keys must or can be set.\n" "Here the most important keys should be preloaded.", KEY_END), keyNew( location (buffer, name, "/config/path"), KEY_VALUE, path, KEY_COMMENT, "The path where the config file is located." "This item is often used by backends using configuration in a filesystem" "to know there relative location of the keys to fetch or write.", KEY_END), KS_END); printf ("Set %s mountpoint %s in path %s... ", name, mountpoint, path); if (kdbSet (handle, ks, keyNew("system",0), KDB_O_DEL) == -1) { printf ("failure\n"); return 1; } else { printf ("done\n"); return 0; } } /** * See http://www.libelektra.org/Preloading for more information. * * Preloading is a technique to make the first start without * build-in values possible. * * This program will preload the configuration for elektra itself. * It should be executed by the administrator for system and * configuration. * * But every user should also execute it to have a minimum skeleton * to make it more easy for the programs and to have full pathes * when having mountpoints. * */ int main(int argc, char ** argv) { KDB *handle = kdbOpen(); int rc=0; if (argc == 1) { printf ("Use %s \n", argv[0]); printf ("\n"); printf ("Modes are:\n"); printf ("system ... creates the system hierarchy\n"); printf ("user ... creates the user hierarchy\n"); printf ("tests ... creates the skeleton for tests and benchmarks\n"); printf ("conf ... creates the skeleton for configuration for elektra\n"); printf ("mount [] [] []\n"); printf ("\n"); printf ("Mount options are:\n"); printf ("name ... test for some predefined mountpoints\n"); printf (" root for the root backend\n"); printf (" otherwise any unique name for personal use\n"); printf ("other arguments are empty for test and root\n"); printf ("root ... Where to mount the backend\n"); printf ("backend... Name of the backend\n"); printf ("path ... Where the files should be located on the disk\n"); printf ("\n"); printf ("examples:\n"); printf (" preload system\n"); printf (" preload mount root ... mounts root backend\n"); printf (" preload mount test ... mounts some backends\n"); printf (" preload mount fstab system/filesystems/ fstab /tmp/fstab\n"); printf (" preload mount passwd system/users/ passwd /tmp/passwd\n"); return 0; } else if (argc > 1) { if (!strcmp (argv[1], "system")) rc=preload_system(handle); else if (!strcmp (argv[1], "user")) rc=preload_user(handle); else if (!strcmp (argv[1], "tests")) rc=preload_tests(handle); else if (!strcmp (argv[1], "conf")) rc=preload_configuration(handle); else if (!strcmp (argv[1], "mount")) { if (argc == 3) { if (!strcmp (argv[2], "root")) { rc=preload_mountpoint(handle, "root", "", "filesys", "/etc/kdb"); } else if (!strcmp (argv[2], "test")) { preload_mountpoint(handle, "hosts1", "system/hosts/", "hosts", "/etc/hosts"); preload_mountpoint(handle, "hosts2", "user/hosts/", "hosts", "/tmp/hosts"); preload_mountpoint(handle, "passwd1", "system/users/", "passwd", "/tmp/passwd"); preload_mountpoint(handle, "passwd2", "user/users/", "passwd", "/etc/passwd"); preload_mountpoint(handle, "fstab1", "system/filesystems/", "fstab", "/etc/fstab"); rc=preload_mountpoint(handle, "fstab2", "user/filesystems/", "fstab", "/tmp/fstab"); /* preload_mountpoint(handle, "template1", "user/template/", "template", ""); preload_mountpoint(handle, "template2", "system/template/", "template", ""); */ } else printf ("unkown mount options: give more arguments or use root or test\n"); } else if (argc == 6) { rc=preload_mountpoint(handle, argv[2], argv[3], argv[4], argv[5]); } else printf ("uncorrect number of arguments\n"); } else printf ("unknown mode: use system, user, tests, conf or mount\n"); } kdbClose (handle); return rc; } elektra-0.7.1/tests/0000777000076400001440000000000011365513215011317 500000000000000elektra-0.7.1/tests/Makefile.am0000644000076400001440000000531111365507606013276 00000000000000AM_CFLAGS = $(COPTFLAGS) $(CDBGFLAGS) AM_CPPFLAGS = -I$(top_srcdir)/src/include $(LTDLINCL) TESTS = test_key test_ks test_kdb test_xml test_validate.sh test_getset test_trie test_mount test_cap test_stream test_serialize test_split test_internals test_backendhelpers test_script.sh test_type #TESTS = test_backendhelpers check_PROGRAMS = test_key test_ks test_kdb test_xml test_getset test_trie test_mount test_cap test_stream test_serialize test_split test_internals test_backendhelpers test_type print_info #check_PROGRAMS = test_backendhelpers if VALGRINDTESTS TESTS_ENVIRONMENT = $(VALGRIND) --quiet --show-reachable=yes --leak-check=yes endif EXTRA_DIST = dbelow.c filesys.xml fstab.xml fstab-cmp.xml hosts.xml keyset.c keyset.xml key.xml key-cmp.xml others.c passwd.xml test_script.sh test_validate.sh test_script.sh tests.c tests.h clean-local: rm -rf .kdb rm -f *-gen.xml rm -f *.gcno *.gcda *.gcno test_key_SOURCES = test_key.c tests.h tests.c test_key_LDADD = $(privatelibs) ../src/libelektra/libelektra.a test_ks_SOURCES = test_ks.c tests.h tests.c test_ks_LDADD = $(privatelibs) ../src/libelektra/libelektra.a test_kdb_SOURCES = test_kdb.c tests.h tests.c test_kdb_LDADD = $(privatelibs) ../src/libelektra/libelektra.a test_xml_SOURCES = test_xml.c tests.h tests.c test_xml_LDADD = $(privatelibs) ../src/libelektra/libelektra.a test_getset_SOURCES = test_getset.c tests.h tests.c test_getset_LDADD = $(privatelibs) ../src/libelektra/libelektra.a test_trie_SOURCES = test_trie.c tests.h tests.c test_trie_LDADD = $(privatelibs) ../src/libelektra/libelektra.a test_mount_SOURCES = test_mount.c tests.h tests.c test_mount_LDADD = $(privatelibs) ../src/libelektra/libelektra.a test_cap_SOURCES = test_cap.c tests.h tests.c test_cap_LDADD = $(privatelibs) ../src/libelektra/libelektra.a test_stream_SOURCES = test_stream.c tests.h tests.c test_stream_LDADD = $(privatelibs) ../src/libelektra/libelektra.a test_serialize_SOURCES = test_serialize.c tests.h tests.c test_serialize_LDADD = $(privatelibs) ../src/libelektra/libelektra.a test_split_SOURCES = test_split.c tests.h tests.c test_split_LDADD = $(privatelibs) ../src/libelektra/libelektra.a test_internals_SOURCES = test_internals.c tests.h tests.c test_internals_LDADD = $(privatelibs) ../src/libelektra/libelektra.a test_backendhelpers_SOURCES = test_backendhelpers.c tests.h tests.c test_backendhelpers_LDADD = $(privatelibs) ../src/libelektra/libelektra.a test_type_SOURCES = test_type.c tests.h tests.c test_type_LDADD = $(privatelibs) ../src/libelektra/libelektra.a print_info_SOURCES = print_info.c tests.h tests.c print_info_LDADD = $(privatelibs) ../src/libelektra/libelektra.a ../src/libelektra/libelektra.a: cd ../src/libelektra && $(MAKE) libelektra.a elektra-0.7.1/tests/Makefile.in0000644000076400001440000006477211365511154013320 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ check_PROGRAMS = test_key$(EXEEXT) test_ks$(EXEEXT) test_kdb$(EXEEXT) \ test_xml$(EXEEXT) test_getset$(EXEEXT) test_trie$(EXEEXT) \ test_mount$(EXEEXT) test_cap$(EXEEXT) test_stream$(EXEEXT) \ test_serialize$(EXEEXT) test_split$(EXEEXT) \ test_internals$(EXEEXT) test_backendhelpers$(EXEEXT) \ test_type$(EXEEXT) print_info$(EXEEXT) subdir = tests DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/extensions.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/config.h CONFIG_CLEAN_FILES = am_print_info_OBJECTS = print_info.$(OBJEXT) tests.$(OBJEXT) print_info_OBJECTS = $(am_print_info_OBJECTS) am__DEPENDENCIES_1 = print_info_DEPENDENCIES = $(am__DEPENDENCIES_1) \ ../src/libelektra/libelektra.a am_test_backendhelpers_OBJECTS = test_backendhelpers.$(OBJEXT) \ tests.$(OBJEXT) test_backendhelpers_OBJECTS = $(am_test_backendhelpers_OBJECTS) test_backendhelpers_DEPENDENCIES = $(am__DEPENDENCIES_1) \ ../src/libelektra/libelektra.a am_test_cap_OBJECTS = test_cap.$(OBJEXT) tests.$(OBJEXT) test_cap_OBJECTS = $(am_test_cap_OBJECTS) test_cap_DEPENDENCIES = $(am__DEPENDENCIES_1) \ ../src/libelektra/libelektra.a am_test_getset_OBJECTS = test_getset.$(OBJEXT) tests.$(OBJEXT) test_getset_OBJECTS = $(am_test_getset_OBJECTS) test_getset_DEPENDENCIES = $(am__DEPENDENCIES_1) \ ../src/libelektra/libelektra.a am_test_internals_OBJECTS = test_internals.$(OBJEXT) tests.$(OBJEXT) test_internals_OBJECTS = $(am_test_internals_OBJECTS) test_internals_DEPENDENCIES = $(am__DEPENDENCIES_1) \ ../src/libelektra/libelektra.a am_test_kdb_OBJECTS = test_kdb.$(OBJEXT) tests.$(OBJEXT) test_kdb_OBJECTS = $(am_test_kdb_OBJECTS) test_kdb_DEPENDENCIES = $(am__DEPENDENCIES_1) \ ../src/libelektra/libelektra.a am_test_key_OBJECTS = test_key.$(OBJEXT) tests.$(OBJEXT) test_key_OBJECTS = $(am_test_key_OBJECTS) test_key_DEPENDENCIES = $(am__DEPENDENCIES_1) \ ../src/libelektra/libelektra.a am_test_ks_OBJECTS = test_ks.$(OBJEXT) tests.$(OBJEXT) test_ks_OBJECTS = $(am_test_ks_OBJECTS) test_ks_DEPENDENCIES = $(am__DEPENDENCIES_1) \ ../src/libelektra/libelektra.a am_test_mount_OBJECTS = test_mount.$(OBJEXT) tests.$(OBJEXT) test_mount_OBJECTS = $(am_test_mount_OBJECTS) test_mount_DEPENDENCIES = $(am__DEPENDENCIES_1) \ ../src/libelektra/libelektra.a am_test_serialize_OBJECTS = test_serialize.$(OBJEXT) tests.$(OBJEXT) test_serialize_OBJECTS = $(am_test_serialize_OBJECTS) test_serialize_DEPENDENCIES = $(am__DEPENDENCIES_1) \ ../src/libelektra/libelektra.a am_test_split_OBJECTS = test_split.$(OBJEXT) tests.$(OBJEXT) test_split_OBJECTS = $(am_test_split_OBJECTS) test_split_DEPENDENCIES = $(am__DEPENDENCIES_1) \ ../src/libelektra/libelektra.a am_test_stream_OBJECTS = test_stream.$(OBJEXT) tests.$(OBJEXT) test_stream_OBJECTS = $(am_test_stream_OBJECTS) test_stream_DEPENDENCIES = $(am__DEPENDENCIES_1) \ ../src/libelektra/libelektra.a am_test_trie_OBJECTS = test_trie.$(OBJEXT) tests.$(OBJEXT) test_trie_OBJECTS = $(am_test_trie_OBJECTS) test_trie_DEPENDENCIES = $(am__DEPENDENCIES_1) \ ../src/libelektra/libelektra.a am_test_type_OBJECTS = test_type.$(OBJEXT) tests.$(OBJEXT) test_type_OBJECTS = $(am_test_type_OBJECTS) test_type_DEPENDENCIES = $(am__DEPENDENCIES_1) \ ../src/libelektra/libelektra.a am_test_xml_OBJECTS = test_xml.$(OBJEXT) tests.$(OBJEXT) test_xml_OBJECTS = $(am_test_xml_OBJECTS) test_xml_DEPENDENCIES = $(am__DEPENDENCIES_1) \ ../src/libelektra/libelektra.a DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/src/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(print_info_SOURCES) $(test_backendhelpers_SOURCES) \ $(test_cap_SOURCES) $(test_getset_SOURCES) \ $(test_internals_SOURCES) $(test_kdb_SOURCES) \ $(test_key_SOURCES) $(test_ks_SOURCES) $(test_mount_SOURCES) \ $(test_serialize_SOURCES) $(test_split_SOURCES) \ $(test_stream_SOURCES) $(test_trie_SOURCES) \ $(test_type_SOURCES) $(test_xml_SOURCES) DIST_SOURCES = $(print_info_SOURCES) $(test_backendhelpers_SOURCES) \ $(test_cap_SOURCES) $(test_getset_SOURCES) \ $(test_internals_SOURCES) $(test_kdb_SOURCES) \ $(test_key_SOURCES) $(test_ks_SOURCES) $(test_mount_SOURCES) \ $(test_serialize_SOURCES) $(test_split_SOURCES) \ $(test_stream_SOURCES) $(test_trie_SOURCES) \ $(test_type_SOURCES) $(test_xml_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) INSTALL = @INSTALL@ ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BACKENDS = @BACKENDS@ BACKEND_VERSION_API = @BACKEND_VERSION_API@ BINDINGS = @BINDINGS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CDBGFLAGS = @CDBGFLAGS@ CFLAGS = @CFLAGS@ COPTFLAGS = @COPTFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSTDFLAGS = @CSTDFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDBGFLAGS = @CXXDBGFLAGS@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXOPTFLAGS = @CXXOPTFLAGS@ CXXSTDFLAGS = @CXXSTDFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_FALSE = @DEBUG_FALSE@ DEBUG_TRUE = @DEBUG_TRUE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ELEKTRATOOLS_VERSION_API = @ELEKTRATOOLS_VERSION_API@ ELEKTRA_VERSION_API = @ELEKTRA_VERSION_API@ EXEEXT = @EXEEXT@ EXPERIMENTAL_FALSE = @EXPERIMENTAL_FALSE@ EXPERIMENTAL_TRUE = @EXPERIMENTAL_TRUE@ F77 = @F77@ FFLAGS = @FFLAGS@ GENHTML = @GENHTML@ GREP = @GREP@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ HAVE_LIBLTDL_FALSE = @HAVE_LIBLTDL_FALSE@ HAVE_LIBLTDL_TRUE = @HAVE_LIBLTDL_TRUE@ HAVE_MAN2HTML_FALSE = @HAVE_MAN2HTML_FALSE@ HAVE_MAN2HTML_TRUE = @HAVE_MAN2HTML_TRUE@ HAVE_XML_FALSE = @HAVE_XML_FALSE@ HAVE_XML_TRUE = @HAVE_XML_TRUE@ HAVE_XSL_FALSE = @HAVE_XSL_FALSE@ HAVE_XSL_TRUE = @HAVE_XSL_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDB_VERSION = @KDB_VERSION@ KDB_VERSION_MAJOR = @KDB_VERSION_MAJOR@ KDB_VERSION_MAJORMINOR = @KDB_VERSION_MAJORMINOR@ KDB_VERSION_MICRO = @KDB_VERSION_MICRO@ KDB_VERSION_MINOR = @KDB_VERSION_MINOR@ LCOV = @LCOV@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VALGRIND = @VALGRIND@ VALGRINDTESTS_FALSE = @VALGRINDTESTS_FALSE@ VALGRINDTESTS_TRUE = @VALGRINDTESTS_TRUE@ VERSION = @VERSION@ XML2_CONFIG = @XML2_CONFIG@ XML_CPPFLAGS = @XML_CPPFLAGS@ XML_LIBS = @XML_LIBS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ backend_static_libs = @backend_static_libs@ backenddir = @backenddir@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ datarootdir = @datarootdir@ dbroot = @dbroot@ default_backend = @default_backend@ default_dbackend = @default_dbackend@ default_docbook = @default_docbook@ develdocdir = @develdocdir@ docdir = @docdir@ doxygen = @doxygen@ dvidir = @dvidir@ elektratools = @elektratools@ exec_prefix = @exec_prefix@ gconf_CFLAGS = @gconf_CFLAGS@ gconf_LIBS = @gconf_LIBS@ hlvlbackenddir = @hlvlbackenddir@ 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@ man2html = @man2html@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ privatelibs = @privatelibs@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ ulibdir = @ulibdir@ xsltproc = @xsltproc@ AM_CFLAGS = $(COPTFLAGS) $(CDBGFLAGS) AM_CPPFLAGS = -I$(top_srcdir)/src/include $(LTDLINCL) TESTS = test_key test_ks test_kdb test_xml test_validate.sh test_getset test_trie test_mount test_cap test_stream test_serialize test_split test_internals test_backendhelpers test_script.sh test_type #check_PROGRAMS = test_backendhelpers @VALGRINDTESTS_TRUE@TESTS_ENVIRONMENT = $(VALGRIND) --quiet --show-reachable=yes --leak-check=yes EXTRA_DIST = dbelow.c filesys.xml fstab.xml fstab-cmp.xml hosts.xml keyset.c keyset.xml key.xml key-cmp.xml others.c passwd.xml test_script.sh test_validate.sh test_script.sh tests.c tests.h test_key_SOURCES = test_key.c tests.h tests.c test_key_LDADD = $(privatelibs) ../src/libelektra/libelektra.a test_ks_SOURCES = test_ks.c tests.h tests.c test_ks_LDADD = $(privatelibs) ../src/libelektra/libelektra.a test_kdb_SOURCES = test_kdb.c tests.h tests.c test_kdb_LDADD = $(privatelibs) ../src/libelektra/libelektra.a test_xml_SOURCES = test_xml.c tests.h tests.c test_xml_LDADD = $(privatelibs) ../src/libelektra/libelektra.a test_getset_SOURCES = test_getset.c tests.h tests.c test_getset_LDADD = $(privatelibs) ../src/libelektra/libelektra.a test_trie_SOURCES = test_trie.c tests.h tests.c test_trie_LDADD = $(privatelibs) ../src/libelektra/libelektra.a test_mount_SOURCES = test_mount.c tests.h tests.c test_mount_LDADD = $(privatelibs) ../src/libelektra/libelektra.a test_cap_SOURCES = test_cap.c tests.h tests.c test_cap_LDADD = $(privatelibs) ../src/libelektra/libelektra.a test_stream_SOURCES = test_stream.c tests.h tests.c test_stream_LDADD = $(privatelibs) ../src/libelektra/libelektra.a test_serialize_SOURCES = test_serialize.c tests.h tests.c test_serialize_LDADD = $(privatelibs) ../src/libelektra/libelektra.a test_split_SOURCES = test_split.c tests.h tests.c test_split_LDADD = $(privatelibs) ../src/libelektra/libelektra.a test_internals_SOURCES = test_internals.c tests.h tests.c test_internals_LDADD = $(privatelibs) ../src/libelektra/libelektra.a test_backendhelpers_SOURCES = test_backendhelpers.c tests.h tests.c test_backendhelpers_LDADD = $(privatelibs) ../src/libelektra/libelektra.a test_type_SOURCES = test_type.c tests.h tests.c test_type_LDADD = $(privatelibs) ../src/libelektra/libelektra.a print_info_SOURCES = print_info.c tests.h tests.c print_info_LDADD = $(privatelibs) ../src/libelektra/libelektra.a all: all-am .SUFFIXES: .SUFFIXES: .c .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 \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; for p in $$list; do \ f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ echo " rm -f $$p $$f"; \ rm -f $$p $$f ; \ done print_info$(EXEEXT): $(print_info_OBJECTS) $(print_info_DEPENDENCIES) @rm -f print_info$(EXEEXT) $(LINK) $(print_info_LDFLAGS) $(print_info_OBJECTS) $(print_info_LDADD) $(LIBS) test_backendhelpers$(EXEEXT): $(test_backendhelpers_OBJECTS) $(test_backendhelpers_DEPENDENCIES) @rm -f test_backendhelpers$(EXEEXT) $(LINK) $(test_backendhelpers_LDFLAGS) $(test_backendhelpers_OBJECTS) $(test_backendhelpers_LDADD) $(LIBS) test_cap$(EXEEXT): $(test_cap_OBJECTS) $(test_cap_DEPENDENCIES) @rm -f test_cap$(EXEEXT) $(LINK) $(test_cap_LDFLAGS) $(test_cap_OBJECTS) $(test_cap_LDADD) $(LIBS) test_getset$(EXEEXT): $(test_getset_OBJECTS) $(test_getset_DEPENDENCIES) @rm -f test_getset$(EXEEXT) $(LINK) $(test_getset_LDFLAGS) $(test_getset_OBJECTS) $(test_getset_LDADD) $(LIBS) test_internals$(EXEEXT): $(test_internals_OBJECTS) $(test_internals_DEPENDENCIES) @rm -f test_internals$(EXEEXT) $(LINK) $(test_internals_LDFLAGS) $(test_internals_OBJECTS) $(test_internals_LDADD) $(LIBS) test_kdb$(EXEEXT): $(test_kdb_OBJECTS) $(test_kdb_DEPENDENCIES) @rm -f test_kdb$(EXEEXT) $(LINK) $(test_kdb_LDFLAGS) $(test_kdb_OBJECTS) $(test_kdb_LDADD) $(LIBS) test_key$(EXEEXT): $(test_key_OBJECTS) $(test_key_DEPENDENCIES) @rm -f test_key$(EXEEXT) $(LINK) $(test_key_LDFLAGS) $(test_key_OBJECTS) $(test_key_LDADD) $(LIBS) test_ks$(EXEEXT): $(test_ks_OBJECTS) $(test_ks_DEPENDENCIES) @rm -f test_ks$(EXEEXT) $(LINK) $(test_ks_LDFLAGS) $(test_ks_OBJECTS) $(test_ks_LDADD) $(LIBS) test_mount$(EXEEXT): $(test_mount_OBJECTS) $(test_mount_DEPENDENCIES) @rm -f test_mount$(EXEEXT) $(LINK) $(test_mount_LDFLAGS) $(test_mount_OBJECTS) $(test_mount_LDADD) $(LIBS) test_serialize$(EXEEXT): $(test_serialize_OBJECTS) $(test_serialize_DEPENDENCIES) @rm -f test_serialize$(EXEEXT) $(LINK) $(test_serialize_LDFLAGS) $(test_serialize_OBJECTS) $(test_serialize_LDADD) $(LIBS) test_split$(EXEEXT): $(test_split_OBJECTS) $(test_split_DEPENDENCIES) @rm -f test_split$(EXEEXT) $(LINK) $(test_split_LDFLAGS) $(test_split_OBJECTS) $(test_split_LDADD) $(LIBS) test_stream$(EXEEXT): $(test_stream_OBJECTS) $(test_stream_DEPENDENCIES) @rm -f test_stream$(EXEEXT) $(LINK) $(test_stream_LDFLAGS) $(test_stream_OBJECTS) $(test_stream_LDADD) $(LIBS) test_trie$(EXEEXT): $(test_trie_OBJECTS) $(test_trie_DEPENDENCIES) @rm -f test_trie$(EXEEXT) $(LINK) $(test_trie_LDFLAGS) $(test_trie_OBJECTS) $(test_trie_LDADD) $(LIBS) test_type$(EXEEXT): $(test_type_OBJECTS) $(test_type_DEPENDENCIES) @rm -f test_type$(EXEEXT) $(LINK) $(test_type_LDFLAGS) $(test_type_OBJECTS) $(test_type_LDADD) $(LIBS) test_xml$(EXEEXT): $(test_xml_OBJECTS) $(test_xml_DEPENDENCIES) @rm -f test_xml$(EXEEXT) $(LINK) $(test_xml_LDFLAGS) $(test_xml_OBJECTS) $(test_xml_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/print_info.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_backendhelpers.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_cap.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_getset.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_internals.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_kdb.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_key.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_ks.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_mount.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_serialize.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_split.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_stream.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_trie.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_type.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_xml.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tests.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list='$(TESTS)'; \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *" $$tst "*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ echo "XPASS: $$tst"; \ ;; \ *) \ echo "PASS: $$tst"; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *" $$tst "*) \ xfail=`expr $$xfail + 1`; \ echo "XFAIL: $$tst"; \ ;; \ *) \ failed=`expr $$failed + 1`; \ echo "FAIL: $$tst"; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ echo "SKIP: $$tst"; \ fi; \ done; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="All $$all tests passed"; \ else \ banner="All $$all tests behaved as expected ($$xfail expected failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all tests failed"; \ else \ banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ skipped="($$skip tests were not run)"; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ echo "$$dashes"; \ echo "$$banner"; \ test -z "$$skipped" || echo "$$skipped"; \ test -z "$$report" || echo "$$report"; \ echo "$$dashes"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_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-checkPROGRAMS clean-generic clean-libtool clean-local \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-exec-am: install-info: install-info-am install-man: 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-info-am .PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ clean-checkPROGRAMS clean-generic clean-libtool clean-local \ ctags distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-info-am clean-local: rm -rf .kdb rm -f *-gen.xml rm -f *.gcno *.gcda *.gcno ../src/libelektra/libelektra.a: cd ../src/libelektra && $(MAKE) libelektra.a # 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: elektra-0.7.1/tests/dbelow.c0000644000076400001440000000345611365506635012673 00000000000000ksNew( 28 , keyNew ("user/test/keyset/dir1" , KEY_DIR , KEY_TYPE, 0 , KEY_END), keyNew ("user/test/keyset/dir2" , KEY_DIR , KEY_TYPE, 0 , KEY_END), keyNew ("user/test/keyset/dir3" , KEY_DIR , KEY_TYPE, 0 , KEY_END), keyNew ("user/test/keyset/dir4" , KEY_DIR , KEY_TYPE, 0 , KEY_END), keyNew ("user/test/keyset/dir5" , KEY_DIR , KEY_TYPE, 0 , KEY_END), keyNew ("user/test/keyset/dir6" , KEY_DIR , KEY_TYPE, 0 , KEY_END), keyNew ("user/test/keyset/dir7" , KEY_DIR , KEY_TYPE, 0 , KEY_END), keyNew ("user/test/keyset/dir8" , KEY_DIR , KEY_TYPE, 0 , KEY_END), keyNew ("user/test/keyset/dir9" , KEY_DIR , KEY_TYPE, 0 , KEY_END), keyNew ("user/test/keyset/key1" , KEY_VALUE, "value1" , KEY_COMMENT, "comment1" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/key2" , KEY_VALUE, "value2" , KEY_COMMENT, "comment2" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/key3" , KEY_VALUE, "value3" , KEY_COMMENT, "comment3" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/key4" , KEY_VALUE, "value4" , KEY_COMMENT, "comment4" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/key5" , KEY_VALUE, "value5" , KEY_COMMENT, "comment5" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/key6" , KEY_VALUE, "value6" , KEY_COMMENT, "comment6" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/key7" , KEY_VALUE, "value7" , KEY_COMMENT, "comment7" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/key8" , KEY_VALUE, "value8" , KEY_COMMENT, "comment8" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/key9" , KEY_VALUE, "value9" , KEY_COMMENT, "comment9" , KEY_TYPE, KEY_TYPE_STRING , KEY_END),KS_END); elektra-0.7.1/tests/filesys.xml0000644000076400001440000000261711365511547013447 00000000000000 String key with standard name Directory key with standard name Binary key with standard name String key with hidden name Directory key with hidden name Binary key with hidden name string key with ugly name Directory with ugly name Binary key with ugly name elektra-0.7.1/tests/fstab-cmp.xml0000644000076400001440000000104711365511547013641 00000000000000 elektra-0.7.1/tests/fstab.xml0000644000076400001440000000122311365511547013060 00000000000000 elektra-0.7.1/tests/hosts.xml0000644000076400001440000000276011365511547013130 00000000000000 All hosts for ipv6 This is my home elektra-0.7.1/tests/key-cmp.xml0000644000076400001440000000346411365511547013337 00000000000000 42696e61 72795661 6c756500 42696e61 72795661 6c756500 elektra-0.7.1/tests/key.xml0000644000076400001440000000301511365511547012552 00000000000000 String key with standard name DirectoryValue Directory key with standard name Binary key with standard name String key with hidden name Directory key with hidden name Binary key with hidden name string key with ugly name Directory with ugly name Binary key with ugly name elektra-0.7.1/tests/keyset.c0000644000076400001440000002033711365507606012717 00000000000000ksNew(128, keyNew ("user", KEY_DIR,0), keyNew ("user/test", KEY_DIR,0), keyNew ("user/test/keyset", KEY_DIR,0), keyNew ("user/test/keyset/key1", KEY_VALUE, "value1", KEY_COMMENT, "comment1",0), keyNew ("user/test/keyset/key2", KEY_VALUE, "value2", KEY_COMMENT, "comment2",0), keyNew ("user/test/keyset/key3", KEY_VALUE, "value3", KEY_COMMENT, "comment3",0), keyNew ("user/test/keyset/key4", KEY_VALUE, "value4", KEY_COMMENT, "comment4",0), keyNew ("user/test/keyset/key5", KEY_VALUE, "value5", KEY_COMMENT, "comment5",0), keyNew ("user/test/keyset/key6", KEY_VALUE, "value6", KEY_COMMENT, "comment6",0), keyNew ("user/test/keyset/key7", KEY_VALUE, "value7", KEY_COMMENT, "comment7",0), keyNew ("user/test/keyset/key8", KEY_VALUE, "value8", KEY_COMMENT, "comment8",0), keyNew ("user/test/keyset/key9", KEY_VALUE, "value9", KEY_COMMENT, "comment9",0), keyNew ("user/test/keyset/dir1", KEY_DIR,0), keyNew ("user/test/keyset/dir1/key1", KEY_VALUE, "value1", KEY_COMMENT, "comment1",0), keyNew ("user/test/keyset/dir1/key2", KEY_VALUE, "value2", KEY_COMMENT, "comment2",0), keyNew ("user/test/keyset/dir1/key3", KEY_VALUE, "value3", KEY_COMMENT, "comment3",0), keyNew ("user/test/keyset/dir1/key4", KEY_VALUE, "value4", KEY_COMMENT, "comment4",0), keyNew ("user/test/keyset/dir1/key5", KEY_VALUE, "value5", KEY_COMMENT, "comment5",0), keyNew ("user/test/keyset/dir1/key6", KEY_VALUE, "value6", KEY_COMMENT, "comment6",0), keyNew ("user/test/keyset/dir1/key7", KEY_VALUE, "value7", KEY_COMMENT, "comment7",0), keyNew ("user/test/keyset/dir1/key8", KEY_VALUE, "value8", KEY_COMMENT, "comment8",0), keyNew ("user/test/keyset/dir1/key9", KEY_VALUE, "value9", KEY_COMMENT, "comment9",0), keyNew ("user/test/keyset/dir2", KEY_DIR,0), keyNew ("user/test/keyset/dir2/key1", KEY_VALUE, "value1", KEY_COMMENT, "comment1",0), keyNew ("user/test/keyset/dir2/key2", KEY_VALUE, "value2", KEY_COMMENT, "comment2",0), keyNew ("user/test/keyset/dir2/key3", KEY_VALUE, "value3", KEY_COMMENT, "comment3",0), keyNew ("user/test/keyset/dir2/key4", KEY_VALUE, "value4", KEY_COMMENT, "comment4",0), keyNew ("user/test/keyset/dir2/key5", KEY_VALUE, "value5", KEY_COMMENT, "comment5",0), keyNew ("user/test/keyset/dir2/key6", KEY_VALUE, "value6", KEY_COMMENT, "comment6",0), keyNew ("user/test/keyset/dir2/key7", KEY_VALUE, "value7", KEY_COMMENT, "comment7",0), keyNew ("user/test/keyset/dir2/key8", KEY_VALUE, "value8", KEY_COMMENT, "comment8",0), keyNew ("user/test/keyset/dir2/key9", KEY_VALUE, "value9", KEY_COMMENT, "comment9",0), keyNew ("user/test/keyset/dir3", KEY_DIR,0), keyNew ("user/test/keyset/dir3/key1", KEY_VALUE, "value1", KEY_COMMENT, "comment1",0), keyNew ("user/test/keyset/dir3/key2", KEY_VALUE, "value2", KEY_COMMENT, "comment2",0), keyNew ("user/test/keyset/dir3/key3", KEY_VALUE, "value3", KEY_COMMENT, "comment3",0), keyNew ("user/test/keyset/dir3/key4", KEY_VALUE, "value4", KEY_COMMENT, "comment4",0), keyNew ("user/test/keyset/dir3/key5", KEY_VALUE, "value5", KEY_COMMENT, "comment5",0), keyNew ("user/test/keyset/dir3/key6", KEY_VALUE, "value6", KEY_COMMENT, "comment6",0), keyNew ("user/test/keyset/dir3/key7", KEY_VALUE, "value7", KEY_COMMENT, "comment7",0), keyNew ("user/test/keyset/dir3/key8", KEY_VALUE, "value8", KEY_COMMENT, "comment8",0), keyNew ("user/test/keyset/dir3/key9", KEY_VALUE, "value9", KEY_COMMENT, "comment9",0), keyNew ("user/test/keyset/dir4", KEY_DIR,0), keyNew ("user/test/keyset/dir4/key1", KEY_VALUE, "value1", KEY_COMMENT, "comment1",0), keyNew ("user/test/keyset/dir4/key2", KEY_VALUE, "value2", KEY_COMMENT, "comment2",0), keyNew ("user/test/keyset/dir4/key3", KEY_VALUE, "value3", KEY_COMMENT, "comment3",0), keyNew ("user/test/keyset/dir4/key4", KEY_VALUE, "value4", KEY_COMMENT, "comment4",0), keyNew ("user/test/keyset/dir4/key5", KEY_VALUE, "value5", KEY_COMMENT, "comment5",0), keyNew ("user/test/keyset/dir4/key6", KEY_VALUE, "value6", KEY_COMMENT, "comment6",0), keyNew ("user/test/keyset/dir4/key7", KEY_VALUE, "value7", KEY_COMMENT, "comment7",0), keyNew ("user/test/keyset/dir4/key8", KEY_VALUE, "value8", KEY_COMMENT, "comment8",0), keyNew ("user/test/keyset/dir4/key9", KEY_VALUE, "value9", KEY_COMMENT, "comment9",0), keyNew ("user/test/keyset/dir5", KEY_DIR,0), keyNew ("user/test/keyset/dir5/key1", KEY_VALUE, "value1", KEY_COMMENT, "comment1",0), keyNew ("user/test/keyset/dir5/key2", KEY_VALUE, "value2", KEY_COMMENT, "comment2",0), keyNew ("user/test/keyset/dir5/key3", KEY_VALUE, "value3", KEY_COMMENT, "comment3",0), keyNew ("user/test/keyset/dir5/key4", KEY_VALUE, "value4", KEY_COMMENT, "comment4",0), keyNew ("user/test/keyset/dir5/key5", KEY_VALUE, "value5", KEY_COMMENT, "comment5",0), keyNew ("user/test/keyset/dir5/key6", KEY_VALUE, "value6", KEY_COMMENT, "comment6",0), keyNew ("user/test/keyset/dir5/key7", KEY_VALUE, "value7", KEY_COMMENT, "comment7",0), keyNew ("user/test/keyset/dir5/key8", KEY_VALUE, "value8", KEY_COMMENT, "comment8",0), keyNew ("user/test/keyset/dir5/key9", KEY_VALUE, "value9", KEY_COMMENT, "comment9",0), keyNew ("user/test/keyset/dir6", KEY_DIR,0), keyNew ("user/test/keyset/dir6/key1", KEY_VALUE, "value1", KEY_COMMENT, "comment1",0), keyNew ("user/test/keyset/dir6/key2", KEY_VALUE, "value2", KEY_COMMENT, "comment2",0), keyNew ("user/test/keyset/dir6/key3", KEY_VALUE, "value3", KEY_COMMENT, "comment3",0), keyNew ("user/test/keyset/dir6/key4", KEY_VALUE, "value4", KEY_COMMENT, "comment4",0), keyNew ("user/test/keyset/dir6/key5", KEY_VALUE, "value5", KEY_COMMENT, "comment5",0), keyNew ("user/test/keyset/dir6/key6", KEY_VALUE, "value6", KEY_COMMENT, "comment6",0), keyNew ("user/test/keyset/dir6/key7", KEY_VALUE, "value7", KEY_COMMENT, "comment7",0), keyNew ("user/test/keyset/dir6/key8", KEY_VALUE, "value8", KEY_COMMENT, "comment8",0), keyNew ("user/test/keyset/dir6/key9", KEY_VALUE, "value9", KEY_COMMENT, "comment9",0), keyNew ("user/test/keyset/dir7", KEY_DIR,0), keyNew ("user/test/keyset/dir7/key1", KEY_VALUE, "value1", KEY_COMMENT, "comment1",0), keyNew ("user/test/keyset/dir7/key2", KEY_VALUE, "value2", KEY_COMMENT, "comment2",0), keyNew ("user/test/keyset/dir7/key3", KEY_VALUE, "value3", KEY_COMMENT, "comment3",0), keyNew ("user/test/keyset/dir7/key4", KEY_VALUE, "value4", KEY_COMMENT, "comment4",0), keyNew ("user/test/keyset/dir7/key5", KEY_VALUE, "value5", KEY_COMMENT, "comment5",0), keyNew ("user/test/keyset/dir7/key6", KEY_VALUE, "value6", KEY_COMMENT, "comment6",0), keyNew ("user/test/keyset/dir7/key7", KEY_VALUE, "value7", KEY_COMMENT, "comment7",0), keyNew ("user/test/keyset/dir7/key8", KEY_VALUE, "value8", KEY_COMMENT, "comment8",0), keyNew ("user/test/keyset/dir7/key9", KEY_VALUE, "value9", KEY_COMMENT, "comment9",0), keyNew ("user/test/keyset/dir8", KEY_DIR,0), keyNew ("user/test/keyset/dir8/key1", KEY_VALUE, "value1", KEY_COMMENT, "comment1",0), keyNew ("user/test/keyset/dir8/key2", KEY_VALUE, "value2", KEY_COMMENT, "comment2",0), keyNew ("user/test/keyset/dir8/key3", KEY_VALUE, "value3", KEY_COMMENT, "comment3",0), keyNew ("user/test/keyset/dir8/key4", KEY_VALUE, "value4", KEY_COMMENT, "comment4",0), keyNew ("user/test/keyset/dir8/key5", KEY_VALUE, "value5", KEY_COMMENT, "comment5",0), keyNew ("user/test/keyset/dir8/key6", KEY_VALUE, "value6", KEY_COMMENT, "comment6",0), keyNew ("user/test/keyset/dir8/key7", KEY_VALUE, "value7", KEY_COMMENT, "comment7",0), keyNew ("user/test/keyset/dir8/key8", KEY_VALUE, "value8", KEY_COMMENT, "comment8",0), keyNew ("user/test/keyset/dir8/key9", KEY_VALUE, "value9", KEY_COMMENT, "comment9",0), keyNew ("user/test/keyset/dir9", KEY_DIR,0), keyNew ("user/test/keyset/dir9/key1", KEY_VALUE, "value1", KEY_COMMENT, "comment1",0), keyNew ("user/test/keyset/dir9/key2", KEY_VALUE, "value2", KEY_COMMENT, "comment2",0), keyNew ("user/test/keyset/dir9/key3", KEY_VALUE, "value3", KEY_COMMENT, "comment3",0), keyNew ("user/test/keyset/dir9/key4", KEY_VALUE, "value4", KEY_COMMENT, "comment4",0), keyNew ("user/test/keyset/dir9/key5", KEY_VALUE, "value5", KEY_COMMENT, "comment5",0), keyNew ("user/test/keyset/dir9/key6", KEY_VALUE, "value6", KEY_COMMENT, "comment6",0), keyNew ("user/test/keyset/dir9/key7", KEY_VALUE, "value7", KEY_COMMENT, "comment7",0), keyNew ("user/test/keyset/dir9/key8", KEY_VALUE, "value8", KEY_COMMENT, "comment8",0), keyNew ("user/test/keyset/dir9/key9", KEY_VALUE, "value9", KEY_COMMENT, "comment9",0), KS_END); elektra-0.7.1/tests/keyset.xml0000644000076400001440000002117611365511547013276 00000000000000 2551516588474823843 3246436893195629244 18454108762891828026 24597295372375238 2188631490667217086 2009260691056619998 634720937883220825 10835219082633423494 439048222054330242 2671264801133512045 2462099381906519637 29552250853230432415 287081235381626635 2056467162314026779 6513136152238131569 595310088267681325 22531187641857031662 6050128332068515722 16238284472997719576 3883281333052412037 32753327232797919976 14800138803221317405 2676924538788523596 4522262551362712874 2101827480127277145 198753828813576 1347011419147246413 31620169261048613078 17609274262950321182 26036252041174319415 1847528778209268968 16075148982907919368 1823923665139346176 15563326831112072 2095516044228183782 2139722875720320817 776043343146721534 255613898214632040 21852226343272631185 2623735621954316926 1964917880248812636 6277190786814312 143682467514357045 165992136954451860 2544318414240793465 326122332660329661 194216610785116060 990832569759630797 21741123163068723187 53059801514130705 21188322531851320535 9883314882767419206 1065225830188249547 30944117441110710316 14723134441057028108 5891315043040223589 11915196071822725798 2183621105162112017 76214949230088786 15761313992127631931 319532359220727161 1104442372487923737 elektra-0.7.1/tests/others.c0000644000076400001440000002534511365506635012724 00000000000000ksNew( 94 , keyNew ("user" , KEY_DIR , KEY_TYPE, 0 , KEY_END), keyNew ("user/test" , KEY_DIR , KEY_TYPE, 0 , KEY_END), keyNew ("user/test/keyset" , KEY_DIR , KEY_TYPE, 0 , KEY_END), keyNew ("user/test/keyset/dir1/key1" , KEY_VALUE, "value1" , KEY_COMMENT, "comment1" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir1/key2" , KEY_VALUE, "value2" , KEY_COMMENT, "comment2" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir1/key3" , KEY_VALUE, "value3" , KEY_COMMENT, "comment3" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir1/key4" , KEY_VALUE, "value4" , KEY_COMMENT, "comment4" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir1/key5" , KEY_VALUE, "value5" , KEY_COMMENT, "comment5" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir1/key6" , KEY_VALUE, "value6" , KEY_COMMENT, "comment6" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir1/key7" , KEY_VALUE, "value7" , KEY_COMMENT, "comment7" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir1/key8" , KEY_VALUE, "value8" , KEY_COMMENT, "comment8" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir1/key9" , KEY_VALUE, "value9" , KEY_COMMENT, "comment9" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir2/key1" , KEY_VALUE, "value1" , KEY_COMMENT, "comment1" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir2/key2" , KEY_VALUE, "value2" , KEY_COMMENT, "comment2" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir2/key3" , KEY_VALUE, "value3" , KEY_COMMENT, "comment3" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir2/key4" , KEY_VALUE, "value4" , KEY_COMMENT, "comment4" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir2/key5" , KEY_VALUE, "value5" , KEY_COMMENT, "comment5" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir2/key6" , KEY_VALUE, "value6" , KEY_COMMENT, "comment6" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir2/key7" , KEY_VALUE, "value7" , KEY_COMMENT, "comment7" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir2/key8" , KEY_VALUE, "value8" , KEY_COMMENT, "comment8" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir2/key9" , KEY_VALUE, "value9" , KEY_COMMENT, "comment9" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir3/key1" , KEY_VALUE, "value1" , KEY_COMMENT, "comment1" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir3/key2" , KEY_VALUE, "value2" , KEY_COMMENT, "comment2" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir3/key3" , KEY_VALUE, "value3" , KEY_COMMENT, "comment3" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir3/key4" , KEY_VALUE, "value4" , KEY_COMMENT, "comment4" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir3/key5" , KEY_VALUE, "value5" , KEY_COMMENT, "comment5" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir3/key6" , KEY_VALUE, "value6" , KEY_COMMENT, "comment6" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir3/key7" , KEY_VALUE, "value7" , KEY_COMMENT, "comment7" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir3/key8" , KEY_VALUE, "value8" , KEY_COMMENT, "comment8" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir3/key9" , KEY_VALUE, "value9" , KEY_COMMENT, "comment9" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir4/key1" , KEY_VALUE, "value1" , KEY_COMMENT, "comment1" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir4/key2" , KEY_VALUE, "value2" , KEY_COMMENT, "comment2" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir4/key3" , KEY_VALUE, "value3" , KEY_COMMENT, "comment3" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir4/key4" , KEY_VALUE, "value4" , KEY_COMMENT, "comment4" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir4/key5" , KEY_VALUE, "value5" , KEY_COMMENT, "comment5" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir4/key6" , KEY_VALUE, "value6" , KEY_COMMENT, "comment6" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir4/key7" , KEY_VALUE, "value7" , KEY_COMMENT, "comment7" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir4/key8" , KEY_VALUE, "value8" , KEY_COMMENT, "comment8" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir4/key9" , KEY_VALUE, "value9" , KEY_COMMENT, "comment9" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir5/key1" , KEY_VALUE, "value1" , KEY_COMMENT, "comment1" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir5/key2" , KEY_VALUE, "value2" , KEY_COMMENT, "comment2" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir5/key3" , KEY_VALUE, "value3" , KEY_COMMENT, "comment3" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir5/key4" , KEY_VALUE, "value4" , KEY_COMMENT, "comment4" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir5/key5" , KEY_VALUE, "value5" , KEY_COMMENT, "comment5" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir5/key6" , KEY_VALUE, "value6" , KEY_COMMENT, "comment6" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir5/key7" , KEY_VALUE, "value7" , KEY_COMMENT, "comment7" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir5/key8" , KEY_VALUE, "value8" , KEY_COMMENT, "comment8" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir5/key9" , KEY_VALUE, "value9" , KEY_COMMENT, "comment9" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir6/key1" , KEY_VALUE, "value1" , KEY_COMMENT, "comment1" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir6/key2" , KEY_VALUE, "value2" , KEY_COMMENT, "comment2" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir6/key3" , KEY_VALUE, "value3" , KEY_COMMENT, "comment3" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir6/key4" , KEY_VALUE, "value4" , KEY_COMMENT, "comment4" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir6/key5" , KEY_VALUE, "value5" , KEY_COMMENT, "comment5" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir6/key6" , KEY_VALUE, "value6" , KEY_COMMENT, "comment6" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir6/key7" , KEY_VALUE, "value7" , KEY_COMMENT, "comment7" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir6/key8" , KEY_VALUE, "value8" , KEY_COMMENT, "comment8" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir6/key9" , KEY_VALUE, "value9" , KEY_COMMENT, "comment9" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir7/key1" , KEY_VALUE, "value1" , KEY_COMMENT, "comment1" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir7/key2" , KEY_VALUE, "value2" , KEY_COMMENT, "comment2" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir7/key3" , KEY_VALUE, "value3" , KEY_COMMENT, "comment3" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir7/key4" , KEY_VALUE, "value4" , KEY_COMMENT, "comment4" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir7/key5" , KEY_VALUE, "value5" , KEY_COMMENT, "comment5" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir7/key6" , KEY_VALUE, "value6" , KEY_COMMENT, "comment6" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir7/key7" , KEY_VALUE, "value7" , KEY_COMMENT, "comment7" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir7/key8" , KEY_VALUE, "value8" , KEY_COMMENT, "comment8" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir7/key9" , KEY_VALUE, "value9" , KEY_COMMENT, "comment9" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir8/key1" , KEY_VALUE, "value1" , KEY_COMMENT, "comment1" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir8/key2" , KEY_VALUE, "value2" , KEY_COMMENT, "comment2" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir8/key3" , KEY_VALUE, "value3" , KEY_COMMENT, "comment3" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir8/key4" , KEY_VALUE, "value4" , KEY_COMMENT, "comment4" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir8/key5" , KEY_VALUE, "value5" , KEY_COMMENT, "comment5" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir8/key6" , KEY_VALUE, "value6" , KEY_COMMENT, "comment6" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir8/key7" , KEY_VALUE, "value7" , KEY_COMMENT, "comment7" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir8/key8" , KEY_VALUE, "value8" , KEY_COMMENT, "comment8" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir8/key9" , KEY_VALUE, "value9" , KEY_COMMENT, "comment9" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir9/key1" , KEY_VALUE, "value1" , KEY_COMMENT, "comment1" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir9/key2" , KEY_VALUE, "value2" , KEY_COMMENT, "comment2" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir9/key3" , KEY_VALUE, "value3" , KEY_COMMENT, "comment3" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir9/key4" , KEY_VALUE, "value4" , KEY_COMMENT, "comment4" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir9/key5" , KEY_VALUE, "value5" , KEY_COMMENT, "comment5" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir9/key6" , KEY_VALUE, "value6" , KEY_COMMENT, "comment6" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir9/key7" , KEY_VALUE, "value7" , KEY_COMMENT, "comment7" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir9/key8" , KEY_VALUE, "value8" , KEY_COMMENT, "comment8" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/test/keyset/dir9/key9" , KEY_VALUE, "value9" , KEY_COMMENT, "comment9" , KEY_TYPE, KEY_TYPE_STRING , KEY_END),KS_END); elektra-0.7.1/tests/passwd.xml0000644000076400001440000000577211365511547013277 00000000000000 elektra-0.7.1/tests/print_info.c0000644000076400001440000000355211361542117013552 00000000000000#include #include void print_time (Key *key) { printf ("atime: %lld\n", (long long int)keyGetATime(key)); printf ("mtime: %lld\n", (long long int)keyGetMTime(key)); printf ("ctime: %lld\n", (long long int)keyGetCTime(key)); } void print_constant() { printf ("\nFollowing constants must be defined in elektra\n"); printf ("The Key Separator is %c\n", KEY_SEPARATOR); printf ("The Path Separator is %c\n", PATH_SEPARATOR); printf ("The default mode for new keys 0%o\n", KEY_DEF_MODE); printf ("The default mode added to directory keys 0%o\n", KEY_DEF_DIR); } void print_sizeof() { printf ("\nFollowing types must be defined in elektra\n"); printf ("Sizeof (int) is %zd\n", sizeof(int)); printf ("Sizeof (uid_t) is %zd\n", sizeof(uid_t)); printf ("Sizeof (gid_t) is %zd\n", sizeof(gid_t)); printf ("Sizeof (size_t) is %zd\n", sizeof(size_t)); printf ("Sizeof (ssize_t) is %zd\n", sizeof(ssize_t)); printf ("Sizeof (time_t) is %zd\n", sizeof(time_t)); printf ("Sizeof (type_t) is %zd\n", sizeof(type_t)); printf ("Sizeof (keyswitch_t) is %zd\n", sizeof(keyswitch_t)); printf ("Sizeof (option_t) is %zd\n", sizeof(option_t)); printf ("Sizeof (cursor_t is %zd\n", sizeof(cursor_t)); printf ("Sizeof (void *) is %zd\n", sizeof(void*)); printf ("Sizeof (KDB *) is %zd\n", sizeof(KDB*)); printf ("Sizeof (Key *) is %zd\n", sizeof(Key*)); printf ("Sizeof (KeySet *) is %zd\n", sizeof(KeySet*)); } void print_limits() { printf ("\nFollowing limits must be defined in elektra\n"); printf ("Maximum Integer is %d\n", INT_MAX); printf ("Minimum Integer is %d\n", INT_MIN); printf ("Maximum size_t is %d\n", SIZE_MAX); printf ("Maximum ssize_t is %d\n", SSIZE_MAX); printf ("Maximum length of a Keyname %d\n", MAX_KEY_LENGTH); printf ("Maximum length of a Path %d\n", MAX_PATH_LENGTH); } int main() { print_constant(); print_sizeof(); print_limits(); } elektra-0.7.1/tests/test_backendhelpers.c0000644000076400001440000002127311365506635015425 00000000000000/*************************************************************************** * test_split.c - Test suite for splitted keyset data structure * ------------------- * begin : Fri 21 Mar 2008 * copyright : (C) 2008 by Markus Raab * email : elektra@markus-raab.org ****************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STRING_H #include #endif #include #include /*Needs private declarations*/ #include void test_calc_rel_filename() { Key *k; char buffer [MAX_PATH_LENGTH]; printf ("Test encoding\n"); k = keyNew ("user/key", KEY_END); kdbbKeyCalcRelativeFilename (k, buffer, MAX_PATH_LENGTH); succeed_if (strcmp (buffer, "user/key") == 0, "did not encode correctly with backslash"); keyDel (k); k = keyNew ("user/key\\", KEY_END); kdbbKeyCalcRelativeFilename (k, buffer, MAX_PATH_LENGTH); succeed_if (strcmp (buffer, "user/key%5C") == 0, "did not encode correctly with backslash"); keyDel (k); k = keyNew ("user/key%", KEY_END); kdbbKeyCalcRelativeFilename (k, buffer, MAX_PATH_LENGTH); succeed_if (strcmp (buffer, "user/key%25") == 0, "did not encode correctly with backslash"); keyDel (k); k = keyNew ("user/key+", KEY_END); kdbbKeyCalcRelativeFilename (k, buffer, MAX_PATH_LENGTH); succeed_if (strcmp (buffer, "user/key%2B") == 0, "did not encode correctly with backslash"); keyDel (k); k = keyNew ("user/key ", KEY_END); kdbbKeyCalcRelativeFilename (k, buffer, MAX_PATH_LENGTH); succeed_if (strcmp (buffer, "user/key+") == 0, "did not encode correctly with backslash"); keyDel (k); k = keyNew ("user/key\\/", KEY_END); kdbbKeyCalcRelativeFilename (k, buffer, MAX_PATH_LENGTH); succeed_if (strcmp (buffer, "user/key%5C%2F") == 0, "did not encode correctly with backslash"); keyDel (k); k = keyNew ("user/key\\/ls\\\\tt", KEY_END); kdbbKeyCalcRelativeFilename (k, buffer, MAX_PATH_LENGTH); succeed_if (strcmp (buffer, "user/key%5C%2Fls%5C%5Ctt") == 0, "did not encode correctly with backslash"); keyDel (k); } void test_filename() { Key *mnt; KeySet *conf; Key *k = keyNew ("user/key", KEY_OWNER, "max", KEY_END); Key *i = keyNew (KEY_END); char buffer [MAX_PATH_LENGTH]; printf ("Test filenames\n"); #ifdef HAVE_CLEARENV clearenv(); #else unsetenv("HOME"); unsetenv("KDB_HOME"); #endif KDB *handle = kdbOpen(); kdbMount (handle, mnt=keyNew("system/users", KEY_VALUE, "filesys", KEY_END), conf=ksNew (0)); succeed_if (kdbbGetFullFilename(handle, i, buffer, MAX_PATH_LENGTH) == -1, "how did kdbbGetFullFilename found path for invalid key?"); succeed_if (kdbbGetFullFilename(handle, k, buffer, 5) == -1, "case 1: not even /home/markus fits in buffer"); succeed_if (kdbbGetFullFilename(handle, k, buffer, 16) == -1, "case 2: kdbbKeyCalcRelativeFilename"); kdbbGetFullFilename(handle, k, buffer, MAX_PATH_LENGTH); succeed_if (strcmp (buffer, "/home/max/.kdb/user/key") == 0, "step 4: got wrong filename without environment, no users"); #ifdef HAVE_SETENV setenv ("HOME","/home/owner",1); #else putenv ("HOME=/home/owner"); #endif kdbbGetFullFilename(handle, k, buffer, MAX_PATH_LENGTH); succeed_if (strcmp (buffer, "/home/owner/.kdb/user/key") == 0, "step 3: got wrong filename with environment HOME"); kdbSetString (handle, "system/users/max/home", "/usr/homes"); kdbbGetFullFilename(handle, k, buffer, MAX_PATH_LENGTH); succeed_if (strcmp (buffer, "/usr/homes/.kdb/user/key") == 0, "step 2b: got wrong filename with home in elektra users db set"); kdbRemove(handle, "system/users/max/home"); kdbSetString (handle, "system/users/max/kdb", "/storage/kdb"); kdbbGetFullFilename(handle, k, buffer, MAX_PATH_LENGTH); succeed_if (strcmp (buffer, "/storage/kdb/user/key") == 0, "step 2a: got wrong filename with kdb in elektra users db set"); kdbRemove(handle, "system/users/max/kdb"); #ifdef HAVE_SETENV setenv ("KDB_HOME","/home/else",1); #else putenv("KDB_HOME=/home/else"); #endif kdbbGetFullFilename(handle, k, buffer, MAX_PATH_LENGTH); succeed_if (strcmp (buffer, "/home/else/.kdb/user/key") == 0, "got wrong filename with environment KDB_HOME"); keyDel (mnt); ksDel (conf); keyDel (k); keyDel (i); kdbClose (handle); } void test_filename_to_keyname() { char buffer [MAX_PATH_LENGTH]; printf ("Test filename to keyname\n"); kdbbFilenameToKeyName("folder/key", buffer, MAX_PATH_LENGTH); succeed_if (strcmp (buffer, "folder/key") == 0, "did not encode correctly"); kdbbFilenameToKeyName("folder/key+", buffer, MAX_PATH_LENGTH); succeed_if (strcmp (buffer, "folder/key ") == 0, "did not encode correctly"); kdbbFilenameToKeyName("folder/key%5C", buffer, MAX_PATH_LENGTH); succeed_if (strcmp (buffer, "folder/key\\") == 0, "did not encode correctly"); kdbbFilenameToKeyName("folder/key%25", buffer, MAX_PATH_LENGTH); succeed_if (strcmp (buffer, "folder/key%") == 0, "did not encode correctly"); kdbbFilenameToKeyName("folder/key ", buffer, MAX_PATH_LENGTH); succeed_if (strcmp (buffer, "folder/key ") == 0, "did not encode correctly"); kdbbFilenameToKeyName("folder/key\\", buffer, MAX_PATH_LENGTH); succeed_if (strcmp (buffer, "folder/key\\") == 0, "did not encode correctly"); kdbbFilenameToKeyName("folder/key%5C%2F", buffer, MAX_PATH_LENGTH); succeed_if (strcmp (buffer, "folder/key\\/") == 0, "did not encode correctly"); kdbbFilenameToKeyName("folder/key%5C+", buffer, MAX_PATH_LENGTH); succeed_if (strcmp (buffer, "folder/key\\ ") == 0, "did not encode correctly"); } void test_keyname() { Key *k = keyNew(0); Key *parentKey = keyNew ("user/absolute/reference", KEY_END); KDB *h = kdbOpen(); printf ("Test keynames\n"); kdbbGetFullKeyName(h, "folder/relative/key", parentKey, k); succeed_if (strcmp (keyName(k), "user/absolute/reference/folder/relative/key") == 0, "could not get correct keyname"); kdbbGetFullKeyName(h, "folder/relative%5C%2Fkey%25+", parentKey, k); succeed_if (strcmp (keyName(k), "user/absolute/reference/folder/relative\\/key% ") == 0, "could not get correct keyname"); keyDel (parentKey); keyDel (k); kdbClose (h); } void test_utf8_needed() { #if defined(HAVE_ICONV) && defined(HAVE_NL_LANGINFO) && defined(CODESET) printf ("Test if utf8 conversation is needed\n"); printf ("setlocale %s\n",setlocale(LC_CTYPE,"")); printf ("langinfo %s\n", nl_langinfo(CODESET)); warn_if_fail (kdbbNeedsUTF8Conversion() == 0, "Your default needs conversation, use utf8 to avoid that"); printf ("setlocale %s\n",setlocale (LC_CTYPE, "C")); printf ("langinfo %s\n", nl_langinfo(CODESET)); warn_if_fail (kdbbNeedsUTF8Conversion() != 0, "C needs conversation (you maybe disabled iconv)"); /* printf ("%s\n",setlocale (LC_CTYPE, "de_AT.utf8")); printf ("%s\n", nl_langinfo(CODESET)); succeed_if (kdbbNeedsUTF8Conversion() == 0, "UTF-8 does not need conversation"); */ #else printf ("Dont test utf8 needed, iconv disabled\n"); succeed_if (kdbbNeedsUTF8Conversion() == 0, "should never need to convert"); #endif } void set_str (char **str, size_t *len, char *newstr) { *len = strlen (newstr)+1; kdbiRealloc ((void**)str, *len); strcpy (*str, newstr); } void test_utf8_conversation() { #if defined(HAVE_ICONV) && defined(HAVE_NL_LANGINFO) && defined(CODESET) char * str = malloc (MAX_PATH_LENGTH); size_t len; printf ("Test utf8 conversation\n"); printf ("setlocale %s\n",setlocale(LC_ALL,"C")); set_str (&str, &len, "only ascii"); succeed_if (kdbbUTF8Engine (UTF8_FROM, &str, &len) != -1, "could not use utf8engine"); succeed_if (strcmp ("only ascii", str) == 0, "ascii conversation incorrect"); /* leads to EILSEQ, means illegal byte sequence */ set_str (&str, &len, "Ug.ly:St@ri€n.g Key"); succeed_if (kdbbUTF8Engine (UTF8_FROM, &str, &len) == -1, "could use utf8engine"); /*succeed_if (errno == EILSEQ, "errno not set correctly");*/ free (str); #else printf ("Dont test utf8 conversations, iconv disabled\n"); #endif } int main() { printf("BACKENDHELPERS TESTS\n"); printf("====================\n\n"); test_utf8_needed(); test_utf8_conversation(); test_calc_rel_filename(); test_filename(); test_filename_to_keyname(); test_keyname(); printf("\ntest_backendhelpers RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError); return nbError; } elektra-0.7.1/tests/test_cap.c0000644000076400001440000001143111365506635013211 00000000000000#include void test_system() { Key * key = keyNew ("system", KEY_END); KDB * handle = kdbOpen(); KDBCap *cap=0; printf ("Test system capability\n"); cap=kdbGetCapability(handle, key); exit_if_fail (cap != 0, "could not get capabilities"); succeed_if (strcmp (kdbcGetName(cap), "filesys") == 0, "You are not using filesys for system keys"); succeed_if (strcmp (kdbcGetVersion(cap), "0.2.1") == 0, "wrong version"); succeed_if (strcmp (kdbcGetLicence(cap), "BSD") == 0, "wrong licence"); succeed_if (kdbcGetonlyFullGet(cap) == 0, "default backend must support single gets"); succeed_if (kdbcGetonlyRemoveAll(cap) == 0, "default backend must support single removes"); succeed_if (kdbcGetonlyAddKeys(cap) == 0, "default backend must support adding keys"); succeed_if (kdbcGetnoComment(cap) == 0, "default backend must support comments"); succeed_if (kdbcGetnoValue(cap) == 0, "default backend must *really* support values"); warn_if_fail (kdbcGetnoError(cap) == 0, "What a pity default backend does not support proper error codes"); kdbClose (handle); keyDel (key); } void test_user() { Key * key = keyNew ("user", KEY_END); KDB * handle = kdbOpen(); KDBCap *cap=0; printf ("Test user capability\n"); cap=kdbGetCapability(handle, key); exit_if_fail (cap != 0, "could not get capabilities"); warn_if_fail (strcmp (kdbcGetName(cap), "filesys") == 0, "You are not using filesys for user keys"); warn_if_fail (strcmp (kdbcGetLicence(cap), "BSD") == 0, "Your user keys are not stored in a bsd licenced backend"); succeed_if (kdbcGetonlyFullGet(cap) == 0, "user backend must support single gets"); succeed_if (kdbcGetonlyRemoveAll(cap) == 0, "user backend must support single removes"); succeed_if (kdbcGetonlyAddKeys(cap) == 0, "user backend must support adding keys"); succeed_if (kdbcGetnoComment(cap) == 0, "user backend must support comments"); succeed_if (kdbcGetnoValue(cap) == 0, "user backend must *really* support values"); warn_if_fail (kdbcGetnoError(cap) == 0, "What a pity user backend does not support proper error codes"); kdbClose (handle); keyDel (key); } void test_fstab() { Key * key = keyNew ("system/tests/filesystems", KEY_VALUE, "fstab", KEY_END); KDB * handle = kdbOpen(); KDBCap *cap = 0; KeySet * conf; printf ("Test fstab capability\n"); if (kdbMount (handle, key, conf=ksNew (2,keyNew("system/path", KEY_VALUE, "/tmp/fstab", KEY_END), KS_END)) == -1) { ksDel (conf); keyDel (key); kdbClose (handle); printf ("Could not mount backend %s\n", "fstab"); printf ("Will not continue with tests on that backend\n"); return; } ksDel (conf); cap = kdbGetCapability(handle, key); exit_if_fail (cap != 0, "could not get capabilities"); succeed_if (strcmp (kdbcGetName(cap), "fstab") == 0, "Not fstab in mounted path"); succeed_if (strcmp (kdbcGetVersion(cap), "0.0.1") == 0, "wrong version"); succeed_if (strcmp (kdbcGetLicence(cap), "BSD") == 0, "wrong licence"); succeed_if (kdbcGetonlyFullGet(cap) == 1, "fstab only full get"); succeed_if (kdbcGetonlyRemoveAll(cap) == 1, "fstab only remove all"); succeed_if (kdbcGetonlyAddKeys(cap) == 1, "fstab only add keys"); succeed_if (kdbcGetnoComment(cap) == 1, "fstab does not support comments"); succeed_if (kdbcGetnoError(cap) == 1, "fstab does not return correct error values"); kdbClose (handle); keyDel (key); } void test_hosts() { Key * key = keyNew ("system/tests/hosts", KEY_VALUE, "hosts", KEY_END); KDB * handle = kdbOpen(); KDBCap *cap = 0; KeySet * conf; printf ("Test hosts capability\n"); if (kdbMount (handle, key, conf=ksNew (2,keyNew("system/path", KEY_VALUE, "/tmp/hosts", KEY_END), KS_END)) == -1) { ksDel (conf); keyDel (key); kdbClose (handle); printf ("Could not mount backend %s\n", "hosts"); printf ("Will not continue with tests on that backend\n"); return; } ksDel (conf); cap = kdbGetCapability(handle, key); exit_if_fail (cap != 0, "could not get capabilities"); succeed_if (strcmp (kdbcGetName(cap), "hosts") == 0, "Not hosts in mounted path"); succeed_if (strcmp (kdbcGetVersion(cap), "0.0.2") == 0, "wrong version"); succeed_if (strcmp (kdbcGetLicence(cap), "BSD") == 0, "wrong licence"); succeed_if (kdbcGetonlyFullGet(cap) == 1, "hosts only full get"); succeed_if (kdbcGetonlyRemoveAll(cap) == 1, "hosts only remove all"); succeed_if (kdbcGetonlyAddKeys(cap) == 1, "hosts only add keys"); succeed_if (kdbcGetnoComment(cap) == 1, "hosts does not support comments"); succeed_if (kdbcGetnoError(cap) == 1, "hosts does not return correct error values"); kdbClose (handle); keyDel (key); } int main() { printf("ELEKTRA CAPABILTIY TEST SUITE\n"); printf("========================================\n\n"); init (); test_system(); test_user(); test_fstab(); test_hosts(); printf("\ntest_cap RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError); return nbError; } elektra-0.7.1/tests/test_getset.c0000644000076400001440000005243311365506635013750 00000000000000/*************************************************************************** * test_setget.c - setting and getting test suite * ------------------- * begin : Wed Aug 26 2006 * copyright : (C) 2006 by Patrick Sabin * email : patricksabin@gmx.at ****************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ #include void test_subdir() { KDB *kdb; Key *key,*key1,*key2; KeySet *ks; KeySet *returned; int key1_found; const char* name; Key *parent; printf("testing subdir\n"); kdb=kdbOpen(); exit_if_fail(kdb,"kdbOpen() failed"); ks=ksNew(0); exit_if_fail(ks,"ksNew(0) failed"); /* Test creating two keys */ key=keyNew(KEY_ROOT "/test_d", KEY_DIR, KEY_VALUE, "dirkey", KEY_COMMENT, "dircomment", KEY_END); succeed_if(key!=NULL, "keyNew: Unable to create a new key: user/test"); succeed_if(keySetString(key,"test value")!=0, "keySetString: Cannot set value"); succeed_if(keySetComment(key,"empty")!=0, "keySetComment: Cannot set the key Comment"); ksAppendKey(ks,key); key=keyNew(KEY_ROOT "/test_d/test", KEY_END); succeed_if(key!=NULL, "keyNew: Unable to create a new key: user/test/test"); succeed_if(keySetString(key,"test value2")!=0, "keySetString: Cannot set value"); succeed_if(keySetComment(key,"empty")!=0, "keySetComment: Cannot set the key Comment"); ksAppendKey(ks,key); succeed_if (kdbSet(kdb,ks,0,0)!=-1, "kdbSet failed"); exit_if_fail(kdbClose(kdb)==0,"Could not close libelektra"); exit_if_fail((kdb=kdbOpen())!=NULL,"Could not open elektra"); // read the directory key succeed_if(ksDel(ks)==0,"Could not close keySet"); ks=ksNew(0); returned=ksNew(0); parent=keyNew(KEY_ROOT "/",KEY_END); succeed_if (kdbGet(kdb,returned,parent,0)!=-1, "kdbGet failed"); key1_found=0; for (key=ksNext(returned);key;key=ksNext(returned)) { name=keyName(key); if (!strcmp(name, KEY_ROOT "/test_d")) { key1_found=1; /* output_key(key); */ succeed_if(!strcmp(keyValue(key),"test value"),"value of directory key not correct"); succeed_if(!strcmp(keyComment(key),"empty"),"comment of directory key not correct"); } } succeed_if(key1_found, KEY_ROOT "/test1 not found"); ksDel(returned); keyDel(parent); exit_if_fail(kdbClose(kdb)==0,"Could not close libelektra"); exit_if_fail((kdb=kdbOpen())!=NULL,"Could not open elektra"); // user/test and user/test/test keys are written. Now overwrite them key1=keyNew(KEY_ROOT "/test_d", KEY_DIR, KEY_END); succeed_if(key1!=NULL, "keyNew: Unable to create a new key: user/test"); succeed_if(keySetString(key1,"test value")!=0, "keySetString: Cannot set value"); succeed_if(keySetComment(key1,"empty")!=0, "keySetComment: Cannot set the key Comment"); ksAppendKey(ks,key1); key2=keyNew(KEY_ROOT "/test_d/test", KEY_END); succeed_if(key2!=NULL, "keyNew: Unable to create a new key: user/test/test"); succeed_if(keySetString(key2,"test value2")!=0, "keySetString: Cannot set value"); succeed_if(keySetComment(key2,"empty")!=0, "keySetComment: Cannot set the key Comment"); ksAppendKey(ks,key2); succeed_if (kdbSet(kdb,ks,0,0)!=-1, "kdbSet failed"); keyRemove (key2); succeed_if(kdbSetKey(kdb,key2)==0,"Cannot remove key2"); keyRemove (key1); succeed_if(kdbSetKey(kdb,key1)==0,"Cannot remove key1"); succeed_if(ksDel(ks)==0,"Could not close keySet"); exit_if_fail(kdbClose(kdb)==0,"Could not close libelektra"); } void test_writeread() { KDB *kdb; Key *parent,*key,*key1,*key2; KeySet *ks; KeySet *returned; const char *name; int key1_found,key2_found; //char buffer[1024]; printf("testing write/read\n"); kdb=kdbOpen(); exit_if_fail(kdb,"kdbOpen() failed"); ks=ksNew(0); exit_if_fail(ks,"ksNew(0) failed"); /* Test creating two keys */ key1=keyNew(KEY_ROOT "/test1", KEY_VALUE,"value1", KEY_END); succeed_if(key1!=NULL, "keyNew: Unable to create a new key: user/test"); ksAppendKey(ks,key1); key2=keyNew(KEY_ROOT "/test2", KEY_VALUE,"value2",KEY_COMMENT,"comment2",KEY_END); succeed_if(key2!=NULL, "keyNew: Unable to create a new key: user/test2"); ksAppendKey(ks,key2); succeed_if (kdbSet(kdb,ks,0,0)!=-1, "kdbSet failed"); succeed_if(ksDel(ks)==0,"Could not close keySet"); exit_if_fail(kdbClose(kdb)==0,"Could not close libelektra"); kdb=kdbOpen(); /* Test reading the written keys */ returned=ksNew(0); parent=keyNew(KEY_ROOT "/",KEY_END); succeed_if (kdbGet(kdb,returned,parent,0)!=-1, "could not get keys"); key1_found=key2_found=0; for (key=ksNext(returned);key;key=ksNext(returned)) { name=keyName(key); if (!strcmp(name, KEY_ROOT "/test1")) { key1_found=1; /* output_key(key); */ succeed_if(!strcmp(keyValue(key),"value1"),"value of first written key not correct"); succeed_if(!strcmp(keyComment(key),""),"comment of first written key not correct"); } if (!strcmp(name, KEY_ROOT "/test2")) { key2_found=1; /* output_key(key); */ succeed_if(!strcmp(keyValue(key),"value2"),"value of second written key not correct"); succeed_if(!strcmp(keyComment(key),"comment2"),"value of second written key not correct"); } } succeed_if(key1_found, KEY_ROOT "/test1 not found"); succeed_if(key2_found, KEY_ROOT "/test2 not found"); ksDel(returned); keyDel(parent); exit_if_fail(kdbClose(kdb)==0,"Could not close libelektra"); exit_if_fail((kdb=kdbOpen())!=NULL,"Could not open elektra"); /* Test overwriting the keys */ ks=ksNew(0); exit_if_fail(ks,"ksNew(0) failed"); key1=keyNew(KEY_ROOT "/test1", KEY_VALUE,"value_new1",KEY_COMMENT,"comment1",KEY_END); succeed_if(key1!=NULL, "keyNew: Unable to create a new key: user/test"); ksAppendKey(ks,key1); key2=keyNew(KEY_ROOT "/test2", KEY_VALUE,"value_new2",KEY_END); succeed_if(key2!=NULL, "keyNew: Unable to create a new key: user/test/test"); ksAppendKey(ks,key2); succeed_if(kdbSet(kdb,ks,0,0)!=-1, "kdbSet failed"); exit_if_fail(kdbClose(kdb)==0,"Could not close libelektra"); exit_if_fail((kdb=kdbOpen())!=NULL,"Could not open elektra"); /* Test reading the overwritten keys */ returned=ksNew(0); parent=keyNew(KEY_ROOT "/",KEY_END); succeed_if (kdbGet(kdb,returned,parent,0)!=-1, "could not kdbGet keys"); succeed_if (keyDel (parent) == 0, "Could not delete parent key"); key1_found=key2_found=0; ksRewind(returned); while ((key=ksNext(returned))!=0) { name=keyName(key); if (!strcmp(name, KEY_ROOT "/test1")) { key1_found=1; succeed_if(!strcmp(keyValue(key),"value_new1"),"value of first overwritten key not correct"); succeed_if(!strcmp(keyComment(key),"comment1"),"comment of first overwritten key not correct"); } if (!strcmp(name, KEY_ROOT "/test2")) { key2_found=1; succeed_if(!strcmp(keyValue(key),"value_new2"),"value of second overwritten key not correct"); succeed_if(!strcmp(keyComment(key),""),"comment of second overwritten key not correct"); } } succeed_if(key1_found, KEY_ROOT "/test1 not found"); succeed_if(key2_found, KEY_ROOT "/test2 not found"); ksDel(returned); keyRemove (key2); succeed_if(kdbSetKey(kdb,key2)==0,"Cannot remove key2"); keyRemove (key1); succeed_if(kdbSetKey(kdb,key1)==0,"Cannot remove key1"); succeed_if(ksDel(ks)==0,"Could not close keySet"); exit_if_fail(kdbClose(kdb)==0,"Could not close libelektra"); } void test_mode() { KDB *kdb; Key *key,*key1,*key2,*parent; KeySet *returned,*ks; int key1_found; int ret; int mode, setMode; printf("testing mode\n"); kdb=kdbOpen(); exit_if_fail(kdb,"kdbOpen() failed"); //TODO: mode 0..5 for (mode = 6; mode < 8; mode++) { setMode = mode | mode << 3 | mode << 6; printf ("Testing mode: %o\n", setMode); exit_if_fail(ks=ksNew(0),"ksNew(0) failed"); /* Create a key with permission setMode */ key=keyNew(KEY_ROOT "/mode", KEY_MODE, setMode, KEY_VALUE,"value1", KEY_COMMENT,"comment1",KEY_END); succeed_if(key!=NULL, "keyNew: Unable to create a new key: user/test"); succeed_if(keyGetMode(key) == setMode, "Could not set mode"); ksAppendKey(ks,key); /*errno = KDB_ERR_OK;*/ ret = kdbSet(kdb,ks,0,0); if (mode & MODE_WRITE) { // succeed_if (ret == 0, "could not write key"); } else { succeed_if (ret == -1, "wrote key without write mode?"); /*succeed_if (errno == KDB_ERR_NOCRED, "Errno not set correctly");*/ // TODO: exit_if_fail (ksCurrent(ks), "no current key, where did it fail?"); // succeed_if (strcmp (keyName(ksCurrent(ks)), KEY_ROOT "/mode") == 0, "did stop at wrong key"); // succeed_if (strcmp (keyValue(ksCurrent(ks)), "value1") == 0, "wrong value"); // succeed_if (strcmp (keyComment(ksCurrent(ks)), "comment1") == 0, "wrong comment"); } ksDel (ks); returned=ksNew(0); parent=keyNew(KEY_ROOT, KEY_END); ret = kdbGet(kdb,returned,parent,0); keyDel(parent); key1_found=0; ksRewind(returned); while ((key=ksNext(returned))!=0) { if (!strcmp(keyName(key), KEY_ROOT "/mode")) { key1_found=1; // succeed_if(keyGetMode(key) == setMode, "Mode not correct after get"); if ((mode & MODE_READ) && (mode & MODE_WRITE)) { succeed_if(strcmp (keyValue (key), "value1") == 0, "Could not read value, but should be allowed to"); succeed_if(strcmp (keyComment (key), "comment1") == 0, "Could not read comment, but should be allowed to"); } else if (mode & MODE_WRITE) { succeed_if(!strcmp (keyValue (key), "value1") == 0, "Could read value, but should not be allowed to"); succeed_if(strcmp (keyValue (key), "") == 0, "Value not empty, but write should have failed"); succeed_if(!strcmp (keyComment (key), "comment1") == 0, "Could read comment, but should not be allowed to"); succeed_if(strcmp (keyComment (key), "") == 0, "Comment not empty, but write should have failed"); } else if (mode & MODE_READ) { succeed_if(!strcmp (keyValue (key), "value1") == 0, "Could read value, but should not be allowed to"); succeed_if(strcmp (keyValue (key), "") == 0, "Value not empty after not allowed read"); succeed_if(!strcmp (keyComment (key), "comment1") == 0, "Could read comment, but should not be allowed to"); succeed_if(strcmp (keyComment (key), "") == 0, "Comment not empty after not allowed read"); } } } succeed_if(key1_found, KEY_ROOT "/test1 key not found"); ksDel(returned); /* Overwrite the key*/ // TODO: copy code from above /* Create a sub key for /mode */ exit_if_fail(ks=ksNew(0), "ksNew(0) failed"); key2=keyNew(KEY_ROOT "/mode/key", KEY_VALUE,"value_sub",KEY_COMMENT,"comment_sub",KEY_END); succeed_if(key2!=NULL, "keyNew: Unable to create a new subkey"); ksAppendKey(ks,key2); if (kdbSet(kdb,ks,0,0)==-1) { if (!(mode & 1)) // not a directory, can't write subkey { succeed_if(0,"kdbSet failed"); } } ksDel(ks); /* Overwrite the directory key if there is already a subkey */ ks=ksNew(0); key1=keyNew(KEY_ROOT "/mode/key", KEY_VALUE,"value_new",KEY_COMMENT,"comment_new",KEY_END); key2=keyNew(KEY_ROOT "/mode", KEY_VALUE,"value_new",KEY_COMMENT,"comment_new",KEY_END); ksAppendKey(ks,key1); ksAppendKey(ks,key2); if (kdbSet(kdb,ks,0,0)==-1) { // succeed_if(errno==KDB_ERR_NOTEMPTY, "kdbSet delete nonempty key KDB_ERR_NOTEMPTY expected"); // TODO exit_if_fail (ksCurrent(ks) != 0, "key is Null but should be set to incorrect key"); // printf("trapped: %s\n",keyName(ksCurrent(ks))); // succeed_if (!strcmp(KEY_ROOT "/mode",keyName(ksCurrent(ks))), "kdbSet messed up setting ksCurrent()"); } else { /* if (!(mode & 1)) // is not directory key { succeed_if(0,"Could overwrite a directory with subkeys"); } */ } /* Cleanup */ succeed_if (kdbRemove (kdb, KEY_ROOT "/mode/key") == 0, "Could not remove mode/key"); succeed_if (kdbRemove (kdb, KEY_ROOT "/mode") == 0, "Could not remove mode"); succeed_if(ksDel(ks)==0,"Could not close keySet"); } exit_if_fail(kdbClose(kdb)==0,"Could not close libelektra"); return; } /* This tests the lowest-level way to set a key and get it afterwards */ void test_simple_getset() { KDB *kdb; Key *key,*key1; KeySet *ks; KeySet *returned; printf("testing simple write/read\n"); // create key test1 kdb=kdbOpen(); ks=ksNew(0); key1=keyNew(KEY_ROOT "/test1", KEY_VALUE,"value", KEY_COMMENT,"comment", KEY_END); ksAppendKey(ks,key1); succeed_if (kdbSet(kdb,ks,0,0)!=-1, "could not kdbSet keys"); ksDel(ks); kdbClose(kdb); // get key test1 kdb=kdbOpen(); key=keyNew(KEY_ROOT, KEY_END); returned = ksNew(0); if (kdbGet(kdb,returned,key,0)==-1) { succeed_if(0,"kdbGet failed"); } keyDel(key); key1 = ksLookupByName (returned, KEY_ROOT "/test1", 0); exit_if_fail (key1 != 0, "could not lookup key"); succeed_if (strcmp (keyValue (key1), "value") == 0, "Value not correct"); succeed_if (strcmp (keyComment(key1), "comment") == 0, "Comment not correct"); ksDel (returned); kdbClose(kdb); // delete key test1 kdb=kdbOpen(); ks=ksNew(0); key1=keyNew(KEY_ROOT "/test1", KEY_REMOVE, KEY_END); ksAppendKey(ks,key1); succeed_if (kdbSet(kdb,ks,0,0)!=-1, "could not kdbSet keys"); ksDel(ks); kdbClose(kdb); return; } /* This tests the highlevel-level way to set a key and get it afterwards */ void test_highlevel_getset() { KDB *kdb; Key *key1; printf("testing simple write/read\n"); // create key test3 kdb=kdbOpen(); key1=keyNew(KEY_ROOT "/test3", KEY_VALUE,"value", KEY_COMMENT,"comment", KEY_END); succeed_if (kdbSetKey(kdb,key1)!=-1, "could not kdbSet keys"); keyDel (key1); kdbClose(kdb); // get key test3 kdb=kdbOpen(); key1=keyNew(KEY_ROOT "/test3", KEY_END); if (kdbGetKey(kdb,key1)==-1) { succeed_if(0,"kdbGetKey failed"); } succeed_if (strcmp (keyValue (key1), "value") == 0, "Value not correct"); succeed_if (strcmp (keyComment(key1), "comment") == 0, "Comment not correct"); keyDel (key1); kdbClose(kdb); // delete key test3 kdb=kdbOpen(); key1=keyNew(KEY_ROOT "/test3", KEY_REMOVE, KEY_END); succeed_if (kdbSetKey (kdb,key1)==0, "could not get a key"); keyDel (key1); kdbClose(kdb); return; } /* This tests do recursive set and get keys */ void test_simple_recursive_getset() { KDB *kdb; Key *key,*key1; KeySet *ks; KeySet *returned; printf("testing recursive write/read\n"); // create key test1 kdb=kdbOpen(); ks=ksNew(0); key1=keyNew(KEY_ROOT "/dir", KEY_DIR, KEY_VALUE,"dirvalue", KEY_COMMENT,"dircomment", KEY_END); ksAppendKey(ks,key1); key1=keyNew(KEY_ROOT "/dir/key", KEY_VALUE,"value", KEY_COMMENT,"comment", KEY_END); ksAppendKey(ks,key1); succeed_if (kdbSet(kdb,ks,0,0)!=-1, "could not kdbSet keys"); ksDel(ks); kdbClose(kdb); // get key test1 kdb=kdbOpen(); key=keyNew(KEY_ROOT, KEY_END); returned = ksNew(0); if (kdbGet(kdb,returned,key,0)==-1) { succeed_if(0,"kdbGet failed"); } keyDel(key); key1 = ksLookupByName (returned, KEY_ROOT "/dir/key", 0); exit_if_fail (key1 != 0, "could not lookup key"); succeed_if (strcmp (keyValue (key1), "value") == 0, "Value not correct"); succeed_if (strcmp (keyComment(key1), "comment") == 0, "Comment not correct"); key1 = ksLookupByName (returned, KEY_ROOT "/dir", 0); exit_if_fail (key1 != 0, "could not lookup key"); succeed_if (strcmp (keyValue (key1), "dirvalue") == 0, "Value not correct"); succeed_if (strcmp (keyComment(key1), "dircomment") == 0, "Comment not correct"); ksDel (returned); kdbClose(kdb); // delete key test1 kdb=kdbOpen(); ks=ksNew(0); key1=keyNew(KEY_ROOT "/dir/key", KEY_REMOVE, KEY_END); ksAppendKey(ks,key1); key1=keyNew(KEY_ROOT "/dir", KEY_DIR, KEY_REMOVE, KEY_END); ksAppendKey(ks,key1); succeed_if (kdbSet(kdb,ks,0,0)!=-1, "could not kdbSet keys"); ksDel(ks); kdbClose(kdb); return; } /* This tests do recursive set and get keys */ void test_recursive_getset() { KDB *kdb; Key *key,*key1; KeySet *ks; KeySet *returned; int found [5]; int i; for (i=0; i<5; i++) found[i] = 0; printf("testing recursive write/read\n"); // create key test1 kdb=kdbOpen(); ks=ksNew(0); key1=keyNew(KEY_ROOT "/key1", KEY_VALUE,"value1", KEY_COMMENT,"comment", KEY_END); ksAppendKey(ks,key1); key1=keyNew(KEY_ROOT "/dir2", KEY_DIR, KEY_VALUE,"dirvalue", KEY_COMMENT,"dircomment", KEY_END); ksAppendKey(ks,key1); key1=keyNew(KEY_ROOT "/dir1", KEY_DIR, KEY_VALUE,"dirvalue", KEY_COMMENT,"dircomment", KEY_END); ksAppendKey(ks,key1); key1=keyNew(KEY_ROOT "/dir1/key2", KEY_VALUE,"value2", KEY_COMMENT,"comment", KEY_END); ksAppendKey(ks,key1); key1=keyNew(KEY_ROOT "/dir1/key1", KEY_VALUE,"value1", KEY_COMMENT,"comment", KEY_END); ksAppendKey(ks,key1); succeed_if (kdbSet(kdb,ks,0,0)!=-1, "could not kdbSet keys"); ksDel(ks); kdbClose(kdb); // get key test1 kdb=kdbOpen(); key=keyNew(KEY_ROOT, KEY_END); returned = ksNew(0); if (kdbGet(kdb,returned,key,0)==-1) { succeed_if(0,"kdbGet failed"); } keyDel(key); // check if all keys are in set and exactly once // output_keyset(returned, 0); ksRewind(returned); while ((key=ksNext(returned))!=0) { if (strcmp (keyName(key), KEY_ROOT "/key1") == 0) found [0]++; else if (strcmp (keyName(key), KEY_ROOT "/dir2") == 0) found [1]++; else if (strcmp (keyName(key), KEY_ROOT "/dir1") == 0) found [2]++; else if (strcmp (keyName(key), KEY_ROOT "/dir1/key2") == 0) found [3]++; else if (strcmp (keyName(key), KEY_ROOT "/dir1/key1") == 0) found [4]++; } for (i=0; i<5;i++) { // printf("%d", found[i]); succeed_if (found[i] == 1, "key did not appear exactly once"); } key1 = ksLookupByName (returned, KEY_ROOT "/dir1/key1", 0); exit_if_fail (key1 != 0, "could not lookup key"); succeed_if (strcmp (keyValue (key1), "value1") == 0, "Value not correct"); succeed_if (strcmp (keyComment(key1), "comment") == 0, "Comment not correct"); key1 = ksLookupByName (returned, KEY_ROOT "/dir1", 0); exit_if_fail (key1 != 0, "could not lookup key"); succeed_if (strcmp (keyValue (key1), "dirvalue") == 0, "Value not correct"); succeed_if (strcmp (keyComment(key1), "dircomment") == 0, "Comment not correct"); ksDel (returned); kdbClose(kdb); // delete key test1 kdb=kdbOpen(); ks=ksNew(0); key1=keyNew(KEY_ROOT "/dir1/key1", KEY_REMOVE, KEY_END); ksAppendKey(ks,key1); key1=keyNew(KEY_ROOT "/dir1/key2", KEY_REMOVE, KEY_END); ksAppendKey(ks,key1); key1=keyNew(KEY_ROOT "/dir1", KEY_REMOVE, KEY_END); ksAppendKey(ks,key1); key1=keyNew(KEY_ROOT "/dir2", KEY_REMOVE, KEY_END); ksAppendKey(ks,key1); key1=keyNew(KEY_ROOT "/key1", KEY_REMOVE, KEY_END); ksAppendKey(ks,key1); succeed_if (kdbSet(kdb,ks,0,0)!=-1, "could not kdbSet keys"); ksDel(ks); kdbClose(kdb); return; } /* This tests the lowest-level way to set a directory key and get it afterwards */ void test_directory_getset() { KDB *kdb; Key *key,*key1; KeySet *ks; KeySet *returned; printf("testing simple write/read\n"); // create key test1 kdb=kdbOpen(); ks=ksNew(0); key1=keyNew(KEY_ROOT "/dir4", KEY_DIR, KEY_VALUE,"value4", KEY_COMMENT,"comment4", KEY_END); ksAppendKey(ks,key1); succeed_if (kdbSet(kdb,ks,0,0)!=-1, "could not kdbSet keys"); ksDel(ks); kdbClose(kdb); // get key test1 kdb=kdbOpen(); key=keyNew(KEY_ROOT, KEY_END); returned = ksNew(0); if (kdbGet(kdb,returned,key,0)==-1) { succeed_if(0,"kdbGet failed"); } keyDel(key); key1 = ksLookupByName (returned, KEY_ROOT "/dir4", 0); succeed_if (strcmp (keyValue (key1), "value4") == 0, "Value not correct"); succeed_if (strcmp (keyComment(key1), "comment4") == 0, "Comment not correct"); succeed_if (keyIsDir(key1) , "not a directory"); ksDel (returned); kdbClose(kdb); // delete key test1 kdb=kdbOpen(); ks=ksNew(0); key1=keyNew(KEY_ROOT "/dir4", KEY_REMOVE, KEY_END); ksAppendKey(ks,key1); succeed_if (kdbSet(kdb,ks,0,0)!=-1, "could not kdbSet keys"); ksDel(ks); kdbClose(kdb); return; } /* This tests the highlevel-level way to set a directory and get it afterwards */ void test_directory_highlevel_getset() { KDB *kdb; Key *key1; printf("testing simple write/read\n"); // create key test3 kdb=kdbOpen(); key1=keyNew(KEY_ROOT "/dir5", KEY_DIR, KEY_VALUE,"value5", KEY_COMMENT,"comment5", KEY_END); succeed_if (kdbSetKey(kdb,key1)!=-1, "could not kdbSet a key"); keyDel (key1); kdbClose(kdb); // get key test3 kdb=kdbOpen(); key1=keyNew(KEY_ROOT "/dir5", KEY_END); if (kdbGetKey(kdb,key1)==-1) { succeed_if(0,"kdbGetKey failed"); } succeed_if (strcmp (keyValue (key1), "value5") == 0, "Value not correct"); succeed_if (strcmp (keyComment(key1), "comment5") == 0, "Comment not correct"); succeed_if (keyIsDir(key1) , "not a directory"); keyDel (key1); kdbClose(kdb); // delete key test3 kdb=kdbOpen(); key1=keyNew(KEY_ROOT "/dir5", KEY_REMOVE, KEY_END); succeed_if (kdbSetKey (kdb,key1)!=-1, "could not set a key"); keyDel (key1); kdbClose(kdb); return; } int main() { printf("\n\n"); printf("ELEKTRA SET/GET TEST SUITE\n"); printf("========================================\n\n"); exit_if_fail (loadToolsLib()==0, "Unable to load elektratools"); init (); test_simple_getset(); test_writeread(); test_subdir(); test_mode(); test_highlevel_getset(); test_simple_recursive_getset(); test_recursive_getset(); test_directory_getset(); test_directory_highlevel_getset(); printf("\ntest_getset RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError); return nbError; } elektra-0.7.1/tests/test_internals.c0000644000076400001440000000401211365506635014442 00000000000000/*************************************************************************** * test_split.c - Test suite for splitted keyset data structure * ------------------- * begin : Fri 21 Mar 2008 * copyright : (C) 2008 by Markus Raab * email : elektra@markus-raab.org ****************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STRING_H #include #endif #include /*Needs private declarations*/ #include void test_strlen () { wchar_t multicharSeq [5]; printf ("Test kdbiStrLen\n"); multicharSeq [0] = '\323'; multicharSeq [1] = L'a'; multicharSeq [2] = L'\20'; multicharSeq [3] = L'\40'; multicharSeq [4] = L'\0'; // printf ("%s %d %d\n", multicharSeq, kdbiStrLen (multicharSeq), strlen(multicharSeq)); succeed_if(kdbiStrLen ((char*)multicharSeq) == 6, "could not deduce correct multichar sequence length"); } int test_load_toolslib() { KeySet *ks = ksNew (0); exit_if_fail (loadToolsLib()==0, "Unable to load elektratools"); exit_if_fail( ksFromXMLfile(ks, "key.xml") == 0, "ksFromXMLfile(key.xml) failed."); ksGenerate (ks, stdout, KDB_O_HEADER); ksDel (ks); return 0; } int main() { printf("INTERNALS TESTS\n"); printf("==================\n\n"); init (); test_strlen(); // test_load_toolslib(); printf("\ntest_internals RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError); return nbError; } elektra-0.7.1/tests/test_kdb.c0000644000076400001440000004005411365506635013211 00000000000000/*************************************************************************** * test_kdb.c - Backend test suite * ------------------- * begin : Thu Aug 03 2006 * copyright : (C) 2006 by Yannick Lecaillez * email : sizon5@gmail.com ****************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ #include /* Remove all keys below and with root. * * Will remove but not delete the root element! * * */ void remove_keys (KDB *handle, Key *root) { KeySet *ks; ks = ksNew(0); succeed_if (kdbGet (handle, ks, root, KDB_O_INACTIVE) > 0, "could not get keys below root key"); ksRewind (ks); succeed_if (kdbSet (handle, ks, root,KDB_O_REMOVEONLY) != -1, "could not remove root"); ksDel (ks); } int test_keyCompare(Key *key1, Key *key2, unsigned int ignoreFlags) { int ret; int err = nbError; ret = keyCompare(key1, key2); if ( (ret & ignoreFlags) != ret ) { if ( !(ignoreFlags & KEY_TYPE) ) succeed_if ( (ret & KEY_TYPE) == 0, "Key type isn't same"); if ( !(ignoreFlags & KEY_NAME) ) succeed_if ( (ret & KEY_NAME) == 0, "Key name isn't same"); if ( !(ignoreFlags & KEY_VALUE)) succeed_if ( (ret & KEY_VALUE) == 0, "Key value isn't same"); if ( !(ignoreFlags & KEY_OWNER)) succeed_if ( (ret & KEY_OWNER) == 0, "Key owner isn't same"); if ( !(ignoreFlags & KEY_COMMENT)) succeed_if ( (ret & KEY_COMMENT) == 0, "Key comment isn't same"); if ( !(ignoreFlags & KEY_UID) ) succeed_if ( (ret & KEY_UID) == 0, "Key UID isn't name"); if ( !(ignoreFlags & KEY_GID) ) succeed_if ( (ret & KEY_GID) == 0, "Key GID isn't name"); if ( !(ignoreFlags & KEY_MODE)) succeed_if ( (ret & KEY_MODE) == 0, "Key mode isn't name"); } return nbError-err; } /* Test kdbGet()/kdbSet() * ---------------------------- * * kdbSetKey the supplied key. Then kdbGetKey it * Compare these two. * * NOTE: The tested key isn't kdbRemoved(). * * return 0 if succeed, otherwise number of errors */ int testcase_kdbSetKeyAndkdbGetKey(KDB *handle, Key *key) { Key *check; int err = nbError; int ignoreFlags = 0; // printf("\t* testing kdbSetKey()/kdbGetKey()\n"); check = keyDup(key); succeed_if( kdbSetKey(handle, key) == 0, "kdbSetKey failed."); if ( !err ) { succeed_if( kdbGetKey(handle, check) == 0, "kdbGetKey failed."); test_keyCompare(check, key, ignoreFlags); } keyDel(check); return nbError-err; } /* Test kdbStatKey() * ----------------- * * kdbGetKey() then kdbStatKey() the supplied key. * Compare the "STATed" version against the getted version. * * NOTE: The tested key must exist. */ int testcase_kdbStatKey(KDB *handle, Key *k) { Key *tmp; Key *key = keyDup (k); int err = nbError; /* printf("\t* testing kdbStatKey()\n"); */ tmp = keyNew(keyName(key), KEY_END); succeed_if( kdbGetKey(handle, key) == 0, "kdbGetKey failed."); keyStat (key); succeed_if( kdbGetKey(handle, tmp) == 0, "kdbStatKey failed."); succeed_if( (keyGetUID(tmp) == keyGetUID(key)), "kdbStatKey returned wrong UID."); succeed_if( (keyGetGID(tmp) == keyGetGID(key)), "kdbStatKey returned wrong GID."); succeed_if( (keyGetMode(tmp) == keyGetMode(key)), "kdbStatKey returned wrong Mode."); succeed_if( (keyGetATime(tmp) >= keyGetATime(key)), "kdbStatKey returned wrong mode time."); succeed_if( (keyGetMTime(tmp) == keyGetMTime(key)), "kdbStatKey returned wrong modification time."); succeed_if( (keyGetCTime(tmp) == keyGetCTime(key)), "kdbStatKey returned wrong last change time."); keyDel(tmp); keyDel (key); return nbError-err; } /* * Renames the key to a given newname in backend in an atomic way. * * @note the key will not exist afterwards in database * * @param handle contains internal information of @link kdbOpen() opened @endlink key database * @param key an initialized Key retrieved from backend * @param newname the new name which the name should have in backend * @return 0 on success * @return -1 on failure and @c errno is propagated * @see kdbSet() * @ingroup kdb */ int kdbRename(KDB *handle, const Key *key, const char *newname) { KeySet * ks = ksNew(0); Key * toRename = keyDup(key); Key * toRemove = keyDup(key); keyRemove (toRemove); ksAppendKey(ks, toRemove); if (keySetName (toRename, newname) == -1) { ksDel (ks); return -1; } ksAppendKey(ks, toRename); if (kdbSet (handle, ks,0,0) == -1) { #if DEBUG printf ("kdbRename: kdbSet failed\n"); #endif ksDel (ks); return -1; } ksDel (ks); return 0; } /* Test kdbRename() * ---------------- * * Rename the tested key to -renamed. * Then check if is removed & -renamed * exists. * * NOTE: The tested key must be set. * At the end, the key is renamed to its original name, * thus only the original will be there after test. */ int testcase_kdbRename(KDB *handle, Key *k) { Key *tmp; char buf[KEY_LENGTH]; Key *key=keyDup(k); int err = nbError; snprintf(buf, sizeof(buf), "%s-renamed", keyName(key)); tmp = keyNew(buf, KEY_END); succeed_if( kdbRename(handle, key, buf) == 0, "kdbRename failed."); succeed_if( kdbGetKey(handle, tmp) == 0, "kdbGetKey on the renamed key failed."); succeed_if( kdbGetKey(handle, key) , "kdbGetKey succeed. The old renamed key is still existing."); succeed_if( kdbRename(handle, tmp, keyName(key)) == 0, "kdbRename failed. Can't reverse to the original name."); // already renamed back // keyRemove (tmp); // succeed_if (kdbSetKey(handle, tmp) == -1, "the renamed back key still exists"); keyDel(tmp); keyDel(key); return nbError-err; } /* Make sure that it is possible to create, set and get keys * in the default backend before trying to mount others*/ void test_default(KDB * handle, Key * root) { Key *key, *key2; // test if current directory works key = keyDup(root); succeed_if (key, "Could not create new key"); keyAddBaseName(key, "test_delete"); succeed_if (testcase_kdbSetKeyAndkdbGetKey (handle, key) == 0, "Set and Get key failed"); succeed_if (keyRemove (key) != -1, "Could not mark key to remove"); succeed_if (kdbSetKey (handle, key) != -1, "Could not remove key"); succeed_if (kdbGetKey (handle, key) == -1, "Key seems to exists"); keyDel (key); // test if current directory works - with value, comment key = keyDup(root); keySetString(key, "myvalue"); keySetComment (key, "mycomment"); keyAddBaseName(key, "test_key"); succeed_if (key, "Could not create new key"); //succeed_if (strcmp (keyName (key), root) == 0, "Name for key is not correct"); succeed_if (testcase_kdbSetKeyAndkdbGetKey (handle, key) == 0, "Set and Get key failed"); succeed_if (keyRemove (key) != -1, "Could not mark key to remove"); succeed_if (kdbSetKey (handle, key) != -1, "Could not remove key"); succeed_if (kdbGetKey (handle, key) == -1, "Key seems to exists"); keyDel(key); // remove it again key = keyDup (root); succeed_if (key, "Could not create new key"); keyAddBaseName(key, "test_delete"); succeed_if (testcase_kdbSetKeyAndkdbGetKey (handle, key) == 0, "Set and Get key failed"); keyRemove (key); succeed_if (kdbSetKey (handle, key) != -1, "Could not remove key"); succeed_if (kdbGetKey (handle, key) == -1, "Key seems to exists"); keyDel (key); // clone key with keyDup key = keyDup (root); keyAddBaseName (key, "dup_test"); succeed_if (testcase_kdbSetKeyAndkdbGetKey (handle, key) == 0, "Set and Get key failed"); keyRemove (key); succeed_if (kdbSetKey (handle, key) != -1, "Could not remove key"); succeed_if (kdbGetKey (handle, key) == -1, "Key seems to exists"); keyDel (key); // last test with a subdirectory key = keyDup (root); keyAddBaseName (key, "default"); key2 = keyDup (key); keyAddBaseName (key2, "key"); succeed_if (testcase_kdbSetKeyAndkdbGetKey (handle, key2) == 0, "Set and Get key failed"); keyRemove (key2); succeed_if (kdbSetKey (handle, key2) != -1, "Could not remove key"); succeed_if (kdbGetKey (handle, key2) == -1, "Key seems to exists"); keyDel (key2); succeed_if (testcase_kdbSetKeyAndkdbGetKey (handle, key) == 0, "Set and Get key failed"); keyRemove (key); succeed_if (kdbSetKey (handle, key) != -1, "Could not remove directory key"); succeed_if (kdbGetKey (handle, key) == -1, "Key seems to exists"); keyDel (key); // now lets see if root key survived the procedure key = keyDup (root); succeed_if (key, "Could not create new key"); exit_if_fail (kdbGetKey (handle, key) == 0, "Root key suddenly missing?"); keyDel (key); keyDel (root); // default backends seems to work } void test_backend(KDB * handle, Key * root, char *fileName, KeySet *conf) { KeySet *ks, *ks2, *ksd; Key *cur; unsigned long options = KDB_O_POP; KDBCap *cap; succeed_if (testcase_kdbSetKeyAndkdbGetKey (handle, root) == 0, "Set and Get backend root key failed"); printf("Testing elektra-%s backend with file %s, Root: %s.\n", (char*)keyValue(root), fileName, keyName (root)); printf("==========================\n"); if (kdbMount (handle, root, conf) == -1) { printf ("Could not mount backend %s\n", (char*)keyValue(root)); printf ("Will not continue with tests on that backend\n"); remove_keys(handle, root); keyDel (root); ksDel (conf); return; } cap = kdbGetCapability (handle, root); exit_if_fail (cap != NULL, "can't test backend not declaring its capabilities"); ks = ksNew(0); printf("Getting file from %s.\n", fileName); exit_if_fail( ksFromXMLfile(ks, fileName) == 0, "ksFromXMLfile failed."); /* ksOutput (ks, stdout, 0); */ /* ksGenerate (ks, stdout, 0); */ if (kdbcGetonlyFullSet(cap)) { /* Add a duplication of root key so that kdbSet does not fail */ ksAppendKey(ks, keyDup(root)); options = 0; /* ksOutput (ks, stdout, 0); */ succeed_if( kdbSet(handle, ks, root, KDB_O_SYNC) > 0, "kdbSet with FullSet failed."); } else { exit_if_fail (kdbGetKey (handle, root) == 0, "No root key?"); ksRewind(ks); ksSort(ks); while ( (cur = ksNext(ks)) ) { /* keyGenerate (cur); */ keySetUID (cur, nbUid); keySetGID (cur, nbGid); succeed_if (testcase_kdbSetKeyAndkdbGetKey (handle, cur) == 0, "Set and Get key failed"); succeed_if (testcase_kdbRename(handle, cur) == 0, "Could not rename key"); succeed_if (testcase_kdbStatKey(handle, cur) == 0, "Could not stat key"); // to get sync flag away, to allow next testcase succeed_if (testcase_kdbSetKeyAndkdbGetKey (handle, cur) == 0, "Set and Get key failed"); } } printf ("Testing kdbGet with 2 inactive keys\n"); ks2 = ksNew(0); succeed_if( kdbGet(handle, ks2, root, KDB_O_INACTIVE | options) >= 0, "kdbGet failed."); succeed_if( compare_keyset(ks, ks2, 0, cap) == 0, "compare keyset with all keys failed"); /* printf ("We got :\n"); ksGenerate (ks2, stdout, KDB_O_HEADER); printf ("We want:\n"); ksGenerate (ks, stdout, KDB_O_HEADER); */ ksDel(ks2); printf ("Testing kdbGet with 2 inactive keys not yet updating (fails)\n"); ks2 = ksNew(0); succeed_if( kdbGet(handle, ks2, root, KDB_O_INACTIVE | options) >= 0, "kdbGet failed."); succeed_if( compare_keyset(ks, ks2, 0, cap) == 0, "compare keyset with all keys failed"); /* printf ("We got :\n"); ksGenerate (ks2, stdout, KDB_O_HEADER); printf ("We want:\n"); ksGenerate (ks, stdout, KDB_O_HEADER); */ ksDel(ks2); printf ("Testing kdbGet with no option\n"); ks2 = ksNew(0); succeed_if( kdbGet(handle, ks2, root, options) >= 0, "kdbGet failed."); succeed_if( compare_keyset(ks, ks2, KDB_O_INACTIVE, cap) == 0, "compare keyset INACTIVE failed"); /* ksOutput (ks, stdout, KDB_O_HEADER); ksOutput (ks2, stdout, KDB_O_HEADER); */ ksDel(ks2); printf ("Testing kdbGet with 3 directories\n"); ks2 = ksNew(0); succeed_if( kdbGet(handle, ks2, root, KDB_O_NODIR | options) >= 0, "kdbGet failed."); succeed_if( compare_keyset(ks, ks2, KDB_O_NODIR | KDB_O_INACTIVE, cap) == 0, "compare keyset NODIR failed"); ksDel(ks2); printf ("Testing kdbGet only with directories\n"); ks2 = ksNew(0); succeed_if( kdbGet(handle, ks2, root, KDB_O_INACTIVE | KDB_O_DIRONLY | options) >= 0, "kdbGet failed."); succeed_if( compare_keyset(ks, ks2, KDB_O_DIRONLY, cap) == 0, "compare keyset DIRONLY failed"); ksDel(ks2); remove_keys(handle, root); succeed_if( kdbSet(handle, ks, root, KDB_O_SYNC) != -1, "kdbSet failed."); printf ("Testing kdbGet with inactive keys\n"); ks2 = ksNew(0); succeed_if( kdbGet(handle, ks2, root, KDB_O_INACTIVE | options) >= 0, "kdbGet failed."); succeed_if( compare_keyset(ks, ks2, 0, cap) == 0, "compare keyset with all keys failed"); /* ksGenerate (ks, stdout, 0); printf ("but is "); ksGenerate (ks2, stdout, 0); */ ksDel(ks2); printf ("Testing kdbGet with no option\n"); ks2 = ksNew(0); succeed_if( kdbGet(handle, ks2, root, options) >= 0, "kdbGet failed."); succeed_if( compare_keyset(ks, ks2, KDB_O_INACTIVE, cap) == 0, "compare keyset INACTIVE failed"); ksDel(ks2); printf ("Testing kdbGet without directories\n"); ks2 = ksNew(0); succeed_if( kdbGet(handle, ks2, root, KDB_O_NODIR | options) >= 0, "kdbGet failed."); succeed_if( compare_keyset(ks, ks2, KDB_O_NODIR | KDB_O_INACTIVE, cap) == 0, "compare keyset NODIR failed"); ksDel(ks2); printf ("Testing kdbGet only with directories\n"); ks2 = ksNew(0); succeed_if( kdbGet(handle, ks2, root, KDB_O_DIRONLY | options) >= 0, "kdbGet failed."); succeed_if( compare_keyset(ks, ks2, KDB_O_DIRONLY | KDB_O_INACTIVE, cap) == 0, "compare keyset DIRONLY failed"); ksDel(ks2); printf ("Testing kdbGet with only stat\n"); ks2 = ksNew(0); keyStat(root); succeed_if( kdbGet(handle, ks2, root, KDB_O_STATONLY | options) >= 0, "kdbGet failed."); succeed_if (keyNeedStat(root) == 1, "root should need stat"); ksRewind (ks2); while (ksNext(ks2) != 0) succeed_if (keyNeedStat(ksCurrent(ks2)) == 1, "all keys should need stat"); succeed_if( compare_keyset(ks, ks2, KDB_O_INACTIVE | KDB_O_STATONLY, cap) == 0, "compare keyset STATONLY failed"); ksDel(ks2); printf ("Testing kdbGet no stat\n"); ks2 = ksNew(0); keyStat(root); succeed_if( kdbGet(handle, ks2, root, KDB_O_NOSTAT | options) >= 0, "kdbGet failed."); succeed_if (keyNeedStat(root) == 0, "root should not need stat"); ksRewind (ks2); while (ksNext(ks2) != 0) succeed_if (keyNeedStat(ksCurrent(ks2)) == 0, "all keys should not need stat"); succeed_if( compare_keyset(ks, ks2, KDB_O_INACTIVE, cap) == 0, "compare keyset NOSTAT failed"); ksDel(ks2); printf ("Testing kdbGet with inactive keys but no recursive\n"); ks2 = ksNew(0); succeed_if( kdbGet(handle, ks2, root, KDB_O_INACTIVE | KDB_O_NORECURSIVE | options) >= 0, "kdbGet failed."); ksd = ksNew (0); ksRewind (ks); while ((cur = ksNext(ks)) != 0) { if (!strcmp(keyName(root), keyName(cur)) || keyIsDirectBelow(root, cur)) { ksAppendKey(ksd, cur); } } succeed_if( compare_keyset(ksd, ks2, 0, cap) == 0, "compare keyset with all keys no recursive failed"); /* printf ("ks was "); ksGenerate (ks, stdout, 0); printf ("ksd is "); ksGenerate (ksd, stdout, 0); printf ("but is "); ksGenerate (ks2, stdout, 0); */ ksDel(ks2); ksDel(ksd); ksDel(ks); remove_keys(handle, root); kdbUnmount (handle, root); keyDel (root); ksDel (conf); } int main() { printf("ELEKTRA BACKENDS TEST SUITE\n"); printf("========================================\n\n"); init (); KDB *handle = kdbOpen(); exit_if_fail(handle, "kdbOpen() failed."); test_default(handle, create_root_key("")); test_backend(handle, create_root_key("filesys"),srcdir_file("filesys.xml"),create_conf (".kdb")); test_backend(handle, create_root_key("filesys"),srcdir_file("keyset.xml"), create_conf (".kdb")); test_backend(handle, create_root_key("fstab"), srcdir_file("fstab.xml"), create_conf (".kdb/fstab_kdb")); test_backend(handle, create_root_key("hosts"), srcdir_file("hosts.xml"), create_conf (".kdb/hosts_kdb")); printf("\ntest_kdb RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError); exit_if_fail (kdbClose(handle) == 0, "Could not close libelektra"); return nbError; } elektra-0.7.1/tests/test_key.c0000644000076400001440000026472411365506635013255 00000000000000/*************************************************************************** * test_key.c - Key struct test suite * ------------------- * begin : Thu Aug 03 2006 * copyright : (C) 2006 by Yannick Lecaillez * email : sizon5@gmail.com ****************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include struct test { char *testName; char *keyName; char *expectedKeyName; char *expectedBaseName; char *expectedFRootName; char *expectedParentName; }; struct test tstKeyName[] = { { "Normal key", "system/foo/bar", "system/foo/bar", "bar", "system", "system/foo" }, { "Key containing redundant & trailing separator", "system//foo//bar//", "system/foo/bar", /* keyName */ "bar", /* keyBaseName */ "system", /* keyGetFullRootName */ "system/foo" /* keyGetParentName */ }, { "Normal user key", "user/key", "user/key", /* keyName */ "key", /* keyBaseName */ "user:env1", /* keyGetFullRootName */ "user" /* keyGetParentName */ }, { "Normal user key with owner", "user:owner/key", "user/key", /* keyName */ "key", /* keyBaseName */ "user:owner", /* keyGetFullRootName */ "user" /* keyGetParentName */ }, { "Depth user key with owner", "user:owner/folder/long/base/dir/key", "user/folder/long/base/dir/key", /* keyName */ "key", /* keyBaseName */ "user:owner", /* keyGetFullRootName */ "user/folder/long/base/dir" /* keyGetParentName */ }, { "Key containing escaped separator", "user:yl///foo\\///bar\\/foo_bar\\", "user/foo\\//bar\\/foo_bar\\", /* keyName */ "bar\\/foo_bar\\", /* keyBaseName */ "user:yl", /* keyGetFullRootName */ "user/foo\\/" /* keyGetParentName */ }, { "Key containing escaped separator at the end", "user:yl///foo\\///bar\\/foo_bar\\/", "user/foo\\//bar\\/foo_bar\\/", /* keyName */ "bar\\/foo_bar\\/", /* keyBaseName */ "user:yl", /* keyGetFullRootName */ "user/foo\\/" /* keyGetParentName */ }, { NULL, NULL, NULL } }; void test_keyComparing() { Key *key1 = keyNew(0); Key *key2 = keyNew(0); succeed_if(keyCompare(key1,key2) == 0, "the keys don't differ of course"); keySetName (key1, "user/myname"); succeed_if(keyCompare(key1,key2) == KEY_NAME, "the keys should differ in name"); keySetName (key2, "user/myname"); succeed_if(keyCompare(key1,key2) == 0, "the keys should not differ in name"); keySetOwner (key1, "myowner"); succeed_if(keyCompare(key1,key2) == KEY_OWNER, "the keys should differ in owner"); keySetOwner (key2, "myowner"); succeed_if(keyCompare(key1,key2) == 0, "the keys should not differ in owner"); keySetString (key1, "myvalue"); succeed_if(keyCompare(key1,key2) == (KEY_VALUE|KEY_TYPE), "the keys should differ in value and type"); keySetType (key2, KEY_TYPE_STRING); succeed_if(keyCompare(key1,key2) == KEY_VALUE, "the keys should differ in value"); keySetString (key2, "myvalue"); succeed_if(keyCompare(key1,key2) == 0, "the keys should not differ in value"); keySetComment (key1, "mycomment"); succeed_if(keyCompare(key1,key2) == KEY_COMMENT, "the keys should differ in comment"); keySetComment (key2, "mycomment"); succeed_if(keyCompare(key1,key2) == 0, "the keys should not differ in comment"); keySetUID (key1, 50); succeed_if(keyCompare(key1,key2) == KEY_UID, "the keys should differ in uid"); keySetUID (key2, 50); succeed_if(keyCompare(key1,key2) == 0, "the keys should not differ in uid"); keySetGID (key1, 50); succeed_if(keyCompare(key1,key2) == KEY_GID, "the keys should differ in gid"); keySetGID (key2, 50); succeed_if(keyCompare(key1,key2) == 0, "the keys should not differ in gid"); keySetMode (key1, 0222); succeed_if(keyCompare(key1,key2) == KEY_MODE, "the keys should differ in mode"); keySetMode (key2, 0222); succeed_if(keyCompare(key1,key2) == 0, "the keys should not differ in mode"); keySetType (key1, 50); succeed_if(keyCompare(key1,key2) == KEY_TYPE, "the keys should differ in type"); keySetType (key2, 50); succeed_if(keyCompare(key1,key2) == 0, "the keys should not differ in type"); keyDel (key1); keyDel (key2); } void test_keyNewSystem() { Key *key; char array[] = "here is some data stored"; char * getBack; Key *k1; Key *k2; Key *k3; printf("Test system key creation\n"); // Empty key key = keyNew(0); succeed_if(key != NULL, "keyNew: Unable to create a new empty key"); succeed_if(keyDel(key) == 0, "keyDel: Unable to delete empty key"); // Key with name key = keyNew("system/sw/test", KEY_END); succeed_if(key != NULL, "keyNew: Unable to create a key with name"); succeed_if(keyNeedRemove (key) == 0, "KEY_REMOVE set"); succeed_if(strcmp(keyName(key), "system/sw/test") == 0, "keyNew: Key's name setted incorrectly"); keyCopy (key, 0); succeed_if (strcmp (keyName(key), "") == 0, "name after keyCopy(,0)"); succeed_if(keyDel(key) == 0, "keyDel: Unable to delete key with name"); // Key with name key = keyNew("system/sw/test", KEY_REMOVE, KEY_END); succeed_if(key != NULL, "keyNew: Unable to create a key with name"); succeed_if(keyNeedRemove (key) == 1, "KEY_REMOVE not set"); succeed_if(strcmp(keyName(key), "system/sw/test") == 0, "keyNew: Key's name setted incorrectly"); succeed_if(keyDel(key) == 0, "keyDel: Unable to delete key with name"); // Key with name + value (default type must be KEY_TYPE_STRING) key = keyNew("system/sw/test", KEY_VALUE, "test", KEY_END); succeed_if(key != NULL, "keyNew: Unable to create a key with name + value of default type"); succeed_if(keyIsString(key), "keyNew: Default key value isn't set to KEY_TYPE_STRING"); succeed_if(strcmp(keyValue(key), "test") == 0, "keyNew: Value not set correctly"); succeed_if(keyDel(key) == 0, "keyDel: Unable to delete key with name + value"); // Key with name + UID/GID key = keyNew("system/sw/test", KEY_UID, 123, KEY_GID, 456, KEY_END); succeed_if(key != NULL, "keyNew: Unable to create a key with name + UID + GID"); succeed_if(keyGetUID(key) == 123, "keyNew: UID no set correctly"); succeed_if(keyGetGID(key) == 456, "keyNew: GID not set correctly"); succeed_if(keyDel(key) == 0, "keyDel: Unable to delete key with name + UID + GID"); // Key with name + MODE key = keyNew("system/sw/test", KEY_MODE, 0644, KEY_END); succeed_if(key != NULL, "keyNew: Unable to create a key with name + mode"); succeed_if(keyGetMode(key) == 0644, "keyNew: mode no set correctly"); succeed_if(keyDel(key) == 0, "keyDel: Unable to delete key with name + mode"); key = keyNew("system/valid/there", KEY_TYPE, KEY_TYPE_BINARY, KEY_SIZE, sizeof(array), KEY_VALUE, array, KEY_END); succeed_if(key != NULL, "keyNew: Unable to create a key with name + value of default type"); succeed_if(keyIsBinary (key), "Could not set type to binary"); succeed_if(keyGetValueSize(key) == sizeof(array), "Value size not correct"); succeed_if(memcmp ((char *) keyValue(key), array, sizeof(array)) == 0, "could not get correct binary value"); getBack = malloc (keyGetValueSize(key)); keyGetBinary(key, getBack, keyGetValueSize(key)); succeed_if(memcmp(getBack, array, sizeof(array)) == 0, "could not get correct value with keyGetBinary"); free (getBack); succeed_if(keyDel(key) == 0, "keyDel: Unable to delete key with name + owner"); key = keyNew("system", KEY_END); succeed_if (strcmp (keyName(key), "system") == 0, "Name Problem: System as basename"); succeed_if (keyGetNameSize(key) == 7, "empty name size" ); succeed_if (strcmp (keyOwner(key), "") == 0, "owner for a system key?"); succeed_if (keyGetOwnerSize(key) == 1, "owner y size" ); keyDel (key); // testing multiple values at once k1=keyNew("system/1", KEY_VALUE, "singlevalue", KEY_END); k2=keyNew("system/2", KEY_VALUE, "myvalue", KEY_END); k3=keyNew("system/3", KEY_VALUE, "syskey", KEY_END); succeed_if(k1 != NULL, "keyNew: Unable to create a key with name + value of default type"); succeed_if(keyIsString(k1), "keyNew: Default key value isn't set to KEY_TYPE_STRING"); succeed_if(strcmp(keyValue(k1), "singlevalue") == 0, "keyNew: Value not set correctly"); succeed_if(k2 != NULL, "keyNew: Unable to create a key with name + value of default type"); succeed_if(keyIsString(k2), "keyNew: Default key value isn't set to KEY_TYPE_STRING"); succeed_if(strcmp(keyValue(k2), "myvalue") == 0, "keyNew: Value not set correctly"); succeed_if(k3 != NULL, "keyNew: Unable to create a key with name + value of default type"); succeed_if(keyIsString(k3), "keyNew: Default key value isn't set to KEY_TYPE_STRING"); succeed_if(strcmp(keyValue(k3), "syskey") == 0, "keyNew: Value not set correctly"); succeed_if(keyDel(k1) == 0, "keyDel: Unable to delete key with name + value"); succeed_if(keyDel(k2) == 0, "keyDel: Unable to delete key with name + value"); succeed_if(keyDel(k3) == 0, "keyDel: Unable to delete key with name + value"); } void test_keyNewUser() { Key *key; char array[] = "here is some data stored"; char fullroot [MAX_PATH_LENGTH]; char * getBack; Key *k1; Key *k2; Key *k3; printf("Test user key creation\n"); #ifdef HAVE_SETENV setenv ("USER","hugo",1); #else putenv ("USER=hugo"); #endif key = keyNew ("user/test/test", KEY_END); succeed_if( strcmp(keyOwner(key), "hugo") == 0, "keyNew: owner not set correctly"); succeed_if( keyGetOwnerSize(key) == 5, "owner length not correct"); keyGetFullName (key, fullroot, MAX_PATH_LENGTH); succeed_if( strcmp(keyOwner(key), "hugo") == 0, "keyNew: owner not set correctly"); /* printf ("%s, %s, %s\n", keyName(key), keyBaseName(key), fullroot); */ succeed_if(strcmp(keyName(key),"user/test/test") == 0, "Wrong keyname: keyName"); succeed_if(strcmp(keyBaseName(key),"test") == 0, "Wrong keyname: keyBaseName"); succeed_if(strcmp(fullroot,"user:hugo/test/test") == 0, "Wrong keyname: keyGetFullName"); succeed_if(keyDel(key) == 0, "keyDel: Unable to delete key with name + owner"); #ifdef HAVE_SETENV setenv ("KDB_USER","tommy",1); #else putenv("KDB_USER=tommy"); #endif key = keyNew ("user/test/test", KEY_END); succeed_if( strcmp(keyOwner(key), "tommy") == 0, "keyNew: owner not set correctly"); succeed_if( keyGetOwnerSize(key) == 6, "owner length not correct"); keyGetFullName (key, fullroot, MAX_PATH_LENGTH); succeed_if( strcmp(keyOwner(key), "tommy") == 0, "keyNew: owner not set correctly"); /* printf ("%s, %s, %s\n", keyName(key), keyBaseName(key), fullroot); */ succeed_if(strcmp(keyName(key),"user/test/test") == 0, "Wrong keyname: keyName"); succeed_if(strcmp(keyBaseName(key),"test") == 0, "Wrong keyname: keyBaseName"); succeed_if(strcmp(fullroot,"user:tommy/test/test") == 0, "Wrong keyname: keyGetFullName"); succeed_if(keyDel(key) == 0, "keyDel: Unable to delete key with name + owner"); // Key with name + owner key = keyNew("user/test/test", KEY_OWNER, "yl", KEY_END); succeed_if(key != NULL, "keyNew: Unable to create a key with name + owner"); succeed_if( strcmp(keyOwner(key), "yl") == 0, "keyNew: owner not set correctly"); succeed_if(keyDel(key) == 0, "keyDel: Unable to delete key with name + owner"); key = keyNew("user/valid/there", KEY_TYPE, KEY_TYPE_BINARY, KEY_SIZE, sizeof(array), KEY_VALUE, array, KEY_END); succeed_if(key != NULL, "keyNew: Unable to create a key with name + value of default type"); succeed_if(keyIsBinary (key), "Could not set type to binary"); succeed_if(keyGetValueSize(key) == sizeof(array), "Value size not correct"); succeed_if(memcmp ((char *) keyValue(key), array, sizeof(array)) == 0, "could not get correct binary value"); getBack = malloc (keyGetValueSize(key)); keyGetBinary(key, getBack, keyGetValueSize(key)); succeed_if(memcmp(getBack, array, sizeof(array)) == 0, "could not get correct value with keyGetBinary"); free (getBack); succeed_if(keyDel(key) == 0, "keyDel: Unable to delete key with name + owner"); key = keyNew("user:y", KEY_END); succeed_if (strcmp (keyName(key), "user") == 0, "Name Problem: System as basename"); succeed_if (keyGetNameSize(key) == 5, "empty name size" ); succeed_if (strcmp (keyOwner(key), "y") == 0, "Should be a name not length 0"); succeed_if (keyGetOwnerSize(key) == 2, "owner y size" ); keyDel (key); succeed_if (key = keyNew("user:perfectowner", KEY_END), "could not create new key"); succeed_if (keySetName(key, "user:perfectowner") == 5, "could not set to user with owner"); succeed_if (keyGetOwnerSize (key) == 13, "owner size not correct"); succeed_if (strcmp (keyOwner(key), "perfectowner") == 0, "Owner not same as set"); succeed_if (keyDel (key) == 0, "could not delete key"); // testing multiple values at once k1=keyNew("user/1", KEY_VALUE, "singlevalue", KEY_END); k2=keyNew("user/2", KEY_VALUE, "myvalue", KEY_END); k3=keyNew("user/3", KEY_VALUE, "syskey", KEY_END); succeed_if(k1 != NULL, "keyNew: Unable to create a key with name + value of default type"); succeed_if(keyIsString(k1), "keyNew: Default key value isn't set to KEY_TYPE_STRING"); succeed_if(strcmp(keyValue(k1), "singlevalue") == 0, "keyNew: Value not set correctly"); succeed_if(k2 != NULL, "keyNew: Unable to create a key with name + value of default type"); succeed_if(keyIsString(k2), "keyNew: Default key value isn't set to KEY_TYPE_STRING"); succeed_if(strcmp(keyValue(k2), "myvalue") == 0, "keyNew: Value not set correctly"); succeed_if(k3 != NULL, "keyNew: Unable to create a key with name + value of default type"); succeed_if(keyIsString(k3), "keyNew: Default key value isn't set to KEY_TYPE_STRING"); succeed_if(strcmp(keyValue(k3), "syskey") == 0, "keyNew: Value not set correctly"); succeed_if(keyDel(k1) == 0, "keyDel: Unable to delete key with name + value"); succeed_if(keyDel(k2) == 0, "keyDel: Unable to delete key with name + value"); succeed_if(keyDel(k3) == 0, "keyDel: Unable to delete key with name + value"); k1 = keyNew ("invalid", KEY_END); succeed_if (k1 != 0, "should construct key even on invalid names"); succeed_if (strcmp (keyName(k1), "") == 0, "no name should be set"); succeed_if (keyGetNameSize(k1) == 1, "namesize"); keyDel (k1); } void test_keyReference() { printf("Test key reference\n"); Key *key = keyNew (KEY_END); Key *c = keyNew (KEY_END); Key *d; KeySet *ks1, *ks2; succeed_if (keyGetRef(key) == 0, "New created key reference"); succeed_if (keyIncRef (key) == 1, "keyIncRef return value"); succeed_if (keyGetRef(key) == 1, "After keyIncRef key reference"); succeed_if (keyIncRef (key) == 2, "keyIncRef return value"); succeed_if (keyGetRef(key) == 2, "After keyIncRef key reference"); succeed_if (keyIncRef (key) == 3, "keyIncRef return value"); succeed_if (keyGetRef(key) == 3, "After keyIncRef key reference"); succeed_if (keyIncRef (key) == 4, "keyIncRef return value"); succeed_if (keyGetRef(key) == 4, "After keyIncRef key reference"); d = keyDup (key); succeed_if (keyGetRef(d) == 0, "After keyDup key reference"); succeed_if (keyIncRef (d) == 1, "keyIncRef return value"); succeed_if (keyGetRef(key) == 4, "Reference should not change"); succeed_if (keyDecRef (d) == 0, "decrement key"); succeed_if (keyDel(d) == 0, "last keyDel d, key exist"); keyCopy (c, key); succeed_if (keyGetRef(c) == 0, "After keyCopy key reference"); succeed_if (keyIncRef (c) == 1, "keyIncRef return value"); succeed_if (keyGetRef(key) == 4, "Reference should not change"); keyCopy (c, key); succeed_if (keyGetRef(c) == 1, "After keyCopy key reference"); succeed_if (keyDecRef (c) == 0, "keyDecRef return value"); succeed_if (keyGetRef(key) == 4, "Reference should not change"); succeed_if (keyIncRef (c) == 1, "keyIncRef return value"); succeed_if (keyIncRef (c) == 2, "keyIncRef return value"); keyCopy (c, key); succeed_if (keyGetRef(c) == 2, "After keyCopy key reference"); succeed_if (keyDecRef (c) == 1, "keyDecRef return value"); succeed_if (keyDecRef (c) == 0, "keyDecRef return value"); succeed_if (keyDel (c) == 0, "could not delete copy"); succeed_if (keyGetRef(key) == 4, "After keyIncRef key reference"); succeed_if (keyDecRef (key) == 3, "keyDel return value"); succeed_if (keyDel (key) == 3, "should not do anything"); succeed_if (keyGetRef(key) == 3, "After keyIncRef key reference"); succeed_if (keyDecRef (key) == 2, "keyDel return value"); succeed_if (keyDel (key) == 2, "should not do anything"); succeed_if (keyGetRef(key) == 2, "After keyIncRef key reference"); succeed_if (keyDecRef (key) == 1, "keyDel return value"); succeed_if (keyDel (key) == 1, "should not do anything"); succeed_if (keyGetRef(key) == 1, "Should have no more reference"); succeed_if (keyDecRef (key) == 0, "last keyDel key, key exist"); succeed_if (keyDel (key) == 0, "last keyDel key, key exist"); /* From examples in ksNew () */ key = keyNew(0); // ref counter 0 succeed_if (keyGetRef(key) == 0, "reference counter"); keyIncRef(key); // ref counter of key 1 succeed_if (keyGetRef(key) == 1, "reference counter"); keyDel(key); // has no effect succeed_if (keyGetRef(key) == 1, "reference counter"); keyDecRef(key); // ref counter back to 0 succeed_if (keyGetRef(key) == 0, "reference counter"); keyDel(key); // key is now deleted ks1 = ksNew(0); ks2 = ksNew(0); key = keyNew(0); // ref counter 0 succeed_if (keyGetRef(key) == 0, "reference counter"); ksAppendKey(ks1, key); // ref counter of key 1 succeed_if (keyGetRef(key) == 1, "reference counter"); ksAppendKey(ks2, key); // ref counter of key 2 succeed_if (keyGetRef(key) == 2, "reference counter"); ksDel(ks1); // ref counter of key 1 succeed_if (keyGetRef(key) == 1, "reference counter"); ksDel(ks2); // key is now deleted key = keyNew(0); // ref counter 0 succeed_if (keyGetRef(key) == 0, "reference counter"); keyIncRef(key); // ref counter of key 1 succeed_if (keyGetRef(key) == 1, "reference counter"); keyDel (key); // has no effect succeed_if (keyGetRef(key) == 1, "reference counter"); keyIncRef(key); // ref counter of key 2 succeed_if (keyGetRef(key) == 2, "reference counter"); keyDel (key); // has no effect succeed_if (keyGetRef(key) == 2, "reference counter"); keyDecRef(key); // ref counter of key 1 succeed_if (keyGetRef(key) == 1, "reference counter"); keyDel (key); // has no effect succeed_if (keyGetRef(key) == 1, "reference counter"); keyDecRef(key); // ref counter is now 0 succeed_if (keyGetRef(key) == 0, "reference counter"); keyDel (key); // key is now deleted return; /* This code needs very long to execute, especially on 64bit * systems. */ key = keyNew(0); // ref counter 0 while (keyGetRef(key) < SSIZE_MAX) keyIncRef(key); succeed_if (keyGetRef(key) == SSIZE_MAX, "reference counter"); succeed_if (keyIncRef(key) == SSIZE_MAX, "should stay at maximum"); succeed_if (keyGetRef(key) == SSIZE_MAX, "reference counter"); succeed_if (keyIncRef(key) == SSIZE_MAX, "should stay at maximum"); key->ksReference = 5; while (keyGetRef(key) > 0) keyDecRef(key); succeed_if (keyGetRef(key) == 0, "reference counter"); succeed_if (keyDecRef(key) == 0, "should stay at minimum"); succeed_if (keyGetRef(key) == 0, "reference counter"); succeed_if (keyDecRef(key) == 0, "should stay at minimum"); keyDel (key); } void test_keyType() { Key * key; char array [] = "test"; int i; printf("Test key type\n"); key = keyNew (KEY_END); for (i=0; i<256; i++) { keySetType (key, i); succeed_if (keyGetType (key) == (i), "could not change to dir type to something between 0 and 255"); } keySetType (key, 0); succeed_if (keyGetType (key) == 0, "could not unset type"); succeed_if (keySetString (key, array) == 5, "size not correct"); succeed_if (keyIsString (key), "could not change to string type"); succeed_if (keyGetValueSize (key) == sizeof (array), "size is not correct"); succeed_if (keySetBinary (key, array, 4) == 4, "size not correct"); succeed_if (keyIsBinary (key), "could not change to binary type"); succeed_if (keyGetValueSize (key) == sizeof (array)-1, "size is not correct"); succeed_if (keySetString (key, array) == 5, "size not correct"); succeed_if (keyIsString (key), "could not change to string type"); succeed_if (keyGetValueSize (key) == sizeof (array), "size is not correct"); keyDel (key); } void test_keyName() { Key *key; size_t size; char *buf; char ret [1000]; int i; char *getBack; char testName[] = "user/name"; char testFullName[] = "user:max/name"; char testBaseName[] = "name"; char testOwner[] = "max"; Key * copy = keyNew (KEY_END); #ifdef HAVE_CLEARENV clearenv(); #else unsetenv("USER"); #endif printf ("Test Key Name\n"); key = keyNew (testName, KEY_END); succeed_if (keyGetName (0,ret,100) == -1, "null pointer"); succeed_if (keyGetName (key,0,100) == -1, "string null pointer"); succeed_if (keyGetName (key,ret,0) == -1, "length checking"); for (i=1; i< sizeof(testName);i++) { succeed_if (keyGetName (key,ret,i) == -1, "length checking too short"); } for (i=sizeof(testName); i= 1, "empty owner size"); keySetName(key,"system"); succeed_if (strcmp (keyName(key), "system") == 0, "Name Problem: System as basename"); succeed_if (keyGetNameSize(key) == 7, "empty name size" ); succeed_if (keyGetOwnerSize(key) == 1, "empty owner size"); keyDel (key); key = keyNew (KEY_END); keySetName(key,"system"); succeed_if (strcmp (keyName(key), "system") == 0, "Name Problem: System as basename"); succeed_if (keyGetNameSize(key) == 7, "empty name size" ); succeed_if (keyGetOwnerSize(key) == 1, "empty owner size"); keySetName(key,"user"); succeed_if (strcmp (keyName(key), "user") == 0, "Name Problem: User as basename"); succeed_if (keyGetNameSize(key) == 5, "empty name size" ); succeed_if (keyGetOwnerSize(key) == 1, "empty owner size"); keyDel (key); key = keyNew(0); succeed_if (keySetName(key,"user:") == 5, "setting user: generates error"); succeed_if (strcmp (keyName(key), "user") == 0, "Name Problem: System as basename"); succeed_if (keyGetNameSize(key) == 5, "empty name size" ); succeed_if (strcmp (keyOwner(key), "") == 0, "Should be a name not length 0"); succeed_if (keyGetOwnerSize(key) == 1, "empty owner size" ); keyDel (key); key = keyNew(0); succeed_if (keySetName(key,"user:y") == 5, "setting user: generates error"); succeed_if (strcmp (keyName(key), "user") == 0, "Name Problem: System as basename"); succeed_if (keyGetNameSize(key) == 5, "empty name size" ); succeed_if (strcmp (keyOwner(key), "y") == 0, "Should be a name not length 0"); succeed_if (keyGetOwnerSize(key) == 2, "owner y size" ); keyDel (key); key = keyNew(0); succeed_if (keySetName(key,"no") == -1, "no error code setting invalid name"); succeed_if (strcmp (keyName(key), "") == 0, "Name Problem: System as basename"); succeed_if (keyGetNameSize(key) == 1, "empty name size" ); keyDel (key); key = keyNew("user/noname", KEY_END); succeed_if(keyGetNameSize(key) == 12, "size not correct after keyNew"); getBack = malloc (12); succeed_if(keyGetName(key, getBack, 12), "could not get name"); succeed_if(strcmp(getBack, "user/noname") == 0, "did not get correct value back"); free (getBack); keySetName (key, "user/noname"); succeed_if(keyGetNameSize(key) == 12, "size not correct after keySetName"); getBack = malloc (12); succeed_if(keyGetName(key, getBack, 12), "could not get name"); succeed_if(strcmp(getBack, "user/noname") == 0, "did not get correct value back"); free (getBack); keySetName (key, "no"); succeed_if(keyGetNameSize(key) == 1, "size not correct after keySetName"); getBack = malloc (1); succeed_if(keyGetName(key, getBack, 1), "could not get name"); succeed_if(strcmp(getBack, "") == 0, "did not get correct value back"); free (getBack); keyDel (key); key = keyNew("user/noname", KEY_END); keySetName(key,""); succeed_if (strcmp (keyName(key), "") == 0, "keyName should be "" string"); succeed_if (keyGetName(key,ret, 999) == 1, "keyGetName should return 1"); succeed_if (strcmp (ret, "") == 0, "\\0 should be first character in array"); succeed_if (keyGetNameSize(key) == 1, "empty name size" ); keySetName(key,"user//hidden"); succeed_if (strcmp (keyName(key), "user/hidden") == 0, "Two slashes in name"); succeed_if (keyGetNameSize(key) == 12, "name size minus slashes" ); keySetName(key,"user///hidden"); succeed_if (strcmp (keyName(key), "user/hidden") == 0, "Three slashes in name"); succeed_if (keyGetNameSize(key) == 12, "name size minus slashes" ); keySetName(key,"user////////////////////////////////////hidden"); succeed_if (strcmp (keyName(key), "user/hidden") == 0, "Many slashes in name"); succeed_if (keyGetNameSize(key) == 12, "name size minus slashes" ); printf("Test trailing Slashes in Key Name\n"); keySetName(key,"user//hidden/"); succeed_if (strcmp (keyName(key), "user/hidden") == 0, "Trailing Slashes"); succeed_if (keyGetNameSize(key) == 12, "name size minus slashes" ); keySetName(key,"user//hidden//"); succeed_if (strcmp (keyName(key), "user/hidden") == 0, "Trailing Slashes"); succeed_if (keyGetNameSize(key) == 12, "name size minus slashes" ); keySetName(key,"user//hidden///////"); succeed_if (strcmp (keyName(key), "user/hidden") == 0, "Trailing Slashes"); succeed_if (keyGetNameSize(key) == 12, "name size minus slashes" ); keySetName(key,"user/"); // printf ("Name: %s\n", keyName(key)); succeed_if (strcmp (keyName(key), "user") == 0, "Trailing Slashes"); keySetName(key,"user/a"); succeed_if (strcmp (keyName(key), "user/a") == 0, "Trailing Slashes: One letter problem"); keySetName(key,"user//"); succeed_if (strcmp (keyName(key), "user") == 0, "Trailing Slashes"); keySetName(key,"user/////////"); succeed_if (strcmp (keyName(key), "user") == 0, "Trailing Slashes"); printf("Test Dots in Key Name\n"); keySetName(key,"user/hidden/."); succeed_if (strcmp (keyName(key), "user/hidden") == 0, "Name Problem: Dot as basename"); keySetName(key,"user/."); succeed_if (strcmp (keyName(key), "user") == 0, "Name Problem: Dot in Middle"); keySetName(key,"user/./hidden"); succeed_if (strcmp (keyName(key), "user/hidden") == 0, "Name Problem: Dot in Middle"); keySetName(key,"user/.valid/."); succeed_if (strcmp (keyName(key), "user/.valid") == 0, "Name Problem: Dot as basename (with comment)"); keySetName(key,"user/./.valid"); succeed_if (strcmp (keyName(key), "user/.valid") == 0, "Name Problem: Dot in Middle (with comment)"); keySetName(key,"user/./.valid/."); succeed_if (strcmp (keyName(key), "user/.valid") == 0, "Name Problem: More dots"); keySetName(key,"user/././././.valid/././././."); succeed_if (strcmp (keyName(key), "user/.valid") == 0, "Name Problem: Much more dots"); printf("Test Double Dots in Key Name\n"); keySetName(key,"user/hidden/parent/.."); succeed_if (strcmp (keyName(key), "user/hidden") == 0, "Name Problem: Double Dot as basename"); keySetName(key,"user/hidden/.."); // printf ("Name: %s\n", keyName(key)); succeed_if (strcmp (keyName(key), "user") == 0, "Name Problem: Double Dot as basename"); keySetName(key,"user/.."); succeed_if (strcmp (keyName(key), "user") == 0, "Name Problem: Can't go higher then user in hierachy"); keySetName(key,"user/hidden/../.."); succeed_if (strcmp (keyName(key), "user") == 0, "Name Problem: Can't go higher then user in hierachy"); succeed_if (keySetName(key, "user///sw/../sw//././MyApp")==sizeof("user/sw/MyApp"), "could not set keySet example"); succeed_if (strcmp (keyName(key), "user/sw/MyApp") == 0, "Example of keySet does not work"); succeed_if (keyGetNameSize(key) == sizeof("user/sw/MyApp"), "incorrect length for keySet example"); printf("Test Mixed Dots and Slashes in Key Name\n"); keySetName(key,"user/hidden/../."); keyDel (key); printf("Test failure key creation\n"); key = keyNew ("invalid", KEY_END); succeed_if (key!=0, "null pointer for invalid name"); succeed_if(keyDel(key) == 0, "keyDel: Unable to delete key with name"); key = keyNew("nonhere/valid/there", KEY_END); succeed_if (key != NULL, "keyNew did not accept wrong name"); succeed_if(keyDel(key) == 0, "keyDel: Unable to delete key with name"); key = keyNew("nonhere:y/valid/there", KEY_END); succeed_if (key != NULL, "keyNew did not accept wrong name"); succeed_if(keyDel(key) == 0, "keyDel: Unable to delete key with name"); key = keyNew ("user/validname", KEY_END); succeed_if(key != NULL, "keyNew: Unable to create a key with name"); succeed_if(strcmp(keyName(key), "user/validname") == 0, "keyNew: Key's name setted incorrectly"); keySetName(key, "invalid"); succeed_if (keyGetNameSize(key) == 1, "name size for invalid name"); succeed_if(strcmp(keyName(key), "") == 0, "keyNew: Key's name setted incorrectly"); keySetName (key, "user/validname"); succeed_if(strcmp(keyName(key), "user/validname") == 0, "keyNew: Key's name setted incorrectly"); keySetName(key, ""); succeed_if (keyGetNameSize(key) == 1, "name size for invalid name"); succeed_if(strcmp(keyName(key), "") == 0, "keyNew: Key's name setted incorrectly"); keySetName (key, "user/validname\\/t"); succeed_if(strcmp(keyName(key), "user/validname\\/t") == 0, "keyNew: Key's name setted incorrectly"); keySetName(key, 0); succeed_if (keyGetNameSize(key) == 1, "name size for invalid name"); succeed_if(strcmp(keyName(key), "") == 0, "keyNew: Key's name setted incorrectly"); keySetName (key, "user/validname\\"); succeed_if(strcmp(keyName(key), "user/validname\\") == 0, "keyNew: Key's name setted incorrectly"); keySetName (key, "user/validname\\/"); succeed_if(strcmp(keyName(key), "user/validname\\/") == 0, "keyNew: Key's name setted incorrectly"); succeed_if(keyDel(key) == 0, "keyDel: Unable to delete key with name"); #ifdef HAVE_CLEARENV clearenv(); #else unsetenv("USER"); unsetenv("KDB_USER"); #endif #ifdef HAVE_SETENV setenv ("USER", "env1", 1); #else putenv ("USER=env1"); #endif printf("Test key's name manipulation\n"); for(i = 0 ; tstKeyName[i].testName != NULL ; i++) { key = keyNew(tstKeyName[i].keyName, KEY_END); /* keyName */ succeed_if( (strcmp(keyName(key), tstKeyName[i].expectedKeyName) == 0) , "keyName" ); /* keyBaseName */ succeed_if( (strcmp(keyBaseName(key), tstKeyName[i].expectedBaseName) == 0), "keyBaseName" ); /* keyGetFullRootNameSize */ size = keyGetFullRootNameSize(key); succeed_if( (size == kdbiStrLen(tstKeyName[i].expectedFRootName)), "keyGetFullRootNameSize" ); /* keyGetFullRootName */ buf = kdbiMalloc(size*sizeof(char)); keyGetFullRootName(key, buf, size); // printf ("comp: %s - %s\n", buf, tstKeyName[i].expectedFRootName); succeed_if( (strncmp(buf, tstKeyName[i].expectedFRootName, size) == 0), "keyGetFullRootName" ); free(buf); /* keyGetParentNameSize */ size = keyGetParentNameSize(key); succeed_if( (size == kdbiStrLen(tstKeyName[i].expectedParentName)), "ketGetParentNameSize" ); /* keyGetParentName */ size = keyGetParentNameSize(key)+1; buf = kdbiMalloc(size*sizeof(char)); keyGetParentName(key, buf, size); succeed_if( (strncmp(buf, tstKeyName[i].expectedParentName, size) == 0), "keyGetParentName" ); free(buf); /* keyGetBaseNameSize */ size = keyGetBaseNameSize(key); succeed_if( (size == kdbiStrLen(tstKeyName[i].expectedBaseName)), "keyGetBaseNameSize" ); /* keyGetBaseName */ size = keyGetBaseNameSize(key)+1; buf = kdbiMalloc(size*sizeof(char)); keyGetBaseName(key, buf, size); succeed_if( (strncmp(buf, tstKeyName[i].expectedBaseName, size) == 0), "keyGetBaseName" ); free(buf); /* keyGetNameSize */ size = keyGetNameSize(key); succeed_if( (size == kdbiStrLen(tstKeyName[i].expectedKeyName)), "keyGetKeyNameSize" ); /* keyGetName */ size = keyGetNameSize(key); buf = kdbiMalloc(size*sizeof(char)); keyGetName(key, buf, size); succeed_if( (strcmp(buf, tstKeyName[i].expectedKeyName) == 0), "keyGetName" ); free(buf); succeed_if (keyGetRef (copy) == 0, "reference of copy not correct"); keyCopy (copy, key); succeed_if (compare_key (copy, key, 0) == 0, "keys are not equal after copy"); succeed_if (keyGetRef (copy) == 0, "reference of copy not correct"); keyDel(key); } keyDel (copy); } void test_keyValue() { Key * key; char ret [1000]; int i; char testString[] = "teststring"; char testBinary[] = "\0tes\1tbinary"; testBinary[sizeof(testBinary)] = 'T'; printf("Test value of keys\n"); succeed_if (key = keyNew(0), "could not create new key"); succeed_if (keyGetValueSize (key) == 1, "empty value size"); succeed_if (keySetString (key,"perfectvalue") == 13, "could not set string"); succeed_if (keyGetValueSize (key) == 13, "value size not correct"); succeed_if (strcmp (keyValue(key), "perfectvalue") == 0, "String not same as set"); succeed_if (keySetString (key,"perfectvalue") == 13, "could not re-set same string"); succeed_if (strcmp (keyValue(key), "perfectvalue") == 0, "String not same as set"); succeed_if (keySetString (key,"nearperfectvalue") == 17, "could not re-set other string"); succeed_if (keyGetValueSize (key) == 17, "value size not correct"); succeed_if (strcmp (keyValue(key), "nearperfectvalue") == 0, "String not same as set"); succeed_if (keyGetString (key, ret, keyGetValueSize (key)>=999 ? 999 : keyGetValueSize (key)) == 17, "could not get string"); succeed_if (strcmp (ret, "nearperfectvalue") == 0, "String not same as set"); succeed_if (keyDel (key) == 0, "could not delete key"); succeed_if (key = keyNew(0), "could not create new key"); succeed_if (strcmp (keyValue(key), "") == 0, "Empty value problem"); succeed_if (keyGetValueSize(key) == 1, "Empty value size problem"); succeed_if (keySetString (key,"") == 1, "could not set empty string"); succeed_if (strcmp (keyValue(key), "") == 0, "Empty value problem"); succeed_if (keyGetValueSize(key) == 1, "Empty value size problem"); succeed_if (keyGetString(key, ret, 0) == -1, "Could not get empty value"); succeed_if (keyGetString(key, ret, 1) == 1, "Could not get empty value"); succeed_if (ret[0] == 0, "keyGetValue did not return empty value"); succeed_if (keyDel (key) == 0, "could not delete key"); succeed_if (key = keyNew(0), "could not create new key"); succeed_if (keySetString (key, "a long long string") == 19, "could not set string"); succeed_if (keyGetString (key, ret, 6) == -1, "string not truncated"); /*succeed_if (errno == KDB_ERR_TRUNC, "errno not set properly trunc");*/ succeed_if (keyGetBinary (key, ret, 999) == -1, "binary not mismatch"); /*succeed_if (errno == KDB_ERR_TYPEMISMATCH, "errno not set properly typemismatch");*/ succeed_if (keyDel (key) == 0, "could not delete key"); succeed_if (key = keyNew(0), "could not create new key"); succeed_if (keySetBinary (key, "a long long binary", 19) == 19, "could not set string"); succeed_if (keyGetBinary (key, ret, 6) == -1, "binary not truncated"); /*succeed_if (errno == KDB_ERR_TRUNC, "errno not set properly trunc");*/ succeed_if (keyGetString (key, ret, 999) == -1, "string not mismatch"); /*succeed_if (errno == KDB_ERR_TYPEMISMATCH, "errno not set properly typemismatch");*/ succeed_if (keyDel (key) == 0, "could not delete key"); succeed_if (key = keyNew(0), "could not create new key"); for (i=1; i<255; i++) { ret[0] = i; ret[1] = i; ret[2] = 0; //output_key (key); succeed_if (keySetString (key,ret) == 3, "could not set string"); succeed_if (strcmp (keyValue(key), ret) == 0, "String not same as set"); } succeed_if (keyDel (key) == 0, "could not delete key"); printf ("Test string of key\n"); succeed_if (keyValue(0) == 0, "null pointer"); succeed_if (keyGetValueSize(0) == -1, "null pointer"); succeed_if (keySetString(0,"") == -1, "null pointer"); key = keyNew(0); succeed_if (keyGetValueSize(key) == 1, "empty value size"); keySetString (key, testString); succeed_if (keyGetString (0,ret,100) == -1, "null pointer"); succeed_if (keyGetString (key,0,100) == -1, "string null pointer"); succeed_if (keyGetString (key,ret,0) == -1, "length checking"); for (i=1; i< sizeof(testString);i++) { succeed_if (keyGetString (key,ret,i) == -1, "length checking too short"); } for (i=sizeof(testString); i=999 ? 999 : keyGetCommentSize (key)) == 19, "could not get comment"); succeed_if (strcmp (ret, "nearperfectcomment") == 0, "Comment not same as set"); succeed_if (keyDel (key) == 0, "could not delete key"); succeed_if (key = keyNew(0), "could not create new key"); succeed_if (strcmp (keyComment(key), "") == 0, "Empty comment problem"); succeed_if (keyGetCommentSize(key) == 1, "Empty comment size problem"); succeed_if (keySetComment (key,"") == 0, "could not set comment"); succeed_if (strcmp (keyComment(key), "") == 0, "Empty comment problem"); succeed_if (keyGetCommentSize(key) == 1, "Empty comment size problem"); succeed_if (keyGetComment(key, ret, 0) == -1, "Could not get empty comment"); succeed_if (keyGetComment(key, ret, 1) == 1, "Could not get empty comment"); succeed_if (ret[0] == 0, "keyGetComment did not return empty comment"); succeed_if (keyDel (key) == 0, "could not delete key"); succeed_if (key = keyNew(0), "could not create new key"); for (i=1; i<255; i++) { ret[0] = i; ret[1] = i; ret[2] = 0; succeed_if (keySetComment (key,ret) == 3, "could not set comment"); // output_key (key); succeed_if (strcmp (keyComment(key), ret) == 0, "Comment not same as set"); } succeed_if (keyDel (key) == 0, "could not delete key"); printf ("Test comment of key 2\n"); succeed_if (keyComment(0) == 0, "null pointer"); succeed_if (keyGetCommentSize(0) == -1, "null pointer"); succeed_if (keySetComment(0,"") == -1, "null pointer"); key = keyNew(0); succeed_if (keyGetCommentSize(key) == 1, "empty comment size"); keySetComment (key, testComment); succeed_if (keyGetComment (0,ret,100) == -1, "null pointer"); succeed_if (keyGetComment (key,0,100) == -1, "comment null pointer"); succeed_if (keyGetComment (key,ret,0) == -1, "length checking"); for (i=1; i< sizeof(testComment);i++) { succeed_if (keyGetComment (key,ret,i) == -1, "length checking too short"); } for (i=sizeof(testComment); i=999 ? 999 : keyGetOwnerSize (key)) == 17, "could not get owner"); succeed_if (strcmp (ret, "nearperfectowner") == 0, "Owner not same as set"); succeed_if (keyDel (key) == 0, "could not delete key"); succeed_if (key = keyNew(0), "could not create new key"); succeed_if (keySetName(key, "user:perfectowner") == 5, "could not set to user with owner"); succeed_if (keyGetOwnerSize (key) == 13, "owner size not correct"); succeed_if (strcmp (keyOwner(key), "perfectowner") == 0, "Owner not same as set"); succeed_if (keyDel (key) == 0, "could not delete key"); succeed_if (key = keyNew(0), "could not create new key"); succeed_if (strcmp (keyOwner(key), "") == 0, "Empty owner problem"); succeed_if (keyGetOwnerSize(key) == 1, "Empty owner size problem"); succeed_if (keySetOwner (key,"") == 1, "could not set owner"); succeed_if (strcmp (keyOwner(key), "") == 0, "Empty owner problem"); succeed_if (keyGetOwnerSize(key) == 1, "Empty owner size problem"); succeed_if (keyGetOwner(key, ret, 0) == -1, "Could not get empty owner"); succeed_if (keyGetOwner(key, ret, 1) == 1, "Could not get empty owner"); succeed_if (ret[0] == 0, "keyGetOwner did not return empty owner"); succeed_if (keyDel (key) == 0, "could not delete key"); succeed_if (key = keyNew(0), "could not create new key"); for (i=1; i<255; i++) { ret[0] = i; ret[1] = i; ret[2] = 0; succeed_if (keySetOwner (key,ret) == 3, "could not set owner"); // output_key (key); succeed_if (strcmp (keyOwner(key), ret) == 0, "Owner not same as set"); } succeed_if (keyDel (key) == 0, "could not delete key"); } void test_keyInactive () { Key * key = keyNew(0); succeed_if (keyIsInactive(0) == -1, "NULL pointer"); succeed_if (keyIsInactive(key) == -1, "Key has no name"); printf("Test of active and inactive keys\n"); keySetName(key,"user/valid"); succeed_if (!keyIsInactive(key), "Key should not be inactive"); keySetName(key,"user/.hidden/valid"); succeed_if (!keyIsInactive(key), "Key should not be inactive"); keySetName(key,"user/.hidden/€valid"); succeed_if (!keyIsInactive(key), "Key should not be inactive"); keySetName(key,"user/hidden"); succeed_if (!keyIsInactive(key), "Key should not be inactive"); keySetName(key,"user/.hidden"); succeed_if (keyIsInactive(key), "Key should be inactive"); keySetName(key,"user/.valid/.hidden"); succeed_if (keyIsInactive(key), "Key should be inactive"); keySetName(key,"user/.valid/.:hidden"); succeed_if (keyIsInactive(key), "Key should be inactive"); keySetName(key,"user/.valid/.€hidden"); succeed_if (keyIsInactive(key), "Key should be inactive"); keySetName(key,"user/.HiddenStringKey"); succeed_if (keyIsInactive(key), "Key should be inactive"); keySetName(key,"user/.HiddenDirectoryKey"); succeed_if (keyIsInactive(key), "Key should be inactive"); keySetName(key,"user/tests/file8xdLVS/filesys/.HiddenStringKey"); succeed_if (keyIsInactive(key), "Key should be inactive"); keyDel (key); } void test_keyBelow() { Key * key1 = keyNew(0); Key * key2 = keyNew(0); printf("Test of relative positions of keys\n"); succeed_if (keyIsBelow(key1,0) == -1, "NULL pointer"); succeed_if (keyIsBelow(0,0) == -1, "NULL pointer"); succeed_if (keyIsBelow(0,key1) == -1, "NULL pointer"); succeed_if (keyIsDirectBelow(key1,0) == -1, "NULL pointer"); succeed_if (keyIsDirectBelow(0,0) == -1, "NULL pointer"); succeed_if (keyIsDirectBelow(0,key1) == -1, "NULL pointer"); keySetName(key1,"user/valid"); keySetName(key2,"user/valid"); succeed_if (!keyIsBelow(key1,key2), "Key should not be below"); succeed_if (!keyIsBelow(key2,key1), "Key should not be below"); keySetName(key1,"user/valid"); keySetName(key2,"user/valid/"); succeed_if (!keyIsBelow(key1,key2), "Key should not be below"); succeed_if (!keyIsBelow(key2,key1), "Key should not be below"); keySetName(key1,"user/valid"); keySetName(key2,"user/valid/below"); succeed_if (keyIsBelow(key1,key2), "Key should be below"); succeed_if (!keyIsBelow(key2,key1), "Key should not be below"); keySetName(key1,"user/valid"); keySetName(key2,"user/valid/b"); succeed_if (keyIsBelow(key1,key2), "Key should be below"); succeed_if (!keyIsBelow(key2,key1), "Key should not be below"); keySetName(key1,"user/valid"); keySetName(key2,"user/valid/b"); succeed_if (keyIsBelow(key1,key2), "Key should be below"); succeed_if (!keyIsBelow(key2,key1), "Key should not be below"); keySetName(key1,"user/valid"); keySetName(key2,"user/valid/b/e"); succeed_if (keyIsBelow(key1,key2), "Key should be below"); succeed_if (!keyIsBelow(key2,key1), "Key should not be below"); keySetName(key1,"user/valide"); keySetName(key2,"user/valid/e"); succeed_if (!keyIsBelow(key1,key2), "Key should not be below"); succeed_if (!keyIsBelow(key2,key1), "Key should not be below"); keySetName(key1,"user/valid/b"); keySetName(key2,"user/valid/e"); succeed_if (!keyIsBelow(key1,key2), "Key should not be below"); succeed_if (!keyIsBelow(key2,key1), "Key should not be below"); keySetName(key1,"user/valide"); keySetName(key2,"user/valid/valide"); succeed_if (!keyIsBelow(key1,key2), "Key should not be below"); succeed_if (!keyIsBelow(key2,key1), "Key should not be below"); keySetName(key1,"user/valid"); keySetName(key2,"user/valid/valide"); succeed_if (keyIsDirectBelow(key1,key2), "Key should be below"); succeed_if (!keyIsDirectBelow(key2,key1), "Key should not be below"); keySetName(key1,"user/valid"); keySetName(key2,"user/valid/non/valid"); succeed_if (!keyIsDirectBelow(key1,key2), "Key should not be below"); succeed_if (!keyIsDirectBelow(key2,key1), "Key should not be below"); keySetName(key1,"user/valid/a"); keySetName(key2,"user/valid/b"); succeed_if (!keyIsDirectBelow(key1,key2), "Key should not be below"); succeed_if (!keyIsDirectBelow(key2,key1), "Key should not be below"); keySetName(key1,"user/valid"); keySetName(key2,"user/valid"); succeed_if (!keyIsDirectBelow(key1,key2), "Key should not be below"); succeed_if (!keyIsDirectBelow(key2,key1), "Key should not be below"); keySetName(key1,"user/valid/a/b"); keySetName(key2,"user/valid"); succeed_if (!keyIsDirectBelow(key1,key2), "Key should not be below"); succeed_if (!keyIsDirectBelow(key2,key1), "Key should not be below"); keySetName(key1,"user/valid/a"); keySetName(key2,"user/valid"); succeed_if (!keyIsDirectBelow(key1,key2), "Key should not be below"); succeed_if (keyIsDirectBelow(key2,key1), "Key should be below"); keyDel (key1); keyDel (key2); } void test_keyDup() { Key *orig, *copy; printf("Test key duplication\n"); // Create test key orig = keyNew("user:yl/foo/bar", KEY_TYPE, KEY_TYPE_BINARY, KEY_SIZE, 6, KEY_VALUE, "foobar", KEY_COMMENT, "mycomment", KEY_UID, 123, KEY_GID, 456, KEY_MODE, 0644, KEY_END); // Dup the key succeed_if( (copy = keyDup(orig)) != 0, "keyDup failed"); succeed_if (keyGetATime(orig) == keyGetATime(copy), "ATime should be same"); succeed_if (keyGetCTime(orig) == keyGetCTime(copy), "CTime should be same"); succeed_if (keyGetMTime(orig) == keyGetMTime(copy), "MTime should be same"); succeed_if (keyGetRef(orig) == 0, "orig ref counter should be 0"); succeed_if (keyGetRef(copy) == 0, "copy ref counter should be 0"); keyDel(orig); // everything independent from original! // Check the duplication succeed_if( strcmp(keyName(copy), "user/foo/bar") == 0, "keyDup: key name copy error"); succeed_if( strcmp(keyOwner(copy), "yl") == 0, "keyDup: key name owner copy error"); succeed_if( strncmp(keyValue(copy), "foobar", 6) == 0, "keyDup: key value copy error"); succeed_if( strcmp(keyComment(copy), "mycomment") == 0, "keyDup: key comment copy error"); succeed_if( keyGetUID(copy) == 123, "keyDup: key UID copy error"); succeed_if( keyGetGID(copy) == 456, "keyDup: key GID copy error"); succeed_if( keyGetMode(copy) == 0644, "keyDup: key mode copy error"); succeed_if( keyGetType(copy) & (KEY_TYPE_BINARY), "keyDup: key type copy error"); keyDel(copy); orig = keyNew (0); keySetName (orig, "invalid"); succeed_if ( (copy = keyDup(orig)) != 0, "keyDup failed"); succeed_if ( strcmp(keyName(orig), "") == 0, "orig name should be empty"); succeed_if ( strcmp(keyName(copy), "") == 0, "copy name should be empty"); succeed_if (keyGetNameSize(orig) == 1, "orig name size"); succeed_if (keyGetNameSize(copy) == 1, "orig name size"); succeed_if ( strcmp(keyOwner(orig), "") == 0, "orig name should be empty"); succeed_if ( strcmp(keyOwner(copy), "") == 0, "copy name should be empty"); succeed_if (keyGetOwnerSize(orig) == 1, "orig name size"); succeed_if (keyGetOwnerSize(copy) == 1, "copy name size"); succeed_if (keyGetType(orig) == KEY_TYPE_UNDEFINED, "orig key type"); succeed_if (keyGetType(copy) == KEY_TYPE_UNDEFINED, "copy key type"); succeed_if (keyGetATime(orig) == keyGetATime(copy), "ATime should be same"); succeed_if (keyGetCTime(orig) == keyGetCTime(copy), "CTime should be same"); succeed_if (keyGetMTime(orig) == keyGetMTime(copy), "MTime should be same"); succeed_if (keyGetRef(orig) == 0, "orig ref counter should be 0"); succeed_if (keyGetRef(copy) == 0, "copy ref counter should be 0"); keyDel (orig); keyDel (copy); } void test_keyCopy() { Key *orig, *copy; printf("Test key copy\n"); // Create test key orig = keyNew("user:yl/foo/bar", KEY_TYPE, KEY_TYPE_BINARY, KEY_SIZE, 6, KEY_VALUE, "foobar", KEY_COMMENT, "mycomment", KEY_UID, 123, KEY_GID, 456, KEY_MODE, 0644, KEY_END); // Copy the key copy = keyNew(0); succeed_if( keyCopy(copy, orig) == 1, "keyCopy failed"); succeed_if (keyGetATime(orig) == keyGetATime(copy), "ATime should be same"); succeed_if (keyGetCTime(orig) == keyGetCTime(copy), "CTime should be same"); succeed_if (keyGetMTime(orig) == keyGetMTime(copy), "MTime should be same"); succeed_if (keyGetRef(orig) == 0, "orig ref counter should be 0"); succeed_if (keyGetRef(copy) == 0, "copy ref counter should be 0"); keyDel(orig); // everything independent from original! // Check the duplication succeed_if( strcmp(keyName(copy), "user/foo/bar") == 0, "keyCopy: key name copy error"); succeed_if( strcmp(keyOwner(copy), "yl") == 0, "keyCopy: key name owner copy error"); succeed_if( strncmp(keyValue(copy), "foobar", 6) == 0, "keyCopy: key value copy error"); succeed_if( strcmp(keyComment(copy), "mycomment") == 0, "keyCopy: key comment copy error"); succeed_if( keyGetUID(copy) == 123, "keyCopy: key UID copy error"); succeed_if( keyGetGID(copy) == 456, "keyCopy: key GID copy error"); succeed_if( keyGetMode(copy) == 0644, "keyCopy: key mode copy error"); succeed_if( keyGetType(copy) & (KEY_TYPE_BINARY), "keyCopy: key type copy error"); orig = keyNew(0); succeed_if (keyCopy(copy, 0) == 0, "make the key copy fresh"); succeed_if (compare_key (orig, copy, 0) == 0, "keyCopy did not make the key fresh"); keyDel (orig); keyDel(copy); orig = keyNew (0); keySetName (orig, "invalid"); copy = keyNew(0); succeed_if( keyCopy(copy, orig) == 1, "keyCopy failed"); succeed_if ( strcmp(keyName(orig), "") == 0, "orig name should be empty"); succeed_if ( strcmp(keyName(copy), "") == 0, "copy name should be empty"); succeed_if (keyGetNameSize(orig) == 1, "orig name size"); succeed_if (keyGetNameSize(copy) == 1, "orig name size"); succeed_if ( strcmp(keyOwner(orig), "") == 0, "orig name should be empty"); succeed_if ( strcmp(keyOwner(copy), "") == 0, "copy name should be empty"); succeed_if (keyGetOwnerSize(orig) == 1, "orig name size"); succeed_if (keyGetOwnerSize(copy) == 1, "copy name size"); succeed_if (keyGetType(orig) == KEY_TYPE_UNDEFINED, "orig key type"); succeed_if (keyGetType(copy) == KEY_TYPE_UNDEFINED, "copy key type"); succeed_if (keyGetATime(orig) == keyGetATime(copy), "ATime should be same"); succeed_if (keyGetCTime(orig) == keyGetCTime(copy), "CTime should be same"); succeed_if (keyGetMTime(orig) == keyGetMTime(copy), "MTime should be same"); succeed_if (keyGetRef(orig) == 0, "orig ref counter should be 0"); succeed_if (keyGetRef(copy) == 0, "copy ref counter should be 0"); keyDel (orig); keyDel (copy); } void test_keyDir (void) { int i; Key * key = keyNew ("user", KEY_END); printf ("Test directory keys\n"); succeed_if (keyGetMode(key) == 0664, "new key not 0664 by default"); succeed_if (keyIsDir (key) == 0, "new key should not be directory by default"); succeed_if (keySetMode(key, 0644) == 0, "could not set to 0644"); succeed_if (keyIsDir (key) == 0, "0644 should not be directory"); succeed_if (keyGetMode(key) == 0644, "key is not 0644, but was set"); succeed_if (keySetDir (key) == 0, "could not set directory key"); succeed_if (keyIsDir (key) == 1, "should be directory after keySetDir"); succeed_if (keyGetMode(key) == 0755, "key is not 0644, but was set"); for (i = 0; i <= 0777; i++) { succeed_if (keySetMode(key, i) == 0, "could not set to 0000 <= i <= 0777"); succeed_if (keyGetMode(key) == i, "key is not correct 0000 <= i <= 0777"); if (/*getuid() == keyGetUID (key) &&*/ (keyGetMode (key) & 0100)) { succeed_if (keyIsDir (key) == 1, "should be directory because of executable and uid match"); } else if (/*getuid() != keyGetUID (key) && getgid() == keyGetGID (key) &&*/ (keyGetMode (key) & 0010)) { succeed_if (keyIsDir (key) == 1, "should be directory because of executable and gid match"); } else if (/*getuid() != keyGetUID (key) && getgid() != keyGetGID (key) &&*/ (keyGetMode (key) & 0001)) { succeed_if (keyIsDir (key) == 1, "should be directory because of executable and other match"); } else { succeed_if (keyIsDir (key) == 0, "should not be directory"); } succeed_if (keySetDir (key) == 0, "could not set directory key"); succeed_if (keyIsDir (key) == 1, "should be directory after keySetDir"); } keyDel (key); key = keyNew ("user", KEY_DIR, KEY_END); succeed_if (keyGetMode(key) == 0775, "new key with KEY_DIR not 0775 by default"); succeed_if (keyIsDir (key) == 1, "new key with KEY_DIR should be directory by default"); succeed_if (keySetMode(key, 0644) == 0, "could not set to 0644"); succeed_if (keyIsDir (key) == 0, "0644 should not be directory"); succeed_if (keyGetMode(key) == 0644, "key is not 0644, but was set"); succeed_if (keySetDir (key) == 0, "could not set directory key"); succeed_if (keyIsDir (key) == 1, "should be directory after keySetDir"); succeed_if (keyGetMode(key) == 0755, "key is not 0644, but was set"); keyDel (key); key = keyNew ("user/s", KEY_DIR, KEY_MODE, 0444, KEY_END); succeed_if (keyGetMode(key) == 0444, "0444 set by keyNew"); succeed_if (keyIsDir (key) == 0, "0444 should be directory"); keyDel (key); key = keyNew ("user/s", KEY_MODE, 0444, KEY_DIR, KEY_END); succeed_if (keyGetMode(key) == 0555, "0555 set by keyNew"); succeed_if (keyIsDir (key) == 1, "0555 should be directory"); keyDel (key); } void test_keyTime() { Key * key = keyNew (KEY_END); time_t now = time(0); time_t past= now - 60*60*24*356 * 10; time_t future = now + 60*60*24*356 * 10; /* time_t far_future = now + 60L*60L*24L*356L * 100L; */ printf ("Test key time\n"); succeed_if (keyGetATime(0) == (size_t)-1, "null pointer check"); succeed_if (keyGetMTime(0) == (size_t)-1, "null pointer check"); succeed_if (keyGetCTime(0) == (size_t)-1, "null pointer check"); succeed_if (keySetATime(0,0) == -1, "null pointer check"); succeed_if (keySetMTime(0,0) == -1, "null pointer check"); succeed_if (keySetCTime(0,0) == -1, "null pointer check"); succeed_if (keyGetATime(key) == 0, "new initialized atime not 0"); succeed_if (keyGetMTime(key) == 0, "new initialized mtime not 0"); succeed_if (keyGetCTime(key) == 0, "new initialized ctime not 0"); succeed_if (keySetATime (key, now) == 0, "could not set atime"); succeed_if (keySetMTime (key, now) == 0, "could not set mtime"); succeed_if (keySetCTime (key, now) == 0, "could not set ctime"); succeed_if (keyGetATime(key) == now, "new initialized atime not 0"); succeed_if (keyGetMTime(key) == now, "new initialized mtime not 0"); succeed_if (keyGetCTime(key) == now, "new initialized ctime not 0"); succeed_if (keySetATime (key, past) == 0, "could not set atime"); succeed_if (keySetMTime (key, past) == 0, "could not set mtime"); succeed_if (keySetCTime (key, past) == 0, "could not set ctime"); succeed_if (keyGetATime(key) == past, "new initialized atime not 0"); succeed_if (keyGetMTime(key) == past, "new initialized mtime not 0"); succeed_if (keyGetCTime(key) == past, "new initialized ctime not 0"); succeed_if (keySetATime (key, future) == 0, "could not set atime"); succeed_if (keySetMTime (key, future) == 0, "could not set mtime"); succeed_if (keySetCTime (key, future) == 0, "could not set ctime"); succeed_if (keyGetATime(key) == future, "new initialized atime not 0"); succeed_if (keyGetMTime(key) == future, "new initialized mtime not 0"); succeed_if (keyGetCTime(key) == future, "new initialized ctime not 0"); /* succeed_if (keySetATime (key, far_future) == 0, "could not set atime"); succeed_if (keySetMTime (key, far_future) == 0, "could not set mtime"); succeed_if (keySetCTime (key, far_future) == 0, "could not set ctime"); succeed_if (keyGetATime(key) == far_future, "new initialized atime not 0"); succeed_if (keyGetMTime(key) == far_future, "new initialized mtime not 0"); succeed_if (keyGetCTime(key) == far_future, "new initialized ctime not 0"); warn_if_fail (keyGetATime(key) > 0, "time_t not 64 bit, 2038 problem"); warn_if_fail (keyGetMTime(key) > 0, "time_t not 64 bit, 2038 problem"); warn_if_fail (keyGetCTime(key) > 0, "time_t not 64 bit, 2038 problem"); */ keyDel (key); } void test_keyMeta(void) { Key *key=0; succeed_if (keyStat (key) == -1, "stat null pointer"); succeed_if (keyNeedStat(key) == -1, "could not stat null pointer"); succeed_if(keyGetUID(key) == (uid_t)-1, "uid null pointer"); succeed_if(keyGetGID(key) == (gid_t)-1, "gid null pointer"); succeed_if(keyGetMode(key) == (mode_t)-1, "mode null pointer"); key = keyNew (0); succeed_if (keyNeedStat(key) == 0, "fresh key does not need stat"); succeed_if (keyStat(key) == 1, "could not stat key"); succeed_if (keyNeedStat(key) == 1, "could not stat key"); keyDel (key); key = keyNew ("user/stat", KEY_STAT, KEY_END); succeed_if (keyNeedStat(key) == 1, "fresh key need stat"); succeed_if (keyStat(key) == 1, "could not stat key"); succeed_if (keyNeedStat(key) == 1, "could not stat key"); keyDel (key); key=0; succeed_if (keyRemove (key) == -1, "remove null pointer"); succeed_if (keyNeedRemove(key) == -1, "could not remove key"); succeed_if (keyNeedSync(key) == -1, "key needs sync"); key = keyNew (0); succeed_if (keyNeedRemove(key) == 0, "fresh key does not need remove"); succeed_if (keyNeedSync(key) == 0, "fresh key needs sync"); succeed_if (keyRemove(key) == 1, "could not remove key"); succeed_if (keyNeedRemove(key) == 1, "could not remove key"); succeed_if (keyNeedSync(key) == 1, "need sync after remove"); keyDel (key); key = keyNew ("user/remove", KEY_REMOVE, KEY_END); succeed_if (keyNeedRemove(key) == 1, "fresh key need remove"); succeed_if (keyNeedSync(key) == 1, "need sync after remove"); succeed_if (keyRemove(key) == 1, "could not remove key"); succeed_if (keyNeedRemove(key) == 1, "could not remove key"); succeed_if (keyNeedSync(key) == 1, "need sync after remove"); keyDel (key); succeed_if (keyNeedSync(0) == -1, "keyNeedSync(0)"); succeed_if (keyNeedStat(0) == -1, "keyNeedStat(0)"); succeed_if (keyNeedRemove(0) == -1, "keyNeedRemove(0)"); key = keyNew(0); succeed_if (keyNeedSync(key) == 0, "keyNew(0) should not need sync"); succeed_if (keySetName(key,"invalid") == -1, "invalid name should fail"); succeed_if (keyNeedSync(key) == 0, "keyNew(0) should not need sync"); keyDel (key); key = keyNew(0); succeed_if (keyNeedSync(key) == 0, "should not need sync"); keySetUID(key,20); succeed_if (keyNeedSync(key) == 1, "should need sync"); keyDel (key); key = keyNew(0); succeed_if(keyGetUID(key) == (uid_t)-1, "uid not set to nobody"); succeed_if(keyGetGID(key) == (gid_t)-1, "gid not set to nobody"); succeed_if(keySetUID(key,20) == 0, "could not set uid"); succeed_if(keySetGID(key,21) == 0, "could not set uid"); succeed_if(keyGetUID(key) == 20, "uid not set to 20"); succeed_if(keyGetGID(key) == 21, "gid not set to 21"); succeed_if(keySetUID(key,(uid_t)-1) == 0, "could not set uid"); succeed_if(keySetGID(key,(gid_t)-1) == 0, "could not set uid"); succeed_if(keyGetUID(key) == (uid_t)-1, "uid not set to nobody"); succeed_if(keyGetGID(key) == (gid_t)-1, "gid not set to nobody"); succeed_if(keySetUID(key,0) == 0, "could not set uid"); succeed_if(keySetGID(key,0) == 0, "could not set uid"); succeed_if(keyGetUID(key) == 0, "uid not set to 20"); succeed_if(keyGetGID(key) == 0, "gid not set to 21"); keyDel (key); key = keyNew(0); succeed_if(keyGetMode(key) == KEY_DEF_MODE, "new key does not have default mode"); succeed_if(keySetDir(key) == 0, "could not set dir"); succeed_if(keyGetMode(key) == KEY_DEF_MODE | KEY_DEF_DIR, "directory key"); keyDel (key); key = keyNew("user/dir", KEY_DIR, KEY_END); succeed_if(keyGetMode(key) == KEY_DEF_MODE | KEY_DEF_DIR, "directory key"); succeed_if(keySetDir(key) == 0, "could not set dir"); succeed_if(keyGetMode(key) == KEY_DEF_MODE | KEY_DEF_DIR, "directory key"); keyDel (key); } void test_keyHelpers() { char *name="user/abc/defghi/jkl"; char *p; size_t size=0; int level=0; char buffer[20]; Key *key=keyNew("system/parent/base",KEY_END); char *parentName; size_t parentSize; Key *k1, *k2; printf ("Test key helpers\n"); /* copied out of example from keyNameGetOneLevel Lets define a key name with a lot of repeating '/' and escaped '/' char *keyName="user////abc/def\\/ghi////jkl///";*/ p=name; while (*(p=keyNameGetOneLevel(p+size,&size))) { level++; strncpy(buffer,p,size); buffer[size]=0; /* printf("Level %d name: \"%s\"\n",level,buffer);*/ switch (level) { case 1: succeed_if (strcmp (buffer, "user") == 0, "keyNameGetOneLevel not correct"); break; case 2: succeed_if (strcmp (buffer, "abc") == 0, "keyNameGetOneLevel not correct"); break; case 3: succeed_if (strcmp (buffer, "defghi") == 0, "keyNameGetOneLevel not correct"); break; case 4: succeed_if (strcmp (buffer, "jkl") == 0, "keyNameGetOneLevel not correct"); break; default: succeed_if (0, "should not reach case statement"); } } /* with escaped sequence:*/ name="user////abc/def\\/ghi////jkl///"; size=0; level=0; p=name; while (*(p=keyNameGetOneLevel(p+size,&size))) { level++; strncpy(buffer,p,size); buffer[size]=0; /* printf("Level %d name: \"%s\"\n",level,buffer);*/ switch (level) { case 1: succeed_if (strcmp (buffer, "user") == 0, "keyNameGetOneLevel not correct"); succeed_if (size == 4, "wrong size returned"); break; case 2: succeed_if (strcmp (buffer, "abc") == 0, "keyNameGetOneLevel not correct"); succeed_if (size == 3, "wrong size returned"); break; case 3: succeed_if (strcmp (buffer, "def\\/ghi") == 0, "keyNameGetOneLevel not correct"); succeed_if (size == 8, "wrong size returned"); break; case 4: succeed_if (strcmp (buffer, "jkl") == 0, "keyNameGetOneLevel not correct"); succeed_if (size == 3, "wrong size returned"); break; default: succeed_if (0, "should not reach case statement"); } } /* with escaped sequence at the end:*/ name="user////abc/def\\/ghi////jkl\\/\\/"; size=0; level=0; p=name; while (*(p=keyNameGetOneLevel(p+size,&size))) { level++; strncpy(buffer,p,size); buffer[size]=0; /* printf("Level %d name: \"%s\"\n",level,buffer);*/ switch (level) { case 1: succeed_if (strcmp (buffer, "user") == 0, "keyNameGetOneLevel not correct"); succeed_if (size == 4, "wrong size returned"); break; case 2: succeed_if (strcmp (buffer, "abc") == 0, "keyNameGetOneLevel not correct"); succeed_if (size == 3, "wrong size returned"); break; case 3: succeed_if (strcmp (buffer, "def\\/ghi") == 0, "keyNameGetOneLevel not correct"); succeed_if (size == 8, "wrong size returned"); break; case 4: succeed_if (strcmp (buffer, "jkl\\/\\/") == 0, "keyNameGetOneLevel not correct"); succeed_if (size == 7, "wrong size returned"); break; default: succeed_if (0, "should not reach case statement"); } } parentSize=keyGetParentNameSize(key); parentName=malloc(parentSize); keyGetParentName(key,parentName,parentSize); succeed_if (strcmp (parentName, "system/parent") == 0, "parentName error"); free (parentName); keyDel (key); succeed_if (keyAddBaseName (0, "s") == -1, "null pointer saftey"); k1 = keyNew ("user/dir1/dir2", KEY_END); succeed_if (keyAddBaseName (k1, 0) == 15, "Could not add nothing to basename"); succeed_if (strcmp (keyName(k1), "user/dir1/dir2") == 0, "added basename not correct"); succeed_if (keyAddBaseName (k1, "") == 15, "Could not add nothing to basename"); succeed_if (strcmp (keyName(k1), "user/dir1/dir2") == 0, "added basename not correct"); succeed_if (keyAddBaseName (k1, "mykey") == 21, "Could not add basename"); succeed_if (strcmp (keyName(k1), "user/dir1/dir2/mykey") == 0, "added basename not correct"); succeed_if (keyGetNameSize(k1) == 21, "Name size not correct"); succeed_if (keyAddBaseName (k1, "mykey") == 27, "Could not add basename"); succeed_if (strcmp (keyName(k1), "user/dir1/dir2/mykey/mykey") == 0, "added basename not correct"); succeed_if (keyGetNameSize(k1) == 27, "Name size not correct"); succeed_if (keyAddBaseName (k1, "a") == 29, "Could not add basename"); succeed_if (strcmp (keyName(k1), "user/dir1/dir2/mykey/mykey/a") == 0, "added basename not correct"); succeed_if (keyGetNameSize(k1) == 29, "Name size not correct"); keyDel (k1); k1 = keyNew ("user/dir1/dir2", KEY_END); succeed_if (keyAddBaseName (k1, "mykey/mykey/a") == 29, "Could not add basename"); succeed_if (strcmp (keyName(k1), "user/dir1/dir2/mykey/mykey/a") == 0, "added basename not correct"); succeed_if (keyGetNameSize(k1) == 29, "Name size not correct"); keyDel (k1); k1 = keyNew ("user/////dir1//////dir2", KEY_END); succeed_if (keyAddBaseName (k1, "mykey/////mykey////a") == 29, "Could not add basename"); succeed_if (strcmp (keyName(k1), "user/dir1/dir2/mykey/mykey/a") == 0, "added basename not correct"); succeed_if (keyGetNameSize(k1) == 29, "Name size not correct"); keyDel (k1); k1 = keyNew ("user/dir1/////dir2////", KEY_END); succeed_if (keyAddBaseName (k1, "////mykey////mykey/a") == 29, "Could not add basename"); succeed_if (strcmp (keyName(k1), "user/dir1/dir2/mykey/mykey/a") == 0, "added basename not correct"); succeed_if (keyGetNameSize(k1) == 29, "Name size not correct"); keyDel (k1); k1 = keyNew ("user/dir1/dir2", KEY_END); succeed_if (keyAddBaseName (k1, "mykey/mykey////a///") == 29, "Could not add basename"); succeed_if (strcmp (keyName(k1), "user/dir1/dir2/mykey/mykey/a") == 0, "added basename not correct"); succeed_if (keyGetNameSize(k1) == 29, "Name size not correct"); keyDel (k1); k2 = keyNew (KEY_END); succeed_if (keyAddBaseName (k2, "no") == -1, "Could not add basename"); succeed_if (strcmp (keyName(k2), "") == 0, "added basename not correct"); succeed_if (keyGetNameSize(k2) == 1, "Name size not correct"); keyDel (k2); k2 = keyNew (KEY_END); succeed_if (keyAddBaseName (k2, "user") == 5, "Could not add basename"); succeed_if (strcmp (keyName(k2), "user") == 0, "added basename not correct"); succeed_if (keyGetNameSize(k2) == 5, "Name size not correct"); keyDel (k2); k2 = keyNew ("user/dir1/dir2/mykey/mykey/a", KEY_END); succeed_if (keySetBaseName (k2, "mykey") == 33, "Could not add basename"); succeed_if (strcmp (keyName(k2), "user/dir1/dir2/mykey/mykey/mykey") == 0, "added basename not correct"); succeed_if (keyGetNameSize(k2) == 33, "Name size not correct"); succeed_if (keySetBaseName (k2, "einva") == 33, "Could not add basename"); succeed_if (strcmp (keyName(k2), "user/dir1/dir2/mykey/mykey/einva") == 0, "added basename not correct"); succeed_if (keyGetNameSize(k2) == 33, "Name size not correct"); succeed_if (keySetBaseName (k2, "chang") == 33, "Could not add basename"); succeed_if (strcmp (keyName(k2), "user/dir1/dir2/mykey/mykey/chang") == 0, "added basename not correct"); succeed_if (keySetBaseName (k2, "change") == 34, "Could not add basename"); succeed_if (keyGetNameSize(k2) == 34, "Name size not correct"); succeed_if (strcmp (keyName(k2), "user/dir1/dir2/mykey/mykey/change") == 0, "added basename not correct"); keyDel (k2); k2 = keyNew ("user/dir1/a", KEY_END); succeed_if (keySetBaseName (k2, "") == 10, "Could not add basename"); succeed_if (strcmp (keyName(k2), "user/dir1") == 0, "added basename not correct"); succeed_if (keyGetNameSize(k2) == 10, "Name size not correct"); keyDel (k2); k2 = keyNew ("user/dir1/a", KEY_END); succeed_if (keySetBaseName (k2, "some/more") == 20, "Could not add basename"); succeed_if (strcmp (keyName(k2), "user/dir1/some/more") == 0, "added basename not correct"); succeed_if (keyGetNameSize(k2) == 20, "Name size not correct"); keyDel (k2); k2 = keyNew ("user/dir1/a", KEY_END); succeed_if (keySetBaseName (k2, "some////more") == 20, "Could not add basename"); succeed_if (strcmp (keyName(k2), "user/dir1/some/more") == 0, "added basename not correct"); succeed_if (keyGetNameSize(k2) == 20, "Name size not correct"); keyDel (k2); k2 = keyNew ("user/dir1/a", KEY_END); succeed_if (keySetBaseName (k2, "some////more///") == 20, "Could not add basename"); succeed_if (strcmp (keyName(k2), "user/dir1/some/more") == 0, "added basename not correct"); succeed_if (keyGetNameSize(k2) == 20, "Name size not correct"); keyDel (k2); k2 = keyNew ("user/dir1/a", KEY_END); succeed_if (keySetBaseName (k2, "///some////more") == 20, "Could not add basename"); succeed_if (strcmp (keyName(k2), "user/dir1/some/more") == 0, "added basename not correct"); succeed_if (keyGetNameSize(k2) == 20, "Name size not correct"); keyDel (k2); k2 = keyNew ("user", KEY_END); succeed_if (keySetBaseName (k2, "user") == 5, "Could not add basename"); succeed_if (strcmp (keyName(k2), "user") == 0, "added basename not correct"); succeed_if (keyGetNameSize(k2) == 5, "Name size not correct"); keyDel (k2); k2 = keyNew ("system", KEY_END); succeed_if (keySetBaseName (k2, "user") == 5, "Could not add basename"); succeed_if (strcmp (keyName(k2), "user") == 0, "added basename not correct"); succeed_if (keyGetNameSize(k2) == 5, "Name size not correct"); keyDel (k2); k2 = keyNew ("user", KEY_END); succeed_if (keySetBaseName (k2, "system") == 7, "Could not add basename"); succeed_if (strcmp (keyName(k2), "system") == 0, "added basename not correct"); succeed_if (keyGetNameSize(k2) == 7, "Name size not correct"); keyDel (k2); k2 = keyNew ("system", KEY_END); succeed_if (keySetBaseName (k2, "system") == 7, "Could not add basename"); succeed_if (strcmp (keyName(k2), "system") == 0, "added basename not correct"); succeed_if (keyGetNameSize(k2) == 7, "Name size not correct"); keyDel (k2); k2 = keyNew ("user", KEY_END); succeed_if (keySetBaseName (k2, "no") == -1, "Could not add basename"); succeed_if (strcmp (keyName(k2), "") == 0, "added basename not correct"); succeed_if (keyGetNameSize(k2) == 1, "Name size not correct"); keyDel (k2); k2 = keyNew ("system", KEY_END); succeed_if (keySetBaseName (k2, "no") == -1, "Could not add basename"); succeed_if (strcmp (keyName(k2), "") == 0, "added basename not correct"); succeed_if (keyGetNameSize(k2) == 1, "Name size not correct"); keyDel (k2); } void test_keyNamespace() { Key *key; printf ("Test namespaces\n"); key = keyNew (KEY_END); succeed_if (keyNameGetNamespace (keyName(key)) == 0, "empty namespace not 0"); succeed_if (keyGetNamespace (key) == 0, "empty namespace not 0"); succeed_if (keyNameIsSystem (keyName(key)) == 0, "empty name is not system"); succeed_if (keyIsSystem (key) == 0, "empty key is not system"); succeed_if (keyNameIsUser (keyName(key)) == 0, "empty name is not user"); succeed_if (keyIsUser (key) == 0, "empty key is not user"); keyDel (key); key = keyNew ("user", KEY_END); succeed_if (keyNameGetNamespace (keyName(key)) == KEY_NS_USER, "user namespace not KEY_NS_USER"); succeed_if (keyGetNamespace (key) == KEY_NS_USER, "user namespace not KEY_NS_USER"); succeed_if (keyNameIsSystem (keyName(key)) == 0, "user name is not system"); succeed_if (keyIsSystem (key) == 0, "user key is not system"); succeed_if (keyNameIsUser (keyName(key)) == 1, "user name is not user"); succeed_if (keyIsUser (key) == 1, "user key is not user"); keyDel (key); key = keyNew ("user/key", KEY_END); succeed_if (keyNameGetNamespace (keyName(key)) == KEY_NS_USER, "user namespace not KEY_NS_USER"); succeed_if (keyGetNamespace (key) == KEY_NS_USER, "user namespace not KEY_NS_USER"); succeed_if (keyNameIsSystem (keyName(key)) == 0, "user name is not system"); succeed_if (keyIsSystem (key) == 0, "user key is not system"); succeed_if (keyNameIsUser (keyName(key)) == 1, "user name is not user"); succeed_if (keyIsUser (key) == 1, "user key is not user"); keyDel (key); key = keyNew ("user:owner/key", KEY_END); succeed_if (keyNameGetNamespace (keyName(key)) == KEY_NS_USER, "user namespace not KEY_NS_USER"); succeed_if (keyGetNamespace (key) == KEY_NS_USER, "user namespace not KEY_NS_USER"); succeed_if (keyNameIsSystem (keyName(key)) == 0, "user name is not system"); succeed_if (keyIsSystem (key) == 0, "user key is not system"); succeed_if (keyNameIsUser (keyName(key)) == 1, "user name is not user"); succeed_if (keyIsUser (key) == 1, "user key is not user"); keyDel (key); key = keyNew ("system", KEY_END); succeed_if (keyNameGetNamespace (keyName(key)) == KEY_NS_SYSTEM, "system namespace not KEY_NS_SYSTEM"); succeed_if (keyGetNamespace (key) == KEY_NS_SYSTEM, "system namespace not KEY_NS_SYSTEM"); succeed_if (keyNameIsSystem (keyName(key)) == 1, "system name is not system"); succeed_if (keyIsSystem (key) == 1, "system key is not system"); succeed_if (keyNameIsUser (keyName(key)) == 0, "system name is not system"); succeed_if (keyIsUser (key) == 0, "system key is not system"); keyDel (key); key = keyNew ("system/key", KEY_END); succeed_if (keyNameGetNamespace (keyName(key)) == KEY_NS_SYSTEM, "system namespace not KEY_NS_SYSTEM"); succeed_if (keyGetNamespace (key) == KEY_NS_SYSTEM, "system namespace not KEY_NS_SYSTEM"); succeed_if (keyNameIsSystem (keyName(key)) == 1, "system name is not system"); succeed_if (keyIsSystem (key) == 1, "system key is not system"); succeed_if (keyNameIsUser (keyName(key)) == 0, "system name is not system"); succeed_if (keyIsUser (key) == 0, "system key is not system"); keyDel (key); } int main() { printf("KEY STRUCT TESTS\n"); printf("==================\n\n"); init (); test_keyComparing(); test_keyNewSystem(); test_keyNewUser(); test_keyReference(); test_keyType(); test_keyName(); test_keyValue(); test_keyBinary(); test_keyComment(); test_keyOwner(); test_keyInactive(); test_keyBelow(); test_keyDup(); test_keyCopy(); test_keyDir(); test_keyTime(); test_keyMeta(); test_keyHelpers(); test_keyNamespace(); printf("\ntest_key RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError); return nbError; } elektra-0.7.1/tests/test_ks.c0000644000076400001440000024452611365506635013100 00000000000000/*************************************************************************** * test_ks.c - KeySet struct test suite * ------------------- * begin : Thu Dez 12 2006 * copyright : (C) 2006 by Markus Raab * email : sizon5@gmail.com ****************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STRING_H #include #endif #include void test_ksNew() { KeySet *ks=0; KeySet * keys = ksNew (15,0); KeySet * config; printf("Test ks creation\n"); exit_if_fail((ks=ksNew(0)) != 0, "could not create new keyset"); succeed_if (ksAppendKey(ks,keyNew(0)) == 1, "could not append a key"); succeed_if (ksAppendKey(ks,keyNew(0)) == 2, "could not append a key"); succeed_if (ksAppendKey(ks,keyNew(0)) == 3, "could not append a key"); succeed_if(ksGetSize(ks) == 3, "size not correct after 3 keys"); KeySet *ks2=ksNew (0); ksCopy (ks2, ks); compare_keyset (ks, ks2, 0, 0); succeed_if (ksAppendKey(ks,keyNew(0)) == 4, "could not append a key"); succeed_if (ksAppendKey(ks,keyNew(0)) == 5, "could not append a key"); succeed_if (ksAppendKey(ks,keyNew(0)) == 6, "could not append a key"); succeed_if(ksGetSize(ks) == 6, "could not append 3 more keys"); ksCopy (ks2, ks); compare_keyset (ks, ks2, 0, 0); ksClear (ks2); // useless, just test for double free ksCopy (ks2, ks); compare_keyset (ks, ks2, 0, 0); succeed_if(ksDel(ks) == 0, "could not delete keyset"); succeed_if(ksGetSize(keys) == 0, "could not append 3 more keys"); succeed_if(ksGetAlloc(keys) == 16, "allocation size wrong"); succeed_if(ksDel(keys) == 0, "could not delete keyset"); config = ksNew (100, keyNew ("user/sw/app/fixedConfiguration/key1", KEY_VALUE, "value1", 0), keyNew ("user/sw/app/fixedConfiguration/key2", KEY_VALUE, "value2", 0), keyNew ("user/sw/app/fixedConfiguration/key3", KEY_VALUE, "value3", 0),0); succeed_if(ksGetSize(config) == 3, "could not append 3 keys in keyNew"); succeed_if(ksGetAlloc(config) == 100, "allocation size wrong"); keyDel (ksPop (config)); succeed_if(ksGetAlloc(config) == 50, "allocation size wrong"); keyDel (ksPop (config)); succeed_if(ksGetAlloc(config) == 25, "allocation size wrong"); keyDel (ksPop (config)); succeed_if(ksGetAlloc(config) == 16, "allocation size wrong"); succeed_if(ksDel(config) == 0, "could not delete keyset"); config = ksNew (10, keyNew ("user/sw/app/fixedConfiguration/key1", KEY_VALUE, "value1", 0), keyNew ("user/sw/app/fixedConfiguration/key2", KEY_VALUE, "value2", 0), keyNew ("user/sw/app/fixedConfiguration/key3", KEY_VALUE, "value1", 0), keyNew ("user/sw/app/fixedConfiguration/key4", KEY_VALUE, "value3", 0),0); succeed_if(ksGetSize(config) == 4, "could not append 5 keys in keyNew"); succeed_if(ksGetAlloc(config) == 16, "allocation size wrong"); ksAppendKey(config, keyNew ("user/sw/app/fixedConfiguration/key6", KEY_VALUE, "value4", 0)); ksClear (ks2); ksCopy (ks2, config); compare_keyset (config, ks2, 0, 0); succeed_if(ksDel(config) == 0, "could not delete keyset"); succeed_if(ksDel(ks2) == 0, "could not delete keyset"); } void test_ksEmpty() { printf ("Test empty keysets\n"); KeySet *ks; KeySet *ks2; Key *current; ks = ksNew(0); succeed_if (ksGetSize (ks) == 0, "size not correct"); succeed_if (ksPop (ks) == 0, "pop empty keyset"); succeed_if (ksGetSize (ks) == 0, "size not correct"); ksDel (ks); ks = ksNew (1, current=keyNew("user/test", KEY_END), KS_END); succeed_if (ksGetSize (ks) == 1, "size not correct"); succeed_if (ksPop (ks) == current, "pop empty keyset"); succeed_if (ksGetSize (ks) == 0, "size not correct"); succeed_if (ksPop (ks) == 0, "pop empty keyset"); succeed_if (ksGetSize (ks) == 0, "size not correct"); keyDel (current); ksDel (ks); ks = ksNew (0); ks2 = ksNew (0); succeed_if (ksAppend (ks, ks2) == 0, "could not append empty keyset"); succeed_if (ksGetSize (ks) == 0, "empty keyset does not have correct size"); succeed_if (ksGetSize (ks2) == 0, "empty keyset does not have correct size"); succeed_if (ksPop(ks) == 0, "could not pop empty keyset"); succeed_if (ksPop(ks2) == 0, "could not pop empty keyset2"); ksDel (ks); ksDel (ks2); ks = ksNew (1, current=keyNew("user/test", KEY_END), KS_END); ks2 = ksNew (0); succeed_if (ksGetSize (ks) == 1, "empty keyset does not have correct size"); succeed_if (ksGetSize (ks2) == 0, "empty keyset does not have correct size"); succeed_if (ksAppend (ks, ks2) == 1, "could not append empty keyset"); succeed_if (ksGetSize (ks) == 1, "empty keyset does not have correct size"); succeed_if (ksGetSize (ks2) == 0, "empty keyset does not have correct size"); succeed_if (ksPop(ks) == current, "could not pop keyset"); succeed_if (ksPop(ks2) == 0, "could not pop empty keyset2"); succeed_if (ksGetSize (ks) == 0, "empty keyset does not have correct size"); succeed_if (ksGetSize (ks2) == 0, "empty keyset does not have correct size"); succeed_if (ksAppend (ks, ks2) == 0, "could not append empty keyset"); succeed_if (ksGetSize (ks) == 0, "empty keyset does not have correct size"); succeed_if (ksGetSize (ks2) == 0, "empty keyset does not have correct size"); keyDel (current); ksDel (ks); ksDel (ks2); ks = ksNew (0); ks2 = ksNew (1, current=keyNew("user/test", KEY_END), KS_END); succeed_if (ksGetSize (ks) == 0, "empty keyset does not have correct size"); succeed_if (ksGetSize (ks2) == 1, "empty keyset does not have correct size"); succeed_if (ksAppend (ks, ks2) == 1, "could not append empty keyset"); succeed_if (ksGetSize (ks) == 1, "empty keyset does not have correct size"); succeed_if (ksGetSize (ks2) == 1, "empty keyset does not have correct size"); succeed_if (ksPop(ks) == current, "could not pop keyset"); succeed_if (ksPop(ks2) == current, "could not pop empty keyset2"); succeed_if (ksGetSize (ks) == 0, "empty keyset does not have correct size"); succeed_if (ksGetSize (ks2) == 0, "empty keyset does not have correct size"); succeed_if (ksAppend (ks, ks2) == 0, "could not append empty keyset"); succeed_if (ksGetSize (ks) == 0, "empty keyset does not have correct size"); succeed_if (ksGetSize (ks2) == 0, "empty keyset does not have correct size"); keyDel (current); // only one keyDel, because ksPop decrements counter ksDel (ks); ksDel (ks2); } #define NR_KEYSETS 10 void test_ksReference() { KeySet *ks=0; KeySet *ks1, *ks2; Key *k1, *k2; KeySet *kss[NR_KEYSETS]; int i; printf("Test reference of key\n"); ks=ksNew(0); k1 = keyNew("user/aname", KEY_END); succeed_if (keyGetRef(k1) == 0, "reference counter of new key"); ksAppendKey(ks,k1); succeed_if (keyGetRef(k1) == 1, "reference counter of inserted key"); k2 = keyDup (k1); succeed_if (keyGetRef(k2) == 0, "reference counter not resetted"); ksAppendKey(ks,k2); succeed_if (keyGetRef(k2) == 1, "reference counter not incremented"); ksSort (ks); ksDel (ks); ks=ksNew(5, keyNew ("user/key", KEY_END), keyNew ("system/key", KEY_END), KS_END); k1=ksLookupByName(ks, "user/key", 0); k2=ksLookupByName(ks, "system/key", 0); succeed_if (keyGetRef(k1) == 1, "reference counter of new inserted key"); succeed_if (keyGetRef(k2) == 1, "reference counter of new inserted key"); ksDel (ks); ks=ksNew(5, keyNew ("user/key", KEY_END), keyNew ("system/key", KEY_END), KS_END); k1=ksLookupByName(ks, "user/key", 0); k2=ksLookupByName(ks, "system/key", 0); succeed_if (keyGetRef(k1) == 1, "reference counter of new inserted key"); succeed_if (keyGetRef(k2) == 1, "reference counter of new inserted key"); ks1=ksDup (ks); succeed_if (keyGetRef(k1) == 2, "reference counter after duplication of keyset"); succeed_if (keyGetRef(k2) == 2, "reference counter after ksdup"); k1=ksPop (ks); succeed_if (keyGetRef(k1) == 1, "reference counter after pop"); keyDel (k1); succeed_if (keyGetRef(k1) == 1, "reference counter"); succeed_if (keyGetRef(k2) == 2, "reference counter should not be influenced"); ksDel (ks); succeed_if (keyGetRef(k1) == 1, "reference counter, delete from first keyset"); succeed_if (keyGetRef(k2) == 1, "reference counter, delete from first keyset"); ksDel (ks1); // k1 and k2 deleted ks1=ksNew(0); ks2=ksNew(0); k1=keyNew(0); succeed_if (keyGetRef(k1) == 0, "reference counter of new inserted key"); ksAppendKey(ks1, k1); succeed_if (keyGetRef(k1) == 1, "reference counter of new inserted key"); ksAppendKey(ks2, k1); succeed_if (keyGetRef(k1) == 2, "reference counter of new inserted key"); k1=ksPop (ks1); succeed_if (keyGetRef(k1) == 1, "reference counter of new inserted key"); succeed_if (keyDel (k1) == 1, "keyDel did not work"); succeed_if (keyGetRef(k1) == 1, "reference counter of new inserted key"); succeed_if (ksDel (ks1) == 0, "could not delete key"); succeed_if (ksDel (ks2) == 0, "could not delete key"); kss[0]=ksNew(5, k1=keyNew ("user/key", KEY_END), k2=keyNew ("system/key", KEY_END), KS_END); for (i=1; i< NR_KEYSETS; i++) { succeed_if (keyGetRef(k1) == i, "reference counter"); succeed_if (keyGetRef(k2) == 1, "reference counter"); kss[i] = ksDup (kss[i-1]); succeed_if (keyGetRef(k2) == 2, "reference counter"); ksPop (kss[i-1]); succeed_if (keyGetRef(k2) == 1, "reference counter"); succeed_if (keyDel(k2) == 1, "delete key"); succeed_if (keyGetRef(k2) == 1, "reference counter"); } succeed_if (keyGetRef(k1) == NR_KEYSETS, "reference counter"); succeed_if (keyGetRef(k2) == 1, "reference counter"); for (i=0; i< NR_KEYSETS; i++) { succeed_if (keyGetRef(k1) == NR_KEYSETS-i, "reference counter"); ksDel (kss[i]); } } void test_ksResize() { int i; KeySet *ks=0; KeySet *copy = ksNew (0); printf("Test resize of keyset\n"); exit_if_fail((ks=ksNew(0)) != 0, "could not create new keyset"); for (i=0; i< 100; i++) { ksAppendKey(ks, keyNew (KEY_END)); if (i >= 63) { succeed_if(ksGetAlloc(ks) == 128, "allocation size wrong"); } else if (i >= 31) { succeed_if(ksGetAlloc(ks) == 64, "allocation size wrong"); } else if (i >= 15) { succeed_if(ksGetAlloc(ks) == 32, "allocation size wrong"); } else if (i >= 0) { succeed_if(ksGetAlloc(ks) == 16, "allocation size wrong"); } } succeed_if(ksGetSize(ks) == 100, "could not append 100 keys"); succeed_if(ksGetAlloc(ks) == 128, "allocation size wrong"); for (i=100; i >= 0; i--) { keyDel (ksPop(ks)); if (i >= 64) { succeed_if(ksGetAlloc(ks) == 128, "allocation size wrong"); } else if (i >= 32) { succeed_if(ksGetAlloc(ks) == 64, "allocation size wrong"); } else if (i >= 16) { succeed_if(ksGetAlloc(ks) == 32, "allocation size wrong"); } else if (i >= 0) { succeed_if(ksGetAlloc(ks) == 16, "allocation size wrong"); } } succeed_if(ksGetSize(ks) == 0, "could not pop 100 keys"); succeed_if(ksGetAlloc(ks) == 16, "allocation size wrong"); ksDel (ks); exit_if_fail((ks=ksNew(0)) != 0, "could not create new keyset"); ksResize (ks, 101); succeed_if(ksGetAlloc(ks) == 101, "allocation size wrong"); for (i=0; i< 100; i++) { ksAppendKey(ks, keyNew (KEY_END)); } succeed_if(ksGetSize(ks) == 100, "could not append 100 keys"); succeed_if(ksGetAlloc(ks) == 101, "allocation size wrong"); ksDel (ks); ks = #include "keyset.c" succeed_if(ksGetSize(ks) == 102, "Problem loading keyset with 102 keys"); succeed_if(ksGetAlloc(ks) == 128, "alloc size wrong"); ksCopy (copy, ks); compare_keyset(copy, ks, 0, 0); ksClear (copy); // useless, just test for double free ksCopy (copy, ks); compare_keyset(copy, ks, 0, 0); ksDel (copy); ksDel (ks); } void test_ksDup() { KeySet *ks=0; KeySet *other=0; printf("Test ks duplication\n"); exit_if_fail((ks=ksNew(0)) != 0, "could not create new keyset"); other=ksDup(ks); succeed_if(other, "other creation failed"); succeed_if(ksGetSize(ks) == 0, "ks has keys"); succeed_if(ksGetSize(other) == 0, "other has keys"); ksDel (other); ksDel (ks); exit_if_fail((ks=ksNew(1, keyNew(0), 0)) != 0, "could not create new keyset"); other=ksDup(ks); succeed_if(other, "other creation failed"); succeed_if(ksGetSize(ks) == 1, "ks has no keys"); succeed_if(ksGetSize(other) == 1, "other has no keys"); ksDel (other); ksDel (ks); exit_if_fail((ks=ksNew(1, keyNew(0), 0)) != 0, "could not create new keyset"); succeed_if (ksAppendKey(ks,keyNew("user/test", KEY_END)) == 2, "could not append a key"); succeed_if (ksAppendKey(ks,keyNew(0)) == 3, "could not append a key"); succeed_if (ksAppendKey(ks,keyNew(0)) == 4, "could not append a key"); other=ksDup(ks); succeed_if(other, "other creation failed"); succeed_if(ksGetSize(ks) == 4, "ks has no keys"); succeed_if(ksGetSize(other) == 4, "other has no keys"); ksDel (other); ksDel (ks); exit_if_fail((ks=ksNew(1, keyNew(0), 0)) != 0, "could not create new keyset"); succeed_if (ksAppendKey(ks,keyNew("user/test", KEY_END)) == 2, "could not append a key"); succeed_if (ksAppendKey(ks,keyNew(0)) == 3, "could not append a key"); succeed_if (ksAppendKey(ks,keyNew(0)) == 4, "could not append a key"); other=ksDup(ks); succeed_if(other, "other creation failed"); keyDel (ksPop (other)); succeed_if(ksGetSize(ks) == 4, "ks has no keys"); succeed_if(ksGetSize(other) == 3, "other has no keys"); ksDel (other); ksDel (ks); exit_if_fail((ks=ksNew(1, keyNew(0), 0)) != 0, "could not create new keyset"); succeed_if (ksAppendKey(ks,keyNew("user/test", KEY_END)) == 2, "could not append a key"); succeed_if (ksAppendKey(ks,keyNew(0)) == 3, "could not append a key"); succeed_if (ksAppendKey(ks,keyNew(0)) == 4, "could not append a key"); other=ksDup(ks); succeed_if(other, "other creation failed"); keyDel(ksPop (other)); succeed_if (ksAppendKey(ks,keyNew(0)) == 5, "could not append a key"); succeed_if(ksGetSize(ks) == 5, "ks has no keys"); succeed_if(ksGetSize(other) == 3, "other has no keys"); ksDel (other); ksDel (ks); } void test_ksCopy() { KeySet *ks=0; KeySet *other=0; printf("Test ks copy\n"); other = ksNew(0); exit_if_fail((ks=ksNew(0)) != 0, "could not create new keyset"); succeed_if(ksCopy(other,ks)==1, "Copy failed"); succeed_if(other, "other creation failed"); succeed_if(ksGetSize(ks) == 0, "ks has keys"); succeed_if(ksGetSize(other) == 0, "other has keys"); ksDel (other); ksDel (ks); other = ksNew(0); exit_if_fail((ks=ksNew(1, keyNew(0), 0)) != 0, "could not create new keyset"); succeed_if(ksCopy(other,ks)==1, "Copy failed"); succeed_if(other, "other creation failed"); succeed_if(ksGetSize(ks) == 1, "ks has no keys"); succeed_if(ksGetSize(other) == 1, "other has no keys"); ksDel (other); ksDel (ks); other = ksNew(0); exit_if_fail((ks=ksNew(1, keyNew(0), 0)) != 0, "could not create new keyset"); succeed_if (ksAppendKey(ks,keyNew("user/test", KEY_END)) == 2, "could not append a key"); succeed_if (ksAppendKey(ks,keyNew(0)) == 3, "could not append a key"); succeed_if (ksAppendKey(ks,keyNew(0)) == 4, "could not append a key"); succeed_if(ksCopy(other,ks)==1, "Copy failed"); succeed_if(other, "other creation failed"); succeed_if(ksGetSize(ks) == 4, "ks has no keys"); succeed_if(ksGetSize(other) == 4, "other has no keys"); ksDel (other); ksDel (ks); other = ksNew(0); exit_if_fail((ks=ksNew(1, keyNew(0), 0)) != 0, "could not create new keyset"); succeed_if (ksAppendKey(ks,keyNew("user/test", KEY_END)) == 2, "could not append a key"); succeed_if (ksAppendKey(ks,keyNew(0)) == 3, "could not append a key"); succeed_if (ksAppendKey(ks,keyNew(0)) == 4, "could not append a key"); succeed_if(ksCopy(other,ks)==1, "Copy failed"); succeed_if(other, "other creation failed"); keyDel (ksPop (other)); succeed_if(ksGetSize(ks) == 4, "ks has no keys"); succeed_if(ksGetSize(other) == 3, "other has no keys"); ksDel (other); ksDel (ks); other = ksNew(0); exit_if_fail((ks=ksNew(1, keyNew(0), 0)) != 0, "could not create new keyset"); succeed_if (ksAppendKey(ks,keyNew("user/test", KEY_END)) == 2, "could not append a key"); succeed_if (ksAppendKey(ks,keyNew(0)) == 3, "could not append a key"); succeed_if (ksAppendKey(ks,keyNew(0)) == 4, "could not append a key"); succeed_if(ksCopy(other,ks)==1, "Copy failed"); succeed_if(other, "other creation failed"); keyDel(ksPop (other)); succeed_if (ksAppendKey(ks,keyNew(0)) == 5, "could not append a key"); succeed_if(ksGetSize(ks) == 5, "ks has no keys"); succeed_if(ksGetSize(other) == 3, "other has no keys"); ksDel (other); ksDel (ks); other = ksNew(0); exit_if_fail((ks=ksNew(1, keyNew(0), 0)) != 0, "could not create new keyset"); succeed_if (ksAppendKey(ks,keyNew("user/test", KEY_END)) == 2, "could not append a key"); succeed_if (ksAppendKey(ks,keyNew(0)) == 3, "could not append a key"); succeed_if (ksAppendKey(ks,keyNew(0)) == 4, "could not append a key"); succeed_if(ksCopy(other,ks)==1, "Copy failed"); succeed_if(other, "other creation failed"); keyDel(ksPop (other)); succeed_if (ksAppendKey(ks,keyNew(0)) == 5, "could not append a key"); succeed_if(ksGetSize(ks) == 5, "ks has no keys"); succeed_if(ksGetSize(other) == 3, "other has no keys"); succeed_if(ksCopy(ks,0)==0, "Clear failed"); succeed_if(ksGetSize(ks) == 0, "ks has keys"); succeed_if(ksCopy(other,0)==0, "Clear failed"); succeed_if(ksGetSize(other) == 0, "other has keys"); ksDel (other); ksDel (ks); } void test_ksIterate() { KeySet *ks=ksNew(0); KeySet *other=ksNew(0); Key * key; int i; char name [] = "user/n"; char output [] = "2 key not on its place"; printf("Test keyset iterate\n"); ksAppendKey(ks,keyNew("user/1", KEY_END)); ksAppendKey(ks,keyNew("user/2", KEY_END)); ksAppendKey(ks,keyNew("user/3", KEY_END)); ksAppendKey(ks,keyNew("user/4", KEY_END)); ksAppendKey(ks,keyNew("user/5", KEY_END)); succeed_if(ksGetSize(ks) == 5, "could not append 5 keys"); key = ksPop(ks); succeed_if(strcmp(keyName(key), "user/5") == 0, "1 key not on first place"); succeed_if (keyDel (key) == 0, "could not del popped key"); succeed_if(ksAppend(other,ks) == 4, "could not append keys"); for (i=4; i>=1; i--) { key = ksPop(other); succeed_if (key != 0, "got null pointer key"); name[5] = '0' + i; output[0] = '0' + i; succeed_if(strcmp(keyName(key), name) == 0, output); keyDel (key); } succeed_if (ksAppendKey(other, keyNew ("user/3", KEY_END)) == 1, "could not append one key"); key = ksPop(other); succeed_if (key != 0, "got null pointer key"); succeed_if(strcmp(keyName(key), "user/3") == 0, "only key to pop not found"); succeed_if (keyDel (key) == 0, "could not del popped key"); ksDel(other); ksDel(ks); ks = ksNew(10, keyNew("user/0", KEY_END), keyNew("user/1", KEY_END), keyNew("user/2", KEY_END), keyNew("user/3", KEY_END), 0); other = ksNew(10, keyNew("user/4", KEY_END), keyNew("user/5", KEY_END), keyNew("user/6", KEY_END), keyNew("user/7", KEY_END), 0); succeed_if(ksAppend(ks,other) == 8, "could not append keys"); for (i=7; i >= 0; i--) { key = ksPop(ks); succeed_if (key != 0, "got null pointer key"); name[5] = '0' + i; output[0] = '0' + i; succeed_if(strcmp(keyName(key), name) == 0, output); keyDel (key); } ksDel (ks); ksDel (other); } void test_ksCursor() { KeySet *ks=ksNew(0); Key * key; cursor_t cursor; int i; char name [] = "user/n"; char output [] = "n key not on its place"; printf("Test keyset cursor\n"); ksAppendKey(ks,keyNew("user/1", KEY_END)); ksAppendKey(ks,keyNew("user/2", KEY_END)); ksAppendKey(ks,keyNew("user/3", KEY_END)); cursor = ksGetCursor (ks); ksAppendKey(ks,keyNew("user/4", KEY_END)); ksAppendKey(ks,keyNew("user/5", KEY_END)); succeed_if(ksGetSize(ks) == 5, "could not append 5 keys"); succeed_if (cursor == ksGetCursor(ks), "cursor after appending"); ksSetCursor (ks, cursor); succeed_if (cursor == ksGetCursor(ks), "cursor set to 3"); cursor = ksGetCursor (ks); key = ksPop(ks); succeed_if (cursor == ksGetCursor(ks), "cursor should stay the same"); succeed_if(strcmp(keyName(key), "user/5") == 0, "1 key not on first place"); succeed_if (keyDel (key) == 0, "could not del popped key"); ksRewind (ks); for (i=0; i<5; i++) { key = ksNext(ks); if (i==1) { cursor = ksGetCursor (ks); name[5] = '0' + i; output[0] = '0' + i; } } ksSetCursor(ks, cursor); key = ksCurrent (ks); ksDel(ks); ks = ksNew(10, keyNew("user/0", KEY_END), keyNew("user/1", KEY_END), keyNew("user/2", KEY_END), keyNew("user/3", KEY_END), 0); ksRewind (ks); for (i=0; i < 4; i++) { key = ksNext(ks); if (i==1) { cursor = ksGetCursor (ks); name[5] = '0' + i; output[0] = '0' + i; } } ksSetCursor(ks, cursor); key = ksCurrent (ks); succeed_if(!strcmp (keyName(key), name), output); ksDel (ks); } void test_ksSort() { KeySet *ks; Key *key, *k1, *k2; int i; printf("Test ks sort\n"); printf ("Sort with no keyNeedRemove set\n"); ks=ksNew(0); ksAppendKey(ks, keyNew("user/bname", KEY_END)); ksAppendKey(ks, keyNew("user/aname", KEY_END)); ksAppendKey(ks, keyNew("user/cname", KEY_END)); ksSort (ks); ksRewind(ks); key = ksNext(ks); succeed_if (strcmp (keyName (key), "user/aname") == 0, "a should be 1."); key = ksNext(ks); succeed_if (strcmp (keyName (key), "user/bname") == 0, "b should be 2."); key = ksNext(ks); succeed_if (strcmp (keyName (key), "user/cname") == 0, "c should be 3."); ksDel (ks); ks=ksNew(0); ksAppendKey(ks, keyNew("user/a", KEY_END)); ksAppendKey(ks, keyNew("user/e", KEY_END)); ksAppendKey(ks, keyNew("user/b", KEY_END)); ksAppendKey(ks, keyNew("user/b", KEY_END)); ksAppendKey(ks, keyNew("user/d", KEY_END)); ksAppendKey(ks, keyNew("user/c", KEY_END)); ksAppendKey(ks, keyNew("user/c", KEY_END)); ksAppendKey(ks, keyNew("user/g", KEY_END)); ksAppendKey(ks, keyNew("user/h", KEY_END)); ksAppendKey(ks, keyNew("user/h", KEY_END)); ksAppendKey(ks, keyNew("user/f", KEY_END)); ksSort (ks); ksRewind (ks); for (i=0; (key=ksNext(ks)) != 0; i++) { switch (i) { case 0: succeed_if (strcmp (keyName (key), "user/a") == 0, "wrong name found."); succeed_if (keyNeedRemove (key) == 0, "wrong removed key information"); break; case 1: succeed_if (strcmp (keyName (key), "user/b") == 0, "wrong name found."); succeed_if (keyNeedRemove (key) == 0, "wrong removed key information"); break; case 2: succeed_if (strcmp (keyName (key), "user/b") == 0, "wrong name found."); succeed_if (keyNeedRemove (key) == 0, "wrong removed key information"); break; case 3: succeed_if (strcmp (keyName (key), "user/c") == 0, "wrong name found."); succeed_if (keyNeedRemove (key) == 0, "wrong removed key information"); break; case 4: succeed_if (strcmp (keyName (key), "user/c") == 0, "wrong name found."); succeed_if (keyNeedRemove (key) == 0, "wrong removed key information"); break; case 5: succeed_if (strcmp (keyName (key), "user/d") == 0, "wrong name found."); succeed_if (keyNeedRemove (key) == 0, "wrong removed key information"); break; case 6: succeed_if (strcmp (keyName (key), "user/e") == 0, "wrong name found."); succeed_if (keyNeedRemove (key) == 0, "wrong removed key information"); break; case 7: succeed_if (strcmp (keyName (key), "user/f") == 0, "wrong name found."); succeed_if (keyNeedRemove (key) == 0, "wrong removed key information"); break; case 8: succeed_if (strcmp (keyName (key), "user/g") == 0, "wrong name found."); succeed_if (keyNeedRemove (key) == 0, "wrong removed key information"); break; case 9: succeed_if (strcmp (keyName (key), "user/h") == 0, "wrong name found."); succeed_if (keyNeedRemove (key) == 0, "wrong removed key information"); break; case 10:succeed_if (strcmp (keyName (key), "user/h") == 0, "wrong name found."); succeed_if (keyNeedRemove (key) == 0, "wrong removed key information"); break; default:succeed_if (0, "should not reach"); break; } } ksDel (ks); printf ("Sort with some keyNeedRemove set\n"); ks=ksNew(0); k1 = keyNew("user/aname", KEY_END); ksAppendKey(ks,k1); k2 = keyDup (k1); keyRemove(k2); succeed_if (keyGetRef(k2) == 0, "reference counter not resetted"); ksAppendKey(ks,k2); succeed_if (keyGetRef(k2) == 1, "reference counter not incremented"); ksSort (ks); ksRewind (ks); key = ksNext(ks); // printf ("%d\n", keyNeedRemove (key)); succeed_if (keyNeedRemove (key) == 1, "Removed key should be on first position"); ksDel(ks); ks=ksNew(0); k1 = keyNew("user/aname", KEY_END); k2 = keyDup (k1); keyRemove(k2); ksAppendKey(ks,k2); ksAppendKey(ks,k1); ksSort (ks); ksRewind (ks); key = ksNext(ks); succeed_if (keyNeedRemove (key) == 1, "Removed key should be on first position"); ksDel(ks); ks=ksNew(0); ksAppendKey(ks, keyNew("user/a", KEY_REMOVE, KEY_END)); ksAppendKey(ks, keyNew("user/e", KEY_END)); ksAppendKey(ks, keyNew("user/b", KEY_REMOVE, KEY_END)); ksAppendKey(ks, keyNew("user/b", KEY_END)); ksAppendKey(ks, keyNew("user/d", KEY_REMOVE, KEY_END)); ksAppendKey(ks, keyNew("user/c", KEY_END)); ksAppendKey(ks, keyNew("user/c", KEY_REMOVE, KEY_END)); ksAppendKey(ks, keyNew("user/g", KEY_REMOVE, KEY_END)); ksAppendKey(ks, keyNew("user/h", KEY_REMOVE, KEY_END)); ksAppendKey(ks, keyNew("user/h", KEY_END)); ksAppendKey(ks, keyNew("user/f", KEY_REMOVE, KEY_END)); ksSort (ks); ksRewind (ks); // output_keyset(ks,0); for (i=0; (key=ksNext(ks)) != 0; i++) { switch (i) { case 0: succeed_if (strcmp (keyName (key), "user/h") == 0, "wrong name found."); succeed_if (keyNeedRemove (key) == 1, "wrong removed key information"); break; case 1: succeed_if (strcmp (keyName (key), "user/g") == 0, "wrong name found."); succeed_if (keyNeedRemove (key) == 1, "wrong removed key information"); break; case 2: succeed_if (strcmp (keyName (key), "user/f") == 0, "wrong name found."); succeed_if (keyNeedRemove (key) == 1, "wrong removed key information"); break; case 3: succeed_if (strcmp (keyName (key), "user/d") == 0, "wrong name found."); succeed_if (keyNeedRemove (key) == 1, "wrong removed key information"); break; case 4: succeed_if (strcmp (keyName (key), "user/c") == 0, "wrong name found."); succeed_if (keyNeedRemove (key) == 1, "wrong removed key information"); break; case 5: succeed_if (strcmp (keyName (key), "user/b") == 0, "wrong name found."); succeed_if (keyNeedRemove (key) == 1, "wrong removed key information"); break; case 6: succeed_if (strcmp (keyName (key), "user/a") == 0, "wrong name found."); succeed_if (keyNeedRemove (key) == 1, "wrong removed key information"); break; case 7: succeed_if (strcmp (keyName (key), "user/b") == 0, "wrong name found."); succeed_if (keyNeedRemove (key) == 0, "wrong removed key information"); break; case 8: succeed_if (strcmp (keyName (key), "user/c") == 0, "wrong name found."); succeed_if (keyNeedRemove (key) == 0, "wrong removed key information"); break; case 9: succeed_if (strcmp (keyName (key), "user/e") == 0, "wrong name found."); succeed_if (keyNeedRemove (key) == 0, "wrong removed key information"); break; case 10:succeed_if (strcmp (keyName (key), "user/h") == 0, "wrong name found."); succeed_if (keyNeedRemove (key) == 0, "wrong removed key information"); break; default:succeed_if (0, "should not reach"); break; } } ksDel (ks); printf ("Sort with all keyNeedRemove set\n"); ks=ksNew(0); ksAppendKey(ks, keyNew("user/a", KEY_REMOVE, KEY_END)); ksAppendKey(ks, keyNew("user/e", KEY_REMOVE, KEY_END)); ksAppendKey(ks, keyNew("user/b/a", KEY_REMOVE, KEY_END)); ksAppendKey(ks, keyNew("user/b", KEY_REMOVE, KEY_END)); ksAppendKey(ks, keyNew("user/d", KEY_REMOVE, KEY_END)); ksAppendKey(ks, keyNew("user/c", KEY_REMOVE, KEY_END)); ksAppendKey(ks, keyNew("user/c/a", KEY_REMOVE, KEY_END)); ksAppendKey(ks, keyNew("user/g", KEY_REMOVE, KEY_END)); ksAppendKey(ks, keyNew("user/h/a", KEY_REMOVE, KEY_END)); ksAppendKey(ks, keyNew("user/h", KEY_REMOVE, KEY_END)); ksAppendKey(ks, keyNew("user/f", KEY_REMOVE, KEY_END)); ksSort(ks); ksRewind (ks); // output_keyset(ks,0); for (i=0; (key=ksNext(ks)) != 0; i++) { switch (i) { case 0: succeed_if (strcmp (keyName (key), "user/h/a") == 0, "wrong name found."); succeed_if (keyNeedRemove (key) == 1, "wrong removed key information"); break; case 1: succeed_if (strcmp (keyName (key), "user/h") == 0, "wrong name found."); succeed_if (keyNeedRemove (key) == 1, "wrong removed key information"); break; case 2: succeed_if (strcmp (keyName (key), "user/g") == 0, "wrong name found."); succeed_if (keyNeedRemove (key) == 1, "wrong removed key information"); break; case 3: succeed_if (strcmp (keyName (key), "user/f") == 0, "wrong name found."); succeed_if (keyNeedRemove (key) == 1, "wrong removed key information"); break; case 4: succeed_if (strcmp (keyName (key), "user/e") == 0, "wrong name found."); succeed_if (keyNeedRemove (key) == 1, "wrong removed key information"); break; case 5: succeed_if (strcmp (keyName (key), "user/d") == 0, "wrong name found."); succeed_if (keyNeedRemove (key) == 1, "wrong removed key information"); break; case 6: succeed_if (strcmp (keyName (key), "user/c/a") == 0, "wrong name found."); succeed_if (keyNeedRemove (key) == 1, "wrong removed key information"); break; case 7: succeed_if (strcmp (keyName (key), "user/c") == 0, "wrong name found."); succeed_if (keyNeedRemove (key) == 1, "wrong removed key information"); break; case 8: succeed_if (strcmp (keyName (key), "user/b/a") == 0, "wrong name found."); succeed_if (keyNeedRemove (key) == 1, "wrong removed key information"); break; case 9: succeed_if (strcmp (keyName (key), "user/b") == 0, "wrong name found."); succeed_if (keyNeedRemove (key) == 1, "wrong removed key information"); break; case 10:succeed_if (strcmp (keyName (key), "user/a") == 0, "wrong name found."); succeed_if (keyNeedRemove (key) == 1, "wrong removed key information"); break; default:succeed_if (0, "should not reach"); break; } } ksDel (ks); printf ("Sort with mixed keyNeedRemove set and subdirs\n"); ks=ksNew(0); ksAppendKey(ks, keyNew("user/dir1/key1", KEY_REMOVE, KEY_END)); ksAppendKey(ks, keyNew("user/dir1/key2", KEY_END)); ksAppendKey(ks, keyNew("user/dir1/key3", KEY_REMOVE, KEY_END)); ksAppendKey(ks, keyNew("user/dir2", KEY_REMOVE, KEY_END)); ksAppendKey(ks, keyNew("user/dir2/key1", KEY_REMOVE, KEY_END)); ksAppendKey(ks, keyNew("user/dir3/key1", KEY_END)); ksAppendKey(ks, keyNew("user/dir3", KEY_END)); ksAppendKey(ks, keyNew("user/dir3/key2", KEY_END)); ksAppendKey(ks, keyNew("user/dir4", KEY_END)); ksAppendKey(ks, keyNew("user/dir5/key1", KEY_REMOVE, KEY_END)); ksAppendKey(ks, keyNew("user/dir6/key1", KEY_END)); ksSort(ks); ksRewind (ks); // output_keyset(ks,0); for (i=0; (key=ksNext(ks)) != 0; i++) { switch (i) { case 0: succeed_if (strcmp (keyName (key), "user/dir5/key1") == 0, "wrong name found."); succeed_if (keyNeedRemove (key) == 1, "wrong removed key information"); break; case 1: succeed_if (strcmp (keyName (key), "user/dir2/key1") == 0, "wrong name found."); succeed_if (keyNeedRemove (key) == 1, "wrong removed key information"); break; case 2: succeed_if (strcmp (keyName (key), "user/dir2") == 0, "wrong name found."); succeed_if (keyNeedRemove (key) == 1, "wrong removed key information"); break; case 3: succeed_if (strcmp (keyName (key), "user/dir1/key3") == 0, "wrong name found."); succeed_if (keyNeedRemove (key) == 1, "wrong removed key information"); break; case 4: succeed_if (strcmp (keyName (key), "user/dir1/key1") == 0, "wrong name found."); succeed_if (keyNeedRemove (key) == 1, "wrong removed key information"); break; case 5: succeed_if (strcmp (keyName (key), "user/dir1/key2") == 0, "wrong name found."); succeed_if (keyNeedRemove (key) == 0, "wrong removed key information"); break; case 6: succeed_if (strcmp (keyName (key), "user/dir3") == 0, "wrong name found."); succeed_if (keyNeedRemove (key) == 0, "wrong removed key information"); break; case 7: succeed_if (strcmp (keyName (key), "user/dir3/key1") == 0, "wrong name found."); succeed_if (keyNeedRemove (key) == 0, "wrong removed key information"); break; case 8: succeed_if (strcmp (keyName (key), "user/dir3/key2") == 0, "wrong name found."); succeed_if (keyNeedRemove (key) == 0, "wrong removed key information"); break; case 9: succeed_if (strcmp (keyName (key), "user/dir4") == 0, "wrong name found."); succeed_if (keyNeedRemove (key) == 0, "wrong removed key information"); break; case 10:succeed_if (strcmp (keyName (key), "user/dir6/key1") == 0, "wrong name found."); succeed_if (keyNeedRemove (key) == 0, "wrong removed key information"); break; default:succeed_if (0, "should not reach"); break; } } ksDel (ks); } void ksUnsort (KeySet *ks) { Key *cur; size_t size = 0; KeySet *randks=ksNew(0); /*This is the final randomized keyset*/ KeySet *tempks=ksNew(0); /*Temporary storage for keys not chosen to be inserted*/ while (ksGetSize(ks) > 0) { ksRewind(ks); size = ksGetSize(ks); /* printf ("iterating %d\n", size); */ while ((cur=ksPop(ks)) != 0) { /* printf ("\titerating %s\n", keyName(cur)); */ if (!(rand()%size)) ksAppendKey(randks, cur); else ksAppendKey(tempks,cur); } ksAppend(ks, tempks); ksCopy(tempks,0); } ksCopy (ks, randks); ksDel (randks); ksDel (tempks); } void test_ksLookup() { printf ("Test lookup\n"); int i,j; Key *cur=0; Key *found=0; Key *k[1000]; KeySet *ks = ksNew (30, k[0]=keyNew ("user/rem3", KEY_REMOVE, KEY_DIR, KEY_END), k[1]=keyNew ("user/rem2", KEY_REMOVE, KEY_DIR, KEY_END), k[2]=keyNew ("user/rem1/key2", KEY_REMOVE, KEY_END), k[3]=keyNew ("user/rem1/key1", KEY_REMOVE, KEY_END), k[4]=keyNew ("user/rem1", KEY_REMOVE, KEY_DIR, KEY_END), k[5]=keyNew ("user/dir1", KEY_DIR, KEY_END), k[6]=keyNew ("user/dir1/key1", KEY_VALUE, "value1", KEY_END), k[7]=keyNew ("user/dir1/key2", KEY_VALUE, "value2", KEY_END), k[8]=keyNew ("user/dir1/key3", KEY_VALUE, "value3", KEY_END), k[9]=keyNew ("user/dir1/key4", KEY_VALUE, "value4", KEY_END), k[10]=keyNew ("user/dir1/.inactive1", KEY_COMMENT, "key is inactive", KEY_END), k[11]=keyNew ("user/dir1/.inactive2", KEY_COMMENT, "additional information", KEY_END), k[12]=keyNew ("user:max/dir2", KEY_DIR, KEY_END), k[13]=keyNew ("user:max/dir2/key1", KEY_VALUE, "value1", KEY_END), k[14]=keyNew ("user/dir2/key2", KEY_VALUE, "value2", KEY_END), k[15]=keyNew ("user/dir2/key3", KEY_VALUE, "value3", KEY_END), k[16]=keyNew ("user:hugo/dir2/key4", KEY_VALUE, "value4", KEY_END), k[17]=keyNew ("user/dir3", KEY_DIR, KEY_END), k[18]=keyNew ("user/dir3/key1", KEY_VALUE, "value1", KEY_END), k[19]=keyNew ("user:sb/dir3/.inactive1", KEY_COMMENT, "key is inactive", KEY_END), k[20]=keyNew ("user/dir3/.inactive2", KEY_COMMENT, "a users comment", KEY_END), k[21]=keyNew ("user/dir4", KEY_DIR, KEY_END), k[22]=keyNew ("user/dir5", KEY_DIR, KEY_END), KS_END); /* key 5 */ k[23] = keyNew ("user/DiR1", KEY_END); /* key 6 */ k[24] = keyNew ("user/DiR1/KEY1", KEY_END); k[25] = keyNew ("user:wrongowner/DiR1/KEY1", KEY_END); k[26] = keyNew ("user:nop/DiR1/KEY1", KEY_END); k[27] = keyNew ("user:wrongowner/dir1/key1", KEY_END); k[28] = keyNew ("user:nop/dir1/key1", KEY_END); /*key 13 */ k[29] = keyNew ("user:wrongowner/dir2/key1", KEY_END); k[30] = keyNew ("user/dir2/key1", KEY_END); k[31] = keyNew ("user:max/dir2/key1", KEY_END); srand(23); succeed_if (ksLookup(0, k[23], 0) == 0, "null pointer"); succeed_if (ksLookup(ks, 0, 0) == 0, "null pointer"); for (i=0; i<100; i++) { ksUnsort(ks); for (j=0; j<5; j++) succeed_if (ksLookup(ks, k[j], 0)==0, "found removed key"); for (j=5; j<23;j++) succeed_if (ksLookup(ks, k[j], 0)==k[j], "did not found key"); succeed_if (ksLookup(ks, k[23], KDB_O_NOCASE) == k[5], "did not found key"); succeed_if (ksLookup(ks, k[23], 0) == 0, "found wrong key"); succeed_if (ksLookup(ks, k[24], KDB_O_NOCASE) == k[6], "did not found key"); succeed_if (ksLookup(ks, k[24], 0) == 0, "found wrong key"); succeed_if (ksLookup(ks, k[25], KDB_O_NOCASE) == k[6], "did not found key"); succeed_if (ksLookup(ks, k[25], KDB_O_WITHOWNER|KDB_O_NOCASE) == 0, "found wrong key"); succeed_if (ksLookup(ks, k[28], 0) == k[6], "did not found key"); succeed_if (ksLookup(ks, k[28], KDB_O_WITHOWNER) == 0, "found wrong key"); succeed_if (ksLookup(ks, k[31], KDB_O_WITHOWNER) == k[13], "did not found key"); /* Empty lines to add more tests: succeed_if (ksLookup(ks, k[], ) == k[], "did not found key"); succeed_if (ksLookup(ks, k[], ) == 0, "found wrong key"); */ } ksDel (ks); for (i=23; i<32;i++) keyDel (k[i]); } void test_ksLookupByName() { printf ("Test lookup by name\n"); int i,j; Key *cur=0; Key *found=0; char *name[1000]; Key *k[1000]; KeySet *ks = ksNew (30, k[0]=keyNew (name[0] = "user/rem3", KEY_REMOVE, KEY_DIR, KEY_END), k[1]=keyNew (name[1] = "user/rem2", KEY_REMOVE, KEY_DIR, KEY_END), k[2]=keyNew (name[2] = "user/rem1/key2", KEY_REMOVE, KEY_END), k[3]=keyNew (name[3] = "user/rem1/key1", KEY_REMOVE, KEY_END), k[4]=keyNew (name[4] = "user/rem1", KEY_REMOVE, KEY_DIR, KEY_END), k[5]=keyNew (name[5] = "user/dir1", KEY_DIR, KEY_END), k[6]=keyNew (name[6] = "user/dir1/key1", KEY_VALUE, "value1", KEY_END), k[7]=keyNew (name[7] = "user/dir1/key2", KEY_VALUE, "value2", KEY_END), k[8]=keyNew (name[8] = "user/dir1/key3", KEY_VALUE, "value3", KEY_END), k[9]=keyNew (name[9] = "user/dir1/key4", KEY_VALUE, "value4", KEY_END), k[10]=keyNew (name[10] ="user/dir1/.inactive1", KEY_COMMENT, "key is inactive", KEY_END), k[11]=keyNew (name[11] ="user/dir1/.inactive2", KEY_COMMENT, "additional information", KEY_END), k[12]=keyNew (name[12] ="user:max/dir2", KEY_DIR, KEY_END), k[13]=keyNew (name[13] ="user:max/dir2/key1", KEY_VALUE, "value1", KEY_END), k[14]=keyNew (name[14] ="user/dir2/key2", KEY_VALUE, "value2", KEY_END), k[15]=keyNew (name[15] ="user/dir2/key3", KEY_VALUE, "value3", KEY_END), k[16]=keyNew (name[16] ="user:hugo/dir2/key4", KEY_VALUE, "value4", KEY_END), k[17]=keyNew (name[17] ="user/dir3", KEY_DIR, KEY_END), k[18]=keyNew (name[18] ="user/dir3/key1", KEY_VALUE, "value1", KEY_END), k[19]=keyNew (name[19] ="user:sb/dir3/.inactive1", KEY_COMMENT, "key is inactive", KEY_END), k[20]=keyNew (name[20] ="user/dir3/.inactive2", KEY_COMMENT, "a users comment", KEY_END), k[21]=keyNew (name[21] ="user/dir4", KEY_DIR, KEY_END), k[22]=keyNew (name[22] ="user/dir5", KEY_DIR, KEY_END), KS_END); name[23] = "user/DiR1"; name[24] = "user/DiR1/KEY1"; name[25] = "user:wrongowner/DiR1/KEY1"; name[26] = "user:nop/DiR1/KEY1"; name[27] = "user:wrongowner/dir1/key1"; name[28] = "user:nop/dir1/key1"; name[29] = "user:wrongowner/dir2/key1"; name[30] = "user/dir2/key1"; name[31] = "user:max/dir2/key1"; srand(23); succeed_if (ksLookupByName(0, name[23], 0) == 0, "null pointer"); succeed_if (ksLookup(ks, 0, 0) == 0, "null pointer"); for (i=0; i<100; i++) { ksUnsort(ks); for (j=0; j<5; j++) succeed_if (ksLookupByName(ks, name[j], 0)==0, "found removed key"); for (j=5; j<23;j++) succeed_if (ksLookupByName(ks, name[j], 0)==k[j], "did not found key"); succeed_if (ksLookupByName(ks, name[23], KDB_O_NOCASE) == k[5], "did not found key"); succeed_if (ksLookupByName(ks, name[23], 0) == 0, "found wrong key"); succeed_if (ksLookupByName(ks, name[24], KDB_O_NOCASE) == k[6], "did not found key"); succeed_if (ksLookupByName(ks, name[24], 0) == 0, "found wrong key"); succeed_if (ksLookupByName(ks, name[25], KDB_O_NOCASE) == k[6], "did not found key"); succeed_if (ksLookupByName(ks, name[25], KDB_O_WITHOWNER|KDB_O_NOCASE) == 0, "found wrong key"); succeed_if (ksLookupByName(ks, name[28], 0) == k[6], "did not found key"); succeed_if (ksLookupByName(ks, name[28], KDB_O_WITHOWNER) == 0, "found wrong key"); succeed_if (ksLookupByName(ks, name[31], KDB_O_WITHOWNER) == k[13], "did not found key"); /* Empty lines to add more tests: succeed_if (ksLookupByName(ks, name[], ) == name[], "did not found key"); succeed_if (ksLookupByName(ks, name[], ) == 0, "found wrong key"); */ } ksDel (ks); } void test_ksLookupName() { Key * found; KeySet *ks= ksNew(0); printf ("Test lookup functions\n"); succeed_if (ksNeedSort (ks) == 1, "sort state not correct"); ksAppendKey(ks, keyNew("user/domain/key", KEY_VALUE, "domainvalue", KEY_OWNER, "markus", KEY_END)); ksAppendKey(ks, keyNew("user/single/key", KEY_VALUE, "singlevalue", KEY_END)); ksAppendKey(ks, keyNew("user/named/key", KEY_VALUE, "myvalue", KEY_END)); ksAppendKey(ks, keyNew("system/named/key", KEY_VALUE, "syskey", KEY_END)); ksAppendKey(ks, keyNew("system/sysonly/key", KEY_VALUE, "sysonlykey", KEY_END)); ksAppendKey(ks, keyNew("user/named/bin", KEY_TYPE, KEY_TYPE_BINARY, KEY_SIZE, 10, KEY_VALUE, "binary\1\2data", KEY_END)); ksAppendKey(ks, keyNew("system/named/bin", KEY_TYPE, KEY_TYPE_BINARY, KEY_SIZE, 10, KEY_VALUE, "sys\1bin\2", KEY_END)); ksAppendKey(ks, keyNew("system/named/key", KEY_TYPE, KEY_TYPE_BINARY, KEY_SIZE, 10, KEY_VALUE, "syskey", KEY_END)); succeed_if (ksGetSize(ks) == 8, "could not append all keys"); succeed_if (ksNeedSort (ks) == 1, "sort state not correct"); // a positive testcase found = ksLookupByName (ks, "user/named/key", 0); succeed_if (ksCurrent(ks) == found, "current not set correctly"); succeed_if (ksNeedSort (ks) == 0, "sort state not correct"); ksAppendKey(ks, keyNew("user/single/key", KEY_VALUE, "singlevalue", KEY_END)); succeed_if (ksNeedSort (ks) == 1, "sort state not correct"); succeed_if (found != 0, "did not found correct name"); succeed_if (ksCurrent(ks) == found, "current not set correctly"); succeed_if (strcmp (keyName(found), "user/named/key") == 0, "name not correct in found key"); succeed_if (strcmp (keyValue(found), "myvalue") == 0, "not correct value in found key"); // here you can't find the keys succeed_if (ksLookupByName (ks, "named/key", 0) == 0, "not valid keyname"); succeed_if (ksNeedSort (ks) == 0, "sort state not correct"); succeed_if (ksLookupByName (ks, "u/named/key", 0) == 0, "not valid keyname"); succeed_if (ksLookupByName (ks, "usea/named/key", 0) == 0, "not valid keyname"); succeed_if (ksLookupByName (ks, " user/named/key", 0) == 0, "found key with bad prefix"); succeed_if (ksLookupByName (ks, "user/named/Key", 0) == 0, "found wrong case key"); succeed_if (ksLookupByName (ks, "User/Named/key", 0) == 0, "found wrong case key"); succeed_if (ksLookupByName (ks, "User/named/key", 0) == 0, "found wrong case key"); succeed_if (ksLookupByName (ks, "user/NAMED/key", 0) == 0, "found wrong case key"); succeed_if (ksLookupByName (ks, "USER/NAMED/KEY", 0) == 0, "found wrong case key"); succeed_if (ksLookupByName (ks, "user/named/keys", 0) == 0, "wrong postfix"); succeed_if (ksLookupByName (ks, "user/named/key_", 0) == 0, "wrong postfix"); succeed_if (ksLookupByName (ks, "user/named/k/ey", 0) == 0, "seperation that should be"); succeed_if (ksLookupByName (ks, "user/na/med/key", 0) == 0, "seperation that should be"); succeed_if (ksLookupByName (ks, "system/domain/key", 0) == 0, "found key in wrong domain"); //now try to find them, and compare value found = ksLookupByName (ks, "user/domain/key", 0); succeed_if (ksCurrent(ks) == found, "current not set correctly"); succeed_if (found != 0, "did not found correct name"); succeed_if (strcmp (keyName(found), "user/domain/key") == 0, "name not correct in found key"); succeed_if (strcmp (keyValue(found), "domainvalue") == 0, "not correct value in found key"); found = ksLookupByName (ks, "user/single/key", 0); succeed_if (ksCurrent(ks) == found, "current not set correctly"); succeed_if (found != 0, "did not found correct name"); succeed_if (strcmp (keyName(found), "user/single/key") == 0, "name not correct in found key"); succeed_if (strcmp (keyValue(found), "singlevalue") == 0, "not correct value in found key"); found = ksLookupByName (ks, "system/named/key", 0); succeed_if (ksCurrent(ks) == found, "current not set correctly"); succeed_if (found != 0, "did not found correct name"); succeed_if (strcmp (keyName(found), "system/named/key") == 0, "name not correct in found key"); succeed_if (strcmp (keyValue(found), "syskey") == 0, "not correct value in found key"); found = ksLookupByName (ks, "user/named/bin", 0); succeed_if (ksCurrent(ks) == found, "current not set correctly"); succeed_if (found != 0, "did not found correct name"); succeed_if (strcmp (keyName(found), "user/named/bin") == 0, "name not correct in found key"); succeed_if (strncmp (keyValue(found), "binary\1\2data",10) == 0, "not correct value in found key"); found = ksLookupByName (ks, "user/named/key", 0); succeed_if (ksCurrent(ks) == found, "current not set correctly"); succeed_if (found != 0, "could not find same key again"); succeed_if (strcmp (keyName(found), "user/named/key") == 0, "name not correct in found key"); succeed_if (strcmp (keyValue(found), "myvalue") == 0, "not correct value in found key"); printf ("Test nocase lookup functions\n"); found = ksLookupByName (ks, "user/named/key", KDB_O_NOCASE); succeed_if (ksCurrent(ks) == found, "current not set correctly"); succeed_if (found != 0, "could not find same key again, nocase"); succeed_if (strcmp (keyName(found), "user/named/key") == 0, "name not correct in found key"); succeed_if (strcmp (keyValue(found), "myvalue") == 0, "not correct value in found key"); found = ksLookupByName (ks, "user/NameD/KeY", KDB_O_NOCASE); succeed_if (found != 0, "could not find same key again, nocase used"); succeed_if (ksCurrent(ks) == found, "current not set correctly"); succeed_if (strcmp (keyName(found), "user/named/key") == 0, "name not correct in found key"); succeed_if (strcmp (keyValue(found), "myvalue") == 0, "not correct value in found key"); found = ksLookupByName (ks, "user/NameD/KEY", KDB_O_NOCASE); succeed_if (found != 0, "could not find same key again, nocase used"); succeed_if (ksCurrent(ks) == found, "current not set correctly"); succeed_if (strcmp (keyName(found), "user/named/key") == 0, "name not correct in found key"); succeed_if (strcmp (keyValue(found), "myvalue") == 0, "not correct value in found key"); printf ("Test cascading lookup functions\n"); found = ksLookupByName (ks, "/named/key", 0); succeed_if (ksCurrent(ks) == found, "current not set correctly"); succeed_if (found != 0, "cascading search failed"); succeed_if (strcmp (keyName(found), "user/named/key") == 0, "name not correct in found key"); succeed_if (strcmp (keyValue(found), "myvalue") == 0, "not correct value in found key"); found = ksLookupByName (ks, "/single/Key", KDB_O_NOCASE); succeed_if (ksCurrent(ks) == found, "current not set correctly"); succeed_if (found != 0, "could not find same key again, nocase used"); succeed_if (strcmp (keyName(found), "user/single/key") == 0, "name not correct in found key"); succeed_if (strcmp (keyValue(found), "singlevalue") == 0, "not correct value in found key"); found = ksLookupByName (ks, "/sysonly/key", 0); succeed_if (ksCurrent(ks) == found, "current not set correctly"); succeed_if (found != 0, "could not find same key again, nocase used"); succeed_if (strcmp (keyName(found), "system/sysonly/key") == 0, "name not correct in found key"); succeed_if (strcmp (keyValue(found), "sysonlykey") == 0, "not correct value in found key"); succeed_if (ksLookupByName (ks, "/named/", 0) == 0, "found part of key with cascading"); succeed_if (ksLookupByName (ks, "/named/keyd", 0) == 0, "found part of key with cascading, bad postfix"); printf ("Test domain lookup functions\n"); found = ksLookupByName (ks, "user:markus/domain/key", KDB_O_WITHOWNER); succeed_if (ksCurrent(ks) == found, "current not set correctly"); succeed_if (found != 0, "could not find domain key"); succeed_if (strcmp (keyValue(found), "domainvalue") == 0, "not correct value in domain key"); succeed_if (ksLookupByName (ks, "user:hugo/domain/key", KDB_O_WITHOWNER) == 0, "found key in wrong domain"); succeed_if (ksLookupByName (ks, "user:y/domain/key", KDB_O_WITHOWNER) == 0, "found key in wrong domain"); succeed_if (ksLookupByName (ks, "user:markuss/domain/key", KDB_O_WITHOWNER) == 0, "found key in wrong domain"); succeed_if (ksLookupByName (ks, "user:marku/domain/key", KDB_O_WITHOWNER) == 0, "found key in wrong domain"); ksDel(ks); } void test_ksLookupNameRemove() { Key * found; KeySet *ks=ksNew(0); printf ("Test lookup functions with removed keys\n"); ksAppendKey(ks, keyNew("user/a", KEY_REMOVE, KEY_END)); ksAppendKey(ks, keyNew("user/e", KEY_END)); ksAppendKey(ks, keyNew("user/b", KEY_REMOVE, KEY_END)); ksAppendKey(ks, keyNew("user/b", KEY_END)); ksAppendKey(ks, keyNew("user/d", KEY_REMOVE, KEY_END)); ksAppendKey(ks, keyNew("user/c", KEY_END)); ksAppendKey(ks, keyNew("user/c", KEY_REMOVE, KEY_END)); ksAppendKey(ks, keyNew("user/g", KEY_REMOVE, KEY_END)); ksAppendKey(ks, keyNew("user/h", KEY_REMOVE, KEY_END)); ksAppendKey(ks, keyNew("user/h", KEY_END)); ksAppendKey(ks, keyNew("user/f", KEY_REMOVE, KEY_END)); found = ksLookupByName (ks, "user/e", 0); succeed_if (found != 0, "could not find same key again, nocase used"); succeed_if (ksCurrent(ks) == found, "current not set correctly"); succeed_if (strcmp (keyName(found), "user/e") == 0, "name not correct in found key"); found = ksLookupByName (ks, "user/b", 0); succeed_if (found != 0, "could not find same key again, nocase used"); succeed_if (ksCurrent(ks) == found, "current not set correctly"); succeed_if (strcmp (keyName(found), "user/b") == 0, "name not correct in found key"); found = ksLookupByName (ks, "user/c", 0); succeed_if (found != 0, "could not find same key again, nocase used"); succeed_if (ksCurrent(ks) == found, "current not set correctly"); succeed_if (strcmp (keyName(found), "user/c") == 0, "name not correct in found key"); found = ksLookupByName (ks, "user/h", 0); succeed_if (found != 0, "could not find same key again, nocase used"); succeed_if (ksCurrent(ks) == found, "current not set correctly"); succeed_if (strcmp (keyName(found), "user/h") == 0, "name not correct in found key"); succeed_if (ksLookupByName (ks, "user/nonexists", 0) == 0, "found nonexists key"); succeed_if (ksLookupByName (ks, "user/g", 0) == 0, "found removed key"); succeed_if (ksLookupByName (ks, "user/f", 0) == 0, "found removed key"); ksDel (ks); } void test_ksLookupNameAll() { Key * found; cursor_t cursor; KeySet *ks= ksNew(0); printf ("Test lookup functions with KDB_O_NOALL\n"); ksAppendKey(ks, keyNew("user/a", KEY_END)); ksAppendKey(ks, keyNew("user/b", KEY_END)); ksAppendKey(ks, keyNew("user/c", KEY_END)); ksAppendKey(ks, keyNew("user/d", KEY_END)); ksAppendKey(ks, keyNew("user/e", KEY_END)); ksAppendKey(ks, keyNew("user/00", KEY_DIR, KEY_END)); ksAppendKey(ks, keyNew("user/00/a", KEY_END)); ksAppendKey(ks, keyNew("user/00/b", KEY_END)); ksAppendKey(ks, keyNew("user/00/c", KEY_END)); ksAppendKey(ks, keyNew("user/01", KEY_DIR, KEY_END)); ksAppendKey(ks, keyNew("user/01/a", KEY_END)); ksAppendKey(ks, keyNew("user/01/b", KEY_END)); ksAppendKey(ks, keyNew("user/01/c", KEY_END)); ksAppendKey(ks, keyNew("user/01/d", KEY_END)); ksAppendKey(ks, keyNew("user/02", KEY_DIR, KEY_END)); ksAppendKey(ks, keyNew("user/02/a", KEY_END)); ksAppendKey(ks, keyNew("user/02/b", KEY_END)); ksAppendKey(ks, keyNew("user/02/c", KEY_END)); ksAppendKey(ks, keyNew("user/02/d", KEY_END)); ksAppendKey(ks, keyNew("user/02/e", KEY_END)); ksAppendKey(ks, keyNew("user/02/f", KEY_END)); found = ksLookupByName (ks, "user/e", KDB_O_NOALL); succeed_if (found != 0, "could not find key"); succeed_if (strcmp (keyName(found), "user/e") == 0, "name not correct in found key"); found = ksLookupByName (ks, "user/e", KDB_O_NOALL); succeed_if (found == 0, "should not find"); ksRewind(ks); found = ksLookupByName (ks, "user/a", KDB_O_NOALL); succeed_if (found != 0, "could not find key"); succeed_if (strcmp (keyName(found), "user/a") == 0, "name not correct in found key"); found = ksLookupByName (ks, "user/e", KDB_O_NOALL); succeed_if (found != 0, "could not find key"); succeed_if (strcmp (keyName(found), "user/e") == 0, "name not correct in found key"); found = ksLookupByName (ks, "user/00", KDB_O_NOALL); succeed_if (found != 0, "could not find key"); succeed_if (keyIsDir (found) == 1, "should be dir"); succeed_if (strcmp (keyName(found), "user/00") == 0, "name not correct in found key"); found = ksLookupByName (ks, "user/01", KDB_O_NOALL); succeed_if (found != 0, "could not find key"); succeed_if (keyIsDir (found) == 1, "should be dir"); succeed_if (strcmp (keyName(found), "user/01") == 0, "name not correct in found key"); found = ksNext (ks); succeed_if (found != 0, "could not get next key"); succeed_if (strcmp (keyName(found), "user/01/a") == 0, "name not correct in next key"); found = ksLookupByName (ks, "user/02", KDB_O_NOALL); succeed_if (ksCurrent(ks) == found, "current not set correctly"); succeed_if (found != 0, "could not find key"); succeed_if (keyIsDir (found) == 1, "should be dir"); succeed_if (strcmp (keyName(found), "user/02") == 0, "name not correct in found key"); cursor = ksGetCursor (ks); found = ksLookupByName (ks, "user/01", KDB_O_NOALL); succeed_if (ksGetCursor(ks) == cursor, "cursor should not change"); succeed_if (found == 0, "should not find"); ksRewind(ks); found = ksLookupByName (ks, "user/a", KDB_O_NOALL | KDB_O_NOCASE); succeed_if (ksCurrent(ks) == found, "current not set correctly"); succeed_if (found != 0, "could not find key"); succeed_if (strcmp (keyName(found), "user/a") == 0, "name not correct in found key"); found = ksLookupByName (ks, "user/E", KDB_O_NOALL | KDB_O_NOCASE); succeed_if (ksCurrent(ks) == found, "current not set correctly"); succeed_if (found != 0, "could not find key"); succeed_if (strcmp (keyName(found), "user/e") == 0, "name not correct in found key"); found = ksLookupByName (ks, "user/00", KDB_O_NOALL | KDB_O_NOCASE); succeed_if (ksCurrent(ks) == found, "current not set correctly"); succeed_if (found != 0, "could not find key"); succeed_if (keyIsDir (found) == 1, "should be dir"); succeed_if (strcmp (keyName(found), "user/00") == 0, "name not correct in found key"); found = ksLookupByName (ks, "user/01", KDB_O_NOALL | KDB_O_NOCASE); succeed_if (ksCurrent(ks) == found, "current not set correctly"); succeed_if (found != 0, "could not find key"); succeed_if (keyIsDir (found) == 1, "should be dir"); succeed_if (strcmp (keyName(found), "user/01") == 0, "name not correct in found key"); found = ksNext (ks); succeed_if (ksCurrent(ks) == found, "current not set correctly"); succeed_if (found != 0, "could not get next key"); succeed_if (strcmp (keyName(found), "user/01/a") == 0, "name not correct in next key"); found = ksLookupByName (ks, "user/02", KDB_O_NOALL | KDB_O_NOCASE); succeed_if (ksCurrent(ks) == found, "current not set correctly"); succeed_if (found != 0, "could not find key"); succeed_if (keyIsDir (found) == 1, "should be dir"); succeed_if (strcmp (keyName(found), "user/02") == 0, "name not correct in found key"); found = ksLookupByName (ks, "user/02/F", KDB_O_NOALL | KDB_O_NOCASE); succeed_if (ksCurrent(ks) == found, "current not set correctly"); succeed_if (found != 0, "could not find key"); succeed_if (strcmp (keyName(found), "user/02/f") == 0, "name not correct in found key"); cursor = ksGetCursor (ks); found = ksLookupByName (ks, "user/a", KDB_O_NOALL | KDB_O_NOCASE); succeed_if (ksGetCursor(ks) == cursor, "cursor should stay as is if not found"); succeed_if (found == 0, "should not find"); ksRewind(ks); found = ksLookupByName (ks, "user/a", KDB_O_NOALL | KDB_O_WITHOWNER | KDB_O_NOCASE); succeed_if (found != 0, "could not find key"); succeed_if (strcmp (keyName(found), "user/a") == 0, "name not correct in found key"); found = ksLookupByName (ks, "user/E", KDB_O_NOALL | KDB_O_WITHOWNER | KDB_O_NOCASE); succeed_if (found != 0, "could not find key"); succeed_if (strcmp (keyName(found), "user/e") == 0, "name not correct in found key"); found = ksLookupByName (ks, "user/00", KDB_O_NOALL | KDB_O_WITHOWNER | KDB_O_NOCASE); succeed_if (found != 0, "could not find key"); succeed_if (keyIsDir (found) == 1, "should be dir"); succeed_if (strcmp (keyName(found), "user/00") == 0, "name not correct in found key"); found = ksLookupByName (ks, "user/01", KDB_O_NOALL | KDB_O_WITHOWNER | KDB_O_NOCASE); succeed_if (found != 0, "could not find key"); succeed_if (keyIsDir (found) == 1, "should be dir"); succeed_if (strcmp (keyName(found), "user/01") == 0, "name not correct in found key"); found = ksNext (ks); succeed_if (found != 0, "could not get next key"); succeed_if (strcmp (keyName(found), "user/01/a") == 0, "name not correct in next key"); found = ksLookupByName (ks, "user/02", KDB_O_NOALL | KDB_O_WITHOWNER | KDB_O_NOCASE); succeed_if (found != 0, "could not find key"); succeed_if (keyIsDir (found) == 1, "should be dir"); succeed_if (strcmp (keyName(found), "user/02") == 0, "name not correct in found key"); found = ksLookupByName (ks, "user:notvalid/02/F", KDB_O_NOALL | KDB_O_WITHOWNER | KDB_O_NOCASE); succeed_if (found == 0, "should not find key"); ksDel (ks); } /* void test_ksLookupValue() { KeySet *ks = ksNew(0); Key *found; printf ("test lookups for values\n"); ksAppendKey(ks, keyNew("user/1", KEY_VALUE, "singlevalue", KEY_END)); ksAppendKey(ks, keyNew("user/2", KEY_VALUE, "myvalue", KEY_END)); ksAppendKey(ks, keyNew("user/3", KEY_VALUE, "syskey", KEY_END)); ksAppendKey(ks, keyNew("user/b1", KEY_TYPE, KEY_TYPE_BINARY, KEY_SIZE, 10, KEY_VALUE, "binary\1\2data", KEY_END)); ksAppendKey(ks, keyNew("user/b2", KEY_TYPE, KEY_TYPE_BINARY, KEY_SIZE, 10, KEY_VALUE, "sys\1bin\2", KEY_END)); ksAppendKey(ks, keyNew("user/b3", KEY_TYPE, KEY_TYPE_BINARY, KEY_SIZE, 10, KEY_VALUE, "sy\1\33\12\32skey", KEY_END)); succeed_if(ksGetSize(ks) == 6, "could not append keys"); succeed_if (ksLookupByString (ks, "value", 0) == 0, "found part of value"); succeed_if (ksLookupByString (ks, " singlevalue", 0) == 0, "prefix of value"); succeed_if (ksLookupByString (ks, "/singlevalue", 0) == 0, "prefix of value"); succeed_if (ksLookupByString (ks, "singlevalue ", 0) == 0, "postfix of value"); found = ksLookupByString(ks, "singlevalue", 0); succeed_if (found != 0, "could not find value"); succeed_if (strcmp (keyName(found), "user/1") == 0, "not correct key found"); found = ksLookupByString(ks, "singlevalue", 0); succeed_if (found != 0, "could not find value again"); succeed_if (strcmp (keyName(found), "user/1") == 0, "not correct key found"); found = ksLookupByString(ks, "myvalue", 0); succeed_if (found != 0, "could not find value"); succeed_if (strcmp (keyName(found), "user/2") == 0, "not correct key found"); found = ksLookupByString(ks, "syskey", 0); succeed_if (found != 0, "could not find value"); succeed_if (strcmp (keyName(found), "user/3") == 0, "not correct key found"); ksRewind(ks); found = ksLookupByString(ks, "singlevalue", KDB_O_NOALL); succeed_if (found != 0, "could not find value"); succeed_if (strcmp (keyName(found), "user/1") == 0, "not correct key found"); found = ksLookupByString(ks, "singlevalue", 0); succeed_if (found != 0, "could not find value again"); succeed_if (strcmp (keyName(found), "user/1") == 0, "not correct key found"); ksRewind(ks); found = ksLookupByString(ks, "myvalue", KDB_O_NOALL); succeed_if (found != 0, "could not find value"); succeed_if (strcmp (keyName(found), "user/2") == 0, "not correct key found"); found = ksLookupByString(ks, "syskey", 0); succeed_if (found != 0, "could not find value"); succeed_if (strcmp (keyName(found), "user/3") == 0, "not correct key found"); // TODO: BUG found = ksLookupByString(ks, "singlevalue", KDB_O_NOALL); // succeed_if (found == 0, "could find value"); // found = ksLookupByString(ks, "singlevalue", KDB_O_NOALL); // succeed_if (found == 0, "found value again"); ksRewind(ks); found = ksLookupByString(ks, "myvalue", KDB_O_NOALL); succeed_if (found != 0, "could not find value"); succeed_if (strcmp (keyName(found), "user/2") == 0, "not correct key found"); found = ksLookupByString(ks, "syskey", 0); succeed_if (found != 0, "could not find value"); succeed_if (strcmp (keyName(found), "user/3") == 0, "not correct key found"); found = ksLookupByString(ks, "syskey", KDB_O_NOALL); succeed_if (found != 0, "could not find value"); succeed_if (strcmp (keyName(found), "user/3") == 0, "not correct key found"); found = ksLookupByString(ks, "syskey", KDB_O_NOALL); succeed_if (found == 0, "found value"); ksDel(ks); } */ //copied out from example void test_ksExample() { KeySet *ks=ksNew(0); Key * key; ksAppendKey(ks,keyNew(0)); // an empty key ksAppendKey(ks,keyNew("user/sw", // the name of the key KEY_END)); // no more args ksAppendKey(ks,keyNew("user/tmp/ex1", KEY_VALUE,"some data", // set a string value KEY_END)); // end of args ksAppendKey(ks,keyNew("user/tmp/ex2", KEY_VALUE,"some data", // with a simple value KEY_MODE,0777, // permissions KEY_END)); // end of args ksAppendKey(ks,keyNew("user/tmp/ex4", KEY_TYPE,KEY_TYPE_BINARY, // key type KEY_SIZE,7, // assume binary length 7 KEY_VALUE,"some data", // value that will be truncated in 7 bytes KEY_COMMENT,"value is truncated", KEY_OWNER,"root", // owner (not uid) is root KEY_UID,0, // root uid KEY_END)); // end of args ksAppendKey(ks,keyNew("user/tmp/ex5", KEY_TYPE, KEY_TYPE_BINARY, // binary value KEY_SIZE,7, KEY_VALUE,"some data", // value that will be truncated in 7 bytes KEY_COMMENT,"value is truncated", KEY_OWNER,"root", // owner (not uid) is root KEY_UID,0, // root uid KEY_END)); // end of args ksRewind(ks); // end of example key=ksNext(ks); succeed_if(key != NULL, "keyNew: Unable to create a new empty key"); key=ksNext(ks); succeed_if(key != NULL, "keyNew: Unable to create a key with name"); succeed_if(strcmp(keyName(key), "user/sw") == 0, "keyNew: Key's name setted incorrectly"); ksDel(ks); } #define MAX_SIZE 200 void test_ksCommonParentName() { char ret [MAX_SIZE+1]; KeySet *ks = ksNew (10, keyNew("system/sw/xorg/Monitors/Monitor1/vrefresh",0), keyNew("system/sw/xorg/Monitors/Monitor1/hrefresh",0), keyNew("system/sw/xorg/Monitors/Monitor2/vrefresh",0), keyNew("system/sw/xorg/Monitors/Monitor2/hrefresh",0), keyNew("system/sw/xorg/Devices/Device1/driver",0), keyNew("system/sw/xorg/Devices/Device1/mode",0),KS_END); printf ("Test common parentname\n"); ksSort (ks); succeed_if (ksGetCommonParentName(ks, ret, MAX_SIZE) > 0, "could not find correct parentname"); succeed_if (strcmp (ret, "system/sw/xorg") == 0, "parentname not correct"); ksDel (ks); ks = ksNew (10, keyNew("system",0), keyNew("user",0),KS_END); succeed_if (ksGetCommonParentName(ks, ret, MAX_SIZE) == 0, "could find correct parentname"); succeed_if (strcmp (ret, "") == 0, "parentname not empty"); ksDel (ks); ks = ksNew (10, keyNew("system/some/thing",0), keyNew("system/other/thing",0), KS_END); succeed_if (ksGetCommonParentName(ks, ret, MAX_SIZE) == 7, "could find correct parentname"); succeed_if (strcmp (ret, "system") == 0, "parentname not empty"); ksDel (ks); ks = ksNew (10, keyNew("system/here/in/deep/goes/ok/thing",0), keyNew("system/here/in/deep/goes/ok/other/thing",0), KS_END); succeed_if (ksGetCommonParentName(ks, ret, MAX_SIZE) > 0, "could find correct parentname"); succeed_if (strcmp (ret, "system/here/in/deep/goes/ok") == 0, "parentname not empty"); ksDel (ks); ks = ksNew (10, keyNew("system/here/in/deep/goes/ok/thing",0), keyNew("system/here/in/deep/goes/ok/other/thing",0), keyNew("user/unique/thing",0),KS_END); succeed_if (ksGetCommonParentName(ks, ret, MAX_SIZE) == 0, "could find correct parentname"); succeed_if (strcmp (ret, "") == 0, "parentname not empty"); ksDel (ks); ks = ksNew (10, keyNew("user/unique/thing",0),KS_END); succeed_if (ksGetCommonParentName(ks, ret, MAX_SIZE) > 0, "could find correct parentname"); succeed_if (strcmp (ret, "user/unique/thing") == 0, "parentname not empty"); ksDel (ks); } void test_ksAppend() { int i; printf ("Test appending keys\n"); KeySet *returned = #include "keyset.c" KeySet *testDirectBelow = #include "dbelow.c" KeySet *testReturned = #include "others.c" Key *parentKey[2]; parentKey[0] = keyNew ("user/test/keyset", KEY_END); parentKey[1] = keyNew ("user/test/keyset/dir1", KEY_END); Key *current; /* A real world example out in kdb.c */ for (i=0; i<2; i++) { KeySet *tmp = ksNew(ksGetSize(returned), KS_END); KeySet *keys = ksNew (0); /* add all keys direct below parentKey */ ksRewind (returned); while ((current = ksPop(returned)) != 0) { if (keyIsDirectBelow(parentKey[i], current)) { ksAppendKey(keys, current); } else { ksAppendKey(tmp, current); } } ksAppend (returned, tmp); /* ksOutput (tmp, stdout, KDB_O_HEADER); ksOutput (returned, stdout, KDB_O_HEADER); printf (" ----- keys -------\n"); ksOutput (keys, stdout, KDB_O_HEADER); */ if (!i) { compare_keyset (returned, testReturned, 0, 0); compare_keyset (keys, testDirectBelow, 0, 0); succeed_if (ksGetSize (tmp) == 84, "size not correct"); succeed_if (ksGetSize (returned) == 84, "size not correct"); succeed_if (ksGetSize (keys) == 18, "size not correct"); succeed_if (ksGetAlloc (tmp) == 102, "alloc not correct"); succeed_if (ksGetAlloc (returned) == 128, "alloc not correct"); succeed_if (ksGetAlloc (keys) == 32, "alloc not correct"); } ksAppend (returned, keys); /* add the keys back */ ksDel (tmp); ksDel (keys); } keyDel (parentKey[0]); keyDel (parentKey[1]); ksDel (testReturned); ksDel (testDirectBelow); ksDel (returned); } /**A functional mode to keys. * * Instead of writing your own loop you can write * a function working with a key and pass it to * this method. * * The function will be executed for all keys in * the keyset. * * @param ks the keyset to work with * @param func the function to execute on every key of the keyset * @return the sum of all return values * @return -1 if any function returned -1, the execution will stop there, but * ksCurrent() will tell you where it stopped. * @see ksFilter() */ int ksForEach (KeySet *ks, int (*func) (Key *k)) { int rc = 0; int ret = 0; Key *current; cursor_t cursor = ksGetCursor (ks); ksRewind (ks); while ((current = ksNext (ks)) != 0) { rc = func (current); if (rc == -1) return -1; ret += rc; } ksSetCursor(ks, cursor); return ret; } /**Filter a keyset. * * filter is executed for every key in the keyset result. When it returns 0, * the key will be dropped, when it returns 1 it will be ksAppendKey()ed to result, * when it returns -1 the processing will be stopped. You can use ksCurrent() * on input to see where the problem was. Because of this input is not const, * apart from ksCurrent() the input will not be changed. The keys that have * been in result before will stay untouched. * * @param result is the keyset where keys are added. * @param input is the keyset the filter works on. * @param filter is the function to execute on every key of the keyset to decide if * it should be ksAppendKey()ed to the result. * @return the number of keys added on success * @return 0 when nothing was done * @return -1 when filter returned an error (-1), ksCurrent() of input will * be the problematic key. * @see ksForEach() **/ int ksFilter (KeySet *result, KeySet *input, int (*filter) (Key *k)) { int rc = 0; int ret = 0; Key *current; cursor_t cursor = ksGetCursor (input); ksRewind (input); while ((current = ksNext (input)) != 0) { rc = filter (current); if (rc == -1) return -1; else if (rc != 0) { ++ ret; ksAppendKey(result, keyDup (current)); } } ksSetCursor(input, cursor); return ret; } Key *global_a; int add_string (Key *check) { return keySetString (check, "string"); } int add_comment (Key *check) { return keySetComment (check, "comment"); } int has_a (Key *check) { return keyName(check)[5]=='a'; } int below_a (Key *check) { return keyIsBelow(global_a, check); } int direct_below_a (Key *check) { return keyIsDirectBelow(global_a, check); } int sum_helper (Key *check) { return atoi(keyValue(check)); } int below_30 (Key *check) { return atoi(keyValue(check))<30; } int find_80 (Key *check) { int n=atoi(keyValue(check)); return n>70?-1:1; } void test_ksFunctional() { Key *found; Key *current; KeySet *out; KeySet *ks = ksNew (64, keyNew ("user/a/1", KEY_END), keyNew ("user/a/2", KEY_END), keyNew ("user/a/b/1", KEY_END), keyNew ("user/a/b/2", KEY_END), keyNew ("user/ab/2", KEY_END), keyNew ("user/b/1", KEY_END), keyNew ("user/b/2", KEY_END), KS_END); global_a = keyNew ("user/a", KEY_END); printf ("Test functional style\n"); ksForEach (ks, add_string); ksForEach (ks, add_comment); ksRewind (ks); while ((current = ksNext(ks)) != 0) { succeed_if (strcmp (keyValue (current), "string") == 0, "for each did not add string"); succeed_if (strcmp (keyComment (current), "comment") == 0, "for each did not add comment"); } out = ksNew (0); succeed_if (ksGetSize(ks) == 7, "initial size wrong"); succeed_if (ksGetSize(out) == 0, "initial size wrong"); ksFilter (out, ks, has_a); succeed_if (ksGetSize(out) == 5, "has_a cutted more then the user/b"); ksDel (out); out = ksNew (0); ksFilter (out, ks, below_a); succeed_if (ksGetSize(out) == 4, "below_a cutted more then the user/ab/2"); ksDel (out); out = ksNew (0); ksFilter (out, ks, direct_below_a); succeed_if (ksGetSize(out) == 2, "direct_below_a cutted more then the user/a/b/*"); ksDel (out); ksDel (ks); keyDel (global_a); global_a = 0; KeySet *values = ksNew (64, keyNew ("user/a", KEY_VALUE, "40", KEY_END), keyNew ("user/b", KEY_VALUE, "20", KEY_END), keyNew ("user/c", KEY_VALUE, "80", KEY_END), keyNew ("user/d", KEY_VALUE, "24", KEY_END), keyNew ("user/e", KEY_VALUE, "32", KEY_END), keyNew ("user/f", KEY_VALUE, "12", KEY_END), keyNew ("user/g", KEY_VALUE, "43", KEY_END), KS_END); succeed_if (ksForEach (values, sum_helper) == 251, "could not sum up"); KeySet *values_below_30 = ksNew (0); ksFilter (values_below_30, values, below_30); succeed_if (ksGetSize (values_below_30) == 3, "could not filter out everything above 30"); succeed_if (ksForEach (values_below_30, sum_helper) == 56, "could not sum up"); succeed_if (ksForEach (values, find_80) == -1, "did not find 80"); found = ksCurrent (values); succeed_if (ksLookupByName (values, "user/c", 0) == found, "did not find 80"); /*succeed_if (ksLookupByString (values, "80", 0) == found, "lookup by value did not find 80");*/ ksDel (values); ksDel (values_below_30); } void test_ksLookupPop() { printf ("Test ksLookup with KDB_O_POP\n"); Key * found; Key *a, *b, *c; KeySet *small =ksNew (5, a=keyNew ("user/a", KEY_END), b=keyNew ("user/b", KEY_END), c=keyNew ("user/c", KEY_END), KS_END); ksRewind (small); ksNext(small); succeed_if (ksCurrent(small) == a, "current not set correctly"); succeed_if (ksGetSize(small) == 3, "could not append all keys"); found = ksLookupByName (small, "user/a", KDB_O_POP); succeed_if (found == a, "not correct key"); succeed_if (strcmp (keyName(found), "user/a") == 0, "name not correct in found key"); succeed_if (ksCurrent(small) == 0, "current not set correctly"); succeed_if (keyDel (found) == 0, "could not del popped key"); ksNext(small); ksNext(small); succeed_if (ksCurrent(small) == c, "current not set correctly"); succeed_if (ksGetSize(small) == 2, "could not append all keys"); found = ksLookupByName (small, "user/b", KDB_O_POP); succeed_if (found == b, "not correct key"); succeed_if (strcmp (keyName(found), "user/b") == 0, "name not correct in found key"); succeed_if (ksCurrent(small) == c, "current not set correctly"); succeed_if (keyDel (found) == 0, "could not del popped key"); succeed_if (ksGetSize(small) == 1, "could not append all keys"); found = ksLookupByName (small, "user/b", KDB_O_POP); succeed_if (found == 0, "found something, but shouldnt"); succeed_if (ksCurrent(small) == c, "current not set correctly"); succeed_if (ksGetSize(small) == 1, "could not append all keys"); found = ksLookupByName (small, "user/c", KDB_O_POP); succeed_if (found == c, "not correct key"); succeed_if (strcmp (keyName(found), "user/c") == 0, "name not correct in found key"); succeed_if (ksCurrent(small) == 0, "current not set correctly"); succeed_if (keyDel (found) == 0, "could not del popped key"); succeed_if (ksGetSize(small) == 0, "could not append all keys"); found = ksLookupByName (small, "user/d", KDB_O_POP); succeed_if (found == 0, "found something, but shouldnt"); succeed_if (ksCurrent(small) == 0, "current not set correctly"); ksDel (small); KeySet *ks= ksNew(0); succeed_if (ksNeedSort (ks) == 1, "sort state not correct"); ksAppendKey(ks, keyNew("user/domain/key", KEY_VALUE, "domainvalue", KEY_OWNER, "markus", KEY_END)); ksAppendKey(ks, keyNew("user/single/key", KEY_VALUE, "singlevalue", KEY_END)); ksAppendKey(ks, keyNew("user/named/key", KEY_VALUE, "myvalue", KEY_END)); ksAppendKey(ks, keyNew("system/named/key", KEY_VALUE, "syskey", KEY_END)); ksAppendKey(ks, keyNew("system/sysonly/key", KEY_VALUE, "sysonlykey", KEY_END)); ksAppendKey(ks, keyNew("user/named/bin", KEY_TYPE, KEY_TYPE_BINARY, KEY_SIZE, 10, KEY_VALUE, "binary\1\2data", KEY_END)); ksAppendKey(ks, keyNew("system/named/bin", KEY_TYPE, KEY_TYPE_BINARY, KEY_SIZE, 10, KEY_VALUE, "sys\1bin\2", KEY_END)); ksAppendKey(ks, keyNew("system/named/key", KEY_TYPE, KEY_TYPE_BINARY, KEY_SIZE, 10, KEY_VALUE, "syskey", KEY_END)); succeed_if (ksGetSize(ks) == 8, "could not append all keys"); succeed_if (ksNeedSort (ks) == 1, "sort state not correct"); // a positive testcase found = ksLookupByName (ks, "user/named/key", KDB_O_POP); succeed_if (ksGetSize(ks) == 7, "did not pop key"); succeed_if (ksCurrent(ks) == 0, "current not set correctly"); succeed_if (ksNeedSort (ks) == 0, "sort state not correct"); ksAppendKey(ks, keyNew("user/single/key", KEY_VALUE, "singlevalue", KEY_END)); succeed_if (ksGetSize(ks) == 8, "did not pop key"); succeed_if (ksNeedSort (ks) == 1, "sort state not correct"); succeed_if (found != 0, "did not found correct name"); succeed_if (ksCurrent(ks) == 0, "current not set correctly"); succeed_if (strcmp (keyName(found), "user/named/key") == 0, "name not correct in found key"); succeed_if (strcmp (keyValue(found), "myvalue") == 0, "not correct value in found key"); succeed_if (keyDel (found) == 0, "could not del popped key"); // here you can't find the keys succeed_if (ksLookupByName (ks, "named/key", KDB_O_POP) == 0, "not valid keyname"); succeed_if (ksNeedSort (ks) == 0, "sort state not correct"); succeed_if (ksLookupByName (ks, "u/named/key", KDB_O_POP) == 0, "not valid keyname"); succeed_if (ksLookupByName (ks, "usea/named/key", KDB_O_POP) == 0, "not valid keyname"); succeed_if (ksLookupByName (ks, " user/named/key", KDB_O_POP) == 0, "found key with bad prefix"); succeed_if (ksLookupByName (ks, "user/named/Key", KDB_O_POP) == 0, "found wrong case key"); succeed_if (ksLookupByName (ks, "User/Named/key", KDB_O_POP) == 0, "found wrong case key"); succeed_if (ksLookupByName (ks, "User/named/key", KDB_O_POP) == 0, "found wrong case key"); succeed_if (ksLookupByName (ks, "user/NAMED/key", KDB_O_POP) == 0, "found wrong case key"); succeed_if (ksLookupByName (ks, "USER/NAMED/KEY", KDB_O_POP) == 0, "found wrong case key"); succeed_if (ksLookupByName (ks, "user/named/keys", KDB_O_POP) == 0, "wrong postfix"); succeed_if (ksLookupByName (ks, "user/named/key_", KDB_O_POP) == 0, "wrong postfix"); succeed_if (ksLookupByName (ks, "user/named/k/ey", KDB_O_POP) == 0, "seperation that should be"); succeed_if (ksLookupByName (ks, "user/na/med/key", KDB_O_POP) == 0, "seperation that should be"); succeed_if (ksLookupByName (ks, "system/domain/key", KDB_O_POP) == 0, "found key in wrong domain"); //now try to find them, and compare value found = ksLookupByName (ks, "user/domain/key", KDB_O_POP); succeed_if (ksGetSize(ks) == 7, "did not pop key"); succeed_if (ksCurrent(ks) == 0, "current not set correctly"); succeed_if (found != 0, "did not found correct name"); succeed_if (strcmp (keyName(found), "user/domain/key") == 0, "name not correct in found key"); succeed_if (strcmp (keyValue(found), "domainvalue") == 0, "not correct value in found key"); succeed_if (keyDel (found) == 0, "could not del popped key"); found = ksLookupByName (ks, "user/single/key", KDB_O_POP); succeed_if (ksGetSize(ks) == 6, "did not pop key"); succeed_if (ksCurrent(ks) == 0, "current not set correctly"); succeed_if (found != 0, "did not found correct name"); succeed_if (strcmp (keyName(found), "user/single/key") == 0, "name not correct in found key"); succeed_if (strcmp (keyValue(found), "singlevalue") == 0, "not correct value in found key"); succeed_if (keyDel (found) == 0, "could not del popped key"); found = ksLookupByName (ks, "system/named/key", KDB_O_POP); succeed_if (ksGetSize(ks) == 5, "did not pop key"); succeed_if (ksCurrent(ks) == 0, "current not set correctly"); succeed_if (found != 0, "did not found correct name"); succeed_if (strcmp (keyName(found), "system/named/key") == 0, "name not correct in found key"); succeed_if (strcmp (keyValue(found), "syskey") == 0, "not correct value in found key"); succeed_if (keyDel (found) == 0, "could not del popped key"); found = ksLookupByName (ks, "user/named/bin", KDB_O_POP); succeed_if (ksGetSize(ks) == 4, "pop key"); succeed_if (ksCurrent(ks) == 0, "current not set correctly"); succeed_if (found != 0, "did not found correct name"); succeed_if (strcmp (keyName(found), "user/named/bin") == 0, "name not correct in found key"); succeed_if (strncmp (keyValue(found), "binary\1\2data",10) == 0, "not correct value in found key"); succeed_if (keyDel (found) == 0, "could not del popped key"); found = ksLookupByName (ks, "user/named/key", KDB_O_POP); succeed_if (ksGetSize(ks) == 4, "did not pop key"); succeed_if (ksCurrent(ks) == 0, "current not set correctly"); succeed_if (found == 0, "could find same key again"); printf ("Test nocase lookup functions\n"); found = ksLookupByName (ks, "user/named/key", KDB_O_NOCASE | KDB_O_POP); succeed_if (ksGetSize(ks) == 4, "key"); succeed_if (ksCurrent(ks) == 0, "current not set correctly"); succeed_if (found == 0, "could find same key again, nocase"); ksAppendKey(ks, keyNew("user/named/key", KEY_VALUE, "myvalue", KEY_END)); found = ksLookupByName (ks, "user/NameD/KeY", KDB_O_NOCASE | KDB_O_POP); succeed_if (ksGetSize(ks) == 4, "did not pop key"); succeed_if (found != 0, "could not find same key again, nocase used"); succeed_if (ksCurrent(ks) == 0, "current not set correctly"); succeed_if (strcmp (keyName(found), "user/named/key") == 0, "name not correct in found key"); succeed_if (strcmp (keyValue(found), "myvalue") == 0, "not correct value in found key"); succeed_if (keyDel (found) == 0, "could not del popped key"); ksAppendKey(ks, keyNew("user/named/key", KEY_VALUE, "myvalue", KEY_END)); found = ksLookupByName (ks, "user/NameD/KEY", KDB_O_NOCASE | KDB_O_POP); succeed_if (ksGetSize(ks) == 4, "did not pop key"); succeed_if (found != 0, "could not find same key again, nocase used"); succeed_if (ksCurrent(ks) == 0, "current not set correctly"); succeed_if (strcmp (keyName(found), "user/named/key") == 0, "name not correct in found key"); succeed_if (strcmp (keyValue(found), "myvalue") == 0, "not correct value in found key"); succeed_if (keyDel (found) == 0, "could not del popped key"); ksAppendKey(ks, keyNew("user/named/key", KEY_VALUE, "myvalue", KEY_END)); printf ("Test cascading lookup functions\n"); found = ksLookupByName (ks, "/named/key", KDB_O_POP); succeed_if (ksGetSize(ks) == 4, "did not pop key"); succeed_if (ksCurrent(ks) == 0, "current not set correctly"); succeed_if (found != 0, "cascading search failed"); succeed_if (strcmp (keyName(found), "user/named/key") == 0, "name not correct in found key"); succeed_if (strcmp (keyValue(found), "myvalue") == 0, "not correct value in found key"); succeed_if (keyDel (found) == 0, "could not del popped key"); found = ksLookupByName (ks, "/single/Key", KDB_O_NOCASE | KDB_O_POP); succeed_if (ksGetSize(ks) == 3, "did not pop key"); succeed_if (ksCurrent(ks) == 0, "current not set correctly"); succeed_if (found != 0, "could not find same key again, nocase used"); succeed_if (strcmp (keyName(found), "user/single/key") == 0, "name not correct in found key"); succeed_if (strcmp (keyValue(found), "singlevalue") == 0, "not correct value in found key"); succeed_if (keyDel (found) == 0, "could not del popped key"); found = ksLookupByName (ks, "/sysonly/key", KDB_O_POP); succeed_if (ksCurrent(ks) == 0, "current not set correctly"); succeed_if (ksGetSize(ks) == 2, "did not pop key"); succeed_if (found != 0, "could not find same key again, nocase used"); succeed_if (strcmp (keyName(found), "system/sysonly/key") == 0, "name not correct in found key"); succeed_if (strcmp (keyValue(found), "sysonlykey") == 0, "not correct value in found key"); succeed_if (keyDel (found) == 0, "could not del popped key"); succeed_if (ksLookupByName (ks, "/named/", KDB_O_POP) == 0, "found part of key with cascading"); succeed_if (ksLookupByName (ks, "/named/keyd", KDB_O_POP) == 0, "found part of key with cascading, bad postfix"); ksAppendKey(ks, keyNew("user:markus/domain/key", KEY_VALUE, "domainvalue", KEY_END)); printf ("Test domain lookup functions\n"); found = ksLookupByName (ks, "user:markus/domain/key", KDB_O_WITHOWNER | KDB_O_POP); succeed_if (ksCurrent(ks) == 0, "current not set correctly"); succeed_if (ksGetSize(ks) == 2, "did not pop key"); succeed_if (found != 0, "could not find domain key"); succeed_if (strcmp (keyValue(found), "domainvalue") == 0, "not correct value in domain key"); succeed_if (ksLookupByName (ks, "user:hugo/domain/key", KDB_O_WITHOWNER | KDB_O_POP) == 0, "found key in wrong domain"); succeed_if (ksLookupByName (ks, "user:y/domain/key", KDB_O_WITHOWNER | KDB_O_POP) == 0, "found key in wrong domain"); succeed_if (ksLookupByName (ks, "user:markuss/domain/key", KDB_O_WITHOWNER | KDB_O_POP) == 0, "found key in wrong domain"); succeed_if (ksLookupByName (ks, "user:marku/domain/key", KDB_O_WITHOWNER | KDB_O_POP) == 0, "found key in wrong domain"); succeed_if (ksGetSize(ks) == 2, "did not pop key"); succeed_if (keyDel (found) == 0, "could not del popped key"); ksDel(ks); } int main() { printf("KEYSET TESTS\n"); printf("==================\n\n"); init (); test_ksNew(); test_ksEmpty(); test_ksReference(); test_ksDup(); test_ksCopy(); test_ksResize(); test_ksIterate(); test_ksCursor(); test_ksSort(); test_ksLookup(); test_ksLookupByName(); test_ksLookupName(); test_ksLookupNameRemove(); test_ksLookupNameAll(); /*test_ksLookupValue();*/ test_ksExample(); test_ksCommonParentName(); test_ksAppend(); test_ksFunctional(); test_ksLookupPop(); printf("\ntest_ks RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError); return nbError; } elektra-0.7.1/tests/test_mount.c0000644000076400001440000003162511365506635013617 00000000000000/*************************************************************************** * test_mount.c - Test suite for testing backend mounting * ------------------- * begin : Thu Nov 6 2007 * copyright : (C) 2007 by Patrick Sabin * email : patricksabin@gmx.at ****************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STRING_H #include #endif #include KeySet *get_hosts () { return ksNew( 25 , keyNew ("user/tests/hosts" , KEY_DIR , KEY_TYPE, 0 , KEY_END), keyNew ("user/tests/hosts/gateway.markus-raab.org" , KEY_DIR , KEY_VALUE, "192.168.0.1" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/tests/hosts/gateway.markus-raab.org/alias00" , KEY_VALUE, "gateway" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/tests/hosts/gateway.markus-raab.org/alias01" , KEY_VALUE, "gw" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/tests/hosts/home.markus-raab.org" , KEY_DIR , KEY_VALUE, "81.52.51.112" , KEY_COMMENT, "comment" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/tests/hosts/home.markus-raab.org/alias00" , KEY_VALUE, "home" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/tests/hosts/kirabyte.markus-raab.org" , KEY_DIR , KEY_VALUE, "192.168.0.5" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/tests/hosts/kirabyte.markus-raab.org/alias00" , KEY_VALUE, "kirabyte" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/tests/hosts/kirabyte.markus-raab.org/alias01" , KEY_VALUE, "kira" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/tests/hosts/kirabyte.markus-raab.org/alias02" , KEY_VALUE, "k" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/tests/hosts/localhost" , KEY_VALUE, "127.0.0.1" , KEY_COMMENT, "will lose that comment" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/tests/hosts/markusbyte" , KEY_DIR , KEY_VALUE, "192.168.0.3" , KEY_COMMENT, "this is my home" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/tests/hosts/markusbyte/alias00" , KEY_VALUE, "markus" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/tests/hosts/printer" , KEY_VALUE, "192.168.1.5" , KEY_COMMENT, " thats for dynamic cups printing" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/tests/hosts/superbyte" , KEY_VALUE, "192.168.0.2" , KEY_COMMENT, " my server at home!" , KEY_TYPE, KEY_TYPE_STRING , KEY_END),KS_END); } #define BUFFER_SIZE 256 void test_failhosts(const char * file) { KeySet *ks = ksNew( 25 , keyNew ("user/tests/hosts" , KEY_DIR , KEY_TYPE, 0 , KEY_END), keyNew ("user/tests/hosts/gateway.markus-raab.org" , KEY_DIR , KEY_VALUE, "192.168.0.1" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/tests/hosts/gateway.markus-raab.org/ERROR/DEEP" , KEY_VALUE, "errorvalue" , KEY_TYPE, KEY_TYPE_STRING , KEY_END), keyNew ("user/tests/hosts/superbyte" , KEY_VALUE, "192.168.0.2" , KEY_COMMENT, " my server at home!" , KEY_TYPE, KEY_TYPE_STRING , KEY_END),KS_END); KDB *kdb = kdbOpen(); Key *mnt; KeySet *conf; printf("Test fail writehosts\n"); succeed_if (kdbMount(kdb,mnt=keyNew("user/tests/hosts",KEY_VALUE,"hosts", KEY_END), conf=ksNew (2,keyNew("system/path", KEY_VALUE, file, KEY_END), KS_END)) == 0, "could not mount hosts"); succeed_if (kdbSet(kdb,ks,keyNew("user/tests/hosts",KEY_END),KDB_O_DEL) == -1, "setting keys did not fail"); /*keyOutput (ksCurrent(ks), stdout, KEY_VALUE|KEY_COMMENT);*/ succeed_if (strcmp(keyName(ksCurrent(ks)), "user/tests/hosts/gateway.markus-raab.org/ERROR/DEEP") == 0, "name not equal"); succeed_if (strcmp(keyValue(ksCurrent(ks)), "errorvalue") == 0, "value not equal"); succeed_if (!keyIsDir (ksCurrent(ks)), "key is a directory"); succeed_if (keyIsString (ksCurrent(ks)), "key is not a string"); succeed_if (keyGetType(ksCurrent(ks)) == KEY_TYPE_STRING, "key is not exactly a string"); ksDel (conf); keyDel(mnt); /* ksOutput (ks, stdout, 0); ksGenerate (ks, stdout, 0); */ ksDel (ks); kdbClose (kdb); } void test_readhosts(const char * file) { char *keys[]={ "user/tests/hosts/markusbyte", "user/tests/hosts/printer", "user/tests/hosts/superbyte"}; KDB *kdb = kdbOpen(); Key *mnt; Key *key; KeySet *ks=ksNew(0); KeySet *conf; KeySet *hosts_ks = get_hosts(); char buffer[BUFFER_SIZE+1]; int i, c; printf("Test mount readhosts\n"); succeed_if (kdbMount(kdb,mnt=keyNew("user/tests/hosts",KEY_VALUE,"hosts", KEY_END), conf=ksNew (2,keyNew("system/path", KEY_VALUE, file, KEY_END), KS_END)) == 0, "could not mount hosts"); succeed_if (kdbGet(kdb,ks,keyNew("user/tests/hosts",KEY_END),KDB_O_DEL) == 15, "could not get keys"); /* ksGenerate (hosts_ks, stdout, KDB_O_HEADER); ksGenerate (ks, stdout, KDB_O_HEADER); */ compare_keyset (hosts_ks, ks, 0, 0); key = keyNew ("user/tests/hosts/gateway.markus-raab.org", KEY_END); succeed_if (kdbGetKey (kdb, key) == 0, "could not get single key"); succeed_if (strcmp(keyName(key), "user/tests/hosts/gateway.markus-raab.org") == 0, "name not equal"); succeed_if (strcmp(keyValue(key), "192.168.0.1") == 0, "value not equal"); succeed_if (keyIsDir (key), "key is not a directory"); succeed_if (keyIsString (key), "key is not a string"); succeed_if (keyGetType(key) == KEY_TYPE_STRING, "key is not exactly a string"); keyDel (key); key = keyNew ("user/tests/hosts/kirabyte.markus-raab.org/alias01", KEY_END); succeed_if (kdbGetKey (kdb, key) == 0, "could not get single key"); succeed_if (strcmp(keyName(key), "user/tests/hosts/kirabyte.markus-raab.org/alias01") == 0, "name not equal"); succeed_if (strcmp(keyValue(key), "kira") == 0, "value not equal"); succeed_if (!keyIsDir (key), "key is a directory"); succeed_if (keyIsString (key), "key is not a string"); succeed_if (keyGetType(key) == KEY_TYPE_STRING, "key is not exactly a string"); keyDel (key); key = keyNew ("user/tests/hosts/localhost", KEY_END); succeed_if (kdbGetKey (kdb, key) == 0, "could not get single key"); succeed_if (strcmp(keyName(key), "user/tests/hosts/localhost") == 0, "name not equal"); succeed_if (strcmp(keyValue(key), "127.0.0.1") == 0, "value not equal"); succeed_if (strcmp(keyComment(key), "will lose that comment") == 0, "comment not equal"); succeed_if (!keyIsDir (key), "key is a directory"); succeed_if (keyIsString (key), "key is not a string"); succeed_if (keyGetType(key) == KEY_TYPE_STRING, "key is not exactly a string"); keyDel (key); succeed_if (kdbGetString (kdb, "user/tests/hosts/localhost", buffer, BUFFER_SIZE) != -1, "could not get value"); succeed_if (strcmp (buffer, "127.0.0.1") == 0, "value not correct"); for (c=0; c<3; c++) { succeed_if (kdbGetString(kdb,keys[c],buffer,sizeof(buffer)) != -1, "could not GetString"); switch (c) { case 0: succeed_if (strcmp(buffer, "192.168.0.3") == 0, "value not correct"); break; case 1: succeed_if (strcmp(buffer, "192.168.1.5") == 0, "value not correct"); break; case 2: succeed_if (strcmp(buffer, "192.168.0.2") == 0, "value not correct"); break; default:succeed_if (0, "default branch"); } } for (i=0; i< BUFFER_SIZE; i++) buffer[i] = 0; succeed_if (kdbGetString (kdb, "user/tests/hosts/localhost", buffer, 3) == -1, "could get value"); /*succeed_if (errno == KDB_ERR_TRUNC, "error not correct");*/ /*printf ("%s\n", buffer);*/ succeed_if (strcmp (buffer, "") == 0, "value not correct"); ksDel (conf); keyDel(mnt); /*ksOutput (ks, stdout, 0); ksGenerate (ks, stdout, 0);*/ ksDel (hosts_ks); ksDel (ks); kdbClose (kdb); } void test_writehosts(const char *file) { KDB *kdb = kdbOpen(); Key *mnt; KeySet *conf; KeySet *ks = get_hosts(); printf("Test mount writehosts\n"); succeed_if (kdbMount(kdb,mnt=keyNew("user/tests/hosts",KEY_VALUE,"hosts", KEY_END), conf=ksNew (2,keyNew("system/path", KEY_VALUE, file, KEY_END), KS_END)) == 0, "could not mount hosts"); succeed_if (kdbSet(kdb,ks,keyNew("user/tests/hosts",KEY_END),KDB_O_DEL) == 15, "could not set keys"); ksDel (conf); keyDel(mnt); /*ksOutput (ks, stdout, 0); ksGenerate (ks, stdout, 0);*/ ksDel (ks); kdbClose (kdb); } void test_passwd(const char *file) { KDB *kdb = kdbOpen(); KeySet *ks; printf("Test mount passwd\n"); /* get passwd*/ printf("=====TEST passwd backend ====\n"); ks=ksNew(0); kdbGet(kdb,ks,keyNew("system/users",KEY_END),KDB_O_DEL); /* ksOutput(ks, stdout, 0); */ ksDel(ks); ks=ksNew(0); kdbGet(kdb,ks,keyNew("system/users/patrick",KEY_END),KDB_O_DEL); /* ksOutput(ks,stdout, 0); */ ksDel(ks); kdbClose (kdb); } void test_readfstab(const char *file) { KDB *kdb = kdbOpen(); KeySet *ks; KeySet *conf; Key* mnt; printf("Test mount readfstab\n"); succeed_if (kdbMount (kdb, mnt=keyNew("user/tests/filesystems",KEY_VALUE, "fstab", KEY_END), conf=ksNew (2,keyNew("system/path", KEY_VALUE, file, KEY_END), KS_END)) == 0, "could not mount fstab"); keyDel(mnt); ksDel (conf); ks=ksNew(0); int i; succeed_if ((i=kdbGet(kdb,ks,keyNew("user/tests/filesystems",KEY_END),KDB_O_DEL)) == 15, "could not get keys"); /* printf ("%d", i); ksOutput (ks, stdout, 0); ksGenerate (ks,stdout, 0); */ Key *key = ksLookupByName(ks, "user/tests/filesystems/rootfs/device",0); succeed_if (key, "rootfs device not found"); succeed_if (strcmp( "/dev/sda6", keyValue(key)) == 0, "rootfs device not correct"); ksDel (ks); kdbClose (kdb); } void test_writefstab(const char * file) { KDB *kdb = kdbOpen(); KeySet *ks; KeySet *conf; Key* mnt; FILE *fstab_writer = fopen (file, "w"); fprintf (fstab_writer, "\n"); /* make empty */ fclose (fstab_writer); printf("Test mount writefstab\n"); succeed_if (kdbMount (kdb, mnt=keyNew("user/tests/filesystems",KEY_VALUE, "fstab", KEY_END), conf=ksNew (2,keyNew("system/path", KEY_VALUE, file, KEY_END), KS_END)) == 0, "could not mount fstab"); keyDel(mnt); ksDel (conf); ks = ksNew( 22 , keyNew ("user/tests/filesystems" , KEY_VALUE, "filesystems" , KEY_COMMENT, "" , KEY_END), keyNew ("user/tests/filesystems/rootfs" , KEY_VALUE, "non-rootfs" , KEY_COMMENT, "pseudo name" , KEY_END), keyNew ("user/tests/filesystems/rootfs/device" , KEY_VALUE, "/dev/sda6" , KEY_COMMENT, "Device or Label" , KEY_END), keyNew ("user/tests/filesystems/rootfs/dumpfreq" , KEY_VALUE, "0" , KEY_COMMENT, "Dump frequency in days" , KEY_END), keyNew ("user/tests/filesystems/rootfs/mpoint" , KEY_VALUE, "/" , KEY_COMMENT, "Moint point" , KEY_END), keyNew ("user/tests/filesystems/rootfs/options" , KEY_VALUE, "defaults,errors=remount-ro" , KEY_COMMENT, "Fileuser/tests specific options. See mount(8)" , KEY_END), keyNew ("user/tests/filesystems/rootfs/passno" , KEY_VALUE, "1" , KEY_COMMENT, "Pass number on parallel fsck" , KEY_END), keyNew ("user/tests/filesystems/rootfs/type" , KEY_VALUE, "jfs" , KEY_COMMENT, "Fileuser/tests type. See fs(5)" , KEY_END), keyNew ("user/tests/filesystems/swap00" , KEY_VALUE, "non-swapfs" , KEY_COMMENT, "pseudo name" , KEY_END), keyNew ("user/tests/filesystems/swap00/device" , KEY_VALUE, "/dev/sda10" , KEY_COMMENT, "Device or Label" , KEY_END), keyNew ("user/tests/filesystems/swap00/dumpfreq" , KEY_VALUE, "0" , KEY_COMMENT, "Dump frequency in days" , KEY_END), keyNew ("user/tests/filesystems/swap00/mpoint" , KEY_VALUE, "none" , KEY_COMMENT, "Moint point" , KEY_END), keyNew ("user/tests/filesystems/swap00/options" , KEY_VALUE, "sw" , KEY_COMMENT, "Fileuser/tests specific options. See mount(8)" , KEY_END), keyNew ("user/tests/filesystems/swap00/passno" , KEY_VALUE, "0" , KEY_COMMENT, "Pass number on parallel fsck" , KEY_END), keyNew ("user/tests/filesystems/swap00/type" , KEY_VALUE, "swap" , KEY_COMMENT, "Fileuser/tests type. See fs(5)" , KEY_END), KS_END); succeed_if (kdbSet (kdb, ks, keyNew ("user/tests/filesystems",0) ,KDB_O_DEL) == 15, "could not set keys"); /*printf ("%d\n", kdbSet (kdb, ks, keyNew ("user/tests/filesystems",0) ,KDB_O_DEL));*/ ksDel (ks); kdbClose (kdb); } int main() { printf("MOUNT TESTS\n"); printf("==================\n\n"); init (); test_writehosts(".kdb/hosts_mount"); test_readhosts(".kdb/hosts_mount"); // test_failhosts(".kdb/hosts_mount"); // test_writefstab(".kdb/fstab_mount"); // test_readfstab(".kdb/fstab_mount"); // test_passwd(); printf("\ntest_mount RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError); return nbError; } elektra-0.7.1/tests/test_script.sh0000755000076400001440000000475211365506635014155 00000000000000#!/bin/sh #test_script.sh #shell test suite for kdb command #variables nbError=0 nbTest=0 if [ "z$srcdir" = 'z' ]; then HOME=. else HOME=$srcdir fi export HOME VALUE="value" ROOT="user/tests/script" FILE="$HOME/.kdb/$ROOT/value" DIR="$HOME/.kdb/$ROOT" USER="`id -un`" GROUP="`id -gn`" DATE="`date \"+%b %d %H:%M\"`" export KDB_DIR=".kdb" #define succeed_if(x,y) nbTest++; if (!(x)) { nbError++; printf("%s:%d: error in %s: %s\n", __FILE__, __LINE__, __FUNCTION__, y);} #succeed if the previous command was successful succeed_if () { if [ $? != "0" ] then nbError=$(( $nbError + 1 )) echo error: $* fi nbTest=$(( $nbTest + 1 )) } #define exit_if_fail(x,y) nbTest++; if (!(x)) { printf("%s:%d: fatal in %s: %s\n", __FILE__, __LINE__, __FUNCTION__, y); exit(1); } #fails and exits the program if the previous command failed exit_if_fail () { if [ $? != "0" ] then echo fatal: $* exit 1 fi nbTest=$(( $nbTest + 1 )) } echo echo ELEKTRA SCRIPTS TESTS echo echo "testing set and get keys" kdb -m "775" set $ROOT exit_if_fail "could not set root" [ -d "$DIR" ] succeed_if "Directory not existing" kdb set "$ROOT/value" "$VALUE" exit_if_fail "could not set value" [ -f "$FILE" ] succeed_if "File not existing" #echo "testing ls subcommand" #[ "x`kdb ls $ROOT 2> /dev/null`" = "x$ROOT/value" ] #succeed_if "cant ls $ROOT (may mean that $ROOT folder is not clean)" #[ "x`kdb get $ROOT/value 2> /dev/null`" = "x$VALUE" ] #exit_if_fail "cant get $ROOT/value" #[ "x`kdb get -f $ROOT/value 2> /dev/null`" = "x$VALUE" ] #succeed_if "-f option" #[ "x`kdb get -d $ROOT/value 2> /dev/null`" = "x$ROOT/value=$VALUE" ] #succeed_if "-d option" #[ "x`kdb get -l $ROOT/value 2> /dev/null`" = "x$ROOT/value=$VALUE" ] #succeed_if "-l option" #[ "x`kdb get -s $ROOT/value 2> /dev/null`" = "xvalue=\"$VALUE\"" ] #succeed_if "-s option" kdb rm $ROOT/value succeed_if "can remove user/test/value" [ ! -f "$FILE" ] succeed_if "File yet existing after delete" kdb rm $ROOT [ ! -d "$DIR" ] succeed_if "Directory yet existing after delete" ############# # xml tests ############# echo "testing xml importing and exporting" kdb import fstab.xml succeed_if "importing fstab.xml failed" kdb export user/tests/fstab > fstab-gen.xml succeed_if "exporting user/tests/fstab failed" diff fstab-gen.xml fstab-cmp.xml succeed_if "xml files are not the same" rm fstab-gen.xml succeed_if "could not rm key-gen.xml" kdb rm -r user/tests/fstab echo test_script.sh RESULTS: $nbTest "test(s)" done $nbError "error(s)". #exit $nbError elektra-0.7.1/tests/test_serialize.c0000644000076400001440000001026211365506635014436 00000000000000/*************************************************************************** * test_serialize.c - serializing test suite * ------------------- * begin : Mon 26 Nov 2007 * copyright : (C) 2007 by Markus Raab * email : elektra@markus-raab.org ****************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STRING_H #include #endif #include #define MAX_SIZE 1000 void output_serialize (void* data, size_t length) { size_t i; for (i=0; i #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STRING_H #include #endif #include /*Needs private declarations*/ #include void test_create() { Split *split; split = malloc (sizeof (Split)); split->keysets = 0; split->handles = 0; init_splitted_keysets (split); printf ("Test create and resize split\n"); succeed_if (split->keysets, "did not alloc keysets array"); succeed_if (split->handles, "did not alloc handles array"); resize_splitted_keysets (split); split->keysets[0] = ksNew(0); succeed_if (split->no == 1, "resize not correct"); resize_splitted_keysets (split); split->keysets[1] = ksNew(0); succeed_if (split->no == 2, "resize not correct"); resize_splitted_keysets (split); split->keysets[2] = ksNew(0); succeed_if (split->no == 3, "resize not correct"); free_splitted_keysets (split); } void test_emptysplit() { KDB *handle = kdbOpen(); KeySet *ks = ksNew (0); Key *parentKey = 0; unsigned long options = 0; Split *split = split_keyset (handle, ks, parentKey, options); printf ("Test empty split\n"); succeed_if (split->no == 0, "empty requires no data"); succeed_if (split->keysets, "did not alloc keysets array"); succeed_if (split->handles, "did not alloc handles array"); free_splitted_keysets (split); ksDel (ks); kdbClose (handle); } void test_easysplit() { KDB *handle = kdbOpen(); KeySet *ks = ksNew ( 3, keyNew ("user/valid/key1", KEY_END), keyNew ("user/valid/key2", KEY_END), KS_END); Key *parentKey = 0; unsigned long options = 0; Split *split = split_keyset (handle, ks, parentKey, options); printf ("Test easy split\n"); succeed_if (split->keysets, "did not alloc keysets array"); succeed_if (split->handles, "did not alloc handles array"); succeed_if (split->no == 1, "everything is in one keyset"); compare_keyset (split->keysets[0], ks, 0, 0); free_splitted_keysets (split); ksDel (ks); kdbClose (handle); } void test_singlesplit() { KDB *handle = kdbOpen(); KeySet *ks = ksNew ( 3, keyNew ("user/valid/key", KEY_END), KS_END); Key *parentKey = 0; unsigned long options = 0; Split *split = split_keyset (handle, ks, parentKey, options); printf ("Test single split\n"); succeed_if (split->keysets, "did not alloc keysets array"); succeed_if (split->handles, "did not alloc handles array"); succeed_if (split->no == 1, "everything is in one keyset"); compare_keyset (split->keysets[0], ks, 0, 0); free_splitted_keysets (split); ksDel (ks); kdbClose (handle); } void test_mount() { KDB *handle = kdbOpen(); KeySet *ks = ksNew ( 5, keyNew ("user/valid/key1", KEY_END), keyNew ("user/valid/key2", KEY_END), keyNew ("system/valid/key1", KEY_END), keyNew ("system/valid/key2", KEY_END), KS_END); KeySet *split1 = ksNew ( 3, keyNew ("user/valid/key1", KEY_END), keyNew ("user/valid/key2", KEY_END), KS_END); KeySet *split2 = ksNew ( 3, keyNew ("system/valid/key1", KEY_END), keyNew ("system/valid/key2", KEY_END), KS_END); Key *parentKey = 0; unsigned long options = 0; Key *mnt; KeySet *config; Split *split; kdbMount (handle, mnt=keyNew ("user", KEY_VALUE, "filesys", KEY_END), config=ksNew(0)); keyDel (mnt); ksDel (config); kdbMount (handle, mnt=keyNew ("system", KEY_VALUE, "filesys", KEY_END), config=ksNew(0)); keyDel (mnt); ksDel (config); split = split_keyset (handle, ks, parentKey, options); /*ksOutput (split->keysets[0], stdout, KDB_O_HEADER);*/ printf ("Test mount split\n"); succeed_if (split->keysets, "did not alloc keysets array"); succeed_if (split->handles, "did not alloc handles array"); succeed_if (split->syncbits[0] == 1, "user part need to by synced"); succeed_if (split->syncbits[1] == 1, "system part need to by synced"); succeed_if (split->no == 2, "not splitted according user, system"); succeed_if (compare_keyset (split->keysets[0], split1, 0, 0) == 0, "user keyset not correct"); succeed_if (compare_keyset (split->keysets[1], split2, 0, 0) == 0, "system keyset not correct"); free_splitted_keysets (split); ksDel (ks); ksDel (split1); ksDel (split2); kdbClose (handle); } void test_optimize() { KDB *handle = kdbOpen(); KeySet *ks = ksNew ( 5, keyNew ("user/valid/key1", KEY_END), keyNew ("user/valid/key2", KEY_END), keyNew ("system/valid/key1", KEY_END), keyNew ("system/valid/key2", KEY_END), KS_END); KeySet *split1 = ksNew ( 3, keyNew ("user/valid/key1", KEY_END), keyNew ("user/valid/key2", KEY_END), KS_END); KeySet *split2 = ksNew ( 3, keyNew ("system/valid/key1", KEY_END), keyNew ("system/valid/key2", KEY_END), KS_END); Key *parentKey = 0; unsigned long options = 0; Key *mnt; KeySet *config; Split *split; Key *key; kdbMount (handle, mnt=keyNew ("user", KEY_VALUE, "filesys", KEY_END), config=ksNew(0)); keyDel (mnt); ksDel (config); kdbMount (handle, mnt=keyNew ("system", KEY_VALUE, "filesys", KEY_END), config=ksNew(0)); keyDel (mnt); ksDel (config); ksRewind (ks); while ((key = ksNext(ks)) != 0) { if (keyIsUser(key) == 1) key->flags &= ~KEY_FLAG_SYNC; } split = split_keyset (handle, ks, parentKey, options); printf ("Test optimization split\n"); succeed_if (split->keysets, "did not alloc keysets array"); succeed_if (split->handles, "did not alloc handles array"); succeed_if (split->no == 2, "not splitted according user, system"); succeed_if (split->syncbits[0] == 0, "user part need to by synced"); succeed_if (split->syncbits[1] == 1, "system part not optimized"); succeed_if (compare_keyset (split->keysets[0], split1, 0, 0) == 0, "user keyset not correct"); succeed_if (compare_keyset (split->keysets[1], split2, 0, 0) == 0, "system keyset not correct"); free_splitted_keysets (split); ksRewind (ks); while ((key = ksNext(ks)) != 0) { key->flags = 0; } split = split_keyset (handle, ks, parentKey, options); succeed_if (split->keysets, "did not alloc keysets array"); succeed_if (split->handles, "did not alloc handles array"); succeed_if (split->no == 2, "not splitted according user, system"); succeed_if (split->syncbits[0] == 0, "user part not optimized"); succeed_if (split->syncbits[1] == 0, "system part not optimized"); succeed_if (compare_keyset (split->keysets[0], split1, 0, 0) == 0, "user keyset not correct"); succeed_if (compare_keyset (split->keysets[1], split2, 0, 0) == 0, "system keyset not correct"); options = KDB_O_SYNC; free_splitted_keysets (split); split = split_keyset (handle, ks, parentKey, options); succeed_if (split->keysets, "did not alloc keysets array"); succeed_if (split->handles, "did not alloc handles array"); succeed_if (split->no == 2, "not splitted according user, system"); succeed_if (split->syncbits[0] == 1, "user part ignoresync"); succeed_if (split->syncbits[1] == 1, "system part ignoresync"); succeed_if (compare_keyset (split->keysets[0], split1, 0, 0) == 0, "user keyset not correct"); succeed_if (compare_keyset (split->keysets[1], split2, 0, 0) == 0, "system keyset not correct"); free_splitted_keysets (split); ksRewind (ks); while ((key = ksNext(ks)) != 0) { key->flags = KEY_FLAG_SYNC; } split = split_keyset (handle, ks, parentKey, options); succeed_if (split->keysets, "did not alloc keysets array"); succeed_if (split->handles, "did not alloc handles array"); succeed_if (split->no == 2, "not splitted according user, system"); succeed_if (split->syncbits[0] == 1, "optimized too much"); succeed_if (split->syncbits[1] == 1, "optimized too much"); succeed_if (compare_keyset (split->keysets[0], split1, 0, 0) == 0, "user keyset not correct"); succeed_if (compare_keyset (split->keysets[1], split2, 0, 0) == 0, "system keyset not correct"); free_splitted_keysets (split); ksDel (ks); ksDel (split1); ksDel (split2); kdbClose (handle); } void test_removed() { KDB *handle = kdbOpen(); KeySet *ks = ksNew ( 5, keyNew ("user/valid/key2", KEY_REMOVE, KEY_END), keyNew ("user/valid/key1", KEY_REMOVE, KEY_END), keyNew ("system/valid/key1", KEY_END), keyNew ("system/valid/key2", KEY_END), KS_END); KeySet *split1 = ksNew ( 3, keyNew ("user/valid/key2", KEY_REMOVE, KEY_END), keyNew ("user/valid/key1", KEY_REMOVE, KEY_END), KS_END); KeySet *split2 = ksNew ( 3, keyNew ("system/valid/key1", KEY_END), keyNew ("system/valid/key2", KEY_END), KS_END); Key *parentKey = 0; unsigned long options = 0; Key *mnt; KeySet *config; Split *split; Key *key; kdbMount (handle, mnt=keyNew ("user", KEY_VALUE, "filesys", KEY_END), config=ksNew(0)); keyDel (mnt); ksDel (config); kdbMount (handle, mnt=keyNew ("system", KEY_VALUE, "filesys", KEY_END), config=ksNew(0)); keyDel (mnt); ksDel (config); split = split_keyset (handle, ks, parentKey, options); printf ("Test optimization split with removed keys\n"); succeed_if (split->keysets, "did not alloc keysets array"); succeed_if (split->handles, "did not alloc handles array"); succeed_if (split->no == 2, "not splitted according user, system"); succeed_if (split->syncbits[1] == 1, "user part need to be synced"); succeed_if (split->syncbits[0] == 1, "second part need to by synced"); succeed_if (compare_keyset (split->keysets[0], split1, 0, 0) == 0, "user keyset not correct"); succeed_if (compare_keyset (split->keysets[1], split2, 0, 0) == 0, "system keyset not correct"); free_splitted_keysets (split); ksRewind (ks); while ((key = ksNext(ks)) != 0) { /*only removed, no sync*/ if (keyIsUser(key) == 1) key->flags &= ~KEY_FLAG_SYNC; } split = split_keyset (handle, ks, parentKey, options); succeed_if (split->keysets, "did not alloc keysets array"); succeed_if (split->handles, "did not alloc handles array"); succeed_if (split->no == 2, "not splitted according user, system"); succeed_if (split->syncbits[0] == 0, "optimized too much"); succeed_if (split->syncbits[1] == 1, "user part does not need to be synced"); succeed_if (compare_keyset (split->keysets[0], split1, 0, 0) == 0, "user keyset not correct"); succeed_if (compare_keyset (split->keysets[1], split2, 0, 0) == 0, "system keyset not correct"); free_splitted_keysets (split); options = KDB_O_SYNC; split = split_keyset (handle, ks, parentKey, options); succeed_if (split->keysets, "did not alloc keysets array"); succeed_if (split->handles, "did not alloc handles array"); succeed_if (split->no == 2, "not splitted according user, system"); succeed_if (split->syncbits[1] == 1, "user part ignoresync"); succeed_if (split->syncbits[0] == 1, "optimized too much"); succeed_if (compare_keyset (split->keysets[0], split1, 0, 0) == 0, "user keyset not correct"); succeed_if (compare_keyset (split->keysets[1], split2, 0, 0) == 0, "system keyset not correct"); free_splitted_keysets (split); ksDel (ks); ksDel (split1); ksDel (split2); kdbClose (handle); } void test_easyparent() { KDB *handle = kdbOpen(); KeySet *ks = ksNew ( 8, keyNew ("user/valid", KEY_END), keyNew ("user/valid/key1", KEY_END), keyNew ("user/valid/key2", KEY_END), keyNew ("system/valid", KEY_END), keyNew ("system/valid/key1", KEY_END), keyNew ("system/valid/key2", KEY_END), KS_END); KeySet *split1 = ksNew ( 5, keyNew ("user/valid", KEY_END), keyNew ("user/valid/key1", KEY_END), keyNew ("user/valid/key2", KEY_END), KS_END); KeySet *split2 = ksNew ( 5, keyNew ("system/valid", KEY_END), keyNew ("system/valid/key1", KEY_END), keyNew ("system/valid/key2", KEY_END), KS_END); unsigned long options = 0; Key *parentKey; Key *mnt; KeySet *config; Split *split; printf ("Test parent separation of user and system\n"); /*ksOutput (ks, stdout, 0); ksSort (ks); ksOutput (ks, stdout, 0);*/ parentKey = keyNew ("user", KEY_END); split = split_keyset (handle, ks, parentKey, options); succeed_if (split->keysets, "did not alloc keysets array"); succeed_if (split->handles, "did not alloc handles array"); /*printf ("%d\n", split->no);*/ succeed_if (split->no == 2, "not splitted according user, system"); succeed_if (split->syncbits[0] == 1, "user part need to by synced"); succeed_if (split->syncbits[1] == 1, "system part need to be synced"); succeed_if (split->belowparents[0] == 1, "user part is below parent"); succeed_if (split->belowparents[1] == 0, "system part is not below parent"); succeed_if (compare_keyset (split->keysets[0], split1, 0, 0) == 0, "user keyset not correct"); succeed_if (compare_keyset (split->keysets[1], split2, 0, 0) == 0, "system keyset not correct"); free_splitted_keysets (split); keyDel (parentKey); parentKey = keyNew ("system", KEY_END); split = split_keyset (handle, ks, parentKey, options); succeed_if (split->keysets, "did not alloc keysets array"); succeed_if (split->handles, "did not alloc handles array"); succeed_if (split->no == 2, "not splitted according user, system"); succeed_if (split->syncbits[0] == 1, "user part need to by synced"); succeed_if (split->syncbits[1] == 1, "system part need to be synced"); succeed_if (split->belowparents[0] == 0, "user part is not below parent"); succeed_if (split->belowparents[1] == 1, "system part is below parent"); succeed_if (compare_keyset (split->keysets[0], split1, 0, 0) == 0, "user keyset not correct"); succeed_if (compare_keyset (split->keysets[1], split2, 0, 0) == 0, "system keyset not correct"); free_splitted_keysets (split); keyDel (parentKey); kdbMount (handle, mnt=keyNew ("user", KEY_VALUE, "filesys", KEY_END), config=ksNew(0)); keyDel (mnt); ksDel (config); kdbMount (handle, mnt=keyNew ("system", KEY_VALUE, "filesys", KEY_END), config=ksNew(0)); keyDel (mnt); ksDel (config); parentKey = keyNew ("user", KEY_END); split = split_keyset (handle, ks, parentKey, options); succeed_if (split->keysets, "did not alloc keysets array"); succeed_if (split->handles, "did not alloc handles array"); succeed_if (split->no == 2, "not splitted according user, system"); succeed_if (split->syncbits[0] == 1, "user part need to by synced"); succeed_if (split->syncbits[1] == 1, "system part need to be synced"); succeed_if (split->belowparents[0] == 1, "user part is below parent"); succeed_if (split->belowparents[1] == 0, "system part is not below parent"); succeed_if (compare_keyset (split->keysets[0], split1, 0, 0) == 0, "user keyset not correct"); succeed_if (compare_keyset (split->keysets[1], split2, 0, 0) == 0, "system keyset not correct"); free_splitted_keysets (split); keyDel (parentKey); parentKey = keyNew ("system", KEY_END); split = split_keyset (handle, ks, parentKey, options); succeed_if (split->keysets, "did not alloc keysets array"); succeed_if (split->handles, "did not alloc handles array"); succeed_if (split->no == 2, "not splitted according user, system"); succeed_if (split->syncbits[0] == 1, "user part need to by synced"); succeed_if (split->syncbits[1] == 1, "system part need to be synced"); succeed_if (split->belowparents[0] == 0, "user part is not below parent"); succeed_if (split->belowparents[1] == 1, "system part is below parent"); succeed_if (compare_keyset (split->keysets[0], split1, 0, 0) == 0, "user keyset not correct"); succeed_if (compare_keyset (split->keysets[1], split2, 0, 0) == 0, "system keyset not correct"); free_splitted_keysets (split); keyDel (parentKey); ksDel (ks); ksDel (split1); ksDel (split2); kdbClose (handle); } void test_parent() { KDB *handle = kdbOpen(); KeySet *ks = ksNew ( 18, keyNew ("user/valid", KEY_END), keyNew ("user/valid/key1", KEY_END), keyNew ("user/valid/key2", KEY_END), keyNew ("user/invalid", KEY_END), keyNew ("user/invalid/key1", KEY_END), keyNew ("user/invalid/key2", KEY_END), keyNew ("system/valid", KEY_END), keyNew ("system/valid/key1", KEY_END), keyNew ("system/valid/key2", KEY_END), KS_END); KeySet *split0 = ksNew ( 9, keyNew ("user/valid", KEY_END), keyNew ("user/valid/key1", KEY_END), keyNew ("user/valid/key2", KEY_END), KS_END); KeySet *split1 = ksNew ( 9, keyNew ("user/invalid", KEY_END), keyNew ("user/invalid/key1", KEY_END), keyNew ("user/invalid/key2", KEY_END), KS_END); KeySet *split2 = ksNew ( 9, keyNew ("system/valid", KEY_END), keyNew ("system/valid/key1", KEY_END), keyNew ("system/valid/key2", KEY_END), KS_END); unsigned long options = 0; Key *parentKey; Key *mnt; KeySet *config; Split *split; printf ("Test parent separation of subpath\n"); /*ksOutput (ks, stdout, 0); ksSort (ks); ksOutput (ks, stdout, 0);*/ kdbMount (handle, mnt=keyNew ("user", KEY_VALUE, "filesys", KEY_END), config=ksNew(0)); keyDel (mnt); ksDel (config); kdbMount (handle, mnt=keyNew ("system", KEY_VALUE, "filesys", KEY_END), config=ksNew(0)); keyDel (mnt); ksDel (config); parentKey = keyNew ("user/valid", KEY_END); split = split_keyset (handle, ks, parentKey, options); succeed_if (split->keysets, "did not alloc keysets array"); succeed_if (split->handles, "did not alloc handles array"); /*printf ("%d\n", split->no);*/ succeed_if (split->no == 3, "not splitted according user, system"); succeed_if (split->syncbits[0] == 1, "user valid part need to by synced"); succeed_if (split->syncbits[1] == 1, "user invalid part need to by synced"); succeed_if (split->syncbits[2] == 1, "system part need to be synced"); succeed_if (split->belowparents[0] == 1, "user valid part is below parent"); succeed_if (split->belowparents[1] == 0, "user invalid part is not below parent"); succeed_if (split->belowparents[2] == 0, "system part is not below parent"); succeed_if (compare_keyset (split->keysets[0], split0, 0, 0) == 0, "user valid keyset not correct"); succeed_if (compare_keyset (split->keysets[1], split1, 0, 0) == 0, "user invalid keyset not correct"); succeed_if (compare_keyset (split->keysets[2], split2, 0, 0) == 0, "system keyset not correct"); free_splitted_keysets (split); keyDel (parentKey); ksDel (ks); ksDel (split0); ksDel (split1); ksDel (split2); kdbClose (handle); } void test_mountparent() { KDB *handle = kdbOpen(); KeySet *ks = ksNew ( 18, keyNew ("user/valid", KEY_END), keyNew ("user/valid/key1", KEY_END), keyNew ("user/valid/key2", KEY_END), keyNew ("user/valid/mount", KEY_END), keyNew ("user/valid/mount/key1", KEY_END), keyNew ("user/valid/mount/key2", KEY_END), keyNew ("system/valid", KEY_END), keyNew ("system/valid/key1", KEY_END), keyNew ("system/valid/key2", KEY_END), KS_END); KeySet *split0 = ksNew ( 9, keyNew ("user/valid", KEY_END), keyNew ("user/valid/key1", KEY_END), keyNew ("user/valid/key2", KEY_END), KS_END); KeySet *split1 = ksNew ( 9, keyNew ("user/valid/mount", KEY_END), keyNew ("user/valid/mount/key1", KEY_END), keyNew ("user/valid/mount/key2", KEY_END), KS_END); KeySet *split2 = ksNew ( 9, keyNew ("system/valid", KEY_END), keyNew ("system/valid/key1", KEY_END), keyNew ("system/valid/key2", KEY_END), KS_END); unsigned long options = 0; Key *parentKey; Key *mnt; KeySet *config; Split *split; printf ("Test parent separation with mounted backend below\n"); /*ksOutput (ks, stdout, 0); ksSort (ks); ksOutput (ks, stdout, 0);*/ kdbMount (handle, mnt=keyNew ("user/valid/mount", KEY_VALUE, "filesys", KEY_END), config=ksNew(0)); keyDel (mnt); ksDel (config); kdbMount (handle, mnt=keyNew ("system", KEY_VALUE, "filesys", KEY_END), config=ksNew(0)); keyDel (mnt); ksDel (config); parentKey = keyNew ("user/valid", KEY_END); split = split_keyset (handle, ks, parentKey, options); succeed_if (split->keysets, "did not alloc keysets array"); succeed_if (split->handles, "did not alloc handles array"); /*printf ("%d\n", split->no);*/ succeed_if (split->no == 3, "not splitted according user, system"); succeed_if (split->syncbits[0] == 1, "user valid part need to by synced"); succeed_if (split->syncbits[1] == 1, "user invalid part need to by synced"); succeed_if (split->syncbits[2] == 1, "system part need to be synced"); succeed_if (split->belowparents[0] == 1, "user valid part is below parent"); succeed_if (split->belowparents[1] == 1, "user mounted part is not below parent"); succeed_if (split->belowparents[2] == 0, "system part is not below parent"); succeed_if (compare_keyset (split->keysets[0], split0, 0, 0) == 0, "user valid keyset not correct"); succeed_if (compare_keyset (split->keysets[1], split1, 0, 0) == 0, "user invalid keyset not correct"); succeed_if (compare_keyset (split->keysets[2], split2, 0, 0) == 0, "system keyset not correct"); free_splitted_keysets (split); keyDel (parentKey); ksDel (ks); ksDel (split0); ksDel (split1); ksDel (split2); kdbClose (handle); } int main() { printf("SPLIT TESTS\n"); printf("==================\n\n"); init (); test_create(); test_emptysplit(); test_easysplit(); test_singlesplit(); test_mount(); test_optimize(); test_removed(); test_easyparent(); test_parent(); test_mountparent(); printf("\ntest_split RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError); return nbError; } elektra-0.7.1/tests/test_stream.c0000644000076400001440000000322111365506635013737 00000000000000/*************************************************************************** * test_stream.c - streaming test suite * ------------------- * begin : Mon 26 Nov 2007 * copyright : (C) 2007 by Markus Raab * email : elektra@markus-raab.org ****************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STRING_H #include #endif #include void test_keyoutput () { KeySet *ks; FILE *fout = stdout; printf("Testing Read and write xml\n"); ks = ksNew (0); // fout = fopen ("key.txt", "w"); exit_if_fail( ksFromXMLfile(ks, srcdir_file ("key.xml")) == 0, "ksFromXMLfile(key.xml) failed."); // compare_files ("key.xml"); // ksOutput (ks, fout, KEY_VALUE | KEY_COMMENT); // ksOutput (ks, fout, KDB_O_SHOWMETA); ksOutput (ks, fout, KDB_O_SHOWFLAGS); ksDel (ks); } int main() { printf("STREAM TESTS\n"); printf("==================\n\n"); init (); test_keyoutput(); printf("\ntest_stream RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError); return nbError; } elektra-0.7.1/tests/test_trie.c0000644000076400001440000000627311365506635013421 00000000000000/*************************************************************************** * test_trie.c - Test suite for trie data structure * ------------------- * begin : Thu Oct 24 2007 * copyright : (C) 2007 by Patrick Sabin * email : patricksabin@gmx.at ****************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STRING_H #include #endif #include /*Needs private declarations*/ #include void *mapper(void *s,char *backend) { return s; } void test_kdbTrie() { KDB *kdb = kdbOpen(); KeySet *ks=ksNew(0); /* k = keyNew ("user/template/key",0); s=kdbGetBackend(kdb,k); exit_if_fail(s, "Got null pointer from kdbGetBackend"); succeed_if(!strcmp("libelektra-template",kdbhGetBackendName(s)), "kdbGetBackend: didn't get the correct value"); keyDel (k); */ /* k = keyNew ("user/key",0); s=kdbGetBackend(kdb,k); exit_if_fail(s, "Got null pointer from kdbGetBackend"); succeed_if(!strcmp("libelektra-filesys",kdbhGetBackendName(s)), "kdbGetBackend: didn't get the correct value"); keyDel (k); k = keyNew ("system/key",0); s=kdbGetBackend(kdb,k); exit_if_fail(s, "Got null pointer from kdbGetBackend"); succeed_if(!strcmp("libelektra-filesys",kdbhGetBackendName(s)), "kdbGetBackend: didn't get the correct value"); keyDel (k); k = keyNew ("system/filesystems/hda/",0); s=kdbGetBackend(kdb,k); exit_if_fail(s, "Got null pointer from kdbGetBackend"); succeed_if(!strcmp("libelektra-fstab",kdbhGetBackendName(s)), "kdbGetBackend: didn't get the correct value"); keyDel (k); printf ("Looking up dynamic mounting\n"); printf(BACKEND_DIR "fstab2/config/path\n"); ksAppendKey(ks,keyNew(BACKEND_DIR "fstab2/config/path",KEY_VALUE,"/tmp/fstab2",0)); kdbMount(kdb, mountpoint=keyNew("system/fstab/",0), "fstab",ks); k = keyNew ("system/fstab/dev/hda",0); s=kdbGetBackend(kdb,k); exit_if_fail(s, "Got null pointer from kdbGetBackend"); succeed_if(!strcmp("libelektra-fstab",kdbhGetBackendName(s)), "kdbGetBackend: didn't get the correct value"); keyDel (k); kdbUnmount(kdb,mountpoint); keyDel(mountpoint); k = keyNew ("system/fstab/dev/hda",0); s=kdbGetBackend(kdb,k); exit_if_fail(s, "Got null pointer from kdbGetBackend"); succeed_if(!strcmp("libelektra-filesys",kdbhGetBackendName(s)), "kdbGetBackend: didn't get the correct value"); keyDel (k); */ /**/ ksDel (ks); kdbClose (kdb); } int main() { printf("TRIE TESTS\n"); printf("==================\n\n"); init (); test_kdbTrie(); printf("\ntest_trie RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError); return nbError; } elektra-0.7.1/tests/test_type.c0000644000076400001440000000446511365506635013440 00000000000000/*************************************************************************** * test_type.c - Typing related test suite * ------------------- * begin : Thu Aug 03 2006 * copyright : (C) 2008 Markus Raab * email : elektra@markus-raab.org ****************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "tests.h" enum { KEY_TYPE_COLOR=KEY_TYPE_STRING+4 }; void test_typeMax(void) { Key *k1 = keyNew(0); succeed_if (keyGetType(0) == -1, "null pointer check"); succeed_if (keySetType(0, KEY_TYPE_COLOR) == -1, "null pointer check"); succeed_if (keySetType(k1, 256) == -1, "type to large"); succeed_if (keySetType(k1, 257) == -1, "type to large"); keyDel (k1); } void test_typeColor(void) { Key *k1 = keyNew ("user/sw/oyranos/current/color1", KEY_VALUE, "#4B52CA", KEY_COMMENT, "a custom color", KEY_TYPE, KEY_TYPE_COLOR, KEY_END); Key *k2 = keyNew ("user/sw/oyranos/current/color2", KEY_VALUE, "green", KEY_COMMENT, "the green color", KEY_TYPE, KEY_TYPE_COLOR, KEY_END); succeed_if (keyGetType(k1) == KEY_TYPE_COLOR, "not type color"); succeed_if (keyGetType(k2) == KEY_TYPE_COLOR, "not type color"); succeed_if (keyIsString(k1) == 1, "key should be string"); succeed_if (keyIsString(k2) == 1, "key should be string"); keyDel (k1); keyDel (k2); k1 = keyNew (0); succeed_if (keySetType(k1, KEY_TYPE_COLOR) == 0, "could not set color"); succeed_if (keyGetType(k1) == KEY_TYPE_COLOR, "not type color"); succeed_if (keyIsString(k1) == 1, "key should be string"); keyDel (k1); } int main() { printf("KEY TYPE TESTS\n"); printf("==================\n\n"); init (); test_typeMax(); test_typeColor(); printf("\ntest_key RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError); return nbError; } elektra-0.7.1/tests/test_validate.sh0000755000076400001440000000112011361542117014413 00000000000000#!/bin/sh VALIDATOR=/usr/bin/xmllint [ "z$srcdir" = 'z' ] && srcdir=. SCHEMA=$srcdir/../xmlschema/elektra.xsd [ -x "$VALIDATOR" ] || exit 0 echo echo ELEKTRA VALIDATE TESTS echo ======================================== echo $VALIDATOR --schema "$SCHEMA" $srcdir/key.xml > /dev/null || exit 5 $VALIDATOR --schema "$SCHEMA" $srcdir/keyset.xml > /dev/null || exit 5 $VALIDATOR --schema "$SCHEMA" $srcdir/filesys.xml > /dev/null || exit 5 $VALIDATOR --schema "$SCHEMA" $srcdir/fstab.xml > /dev/null || exit 5 $VALIDATOR --schema "$SCHEMA" $srcdir/passwd.xml > /dev/null || exit 5 exit 0 elektra-0.7.1/tests/test_xml.c0000644000076400001440000002300211365506635013243 00000000000000/*************************************************************************** * test_kdb.c - Backend test suite * ------------------- * begin : Thu Aug 03 2006 * copyright : (C) 2006 by Yannick Lecaillez * email : sizon5@gmail.com ****************************************************************************/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ #include void test_readwrite() { KeySet *ks; FILE *fout; printf("Testing Read and write xml\n"); fout = fopen (srcdir_file("key-gen.xml"), "w"); ks = ksNew(0); exit_if_fail( ksFromXMLfile(ks, srcdir_file("key.xml")) == 0, "ksFromXMLfile(key.xml) failed."); ksToStream (ks, fout, KDB_O_HEADER); fclose (fout); compare_files (srcdir_file("key.xml")); unlink (srcdir_file("key-gen.xml")); ksDel (ks); } void test_readwrite_hier() { KeySet *ks; FILE *fout; printf("Testing Read and write xml\n"); fout = fopen (srcdir_file("key-gen.xml"), "w"); ks = ksNew(0); exit_if_fail( ksFromXMLfile(ks, srcdir_file("key.xml")) == 0, "ksFromXMLfile(key.xml) failed."); ksToStream (ks, fout, KDB_O_HIER | KDB_O_HEADER); fclose (fout); compare_files (srcdir_file("key.xml")); unlink (srcdir_file("key-gen.xml")); ksDel (ks); } void test_key() { KeySet *ks; Key *cur; int counter; printf("Testing Key from xml\n"); ks = ksNew(0); exit_if_fail( ksFromXMLfile(ks, srcdir_file("key.xml")) == 0, "ksFromXMLfile(key.xml) failed."); counter = 0; ksRewind(ks); while ( (cur = ksNext(ks)) ) { counter ++; /* Prepend key root */ //snprintf(buf, sizeof(buf), "%s/%s", root, keyName(cur)); //keySetName(cur, buf); /* Make tests ... */ // printf ("counter: %d - %s\n", counter, (char*)keyValue(cur)); switch (counter) { case 1: succeed_if(strcmp (keyValue(cur), "StringValue") == 0, "value not correct"); succeed_if(strcmp (keyComment(cur), "String key with\nstandard name") == 0, "comment not correct"); succeed_if(keyIsInactive (cur) == 0, "key is active"); succeed_if(keyIsString(cur) == 1, "key is not string"); succeed_if(keyGetUID(cur) == 20, "could not get uid value"); break; case 2: succeed_if(strcmp (keyValue(cur), "DirectoryValue") == 0, "value not correct"); succeed_if(strcmp (keyComment(cur), "Directory key with standard name") == 0, "comment not correct"); succeed_if(keyIsInactive (cur) == 0, "key is active"); succeed_if(keyIsString(cur) == 1, "key is not string"); break; case 3: succeed_if(strcmp (keyValue(cur), "BinaryValue") == 0, "value not correct"); succeed_if(strcmp (keyComment(cur), "Binary key with standard name") == 0, "comment not correct"); succeed_if(keyIsInactive (cur) == 0, "key is active"); succeed_if(keyIsBinary(cur) == 1, "key is not binary"); succeed_if(keyGetGID(cur) == 40, "could not get gid value"); break; case 4: succeed_if(strcmp (keyValue(cur), "StringValue") == 0, "value not correct"); succeed_if(strcmp (keyComment(cur), "String key with hidden name") == 0, "comment not correct"); succeed_if(keyIsInactive (cur) == 1, "key is inactive"); succeed_if(keyIsString(cur) == 1, "key is not string"); succeed_if(keyGetUID(cur) == 0, "could not get uid value"); succeed_if(keyGetGID(cur) == 20, "could not get gid value"); break; case 5: succeed_if(strcmp (keyValue(cur), "DirectoryValue") == 0, "value not correct"); succeed_if(strcmp (keyComment(cur), "Directory key with hidden name") == 0, "comment not correct"); succeed_if(keyIsInactive (cur) == 1, "key is inactive"); succeed_if(keyIsString(cur) == 1, "key is not string"); break; case 6: succeed_if(strcmp (keyValue(cur), "BinaryValue") == 0, "value not correct"); succeed_if(strcmp (keyComment(cur), "Binary key with hidden name") == 0, "comment not correct"); succeed_if(keyIsInactive (cur) == 1, "key is inactive"); succeed_if(keyIsBinary(cur) == 1, "key is not binary"); succeed_if(keyGetType(cur) == 30, "not correct type"); succeed_if(keyGetMode(cur) == 0440, "could not get mode"); break; // string key with ugly name case 7: succeed_if(strcmp (keyValue(cur), "With a string value") == 0, "value not correct"); succeed_if(strcmp (keyComment(cur), "string key with ugly name") == 0, "comment not correct"); succeed_if(keyIsInactive (cur) == 0, "key is active"); succeed_if(keyIsString(cur) == 1, "key is not string"); break; // Directory with ugly name case 8: succeed_if(strcmp (keyValue(cur), "") == 0, "value not correct"); succeed_if(strcmp (keyComment(cur), "Directory with ugly name") == 0, "comment not correct"); succeed_if(keyIsInactive (cur) == 0, "key is active"); succeed_if(keyIsString(cur) == 1, "key is not string"); break; // Binary key with ugly name case 9: succeed_if(keyValue(cur) == 0, "value not correct"); succeed_if(strcmp (keyComment(cur), "Binary key with ugly name") == 0, "comment not correct"); succeed_if(keyIsInactive (cur) == 0, "key is active"); succeed_if(keyIsBinary(cur) == 1, "key is not binary"); succeed_if(keyGetMode(cur) == 230, "could not get mode"); break; } } ksDel(ks); } void test_keyset() { KeySet *ks; Key *cur; int counter; printf("Testing KeySet from xml\n"); ks = ksNew(0); exit_if_fail( ksFromXMLfile(ks, srcdir_file("keyset.xml")) == 0, "ksFromXMLfile(key.xml) failed."); counter = 0; ksRewind(ks); while ( (cur = ksNext(ks)) ) { counter ++; /* Make tests ... */ // printf ("counter: %d - %s\n", counter, keyName(cur)); switch (counter) { // 2551516588474823843 case 1: succeed_if (strcmp (keyName(cur),"user/tests/filesys/0-27042916") == 0,"name of first key not correct"); succeed_if (strcmp (keyValue(cur),"0 216905227") == 0,"value of first key not correct"); succeed_if (strcmp (keyComment(cur),"2551516588474823843") == 0,"comment of first key not correct"); succeed_if (keyGetType(cur) == 43, "wrong key type found"); break; // 3246436893195629244 case 2: succeed_if (strcmp (keyName(cur),"user/tests/filesys/1-2449524622") == 0,"name of 2. key not correct"); succeed_if (strcmp (keyValue(cur),"1 1679328197") == 0,"value of 2. key not correct"); succeed_if (strcmp (keyComment(cur),"3246436893195629244") == 0,"comment of 2. key not correct"); succeed_if (keyGetType(cur) == 253, "wrong key type found"); break; // case 3: succeed_if (strcmp (keyName(cur),"user/tests/filesys/dir-1-0") == 0,"name of 3. key not correct"); succeed_if (keyIsDir (cur), "Is not directory, but should be"); succeed_if (keyGetType(cur) == KEY_TYPE_STRING, "wrong key type found"); break; // 18454108762891828026 case 4: succeed_if (strcmp (keyName(cur),"user/tests/filesys/dir-1-0/0-294164813") == 0,"name of 4. key not correct"); succeed_if (strcmp (keyValue(cur),"0 216245011") == 0,"value of 4. key not correct"); succeed_if (strcmp (keyComment(cur),"18454108762891828026") == 0,"comment of 4. key not correct"); succeed_if (keyGetType(cur) == 114, "wrong key type found"); break; // 24597295372375238 case 5: succeed_if (strcmp (keyName(cur),"user/tests/filesys/dir-1-0/1-1479930365") == 0,"name of 4. key not correct"); succeed_if (strcmp (keyValue(cur),"1 2732423037") == 0,"value of 4. key not correct"); succeed_if (strcmp (keyComment(cur),"24597295372375238") == 0,"comment of 4. key not correct"); succeed_if (keyGetType(cur) == 135, "wrong key type found"); break; // case 6: succeed_if (strcmp (keyName(cur),"user/tests/filesys/dir-1-0/dir-2-0") == 0,"name of 3. key not correct"); succeed_if (keyIsDir (cur), "Is not directory, but should be"); succeed_if (keyGetType(cur) == KEY_TYPE_STRING, "wrong key type found"); break; // 2188631490667217086 case 7: succeed_if (strcmp (keyName(cur),"user/tests/filesys/dir-1-0/dir-2-0/0-215571059") == 0,"name of 4. key not correct"); succeed_if (strcmp (keyValue(cur),"0 264857705") == 0,"value of 4. key not correct"); succeed_if (strcmp (keyComment(cur),"2188631490667217086") == 0,"comment of 4. key not correct"); succeed_if (keyGetType(cur) == 144, "wrong key type found"); break; } } ksDel(ks); } int main() { printf("\n"); printf("ELEKTRA BACKENDS TEST SUITE\n"); printf("========================================\n\n"); init (); test_key(); test_keyset(); /* test_readwrite(); test_readwrite_hier(); */ printf("\ntest_xml RESULTS: %d test(s) done. %d error(s).\n", nbTest, nbError); return nbError; } elektra-0.7.1/tests/tests.c0000644000076400001440000001621311365507606012553 00000000000000#include "tests.h" int nbError; int nbTest; int nbStreaming; uid_t nbUid; gid_t nbGid; char file [MAX_PATH_LENGTH]; char srcdir [MAX_PATH_LENGTH]; #ifdef HAVE_CLEARENV int clearenv(); #endif /**Does some useful startup. */ int init (void) { setlocale (LC_ALL, ""); nbUid = getuid(); nbGid = getgid(); if (getenv ("srcdir")) { strcpy (srcdir, getenv ("srcdir")); } else { strcpy (srcdir, "."); warn_if_fail (0, "srcdir not set, will try current directory"); } #ifdef HAVE_CLEARENV clearenv(); #else unsetenv("HOME"); unsetenv("USER"); unsetenv("KDB_HOME"); unsetenv("KDB_USER"); unsetenv("KDB_DIR"); #endif #ifdef HAVE_SETENV setenv("KDB_HOME",".",1); #endif nbStreaming = loadToolsLib(); warn_if_fail (nbStreaming == 0, "Unable to load elektratools, no stream testing will be done"); return 0; } /**Create a root key for a backend. * * @return a allocated root key */ Key * create_root_key (const char *backendName) { Key *root = keyNew ("user/tests", KEY_END); /*Make mount point beneath root, and do all tests here*/ keySetDir(root); keySetUID(root, nbUid); keySetGID(root, nbGid); keyAddBaseName (root, backendName); keySetString (root, backendName); keySetComment (root, "backend root key for tests"); keySetString (root, backendName); return root; } /**Create a configuration keyset for a backend. * * @return a allocated configuration keyset for a backend*/ KeySet *create_conf (const char *filename) { return ksNew (2, keyNew("system/path", KEY_VALUE, ".kdb/hosts_kdb", KEY_END), KS_END); } int compare_line_files (const char *filename, const char *genfilename) { FILE *forg, *fgen; char bufferorg [BUFFER_LENGTH + 1]; char buffergen [BUFFER_LENGTH + 1]; int line = 0; forg = fopen (filename, "r"); fgen = fopen (genfilename, "r"); exit_if_fail (forg && fgen, "could not open file"); while ( fgets (bufferorg, BUFFER_LENGTH, forg) && fgets (buffergen, BUFFER_LENGTH, fgen)) { line ++; if (strncmp (bufferorg, buffergen, BUFFER_LENGTH)) { printf ("In file %s, line %d.\n", filename, line); fclose (forg); fclose (fgen); succeed_if (0, "comparing lines failed"); return 0; } } fclose (forg); fclose (fgen); return 1; } /**Compare two files line by line. * * Fails when there are any differences. * * The original file is passed as parameter. * It will be compared with the file -gen. * * file.xml -> file-gen.xml (xml comparator) * file.txt -> file-gen.txt (line comparator) * file.c -> file-gen.c (c comparator) * */ int compare_files (const char * filename) { char genfilename [MAX_PATH_LENGTH]; char * dot = strrchr (filename, '.'); exit_if_fail (dot != 0, "could not find extension in file"); strncpy (genfilename, filename, dot- filename); /* does not terminate string, but strcat need it, so: */ genfilename[dot-filename] = 0; strcat (genfilename, "-gen"); if (!strcmp (dot, ".xml")) { strcat (genfilename, ".xml"); } else if (!strcmp (dot, ".txt")) { strcat (genfilename, ".txt"); } else if (!strcmp (dot, ".c")) { strcat (genfilename, ".c"); } return compare_line_files (filename, genfilename); } int compare_key (Key *k1, Key *k2, KDBCap *cap) { int ret; int err = nbError; /* printf ("compare: "); keyOutput (k1, stdout); keyOutput (k2, stdout); printf ("\n"); */ ret = keyCompare(k1, k2); if (cap) { succeed_if ((ret & KEY_NAME) == 0 , "compare key: NAME not equal"); if (!kdbcGetnoTypes(cap)) succeed_if ((ret & KEY_TYPE) == 0 , "compare key: TYPE not equal"); if (!kdbcGetnoValue(cap)) succeed_if ((ret & KEY_VALUE) == 0 , "compare key: VALUE not equal"); if (!kdbcGetnoOwner(cap)) succeed_if ((ret & KEY_OWNER) == 0 , "compare key: OWNER not equal"); if (!kdbcGetnoComment(cap)) succeed_if ((ret & KEY_COMMENT) == 0 , "compare key: COMMENT not equal"); if (!kdbcGetnoUID(cap)) succeed_if ((ret & KEY_UID) == 0 , "compare key: UID not equal"); if (!kdbcGetnoGID(cap)) succeed_if ((ret & KEY_GID) == 0 , "compare key: GID not equal"); if (!kdbcGetnoMode(cap)) succeed_if ((ret & KEY_MODE ) == 0 , "compare key: MODE not equal"); } else { succeed_if ((ret & KEY_NAME) == 0 , "compare key: NAME not equal"); succeed_if ((ret & KEY_TYPE) == 0 , "compare key: TYPE not equal"); succeed_if ((ret & KEY_VALUE) == 0 , "compare key: VALUE not equal"); succeed_if ((ret & KEY_OWNER) == 0 , "compare key: OWNER not equal"); succeed_if ((ret & KEY_COMMENT) == 0 , "compare key: COMMENT not equal"); succeed_if ((ret & KEY_UID) == 0 , "compare key: UID not equal"); succeed_if ((ret & KEY_GID) == 0 , "compare key: GID not equal"); succeed_if ((ret & KEY_MODE ) == 0 , "compare key: MODE not equal"); } return err-nbError; } /**Compare two keysets. * Compare if two keysets contain the same keys. * There is a filter for ks, to remove inactive keys, directories and non-directories * You can use: * - option_t::KDB_O_NODIR * remove all directories (keyIsDir) * - option_t::KDB_O_DIRONLY * remove everything but directories (!keyIsDir) * - option_t::KDB_O_INACTIVE (keyIsInactive) * remove all inactive keys * - option_t::KDB_O_STATONLY * remove all value/comments * */ int compare_keyset (KeySet *ks, KeySet *ks2, int filter, KDBCap *cap) { Key *key = 0; Key *key2 = 0; int size = 0; int dup = 0; int err = nbError; // I would have a _true_ ksCompare() ... ksSort(ks); ksRewind(ks); ksSort(ks2); ksRewind(ks2); //SYNC with ksOutput while ((key = ksNext(ks)) != 0) { if (filter & KDB_O_NODIR) if (keyIsDir (key)) continue; if (filter & KDB_O_DIRONLY) if (!keyIsDir (key)) continue; if (filter & KDB_O_INACTIVE) if (keyIsInactive (key)) continue; if (filter & KDB_O_STATONLY) { if (!kdbcGetnoStat(cap)) { // only remove values for backends which are capable of stating keys. key = keyDup (key); // use a duplicate here... dup = 1; keySetRaw (key, NULL, 0); keySetComment (key, NULL); keySetType (key, KEY_TYPE_UNDEFINED); } } key2 = ksNext(ks2); if (!key2) { succeed_if (0, "Will break, did not find corresponding key2"); if (dup) keyDel (key); break; } size ++; compare_key (key, key2, cap); if (dup) keyDel (key); } if (size == 0) succeed_if (0, "real size was 0"); if ( size != ksGetSize(ks2) ) { printf ("%d, %d\n", (int)ksGetSize(ks), (int)ksGetSize(ks2)); succeed_if( 0, "There are less keys fetched than keys which have been submitted."); } if ( err-nbError ) { if (key && key2) printf ("error comparing %s - %s\n", keyName(key), keyName(key2)); else printf ("error comparing null key\n"); } return err-nbError; } int loadToolsLib(void) { kdbLibHandle dlhandle=0; kdbLibInit(); dlhandle=kdbLibLoad("libelektratools"); if (dlhandle == 0) { return 1; } ksFromXMLfile=(KSFromXMLfile)kdbLibSym(dlhandle,"ksFromXMLfile"); ksFromXML=(KSFromXML)kdbLibSym(dlhandle,"ksFromXML"); ksToStream = (output) kdbLibSym (dlhandle, "ksToStream"); ksOutput = (output) kdbLibSym (dlhandle, "ksOutput"); ksGenerate = (output) kdbLibSym (dlhandle, "ksGenerate"); return 0; } /* return file name in srcdir. * No bound checking on file size, may overflow. */ char * srcdir_file(const char * fileName) { strcpy(file, srcdir); strcat(file, "/"); strcat(file, fileName); return file; } elektra-0.7.1/tests/tests.h0000644000076400001440000000402711365507606012560 00000000000000/**Some common functions in use for testing framework*/ /*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the BSD License (revised). * * * ***************************************************************************/ #ifndef TESTS_H #define TESTS_H #ifdef HAVE_CONFIG_H #include "config.h" #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_STDIO_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #ifdef HAVE_STRING_H #include #endif #ifdef HAVE_TIME_H #include #endif #ifdef HAVE_LOCALE_H #include #endif #define DYN_LINK #include #include #include #define KEY_ROOT "user/tests" #define KEY_LENGTH 1024 #define BUFFER_LENGTH 4096 #define MODE_WRITE 4 #define MODE_READ 2 #define MODE_DIR 1 extern int nbError; extern int nbTest; extern int nbStreaming; extern uid_t nbUid; extern gid_t nbGid; int init(); KSFromXMLfile ksFromXMLfile; KSFromXML ksFromXML; output ksToStream; output ksOutput; output ksGenerate; #define warn_if_fail(x,y) {nbTest++; if (!(x)) { printf("%s:%d: warn in %s: %s\n", __FILE__, __LINE__, __FUNCTION__, y); }} #define succeed_if(x,y) {nbTest++; if (!(x)) { nbError++; printf("%s:%d: error in %s: %s\n", __FILE__, __LINE__, __FUNCTION__, y); }} #define exit_if_fail(x,y) {nbTest++; if (!(x)) { printf("%s:%d: fatal in %s: %s\n", __FILE__, __LINE__, __FUNCTION__, y); exit(1); }} int compare_key (Key *k1, Key *k2, KDBCap *cap); int compare_keyset (KeySet *ks, KeySet *ks2, int filter, KDBCap *cap); int compare_files (const char * filename); int loadToolsLib(void); char *srcdir_file(const char * fileName); Key * create_root_key (const char *backendName); KeySet *create_conf (const char *filename); #endif elektra-0.7.1/xmlschema/0000777000076400001440000000000011365513215012136 500000000000000elektra-0.7.1/xmlschema/Makefile.am0000644000076400001440000000016311365507606014115 00000000000000elektraxsddir = $(datadir)/sgml/elektra-$(PACKAGE_VERSION) EXTRA_DIST = elektra.xsd elektraxsd_DATA = elektra.xsd elektra-0.7.1/xmlschema/Makefile.in0000644000076400001440000002727111365511154014130 00000000000000# Makefile.in generated by automake 1.9.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005 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@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = xmlschema DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/extensions.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/config.h CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(elektraxsddir)" elektraxsdDATA_INSTALL = $(INSTALL_DATA) DATA = $(elektraxsd_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) INSTALL = @INSTALL@ ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BACKENDS = @BACKENDS@ BACKEND_VERSION_API = @BACKEND_VERSION_API@ BINDINGS = @BINDINGS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CDBGFLAGS = @CDBGFLAGS@ CFLAGS = @CFLAGS@ COPTFLAGS = @COPTFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CSTDFLAGS = @CSTDFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDBGFLAGS = @CXXDBGFLAGS@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CXXOPTFLAGS = @CXXOPTFLAGS@ CXXSTDFLAGS = @CXXSTDFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_FALSE = @DEBUG_FALSE@ DEBUG_TRUE = @DEBUG_TRUE@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ ELEKTRATOOLS_VERSION_API = @ELEKTRATOOLS_VERSION_API@ ELEKTRA_VERSION_API = @ELEKTRA_VERSION_API@ EXEEXT = @EXEEXT@ EXPERIMENTAL_FALSE = @EXPERIMENTAL_FALSE@ EXPERIMENTAL_TRUE = @EXPERIMENTAL_TRUE@ F77 = @F77@ FFLAGS = @FFLAGS@ GENHTML = @GENHTML@ GREP = @GREP@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ HAVE_LIBLTDL_FALSE = @HAVE_LIBLTDL_FALSE@ HAVE_LIBLTDL_TRUE = @HAVE_LIBLTDL_TRUE@ HAVE_MAN2HTML_FALSE = @HAVE_MAN2HTML_FALSE@ HAVE_MAN2HTML_TRUE = @HAVE_MAN2HTML_TRUE@ HAVE_XML_FALSE = @HAVE_XML_FALSE@ HAVE_XML_TRUE = @HAVE_XML_TRUE@ HAVE_XSL_FALSE = @HAVE_XSL_FALSE@ HAVE_XSL_TRUE = @HAVE_XSL_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KDB_VERSION = @KDB_VERSION@ KDB_VERSION_MAJOR = @KDB_VERSION_MAJOR@ KDB_VERSION_MAJORMINOR = @KDB_VERSION_MAJORMINOR@ KDB_VERSION_MICRO = @KDB_VERSION_MICRO@ KDB_VERSION_MINOR = @KDB_VERSION_MINOR@ LCOV = @LCOV@ LDFLAGS = @LDFLAGS@ LIBICONV = @LIBICONV@ LIBLTDL = @LIBLTDL@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIBTOOL_DEPS = @LIBTOOL_DEPS@ LN_S = @LN_S@ LTDLINCL = @LTDLINCL@ LTLIBICONV = @LTLIBICONV@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ NM = @NM@ NMEDIT = @NMEDIT@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PYTHON = @PYTHON@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VALGRIND = @VALGRIND@ VALGRINDTESTS_FALSE = @VALGRINDTESTS_FALSE@ VALGRINDTESTS_TRUE = @VALGRINDTESTS_TRUE@ VERSION = @VERSION@ XML2_CONFIG = @XML2_CONFIG@ XML_CPPFLAGS = @XML_CPPFLAGS@ XML_LIBS = @XML_LIBS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_F77 = @ac_ct_F77@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ backend_static_libs = @backend_static_libs@ backenddir = @backenddir@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ datarootdir = @datarootdir@ dbroot = @dbroot@ default_backend = @default_backend@ default_dbackend = @default_dbackend@ default_docbook = @default_docbook@ develdocdir = @develdocdir@ docdir = @docdir@ doxygen = @doxygen@ dvidir = @dvidir@ elektratools = @elektratools@ exec_prefix = @exec_prefix@ gconf_CFLAGS = @gconf_CFLAGS@ gconf_LIBS = @gconf_LIBS@ hlvlbackenddir = @hlvlbackenddir@ 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@ man2html = @man2html@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ privatelibs = @privatelibs@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ ulibdir = @ulibdir@ xsltproc = @xsltproc@ elektraxsddir = $(datadir)/sgml/elektra-$(PACKAGE_VERSION) EXTRA_DIST = elektra.xsd elektraxsd_DATA = elektra.xsd 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 \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu xmlschema/Makefile'; \ cd $(top_srcdir) && \ $(AUTOMAKE) --gnu xmlschema/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool uninstall-info-am: install-elektraxsdDATA: $(elektraxsd_DATA) @$(NORMAL_INSTALL) test -z "$(elektraxsddir)" || $(mkdir_p) "$(DESTDIR)$(elektraxsddir)" @list='$(elektraxsd_DATA)'; for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ f=$(am__strip_dir) \ echo " $(elektraxsdDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(elektraxsddir)/$$f'"; \ $(elektraxsdDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(elektraxsddir)/$$f"; \ done uninstall-elektraxsdDATA: @$(NORMAL_UNINSTALL) @list='$(elektraxsd_DATA)'; for p in $$list; do \ f=$(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(elektraxsddir)/$$f'"; \ rm -f "$(DESTDIR)$(elektraxsddir)/$$f"; \ done tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkdir_p) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(elektraxsddir)"; 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: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_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 distclean-libtool dvi: dvi-am dvi-am: html: html-am info: info-am info-am: install-data-am: install-elektraxsdDATA install-exec-am: install-info: install-info-am install-man: 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-elektraxsdDATA uninstall-info-am .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-elektraxsdDATA \ install-exec install-exec-am install-info install-info-am \ install-man install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am uninstall uninstall-am uninstall-elektraxsdDATA \ uninstall-info-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: elektra-0.7.1/xmlschema/elektra.xsd0000644000076400001440000001041211361542120014210 00000000000000 This elektra schema lets you validate your Elektra XML Application. This is the unstable version, please refer to elektra stable. It validates against anything with a valid key and keyset skeleton, arbitrary attributes and elements are accepted. The targetNamespace is "http://www.libelektra.org". To use the schema and the namespace, make sure that the root element keyset has the following attributes: xmlns="http://www.libelektra.org" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.libelektra.org elektra.xsd" Neither the elements (by using default namespace xmlns=) nor the attributes (because of attributeFormDefault="unqualified" here) needs to be qualifed then. The stylesheet comes like the rest of Elektra-Project in BSD Licence. A parent indicates a directory key name that contains the keys under this KeySet. But, if some key happens to have an absolute name and is inside a keyset element, its absolute name wins. A key must have a name (absolute) or a basename (relative). If both appear, the absolute name wins. A parent can't appear in the same entry that has an absolute name. If parent appears together, name wins. A basename can't appear in the same entry that has an absolute name. If basename appears together, name wins. Absolute name = parent + basename. Short values can be put as an attribute in the key element, to improve readability. But, if a value element appears latter, it wins over the attribute.