r1849 - in tools/prt-get/branches: . prt-get-5.13 prt-get-5.13/doc prt-get-5.13/misc prt-get-5.13/src
Author: jw Date: 2006-09-08 20:05:30 +0200 (Fri, 08 Sep 2006) New Revision: 1849 Added: tools/prt-get/branches/prt-get-5.13/ tools/prt-get/branches/prt-get-5.13/ChangeLog tools/prt-get/branches/prt-get-5.13/Makefile.in tools/prt-get/branches/prt-get-5.13/TODO tools/prt-get/branches/prt-get-5.13/configure tools/prt-get/branches/prt-get-5.13/configure.in tools/prt-get/branches/prt-get-5.13/doc/Makefile.in tools/prt-get/branches/prt-get-5.13/doc/prt-get.8 tools/prt-get/branches/prt-get-5.13/doc/prt-get.conf.5 tools/prt-get/branches/prt-get-5.13/misc/Makefile.in tools/prt-get/branches/prt-get-5.13/misc/prt-get.conf tools/prt-get/branches/prt-get-5.13/misc/prt-get_complete tools/prt-get/branches/prt-get-5.13/src/Makefile.in tools/prt-get/branches/prt-get-5.13/src/argparser.cpp tools/prt-get/branches/prt-get-5.13/src/argparser.h tools/prt-get/branches/prt-get-5.13/src/configuration.cpp tools/prt-get/branches/prt-get-5.13/src/configuration.h tools/prt-get/branches/prt-get-5.13/src/installtransaction.cpp tools/prt-get/branches/prt-get-5.13/src/main.cpp tools/prt-get/branches/prt-get-5.13/src/package.cpp tools/prt-get/branches/prt-get-5.13/src/package.h tools/prt-get/branches/prt-get-5.13/src/pkgdb.cpp tools/prt-get/branches/prt-get-5.13/src/prtget.cpp tools/prt-get/branches/prt-get-5.13/src/prtget.h tools/prt-get/branches/prt-get-5.13/src/repository.cpp tools/prt-get/branches/prt-get-5.13/src/repository.h tools/prt-get/branches/prt-get-5.13/src/versioncomparator.cpp Removed: tools/prt-get/branches/prt-get-5.13/ChangeLog tools/prt-get/branches/prt-get-5.13/Makefile.in tools/prt-get/branches/prt-get-5.13/TODO tools/prt-get/branches/prt-get-5.13/configure tools/prt-get/branches/prt-get-5.13/configure.in tools/prt-get/branches/prt-get-5.13/doc/Makefile.in tools/prt-get/branches/prt-get-5.13/doc/prt-get.8 tools/prt-get/branches/prt-get-5.13/doc/prt-get.conf.5 tools/prt-get/branches/prt-get-5.13/misc/Makefile.in tools/prt-get/branches/prt-get-5.13/misc/prt-get.conf tools/prt-get/branches/prt-get-5.13/misc/prt-get_complete tools/prt-get/branches/prt-get-5.13/src/Makefile.in tools/prt-get/branches/prt-get-5.13/src/argparser.cpp tools/prt-get/branches/prt-get-5.13/src/argparser.h tools/prt-get/branches/prt-get-5.13/src/configuration.cpp tools/prt-get/branches/prt-get-5.13/src/configuration.h tools/prt-get/branches/prt-get-5.13/src/installtransaction.cpp tools/prt-get/branches/prt-get-5.13/src/main.cpp tools/prt-get/branches/prt-get-5.13/src/package.cpp tools/prt-get/branches/prt-get-5.13/src/package.h tools/prt-get/branches/prt-get-5.13/src/pkgdb.cpp tools/prt-get/branches/prt-get-5.13/src/prtget.cpp tools/prt-get/branches/prt-get-5.13/src/prtget.h tools/prt-get/branches/prt-get-5.13/src/repository.cpp tools/prt-get/branches/prt-get-5.13/src/repository.h tools/prt-get/branches/prt-get-5.13/src/versioncomparator.cpp Log: prt-get: tag 5.13 Copied: tools/prt-get/branches/prt-get-5.13 (from rev 1137, tools/prt-get/trunk) Deleted: tools/prt-get/branches/prt-get-5.13/ChangeLog =================================================================== --- tools/prt-get/trunk/ChangeLog 2006-04-04 15:39:45 UTC (rev 1137) +++ tools/prt-get/branches/prt-get-5.13/ChangeLog 2006-09-08 18:05:30 UTC (rev 1849) @@ -1,379 +0,0 @@ -* 0.5.12 00.04.2006 Johannes Winkelmann -- Fix compilation on OpenBSD -- Show alias info in depends -- don't install alias file and deplist -- unlock ports on remove - -* 0.5.11 29.05.2005 Johannes Winkelmann -- add --path to 'ls' -- initial regex support -- replace `uname -r` and `date +...` in version strings -- add 'useregex' config key and --regex command line argument -- Add --full to fsearch -- use regex in fsearch if requested -- add leading slash to fsearch result -- support both `` and $() -- support date patterns like '+%Y' -- add aliases and deplist to dist-tarball -- support multiple shell patterns in version - -* 0.5.10 21.04.2005 Johannes Winkelmann -- fix bugs #3735, #3836 -- implement --ignore=<port1>,<port2> feature -- fix --path for list, search -- add --path for depends -- enable logfile and depfile in default prt-get.conf - - -* 0.5.9 06.12.2005 Johannes Winkelmann -- add alias support -- use absolut pathes for commands (pkgmk et al) -- add -v switch to 'info' to show the readme -- fix 'keephigher' in default prt-get.conf -- add deptree to 'help' -- remove some debug test -- prettify error message when packages are not found -- change 'bash' to 'sh' in process.cpp -- use 'Pkgfile' as default file for cat and edit if no second argument given - -* 0.5.8 31.10.2004 Johannes Winkelmann -- re-enable version parseing; use --prefer-higher to make prt-get use - it -- implement shortcuts to frequentily used pkgmk/pkgadd options -- make -f do 'pkgadd -f' -- add new versioncomparator class -- implement 'alpha' < 'beta' < 'gamma' < 'delta' - -* 0.5.7 16.07.2004 Johannes Winkelmann -- add the --install-root argument to allow installation to a different root -- add the --rargs switch to pass options to pkgmk in "prt-get remove" -- add 'removecommand' configuration key -- add 'runscriptcommand' configuration key -- improve config parsing: options can now be in front of command - -* 0.5.6 06.01.2004 Johannes Winkelmann -- add four new command line arguments: - --no-std-config Don't parse default configuration file - --config-prepend=<string> Prepend <string> to configuration - --config-append=<string> Append <string> to configuration - --config-set=<string> Set configuration data, overriding config file -- add new command: dumpconfig -- respect 'cachefile' setting in configuration (did anyone ever use this??) -- add 'runscripts' configuration variable to (equivalent to --install-scripts) -- dump readme and runscripts configuration in dumpConfig() -- add 'makecommand' and 'addcommand' to config file to make prt-get use - another command than pkgmk and pkgadd - -* 0.5.5p1 23.03.2004 Johannes Winkelmann -- Let Pkgfile's dependencies take precedence over deplist - -* 0.5.5 05.03.2004 Johannes Winkelmann -- Add new configuration option: depfile -- add way to use external dependency file -- Add some missing headers for compilation with gcc 2.95 -- update bash completion for isinst -- add deptree command (--all for all deps) - -* 0.5.4p2 17.11.2003 Johannes Winkelmann -- fix bug in "at least X arguments" after getting several complaints - -* 0.5.4p1 30.10.2003 Johannes Winkelmann -- fix message when called without argument -- Fix duplicate prtdir ignoring error (when using filters) - -* 0.5.4 04.10.2003 Johannes Winkelmann -- introduce symbolic return values -- code: introduce generic argument number checks -- (re)introduce depinst command -- fix problem with prt-get fsearch: symlink'ed files are found as well -- print output while logging (Patch from Logan) -- redirect output of InstallTransaction::installPackage to log file -- add %v (version) and %r (release) patterns to the log file name -- fix typo in man page: %d in printf used for desc and deps -- check for pre-install and post-install - - store in cache (-> cache version update) - - show in prt-get info - - enable in prt-get printf, using %E (prE) and %O (pOst) - -* 0.5.3p2 29.09.2003 Johannes Winkelmann -- Fix little bug in prt-get printf: don't print out empty lines (even if - there's a newline char) - -* 0.5.3p1 25.09.2003 Johannes Winkelmann -- Adapt new patch naming -- Be more clever when calling prt-get diff with a filter - -* 0.5.3 01.09.2003 Johannes Winkelmann -- Add 'remove' feature -- implement pre/post install execution -- prt-get diff doesn't display locked; use --all if you want them -- Fix bug in repository initialization when pkgdirs were specified twice - -* 0.5.2 not used ;-) - -* 0.5.1a 08.08.2003 Johannes Winkelmann -- Fix for gcc 3.3 - -* 0.5.1 09.07.2003 Johannes Winkelmann -- use PKGMK_PACKAGE_DIR - -* 0.5.0 22.06.2003 Johannes Winkelmann -- update to fit new CLC project -(pre3) -- made bash completion work with ls, cat and edit -(pre2) -- sort ls output -(pre1) -- introduced new commands: ls, cat, edit -- fixed an empty error message in argparser - -* 0.4.4c 08.05.2003 Johannes Winkelmann -- Fixed an ugly bug: no error messages shown when logging enabled - - -* 0.4.4b 08.05.2003 Johannes Winkelmann -- Change mode of created directories from 0711 to 0755 - -* 0.4.4a 05.05.2003 Johannes Winkelmann -- Change $PKGDEST to $PACKAGE_DIR - -* 0.4.4 01.05.2003 Johannes Winkelmann -- add support for PKGDEST -- add lock/unlock and listlocked commands -- better parsing of arguments -- small update of the argument parser - -* Reimported after disk crash; 07.04.2003 - -* 0.4.3 18.02.2003 Johannes Winkelmann -- fixed bug in dependent: it split the list wrongly -- new command: fsearch: search for file names in ports tree -- speed fix in Package: don't load() in name() and path() -- cosmetical changes to the help screen - -* 0.4.2a 06.02.2003 Johannes Winkelmann -- fixed bug in dependent: it looked just for a substring, so pkgconfig whould - also be a match for 'dependent gconf', as it contains gconf... - -* 0.4.2 06.02.2003 Johannes Winkelmann -- Fixed a segfault when no pkg database file available - -* 0.4.1 20.01.2003 Johannes Winkelmann -- added small speed fix to printDiff -- added missing include in configuration.cpp -- enable clc ports by default -- added misc dir to DIST - -* 0.4.0pre2 14.01.2003 Johannes Winkelmann -- fixed segfault when no m_currentTransaction - -* 0.4.0pre2 13.01.2003 Johannes Winkelmann -- fixed --listall -> --all switch on help page -- completed SignalDispatcher -- made PrtGet a SubClass of SignalHandler -- feedback on Ctrl-C -- fixed performance problems by not copying lists - -* 0.4.0pre1 13.01.2003 Johannes Winkelmann -- update man page - - -* 0.4.0alpha4 13.01.2003 Johannes Winkelmann -- removed find command -- list can have a wildcard filter -- renamed --listall switch to --all for dependent -- implemented wildcards for listinst - -* 0.4.0alpha3 13.01.2003 Johannes Winkelmann -- added --listall switch for dependent; don't show only installed ports -- corrected help once more -- added LockFile class -- added check for Pkgfile in Port directory -- added expandWildcard*() methods -- enabled wildcards for diff -- implemented 'current' command - -* 0.4.0alpha2 05.01.2003 Johannes Winkelmann -- added --filter="..." option used in printf -- added sysup command (refactoring required) -- updated help output -- added signal dispatcher -- new cache file format (newline separated) -- cache file versioning -- support for maintainer and packager in info and printf -- support for hasReadme in printf -- fixed bug in Pkgfile parser (whitespaces before version, name and rev) -- better format for prt-get help - -* 0.4.0alpha1 04.01.2003 Johannes Winkelmann -- added find command (searching using wildcards), -- Repository::getMatchingPackages() (wildcard match) -- added data object for package - - -* 0.3.5c 28.12.2002 Johannes Winkelmann -- fixed bug: pkgadd was called even if pkgmk failed... there since 0.3.4 - -* 0.3.5b 28.12.2002 Johannes Winkelmann -- fixed bug in writeCache() - -* 0.3.5a 23.12.2002 Johannes Winkelmann -- dependent -> help page - - -* 0.3.5 04.12.2002 Johannes Winkelmann -- added readme command -- info shows whether there is a README file -- added readme info to cache file (-> new format) -- added (README) to install/update output -- fixed a memory leak -- introduced configuration object -- exchanged result printing order ("Packages already installed" before - "Packages installed now" -- added dependent command: show which packages depend on argument -- corrected ugly copy and paste errors in "<command> takes only one arg..." -- added misc/prt-edit (not installed) -- new manual format, not included anymore - - -* 0.3.4c 02.12.2002 Johannes Winkelmann -- corrected typo in manual -- added logging options to default prt-get.conf -- added --sort option for printf - -* 0.3.4b 02.12.2002 Johannes Winkelmann -- printf replaces \t and \n -- small change in StringHelper::replaceAll() -- listinst -vv prints description -- listinst documentation update -- --log doc update -- cleanups (using StringHelper::replaceAll()) -- add bash completion file - -* 0.3.4a 30.11.2002 Johannes Winkelmann -- small change in printf (%i expands to "diff") - -* 0.3.4 10.11.2002 Johannes Winkelmann -- implemented new printf function -- corrected usage output (removed "," characters) -- added StringHelper::replaceAll(..) -- log feature -- added %p in logfile - -* 0.3.3 27.08.2002 Johannes Winkelmann -- implemented a returnValue() method in PrtGet -- prt-get isinst no longer returns "... is not installed" to be more - consistent with "pkginfo -i|grep ...", but returns 1 when a package is not - installed (1 = general error). -- allow dependencies to be commented out when starting with #. THINK ABOUT - THIS SOME MORE - -* 0.3.2 15.07.2002 Johannes Winkelmann -- changed example prt-get.conf again -- added another example to the manual -- added doxygen api documentation -- various code cleanups -- output fix for prt-get diff (title not printed if no difference) -- added tests for process and stringhelper class -- added _very_ simple version checking in prt-get diff -- return values on errors (=1) -- no output for prt-get isinst if package not installed (to be consistent with - pkginfo) -- gcc 3.2 fixes - - -* 0.3.1a 15.07.2002 Johannes Winkelmann -- changed example prt-get.conf to meet the new format... - -* 0.3.1 13.07.2002 Johannes Winkelmann -- Fixed some conditions where Valgrind reported errors - -* 0.3.1pre2 10.07.2002 Johannes Winkelmann -- Fixed another bug in the process execution -- proper implementation of process execution :-) -- improved StringHelper::split() - -* 0.3.1pre1 08.07.2002 Johannes Winkelmann -- listinst -- new config file format (can use alternate location for cache) -- removed depinst skeletion - -* 0.3.0 05.07.2002 Johannes Winkelmann -- added cache feature -- moved string functions to stringhelper -- Makefile.am includes code to create a symlink from prt-get to prt-cache -- If prt-get is called as prt-cache, it uses the caching all the time -- added man page for prt-cache -- added package filter functionality in prt-get-conf -- added man page for prt-get.conf -- comments are removed in prt-get.conf -- added check whether cache is outdated (config file changed after cache - generated) -- added check for 'prt-get diff <packagelist>' that the packages listed - are really installed -- added path command -- print errors to stderr -- always exit( -1 ) on error - -* 0.3.0pre2 03.07.2002 Johannes Winkelmann -- Fixed bug when release or version had a comment on the same line - -* 0.3.0pre1 02.07.2002 Johannes Winkelman -- Changed format of TODO, so others can understand it as well :-) -- added version command - -* 0.2.9 01.07.2002 Johannes Winkelmann -- If files are rejected during update, prt-get no longer says "update failed" -- implemented dsearch feature (to search descriptions) -- Fixed a bug in prt-get depends (empty listing instead of warning when - invalid package given) - -* 0.2.8 30.06.2002 Johannes Winkelmann -- moved to autoconf/automake - -* 0.2.7 28.06.2002 Johannes Winkelmann -- added a man page -- adjusted message of install/update -decided to go up to .7, as I made some errors in the release of .6 - - -* 0.2.6 28.06.2002 Johannes Winkelmann -- added --test switch: doing no installation, just prints out the result -- added quickdiff feature, printing out a list of installed packages to be - updated: use it for prt-get update `prt-get quickdiff` - - -* 0.2.5 28.06.2002 Johannes Winkelmann -- removed depinst feature (maybe reimplemented soon) -- it is now possible to pass a list of arguments to - prt-get install - prt-get depends/quickdep -- implemented -v and -vv in prt-get list -- implemented -v for prt-get search (show description as well) -- lazy initialization of repository -> speed improvement -- removed --args switch, added --margs and --aargs switches for pkgmk and - pkgadd respectively - -* 0.2.4 24.06.2002 Johannes Winkelmann -- fixed segfault when having cyclic dependecies - -* 0.2.3 24.06.2002 Johannes Winkelmann -- added --config=<conffile> option -- added prt-get update feature -- added prt-get quickdep feature -- added prt-get diff feature - -* 0.2.2 24.06.2002 Johannes Winkelmann -- Fixed segfault in depends - -* 0.2.1 23.06.2002 Johannes Winkelmann -- added config file /etc/prt-get.conf - -* 0.2 22.06.2002 Johannes Winkelmann -- C++ port - -* 0.1.1 22.06.2002 Johannes Winkelmann -- moved install to InstallTransaction - -* 0.1 21.06.2002 Johannes Winkelmann -- First release Copied: tools/prt-get/branches/prt-get-5.13/ChangeLog (from rev 1846, tools/prt-get/trunk/ChangeLog) =================================================================== --- tools/prt-get/branches/prt-get-5.13/ChangeLog (rev 0) +++ tools/prt-get/branches/prt-get-5.13/ChangeLog 2006-09-08 18:05:30 UTC (rev 1849) @@ -0,0 +1,396 @@ +* 0.5.13 08.09.2006 Johannes Winkelmann +- Show undecided versions in diff and sysup when using "prefer higher" +- fix display bug in "dependent" +- fix bug in version comparator +- Simplify output of 'dup', suggested by maro (-v -> old format) + +* 0.5.12 00.04.2006 Johannes Winkelmann +- Add 'depinst' in 'help' (thanks Simone) +- Fix compilation on OpenBSD +- Show alias info in depends +- don't install alias file and deplist +- unlock ports on remove +- fix lock: previously locking would only work for ports in the ports tree +- allow to remove log files of successful builds +- print update summary right before running the addcommand +- print full add command and PACKAGE_DIR info when using install/update -v +- Make 'cat' and 'readme' use $PAGER if set +- update default prt-get.conf to reflect new port hierarchy (core/opt/contrib) +- add timestamps to log files +- fix aliasing bug introduce earlier in the .12 session (thanks Mark) +- add --recursive and --tree for dependent +- add listorphans command + +* 0.5.11 29.05.2005 Johannes Winkelmann +- add --path to 'ls' +- initial regex support +- replace `uname -r` and `date +...` in version strings +- add 'useregex' config key and --regex command line argument +- Add --full to fsearch +- use regex in fsearch if requested +- add leading slash to fsearch result +- support both `` and $() +- support date patterns like '+%Y' +- add aliases and deplist to dist-tarball +- support multiple shell patterns in version + +* 0.5.10 21.04.2005 Johannes Winkelmann +- fix bugs #3735, #3836 +- implement --ignore=<port1>,<port2> feature +- fix --path for list, search +- add --path for depends +- enable logfile and depfile in default prt-get.conf + + +* 0.5.9 06.12.2005 Johannes Winkelmann +- add alias support +- use absolut pathes for commands (pkgmk et al) +- add -v switch to 'info' to show the readme +- fix 'keephigher' in default prt-get.conf +- add deptree to 'help' +- remove some debug test +- prettify error message when packages are not found +- change 'bash' to 'sh' in process.cpp +- use 'Pkgfile' as default file for cat and edit if no second argument given + +* 0.5.8 31.10.2004 Johannes Winkelmann +- re-enable version parseing; use --prefer-higher to make prt-get use + it +- implement shortcuts to frequentily used pkgmk/pkgadd options +- make -f do 'pkgadd -f' +- add new versioncomparator class +- implement 'alpha' < 'beta' < 'gamma' < 'delta' + +* 0.5.7 16.07.2004 Johannes Winkelmann +- add the --install-root argument to allow installation to a different root +- add the --rargs switch to pass options to pkgmk in "prt-get remove" +- add 'removecommand' configuration key +- add 'runscriptcommand' configuration key +- improve config parsing: options can now be in front of command + +* 0.5.6 06.01.2004 Johannes Winkelmann +- add four new command line arguments: + --no-std-config Don't parse default configuration file + --config-prepend=<string> Prepend <string> to configuration + --config-append=<string> Append <string> to configuration + --config-set=<string> Set configuration data, overriding config file +- add new command: dumpconfig +- respect 'cachefile' setting in configuration (did anyone ever use this??) +- add 'runscripts' configuration variable to (equivalent to --install-scripts) +- dump readme and runscripts configuration in dumpConfig() +- add 'makecommand' and 'addcommand' to config file to make prt-get use + another command than pkgmk and pkgadd + +* 0.5.5p1 23.03.2004 Johannes Winkelmann +- Let Pkgfile's dependencies take precedence over deplist + +* 0.5.5 05.03.2004 Johannes Winkelmann +- Add new configuration option: depfile +- add way to use external dependency file +- Add some missing headers for compilation with gcc 2.95 +- update bash completion for isinst +- add deptree command (--all for all deps) + +* 0.5.4p2 17.11.2003 Johannes Winkelmann +- fix bug in "at least X arguments" after getting several complaints + +* 0.5.4p1 30.10.2003 Johannes Winkelmann +- fix message when called without argument +- Fix duplicate prtdir ignoring error (when using filters) + +* 0.5.4 04.10.2003 Johannes Winkelmann +- introduce symbolic return values +- code: introduce generic argument number checks +- (re)introduce depinst command +- fix problem with prt-get fsearch: symlink'ed files are found as well +- print output while logging (Patch from Logan) +- redirect output of InstallTransaction::installPackage to log file +- add %v (version) and %r (release) patterns to the log file name +- fix typo in man page: %d in printf used for desc and deps +- check for pre-install and post-install + - store in cache (-> cache version update) + - show in prt-get info + - enable in prt-get printf, using %E (prE) and %O (pOst) + +* 0.5.3p2 29.09.2003 Johannes Winkelmann +- Fix little bug in prt-get printf: don't print out empty lines (even if + there's a newline char) + +* 0.5.3p1 25.09.2003 Johannes Winkelmann +- Adapt new patch naming +- Be more clever when calling prt-get diff with a filter + +* 0.5.3 01.09.2003 Johannes Winkelmann +- Add 'remove' feature +- implement pre/post install execution +- prt-get diff doesn't display locked; use --all if you want them +- Fix bug in repository initialization when pkgdirs were specified twice + +* 0.5.2 not used ;-) + +* 0.5.1a 08.08.2003 Johannes Winkelmann +- Fix for gcc 3.3 + +* 0.5.1 09.07.2003 Johannes Winkelmann +- use PKGMK_PACKAGE_DIR + +* 0.5.0 22.06.2003 Johannes Winkelmann +- update to fit new CLC project +(pre3) +- made bash completion work with ls, cat and edit +(pre2) +- sort ls output +(pre1) +- introduced new commands: ls, cat, edit +- fixed an empty error message in argparser + +* 0.4.4c 08.05.2003 Johannes Winkelmann +- Fixed an ugly bug: no error messages shown when logging enabled + + +* 0.4.4b 08.05.2003 Johannes Winkelmann +- Change mode of created directories from 0711 to 0755 + +* 0.4.4a 05.05.2003 Johannes Winkelmann +- Change $PKGDEST to $PACKAGE_DIR + +* 0.4.4 01.05.2003 Johannes Winkelmann +- add support for PKGDEST +- add lock/unlock and listlocked commands +- better parsing of arguments +- small update of the argument parser + +* Reimported after disk crash; 07.04.2003 + +* 0.4.3 18.02.2003 Johannes Winkelmann +- fixed bug in dependent: it split the list wrongly +- new command: fsearch: search for file names in ports tree +- speed fix in Package: don't load() in name() and path() +- cosmetical changes to the help screen + +* 0.4.2a 06.02.2003 Johannes Winkelmann +- fixed bug in dependent: it looked just for a substring, so pkgconfig whould + also be a match for 'dependent gconf', as it contains gconf... + +* 0.4.2 06.02.2003 Johannes Winkelmann +- Fixed a segfault when no pkg database file available + +* 0.4.1 20.01.2003 Johannes Winkelmann +- added small speed fix to printDiff +- added missing include in configuration.cpp +- enable clc ports by default +- added misc dir to DIST + +* 0.4.0pre2 14.01.2003 Johannes Winkelmann +- fixed segfault when no m_currentTransaction + +* 0.4.0pre2 13.01.2003 Johannes Winkelmann +- fixed --listall -> --all switch on help page +- completed SignalDispatcher +- made PrtGet a SubClass of SignalHandler +- feedback on Ctrl-C +- fixed performance problems by not copying lists + +* 0.4.0pre1 13.01.2003 Johannes Winkelmann +- update man page + + +* 0.4.0alpha4 13.01.2003 Johannes Winkelmann +- removed find command +- list can have a wildcard filter +- renamed --listall switch to --all for dependent +- implemented wildcards for listinst + +* 0.4.0alpha3 13.01.2003 Johannes Winkelmann +- added --listall switch for dependent; don't show only installed ports +- corrected help once more +- added LockFile class +- added check for Pkgfile in Port directory +- added expandWildcard*() methods +- enabled wildcards for diff +- implemented 'current' command + +* 0.4.0alpha2 05.01.2003 Johannes Winkelmann +- added --filter="..." option used in printf +- added sysup command (refactoring required) +- updated help output +- added signal dispatcher +- new cache file format (newline separated) +- cache file versioning +- support for maintainer and packager in info and printf +- support for hasReadme in printf +- fixed bug in Pkgfile parser (whitespaces before version, name and rev) +- better format for prt-get help + +* 0.4.0alpha1 04.01.2003 Johannes Winkelmann +- added find command (searching using wildcards), +- Repository::getMatchingPackages() (wildcard match) +- added data object for package + + +* 0.3.5c 28.12.2002 Johannes Winkelmann +- fixed bug: pkgadd was called even if pkgmk failed... there since 0.3.4 + +* 0.3.5b 28.12.2002 Johannes Winkelmann +- fixed bug in writeCache() + +* 0.3.5a 23.12.2002 Johannes Winkelmann +- dependent -> help page + + +* 0.3.5 04.12.2002 Johannes Winkelmann +- added readme command +- info shows whether there is a README file +- added readme info to cache file (-> new format) +- added (README) to install/update output +- fixed a memory leak +- introduced configuration object +- exchanged result printing order ("Packages already installed" before + "Packages installed now" +- added dependent command: show which packages depend on argument +- corrected ugly copy and paste errors in "<command> takes only one arg..." +- added misc/prt-edit (not installed) +- new manual format, not included anymore + + +* 0.3.4c 02.12.2002 Johannes Winkelmann +- corrected typo in manual +- added logging options to default prt-get.conf +- added --sort option for printf + +* 0.3.4b 02.12.2002 Johannes Winkelmann +- printf replaces \t and \n +- small change in StringHelper::replaceAll() +- listinst -vv prints description +- listinst documentation update +- --log doc update +- cleanups (using StringHelper::replaceAll()) +- add bash completion file + +* 0.3.4a 30.11.2002 Johannes Winkelmann +- small change in printf (%i expands to "diff") + +* 0.3.4 10.11.2002 Johannes Winkelmann +- implemented new printf function +- corrected usage output (removed "," characters) +- added StringHelper::replaceAll(..) +- log feature +- added %p in logfile + +* 0.3.3 27.08.2002 Johannes Winkelmann +- implemented a returnValue() method in PrtGet +- prt-get isinst no longer returns "... is not installed" to be more + consistent with "pkginfo -i|grep ...", but returns 1 when a package is not + installed (1 = general error). +- allow dependencies to be commented out when starting with #. THINK ABOUT + THIS SOME MORE + +* 0.3.2 15.07.2002 Johannes Winkelmann +- changed example prt-get.conf again +- added another example to the manual +- added doxygen api documentation +- various code cleanups +- output fix for prt-get diff (title not printed if no difference) +- added tests for process and stringhelper class +- added _very_ simple version checking in prt-get diff +- return values on errors (=1) +- no output for prt-get isinst if package not installed (to be consistent with + pkginfo) +- gcc 3.2 fixes + + +* 0.3.1a 15.07.2002 Johannes Winkelmann +- changed example prt-get.conf to meet the new format... + +* 0.3.1 13.07.2002 Johannes Winkelmann +- Fixed some conditions where Valgrind reported errors + +* 0.3.1pre2 10.07.2002 Johannes Winkelmann +- Fixed another bug in the process execution +- proper implementation of process execution :-) +- improved StringHelper::split() + +* 0.3.1pre1 08.07.2002 Johannes Winkelmann +- listinst +- new config file format (can use alternate location for cache) +- removed depinst skeletion + +* 0.3.0 05.07.2002 Johannes Winkelmann +- added cache feature +- moved string functions to stringhelper +- Makefile.am includes code to create a symlink from prt-get to prt-cache +- If prt-get is called as prt-cache, it uses the caching all the time +- added man page for prt-cache +- added package filter functionality in prt-get-conf +- added man page for prt-get.conf +- comments are removed in prt-get.conf +- added check whether cache is outdated (config file changed after cache + generated) +- added check for 'prt-get diff <packagelist>' that the packages listed + are really installed +- added path command +- print errors to stderr +- always exit( -1 ) on error + +* 0.3.0pre2 03.07.2002 Johannes Winkelmann +- Fixed bug when release or version had a comment on the same line + +* 0.3.0pre1 02.07.2002 Johannes Winkelman +- Changed format of TODO, so others can understand it as well :-) +- added version command + +* 0.2.9 01.07.2002 Johannes Winkelmann +- If files are rejected during update, prt-get no longer says "update failed" +- implemented dsearch feature (to search descriptions) +- Fixed a bug in prt-get depends (empty listing instead of warning when + invalid package given) + +* 0.2.8 30.06.2002 Johannes Winkelmann +- moved to autoconf/automake + +* 0.2.7 28.06.2002 Johannes Winkelmann +- added a man page +- adjusted message of install/update +decided to go up to .7, as I made some errors in the release of .6 + + +* 0.2.6 28.06.2002 Johannes Winkelmann +- added --test switch: doing no installation, just prints out the result +- added quickdiff feature, printing out a list of installed packages to be + updated: use it for prt-get update `prt-get quickdiff` + + +* 0.2.5 28.06.2002 Johannes Winkelmann +- removed depinst feature (maybe reimplemented soon) +- it is now possible to pass a list of arguments to + prt-get install + prt-get depends/quickdep +- implemented -v and -vv in prt-get list +- implemented -v for prt-get search (show description as well) +- lazy initialization of repository -> speed improvement +- removed --args switch, added --margs and --aargs switches for pkgmk and + pkgadd respectively + +* 0.2.4 24.06.2002 Johannes Winkelmann +- fixed segfault when having cyclic dependecies + +* 0.2.3 24.06.2002 Johannes Winkelmann +- added --config=<conffile> option +- added prt-get update feature +- added prt-get quickdep feature +- added prt-get diff feature + +* 0.2.2 24.06.2002 Johannes Winkelmann +- Fixed segfault in depends + +* 0.2.1 23.06.2002 Johannes Winkelmann +- added config file /etc/prt-get.conf + +* 0.2 22.06.2002 Johannes Winkelmann +- C++ port + +* 0.1.1 22.06.2002 Johannes Winkelmann +- moved install to InstallTransaction + +* 0.1 21.06.2002 Johannes Winkelmann +- First release Deleted: tools/prt-get/branches/prt-get-5.13/Makefile.in =================================================================== --- tools/prt-get/trunk/Makefile.in 2006-04-04 15:39:45 UTC (rev 1137) +++ tools/prt-get/branches/prt-get-5.13/Makefile.in 2006-09-08 18:05:30 UTC (rev 1849) @@ -1,580 +0,0 @@ -# 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 = : -subdir = . -DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/config.h.in \ - $(top_srcdir)/configure AUTHORS ChangeLog INSTALL TODO depcomp \ - install-sh missing mkinstalldirs -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.in -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 = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_HEADER = 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 -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 -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -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@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_STRIP = @ac_ct_STRIP@ -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_alias = @build_alias@ -datadir = @datadir@ -exec_prefix = @exec_prefix@ -host_alias = @host_alias@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -AUTOMAKE_OPTIONS = foreign -MAINTAINERCLEANFILES = aclocal.m4 config.h.in configure Makefile.in stamp-h.in -SUBDIRS = src doc misc -EXTRA_DIST = CREDITS FAQ LICENSE -all: config.h - $(MAKE) $(AM_MAKEFLAGS) 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) --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 -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) config.h.in $(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) 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: ctags-recursive $(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 - 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 config.h -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." - -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) -clean: clean-recursive - -clean-am: clean-generic mostlyclean-am - -distclean: distclean-recursive - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-hdr 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 $(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 - -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 am--refresh check \ - check-am clean clean-generic clean-recursive ctags \ - ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-shar \ - dist-tarZ dist-zip distcheck distclean distclean-generic \ - distclean-hdr 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-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic maintainer-clean-recursive \ - mostlyclean mostlyclean-generic 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: Copied: tools/prt-get/branches/prt-get-5.13/Makefile.in (from rev 1846, tools/prt-get/trunk/Makefile.in) =================================================================== --- tools/prt-get/branches/prt-get-5.13/Makefile.in (rev 0) +++ tools/prt-get/branches/prt-get-5.13/Makefile.in 2006-09-08 18:05:30 UTC (rev 1849) @@ -0,0 +1,587 @@ +# 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 = : +subdir = . +DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(srcdir)/config.h.in \ + $(top_srcdir)/configure AUTHORS ChangeLog INSTALL TODO depcomp \ + install-sh missing mkinstalldirs +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.in +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 = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = 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 +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 +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +GREP = @GREP@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +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@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +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_alias = @build_alias@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host_alias = @host_alias@ +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 = foreign +MAINTAINERCLEANFILES = aclocal.m4 config.h.in configure Makefile.in stamp-h.in +SUBDIRS = src doc misc +EXTRA_DIST = CREDITS FAQ LICENSE +all: config.h + $(MAKE) $(AM_MAKEFLAGS) 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) --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 +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) config.h.in $(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) 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: ctags-recursive $(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 + 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 config.h +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." + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +clean: clean-recursive + +clean-am: clean-generic mostlyclean-am + +distclean: distclean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-hdr 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 $(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 + +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 am--refresh check \ + check-am clean clean-generic clean-recursive ctags \ + ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-shar \ + dist-tarZ dist-zip distcheck distclean distclean-generic \ + distclean-hdr 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-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic maintainer-clean-recursive \ + mostlyclean mostlyclean-generic 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: Deleted: tools/prt-get/branches/prt-get-5.13/TODO =================================================================== --- tools/prt-get/trunk/TODO 2006-04-04 15:39:45 UTC (rev 1137) +++ tools/prt-get/branches/prt-get-5.13/TODO 2006-09-08 18:05:30 UTC (rev 1849) @@ -1,140 +0,0 @@ -- use `eval $(fgrep -h 'PKGMK_PACKAGE_DIR=' $(which pkgmk) /etc/pkgmk.conf) && echo -$PKGMK_PACKAGE_DIR` to determine PACKAGE_DIR -- store former information version first, and print before pkgadd: - "updating X from /usr/ports/Y: n -> n+m" -- add update-footprint, update-md5sum commands (patch in trac) -- allow dependency injection for sysup, with previews -- prefer toolchain (patch in trac) -- dependent --list-orphaned; should simplify pkgfoster - -============================================================================== - - - - - - - - -- add support to "prefer higher" for certain packages ? - - - - -next release: -- configuration override/extend - [20:01] <cptn> --config-add="prtdir /tmp" even - [20:01] <cptn> --config-set="logfile /tmp/%n.log" - [20:14] <cptn> prt-get --config-set="prtdir /tmp" \ - --config-add="prtdir /usr" - [20:14] <cptn> the 'set' would delete the config file's prtdir settings - -Don't bail out if no prt-get.conf is found if the user specified ---config-* options - -enum KindOfConfig {ADD, SET} -argparser: user addConfig(string, KindOfConfig); -config: go through additional configuration options; add and/or replace - - - -1.0.0 - -- sysup - - allow injecting of new (uninstalled) dependencies - - allow to prohibit recompilation of packages when a dependency failed - to be updated in this sysup run - -- better reports (installed/failed/not even tried to install) -[ ] message log for prt-get messages ? -[ ] timestamps for the log file -[ ] --quiet mode; suppress output of pkgmk and pkgadd -[ ] prt-get diff stats: "100 Packages with differences" - ---------------------------- - -later - -- parallel download (mt) -- download only -- group support -- Actions/Commands - - Help per command -- Dynamic command binding -- Make InstallTransaction a real install transaction: - - rollback pre-install if package building failed - - needs heavy refactoring to be easier to understand/maintain -- Test mode: global (is duplicated right now) -- remove should be in a transaction as well - - remove transaction - - install transaction - - etc. - - Transaction handler -- better examples for man page -- reorder message to avoid losing the important bits when installing - _lots_ of packages; maybe also think about forgeting not so - important things like packages installed before etc - -[ ] prt-get rm and cd -[ ] cache file class, help class -[ ] interrupt handler (ctrl-c) kill pkgmk/pkgadd, delete lock files, say - "prt-get: action cancelled"; warn when cancel during download -> - STATE variable, separate download and build. -[ ] lock files for log, cache (lock file class) -[ ] move command name out of execTransaction (would be wrong for e.g. - sysup) - - -SHORT TERM ------------- - -* Answer FAQs - -* create a fileExists(), createDir() etc helper class - -* questions - - should the install/update result include the version/release? - -* cosmetic - - move all output messages to prtget.cpp (away from main.cpp) - - remove "using namespace std" from header file - -* test - - add asserts - -* functional - - check exit messages (strings). always add 'prt-get' - -* refactor - - check operations in prtget.cpp for common code - - make InstallTransaction more modular (download/build/install) - -LONG TERM ------------------------------- -* remove quickdiff -* move find command into list --filter="..." ??? - -* symbolic exit codes - -* new commands: - -* questions: - - should there be a install/update mixed to mode, to install and update, - which ever method is needed? - - namespace prtget ? - - remove the path:package1, package2 filter functionality from the - config file again. This could be done by creating another ports - directories an creation symlinks there to. Could improve performance - - might people like ansi colors? - -* new features - - list shadow packages (dup) for arguments - -* - rebuild all ports using dependency information - - -LONG LONG TERM --------------- -- parallel download for installing/updating multiple packages (at least - download of 2nd package while building first) - Copied: tools/prt-get/branches/prt-get-5.13/TODO (from rev 1846, tools/prt-get/trunk/TODO) =================================================================== --- tools/prt-get/branches/prt-get-5.13/TODO (rev 0) +++ tools/prt-get/branches/prt-get-5.13/TODO 2006-09-08 18:05:30 UTC (rev 1849) @@ -0,0 +1,65 @@ +- add --rebuild-set to dependent +- use `eval $(fgrep -h 'PKGMK_PACKAGE_DIR=' $(which pkgmk) /etc/pkgmk.conf) && echo +$PKGMK_PACKAGE_DIR` to determine PACKAGE_DIR +- allow dependency injection for sysup, with previews +- prefer toolchain (patch in trac) +- logging: check for non-root owned symlinks +- logging: reject relative logfile names +- parallel build and download +- download command +- rewrite arg parser + +CONSIDER: + +- default formats for printf and dup +- add update-footprint, update-md5sum commands (patch in trac) +- sysup + - allow injecting of new (uninstalled) dependencies + - allow to prohibit recompilation of packages when a dependency failed + to be updated in this sysup run +- big command consolidation + + prt-get dep|depends [--tree|-T] [--recursive|-R] [--quick|-Q] + so + depends -> dep + current depends -> dep -R + quickdep -> dep -Q + deptree -> dep -T + + Similar for other commands + + +OLD NOTES: + +- --quiet mode; suppress output of pkgmk and pkgadd +- prt-get diff stats: "100 Packages with differences" +- Make InstallTransaction a real install transaction: + - rollback pre-install if package building failed + - needs heavy refactoring to be easier to understand/maintain +- Test mode: global (is duplicated right now) +- remove should be in a transaction as well + - remove transaction + - install transaction + - etc. + - Transaction handler +- better examples for man page +- reorder message to avoid losing the important bits when installing + _lots_ of packages; maybe also think about forgeting not so + important things like packages installed before etc + +- interrupt handler (ctrl-c) kill pkgmk/pkgadd, delete lock files, say + "prt-get: action cancelled"; warn when cancel during download -> + STATE variable, separate download and build. +- move command name out of execTransaction (would be wrong for e.g. + sysup) + +- symbolic exit codes + +* questions: + - should there be a install/update mixed to mode, to install and update, + which ever method is needed? + - namespace prtget ? + - remove the path:package1, package2 filter functionality from the + config file again. This could be done by creating another ports + directories an creation symlinks there to. Could improve performance + - might people like ansi colors? Deleted: tools/prt-get/branches/prt-get-5.13/configure =================================================================== --- tools/prt-get/trunk/configure 2006-04-04 15:39:45 UTC (rev 1137) +++ tools/prt-get/branches/prt-get-5.13/configure 2006-09-08 18:05:30 UTC (rev 1849) @@ -1,5917 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59. -# -# Copyright (C) 2003 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 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+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix -fi -DUALCASE=1; export DUALCASE # for MKS sh - -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - - -# Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH -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 - fi -done - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; 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'` - - -# PATH needs CR, and LINENO needs CR and PATH. -# 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 - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - 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 - - ;; - 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_me: error: cannot find myself; rerun with an absolute path" >&2 - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') - 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=. - for as_base in sh bash ksh sh5; do - case $as_dir in - /*) - if ("$as_dir/$as_base" -c ' - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac - - # 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 before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, 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 - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | - sed ' - N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, - t loop - s,-$,, - s,^['$as_cr_digits']*\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 sensible to this). - . ./$as_me.lineno - # Exit status is that of the last command. - exit -} - - -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; -esac - -if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links - as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi -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$$.file - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -as_executable_p="test -f" - -# 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'" - - -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - - -# 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` - -exec 6>&1 - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_config_libobj_dir=. -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} - -# Maximum number of lines to put in a shell here document. -# This variable seems obsolete. It should probably be removed, and -# only ac_max_sed_lines should be used. -: ${ac_max_here_lines=38} - -# Identity of this package. -PACKAGE_NAME= -PACKAGE_TARNAME= -PACKAGE_VERSION= -PACKAGE_STRING= -PACKAGE_BUGREPORT= - -ac_unique_file="src/prtget.cpp" -ac_default_prefix=/usr -# Factoring default headers for most tests. -ac_includes_default="\ -#include <stdio.h> -#if HAVE_SYS_TYPES_H -# include <sys/types.h> -#endif -#if HAVE_SYS_STAT_H -# include <sys/stat.h> -#endif -#if STDC_HEADERS -# include <stdlib.h> -# include <stddef.h> -#else -# if HAVE_STDLIB_H -# include <stdlib.h> -# endif -#endif -#if HAVE_STRING_H -# if !STDC_HEADERS && HAVE_MEMORY_H -# include <memory.h> -# endif -# include <string.h> -#endif -#if HAVE_STRINGS_H -# include <strings.h> -#endif -#if HAVE_INTTYPES_H -# include <inttypes.h> -#else -# if HAVE_STDINT_H -# include <stdint.h> -# endif -#endif -#if HAVE_UNISTD_H -# include <unistd.h> -#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 datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar CXX CXXFLAGS LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CC CFLAGS ac_ct_CC CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP LIBOBJS LTLIBOBJS' -ac_subst_files='' - -# 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. -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -libdir='${exec_prefix}/lib' -includedir='${prefix}/include' -oldincludedir='/usr/include' -infodir='${prefix}/info' -mandir='${prefix}/man' - -ac_prev= -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 - - ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_option in - - -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 | --data | --dat | --da) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) - datadir=$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" ;; - - -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'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac - 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 ;; - - -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 ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) - 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 ;; - - -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'` - case $ac_option in - *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; - *) ac_optarg=yes ;; - esac - 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; }; } - ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` - 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 paths. -for ac_var in exec_prefix prefix -do - eval ac_val=$`echo $ac_var` - case $ac_val in - [\\/$]* | ?:[\\/]* | NONE | '' ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; - esac -done - -# Be sure to have absolute paths. -for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ - localstatedir libdir includedir oldincludedir infodir mandir -do - eval ac_val=$`echo $ac_var` - case $ac_val in - [\\/$]* | ?:[\\/]* ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; - esac -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 - - -# 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 its parent. - ac_confdir=`(dirname "$0") 2>/dev/null || -$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 - if test "$ac_srcdir_defaulted" = yes; then - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 - { (exit 1); exit 1; }; } - else - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } - fi -fi -(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || - { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 - { (exit 1); exit 1; }; } -srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` -ac_env_build_alias_set=${build_alias+set} -ac_env_build_alias_value=$build_alias -ac_cv_env_build_alias_set=${build_alias+set} -ac_cv_env_build_alias_value=$build_alias -ac_env_host_alias_set=${host_alias+set} -ac_env_host_alias_value=$host_alias -ac_cv_env_host_alias_set=${host_alias+set} -ac_cv_env_host_alias_value=$host_alias -ac_env_target_alias_set=${target_alias+set} -ac_env_target_alias_value=$target_alias -ac_cv_env_target_alias_set=${target_alias+set} -ac_cv_env_target_alias_value=$target_alias -ac_env_CXX_set=${CXX+set} -ac_env_CXX_value=$CXX -ac_cv_env_CXX_set=${CXX+set} -ac_cv_env_CXX_value=$CXX -ac_env_CXXFLAGS_set=${CXXFLAGS+set} -ac_env_CXXFLAGS_value=$CXXFLAGS -ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set} -ac_cv_env_CXXFLAGS_value=$CXXFLAGS -ac_env_LDFLAGS_set=${LDFLAGS+set} -ac_env_LDFLAGS_value=$LDFLAGS -ac_cv_env_LDFLAGS_set=${LDFLAGS+set} -ac_cv_env_LDFLAGS_value=$LDFLAGS -ac_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_env_CPPFLAGS_value=$CPPFLAGS -ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} -ac_cv_env_CPPFLAGS_value=$CPPFLAGS -ac_env_CC_set=${CC+set} -ac_env_CC_value=$CC -ac_cv_env_CC_set=${CC+set} -ac_cv_env_CC_value=$CC -ac_env_CFLAGS_set=${CFLAGS+set} -ac_env_CFLAGS_value=$CFLAGS -ac_cv_env_CFLAGS_set=${CFLAGS+set} -ac_cv_env_CFLAGS_value=$CFLAGS -ac_env_CPP_set=${CPP+set} -ac_env_CPP_value=$CPP -ac_cv_env_CPP_set=${CPP+set} -ac_cv_env_CPP_value=$CPP - -# -# 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 this package 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 \`..'] - -_ACEOF - - cat <<_ACEOF -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] - --datadir=DIR read-only architecture-independent data [PREFIX/share] - --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] - --infodir=DIR info documentation [PREFIX/info] - --mandir=DIR man documentation [PREFIX/man] -_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 -_ACEOF -fi - -if test -n "$ac_init_help"; then - - 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 - -Some influential environment variables: - CXX C++ compiler command - CXXFLAGS C++ compiler flags - LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a - nonstandard directory <lib dir> - CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have - headers in a nonstandard directory <include dir> - CC C compiler command - CFLAGS C compiler flags - CPP C preprocessor - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -_ACEOF -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - ac_popdir=`pwd` - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d $ac_dir || continue - ac_builddir=. - -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi - -case $srcdir in - .) # No --srcdir option. We are building in place. - ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac - -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac - - cd $ac_dir - # Check for guested configure; otherwise get Cygnus style 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 - elif test -f $ac_srcdir/configure.ac || - test -f $ac_srcdir/configure.in; then - echo - $ac_configure --help - else - echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi - cd $ac_popdir - done -fi - -test -n "$ac_init_help" && exit 0 -if $ac_init_version; then - cat <<\_ACEOF - -Copyright (C) 2003 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 0 -fi -exec 5>config.log -cat >&5 <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by $as_me, which was -generated by GNU Autoconf 2.59. Invocation command line was - - $ $0 $@ - -_ACEOF -{ -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` -hostinfo = `(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 - -} >&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_sep= -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_sep'$ac_arg'" - # Get rid of the leading space. - ac_sep=" " - ;; - 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: Be sure not to use single quotes in there, as some shells, -# such as our DU 5.0 friend, will then `close' the trap. -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, -{ - (set) 2>&1 | - case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in - *ac_space=\ *) - sed -n \ - "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" - ;; - *) - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" - ;; - esac; -} - echo - - cat <<\_ASBOX -## ----------------- ## -## Output variables. ## -## ----------------- ## -_ASBOX - echo - for ac_var in $ac_subst_vars - do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" - done | sort - echo - - if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------- ## -## Output files. ## -## ------------- ## -_ASBOX - echo - for ac_var in $ac_subst_files - do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" - done | sort - echo - fi - - if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## -## confdefs.h. ## -## ----------- ## -_ASBOX - echo - sed "/^$/d" confdefs.h | sort - echo - fi - test "$ac_signal" != 0 && - echo "$as_me: caught signal $ac_signal" - echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core && - rm -rf 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 -rf conftest* confdefs.h -# AIX cpp loses on an empty file, so make sure it contains at least a newline. -echo >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 -z "$CONFIG_SITE"; then - if test "x$prefix" != xNONE; then - CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" - else - CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" - fi -fi -for ac_site_file in $CONFIG_SITE; 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 `(set) 2>&1 | - sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; 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 - - - - - - - - - - - - - - - - - - - - -am__api_version="1.9" -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 -ac_config_guess="$SHELL $ac_aux_dir/config.guess" -ac_config_sub="$SHELL $ac_aux_dir/config.sub" -ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. - -# 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 $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - done - done - ;; -esac -done - - -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. We don't cache a - # path for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the path is relative. - 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 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 $as_executable_p "$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 - -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 dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` -if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.make <<\_ACEOF -all: - @echo 'ac_maketemp="$(MAKE)"' -_ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. -eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` -if test -n "$ac_maketemp"; then - eval ac_cv_prog_make_${ac_make}_set=yes -else - eval ac_cv_prog_make_${ac_make}_set=no -fi -rm -f conftest.make -fi -if eval "test \"`echo '$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=prt-get - VERSION=0.5.12pre - - -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 $as_executable_p "$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 - -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 $as_executable_p "$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 - - test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" -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 - - STRIP=$ac_ct_STRIP -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 -' - - - - - - - -test x$prefix = "xNONE" && prefix="$ac_default_prefix" - -# Checks for programs. -ac_ext=cc -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 -n "$ac_tool_prefix"; then - for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl 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 $as_executable_p "$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 - -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 $CCC g++ c++ gpp aCC CC cxx cc++ cl 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 $as_executable_p "$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 - -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 -test -n "$ac_ct_CXX" || ac_ct_CXX="g++" - - CXX=$ac_ct_CXX -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` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5 - (eval $ac_compiler --version </dev/null >&5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5 - (eval $ac_compiler -v </dev/null >&5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5 - (eval $ac_compiler -V </dev/null >&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[^ ]*//'` -if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 - (eval $ac_link_default) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # Find the output, starting from the most likely. This scheme is -# not robust to junk in `.', hence go to wildcards (a.*) only as a last -# resort. - -# Be careful to initialize this variable, since it used to be cached. -# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. -ac_cv_exeext= -# b.out is created by i960 compilers. -for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) - ;; - conftest.$ac_ext ) - # This is the source file. - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - # FIXME: I believe we export ac_cv_exeext for Libtool, - # but it would be cool to find out if it's true. Does anybody - # maintain Libtool? --akim. - export ac_cv_exeext - break;; - * ) - break;; - esac -done -else - 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 -echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6 - -# Check 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' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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 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 { (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); }; 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 | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - export ac_cv_exeext - 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 { (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 - for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; - *) 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_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 { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; 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 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 -CXXFLAGS="-g" -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 - 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 { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cxx_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_prog_cxx_g=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -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 -for ac_declaration in \ - '' \ - 'extern "C" void std::exit (int) throw (); using std::exit;' \ - 'extern "C" void std::exit (int); using std::exit;' \ - 'extern "C" void exit (int) throw ();' \ - 'extern "C" void exit (int);' \ - 'void exit (int);' -do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -#include <stdlib.h> -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -continue -fi -rm -f conftest.err conftest.$ac_objext 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. */ -$ac_declaration -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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); } && - { ac_try='test -z "$ac_cxx_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -rm -f conftest* -if test -n "$ac_declaration"; then - echo '#ifdef __cplusplus' >>confdefs.h - echo $ac_declaration >>confdefs.h - echo '#endif' >>confdefs.h -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 -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 or --disable-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="$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 - - -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 $as_executable_p "$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 - -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 $as_executable_p "$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 - -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 - - CC=$ac_ct_CC -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 $as_executable_p "$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 - -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 "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_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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -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 - - CC=$ac_ct_CC -else - CC="$ac_cv_prog_CC" -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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -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 - 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 $as_executable_p "$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 - -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 -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 $as_executable_p "$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 - -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 - - CC=$ac_ct_CC -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` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5 - (eval $ac_compiler --version </dev/null >&5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5 - (eval $ac_compiler -v </dev/null >&5) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5 - (eval $ac_compiler -V </dev/null >&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 { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; 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 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 -CFLAGS="-g" -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 - 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 { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_prog_cc_g=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -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 ANSI C" >&5 -echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 -if test "${ac_cv_prog_cc_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_prog_cc_stdc=no -ac_save_CC=$CC -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <stdarg.h> -#include <stdio.h> -#include <sys/types.h> -#include <sys/stat.h> -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std1 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 -std1. */ -int osf4_cc_array ['\x00' == 0 ? 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 -# Don't try gcc -ansi; that turns off useful extensions and -# breaks some systems' header files. -# AIX -qlanglvl=ansi -# Ultrix and OSF/1 -std1 -# HP-UX 10.20 and later -Ae -# HP-UX older versions -Aa -D_HPUX_SOURCE -# SVR4 -Xc -D__EXTENSIONS__ -for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_stdc=$ac_arg -break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext -done -rm -f conftest.$ac_ext conftest.$ac_objext -CC=$ac_save_CC - -fi - -case "x$ac_cv_prog_cc_stdc" in - x|xno) - echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6 ;; - *) - echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 - CC="$CC $ac_cv_prog_cc_stdc" ;; -esac - -# Some people use a C++ compiler to compile C. Since we use `exit', -# in C++ we need to declare it. In case someone uses the same compiler -# for both compiling C and C++ we need to have the C++ compiler decide -# the declaration of exit, since it's the most demanding environment. -cat >conftest.$ac_ext <<_ACEOF -#ifndef __cplusplus - choke me -#endif -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - for ac_declaration in \ - '' \ - 'extern "C" void std::exit (int) throw (); using std::exit;' \ - 'extern "C" void std::exit (int); using std::exit;' \ - 'extern "C" void exit (int) throw ();' \ - 'extern "C" void exit (int);' \ - 'void exit (int);' -do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -#include <stdlib.h> -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -continue -fi -rm -f conftest.err conftest.$ac_objext 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. */ -$ac_declaration -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -rm -f conftest* -if test -n "$ac_declaration"; then - echo '#ifdef __cplusplus' >>confdefs.h - echo $ac_declaration >>confdefs.h - echo '#endif' >>confdefs.h -fi - -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -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 - - -# 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 $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - done - done - ;; -esac -done - - -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. We don't cache a - # path for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the path is relative. - 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' - - - - -# Checks for libraries. - -# Checks for header files. - - - - - - -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 eval "test \"\${$as_ac_Header+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 <sys/types.h> -#include <$ac_hdr> - -int -main () -{ -if ((DIR *) 0) -return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; 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 conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&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 -ac_cv_search_opendir=no -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char opendir (); -int -main () -{ -opendir (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_opendir="none required" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test "$ac_cv_search_opendir" = no; then - for ac_lib in dir; do - LIBS="-l$ac_lib $ac_func_search_save_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 gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char opendir (); -int -main () -{ -opendir (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_opendir="-l$ac_lib" -break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done -fi -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 -if test "$ac_cv_search_opendir" != no; then - test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $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 -ac_cv_search_opendir=no -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ - -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char opendir (); -int -main () -{ -opendir (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_opendir="none required" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test "$ac_cv_search_opendir" = no; then - for ac_lib in x; do - LIBS="-l$ac_lib $ac_func_search_save_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 gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char opendir (); -int -main () -{ -opendir (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_opendir="-l$ac_lib" -break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done -fi -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 -if test "$ac_cv_search_opendir" != no; then - test "$ac_cv_search_opendir" = "none required" || LIBS="$ac_cv_search_opendir $LIBS" - -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 -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 <limits.h> to <assert.h> if __STDC__ is defined, since - # <limits.h> exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif - Syntax error -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_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 non-existent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <ac_nonexistent.h> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_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 <limits.h> to <assert.h> if __STDC__ is defined, since - # <limits.h> exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifdef __STDC__ -# include <limits.h> -#else -# include <assert.h> -#endif - Syntax error -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_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 non-existent headers - # can be detected and how. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <ac_nonexistent.h> -_ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_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 egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6 -if test "${ac_cv_prog_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_prog_egrep='grep -E' - else ac_cv_prog_egrep='egrep' - fi -fi -echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 -echo "${ECHO_T}$ac_cv_prog_egrep" >&6 - EGREP=$ac_cv_prog_egrep - - -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 <stdlib.h> -#include <stdarg.h> -#include <string.h> -#include <float.h> - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; 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 conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <string.h> - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then - : -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include <stdlib.h> - -_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 <ctype.h> -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - exit(2); - exit (0); -} -_ACEOF -rm -f conftest$ac_exeext -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); } && { ac_try='./conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&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 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 eval "test \"\${$as_ac_Header+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 { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; 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 conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&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 unistd.h stdio.h sys/types.h sys/stat.h fnmatch.h \ - dirent.h fcntl.h signal.h regex.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 -if eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&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 { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; 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 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 { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_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 the AC_PACKAGE_NAME lists. ## -## ------------------------------------------ ## -_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 eval "test \"\${$as_ac_Header+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&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 - - -CFLAGS="$CFLAGS $X_CFLAGS" -CXXFLAGS="$CXXFLAGS $X_CFLAGS" -LIBS="$LIBS $X_LIBS" -LDFLAGS="$LDFLAGS $LIBS $X_PRE_LIBS" - -# 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 x; - /* SunOS 4.1.1 cc rejects this. */ - char const *const *ccp; - char **p; - /* 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"; - ccp = &g + (g ? g-g : 0); - /* HPUX 7.0 cc rejects these. */ - ++ccp; - p = (char**) ccp; - ccp = (char const *const *) p; - { /* SCO 3.2v4 cc rejects this. */ - char *t; - char const *s = 0 ? (char *) 0 : (char const *) 0; - - *t++ = 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; - } -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; 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 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 - - -# I hate you autotools -sysconfdir="/etc" -localstatedir="/var" - -# Checks for library functions. - ac_config_headers="$ac_config_headers config.h" - - ac_config_files="$ac_config_files Makefile src/Makefile doc/Makefile misc/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, don't put newlines in cache variables' values. -# 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. -{ - (set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *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 \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" - ;; - esac; -} | - sed ' - t clear - : clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - /^ac_cv_env/!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 "updating cache $cache_file" - cat confcache >$cache_file - else - echo "not updating unwritable cache $cache_file" - 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}' - -# 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 - -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_i=`echo "$ac_i" | - sed 's/\$U\././;s/\.o$//;s/\.obj$//'` - # 2. Add them. - ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs $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__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi -if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi - -: ${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 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+"$@"}'='"$@"' -elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then - set -o posix -fi -DUALCASE=1; export DUALCASE # for MKS sh - -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - - -# Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH -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 - fi -done - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; 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'` - - -# PATH needs CR, and LINENO needs CR and PATH. -# 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 - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" || { - # Find who we are. Look in the path if we contain no path at all - # relative or not. - 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 - - ;; - 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_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 -echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} - { (exit 1); exit 1; }; } - fi - case $CONFIG_SHELL in - '') - 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=. - for as_base in sh bash ksh sh5; do - case $as_dir in - /*) - if ("$as_dir/$as_base" -c ' - as_lineno_1=$LINENO - as_lineno_2=$LINENO - as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then - $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } - $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } - CONFIG_SHELL=$as_dir/$as_base - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$0" ${1+"$@"} - fi;; - esac - done -done -;; - esac - - # 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 before each line; the second 'sed' does the real - # work. The second script uses 'N' to pair each line-number line - # with the numbered line, 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 - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | - sed ' - N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, - t loop - s,-$,, - s,^['$as_cr_digits']*\n,, - ' >$as_me.lineno && - chmod +x $as_me.lineno || - { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 -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 sensible to this). - . ./$as_me.lineno - # Exit status is that of the last command. - exit -} - - -case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in - *c*,-n*) ECHO_N= ECHO_C=' -' ECHO_T=' ' ;; - *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; - *) ECHO_N= ECHO_C='\c' ECHO_T= ;; -esac - -if expr a : '\(a\)' >/dev/null 2>&1; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - # We could just check for DJGPP; but this test a) works b) is more generic - # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). - if test -f conf$$.exe; then - # Don't use ln at all; we don't have any links - as_ln_s='cp -p' - else - as_ln_s='ln -s' - fi -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$$.file - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -as_executable_p="test -f" - -# 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'" - - -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - -exec 6>&1 - -# Open the log real soon, to keep \$[0] and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. Logging --version etc. is OK. -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX -} >&5 -cat >&5 <<_CSEOF - -This file was extended by $as_me, which was -generated by GNU Autoconf 2.59. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -_CSEOF -echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 -echo >&5 -_ACEOF - -# Files that config.status was made for. -if test -n "$ac_config_files"; then - echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_headers"; then - echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_links"; then - echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS -fi - -if test -n "$ac_config_commands"; then - echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS -fi - -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, 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 <bug-autoconf@gnu.org>." -_ACEOF - -cat >>$CONFIG_STATUS <<_ACEOF -ac_cs_version="\\ -config.status -configured by $0, generated by GNU Autoconf 2.59, - with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" - -Copyright (C) 2003 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." -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 - ;; - *) # This is not an option, so the user has probably given explicit - # arguments. - ac_option=$1 - ac_need_defaults=false;; - esac - - case $ac_option in - # Handling of the options. -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --vers* | -V ) - echo "$ac_cs_version"; exit 0 ;; - --he | --h) - # Conflict between --help and --header - { { echo "$as_me:$LINENO: error: ambiguous option: $1 -Try \`$0 --help' for more information." >&5 -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 0 ;; - --debug | --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;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 -Try \`$0 --help' for more information." >&5 -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" ;; - - 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 $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion -fi - -_ACEOF - -cat >>$CONFIG_STATUS <<_ACEOF -# -# INIT-COMMANDS section. -# - -AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" - -_ACEOF - - - -cat >>$CONFIG_STATUS <<\_ACEOF -for ac_config_target in $ac_config_targets -do - case "$ac_config_target" in - # Handling of arguments. - "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; - "doc/Makefile" ) CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; - "misc/Makefile" ) CONFIG_FILES="$CONFIG_FILES misc/Makefile" ;; - "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; - *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -echo "$as_me: error: invalid argument: $ac_config_target" >&2;} - { (exit 1); exit 1; }; };; - esac -done - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason to put it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Create a temporary directory, and hook for its removal unless debugging. -$debug || -{ - trap 'exit_status=$?; rm -rf $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 -q "./confstatXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" -} || -{ - tmp=./confstat$$-$RANDOM - (umask 077 && mkdir $tmp) -} || -{ - echo "$me: cannot create a temporary directory in ." >&2 - { (exit 1); exit 1; } -} - -_ACEOF - -cat >>$CONFIG_STATUS <<_ACEOF - -# -# 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 - # Protect against being on the right side of a sed subst in config.status. - sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; - s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF -s,@SHELL@,$SHELL,;t t -s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t -s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t -s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t -s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t -s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t -s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t -s,@exec_prefix@,$exec_prefix,;t t -s,@prefix@,$prefix,;t t -s,@program_transform_name@,$program_transform_name,;t t -s,@bindir@,$bindir,;t t -s,@sbindir@,$sbindir,;t t -s,@libexecdir@,$libexecdir,;t t -s,@datadir@,$datadir,;t t -s,@sysconfdir@,$sysconfdir,;t t -s,@sharedstatedir@,$sharedstatedir,;t t -s,@localstatedir@,$localstatedir,;t t -s,@libdir@,$libdir,;t t -s,@includedir@,$includedir,;t t -s,@oldincludedir@,$oldincludedir,;t t -s,@infodir@,$infodir,;t t -s,@mandir@,$mandir,;t t -s,@build_alias@,$build_alias,;t t -s,@host_alias@,$host_alias,;t t -s,@target_alias@,$target_alias,;t t -s,@DEFS@,$DEFS,;t t -s,@ECHO_C@,$ECHO_C,;t t -s,@ECHO_N@,$ECHO_N,;t t -s,@ECHO_T@,$ECHO_T,;t t -s,@LIBS@,$LIBS,;t t -s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t -s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t -s,@INSTALL_DATA@,$INSTALL_DATA,;t t -s,@CYGPATH_W@,$CYGPATH_W,;t t -s,@PACKAGE@,$PACKAGE,;t t -s,@VERSION@,$VERSION,;t t -s,@ACLOCAL@,$ACLOCAL,;t t -s,@AUTOCONF@,$AUTOCONF,;t t -s,@AUTOMAKE@,$AUTOMAKE,;t t -s,@AUTOHEADER@,$AUTOHEADER,;t t -s,@MAKEINFO@,$MAKEINFO,;t t -s,@install_sh@,$install_sh,;t t -s,@STRIP@,$STRIP,;t t -s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t -s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t -s,@mkdir_p@,$mkdir_p,;t t -s,@AWK@,$AWK,;t t -s,@SET_MAKE@,$SET_MAKE,;t t -s,@am__leading_dot@,$am__leading_dot,;t t -s,@AMTAR@,$AMTAR,;t t -s,@am__tar@,$am__tar,;t t -s,@am__untar@,$am__untar,;t t -s,@CXX@,$CXX,;t t -s,@CXXFLAGS@,$CXXFLAGS,;t t -s,@LDFLAGS@,$LDFLAGS,;t t -s,@CPPFLAGS@,$CPPFLAGS,;t t -s,@ac_ct_CXX@,$ac_ct_CXX,;t t -s,@EXEEXT@,$EXEEXT,;t t -s,@OBJEXT@,$OBJEXT,;t t -s,@DEPDIR@,$DEPDIR,;t t -s,@am__include@,$am__include,;t t -s,@am__quote@,$am__quote,;t t -s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t -s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t -s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t -s,@CXXDEPMODE@,$CXXDEPMODE,;t t -s,@am__fastdepCXX_TRUE@,$am__fastdepCXX_TRUE,;t t -s,@am__fastdepCXX_FALSE@,$am__fastdepCXX_FALSE,;t t -s,@CC@,$CC,;t t -s,@CFLAGS@,$CFLAGS,;t t -s,@ac_ct_CC@,$ac_ct_CC,;t t -s,@CCDEPMODE@,$CCDEPMODE,;t t -s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t -s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t -s,@CPP@,$CPP,;t t -s,@EGREP@,$EGREP,;t t -s,@LIBOBJS@,$LIBOBJS,;t t -s,@LTLIBOBJS@,$LTLIBOBJS,;t t -CEOF - -_ACEOF - - cat >>$CONFIG_STATUS <<\_ACEOF - # Split the substitutions into bite-sized pieces for seds with - # small command number limits, like on Digital OSF/1 and HP-UX. - ac_max_sed_lines=48 - ac_sed_frag=1 # Number of current file. - ac_beg=1 # First line for current file. - ac_end=$ac_max_sed_lines # Line after last line for current file. - ac_more_lines=: - ac_sed_cmds= - while $ac_more_lines; do - if test $ac_beg -gt 1; then - sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - else - sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag - fi - if test ! -s $tmp/subs.frag; then - ac_more_lines=false - else - # The purpose of the label and of the branching condition is to - # speed up the sed processing (if there are no `@' at all, there - # is no need to browse any of the substitutions). - # These are the two extra sed commands mentioned above. - (echo ':t - /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed - if test -z "$ac_sed_cmds"; then - ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" - else - ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" - fi - ac_sed_frag=`expr $ac_sed_frag + 1` - ac_beg=$ac_end - ac_end=`expr $ac_end + $ac_max_sed_lines` - fi - done - if test -z "$ac_sed_cmds"; then - ac_sed_cmds=cat - fi -fi # test -n "$CONFIG_FILES" - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case $ac_file in - - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; - esac - - # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. - ac_dir=`(dirname "$ac_file") 2>/dev/null || -$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'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" - as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || -$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'` - done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} - { (exit 1); exit 1; }; }; } - - ac_builddir=. - -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi - -case $srcdir in - .) # No --srcdir option. We are building in place. - ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac - -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac - - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_builddir$INSTALL ;; - esac - - if test x"$ac_file" != x-; then - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - rm -f "$ac_file" - fi - # 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. */ - if test x"$ac_file" = x-; then - configure_input= - else - configure_input="$ac_file. " - fi - configure_input=$configure_input"Generated from `echo $ac_file_in | - sed 's,.*/,,'` by configure." - - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - echo "$f";; - *) # Relative - if test -f "$f"; then - # Build tree - echo "$f" - elif test -f "$srcdir/$f"; then - # Source tree - echo "$srcdir/$f" - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } -_ACEOF -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,@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,@top_builddir@,$ac_top_builddir,;t t -s,@abs_top_builddir@,$ac_abs_top_builddir,;t t -s,@INSTALL@,$ac_INSTALL,;t t -" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out - rm -f $tmp/stdin - if test x"$ac_file" != x-; then - mv $tmp/out $ac_file - else - cat $tmp/out - rm -f $tmp/out - fi - -done -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF - -# -# CONFIG_HEADER section. -# - -# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where -# NAME is the cpp macro being defined and VALUE is the value it is being given. -# -# ac_d sets the value in "#define NAME VALUE" lines. -ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' -ac_dB='[ ].*$,\1#\2' -ac_dC=' ' -ac_dD=',;t' -# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". -ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' -ac_uB='$,\1#\2define\3' -ac_uC=' ' -ac_uD=',;t' - -for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue - # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". - case $ac_file in - - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; - esac - - test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - # Do quote $f, to prevent DOS paths from being IFS'd. - echo "$f";; - *) # Relative - if test -f "$f"; then - # Build tree - echo "$f" - elif test -f "$srcdir/$f"; then - # Source tree - echo "$srcdir/$f" - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } - # Remove the trailing spaces. - sed 's/[ ]*$//' $ac_file_inputs >$tmp/in - -_ACEOF - -# Transform confdefs.h into two sed scripts, `conftest.defines' and -# `conftest.undefs', that substitutes the proper values into -# config.h.in to produce config.h. The first handles `#define' -# templates, and the second `#undef' templates. -# And first: Protect against being on the right side of a sed subst in -# config.status. Protect against being in an unquoted here document -# in config.status. -rm -f conftest.defines conftest.undefs -# Using a here document instead of a string reduces the quoting nightmare. -# Putting comments in sed scripts is not portable. -# -# `end' is used to avoid that the second main sed command (meant for -# 0-ary CPP macros) applies to n-ary macro definitions. -# See the Autoconf documentation for `clear'. -cat >confdef2sed.sed <<\_ACEOF -s/[\\&,]/\\&/g -s,[\\$`],\\&,g -t clear -: clear -s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp -t end -s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp -: end -_ACEOF -# If some macros were called several times there might be several times -# the same #defines, which is useless. Nevertheless, we may not want to -# sort them, since we want the *last* AC-DEFINE to be honored. -uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines -sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs -rm -f confdef2sed.sed - -# This sed command replaces #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. -cat >>conftest.undefs <<\_ACEOF -s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, -_ACEOF - -# Break up conftest.defines because some shells have a limit on the size -# of here documents, and old seds have small limits too (100 cmds). -echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS -echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS -echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS -echo ' :' >>$CONFIG_STATUS -rm -f conftest.tail -while grep . conftest.defines >/dev/null -do - # Write a limited-size here document to $tmp/defines.sed. - echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS - # Speed up: don't consider the non `#define' lines. - echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS - # Work around the forget-to-reset-the-flag bug. - echo 't clr' >>$CONFIG_STATUS - echo ': clr' >>$CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS - echo 'CEOF - sed -f $tmp/defines.sed $tmp/in >$tmp/out - rm -f $tmp/in - mv $tmp/out $tmp/in -' >>$CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail - rm -f conftest.defines - mv conftest.tail conftest.defines -done -rm -f conftest.defines -echo ' fi # grep' >>$CONFIG_STATUS -echo >>$CONFIG_STATUS - -# Break up conftest.undefs because some shells have a limit on the size -# of here documents, and old seds have small limits too (100 cmds). -echo ' # Handle all the #undef templates' >>$CONFIG_STATUS -rm -f conftest.tail -while grep . conftest.undefs >/dev/null -do - # Write a limited-size here document to $tmp/undefs.sed. - echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS - # Speed up: don't consider the non `#undef' - echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS - # Work around the forget-to-reset-the-flag bug. - echo 't clr' >>$CONFIG_STATUS - echo ': clr' >>$CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS - echo 'CEOF - sed -f $tmp/undefs.sed $tmp/in >$tmp/out - rm -f $tmp/in - mv $tmp/out $tmp/in -' >>$CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail - rm -f conftest.undefs - mv conftest.tail conftest.undefs -done -rm -f conftest.undefs - -cat >>$CONFIG_STATUS <<\_ACEOF - # 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. */ - if test x"$ac_file" = x-; then - echo "/* Generated by configure. */" >$tmp/config.h - else - echo "/* $ac_file. Generated by configure. */" >$tmp/config.h - fi - cat $tmp/in >>$tmp/config.h - rm -f $tmp/in - if test x"$ac_file" != x-; then - 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 - ac_dir=`(dirname "$ac_file") 2>/dev/null || -$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'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" - as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || -$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'` - done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} - { (exit 1); exit 1; }; }; } - - rm -f $ac_file - mv $tmp/config.h $ac_file - fi - else - cat $tmp/config.h - rm -f $tmp/config.h - fi -# 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" >`(dirname $ac_file) 2>/dev/null || -$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 -done -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF - -# -# CONFIG_COMMANDS section. -# -for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue - ac_dest=`echo "$ac_file" | sed 's,:.*,,'` - ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_dir=`(dirname "$ac_dest") 2>/dev/null || -$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_dest" : 'X\(//\)[^/]' \| \ - X"$ac_dest" : 'X\(//\)$' \| \ - X"$ac_dest" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_dest" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" - as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || -$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'` - done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} - { (exit 1); exit 1; }; }; } - - ac_builddir=. - -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi - -case $srcdir in - .) # No --srcdir option. We are building in place. - ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac - -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac - - - { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 -echo "$as_me: executing $ac_dest commands" >&6;} - case $ac_dest in - depfiles ) 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=`(dirname "$mf") 2>/dev/null || -$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=`(dirname "$file") 2>/dev/null || -$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'` - { if $as_mkdir_p; then - mkdir -p $dirpart/$fdir - else - as_dir=$dirpart/$fdir - as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || -$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'` - done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5 -echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;} - { (exit 1); exit 1; }; }; } - - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done -done - ;; - esac -done -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF - -{ (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 - Copied: tools/prt-get/branches/prt-get-5.13/configure (from rev 1846, tools/prt-get/trunk/configure) =================================================================== --- tools/prt-get/branches/prt-get-5.13/configure (rev 0) +++ tools/prt-get/branches/prt-get-5.13/configure 2006-09-08 18:05:30 UTC (rev 1849) @@ -0,0 +1,6596 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.60. +# +# 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 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 + + +# 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 /usr/bin/posix$PATH_SEPARATOR/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 +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +: +_ASEOF +}; then + CONFIG_SHELL=$as_shell + as_have_required=yes + if { "$as_shell" 2> /dev/null <<\_ASEOF +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac +fi +BIN_SH=xpg4; export BIN_SH # for Tru64 +DUALCASE=1; export DUALCASE # for MKS sh + +: +(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 + +# Find out whether ``test -x'' works. Don't use a zero-byte file, as +# systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + as_executable_p="test -x" +else + as_executable_p=: +fi +rm -f conf$$.file + +# 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 7<&0 </dev/null 6>&1 + +# Name of the host. +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# 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= +PACKAGE_TARNAME= +PACKAGE_VERSION= +PACKAGE_STRING= +PACKAGE_BUGREPORT= + +ac_unique_file="src/prtget.cpp" +ac_default_prefix=/usr +# Factoring default headers for most tests. +ac_includes_default="\ +#include <stdio.h> +#if HAVE_SYS_TYPES_H +# include <sys/types.h> +#endif +#if HAVE_SYS_STAT_H +# include <sys/stat.h> +#endif +#if STDC_HEADERS +# include <stdlib.h> +# include <stddef.h> +#else +# if HAVE_STDLIB_H +# include <stdlib.h> +# endif +#endif +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H +# include <memory.h> +# endif +# include <string.h> +#endif +#if HAVE_STRINGS_H +# include <strings.h> +#endif +#if HAVE_INTTYPES_H +# include <inttypes.h> +#endif +#if HAVE_STDINT_H +# include <stdint.h> +#endif +#if HAVE_UNISTD_H +# include <unistd.h> +#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 +CXX +CXXFLAGS +LDFLAGS +CPPFLAGS +ac_ct_CXX +EXEEXT +OBJEXT +DEPDIR +am__include +am__quote +AMDEP_TRUE +AMDEP_FALSE +AMDEPBACKSLASH +CXXDEPMODE +am__fastdepCXX_TRUE +am__fastdepCXX_FALSE +CC +CFLAGS +ac_ct_CC +CCDEPMODE +am__fastdepCC_TRUE +am__fastdepCC_FALSE +CPP +GREP +EGREP +LIBOBJS +LTLIBOBJS' +ac_subst_files='' + ac_precious_vars='build_alias +host_alias +target_alias +CXX +CXXFLAGS +LDFLAGS +CPPFLAGS +CCC +CC +CFLAGS +CPP' + + +# 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}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${prefix}/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 this package 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 [PREFIX/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] + --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 +_ACEOF +fi + +if test -n "$ac_init_help"; then + + 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 + +Some influential environment variables: + CXX C++ compiler command + CXXFLAGS C++ compiler flags + LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a + nonstandard directory <lib dir> + CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if + you have headers in a nonstandard directory <include dir> + CC C compiler command + CFLAGS C compiler flags + CPP C preprocessor + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +_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 +configure +generated by GNU Autoconf 2.60 + +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 $as_me, which was +generated by GNU Autoconf 2.60. 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 + + + +am__api_version="1.9" +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. + + +# 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_executable_p "$as_dir/$ac_prog$ac_exec_ext"; }; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + 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_executable_p "$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=prt-get + VERSION=5.13 + + +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_executable_p "$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_executable_p "$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 -' + + + + + + + +test x$prefix = "xNONE" && prefix="$ac_default_prefix" + +# Checks for programs. +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_executable_p "$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_executable_p "$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); } + +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 + 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 +{ echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6; } + +# 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_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); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_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); }; } && + { ac_try='test -s conftest.$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 + 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); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_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); }; } && + { ac_try='test -s conftest.$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 + 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); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_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); }; } && + { ac_try='test -s conftest.$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 + : +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); } && + { ac_try='test -z "$ac_cxx_werror_flag" || test ! -s conftest.err' + { (case "(($ac_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); }; } && + { ac_try='test -s conftest.$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 + 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 +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="$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 + + +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_executable_p "$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_executable_p "$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_executable_p "$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_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + 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_executable_p "$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_executable_p "$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); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_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); }; } && + { ac_try='test -s conftest.$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 + 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); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_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); }; } && + { ac_try='test -s conftest.$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 + 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); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_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); }; } && + { ac_try='test -s conftest.$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 + : +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); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_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); }; } && + { ac_try='test -s conftest.$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 + 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 <stdarg.h> +#include <stdio.h> +#include <sys/types.h> +#include <sys/stat.h> +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "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); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_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); }; } && + { ac_try='test -s conftest.$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 + 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 + + +# 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_executable_p "$as_dir/$ac_prog$ac_exec_ext"; }; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + 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' + + + + +# Checks for libraries. + +# Checks for header files. + + + + + + +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 <sys/types.h> +#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); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_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); }; } && + { ac_try='test -s conftest.$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 "$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); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_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); }; } && + { ac_try='test -s 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_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$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); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_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); }; } && + { ac_try='test -s 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_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$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 + +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 <limits.h> to <assert.h> if __STDC__ is defined, since + # <limits.h> exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "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; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_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 <ac_nonexistent.h> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "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; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_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 <limits.h> to <assert.h> if __STDC__ is defined, since + # <limits.h> exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + Syntax error +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "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; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_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 <ac_nonexistent.h> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "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; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_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_executable_p "$ac_path_GREP"; } || continue + # Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + 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_executable_p "$ac_path_EGREP"; } || continue + # Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + 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 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 <stdlib.h> +#include <stdarg.h> +#include <string.h> +#include <float.h> + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "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); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_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); }; } && + { ac_try='test -s conftest.$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 + 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 <string.h> + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <stdlib.h> + +_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 <ctype.h> +#include <stdlib.h> +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +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); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_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); }; } && + { ac_try='test -s conftest.$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 "$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 unistd.h stdio.h sys/types.h sys/stat.h fnmatch.h \ + dirent.h fcntl.h signal.h regex.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); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_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); }; } && + { ac_try='test -s conftest.$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 + 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; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_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;} + + ;; +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 + + +CFLAGS="$CFLAGS $X_CFLAGS" +CXXFLAGS="$CXXFLAGS $X_CFLAGS" +LIBS="$LIBS $X_LIBS" +LDFLAGS="$LDFLAGS $LIBS $X_PRE_LIBS" + +# 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 x; + /* SunOS 4.1.1 cc rejects this. */ + char const *const *ccp; + char **p; + /* 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"; + ccp = &g + (g ? g-g : 0); + /* HPUX 7.0 cc rejects these. */ + ++ccp; + p = (char**) ccp; + ccp = (char const *const *) p; + { /* 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 !x[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); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_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); }; } && + { ac_try='test -s conftest.$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 + 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 + + +# I hate you autotools +sysconfdir="/etc" +localstatedir="/var" + +# Checks for library functions. +ac_config_headers="$ac_config_headers config.h" + +ac_config_files="$ac_config_files Makefile src/Makefile doc/Makefile misc/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__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi + +: ${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 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 + + +# 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 + +# Find out whether ``test -x'' works. Don't use a zero-byte file, as +# systems may use methods other than mode bits to determine executability. +cat >conf$$.file <<_ASEOF +#! /bin/sh +exit 0 +_ASEOF +chmod +x conf$$.file +if test -x conf$$.file >/dev/null 2>&1; then + as_executable_p="test -x" +else + as_executable_p=: +fi +rm -f conf$$.file + +# 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 $as_me, which was +generated by GNU Autoconf 2.60. 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, 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 <bug-autoconf@gnu.org>." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +ac_cs_version="\\ +config.status +configured by $0, generated by GNU Autoconf 2.60, + 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 + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; + "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; + "misc/Makefile") CONFIG_FILES="$CONFIG_FILES misc/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 +CXX!$CXX$ac_delim +CXXFLAGS!$CXXFLAGS$ac_delim +LDFLAGS!$LDFLAGS$ac_delim +CPPFLAGS!$CPPFLAGS$ac_delim +ac_ct_CXX!$ac_ct_CXX$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 +CXXDEPMODE!$CXXDEPMODE$ac_delim +am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim +am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim +CC!$CC$ac_delim +CFLAGS!$CFLAGS$ac_delim +ac_ct_CC!$ac_ct_CC$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 +GREP!$GREP$ac_delim +EGREP!$EGREP$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` = 85; 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 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 <conf$$subs.sed +rm -f conf$$subs.sed +cat >>$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" >$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 + Deleted: tools/prt-get/branches/prt-get-5.13/configure.in =================================================================== --- tools/prt-get/trunk/configure.in 2006-04-04 15:39:45 UTC (rev 1137) +++ tools/prt-get/branches/prt-get-5.13/configure.in 2006-09-08 18:05:30 UTC (rev 1849) @@ -1,42 +0,0 @@ -# Process this file with autoconf to produce a configure script. -AC_INIT -AC_CONFIG_SRCDIR([src/prtget.cpp]) -AM_INIT_AUTOMAKE(prt-get,0.5.12pre) - - -dnl Determine default prefix -test x$prefix = "xNONE" && prefix="$ac_default_prefix" - -# Checks for programs. -AC_PROG_CXX -AC_PROG_CC -AC_PROG_INSTALL - -AC_PREFIX_DEFAULT(/usr) - -# Checks for libraries. - -# Checks for header files. -AC_HEADER_DIRENT -AC_CHECK_HEADERS(unistd.h stdio.h sys/types.h sys/stat.h fnmatch.h \ - dirent.h fcntl.h signal.h regex.h) - -CFLAGS="$CFLAGS $X_CFLAGS" -CXXFLAGS="$CXXFLAGS $X_CFLAGS" -LIBS="$LIBS $X_LIBS" -LDFLAGS="$LDFLAGS $LIBS $X_PRE_LIBS" - -# Checks for typedefs, structures, and compiler characteristics. -AC_C_CONST - -# I hate you autotools -sysconfdir="/etc" -localstatedir="/var" - -# Checks for library functions. -AM_CONFIG_HEADER(config.h) -AC_CONFIG_FILES([Makefile - src/Makefile - doc/Makefile - misc/Makefile]) -AC_OUTPUT Copied: tools/prt-get/branches/prt-get-5.13/configure.in (from rev 1846, tools/prt-get/trunk/configure.in) =================================================================== --- tools/prt-get/branches/prt-get-5.13/configure.in (rev 0) +++ tools/prt-get/branches/prt-get-5.13/configure.in 2006-09-08 18:05:30 UTC (rev 1849) @@ -0,0 +1,42 @@ +# Process this file with autoconf to produce a configure script. +AC_INIT +AC_CONFIG_SRCDIR([src/prtget.cpp]) +AM_INIT_AUTOMAKE(prt-get,5.13) + + +dnl Determine default prefix +test x$prefix = "xNONE" && prefix="$ac_default_prefix" + +# Checks for programs. +AC_PROG_CXX +AC_PROG_CC +AC_PROG_INSTALL + +AC_PREFIX_DEFAULT(/usr) + +# Checks for libraries. + +# Checks for header files. +AC_HEADER_DIRENT +AC_CHECK_HEADERS(unistd.h stdio.h sys/types.h sys/stat.h fnmatch.h \ + dirent.h fcntl.h signal.h regex.h) + +CFLAGS="$CFLAGS $X_CFLAGS" +CXXFLAGS="$CXXFLAGS $X_CFLAGS" +LIBS="$LIBS $X_LIBS" +LDFLAGS="$LDFLAGS $LIBS $X_PRE_LIBS" + +# Checks for typedefs, structures, and compiler characteristics. +AC_C_CONST + +# I hate you autotools +sysconfdir="/etc" +localstatedir="/var" + +# Checks for library functions. +AM_CONFIG_HEADER(config.h) +AC_CONFIG_FILES([Makefile + src/Makefile + doc/Makefile + misc/Makefile]) +AC_OUTPUT Deleted: tools/prt-get/branches/prt-get-5.13/doc/Makefile.in =================================================================== --- tools/prt-get/trunk/doc/Makefile.in 2006-04-04 15:39:45 UTC (rev 1137) +++ tools/prt-get/branches/prt-get-5.13/doc/Makefile.in 2006-09-08 18:05:30 UTC (rev 1849) @@ -1,386 +0,0 @@ -# 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 = : -subdir = doc -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -SOURCES = -DIST_SOURCES = -man5dir = $(mandir)/man5 -am__installdirs = "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man8dir)" -man8dir = $(mandir)/man8 -NROFF = nroff -MANS = $(man_MANS) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -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@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_STRIP = @ac_ct_STRIP@ -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_alias = @build_alias@ -datadir = @datadir@ -exec_prefix = @exec_prefix@ -host_alias = @host_alias@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -man_MANS = prt-get.8 prt-cache.8 prt-get.conf.5 -EXTRA_DIST = $(man_MANS) coding -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/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 -uninstall-info-am: -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-man8: $(man8_MANS) $(man_MANS) - @$(NORMAL_INSTALL) - test -z "$(man8dir)" || $(mkdir_p) "$(DESTDIR)$(man8dir)" - @list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.8*) 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 \ - 8*) ;; \ - *) ext='8' ;; \ - 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)$(man8dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst"; \ - done -uninstall-man8: - @$(NORMAL_UNINSTALL) - @list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \ - l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ - for i in $$l2; do \ - case "$$i" in \ - *.8*) list="$$list $$i" ;; \ - esac; \ - done; \ - for i in $$list; do \ - ext=`echo $$i | sed -e 's/^.*\\.//'`; \ - case "$$ext" in \ - 8*) ;; \ - *) ext='8' ;; \ - 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)$(man8dir)/$$inst'"; \ - rm -f "$(DESTDIR)$(man8dir)/$$inst"; \ - 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 $(MANS) -installdirs: - for dir in "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man8dir)"; 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-local mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-man - -install-exec-am: - -install-info: install-info-am - -install-man: install-man5 install-man8 - -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 - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-info-am uninstall-man - -uninstall-man: uninstall-man5 uninstall-man8 - -.PHONY: all all-am check check-am clean clean-generic clean-local \ - distclean distclean-generic 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-man5 install-man8 install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ - pdf-am ps ps-am uninstall uninstall-am uninstall-info-am \ - uninstall-man uninstall-man5 uninstall-man8 - - -clean-local: - rm -rf *.log *.aux *.toc *.dvi *.idx *.pdf api - -apidoc: - doxygen -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: Copied: tools/prt-get/branches/prt-get-5.13/doc/Makefile.in (from rev 1846, tools/prt-get/trunk/doc/Makefile.in) =================================================================== --- tools/prt-get/branches/prt-get-5.13/doc/Makefile.in (rev 0) +++ tools/prt-get/branches/prt-get-5.13/doc/Makefile.in 2006-09-08 18:05:30 UTC (rev 1849) @@ -0,0 +1,393 @@ +# 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 = : +subdir = doc +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +SOURCES = +DIST_SOURCES = +man5dir = $(mandir)/man5 +am__installdirs = "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man8dir)" +man8dir = $(mandir)/man8 +NROFF = nroff +MANS = $(man_MANS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +GREP = @GREP@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +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@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +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_alias = @build_alias@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host_alias = @host_alias@ +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@ +man_MANS = prt-get.8 prt-cache.8 prt-get.conf.5 +EXTRA_DIST = $(man_MANS) coding +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/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 +uninstall-info-am: +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-man8: $(man8_MANS) $(man_MANS) + @$(NORMAL_INSTALL) + test -z "$(man8dir)" || $(mkdir_p) "$(DESTDIR)$(man8dir)" + @list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \ + l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ + for i in $$l2; do \ + case "$$i" in \ + *.8*) 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 \ + 8*) ;; \ + *) ext='8' ;; \ + 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)$(man8dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst"; \ + done +uninstall-man8: + @$(NORMAL_UNINSTALL) + @list='$(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS)'; \ + l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ + for i in $$l2; do \ + case "$$i" in \ + *.8*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + case "$$ext" in \ + 8*) ;; \ + *) ext='8' ;; \ + 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)$(man8dir)/$$inst'"; \ + rm -f "$(DESTDIR)$(man8dir)/$$inst"; \ + 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 $(MANS) +installdirs: + for dir in "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man8dir)"; 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-local mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-man + +install-exec-am: + +install-info: install-info-am + +install-man: install-man5 install-man8 + +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 + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-info-am uninstall-man + +uninstall-man: uninstall-man5 uninstall-man8 + +.PHONY: all all-am check check-am clean clean-generic clean-local \ + distclean distclean-generic 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-man5 install-man8 install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ + pdf-am ps ps-am uninstall uninstall-am uninstall-info-am \ + uninstall-man uninstall-man5 uninstall-man8 + + +clean-local: + rm -rf *.log *.aux *.toc *.dvi *.idx *.pdf api + +apidoc: + doxygen +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: Deleted: tools/prt-get/branches/prt-get-5.13/doc/prt-get.8 =================================================================== --- tools/prt-get/trunk/doc/prt-get.8 2006-04-04 15:39:45 UTC (rev 1137) +++ tools/prt-get/branches/prt-get-5.13/doc/prt-get.8 2006-09-08 18:05:30 UTC (rev 1849) @@ -1,538 +0,0 @@ -.\" man page for prt-get -.\" Johannes Winkelmann, jw@tks6.net -.\" -.\" my first man page, so forgive me for the errors :-) -.\" -.\" .PU -.TH "prt-get" "8" "" "" "" -.SH "NAME" -.LP -prt\-get \- an advanced package management tool to be used with -pkgutils from CRUX (see http://www.crux.nu) -.SH "SYNOPSIS" -.B prt\-get command [options] <arguments> -.br -.SH "DESCRIPTION" -prt\-get is a package management tool which provides additional -functionality to crux' package management system. It works with the -local ports tree and is therefore fully compatible with ports(8) and -pkgmk(8)/pkgadd(8). It offers the following features: - -.PP -.TP -\ \ \ \(bu -abstract ports installation/update from file system - -.TP -\ \ \ \(bu -install/update a list of packages with one command - -.TP -\ \ \ \(bu -list dependencies for a list of packages - -.TP -\ \ \ \(bu -show information about ports - -.TP -\ \ \ \(bu -search within the ports - -.PP - -What prt\-get basically does is installing and upgrading packages, using -pkgmk and pkgadd. Additionally, you don't have be in the port's -directory to call prt\-get. prt\-get will search for the respective port -itself in a list of directories specified in /etc/prt\-get.conf. This -allows you to just install or update a package, without caring where -it actually is located on your file system. - -.PP - -prt\-get also offers some features like searching ports by name, -showing information about ports (without installing them of course) -and can list the dependencies listed in the Pkgfile, and provide a -complete dependency list for a port. Note that dependencies are no -requirement for crux packages and therefore not always accurate. There's -a possiblity to use an external dependency map to get dependency -listings for ports which don't provide them in their Pkgfile. - -.PP - -prt\-get has a test mode so you can see what effect an install/update -operation would have. Use the \-\-test switch for this (see also: -OPTIONS) - -.SH "RETURN VALUE" -prt\-get returns 0 on success and a non-zero value otherwise (exact -value -> meaning mapping to be determined...) - -.SH "COMMANDS" -prt\-get uses so called commands, which always have to be the first -non-option argument passed. This is very similar to -.B cvs(1). -[command] can be one of the following: - - -.TP -.B install [\-\-margs] [\-\-aargs] [\-\-log] <package1> [<package2> ...] -install all packages in the listed order. Note that you can do this -from any directory - -.TP -.B depinst [\-\-margs] [\-\-aargs] [\-\-log] <package1> [<package2> ...] -install all packages in the listed order including their dependencies. -Note that outdated packages won't be updated. - -.TP -.B grpinst [\-\-margs] [\-\-aargs] [\-\-log] <package1> [<package2> ...] -install all packages in the listed order, but stop if installation of -one package fails. This can be used to install packages where package2 -depends on package1 - -.TP -.B update [\-\-margs] [\-\-aargs] [\-\-log] <package1> [<package2> ...] -update all packages listed in this order - -.TP -.B remove <package1> [<package2> ...] -remove packages listed in this order - -.TP -.B sysup [\-\-nodeps] -Update all installed packages which are outdated. Sorts by dependencies -if specified. If you don't want prt-get to resolve the dependencies, use -the --nodeps switch. Also see the -.B lock -and -.B unlock -commands to keep the currently installed versions, even if there are -changes in the ports tree. If you want to update only diffs which have -a lower version installed than the one in the ports tree, use the ---prefer-higher option. - -.TP -.B lock <package1> [<package2>...] -Do not update these packages in a -.B sysup -operation - -.TP -.B unlock <package1> [<package2>...] -Remove lock from these packages - -.TP -.B listlocked [-v|-vv] -List names of packages which are locked. As always, -.B -v -will additionally show the version, and -.B -vv -also includes the description from the Pkgfile. Note that the -.B -vv -switch will slow down the operation remarkably. - -.TP -.B diff [--all] [<package1> <package2> ...] -show differences between installed packages and ports in the ports -tree. If arguments are given, shows only differences for these -packages, otherwise all differences are shown. It's also possible to use -shell like -.B wildcards -for the diff command. Make sure you escape where needed. Locked -packages are only displayed if you use the --all switch. If you want -to see only diffs which have a lower version installed than the one in -the ports tree, use the --prefer-higher option. - -.TP -.B quickdiff -prints a simple list of packages which have a different version in the -ports tree than what is installed. This is meant as an input for -.B prt\-get update, -so you can update all ports on your system with one simple command. If you want -to see only diffs which have a lower version installed than the one in -the ports tree, use the --prefer-higher option. - -.TP -.B search [\-v|\-vv] [--path] [--regex]<expr> -Search the ports tree for -.B expr -in their name - -.TP -.B dsearch [\-v|\-vv] [--path] [--regex]<expr> -Search the ports tree for -.B expr -in both name and description. The search in the description is not case -sensitive. Note that this requires prt\-get to read every Pkgfile, which -makes it rather slow; if you like this, consider using the cache -functionality, so you only have to spend this time once after updating -the ports tree has been updated. - -.TP -.B fsearch [--full] [--regex] <pattern> -Search the ports tree for -.B pattern -as file name in their footprint. When called without '--full', strips -the directories from the file names before matching; this behaviour -will change in prt-get 0.6, where full path search will be -default. Pattern can be a shell-like wildcard pattern (e.g prt-get -fsearch "*.h") or regexps. - - -.TP -.B info <port> -Print available info for a port - -.TP -.B path <port> -Print the path of a port - -.TP -.B readme <port> -Print the port's README file if it exists - -.TP -.B depends <package1> [<package2> ...] -print a recursive list of dependencies to install the packages passed -as argument. It shows a list with ports which are found, plus a list -of ports which are missing - -.TP -.B quickdep <package1> [<package2> ...] -print a simple list of recursive dependencies for all the ports passed -as argument in a simple format to be used by -.B prt\-get install -to make an install including dependencies -.B Does not display dependencies which are not in the ports tree - -.TP -.B dependent <package> -print a list of package which depend on -.B package. -Only list direct dependencies. Usually shows dependent packages which -are installed. To see all dependencies, add the --all switch - -.TP -.B deptree <package> -print a tree of the dependencies of the package -.B package. -Subtrees already shown are marked with '-->' to save some space, in -order to show them all, add the --all switch - -.TP -.B dup -List ports which can be found in multiple directories configured in -.B /etc/prt-get.conf - - -.TP -.B list [\-v|\-vv] [filter] [--path] [--regex] -List ports available in the ports tree. It's basically the same as -.B ports \-l -but looks in all directories specified in -.B /etc/prt\-get.conf. -It's also possible to use -shell like -.B wildcards -for the list command. Make sure you escape where needed - -.TP -.B printf <format string1> [\-\-sort=<format string2>] [\-\-filter=<filter>] -Print formated port list format string can contain variables, which -are replaced like this: -.TP -\ \ \ \(bu -%n \-> name - -.TP -\ \ \ \(bu -%p \-> path - -.TP -\ \ \ \(bu -%v \-> version - -.TP -\ \ \ \(bu -%r \-> release - -.TP -\ \ \ \(bu -%d \-> description - -.TP -\ \ \ \(bu -%e \-> dependencies - -.TP -\ \ \ \(bu -%u \-> URL - -.TP -\ \ \ \(bu -%P -> Packager - -.TP -\ \ \ \(bu -%M -> Maintainer - -.TP -\ \ \ \(bu -%R -> Readme ("yes"/"no") - -.TP -\ \ \ \(bu -%E -> pre-install script ("yes"/"no") - -.TP -\ \ \ \(bu -%O -> post-install script ("yes"/"no") - -.TP -\ \ \ \(bu -%l -> is locked ("yes"/"no") - -.TP -\ \ \ \(bu -%i \-> "no" if not installed, "yes" if it's installed and -up to date and "diff" if it's installed and a new version is in the -ports tree. - -Use "\\n" and "\\t" to format your output (no additional format specified -suported). The optional format string2 can contain the same variables -as format string1 and is used to sort the output. You can specify a -.B wildcard filter -to filter by package name. - - -.TP -.B listinst [\-v|\-vv] [filter] [--regex] -List installed ports. It's basically the same as -.B pkginfo \-i, -but omits version when called without verbose (\-v, \-vv) switch. Plus -it is notably faster in my tests. \-v adds version information, \-vv -adds version and description. -.B Warning: -\-vv will slow down the process because it requires prt\-get to scan -both the ports database and the ports tree. -It's also possible to use shell like -.B wildcards -for the listinst command. Make sure you escape where needed - - - -.TP -.B isinst <package> -Check whether a package is installed. The same as -.B pkginfo \-i|grep ^package -.TP - -.TP -.B current <package> -Prints out the version of the currently installed package - - -.TP -.B ls [--path] <package> -Prints out a listing of the port's directory - -.TP -.B cat <package> [<file>] -Prints out the file to stdout. If <file> is not specified, 'Pkgfile' is used - -.TP -.B edit <package> <file> -Edit the file using the editor specified in the $EDITOR environment variable. -If <file> is not specified, 'Pkgfile' is used - - -.TP -.B help -Shows a help screen - -.TP -.B dumpconfig -Dump the configuration to the current terminal - -.TP -.B version -Shows the current version of prt\-get - -.TP -.B cache -create a cache file from the ports tree to be used by prt\-get using the -\-\-cache option. Remember to run prt\-get cache each time you update the -ports tree - -.SH "OPTIONS" - -.TP -.B -f, -i -Force install; Implies 'pkgadd -f'; same as --aargs=-f - -.TP -.B -fr -Force rebuild, Implies 'pkgmk -f'; same as --margs=-f - -.TP -.B -um -Update md5sum, implies 'pkgmk -um'; same as --margs=-um - -.TP -.B -im -Ignore md5sum, implies 'pkgmk -im'; same as --margs=-im - -.TP -.B -uf -Update footprint, implies 'pkgmk -uf'; same as --margs=-uf - -.TP -.B -if -Ignore footprint, implies 'pkgmk -if'; same as --margs=-if - -.TP -.B -ns -No stripping, implies 'pkgmk -ns'; same as --margs=-ns - -.TP -.B -kw -Keep working directory, implies 'pkgmk -kw'; same as --margs=-kw - -.TP -.B --ignore=<package1,package2,...> -Don't install those packages, even if they're listed as dependency - - -.TP -.B \-\-cache -Use cache file for this command - -.TP -.B \-\-test -Dry run, don't actually install anything, mostly interesting for -.B prt\-get install, prt\-get grpinst, prt\-get update, prt\-get sysup - -.TP -.B \-\-pre-install -Execute pre-install script if it's there - -.TP -.B \-\-post-install -Execute post-install script if it's there - -.TP -.B \-\-install-scripts -Execute pre-install and post-install script if they're there - -.TP -.B \-\-no-std-config -Don't parse the default configuration file - -.TP -.B \-\-config-prepend=<string> -Prepend <string> to configuration - -.TP -.B \-\-config-append=<string> -Append <string> to configuration - -.TP -.B \-\-config-set=<string> -Set <string> in configuration, overriding configuration file - - -.TP -.B \-v, \-vv -verbose and more verbose, relevant for -.B prt\-get search, prt\-get list -verbose shows version of a port, more verbose shows version and -description (if available) - -.B \-\-path -Show path info; used in 'search', 'dsearch', 'list' and 'depends' - -.B \-\-regex -Interpret filter and search pattern as regular expression - -.TP -.B \-\-margs="...", e.g. \-\-margs="\-im" -arguments to be passed to pkgmk, relevant for -.B prt\-get install, prt\-get grpinst, prt\-get update -note that \-d is already passed to pkgmk anyway - -.TP -.B \-\-aargs="...", e.g. \-\-aargs="\-f" -arguments to be passed to pkgadd, relevant for -.B prt\-get install, prt\-get grpinst, prt\-get update - -.TP -.B \-\-rargs="..." -arguments to be passed to pkgrm; currently not used, implemented for -future uses and consistency reasons - -.TP -.B \-\-prefer-higher, -ph -Make prt-get parse the version strings and prefer the higher version, -even if the one found in the ports tree is lower. Will influence diff, -quickdiff and sysup. - -.TP -.B \-\-strict-diff, -sd -Override the 'preferhigher' configuration option - - -.TP -.B \-\-config=<file> -Use alternative configuration file to read ports directories from - -.TP -.B \-\-install-root=<dir> -Use <dir> as root directory for your installation; allows to install to -a different directory than '/'. In daily usage, this option is not -required; helpful if you're developing an independent installation. - -.TP -.B \-\-log -Write build output to log file - -.SH "CONFIGURATION" -.TP -See man prt\-get.conf(5) - -.SH "EXAMPLES" -.TP -.B prt\-get install irssi -download, build and install irssi, with one simple command - -.TP -.B prt\-get install indent mplayer -install indent and mplayer - -.TP -.B prt\-get update openssh -update your current version of openssh :\-) - -.TP -.B prt\-get info kdelibs -show info about kdelibs - -.TP -.B prt\-get search icq -Search all ports containing 'icq' in their name - -.TP -.B prt\-get grpinst \-\-test `prt\-get quickdep kdenetwork` -Show what would happen if you installed all packages needed for -kdenetwork (test mode). Remove \-\-test to install kdenetwork and all -it's dependencies. Remember that grpinst stops installing when one -installing of one package fails - -.TP -.B prt\-get update `prt\-get quickdiff` -Update all packages where a different version is in the ports tree - -.SH "AUTHORS" -Johannes Winkelmann <jw@tks6.net> -.SH "SEE ALSO" -prt\-get.conf(5), prt\-cache(8), pkgmk(8) pkgadd(8), ports(8) Copied: tools/prt-get/branches/prt-get-5.13/doc/prt-get.8 (from rev 1836, tools/prt-get/trunk/doc/prt-get.8) =================================================================== --- tools/prt-get/branches/prt-get-5.13/doc/prt-get.8 (rev 0) +++ tools/prt-get/branches/prt-get-5.13/doc/prt-get.8 2006-09-08 18:05:30 UTC (rev 1849) @@ -0,0 +1,567 @@ +.\" man page for prt-get +.\" Johannes Winkelmann, jw@tks6.net +.\" +.\" my first man page, so forgive me for the errors :-) +.\" +.\" .PU +.TH "prt-get" "8" "" "" "" +.SH "NAME" +.LP +prt\-get \- an advanced package management tool to be used with +pkgutils from CRUX (see http://www.crux.nu) +.SH "SYNOPSIS" +.B prt\-get command [options] <arguments> +.br +.SH "DESCRIPTION" +prt\-get is a package management tool which provides additional +functionality to crux' package management system. It works with the +local ports tree and is therefore fully compatible with ports(8) and +pkgmk(8)/pkgadd(8). It offers the following features: + +.PP +.TP +\ \ \ \(bu +abstract ports installation/update from file system + +.TP +\ \ \ \(bu +install/update a list of packages with one command + +.TP +\ \ \ \(bu +list dependencies for a list of packages + +.TP +\ \ \ \(bu +show information about ports + +.TP +\ \ \ \(bu +search within the ports + +.PP + +What prt\-get basically does is installing and upgrading packages, using +pkgmk and pkgadd. Additionally, you don't have be in the port's +directory to call prt\-get. prt\-get will search for the respective port +itself in a list of directories specified in /etc/prt\-get.conf. This +allows you to just install or update a package, without caring where +it actually is located on your file system. + +.PP + +prt\-get also offers some features like searching ports by name, +showing information about ports (without installing them of course) +and can list the dependencies listed in the Pkgfile, and provide a +complete dependency list for a port. Note that dependencies are no +requirement for crux packages and therefore not always accurate. There's +a possiblity to use an external dependency map to get dependency +listings for ports which don't provide them in their Pkgfile. + +.PP + +prt\-get has a test mode so you can see what effect an install/update +operation would have. Use the \-\-test switch for this (see also: +OPTIONS) + +.SH "RETURN VALUE" +prt\-get returns 0 on success and a non-zero value otherwise (exact +value -> meaning mapping to be determined...) + +.SH "COMMANDS" +prt\-get uses so called commands, which always have to be the first +non-option argument passed. This is very similar to +.B cvs(1). +[command] can be one of the following: + + +.TP +.B install [\-\-margs] [\-\-aargs] [\-\-log] <package1> [<package2> ...] +install all packages in the listed order. Note that you can do this +from any directory + +.TP +.B depinst [\-\-margs] [\-\-aargs] [\-\-log] <package1> [<package2> ...] +install all packages in the listed order including their dependencies. +Note that outdated packages won't be updated. + +.TP +.B grpinst [\-\-margs] [\-\-aargs] [\-\-log] <package1> [<package2> ...] +install all packages in the listed order, but stop if installation of +one package fails. This can be used to install packages where package2 +depends on package1 + +.TP +.B update [\-\-margs] [\-\-aargs] [\-\-log] <package1> [<package2> ...] +update all packages listed in this order + +.TP +.B remove <package1> [<package2> ...] +remove packages listed in this order + +.TP +.B sysup [\-\-nodeps] +Update all installed packages which are outdated. Sorts by dependencies +by default. If you don't want prt-get to resolve the dependencies, use +the --nodeps switch. Also see the +.B lock +and +.B unlock +commands to keep the currently installed versions, even if there are +changes in the ports tree. If you want to update only diffs which have +a lower version installed than the one in the ports tree, use the +--prefer-higher option. + +.TP +.B lock <package1> [<package2>...] +Do not update these packages in a +.B sysup +operation + +.TP +.B unlock <package1> [<package2>...] +Remove lock from these packages + +.TP +.B listlocked [-v|-vv] +List names of packages which are locked. As always, +.B -v +will additionally show the version, and +.B -vv +also includes the description from the Pkgfile. Note that the +.B -vv +switch will slow down the operation remarkably. + +.TP +.B diff [--all] [<package1> <package2> ...] +show differences between installed packages and ports in the ports +tree. If arguments are given, shows only differences for these +packages, otherwise all differences are shown. It's also possible to use +shell like +.B wildcards +for the diff command. Make sure you escape where needed. Locked +packages are only displayed if you use the --all switch. If you want +to see only diffs which have a lower version installed than the one in +the ports tree, use the --prefer-higher option. + +.TP +.B quickdiff +prints a simple list of packages which have a different version in the +ports tree than what is installed. This is meant as an input for +.B prt\-get update, +so you can update all ports on your system with one simple command. If you want +to see only diffs which have a lower version installed than the one in +the ports tree, use the --prefer-higher option. + +.TP +.B search [\-v|\-vv] [--path] [--regex]<expr> +Search the ports tree for +.B expr +in their name + +.TP +.B dsearch [\-v|\-vv] [--path] [--regex]<expr> +Search the ports tree for +.B expr +in both name and description. The search in the description is not case +sensitive. Note that this requires prt\-get to read every Pkgfile, which +makes it rather slow; if you like this, consider using the cache +functionality, so you only have to spend this time once after updating +the ports tree has been updated. + +.TP +.B fsearch [--full] [--regex] <pattern> +Search the ports tree for +.B pattern +as file name in their footprint. When called without '--full', strips +the directories from the file names before matching; this behaviour +will change in prt-get 0.6, where full path search will be +default. Pattern can be a shell-like wildcard pattern (e.g prt-get +fsearch "*.h") or regexps. + + +.TP +.B info <port> +Print available info for a port + +.TP +.B path <port> +Print the path of a port + +.TP +.B readme <port> +Print the port's README file if it exists; if set, uses $PAGER + +.TP +.B depends <package1> [<package2> ...] +print a recursive list of dependencies to install the packages passed +as argument. It shows a list with ports which are found, plus a list +of ports which are missing + +.TP +.B quickdep <package1> [<package2> ...] +print a simple list of recursive dependencies for all the ports passed +as argument in a simple format to be used by +.B prt\-get install +to make an install including dependencies +.B Does not display dependencies which are not in the ports tree + +.TP +.B dependent <package> +print a list of package which depend on +.B package. + +Usually shows dependent packages which are installed. To see all dependencies, +add the --all switch; use --recursive to get a recursive list (without +duplication), and --tree to get a nicely indented one + +.TP +.B deptree <package> +print a tree of the dependencies of the package +.B package. +Subtrees already shown are marked with '-->' to save some space, in +order to show them all, add the --all switch + +.TP +.B dup [-v] [format] +List ports which can be found in multiple directories configured in +.B /etc/prt-get.conf +Use the verbose switch to simulate the output of version 5.12 and older (likely +to go away in the future). The format string can be used to create user +specified formats. The following symbols are currently replaced: + +.TP +\ \ \ \(bu +%n \-> name of the port + +.TP +\ \ \ \(bu +%p1 \-> Full path (including name) to port taking precendence + +.TP +\ \ \ \(bu +%p2 \-> Full path (including name) to port being hidden + +.TP +\ \ \ \(bu +%v1 \-> Version of port taking precendence + +.TP +\ \ \ \(bu +%v2 \-> Version of port being hidden + + +.TP +.B list [\-v|\-vv] [filter] [--path] [--regex] +List ports available in the ports tree. It's basically the same as +.B ports \-l +but looks in all directories specified in +.B /etc/prt\-get.conf. +It's also possible to use +shell like +.B wildcards +for the list command. Make sure you escape where needed + +.TP +.B printf <format string1> [\-\-sort=<format string2>] [\-\-filter=<filter>] +Print formated port list format string can contain variables, which +are replaced like this: +.TP +\ \ \ \(bu +%n \-> name + +.TP +\ \ \ \(bu +%p \-> path + +.TP +\ \ \ \(bu +%v \-> version + +.TP +\ \ \ \(bu +%r \-> release + +.TP +\ \ \ \(bu +%d \-> description + +.TP +\ \ \ \(bu +%e \-> dependencies + +.TP +\ \ \ \(bu +%u \-> URL + +.TP +\ \ \ \(bu +%P -> Packager + +.TP +\ \ \ \(bu +%M -> Maintainer + +.TP +\ \ \ \(bu +%R -> Readme ("yes"/"no") + +.TP +\ \ \ \(bu +%E -> pre-install script ("yes"/"no") + +.TP +\ \ \ \(bu +%O -> post-install script ("yes"/"no") + +.TP +\ \ \ \(bu +%l -> is locked ("yes"/"no") + +.TP +\ \ \ \(bu +%i \-> "no" if not installed, "yes" if it's installed and +up to date and "diff" if it's installed and a new version is in the +ports tree. + +Use "\\n" and "\\t" to format your output (no additional format specified +suported). The optional format string2 can contain the same variables +as format string1 and is used to sort the output. You can specify a +.B wildcard filter +to filter by package name. + + +.TP +.B listinst [\-v|\-vv] [filter] [--regex] +List installed ports. It's basically the same as +.B pkginfo \-i, +but omits version when called without verbose (\-v, \-vv) switch. Plus +it is notably faster in my tests. \-v adds version information, \-vv +adds version and description. +.B Warning: +\-vv will slow down the process because it requires prt\-get to scan +both the ports database and the ports tree. +It's also possible to use shell like +.B wildcards +for the listinst command. Make sure you escape where needed + +.TP +.B listorphans [\-v|\-vv] +List installed ports which have no dependent packages + + + +.TP +.B isinst <package> +Check whether a package is installed. The same as +.B pkginfo \-i|grep ^package +.TP + +.TP +.B current <package> +Prints out the version of the currently installed package + + +.TP +.B ls [--path] <package> +Prints out a listing of the port's directory + +.TP +.B cat <package> [<file>] +Prints out the file to stdout. If <file> is not specified, 'Pkgfile' is used. If set, uses $PAGER + +.TP +.B edit <package> <file> +Edit the file using the editor specified in the $EDITOR environment variable. +If <file> is not specified, 'Pkgfile' is used + + +.TP +.B help +Shows a help screen + +.TP +.B dumpconfig +Dump the configuration to the current terminal + +.TP +.B version +Shows the current version of prt\-get + +.TP +.B cache +create a cache file from the ports tree to be used by prt\-get using the +\-\-cache option. Remember to run prt\-get cache each time you update the +ports tree + +.SH "OPTIONS" + +.TP +.B -f, -i +Force install; Implies 'pkgadd -f'; same as --aargs=-f + +.TP +.B -fr +Force rebuild, Implies 'pkgmk -f'; same as --margs=-f + +.TP +.B -um +Update md5sum, implies 'pkgmk -um'; same as --margs=-um + +.TP +.B -im +Ignore md5sum, implies 'pkgmk -im'; same as --margs=-im + +.TP +.B -uf +Update footprint, implies 'pkgmk -uf'; same as --margs=-uf + +.TP +.B -if +Ignore footprint, implies 'pkgmk -if'; same as --margs=-if + +.TP +.B -ns +No stripping, implies 'pkgmk -ns'; same as --margs=-ns + +.TP +.B -kw +Keep working directory, implies 'pkgmk -kw'; same as --margs=-kw + +.TP +.B --ignore=<package1,package2,...> +Don't install those packages, even if they're listed as dependency + + +.TP +.B \-\-cache +Use cache file for this command + +.TP +.B \-\-test +Dry run, don't actually install anything, mostly interesting for +.B prt\-get install, prt\-get grpinst, prt\-get update, prt\-get sysup + +.TP +.B \-\-pre-install +Execute pre-install script if it's there + +.TP +.B \-\-post-install +Execute post-install script if it's there + +.TP +.B \-\-install-scripts +Execute pre-install and post-install script if they're there + +.TP +.B \-\-no-std-config +Don't parse the default configuration file + +.TP +.B \-\-config-prepend=<string> +Prepend <string> to configuration + +.TP +.B \-\-config-append=<string> +Append <string> to configuration + +.TP +.B \-\-config-set=<string> +Set <string> in configuration, overriding configuration file + + +.TP +.B \-v, \-vv +verbose and more verbose, relevant for +.B prt\-get search, prt\-get list +verbose shows version of a port, more verbose shows version and +description (if available) + +.B \-\-path +Show path info; used in 'search', 'dsearch', 'list' and 'depends' + +.B \-\-regex +Interpret filter and search pattern as regular expression + +.TP +.B \-\-margs="...", e.g. \-\-margs="\-im" +arguments to be passed to pkgmk, relevant for +.B prt\-get install, prt\-get grpinst, prt\-get update +note that \-d is already passed to pkgmk anyway + +.TP +.B \-\-aargs="...", e.g. \-\-aargs="\-f" +arguments to be passed to pkgadd, relevant for +.B prt\-get install, prt\-get grpinst, prt\-get update + +.TP +.B \-\-rargs="..." +arguments to be passed to pkgrm; currently not used, implemented for +future uses and consistency reasons + +.TP +.B \-\-prefer-higher, -ph +Make prt-get parse the version strings and prefer the higher version, +even if the one found in the ports tree is lower. Will influence diff, +quickdiff and sysup. + +.TP +.B \-\-strict-diff, -sd +Override the 'preferhigher' configuration option + + +.TP +.B \-\-config=<file> +Use alternative configuration file to read ports directories from + +.TP +.B \-\-install-root=<dir> +Use <dir> as root directory for your installation; allows to install to +a different directory than '/'. In daily usage, this option is not +required; helpful if you're developing an independent installation. + +.TP +.B \-\-log +Write build output to log file + +.SH "CONFIGURATION" +.TP +See man prt\-get.conf(5) + +.SH "EXAMPLES" +.TP +.B prt\-get install irssi +download, build and install irssi, with one simple command + +.TP +.B prt\-get install indent mplayer +install indent and mplayer + +.TP +.B prt\-get update openssh +update your current version of openssh :\-) + +.TP +.B prt\-get info kdelibs +show info about kdelibs + +.TP +.B prt\-get search icq +Search all ports containing 'icq' in their name + +.TP +.B prt\-get grpinst \-\-test `prt\-get quickdep kdenetwork` +Show what would happen if you installed all packages needed for +kdenetwork (test mode). Remove \-\-test to install kdenetwork and all +it's dependencies. Remember that grpinst stops installing when one +installing of one package fails + +.TP +.B prt\-get update `prt\-get quickdiff` +Update all packages where a different version is in the ports tree + +.SH "AUTHORS" +Johannes Winkelmann <jw@tks6.net> +.SH "SEE ALSO" +prt\-get.conf(5), prt\-cache(8), pkgmk(8) pkgadd(8), ports(8) Deleted: tools/prt-get/branches/prt-get-5.13/doc/prt-get.conf.5 =================================================================== --- tools/prt-get/trunk/doc/prt-get.conf.5 2006-04-04 15:39:45 UTC (rev 1137) +++ tools/prt-get/branches/prt-get-5.13/doc/prt-get.conf.5 2006-09-08 18:05:30 UTC (rev 1849) @@ -1,157 +0,0 @@ -.\" man page for prt-get.conf -.\" Johannes Winkelmann, jw@tks6.net - - -.PU -.TH prt-get.conf 5 -.SH "NAME" -.LP -prt-get.conf - Configuration file for prt-get - -.SH "DESCRIPTION" -This file, by default -.IR /etc/prt-get.conf , -is read by prt-get and prt-cache (see prt-get(8) and prt-cache(8)) -.LP -It might look like this: -.IP -.nf -### -# prt-get.conf - -# root directories -prtdir /usr/ports/base -prtdir /usr/ports/opt -prtdir /usr/ports/contrib - -prtdir /usr/ports/unofficial - -# use mutt and yafc from local build directory -prtdir /home/jw/build:mutt, yafc - -# change default location of cache file -cachefile /tmp/port-cache - -# write a log file -writelog enabled -logmode append -logfile /tmp/log/%n.log - -# show compact readme information -readme compact - -# execute pre- and post-installs scripts (default no) -runscripts yes - -# don't prefer higher versions (default no) -preferhigher yes - -# use regexps for searching (default no) -useregex yes -.fi - -.LP -There are a few values to be configured: the location where to look -for the ports, the location of the cache file, some log options and -how to notify the user about README files. - -If you don't specify the -cache file, the default location is -.B /var/lib/pkg/prt-get.conf - -.LP -Every line can contain one configuration option. The format of the lines -is -.B <key> <value>. -The valid keys are -.B prtdir -and -.B cachefile. -The value for -.B prtdir -is a directory, the value for -.B cachefile -is a file to be used as cache - -.nf -<portname1>:<dependency1> <dependency2> -<portname2>:<dependency1> - -.B runscripts -if set to yes, execute pre- and post-install scripts - -.B preferhigher -if set to yes, prt-get will parse version strings and prefer the -higher one, even if the one found in the ports tree is lower. Will -influence diff, quickdiff and sysup - -.B useregex -if set to yes, prt-get will interpret search and filter patterns in -list, listinst, printf, search, dsearch and fsearch as regular -expressions. This will be the default in prt-get 0.6. - -.LP -.B makecommand -.B addcommand -.B removecommand -.B runscriptcommand -can be used to use an alternate command instead of 'pkgmk' for the -makecommand,'pkgadd' for the addcommand, 'pkgrm' for the -removecommand and 'sh' for the command which is used to run the pre- and -post-install scripts. These are expert options which shouldn't be used -in general; when used the wrong way, they can completely break prt-get's -original functionality. - - - -.LP -The log options are -.B writelog -which can be set to 'enabled' or 'disabled' -.B logmode -which can be set to 'append' or 'overwrite' -.B logfile -which represent the file path. All occurances of %n in logfile are -replaced with the port name and all occurances of %p are -replaced with the port's path, e.g. for port gcc in base, %p would be -.B /usr/base -and %n -.B gcc. -This allows you to have separate log files per port. - -.LP -If the readme option is set to something different than 'disabled', -prt-get will notify the user if she/he installs a port with a README -file. The option to configure this is called -.B readme -which can be set to 'verbose' (print separate information about README -files), 'compact' (integrate in result output) or 'disabled' (no information about README files). See -.B prt-get(8) -and especially the readme command how to read those README files using -prt-get - -.LP -The order of the prtdir options is important, as if a port is in multiple -directories, prt-get will use the one found first (directories listed -first have precedence) - -.LP -If you want to restrict the ports used from one prtdir, you can -append a comma separated list of ports to be used after the path, -using a colon (':') character to separate the two components -.B path:package1, package2,... -Note that this slows down prt-get a lot if you list a lot of packages. -If you become aware of speed problems due to this, create a separate -ports directory instead and use symlinks for the ports you want to use - -.LP -You can write comments after a '#' character. If you have '#' -characters in you pathes, there's no way to escape them (as there is no -way to escape ':' characters). Complain to the author if this is a -problem :-) - - -.SH "AUTHORS" -Johannes Winkelmann <jw@tks6.net> -.SH "SEE ALSO" -prt-get(8), pkgmk(8) pkgadd(8), ports(8) Copied: tools/prt-get/branches/prt-get-5.13/doc/prt-get.conf.5 (from rev 1250, tools/prt-get/trunk/doc/prt-get.conf.5) =================================================================== --- tools/prt-get/branches/prt-get-5.13/doc/prt-get.conf.5 (rev 0) +++ tools/prt-get/branches/prt-get-5.13/doc/prt-get.conf.5 2006-09-08 18:05:30 UTC (rev 1849) @@ -0,0 +1,160 @@ +.\" man page for prt-get.conf +.\" Johannes Winkelmann, jw@tks6.net + + +.PU +.TH prt-get.conf 5 +.SH "NAME" +.LP +prt-get.conf - Configuration file for prt-get + +.SH "DESCRIPTION" +This file, by default +.IR /etc/prt-get.conf , +is read by prt-get and prt-cache (see prt-get(8) and prt-cache(8)) +.LP +It might look like this: +.IP +.nf +### +# prt-get.conf + +# root directories +prtdir /usr/ports/base +prtdir /usr/ports/opt +prtdir /usr/ports/contrib + +prtdir /usr/ports/unofficial + +# use mutt and yafc from local build directory +prtdir /home/jw/build:mutt, yafc + +# change default location of cache file +cachefile /tmp/port-cache + +# write a log file +writelog enabled +logmode append +logfile /tmp/log/%n.log + +# show compact readme information +readme compact + +# execute pre- and post-installs scripts (default no) +runscripts yes + +# don't prefer higher versions (default no) +preferhigher yes + +# use regexps for searching (default no) +useregex yes +.fi + +.LP +There are a few values to be configured: the location where to look +for the ports, the location of the cache file, some log options and +how to notify the user about README files. + +If you don't specify the +cache file, the default location is +.B /var/lib/pkg/prt-get.cache + +.LP +Every line can contain one configuration option. The format of the lines +is +.B <key> <value>. +The valid keys are +.B prtdir +and +.B cachefile. +The value for +.B prtdir +is a directory, the value for +.B cachefile +is a file to be used as cache + +.nf +<portname1>:<dependency1> <dependency2> +<portname2>:<dependency1> + +.B runscripts +if set to yes, execute pre- and post-install scripts + +.B preferhigher +if set to yes, prt-get will parse version strings and prefer the +higher one, even if the one found in the ports tree is lower. Will +influence diff, quickdiff and sysup + +.B useregex +if set to yes, prt-get will interpret search and filter patterns in +list, listinst, printf, search, dsearch and fsearch as regular +expressions. This will be the default in prt-get 0.6. + +.LP +.B makecommand +.B addcommand +.B removecommand +.B runscriptcommand +can be used to use an alternate command instead of 'pkgmk' for the +makecommand,'pkgadd' for the addcommand, 'pkgrm' for the +removecommand and 'sh' for the command which is used to run the pre- and +post-install scripts. These are expert options which shouldn't be used +in general; when used the wrong way, they can completely break prt-get's +original functionality. + + + +.LP +The log options are +.B writelog +which can be set to 'enabled' or 'disabled' +.B logmode +which can be set to 'append' or 'overwrite' +.B rmlog_on_success +which can be set to 'yes' or 'no'; when set to yes, log files of +successful builds will be removed +.B logfile +which represent the file path. All occurances of %n in logfile are +replaced with the port name and all occurances of %p are +replaced with the port's path, e.g. for port gcc in base, %p would be +.B /usr/base +and %n +.B gcc. +This allows you to have separate log files per port. + +.LP +If the readme option is set to something different than 'disabled', +prt-get will notify the user if she/he installs a port with a README +file. The option to configure this is called +.B readme +which can be set to 'verbose' (print separate information about README +files), 'compact' (integrate in result output) or 'disabled' (no information about README files). See +.B prt-get(8) +and especially the readme command how to read those README files using +prt-get + +.LP +The order of the prtdir options is important, as if a port is in multiple +directories, prt-get will use the one found first (directories listed +first have precedence) + +.LP +If you want to restrict the ports used from one prtdir, you can +append a comma separated list of ports to be used after the path, +using a colon (':') character to separate the two components +.B path:package1, package2,... +Note that this slows down prt-get a lot if you list a lot of packages. +If you become aware of speed problems due to this, create a separate +ports directory instead and use symlinks for the ports you want to use + +.LP +You can write comments after a '#' character. If you have '#' +characters in you pathes, there's no way to escape them (as there is no +way to escape ':' characters). Complain to the author if this is a +problem :-) + + +.SH "AUTHORS" +Johannes Winkelmann <jw@tks6.net> +.SH "SEE ALSO" +prt-get(8), pkgmk(8) pkgadd(8), ports(8) Deleted: tools/prt-get/branches/prt-get-5.13/misc/Makefile.in =================================================================== --- tools/prt-get/trunk/misc/Makefile.in 2006-04-04 15:39:45 UTC (rev 1137) +++ tools/prt-get/branches/prt-get-5.13/misc/Makefile.in 2006-09-08 18:05:30 UTC (rev 1849) @@ -1,309 +0,0 @@ -# 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 = : -subdir = misc -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/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)$(sysconfdir)" -sysconfDATA_INSTALL = $(INSTALL_DATA) -DATA = $(sysconf_DATA) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -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@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_STRIP = @ac_ct_STRIP@ -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_alias = @build_alias@ -datadir = @datadir@ -exec_prefix = @exec_prefix@ -host_alias = @host_alias@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -EXTRA_DIST = prt-get_complete prt-get.aliases prt-get.deplist prt-get.conf -sysconf_DATA = prt-get.conf -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 misc/Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu misc/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 -uninstall-info-am: -install-sysconfDATA: $(sysconf_DATA) - @$(NORMAL_INSTALL) - test -z "$(sysconfdir)" || $(mkdir_p) "$(DESTDIR)$(sysconfdir)" - @list='$(sysconf_DATA)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(sysconfDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(sysconfdir)/$$f'"; \ - $(sysconfDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(sysconfdir)/$$f"; \ - done - -uninstall-sysconfDATA: - @$(NORMAL_UNINSTALL) - @list='$(sysconf_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(sysconfdir)/$$f'"; \ - rm -f "$(DESTDIR)$(sysconfdir)/$$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)$(sysconfdir)"; 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 mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-exec-am: install-sysconfDATA - -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 - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-info-am uninstall-sysconfDATA - -.PHONY: all all-am check check-am clean clean-generic distclean \ - distclean-generic 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 install-sysconfDATA installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \ - uninstall-am uninstall-info-am uninstall-sysconfDATA - -# 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: Copied: tools/prt-get/branches/prt-get-5.13/misc/Makefile.in (from rev 1846, tools/prt-get/trunk/misc/Makefile.in) =================================================================== --- tools/prt-get/branches/prt-get-5.13/misc/Makefile.in (rev 0) +++ tools/prt-get/branches/prt-get-5.13/misc/Makefile.in 2006-09-08 18:05:30 UTC (rev 1849) @@ -0,0 +1,316 @@ +# 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 = : +subdir = misc +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/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)$(sysconfdir)" +sysconfDATA_INSTALL = $(INSTALL_DATA) +DATA = $(sysconf_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +GREP = @GREP@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +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@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +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_alias = @build_alias@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host_alias = @host_alias@ +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@ +EXTRA_DIST = prt-get_complete prt-get.aliases prt-get.deplist prt-get.conf +sysconf_DATA = prt-get.conf +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 misc/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu misc/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 +uninstall-info-am: +install-sysconfDATA: $(sysconf_DATA) + @$(NORMAL_INSTALL) + test -z "$(sysconfdir)" || $(mkdir_p) "$(DESTDIR)$(sysconfdir)" + @list='$(sysconf_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(sysconfDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(sysconfdir)/$$f'"; \ + $(sysconfDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(sysconfdir)/$$f"; \ + done + +uninstall-sysconfDATA: + @$(NORMAL_UNINSTALL) + @list='$(sysconf_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(sysconfdir)/$$f'"; \ + rm -f "$(DESTDIR)$(sysconfdir)/$$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)$(sysconfdir)"; 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 mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-exec-am: install-sysconfDATA + +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 + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-info-am uninstall-sysconfDATA + +.PHONY: all all-am check check-am clean clean-generic distclean \ + distclean-generic 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 install-sysconfDATA installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \ + uninstall-am uninstall-info-am uninstall-sysconfDATA + +# 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: Deleted: tools/prt-get/branches/prt-get-5.13/misc/prt-get.conf =================================================================== --- tools/prt-get/trunk/misc/prt-get.conf 2006-04-04 15:39:45 UTC (rev 1137) +++ tools/prt-get/branches/prt-get-5.13/misc/prt-get.conf 2006-09-08 18:05:30 UTC (rev 1849) @@ -1,42 +0,0 @@ -### -### prt-get conf -### - -prtdir /usr/ports/base -prtdir /usr/ports/opt - -### clc ports -prtdir /usr/ports/contrib - -### use mypackage form local directory -# prtdir /home/packages/build:mypackage - -### use alternate cache file (default: /var/lib/pkg/prt-get.cache -# cachefile /mnt/nfs/cache - -### log options: -# writelog enabled # (enabled|disabled) -# logmode overwrite # (append|overwrite) -logfile /var/log/pkgbuild/%n.log - # path, %p=path to port dir, %n=port name - # %v=version, %r=release - -### print README information: -# readme verbose # (verbose|compact|disabled) - -### run pre- and post-installs scripts; yes is equivalent to the -### --install-scripts option -# runscripts no # (no|yes) - -### alternative commands -# makecommand pkgmk -# addcommand pkgadd -# removecommand pkgrm -# runscriptcommand sh - - -### prefer higher versions in sysup / diff -# preferhigher no # (yes|no) - -### use regexp search -# useregex no # (yes|no) Copied: tools/prt-get/branches/prt-get-5.13/misc/prt-get.conf (from rev 1140, tools/prt-get/trunk/misc/prt-get.conf) =================================================================== --- tools/prt-get/branches/prt-get-5.13/misc/prt-get.conf (rev 0) +++ tools/prt-get/branches/prt-get-5.13/misc/prt-get.conf 2006-09-08 18:05:30 UTC (rev 1849) @@ -0,0 +1,43 @@ +### +### prt-get conf +### + +prtdir /usr/ports/core +prtdir /usr/ports/opt + +### User contributed ports - check out http://crux.nu/Main/ContribRules +# prtdir /usr/ports/contrib + +### use mypackage form local directory +# prtdir /home/packages/build:mypackage + +### use alternate cache file (default: /var/lib/pkg/prt-get.cache +# cachefile /mnt/nfs/cache + +### log options: +# writelog enabled # (enabled|disabled) +# logmode overwrite # (append|overwrite) +# rm_on_success no # (yes|no) +logfile /var/log/pkgbuild/%n.log + # path, %p=path to port dir, %n=port name + # %v=version, %r=release + +### print README information: +# readme verbose # (verbose|compact|disabled) + +### run pre- and post-installs scripts; yes is equivalent to the +### --install-scripts option +# runscripts no # (no|yes) + +### alternative commands +# makecommand pkgmk +# addcommand pkgadd +# removecommand pkgrm +# runscriptcommand sh + + +### prefer higher versions in sysup / diff +# preferhigher no # (yes|no) + +### use regexp search +# useregex no # (yes|no) Deleted: tools/prt-get/branches/prt-get-5.13/misc/prt-get_complete =================================================================== --- tools/prt-get/trunk/misc/prt-get_complete 2006-04-04 15:39:45 UTC (rev 1137) +++ tools/prt-get/branches/prt-get-5.13/misc/prt-get_complete 2006-09-08 18:05:30 UTC (rev 1849) @@ -1,98 +0,0 @@ -# prt-get(8), prt-cache(8) completion by Johannes Winkelmann, jw@tks6.net -# problems: options ending on = should not add a space afterwards -# -# 07.07.2002: use prt-get listinst (from 0.3.1pre1) instead of pkginfo -# 06.07.2002: first version - -_prt-get() -{ - local cur prev - - COMPREPLY=() - cur=${COMP_WORDS[COMP_CWORD]} - prev=${COMP_WORDS[COMP_CWORD-1]} - - if [ $COMP_CWORD -eq 1 ]; then - COMPREPLY=( $( compgen -W ' \ - install depinst update grpinst help \ - version readme list info path \ - search dsearch fsearch printf cache \ - dependent sysup current lock unlock \ - listlocked diff quickdiff depends quickdep \ - dup isinst cat ls edit deptree \ - remove listinst' $cur )) - fi - - - if [ $COMP_CWORD '>' 1 ]; then - if [[ "$cur" != -* ]]; then - case ${COMP_WORDS[1]} in - "install" | "depinst" | "grpinst" | "path" | "dependent" | \ - "depends" | "quickdep" | "info" | "readme" | \ - "ls" | "isinst" | "deptree" ) - if [ -f /var/lib/pkg/prt-get.cache ]; then - plist=`prt-cache list` - if [ ! "$plist" == "" ]; then - COMPREPLY=( $( compgen -W '$plist' $cur ) ) - fi - fi - ;; - "cat" | "edit" ) - if [ $COMP_CWORD '>' 2 ]; then - plist=`prt-get ls ${COMP_WORDS[2]}` - COMPREPLY=( $( compgen -W '$plist' $cur ) ) - else - if [ -f /var/lib/pkg/prt-get.cache ]; then - plist=`prt-cache list` - if [ ! "$plist" == "" ]; then - COMPREPLY=( $( compgen -W '$plist' $cur ) ) - fi - fi - fi - ;; - "current"|"lock"|"remove") - plist=`prt-get listinst` - COMPREPLY=( $( compgen -W '$plist' $cur ) ) - ;; - "update") - plist=`prt-get quickdiff` - COMPREPLY=( $( compgen -W '$plist' $cur ) ) - ;; - "unlock") - plist=`prt-get listlocked` - COMPREPLY=( $( compgen -W '$plist' $cur ) ) - ;; - esac - else - case ${COMP_WORDS[1]} in - "install" | "update" | "groupinst") - COMPREPLY=( $( compgen -W '--config= --cache \ - --pre-install \ - --post-install \ - --install-scripts \ - --log --test \ - --config \ - --config-append= \ - --config-prepend= \ - --config-set= \ - --aargs= --margs= \ - --rargs= \ - --install-root=' \ - -- $cur ) ) - ;; - "list" | "search" | "dsearch" ) - COMPREPLY=( $( compgen -W '-v -vv --cache \ - --config=' -- $cur ) ) - ;; - *) - COMPREPLY=( $( compgen -W '--cache --log --test --config=' \ - -- $cur ) ) - ;; - esac - fi - fi - - return 0 -} -complete -F _prt-get -o default prt-get -complete -F _prt-get -o default prt-cache Copied: tools/prt-get/branches/prt-get-5.13/misc/prt-get_complete (from rev 1236, tools/prt-get/trunk/misc/prt-get_complete) =================================================================== --- tools/prt-get/branches/prt-get-5.13/misc/prt-get_complete (rev 0) +++ tools/prt-get/branches/prt-get-5.13/misc/prt-get_complete 2006-09-08 18:05:30 UTC (rev 1849) @@ -0,0 +1,98 @@ +# prt-get(8), prt-cache(8) completion by Johannes Winkelmann, jw@tks6.net +# problems: options ending on = should not add a space afterwards +# +# 07.07.2002: use prt-get listinst (from 0.3.1pre1) instead of pkginfo +# 06.07.2002: first version + +_prt-get() +{ + local cur prev + + COMPREPLY=() + cur=${COMP_WORDS[COMP_CWORD]} + prev=${COMP_WORDS[COMP_CWORD-1]} + + if [ $COMP_CWORD -eq 1 ]; then + COMPREPLY=( $( compgen -W ' \ + install depinst update grpinst help \ + version readme list info path \ + search dsearch fsearch printf cache \ + dependent sysup current lock unlock \ + listlocked diff quickdiff depends quickdep \ + dup isinst cat ls edit deptree \ + remove listinst dumpconfig listofphans' $cur )) + fi + + + if [ $COMP_CWORD '>' 1 ]; then + if [[ "$cur" != -* ]]; then + case ${COMP_WORDS[1]} in + "install" | "depinst" | "grpinst" | "path" | "dependent" | \ + "depends" | "quickdep" | "info" | "readme" | \ + "ls" | "isinst" | "deptree" ) + if [ -f /var/lib/pkg/prt-get.cache ]; then + plist=`prt-cache list` + if [ ! "$plist" == "" ]; then + COMPREPLY=( $( compgen -W '$plist' $cur ) ) + fi + fi + ;; + "cat" | "edit" ) + if [ $COMP_CWORD '>' 2 ]; then + plist=`prt-get ls ${COMP_WORDS[2]}` + COMPREPLY=( $( compgen -W '$plist' $cur ) ) + else + if [ -f /var/lib/pkg/prt-get.cache ]; then + plist=`prt-cache list` + if [ ! "$plist" == "" ]; then + COMPREPLY=( $( compgen -W '$plist' $cur ) ) + fi + fi + fi + ;; + "current"|"lock"|"remove") + plist=`prt-get listinst` + COMPREPLY=( $( compgen -W '$plist' $cur ) ) + ;; + "update") + plist=`prt-get quickdiff` + COMPREPLY=( $( compgen -W '$plist' $cur ) ) + ;; + "unlock") + plist=`prt-get listlocked` + COMPREPLY=( $( compgen -W '$plist' $cur ) ) + ;; + esac + else + case ${COMP_WORDS[1]} in + "install" | "update" | "groupinst") + COMPREPLY=( $( compgen -W '--config= --cache \ + --pre-install \ + --post-install \ + --install-scripts \ + --log --test \ + --config \ + --config-append= \ + --config-prepend= \ + --config-set= \ + --aargs= --margs= \ + --rargs= \ + --install-root=' \ + -- $cur ) ) + ;; + "list" | "search" | "dsearch" ) + COMPREPLY=( $( compgen -W '-v -vv --cache \ + --config=' -- $cur ) ) + ;; + *) + COMPREPLY=( $( compgen -W '--cache --log --test --config=' \ + -- $cur ) ) + ;; + esac + fi + fi + + return 0 +} +complete -F _prt-get -o default prt-get +complete -F _prt-get -o default prt-cache Deleted: tools/prt-get/branches/prt-get-5.13/src/Makefile.in =================================================================== --- tools/prt-get/trunk/src/Makefile.in 2006-04-04 15:39:45 UTC (rev 1137) +++ tools/prt-get/branches/prt-get-5.13/src/Makefile.in 2006-09-08 18:05:30 UTC (rev 1849) @@ -1,450 +0,0 @@ -# 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@ - -# Makefile.am for prt-get by Johannes Winkelmann - -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 = : -bin_PROGRAMS = prt-get$(EXEEXT) -subdir = src -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" -binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) -PROGRAMS = $(bin_PROGRAMS) -am_prt_get_OBJECTS = argparser.$(OBJEXT) depresolver.$(OBJEXT) \ - installtransaction.$(OBJEXT) main.$(OBJEXT) package.$(OBJEXT) \ - pkgdb.$(OBJEXT) prtget.$(OBJEXT) repository.$(OBJEXT) \ - stringhelper.$(OBJEXT) process.$(OBJEXT) \ - configuration.$(OBJEXT) signaldispatcher.$(OBJEXT) \ - lockfile.$(OBJEXT) file.$(OBJEXT) locker.$(OBJEXT) \ - versioncomparator.$(OBJEXT) datafileparser.$(OBJEXT) \ - pg_regex.$(OBJEXT) -prt_get_OBJECTS = $(am_prt_get_OBJECTS) -prt_get_LDADD = $(LDADD) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -CXXLD = $(CXX) -CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ - -o $@ -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -SOURCES = $(prt_get_SOURCES) -DIST_SOURCES = $(prt_get_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMDEP_FALSE = @AMDEP_FALSE@ -AMDEP_TRUE = @AMDEP_TRUE@ -AMTAR = @AMTAR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -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@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_STRIP = @ac_ct_STRIP@ -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_alias = @build_alias@ -datadir = @datadir@ -exec_prefix = @exec_prefix@ -host_alias = @host_alias@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -prt_get_SOURCES = argparser.cpp argparser.h\ - depresolver.cpp depresolver.h \ - installtransaction.cpp installtransaction.h \ - main.cpp \ - package.cpp package.h \ - pkgdb.cpp pkgdb.h \ - prtget.cpp prtget.h \ - repository.cpp repository.h \ - stringhelper.cpp stringhelper.h \ - process.cpp process.h \ - configuration.cpp configuration.h \ - signaldispatcher.cpp signaldispatcher.h \ - lockfile.cpp lockfile.h \ - file.cpp file.h \ - locker.cpp locker.h \ - versioncomparator.cpp versioncomparator.h \ - datafileparser.cpp datafileparser.h \ - pg_regex.cpp pg_regex.h - -AM_CPPFLAGS = -DSYSCONFDIR=\"$(sysconfdir)\" \ - -DLOCALSTATEDIR=\"$(localstatedir)\" - -all: all-am - -.SUFFIXES: -.SUFFIXES: .cpp .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/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 -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 \ - ; then \ - f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ - echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ - $(INSTALL_PROGRAM_ENV) $(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: - -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) -prt-get$(EXEEXT): $(prt_get_OBJECTS) $(prt_get_DEPENDENCIES) - @rm -f prt-get$(EXEEXT) - $(CXXLINK) $(prt_get_LDFLAGS) $(prt_get_OBJECTS) $(prt_get_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/argparser.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/configuration.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/datafileparser.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/depresolver.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/installtransaction.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/locker.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lockfile.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/package.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pg_regex.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pkgdb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/process.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prtget.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/repository.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/signaldispatcher.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stringhelper.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/versioncomparator.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) '$<'` -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 mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: - -install-exec-am: install-binPROGRAMS install-exec-local - -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 - -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 ctags distclean distclean-compile \ - distclean-generic 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-exec-local install-info install-info-am install-man \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-info-am - - -install-exec-local: install-binPROGRAMS - (cd $(DESTDIR)$(bindir); ln -sf prt-get prt-cache) -# 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: Copied: tools/prt-get/branches/prt-get-5.13/src/Makefile.in (from rev 1846, tools/prt-get/trunk/src/Makefile.in) =================================================================== --- tools/prt-get/branches/prt-get-5.13/src/Makefile.in (rev 0) +++ tools/prt-get/branches/prt-get-5.13/src/Makefile.in 2006-09-08 18:05:30 UTC (rev 1849) @@ -0,0 +1,457 @@ +# 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@ + +# Makefile.am for prt-get by Johannes Winkelmann + +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 = : +bin_PROGRAMS = prt-get$(EXEEXT) +subdir = src +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.in +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +PROGRAMS = $(bin_PROGRAMS) +am_prt_get_OBJECTS = argparser.$(OBJEXT) depresolver.$(OBJEXT) \ + installtransaction.$(OBJEXT) main.$(OBJEXT) package.$(OBJEXT) \ + pkgdb.$(OBJEXT) prtget.$(OBJEXT) repository.$(OBJEXT) \ + stringhelper.$(OBJEXT) process.$(OBJEXT) \ + configuration.$(OBJEXT) signaldispatcher.$(OBJEXT) \ + lockfile.$(OBJEXT) file.$(OBJEXT) locker.$(OBJEXT) \ + versioncomparator.$(OBJEXT) datafileparser.$(OBJEXT) \ + pg_regex.$(OBJEXT) +prt_get_OBJECTS = $(am_prt_get_OBJECTS) +prt_get_LDADD = $(LDADD) +DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ + -o $@ +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +SOURCES = $(prt_get_SOURCES) +DIST_SOURCES = $(prt_get_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +GREP = @GREP@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAKEINFO = @MAKEINFO@ +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@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +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_alias = @build_alias@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host_alias = @host_alias@ +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@ +prt_get_SOURCES = argparser.cpp argparser.h\ + depresolver.cpp depresolver.h \ + installtransaction.cpp installtransaction.h \ + main.cpp \ + package.cpp package.h \ + pkgdb.cpp pkgdb.h \ + prtget.cpp prtget.h \ + repository.cpp repository.h \ + stringhelper.cpp stringhelper.h \ + process.cpp process.h \ + configuration.cpp configuration.h \ + signaldispatcher.cpp signaldispatcher.h \ + lockfile.cpp lockfile.h \ + file.cpp file.h \ + locker.cpp locker.h \ + versioncomparator.cpp versioncomparator.h \ + datafileparser.cpp datafileparser.h \ + pg_regex.cpp pg_regex.h + +AM_CPPFLAGS = -DSYSCONFDIR=\"$(sysconfdir)\" \ + -DLOCALSTATEDIR=\"$(localstatedir)\" + +all: all-am + +.SUFFIXES: +.SUFFIXES: .cpp .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/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 +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 \ + ; then \ + f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(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: + -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) +prt-get$(EXEEXT): $(prt_get_OBJECTS) $(prt_get_DEPENDENCIES) + @rm -f prt-get$(EXEEXT) + $(CXXLINK) $(prt_get_LDFLAGS) $(prt_get_OBJECTS) $(prt_get_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/argparser.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/configuration.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/datafileparser.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/depresolver.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/installtransaction.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/locker.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lockfile.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/package.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pg_regex.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pkgdb.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/process.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prtget.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/repository.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/signaldispatcher.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stringhelper.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/versioncomparator.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) '$<'` +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 mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-exec-am: install-binPROGRAMS install-exec-local + +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 + +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 ctags distclean distclean-compile \ + distclean-generic 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-exec-local install-info install-info-am install-man \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-binPROGRAMS \ + uninstall-info-am + + +install-exec-local: install-binPROGRAMS + (cd $(DESTDIR)$(bindir); ln -sf prt-get prt-cache) +# 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: Deleted: tools/prt-get/branches/prt-get-5.13/src/argparser.cpp =================================================================== --- tools/prt-get/trunk/src/argparser.cpp 2006-04-04 15:39:45 UTC (rev 1137) +++ tools/prt-get/branches/prt-get-5.13/src/argparser.cpp 2006-09-08 18:05:30 UTC (rev 1849) @@ -1,445 +0,0 @@ -//////////////////////////////////////////////////////////////////////// -// FILE: argparser.cpp -// AUTHOR: Johannes Winkelmann, jw@tks6.net -// COPYRIGHT: (c) 2002 by Johannes Winkelmann -// --------------------------------------------------------------------- -// 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. -//////////////////////////////////////////////////////////////////////// - -using namespace std; - -#include "argparser.h" - -/*! - Construct a ArgParser object - \param argc argument count - \param argv argument vector -*/ -ArgParser::ArgParser( int argc, char** argv ) - : m_isCommandGiven( false ), - m_isForced( false ), - m_isTest( false ), - m_isAlternateConfigGiven( false ), - m_useCache( false ), - m_calledAsPrtCache( false ), - m_alternateConfigFile( "" ), - m_pkgmkArgs( "" ), - m_pkgaddArgs( "" ), - m_pkgrmArgs( "" ), - m_installRoot( "" ), - m_ignore( "" ), - m_argc( argc ), - m_argv( argv ), - m_verbose( 0 ), - m_writeLog( false ), - m_hasFilter( false ), - m_noStdConfig( false ), - m_nodeps( false ), - m_all( false ), - m_printPath( false ), - m_execPreInstall( false ), - m_execPostInstall( false ), - m_preferHigher( false ), - m_strictDiff( false ), - m_useRegex(false), - m_fullPath(false) -{ -} - - -/*! - \return true if an alternate configuration file is given -*/ -bool ArgParser::isAlternateConfigGiven() const -{ - return m_isAlternateConfigGiven; -} - - -/*! - \return true if a command is given -*/ -bool ArgParser::isCommandGiven() const -{ - return m_isCommandGiven; -} - - -/*! - \return a list of arguments not processed by ArgParser -*/ -const list<char*>& ArgParser::otherArgs() const -{ - return m_otherArgs; -} - - -/*! - \return what command was given -*/ -ArgParser::Type ArgParser::commandType() const -{ - return m_commandType; -} - - -/*! - \return addtional arguments to pkgmk -*/ -const string& ArgParser::pkgmkArgs() const -{ - return m_pkgmkArgs; -} - - -/*! - \return addtional arguments to pkgadd -*/ -const string& ArgParser::pkgaddArgs() const -{ - return m_pkgaddArgs; -} - - -/*! - \return the name of the alternative configuration file -*/ -const string& ArgParser::alternateConfigFile() const -{ - return m_alternateConfigFile; -} - - -/*! - parse the arguments - \return true on success -*/ -bool ArgParser::parse() -{ - const int commandCount = 34; - string commands[commandCount] = { "list", "search", "dsearch", - "info", - "depends", "install", "depinst", - "help", "isinst", "dup", "update", - "quickdep", "diff", "quickdiff", - "grpinst", "version", "cache", - "path", "listinst", "printf", "readme", - "dependent", "sysup", "current", - "fsearch", "lock", "unlock", - "listlocked", "cat", "ls", "edit", - "remove", "deptree", "dumpconfig" }; - - Type commandID[commandCount] = { LIST, SEARCH, DSEARCH, INFO, - DEPENDS, INSTALL, DEPINST, - HELP, ISINST, DUP, UPDATE, - QUICKDEP, DIFF, QUICKDIFF, - GRPINST, SHOW_VERSION, CREATE_CACHE, - PATH, LISTINST, PRINTF, README, - DEPENDENT, SYSUP, CURRENT, - FSEARCH, LOCK, UNLOCK, LISTLOCKED, - CAT, LS, EDIT, REMOVE, DEPTREE, - DUMPCONFIG }; - if ( m_argc < 2 ) { - return false; - } - - // if called from a symlink ending on prt-cache, use cached - // access - string app = m_argv[0]; - string::size_type pos = app.rfind( "/" ); - if ( pos != string::npos ) { - app = app.substr( pos ); - } - if ( app.find( "prt-cache" ) != string::npos ) { - m_useCache = true; - m_calledAsPrtCache = true; - } - - for ( int i = 1; i < m_argc; ++i ) { - if ( m_argv[i][0] == '-' ) { - string s = m_argv[i]; - if ( s == "-v" ) { - m_verbose += 1; - } else if ( s == "-vv" ) { - m_verbose += 2; - } else if ( s == "--force" ) { - m_isForced = true; - } else if ( s == "--test" ) { - m_isTest = true; - } else if ( s == "--cache" ) { - m_useCache = true; - } else if ( s == "--nodeps" ) { - m_nodeps = true; - } else if ( s == "--all" ) { - m_all = true; - } else if ( s == "--path" ) { - m_printPath = true; - } else if ( s == "--log" ) { - m_writeLog = true; - } else if ( s == "--pre-install" ) { - m_execPreInstall = true; - } else if ( s == "--post-install" ) { - m_execPostInstall = true; - } else if ( s == "--install-scripts" ) { - m_execPreInstall = true; - m_execPostInstall = true; - } else if ( s == "--no-std-config" ) { - m_noStdConfig = true; - } else if ( s == "--prefer-higher" || s == "-ph" ) { - m_preferHigher = true; - } else if ( s == "--strict-diff" || s == "-sd" ) { - m_strictDiff = true; - } else if ( s == "--regex" ) { - m_useRegex = true; - } else if ( s == "--full" ) { - m_fullPath = true; - - } else if ( s == "-f" ) { - m_pkgaddArgs += " " + s; - } else if ( s == "-fr" ) { - m_pkgmkArgs += " -f"; - } else if ( s == "-if" ) { - m_pkgmkArgs += " " + s; - } else if ( s == "-uf" ) { - m_pkgmkArgs += " " + s; - } else if ( s == "-im" ) { - m_pkgmkArgs += " " + s; - } else if ( s == "-um" ) { - m_pkgmkArgs += " " + s; - } else if ( s == "-kw" ) { - m_pkgmkArgs += " " + s; - } else if ( s == "-ns" ) { - m_pkgmkArgs += " " + s; - } else if ( s == "-fi" ) { - m_pkgaddArgs += " -f"; - } - - // substrings - else if ( s.substr( 0, 8 ) == "--margs=" ) { - m_pkgmkArgs += " " + s.substr( 8 ); - } else if ( s.substr( 0, 8 ) == "--aargs=" ) { - m_pkgaddArgs += " " + s.substr( 8 ); - } else if ( s.substr( 0, 8 ) == "--rargs=" ) { - m_pkgrmArgs = s.substr( 8 ); - } else if ( s.substr( 0, 7 ) == "--sort=" ) { - m_sortArgs = s.substr( 7 ); - } else if ( s.substr( 0, 9 ) == "--filter=" ) { - m_filter = s.substr( 9 ); - m_hasFilter = true; - } else if ( s.substr( 0, 9 ) == "--config=" ) { - m_alternateConfigFile = s.substr( 9 ); - m_isAlternateConfigGiven = true; - } else if ( s.substr( 0, 16 ) == "--config-append=" ) { - m_configData.push_back(make_pair(m_argv[i]+16, - CONFIG_APPEND ) ); - } else if ( s.substr( 0, 17 ) == "--config-prepend=" ) { - m_configData.push_back(make_pair(m_argv[i]+17, - CONFIG_PREPEND ) ); - } else if ( s.substr( 0, 13 ) == "--config-set=" ) { - m_configData.push_back(make_pair(m_argv[i]+13, CONFIG_SET ) ); - } else if ( s.substr( 0, 15 ) == "--install-root=" ) { - m_installRoot = s.substr(15); - } else if ( s.substr( 0, 9 ) == "--ignore=" ) { - m_ignore = s.substr(9); - } else { - m_unknownOption = s; - return false; - } - } else { - if (!m_isCommandGiven) { - string s = m_argv[i]; - m_commandName = s; - for ( int i = 0; i < commandCount; ++i ) { - if ( s == commands[i] ) { - m_isCommandGiven = true; - m_commandType = commandID[i]; - break; - } - } - // first argument must be command - if ( !m_isCommandGiven ) { - return false; - } - } else { - m_otherArgs.push_back( m_argv[i] ); - } - } - } - - - - return m_isCommandGiven; -} - - -/*! - \return true whether --force has been specified -*/ -bool ArgParser::isForced() const -{ - return m_isForced; -} - - -/*! - \return true whether --test has been specified -*/ -bool ArgParser::isTest() const -{ - return m_isTest; -} - - -/*! - \return the level of verbose: -v -> 1, -vv -> 2 -*/ -int ArgParser::verbose() const -{ - return m_verbose; -} - - -/*! - \return whether --cache has been specified -*/ -bool ArgParser::useCache() const -{ - return m_useCache; -} - - -/*! - \return whether prt-get was called as 'prt-cache' or not -*/ -bool ArgParser::wasCalledAsPrtCached() const -{ - return m_calledAsPrtCache; -} - -/*! - \return whether prt-get should write to a log file or not -*/ -bool ArgParser::writeLog() const -{ - return m_writeLog; -} - -/*! - \return the --sort="..." string -*/ -const string& ArgParser::sortArgs() const -{ - return m_sortArgs; -} - -/*! - \return whether there was a --filter argument -*/ -bool ArgParser::hasFilter() const -{ - return m_hasFilter; -} - - -/*! - \return whether there was a --no-std-config argument - */ -bool ArgParser::noStdConfig() const -{ - return m_noStdConfig; -} - - -/*! - \return the --filter="..." string -*/ -const string& ArgParser::filter() const -{ - return m_filter; -} - -/*! - \return whether there was a --nodeps argument -*/ -bool ArgParser::nodeps() const -{ - return m_nodeps; -} - -/*! - \return whether there was a --all argument -*/ -bool ArgParser::all() const -{ - return m_all; -} - -bool ArgParser::printPath() const -{ - return m_printPath; -} - -const string& ArgParser::commandName() const -{ - return m_commandName; -} - -const string& ArgParser::unknownOption() const -{ - return m_unknownOption; -} - -bool ArgParser::execPreInstall() const -{ - return m_execPreInstall; -} - -bool ArgParser::execPostInstall() const -{ - return m_execPostInstall; -} - -const list< pair<char*, ArgParser::ConfigArgType> > -ArgParser::configData() const -{ - return m_configData; -} - -const string& ArgParser::installRoot() const -{ - return m_installRoot; -} - -const string& ArgParser::pkgrmArgs() const -{ - return m_pkgrmArgs; -} - -bool ArgParser::preferHigher() const -{ - return m_preferHigher; -} - -bool ArgParser::strictDiff() const -{ - return m_strictDiff; -} - -bool ArgParser::useRegex() const -{ - return m_useRegex; -} - -bool ArgParser::fullPath() const -{ - return m_fullPath; -} - - -const string& ArgParser::ignore() const -{ - return m_ignore; -} Copied: tools/prt-get/branches/prt-get-5.13/src/argparser.cpp (from rev 1236, tools/prt-get/trunk/src/argparser.cpp) =================================================================== --- tools/prt-get/branches/prt-get-5.13/src/argparser.cpp (rev 0) +++ tools/prt-get/branches/prt-get-5.13/src/argparser.cpp 2006-09-08 18:05:30 UTC (rev 1849) @@ -0,0 +1,462 @@ +//////////////////////////////////////////////////////////////////////// +// FILE: argparser.cpp +// AUTHOR: Johannes Winkelmann, jw@tks6.net +// COPYRIGHT: (c) 2002 by Johannes Winkelmann +// --------------------------------------------------------------------- +// 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. +//////////////////////////////////////////////////////////////////////// + +using namespace std; + +#include "argparser.h" + +/*! + Construct a ArgParser object + \param argc argument count + \param argv argument vector +*/ +ArgParser::ArgParser( int argc, char** argv ) + : m_isCommandGiven( false ), + m_isForced( false ), + m_isTest( false ), + m_isAlternateConfigGiven( false ), + m_useCache( false ), + m_calledAsPrtCache( false ), + m_alternateConfigFile( "" ), + m_pkgmkArgs( "" ), + m_pkgaddArgs( "" ), + m_pkgrmArgs( "" ), + m_installRoot( "" ), + m_ignore( "" ), + m_argc( argc ), + m_argv( argv ), + m_verbose( 0 ), + m_writeLog( false ), + m_hasFilter( false ), + m_noStdConfig( false ), + m_nodeps( false ), + m_all( false ), + m_printPath( false ), + m_execPreInstall( false ), + m_execPostInstall( false ), + m_preferHigher( false ), + m_strictDiff( false ), + m_useRegex(false), + m_fullPath(false), + m_recursive(false), + m_printTree(false) +{ +} + + +/*! + \return true if an alternate configuration file is given +*/ +bool ArgParser::isAlternateConfigGiven() const +{ + return m_isAlternateConfigGiven; +} + + +/*! + \return true if a command is given +*/ +bool ArgParser::isCommandGiven() const +{ + return m_isCommandGiven; +} + + +/*! + \return a list of arguments not processed by ArgParser +*/ +const list<char*>& ArgParser::otherArgs() const +{ + return m_otherArgs; +} + + +/*! + \return what command was given +*/ +ArgParser::Type ArgParser::commandType() const +{ + return m_commandType; +} + + +/*! + \return addtional arguments to pkgmk +*/ +const string& ArgParser::pkgmkArgs() const +{ + return m_pkgmkArgs; +} + + +/*! + \return addtional arguments to pkgadd +*/ +const string& ArgParser::pkgaddArgs() const +{ + return m_pkgaddArgs; +} + + +/*! + \return the name of the alternative configuration file +*/ +const string& ArgParser::alternateConfigFile() const +{ + return m_alternateConfigFile; +} + + +/*! + parse the arguments + \return true on success +*/ +bool ArgParser::parse() +{ + const int commandCount = 35; + string commands[commandCount] = { "list", "search", "dsearch", + "info", + "depends", "install", "depinst", + "help", "isinst", "dup", "update", + "quickdep", "diff", "quickdiff", + "grpinst", "version", "cache", + "path", "listinst", "printf", "readme", + "dependent", "sysup", "current", + "fsearch", "lock", "unlock", + "listlocked", "cat", "ls", "edit", + "remove", "deptree", "dumpconfig", + "listorphans" }; + + Type commandID[commandCount] = { LIST, SEARCH, DSEARCH, INFO, + DEPENDS, INSTALL, DEPINST, + HELP, ISINST, DUP, UPDATE, + QUICKDEP, DIFF, QUICKDIFF, + GRPINST, SHOW_VERSION, CREATE_CACHE, + PATH, LISTINST, PRINTF, README, + DEPENDENT, SYSUP, CURRENT, + FSEARCH, LOCK, UNLOCK, LISTLOCKED, + CAT, LS, EDIT, REMOVE, DEPTREE, + DUMPCONFIG, LISTORPHANS }; + if ( m_argc < 2 ) { + return false; + } + + // if called from a symlink ending on prt-cache, use cached + // access + string app = m_argv[0]; + string::size_type pos = app.rfind( "/" ); + if ( pos != string::npos ) { + app = app.substr( pos ); + } + if ( app.find( "prt-cache" ) != string::npos ) { + m_useCache = true; + m_calledAsPrtCache = true; + } + + for ( int i = 1; i < m_argc; ++i ) { + if ( m_argv[i][0] == '-' ) { + string s = m_argv[i]; + if ( s == "-v" ) { + m_verbose += 1; + } else if ( s == "-vv" ) { + m_verbose += 2; + } else if ( s == "--force" ) { + m_isForced = true; + } else if ( s == "--test" ) { + m_isTest = true; + } else if ( s == "--cache" ) { + m_useCache = true; + } else if ( s == "--nodeps" ) { + m_nodeps = true; + } else if ( s == "--all" ) { + m_all = true; + } else if ( s == "--path" ) { + m_printPath = true; + } else if ( s == "--log" ) { + m_writeLog = true; + } else if ( s == "--pre-install" ) { + m_execPreInstall = true; + } else if ( s == "--post-install" ) { + m_execPostInstall = true; + } else if ( s == "--install-scripts" ) { + m_execPreInstall = true; + m_execPostInstall = true; + } else if ( s == "--no-std-config" ) { + m_noStdConfig = true; + } else if ( s == "--prefer-higher" || s == "-ph" ) { + m_preferHigher = true; + } else if ( s == "--strict-diff" || s == "-sd" ) { + m_strictDiff = true; + } else if ( s == "--regex" ) { + m_useRegex = true; + } else if ( s == "--full" ) { + m_fullPath = true; + } else if ( s == "--recursive" ) { + m_recursive = true; + } else if ( s == "--tree" ) { + m_printTree = true; + + } else if ( s == "-f" ) { + m_pkgaddArgs += " " + s; + } else if ( s == "-fr" ) { + m_pkgmkArgs += " -f"; + } else if ( s == "-if" ) { + m_pkgmkArgs += " " + s; + } else if ( s == "-uf" ) { + m_pkgmkArgs += " " + s; + } else if ( s == "-im" ) { + m_pkgmkArgs += " " + s; + } else if ( s == "-um" ) { + m_pkgmkArgs += " " + s; + } else if ( s == "-kw" ) { + m_pkgmkArgs += " " + s; + } else if ( s == "-ns" ) { + m_pkgmkArgs += " " + s; + } else if ( s == "-fi" ) { + m_pkgaddArgs += " -f"; + } + + // substrings + else if ( s.substr( 0, 8 ) == "--margs=" ) { + m_pkgmkArgs += " " + s.substr( 8 ); + } else if ( s.substr( 0, 8 ) == "--aargs=" ) { + m_pkgaddArgs += " " + s.substr( 8 ); + } else if ( s.substr( 0, 8 ) == "--rargs=" ) { + m_pkgrmArgs = s.substr( 8 ); + } else if ( s.substr( 0, 7 ) == "--sort=" ) { + m_sortArgs = s.substr( 7 ); + } else if ( s.substr( 0, 9 ) == "--filter=" ) { + m_filter = s.substr( 9 ); + m_hasFilter = true; + } else if ( s.substr( 0, 9 ) == "--config=" ) { + m_alternateConfigFile = s.substr( 9 ); + m_isAlternateConfigGiven = true; + } else if ( s.substr( 0, 16 ) == "--config-append=" ) { + m_configData.push_back(make_pair(m_argv[i]+16, + CONFIG_APPEND ) ); + } else if ( s.substr( 0, 17 ) == "--config-prepend=" ) { + m_configData.push_back(make_pair(m_argv[i]+17, + CONFIG_PREPEND ) ); + } else if ( s.substr( 0, 13 ) == "--config-set=" ) { + m_configData.push_back(make_pair(m_argv[i]+13, CONFIG_SET ) ); + } else if ( s.substr( 0, 15 ) == "--install-root=" ) { + m_installRoot = s.substr(15); + } else if ( s.substr( 0, 9 ) == "--ignore=" ) { + m_ignore = s.substr(9); + } else { + m_unknownOption = s; + return false; + } + } else { + if (!m_isCommandGiven) { + string s = m_argv[i]; + m_commandName = s; + for ( int i = 0; i < commandCount; ++i ) { + if ( s == commands[i] ) { + m_isCommandGiven = true; + m_commandType = commandID[i]; + break; + } + } + // first argument must be command + if ( !m_isCommandGiven ) { + return false; + } + } else { + m_otherArgs.push_back( m_argv[i] ); + } + } + } + + + + return m_isCommandGiven; +} + + +/*! + \return true whether --force has been specified +*/ +bool ArgParser::isForced() const +{ + return m_isForced; +} + + +/*! + \return true whether --test has been specified +*/ +bool ArgParser::isTest() const +{ + return m_isTest; +} + + +/*! + \return the level of verbose: -v -> 1, -vv -> 2 +*/ +int ArgParser::verbose() const +{ + return m_verbose; +} + + +/*! + \return whether --cache has been specified +*/ +bool ArgParser::useCache() const +{ + return m_useCache; +} + + +/*! + \return whether prt-get was called as 'prt-cache' or not +*/ +bool ArgParser::wasCalledAsPrtCached() const +{ + return m_calledAsPrtCache; +} + +/*! + \return whether prt-get should write to a log file or not +*/ +bool ArgParser::writeLog() const +{ + return m_writeLog; +} + +/*! + \return the --sort="..." string +*/ +const string& ArgParser::sortArgs() const +{ + return m_sortArgs; +} + +/*! + \return whether there was a --filter argument +*/ +bool ArgParser::hasFilter() const +{ + return m_hasFilter; +} + + +/*! + \return whether there was a --no-std-config argument + */ +bool ArgParser::noStdConfig() const +{ + return m_noStdConfig; +} + + +/*! + \return the --filter="..." string +*/ +const string& ArgParser::filter() const +{ + return m_filter; +} + +/*! + \return whether there was a --nodeps argument +*/ +bool ArgParser::nodeps() const +{ + return m_nodeps; +} + +/*! + \return whether there was a --all argument +*/ +bool ArgParser::all() const +{ + return m_all; +} + +bool ArgParser::printPath() const +{ + return m_printPath; +} + +bool ArgParser::recursive() const +{ + return m_recursive; +} + +bool ArgParser::printTree() const +{ + return m_printTree; +} + +const string& ArgParser::commandName() const +{ + return m_commandName; +} + +const string& ArgParser::unknownOption() const +{ + return m_unknownOption; +} + +bool ArgParser::execPreInstall() const +{ + return m_execPreInstall; +} + +bool ArgParser::execPostInstall() const +{ + return m_execPostInstall; +} + +const list< pair<char*, ArgParser::ConfigArgType> > +ArgParser::configData() const +{ + return m_configData; +} + +const string& ArgParser::installRoot() const +{ + return m_installRoot; +} + +const string& ArgParser::pkgrmArgs() const +{ + return m_pkgrmArgs; +} + +bool ArgParser::preferHigher() const +{ + return m_preferHigher; +} + +bool ArgParser::strictDiff() const +{ + return m_strictDiff; +} + +bool ArgParser::useRegex() const +{ + return m_useRegex; +} + +bool ArgParser::fullPath() const +{ + return m_fullPath; +} + + +const string& ArgParser::ignore() const +{ + return m_ignore; +} Deleted: tools/prt-get/branches/prt-get-5.13/src/argparser.h =================================================================== --- tools/prt-get/trunk/src/argparser.h 2006-04-04 15:39:45 UTC (rev 1137) +++ tools/prt-get/branches/prt-get-5.13/src/argparser.h 2006-09-08 18:05:30 UTC (rev 1849) @@ -1,133 +0,0 @@ -//////////////////////////////////////////////////////////////////////// -// FILE: argparser.h -// AUTHOR: Johannes Winkelmann, jw@tks6.net -// COPYRIGHT: (c) 2002 by Johannes Winkelmann -// --------------------------------------------------------------------- -// 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. -//////////////////////////////////////////////////////////////////////// - -#ifndef _ARGPARSER_H_ -#define _ARGPARSER_H_ - -#include <list> -#include <string> -using namespace std; - -/*! - \class ArgParser - \brief Argument Parser - - This is the argument parser for prt-get. -*/ -class ArgParser -{ -public: - ArgParser( int argc, char** argv ); - - bool parse(); - - /*! Command type */ - enum Type { HELP, LIST, SEARCH, DSEARCH, INSTALL, DEPINST, - INFO, DEPENDS, ISINST, DUP, UPDATE, - QUICKDEP, DIFF, GRPINST, GRPUPDATE, - QUICKDIFF, SHOW_VERSION, CREATE_CACHE, PATH, - LISTINST, PRINTF, README, DEPENDENT, SYSUP, - CURRENT, FSEARCH, LOCK, UNLOCK, LISTLOCKED, - CAT, LS, EDIT, REMOVE, - DEPTREE, DUMPCONFIG }; - - bool isCommandGiven() const; - bool isForced() const; - bool isTest() const; - bool isAlternateConfigGiven() const; - bool useCache() const; - bool wasCalledAsPrtCached() const; - bool writeLog() const; - bool hasFilter() const; - bool noStdConfig() const; - bool nodeps() const; - bool all() const; - bool printPath() const; - bool execPreInstall() const; - bool execPostInstall() const; - bool preferHigher() const; - bool strictDiff() const; - bool useRegex() const; - bool fullPath() const; - - const string& alternateConfigFile() const; - const string& pkgmkArgs() const; - const string& pkgaddArgs() const; - const string& pkgrmArgs() const; - const string& sortArgs() const; - const string& filter() const; - const string& installRoot() const; - const string& ignore() const; - - - Type commandType() const; - - const string& commandName() const; - const string& unknownOption() const; - - const list<char*>& otherArgs() const; - - int verbose() const; - - enum ConfigArgType { CONFIG_SET, CONFIG_APPEND, CONFIG_PREPEND }; - - const list< pair<char*, ConfigArgType> > configData() const; - - -private: - - bool m_isCommandGiven; - bool m_isForced; - bool m_isTest; - bool m_isAlternateConfigGiven; - bool m_useCache; - bool m_calledAsPrtCache; - bool m_hasFilter; - bool m_noStdConfig; - - bool m_writeLog; - - bool m_nodeps; - - bool m_all; - bool m_printPath; - - bool m_execPreInstall; - bool m_execPostInstall; - bool m_preferHigher; - bool m_strictDiff; - bool m_useRegex; - bool m_fullPath; - - string m_alternateConfigFile; - string m_pkgmkArgs; - string m_pkgaddArgs; - string m_pkgrmArgs; - string m_sortArgs; - string m_filter; - string m_commandName; - string m_unknownOption; - string m_installRoot; - string m_ignore; - - Type m_commandType; - - int m_argc; - char** m_argv; - - int m_verbose; - - list<char*> m_otherArgs; - - list< pair<char*, ConfigArgType> > m_configData; -}; - -#endif /* _ARGPARSER_H_ */ Copied: tools/prt-get/branches/prt-get-5.13/src/argparser.h (from rev 1236, tools/prt-get/trunk/src/argparser.h) =================================================================== --- tools/prt-get/branches/prt-get-5.13/src/argparser.h (rev 0) +++ tools/prt-get/branches/prt-get-5.13/src/argparser.h 2006-09-08 18:05:30 UTC (rev 1849) @@ -0,0 +1,138 @@ +//////////////////////////////////////////////////////////////////////// +// FILE: argparser.h +// AUTHOR: Johannes Winkelmann, jw@tks6.net +// COPYRIGHT: (c) 2002 by Johannes Winkelmann +// --------------------------------------------------------------------- +// 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. +//////////////////////////////////////////////////////////////////////// + +#ifndef _ARGPARSER_H_ +#define _ARGPARSER_H_ + +#include <list> +#include <string> +using namespace std; + +/*! + \class ArgParser + \brief Argument Parser + + This is the argument parser for prt-get. +*/ +class ArgParser +{ +public: + ArgParser( int argc, char** argv ); + + bool parse(); + + /*! Command type */ + enum Type { HELP, LIST, SEARCH, DSEARCH, INSTALL, DEPINST, + INFO, DEPENDS, ISINST, DUP, UPDATE, + QUICKDEP, DIFF, GRPINST, GRPUPDATE, + QUICKDIFF, SHOW_VERSION, CREATE_CACHE, PATH, + LISTINST, PRINTF, README, DEPENDENT, SYSUP, + CURRENT, FSEARCH, LOCK, UNLOCK, LISTLOCKED, + CAT, LS, EDIT, REMOVE, + DEPTREE, DUMPCONFIG, LISTORPHANS }; + + bool isCommandGiven() const; + bool isForced() const; + bool isTest() const; + bool isAlternateConfigGiven() const; + bool useCache() const; + bool wasCalledAsPrtCached() const; + bool writeLog() const; + bool hasFilter() const; + bool noStdConfig() const; + bool nodeps() const; + bool all() const; + bool printPath() const; + bool execPreInstall() const; + bool execPostInstall() const; + bool preferHigher() const; + bool strictDiff() const; + bool useRegex() const; + bool fullPath() const; + bool recursive() const; + bool printTree() const; + + const string& alternateConfigFile() const; + const string& pkgmkArgs() const; + const string& pkgaddArgs() const; + const string& pkgrmArgs() const; + const string& sortArgs() const; + const string& filter() const; + const string& installRoot() const; + const string& ignore() const; + + + Type commandType() const; + + const string& commandName() const; + const string& unknownOption() const; + + const list<char*>& otherArgs() const; + + int verbose() const; + + enum ConfigArgType { CONFIG_SET, CONFIG_APPEND, CONFIG_PREPEND }; + + const list< pair<char*, ConfigArgType> > configData() const; + + +private: + + bool m_isCommandGiven; + bool m_isForced; + bool m_isTest; + bool m_isAlternateConfigGiven; + bool m_useCache; + bool m_calledAsPrtCache; + bool m_hasFilter; + bool m_noStdConfig; + + bool m_writeLog; + + bool m_nodeps; + + bool m_all; + bool m_printPath; + + bool m_execPreInstall; + bool m_execPostInstall; + bool m_preferHigher; + bool m_strictDiff; + bool m_useRegex; + bool m_fullPath; + + bool m_recursive; + bool m_printTree; + + string m_alternateConfigFile; + string m_pkgmkArgs; + string m_pkgaddArgs; + string m_pkgrmArgs; + string m_sortArgs; + string m_filter; + string m_commandName; + string m_unknownOption; + string m_installRoot; + string m_ignore; + + Type m_commandType; + + int m_argc; + char** m_argv; + + int m_verbose; + + list<char*> m_otherArgs; + + list< pair<char*, ConfigArgType> > m_configData; +}; + +#endif /* _ARGPARSER_H_ */ Deleted: tools/prt-get/branches/prt-get-5.13/src/configuration.cpp =================================================================== --- tools/prt-get/trunk/src/configuration.cpp 2006-04-04 15:39:45 UTC (rev 1137) +++ tools/prt-get/branches/prt-get-5.13/src/configuration.cpp 2006-09-08 18:05:30 UTC (rev 1849) @@ -1,225 +0,0 @@ -//////////////////////////////////////////////////////////////////////// -// FILE: configuration.cpp -// AUTHOR: Johannes Winkelmann, jw@tks6.net -// COPYRIGHT: (c) 2002 by Johannes Winkelmann -// --------------------------------------------------------------------- -// 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. -//////////////////////////////////////////////////////////////////////// - -#include <iostream> -#include <cstdio> -#include <dirent.h> - -#include "configuration.h" -#include "stringhelper.h" -#include "argparser.h" - -using namespace std; -using namespace StringHelper; - -Configuration::Configuration( const std::string& configFile, - const ArgParser* parser ) - : m_configFile( configFile ), - m_parser( parser ), - m_writeLog( false ), - m_appendLog( false ), - m_logFilePattern( "" ), - m_cacheFile( "" ), - m_readmeMode( VERBOSE_README ), - m_runScripts( false ), - m_preferHigher( false ), - m_useRegex( false ), - m_makeCommand( "" ), m_addCommand( "" ), - m_removeCommand( "" ), m_runscriptCommand( "" ) -{ - -} - - -bool Configuration::parse() -{ - FILE* fp = fopen( m_configFile.c_str(), "r" ); - if ( !fp ) { - return false; - } - - const int length = BUFSIZ; - char input[length]; - string s; - while ( fgets( input, length, fp ) ) { - s = input; - s = getValueBefore( s, '#' ); - s = stripWhiteSpace( s ); - parseLine(s); - } - - fclose( fp ); - - // command line arguments override config: - if ( m_parser->writeLog() ) { - m_writeLog = true; - } - - return true; -} - -bool Configuration::writeLog() const -{ - return m_writeLog; -} - -bool Configuration::appendLog() const -{ - return m_appendLog; -} - -string Configuration::logFilePattern() const -{ - return m_logFilePattern; -} - - -const list< pair<string, string> >& Configuration::rootList() const -{ - return m_rootList; -} - -Configuration::ReadmeMode Configuration::readmeMode() const -{ - return m_readmeMode; -} - -std::string Configuration::cacheFile() const -{ - return m_cacheFile; -} - - -void Configuration::addConfig(const string& line, - bool configSet, - bool configPrepend) -{ - if (configSet && startwith_nocase( line, "prtdir" )) { - m_rootList.clear(); - } - parseLine(line, configPrepend); -} - -/*! - parse a line and set the configuration data accordingly; if \a - prepend is set, prepend the data for configuration options which are lists - */ -void Configuration::parseLine(const string& line, bool prepend) -{ - string s = line; - if ( s.empty() ) { - return; - } - - if ( startwith_nocase( s, "prtdir" ) ) { - s = stripWhiteSpace( s.replace( 0, 6, "" ) ); - string path = stripWhiteSpace( getValueBefore( s, ':' ) ); - string packages = getValue( s, ':' ); - DIR* dir = opendir( path.c_str() ); - if ( dir ) { - closedir( dir ); - - if (prepend) { - m_rootList.push_front( make_pair( path, packages ) ); - } else { - m_rootList.push_back( make_pair( path, packages ) ); - } - } else { - cerr << "[Config error: can't access " << path - << "]" << endl; - } - } else if ( startwith_nocase( s, "cachefile" ) ) { - s = stripWhiteSpace( s.replace( 0, 9, "" ) ); - m_cacheFile = s; - } else if ( startwith_nocase( s, "writelog" ) ) { - s = stripWhiteSpace( s.replace( 0, 8, "" ) ); - if ( s == "enabled" ) { - // it's already set to false, so we can just enable it. - // like this, the command line switch works as well - m_writeLog = true; - } - } else if ( startwith_nocase( s, "logfile" ) ) { - s = stripWhiteSpace( s.replace( 0, 7, "" ) ); - m_logFilePattern = s; - } else if ( startwith_nocase( s, "logmode" ) ) { - s = stripWhiteSpace( s.replace( 0, 7, "" ) ); - if ( s == "append" ) { - m_appendLog = true; - } - } else if ( startwith_nocase( s, "readme" ) ) { - s = stripWhiteSpace( s.replace( 0, 6, "" ) ); - if ( s == "compact" ) { - m_readmeMode = COMPACT_README; - } else if ( s == "disabled" ) { - m_readmeMode = NO_README; - } - } else if ( startwith_nocase( s, "runscripts" ) ) { - s = stripWhiteSpace( s.replace( 0, 10, "" ) ); - if ( s == "yes" ) { - m_runScripts = true; - } - } else if ( startwith_nocase( s, "preferhigher" ) ) { - s = stripWhiteSpace( s.replace( 0, 12, "" ) ); - if ( s == "yes" ) { - m_preferHigher = true; - } - } else if ( startwith_nocase( s, "useregex" ) ) { - s = stripWhiteSpace( s.replace( 0, 8, "" ) ); - if ( s == "yes" ) { - m_useRegex = true; - } - } else if ( startwith_nocase( s, "makecommand" ) ) { - m_makeCommand = stripWhiteSpace( s.replace( 0, 11, "" ) ); - } else if ( startwith_nocase( s, "addcommand" ) ) { - m_addCommand = stripWhiteSpace( s.replace( 0, 10, "" ) ); - } else if ( startwith_nocase( s, "removecommand" ) ) { - m_removeCommand = stripWhiteSpace( s.replace( 0, 13, "" ) ); - } else if ( startwith_nocase( s, "runscriptcommand" ) ) { - m_runscriptCommand = stripWhiteSpace( s.replace( 0, 16, "" ) ); - } -} - -bool Configuration::runScripts() const -{ - return m_runScripts; -} - -std::string Configuration::makeCommand() const -{ - return m_makeCommand; -} - -std::string Configuration::addCommand() const -{ - return m_addCommand; -} - -std::string Configuration::removeCommand() const -{ - return m_removeCommand; -} - -std::string Configuration::runscriptCommand() const -{ - return m_runscriptCommand; -} - -bool Configuration::preferHigher() const -{ - return m_preferHigher; -} - -bool Configuration::useRegex() const -{ - return m_useRegex; -} - - Copied: tools/prt-get/branches/prt-get-5.13/src/configuration.cpp (from rev 1139, tools/prt-get/trunk/src/configuration.cpp) =================================================================== --- tools/prt-get/branches/prt-get-5.13/src/configuration.cpp (rev 0) +++ tools/prt-get/branches/prt-get-5.13/src/configuration.cpp 2006-09-08 18:05:30 UTC (rev 1849) @@ -0,0 +1,236 @@ +//////////////////////////////////////////////////////////////////////// +// FILE: configuration.cpp +// AUTHOR: Johannes Winkelmann, jw@tks6.net +// COPYRIGHT: (c) 2002 by Johannes Winkelmann +// --------------------------------------------------------------------- +// 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. +//////////////////////////////////////////////////////////////////////// + +#include <iostream> +#include <cstdio> +#include <dirent.h> + +#include "configuration.h" +#include "stringhelper.h" +#include "argparser.h" + +using namespace std; +using namespace StringHelper; + +Configuration::Configuration( const std::string& configFile, + const ArgParser* parser ) + : m_configFile( configFile ), + m_parser( parser ), + m_writeLog( false ), + m_appendLog( false ), + m_removeLogOnSuccess( false ), + m_logFilePattern( "" ), + m_cacheFile( "" ), + m_readmeMode( VERBOSE_README ), + m_runScripts( false ), + m_preferHigher( false ), + m_useRegex( false ), + m_makeCommand( "" ), m_addCommand( "" ), + m_removeCommand( "" ), m_runscriptCommand( "" ) +{ + +} + + +bool Configuration::parse() +{ + FILE* fp = fopen( m_configFile.c_str(), "r" ); + if ( !fp ) { + return false; + } + + const int length = BUFSIZ; + char input[length]; + string s; + while ( fgets( input, length, fp ) ) { + s = input; + s = getValueBefore( s, '#' ); + s = stripWhiteSpace( s ); + parseLine(s); + } + + fclose( fp ); + + // command line arguments override config: + if ( m_parser->writeLog() ) { + m_writeLog = true; + } + + return true; +} + +bool Configuration::writeLog() const +{ + return m_writeLog; +} + +bool Configuration::appendLog() const +{ + return m_appendLog; +} + +bool Configuration::removeLogOnSuccess() const +{ + return m_removeLogOnSuccess; +} + +string Configuration::logFilePattern() const +{ + return m_logFilePattern; +} + + +const list< pair<string, string> >& Configuration::rootList() const +{ + return m_rootList; +} + +Configuration::ReadmeMode Configuration::readmeMode() const +{ + return m_readmeMode; +} + +std::string Configuration::cacheFile() const +{ + return m_cacheFile; +} + + +void Configuration::addConfig(const string& line, + bool configSet, + bool configPrepend) +{ + if (configSet && startwith_nocase( line, "prtdir" )) { + m_rootList.clear(); + } + parseLine(line, configPrepend); +} + +/*! + parse a line and set the configuration data accordingly; if \a + prepend is set, prepend the data for configuration options which are lists + */ +void Configuration::parseLine(const string& line, bool prepend) +{ + string s = line; + if ( s.empty() ) { + return; + } + + if ( startwith_nocase( s, "prtdir" ) ) { + s = stripWhiteSpace( s.replace( 0, 6, "" ) ); + string path = stripWhiteSpace( getValueBefore( s, ':' ) ); + string packages = getValue( s, ':' ); + DIR* dir = opendir( path.c_str() ); + if ( dir ) { + closedir( dir ); + + if (prepend) { + m_rootList.push_front( make_pair( path, packages ) ); + } else { + m_rootList.push_back( make_pair( path, packages ) ); + } + } else { + cerr << "[Config error: can't access " << path + << "]" << endl; + } + } else if ( startwith_nocase( s, "cachefile" ) ) { + s = stripWhiteSpace( s.replace( 0, 9, "" ) ); + m_cacheFile = s; + } else if ( startwith_nocase( s, "writelog" ) ) { + s = stripWhiteSpace( s.replace( 0, 8, "" ) ); + if ( s == "enabled" ) { + // it's already set to false, so we can just enable it. + // like this, the command line switch works as well + m_writeLog = true; + } + } else if ( startwith_nocase( s, "logfile" ) ) { + s = stripWhiteSpace( s.replace( 0, 7, "" ) ); + m_logFilePattern = s; + } else if ( startwith_nocase( s, "logmode" ) ) { + s = stripWhiteSpace( s.replace( 0, 7, "" ) ); + if ( s == "append" ) { + m_appendLog = true; + } + } else if ( startwith_nocase( s, "rmlog_on_success" ) ) { + s = stripWhiteSpace( s.replace( 0, 16, "" ) ); + if ( s == "yes" ) { + m_removeLogOnSuccess = true; + } + } else if ( startwith_nocase( s, "readme" ) ) { + s = stripWhiteSpace( s.replace( 0, 6, "" ) ); + if ( s == "compact" ) { + m_readmeMode = COMPACT_README; + } else if ( s == "disabled" ) { + m_readmeMode = NO_README; + } + } else if ( startwith_nocase( s, "runscripts" ) ) { + s = stripWhiteSpace( s.replace( 0, 10, "" ) ); + if ( s == "yes" ) { + m_runScripts = true; + } + } else if ( startwith_nocase( s, "preferhigher" ) ) { + s = stripWhiteSpace( s.replace( 0, 12, "" ) ); + if ( s == "yes" ) { + m_preferHigher = true; + } + } else if ( startwith_nocase( s, "useregex" ) ) { + s = stripWhiteSpace( s.replace( 0, 8, "" ) ); + if ( s == "yes" ) { + m_useRegex = true; + } + } else if ( startwith_nocase( s, "makecommand" ) ) { + m_makeCommand = stripWhiteSpace( s.replace( 0, 11, "" ) ); + } else if ( startwith_nocase( s, "addcommand" ) ) { + m_addCommand = stripWhiteSpace( s.replace( 0, 10, "" ) ); + } else if ( startwith_nocase( s, "removecommand" ) ) { + m_removeCommand = stripWhiteSpace( s.replace( 0, 13, "" ) ); + } else if ( startwith_nocase( s, "runscriptcommand" ) ) { + m_runscriptCommand = stripWhiteSpace( s.replace( 0, 16, "" ) ); + } +} + +bool Configuration::runScripts() const +{ + return m_runScripts; +} + +std::string Configuration::makeCommand() const +{ + return m_makeCommand; +} + +std::string Configuration::addCommand() const +{ + return m_addCommand; +} + +std::string Configuration::removeCommand() const +{ + return m_removeCommand; +} + +std::string Configuration::runscriptCommand() const +{ + return m_runscriptCommand; +} + +bool Configuration::preferHigher() const +{ + return m_preferHigher; +} + +bool Configuration::useRegex() const +{ + return m_useRegex; +} + + Deleted: tools/prt-get/branches/prt-get-5.13/src/configuration.h =================================================================== --- tools/prt-get/trunk/src/configuration.h 2006-04-04 15:39:45 UTC (rev 1137) +++ tools/prt-get/branches/prt-get-5.13/src/configuration.h 2006-09-08 18:05:30 UTC (rev 1849) @@ -1,83 +0,0 @@ -//////////////////////////////////////////////////////////////////////// -// FILE: configuration.h -// AUTHOR: Johannes Winkelmann, jw@tks6.net -// COPYRIGHT: (c) 2002 by Johannes Winkelmann -// --------------------------------------------------------------------- -// 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. -//////////////////////////////////////////////////////////////////////// - -#ifndef _CONFIGURATION_H_ -#define _CONFIGURATION_H_ - -#include <string> -#include <list> -#include <utility> - -class ArgParser; - -/*! - Configuration file class -*/ -class Configuration -{ -public: - Configuration( const std::string& configFile, const ArgParser* parser ); - bool parse(); - - bool writeLog() const; - bool appendLog() const; - std::string logFilePattern() const; - - const std::list< std::pair<std::string, std::string> >& rootList() const; - - - enum ReadmeMode { VERBOSE_README, COMPACT_README, NO_README }; - ReadmeMode readmeMode() const; - - std::string cacheFile() const; - - bool runScripts() const; - bool preferHigher() const; - bool useRegex() const; - - void addConfig(const std::string& line, - bool configSet, - bool configPrepend); - - std::string makeCommand() const; - std::string addCommand() const; - std::string removeCommand() const; - std::string runscriptCommand() const; - -private: - std::string m_configFile; - const ArgParser* m_parser; - - // config data - std::string m_cacheFile; - - std::list< std::pair<std::string, std::string> > m_rootList; - - std::string m_logFilePattern; - bool m_writeLog; - bool m_appendLog; - - ReadmeMode m_readmeMode; - - bool m_runScripts; - bool m_preferHigher; - bool m_useRegex; - - std::string m_makeCommand; - std::string m_addCommand; - std::string m_removeCommand; - std::string m_runscriptCommand; - - - void parseLine(const std::string& line, bool prepend=false); -}; - -#endif /* _CONFIGURATION_H_ */ Copied: tools/prt-get/branches/prt-get-5.13/src/configuration.h (from rev 1139, tools/prt-get/trunk/src/configuration.h) =================================================================== --- tools/prt-get/branches/prt-get-5.13/src/configuration.h (rev 0) +++ tools/prt-get/branches/prt-get-5.13/src/configuration.h 2006-09-08 18:05:30 UTC (rev 1849) @@ -0,0 +1,85 @@ +//////////////////////////////////////////////////////////////////////// +// FILE: configuration.h +// AUTHOR: Johannes Winkelmann, jw@tks6.net +// COPYRIGHT: (c) 2002 by Johannes Winkelmann +// --------------------------------------------------------------------- +// 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. +//////////////////////////////////////////////////////////////////////// + +#ifndef _CONFIGURATION_H_ +#define _CONFIGURATION_H_ + +#include <string> +#include <list> +#include <utility> + +class ArgParser; + +/*! + Configuration file class +*/ +class Configuration +{ +public: + Configuration( const std::string& configFile, const ArgParser* parser ); + bool parse(); + + bool writeLog() const; + bool appendLog() const; + bool removeLogOnSuccess() const; + std::string logFilePattern() const; + + const std::list< std::pair<std::string, std::string> >& rootList() const; + + + enum ReadmeMode { VERBOSE_README, COMPACT_README, NO_README }; + ReadmeMode readmeMode() const; + + std::string cacheFile() const; + + bool runScripts() const; + bool preferHigher() const; + bool useRegex() const; + + void addConfig(const std::string& line, + bool configSet, + bool configPrepend); + + std::string makeCommand() const; + std::string addCommand() const; + std::string removeCommand() const; + std::string runscriptCommand() const; + +private: + std::string m_configFile; + const ArgParser* m_parser; + + // config data + std::string m_cacheFile; + + std::list< std::pair<std::string, std::string> > m_rootList; + + std::string m_logFilePattern; + bool m_writeLog; + bool m_appendLog; + bool m_removeLogOnSuccess; + + ReadmeMode m_readmeMode; + + bool m_runScripts; + bool m_preferHigher; + bool m_useRegex; + + std::string m_makeCommand; + std::string m_addCommand; + std::string m_removeCommand; + std::string m_runscriptCommand; + + + void parseLine(const std::string& line, bool prepend=false); +}; + +#endif /* _CONFIGURATION_H_ */ Deleted: tools/prt-get/branches/prt-get-5.13/src/installtransaction.cpp =================================================================== --- tools/prt-get/trunk/src/installtransaction.cpp 2006-04-04 15:39:45 UTC (rev 1137) +++ tools/prt-get/branches/prt-get-5.13/src/installtransaction.cpp 2006-09-08 18:05:30 UTC (rev 1849) @@ -1,539 +0,0 @@ -//////////////////////////////////////////////////////////////////////// -// FILE: installtransaction.cpp -// AUTHOR: Johannes Winkelmann, jw@tks6.net -// COPYRIGHT: (c) 2002 by Johannes Winkelmann -// --------------------------------------------------------------------- -// 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. -//////////////////////////////////////////////////////////////////////// - -#include <unistd.h> -#include <cstdio> -#include <iostream> -#include <algorithm> -#include <list> - -#include <sys/types.h> -#include <sys/stat.h> -#include <fcntl.h> -using namespace std; - - -#include "installtransaction.h" -#include "repository.h" -#include "pkgdb.h" -#include "stringhelper.h" -#include "argparser.h" -#include "process.h" -#include "configuration.h" - -#ifdef USE_LOCKING -#include "lockfile.h" -#endif - -using namespace StringHelper; - - -const string InstallTransaction::PKGMK_DEFAULT_COMMAND = "/usr/bin/pkgmk"; -const string InstallTransaction::PKGADD_DEFAULT_COMMAND = "/usr/bin/pkgadd"; -const string InstallTransaction::PKGRM_DEFAULT_COMMAND = "/usr/bin/pkgrm"; - - - -/*! - Create a nice InstallTransaction - \param names a list of port names to be installed - \param repo the repository to look for packages - \param pkgDB the pkgDB with already installed packages -*/ -InstallTransaction::InstallTransaction( const list<char*>& names, - const Repository* repo, - PkgDB* pkgDB, - const Configuration* config ) - : m_repo( repo ), - m_pkgDB( pkgDB ), - m_depCalced( false ), - m_config( config ) -{ - list<char*>::const_iterator it = names.begin(); - for ( ; it != names.end(); ++it ) { - m_packages.push_back( make_pair( *it, m_repo->getPackage( *it ) ) ); - } - -} - -/*! - Create a nice InstallTransaction - \param names a list of port names to be installed - \param repo the repository to look for packages - \param pkgDB the pkgDB with already installed packages -*/ -InstallTransaction::InstallTransaction( const list<string>& names, - const Repository* repo, - PkgDB* pkgDB, - const Configuration* config ) - : m_repo( repo ), - m_pkgDB( pkgDB ), - m_depCalced( false ), - m_config( config ) -{ - list<string>::const_iterator it = names.begin(); - for ( ; it != names.end(); ++it ) { - m_packages.push_back( make_pair( *it, m_repo->getPackage( *it ) ) ); - } - -} - -/*! - \return packages where building/installation failed -*/ -const list< pair<string, InstallTransaction::InstallInfo> >& -InstallTransaction::installError() const -{ - return m_installErrors; -} - -/*! - install (commit) a transaction - \param parser the argument parser - \param update whether this is an update operation - \param group whether this is a group transaction (stops transaction on error) - \return returns an InstallResult telling whether installation worked -*/ -InstallTransaction::InstallResult -InstallTransaction::install( const ArgParser* parser, - bool update, bool group ) -{ - if ( m_packages.empty() ) { - return NO_PACKAGE_GIVEN; - } - - list<string> ignoredPackages; - StringHelper::split(parser->ignore(), ',', ignoredPackages); - - list< pair<string, const Package*> >::iterator it = m_packages.begin(); - for ( ; it != m_packages.end(); ++it ) { - const Package* package = it->second; - - if (find(ignoredPackages.begin(), - ignoredPackages.end(), - it->first) != ignoredPackages.end() ) { - m_ignoredPackages.push_back(it->first); - continue; - } - - if ( package == NULL ) { - m_missingPackages.push_back( make_pair( it->first, string("") ) ); - if ( group ) { - return PACKAGE_NOT_FOUND; - } - continue; - } - - // consider aliases here, but don't show them specifically - if ( !update && m_pkgDB->isInstalled( package->name(), true ) ) { - // ignore - m_alreadyInstalledPackages.push_back( package->name() ); - continue; - } - - InstallTransaction::InstallResult result; - InstallInfo info( package->hasReadme() ); - if ( parser->isTest() || - (result = installPackage( package, parser, update, info )) == SUCCESS) { - - m_installedPackages.push_back( make_pair( package->name(), info)); - } else { - - // log failures are critical - if ( result == LOG_DIR_FAILURE || - result == LOG_FILE_FAILURE || - result == NO_LOG_FILE || - result == CANT_LOCK_LOG_FILE || - - // or pkgdest - result == PKGDEST_ERROR ) { - return result; - } - - m_installErrors.push_back( make_pair(package->name(), info) ); - if ( group ) { - return PKGMK_FAILURE; - } - } - } - - return SUCCESS; -} - - -/*! - Install a single package - \param package the package to be installed - \param parser the argument parser to be used - \param update whether this is an update transaction - \param info store pre and post install information -*/ -InstallTransaction::InstallResult -InstallTransaction::installPackage( const Package* package, - const ArgParser* parser, - bool update, - InstallTransaction::InstallInfo& info ) - const -{ - - InstallTransaction::InstallResult result = SUCCESS; -#ifdef USE_LOCKING - LockFile lockFile; -#endif - - int fdlog = -1; - if ( m_config->writeLog() ) { - string logFile = m_config->logFilePattern(); - if ( logFile == "" ) { - return NO_LOG_FILE; - } - - StringHelper::replaceAll( logFile, "%n", package->name() ); - StringHelper::replaceAll( logFile, "%p", package->path() ); - StringHelper::replaceAll( logFile, "%v", package->version() ); - StringHelper::replaceAll( logFile, "%r", package->release() ); - -#ifdef USE_LOCKING - lockFile.setFile( logFile ); - if ( !lockFile.lockWrite() ) { - cout << "here" << logFile << endl; - return CANT_LOCK_LOG_FILE; - } -#endif - - size_t pos = logFile.find_last_of( "/" ); - if ( pos != string::npos ) { - if ( !Repository::createOutputDir( logFile.substr( 0, pos ) ) ) { - return LOG_DIR_FAILURE; - } - } - - if ( !m_config->appendLog() ) { - unlink( logFile.c_str() ); - } - - fdlog = open( logFile.c_str(), - O_APPEND | O_WRONLY | O_CREAT, 0666 ); - - if ( fdlog == -1 ) { - return LOG_FILE_FAILURE; - } - } - - string pkgdir = package->path() + "/" + package->name(); - chdir( pkgdir.c_str() ); - - string runscriptCommand = "sh"; - if (m_config->runscriptCommand() != "") { - runscriptCommand = m_config->runscriptCommand(); - } - - // -- pre-install - struct stat statData; - if ((parser->execPreInstall() || m_config->runScripts()) && - stat((pkgdir + "/" + "pre-install").c_str(), &statData) == 0) { - Process preProc( runscriptCommand, - pkgdir + "/" + "pre-install", - fdlog ); - if (preProc.executeShell()) { - info.preState = FAILED; - } else { - info.preState = EXEC_SUCCESS; - } - } - - // -- build - string cmd = PKGMK_DEFAULT_COMMAND; - if (m_config->makeCommand() != "") { - cmd = m_config->makeCommand(); - } - - string args = "-d " + parser->pkgmkArgs(); - Process makeProc( cmd, args, fdlog ); - if ( makeProc.executeShell() ) { - result = PKGMK_FAILURE; - } else { - // -- update - string pkgdest = getPkgDest(); - if ( pkgdest != "" ) { - // TODO: don't manipulate pkgdir - pkgdir = pkgdest; - string message = "Using PKGMK_PACKAGE_DIR: " + pkgdir; - cout << message << endl; - if ( m_config->writeLog() ) { - write( fdlog, message.c_str(), message.length() ); - write( fdlog, "\n", 1 ); - } - } - - // the following chdir is a noop if usePkgDest() returns false - if ( chdir( pkgdir.c_str() ) != 0 ) { - result = PKGDEST_ERROR; - } else { - cmd = PKGADD_DEFAULT_COMMAND; - if (m_config->addCommand() != "") { - cmd = m_config->addCommand(); - } - - args = ""; - if (parser->installRoot() != "") { - args = "-r " + parser->installRoot() + " "; - } - - - if ( update ) { - args += "-u "; - } - if ( !parser->pkgaddArgs().empty() ) { - args += parser->pkgaddArgs() + " "; - } - args += - package->name() + "#" + - package->version() + "-" + - package->release() + ".pkg.tar.gz"; - - string commandName = "prt-get"; - if ( parser->wasCalledAsPrtCached() ) { - commandName = "prt-cache"; - } - - string message = commandName + ": " + cmd + " " + args; - cout << message << endl; - if ( m_config->writeLog() ) { - write( fdlog, message.c_str(), message.length() ); - write( fdlog, "\n", 1 ); - } - - Process installProc( cmd, args, fdlog ); - if ( installProc.executeShell() ) { - result = PKGADD_FAILURE; - } else { - // exec post install - if ((parser->execPostInstall() || m_config->runScripts() ) && - stat((package->path() + "/" + package->name() + - "/" + "post-install").c_str(), &statData) - == 0) { - // Work around the pkgdir variable change - Process postProc( runscriptCommand, - package->path() + "/" + package->name()+ - "/" + "post-install", - fdlog ); - if (postProc.executeShell()) { - info.postState = FAILED; - } else { - info.postState = EXEC_SUCCESS; - } - } - } - } - } - - if ( m_config->writeLog() ) { - -#ifdef USE_LOCKING - lockFile.unlock(); -#endif - - // Close logfile - close ( fdlog ); - } - return result; -} - -/*! - Calculate dependencies for this transaction - \return true on success -*/ -bool InstallTransaction::calculateDependencies() -{ - if ( m_depCalced ) { - return true; - } - m_depCalced = true; - if ( m_packages.empty() ) { - return false; - } - - list< pair<string, const Package*> >::const_iterator it = - m_packages.begin(); - for ( ; it != m_packages.end(); ++it ) { - const Package* package = it->second; - if ( package ) { - checkDependecies( package ); - } - } - list<int> indexList; - if ( ! m_resolver.resolve( indexList ) ) { - m_depCalced = false; - return false; - } - - list<int>::iterator lit = indexList.begin(); - for ( ; lit != indexList.end(); ++lit ) { - m_depNameList.push_back( m_depList[*lit] ); - } - - return true; -} - -/*! - recursive method to calculate dependencies - \param package package for which we want to calculate dependencies - \param depends index if the package \a package depends on (-1 for none) -*/ -void InstallTransaction::checkDependecies( const Package* package, - int depends ) -{ - int index = -1; - bool newPackage = true; - for ( unsigned int i = 0; i < m_depList.size(); ++i ){ - if ( m_depList[i] == package->name() ) { - index = i; - newPackage = false; - break; - } - } - - - if ( index == -1 ) { - index = m_depList.size(); - m_depList.push_back( package->name() ); - } - - if ( depends != -1 ) { - m_resolver.addDependency( index, depends ); - } else { - // this just adds index to the dependency resolver - m_resolver.addDependency( index, index ); - } - - if ( newPackage ) { - if ( !package->dependencies().empty() ) { - list<string> deps; - split( package->dependencies(), ',', deps ); - list<string>::iterator it = deps.begin(); - for ( ; it != deps.end(); ++it ) { - string dep = *it; - if ( !dep.empty() ) { - string::size_type pos = dep.find_last_of( '/' ); - if ( pos != string::npos && (pos+1) < dep.length() ) { - dep = dep.substr( pos + 1 ); - } - const Package* p = m_repo->getPackage( dep ); - if ( p ) { - checkDependecies( p, index ); - } else { - m_missingPackages. - push_back( make_pair( dep, package->name() ) ); - } - } - } - } - } -} - - -/*! - This method returns a list of packages which should be installed to - meet the requirements for the packages to be installed. Includes - the packages to be installed. The packages are in the correct order, - packages to be installed first come first :-) - - \return a list of packages required for the transaction -*/ -const list<string>& InstallTransaction::dependencies() const -{ - return m_depNameList; -} - - -/*! - This method returns a list of packages which could not be installed - because they could not be found in the ports tree. The return value is - a pair, \a pair.first is package name and \a pair.second is the package - requiring \a pair.first. - - \return packages missing in the ports tree -*/ -const list< pair<string, string> >& InstallTransaction::missing() const -{ - return m_missingPackages; -} - - -/*! - \return packages which were requested to be installed but are already - installed -*/ -const list<string>& InstallTransaction::alreadyInstalledPackages() const -{ - return m_alreadyInstalledPackages; -} - - -/*! - \return the packages which were installed in this transaction -*/ -const list< pair<string, InstallTransaction::InstallInfo> >& -InstallTransaction::installedPackages() const -{ - return m_installedPackages; -} - - -/*! - calculate dependendencies for this package -*/ -InstallTransaction::InstallResult -InstallTransaction::calcDependencies( ) -{ - if ( m_packages.empty() ) { - return NO_PACKAGE_GIVEN; - } - - bool validPackages = false; - list< pair<string, const Package*> >::iterator it = m_packages.begin(); - for ( ; it != m_packages.end(); ++it ) { - if ( it->second ) { - validPackages = true; - } else { - // Note: moved here from calculateDependencies - m_missingPackages.push_back( make_pair( it->first, string("") ) ); - } - } - if ( !validPackages ) { - return PACKAGE_NOT_FOUND; - } - - if ( !calculateDependencies() ) { - return CYCLIC_DEPEND; - } - return SUCCESS; -} - -string InstallTransaction::getPkgDest() -{ - string pkgdest = ""; - FILE* p = popen( ". /etc/pkgmk.conf && echo $PKGMK_PACKAGE_DIR", "r" ); - if ( p ) { - char line[256]; - fgets( line, 256, p ); - pkgdest = line; - pkgdest = StringHelper::stripWhiteSpace( pkgdest ); - pclose( p ); - } - return pkgdest; -} - -const list<string>& InstallTransaction::ignoredPackages() const -{ - return m_ignoredPackages; -} Copied: tools/prt-get/branches/prt-get-5.13/src/installtransaction.cpp (from rev 1253, tools/prt-get/trunk/src/installtransaction.cpp) =================================================================== --- tools/prt-get/branches/prt-get-5.13/src/installtransaction.cpp (rev 0) +++ tools/prt-get/branches/prt-get-5.13/src/installtransaction.cpp 2006-09-08 18:05:30 UTC (rev 1849) @@ -0,0 +1,602 @@ +//////////////////////////////////////////////////////////////////////// +// FILE: installtransaction.cpp +// AUTHOR: Johannes Winkelmann, jw@tks6.net +// COPYRIGHT: (c) 2002 by Johannes Winkelmann +// --------------------------------------------------------------------- +// 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. +//////////////////////////////////////////////////////////////////////// + +#include <unistd.h> +#include <cstdio> +#include <iostream> +#include <algorithm> +#include <list> + +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> +#include <time.h> +using namespace std; + + +#include "installtransaction.h" +#include "repository.h" +#include "pkgdb.h" +#include "stringhelper.h" +#include "argparser.h" +#include "process.h" +#include "configuration.h" + +#ifdef USE_LOCKING +#include "lockfile.h" +#endif + +using namespace StringHelper; + + +const string InstallTransaction::PKGMK_DEFAULT_COMMAND = "/usr/bin/pkgmk"; +const string InstallTransaction::PKGADD_DEFAULT_COMMAND = "/usr/bin/pkgadd"; +const string InstallTransaction::PKGRM_DEFAULT_COMMAND = "/usr/bin/pkgrm"; + + + +/*! + Create a nice InstallTransaction + \param names a list of port names to be installed + \param repo the repository to look for packages + \param pkgDB the pkgDB with already installed packages +*/ +InstallTransaction::InstallTransaction( const list<char*>& names, + const Repository* repo, + PkgDB* pkgDB, + const Configuration* config ) + : m_repo( repo ), + m_pkgDB( pkgDB ), + m_depCalced( false ), + m_config( config ) +{ + list<char*>::const_iterator it = names.begin(); + for ( ; it != names.end(); ++it ) { + m_packages.push_back( make_pair( *it, m_repo->getPackage( *it ) ) ); + } + +} + +/*! + Create a nice InstallTransaction + \param names a list of port names to be installed + \param repo the repository to look for packages + \param pkgDB the pkgDB with already installed packages +*/ +InstallTransaction::InstallTransaction( const list<string>& names, + const Repository* repo, + PkgDB* pkgDB, + const Configuration* config ) + : m_repo( repo ), + m_pkgDB( pkgDB ), + m_depCalced( false ), + m_config( config ) +{ + list<string>::const_iterator it = names.begin(); + for ( ; it != names.end(); ++it ) { + m_packages.push_back( make_pair( *it, m_repo->getPackage( *it ) ) ); + } + +} + +/*! + \return packages where building/installation failed +*/ +const list< pair<string, InstallTransaction::InstallInfo> >& +InstallTransaction::installError() const +{ + return m_installErrors; +} + +/*! + install (commit) a transaction + \param parser the argument parser + \param update whether this is an update operation + \param group whether this is a group transaction (stops transaction on error) + \return returns an InstallResult telling whether installation worked +*/ +InstallTransaction::InstallResult +InstallTransaction::install( const ArgParser* parser, + bool update, bool group ) +{ + if ( m_packages.empty() ) { + return NO_PACKAGE_GIVEN; + } + + list<string> ignoredPackages; + StringHelper::split(parser->ignore(), ',', ignoredPackages); + + list< pair<string, const Package*> >::iterator it = m_packages.begin(); + for ( ; it != m_packages.end(); ++it ) { + const Package* package = it->second; + + if (find(ignoredPackages.begin(), + ignoredPackages.end(), + it->first) != ignoredPackages.end() ) { + m_ignoredPackages.push_back(it->first); + continue; + } + + if ( package == NULL ) { + m_missingPackages.push_back( make_pair( it->first, string("") ) ); + if ( group ) { + return PACKAGE_NOT_FOUND; + } + continue; + } + + // consider aliases here, but don't show them specifically + if ( !update && m_pkgDB->isInstalled( package->name(), true ) ) { + // ignore + m_alreadyInstalledPackages.push_back( package->name() ); + continue; + } + + InstallTransaction::InstallResult result; + InstallInfo info( package->hasReadme() ); + if ( parser->isTest() || + (result = installPackage( package, parser, update, info )) == SUCCESS) { + + m_installedPackages.push_back( make_pair( package->name(), info)); + } else { + + // log failures are critical + if ( result == LOG_DIR_FAILURE || + result == LOG_FILE_FAILURE || + result == NO_LOG_FILE || + result == CANT_LOCK_LOG_FILE || + + // or pkgdest + result == PKGDEST_ERROR ) { + return result; + } + + m_installErrors.push_back( make_pair(package->name(), info) ); + if ( group ) { + return PKGMK_FAILURE; + } + } + } + + return SUCCESS; +} + + +/*! + Install a single package + \param package the package to be installed + \param parser the argument parser to be used + \param update whether this is an update transaction + \param info store pre and post install information +*/ +InstallTransaction::InstallResult +InstallTransaction::installPackage( const Package* package, + const ArgParser* parser, + bool update, + InstallTransaction::InstallInfo& info ) + const +{ + + InstallTransaction::InstallResult result = SUCCESS; +#ifdef USE_LOCKING + LockFile lockFile; +#endif + + int fdlog = -1; + string logFile = ""; + string timestamp; + + string commandName = "prt-get"; + if ( parser->wasCalledAsPrtCached() ) { + commandName = "prt-cache"; + } + + // - initial information about the package to be build + string message; + message = commandName + ": "; + if (update) { + message += "updating "; + } else { + message += "installing "; + } + message += package->path() + "/" + package->name(); + cout << message << endl; + + if ( m_config->writeLog() ) { + logFile = m_config->logFilePattern(); + if ( logFile == "" ) { + return NO_LOG_FILE; + } + + StringHelper::replaceAll( logFile, "%n", package->name() ); + StringHelper::replaceAll( logFile, "%p", package->path() ); + StringHelper::replaceAll( logFile, "%v", package->version() ); + StringHelper::replaceAll( logFile, "%r", package->release() ); + +#ifdef USE_LOCKING + lockFile.setFile( logFile ); + if ( !lockFile.lockWrite() ) { + cout << "here" << logFile << endl; + return CANT_LOCK_LOG_FILE; + } +#endif + + size_t pos = logFile.find_last_of( "/" ); + if ( pos != string::npos ) { + if ( !Repository::createOutputDir( logFile.substr( 0, pos ) ) ) { + return LOG_DIR_FAILURE; + } + } + + if ( !m_config->appendLog() ) { + unlink( logFile.c_str() ); + } + + fdlog = open( logFile.c_str(), + O_APPEND | O_WRONLY | O_CREAT, 0666 ); + + if ( fdlog == -1 ) { + return LOG_FILE_FAILURE; + } + + write( fdlog, message.c_str(), message.length()); + write( fdlog, "\n", 1); + + time_t startTime; + time(&startTime); + timestamp = ctime(&startTime); + timestamp = commandName + ": starting build " + timestamp; + write( fdlog, timestamp.c_str(), timestamp.length()); + } + + string pkgdir = package->path() + "/" + package->name(); + chdir( pkgdir.c_str() ); + + string runscriptCommand = "sh"; + if (m_config->runscriptCommand() != "") { + runscriptCommand = m_config->runscriptCommand(); + } + + // -- pre-install + struct stat statData; + if ((parser->execPreInstall() || m_config->runScripts()) && + stat((pkgdir + "/" + "pre-install").c_str(), &statData) == 0) { + Process preProc( runscriptCommand, + pkgdir + "/" + "pre-install", + fdlog ); + if (preProc.executeShell()) { + info.preState = FAILED; + } else { + info.preState = EXEC_SUCCESS; + } + } + + // -- build + string cmd = PKGMK_DEFAULT_COMMAND; + if (m_config->makeCommand() != "") { + cmd = m_config->makeCommand(); + } + + string args = "-d " + parser->pkgmkArgs(); + Process makeProc( cmd, args, fdlog ); + if ( makeProc.executeShell() ) { + result = PKGMK_FAILURE; + } else { + // -- update + string pkgdest = getPkgDest(); + if ( pkgdest != "" ) { + // TODO: don't manipulate pkgdir + pkgdir = pkgdest; + string message = "prt-get: Using PKGMK_PACKAGE_DIR: " + pkgdir; + if (parser->verbose() > 0) { + cout << message << endl; + } + if ( m_config->writeLog() ) { + write( fdlog, message.c_str(), message.length() ); + write( fdlog, "\n", 1 ); + } + } + + // the following chdir is a noop if usePkgDest() returns false + if ( chdir( pkgdir.c_str() ) != 0 ) { + result = PKGDEST_ERROR; + } else { + cmd = PKGADD_DEFAULT_COMMAND; + if (m_config->addCommand() != "") { + cmd = m_config->addCommand(); + } + + args = ""; + if (parser->installRoot() != "") { + args = "-r " + parser->installRoot() + " "; + } + + + if ( update ) { + args += "-u "; + } + if ( !parser->pkgaddArgs().empty() ) { + args += parser->pkgaddArgs() + " "; + } + args += + package->name() + "#" + + package->version() + "-" + + package->release() + ".pkg.tar.gz"; + + + // - inform the user about what's happening + string fullCommand = commandName + ": " + cmd + " " + args; + string summary; + if (update) { + string from = m_pkgDB->getPackageVersion(package->name()); + string to = package->version() + "-" + package->release(); + if (from == to) { + summary = commandName + ": " + "reinstalling " + + package->name() + " " + to; + } else { + summary = commandName + ": " + "updating " + + package->name() + " from " + from + " to " + to; + } + } else { + summary = commandName + ": " + "installing " + + package->name() + " " + + package->version() + "-" + package->release(); + } + + // - print and log + cout << summary << endl; + if (parser->verbose() > 0) { + cout << fullCommand << endl; + } + if ( m_config->writeLog() ) { + time_t endTime; + time(&endTime); + timestamp = ctime(&endTime); + timestamp = commandName + ": build done " + timestamp; + + write( fdlog, summary.c_str(), summary.length() ); + write( fdlog, "\n", 1 ); + write( fdlog, fullCommand.c_str(), fullCommand.length() ); + write( fdlog, "\n", 1 ); + write( fdlog, timestamp.c_str(), timestamp.length()); + write( fdlog, "\n", 1 ); + } + + Process installProc( cmd, args, fdlog ); + if ( installProc.executeShell() ) { + result = PKGADD_FAILURE; + } else { + // exec post install + if ((parser->execPostInstall() || m_config->runScripts() ) && + stat((package->path() + "/" + package->name() + + "/" + "post-install").c_str(), &statData) + == 0) { + // Work around the pkgdir variable change + Process postProc( runscriptCommand, + package->path() + "/" + package->name()+ + "/" + "post-install", + fdlog ); + if (postProc.executeShell()) { + info.postState = FAILED; + } else { + info.postState = EXEC_SUCCESS; + } + } + } + } + } + + if ( m_config->writeLog() ) { + +#ifdef USE_LOCKING + lockFile.unlock(); +#endif + + // Close logfile + close ( fdlog ); + + if (m_config->removeLogOnSuccess() && !m_config->appendLog() && + result == SUCCESS) { + unlink(logFile.c_str()); + } + } + return result; +} + +/*! + Calculate dependencies for this transaction + \return true on success +*/ +bool InstallTransaction::calculateDependencies() +{ + if ( m_depCalced ) { + return true; + } + m_depCalced = true; + if ( m_packages.empty() ) { + return false; + } + + list< pair<string, const Package*> >::const_iterator it = + m_packages.begin(); + for ( ; it != m_packages.end(); ++it ) { + const Package* package = it->second; + if ( package ) { + checkDependecies( package ); + } + } + list<int> indexList; + if ( ! m_resolver.resolve( indexList ) ) { + m_depCalced = false; + return false; + } + + list<int>::iterator lit = indexList.begin(); + for ( ; lit != indexList.end(); ++lit ) { + m_depNameList.push_back( m_depList[*lit] ); + } + + return true; +} + +/*! + recursive method to calculate dependencies + \param package package for which we want to calculate dependencies + \param depends index if the package \a package depends on (-1 for none) +*/ +void InstallTransaction::checkDependecies( const Package* package, + int depends ) +{ + int index = -1; + bool newPackage = true; + for ( unsigned int i = 0; i < m_depList.size(); ++i ){ + if ( m_depList[i] == package->name() ) { + index = i; + newPackage = false; + break; + } + } + + + if ( index == -1 ) { + index = m_depList.size(); + m_depList.push_back( package->name() ); + } + + if ( depends != -1 ) { + m_resolver.addDependency( index, depends ); + } else { + // this just adds index to the dependency resolver + m_resolver.addDependency( index, index ); + } + + if ( newPackage ) { + if ( !package->dependencies().empty() ) { + list<string> deps; + split( package->dependencies(), ',', deps ); + list<string>::iterator it = deps.begin(); + for ( ; it != deps.end(); ++it ) { + string dep = *it; + if ( !dep.empty() ) { + string::size_type pos = dep.find_last_of( '/' ); + if ( pos != string::npos && (pos+1) < dep.length() ) { + dep = dep.substr( pos + 1 ); + } + const Package* p = m_repo->getPackage( dep ); + if ( p ) { + checkDependecies( p, index ); + } else { + m_missingPackages. + push_back( make_pair( dep, package->name() ) ); + } + } + } + } + } +} + + +/*! + This method returns a list of packages which should be installed to + meet the requirements for the packages to be installed. Includes + the packages to be installed. The packages are in the correct order, + packages to be installed first come first :-) + + \return a list of packages required for the transaction +*/ +const list<string>& InstallTransaction::dependencies() const +{ + return m_depNameList; +} + + +/*! + This method returns a list of packages which could not be installed + because they could not be found in the ports tree. The return value is + a pair, \a pair.first is package name and \a pair.second is the package + requiring \a pair.first. + + \return packages missing in the ports tree +*/ +const list< pair<string, string> >& InstallTransaction::missing() const +{ + return m_missingPackages; +} + + +/*! + \return packages which were requested to be installed but are already + installed +*/ +const list<string>& InstallTransaction::alreadyInstalledPackages() const +{ + return m_alreadyInstalledPackages; +} + + +/*! + \return the packages which were installed in this transaction +*/ +const list< pair<string, InstallTransaction::InstallInfo> >& +InstallTransaction::installedPackages() const +{ + return m_installedPackages; +} + + +/*! + calculate dependendencies for this package +*/ +InstallTransaction::InstallResult +InstallTransaction::calcDependencies( ) +{ + if ( m_packages.empty() ) { + return NO_PACKAGE_GIVEN; + } + + bool validPackages = false; + list< pair<string, const Package*> >::iterator it = m_packages.begin(); + for ( ; it != m_packages.end(); ++it ) { + if ( it->second ) { + validPackages = true; + } else { + // Note: moved here from calculateDependencies + m_missingPackages.push_back( make_pair( it->first, string("") ) ); + } + } + if ( !validPackages ) { + return PACKAGE_NOT_FOUND; + } + + if ( !calculateDependencies() ) { + return CYCLIC_DEPEND; + } + return SUCCESS; +} + +string InstallTransaction::getPkgDest() +{ + string pkgdest = ""; + FILE* p = popen( ". /etc/pkgmk.conf && echo $PKGMK_PACKAGE_DIR", "r" ); + if ( p ) { + char line[256]; + fgets( line, 256, p ); + pkgdest = line; + pkgdest = StringHelper::stripWhiteSpace( pkgdest ); + pclose( p ); + } + return pkgdest; +} + +const list<string>& InstallTransaction::ignoredPackages() const +{ + return m_ignoredPackages; +} Deleted: tools/prt-get/branches/prt-get-5.13/src/main.cpp =================================================================== --- tools/prt-get/trunk/src/main.cpp 2006-04-04 15:39:45 UTC (rev 1137) +++ tools/prt-get/branches/prt-get-5.13/src/main.cpp 2006-09-08 18:05:30 UTC (rev 1849) @@ -1,170 +0,0 @@ -//////////////////////////////////////////////////////////////////////// -// FILE: main.cpp -// AUTHOR: Johannes Winkelmann, jw@tks6.net -// COPYRIGHT: (c) 2002 by Johannes Winkelmann -// --------------------------------------------------------------------- -// 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. -//////////////////////////////////////////////////////////////////////// - -#include <signal.h> -#include <iostream> -using namespace std; - -#include "argparser.h" -#include "prtget.h" -#include "signaldispatcher.h" - -int main( int argc, char** argv ) -{ - ArgParser argParser( argc, argv ); - if ( !argParser.parse() ) { - if (argParser.unknownOption().size() > 0){ - cerr << "prt-get: Unknown option: " << argParser.unknownOption() - << endl; - } else if ( !argParser.isCommandGiven() ) { - if (argParser.commandName() != "") { - cerr << "prt-get: Unknown command '" - << argParser.commandName() << "'. " - << "try prt-get help for more information" << endl; - } else { - cerr << "prt-get: no command given. " - << "try prt-get help for more information" << endl; - } - } - - exit( -1 ); - } - if ( argParser.verbose() > 2 ) { - cerr << "prt-get: can't specify both -v and -vv. " << endl; - exit( -1 ); - } - - PrtGet prtGet( &argParser ); - - signal( SIGHUP, SignalDispatcher::dispatch ); - signal( SIGINT, SignalDispatcher::dispatch ); - signal( SIGQUIT, SignalDispatcher::dispatch ); - signal( SIGILL, SignalDispatcher::dispatch ); - - SignalDispatcher::instance()->registerHandler( &prtGet, SIGINT ); - SignalDispatcher::instance()->registerHandler( &prtGet, SIGHUP ); - SignalDispatcher::instance()->registerHandler( &prtGet, SIGQUIT ); - SignalDispatcher::instance()->registerHandler( &prtGet, SIGILL ); - - - ArgParser::Type command = argParser.commandType(); - switch ( command ) - { - case ArgParser::HELP: - prtGet.printUsage(); - break; - case ArgParser::SHOW_VERSION: - prtGet.printVersion(); - break; - case ArgParser::LIST: - prtGet.listPackages(); - break; - case ArgParser::DUP: - prtGet.listShadowed(); - break; - case ArgParser::SEARCH: - prtGet.searchPackages(); - break; - case ArgParser::DSEARCH: - prtGet.searchPackages( true ); - break; - case ArgParser::INFO: - prtGet.printInfo(); - break; - case ArgParser::ISINST: - prtGet.isInstalled(); - break; - case ArgParser::INSTALL: - prtGet.install(); - break; - case ArgParser::DEPINST: - prtGet.install(false, true, true); - break; - case ArgParser::GRPINST: - prtGet.install( false, true ); - break; - case ArgParser::DEPENDS: - prtGet.printDepends(); - break; - case ArgParser::QUICKDEP: - prtGet.printDepends( true ); - break; - case ArgParser::UPDATE: - prtGet.install( true ); - break; - case ArgParser::DIFF: - prtGet.printDiff(); - break; - case ArgParser::QUICKDIFF: - prtGet.printQuickDiff(); - break; - case ArgParser::CREATE_CACHE: - prtGet.createCache(); - break; - case ArgParser::PATH: - prtGet.printPath(); - break; - case ArgParser::LISTINST: - prtGet.listInstalled(); - break; - case ArgParser::PRINTF: - prtGet.printf(); - break; - case ArgParser::README: - prtGet.readme(); - break; - case ArgParser::DEPENDENT: - prtGet.printDependendent(); - break; - case ArgParser::SYSUP: - prtGet.sysup(); - break; - case ArgParser::CURRENT: - prtGet.current(); - break; - case ArgParser::FSEARCH: - prtGet.fsearch(); - break; - case ArgParser::LOCK: - prtGet.setLock( true ); - break; - case ArgParser::UNLOCK: - prtGet.setLock( false ); - break; - case ArgParser::LISTLOCKED: - prtGet.listLocked(); - break; - case ArgParser::CAT: - prtGet.cat(); - break; - case ArgParser::LS: - prtGet.ls(); - break; - case ArgParser::EDIT: - prtGet.edit(); - break; - case ArgParser::REMOVE: - prtGet.remove(); - break; - case ArgParser::DEPTREE: - prtGet.printDependTree(); - break; - case ArgParser::DUMPCONFIG: - prtGet.dumpConfig(); - break; - default: - cerr << "unknown command" << endl; - break; - } - - - return prtGet.returnValue(); -} Copied: tools/prt-get/branches/prt-get-5.13/src/main.cpp (from rev 1236, tools/prt-get/trunk/src/main.cpp) =================================================================== --- tools/prt-get/branches/prt-get-5.13/src/main.cpp (rev 0) +++ tools/prt-get/branches/prt-get-5.13/src/main.cpp 2006-09-08 18:05:30 UTC (rev 1849) @@ -0,0 +1,173 @@ +//////////////////////////////////////////////////////////////////////// +// FILE: main.cpp +// AUTHOR: Johannes Winkelmann, jw@tks6.net +// COPYRIGHT: (c) 2002 by Johannes Winkelmann +// --------------------------------------------------------------------- +// 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. +//////////////////////////////////////////////////////////////////////// + +#include <signal.h> +#include <iostream> +using namespace std; + +#include "argparser.h" +#include "prtget.h" +#include "signaldispatcher.h" + +int main( int argc, char** argv ) +{ + ArgParser argParser( argc, argv ); + if ( !argParser.parse() ) { + if (argParser.unknownOption().size() > 0){ + cerr << "prt-get: Unknown option: " << argParser.unknownOption() + << endl; + } else if ( !argParser.isCommandGiven() ) { + if (argParser.commandName() != "") { + cerr << "prt-get: Unknown command '" + << argParser.commandName() << "'. " + << "try prt-get help for more information" << endl; + } else { + cerr << "prt-get: no command given. " + << "try prt-get help for more information" << endl; + } + } + + exit( -1 ); + } + if ( argParser.verbose() > 2 ) { + cerr << "prt-get: can't specify both -v and -vv. " << endl; + exit( -1 ); + } + + PrtGet prtGet( &argParser ); + + signal( SIGHUP, SignalDispatcher::dispatch ); + signal( SIGINT, SignalDispatcher::dispatch ); + signal( SIGQUIT, SignalDispatcher::dispatch ); + signal( SIGILL, SignalDispatcher::dispatch ); + + SignalDispatcher::instance()->registerHandler( &prtGet, SIGINT ); + SignalDispatcher::instance()->registerHandler( &prtGet, SIGHUP ); + SignalDispatcher::instance()->registerHandler( &prtGet, SIGQUIT ); + SignalDispatcher::instance()->registerHandler( &prtGet, SIGILL ); + + + ArgParser::Type command = argParser.commandType(); + switch ( command ) + { + case ArgParser::HELP: + prtGet.printUsage(); + break; + case ArgParser::SHOW_VERSION: + prtGet.printVersion(); + break; + case ArgParser::LIST: + prtGet.listPackages(); + break; + case ArgParser::DUP: + prtGet.listShadowed(); + break; + case ArgParser::SEARCH: + prtGet.searchPackages(); + break; + case ArgParser::DSEARCH: + prtGet.searchPackages( true ); + break; + case ArgParser::INFO: + prtGet.printInfo(); + break; + case ArgParser::ISINST: + prtGet.isInstalled(); + break; + case ArgParser::INSTALL: + prtGet.install(); + break; + case ArgParser::DEPINST: + prtGet.install(false, true, true); + break; + case ArgParser::GRPINST: + prtGet.install( false, true ); + break; + case ArgParser::DEPENDS: + prtGet.printDepends(); + break; + case ArgParser::QUICKDEP: + prtGet.printDepends( true ); + break; + case ArgParser::UPDATE: + prtGet.install( true ); + break; + case ArgParser::DIFF: + prtGet.printDiff(); + break; + case ArgParser::QUICKDIFF: + prtGet.printQuickDiff(); + break; + case ArgParser::CREATE_CACHE: + prtGet.createCache(); + break; + case ArgParser::PATH: + prtGet.printPath(); + break; + case ArgParser::LISTINST: + prtGet.listInstalled(); + break; + case ArgParser::PRINTF: + prtGet.printf(); + break; + case ArgParser::README: + prtGet.readme(); + break; + case ArgParser::DEPENDENT: + prtGet.printDependent(); + break; + case ArgParser::SYSUP: + prtGet.sysup(); + break; + case ArgParser::CURRENT: + prtGet.current(); + break; + case ArgParser::FSEARCH: + prtGet.fsearch(); + break; + case ArgParser::LOCK: + prtGet.setLock( true ); + break; + case ArgParser::UNLOCK: + prtGet.setLock( false ); + break; + case ArgParser::LISTLOCKED: + prtGet.listLocked(); + break; + case ArgParser::CAT: + prtGet.cat(); + break; + case ArgParser::LS: + prtGet.ls(); + break; + case ArgParser::EDIT: + prtGet.edit(); + break; + case ArgParser::REMOVE: + prtGet.remove(); + break; + case ArgParser::DEPTREE: + prtGet.printDependTree(); + break; + case ArgParser::DUMPCONFIG: + prtGet.dumpConfig(); + break; + case ArgParser::LISTORPHANS: + prtGet.listOrphans(); + break; + default: + cerr << "unknown command" << endl; + break; + } + + + return prtGet.returnValue(); +} Deleted: tools/prt-get/branches/prt-get-5.13/src/package.cpp =================================================================== --- tools/prt-get/trunk/src/package.cpp 2006-04-04 15:39:45 UTC (rev 1137) +++ tools/prt-get/branches/prt-get-5.13/src/package.cpp 2006-09-08 18:05:30 UTC (rev 1849) @@ -1,333 +0,0 @@ -//////////////////////////////////////////////////////////////////////// -// FILE: package.cpp -// AUTHOR: Johannes Winkelmann, jw@tks6.net -// COPYRIGHT: (c) 2002 by Johannes Winkelmann -// --------------------------------------------------------------------- -// 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. -//////////////////////////////////////////////////////////////////////// - - -#include <iostream> -#include <cstdio> -#include <sys/stat.h> -#include <sys/utsname.h> -using namespace std; - -#include "package.h" -#include "stringhelper.h" -using namespace StringHelper; - - - -/*! - Create a package, which is not yet fully initialized, This is interesting - in combination with the lazy initialization -*/ -Package::Package( const string& name, - const string& path ) - : m_loaded( false ) -{ - m_data = new PackageData( name, path ); -} - -/*! - Create a fully initialized package. Most interesting when created from a - cache file -*/ -Package::Package( const string& name, - const string& path, - const string& version, - const string& release, - const string& description, - const string& dependencies, - const string& url, - const string& packager, - const string& maintainer, - const string& hasReadme, - const string& hasPreInstall, - const string& hasPostInstall) - : m_loaded( true ) -{ - m_data = new PackageData( name, path, version, release, - description, dependencies, url, - packager, maintainer, hasReadme, - hasPreInstall, hasPostInstall ); - -} - -Package::~Package() -{ - delete m_data; -} - -/*! \return the name of this package */ -const string& Package::name() const -{ - return m_data->name; -} - -/*! \return the path to this package */ -const string& Package::path() const -{ - return m_data->path; -} - -/*! \return the version of this package */ -const string& Package::version() const -{ - load(); - return m_data->version; -} - -/*! \return the release number of this package */ -const string& Package::release() const -{ - load(); - return m_data->release; -} - -/*! \return the description field of this package */ -const string& Package::description() const -{ - load(); - return m_data->description; -} - -/*! \return the dependency line of this package */ -const string& Package::dependencies() const -{ - load(); - return m_data->depends; -} - -/*! \return the url of this package */ -const string& Package::url() const -{ - load(); - return m_data->url; -} - -/*! \return the packager of this package */ -const string& Package::packager() const -{ - load(); - return m_data->packager; -} -/*! \return the maintainer of this package */ -const string& Package::maintainer() const -{ - load(); - return m_data->maintainer; -} - -/*! \return whether or not this package has a readme file */ -const bool Package::hasReadme() const -{ - load(); - return m_data->hasReadme; -} - -const bool Package::hasPreInstall() const -{ - return m_data->hasPreInstall; -} - -const bool Package::hasPostInstall() const -{ - return m_data->hasPostInstall; -} - -/*! - load from Pkgfile -*/ -void Package::load() const -{ - if ( m_loaded ) { - return; - } - m_loaded = true; - - string fileName = m_data->path + "/" + m_data->name + "/Pkgfile"; - - // c IO is about four times faster then fstream :-( - FILE* fp = fopen( fileName.c_str(), "r" ); - if ( fp == NULL ) { - return; - } - - - const int length = BUFSIZ; - char input[length]; - string line; - - time_t timeNow; - time(&timeNow); - - struct utsname unameBuf; - if (uname(&unameBuf) != 0) { - unameBuf.release[0] = '\0'; - } - - - - while ( fgets( input, length, fp ) ) { - - line = stripWhiteSpace( input ); - - if ( line.substr( 0, 8 ) == "version=" ) { - m_data->version = getValueBefore( getValue( line, '=' ), '#' ); - m_data->version = stripWhiteSpace( m_data->version ); - - expandShellCommands(m_data->version, timeNow, unameBuf); - } else if ( line.substr( 0, 8 ) == "release=" ) { - m_data->release = getValueBefore( getValue( line, '=' ), '#' ); - m_data->release = stripWhiteSpace( m_data->release ); - } else if ( line[0] == '#' ) { - while ( !line.empty() && - ( line[0] == '#' || line[0] == ' ' || line[0] == '\t' ) ) { - line = line.substr( 1 ); - } - string::size_type pos = line.find( ':' ); - if ( pos != string::npos ) { - if ( startwith_nocase( line, "desc" ) ) { - m_data->description = - stripWhiteSpace( getValue( line, ':' ) ); - - } else if ( startwith_nocase( line, "pack" ) ) { - m_data->packager = - stripWhiteSpace( getValue( line, ':' ) ); - } else if ( startwith_nocase( line, "maint" ) ) { - m_data->maintainer = - stripWhiteSpace( getValue( line, ':' ) ); - } else if ( startwith_nocase( line, "url" ) ) { - m_data->url = stripWhiteSpace( getValue( line, ':' ) ); - } else if ( startwith_nocase( line, "dep" ) ) { - string depends = stripWhiteSpace( getValue( line, ':' ) ); - - StringHelper::replaceAll( depends, " ", "," ); - StringHelper::replaceAll( depends, ",,", "," ); - - // TODO: decide which one to use -#if 0 - // remove commented out packages - list<string> deps = StringHelper::split( depends, ',' ); - list<string>::iterator it = deps.begin(); - for ( ; it != deps.end(); ++it ) { - if ( (*it)[0] == '#' ) { - cerr << "Commented dep: " << *it << endl; - } else { - if ( it != deps.begin() ) { - m_data->depends += ","; - } - m_data->depends += *it; - } - } -#else - m_data->depends = depends; -#endif - - } - } - } - } - fclose( fp ); - - - string file = m_data->path + "/" + m_data->name + "/README"; - struct stat buf; - if ( stat( file.c_str(), &buf ) != -1) { - m_data->hasReadme = true; - } - file = m_data->path + "/" + m_data->name + "/pre-install"; - if ( stat( file.c_str(), &buf ) != -1) { - m_data->hasPreInstall = true; - } - file = m_data->path + "/" + m_data->name + "/post-install"; - if ( stat( file.c_str(), &buf ) != -1) { - m_data->hasPostInstall = true; - } - -} - -void Package::setDependencies( const std::string& dependencies ) -{ - m_data->depends = dependencies; -} - - - -PackageData::PackageData( const string& name_, - const string& path_, - const string& version_, - const string& release_, - const string& description_, - const string& dependencies_, - const string& url_, - const string& packager_, - const string& maintainer_, - const string& hasReadme_, - const string& hasPreInstall_, - const string& hasPostInstall_ ) - : name( name_ ), - path( path_ ), - version( version_ ), - release( release_ ), - description( description_ ), - depends( dependencies_ ), - url( url_ ), - packager( packager_ ), - maintainer( maintainer_ ) - -{ - hasReadme = ( stripWhiteSpace( hasReadme_ ) == "yes" ); - hasPreInstall = ( stripWhiteSpace( hasPreInstall_ ) == "yes" ); - hasPostInstall = ( stripWhiteSpace( hasPostInstall_ ) == "yes" ); -} - - -void Package::expandShellCommands(std::string& input, - const time_t& timeNow, - const struct utsname unameBuf) -{ - // TODO: consider dropping either of the tagsets, depending on feedback - - static const int TAG_COUNT = 2; - string startTag[TAG_COUNT] = { "`", "$(" }; - string endTag[TAG_COUNT] = { "`", ")" }; - - for (int i = 0; i < TAG_COUNT; ++i) { - string::size_type pos; - while ((pos = input.find(startTag[i])) != string::npos) { - - if (unameBuf.release) { - input = replaceAll(input, - startTag[i] + "uname -r" + endTag[i], - unameBuf.release); - } - - pos = input.find(startTag[i] + "date"); - if (pos != string::npos) { - // NOTE: currently only works for one date pattern - string::size_type startpos, endpos; - endpos = input.find(endTag[i], pos+1); - startpos = input.find('+', pos+1); - - string format = input.substr(startpos+1, endpos-startpos-1); - - // support date '+...' and date "+..." - int len = format.length(); - if (format[len-1] == '\'' || format[len-1] == '"') { - format = format.substr(0, len-1); - } - char timeBuf[32]; - strftime(timeBuf, 32, format.c_str(), localtime(&timeNow)); - - input = input.substr(0, pos) + timeBuf + - input.substr(endpos+1); - } - } - } -} Copied: tools/prt-get/branches/prt-get-5.13/src/package.cpp (from rev 1806, tools/prt-get/trunk/src/package.cpp) =================================================================== --- tools/prt-get/branches/prt-get-5.13/src/package.cpp (rev 0) +++ tools/prt-get/branches/prt-get-5.13/src/package.cpp 2006-09-08 18:05:30 UTC (rev 1849) @@ -0,0 +1,348 @@ +//////////////////////////////////////////////////////////////////////// +// FILE: package.cpp +// AUTHOR: Johannes Winkelmann, jw@tks6.net +// COPYRIGHT: (c) 2002 by Johannes Winkelmann +// --------------------------------------------------------------------- +// 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. +//////////////////////////////////////////////////////////////////////// + + +#include <iostream> +#include <cstdio> +#include <sys/stat.h> +#include <sys/utsname.h> +using namespace std; + +#include "package.h" +#include "stringhelper.h" +using namespace StringHelper; + + + +/*! + Create a package, which is not yet fully initialized, This is interesting + in combination with the lazy initialization +*/ +Package::Package( const string& name, + const string& path ) + : m_loaded( false ) +{ + m_data = new PackageData( name, path ); +} + +/*! + Create a fully initialized package. Most interesting when created from a + cache file +*/ +Package::Package( const string& name, + const string& path, + const string& version, + const string& release, + const string& description, + const string& dependencies, + const string& url, + const string& packager, + const string& maintainer, + const string& hasReadme, + const string& hasPreInstall, + const string& hasPostInstall) + : m_loaded( true ) +{ + m_data = new PackageData( name, path, version, release, + description, dependencies, url, + packager, maintainer, hasReadme, + hasPreInstall, hasPostInstall ); + +} + +Package::~Package() +{ + delete m_data; +} + +/*! \return the name of this package */ +const string& Package::name() const +{ + return m_data->name; +} + +/*! \return the path to this package */ +const string& Package::path() const +{ + return m_data->path; +} + +/*! \return the version of this package */ +const string& Package::version() const +{ + load(); + return m_data->version; +} + +/*! \return the release number of this package */ +const string& Package::release() const +{ + load(); + return m_data->release; +} + +/*! \return the description field of this package */ +const string& Package::description() const +{ + load(); + return m_data->description; +} + +/*! \return the dependency line of this package */ +const string& Package::dependencies() const +{ + load(); + return m_data->depends; +} + +/*! \return the url of this package */ +const string& Package::url() const +{ + load(); + return m_data->url; +} + +/*! \return the packager of this package */ +const string& Package::packager() const +{ + load(); + return m_data->packager; +} +/*! \return the maintainer of this package */ +const string& Package::maintainer() const +{ + load(); + return m_data->maintainer; +} + +/*! \return whether or not this package has a readme file */ +const bool Package::hasReadme() const +{ + load(); + return m_data->hasReadme; +} + +/*! \return a typically formatted version-release string */ +string Package::versionReleaseString() const +{ + load(); + return m_data->versionReleaseString; +} + +const bool Package::hasPreInstall() const +{ + return m_data->hasPreInstall; +} + +const bool Package::hasPostInstall() const +{ + return m_data->hasPostInstall; +} + +/*! + load from Pkgfile +*/ +void Package::load() const +{ + if ( m_loaded ) { + return; + } + m_loaded = true; + + string fileName = m_data->path + "/" + m_data->name + "/Pkgfile"; + + // c IO is about four times faster then fstream :-( + FILE* fp = fopen( fileName.c_str(), "r" ); + if ( fp == NULL ) { + return; + } + + + const int length = BUFSIZ; + char input[length]; + string line; + + time_t timeNow; + time(&timeNow); + + struct utsname unameBuf; + if (uname(&unameBuf) != 0) { + unameBuf.release[0] = '\0'; + } + + + + while ( fgets( input, length, fp ) ) { + + line = stripWhiteSpace( input ); + + if ( line.substr( 0, 8 ) == "version=" ) { + m_data->version = getValueBefore( getValue( line, '=' ), '#' ); + m_data->version = stripWhiteSpace( m_data->version ); + + expandShellCommands(m_data->version, timeNow, unameBuf); + } else if ( line.substr( 0, 8 ) == "release=" ) { + m_data->release = getValueBefore( getValue( line, '=' ), '#' ); + m_data->release = stripWhiteSpace( m_data->release ); + } else if ( line[0] == '#' ) { + while ( !line.empty() && + ( line[0] == '#' || line[0] == ' ' || line[0] == '\t' ) ) { + line = line.substr( 1 ); + } + string::size_type pos = line.find( ':' ); + if ( pos != string::npos ) { + if ( startwith_nocase( line, "desc" ) ) { + m_data->description = + stripWhiteSpace( getValue( line, ':' ) ); + + } else if ( startwith_nocase( line, "pack" ) ) { + m_data->packager = + stripWhiteSpace( getValue( line, ':' ) ); + } else if ( startwith_nocase( line, "maint" ) ) { + m_data->maintainer = + stripWhiteSpace( getValue( line, ':' ) ); + } else if ( startwith_nocase( line, "url" ) ) { + m_data->url = stripWhiteSpace( getValue( line, ':' ) ); + } else if ( startwith_nocase( line, "dep" ) ) { + string depends = stripWhiteSpace( getValue( line, ':' ) ); + + StringHelper::replaceAll( depends, " ", "," ); + StringHelper::replaceAll( depends, ",,", "," ); + + // TODO: decide which one to use +#if 0 + // remove commented out packages + list<string> deps = StringHelper::split( depends, ',' ); + list<string>::iterator it = deps.begin(); + for ( ; it != deps.end(); ++it ) { + if ( (*it)[0] == '#' ) { + cerr << "Commented dep: " << *it << endl; + } else { + if ( it != deps.begin() ) { + m_data->depends += ","; + } + m_data->depends += *it; + } + } +#else + m_data->depends = depends; +#endif + + } + } + } + } + fclose( fp ); + + m_data->generateVersionReleaseString(); + + string file = m_data->path + "/" + m_data->name + "/README"; + struct stat buf; + if ( stat( file.c_str(), &buf ) != -1) { + m_data->hasReadme = true; + } + file = m_data->path + "/" + m_data->name + "/pre-install"; + if ( stat( file.c_str(), &buf ) != -1) { + m_data->hasPreInstall = true; + } + file = m_data->path + "/" + m_data->name + "/post-install"; + if ( stat( file.c_str(), &buf ) != -1) { + m_data->hasPostInstall = true; + } + +} + +void Package::setDependencies( const std::string& dependencies ) +{ + m_data->depends = dependencies; +} + + + +PackageData::PackageData( const string& name_, + const string& path_, + const string& version_, + const string& release_, + const string& description_, + const string& dependencies_, + const string& url_, + const string& packager_, + const string& maintainer_, + const string& hasReadme_, + const string& hasPreInstall_, + const string& hasPostInstall_ ) + : name( name_ ), + path( path_ ), + version( version_ ), + release( release_ ), + description( description_ ), + depends( dependencies_ ), + url( url_ ), + packager( packager_ ), + maintainer( maintainer_ ) + +{ + generateVersionReleaseString(); + + hasReadme = ( stripWhiteSpace( hasReadme_ ) == "yes" ); + hasPreInstall = ( stripWhiteSpace( hasPreInstall_ ) == "yes" ); + hasPostInstall = ( stripWhiteSpace( hasPostInstall_ ) == "yes" ); +} + +void PackageData::generateVersionReleaseString() +{ + versionReleaseString = version + "-" + release; +} + + +void Package::expandShellCommands(std::string& input, + const time_t& timeNow, + const struct utsname unameBuf) +{ + // TODO: consider dropping either of the tagsets, depending on feedback + + static const int TAG_COUNT = 2; + string startTag[TAG_COUNT] = { "`", "$(" }; + string endTag[TAG_COUNT] = { "`", ")" }; + + for (int i = 0; i < TAG_COUNT; ++i) { + string::size_type pos; + while ((pos = input.find(startTag[i])) != string::npos) { + + if (unameBuf.release) { + input = replaceAll(input, + startTag[i] + "uname -r" + endTag[i], + unameBuf.release); + } + + pos = input.find(startTag[i] + "date"); + if (pos != string::npos) { + // NOTE: currently only works for one date pattern + string::size_type startpos, endpos; + endpos = input.find(endTag[i], pos+1); + startpos = input.find('+', pos+1); + + string format = input.substr(startpos+1, endpos-startpos-1); + + // support date '+...' and date "+..." + int len = format.length(); + if (format[len-1] == '\'' || format[len-1] == '"') { + format = format.substr(0, len-1); + } + char timeBuf[32]; + strftime(timeBuf, 32, format.c_str(), localtime(&timeNow)); + + input = input.substr(0, pos) + timeBuf + + input.substr(endpos+1); + } + } + } +} Deleted: tools/prt-get/branches/prt-get-5.13/src/package.h =================================================================== --- tools/prt-get/trunk/src/package.h 2006-04-04 15:39:45 UTC (rev 1137) +++ tools/prt-get/branches/prt-get-5.13/src/package.h 2006-09-08 18:05:30 UTC (rev 1849) @@ -1,104 +0,0 @@ -//////////////////////////////////////////////////////////////////////// -// FILE: package.h -// AUTHOR: Johannes Winkelmann, jw@tks6.net -// COPYRIGHT: (c) 2002 by Johannes Winkelmann -// --------------------------------------------------------------------- -// 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. -//////////////////////////////////////////////////////////////////////// - -#ifndef _PACKAGE_H_ -#define _PACKAGE_H_ - -#include <string> - -struct PackageData; - -/*! - \class Package - \brief representation of a package - - Representation of a package from the crux ports tree -*/ -class Package -{ -public: - Package( const std::string& name, - const std::string& path ); - - Package( const std::string& name, - const std::string& path, - const std::string& version, - const std::string& release, - const std::string& description, - const std::string& dependencies, - const std::string& url, - const std::string& packager, - const std::string& maintainer, - const std::string& hasReadme, - const std::string& hasPreInstall, - const std::string& hasPostInstall ); - - ~Package(); - - const std::string& name() const; - const std::string& path() const; - const std::string& version() const; - const std::string& release() const; - const std::string& description() const; - const std::string& dependencies() const; - const std::string& url() const; - const std::string& packager() const; - const std::string& maintainer() const; - const bool hasReadme() const; - const bool hasPreInstall() const; - const bool hasPostInstall() const; - - void setDependencies( const std::string& dependencies ); - - -private: - void load() const; - - static void expandShellCommands(std::string& input, - const time_t& timeNow, - const struct utsname unameBuf); - - mutable PackageData* m_data; - mutable bool m_loaded; - - }; - -struct PackageData -{ - PackageData( const std::string& name_, - const std::string& path_, - const std::string& version_="", - const std::string& release_="", - const std::string& description_="", - const std::string& dependencies_="", - const std::string& url_="", - const std::string& packager="", - const std::string& maintainer="", - const std::string& hasReadme_="", - const std::string& hasPreInstall_="", - const std::string& hasPostInstall_=""); - - std::string name; - std::string path; - std::string version; - std::string release; - std::string description; - std::string depends; - std::string url; - std::string packager; - std::string maintainer; - - bool hasReadme; - bool hasPreInstall; - bool hasPostInstall; -}; - -#endif /* _PACKAGE_H_ */ Copied: tools/prt-get/branches/prt-get-5.13/src/package.h (from rev 1806, tools/prt-get/trunk/src/package.h) =================================================================== --- tools/prt-get/branches/prt-get-5.13/src/package.h (rev 0) +++ tools/prt-get/branches/prt-get-5.13/src/package.h 2006-09-08 18:05:30 UTC (rev 1849) @@ -0,0 +1,110 @@ +//////////////////////////////////////////////////////////////////////// +// FILE: package.h +// AUTHOR: Johannes Winkelmann, jw@tks6.net +// COPYRIGHT: (c) 2002 by Johannes Winkelmann +// --------------------------------------------------------------------- +// 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. +//////////////////////////////////////////////////////////////////////// + +#ifndef _PACKAGE_H_ +#define _PACKAGE_H_ + +#include <string> + +struct PackageData; + +/*! + \class Package + \brief representation of a package + + Representation of a package from the crux ports tree +*/ +class Package +{ +public: + Package( const std::string& name, + const std::string& path ); + + Package( const std::string& name, + const std::string& path, + const std::string& version, + const std::string& release, + const std::string& description, + const std::string& dependencies, + const std::string& url, + const std::string& packager, + const std::string& maintainer, + const std::string& hasReadme, + const std::string& hasPreInstall, + const std::string& hasPostInstall ); + + ~Package(); + + const std::string& name() const; + const std::string& path() const; + const std::string& version() const; + const std::string& release() const; + const std::string& description() const; + const std::string& dependencies() const; + const std::string& url() const; + const std::string& packager() const; + const std::string& maintainer() const; + const bool hasReadme() const; + const bool hasPreInstall() const; + const bool hasPostInstall() const; + + std::string versionReleaseString() const; + + void setDependencies( const std::string& dependencies ); + + +private: + void load() const; + + static void expandShellCommands(std::string& input, + const time_t& timeNow, + const struct utsname unameBuf); + + mutable PackageData* m_data; + mutable bool m_loaded; + + }; + +struct PackageData +{ + PackageData( const std::string& name_, + const std::string& path_, + const std::string& version_="", + const std::string& release_="", + const std::string& description_="", + const std::string& dependencies_="", + const std::string& url_="", + const std::string& packager="", + const std::string& maintainer="", + const std::string& hasReadme_="", + const std::string& hasPreInstall_="", + const std::string& hasPostInstall_=""); + + std::string name; + std::string path; + std::string version; + std::string release; + std::string description; + std::string depends; + std::string url; + std::string packager; + std::string maintainer; + + std::string versionReleaseString; + + bool hasReadme; + bool hasPreInstall; + bool hasPostInstall; + + void generateVersionReleaseString(); +}; + +#endif /* _PACKAGE_H_ */ Deleted: tools/prt-get/branches/prt-get-5.13/src/pkgdb.cpp =================================================================== --- tools/prt-get/trunk/src/pkgdb.cpp 2006-04-04 15:39:45 UTC (rev 1137) +++ tools/prt-get/branches/prt-get-5.13/src/pkgdb.cpp 2006-09-08 18:05:30 UTC (rev 1849) @@ -1,238 +0,0 @@ -//////////////////////////////////////////////////////////////////////// -// FILE: pkgdb.cpp -// AUTHOR: Johannes Winkelmann, jw@tks6.net -// COPYRIGHT: (c) 2002 by Johannes Winkelmann -// --------------------------------------------------------------------- -// 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. -//////////////////////////////////////////////////////////////////////// - -#include <algorithm> -#include <fstream> -#include <map> -#include <iostream> -using namespace std; - -#include <cstring> -#include <cstdio> - -#include <fnmatch.h> - -#include "pkgdb.h" -#include "datafileparser.h" -#include "stringhelper.h" -#include "pg_regex.h" - - -const string PkgDB::PKGDB = "/var/lib/pkg/db"; -const string PkgDB::ALIAS_STORE = LOCALSTATEDIR"/lib/pkg/prt-get.aliases"; - -/*! - Create a PkgDB object -*/ -PkgDB::PkgDB( const string& installRoot ) - : m_isLoaded( false ), - m_installRoot( installRoot ) -{ -} - -/*! - Check whether a package is installed - - \param name the name of the package to check - \param isAlias whether a package is installed as alias - \param aliasOriginalName the original name of an aliased package - - \return whether package \a name is installed -*/ -bool PkgDB::isInstalled( const string& name, - bool useAlias, - bool* isAlias, - string* aliasOrignalName ) const -{ - if ( !load() ) { - return false; - } - - bool installed = m_packages.find( name ) != m_packages.end(); - if (!installed && useAlias) { - string provider; - installed = aliasExistsFor(name, provider); - - if (isAlias) { - *isAlias = installed; - - if (installed && aliasOrignalName) { - *aliasOrignalName = provider; - } - } - } - - return installed; -} - - -bool PkgDB::aliasExistsFor(const string& name, string& providerName) const -{ - // when used the first time, split alias names - if (m_splitAliases.size() < m_aliases.size()) { - map<string, string>::iterator it = m_aliases.begin(); - for (; it != m_aliases.end(); ++it) { - StringHelper::split(it->second, ',', - m_splitAliases[it->first]); - } - } - - map<string, vector<string> >::iterator it = m_splitAliases.begin(); - for (; it != m_splitAliases.end(); ++it) { - if (find(it->second.begin(), it->second.end(), name) != - it->second.end()) { - providerName = it->first; - return true; - } - } - - return false; -} - -/*! - load the package db -*/ -bool PkgDB::load() const -{ - if ( m_isLoaded ) { - return true; - } - -#if 0 - // check this one out to see a really slow IO library :-( - - - ifstream db( PKGDB ); - string line; - bool emptyLine = true; - while ( db.good() ) { - getline( db, line ); - if ( emptyLine ) { - if ( !line.empty() ) { - m_packages.push_back( line ); - } - emptyLine = false; - } - if ( line == "" ) { - emptyLine = true; - } - } - db.close(); -#endif - - std::map<std::string, std::string> aliases; - DataFileParser::parse(ALIAS_STORE, aliases); - - const int length = 256; - char line[length]; - bool emptyLine = true; - bool nameRead = false; - string name; - - string pkgdb = ""; - if (m_installRoot != "") { - pkgdb = m_installRoot; - } - pkgdb += PKGDB; - - FILE* fp = fopen( pkgdb.c_str(), "r" ); - if ( fp ) { - while ( fgets( line, length, fp ) ) { - if ( emptyLine ) { - line[strlen(line)-1] = '\0'; - name = line; - emptyLine = false; - nameRead = true; - } else if ( nameRead ) { - line[strlen(line)-1] = '\0'; - m_packages[ name ] = line; - nameRead = false; - if (aliases.find(name) != aliases.end()) { - m_aliases[name] = aliases[name]; - } - } - if ( line[0] == '\n' ) { - emptyLine = true; - } - - } - } else { - return false; - } - - m_isLoaded = true; - - fclose( fp ); - - return true; -} - -/*! - return a map of installed packages, where the key is the package name and - the value is the version/release string - \return a map of installed packages (key=name, value=version/release) -*/ -const map<string, string>& PkgDB::installedPackages() -{ - load(); - return m_packages; -} - -/*! - \return a package's version and release or an empty string if not found -*/ -string PkgDB::getPackageVersion( const string& name ) const -{ - if ( !load() ) { - return ""; - } - - map<string, string>::const_iterator it = m_packages.find( name ); - if ( it == m_packages.end() ) { - return ""; - } - - return it->second; -} - -/*! - Search packages for a match of \a pattern in name. The name can - contain shell wildcards. - - \param pattern the pattern to be found - \return a list of matching packages -*/ -void PkgDB::getMatchingPackages( const string& pattern, - map<string,string>& target, - bool useRegex ) const -{ - if ( !load() ) { - return; - } - - RegEx re(pattern); - map<string, string>::const_iterator it = m_packages.begin(); - if (useRegex) { - for ( ; it != m_packages.end(); ++it ) { - if (re.match(it->first)) { - target[it->first] = it->second; - } - } - } else { - for ( ; it != m_packages.end(); ++it ) { - // I assume fnmatch will be quite fast for "match all" (*), so - // I didn't add a boolean to check for this explicitely - if ( fnmatch( pattern.c_str(), it->first.c_str(), 0 ) == 0 ) { - target[it->first] = it->second; - } - } - } -} Copied: tools/prt-get/branches/prt-get-5.13/src/pkgdb.cpp (from rev 1179, tools/prt-get/trunk/src/pkgdb.cpp) =================================================================== --- tools/prt-get/branches/prt-get-5.13/src/pkgdb.cpp (rev 0) +++ tools/prt-get/branches/prt-get-5.13/src/pkgdb.cpp 2006-09-08 18:05:30 UTC (rev 1849) @@ -0,0 +1,242 @@ +//////////////////////////////////////////////////////////////////////// +// FILE: pkgdb.cpp +// AUTHOR: Johannes Winkelmann, jw@tks6.net +// COPYRIGHT: (c) 2002 by Johannes Winkelmann +// --------------------------------------------------------------------- +// 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. +//////////////////////////////////////////////////////////////////////// + +#include <algorithm> +#include <fstream> +#include <map> +#include <iostream> +using namespace std; + +#include <cstring> +#include <cstdio> + +#include <fnmatch.h> + +#include "pkgdb.h" +#include "datafileparser.h" +#include "stringhelper.h" +#include "pg_regex.h" + + +const string PkgDB::PKGDB = "/var/lib/pkg/db"; +const string PkgDB::ALIAS_STORE = LOCALSTATEDIR"/lib/pkg/prt-get.aliases"; + +/*! + Create a PkgDB object +*/ +PkgDB::PkgDB( const string& installRoot ) + : m_isLoaded( false ), + m_installRoot( installRoot ) +{ +} + +/*! + Check whether a package is installed + + \param name the name of the package to check + \param isAlias whether a package is installed as alias + \param aliasOriginalName the original name of an aliased package + + \return whether package \a name is installed +*/ +bool PkgDB::isInstalled( const string& name, + bool useAlias, + bool* isAlias, + string* aliasOrignalName ) const +{ + if ( !load() ) { + return false; + } + + bool installed = m_packages.find( name ) != m_packages.end(); + if (!installed && useAlias) { + string provider; + installed = aliasExistsFor(name, provider); + + if (isAlias) { + *isAlias = installed; + + if (installed && aliasOrignalName) { + *aliasOrignalName = provider; + } + } + } else { + if (isAlias) { + *isAlias = false; + } + } + + return installed; +} + + +bool PkgDB::aliasExistsFor(const string& name, string& providerName) const +{ + // when used the first time, split alias names + if (m_splitAliases.size() < m_aliases.size()) { + map<string, string>::iterator it = m_aliases.begin(); + for (; it != m_aliases.end(); ++it) { + StringHelper::split(it->second, ',', + m_splitAliases[it->first]); + } + } + + map<string, vector<string> >::iterator it = m_splitAliases.begin(); + for (; it != m_splitAliases.end(); ++it) { + if (find(it->second.begin(), it->second.end(), name) != + it->second.end()) { + providerName = it->first; + return true; + } + } + + return false; +} + +/*! + load the package db +*/ +bool PkgDB::load() const +{ + if ( m_isLoaded ) { + return true; + } + +#if 0 + // check this one out to see a really slow IO library :-( + + + ifstream db( PKGDB ); + string line; + bool emptyLine = true; + while ( db.good() ) { + getline( db, line ); + if ( emptyLine ) { + if ( !line.empty() ) { + m_packages.push_back( line ); + } + emptyLine = false; + } + if ( line == "" ) { + emptyLine = true; + } + } + db.close(); +#endif + + std::map<std::string, std::string> aliases; + DataFileParser::parse(ALIAS_STORE, aliases); + + const int length = 256; + char line[length]; + bool emptyLine = true; + bool nameRead = false; + string name; + + string pkgdb = ""; + if (m_installRoot != "") { + pkgdb = m_installRoot; + } + pkgdb += PKGDB; + + FILE* fp = fopen( pkgdb.c_str(), "r" ); + if ( fp ) { + while ( fgets( line, length, fp ) ) { + if ( emptyLine ) { + line[strlen(line)-1] = '\0'; + name = line; + emptyLine = false; + nameRead = true; + } else if ( nameRead ) { + line[strlen(line)-1] = '\0'; + m_packages[ name ] = line; + nameRead = false; + if (aliases.find(name) != aliases.end()) { + m_aliases[name] = aliases[name]; + } + } + if ( line[0] == '\n' ) { + emptyLine = true; + } + + } + } else { + return false; + } + + m_isLoaded = true; + + fclose( fp ); + + return true; +} + +/*! + return a map of installed packages, where the key is the package name and + the value is the version/release string + \return a map of installed packages (key=name, value=version/release) +*/ +const map<string, string>& PkgDB::installedPackages() +{ + load(); + return m_packages; +} + +/*! + \return a package's version and release or an empty string if not found +*/ +string PkgDB::getPackageVersion( const string& name ) const +{ + if ( !load() ) { + return ""; + } + + map<string, string>::const_iterator it = m_packages.find( name ); + if ( it == m_packages.end() ) { + return ""; + } + + return it->second; +} + +/*! + Search packages for a match of \a pattern in name. The name can + contain shell wildcards. + + \param pattern the pattern to be found + \return a list of matching packages +*/ +void PkgDB::getMatchingPackages( const string& pattern, + map<string,string>& target, + bool useRegex ) const +{ + if ( !load() ) { + return; + } + + RegEx re(pattern); + map<string, string>::const_iterator it = m_packages.begin(); + if (useRegex) { + for ( ; it != m_packages.end(); ++it ) { + if (re.match(it->first)) { + target[it->first] = it->second; + } + } + } else { + for ( ; it != m_packages.end(); ++it ) { + // I assume fnmatch will be quite fast for "match all" (*), so + // I didn't add a boolean to check for this explicitely + if ( fnmatch( pattern.c_str(), it->first.c_str(), 0 ) == 0 ) { + target[it->first] = it->second; + } + } + } +} Deleted: tools/prt-get/branches/prt-get-5.13/src/prtget.cpp =================================================================== --- tools/prt-get/trunk/src/prtget.cpp 2006-04-04 15:39:45 UTC (rev 1137) +++ tools/prt-get/branches/prt-get-5.13/src/prtget.cpp 2006-09-08 18:05:30 UTC (rev 1849) @@ -1,1953 +0,0 @@ -//////////////////////////////////////////////////////////////////////// -// FILE: prtget.cpp -// AUTHOR: Johannes Winkelmann, jw@tks6.net -// COPYRIGHT: (c) 2002 by Johannes Winkelmann -// --------------------------------------------------------------------- -// 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. -//////////////////////////////////////////////////////////////////////// - -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include <iostream> -#include <algorithm> -#include <set> -#include <iomanip> -#include <cstdio> -#include <cassert> -using namespace std; - -#include <sys/types.h> -#include <sys/stat.h> -#include <dirent.h> -#include <unistd.h> - -#include "prtget.h" -#include "repository.h" -#include "argparser.h" -#include "installtransaction.h" -#include "configuration.h" - -#include "stringhelper.h" -#include "versioncomparator.h" -#include "file.h" -#include "process.h" -#include "datafileparser.h" -using namespace StringHelper; - - -const string PrtGet::CONF_FILE = SYSCONFDIR"/prt-get.conf"; -const string PrtGet::DEFAULT_CACHE_FILE = LOCALSTATEDIR"/lib/pkg/prt-get.cache"; - -/*! - Create a PrtGet object - \param parser the argument parser to be used -*/ -PrtGet::PrtGet( const ArgParser* parser ) - : m_repo( 0 ), - m_config( 0 ), - m_parser( parser ), - m_cacheFile( DEFAULT_CACHE_FILE ), - m_returnValue( PG_OK ), - m_currentTransaction( 0 ) -{ - if ( m_parser->wasCalledAsPrtCached() ) { - m_appName = "prt-cache"; - } else { - m_appName = "prt-get"; - } - - - m_pkgDB = new PkgDB(m_parser->installRoot()); - readConfig(); - - m_useRegex = m_config->useRegex() || m_parser->useRegex(); -} - -/*! destruct PrtGet object */ -PrtGet::~PrtGet() -{ - if ( m_config ) { - delete m_config; - } - if ( m_repo ) { - delete m_repo; - } - - delete m_pkgDB; -} - - -/*! print version and exit */ -void PrtGet::printVersion() -{ - cout << m_appName << " " << VERSION - << " by Johannes Winkelmann, jw@tks6.net" << endl; -} - -/*! print version, usage and exit */ -void PrtGet::printUsage() -{ - printVersion(); - cout << "Usage: " << m_appName << " <command> [options]" << endl; - - cout << "where commands are:" << endl; - - cout << "\nINFORMATION" << endl; - cout << " help show this help" << endl; - cout << " version show the current version" << endl; - cout << " list [<filter>] show a list of available ports" - << endl; - cout << " printf <format> print formatted list of available" - << " ports" - << endl; - cout << " listinst [<filter>] show a list of installed ports" - << endl; - cout << " info <port> show info about a port" << endl; - cout << " path <port> show path of a port" << endl; - cout << " readme <port> show a port's readme file " - << "(if it exists)" << endl; - cout << " dup Find duplicate ports" << endl; - cout << " isinst <port1 port2...> print whether ports are installed" - << endl; - cout << " current <port> print installed version of port" - << endl; - - cout << "\nDIFFERENCES / CHECK FOR UPDATES" << endl; - cout << " diff <port1 port2...> list outdated packages (or check " - << "args for change)" << endl; - cout << " quickdiff same as diff but simple format" - << endl; - cout << " where opt can be:" << endl; - cout << " --all display locked ports too" - << endl; - cout << " --prefer-higher prefer higher installed " - << "versions over lower ports" - << endl; - cout << " --strict-diff override prefer higher " - << "configuration setting" - << endl; - - cout << "\nDEPENDENCIES" << endl; - cout << " depends <port1 port2...> show dependencies for these ports" - << endl; - cout << " quickdep <port1 port2...> same as 'depends' but simple format" - << endl; - cout << " deptree <port> show dependencies tree for <port>" - << endl; - cout << " dependent [opt] <port> show installed packages which " - << "depend on 'port'" - << endl; - cout << " where opt can be:" << endl; - cout << " --all list all dependent packages, not " - << "only installed" << endl; - - cout << "\nSEARCHING" << endl; - cout << " search <expr> show port names containing 'expr'" << endl; - cout << " dsearch <expr> show ports containing 'expr' in the " - << "name or description" << endl; - cout << " fsearch <pattern> show file names in footprints matching " - << "'pattern'" << endl; - - cout << "\nINSTALL, UPDATE and REMOVAL" << endl; - cout << " install [opt] <port1 port2...> install ports" << endl; - cout << " update [opt] <port1 port2...> update ports" << endl; - cout << " grpinst [opt] <port1 port2...> install ports, stop on error" - << endl; - cout << " depinst [opt] <port1 port2...> install ports and their dependencies" - << endl; - cout << " remove [opt] <port1 port2...> remove ports" - << endl; - cout << " where opt can be:" << endl; - cout << " -f, -fi force installation" << endl; - cout << " -fr force rebuild" << endl; - cout << " -uf update footprint" << endl; - cout << " -if ignore footprint" << endl; - cout << " -um update md5sum" << endl; - cout << " -im ignore md5sum" << endl; - cout << " --margs=<string> pass 'string' to pkgmk" - << endl; - cout << " --aargs=<string> pass 'string' to pkgadd" - << endl; - cout << " --rargs=<string> pass 'string' to pkgrm" - << endl; - cout << " --test test mode" << endl; - cout << " --log write log file"<< endl; - cout << " --ignore=<package1,package2,...>" << endl - << " Don't install/update those packages"<< endl; - cout << " --pre-install execute pre-install script" - << endl; - cout << " --post-install execute post-install script" - << endl; - cout << " --install-scripts execute " - << "pre-install and post-install script" - << endl; - - cout << "\nSYSTEM UPDATE " << endl; - cout << " sysup [opt] update all outdated ports" - << endl; - cout << " where opt can be:" << endl; - cout << " --nodeps don't sort by dependencies" - << endl; - cout << " --test test mode" << endl; - cout << " --log write log file"<< endl; - cout << " --prefer-higher prefer higher installed " - << "versions over lower ones in ports tree" - << endl; - cout << " --strict-diff override prefer higher " - << "configuration setting" - << endl; - - cout << " lock <port1 port2...> lock current version " - << "of packages" - << endl; - cout << " unlock <port1 port2...> unlock packages" - << endl; - cout << " listlocked list locked packages" - << endl; - - cout << "\nFILE OPERATIONS " << endl; - - cout << " ls <port> print a listing of the port's" - << " directory" << endl; - cout << " cat <port> <file> print out 'port/file'" - << endl; - cout << " edit <port> <file> edit 'port/file'" << endl; - - cout << "\nGENERAL OPTIONS" << endl; - cout << " -v Show version in listing" - << endl; - cout << " -vv Show version and decription " << "in listing\n" << endl; - cout << " --path Print path to port if appropriate (search, list, depends)\n" << endl; - cout << " --cache Use a cache file" << endl; - cout << " --config=<file> Use alternative " - << "configuration file" << endl; - cout << " --install-root=.. Use alternative " - << "install root directory" << endl; - - - - - cout << " --no-std-config Don't parse " - << "default configuration file" << endl; - cout << " --config-prepend=.. Prepend '..' to" - << " configuration" << endl; - cout << " --config-append=.. Append '..' " - << "to configuration" << endl; - cout << " --config-set=.. Set configuration " - << "data '..',\n" - << " overriding config file" - << endl; - -} - - -/*! print list of duplicate packages in the repository */ -void PrtGet::listShadowed() -{ - if ( m_parser->useCache() ) { - cout << m_appName << ": command 'dup' can't work on a cache" << endl; - m_returnValue = PG_GENERAL_ERROR; - return; - } - - initRepo( true ); - cout << "Hidden packages:" << endl; - map<string, pair<string, string> >::const_iterator it = - m_repo->shadowedPackages().begin(); - for ( ; it != m_repo->shadowedPackages().end(); ++it ) { - string name = it->first; - cout << "* " << name << endl; - cout << " " << it->second.second << " preceeds over" << endl; - cout << " " << it->second.first << endl; - } -} - -/*! - find ports matching a pattern in repository - - \sa Repository::getMatchingPackages() -*/ -void PrtGet::listPackages() -{ - string arg = "*"; - assertMaxArgCount(1); - - if ( m_parser->otherArgs().size() == 1 ) { - arg = *(m_parser->otherArgs().begin()); - } - - initRepo(); - list<Package*> packages; - m_repo->getMatchingPackages( arg, packages ); - if ( packages.size() ) { - list<Package*>::iterator it = packages.begin(); - for ( ; it != packages.end(); ++it ) { - if ( m_parser->printPath() ) { - cout << (*it)->path() << "/"; - } - cout << (*it)->name(); - if ( m_parser->verbose() > 0 ) { - cout << " " << (*it)->version() << "-" << (*it)->release(); - } - if ( m_parser->verbose() > 1 && !(*it)->description().empty() ) { - cout << ": " << (*it)->description(); - } - - cout << endl; - } - } else { - cout << "No matching packages found" << endl; - } -} - -/*! - search repository for a certain pattern (which is read by the argument - parser. - - \sa Repository::searchMatchingPackages() -*/ -void PrtGet::searchPackages( bool searchDesc ) -{ - assertExactArgCount(1); - - initRepo(); - string arg = *(m_parser->otherArgs().begin()); - list<Package*> packages; - m_repo->searchMatchingPackages( arg, packages, searchDesc ); - if ( packages.size() ) { - list<Package*>::iterator it = packages.begin(); - for ( ; it != packages.end(); ++it ) { - if ( m_parser->printPath()) { - cout << (*it)->path() << "/"; - } - cout << (*it)->name(); - - if ( m_parser->verbose() > 0 ) { - cout << " " << (*it)->version() << "-" << (*it)->release(); - } - if ( m_parser->verbose() > 1 && !(*it)->description().empty() ) { - cout << ": " << (*it)->description(); - } - - - cout << endl; - } - } else { - m_returnValue = PG_GENERAL_ERROR; - cout << "No matching packages found" << endl; - } -} - -/*! print info for a package */ -void PrtGet::printInfo() -{ - assertExactArgCount(1); - - initRepo(); - string arg = *(m_parser->otherArgs().begin()); - const Package* p = m_repo->getPackage( arg ); - if ( p ) { - cout << "Name: " << p->name() << "\n" - << "Path: " << p->path() << "\n" - << "Version: " << p->version() << "\n" - << "Release: " << p->release() << endl; - - if ( !p->description().empty() ) { - cout << "Description: " << p->description() << endl; - } - if ( !p->url().empty() ) { - cout << "URL: " << p->url() << endl; - } - if ( !p->packager().empty() ) { - cout << "Packager: " << p->packager() << endl; - } - if ( !p->maintainer().empty() ) { - cout << "Maintainer: " << p->maintainer() << endl; - } - - if ( !p->dependencies().empty() ) { - cout << "Dependencies: " << p->dependencies() << endl; - } - - // TODO: don't hardcode file names - string filesString = ""; - if ( p->hasReadme() ) { - filesString += "README "; - } - if ( p->hasPreInstall() ) { - filesString += "pre-install "; - } - if ( p->hasPostInstall() ) { - filesString += "post-install "; - } - - if ( filesString.length() > 0 ) { - filesString = StringHelper::stripWhiteSpace( filesString ); - StringHelper::replaceAll( filesString, " ", "," ); - cout << "Files: " << filesString << endl; - } - - if ( m_parser->verbose() > 0 && p->hasReadme()) { - cout << "\n-- README ------" << endl; - readme(); - } - - } else { - cerr << "Package '" << arg << "' not found" << endl; - m_returnValue = PG_GENERAL_ERROR; - return; - } -} - - -/*! - initialize repository - \sa Repository::initFromCache() - \sa Repository::initFromFS() - */ -void PrtGet::initRepo( bool listDuplicate ) -{ - if ( !m_repo ) { - m_repo = new Repository(m_useRegex); - - if ( m_parser->useCache() ) { - if (m_config->cacheFile() != "") { - m_cacheFile = m_config->cacheFile(); - } - - Repository::CacheReadResult result = - m_repo->initFromCache( m_cacheFile ); - if ( result == Repository::ACCESS_ERR ) { - cerr << "Can't open cache file: " << m_cacheFile << endl; - m_returnValue = PG_GENERAL_ERROR; - return; - } else if ( result == Repository::FORMAT_ERR ) { - cerr << "warning: your cache file " - << m_cacheFile << " was made with an " - << "older version " - << "of prt-get." - << "\nPlease regenerate it using" - << "\n prt-get cache" << endl; - m_returnValue = PG_GENERAL_ERROR; - return; - } - - struct stat cacheStat; - struct stat confStat; - stat( m_cacheFile.c_str(), &cacheStat ); - stat( CONF_FILE.c_str(), &confStat ); - if ( confStat.st_ctime > cacheStat.st_ctime ) { - cerr << "Error: " - << "Configuration changed after generating cache" - << endl; - cerr << "regenerate cache using 'prt-get cache'" << endl; - m_returnValue = PG_GENERAL_ERROR; - return; - } - - if ( !m_parser->wasCalledAsPrtCached() ) { - cout << m_appName << ": using cache" << endl; - } - - } else { - m_repo->initFromFS( m_config->rootList(), listDuplicate ); - } - } -} - -/*! print whether a package is installed or not */ -void PrtGet::isInstalled() -{ - assertMinArgCount(1); - - const list<char*>& l = m_parser->otherArgs(); - list<char*>::const_iterator it = l.begin(); - for ( ; it != l.end(); ++it ) { - bool isAlias = false; - string aliasName; - - if ( m_pkgDB->isInstalled( *it, true, &isAlias, &aliasName ) ) { - if (isAlias) { - cout << *it << " is provided by package " - << aliasName - << endl; - } else { - cout << "package " << *it << " is installed" << endl; - } - } else { - cout << "package " << *it << " is not installed" << endl; - m_returnValue = PG_GENERAL_ERROR; - } - } -} - - -/*! list installed packages */ -void PrtGet::listInstalled() -{ - assertMaxArgCount(1); - - string arg = "*"; - if ( m_parser->otherArgs().size() == 1 ) { - arg = *(m_parser->otherArgs().begin()); - } - - map<string, string> l; - m_pkgDB->getMatchingPackages( arg, l, m_useRegex ); - map<string, string>::iterator it = l.begin(); - - if ( l.empty() && m_parser->otherArgs().size() > 0 ) { - cerr << m_appName << ": No matching packages found" << endl; - m_returnValue = PG_GENERAL_ERROR; - return; - } - - if ( m_parser->verbose() > 1 ) { - // warning: will slow down the process... - initRepo(); - } - - for ( ; it != l.end(); ++it ) { - cout << it->first.c_str(); - if ( m_parser->verbose() > 0 ) { - cout << " " << it->second.c_str(); - } - if ( m_parser->verbose() > 1 ) { - const Package* p = m_repo->getPackage( it->first ); - if ( p ) { - cout << " " << p->description(); - } - } - - cout << endl; - } -} - -/*! - install package - \param update whether this is an update operation - \param group whether it's a group install (stop on error) - -*/ -void PrtGet::install( bool update, bool group, bool dependencies ) -{ - assertMinArgCount(1); - - // this can be done without initRepo() - const list<char*>& args = m_parser->otherArgs(); - list<char*>::const_iterator it = args.begin(); - - if ( args.size() == 1 ) { - for ( ; it != args.end(); ++it ) { - string s = *it; - if ( !update && m_pkgDB->isInstalled( s ) ) { - cout << "package " << s << " is installed" << endl; - m_returnValue = PG_GENERAL_ERROR; - return; - } else if ( update && !m_pkgDB->isInstalled( s ) ) { - // can't upgrade - cout << "package " << s << " is not installed" << endl; - m_returnValue = PG_GENERAL_ERROR; - return; - } - } - } - - initRepo(); - - if (dependencies) { - // calc dependencies - InstallTransaction depTransaction( m_parser->otherArgs(), - m_repo, m_pkgDB, m_config ); - InstallTransaction::InstallResult result = - depTransaction.calcDependencies(); - - // TODO: code duplication with printDepends! - if ( result == InstallTransaction::CYCLIC_DEPEND ) { - cerr << "prt-get: cyclic dependencies found" << endl; - m_returnValue = PG_GENERAL_ERROR; - return; - } else if ( result == InstallTransaction::PACKAGE_NOT_FOUND ) { - warnPackageNotFound(depTransaction); - m_returnValue = PG_GENERAL_ERROR; - return; - } - const list<string>& depRef = depTransaction.dependencies(); - list<string>::const_iterator it = depRef.begin(); - - list<string> deps; - for (; it != depRef.end(); ++it) { - if (!m_pkgDB->isInstalled(*it)) { - deps.push_back(*it); - } - } - - InstallTransaction transaction( deps, m_repo, m_pkgDB, m_config ); - executeTransaction( transaction, update, group ); - } else { - InstallTransaction transaction( m_parser->otherArgs(), - m_repo, m_pkgDB, m_config ); - executeTransaction( transaction, update, group ); - } -} - -void PrtGet::executeTransaction( InstallTransaction& transaction, - bool update, bool group ) -{ - m_currentTransaction = &transaction; - - string command[] = { "install", "installed" }; - if ( update ) { - command[0] = "update"; - command[1] = "updated"; - } - - if ( m_parser->isTest() ) { - cout << "*** " << m_appName << ": test mode" << endl; - } - - InstallTransaction::InstallResult result = - transaction.install( m_parser, update, group ); - bool failed = false; - // TODO: use switch - if ( result == InstallTransaction::PACKAGE_NOT_FOUND ) { - cout << m_appName << ": package(s) not found" << endl; - } else if ( result == InstallTransaction::PKGMK_EXEC_ERROR ) { - cout << m_appName << " couldn't excecute pkgmk " - << "(or alternative command). " - << "Make sure it's installed properly" << endl; - } else if ( result == InstallTransaction::PKGMK_FAILURE ) { - cout << m_appName << ": error while " << command[0] << endl; - } else if ( result == InstallTransaction::NO_PACKAGE_GIVEN ) { - cout << m_appName << ": no package specified for " - << command[0] << endl; - } else if ( result == InstallTransaction::PKGADD_EXEC_ERROR ) { - cout << m_appName << " couldn't excecute pkgadd. " - << "Make sure it's installed properly" << endl; - } else if ( result == InstallTransaction::PKGDEST_ERROR ) { - cout << m_appName << ": error changing to directory PKGDEST " << endl; - failed = true; - } else if ( result == InstallTransaction::PKGADD_FAILURE ) { - cout << m_appName << ": error while pkgadding " << endl; - } else if ( result == InstallTransaction::LOG_DIR_FAILURE ) { - cout << m_appName << ": can't create log file directory " << endl; - } else if ( result == InstallTransaction::LOG_FILE_FAILURE ) { - cout << m_appName << ": can't create log file" << endl; - failed = true; - } else if ( result == InstallTransaction::NO_LOG_FILE ) { - cout << m_appName << ": no log file specified, but logging enabled" - << endl; - failed = true; - } else if ( result == InstallTransaction::CANT_LOCK_LOG_FILE ) { - cout << m_appName << ": can't create lock file for the log file. " - << "\nMaybe there's another instance of prt-get using the same " - << "file." - << "\nIf this is a stale not, please remove " - // TODO: file name of lock file - << endl; - failed = true; - } else if ( result != InstallTransaction::SUCCESS ) { - cout << m_appName << ": Unknown error " << result << endl; - failed = true; - } - - if ( !failed ) { - evaluateResult( transaction, update ); - if ( m_parser->isTest() ) { - cout << "\n*** " << m_appName << ": test mode end" << endl; - } - } else { - m_returnValue = PG_INSTALL_ERROR; - } - - m_currentTransaction = 0; -} - -/*! - print dependency listing - \param simpleListing Whether it should be in a simple format -*/ -void PrtGet::printDepends( bool simpleListing ) -{ - assertMinArgCount(1); - - initRepo(); - - InstallTransaction transaction( m_parser->otherArgs(), - m_repo, m_pkgDB, m_config ); - InstallTransaction::InstallResult result = transaction.calcDependencies(); - if ( result == InstallTransaction::CYCLIC_DEPEND ) { - cerr << "prt-get: cyclic dependencies found" << endl; - m_returnValue = PG_GENERAL_ERROR; - return; - } else if ( result == InstallTransaction::PACKAGE_NOT_FOUND ) { - warnPackageNotFound(transaction); - m_returnValue = PG_GENERAL_ERROR; - return; - } - - const list<string>& deps = transaction.dependencies(); - if ( simpleListing ) { - if ( deps.size() > 0 ) { - list<string>::const_iterator it = deps.begin(); - for ( ; it != deps.end(); ++it ) { - cout << *it << " "; - } - cout << endl; - } - } else { - if ( deps.size() > 0 ) { - cout << "-- dependencies ([i] = installed)" << endl; - list<string>::const_iterator it = deps.begin(); - - bool isAlias; - string provider; - for ( ; it != deps.end(); ++it ) { - isAlias = false; - if ( m_pkgDB->isInstalled( *it, true, &isAlias, &provider ) ) { - cout << "[i] "; - } else { - cout << "[ ] "; - } - if (m_parser->printPath() > 0) { - cout << m_repo->getPackage(*it)->path() << "/"; - } - cout << *it; - - if (isAlias) { - cout << " (provided by " << provider << ")"; - } - cout << endl; - } - } else { - cout << "No dependencies found" << endl; - } - - const list< pair<string, string> >& missing = transaction.missing(); - if ( missing.size() ) { - list< pair<string, string> >::const_iterator mit = missing.begin(); - cout << endl << "-- missing packages" << endl; - for ( ; mit != missing.end(); ++mit ) { - cout << mit->first; - if ( !mit->second.empty() ) { - cout << " from " << mit->second; - } - cout << endl; - } - } - } -} - -/*! read the config file */ -void PrtGet::readConfig() -{ - string fName = CONF_FILE; - if ( m_parser->isAlternateConfigGiven() ) { - fName = m_parser->alternateConfigFile(); - } - - if ( m_config ) { - return; // don't initialize twice - } - m_config = new Configuration( fName, m_parser ); - - if (!m_parser->noStdConfig()) { - if ( !m_config->parse() ) { - cerr << "Can't read config file " << fName - << ". Exiting" << endl; - m_returnValue = PG_GENERAL_ERROR; - return; - } - } - - const list< pair<char*, ArgParser::ConfigArgType> >& configData = - m_parser->configData(); - list< pair<char*, ArgParser::ConfigArgType> >::const_iterator it = - configData.begin(); - for (; it != configData.end(); ++it) { - m_config->addConfig(it->first, - it->second == ArgParser::CONFIG_SET, - it->second == ArgParser::CONFIG_PREPEND); - } -} - -/*! - print a simple list of port which are installed in a different version - than they are in the repository -*/ -void PrtGet::printQuickDiff() -{ - initRepo(); - - const map<string, string>& installed = m_pkgDB->installedPackages(); - map<string, string>::const_iterator it = installed.begin(); - const Package* p = 0; - for ( ; it != installed.end(); ++it ) { - if ( !m_locker.isLocked( it->first ) ) { - p = m_repo->getPackage( it->first ); - if ( p ) { - if (greaterThan(p->version() + "-" + p->release(), - it->second)) { - cout << it->first.c_str() << " "; - } - } - } - } - cout << endl; -} - - -/*! - print an overview of port which are installed in a different version - than they are in the repository -*/ -void PrtGet::printDiff() -{ - initRepo(); - map< string, string > l; - if ( m_parser->otherArgs().size() > 0 ) { - expandWildcardsPkgDB( m_parser->otherArgs(), l ); - } - if ( l.size() < m_parser->otherArgs().size() ) { - cerr << "prt-get: no matching installed packages found" << endl; - m_returnValue = PG_GENERAL_ERROR; - return; - } - -#if 0 - // const list<char*>& l = m_parser->otherArgs(); - // list<char*>::const_iterator checkIt = l.begin(); - - // check whether ports to be checked are installed - list< string >::iterator checkIt = l.begin(); - for ( ; checkIt != l.end(); ++checkIt ) { - if ( ! m_pkgDB->isInstalled( *checkIt ) ) { - cerr << "Port not installed: " << *checkIt << endl; - m_returnValue = PG_GENERAL_ERROR; - return; - } - } -#endif - - const map<string, string>& installed = m_pkgDB->installedPackages(); - map<string, string>::const_iterator it = installed.begin(); - const Package* p = 0; - int count = 0; - for ( ; it != installed.end(); ++it ) { - - p = m_repo->getPackage( it->first ); - if ( p ) { - if ( l.size() && l.find( it->first ) == l.end() ) { - continue; - } - - if ( greaterThan( p->version() + "-" + p->release(), - it->second ) ) { - if ( !m_locker.isLocked( it->first ) || - m_parser->otherArgs().size() > 0 || - m_parser->all() ) { - - - ++count; - if ( count == 1 ) { - cout << "Differences between installed packages " - << "and ports tree:\n" << endl; - cout.setf( ios::left, ios::adjustfield ); - cout.width( 20 ); - cout.fill( ' ' ); - cout << "Ports"; - cout.width( 20 ); - cout.fill( ' ' ); - cout << "Installed"; - cout.width( 20 ); - cout.fill( ' ' ); - cout << "Available in the ports tree" << endl << endl; - } - cout.setf( ios::left, ios::adjustfield ); - cout.width( 20 ); - cout.fill( ' ' ); - cout << it->first.c_str(); - - cout.width( 20 ); - cout.fill( ' ' ); - cout << it->second.c_str(); - - string locked = ""; - if ( m_locker.isLocked( it->first ) ) { - locked = "locked"; - } - cout.width( 20 ); - cout.fill( ' ' ); - cout << (p->version()+"-"+p->release()).c_str() - << locked << endl; - } - } - } - } - - if ( count == 0 ) { - cout << "No differences found" << endl; - } -} - -/*! print path to a port */ -void PrtGet::printPath() -{ - assertExactArgCount(1); - - initRepo(); - string arg = *(m_parser->otherArgs().begin()); - const Package* p = m_repo->getPackage( arg ); - if ( p ) { - cout << p->path() << "/" << p->name() << endl; - } else { - cerr << "Package '" << arg << "' not found" << endl; - m_returnValue = PG_GENERAL_ERROR; - return; - } -} - - -/*! helper method to print the result of an InstallTransaction */ -void PrtGet::evaluateResult( InstallTransaction& transaction, - bool update, - bool interrupted ) -{ - int errors = 0; - - // TODO: this is a duplicate, it's in install() as well - string command[] = { "install", "installed" }; - if ( update ) { - command[0] = "update"; - command[1] = "updated"; - } - - const list<string>& ignored = transaction.ignoredPackages(); - if ( ignored.size() ) { - cout << endl << "-- Packages ignored" << endl; - list<string>::const_iterator iit = ignored.begin(); - - for ( ; iit != ignored.end(); ++iit ) { - cout << *iit << endl; - } - } - - - const list< pair<string, string> >& missing = transaction.missing(); - if ( missing.size() ) { - ++errors; - cout << endl << "-- Packages not found" << endl; - list< pair<string, string> >::const_iterator mit = missing.begin(); - - for ( ; mit != missing.end(); ++mit ) { - cout << mit->first; - if ( mit->second != "" ) { - cout << " from " << mit->second; - } - cout << endl; - } - } - - const list< pair<string, InstallTransaction::InstallInfo> >& error = - transaction.installError(); - if ( error.size() ) { - ++errors; - cout << endl << "-- Packages where " - << command[0] << " failed" << endl; - list< pair<string, InstallTransaction::InstallInfo> >::const_iterator - eit = error.begin(); - - for ( ; eit != error.end(); ++eit ) { - cout << eit->first; - reportPrePost(eit->second); - cout << endl; - } - } - - const list<string>& already = transaction.alreadyInstalledPackages(); - if ( already.size() ) { - cout << endl << "-- Packages installed before this run (ignored)" - << endl; - list<string>::const_iterator ait = already.begin(); - - bool isAlias; - string provider; - for ( ; ait != already.end(); ++ait ) { - isAlias = false; - cout << *ait; - m_pkgDB->isInstalled(*ait, true, &isAlias, &provider); - - if (isAlias) { - cout << " (provided by " << provider << ")"; - } - cout << endl; - } - } - - - const list< pair<string, InstallTransaction::InstallInfo> >& inst = - transaction.installedPackages(); - if ( inst.size() ) { - cout << endl << "-- Packages " << command[1] << endl; - list< pair<string, InstallTransaction::InstallInfo> >::const_iterator - iit = inst.begin(); - - bool atLeastOnePackageHasReadme = false; - - for ( ; iit != inst.end(); ++iit ) { - cout << iit->first; - if ( iit->second.hasReadme ) { - if ( m_config->readmeMode() == - Configuration::COMPACT_README ) { - cout << " (README)"; - } - atLeastOnePackageHasReadme = true; - } - reportPrePost(iit->second); - cout << endl; - } - - // readme's - if ( atLeastOnePackageHasReadme ) { - if ( m_config->readmeMode() == Configuration::VERBOSE_README ) { - cout << endl << "-- " << command[1] - << " packages with README files:" << endl; - iit = inst.begin(); - for ( ; iit != inst.end(); ++iit ) { - if ( iit->second.hasReadme ) { - cout << iit->first; - cout << endl; - } - } - } - } - - cout << endl; - } - - if ( errors == 0 && !interrupted ) { - cout << "prt-get: " << command[1] << " successfully" << endl; - } else { - m_returnValue = PG_PARTIAL_INSTALL_ERROR; - } -} - -void PrtGet::reportPrePost(const InstallTransaction::InstallInfo& info) { - if (info.preState != InstallTransaction::NONEXISTENT) { - string preString = "failed"; - if (info.preState == InstallTransaction::EXEC_SUCCESS) { - preString = "ok"; - } - cout << " [pre: " << preString << "]"; - } - if ( info.postState != InstallTransaction::NONEXISTENT) { - string postString = "failed"; - if (info.postState == InstallTransaction::EXEC_SUCCESS){ - postString = "ok"; - } - cout << " [post: " << postString << "]"; - } - -} - -/*! create a cache */ -void PrtGet::createCache() -{ - if ( m_parser->wasCalledAsPrtCached() ) { - cerr << m_appName << ": Can't create cache from cache. " - << "Use prt-get instead" << endl; - m_returnValue = PG_GENERAL_ERROR; - return; - } - - initRepo(); - if (m_config->cacheFile() != "") { - m_cacheFile = m_config->cacheFile(); - } - - Repository::WriteResult result = m_repo->writeCache( m_cacheFile ); - if ( result == Repository::DIR_ERR ) { - cerr << "Can't create cache directory " << m_cacheFile << endl; - m_returnValue = PG_GENERAL_ERROR; - return; - } - if ( result == Repository::FILE_ERR ) { - cerr << "Can't open cache file " << m_cacheFile << " for writing" - << endl; - m_returnValue = PG_GENERAL_ERROR; - return; - } - -} - -/*! - \return true if v1 is greater than v2 - */ -bool PrtGet::greaterThan( const string& v1, const string& v2 ) -{ - using namespace VersionComparator; - - if (v1 == v2) { - return false; - } - - - if (m_parser->preferHigher() || - (m_config->preferHigher() && !m_parser->strictDiff())) { - - COMP_RESULT result = compareVersions(v1, v2); - return (result == GREATER); - } - - return v1 != v2; -} - -int PrtGet::returnValue() const -{ - return m_returnValue; -} - - -/*! print a list of packages available in the repository */ -void PrtGet::printf() -{ - map<string, string> sortedOutput; - - assertExactArgCount(1); - - initRepo(); - string filter = "*"; - if ( m_parser->hasFilter() ) { - filter = m_parser->filter(); - } - list<Package*> packages; - m_repo->getMatchingPackages( filter, packages ); - list<Package*>::const_iterator it = packages.begin(); - - const string formatString = *(m_parser->otherArgs().begin()); - string sortString = - StringHelper::stripWhiteSpace( m_parser->sortArgs() ); - sortString += "%n"; // make it unique - - for ( ; it != packages.end(); ++it ) { - string output = formatString; - string sortkey = sortString; - - const Package* p = *it; - - StringHelper::replaceAll( output, "%n", p->name() ); - StringHelper::replaceAll( output, "%u", p->url() ); - StringHelper::replaceAll( output, "%p", p->path() ); - StringHelper::replaceAll( output, "%v", p->version() ); - StringHelper::replaceAll( output, "%r", p->release() ); - StringHelper::replaceAll( output, "%d", p->description() ); - StringHelper::replaceAll( output, "%e", p->dependencies() ); - StringHelper::replaceAll( output, "%P", p->packager() ); - StringHelper::replaceAll( output, "%M", p->maintainer() ); - - StringHelper::replaceAll( output, "\\t", "\t" ); - StringHelper::replaceAll( output, "\\n", "\n" ); - - StringHelper::replaceAll( sortkey, "%n", p->name() ); - StringHelper::replaceAll( sortkey, "%u", p->url() ); - StringHelper::replaceAll( sortkey, "%p", p->path() ); - StringHelper::replaceAll( sortkey, "%v", p->version() ); - StringHelper::replaceAll( sortkey, "%r", p->release() ); - StringHelper::replaceAll( sortkey, "%d", p->description() ); - StringHelper::replaceAll( sortkey, "%e", p->dependencies() ); - StringHelper::replaceAll( sortkey, "%P", p->packager() ); - StringHelper::replaceAll( sortkey, "%M", p->maintainer() ); - - string isInst = "no"; - if ( m_pkgDB->isInstalled( p->name() ) ) { - string ip = p->name() + "-" + - m_pkgDB->getPackageVersion( p->name() ); - if ( ip == p->name() + "-" + p->version() + "-" + p->release() ) { - isInst = "yes"; - } else { - isInst = "diff"; - } - } - StringHelper::replaceAll( output, "%i", isInst ); - StringHelper::replaceAll( sortkey, "%i", isInst ); - - string isLocked = m_locker.isLocked( p->name() ) ? "yes" : "no"; - StringHelper::replaceAll( output, "%l", isLocked ); - StringHelper::replaceAll( sortkey, "%l", isLocked ); - - string hasReadme = p->hasReadme() ? "yes" : "no"; - StringHelper::replaceAll( output, "%R", hasReadme ); - StringHelper::replaceAll( sortkey, "%R", hasReadme ); - - string hasPreInstall = p->hasPreInstall() ? "yes" : "no"; - StringHelper::replaceAll( output, "%E", hasPreInstall ); - StringHelper::replaceAll( sortkey, "%E", hasPreInstall ); - - string hasPostInstall = p->hasPostInstall() ? "yes" : "no"; - StringHelper::replaceAll( output, "%O", hasPostInstall ); - StringHelper::replaceAll( sortkey, "%O", hasPostInstall ); - - sortedOutput[sortkey] = output; - } - - map<string, string>::iterator sortIt = sortedOutput.begin(); - for ( ; sortIt != sortedOutput.end(); ++sortIt ) { - if ( StringHelper::stripWhiteSpace(sortIt->second).length() > 0) { - cout << sortIt->second; - } - } -} - -void PrtGet::readme() -{ - assertExactArgCount(1); - - initRepo(); - string arg = *(m_parser->otherArgs().begin()); - const Package* p = m_repo->getPackage( arg ); - if ( p ) { - string file = p->path() + "/" + p->name() + "/README"; - FILE* fp = fopen( file.c_str(), "r" ); - char buf[255]; - if ( fp ) { - while ( fgets( buf, 255, fp ) ) { - cout << buf; - } - fclose( fp ); - } - - } else { - cerr << "Package '" << arg << "' not found" << endl; - m_returnValue = PG_GENERAL_ERROR; - return; - } -} - - -void PrtGet::printDependendent() -{ - assertExactArgCount(1); - - initRepo(); - string arg = *(m_parser->otherArgs().begin()); - map<string, Package*>::const_iterator it = m_repo->packages().begin(); - - set<const Package*> dependent; - for ( ; it != m_repo->packages().end(); ++it ) { - - // TODO: is the following line needed? - const Package* p = it->second; - if ( p && p->dependencies().find( arg ) != string::npos ) { - list<string> tokens; - StringHelper::split( p->dependencies(), ',', tokens ); - list<string>::iterator it = find( tokens.begin(), - tokens.end(), - arg ); - if ( it != tokens.end() ) { - dependent.insert( p ); - } - } - } - - // prepared for recursive search - set<const Package*>::iterator it2 = dependent.begin(); - for ( ; it2 != dependent.end(); ++it2 ) { - const Package* p = *it2; - if ( m_parser->all() || m_pkgDB->isInstalled( p->name() ) ) { - cout << p->name(); - if ( m_parser->verbose() > 0 ) { - cout << " " << p->version() << "-" << p->release(); - } - if ( m_parser->verbose() > 1 ) { - cout << ": " << p->description(); - } - - cout << endl; - } - } -} - -void PrtGet::warnPackageNotFound(InstallTransaction& transaction) -{ - cerr << "The package '"; - cerr << transaction.missing().begin()->first; - cerr << "' could not be found: " << endl; -} - -void PrtGet::sysup() -{ - // TODO: refactor getDifferentPackages from diff/quickdiff - initRepo(); - - list<string>* target; - list<string> packagesToUpdate; - list<string> sortedList; - - const map<string, string>& installed = m_pkgDB->installedPackages(); - map<string, string>::const_iterator it = installed.begin(); - const Package* p = 0; - for ( ; it != installed.end(); ++it ) { - if ( !m_locker.isLocked( it->first ) ) { - p = m_repo->getPackage( it->first ); - if ( p ) { - if ( greaterThan( p->version() + "-" + p->release(), - it->second ) ) { - packagesToUpdate.push_back( it->first ); - } - } - } - } - - if ( packagesToUpdate.empty() ) { - cout << "System is up to date" << endl; - return; - } - - if ( m_parser->nodeps() ) { - target = &packagesToUpdate; - } else { - // sort by dependency - - // TODO: refactor code from printDepends - InstallTransaction depTrans( packagesToUpdate, - m_repo, m_pkgDB, m_config ); - InstallTransaction::InstallResult result = depTrans.calcDependencies(); - if ( result == InstallTransaction::CYCLIC_DEPEND ) { - cerr << "cyclic dependencies" << endl; - m_returnValue = PG_GENERAL_ERROR; - return; - } else if ( result == InstallTransaction::PACKAGE_NOT_FOUND ) { - warnPackageNotFound(depTrans); - m_returnValue = PG_GENERAL_ERROR; - return; - } - - const list<string>& deps = depTrans.dependencies(); - if ( deps.size() > 0 ) { - list<string>::const_iterator it = deps.begin(); - for ( ; it != deps.end(); ++it ) { - if ( find( packagesToUpdate.begin(), - packagesToUpdate.end(), *it ) != - packagesToUpdate.end() ) {; - sortedList.push_back( *it ); - } - } - } - - target = &sortedList; - } - - InstallTransaction transaction( *target, - m_repo, m_pkgDB, m_config ); - executeTransaction( transaction, true, false ); -} - - -void PrtGet::expandWildcardsPkgDB( const list<char*>& in, - map<string, string>& target ) -{ - list<char*>::const_iterator it = in.begin(); - for ( ; it != in.end(); ++it ) { - map<string, string> l; - m_pkgDB->getMatchingPackages( *it, l, m_useRegex ); - map<string, string>::iterator iit = l.begin(); - for ( ; iit != l.end(); ++iit ) { - target[iit->first] = iit->second; - } - } -} - -void PrtGet::expandWildcardsRepo( const list<char*>& in, list<string>& target ) -{ - list<char*>::const_iterator it = in.begin(); - - for ( ; it != in.end(); ++it ) { - list<Package*> l; - m_repo->getMatchingPackages( *it, l ); - list<Package*>::iterator iit = l.begin(); - for ( ; iit != l.end(); ++iit ) { - target.push_back( (*iit)->name() ); - } - } -} - - -void PrtGet::current() -{ - assertExactArgCount(1); - - const map<string, string>& installed = m_pkgDB->installedPackages(); - map<string, string>::const_iterator it = installed.begin(); - string search = *(m_parser->otherArgs().begin()); - - for ( ; it != installed.end(); ++it ) { - if ( it->first == search ) { - cout << it->second.c_str() << endl; - return; - } - } - - cout << "Package " << search << " not installed" << endl; - m_returnValue = 1; -} - -SignalHandler::HandlerResult PrtGet::handleSignal( int signal ) -{ - // TODO: second argument could also be true: - // TODO: kill installtransaction - - cout << "prt-get: interrupted" << endl; - if ( m_currentTransaction ) { - evaluateResult( *m_currentTransaction, false, true ); - } -} - -/*! - find files matching a pattern in repository - - \sa Repository::getMatchingPackages() -*/ -void PrtGet::fsearch() -{ - assertMinArgCount(1); - - string arg = "*"; - if ( m_parser->otherArgs().size() == 1 ) { - arg = *(m_parser->otherArgs().begin()); - } - - initRepo(); - const map<string, Package*>& packages = m_repo->packages(); - map<string, Package*>::const_iterator it = packages.begin(); - bool first = true; - for ( ; it != packages.end(); ++it ) { - list<string> matches; - string fp = - it->second->path() + "/" + - it->second->name() + "/" + ".footprint"; - if ( File::grep( fp, arg, matches, - m_parser->fullPath(), - m_useRegex)) { - if ( matches.size() > 0 ) { - if ( first ) { - first = false; - } else { - cout << endl; - } - cout << "Found in " - << it->second->path() << "/" - << it->first << ":" << endl; - list<string>::iterator it = matches.begin(); - for ( ; it != matches.end(); ++it ) { - cout << " " << *it << endl; - } - } - } - } - - if ( first ) { - m_returnValue = PG_GENERAL_ERROR; - } -} - -void PrtGet::setLock( bool lock ) -{ - assertMinArgCount(1); - - if ( lock ) { - initRepo(); - } - - const list<char*>& args = m_parser->otherArgs(); - list<char*>::const_iterator it = args.begin(); - for ( ; it != args.end(); ++it ) { - if ( lock ) { - if (m_pkgDB->isInstalled( *it )) { - if (!m_locker.lock( *it )) { - cerr << "Already locked: " << *it << endl; - m_returnValue = PG_GENERAL_ERROR; - } - } else { - cerr << "Package '" << *it << "' not found" << endl; - m_returnValue = PG_GENERAL_ERROR; - return; - } - - } else { - if ( !m_locker.unlock( *it ) ) { - cerr << "Not locked previously: " << *it << endl; - m_returnValue = PG_GENERAL_ERROR; - return; - } - } - } - - if (!m_locker.store()) { - cerr << "Failed to write lock data" << endl; - m_returnValue = PG_GENERAL_ERROR; - } -} - -void PrtGet::listLocked() -{ - // shares some code with listInstalled - if ( m_locker.openFailed() ) { - cerr << "Failed to open lock data file" << endl; - m_returnValue = PG_GENERAL_ERROR; - } - - const map<string, string>& l = m_pkgDB->installedPackages(); - - if ( l.empty() ) { - return; - } - - if ( m_parser->verbose() > 1 ) { - // warning: will slow down the process... - initRepo(); - } - - - const vector<string>& lockedPackages = m_locker.lockedPackages(); - vector<string>::const_iterator it = lockedPackages.begin(); - for ( ; it != lockedPackages.end(); ++it ) { - cout << *it; - if ( m_parser->verbose() > 0 ) { - cout << " " << m_pkgDB->getPackageVersion(*it); - } - if ( m_parser->verbose() > 1 ) { - const Package* p = m_repo->getPackage( *it ); - if ( p ) { - cout << ": " << p->description(); - } - } - - cout << endl; - - } -} - - -void PrtGet::edit() -{ - assertMinArgCount(1); - assertMaxArgCount(2); - - char* editor = getenv("EDITOR"); - if (editor) { - initRepo(); - - list<char*>::const_iterator it = m_parser->otherArgs().begin(); - string arg = *it; - const Package* p = m_repo->getPackage( arg ); - if ( p ) { - string fileName = "Pkgfile"; - if (++it != m_parser->otherArgs().end()) { - fileName = *it; - } - string file = p->path() + "/" + p->name() + "/" + fileName; - Process proc(editor, file); - m_returnValue = proc.executeShell(); - if (m_returnValue) { - cerr << "error while execution the editor" << endl; - } - } else { - cerr << "Package '" << arg << "' not found" << endl; - m_returnValue = PG_GENERAL_ERROR; - return; - } - - } else { - cerr << "Environment variable EDITOR not set" << endl;; - m_returnValue = PG_GENERAL_ERROR; - return; - } - -} - -void PrtGet::ls() -{ - assertExactArgCount(1); - - initRepo(); - - list<char*>::const_iterator it = m_parser->otherArgs().begin(); - string arg = *it; - const Package* p = m_repo->getPackage( arg ); - if ( p ) { - string dirname = p->path() + "/" + p->name(); - DIR* dir = opendir(dirname.c_str()); - struct dirent* entry; - vector<string> files; - while (entry = readdir(dir)) { - string dName = entry->d_name; - if (dName != "." && dName != "..") { - files.push_back(dName); - } - } - closedir(dir); - - sort(files.begin(), files.end()); - vector<string>::iterator fit = files.begin(); - for (; fit != files.end(); ++fit) { - if (m_parser->printPath()) { - cout << p->path() + "/" +p->name() + "/"; - } - cout << *fit << endl; - } - } else { - cerr << "Package '" << arg << "' not found" << endl; - m_returnValue = PG_GENERAL_ERROR; - return; - } -} - -void PrtGet::cat() -{ - assertMinArgCount(1); - assertMaxArgCount(2); - - initRepo(); - - list<char*>::const_iterator it = m_parser->otherArgs().begin(); - string arg = *it; - const Package* p = m_repo->getPackage( arg ); - if ( p ) { - string fileName = "Pkgfile"; - if (++it != m_parser->otherArgs().end()) { - fileName = *it; - } - string file = p->path() + "/" + p->name() + "/" + fileName; - FILE* fp = fopen( file.c_str(), "r" ); - char buf[255]; - if ( fp ) { - while ( fgets( buf, 255, fp ) ) { - cout << buf; - } - fclose( fp ); - } else { - cerr << "File '" << *it << "' not found" << endl; - m_returnValue = PG_GENERAL_ERROR; - return; - } - - } else { - cerr << "Package '" << arg << "' not found" << endl; - m_returnValue = PG_GENERAL_ERROR; - return; - } -} - -void PrtGet::remove() -{ - assertMinArgCount(1); - - list<string> removed; - list<string> failed; - list<string> notInstalled; - - if ( m_parser->isTest() ) { - cout << "*** " << m_appName << ": test mode" << endl; - } - - string command = InstallTransaction::PKGRM_DEFAULT_COMMAND; - if (m_config->removeCommand() != "") { - command = m_config->removeCommand(); - } - - const list<char*>& args = m_parser->otherArgs(); - list<char*>::const_iterator it = args.begin(); - for ( ; it != args.end(); ++it ) { - if (m_pkgDB->isInstalled(*it)) { - // TODO: prettify - string args = ""; - if (m_parser->installRoot() != "") { - args = "-r " + m_parser->installRoot() + " "; - } - args += (m_parser->pkgrmArgs() + " " + *it); - - Process proc(command, args); - if (m_parser->isTest() || proc.executeShell() == 0) { - removed.push_back(*it); - if (m_locker.isLocked(*it)) { - m_locker.unlock(*it); - m_locker.store(); - } - } else { - failed.push_back(*it); - } - } else { - notInstalled.push_back(*it); - } - } - - if ( removed.size() ) { - cout << endl << "-- Packages removed" - << endl; - list<string>::const_iterator it = removed.begin(); - - for ( ; it != removed.end(); ++it ) { - cout << *it << endl; - } - } - - if ( failed.size() ) { - cout << endl << "-- Packages where removal failed" - << endl; - list<string>::const_iterator it = failed.begin(); - - for ( ; it != failed.end(); ++it ) { - cout << *it << endl; - } - } - - if ( notInstalled.size() ) { - cout << endl << "-- Packages which were not installed" - << endl; - list<string>::const_iterator it = notInstalled.begin(); - - for ( ; it != notInstalled.end(); ++it ) { - cout << *it << endl; - } - } - - if ( m_parser->isTest() ) { - cout << "*** " << m_appName << ": test mode end" << endl; - } - - - -} - -void PrtGet::assertMaxArgCount(int count) -{ - if ( m_parser->otherArgs().size() > count ) { - argCountFailure(count, "at most"); - } -} - -void PrtGet::assertExactArgCount(int count) -{ - if ( m_parser->otherArgs().size() != count ) { - argCountFailure(count, "exactly"); - } -} - -void PrtGet::assertMinArgCount(int count) -{ - if ( m_parser->otherArgs().size() < count ) { - argCountFailure(count, "at least"); - } -} - -void PrtGet::argCountFailure(int count, const string& specifier) -{ - cerr << m_appName << " " - << m_parser->commandName() << " takes " << specifier << " " - << count << (count > 1 ? " arguments" : " argument") << endl; - exit(PG_ARG_ERROR); -} - - -void PrtGet::printDependTree() -{ - assertExactArgCount(1); - - initRepo(); - - list<char*>::const_iterator it = m_parser->otherArgs().begin(); - string arg = *it; - const Package* p = m_repo->getPackage( arg ); - if (!p) { - cerr << "Package '" << arg << "' not found" << endl; - m_returnValue = PG_GENERAL_ERROR; - return; - } - - if (p->dependencies().length() > 0) { - - cout << "-- dependencies ([i] = installed"; - if (!m_parser->all()) { - cout << ", '-->' = seen before"; - } - cout << ")" << endl; - if ( m_pkgDB->isInstalled( *it ) ) { - cout << "[i] "; - } else { - cout << "[ ] "; - } - cout << p->name() << endl; - printDepsLevel(2, p); - } - -} - -void PrtGet::printDepsLevel(int indent, const Package* package) -{ - static map<string, bool> shownMap; - - list<string> deps; - StringHelper::split(package->dependencies(), ',', deps); - list<string>::iterator it = deps.begin(); - bool isAlias = false; - string aliasName = ""; - - for (; it != deps.end(); ++it) { - if ( m_pkgDB->isInstalled( *it, true, &isAlias, &aliasName ) ) { - cout << "[i] "; - } else { - cout << "[ ] "; - } - for (int i = 0; i < indent; ++i) { - cout << " "; - } - cout << *it; - if (isAlias) { - cout << " (provided by " << aliasName << ")"; - } - const Package* p = m_repo->getPackage( *it ); - if (p) { - if (p->dependencies().length() > 0) { - map<string, bool>::iterator shownIt = shownMap.find(*it); - if (shownIt != shownMap.end()) { - cout << " -->" << endl;; - } else { - cout << endl; - printDepsLevel(indent+2, p); - if (!m_parser->all()) { - shownMap[*it] = true; - } - } - } else { - cout << endl; - } - } else { - cout << " (not found in ports tree)" << endl; - } - } -} - -void PrtGet::dumpConfig() -{ - - cout.setf( ios::left, ios::adjustfield ); - cout.width( 20 ); - cout.fill( ' ' ); - cout << "Alias file: " << PkgDB::ALIAS_STORE << endl; - - cout.setf( ios::left, ios::adjustfield ); - cout.width( 20 ); - cout.fill( ' ' ); - cout << "Ext. dep. file: " - << Repository::EXTERNAL_DEPENDENCY_FILE << endl; - - - if (!m_parser->noStdConfig()) { - string fName = CONF_FILE; - if ( m_parser->isAlternateConfigGiven() ) { - fName = m_parser->alternateConfigFile(); - } - cout.setf( ios::left, ios::adjustfield ); - cout.width( 20 ); - cout.fill( ' ' ); - cout << "Configuration file: " << fName << endl; - } - - if (m_config->cacheFile() != "") { - cout.setf( ios::left, ios::adjustfield ); - cout.width( 20 ); - cout.fill( ' ' ); - cout << "Cache file: " << m_config->cacheFile() << endl; - } - if (m_config->makeCommand() != "") { - cout.setf( ios::left, ios::adjustfield ); - cout.width( 20 ); - cout.fill( ' ' ); - cout << "Make command file: " << m_config->makeCommand() << endl; - } - if (m_config->addCommand() != "") { - cout.setf( ios::left, ios::adjustfield ); - cout.width( 20 ); - cout.fill( ' ' ); - cout << "Add command: " << m_config->addCommand() << endl; - } - if (m_config->removeCommand() != "") { - cout.setf( ios::left, ios::adjustfield ); - cout.width( 20 ); - cout.fill( ' ' ); - cout << "Remove command: " << m_config->removeCommand() << endl; - } - if (m_config->runscriptCommand() != "") { - cout.setf( ios::left, ios::adjustfield ); - cout.width( 20 ); - cout.fill( ' ' ); - cout << "Runscript command: " << m_config->runscriptCommand() << endl; - } - - cout.setf( ios::left, ios::adjustfield ); - cout.width( 20 ); - cout.fill( ' ' ); - cout << "Run scripts: " <<(m_config->runScripts() ? "yes" : "no" ) - << endl; - - cout.setf( ios::left, ios::adjustfield ); - cout.width( 20 ); - cout.fill( ' ' ); - cout << "Keep higher version:" <<(m_config->preferHigher() ? "yes" : "no" ) - << endl; - - cout.setf( ios::left, ios::adjustfield ); - cout.width( 20 ); - cout.fill( ' ' ); - cout << "Readme mode: "; - switch (m_config->readmeMode()) { - case Configuration::VERBOSE_README: - cout << "verbose"; - break; - case Configuration::COMPACT_README: - cout << "compact"; - break; - case Configuration::NO_README: - cout << "off"; - break; - } - cout << endl; - - cout << endl; - - if (m_config->logFilePattern() != "") { - cout.setf( ios::left, ios::adjustfield ); - cout.width( 20 ); - cout.fill( ' ' ); - cout << "Log file: " << m_config->logFilePattern() << endl; - } - cout.setf( ios::left, ios::adjustfield ); - cout.width( 20 ); - cout.fill( ' ' ); - cout << " Write log: " << (m_config->writeLog() ? "yes" : "no" ) << endl; - cout.setf( ios::left, ios::adjustfield ); - cout.width( 20 ); - cout.fill( ' ' ); - cout << " Append log: " <<(m_config->appendLog() ? "yes" : "no" ) << endl; - - - - cout << endl; - list< pair<string, string> >::const_iterator it = - m_config->rootList().begin(); - cout << "Port " - << (m_config->rootList().size() == 1 ? "directory" : "directories") - << ": " << endl; - for (; it != m_config->rootList().end(); ++it) { - cout << " " << it->first; - if (it->second != "") { - cout << " (" << it->second << ")"; - } - cout << endl; - } -} Copied: tools/prt-get/branches/prt-get-5.13/src/prtget.cpp (from rev 1838, tools/prt-get/trunk/src/prtget.cpp) =================================================================== --- tools/prt-get/branches/prt-get-5.13/src/prtget.cpp (rev 0) +++ tools/prt-get/branches/prt-get-5.13/src/prtget.cpp 2006-09-08 18:05:30 UTC (rev 1849) @@ -0,0 +1,2125 @@ +//////////////////////////////////////////////////////////////////////// +// FILE: prtget.cpp +// AUTHOR: Johannes Winkelmann, jw@tks6.net +// COPYRIGHT: (c) 2002 by Johannes Winkelmann +// --------------------------------------------------------------------- +// 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. +//////////////////////////////////////////////////////////////////////// + +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#include <iostream> +#include <algorithm> +#include <set> +#include <iomanip> +#include <cstdio> +#include <cassert> +using namespace std; + +#include <sys/types.h> +#include <sys/stat.h> +#include <dirent.h> +#include <unistd.h> + +#include "prtget.h" +#include "repository.h" +#include "argparser.h" +#include "installtransaction.h" +#include "configuration.h" + +#include "stringhelper.h" +#include "versioncomparator.h" +#include "file.h" +#include "process.h" +#include "datafileparser.h" +using namespace StringHelper; + + +using VersionComparator::COMP_RESULT; +using VersionComparator::GREATER; +using VersionComparator::LESS; +using VersionComparator::EQUAL; +using VersionComparator::UNDEFINED; + +const string PrtGet::CONF_FILE = SYSCONFDIR"/prt-get.conf"; +const string PrtGet::DEFAULT_CACHE_FILE = LOCALSTATEDIR"/lib/pkg/prt-get.cache"; + +/*! + Create a PrtGet object + \param parser the argument parser to be used +*/ +PrtGet::PrtGet( const ArgParser* parser ) + : m_repo( 0 ), + m_config( 0 ), + m_parser( parser ), + m_cacheFile( DEFAULT_CACHE_FILE ), + m_returnValue( PG_OK ), + m_currentTransaction( 0 ) +{ + if ( m_parser->wasCalledAsPrtCached() ) { + m_appName = "prt-cache"; + } else { + m_appName = "prt-get"; + } + + + m_pkgDB = new PkgDB(m_parser->installRoot()); + readConfig(); + + m_useRegex = m_config->useRegex() || m_parser->useRegex(); +} + +/*! destruct PrtGet object */ +PrtGet::~PrtGet() +{ + if ( m_config ) { + delete m_config; + } + if ( m_repo ) { + delete m_repo; + } + + delete m_pkgDB; +} + + +/*! print version and exit */ +void PrtGet::printVersion() +{ + cout << m_appName << " " << VERSION + << " by Johannes Winkelmann, jw@tks6.net" << endl; +} + +/*! print version, usage and exit */ +void PrtGet::printUsage() +{ + printVersion(); + cout << "Usage: " << m_appName << " <command> [options]" << endl; + + cout << "where commands are:" << endl; + + cout << "\nINFORMATION" << endl; + cout << " help show this help" << endl; + cout << " version show the current version" << endl; + cout << " list [<filter>] show a list of available ports" + << endl; + cout << " printf <format> print formatted list of available" + << " ports" + << endl; + cout << " listinst [<filter>] show a list of installed ports" + << endl; + cout << " listorphans list of ports with no " + << "packages depending on them" << endl; + cout << " info <port> show info about a port" << endl; + cout << " path <port> show path of a port" << endl; + cout << " readme <port> show a port's readme file " + << "(if it exists)" << endl; + cout << " dup Find duplicate ports" << endl; + cout << " isinst <port1 port2...> print whether ports are installed" + << endl; + cout << " current <port> print installed version of port" + << endl; + + cout << "\nDIFFERENCES / CHECK FOR UPDATES" << endl; + cout << " diff <port1 port2...> list outdated packages (or check " + << "args for change)" << endl; + cout << " quickdiff same as diff but simple format" + << endl; + cout << " where opt can be:" << endl; + cout << " --all display locked ports too" + << endl; + cout << " --prefer-higher prefer higher installed " + << "versions over lower ports" + << endl; + cout << " --strict-diff override prefer higher " + << "configuration setting" + << endl; + + cout << "\nDEPENDENCIES" << endl; + cout << " depends <port1 port2...> show dependencies for these ports" + << endl; + cout << " quickdep <port1 port2...> same as 'depends' but simple format" + << endl; + cout << " deptree <port> show dependencies tree for <port>" + << endl; + cout << " dependent [opt] <port> show installed packages which " + << "depend on 'port'" + << endl; + cout << " where opt can be:" << endl; + cout << " --all list all dependent packages, not " + << "only installed" << endl; + cout << " --recursive print recursive listing" << endl; + cout << " --tree print recursive tree listing" + << endl; + + cout << "\nSEARCHING" << endl; + cout << " search <expr> show port names containing 'expr'" << endl; + cout << " dsearch <expr> show ports containing 'expr' in the " + << "name or description" << endl; + cout << " fsearch <pattern> show file names in footprints matching " + << "'pattern'" << endl; + + cout << "\nINSTALL, UPDATE and REMOVAL" << endl; + cout << " install [opt] <port1 port2...> install ports" << endl; + cout << " update [opt] <port1 port2...> update ports" << endl; + cout << " grpinst [opt] <port1 port2...> install ports, stop on error" + << endl; + cout << " depinst [opt] <port1 port2...> install ports and their dependencies" + << endl; + cout << " remove [opt] <port1 port2...> remove ports" + << endl; + cout << " where opt can be:" << endl; + cout << " -f, -fi force installation" << endl; + cout << " -fr force rebuild" << endl; + cout << " -uf update footprint" << endl; + cout << " -if ignore footprint" << endl; + cout << " -um update md5sum" << endl; + cout << " -im ignore md5sum" << endl; + cout << " --margs=<string> pass 'string' to pkgmk" + << endl; + cout << " --aargs=<string> pass 'string' to pkgadd" + << endl; + cout << " --rargs=<string> pass 'string' to pkgrm" + << endl; + cout << " --test test mode" << endl; + cout << " --log write log file"<< endl; + cout << " --ignore=<package1,package2,...>" << endl + << " Don't install/update those packages"<< endl; + cout << " --pre-install execute pre-install script" + << endl; + cout << " --post-install execute post-install script" + << endl; + cout << " --install-scripts execute " + << "pre-install and post-install script" + << endl; + + cout << "\nSYSTEM UPDATE " << endl; + cout << " sysup [opt] update all outdated ports" + << endl; + cout << " where opt can be:" << endl; + cout << " --nodeps don't sort by dependencies" + << endl; + cout << " --test test mode" << endl; + cout << " --log write log file"<< endl; + cout << " --prefer-higher prefer higher installed " + << "versions over lower ones in ports tree" + << endl; + cout << " --strict-diff override prefer higher " + << "configuration setting" + << endl; + + cout << " lock <port1 port2...> lock current version " + << "of packages" + << endl; + cout << " unlock <port1 port2...> unlock packages" + << endl; + cout << " listlocked list locked packages" + << endl; + + cout << "\nFILE OPERATIONS " << endl; + + cout << " ls <port> print a listing of the port's" + << " directory" << endl; + cout << " cat <port> <file> print out 'port/file'" + << endl; + cout << " edit <port> <file> edit 'port/file'" << endl; + + cout << "\nGENERAL OPTIONS" << endl; + cout << " -v Show version in listing" + << endl; + cout << " -vv Show version and decription " << "in listing\n" << endl; + cout << " --path Print path to port if appropriate (search, list, depends)\n" << endl; + cout << " --cache Use a cache file" << endl; + cout << " --config=<file> Use alternative " + << "configuration file" << endl; + cout << " --install-root=.. Use alternative " + << "install root directory" << endl; + + + + + cout << " --no-std-config Don't parse " + << "default configuration file" << endl; + cout << " --config-prepend=.. Prepend '..' to" + << " configuration" << endl; + cout << " --config-append=.. Append '..' " + << "to configuration" << endl; + cout << " --config-set=.. Set configuration " + << "data '..',\n" + << " overriding config file" + << endl; + +} + + +/*! print list of duplicate packages in the repository */ +void PrtGet::listShadowed() +{ + if ( m_parser->useCache() ) { + cout << m_appName << ": command 'dup' can't work on a cache" << endl; + m_returnValue = PG_GENERAL_ERROR; + return; + } + + initRepo( true ); + + string format = "%p1 %v1 > %p2 %v2\n"; + if (m_parser->otherArgs().size() > 0) + format = *(m_parser->otherArgs().begin()); + else if (m_parser->verbose() > 0) + format = "* %n\n %p1 %v1 preceeds over \n %p2 %v2\n"; + + string output; + Package* p1; + Package* p2; + + list<pair<Package*, Package*> >::const_iterator it = + m_repo->shadowedPackages().begin(); + for ( ; it != m_repo->shadowedPackages().end(); ++it ) { + output = format; + p1 = it->second; + p2 = it->first; + + StringHelper::replaceAll(output, "%n", p1->name()); + StringHelper::replaceAll(output, "%p1", p1->path() + "/" + p1->name()); + StringHelper::replaceAll(output, "%p2", p2->path() + "/" + p2->name()); + StringHelper::replaceAll(output, "%v1", p1->versionReleaseString()); + StringHelper::replaceAll(output, "%v2", p2->versionReleaseString()); + + StringHelper::replaceAll(output, "\\n", "\n"); + cout << output; + } +} + +/*! + find ports matching a pattern in repository + + \sa Repository::getMatchingPackages() +*/ +void PrtGet::listPackages() +{ + string arg = "*"; + assertMaxArgCount(1); + + if ( m_parser->otherArgs().size() == 1 ) { + arg = *(m_parser->otherArgs().begin()); + } + + initRepo(); + list<Package*> packages; + m_repo->getMatchingPackages( arg, packages ); + if ( packages.size() ) { + list<Package*>::iterator it = packages.begin(); + for ( ; it != packages.end(); ++it ) { + if ( m_parser->printPath() ) { + cout << (*it)->path() << "/"; + } + cout << (*it)->name(); + if ( m_parser->verbose() > 0 ) { + cout << " " << (*it)->version() << "-" << (*it)->release(); + } + if ( m_parser->verbose() > 1 && !(*it)->description().empty() ) { + cout << ": " << (*it)->description(); + } + + cout << endl; + } + } else { + cout << "No matching packages found" << endl; + } +} + +/*! + search repository for a certain pattern (which is read by the argument + parser. + + \sa Repository::searchMatchingPackages() +*/ +void PrtGet::searchPackages( bool searchDesc ) +{ + assertExactArgCount(1); + + initRepo(); + string arg = *(m_parser->otherArgs().begin()); + list<Package*> packages; + m_repo->searchMatchingPackages( arg, packages, searchDesc ); + if ( packages.size() ) { + list<Package*>::iterator it = packages.begin(); + for ( ; it != packages.end(); ++it ) { + if ( m_parser->printPath()) { + cout << (*it)->path() << "/"; + } + cout << (*it)->name(); + + if ( m_parser->verbose() > 0 ) { + cout << " " << (*it)->version() << "-" << (*it)->release(); + } + if ( m_parser->verbose() > 1 && !(*it)->description().empty() ) { + cout << ": " << (*it)->description(); + } + + + cout << endl; + } + } else { + m_returnValue = PG_GENERAL_ERROR; + cout << "No matching packages found" << endl; + } +} + +/*! print info for a package */ +void PrtGet::printInfo() +{ + assertExactArgCount(1); + + initRepo(); + string arg = *(m_parser->otherArgs().begin()); + const Package* p = m_repo->getPackage( arg ); + if ( p ) { + cout << "Name: " << p->name() << "\n" + << "Path: " << p->path() << "\n" + << "Version: " << p->version() << "\n" + << "Release: " << p->release() << endl; + + if ( !p->description().empty() ) { + cout << "Description: " << p->description() << endl; + } + if ( !p->url().empty() ) { + cout << "URL: " << p->url() << endl; + } + if ( !p->packager().empty() ) { + cout << "Packager: " << p->packager() << endl; + } + if ( !p->maintainer().empty() ) { + cout << "Maintainer: " << p->maintainer() << endl; + } + + if ( !p->dependencies().empty() ) { + cout << "Dependencies: " << p->dependencies() << endl; + } + + // TODO: don't hardcode file names + string filesString = ""; + if ( p->hasReadme() ) { + filesString += "README "; + } + if ( p->hasPreInstall() ) { + filesString += "pre-install "; + } + if ( p->hasPostInstall() ) { + filesString += "post-install "; + } + + if ( filesString.length() > 0 ) { + filesString = StringHelper::stripWhiteSpace( filesString ); + StringHelper::replaceAll( filesString, " ", "," ); + cout << "Files: " << filesString << endl; + } + + if ( m_parser->verbose() > 0 && p->hasReadme()) { + cout << "\n-- README ------" << endl; + readme(); + } + + } else { + cerr << "Package '" << arg << "' not found" << endl; + m_returnValue = PG_GENERAL_ERROR; + return; + } +} + + +/*! + initialize repository + \sa Repository::initFromCache() + \sa Repository::initFromFS() + */ +void PrtGet::initRepo( bool listDuplicate ) +{ + if ( !m_repo ) { + m_repo = new Repository(m_useRegex); + + if ( m_parser->useCache() ) { + if (m_config->cacheFile() != "") { + m_cacheFile = m_config->cacheFile(); + } + + Repository::CacheReadResult result = + m_repo->initFromCache( m_cacheFile ); + if ( result == Repository::ACCESS_ERR ) { + cerr << "Can't open cache file: " << m_cacheFile << endl; + m_returnValue = PG_GENERAL_ERROR; + return; + } else if ( result == Repository::FORMAT_ERR ) { + cerr << "warning: your cache file " + << m_cacheFile << " was made with an " + << "older version " + << "of prt-get." + << "\nPlease regenerate it using" + << "\n prt-get cache" << endl; + m_returnValue = PG_GENERAL_ERROR; + return; + } + + struct stat cacheStat; + struct stat confStat; + stat( m_cacheFile.c_str(), &cacheStat ); + stat( CONF_FILE.c_str(), &confStat ); + if ( confStat.st_ctime > cacheStat.st_ctime ) { + cerr << "Error: " + << "Configuration changed after generating cache" + << endl; + cerr << "regenerate cache using 'prt-get cache'" << endl; + m_returnValue = PG_GENERAL_ERROR; + return; + } + + if ( !m_parser->wasCalledAsPrtCached() ) { + cout << m_appName << ": using cache" << endl; + } + + } else { + m_repo->initFromFS( m_config->rootList(), listDuplicate ); + } + } +} + +/*! print whether a package is installed or not */ +void PrtGet::isInstalled() +{ + assertMinArgCount(1); + + const list<char*>& l = m_parser->otherArgs(); + list<char*>::const_iterator it = l.begin(); + for ( ; it != l.end(); ++it ) { + bool isAlias = false; + string aliasName; + + if ( m_pkgDB->isInstalled( *it, true, &isAlias, &aliasName ) ) { + if (isAlias) { + cout << *it << " is provided by package " + << aliasName + << endl; + } else { + cout << "package " << *it << " is installed" << endl; + } + } else { + cout << "package " << *it << " is not installed" << endl; + m_returnValue = PG_GENERAL_ERROR; + } + } +} + + +/*! list installed packages */ +void PrtGet::listInstalled() +{ + assertMaxArgCount(1); + + string arg = "*"; + if ( m_parser->otherArgs().size() == 1 ) { + arg = *(m_parser->otherArgs().begin()); + } + + map<string, string> l; + m_pkgDB->getMatchingPackages( arg, l, m_useRegex ); + map<string, string>::iterator it = l.begin(); + + if ( l.empty() && m_parser->otherArgs().size() > 0 ) { + cerr << m_appName << ": No matching packages found" << endl; + m_returnValue = PG_GENERAL_ERROR; + return; + } + + if ( m_parser->verbose() > 1 ) { + // warning: will slow down the process... + initRepo(); + } + + for ( ; it != l.end(); ++it ) { + cout << it->first.c_str(); + if ( m_parser->verbose() > 0 ) { + cout << " " << it->second.c_str(); + } + if ( m_parser->verbose() > 1 ) { + const Package* p = m_repo->getPackage( it->first ); + if ( p ) { + cout << " " << p->description(); + } + } + + cout << endl; + } +} + +/*! + install package + \param update whether this is an update operation + \param group whether it's a group install (stop on error) + +*/ +void PrtGet::install( bool update, bool group, bool dependencies ) +{ + assertMinArgCount(1); + + // this can be done without initRepo() + const list<char*>& args = m_parser->otherArgs(); + list<char*>::const_iterator it = args.begin(); + + if ( args.size() == 1 ) { + for ( ; it != args.end(); ++it ) { + string s = *it; + if ( !update && m_pkgDB->isInstalled( s ) ) { + cout << "package " << s << " is installed" << endl; + m_returnValue = PG_GENERAL_ERROR; + return; + } else if ( update && !m_pkgDB->isInstalled( s ) ) { + // can't upgrade + cout << "package " << s << " is not installed" << endl; + m_returnValue = PG_GENERAL_ERROR; + return; + } + } + } + + initRepo(); + + if (dependencies) { + // calc dependencies + InstallTransaction depTransaction( m_parser->otherArgs(), + m_repo, m_pkgDB, m_config ); + InstallTransaction::InstallResult result = + depTransaction.calcDependencies(); + + // TODO: code duplication with printDepends! + if ( result == InstallTransaction::CYCLIC_DEPEND ) { + cerr << "prt-get: cyclic dependencies found" << endl; + m_returnValue = PG_GENERAL_ERROR; + return; + } else if ( result == InstallTransaction::PACKAGE_NOT_FOUND ) { + warnPackageNotFound(depTransaction); + m_returnValue = PG_GENERAL_ERROR; + return; + } + const list<string>& depRef = depTransaction.dependencies(); + list<string>::const_iterator it = depRef.begin(); + + list<string> deps; + for (; it != depRef.end(); ++it) { + if (!m_pkgDB->isInstalled(*it)) { + deps.push_back(*it); + } + } + + InstallTransaction transaction( deps, m_repo, m_pkgDB, m_config ); + executeTransaction( transaction, update, group ); + } else { + InstallTransaction transaction( m_parser->otherArgs(), + m_repo, m_pkgDB, m_config ); + executeTransaction( transaction, update, group ); + } +} + +void PrtGet::executeTransaction( InstallTransaction& transaction, + bool update, bool group ) +{ + m_currentTransaction = &transaction; + + string command[] = { "install", "installed" }; + if ( update ) { + command[0] = "update"; + command[1] = "updated"; + } + + if ( m_parser->isTest() ) { + cout << "*** " << m_appName << ": test mode" << endl; + } + + InstallTransaction::InstallResult result = + transaction.install( m_parser, update, group ); + bool failed = false; + // TODO: use switch + if ( result == InstallTransaction::PACKAGE_NOT_FOUND ) { + cout << m_appName << ": package(s) not found" << endl; + } else if ( result == InstallTransaction::PKGMK_EXEC_ERROR ) { + cout << m_appName << " couldn't excecute pkgmk " + << "(or alternative command). " + << "Make sure it's installed properly" << endl; + } else if ( result == InstallTransaction::PKGMK_FAILURE ) { + cout << m_appName << ": error while " << command[0] << endl; + } else if ( result == InstallTransaction::NO_PACKAGE_GIVEN ) { + cout << m_appName << ": no package specified for " + << command[0] << endl; + } else if ( result == InstallTransaction::PKGADD_EXEC_ERROR ) { + cout << m_appName << " couldn't excecute pkgadd. " + << "Make sure it's installed properly" << endl; + } else if ( result == InstallTransaction::PKGDEST_ERROR ) { + cout << m_appName << ": error changing to directory PKGDEST " << endl; + failed = true; + } else if ( result == InstallTransaction::PKGADD_FAILURE ) { + cout << m_appName << ": error while pkgadding " << endl; + } else if ( result == InstallTransaction::LOG_DIR_FAILURE ) { + cout << m_appName << ": can't create log file directory " << endl; + } else if ( result == InstallTransaction::LOG_FILE_FAILURE ) { + cout << m_appName << ": can't create log file" << endl; + failed = true; + } else if ( result == InstallTransaction::NO_LOG_FILE ) { + cout << m_appName << ": no log file specified, but logging enabled" + << endl; + failed = true; + } else if ( result == InstallTransaction::CANT_LOCK_LOG_FILE ) { + cout << m_appName << ": can't create lock file for the log file. " + << "\nMaybe there's another instance of prt-get using the same " + << "file." + << "\nIf this is a stale not, please remove " + // TODO: file name of lock file + << endl; + failed = true; + } else if ( result != InstallTransaction::SUCCESS ) { + cout << m_appName << ": Unknown error " << result << endl; + failed = true; + } + + if ( !failed ) { + evaluateResult( transaction, update ); + if ( m_parser->isTest() ) { + cout << "\n*** " << m_appName << ": test mode end" << endl; + } + } else { + m_returnValue = PG_INSTALL_ERROR; + } + + m_currentTransaction = 0; +} + +/*! + print dependency listing + \param simpleListing Whether it should be in a simple format +*/ +void PrtGet::printDepends( bool simpleListing ) +{ + assertMinArgCount(1); + + initRepo(); + + InstallTransaction transaction( m_parser->otherArgs(), + m_repo, m_pkgDB, m_config ); + InstallTransaction::InstallResult result = transaction.calcDependencies(); + if ( result == InstallTransaction::CYCLIC_DEPEND ) { + cerr << "prt-get: cyclic dependencies found" << endl; + m_returnValue = PG_GENERAL_ERROR; + return; + } else if ( result == InstallTransaction::PACKAGE_NOT_FOUND ) { + warnPackageNotFound(transaction); + m_returnValue = PG_GENERAL_ERROR; + return; + } + + const list<string>& deps = transaction.dependencies(); + if ( simpleListing ) { + if ( deps.size() > 0 ) { + list<string>::const_iterator it = deps.begin(); + for ( ; it != deps.end(); ++it ) { + cout << *it << " "; + } + cout << endl; + } + } else { + if ( deps.size() > 0 ) { + cout << "-- dependencies ([i] = installed)" << endl; + list<string>::const_iterator it = deps.begin(); + + bool isAlias; + string provider; + for ( ; it != deps.end(); ++it ) { + isAlias = false; + if ( m_pkgDB->isInstalled( *it, true, &isAlias, &provider ) ) { + cout << "[i] "; + } else { + cout << "[ ] "; + } + if (m_parser->printPath() > 0) { + cout << m_repo->getPackage(*it)->path() << "/"; + } + cout << *it; + + if (isAlias) { + cout << " (provided by " << provider << ")"; + } + cout << endl; + } + } else { + cout << "No dependencies found" << endl; + } + + const list< pair<string, string> >& missing = transaction.missing(); + if ( missing.size() ) { + list< pair<string, string> >::const_iterator mit = missing.begin(); + cout << endl << "-- missing packages" << endl; + for ( ; mit != missing.end(); ++mit ) { + cout << mit->first; + if ( !mit->second.empty() ) { + cout << " from " << mit->second; + } + cout << endl; + } + } + } +} + +/*! read the config file */ +void PrtGet::readConfig() +{ + string fName = CONF_FILE; + if ( m_parser->isAlternateConfigGiven() ) { + fName = m_parser->alternateConfigFile(); + } + + if ( m_config ) { + return; // don't initialize twice + } + m_config = new Configuration( fName, m_parser ); + + if (!m_parser->noStdConfig()) { + if ( !m_config->parse() ) { + cerr << "Can't read config file " << fName + << ". Exiting" << endl; + m_returnValue = PG_GENERAL_ERROR; + return; + } + } + + const list< pair<char*, ArgParser::ConfigArgType> >& configData = + m_parser->configData(); + list< pair<char*, ArgParser::ConfigArgType> >::const_iterator it = + configData.begin(); + for (; it != configData.end(); ++it) { + m_config->addConfig(it->first, + it->second == ArgParser::CONFIG_SET, + it->second == ArgParser::CONFIG_PREPEND); + } +} + +/*! + print a simple list of port which are installed in a different version + than they are in the repository +*/ +void PrtGet::printQuickDiff() +{ + initRepo(); + + const map<string, string>& installed = m_pkgDB->installedPackages(); + map<string, string>::const_iterator it = installed.begin(); + const Package* p = 0; + COMP_RESULT result; + for ( ; it != installed.end(); ++it ) { + if ( !m_locker.isLocked( it->first ) ) { + p = m_repo->getPackage( it->first ); + if ( p ) { + result = compareVersions(p->versionReleaseString(), + it->second); + if (result == GREATER) { + cout << it->first.c_str() << " "; + } + // we don't care about undefined diffs here + } + } + } + cout << endl; +} + + +void PrtGet::printFormattedDiffLine(const string& name, + const string& version1, + const string& version2, + bool isLocked) +{ + cout.setf( ios::left, ios::adjustfield ); + cout.width( 20 ); + cout.fill( ' ' ); + cout << name; + + cout.width( 20 ); + cout.fill( ' ' ); + cout << version1; + + string locked = ""; + if ( isLocked ) { + locked = "locked"; + } + cout.width( 20 ); + cout.fill( ' ' ); + cout << version2 << locked << endl; +} +/*! + print an overview of port which are installed in a different version + than they are in the repository +*/ +void PrtGet::printDiff() +{ + initRepo(); + map< string, string > l; + if ( m_parser->otherArgs().size() > 0 ) { + expandWildcardsPkgDB( m_parser->otherArgs(), l ); + } + if ( l.size() < m_parser->otherArgs().size() ) { + cerr << "prt-get: no matching installed packages found" << endl; + m_returnValue = PG_GENERAL_ERROR; + return; + } + +#if 0 + // const list<char*>& l = m_parser->otherArgs(); + // list<char*>::const_iterator checkIt = l.begin(); + + // check whether ports to be checked are installed + list< string >::iterator checkIt = l.begin(); + for ( ; checkIt != l.end(); ++checkIt ) { + if ( ! m_pkgDB->isInstalled( *checkIt ) ) { + cerr << "Port not installed: " << *checkIt << endl; + m_returnValue = PG_GENERAL_ERROR; + return; + } + } +#endif + + const map<string, string>& installed = m_pkgDB->installedPackages(); + map<string, string>::const_iterator it = installed.begin(); + const Package* p = 0; + int count = 0; + COMP_RESULT result; + for ( ; it != installed.end(); ++it ) { + + p = m_repo->getPackage( it->first ); + if ( p ) { + if ( l.size() && l.find( it->first ) == l.end() ) { + continue; + } + + result = compareVersions( p->versionReleaseString(), + it->second ); + if (result == GREATER ) { + if ( !m_locker.isLocked( it->first ) || + m_parser->otherArgs().size() > 0 || + m_parser->all() ) { + + + ++count; + if ( count == 1 ) { + cout << "Differences between installed packages " + << "and ports tree:\n" << endl; + printFormattedDiffLine("Port", + "Installed", + "Available in the ports tree", + false); + cout << endl; + } + + printFormattedDiffLine(it->first, + it->second, + p->versionReleaseString(), + m_locker.isLocked( it->first )); + } + } else if (result == UNDEFINED) { + m_undefinedVersionComp.push_back(make_pair(p, it->second)); + } + } + } + + if (m_undefinedVersionComp.size()) { + cout << "\n\n" << "Undecidable version differences (use --strict-diff)" + << endl << endl; + printFormattedDiffLine("Port", + "Installed", + "Available in the ports tree", + false); + cout << endl; + + list< pair< const Package*, string > >::iterator it = + m_undefinedVersionComp.begin(); + const Package* p; + for (; it != m_undefinedVersionComp.end(); ++it) { + p = it->first; + printFormattedDiffLine(p->name(), + p->versionReleaseString(), + it->second, + false); + } + } + + + if ( count == 0 ) { + cout << "No differences found" << endl; + } +} + +/*! print path to a port */ +void PrtGet::printPath() +{ + assertExactArgCount(1); + + initRepo(); + string arg = *(m_parser->otherArgs().begin()); + const Package* p = m_repo->getPackage( arg ); + if ( p ) { + cout << p->path() << "/" << p->name() << endl; + } else { + cerr << "Package '" << arg << "' not found" << endl; + m_returnValue = PG_GENERAL_ERROR; + return; + } +} + + +/*! helper method to print the result of an InstallTransaction */ +void PrtGet::evaluateResult( InstallTransaction& transaction, + bool update, + bool interrupted ) +{ + int errors = 0; + + // TODO: this is a duplicate, it's in install() as well + string command[] = { "install", "installed" }; + if ( update ) { + command[0] = "update"; + command[1] = "updated"; + } + + const list<string>& ignored = transaction.ignoredPackages(); + if ( ignored.size() ) { + cout << endl << "-- Packages ignored" << endl; + list<string>::const_iterator iit = ignored.begin(); + + for ( ; iit != ignored.end(); ++iit ) { + cout << *iit << endl; + } + } + + const list< pair<string, string> >& missing = transaction.missing(); + if ( missing.size() ) { + ++errors; + cout << endl << "-- Packages not found" << endl; + list< pair<string, string> >::const_iterator mit = missing.begin(); + + for ( ; mit != missing.end(); ++mit ) { + cout << mit->first; + if ( mit->second != "" ) { + cout << " from " << mit->second; + } + cout << endl; + } + } + + const list< pair<string, InstallTransaction::InstallInfo> >& error = + transaction.installError(); + if ( error.size() ) { + ++errors; + cout << endl << "-- Packages where " + << command[0] << " failed" << endl; + list< pair<string, InstallTransaction::InstallInfo> >::const_iterator + eit = error.begin(); + + for ( ; eit != error.end(); ++eit ) { + cout << eit->first; + reportPrePost(eit->second); + cout << endl; + } + } + + const list<string>& already = transaction.alreadyInstalledPackages(); + if ( already.size() ) { + cout << endl << "-- Packages installed before this run (ignored)" + << endl; + list<string>::const_iterator ait = already.begin(); + + bool isAlias; + string provider; + for ( ; ait != already.end(); ++ait ) { + isAlias = false; + cout << *ait; + m_pkgDB->isInstalled(*ait, true, &isAlias, &provider); + + if (isAlias) { + cout << " (provided by " << provider << ")"; + } + cout << endl; + } + } + + + const list< pair<string, InstallTransaction::InstallInfo> >& inst = + transaction.installedPackages(); + if ( inst.size() ) { + cout << endl << "-- Packages " << command[1] << endl; + list< pair<string, InstallTransaction::InstallInfo> >::const_iterator + iit = inst.begin(); + + bool atLeastOnePackageHasReadme = false; + + for ( ; iit != inst.end(); ++iit ) { + cout << iit->first; + if ( iit->second.hasReadme ) { + if ( m_config->readmeMode() == + Configuration::COMPACT_README ) { + cout << " (README)"; + } + atLeastOnePackageHasReadme = true; + } + reportPrePost(iit->second); + cout << endl; + } + + + // readme's + if ( atLeastOnePackageHasReadme ) { + if ( m_config->readmeMode() == Configuration::VERBOSE_README ) { + cout << endl << "-- " << command[1] + << " packages with README files:" << endl; + iit = inst.begin(); + for ( ; iit != inst.end(); ++iit ) { + if ( iit->second.hasReadme ) { + cout << iit->first; + cout << endl; + } + } + } + } + } + if ( m_undefinedVersionComp.size() ) { + cout << endl + << "-- Packages with undecidable version " + << "difference (use --strict-diff)" + << endl; + list< pair<const Package*, string> >::const_iterator uit = + m_undefinedVersionComp.begin(); + const Package * p; + for ( ; uit != m_undefinedVersionComp.end(); ++uit ) { + p = uit->first; + cout << p->name() << " (" + << p->versionReleaseString() + << " vs " + << uit->second << ")" << endl; + } + } + + cout << endl; + + if ( errors == 0 && !interrupted ) { + cout << "prt-get: " << command[1] << " successfully" << endl; + } else { + m_returnValue = PG_PARTIAL_INSTALL_ERROR; + } +} + +void PrtGet::reportPrePost(const InstallTransaction::InstallInfo& info) { + if (info.preState != InstallTransaction::NONEXISTENT) { + string preString = "failed"; + if (info.preState == InstallTransaction::EXEC_SUCCESS) { + preString = "ok"; + } + cout << " [pre: " << preString << "]"; + } + if ( info.postState != InstallTransaction::NONEXISTENT) { + string postString = "failed"; + if (info.postState == InstallTransaction::EXEC_SUCCESS){ + postString = "ok"; + } + cout << " [post: " << postString << "]"; + } + +} + +/*! create a cache */ +void PrtGet::createCache() +{ + if ( m_parser->wasCalledAsPrtCached() ) { + cerr << m_appName << ": Can't create cache from cache. " + << "Use prt-get instead" << endl; + m_returnValue = PG_GENERAL_ERROR; + return; + } + + initRepo(); + if (m_config->cacheFile() != "") { + m_cacheFile = m_config->cacheFile(); + } + + Repository::WriteResult result = m_repo->writeCache( m_cacheFile ); + if ( result == Repository::DIR_ERR ) { + cerr << "Can't create cache directory " << m_cacheFile << endl; + m_returnValue = PG_GENERAL_ERROR; + return; + } + if ( result == Repository::FILE_ERR ) { + cerr << "Can't open cache file " << m_cacheFile << " for writing" + << endl; + m_returnValue = PG_GENERAL_ERROR; + return; + } + +} + +/*! + \return true if v1 is greater than v2 + */ +COMP_RESULT PrtGet::compareVersions( const string& v1, const string& v2 ) +{ + if (v1 == v2) { + return EQUAL; + } + + + if (m_parser->preferHigher() || + (m_config->preferHigher() && !m_parser->strictDiff())) { + + COMP_RESULT result = VersionComparator::compareVersions(v1, v2); + return result; + } + + if (v1 != v2) + return GREATER; + return LESS; +} + +int PrtGet::returnValue() const +{ + return m_returnValue; +} + + +/*! print a list of packages available in the repository */ +void PrtGet::printf() +{ + map<string, string> sortedOutput; + + assertExactArgCount(1); + + initRepo(); + string filter = "*"; + if ( m_parser->hasFilter() ) { + filter = m_parser->filter(); + } + list<Package*> packages; + m_repo->getMatchingPackages( filter, packages ); + list<Package*>::const_iterator it = packages.begin(); + + const string formatString = *(m_parser->otherArgs().begin()); + string sortString = + StringHelper::stripWhiteSpace( m_parser->sortArgs() ); + sortString += "%n"; // make it unique + + for ( ; it != packages.end(); ++it ) { + string output = formatString; + string sortkey = sortString; + + const Package* p = *it; + + StringHelper::replaceAll( output, "%n", p->name() ); + StringHelper::replaceAll( output, "%u", p->url() ); + StringHelper::replaceAll( output, "%p", p->path() ); + StringHelper::replaceAll( output, "%v", p->version() ); + StringHelper::replaceAll( output, "%r", p->release() ); + StringHelper::replaceAll( output, "%d", p->description() ); + StringHelper::replaceAll( output, "%e", p->dependencies() ); + StringHelper::replaceAll( output, "%P", p->packager() ); + StringHelper::replaceAll( output, "%M", p->maintainer() ); + + StringHelper::replaceAll( output, "\\t", "\t" ); + StringHelper::replaceAll( output, "\\n", "\n" ); + + StringHelper::replaceAll( sortkey, "%n", p->name() ); + StringHelper::replaceAll( sortkey, "%u", p->url() ); + StringHelper::replaceAll( sortkey, "%p", p->path() ); + StringHelper::replaceAll( sortkey, "%v", p->version() ); + StringHelper::replaceAll( sortkey, "%r", p->release() ); + StringHelper::replaceAll( sortkey, "%d", p->description() ); + StringHelper::replaceAll( sortkey, "%e", p->dependencies() ); + StringHelper::replaceAll( sortkey, "%P", p->packager() ); + StringHelper::replaceAll( sortkey, "%M", p->maintainer() ); + + string isInst = "no"; + if ( m_pkgDB->isInstalled( p->name() ) ) { + string ip = p->name() + "-" + + m_pkgDB->getPackageVersion( p->name() ); + if ( ip == p->name() + "-" + p->versionReleaseString() ) { + isInst = "yes"; + } else { + isInst = "diff"; + } + } + StringHelper::replaceAll( output, "%i", isInst ); + StringHelper::replaceAll( sortkey, "%i", isInst ); + + string isLocked = m_locker.isLocked( p->name() ) ? "yes" : "no"; + StringHelper::replaceAll( output, "%l", isLocked ); + StringHelper::replaceAll( sortkey, "%l", isLocked ); + + string hasReadme = p->hasReadme() ? "yes" : "no"; + StringHelper::replaceAll( output, "%R", hasReadme ); + StringHelper::replaceAll( sortkey, "%R", hasReadme ); + + string hasPreInstall = p->hasPreInstall() ? "yes" : "no"; + StringHelper::replaceAll( output, "%E", hasPreInstall ); + StringHelper::replaceAll( sortkey, "%E", hasPreInstall ); + + string hasPostInstall = p->hasPostInstall() ? "yes" : "no"; + StringHelper::replaceAll( output, "%O", hasPostInstall ); + StringHelper::replaceAll( sortkey, "%O", hasPostInstall ); + + sortedOutput[sortkey] = output; + } + + map<string, string>::iterator sortIt = sortedOutput.begin(); + for ( ; sortIt != sortedOutput.end(); ++sortIt ) { + if ( StringHelper::stripWhiteSpace(sortIt->second).length() > 0) { + cout << sortIt->second; + } + } +} + +void PrtGet::readme() +{ + assertExactArgCount(1); + + initRepo(); + string arg = *(m_parser->otherArgs().begin()); + const Package* p = m_repo->getPackage( arg ); + if ( p ) { + string file = p->path() + "/" + p->name() + "/README"; + printFile(file); + } else { + cerr << "Package '" << arg << "' not found" << endl; + m_returnValue = PG_GENERAL_ERROR; + return; + } +} + +bool PrtGet::printFile(const string& file) +{ + if (!File::fileExists(file)) { + return false; + } + + char* pager = getenv("PAGER"); + if (pager) { + Process proc(pager, file); + proc.executeShell(); + } else { + FILE* fp = fopen( file.c_str(), "r" ); + char buf[255]; + if ( fp ) { + while ( fgets( buf, 255, fp ) ) { + cout << buf; + } + fclose( fp ); + } + } + + return true; +} + +void PrtGet::printDependent() +{ + assertExactArgCount(1); + + initRepo(); + string arg = *(m_parser->otherArgs().begin()); + + if (m_parser->printTree()) { + cout << arg << endl; + printDependent(arg, 2); + } else { + printDependent(arg, 0); + } +} + +void PrtGet::printDependent(const string& dep, int level) +{ + map<string, Package*>::const_iterator it = m_repo->packages().begin(); + static map<string, bool> shownMap; + + set<const Package*> dependent; + for ( ; it != m_repo->packages().end(); ++it ) { + + // TODO: is the following line needed? + const Package* p = it->second; + if ( p && p->dependencies().find( dep ) != string::npos ) { + list<string> tokens; + StringHelper::split( p->dependencies(), ',', tokens ); + list<string>::iterator it = find( tokens.begin(), + tokens.end(), + dep ); + if ( it != tokens.end() ) { + dependent.insert( p ); + } + } + } + + // - there are two modes, tree and non-tree recursive mode; in + // tree mode, packages are shown multiple times, in non tree + // recursive mode they're only printed the first time; this is not + // necessarily optimal for rebuilding: + // + // a -> b -> d + // \ ^ + // > c / + // + // trying to rebuild 'd' before 'c' might possibly fail + string indent = ""; + if (m_parser->printTree()) { + for (int i = 0; i < level; ++i) { + indent += " "; + } + } + set<const Package*>::iterator it2 = dependent.begin(); + for ( ; it2 != dependent.end(); ++it2 ) { + const Package* p = *it2; + + if (m_parser->recursive() && !m_parser->printTree()) { + if (shownMap[p->name()]) { + continue; + } + shownMap[p->name()] = true; + } + + if ( m_parser->all() || m_pkgDB->isInstalled( p->name() ) ) { + + cout << indent << p->name(); + if ( m_parser->verbose() > 0 ) { + cout << " " << p->versionReleaseString(); + } + if ( m_parser->verbose() > 1 ) { + cout << ": " << p->description(); + } + + cout << endl; + + if (m_parser->recursive()) { + printDependent( p->name(), level+2 ); + } + } + } +} + +void PrtGet::listOrphans() +{ + initRepo(); + map<string, string> installed = m_pkgDB->installedPackages(); + map<string, bool> required; + map<string, string>::iterator it = installed.begin(); + + for (; it != installed.end(); ++it) { + list<string> tokens; + const Package* p = m_repo->getPackage(it->first); + if (p) { + StringHelper::split( p->dependencies(), ',', tokens ); + list<string>::iterator lit = tokens.begin(); + for (; lit != tokens.end(); ++lit) { + required[*lit] = true; + } + } + } + + // - we could store the package pointer in another map to avoid + // another getPackage lockup, but it seems better to optimized for + // memory since it's only used when called with -vv + + it = installed.begin(); + for (; it != installed.end(); ++it) { + if (!required[it->first]) { + cout << it->first; + if ( m_parser->verbose() > 0 ) { + cout << " " << it->second; + } + if ( m_parser->verbose() > 1 ) { + const Package* p = m_repo->getPackage(it->first); + if (p) { + cout << ": " << p->description(); + } + } + cout << endl; + } + } +} + + +void PrtGet::warnPackageNotFound(InstallTransaction& transaction) +{ + cerr << "The package '"; + cerr << transaction.missing().begin()->first; + cerr << "' could not be found: " << endl; +} + +void PrtGet::sysup() +{ + // TODO: refactor getDifferentPackages from diff/quickdiff + initRepo(); + + list<string>* target; + list<string> packagesToUpdate; + list<string> sortedList; + + const map<string, string>& installed = m_pkgDB->installedPackages(); + map<string, string>::const_iterator it = installed.begin(); + const Package* p = 0; + COMP_RESULT result; + for ( ; it != installed.end(); ++it ) { + if ( !m_locker.isLocked( it->first ) ) { + p = m_repo->getPackage( it->first ); + if ( p ) { + result = compareVersions( p->versionReleaseString(), + it->second ); + if (result == GREATER ) { + packagesToUpdate.push_back( it->first ); + } else if (result == UNDEFINED ) { + m_undefinedVersionComp.push_back(make_pair(p, it->second)); + } + } + } + } + + if ( packagesToUpdate.empty() ) { + cout << "System is up to date" << endl; + return; + } + + if ( m_parser->nodeps() ) { + target = &packagesToUpdate; + } else { + // sort by dependency + + // TODO: refactor code from printDepends + InstallTransaction depTrans( packagesToUpdate, + m_repo, m_pkgDB, m_config ); + InstallTransaction::InstallResult result = depTrans.calcDependencies(); + if ( result == InstallTransaction::CYCLIC_DEPEND ) { + cerr << "cyclic dependencies" << endl; + m_returnValue = PG_GENERAL_ERROR; + return; + } else if ( result == InstallTransaction::PACKAGE_NOT_FOUND ) { + warnPackageNotFound(depTrans); + m_returnValue = PG_GENERAL_ERROR; + return; + } + + const list<string>& deps = depTrans.dependencies(); + if ( deps.size() > 0 ) { + list<string>::const_iterator it = deps.begin(); + for ( ; it != deps.end(); ++it ) { + if ( find( packagesToUpdate.begin(), + packagesToUpdate.end(), *it ) != + packagesToUpdate.end() ) {; + sortedList.push_back( *it ); + } + } + } + + target = &sortedList; + } + + InstallTransaction transaction( *target, + m_repo, m_pkgDB, m_config ); + executeTransaction( transaction, true, false ); +} + + +void PrtGet::expandWildcardsPkgDB( const list<char*>& in, + map<string, string>& target ) +{ + list<char*>::const_iterator it = in.begin(); + for ( ; it != in.end(); ++it ) { + map<string, string> l; + m_pkgDB->getMatchingPackages( *it, l, m_useRegex ); + map<string, string>::iterator iit = l.begin(); + for ( ; iit != l.end(); ++iit ) { + target[iit->first] = iit->second; + } + } +} + +void PrtGet::expandWildcardsRepo( const list<char*>& in, list<string>& target ) +{ + list<char*>::const_iterator it = in.begin(); + + for ( ; it != in.end(); ++it ) { + list<Package*> l; + m_repo->getMatchingPackages( *it, l ); + list<Package*>::iterator iit = l.begin(); + for ( ; iit != l.end(); ++iit ) { + target.push_back( (*iit)->name() ); + } + } +} + + +void PrtGet::current() +{ + assertExactArgCount(1); + + const map<string, string>& installed = m_pkgDB->installedPackages(); + map<string, string>::const_iterator it = installed.begin(); + string search = *(m_parser->otherArgs().begin()); + + for ( ; it != installed.end(); ++it ) { + if ( it->first == search ) { + cout << it->second.c_str() << endl; + return; + } + } + + cout << "Package " << search << " not installed" << endl; + m_returnValue = 1; +} + +SignalHandler::HandlerResult PrtGet::handleSignal( int signal ) +{ + // TODO: second argument could also be true: + // TODO: kill installtransaction + + cout << "prt-get: interrupted" << endl; + if ( m_currentTransaction ) { + evaluateResult( *m_currentTransaction, false, true ); + } +} + +/*! + find files matching a pattern in repository + + \sa Repository::getMatchingPackages() +*/ +void PrtGet::fsearch() +{ + assertMinArgCount(1); + + string arg = "*"; + if ( m_parser->otherArgs().size() == 1 ) { + arg = *(m_parser->otherArgs().begin()); + } + + initRepo(); + const map<string, Package*>& packages = m_repo->packages(); + map<string, Package*>::const_iterator it = packages.begin(); + bool first = true; + for ( ; it != packages.end(); ++it ) { + list<string> matches; + string fp = + it->second->path() + "/" + + it->second->name() + "/" + ".footprint"; + if ( File::grep( fp, arg, matches, + m_parser->fullPath(), + m_useRegex)) { + if ( matches.size() > 0 ) { + if ( first ) { + first = false; + } else { + cout << endl; + } + cout << "Found in " + << it->second->path() << "/" + << it->first << ":" << endl; + list<string>::iterator it = matches.begin(); + for ( ; it != matches.end(); ++it ) { + cout << " " << *it << endl; + } + } + } + } + + if ( first ) { + m_returnValue = PG_GENERAL_ERROR; + } +} + +void PrtGet::setLock( bool lock ) +{ + assertMinArgCount(1); + + if ( lock ) { + initRepo(); + } + + const list<char*>& args = m_parser->otherArgs(); + list<char*>::const_iterator it = args.begin(); + for ( ; it != args.end(); ++it ) { + if ( lock ) { + if (m_pkgDB->isInstalled( *it )) { + if (!m_locker.lock( *it )) { + cerr << "Already locked: " << *it << endl; + m_returnValue = PG_GENERAL_ERROR; + } + } else { + cerr << "Package '" << *it << "' not found" << endl; + m_returnValue = PG_GENERAL_ERROR; + return; + } + + } else { + if ( !m_locker.unlock( *it ) ) { + cerr << "Not locked previously: " << *it << endl; + m_returnValue = PG_GENERAL_ERROR; + return; + } + } + } + + if (!m_locker.store()) { + cerr << "Failed to write lock data" << endl; + m_returnValue = PG_GENERAL_ERROR; + } +} + +void PrtGet::listLocked() +{ + // shares some code with listInstalled + if ( m_locker.openFailed() ) { + cerr << "Failed to open lock data file" << endl; + m_returnValue = PG_GENERAL_ERROR; + } + + const map<string, string>& l = m_pkgDB->installedPackages(); + + if ( l.empty() ) { + return; + } + + if ( m_parser->verbose() > 1 ) { + // warning: will slow down the process... + initRepo(); + } + + + const vector<string>& lockedPackages = m_locker.lockedPackages(); + vector<string>::const_iterator it = lockedPackages.begin(); + for ( ; it != lockedPackages.end(); ++it ) { + cout << *it; + if ( m_parser->verbose() > 0 ) { + cout << " " << m_pkgDB->getPackageVersion(*it); + } + if ( m_parser->verbose() > 1 ) { + const Package* p = m_repo->getPackage( *it ); + if ( p ) { + cout << ": " << p->description(); + } + } + + cout << endl; + + } +} + + +void PrtGet::edit() +{ + assertMinArgCount(1); + assertMaxArgCount(2); + + char* editor = getenv("EDITOR"); + if (editor) { + initRepo(); + + list<char*>::const_iterator it = m_parser->otherArgs().begin(); + string arg = *it; + const Package* p = m_repo->getPackage( arg ); + if ( p ) { + string fileName = "Pkgfile"; + if (++it != m_parser->otherArgs().end()) { + fileName = *it; + } + string file = p->path() + "/" + p->name() + "/" + fileName; + Process proc(editor, file); + m_returnValue = proc.executeShell(); + if (m_returnValue) { + cerr << "error while execution the editor" << endl; + } + } else { + cerr << "Package '" << arg << "' not found" << endl; + m_returnValue = PG_GENERAL_ERROR; + return; + } + + } else { + cerr << "Environment variable EDITOR not set" << endl;; + m_returnValue = PG_GENERAL_ERROR; + return; + } + +} + +void PrtGet::ls() +{ + assertExactArgCount(1); + + initRepo(); + + list<char*>::const_iterator it = m_parser->otherArgs().begin(); + string arg = *it; + const Package* p = m_repo->getPackage( arg ); + if ( p ) { + string dirname = p->path() + "/" + p->name(); + DIR* dir = opendir(dirname.c_str()); + struct dirent* entry; + vector<string> files; + while (entry = readdir(dir)) { + string dName = entry->d_name; + if (dName != "." && dName != "..") { + files.push_back(dName); + } + } + closedir(dir); + + sort(files.begin(), files.end()); + vector<string>::iterator fit = files.begin(); + for (; fit != files.end(); ++fit) { + if (m_parser->printPath()) { + cout << p->path() + "/" +p->name() + "/"; + } + cout << *fit << endl; + } + } else { + cerr << "Package '" << arg << "' not found" << endl; + m_returnValue = PG_GENERAL_ERROR; + return; + } +} + +void PrtGet::cat() +{ + assertMinArgCount(1); + assertMaxArgCount(2); + + initRepo(); + + list<char*>::const_iterator it = m_parser->otherArgs().begin(); + string arg = *it; + const Package* p = m_repo->getPackage( arg ); + if ( p ) { + string fileName = "Pkgfile"; + if (++it != m_parser->otherArgs().end()) { + fileName = *it; + } + string file = p->path() + "/" + p->name() + "/" + fileName; + if (!printFile(file)) { + cerr << "File '" << *it << "' not found" << endl; + m_returnValue = PG_GENERAL_ERROR; + return; + } + } else { + cerr << "Package '" << arg << "' not found" << endl; + m_returnValue = PG_GENERAL_ERROR; + return; + } +} + +void PrtGet::remove() +{ + assertMinArgCount(1); + + list<string> removed; + list<string> failed; + list<string> notInstalled; + + if ( m_parser->isTest() ) { + cout << "*** " << m_appName << ": test mode" << endl; + } + + string command = InstallTransaction::PKGRM_DEFAULT_COMMAND; + if (m_config->removeCommand() != "") { + command = m_config->removeCommand(); + } + + const list<char*>& args = m_parser->otherArgs(); + list<char*>::const_iterator it = args.begin(); + for ( ; it != args.end(); ++it ) { + if (m_pkgDB->isInstalled(*it)) { + // TODO: prettify + string args = ""; + if (m_parser->installRoot() != "") { + args = "-r " + m_parser->installRoot() + " "; + } + args += (m_parser->pkgrmArgs() + " " + *it); + + Process proc(command, args); + if (m_parser->isTest() || proc.executeShell() == 0) { + removed.push_back(*it); + if (m_locker.isLocked(*it)) { + m_locker.unlock(*it); + m_locker.store(); + } + } else { + failed.push_back(*it); + } + } else { + notInstalled.push_back(*it); + } + } + + if ( removed.size() ) { + cout << endl << "-- Packages removed" + << endl; + list<string>::const_iterator it = removed.begin(); + + for ( ; it != removed.end(); ++it ) { + cout << *it << endl; + } + } + + if ( failed.size() ) { + cout << endl << "-- Packages where removal failed" + << endl; + list<string>::const_iterator it = failed.begin(); + + for ( ; it != failed.end(); ++it ) { + cout << *it << endl; + } + } + + if ( notInstalled.size() ) { + cout << endl << "-- Packages which were not installed" + << endl; + list<string>::const_iterator it = notInstalled.begin(); + + for ( ; it != notInstalled.end(); ++it ) { + cout << *it << endl; + } + } + + if ( m_parser->isTest() ) { + cout << "*** " << m_appName << ": test mode end" << endl; + } + + + +} + +void PrtGet::assertMaxArgCount(int count) +{ + if ( m_parser->otherArgs().size() > count ) { + argCountFailure(count, "at most"); + } +} + +void PrtGet::assertExactArgCount(int count) +{ + if ( m_parser->otherArgs().size() != count ) { + argCountFailure(count, "exactly"); + } +} + +void PrtGet::assertMinArgCount(int count) +{ + if ( m_parser->otherArgs().size() < count ) { + argCountFailure(count, "at least"); + } +} + +void PrtGet::argCountFailure(int count, const string& specifier) +{ + cerr << m_appName << " " + << m_parser->commandName() << " takes " << specifier << " " + << count << (count > 1 ? " arguments" : " argument") << endl; + exit(PG_ARG_ERROR); +} + + +void PrtGet::printDependTree() +{ + assertExactArgCount(1); + + initRepo(); + + list<char*>::const_iterator it = m_parser->otherArgs().begin(); + string arg = *it; + const Package* p = m_repo->getPackage( arg ); + if (!p) { + cerr << "Package '" << arg << "' not found" << endl; + m_returnValue = PG_GENERAL_ERROR; + return; + } + + if (p->dependencies().length() > 0) { + + cout << "-- dependencies ([i] = installed"; + if (!m_parser->all()) { + cout << ", '-->' = seen before"; + } + cout << ")" << endl; + if ( m_pkgDB->isInstalled( *it ) ) { + cout << "[i] "; + } else { + cout << "[ ] "; + } + cout << p->name() << endl; + printDepsLevel(2, p); + } + +} + +void PrtGet::printDepsLevel(int indent, const Package* package) +{ + static map<string, bool> shownMap; + + list<string> deps; + StringHelper::split(package->dependencies(), ',', deps); + list<string>::iterator it = deps.begin(); + bool isAlias = false; + string aliasName = ""; + + for (; it != deps.end(); ++it) { + if ( m_pkgDB->isInstalled( *it, true, &isAlias, &aliasName ) ) { + cout << "[i] "; + } else { + cout << "[ ] "; + } + for (int i = 0; i < indent; ++i) { + cout << " "; + } + cout << *it; + if (isAlias) { + cout << " (provided by " << aliasName << ")"; + } + const Package* p = m_repo->getPackage( *it ); + if (p) { + if (p->dependencies().length() > 0) { + map<string, bool>::iterator shownIt = shownMap.find(*it); + if (shownIt != shownMap.end()) { + cout << " -->" << endl;; + } else { + cout << endl; + printDepsLevel(indent+2, p); + if (!m_parser->all()) { + shownMap[*it] = true; + } + } + } else { + cout << endl; + } + } else { + cout << " (not found in ports tree)" << endl; + } + } +} + +void PrtGet::dumpConfig() +{ + + cout.setf( ios::left, ios::adjustfield ); + cout.width( 20 ); + cout.fill( ' ' ); + cout << "Alias file: " << PkgDB::ALIAS_STORE << endl; + + cout.setf( ios::left, ios::adjustfield ); + cout.width( 20 ); + cout.fill( ' ' ); + cout << "Ext. dep. file: " + << Repository::EXTERNAL_DEPENDENCY_FILE << endl; + + + if (!m_parser->noStdConfig()) { + string fName = CONF_FILE; + if ( m_parser->isAlternateConfigGiven() ) { + fName = m_parser->alternateConfigFile(); + } + cout.setf( ios::left, ios::adjustfield ); + cout.width( 20 ); + cout.fill( ' ' ); + cout << "Configuration file: " << fName << endl; + } + + if (m_config->cacheFile() != "") { + cout.setf( ios::left, ios::adjustfield ); + cout.width( 20 ); + cout.fill( ' ' ); + cout << "Cache file: " << m_config->cacheFile() << endl; + } + if (m_config->makeCommand() != "") { + cout.setf( ios::left, ios::adjustfield ); + cout.width( 20 ); + cout.fill( ' ' ); + cout << "Make command file: " << m_config->makeCommand() << endl; + } + if (m_config->addCommand() != "") { + cout.setf( ios::left, ios::adjustfield ); + cout.width( 20 ); + cout.fill( ' ' ); + cout << "Add command: " << m_config->addCommand() << endl; + } + if (m_config->removeCommand() != "") { + cout.setf( ios::left, ios::adjustfield ); + cout.width( 20 ); + cout.fill( ' ' ); + cout << "Remove command: " << m_config->removeCommand() << endl; + } + if (m_config->runscriptCommand() != "") { + cout.setf( ios::left, ios::adjustfield ); + cout.width( 20 ); + cout.fill( ' ' ); + cout << "Runscript command: " << m_config->runscriptCommand() << endl; + } + + cout.setf( ios::left, ios::adjustfield ); + cout.width( 20 ); + cout.fill( ' ' ); + cout << "Run scripts: " <<(m_config->runScripts() ? "yes" : "no" ) + << endl; + + cout.setf( ios::left, ios::adjustfield ); + cout.width( 20 ); + cout.fill( ' ' ); + cout << "Keep higher version:" <<(m_config->preferHigher() ? "yes" : "no" ) + << endl; + + cout.setf( ios::left, ios::adjustfield ); + cout.width( 20 ); + cout.fill( ' ' ); + cout << "Readme mode: "; + switch (m_config->readmeMode()) { + case Configuration::VERBOSE_README: + cout << "verbose"; + break; + case Configuration::COMPACT_README: + cout << "compact"; + break; + case Configuration::NO_README: + cout << "off"; + break; + } + cout << endl; + + cout << endl; + + if (m_config->logFilePattern() != "") { + cout.setf( ios::left, ios::adjustfield ); + cout.width( 20 ); + cout.fill( ' ' ); + cout << "Log file: " << m_config->logFilePattern() << endl; + } + cout.setf( ios::left, ios::adjustfield ); + cout.width( 20 ); + cout.fill( ' ' ); + cout << " Write log: " << (m_config->writeLog() ? "yes" : "no" ) << endl; + cout.setf( ios::left, ios::adjustfield ); + cout.width( 20 ); + cout.fill( ' ' ); + cout << " Append log: " <<(m_config->appendLog() ? "yes" : "no" ) << endl; + + + + cout << endl; + list< pair<string, string> >::const_iterator it = + m_config->rootList().begin(); + cout << "Port " + << (m_config->rootList().size() == 1 ? "directory" : "directories") + << ": " << endl; + for (; it != m_config->rootList().end(); ++it) { + cout << " " << it->first; + if (it->second != "") { + cout << " (" << it->second << ")"; + } + cout << endl; + } +} Deleted: tools/prt-get/branches/prt-get-5.13/src/prtget.h =================================================================== --- tools/prt-get/trunk/src/prtget.h 2006-04-04 15:39:45 UTC (rev 1137) +++ tools/prt-get/branches/prt-get-5.13/src/prtget.h 2006-09-08 18:05:30 UTC (rev 1849) @@ -1,148 +0,0 @@ -//////////////////////////////////////////////////////////////////////// -// FILE: prtget.h -// AUTHOR: Johannes Winkelmann, jw@tks6.net -// COPYRIGHT: (c) 2002 by Johannes Winkelmann -// --------------------------------------------------------------------- -// 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. -//////////////////////////////////////////////////////////////////////// - -#ifndef _PRTGET_H_ -#define _PRTGET_H_ - -class Repository; -class ArgParser; -class Configuration; - -#include <list> -#include <utility> -#include <string> -using namespace std; - -#include "pkgdb.h" -#include "signaldispatcher.h" -#include "locker.h" -#include "installtransaction.h" - -/*! - \class PrtGet - \brief Main class - - This is prt-get's main class, controlling all the commands -*/ -class PrtGet - : public SignalHandler -{ -public: - - enum PGReturnStates { - PG_GENERAL_ERROR = -1, - PG_OK = 0, - PG_ARG_ERROR, - PG_INSTALL_ERROR, - PG_PARTIAL_INSTALL_ERROR - }; - - PrtGet( const ArgParser* parser ); - ~PrtGet(); - - void printVersion(); - void printUsage(); - - void listPackages(); - void listShadowed(); - void listInstalled(); - - void searchPackages( bool searchDesc=false ); - void printInfo(); - void isInstalled(); - void readme(); - - void install( bool update=false, - bool group=false, - bool dependencies=false ); - void sysup(); - void current(); - void printDepends( bool simpleListing=false ); - void printDependTree(); - void printDependendent(); - void printDiff(); - void printQuickDiff(); - - void createCache(); - - void printPath(); - void printf(); - - void cat(); - void ls(); - void edit(); - - void remove(); - - void setLock( bool lock ); - void listLocked(); - - void fsearch(); - - void dumpConfig(); - - bool greaterThan( const string& v1, const string& v2 ); - - int returnValue() const; - - SignalHandler::HandlerResult handleSignal( int signal ); - -protected: - - void printDepsLevel(int indent, const Package* package); - - void executeTransaction( InstallTransaction& transaction, - bool update, bool group ); - void evaluateResult( InstallTransaction& transaction, - bool update, - bool interrupted=false ); - void reportPrePost(const InstallTransaction::InstallInfo& info); - - void readConfig(); - void initRepo( bool listDuplicate=false ); - - void expandWildcardsPkgDB( const list<char*>& in, - map<string, string>& target ); - void expandWildcardsRepo( const list<char*>& in, - list<string>& target ); - - void warnPackageNotFound(InstallTransaction& transaction); - - Repository* m_repo; - PkgDB* m_pkgDB; - Configuration* m_config; - InstallTransaction* m_currentTransaction; - - Locker m_locker; - - const ArgParser* m_parser; - string m_appName; - string m_cacheFile; - - int m_returnValue; - - bool m_useRegex; - - /*! Name of default configuration file */ - static const string CONF_FILE; - - /*! Name of default cache file */ - static const string DEFAULT_CACHE_FILE; - - - void assertMinArgCount(int count); - void assertMaxArgCount(int count); - void assertExactArgCount(int count); - void argCountFailure(int count, const string& specifier); - -}; - -#endif /* _PRTGET_H_ */ Copied: tools/prt-get/branches/prt-get-5.13/src/prtget.h (from rev 1806, tools/prt-get/trunk/src/prtget.h) =================================================================== --- tools/prt-get/branches/prt-get-5.13/src/prtget.h (rev 0) +++ tools/prt-get/branches/prt-get-5.13/src/prtget.h 2006-09-08 18:05:30 UTC (rev 1849) @@ -0,0 +1,161 @@ +//////////////////////////////////////////////////////////////////////// +// FILE: prtget.h +// AUTHOR: Johannes Winkelmann, jw@tks6.net +// COPYRIGHT: (c) 2002 by Johannes Winkelmann +// --------------------------------------------------------------------- +// 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. +//////////////////////////////////////////////////////////////////////// + +#ifndef _PRTGET_H_ +#define _PRTGET_H_ + +class Repository; +class ArgParser; +class Configuration; + +#include <list> +#include <utility> +#include <string> +using namespace std; + +#include "pkgdb.h" +#include "signaldispatcher.h" +#include "locker.h" +#include "installtransaction.h" +#include "versioncomparator.h" + +/*! + \class PrtGet + \brief Main class + + This is prt-get's main class, controlling all the commands +*/ +class PrtGet + : public SignalHandler +{ +public: + + enum PGReturnStates { + PG_GENERAL_ERROR = -1, + PG_OK = 0, + PG_ARG_ERROR, + PG_INSTALL_ERROR, + PG_PARTIAL_INSTALL_ERROR + }; + + PrtGet( const ArgParser* parser ); + ~PrtGet(); + + void printVersion(); + void printUsage(); + + void listPackages(); + void listShadowed(); + void listInstalled(); + + void searchPackages( bool searchDesc=false ); + void printInfo(); + void isInstalled(); + void readme(); + + void install( bool update=false, + bool group=false, + bool dependencies=false ); + void sysup(); + void current(); + void printDepends( bool simpleListing=false ); + void printDependTree(); + void printDependent(); + void printDiff(); + void printQuickDiff(); + void listOrphans(); + + void createCache(); + + void printPath(); + void printf(); + + void cat(); + void ls(); + void edit(); + + void remove(); + + void setLock( bool lock ); + void listLocked(); + + void fsearch(); + + void dumpConfig(); + + int returnValue() const; + + SignalHandler::HandlerResult handleSignal( int signal ); + +protected: + + void printDepsLevel(int indent, const Package* package); + + void printDependent(const std::string& dep, int level); + + void executeTransaction( InstallTransaction& transaction, + bool update, bool group ); + void evaluateResult( InstallTransaction& transaction, + bool update, + bool interrupted=false ); + void reportPrePost(const InstallTransaction::InstallInfo& info); + + void readConfig(); + void initRepo( bool listDuplicate=false ); + + void expandWildcardsPkgDB( const list<char*>& in, + map<string, string>& target ); + void expandWildcardsRepo( const list<char*>& in, + list<string>& target ); + + void warnPackageNotFound(InstallTransaction& transaction); + + static void printFormattedDiffLine(const string& name, + const string& version1, + const string& version2, + bool locked); + + + Repository* m_repo; + PkgDB* m_pkgDB; + Configuration* m_config; + InstallTransaction* m_currentTransaction; + + Locker m_locker; + + const ArgParser* m_parser; + string m_appName; + string m_cacheFile; + + int m_returnValue; + + bool m_useRegex; + + /*! Name of default configuration file */ + static const string CONF_FILE; + + /*! Name of default cache file */ + static const string DEFAULT_CACHE_FILE; + + + void assertMinArgCount(int count); + void assertMaxArgCount(int count); + void assertExactArgCount(int count); + void argCountFailure(int count, const string& specifier); + + VersionComparator::COMP_RESULT + compareVersions( const string& v1, const string& v2 ); + static bool printFile(const string& file); + + std::list< std::pair<const Package*, std::string> > m_undefinedVersionComp; +}; + +#endif /* _PRTGET_H_ */ Deleted: tools/prt-get/branches/prt-get-5.13/src/repository.cpp =================================================================== --- tools/prt-get/trunk/src/repository.cpp 2006-04-04 15:39:45 UTC (rev 1137) +++ tools/prt-get/branches/prt-get-5.13/src/repository.cpp 2006-09-08 18:05:30 UTC (rev 1849) @@ -1,447 +0,0 @@ -//////////////////////////////////////////////////////////////////////// -// FILE: repository.cpp -// AUTHOR: Johannes Winkelmann, jw@tks6.net -// COPYRIGHT: (c) 2002 by Johannes Winkelmann -// --------------------------------------------------------------------- -// 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. -//////////////////////////////////////////////////////////////////////// - -#include <cstdio> -#include <cstring> -#include <iostream> -#include <algorithm> -#include <vector> -using namespace std; - - -#include <sys/types.h> -#include <sys/stat.h> -#include <dirent.h> -#include <unistd.h> -#include <fnmatch.h> - -#include "datafileparser.h" -#include "repository.h" -#include "stringhelper.h" -#include "pg_regex.h" -using namespace StringHelper; - - -const string Repository::CACHE_VERSION = "V5"; -const string Repository::EXTERNAL_DEPENDENCY_FILE = - LOCALSTATEDIR"/lib/pkg/prt-get.deplist"; - -/*! - Create a repository -*/ -Repository::Repository(bool useRegex) - : m_useRegex(useRegex) -{ -} - -/*! - Destroy a repository -*/ -Repository::~Repository() -{ - map<string, Package*>::const_iterator it = m_packageMap.begin(); - for ( ; it != m_packageMap.end(); ++it ) { - delete it->second; - } -} - - -/*! - \return a map of available packages -*/ -const map<string, Package*>& Repository::packages() const -{ - return m_packageMap; -} - - -/*! - Returns a map of duplicate packages in the repository. The key is the name - of the package, the value a pair where \a first the shadowed port and - \a second is the port which preceeds over \a first - \return a map of duplicate packages in the repository -*/ -const map<string, pair<string, string> >& Repository::shadowedPackages() const -{ - return m_shadowedPackages; -} - - -void Repository::parseDependencyList() -{ - map<string, string> depMap; - if (DataFileParser::parse(EXTERNAL_DEPENDENCY_FILE, depMap)) { - addDependencies(depMap); - } -} - - -/*! - \param name the package name to be returned - \return a Package pointer for a package name or 0 if not found -*/ -const Package* Repository::getPackage( const string& name ) const -{ - map<string, Package*>::const_iterator it = m_packageMap.find( name ); - if ( it == m_packageMap.end() ) { - return 0; - } - return it->second; -} - - -/*! - Search packages for a match of \a pattern in name, and description of - \a searchDesc is true. - \note Name searches can often done without opening the Pkgfiles, but not - description search. Therefore, the later is much slower - - \param pattern the pattern to be found - \param searchDesc whether descriptions should be searched as well - \return a list of matching packages -*/ - -void Repository::searchMatchingPackages( const string& pattern, - list<Package*>& target, - bool searchDesc ) const - // note: searchDesc true will read _every_ Pkgfile -{ - map<string, Package*>::const_iterator it = m_packageMap.begin(); - if (m_useRegex) { - RegEx re(pattern); - for ( ; it != m_packageMap.end(); ++it ) { - if (re.match(it->first)) { - target.push_back( it->second ); - } else if ( searchDesc ) { - if ( re.match(it->second->description())) { - target.push_back( it->second ); - } - } - } - } else { - for ( ; it != m_packageMap.end(); ++it ) { - if ( it->first.find( pattern ) != string::npos ) { - target.push_back( it->second ); - } else if (searchDesc ) { - string s = toLowerCase( it->second->description() ); - if ( s.find( toLowerCase( pattern ) ) != string::npos ) { - target.push_back( it->second ); - } - } - } - } -} - - -/*! - init repository by reading the directories passed. Doesn't search - recursively, so if you want /dir and /dir/subdir checked, you have to - specify both - - \param rootList a list of directories to look for ports in - \param listDuplicate whether duplicates should registered (slower) -*/ -void Repository::initFromFS( const list< pair<string, string> >& rootList, - bool listDuplicate ) -{ - list< pair<string, string> >::const_iterator it = rootList.begin(); - DIR* d; - struct dirent* de; - string name; - - std::map<string, bool> alreadyChecked; - - - for ( ; it != rootList.end(); ++it ) { - - string path = it->first; - string pkgInput = stripWhiteSpace( it->second ); - - if ( alreadyChecked[path] ) { - continue; - } - - bool filter = false; - if ( pkgInput.length() > 0 ) { - filter = true; - // create a proper input string - while ( pkgInput.find( " " ) != string::npos ) { - pkgInput = pkgInput.replace( pkgInput.find(" "), 1, "," ); - } - while ( pkgInput.find( "\t" ) != string::npos ) { - pkgInput = pkgInput.replace( pkgInput.find("\t"), 1, "," ); - } - while ( pkgInput.find( ",," ) != string::npos ) { - pkgInput = pkgInput.replace( pkgInput.find(",,"), 2, "," ); - } - } - - if (!filter) { - alreadyChecked[path] = true; - } - - list<string> packages; - split( pkgInput, ',', packages ); - - - - // TODO: think about whether it would be faster (more - // efficient) to put all packages into a map, and the iterate - // over the list of allowed packages and copy them - // over. depending in the efficiency of find(), this might be - // faster - d = opendir( path.c_str() ); - while ( ( de = readdir( d ) ) != NULL ) { - name = de->d_name; - - // TODO: review this - struct stat buf; - if ( stat( (path + "/" + name + "/Pkgfile").c_str(), &buf ) - != 0 ) { - // no Pkgfile -> no port - continue; - } - - if ( filter && find( packages.begin(), - packages.end(), name ) == packages.end() ) { - // not found -> ignore this port - continue; - } - - if ( name != "." && name != ".." ) { - - map<string, Package*>::iterator hidden; - hidden = m_packageMap.find( name ); - Package* p = new Package( name, path ); - if ( p ) { - if ( hidden == m_packageMap.end() ) { - // no such package found, add - m_packageMap[name] = p; - } else if ( listDuplicate ) { - Package* old = hidden->second; - string ps = p->path() + "/" + p->name() + - "-" + p->version(); - string os = old->path() + "/" + old->name() + - "-" + old->version(); - m_shadowedPackages[name] = make_pair( ps, os ); - } - } - } - } - closedir( d ); - } - - parseDependencyList(); -} - -/*! - Init from a cache file - \param cacheFile the name of the cache file to be parser - \return true on success, false indicates file opening problems -*/ -Repository::CacheReadResult -Repository::initFromCache( const string& cacheFile ) -{ - FILE* fp = fopen( cacheFile.c_str(), "r" ); - if ( !fp ) { - return ACCESS_ERR; - } - - const int length = BUFSIZ; - char input[length]; - string line; - - // read version - if ( fgets( input, length, fp ) ) { - line = stripWhiteSpace( input ); - if ( line != CACHE_VERSION ) { - return FORMAT_ERR; - } - } - - // FIELDS: - // name, path, version, release, - // description, dependencies, url, - // packager, maintainer, hasReadme; - // hasPreInstall, hasPostInstall - const int fieldCount = 12; - string fields[fieldCount]; - int fieldPos = 0; - - while ( fgets( input, length, fp ) ) { - line = StringHelper::stripWhiteSpace( input ); - - fields[fieldPos] = line; - ++fieldPos; - if ( fieldPos == fieldCount ) { - fieldPos = 0; - Package* p = new Package( fields[0], fields[1], - fields[2], fields[3], - fields[4], fields[5], fields[6], - fields[7], fields[8], fields[9], - fields[10], fields[11]); - m_packageMap[p->name()] = p; - fgets( input, length, fp ); // read empty line - } - } - fclose( fp ); - - parseDependencyList(); - - return READ_OK; -} - -/*! - Store repository data in a cache file - \param cacheFile the file where the data is stored - \return whether the operation was successfully -*/ -Repository::WriteResult Repository::writeCache( const string& cacheFile ) -{ - string path = cacheFile; - string::size_type pos = cacheFile.rfind( '/' ); - if ( pos != string::npos ) { - path = path.erase( pos ); - } - if ( !createOutputDir( path ) ) { - return DIR_ERR; - } - - FILE* fp = fopen( cacheFile.c_str(), "w" ); - if ( !fp ) { - return FILE_ERR; - } - - map<string, Package*>::const_iterator it = m_packageMap.begin(); - - char yesStr[] = "yes"; - char noStr[] = "no"; - char* hasReadme; - char* hasPreInstall; - char* hasPostInstall; - - // write version - fprintf( fp, "%s\n", CACHE_VERSION.c_str() ); - - for ( ; it != m_packageMap.end(); ++it ) { - const Package* p = it->second; - - // TODO: encode - hasReadme = noStr; - if ( p->hasReadme() ) { - hasReadme = yesStr; - } - - hasPreInstall = noStr; - if ( p->hasPreInstall() ) { - hasPreInstall = yesStr; - } - - hasPostInstall = noStr; - if ( p->hasPostInstall() ) { - hasPostInstall = yesStr; - } - - fprintf( fp, "%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n\n", - p->name().c_str(), - p->path().c_str(), - p->version().c_str(), - - p->release().c_str(), - p->description().c_str(), - p->dependencies().c_str(), - p->url().c_str(), - p->packager().c_str(), - p->maintainer().c_str(), - hasReadme, hasPreInstall, hasPostInstall ); - } - - fclose( fp ); - return SUCCESS; -} - -/*! - create all components of \path which don't exist - \param path the path to be created - \return true on success. false indicates permission problems - */ -bool Repository::createOutputDir( const string& path ) -{ - list<string> dirs; - split( path, '/', dirs, 1 ); - string tmpPath; - - for ( list<string>::iterator it = dirs.begin(); it != dirs.end(); ++it ) { - - tmpPath += *it + "/"; - DIR* d; - if ( ( d = opendir( tmpPath.c_str() ) ) == NULL ) { - // doesn't exist - if ( mkdir( tmpPath.c_str(), 0755 ) == -1 ) { - cout << "- can't create output directory " << tmpPath - << endl; - return false; - } - } else { - closedir( d ); - } - - } - return true; -} - - -/*! - Search packages for a match of \a pattern in name. The name can - contain shell wildcards. - - \param pattern the pattern to be found - \return a list of matching packages -*/ - -void Repository::getMatchingPackages( const string& pattern, - list<Package*>& target ) const -{ - map<string, Package*>::const_iterator it = m_packageMap.begin(); - RegEx re(pattern); - - if (m_useRegex) { - for ( ; it != m_packageMap.end(); ++it ) { - if (re.match(it->first)) { - target.push_back( it->second ); - } - } - } else { - for ( ; it != m_packageMap.end(); ++it ) { - // I assume fnmatch will be quite fast for "match all" (*), so - // I didn't add a boolean to check for this explicitely - if ( fnmatch( pattern.c_str(), it->first.c_str(), 0 ) == 0 ) { - target.push_back( it->second ); - } - } - } -} - -void Repository::addDependencies( std::map<string, string>& deps ) -{ - map<string, string>::iterator it = deps.begin(); - for ( ; it != deps.end(); ++it ) { - map<string, Package*>::const_iterator pit = - m_packageMap.find( it->first ); - if ( pit != m_packageMap.end() ) { - Package* p = pit->second; - if (p->dependencies().length() == 0) { - // only use if no dependencies in Pkgfile - p->setDependencies(it->second); - } - } - } -} Copied: tools/prt-get/branches/prt-get-5.13/src/repository.cpp (from rev 1839, tools/prt-get/trunk/src/repository.cpp) =================================================================== --- tools/prt-get/branches/prt-get-5.13/src/repository.cpp (rev 0) +++ tools/prt-get/branches/prt-get-5.13/src/repository.cpp 2006-09-08 18:05:30 UTC (rev 1849) @@ -0,0 +1,452 @@ +//////////////////////////////////////////////////////////////////////// +// FILE: repository.cpp +// AUTHOR: Johannes Winkelmann, jw@tks6.net +// COPYRIGHT: (c) 2002 by Johannes Winkelmann +// --------------------------------------------------------------------- +// 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. +//////////////////////////////////////////////////////////////////////// + +#include <cstdio> +#include <cstring> +#include <iostream> +#include <algorithm> +#include <vector> +using namespace std; + + +#include <sys/types.h> +#include <sys/stat.h> +#include <dirent.h> +#include <unistd.h> +#include <fnmatch.h> + +#include "datafileparser.h" +#include "repository.h" +#include "stringhelper.h" +#include "pg_regex.h" +using namespace StringHelper; + + +const string Repository::CACHE_VERSION = "V5"; +const string Repository::EXTERNAL_DEPENDENCY_FILE = + LOCALSTATEDIR"/lib/pkg/prt-get.deplist"; + +/*! + Create a repository +*/ +Repository::Repository(bool useRegex) + : m_useRegex(useRegex) +{ +} + +/*! + Destroy a repository +*/ +Repository::~Repository() +{ + map<string, Package*>::const_iterator it = m_packageMap.begin(); + for ( ; it != m_packageMap.end(); ++it ) { + delete it->second; + } +} + + +/*! + \return a map of available packages +*/ +const map<string, Package*>& Repository::packages() const +{ + return m_packageMap; +} + + +/*! + Returns a sorted list of duplicate packages in the repository. + In the pairs \a first is the shadowed port and + \a second is the port which preceeds over \a first + \return a list of duplicate packages in the repository +*/ +const list< pair<Package*, Package*> >& Repository::shadowedPackages() const +{ + return m_shadowedPackages; +} + + +void Repository::parseDependencyList() +{ + map<string, string> depMap; + if (DataFileParser::parse(EXTERNAL_DEPENDENCY_FILE, depMap)) { + addDependencies(depMap); + } +} + + +/*! + \param name the package name to be returned + \return a Package pointer for a package name or 0 if not found +*/ +const Package* Repository::getPackage( const string& name ) const +{ + map<string, Package*>::const_iterator it = m_packageMap.find( name ); + if ( it == m_packageMap.end() ) { + return 0; + } + return it->second; +} + + +/*! + Search packages for a match of \a pattern in name, and description of + \a searchDesc is true. + \note Name searches can often done without opening the Pkgfiles, but not + description search. Therefore, the later is much slower + + \param pattern the pattern to be found + \param searchDesc whether descriptions should be searched as well + \return a list of matching packages +*/ + +void Repository::searchMatchingPackages( const string& pattern, + list<Package*>& target, + bool searchDesc ) const + // note: searchDesc true will read _every_ Pkgfile +{ + map<string, Package*>::const_iterator it = m_packageMap.begin(); + if (m_useRegex) { + RegEx re(pattern); + for ( ; it != m_packageMap.end(); ++it ) { + if (re.match(it->first)) { + target.push_back( it->second ); + } else if ( searchDesc ) { + if ( re.match(it->second->description())) { + target.push_back( it->second ); + } + } + } + } else { + for ( ; it != m_packageMap.end(); ++it ) { + if ( it->first.find( pattern ) != string::npos ) { + target.push_back( it->second ); + } else if (searchDesc ) { + string s = toLowerCase( it->second->description() ); + if ( s.find( toLowerCase( pattern ) ) != string::npos ) { + target.push_back( it->second ); + } + } + } + } +} + +int Repository::compareShadowPair(pair<Package*, Package*>& p1, + pair<Package*, Package*>& p2) +{ + return p1.second->name() < p2.second->name(); +} + + +/*! + init repository by reading the directories passed. Doesn't search + recursively, so if you want /dir and /dir/subdir checked, you have to + specify both + + \param rootList a list of directories to look for ports in + \param listDuplicate whether duplicates should registered (slower) +*/ +void Repository::initFromFS( const list< pair<string, string> >& rootList, + bool listDuplicate ) +{ + list< pair<string, string> >::const_iterator it = rootList.begin(); + DIR* d; + struct dirent* de; + string name; + + std::map<string, bool> alreadyChecked; + + + for ( ; it != rootList.end(); ++it ) { + + string path = it->first; + string pkgInput = stripWhiteSpace( it->second ); + + if ( alreadyChecked[path] ) { + continue; + } + + bool filter = false; + if ( pkgInput.length() > 0 ) { + filter = true; + // create a proper input string + while ( pkgInput.find( " " ) != string::npos ) { + pkgInput = pkgInput.replace( pkgInput.find(" "), 1, "," ); + } + while ( pkgInput.find( "\t" ) != string::npos ) { + pkgInput = pkgInput.replace( pkgInput.find("\t"), 1, "," ); + } + while ( pkgInput.find( ",," ) != string::npos ) { + pkgInput = pkgInput.replace( pkgInput.find(",,"), 2, "," ); + } + } + + if (!filter) { + alreadyChecked[path] = true; + } + + list<string> packages; + split( pkgInput, ',', packages ); + + + + // TODO: think about whether it would be faster (more + // efficient) to put all packages into a map, and the iterate + // over the list of allowed packages and copy them + // over. depending in the efficiency of find(), this might be + // faster + d = opendir( path.c_str() ); + while ( ( de = readdir( d ) ) != NULL ) { + name = de->d_name; + + // TODO: review this + struct stat buf; + if ( stat( (path + "/" + name + "/Pkgfile").c_str(), &buf ) + != 0 ) { + // no Pkgfile -> no port + continue; + } + + if ( filter && find( packages.begin(), + packages.end(), name ) == packages.end() ) { + // not found -> ignore this port + continue; + } + + if ( name != "." && name != ".." ) { + + map<string, Package*>::iterator hidden; + hidden = m_packageMap.find( name ); + Package* p = new Package( name, path ); + if ( p ) { + if ( hidden == m_packageMap.end() ) { + // no such package found, add + m_packageMap[name] = p; + } else if ( listDuplicate ) { + m_shadowedPackages.push_back( + make_pair( p, hidden->second )); + } else { + delete p; + } + } + } + } + closedir( d ); + } + + m_shadowedPackages.sort(compareShadowPair); + parseDependencyList(); +} + +/*! + Init from a cache file + \param cacheFile the name of the cache file to be parser + \return true on success, false indicates file opening problems +*/ +Repository::CacheReadResult +Repository::initFromCache( const string& cacheFile ) +{ + FILE* fp = fopen( cacheFile.c_str(), "r" ); + if ( !fp ) { + return ACCESS_ERR; + } + + const int length = BUFSIZ; + char input[length]; + string line; + + // read version + if ( fgets( input, length, fp ) ) { + line = stripWhiteSpace( input ); + if ( line != CACHE_VERSION ) { + return FORMAT_ERR; + } + } + + // FIELDS: + // name, path, version, release, + // description, dependencies, url, + // packager, maintainer, hasReadme; + // hasPreInstall, hasPostInstall + const int fieldCount = 12; + string fields[fieldCount]; + int fieldPos = 0; + + while ( fgets( input, length, fp ) ) { + line = StringHelper::stripWhiteSpace( input ); + + fields[fieldPos] = line; + ++fieldPos; + if ( fieldPos == fieldCount ) { + fieldPos = 0; + Package* p = new Package( fields[0], fields[1], + fields[2], fields[3], + fields[4], fields[5], fields[6], + fields[7], fields[8], fields[9], + fields[10], fields[11]); + m_packageMap[p->name()] = p; + fgets( input, length, fp ); // read empty line + } + } + fclose( fp ); + + parseDependencyList(); + + return READ_OK; +} + +/*! + Store repository data in a cache file + \param cacheFile the file where the data is stored + \return whether the operation was successfully +*/ +Repository::WriteResult Repository::writeCache( const string& cacheFile ) +{ + string path = cacheFile; + string::size_type pos = cacheFile.rfind( '/' ); + if ( pos != string::npos ) { + path = path.erase( pos ); + } + if ( !createOutputDir( path ) ) { + return DIR_ERR; + } + + FILE* fp = fopen( cacheFile.c_str(), "w" ); + if ( !fp ) { + return FILE_ERR; + } + + map<string, Package*>::const_iterator it = m_packageMap.begin(); + + char yesStr[] = "yes"; + char noStr[] = "no"; + char* hasReadme; + char* hasPreInstall; + char* hasPostInstall; + + // write version + fprintf( fp, "%s\n", CACHE_VERSION.c_str() ); + + for ( ; it != m_packageMap.end(); ++it ) { + const Package* p = it->second; + + // TODO: encode + hasReadme = noStr; + if ( p->hasReadme() ) { + hasReadme = yesStr; + } + + hasPreInstall = noStr; + if ( p->hasPreInstall() ) { + hasPreInstall = yesStr; + } + + hasPostInstall = noStr; + if ( p->hasPostInstall() ) { + hasPostInstall = yesStr; + } + + fprintf( fp, "%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n%s\n\n", + p->name().c_str(), + p->path().c_str(), + p->version().c_str(), + + p->release().c_str(), + p->description().c_str(), + p->dependencies().c_str(), + p->url().c_str(), + p->packager().c_str(), + p->maintainer().c_str(), + hasReadme, hasPreInstall, hasPostInstall ); + } + + fclose( fp ); + return SUCCESS; +} + +/*! + create all components of \path which don't exist + \param path the path to be created + \return true on success. false indicates permission problems + */ +bool Repository::createOutputDir( const string& path ) +{ + list<string> dirs; + split( path, '/', dirs, 1 ); + string tmpPath; + + for ( list<string>::iterator it = dirs.begin(); it != dirs.end(); ++it ) { + + tmpPath += *it + "/"; + DIR* d; + if ( ( d = opendir( tmpPath.c_str() ) ) == NULL ) { + // doesn't exist + if ( mkdir( tmpPath.c_str(), 0755 ) == -1 ) { + cout << "- can't create output directory " << tmpPath + << endl; + return false; + } + } else { + closedir( d ); + } + + } + return true; +} + + +/*! + Search packages for a match of \a pattern in name. The name can + contain shell wildcards. + + \param pattern the pattern to be found + \return a list of matching packages +*/ + +void Repository::getMatchingPackages( const string& pattern, + list<Package*>& target ) const +{ + map<string, Package*>::const_iterator it = m_packageMap.begin(); + RegEx re(pattern); + + if (m_useRegex) { + for ( ; it != m_packageMap.end(); ++it ) { + if (re.match(it->first)) { + target.push_back( it->second ); + } + } + } else { + for ( ; it != m_packageMap.end(); ++it ) { + // I assume fnmatch will be quite fast for "match all" (*), so + // I didn't add a boolean to check for this explicitely + if ( fnmatch( pattern.c_str(), it->first.c_str(), 0 ) == 0 ) { + target.push_back( it->second ); + } + } + } +} + +void Repository::addDependencies( std::map<string, string>& deps ) +{ + map<string, string>::iterator it = deps.begin(); + for ( ; it != deps.end(); ++it ) { + map<string, Package*>::const_iterator pit = + m_packageMap.find( it->first ); + if ( pit != m_packageMap.end() ) { + Package* p = pit->second; + if (p->dependencies().length() == 0) { + // only use if no dependencies in Pkgfile + p->setDependencies(it->second); + } + } + } +} Deleted: tools/prt-get/branches/prt-get-5.13/src/repository.h =================================================================== --- tools/prt-get/trunk/src/repository.h 2006-04-04 15:39:45 UTC (rev 1137) +++ tools/prt-get/branches/prt-get-5.13/src/repository.h 2006-09-08 18:05:30 UTC (rev 1849) @@ -1,81 +0,0 @@ -//////////////////////////////////////////////////////////////////////// -// FILE: repository.h -// AUTHOR: Johannes Winkelmann, jw@tks6.net -// COPYRIGHT: (c) 2002 by Johannes Winkelmann -// --------------------------------------------------------------------- -// 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. -//////////////////////////////////////////////////////////////////////// - -#ifndef _REPOSITORY_H_ -#define _REPOSITORY_H_ - -#include <string> -#include <list> -#include <map> -#include <utility> -using namespace std; - -#include "package.h" - -/*! - \class Repository - \brief Repository of available ports - - The repository is an abstraction of the available ports in the ports tree -*/ -class Repository -{ -public: - Repository(bool useRegex); - ~Repository(); - - const Package* getPackage( const string& name ) const; - const map<string, Package*>& packages() const; - const map<string, pair<string, string> >& shadowedPackages() const; - - void searchMatchingPackages( const string& pattern, - list<Package*>& target, - bool searchDesc ) const; - - void getMatchingPackages( const string& pattern, - list<Package*>& target ) const; - - void initFromFS( const list< pair<string, string> >& rootList, - bool listDuplicate ); - - - /*! Result of a cache write operation */ - enum CacheReadResult { - ACCESS_ERR, /*!< Error creating/accessing the file */ - FORMAT_ERR, /*!< bad/old format */ - READ_OK /*!< Success */ - }; - CacheReadResult initFromCache( const string& cacheFile ); - - /*! Result of a cache write operation */ - enum WriteResult { - DIR_ERR, /*!< Error creating/accessing the directory */ - FILE_ERR, /*!< Error creating/accessing the file */ - SUCCESS /*!< Success */ - }; - WriteResult writeCache( const string& cacheFile ); - - static bool createOutputDir( const string& path ); - void addDependencies( std::map<string, string>& deps ); - - static const std::string EXTERNAL_DEPENDENCY_FILE; - -private: - static const std::string CACHE_VERSION; - bool m_useRegex; - - void parseDependencyList(); - - map<string, pair<string, string> > m_shadowedPackages; - map<string, Package*> m_packageMap; -}; - -#endif /* _REPOSITORY_H_ */ Copied: tools/prt-get/branches/prt-get-5.13/src/repository.h (from rev 1839, tools/prt-get/trunk/src/repository.h) =================================================================== --- tools/prt-get/branches/prt-get-5.13/src/repository.h (rev 0) +++ tools/prt-get/branches/prt-get-5.13/src/repository.h 2006-09-08 18:05:30 UTC (rev 1849) @@ -0,0 +1,84 @@ +//////////////////////////////////////////////////////////////////////// +// FILE: repository.h +// AUTHOR: Johannes Winkelmann, jw@tks6.net +// COPYRIGHT: (c) 2002 by Johannes Winkelmann +// --------------------------------------------------------------------- +// 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. +//////////////////////////////////////////////////////////////////////// + +#ifndef _REPOSITORY_H_ +#define _REPOSITORY_H_ + +#include <string> +#include <list> +#include <map> +#include <utility> +using namespace std; + +#include "package.h" + +/*! + \class Repository + \brief Repository of available ports + + The repository is an abstraction of the available ports in the ports tree +*/ +class Repository +{ +public: + Repository(bool useRegex); + ~Repository(); + + const Package* getPackage( const string& name ) const; + const map<string, Package*>& packages() const; + const list<pair<Package*, Package*> >& shadowedPackages() const; + + void searchMatchingPackages( const string& pattern, + list<Package*>& target, + bool searchDesc ) const; + + void getMatchingPackages( const string& pattern, + list<Package*>& target ) const; + + void initFromFS( const list< pair<string, string> >& rootList, + bool listDuplicate ); + + + /*! Result of a cache write operation */ + enum CacheReadResult { + ACCESS_ERR, /*!< Error creating/accessing the file */ + FORMAT_ERR, /*!< bad/old format */ + READ_OK /*!< Success */ + }; + CacheReadResult initFromCache( const string& cacheFile ); + + /*! Result of a cache write operation */ + enum WriteResult { + DIR_ERR, /*!< Error creating/accessing the directory */ + FILE_ERR, /*!< Error creating/accessing the file */ + SUCCESS /*!< Success */ + }; + WriteResult writeCache( const string& cacheFile ); + + static bool createOutputDir( const string& path ); + void addDependencies( std::map<string, string>& deps ); + + static const std::string EXTERNAL_DEPENDENCY_FILE; + +private: + static int compareShadowPair(pair<Package*, Package*>& p1, + pair<Package*, Package*>& p2); + + static const std::string CACHE_VERSION; + bool m_useRegex; + + void parseDependencyList(); + + list<pair<Package*, Package*> > m_shadowedPackages; + map<string, Package*> m_packageMap; +}; + +#endif /* _REPOSITORY_H_ */ Deleted: tools/prt-get/branches/prt-get-5.13/src/versioncomparator.cpp =================================================================== --- tools/prt-get/trunk/src/versioncomparator.cpp 2006-04-04 15:39:45 UTC (rev 1137) +++ tools/prt-get/branches/prt-get-5.13/src/versioncomparator.cpp 2006-09-08 18:05:30 UTC (rev 1849) @@ -1,250 +0,0 @@ -//////////////////////////////////////////////////////////////////////// -// FILE: versioncomparator.cpp -// AUTHOR: Johannes Winkelmann, jw@tks6.net -// COPYRIGHT: (c) 2004 by Johannes Winkelmann -// --------------------------------------------------------------------- -// 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. -//////////////////////////////////////////////////////////////////////// - -// Get a test application with the following command: -// g++ -o vcomp -DTEST stringhelper.cpp versioncomparator.cpp - - -#include <string> -#include <cctype> -#include <vector> -#include <iostream> -using namespace std; - -#include "stringhelper.h" -using namespace StringHelper; - -#include "versioncomparator.h" - -namespace VersionComparator -{ - -// this is a one day hack; I'll refactor that to be nicer, clearer and -// hopefully faster. It should work pretty well though - -COMP_RESULT compareVersions(const string& v1, const string& v2) -{ - vector<string> blocks1; - vector<string> blocks2; - - tokenizeIntoBlocks(v1, blocks1); - tokenizeIntoBlocks(v2, blocks2); - int blockLen = normalizeVectors(blocks1, blocks2); - - for (int i = 0; i < blockLen; ++i) { - vector<string> tokens1; - vector<string> tokens2; - split(blocks1[i], '.', tokens1); - split(blocks2[i], '.', tokens2); - int tokLen = normalizeVectors(tokens1, tokens2); - - for (int j = 0; j < tokLen; ++j) { - if (tokens1[j] == tokens2[j]) { - continue; - } - - char* error1 = 0; - char* error2 = 0; - error1 = 0; - error2 = 0; - long vl1 = strtol(tokens1[j].c_str(), &error1, 10); - long vl2 = strtol(tokens2[j].c_str(), &error2, 10); - - if (*error1 != 0 || *error2 != 0) { - // subtokenize - vector<string> subtokens1; - vector<string> subtokens2; - - tokenizeMixed(tokens1[j], subtokens1); - tokenizeMixed(tokens2[j], subtokens2); - int subTokLen = normalizeVectors(subtokens1, subtokens2); - for (int k = 0; k < subTokLen; ++k) { - if (isdigit(subtokens1[k][0])) { - long sl1 = strtol(subtokens1[k].c_str(), &error1, 10); - long sl2 = strtol(subtokens2[k].c_str(), &error2, 10); - - if (sl1 < sl2) { - return LESS; - } else if (sl1 > sl2) { - return GREATER; - } - } else { - // pure string tokens - if (subtokens1[k][1] == 0 && subtokens2[k][1] == 0) { - - if (subtokens1[k][0] < subtokens2[k][0]) { - return LESS; - } else if (subtokens1[k][0] > subtokens2[k][0]) { - return GREATER; - } - } else { - // smart guessing... - // leaving out 'test', 'pre' and 'rc' - static const string versions = - "alpha beta gamma delta"; - string::size_type pos1 = - versions.find(subtokens1[k]); - string::size_type pos2 = - versions.find(subtokens2[k]); - if (pos1 != string::npos && pos2 != string::npos) { - if (pos1 < pos2) { - return LESS; - } else if (pos1 > pos2) { - return GREATER; - } - } - } - - if (subtokens1[k] != subtokens2[k]) { - return UNDEFINED; - } - } - } - - } else if (vl1 < vl2) { - return LESS; - } else if (vl1 > vl2) { - return GREATER; - } - } - } - - - return EQUAL; -} - -int normalizeVectors(vector<string>& v1, vector<string>& v2) -{ - int length = max(v1.size(), v2.size()); - - while (v1.size() < length) { - v1.push_back("-1"); - } - while (v2.size() < length) { - v2.push_back("-1"); - } - - return length; -} - -void tokenizeMixed(const string& s, vector<string>& tokens) -{ - vector<bool> digitMask; - for (int i = 0; i < s.length(); ++i) { - digitMask.push_back(isdigit(s[i])); - } - - bool state = digitMask[0]; - string tok; - tok = s[0]; - for (int i = 1; i < digitMask.size(); ++i) { - if (digitMask[i] != state) { - tokens.push_back(tok); - tok = s[i]; - state = digitMask[i]; - } else { - tok += s[i]; - } - } - if (tok.length() > 0) { - tokens.push_back(tok); - } -} - -/* - find last - (for release) -> version, release - subdivide version in blocks, where a block is separated by any of - the following: [-_] - - -> list of blocks, e.g. - . 1.4.2-pre1-2 -> [ (1.4.2) (-pre1) (2) ] - . 1.4.2pre1-1 -> [ (1.4.2pre1) (-1) ] - . 1_2_2pre2-2 -> [ (1) (2) (2pre2) (2) -*/ -void tokenizeIntoBlocks(const string& version, vector<string>& blocks) -{ - string v = version; - v = replaceAll(v, "-", "_"); - split(v, '_', blocks); -} - -} - - -void check(const string& v1, const string& v2, - VersionComparator::COMP_RESULT expected, bool compare=true) -{ - VersionComparator::COMP_RESULT result = - VersionComparator::compareVersions(v1, v2); - - if (compare) { - cout << ((result == expected) ? "OK " : "FAIL "); - } - - cout << v1 << " "; - switch (result) - { - case VersionComparator::LESS: - cout << "<"; - break; - case VersionComparator::GREATER: - cout << ">"; - break; - case VersionComparator::EQUAL: - cout << "="; - break; - case VersionComparator::UNDEFINED: - cout << "?"; - break; - } - - cout << " " << v2 << endl; -} - - -#ifdef TEST - -int main(int argc, char** argv) -{ - using namespace VersionComparator; - - if (argc < 3) { - check("1", "2", LESS); - check("1.1", "1.2", LESS); - check("1.1pre1", "1.1pre2", LESS); - check("1.1pre1", "1.2pre1", LESS); - check("1.1-pre1", "1.1-pre2", LESS); - check("1.1_2", "1.1.2", LESS); - check("1.1", "1.1", EQUAL); - - check("1.0PR1", "1.0PR1", EQUAL); - check("1.0PR1", "1.0PR2", LESS); - check("1.0PR1", "1.0RC1", UNDEFINED); - - check("1.2.3-2", "1.2.3-1", GREATER); - check("1.0.0", "0.9", GREATER); - - check("1.4.2_3-1", "1.4.3-2", LESS); - check("1.4.2_3-1", "1.4.2_3-2", LESS); - check("1.4.2_3-1", "1.4.2_1-1", GREATER); - - check("1.4.2-alpha2", "1.4.2-beta1", LESS); - check("1.4.2a-2", "1.4.2a-3", LESS); - check("1.4.2a-2", "1.4.2b-2", LESS); - check("1.4.2aa-2", "1.4.2bb-2", UNDEFINED); - check("1.4.2a1-2", "1.4.2a2-2", LESS); - check("1.4.2b1-2", "1.4.2a2-2", GREATER); - check("1.4.2beta3", "1.4.2alpha2", GREATER); - } else { - check(argv[1], argv[2], UNDEFINED, false); - } -} -#endif Copied: tools/prt-get/branches/prt-get-5.13/src/versioncomparator.cpp (from rev 1804, tools/prt-get/trunk/src/versioncomparator.cpp) =================================================================== --- tools/prt-get/branches/prt-get-5.13/src/versioncomparator.cpp (rev 0) +++ tools/prt-get/branches/prt-get-5.13/src/versioncomparator.cpp 2006-09-08 18:05:30 UTC (rev 1849) @@ -0,0 +1,253 @@ +//////////////////////////////////////////////////////////////////////// +// FILE: versioncomparator.cpp +// AUTHOR: Johannes Winkelmann, jw@tks6.net +// COPYRIGHT: (c) 2004 by Johannes Winkelmann +// --------------------------------------------------------------------- +// 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. +//////////////////////////////////////////////////////////////////////// + +// Get a test application with the following command: +// g++ -o vcomp -DTEST stringhelper.cpp versioncomparator.cpp + + +#include <string> +#include <cctype> +#include <vector> +#include <iostream> +using namespace std; + +#include "stringhelper.h" +using namespace StringHelper; + +#include "versioncomparator.h" + +namespace VersionComparator +{ + +// this is a one day hack; I'll refactor that to be nicer, clearer and +// hopefully faster. It should work pretty well though + +COMP_RESULT compareVersions(const string& v1, const string& v2) +{ + vector<string> blocks1; + vector<string> blocks2; + + tokenizeIntoBlocks(v1, blocks1); + tokenizeIntoBlocks(v2, blocks2); + int blockLen = normalizeVectors(blocks1, blocks2); + + for (int i = 0; i < blockLen; ++i) { + vector<string> tokens1; + vector<string> tokens2; + split(blocks1[i], '.', tokens1); + split(blocks2[i], '.', tokens2); + int tokLen = normalizeVectors(tokens1, tokens2); + + for (int j = 0; j < tokLen; ++j) { + if (tokens1[j] == tokens2[j]) { + continue; + } + + char* error1 = 0; + char* error2 = 0; + error1 = 0; + error2 = 0; + long vl1 = strtol(tokens1[j].c_str(), &error1, 10); + long vl2 = strtol(tokens2[j].c_str(), &error2, 10); + + if (*error1 != 0 || *error2 != 0) { + // subtokenize + vector<string> subtokens1; + vector<string> subtokens2; + + tokenizeMixed(tokens1[j], subtokens1); + tokenizeMixed(tokens2[j], subtokens2); + int subTokLen = normalizeVectors(subtokens1, subtokens2); + for (int k = 0; k < subTokLen; ++k) { + long sl1 = strtol(subtokens1[k].c_str(), &error1, 10); + long sl2 = strtol(subtokens2[k].c_str(), &error2, 10); + if (!error1 && !error2) { + if (sl1 < sl2) { + return LESS; + } else if (sl1 > sl2) { + return GREATER; + } + } else { + + // string tokens + if (subtokens1[k][1] == 0 && subtokens2[k][1] == 0) { + + if (subtokens1[k][0] < subtokens2[k][0]) { + return LESS; + } else if (subtokens1[k][0] > subtokens2[k][0]) { + return GREATER; + } + } else { + // smart guessing... + // leaving out 'test', 'pre' and 'rc' + static const string versions = + "alpha beta gamma delta"; + string::size_type pos1 = + versions.find(subtokens1[k]); + string::size_type pos2 = + versions.find(subtokens2[k]); + if (pos1 != string::npos && pos2 != string::npos) { + if (pos1 < pos2) { + return LESS; + } else if (pos1 > pos2) { + return GREATER; + } + } + } + + if (subtokens1[k] != subtokens2[k]) { + return UNDEFINED; + } + } + } + + } else if (vl1 < vl2) { + return LESS; + } else if (vl1 > vl2) { + return GREATER; + } + } + } + + + return EQUAL; +} + +int normalizeVectors(vector<string>& v1, vector<string>& v2) +{ + int length = max(v1.size(), v2.size()); + + while (v1.size() < length) { + v1.push_back("-1"); + } + while (v2.size() < length) { + v2.push_back("-1"); + } + + return length; +} + +void tokenizeMixed(const string& s, vector<string>& tokens) +{ + vector<bool> digitMask; + for (int i = 0; i < s.length(); ++i) { + digitMask.push_back(isdigit(s[i])); + } + + bool state = digitMask[0]; + string tok; + tok = s[0]; + for (int i = 1; i < digitMask.size(); ++i) { + if (digitMask[i] != state) { + tokens.push_back(tok); + tok = s[i]; + state = digitMask[i]; + } else { + tok += s[i]; + } + } + if (tok.length() > 0) { + tokens.push_back(tok); + } +} + +/* + find last - (for release) -> version, release + subdivide version in blocks, where a block is separated by any of + the following: [-_] + + -> list of blocks, e.g. + . 1.4.2-pre1-2 -> [ (1.4.2) (-pre1) (2) ] + . 1.4.2pre1-1 -> [ (1.4.2pre1) (-1) ] + . 1_2_2pre2-2 -> [ (1) (2) (2pre2) (2) +*/ +void tokenizeIntoBlocks(const string& version, vector<string>& blocks) +{ + string v = version; + v = replaceAll(v, "-", "_"); + split(v, '_', blocks); +} + +} + + +#ifdef TEST + +void check(const string& v1, const string& v2, + VersionComparator::COMP_RESULT expected, bool compare=true) +{ + VersionComparator::COMP_RESULT result = + VersionComparator::compareVersions(v1, v2); + + if (compare) { + cout << ((result == expected) ? "OK " : "FAIL "); + } + + cout << v1 << " "; + switch (result) + { + case VersionComparator::LESS: + cout << "<"; + break; + case VersionComparator::GREATER: + cout << ">"; + break; + case VersionComparator::EQUAL: + cout << "="; + break; + case VersionComparator::UNDEFINED: + cout << "?"; + break; + } + + cout << " " << v2 << endl; +} + + + +int main(int argc, char** argv) +{ + using namespace VersionComparator; + + if (argc < 3) { + check("1", "2", LESS); + check("1.1", "1.2", LESS); + check("1.1pre1", "1.1pre2", LESS); + check("1.1pre1", "1.2pre1", LESS); + check("1.1-pre1", "1.1-pre2", LESS); + check("1.1_2", "1.1.2", LESS); + check("1.1", "1.1", EQUAL); + + check("1.0PR1", "1.0PR1", EQUAL); + check("1.0PR1", "1.0PR2", LESS); + check("1.0PR1", "1.0RC1", UNDEFINED); + + check("1.2.3-2", "1.2.3-1", GREATER); + check("1.0.0", "0.9", GREATER); + + check("1.4.2_3-1", "1.4.3-2", LESS); + check("1.4.2_3-1", "1.4.2_3-2", LESS); + check("1.4.2_3-1", "1.4.2_1-1", GREATER); + + check("1.4.2-alpha2", "1.4.2-beta1", LESS); + check("1.4.2a-2", "1.4.2a-3", LESS); + check("1.4.2a-2", "1.4.2b-2", LESS); + check("1.4.2aa-2", "1.4.2bb-2", UNDEFINED); + check("1.4.2a1-2", "1.4.2a2-2", LESS); + check("1.4.2b1-2", "1.4.2a2-2", GREATER); + check("1.4.2beta3", "1.4.2alpha2", GREATER); + check("1.4.2-some", "1.4.2-1", UNDEFINED); + check("1.4.2-1", "1.4.2-some", UNDEFINED); + } else { + check(argv[1], argv[2], UNDEFINED, false); + } +} +#endif
participants (1)
-
crux@crux.nu