diff --git a/.downloads/ncpfs-2.2.1.tar.gz b/.downloads/ncpfs-2.2.1.tar.gz new file mode 100644 index 0000000..6e45833 Binary files /dev/null and b/.downloads/ncpfs-2.2.1.tar.gz differ diff --git a/ABOUT-NLS b/ABOUT-NLS new file mode 100644 index 0000000..d528f9c --- /dev/null +++ b/ABOUT-NLS @@ -0,0 +1,435 @@ +Notes on the Free Translation Project +************************************* + + Free software is going international! The Free Translation Project +is a way to get maintainers of free software, translators, and users all +together, so that will gradually become able to speak many languages. +A few packages already provide translations for their messages. + + If you found this `ABOUT-NLS' file inside a distribution, you may +assume that the distributed package does use GNU `gettext' internally, +itself available at your nearest GNU archive site. But you do _not_ +need to install GNU `gettext' prior to configuring, installing or using +this package with messages translated. + + Installers will find here some useful hints. These notes also +explain how users should proceed for getting the programs to use the +available translations. They tell how people wanting to contribute and +work at translations should contact the appropriate team. + + When reporting bugs in the `intl/' directory or bugs which may be +related to internationalization, you should tell about the version of +`gettext' which is used. The information can be found in the +`intl/VERSION' file, in internationalized packages. + +Quick configuration advice +========================== + + If you want to exploit the full power of internationalization, you +should configure it using + + ./configure --with-included-gettext + +to force usage of internationalizing routines provided within this +package, despite the existence of internationalizing capabilities in the +operating system where this package is being installed. So far, only +the `gettext' implementation in the GNU C library version 2 provides as +many features (such as locale alias, message inheritance, automatic +charset conversion or plural form handling) as the implementation here. +It is also not possible to offer this additional functionality on top +of a `catgets' implementation. Future versions of GNU `gettext' will +very likely convey even more functionality. So it might be a good idea +to change to GNU `gettext' as soon as possible. + + So you need _not_ provide this option if you are using GNU libc 2 or +you have installed a recent copy of the GNU gettext package with the +included `libintl'. + +INSTALL Matters +=============== + + Some packages are "localizable" when properly installed; the +programs they contain can be made to speak your own native language. +Most such packages use GNU `gettext'. Other packages have their own +ways to internationalization, predating GNU `gettext'. + + By default, this package will be installed to allow translation of +messages. It will automatically detect whether the system already +provides the GNU `gettext' functions. If not, the GNU `gettext' own +library will be used. This library is wholly contained within this +package, usually in the `intl/' subdirectory, so prior installation of +the GNU `gettext' package is _not_ required. Installers may use +special options at configuration time for changing the default +behaviour. The commands: + + ./configure --with-included-gettext + ./configure --disable-nls + +will respectively bypass any pre-existing `gettext' to use the +internationalizing routines provided within this package, or else, +_totally_ disable translation of messages. + + When you already have GNU `gettext' installed on your system and run +configure without an option for your new package, `configure' will +probably detect the previously built and installed `libintl.a' file and +will decide to use this. This might be not what is desirable. You +should use the more recent version of the GNU `gettext' library. I.e. +if the file `intl/VERSION' shows that the library which comes with this +package is more recent, you should use + + ./configure --with-included-gettext + +to prevent auto-detection. + + The configuration process will not test for the `catgets' function +and therefore it will not be used. The reason is that even an +emulation of `gettext' on top of `catgets' could not provide all the +extensions of the GNU `gettext' library. + + Internationalized packages have usually many `po/LL.po' files, where +LL gives an ISO 639 two-letter code identifying the language. Unless +translations have been forbidden at `configure' time by using the +`--disable-nls' switch, all available translations are installed +together with the package. However, the environment variable `LINGUAS' +may be set, prior to configuration, to limit the installed set. +`LINGUAS' should then contain a space separated list of two-letter +codes, stating which languages are allowed. + +Using This Package +================== + + As a user, if your language has been installed for this package, you +only have to set the `LANG' environment variable to the appropriate +`LL_CC' combination. Here `LL' is an ISO 639 two-letter language code, +and `CC' is an ISO 3166 two-letter country code. For example, let's +suppose that you speak German and live in Germany. At the shell +prompt, merely execute `setenv LANG de_DE' (in `csh'), +`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash'). +This can be done from your `.login' or `.profile' file, once and for +all. + + You might think that the country code specification is redundant. +But in fact, some languages have dialects in different countries. For +example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The +country code serves to distinguish the dialects. + + The locale naming convention of `LL_CC', with `LL' denoting the +language and `CC' denoting the country, is the one use on systems based +on GNU libc. On other systems, some variations of this scheme are +used, such as `LL' or `LL_CC.ENCODING'. You can get the list of +locales supported by your system for your country by running the command +`locale -a | grep '^LL''. + + Not all programs have translations for all languages. By default, an +English message is shown in place of a nonexistent translation. If you +understand other languages, you can set up a priority list of languages. +This is done through a different environment variable, called +`LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG' +for the purpose of message handling, but you still need to have `LANG' +set to the primary language; this is required by other parts of the +system libraries. For example, some Swedish users who would rather +read translations in German than English for when Swedish is not +available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'. + + In the `LANGUAGE' environment variable, but not in the `LANG' +environment variable, `LL_CC' combinations can be abbreviated as `LL' +to denote the language's main dialect. For example, `de' is equivalent +to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT' +(Portuguese as spoken in Portugal) in this context. + +Translating Teams +================= + + For the Free Translation Project to be a success, we need interested +people who like their own language and write it well, and who are also +able to synergize with other translators speaking the same language. +Each translation team has its own mailing list. The up-to-date list of +teams can be found at the Free Translation Project's homepage, +`http://www.iro.umontreal.ca/contrib/po/HTML/', in the "National teams" +area. + + If you'd like to volunteer to _work_ at translating messages, you +should become a member of the translating team for your own language. +The subscribing address is _not_ the same as the list itself, it has +`-request' appended. For example, speakers of Swedish can send a +message to `sv-request@li.org', having this message body: + + subscribe + + Keep in mind that team members are expected to participate +_actively_ in translations, or at solving translational difficulties, +rather than merely lurking around. If your team does not exist yet and +you want to start one, or if you are unsure about what to do or how to +get started, please write to `translation@iro.umontreal.ca' to reach the +coordinator for all translator teams. + + The English team is special. It works at improving and uniformizing +the terminology in use. Proven linguistic skill are praised more than +programming skill, here. + +Available Packages +================== + + Languages are not equally supported in all packages. The following +matrix shows the current state of internationalization, as of August +2002. The matrix shows, in regard of each package, for which languages +PO files have been submitted to translation coordination, with a +translation percentage of at least 50%. + + Ready PO files be bg ca cs da de el en eo es et fi fr + +----------------------------------------+ + a2ps | [] [] [] [] | + ap-utils | | + bash | [] [] [] [] | + bfd | [] [] | + binutils | [] [] | + bison | [] [] [] [] | + clisp | | + clisp | [] [] [] [] | + clisplow | | + cpio | [] [] [] [] | + darkstat | () | + diffutils | [] [] [] [] [] [] | + enscript | [] [] | + error | [] [] [] | + fetchmail | [] () [] [] [] () | + fileutils | [] [] [] [] [] | + findutils | [] [] [] [] [] [] | + flex | [] [] [] [] [] | + gas | [] [] | + gawk | [] [] [] | + gcal | [] [] | + gcc | [] [] | + gettext | [] [] [] [] [] | + gnupg | [] [] [] [] [] [] [] | + gprof | [] [] | + gpsdrive | () () () () () | + grep | [] [] [] [] [] [] [] [] | + gretl | [] | + gthumb | () () () | + hello | [] [] [] [] [] [] [] [] [] | + id-utils | [] [] [] | + indent | [] [] [] [] [] | + jpilot | () [] [] [] | + jwhois | [] [] | + kbd | [] [] [] | + ld | [] [] | + libc | [] [] [] [] [] [] [] [] | + libiconv | [] [] [] [] | + lifelines | () () | + lilypond | [] [] | + lingoteach | [] [] | + lingoteach_lessons| () () | + lynx | [] [] [] [] [] | + m4 | [] [] [] [] [] | + make | [] [] [] [] | + man-db | [] () () [] () () | + mysecretdiary | [] [] [] | + nano | [] () [] [] [] [] | + nano_1_0 | [] () [] [] [] [] | + opcodes | [] [] [] | + parted | [] [] [] [] [] | + ptx | [] [] [] [] [] [] [] | + python | | + recode | [] [] [] [] [] [] | + sed | [] [] [] [] [] [] [] [] [] [] | + sh-utils | [] [] [] [] | + sharutils | [] [] [] [] [] [] [] | + sketch | () [] () | + soundtracker | [] [] [] | + sp | [] | + tar | [] [] [] [] [] [] | + texinfo | [] [] [] [] [] | + textutils | [] [] [] [] [] | + util-linux | [] [] [] [] [] [] | + vorbis-tools | [] | + wastesedge | | + wdiff | [] [] [] [] [] [] | + wget | [] [] [] [] [] [] [] [] [] [] | + +----------------------------------------+ + be bg ca cs da de el en eo es et fi fr + 0 2 19 10 30 44 9 1 12 44 17 6 53 + + gl he hr hu id it ja ko lv nb nl nn + +-------------------------------------+ + a2ps | () () [] | + ap-utils | | + bash | [] | + bfd | [] | + binutils | [] | + bison | [] [] [] [] | + clisp | | + clisp | [] | + clisplow | | + cpio | [] [] [] [] | + darkstat | | + diffutils | [] [] [] [] [] | + enscript | [] [] | + error | [] | + fetchmail | [] | + fileutils | [] [] [] | + findutils | [] [] [] [] [] [] [] [] | + flex | [] | + gas | | + gawk | [] | + gcal | | + gcc | [] | + gettext | [] [] | + gnupg | [] [] [] [] | + gprof | [] | + gpsdrive | [] () () | + grep | [] [] [] [] [] [] [] | + gretl | | + gthumb | () () | + hello | [] [] [] [] [] [] [] [] [] [] [] [] | + id-utils | [] [] | + indent | [] [] [] [] | + jpilot | () () | + jwhois | [] [] | + kbd | | + ld | | + libc | [] [] [] [] | + libiconv | [] [] [] | + lifelines | | + lilypond | [] | + lingoteach | [] | + lingoteach_lessons| | + lynx | [] [] [] [] | + m4 | [] [] [] [] | + make | [] [] [] [] [] [] | + man-db | () () | + mysecretdiary | [] | + nano | [] [] [] [] | + nano_1_0 | [] [] [] [] [] | + opcodes | [] [] | + parted | [] [] [] | + ptx | [] [] [] [] [] | + python | | + recode | [] [] [] | + sed | [] [] [] [] [] [] [] [] | + sh-utils | [] [] [] | + sharutils | [] [] [] | + sketch | () | + soundtracker | [] [] | + sp | | + tar | [] [] [] [] [] [] | + texinfo | [] [] [] | + textutils | [] [] [] [] | + util-linux | () [] | + vorbis-tools | [] | + wastesedge | | + wdiff | [] [] [] | + wget | [] [] [] [] [] [] | + +-------------------------------------+ + gl he hr hu id it ja ko lv nb nl nn + 23 9 12 19 16 13 26 9 1 7 19 3 + + no pl pt pt_BR ru sk sl sv tr uk zh_CN zh_TW + +----------------------------------------------+ + a2ps | () () () [] [] [] [] [] | 10 + ap-utils | () | 0 + bash | [] | 6 + bfd | [] [] | 5 + binutils | [] [] | 5 + bison | [] [] [] [] | 12 + clisp | | 0 + clisp | | 5 + clisplow | | 0 + cpio | [] [] [] [] | 12 + darkstat | [] [] () () | 2 + diffutils | [] [] [] [] [] [] | 17 + enscript | [] [] [] [] | 8 + error | [] [] [] | 7 + fetchmail | () () [] | 6 + fileutils | [] [] [] [] [] [] | 14 + findutils | [] [] [] [] [] [] [] | 21 + flex | [] [] [] | 9 + gas | [] | 3 + gawk | [] [] | 6 + gcal | [] [] | 4 + gcc | [] | 4 + gettext | [] [] [] [] [] [] | 13 + gnupg | [] [] [] | 14 + gprof | [] [] | 5 + gpsdrive | [] [] | 3 + grep | [] [] [] [] [] | 20 + gretl | | 1 + gthumb | () () [] | 1 + hello | [] [] [] [] [] [] [] | 28 + id-utils | [] [] [] [] | 9 + indent | [] [] [] [] [] | 14 + jpilot | () () [] [] | 5 + jwhois | [] () () [] [] | 7 + kbd | [] [] | 5 + ld | [] [] | 4 + libc | [] [] [] [] [] [] | 18 + libiconv | [] [] [] [] [] | 12 + lifelines | [] | 1 + lilypond | [] | 4 + lingoteach | [] [] | 5 + lingoteach_lessons| () | 0 + lynx | [] [] [] [] | 13 + m4 | [] [] [] [] | 13 + make | [] [] [] [] [] | 15 + man-db | | 3 + mysecretdiary | [] [] [] | 7 + nano | [] [] [] [] | 13 + nano_1_0 | [] [] [] [] | 14 + opcodes | [] [] [] | 8 + parted | [] [] [] [] | 12 + ptx | [] [] [] [] [] [] [] | 19 + python | | 0 + recode | [] [] [] [] [] [] | 15 + sed | [] [] [] [] [] [] | 24 + sh-utils | [] [] | 9 + sharutils | [] [] [] [] | 14 + sketch | [] () [] | 4 + soundtracker | [] | 6 + sp | | 1 + tar | [] [] [] [] [] [] [] | 19 + texinfo | [] [] | 10 + textutils | [] [] [] [] [] | 14 + util-linux | [] [] [] | 10 + vorbis-tools | [] | 3 + wastesedge | | 0 + wdiff | [] [] [] [] [] | 14 + wget | [] [] [] [] [] [] [] [] | 24 + +----------------------------------------------+ + 37 teams no pl pt pt_BR ru sk sl sv tr uk zh_CN zh_TW + 68 domains 4 15 2 28 28 12 10 49 43 4 1 9 609 + + Some counters in the preceding matrix are higher than the number of +visible blocks let us expect. This is because a few extra PO files are +used for implementing regional variants of languages, or language +dialects. + + For a PO file in the matrix above to be effective, the package to +which it applies should also have been internationalized and +distributed as such by its maintainer. There might be an observable +lag between the mere existence a PO file and its wide availability in a +distribution. + + If August 2002 seems to be old, you may fetch a more recent copy of +this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date +matrix with full percentage details can be found at +`http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'. + +Using `gettext' in new packages +=============================== + + If you are writing a freely available program and want to +internationalize it you are welcome to use GNU `gettext' in your +package. Of course you have to respect the GNU Library General Public +License which covers the use of the GNU `gettext' library. This means +in particular that even non-free programs can use `libintl' as a shared +library, whereas only free software can use `libintl' as a static +library or use modified versions of `libintl'. + + Once the sources are changed appropriately and the setup can handle +to use of `gettext' the only thing missing are the translations. The +Free Translation Project is also available for packages which are not +developed inside the GNU project. Therefore the information given above +applies also for every other Free Software Project. Contact +`translation@iro.umontreal.ca' to make the `.pot' files available to +the translation teams. + diff --git a/BUGS b/BUGS index 662fc84..96855fb 100644 --- a/BUGS +++ b/BUGS @@ -3,6 +3,9 @@ them to be bugs. But there are really problems that might be fixed in the future. +If you find some problem unlisted in this file, contact me at +"Petr Vandrovec" . + ------------------------------------------------------------------------------- You might experience lockups of ncpfs volumes. It happens especially @@ -38,12 +41,22 @@ These are a bit annoying, but completely harmless. Known bugs: -- It returns error 255 during bindery login on one site... I do not know why. - If GetNearsetServer returns invalid (nonexistant, downed) server, all utilities gives up. VLM/Client32 in this situation tries randomly choosen server after 30 secs timeout. You have to fix your routers at this time. Sorry. -- NFS namespace does not work on Netware Storage Services volume... Sorry, - it is not my fault and I did not found any workaround (maybe that I have - workaround for NSS from NW5Beta3) +- nwdplist does nothing good. This tool will be finished after nwnet.c... +- manpages names for 3ncp section are too long... Is there a way to + define page header or ... +------------------------------------------------------------------------------- + +Known incompatibilities: + +PROBLEM: ncpfs is not compatible with NSS volumes of beta releases of NW5 +SOLUTION: Upgrade your NW5 to production NW5 version. + +PROBLEM: ncpfs cannot access LinWare server +SOLUTION: LinWare does not support namespace calls used by ncpfs. Because of + LinWare is currently not maintained, you should fix it yourself or + move your server to MarsNWE or Caldera's NetWare for Linux. diff --git a/Changes b/Changes index 8acb1fb..5e33431 100644 --- a/Changes +++ b/Changes @@ -1,329 +1,491 @@ -I only began this file with ncpfs-0.12. If you're interested in older -versions, you can find them on ftp.gwdg.de:/pub/linux/misc/ncpfs/old. +ChangeSet@1.229, 2003-02-08 11:06:50+01:00 + Ignore editor backup files *~ -[Versions ncpfs-2.0.12.x are available at ftp://platan.vc.cvut.cz/pub/linux/ncpfs] +ChangeSet@1.228, 2003-02-08 11:06:15+01:00 + Fix problems in ncpfs-nwuid area. -ncpfs-2.0.12.10 -> ncpfs-2.2.0 -- VANA: minor cleanup +ChangeSet@1.227, 2003-02-08 10:56:50+01:00 + Add proper version to new library symbols. -ncpfs-2.0.12.9 -> ncpfs-2.0.12.10 -- VANA: you can now access NDS server without replica of its conteiner - (TODO: access to server if server has R/W replica of your account but - does not have replica of itself) -- VANA: Alpha still no go :-( +ChangeSet@1.226, 2003-02-08 10:32:45+01:00 + Sanitize ncp_open_2 calling convention... -ncpfs-2.0.12.8 -> ncpfs-2.0.12.9 -- Eloy A. Paris: Fixes in library code +ChangeSet@1.225, 2003-02-08 10:24:39+01:00 + Pass API errors through in ncp_login_conn, instead of always + returning EACCES. + Make password optional for nwfsinfo. -ncpfs-2.0.12.7 -> ncpfs-2.0.12.8 -- VANA: bugfix, now it works again without ipxripd -- VANA: still cleaning up, ncp_open() and NDS byte ordering +ChangeSet@1.224, 2003-02-08 09:52:31+01:00 + Update PHP's autoconf and libtool environment. -ncpfs-2.0.12.6 -> ncpfs-2.0.12.7 -- VANA: bugfixes, nwpurge +ChangeSet@1.223, 2003-02-08 09:28:27+01:00 + Debian's lintian prefers relative symlinks over absolute... -ncpfs-2.0.12.5 -> ncpfs-2.0.12.6 -- VANA: ncpmount supports NCP over IP (no incoming broadcast at this time) +ChangeSet@1.222, 2003-02-08 09:27:27+01:00 + Debian's lintian complains that manpages are not gzip -9 ed... -ncpfs-2.0.12.4 -> ncpfs-2.0.12.5 -- Eloy A. Paris: Makefile bugfix +ChangeSet@1.221, 2003-02-08 09:26:42+01:00 + Add ncp_find_conn_spec3: ncp_find_conn_spec2 with sane calling convention. + Change ncp_find_conn_spec* users to use ncp_find_conn_spec3. + Change calling convention for ncp_fopen_nwc. + Fix ncp_find_conn_spec* error reporting when stdin/stdout are not + terminal. Spotted by Andre Holzhey. -ncpfs-2.0.12.3 -> ncpfs-2.0.12.4 -- VANA: Bugfixes -- VANA: Alpha stage of native NCP over IP support (no kernel at this time) +ChangeSet@1.220, 2003-01-27 09:45:09+01:00 + Add NDS support to nwdir. -ncpfs-2.0.12.2 -> ncpfs-2.0.12.3 -- VANA: Major makefile changes, compile warning cleanup +ChangeSet@1.219, 2003-01-27 09:20:19+01:00 + Add basic NWDSSearch demo to contrib/testing. -ncpfs-2.0.12.1 -> ncpfs-2.0.12.2 -- Eloy A. Paris : Makefile cleanup -- VANA: More merging sutil/ncplib.c and lib/ncplib.c, not fully functional yet +ChangeSet@1.218, 2003-01-27 09:18:46+01:00 + Regenerate autoconf system. -ncpfs-2.0.12 -> ncpfs-2.0.12.1 -- Dave, VANA: Bindery logins for all utilities (-b) -- VANA: Specify signature level for ncpmount (-i number) -- VANA: Start of merging sutil/*lib* with lib/*lib* +ChangeSet@1.217, 2003-01-27 09:15:36+01:00 + Update configure.ac for autoconf2.57. -ncpfs-2.0.11.19 -> ncpfs-2.0.12 -- Polished for release 2.0.12 -- Dave: pserver fixes, including addition of %d flag. +ChangeSet@1.216, 2003-01-27 08:49:01+01:00 + Make PHP module compilable even if ncpfs is not installed. Found by + jukka.huhta@helsinki.fi. -ncpfs-2.0.11.18 -> ncpfs-2.0.11.19 -- Dave, VANA: new userspace utilities - pqstat and pqrm +ChangeSet@1.215, 2003-01-11 21:45:09+01:00 + Fix wcsrev() to do string reverse instead of core dump. -ncpfs-2.0.11.17 -> ncpfs-2.0.11.18 (no userspace change) -- Dave: getwd() did not work on 2.1.x -- VANA: Volumes are now always listed lowercased on 2.1.x +ChangeSet@1.214, 2003-01-11 21:43:53+01:00 + Print correct number of leaked connections. Spotted by Patrick Pollet. -ncpfs-2.0.11.16 -> ncpfs-2.0.11.17 -- David Woodhouse : Patch to pserver, - ncp_get_broadcast_message -- VANA & Dave: Cleanup for glibc, I hope that complete (xcpt. few warnings - about long int vs. u_int32_t) +ChangeSet@1.213, 2003-01-11 21:41:59+01:00 + Simplify DS iteration handle library. + Do not leak connection in NWDSSearch. Found and tracked down by Patrick Pollet. -ncpfs-2.0.11.15 -> ncpfs-2.0.11.16 -- VANA: Removed symlink latest from archive :-) -- VANA: Added ncp_send_broadcast2 +ChangeSet@1.212, 2003-01-11 17:53:37+01:00 + Enable ncp-debug in "sample" configuration. -ncpfs-2.0.11.14 -> ncpfs-2.0.11.15 -- VANA: Fixed bug: wrong completion code returned when login to server without - r/w replica of logged-in user -- VANA: It is possible to disable NFS and/or OS2 namespace support in mount +ChangeSet@1.211, 2003-01-11 17:52:42+01:00 + Add NWGetNLMLoadedList function and use it in nwfsinfo. -ncpfs-2.0.11.13 -> ncpfs-2.0.11.14 -- VANA: One source for 2.0 and 2.1 kernels -- Chirstian Groessler : Added strong mounts +ChangeSet@1.210, 2002-11-25 23:39:53+01:00 + Make pqlist/pqstat/pqrm/nprint really working with NDS queues. It did not + work correctly if queue was on different server than one you specified with + -S option. -ncpfs-2.0.11.12 -> ncpfs-2.0.11.13 -- Arne: Signatures added to ncpfs-nds-0.06 -- VANA: Synchronized sources with Arne +ChangeSet@1.209, 2002-11-25 19:35:42+01:00 + Use "Unknown user" instead of "Unknown server". Pointed out by Radovan Garabik. + Fixes Debian bug #170694. -ncpfs-2.0.11.11 -> ncpfs-2.0.11.12 -- VANA: Fixed compilation error if compiled against kernel without signatures - even if SIGNATURES = 0 set +ChangeSet@1.208, 2002-11-19 22:59:52+01:00 + Add -o pass-fd=X option to ncpmount and ncplogin. It is + simplest way how to pass password to these commands. -ncpfs-2.0.11.10 -> ncpfs-2.0.11.11 -- VANA: Fixed segfault on invalid user name in NDS mode -- VANA: Added locking features (through ncpfs-specific ioctl(2)) +ChangeSet@1.207, 2002-11-19 18:11:39+01:00 + Install nwmsg always as sbin/nwmsg, even if sbin does not exist. -ncpfs-2.0.11.9 -> ncpfs-2.0.11.10 -- VANA: Synchronized with nds-patches-0.05 from Arne de Bruijn +ChangeSet@1.206, 2002-11-18 23:22:05+01:00 + Remove unneeded includes from ncplogin/ncpmount. -ncpfs-2.0.11.8 -> ncpfs-2.0.11.9 -- VANA: Added call to lock connection (dropped in 2.0.11.7, sorry) +ChangeSet@1.205, 2002-11-18 23:15:21+01:00 + More merging of ncplogin and ncpmount. -ncpfs-2.0.11.7 -> ncpfs-2.0.11.8 -- VANA: Can be correctly compiled without signatures support in kernel (I hope) -- VANA: Fix in kernel in setting task number +ChangeSet@1.204, 2002-11-18 22:50:20+01:00 + Move common code from ncplogin.c and ncpmount.c to mount_login.c. + Reindent ncplogin.c. -ncpfs-2.0.11.6 -> ncpfs-2.0.11.7 -- VANA: Codebase synchronized with Arne de Bruijn -- ARNE: Gracelogins on NDS -- VANA: Removed some (one) compilation warnings +ChangeSet@1.203, 2002-11-18 21:15:48+01:00 + 2.5.x kernels have /proc/net/ipx/interface instead of /proc/net/ipx_interface. -ncpfs-2.0.11.5 -> ncpfs-2.0.11.6 -- VANA: Support for NDS login accross servers +ChangeSet@1.202, 2002-10-19 01:28:20+02:00 + pam_ncp_auth: Fix doublefree when using bindery authentication and user's home directory + is found. -ncpfs-2.0.11.4 -> ncpfs-2.0.11.5 -- VANA: Cleanup in ndscrypt -- VANA: Bugfix: empty password for NDS login is now allowed & works +ChangeSet@1.201, 2002-10-19 01:13:39+02:00 + pam_ncp_auth: Reindent. -ncpfs-2.0.11.3 -> ncpfs-2.0.11.4 -- Enabled some buffer cleaning -- Added parameter "-b" to ncpmount for bindery login to NDS server +ChangeSet@1.200, 2002-10-19 00:00:15+02:00 + pam_ncp_auth: Close connection to server immediately after opening session or + changing password. Currently there is no need to keep connection open. + + Originally by Patrick Pollet. -ncpfs-2.0.11.2 -> ncpfs-2.0.11.3 -- Added NDS support by Arne de Bruijn ; small fixes in code; - moved sections to do same things as DOS login does. +ChangeSet@1.199, 2002-10-18 23:42:26+02:00 + pam_ncp_auth: Do not return errors from close session... -ncpfs-2.0.11.1 -> ncpfs-2.0.11.2 -- VANA: Fixed that some error conditions in LOGIN should start packet signatures +ChangeSet@1.198, 2002-10-18 23:16:53+02:00 + pam_ncp_auth: Return correct error code when code detects buffer overflow attack. -ncpfs-2.0.11 -> ncpfs-2.0.11.1 -- VANA: Added packet signatures by Arne de Bruijn - -ncpfs-2.0.10 -> ncpfs-2.0.11 -- Added Martin's patch to Linux 2.0.30 to get rid of the lockups. - MANY thanks to Martin Stover! +ChangeSet@1.197, 2002-10-18 23:07:39+02:00 + pam_ncp_auth: Consume whole option string passed to -z/-Z. -ncpfs-2.0.9 -> ncpfs-2.0.10 -- Made nwtrustee hopefully work ;-) -- Made the manpages a little bit prettier +ChangeSet@1.196, 2002-10-18 22:58:56+02:00 + Fix typo in pam_ncp_auth.c. By Patrick Pollet. -ncpfs-2.0.8 -> ncpfs-2.0.9 -- Added patches directory -- Added nwvolinfo and nwtrustee. Thanks to Jacek Stepniewski -- nwpasswd can change other's passwords. Thanks to Martin Stover. +ChangeSet@1.195, 2002-10-18 22:19:23+02:00 + Emit value separators also between NWDSRead, not only between + values read by NWDSRead in ncpreadprops tcl helper. By Patrick Pollet. -ncpfs-2.0.7 -> ncpfs-2.0.8 -- Fixed util/Makefile for easier optimization handling. Thanks to Rik - Faith for this one -- added nwfstime. You can now set the file server date and time from Linux. -- added the contrib directory. Feel free to add more! +ChangeSet@1.194, 2002-10-06 02:29:50+02:00 + Include missing stdarg.h in ncpm_common.h. + By Roy Bixler. -ncpfs-2.0.6 -> ncpfs-2.0.7 -- Hopefully removed one security problem in ncpumount. -- Added command line flag to pserver.c -- Heavily reconstructed ncpfs utils. Created the lib/ dir. -- Separated the uid utils in sutil -- Add nwsfind to enable users to use ncpfs safely without setting - the utils setuid root. +ChangeSet@1.193, 2002-09-19 22:37:15+02:00 + Oops, use NCP_DIRSTYLE_DIRBASE and not NCP_DIRSTYLE_NOHANDLE in nwpurge tool and + in dirlist2 demo program. -ncpfs-2.0.5 -> ncpfs-2.0.6 -- Added a short description of a problem that I need help with to the - file BUGS. If you know a bit of the linux networking code, please - take a look at it. Thanks a lot. -- Added canonic output format to nwpbvalues and the command nwbpset. I - would like to invite you to help building capable bindery management - utilities. For little examples, look at the manual page of nwbpset. -- Added some values to ipxparse. Those interested in NDS should take a - look at it. It's really not much, but maybe it's a beginning. +ChangeSet@1.192, 2002-09-19 22:36:29+02:00 + NCP search for file set always returns filename, even if we did not asked for one. + Let's always ask for name, so there is no surprise with some other/future server + implementations. -ncpfs-2.0.4 -> ncpfs-2.0.5 -- Removed another bug in nwbpvalues. -- Cleaned up man/Makefile -- Some manpage typos fixed. Thanks to Jim Van Zandt - -- added nwrights +ChangeSet@1.191, 2002-09-15 00:27:15+02:00 + Fix big-endian problems by using nw_info_struct2 instead of nw_info_struct. + + API always returned nw_info_struct in "NCP" (little-endian) byte order, but when structure + was passed to API, it expected volume and directory entry numbers to be in native byte order. + + In addition to the problem above, nobody except nwdir get byte order completely right - some + forgot to byteswap volume number, and some both. -ncpfs-2.0.3 -> ncpfs-2.0.4 -- Changed name of npasswd to nwpasswd, as npasswd collides with - RedHat. Thanks to Mike Slater for pointing me - at this one. -- Put '\r\n' into nwmsg, because sometimes it did not print - correctly. Thanks to Petr Vandrovec Ing. VTEI - for this one. -- Improved the ELF Makefile for ELF support. Thanks to Uwe Bonnes - . -- Removed a very embarassing bug in nwpvalues :-(. -- Added a some routines to nwbpvalues. +ChangeSet@1.190, 2002-09-15 00:18:14+02:00 + Allow for passing "human readable" paths to ncp_ns_* API. -ncpfs-2.0.2 -> ncpfs-2.0.3 -- Removed the kernel-2.0 directory. Linus took the patch into 2.0.8. - So, if you want to use long file name support, upgrade to Linux - kernel version 2.0.8. -- Applied the lfn patch to the kernel-1.2 module with some light - testing. If you experience problems, tell it to me, and use the - ncpfs-2.0.2 kernel module, or upgrade to Linux 2.0.8. -- Added unencrypted login when no crypt key is returned. -- Hopefully improved error messages a bit -- Added some values to ipxparse -- For ELF systems, moved ncplib to /lib/libncp.so.1.x. This saves - about 1MB of disk space. As ncpfs grows, the saving will - increase. Please look at the Makefile to enable this. -- Enhanced nwfsinfo a bit. (Even with a manpage!) -- Added nwuserlist. +ChangeSet@1.189, 2002-09-09 22:01:03+02:00 + More bigendian fixes. From Roy Bixler... -ncpfs-2.0.1 -> ncpfs-2.0.2 -- Added some values to ipxparse. -- Added a patch against 2.0.7 for long file names support. I did not - apply this change to the 1.2-module. Please upgrade to 2.0.7 if you - want to use long file names. -- nwbpvalues can print ITEM properties +ChangeSet@1.188, 2002-09-09 21:48:50+02:00 + Few big-endian fixes. Found by Roy Bixler. -ncpfs-2.0.0 -> ncpfs-2.0.1 -- Added some values to ipxparse. -- Added the little bindery utilities. Maybe someone has the time to - write a shellscript named 'nwadduser' ? -- Fixed a bug that made the __255 message reappear. Many thanks to - Guntram Blom for his detailed bug report. -- Fixed a bug that made ncpfs incompatible with W95's server - capabilities. Thanks to Tomasz Babczynski - for this one. +ChangeSet@1.187, 2002-09-09 21:30:08+02:00 + Upgrade for (patched) SWIG 1.3.14 -ncpfs-0.24 -> ncpfs-2.0.0 -- Changed the numbering scheme :-). -- Added npasswd. Many thanks to Guntram Blom for his work! -- Hopefully improved error messages a bit -- Hopefully made slist a bit more robust +ChangeSet@1.186, 2002-08-31 15:16:44+02:00 + Use aTHX_ instead of aTHX when needed. Discovered by perl 5.8. -ncpfs-0.23 -> ncpfs-0.24 -- Fixed a bug that made it impossible to umount a filesystem after you - tried 'mkdir .' or 'mkdir ..'. -- Fixed a bad race condition when opening files. -- Made the default timeout values more robust. +ChangeSet@1.185, 2002-08-31 13:40:29+02:00 + Really add support for NCP_DEBUG=all. -ncpfs-0.22 -> ncpfs-0.23 -- Fixed a memory allocation problem in nwmsg.c. Thanks to - Andrew Ross -- slist hopefully does not ask for a password anymore. -- cleaned up error messages a bit. -- ncpmount now calls modprobe instead of insmod. +ChangeSet@1.184, 2002-08-30 21:48:10+02:00 + Fix few compile warnings introduced in last changeset. -ncpfs-0.21 -> ncpfs-0.22 -- removed a bad race condition in kernel-1.2/src/dir.c. -- handle 0x9999-responses from the ncp server correctly. -- Bindery functions in ncplib.c by Brian G. Reid (breid@tim.com) -- set blocksize to 512 to satisfy 'du -k' +ChangeSet@1.183, 2002-08-30 21:44:23+02:00 + Add code which prints connections not closed on library shutdown. Build ncpfs with + --enable-ncp-debug, and then set environment variable NCP_DEBUG to cleanup. -ncpfs-0.20 -> ncpfs-0.21 -- Included two bugfixes in ncplib.c found by Jeff Buhrt - . -- Included a bugfix in kernel code that could only show for servers - that do not support namespace calls. I should have tried ncpfs - against lwared... Thanks to Neil Turton for - this fix. +ChangeSet@1.182, 2002-08-30 21:29:22+02:00 + There is no install-dev in Makefile generated in contrib/php. -ncpfs-0.19 -> ncpfs-0.20 -- Changed the home site for ncpfs from linux01.gwdg.de:/pub/ncpfs - to ftp.gwdg.de:/pub/linux/misc/ncpfs. linux01 will remain available, - but we would like to reduce the load on that machine. Sites - mirroring linux01 please redirect your mirror software to - ftp.gwdg.de. Thanks. -- Removed a bug in ncplib.c that made slist require a full - login. Thanks to Neil Turton for the hint. -- The first real user contribution: ncopy by Brian G. Reid - (breid@tim.com) and Tom C. Henderson (thenderson@tim.com). Many - thanks to you! If you find bugs in ncopy, tell them, not me ;-) -- Handle expired passwords. Thanks to "Mathew Lim" - for the hint. +ChangeSet@1.181, 2002-08-30 21:19:35+02:00 + Regenerate .gmo files. -ncpfs-0.18 -> ncpfs-0.19 +ChangeSet@1.180, 2002-08-30 21:19:08+02:00 + Fix complaints in german translation: %s do not match in one pair of c-format strings. -- hacked around in ncplib.[ch] quite heavily. -- SAP handling in ipxparse.c. Thanks to Jeff Buhrt -- Changed error handling to use the com_err library. This should - eventually provide better error messages, because it's now much - easier to define nice messages. -- If no server is active, report this correctly -- added nsend +ChangeSet@1.179, 2002-08-30 21:17:52+02:00 + Update Czech translation. -ncpfs-0.17 -> ncpfs-0.18 +ChangeSet@1.178, 2002-08-30 21:17:04+02:00 + Update gettext to 0.11.5 + regenerate autoconf. -- Another attempt at solving the problem that -n is not working. -- Forgot nprint in 0.17 util/Makefile. -- nprint left connections open when it fails -- added options -r and -t to ncpmount to tune ncpfs connections. +ChangeSet@1.177, 2002-08-30 14:42:33+02:00 + Fix builds on hosts without locale.h/libintl.h, when using --disable-nls. -ncpfs-0.16 -> ncpfs-0.17 +ChangeSet@1.176, 2002-08-23 00:12:28+02:00 + Update ncpmount/ncplogin/ncpmap for mount version 5. Main change is that + we now handle Netware messages in IP environment - of course only if you + have appropriate kernel... -- Changed the name of fsinfo to nwfsinfo, to avoid a name clash with - the X windows utility. Thanks to Henning Brockfeld - for this hint. (still - waiting for your scripts.. :-)) -- made nwmsg available. This enables you to receive NetWare user - broadcast messages. Please note that you need at least kernel 1.3.68 - for this feature. -- pserver now prints debugging output via syslog(). -- Included ipxdump, a nice little utility, that has helped some - people. +ChangeSet@1.175, 2002-08-23 00:01:59+02:00 + Add NWCancelWait - NCP 112. -- And now the big one: you can re-export ncpfs-mounted directories - with nfsd! You have to mount single volumes by specifying -V volume - to ncpmount, and call nfsd and mountd with the option --re-export. - See the manual page of ncpmount for more information. Please note - that I will send Linus the required patch on 1. March 1996, so you - will have to use kernel 1.2.13 or wait at least for 1.3.70. +ChangeSet@1.174, 2002-08-22 17:14:53+02:00 + Simplify mount protocol version handling. -ncpfs-0.15 -> ncpfs-0.16 +ChangeSet@1.173, 2002-08-22 16:16:15+02:00 + Add new, text based, mount option format. -- Included ipx-1.0, made available by Greg Page , - Caldera -- Made -n work for password-less accounts. Thanks to Alexander Jolk - . -- Fixed the kerneld support. -- Fixed the NetWare 4.1 problem. Many thanks to - Chatchai JANTARAPRIM and - hitesh.soneji@industry.net for their patience. +ChangeSet@1.172, 2002-08-21 21:55:02+02:00 + Kill now unused variable in nwsfind. -ncpfs-0.14 -> ncpfs-0.15 +ChangeSet@1.171, 2002-08-21 21:48:15+02:00 + Kill libncpsu. Only difference between libncp and libncpsu was ipx_make_reachable. Now + library contains both suid and non-suid versions, and appropriate one is selected at + runtime. + Modify nwsfind to always call suid version, even if nwsfind is not installed suid. -- A bug fixed that made normal mounting impossible. It was too late - yesterday. Sorry -- Manpage for pserver.c +ChangeSet@1.170, 2002-08-21 19:52:15+02:00 + Split reply buffer from request buffer. Since we verify signatures on replies we must be + able to retry requests after we receive reply (with wrong signature), and so we cannot + receive reply into request's buffer. + Create NCP request header in the do_ncp_call, and not in its callers, so callers do not have + to touch sequence numbers, connection numbers, and so on. -ncpfs-0.13 -> ncpfs-0.14 +ChangeSet@1.169, 2002-08-21 19:42:29+02:00 + Change x_recv/x_recvfrom to return err and pass length through additional parameter, + instead of returning length and passing err indirectly. -- Improvements of manual pages by B. Galliart and - Terry Dawson -- fsinfo -- pserver.c. Please see this as ALPHA software. There is no - documentation, and it is not tested enough. But it might be useful for - you. +ChangeSet@1.168, 2002-08-20 23:39:58+02:00 + NCP/UDP signs replies differently than NCP/IPX, it does not sign error code + and connection status. Oops. -ncpfs-0.12 -> ncpfs-0.13 +ChangeSet@1.167, 2002-08-20 21:40:17+02:00 + Verify packet signatures on replies received from server. -- support for automatic loading of ncpfs.o by kerneld. - Thanks to Steven N. Hirsch . -- A subtle problem in the read routines has been removed by Uwe Bonnes - . Thanks a lot. +ChangeSet@1.166, 2002-08-20 19:21:09+02:00 + Kill few warnings here and there: + Add missing prototypes. + Remove < 0 compares on unsigned values. + Explicitly cast int to size_t in comparsions. + +ChangeSet@1.165, 2002-08-20 18:50:13+02:00 + Packet signatures for NCP/TCP. Length in the signed data is in big-endian format, + while NCP/UDP and NCP/IPX use little-endian and I oversight this difference... + +ChangeSet@1.164, 2002-08-19 01:42:44+02:00 + Fix ncp signatures negotiation code. NCP/TCP signatures still do not work. + +ChangeSet@1.163, 2002-08-19 01:40:06+02:00 + Use NCP_OBSOLETE for obsolete APIs. + +ChangeSet@1.162, 2002-08-06 20:15:37+02:00 + Exit from pserver when broken connection is detected. + Helps a lot if you are running pserver with -d from inittab as a respawn task. + +ChangeSet@1.161, 2002-08-06 18:48:44+02:00 + Make sure that we round all keys up to the unitsize boundary. Otherwise modmult endlessly loops. + +ChangeSet@1.160, 2002-07-28 02:16:29+02:00 + Ignore user and nouser mount options. + +ChangeSet@1.159, 2002-07-28 00:54:55+02:00 + Add NWGetUserInfo function. + Extend nwuserlist to print information obtained by NWGetUserInfo. + +ChangeSet@1.158, 2002-07-12 23:48:25+02:00 + Allow setting of file offset in large filesize demo. BTW, abend + when writting to large files is fixed internally at Novell. + +ChangeSet@1.157, 2002-07-06 18:28:31+02:00 + Update czech translation. + Regenerate i18n files. + +ChangeSet@1.156, 2002-07-06 18:26:32+02:00 + Mark "yes" and "no" strings in nwfsinfo eligible for i18n. + +ChangeSet@1.155, 2002-07-06 18:25:05+02:00 + stuil/ncpm_common.c contains i18n strings too. + +ChangeSet@1.154, 2002-07-06 18:05:33+02:00 + Fix coredump in nwmsg when mountpoint is not listed in /etc/mtab. + Clean up nwmsg code. + Refresh tknwmsg. + +ChangeSet@1.153, 2002-07-06 16:33:34+02:00 + Exclusive locking is NCP_PHYSREC_EX... (in physlock.c demo) + +ChangeSet@1.152, 2002-07-06 16:32:11+02:00 + Added demo for NW*Semaphore API. + +ChangeSet@1.151, 2002-07-05 00:30:26+02:00 + Ignore generated contrib/testing/physlock. + +ChangeSet@1.150, 2002-07-05 00:25:44+02:00 + Add physical records locking API. + Add test program for physical records locks. + Tests for locking above 4GB fails on my beta NW6SP2 test server. I believe it is server bug, because of same API suceeds with offsets < 4GB... + +ChangeSet@1.149, 2002-07-03 23:37:44+02:00 + Welcome, 64bit NCPs... Tested with nw6nss1c. Test it only in test environment, + read+get file length works fine, but write abends server when UDP or TCP transport is used. + Only IPX works correctly... + +ChangeSet@1.148, 2002-07-03 01:36:29+02:00 + Update config.guess and config.sub from autotools-dev 20020621.1 + +ChangeSet@1.147, 2002-07-03 01:34:57+02:00 + Add ncp_get_file_server_information_2 API. + Extend nwfsinfo to print NW5+ information. + +ChangeSet@1.146, 2002-06-25 23:19:12+02:00 + pam_ncp_auth: Strip leading dot from generated context when doing contextless login. + +ChangeSet@1.145, 2002-06-25 15:17:22+02:00 + pam_ncp_auth: Fix buffer overflow I created in last changeset. We store string plus comma, so we have to count comma too. + +ChangeSet@1.144, 2002-06-24 01:17:36+02:00 + Bind and SAP resolver are case insensitive. + +ChangeSet@1.143, 2002-06-23 21:36:44+02:00 + Clean all files generated in contrib/php. + +ChangeSet@1.142, 2002-06-23 00:58:05+02:00 + pam_ncp_auth: Fix couple of warnings and make contextless code faster. + +ChangeSet@1.141, 2002-06-23 00:42:21+02:00 + pam_ncp_auth: By Patrick Pollet. + Extended -Z option to allow some zenflags to be turned OFF on that workstation: + with -Z all zenflags are off, but with -ZABCD, only flags ABCD are off. + +ChangeSet@1.140, 2002-06-23 00:23:22+02:00 + pam_ncp_auth: Contextless login and IP support. By Jean-François Burdet. + +ChangeSet@1.139, 2002-06-23 00:18:43+02:00 + Make parameter "value" to NWDSAddFilterToken() constant. + +ChangeSet@1.138, 2002-06-22 23:51:37+02:00 + pam_ncp_auth: By Patrick Pollet + Add create homedir/do not create homedir option. + Add mount Netware in homedir or somewhere else option. + +ChangeSet@1.137, 2002-06-22 23:23:21+02:00 + pam_ncp_auth fixes. By Patrick Pollet. + Fixed possible buffer overflow in mount_nwhome in verbose mode. + Fixed remote access granting table for samba >= 2.07 (pam_tty=samba and + pam_rhost=hostname, was null, null in samba 2.06). + +ChangeSet@1.136, 2002-06-22 23:13:29+02:00 + tcl: Parse /etc/ndsclient.conf in all programs, pass -l to ncpmap when requested. + +ChangeSet@1.135, 2002-06-22 22:55:11+02:00 + Allow ncpmap mountpoint relocation by -l option. By Patrick Pollet. + +ChangeSet@1.134, 2002-06-22 21:24:57+02:00 + Use all supported namespaces when parsing ncpmount/ncpmap -V option. + +ChangeSet@1.133, 2002-06-22 18:51:08+02:00 + Pass username from ndsspace.tcl to ncpvrest explicitly. By Patrick Pollet. + +ChangeSet@1.132, 2002-06-22 18:48:10+02:00 + Bug in reading password expiration date. Fixed context problem. By Patrick Pollet. + +ChangeSet@1.131, 2002-06-22 18:39:57+02:00 + Added ndsexporter.pl into tcl-utils. By Patrick Pollet. + +ChangeSet@1.130, 2002-06-22 18:38:53+02:00 + Fix nwwhoami's -fc/-fD behavior. By Patrick Pollet. + +ChangeSet@1.129, 2002-06-22 18:26:41+02:00 + Emit value separator between multiple values. By Patrick Pollet. + +ChangeSet@1.128, 2002-06-22 03:59:24+02:00 + Fix "make distclean" failure in contrib/php. + +ChangeSet@1.127, 2002-06-21 23:46:07+02:00 + Fix ncpmount -o tcp brokeness. + +ChangeSet@1.126, 2002-06-20 22:34:04+02:00 + Check for php-config correctly + +ChangeSet@1.125, 2002-06-18 19:46:49+02:00 + Fix bug that all commands without -A option worked on + nearest server instead of on one specified by -S. + +ChangeSet@1.124, 2002-06-18 19:44:46+02:00 + tracencp requires -ldl + +ChangeSet@1.123, 2002-06-16 00:25:12+02:00 + Put code common to ncpmount/ncplogin/ncpmap into ncpm_common. + Add ncp_find_server_addr. + +ChangeSet@1.122, 2002-06-05 22:51:51+02:00 + Give descriptive names to _StartNLM arguments. + +ChangeSet@1.121, 2002-05-28 22:00:35+02:00 + Add autodetection to PHP module configuration + +ChangeSet@1.120, 2002-05-28 20:09:04+02:00 + contrib/php/Makefile.in is now autogenerated. + contrib/php/config_vars.mk and contrib/php/libs.mk are autogenerated, I commited them by mistake. + +ChangeSet@1.119, 2002-05-28 19:33:02+02:00 + Fix char*/const char* in ipxdump + +ChangeSet@1.118, 2002-05-28 19:31:56+02:00 + Use NCPFS_PACKAGE instead of PACKAGE + Remove config.h where not needed + Build PHP module through phpize + +ChangeSet@1.117, 2002-05-09 02:42:38+02:00 + Create unified name resolving functions and use them. + +ChangeSet@1.116, 2002-05-09 02:32:06+02:00 + NWScanObject and NWReadPropertyValue added. + +ChangeSet@1.115, 2002-05-09 02:29:03+02:00 + Use poll() instead of select(). + Specify timeout in miliseconds and not in microseconds. + +ChangeSet@1.114, 2002-05-09 02:22:33+02:00 + Ignore all *.o and *.do object files. + +ChangeSet@1.113, 2002-05-09 02:21:13+02:00 + Use u_int64_t instead of long long. + +ChangeSet@1.112, 2002-04-26 18:28:04+02:00 + NDS print queue names can be very long... (from Jean-Francois.Burdet@adm.unige.ch) + +ChangeSet@1.111, 2002-04-26 17:56:18+02:00 + Updated german translation (from Wolfram Pienkoss ) + +ChangeSet@1.110, 2002-04-25 19:22:30+02:00 + Enable logging, we are going multiuser... + +ChangeSet@1.109, 2002-04-21 00:07:02+02:00 + Use gcc to create proper dependencies + +ChangeSet@1.108, 2002-04-20 00:39:21+02:00 + Update PHP module for post sep-2001 API. + +ChangeSet@1.107, 2002-04-19 12:37:10+02:00 + Fix iconv_wchar_t_to_external issues. + Add -A option to the ncpmount and ncplogin help text. + +ChangeSet@1.106, 2002-02-27 19:11:44+01:00 + Erase password from command line. Better process name change code. + +ChangeSet@1.105, 2002-02-27 19:05:36+01:00 + Fix core dump when no username is specified to ncplogin. + +ChangeSet@1.104, 2002-02-27 17:36:20+01:00 + Update configure stuff with 2002-02-25 updates + +ChangeSet@1.103, 2002-02-22 00:01:49+01:00 + Ignore files built by make process + +ChangeSet@1.102, 2002-02-17 03:07:49+01:00 + nwdir.c: + Do not dump core on files without locks, change date/id format. + +ChangeSet@1.101, 2002-02-17 03:04:33+01:00 + Fix volume number handling. + +ChangeSet@1.100, 2002-02-17 02:57:44+01:00 + PAM update - possible buffer overflows. + +ChangeSet@1.99, 2002-02-16 04:16:09+01:00 + Update version numbers. + TAG: ncpfs-2.2.0.19.1 + +ChangeSet@1.98, 2002-02-16 04:11:36+01:00 + PAM and DS stream updates from Patrick Pollet. + +ChangeSet@1.97, 2002-02-16 04:07:55+01:00 + Show LastAccess time on directories, NSS supports that. + +ChangeSet@1.96, 2002-02-16 04:06:48+01:00 + Do not allow attribute names longer than MAX_SCHEMA_NAME_BYTES. + +ChangeSet@1.95, 2002-02-16 04:05:17+01:00 + Inline x_recv. + +ChangeSet@1.94, 2002-02-16 04:04:03+01:00 + Handle connection abort from ncpd gracefully + +ChangeSet@1.93, 2002-02-16 04:02:08+01:00 + Require writeable replica for DS streams + +ChangeSet@1.92, 2002-02-16 04:00:38+01:00 + Clean make error message + +ChangeSet@1.91, 2002-02-16 03:48:15+01:00 + Many files: + Import patch ncpfs-2.2.0.18-to-2.2.0.19 + TAG: ncpfs-2.2.0.19 + +For older entries please see Changes.old diff --git a/Changes.old b/Changes.old new file mode 100644 index 0000000..1c70074 --- /dev/null +++ b/Changes.old @@ -0,0 +1,553 @@ +I only began this file with ncpfs-0.12. If you're interested in older +versions, you can find them on ftp.gwdg.de:/pub/linux/misc/ncpfs/old. + +[Versions ncpfs-2.2.0.x are available at ftp://platan.vc.cvut.cz/pub/linux/ncpfs] + +ncpfs-2.2.0.18 -> ncpfs-2.2.0.19 +- VANA: Added -r, recursive, option to ncopy. +- VANA: Started NCP/TCP implementation. +- VANA: Dereference aliases during authentication. +- VANA: Configuration is read from /etc/ncpfs.conf file. +- VANA: Local codepage is read from /etc/ncpfs.conf file. +- VANA: Added INSTALL document. +- Wolfram Pienkoss : New de.po translations, changed email address. +- Wolfram Pienkoss: SuSE startup/shutdown scripts. +- Karl M. Hegbloom : tags/TAGS make target + added. +- VANA: Added handling of DS names to nwgrant and nwrevoke. +- VANA: Updated nwdir to print sizes of MAC resource forks. +- VANA: Added handling of replicaless servers. +- Bruno Browning : Fixed nprint. +- VANA: Enhandced NCP pam module. +- VANA: PHP NCP authentication module. +- Patrick Pollet: Enterprise PAM module. +- Patrick Pollet: GTK wrappers around some utilities. +- Patrick Pollet: Enhandcements in PHP module. +- Patrick Pollet: Wrappers around some NDS and NCP calls. +- VANA (+swig): Perl interface to most of NCP functions. +- Hans Grobler: Contributed ncp_ns_delete_entry, pointed out problem in NWDSFilter* + API. +- VANA, Patrick, others: See individual changelog entries in each file. + +ncpfs-2.2.0.17 -> ncpfs-2.2.0.18 +- VANA: Do not forget to do "make install-dev" if you want compile 3rd party + programs for ncpfs. +- VANA: Added GPL license and revision history to all files. If you are not + mentioned in some file, contact me. +- RYP: Couple of bugfixes, new options to ncptest. +- VANA: Fixed daemonizing of printserver. +- VANA: Fixed signal handling for temporary connections. +- VANA: Enhandcements to pam module (NDS groups). +- VANA: ncp_get_file_size added. +- VANA: ncopy copies MAC resource forks too. +- Wolfram Pienkoss: New de.po translations. +- VANA: I hope that all names returned from nwnet functions fit into + array of MAX_DN_BYTES bytes (or error is returned). +- VANA: Added NDS print queues support into nprint and pqlist. Needs more + polishing. +- VANA: Support for 32-bit uids in kernels after 2.3.40. +- VANA: NWDSAbortPartitionOperation, NWDSAddObject, NWDSAddReplica, + NWDSAuthenticateConn, NWDSChangeObjectPassword, NWDSChangeReplicaType, + NWDSCloseIteration, NWDSCompare, NWDSDuplicateContextHandle, + NWDSExtSyncList, NWDSExtSyncRead, NWDSExtSyncSearch, + NWDSGenerateObjectKeyPair, NWDSGenerateObjectKeyPair2, + NWDSGetAttrCount, NWDSGetAttrName, NWDSGetAttrVal, NWDSGetAttrValFlags, + NWDSGetAttrValModTime, NWDSGetBinderyContext, + NWDSGetCountByClassAndName, NWDSGetDSIInfo, NWDSGetDSVerInfo, + NWDSGetEffectiveRigths, NWDSGetObjectCount, NWDSGetObjectName, + NWDSGetObjectNameAndInfo, NWDSGetNDSStatistics, + NWDSGetPartitionExtInfo, NWDSGetPartitionExtInfoPtr, + NWDSGetPartitionInfo, NWDSGetPartitionRoot, NWDSGetServerName, + NWDSInitBuf, NWDSJoinPartitions, NWDSList, + NWDSListAttrsEffectiveRights, NWDSListByClassAndName, + NWDSListContainers, NWDSListPartitions, NWDSListPartitionsExtInfo, + NWDSModifyDN, NWDSModifyObject, NWDSModifyRDN, NWDSMoveObject, + NWDSPartitionReceiveAllUpdates, NWDSPartitionSendAllUpdates, + NWDSPutAttrName, NWDSPutAttrNameAndVal, NWDSPutAttrVal, NWDSPutChange, + NWDSPutChangeAndVal, NWDSRead, NWDSReadObjectDSIInfo, + NWDSReadObjectInfo, NWDSReloadDS, NWDSRemoveObject, + NWDSRemovePartition, NWDSRemoveReplica, NWDSRepairTimeStamps, + NWDSResetNDSStatistics, NWDSSearch, NWDSSplitPartition, + NWDSSyncPartition, NWDSVerifyObjectPassword added. + You must enable 'NDS authentication support' in kernel if you + want to fully utilize them. +- VANA: NWGetFileServerUTCTime added. +- Bruce Richardson : ncp_perms_to_str and ncp_str_to_perms + added. Modified nwgrant to use these. +- VANA: Modified nwrights to use ncp_perms_to_str. +- VANA: Changed pam module so that it works with bindery only if you specifically + asks. +- VANA: Added chauttok method to pam module. Use with care. +- VANA: All tools except ncpmount: If server specified by '-S' is not found + through IPX, name is retried as DNS name. + +ncpfs-2.2.0.16 -> ncpfs-2.2.0.17 +- VANA: Add nwtrustee2; it lists also NDS trustees +- RYP: Change in library code for correct using of 'dir_style'. +- RYP: change options on nwtrustee '-o' to '-O' and '-O' to '-o', + to use options like other utils. +- RYP: improved perfomance. +- RYP: fix bug in gettext macros. +- Paul Rensing : Fixed ncpmount signal handling +- VANA: ncpmount now calls /sbin/nwmsg, as did 2.0.x kernel code +- VANA: Fixes in directory scanning code +- Philip R. Wilson : Added DCK_CONFIDENCE flag. +- VANA: Some internal library changes +- VANA: new ncp_ns_* function group +- VANA: better ncopy, nwgrant, nwrevoke; NDS support next time +- VANA: threading support for operations working on single connection; that + is, NWDS* group of function cannot be used in multithreaded environment + yet (unless you'll have separate connections for each thread). +- VANA: versioned symbols +- VANA: pam_ncp_auth enhandced with code & ideas I found in pam_nw_auth 1.0.0 + created by Brian Hammond (multiple server=, + -d=debug, -v=verbose, -q=quiet (you really want -q if you have + multiple server= options, but I left verbose as default for backward + compatibility)) + +ncpfs-2.2.0.15 -> ncpfs-2.2.0.16 +- VANA: NWVerifyObjectPassword, NWDSCanonicalizeName, NWDSAbbreviateName, + NWDSRemoveAllTypes, NWCCOpenConnByAddr added +- VANA: ported to AIX (4.3.2). You have to use GNU make and GNU cc. There are + some warnings due to 64 bit environment, but it works (over UDP). + It caused couple of fixes and enhandcements (--disable-ipx now really + does not use any IPX header, --disable-kernel now really does not use + any linux-specific header) +- VANA: added install-dev, this moves headers to /usr/include/ncp and installs + libncp.a and libncp.so symlink + +ncpfs-2.2.0.14 -> ncpfs-2.2.0.15 +- VANA: (reported by couple of peoples): fixed 'slist' when there are no + connections +- VANA: fixed packet signatures on big-endian machines (stupid kernel bug, + fortunately userspace workaround available, so I do not have to bother + Linus) +- VANA: ipx_cmd added. You must have 'my' ipx in kernel or last, 2.2.8 kernel. + In older kernels ethertap is unusable for IPX (Rx is OK, but Tx does + not work). Do not forget to 'set Reply To Get Nearest Server = on' + on SCMD server... Otherwise you'll get 'No server' error :-( +- VANA: nwdpvalues now does something reasonable (not too much, but does) + +ncpfs-2.2.0.13 -> ncpfs-2.2.0.14 +- Philippe Anderson : nsend to groups, + 'From ....' appended to message +- VANA: when I was editing nsend, I did also: + handles connections > 255 (thus some new nwcalls stuff added) + sends to connection specified by number or object ID + handles wildcards in object name (see manpage) +- VANA: nwauth accepts '-P' password option (per user request) +- VANA: added some *.3ncp pages, installed by 'make install-dev'. I'm not + sure whether I write some formatted documentation in future, probably + only short paragraphs about each function will be enough? I wrote + code, so I do not know, what is unclear and so on... +- VANA: libncp completely localized. If you are using libncp for + programms outside ncpfs package, you must link your code with `-lintl' + from now (make install installs it) if gettext is not in libc. + Sorry. You can build ncpfs package with `--disable-nls', of course. + Shared version of libintl is not available. +- VANA: kernel symlinks stuff splitted to two options: + symlink do symlinks + extras do shared files (world readable) + +ncpfs-2.2.0.12 -> ncpfs-2.2.0.13 +- VANA: moved to 'configure' script +- VANA: completely fixed for glibc2.1; I tested one libc5(linux-2.0.33) and + one glibc2(linux-2.1.125) systems and it looks like that configure + does its job well, but... +- VANA: warning, library interface changed: com_err removed, ncp_request (and + others) now always return error code: + 0..1023 : UNIX errno + 0x8700-0x87FF : ncplib specific error + 0x8800-0x88FF : local errors + 0x8900-0x89FF : server errors + -256..-800 : NDS / UNICODE errors + -1..-255 : if occurs, it is bug, they should be mapped + to range 0x8900-0x89FF + NCP library version number bumped from 2/2.2.0 to 2.3/2.3.0 + because of incompatible changes in function return values +- VANA: added pam_ncp_auth into package (configure --enable-pam) +- VANA: fixed NWParsePath and NWGetNSEntryInfo + +ncpfs-2.2.0.11 -> ncpfs-2.2.0.12 +- VANA: fixed debian bugreport #29006 - exit code for nprint +- VANA: fixed debian bugreport #30293 - man pages update +- VANA: fixed some bugreport about popen("nwsfind") +- VANA: added nwfsctrl tool +- VANA: fixed debian bugreport #33214 - missing NR_OPEN for glibc2.1 + +ncpfs-2.2.0.10 -> ncpfs-2.2.0.11 +- VANA: mount.ncp, new option -o in ncpmount, updated manpage ncpmount(8) +- VANA: manpages moved to /usr/man, compressed; it should fix problems + on standard distributions + +ncpfs-2.2.0.9 -> ncpfs-2.2.0.10 +- Wolfram Pienkoss : NLS support + +ncpfs-2.2.0.8 -> ncpfs-2.2.0.9 +- Eloy A. Paris: reordered ncpmount initialization to suppress unneeded + ask for password + +ncpfs-2.2.0.7 -> ncpfs-2.2.0.8 +- VANA: nwfsctrl - down file server and/or open/close bindery + +ncpfs-2.2.0.6 -> ncpfs-2.2.0.7 +- VANA: Get connection from current directory if -S not specified on commandline. + +ncpfs-2.2.0.5 -> ncpfs-2.2.0.6 +- VANA: Bugfix. Username was limited to 48 chars. It is not true for NDS. + TODO: Review bindery code and limit outgoing usernames to + 48 chars. + +ncpfs-2.2.0.4 -> ncpfs-2.2.0.5 +- VANA: it now compiles on libc5 again (undefined socklen_t in ncplib.h) +- VANA: it works (with patched Makefiles*, added missing linux/* headers and + without kernel support (i.e. only native IP and without ncpmount, + ncpumount, nwdir and nwpurge) on SGI IRIX (IRIX64 sgi 6.2 03131016 + IP25). So I hope that it now works on Linux-SGI and Linux-Sparc too. + Please test and report success/failure... NDS code and NCP signatures + should work, nwpurge and nwdir probably should not... But I cannot test + kernel code because of that machine is not mine and its owner is happy + with IRIX. So I'm sorry. + * happy owner has not GNU Make on that machine... He has, fortunately, + gcc... It is impossible to compile ncpfs with IRIX's CC... + +ncpfs-2.2.0.3 -> ncpfs-2.2.0.4 +- VANA: more Alpha changes (sizeof(size_t) != sizeof(u_int32_t) :-( ) + Many thanks go to David Woodhouse and his Alpha CPU... +- VANA: IPX support can be commented out + +ncpfs-2.2.0.2 -> ncpfs-2.2.0.3 +- VANA: now it works on Alpha +- VANA: changes in DS encryption code (getting rid of error -669) + +ncpfs-2.2.0.1 -> ncpfs-2.2.0.2 +- Milan Vandrovec : nwdir tool + +ncpfs-2.2.0 -> ncpfs-2.2.0.1 +- Dave & VANA: new shared library numbering +- Dave & VANA: workarounds for RedHat's glibc-2.0.7 + +ncpfs-2.0.12.10 -> ncpfs-2.2.0 +- VANA: minor cleanup + +ncpfs-2.0.12.9 -> ncpfs-2.0.12.10 +- VANA: you can now access NDS server without replica of its conteiner + (TODO: access to server if server has R/W replica of your account but + does not have replica of itself) +- VANA: Alpha still no go :-( + +ncpfs-2.0.12.8 -> ncpfs-2.0.12.9 +- Eloy A. Paris: Fixes in library code + +ncpfs-2.0.12.7 -> ncpfs-2.0.12.8 +- VANA: bugfix, now it works again without ipxripd +- VANA: still cleaning up, ncp_open() and NDS byte ordering + +ncpfs-2.0.12.6 -> ncpfs-2.0.12.7 +- VANA: bugfixes, nwpurge + +ncpfs-2.0.12.5 -> ncpfs-2.0.12.6 +- VANA: ncpmount supports NCP over IP (no incoming broadcast at this time) + +ncpfs-2.0.12.4 -> ncpfs-2.0.12.5 +- Eloy A. Paris: Makefile bugfix + +ncpfs-2.0.12.3 -> ncpfs-2.0.12.4 +- VANA: Bugfixes +- VANA: Alpha stage of native NCP over IP support (no kernel at this time) + +ncpfs-2.0.12.2 -> ncpfs-2.0.12.3 +- VANA: Major makefile changes, compile warning cleanup + +ncpfs-2.0.12.1 -> ncpfs-2.0.12.2 +- Eloy A. Paris : Makefile cleanup +- VANA: More merging sutil/ncplib.c and lib/ncplib.c, not fully functional yet + +ncpfs-2.0.12 -> ncpfs-2.0.12.1 +- Dave, VANA: Bindery logins for all utilities (-b) +- VANA: Specify signature level for ncpmount (-i number) +- VANA: Start of merging sutil/*lib* with lib/*lib* + +ncpfs-2.0.11.19 -> ncpfs-2.0.12 +- Polished for release 2.0.12 +- Dave: pserver fixes, including addition of %d flag. + +ncpfs-2.0.11.18 -> ncpfs-2.0.11.19 +- Dave, VANA: new userspace utilities - pqstat and pqrm + +ncpfs-2.0.11.17 -> ncpfs-2.0.11.18 (no userspace change) +- Dave: getwd() did not work on 2.1.x +- VANA: Volumes are now always listed lowercased on 2.1.x + +ncpfs-2.0.11.16 -> ncpfs-2.0.11.17 +- David Woodhouse : Patch to pserver, + ncp_get_broadcast_message +- VANA & Dave: Cleanup for glibc, I hope that complete (xcpt. few warnings + about long int vs. u_int32_t) + +ncpfs-2.0.11.15 -> ncpfs-2.0.11.16 +- VANA: Removed symlink latest from archive :-) +- VANA: Added ncp_send_broadcast2 + +ncpfs-2.0.11.14 -> ncpfs-2.0.11.15 +- VANA: Fixed bug: wrong completion code returned when login to server without + r/w replica of logged-in user +- VANA: It is possible to disable NFS and/or OS2 namespace support in mount + +ncpfs-2.0.11.13 -> ncpfs-2.0.11.14 +- VANA: One source for 2.0 and 2.1 kernels +- Christian Groessler : Added strong mounts + +ncpfs-2.0.11.12 -> ncpfs-2.0.11.13 +- Arne: Signatures added to ncpfs-nds-0.06 +- VANA: Synchronized sources with Arne + +ncpfs-2.0.11.11 -> ncpfs-2.0.11.12 +- VANA: Fixed compilation error if compiled against kernel without signatures + even if SIGNATURES = 0 set + +ncpfs-2.0.11.10 -> ncpfs-2.0.11.11 +- VANA: Fixed segfault on invalid user name in NDS mode +- VANA: Added locking features (through ncpfs-specific ioctl(2)) + +ncpfs-2.0.11.9 -> ncpfs-2.0.11.10 +- VANA: Synchronized with nds-patches-0.05 from Arne de Bruijn + +ncpfs-2.0.11.8 -> ncpfs-2.0.11.9 +- VANA: Added call to lock connection (dropped in 2.0.11.7, sorry) + +ncpfs-2.0.11.7 -> ncpfs-2.0.11.8 +- VANA: Can be correctly compiled without signatures support in kernel (I hope) +- VANA: Fix in kernel in setting task number + +ncpfs-2.0.11.6 -> ncpfs-2.0.11.7 +- VANA: Codebase synchronized with Arne de Bruijn +- ARNE: Gracelogins on NDS +- VANA: Removed some (one) compilation warnings + +ncpfs-2.0.11.5 -> ncpfs-2.0.11.6 +- VANA: Support for NDS login accross servers + +ncpfs-2.0.11.4 -> ncpfs-2.0.11.5 +- VANA: Cleanup in ndscrypt +- VANA: Bugfix: empty password for NDS login is now allowed & works + +ncpfs-2.0.11.3 -> ncpfs-2.0.11.4 +- Enabled some buffer cleaning +- Added parameter "-b" to ncpmount for bindery login to NDS server + +ncpfs-2.0.11.2 -> ncpfs-2.0.11.3 +- Added NDS support by Arne de Bruijn ; small fixes in code; + moved sections to do same things as DOS login does. + +ncpfs-2.0.11.1 -> ncpfs-2.0.11.2 +- VANA: Fixed that some error conditions in LOGIN should start packet signatures + +ncpfs-2.0.11 -> ncpfs-2.0.11.1 +- VANA: Added packet signatures by Arne de Bruijn + +ncpfs-2.0.10 -> ncpfs-2.0.11 +- Added Martin's patch to Linux 2.0.30 to get rid of the lockups. + MANY thanks to Martin Stover! + +ncpfs-2.0.9 -> ncpfs-2.0.10 +- Made nwtrustee hopefully work ;-) +- Made the manpages a little bit prettier + +ncpfs-2.0.8 -> ncpfs-2.0.9 +- Added patches directory +- Added nwvolinfo and nwtrustee. Thanks to Jacek Stepniewski +- nwpasswd can change other's passwords. Thanks to Martin Stover. + +ncpfs-2.0.7 -> ncpfs-2.0.8 +- Fixed util/Makefile for easier optimization handling. Thanks to Rik + Faith for this one +- added nwfstime. You can now set the file server date and time from Linux. +- added the contrib directory. Feel free to add more! + +ncpfs-2.0.6 -> ncpfs-2.0.7 +- Hopefully removed one security problem in ncpumount. +- Added command line flag to pserver.c +- Heavily reconstructed ncpfs utils. Created the lib/ dir. +- Separated the uid utils in sutil +- Add nwsfind to enable users to use ncpfs safely without setting + the utils setuid root. + +ncpfs-2.0.5 -> ncpfs-2.0.6 +- Added a short description of a problem that I need help with to the + file BUGS. If you know a bit of the linux networking code, please + take a look at it. Thanks a lot. +- Added canonic output format to nwpbvalues and the command nwbpset. I + would like to invite you to help building capable bindery management + utilities. For little examples, look at the manual page of nwbpset. +- Added some values to ipxparse. Those interested in NDS should take a + look at it. It's really not much, but maybe it's a beginning. + +ncpfs-2.0.4 -> ncpfs-2.0.5 +- Removed another bug in nwbpvalues. +- Cleaned up man/Makefile +- Some manpage typos fixed. Thanks to Jim Van Zandt + +- added nwrights + +ncpfs-2.0.3 -> ncpfs-2.0.4 +- Changed name of npasswd to nwpasswd, as npasswd collides with + RedHat. Thanks to Mike Slater for pointing me + at this one. +- Put '\r\n' into nwmsg, because sometimes it did not print + correctly. Thanks to Petr Vandrovec Ing. VTEI + for this one. +- Improved the ELF Makefile for ELF support. Thanks to Uwe Bonnes + . +- Removed a very embarassing bug in nwpvalues :-(. +- Added a some routines to nwbpvalues. + +ncpfs-2.0.2 -> ncpfs-2.0.3 +- Removed the kernel-2.0 directory. Linus took the patch into 2.0.8. + So, if you want to use long file name support, upgrade to Linux + kernel version 2.0.8. +- Applied the lfn patch to the kernel-1.2 module with some light + testing. If you experience problems, tell it to me, and use the + ncpfs-2.0.2 kernel module, or upgrade to Linux 2.0.8. +- Added unencrypted login when no crypt key is returned. +- Hopefully improved error messages a bit +- Added some values to ipxparse +- For ELF systems, moved ncplib to /lib/libncp.so.1.x. This saves + about 1MB of disk space. As ncpfs grows, the saving will + increase. Please look at the Makefile to enable this. +- Enhanced nwfsinfo a bit. (Even with a manpage!) +- Added nwuserlist. + +ncpfs-2.0.1 -> ncpfs-2.0.2 +- Added some values to ipxparse. +- Added a patch against 2.0.7 for long file names support. I did not + apply this change to the 1.2-module. Please upgrade to 2.0.7 if you + want to use long file names. +- nwbpvalues can print ITEM properties + +ncpfs-2.0.0 -> ncpfs-2.0.1 +- Added some values to ipxparse. +- Added the little bindery utilities. Maybe someone has the time to + write a shellscript named 'nwadduser' ? +- Fixed a bug that made the __255 message reappear. Many thanks to + Guntram Blom for his detailed bug report. +- Fixed a bug that made ncpfs incompatible with W95's server + capabilities. Thanks to Tomasz Babczynski + for this one. + +ncpfs-0.24 -> ncpfs-2.0.0 +- Changed the numbering scheme :-). +- Added npasswd. Many thanks to Guntram Blom for his work! +- Hopefully improved error messages a bit +- Hopefully made slist a bit more robust + +ncpfs-0.23 -> ncpfs-0.24 +- Fixed a bug that made it impossible to umount a filesystem after you + tried 'mkdir .' or 'mkdir ..'. +- Fixed a bad race condition when opening files. +- Made the default timeout values more robust. + +ncpfs-0.22 -> ncpfs-0.23 +- Fixed a memory allocation problem in nwmsg.c. Thanks to + Andrew Ross +- slist hopefully does not ask for a password anymore. +- cleaned up error messages a bit. +- ncpmount now calls modprobe instead of insmod. + +ncpfs-0.21 -> ncpfs-0.22 +- removed a bad race condition in kernel-1.2/src/dir.c. +- handle 0x9999-responses from the ncp server correctly. +- Bindery functions in ncplib.c by Brian G. Reid (breid@tim.com) +- set blocksize to 512 to satisfy 'du -k' + +ncpfs-0.20 -> ncpfs-0.21 +- Included two bugfixes in ncplib.c found by Jeff Buhrt + . +- Included a bugfix in kernel code that could only show for servers + that do not support namespace calls. I should have tried ncpfs + against lwared... Thanks to Neil Turton for + this fix. + +ncpfs-0.19 -> ncpfs-0.20 +- Changed the home site for ncpfs from linux01.gwdg.de:/pub/ncpfs + to ftp.gwdg.de:/pub/linux/misc/ncpfs. linux01 will remain available, + but we would like to reduce the load on that machine. Sites + mirroring linux01 please redirect your mirror software to + ftp.gwdg.de. Thanks. +- Removed a bug in ncplib.c that made slist require a full + login. Thanks to Neil Turton for the hint. +- The first real user contribution: ncopy by Brian G. Reid + (breid@tim.com) and Tom C. Henderson (thenderson@tim.com). Many + thanks to you! If you find bugs in ncopy, tell them, not me ;-) +- Handle expired passwords. Thanks to "Mathew Lim" + for the hint. + +ncpfs-0.18 -> ncpfs-0.19 + +- hacked around in ncplib.[ch] quite heavily. +- SAP handling in ipxparse.c. Thanks to Jeff Buhrt +- Changed error handling to use the com_err library. This should + eventually provide better error messages, because it's now much + easier to define nice messages. +- If no server is active, report this correctly +- added nsend + +ncpfs-0.17 -> ncpfs-0.18 + +- Another attempt at solving the problem that -n is not working. +- Forgot nprint in 0.17 util/Makefile. +- nprint left connections open when it fails +- added options -r and -t to ncpmount to tune ncpfs connections. + +ncpfs-0.16 -> ncpfs-0.17 + +- Changed the name of fsinfo to nwfsinfo, to avoid a name clash with + the X windows utility. Thanks to Henning Brockfeld + for this hint. (still + waiting for your scripts.. :-)) +- made nwmsg available. This enables you to receive NetWare user + broadcast messages. Please note that you need at least kernel 1.3.68 + for this feature. +- pserver now prints debugging output via syslog(). +- Included ipxdump, a nice little utility, that has helped some + people. + +- And now the big one: you can re-export ncpfs-mounted directories + with nfsd! You have to mount single volumes by specifying -V volume + to ncpmount, and call nfsd and mountd with the option --re-export. + See the manual page of ncpmount for more information. Please note + that I will send Linus the required patch on 1. March 1996, so you + will have to use kernel 1.2.13 or wait at least for 1.3.70. + +ncpfs-0.15 -> ncpfs-0.16 + +- Included ipx-1.0, made available by Greg Page , + Caldera +- Made -n work for password-less accounts. Thanks to Alexander Jolk + . +- Fixed the kerneld support. +- Fixed the NetWare 4.1 problem. Many thanks to + Chatchai JANTARAPRIM and + hitesh.soneji@industry.net for their patience. + +ncpfs-0.14 -> ncpfs-0.15 + +- A bug fixed that made normal mounting impossible. It was too late + yesterday. Sorry +- Manpage for pserver.c + +ncpfs-0.13 -> ncpfs-0.14 + +- Improvements of manual pages by B. Galliart and + Terry Dawson +- fsinfo +- pserver.c. Please see this as ALPHA software. There is no + documentation, and it is not tested enough. But it might be useful for + you. + +ncpfs-0.12 -> ncpfs-0.13 + +- support for automatic loading of ncpfs.o by kerneld. + Thanks to Steven N. Hirsch . +- A subtle problem in the read routines has been removed by Uwe Bonnes + . Thanks a lot. diff --git a/ConfigFile b/ConfigFile new file mode 100644 index 0000000..532bd85 --- /dev/null +++ b/ConfigFile @@ -0,0 +1,67 @@ +Configuration files for ncpfs +============================= + +There are two configuration files for ncpfs, local and global. Local +configuration file lives in ${HOME}/.nwclient, global one lives in +/etc/ncpfs.conf. File is in UTF8 encoding. + +Local configuration file is split into two parts - non-sectioned and sectioned. +Non-sectioned contains old contents of .nwclient file - "server/user password" +triplets (eventually with user or password ommited). + +Sectioned part (and whole /etc/ncpfs.conf file) contains couple of sections. +Each section is started with "[Section Name]" line, lines in section are in +format "Key Name = value". If value contains spaces, you must either prefix +spaces with backslash "\" or enclose value into quotes (') or double quotes +("). If value contains backslash "\", you must prefix it with backslash. If +value in quotes contains quote, you must prefix it with backslash. Code knows +two special values, "\n" for LF and "\r" for CR - although currently there is +no reason for embed them into values. + +Everything after closing bracket on "[Section Name]" line is ignored. +Everything after value on "Key Name = value" line is ignored too. + +Following three examples mean same thing: +Strange Value = Strange\ Value\ "1 +Strange Value = "Strange Value \"1" +Strange Value = 'Strange Value "1' + +Currently known configuration options: + +[Requester] + +Local Charset = + Charset name is in internal system form, for glibc 2.1 + it is codepage name with two trailing slashes ("//"). + On non-iconv systems (such as libc5/libc6.0) you can + use only "WCHAR_T//", "ISO-8859-1//" and "UTF-8//" + charsets. + On glibc2.1 systems, you must add line + "alias WCHAR_T// INTERNAL" at the end of + "/usr/lib/gconv/gconv-modules" file. Without this, + iconv will not work on little-endian machines, such + as ix86. + On glibc2.2 systems you can use any encoding reported + by "iconv -l". + If you'll use encoding which can contain zero bytes + in the middle of string (such as UTF-16, UCS2 or + UCS4), supplied utilities may not work correctly. + Also, output of utilities is based on localization + files and not on selected codepage. + Default: "ISO-8859-1//" + +Default Tree Name = + Tree name is specified without trailing underscores. + Default: no default, system will complain when trying to use + default tree name + +Default Name Context = + Default name context is specified relative to [Root]. + Default: "[Root]" + +[Tree ] + +Default Name Context = + Default name context is specified relative to [Root]. + Default: value specified for Default Name Context in + [Requester] section. diff --git a/FAQ b/FAQ index f08ec41..2fc3faf 100644 --- a/FAQ +++ b/FAQ @@ -37,6 +37,8 @@ packet signatures on the 4.1 server, as ncpfs does not support them. Note: ncpfs, as of 2.0.12, and kernel 2.1.89, does now support packet signatures. +Note2: My test environment currently consist of couple of NW4.11/NW5 servers. +I have no 3.x servers around anymore. ------------------------------------------------------------------------------- @@ -64,3 +66,10 @@ A: You are probably connecting into Netware 4.x or IntraNetware. If you want a temporary workaround, add the option "-b" to the ncpmount commandline. For the future you should determine your Directory Services user name and use that instead of your bindery name. + +------------------------------------------------------------------------------- + +Q: I found bug. What I should do? + +A: Report it to "Petr Vandrovec" . + diff --git a/INSTALL b/INSTALL new file mode 100644 index 0000000..a95f591 --- /dev/null +++ b/INSTALL @@ -0,0 +1,196 @@ +Compiling and installing ncpfs +============================== + + +0. Quick start +-------------- + +Run "./configure", then "make install install-dev" and wait for successfull +completion. You can omit "install-dev" if you do not plan to compile other +libncp based programs, such as apache NDS authorization module. + + + +1. Configuration +---------------- + +Except usual configuration options, you can add some of these options to +configure commandline: + + --enable-warnings Enable very verbose build warnings. Please do not + report these warnings as a bugs. They are all + intentionaly left in sources. Disabled by default. + + --enable-pam Build PAM NCP authentication module. You must have + installed PAM headers in your standard include + directories. By default PAM directory is + automatically determined (in /lib/security, + /usr/lib/security, or /usr/local/lib/security) from + place of already installed modules. You can override + this with adding path after enable-pam. For example: + --enable-pam=/lib/pam/modules + + --disable-ipx-tools Disables building of ipx tools. By default tools are + enabled. Use this only if you are using some else + ipx-tools package or if your system does not support + IPX. + + --disable-udp Disable NCP/UDP and NCP/TCP. By default they are + enabled. Use this only for systems which do not + have IP at all. Otherwise you'll get very crippled + version of ncpfs - with full version you can access + servers anywhere on the Internet if there is no + firewall on port 524... + + --disable-ipx Disable NCP/IPX. By default IPX is enabled. Do not + disable IPX unless your system does not support + IPX at all. + + --disable-signatures Disable packet signing code. By default signatures + are enabled. Do not disable this, connecting without + signatures is very dangerous. + + --disable-nds Disable NDS support. By default NDS is enabled. + Disable it only if you are not sure that you can + use RSA for authorization purposes. Library produced + with this option is very limited in functionality + and 3rd party programs may not work with your + library. + + --disable-mount-v2 Disable support for Linux 2.0. Support is enabled + by default and you should not disable it. + + --disable-mount-v3 Disable support for Linux 2.2 and Linux 2.4. Support + is enabled by default and you should not disable it. + + --disable-kernel Do not use kernel interface. Use this only if there + is no ncpfs for your kernel (such as on AIX or IRIX). + + --disable-reentrant Do not compile threading support into library. By + default it is autodetected - if library compiled + with pthreads can run without them, support is enabled. + Disable this only if you are 100% sure that you'll not + use libncp in any multithreaded application, or if + your system does not support pthreads at all. + + --disable-versions Do not use version symbols in library. By default + enabled if your system supports it. If you'll disable + it, you may have troubles with binary compatibility + when upgrading to newer versions. + + --disable-function-sections Do not use -ffunction-sections and + -fdata-sections for static libraries. Enabled whenever + binutils can do this. If you disable this, all + statically linked programs are larger than they + really need. + + --enable-trace Enable trace of ncp calls. Do not enable it unless + you are debugging ncpfs. Each libncp call then spews + tons of data to stdout/stderr. + + --disable-nls Do not use Native Language Support. See ABOUT-NLS for + details. + + --with-included-gettext Use the GNU gettext library included here. See + ABOUT-NLS for details. + + --with-catgets Use catgets functions if available. See ABOUT-NLS for + details. + + + +2. Compilation +-------------- + +Just type "make" in top of directory structure. You need GNU make and GNU gcc. + + + +3. Installation +--------------- + +As root, type "make install" to install shared library and utilities. If you +plan to compile other programs for ncpfs, also run "make install-dev". This +installs ncpfs headers and static library. + + + +4. Runtime +---------- + +4.1. Configuration +------------------ + +You can configure system behavior with global configuration file, +/etc/ncpfs.conf, and local configuration files, ~/.nwclient. See ConfigFile +for details about contents of these files. + + +4.2. Limitations +---------------- + +4.2.1. Available transports +-------------------------- + +Temporary connections always support all available transports you +compiled. + +Persistent (ncpmount) connection capabilities are constrained by your +kernel. 2.0.x kernels support only NCP over IPX, 2.[123].x kernels support +NCP over IPX or UDP, and 2.4.x kernels support NCP over any of IPX, UDP or +TCP. + + +4.2.2. NDS support +------------------ + +For full NDS support (background authentication) you must enable 'NDS +authentication support' in kernel configuration. This option is available +only in 2.[34].x kernels. In 2.2.x kernels you can make option available +by simple uncommenting this option in linux/fs/ncpfs/Config.in (option is +commented out because of at the time 2.2.0 was released there was no +userspace support). If you have older kernel, you should upgrade if you +need such support. + + +4.2.3. Internationalization support +----------------------------------- + +Currently only available localizations are English, Germany and Czech. + + +4.2.4. Codepages support +------------------------ + +Codepage converting support is limited by underlying iconv implementation. +If no usable iconv is found, built in support for ISO-8859-1 and UTF-8 +is used. +NOTE: glibc2.1 implementation is treated as unusable on little endian +machines, unless you add "alias WCHAR_T// INTERNAL" at the end of +"/usr/lib/gconv/gconv-modules" file. Without this alias wchar_t format +used by wc* function group is unavailable to iconv. Clueless programmers. +glibc2.2 provides WCHAR_T encoding, so you should upgrade if you need codepage +not listed above. + + + +5. Something went wrong +----------------------- + +If things do not work as expected, make sure that you installed ncpfs +correctly. By default, ncp tools are installed into /usr/local, while +distributions put them into /usr. So you can end up with new tool using +old shared library. And it does not work... + +Also, look into BUGS, FAQ, README and README.NDS. If you'll not find +answer here, try asking on linware@sh.cvut.cz list (listserv@sh.cvut.cz). + +If you are sure that problem is in ncpfs implementation, send me bugreport +or patch (unified diff preferred). + + + + +-- +Trhovy Stepanov, March 10th, 2001 +Petr Vandrovec diff --git a/Make.rules.in b/Make.rules.in new file mode 100644 index 0000000..014cb08 --- /dev/null +++ b/Make.rules.in @@ -0,0 +1,60 @@ +# ######################################################## +INSTALL := @INSTALL@ +INSTALL_DATA := @INSTALL_DATA@ +CC := @CC@ + +prefix := @prefix@ +exec_prefix := @exec_prefix@ +bindir := @bindir@ +sbindir := @sbindir@ +libsodir := @libdir@ +#libsodir := /lib +libadir := @libdir@ +mandir := @mandir@ +srcdir := @srcdir@ +includedir := @includedir@ +sysconfdir := @sysconfdir@ +localedir := @localedir@ +VPATH = @srcdir@ + +NDS_SUPPORT := @NDS_SUPPORT@ +SIGNATURES := @SIGNATURES@ + +PACKAGE := @PACKAGE_NAME@ +VERSION := @PACKAGE_VERSION@ + +CC_WARNINGS := @CC_WARNINGS@ + +ifeq ($(CC_WARNINGS),yes) +#CWARN := -Wall -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Waggregate-return -Wnested-externs -Winline -Wbad-function-cast -W #-Werror #-Wwrite-strings -Wtraditional -Wshadow +#CWARN := -Wall -Wstrict-prototypes -Wcast-qual -Waggregate-return -Wnested-externs -Winline -Wbad-function-cast -W #-Wpointer-arith #-Werror #-Wwrite-strings -Wtraditional -Wshadow +CWARN := -Wall -Wundef -Wshadow -Wpointer-arith -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wmissing-noreturn -Wredundant-decls -Wstrict-prototypes -Wcast-qual -Waggregate-return -Wnested-externs -Winline -Wbad-function-cast -W #-Wpointer-arith #-Werror #-Wwrite-strings -Wtraditional -Wshadow +else +CWARN := +endif + +# ######################################################## + +INCLUDES := -I$(top_srcdir)/include -I$(top_srcdir)/intl -I$(top_builddir)/include + +CFLAGS_OPTIONS += @CFLAGS@ +CFLAGS_OPTIONS += $(CWARN) +CFLAGS_DEFINES := -DN_PLAT_LINUX -DLOCALEDIR=\"${localedir}\" -DNCPFS_VERSION=\"${VERSION}\" -DNCPFS_PACKAGE=\"${PACKAGE}\" + +CCFLAGS := $(CFLAGS_DEFINES) $(CFLAGS_OPTIONS) $(INCLUDES) + +# If your system is ELF, either also do a 'make install', or append the util/ +# directory where the dynamic library resides to the environment +# variable LD_LIBRARY_PATH +HAVE_ELF := @ELF_TARGET@ + +VERSION_SOLIB := 2.3.0 +VERSION_SONAME := 2.3 + +NEED_DEP := yes +ifneq ($(MAKECMDGOALS),) +ifeq ($(filter-out clean distclean mrproper, $(MAKECMDGOALS)),) +NEED_DEP := no +endif +endif + diff --git a/Makefile b/Makefile deleted file mode 100644 index 38410a0..0000000 --- a/Makefile +++ /dev/null @@ -1,81 +0,0 @@ -# -# Makefile for the linux ncp-filesystem routines. -# - -# If your system is ELF, either also do a 'make install', or append the util/ -# directory where the dynamic library resides to the environment -# variable LD_LIBRARY_PATH -HAVE_ELF=$(shell file `whereis gcc|cut -d ' ' -f 2`| \ - grep ELF >/dev/null && echo -n yes ) - -TOPDIR = $(shell pwd) -include ./Makeinit - -EXECSUBDIRS = lib-static-su sutil util ipx-1.0 -SUBDIRS := $(EXECSUBDIRS) lib-shared lib-static man -INSTALL_SUBDIRS := util sutil man ipx-1.0 -ifeq ($(HAVE_ELF),yes) -EXECSUBDIRS := lib-shared $(EXECSUBDIRS) -INSTALL_SUBDIRS := lib-shared $(INSTALL_SUBDIRS) -else -EXECSUBDIRS := lib-static $(EXECSUBDIRS) -INSTALL_SUBDIRS := lib-static $(INSTALL_SUBDIRS) -endif - -export INCLUDES VERSION HAVE_ELF CFLAGS - -all: - set -e; for i in $(EXECSUBDIRS); do make -C $$i all; done - @if [ "$(HAVE_ELF)" = yes ] ;\ - then \ - echo ; echo ; echo ;\ - echo Please add \'`pwd`/lib\' to the environment ; \ - echo variable LD_LIBRARY_PATH by executing ; \ - echo ;\ - echo export LD_LIBRARY_PATH=\"\$$LD_LIBRARY_PATH:`pwd`/lib\" ; \ - echo ;\ - echo or do a \'make install\'. ;\ - echo ;\ - fi - -dep: - for i in $(SUBDIRS); do make -C $$i dep; done - -install: - for i in $(INSTALL_SUBDIRS); do make -C $$i install; done - -clean_me: - rm -f `find -name '*.out'` - rm -f `find -name '*~'` - rm -f *.tgz - -clean: clean_me - for i in $(SUBDIRS); do make -C $$i clean; done - -mrproper: clean_me - for i in $(SUBDIRS) ipxdump; do make -C $$i mrproper; done - -modules: ncpfs.o - -SRCPATH=$(shell pwd) -SRCDIR=$(shell basename $(SRCPATH)) -DISTFILE=$(SRCDIR).tgz - -dist: tgz - make dep - make all - -tgz: - indent -kr -i8 `find . -name '*.[ch]'` - make mrproper - (cd ..; \ - tar cvf - $(SRCDIR) | \ - gzip -9 > $(DISTFILE); \ - mv $(DISTFILE) $(SRCDIR)) - -# -# include a dependency file if one exists -# -ifeq (.depend,$(wildcard .depend)) -include .depend -endif diff --git a/Makefile.in b/Makefile.in new file mode 100644 index 0000000..b056b91 --- /dev/null +++ b/Makefile.in @@ -0,0 +1,98 @@ +# +# Makefile for the linux ncp-filesystem routines. +# + +top_srcdir = @top_srcdir@ +top_builddir = . + +include ${top_builddir}/Make.rules + +.PHONY : all dep install install-dev clean mrproper distclean +.PHONY : tags TAGS clean_me dist tgz + +BASE_SUBDIRS := lib sutil util man @ADDON_SUBDIRS@ +EXECSUBDIRS = intl @POSUB@ $(BASE_SUBDIRS) +SUBDIRS := $(EXECSUBDIRS) +INSTALL_SUBDIRS := $(SUBDIRS) +INSTALL_DEV_SUBDIRS := lib sutil util man @ADDON_DEV_SUBDIRS@ +CLEAN_SUBDIRS := lib sutil util man intl @POSUB@ ipxdump ipx-1.0 ipx-1.0/Samples contrib/testing \ + contrib/testing/pp contrib/tests contrib/libtrace contrib/nss64 \ + contrib/tcl-utils contrib/php contrib/pam + +export INCLUDES VERSION HAVE_ELF CFLAGS + +all: + set -e; for i in $(EXECSUBDIRS); do make -C $$i all; done + @if [ "$(HAVE_ELF)" = yes ] ;\ + then \ + echo ; echo ; echo ;\ + echo Please add \'`pwd`/lib\' to the environment ; \ + echo variable LD_LIBRARY_PATH by executing ; \ + echo ;\ + echo export LD_LIBRARY_PATH=\"\$$LD_LIBRARY_PATH:`pwd`/lib\" ; \ + echo ;\ + echo or do a \'make install\'. ;\ + echo ;\ + fi + +dep: + for i in $(SUBDIRS); do make -C $$i dep; done + +tags: TAGS +TAGS: + etags --lang=c $$(find include lib sutil util ipx-1.0 ipxdump '*.[ch]') + +install: + for i in $(INSTALL_SUBDIRS); do make -C $$i install; done + +install-dev: + for i in $(INSTALL_DEV_SUBDIRS); do make -C $$i install-dev; done + +clean_me: + rm -f `find -name '*.out'` + rm -f `find -name '*~'` + rm -f *.tgz + +clean: clean_me + for i in $(CLEAN_SUBDIRS); do make -C $$i clean; done + +mrproper: clean_me + for i in $(CLEAN_SUBDIRS); do make -C $$i mrproper; done + +distclean: + for i in $(CLEAN_SUBDIRS); do [ -f $$i/Makefile ] && make -C $$i distclean; done + rm -f contrib/pam/Makefile contrib/tknwmsg/Makefile + rm -f contrib/testing/pp/Makefile contrib/testing/Makefile + rm -f contrib/tcl-utils/Makefile contrib/tests/Makefile + rm -f contrib/php/.deps contrib/php/Makefile.in contrib/php/libs.mk contrib/php/config.nice contrib/php/conftest* + rm -rf contrib/php/modules + rm -f ipx-1.0/Samples/Makefile ipx-1.0/Makefile + rm -f ipxdump/Makefile + rm -f intl/Makefile po/Makefile po/Makefile.in + rm -f lib/Makefile man/Makefile sutil/Makefile util/Makefile + rm -f include/config.h + rm -f include/ncp/ext/socket.h include/ncp/ext/stdint.h + rm -f include/ncp/kernel/fs.h + rm -f include/ncp/kernel/if.h include/ncp/kernel/route.h include/ncp/kernel/types.h + rm -f include/ncp/kernel/ipx.h + rm -f include/ncp/nwnet.h + rm -f config.cache config.log config.status + rm -f Make.rules + rm -f Makefile + +SRCPATH=$(shell pwd) +SRCDIR=$(shell basename $(SRCPATH)) +DISTFILE=$(SRCDIR).tgz + +dist: tgz + make dep + make all + +tgz: + indent -kr -i8 `find . -name '*.[ch]'` + make mrproper + (cd ..; \ + tar cvf - $(SRCDIR) | \ + gzip -9 > $(DISTFILE); \ + mv $(DISTFILE) $(SRCDIR)) + diff --git a/Makeinit b/Makeinit deleted file mode 100644 index 3f80e10..0000000 --- a/Makeinit +++ /dev/null @@ -1,79 +0,0 @@ -VERSION = 2.2.0 - -# If you want to include NDS support for ncpmount uncomment this: -# WARNING! NDS support is very beta, uncomment only if you are testing -# because anything can happen (like crashing the linux box or nw server). -NDS_SUPPORT = 1 - -# If you want to include packet signature support uncomment this: -# WARNING! packet signature support is in beta stage, uncomment only when you -# know what you are doing, anything can happen (like crashing the linux box or -# netware server). -# When enabling, make sure you have applied the kernel patches too, -# otherwise the packet signatures won't work. -SIGNATURES = 1 - -# If you want to eat only one NDS connection. Does not work at this time. -# (waiting for Novell...) -NDS_PRIVATEKEY = 1 - -# If you want native IP support, uncomment CONFIG_NATIVEIP -# Do not forget that it is VERY ALPHA code, with almost no support -# Enable only if you are interested in NCP over IP and you want help -# me. -A ip.address is your friend. At this time you have to silently -# ignore Login to server XXXX as YYYY - think that XXXX is ip.address and -# not one taken from .nwclient. Also, if you have not .nwclient, you have -# to add -S DUMMY on commandline. -CONFIG_NATIVE_IP = 1 - -# Include code for Linux2.0.x -MOUNT2 = 1 -# Include code for Linux2.1.x -MOUNT3 = 1 - -# ######################################################## -BINDIR = /usr/bin -SBINDIR = /sbin -LIBSODIR = /lib -LIBADIR = /usr/lib -MANDIR = /usr/local/man - -CC = gcc - -COPT = -O2 -CWARN = -Wall -# CWARN = -Wall -Wstrict-prototypes -Wpointer-arith -Wcast-qual -Waggregate-return -Wnested-externs -Winline -Wbad-function-cast -W #-Werror #-Wwrite-strings -Wtraditional -Wshadow -# ######################################################## - -ifdef SIGNATURES -CFLAGS_DEFINES += -DSIGNATURES -endif -ifdef NDS_SUPPORT -CFLAGS_DEFINES += -DNDS_SUPPORT -endif -ifdef CONFIG_NATIVE_IP -CFLAGS_DEFINES += -DCONFIG_NATIVE_IP -endif -ifdef MOUNT2 -CFLAGS_DEFINES += -DMOUNT2 -endif -ifdef MOUNT3 -CFLAGS_DEFINES += -DMOUNT3 -endif -CFLAGS_DEFINES += -DNCPFS_VERSION=\"$(VERSION)\" -CFLAGS_OPTIONS += $(COPT) -CFLAGS_OPTIONS += $(CWARN) - -CCFLAGS = $(CFLAGS_DEFINES) $(CFLAGS_OPTIONS) -I../include - -# If your system is ELF, either also do a 'make install', or append the util/ -# directory where the dynamic library resides to the environment -# variable LD_LIBRARY_PATH -HAVE_ELF=$(shell file `whereis gcc|cut -d ' ' -f 2`| \ - grep ELF >/dev/null && echo -n yes ) -#HAVE_ELF=yes - -TOPDIR = $(shell pwd) - -INCLUDES=-I$(TOPDIR)/include - diff --git a/Performance.txt b/Performance.txt new file mode 100644 index 0000000..25b014a --- /dev/null +++ b/Performance.txt @@ -0,0 +1,41 @@ +Author: Roumen Petrov (RYP) 7 jul 1999 + +A. I change old "PACKAL" like style for put data into packet to "C" style. + + +I added only for test purposes this function: + +/* ------------------------------------ */ +test (struct ncp_conn *_conn, + __u8 _dir_handle, const char *_name, + __u32 _object_id, __u16 _rights, __u16 _rights_mask) +{ + long result; + + ncp_init_request_s(_conn, 12); + ncp_add_byte(_conn, 0); /*??? name space */ + ncp_add_byte(_conn, 0); /*??? */ + ncp_add_word_lh(_conn, 0x8000); /*??? search attribs */ + ncp_add_word_lh(_conn, _rights_mask); /* lh or hl ? */ + ncp_add_byte(_conn, 1); /*??? */ + ncp_add_byte(_conn, 0); /*??? */ + ncp_add_byte(_conn, _dir_handle); + ncp_add_dword_lh(_conn, 0x00000000); /* lh or hl ? */ + ncp_add_pstring2(_conn, _name, 299); + ncp_add_dword_hl(_conn, _object_id); + ncp_add_word_lh(_conn, _rights); + +/* result = ncp_request(_conn, 87); */ + ncp_unlock_conn(_conn); + return result; +} + +/* ------------------------------------ */ + +into ../lib/ncplib.c in version 2.2.0. Then in a loop of +1000 * 10000 times I call this function and result is 221 [sec] to +154 [sec] over i486(120 Mhz). +In new version time for fill of packet is only 69.68% of time of old version. + +B. I renamed old function ncp_add_XXX to assert_ncp_add_XXX and +make new ncp_add_XXX without call to assert_conn_locked(....). diff --git a/README b/README index 54d0cbf..127f1d7 100644 --- a/README +++ b/README @@ -15,12 +15,6 @@ probably it's more clever to use nfs between two Linux machines. The user-space utilities such as nprint and the bindery utils should work with all versions of NetWare. -ncpfs does NOT support access to the NDS, so if you want to mount -volumes exported by a NetWare 4.x server, you will have to install the -bindery emulation on that server. If you need access to the NDS, ask -Caldera for their CND. See http://www.caldera.com for more -information. - INSTALLATION @@ -29,20 +23,20 @@ support compiled in. When 'make config' asks you for The IPX protocol (CONFIG_IPX) [N/y/m/?] -simply answer 'y'. Probably you do not need the full internal net that -you are asked for next. +simply answer 'y' or 'm'. Probably you do not need the full internal net +that you are asked for next. -If you are not using 2.0.x kernels, you can comment out MOUNT2=1 line -in the Makeinit. -If you are not using 2.1.x kernels, you can comment out MOUNT3=1 line -in the Makeinit. +Run 'configure', 'make' and, as root, 'make install'. That's all. -If you are not using NDS access, you can comment out NDS_SUPPORT=1 in -the Makeinit. -If you are not using packet signatures, you can comment out SIGNATURES=1 -in the Makeinit. - -After you adapted your Makeinit, type 'make' and, as root, 'make install'. +Before installing new version of ncpfs, you should stop all users of +old version, to release libncp.so from memory. Run as root: + umount -v -a -tncpfs +Command above unmounts all your ncpfs mounted volumes. Of course, +it is not necessary if you agree that disk space occupied by old +libncp.so will be released after reboot and that currently mounted +shares will continue using old libncp.so until unmount. + +See shell script file "contrib/scripts/rc.ipxnet" for other details. HELP @@ -106,7 +100,7 @@ ncpfs. The most enthusiastic user and tester is certainly Uwe Bonnes . So far he's the only one -who has contributed something, namely manpages and corretions to +who has contributed something, namely manpages and corrections to existing manpages. Ales Dyrak has written lwared, which was the initial start for ncpfs. @@ -126,5 +120,5 @@ directory. Have fun with ncpfs! -Volker -lendecke@namu01.gwdg.de +Volker, lendecke@namu01.gwdg.de (original author) +Petr Vandrovec, vandrove@vc.cvut.cz (current maintainer) diff --git a/acinclude.m4 b/acinclude.m4 new file mode 100644 index 0000000..d5290f6 --- /dev/null +++ b/acinclude.m4 @@ -0,0 +1,587 @@ +# gettext.m4 serial 17 (gettext-0.11.5) +dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. +dnl +dnl This file can can be used in projects which are not available under +dnl the GNU General Public License or the GNU Library General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +dnl by the GNU Library General Public License, and the rest of the GNU +dnl gettext package package is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Authors: +dnl Ulrich Drepper , 1995-2000. +dnl Bruno Haible , 2000-2002. + +dnl Macro to add for using GNU gettext. + +dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). +dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The +dnl default (if it is not specified or empty) is 'no-libtool'. +dnl INTLSYMBOL should be 'external' for packages with no intl directory, +dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory. +dnl If INTLSYMBOL is 'use-libtool', then a libtool library +dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, +dnl depending on --{enable,disable}-{shared,static} and on the presence of +dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library +dnl $(top_builddir)/intl/libintl.a will be created. +dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext +dnl implementations (in libc or libintl) without the ngettext() function +dnl will be ignored. If NEEDSYMBOL is specified and is +dnl 'need-formatstring-macros', then GNU gettext implementations that don't +dnl support the ISO C 99 formatstring macros will be ignored. +dnl INTLDIR is used to find the intl libraries. If empty, +dnl the value `$(top_builddir)/intl/' is used. +dnl +dnl The result of the configuration is one of three cases: +dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled +dnl and used. +dnl Catalog format: GNU --> install in $(datadir) +dnl Catalog extension: .mo after installation, .gmo in source tree +dnl 2) GNU gettext has been found in the system's C library. +dnl Catalog format: GNU --> install in $(datadir) +dnl Catalog extension: .mo after installation, .gmo in source tree +dnl 3) No internationalization, always use English msgid. +dnl Catalog format: none +dnl Catalog extension: none +dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur. +dnl The use of .gmo is historical (it was needed to avoid overwriting the +dnl GNU format catalogs when building on a platform with an X/Open gettext), +dnl but we keep it in order not to force irrelevant filename changes on the +dnl maintainers. +dnl +AC_DEFUN([AM_GNU_GETTEXT], +[ + dnl Argument checking. + ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , + [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT +])])])])]) + ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , + [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT +])])])]) + define(gt_included_intl, ifelse([$1], [external], [no], [yes])) + define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], [])) + + AC_REQUIRE([AM_PO_SUBDIRS])dnl + ifelse(gt_included_intl, yes, [ + AC_REQUIRE([AM_INTL_SUBDIR])dnl + ]) + + dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + + dnl Sometimes libintl requires libiconv, so first search for libiconv. + dnl Ideally we would do this search only after the + dnl if test "$USE_NLS" = "yes"; then + dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then + dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT + dnl the configure script would need to contain the same shell code + dnl again, outside any 'if'. There are two solutions: + dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. + dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. + dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not + dnl documented, we avoid it. + ifelse(gt_included_intl, yes, , [ + AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) + ]) + + AC_MSG_CHECKING([whether NLS is requested]) + dnl Default is enabled NLS + AC_ARG_ENABLE(nls, + [ --disable-nls do not use Native Language Support], + USE_NLS=$enableval, USE_NLS=yes) + AC_MSG_RESULT($USE_NLS) + AC_SUBST(USE_NLS) + + ifelse(gt_included_intl, yes, [ + BUILD_INCLUDED_LIBINTL=no + USE_INCLUDED_LIBINTL=no + ]) + LIBINTL= + LTLIBINTL= + POSUB= + + dnl If we use NLS figure out what method + if test "$USE_NLS" = "yes"; then + gt_use_preinstalled_gnugettext=no + ifelse(gt_included_intl, yes, [ + AC_MSG_CHECKING([whether included gettext is requested]) + AC_ARG_WITH(included-gettext, + [ --with-included-gettext use the GNU gettext library included here], + nls_cv_force_use_gnu_gettext=$withval, + nls_cv_force_use_gnu_gettext=no) + AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) + + nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" + if test "$nls_cv_force_use_gnu_gettext" != "yes"; then + ]) + dnl User does not insist on using GNU NLS library. Figure out what + dnl to use. If GNU gettext is available we use this. Else we have + dnl to fall back to GNU NLS library. + + dnl Add a version number to the cache macros. + define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1))) + define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc]) + define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl]) + + AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc, + [AC_TRY_LINK([#include +]ifelse([$2], [need-formatstring-macros], +[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION +#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) +#endif +changequote(,)dnl +typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; +changequote([,])dnl +], [])[extern int _nl_msg_cat_cntr; +extern int *_nl_domain_bindings;], + [bindtextdomain ("", ""); +return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings], + gt_cv_func_gnugettext_libc=yes, + gt_cv_func_gnugettext_libc=no)]) + + if test "$gt_cv_func_gnugettext_libc" != "yes"; then + dnl Sometimes libintl requires libiconv, so first search for libiconv. + ifelse(gt_included_intl, yes, , [ + AM_ICONV_LINK + ]) + dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL + dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv]) + dnl because that would add "-liconv" to LIBINTL and LTLIBINTL + dnl even if libiconv doesn't exist. + AC_LIB_LINKFLAGS_BODY([intl]) + AC_CACHE_CHECK([for GNU gettext in libintl], + gt_cv_func_gnugettext_libintl, + [gt_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $INCINTL" + gt_save_LIBS="$LIBS" + LIBS="$LIBS $LIBINTL" + dnl Now see whether libintl exists and does not depend on libiconv. + AC_TRY_LINK([#include +]ifelse([$2], [need-formatstring-macros], +[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION +#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) +#endif +changequote(,)dnl +typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; +changequote([,])dnl +], [])[extern int _nl_msg_cat_cntr; +extern +#ifdef __cplusplus +"C" +#endif +const char *_nl_expand_alias ();], + [bindtextdomain ("", ""); +return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)], + gt_cv_func_gnugettext_libintl=yes, + gt_cv_func_gnugettext_libintl=no) + dnl Now see whether libintl exists and depends on libiconv. + if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then + LIBS="$LIBS $LIBICONV" + AC_TRY_LINK([#include +]ifelse([$2], [need-formatstring-macros], +[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION +#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) +#endif +changequote(,)dnl +typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; +changequote([,])dnl +], [])[extern int _nl_msg_cat_cntr; +extern +#ifdef __cplusplus +"C" +#endif +const char *_nl_expand_alias ();], + [bindtextdomain ("", ""); +return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)], + [LIBINTL="$LIBINTL $LIBICONV" + LTLIBINTL="$LTLIBINTL $LTLIBICONV" + gt_cv_func_gnugettext_libintl=yes + ]) + fi + CPPFLAGS="$gt_save_CPPFLAGS" + LIBS="$gt_save_LIBS"]) + fi + + dnl If an already present or preinstalled GNU gettext() is found, + dnl use it. But if this macro is used in GNU gettext, and GNU + dnl gettext is already preinstalled in libintl, we update this + dnl libintl. (Cf. the install rule in intl/Makefile.in.) + if test "$gt_cv_func_gnugettext_libc" = "yes" \ + || { test "$gt_cv_func_gnugettext_libintl" = "yes" \ + && test "$PACKAGE" != gettext; }; then + gt_use_preinstalled_gnugettext=yes + else + dnl Reset the values set by searching for libintl. + LIBINTL= + LTLIBINTL= + INCINTL= + fi + + ifelse(gt_included_intl, yes, [ + if test "$gt_use_preinstalled_gnugettext" != "yes"; then + dnl GNU gettext is not found in the C library. + dnl Fall back on included GNU gettext library. + nls_cv_use_gnu_gettext=yes + fi + fi + + if test "$nls_cv_use_gnu_gettext" = "yes"; then + dnl Mark actions used to generate GNU NLS library. + INTLOBJS="\$(GETTOBJS)" + BUILD_INCLUDED_LIBINTL=yes + USE_INCLUDED_LIBINTL=yes + LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV" + LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV" + LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` + fi + + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + dnl Mark actions to use GNU gettext tools. + CATOBJEXT=.gmo + fi + ]) + + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + AC_DEFINE(ENABLE_NLS, 1, + [Define to 1 if translation of program messages to the user's native language + is requested.]) + else + USE_NLS=no + fi + fi + + if test "$USE_NLS" = "yes"; then + + if test "$gt_use_preinstalled_gnugettext" = "yes"; then + if test "$gt_cv_func_gnugettext_libintl" = "yes"; then + AC_MSG_CHECKING([how to link with libintl]) + AC_MSG_RESULT([$LIBINTL]) + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) + fi + + dnl For backward compatibility. Some packages may be using this. + AC_DEFINE(HAVE_GETTEXT, 1, + [Define if the GNU gettext() function is already present or preinstalled.]) + AC_DEFINE(HAVE_DCGETTEXT, 1, + [Define if the GNU dcgettext() function is already present or preinstalled.]) + fi + + dnl We need to process the po/ directory. + POSUB=po + fi + + ifelse(gt_included_intl, yes, [ + dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL + dnl to 'yes' because some of the testsuite requires it. + if test "$PACKAGE" = gettext; then + BUILD_INCLUDED_LIBINTL=yes + fi + + dnl Make all variables we use known to autoconf. + AC_SUBST(BUILD_INCLUDED_LIBINTL) + AC_SUBST(USE_INCLUDED_LIBINTL) + AC_SUBST(CATOBJEXT) + AC_SUBST(INTLOBJS) + + dnl For backward compatibility. Some configure.ins may be using this. + nls_cv_header_intl= + nls_cv_header_libgt= + + dnl For backward compatibility. Some Makefiles may be using this. + DATADIRNAME=share + AC_SUBST(DATADIRNAME) + + dnl For backward compatibility. Some Makefiles may be using this. + INSTOBJEXT=.mo + AC_SUBST(INSTOBJEXT) + + dnl For backward compatibility. Some Makefiles may be using this. + GENCAT=gencat + AC_SUBST(GENCAT) + + dnl Enable libtool support if the surrounding package wishes it. + INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix + AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX) + ]) + + dnl For backward compatibility. Some Makefiles may be using this. + INTLLIBS="$LIBINTL" + AC_SUBST(INTLLIBS) + + dnl Make all documented variables known to autoconf. + AC_SUBST(LIBINTL) + AC_SUBST(LTLIBINTL) + AC_SUBST(POSUB) +]) + + +dnl Checks for all prerequisites of the po subdirectory, +dnl except for USE_NLS. +AC_DEFUN([AM_PO_SUBDIRS], +[ + AC_REQUIRE([AC_PROG_MAKE_SET])dnl + AC_REQUIRE([AC_PROG_INSTALL])dnl + AC_REQUIRE([AM_MKINSTALLDIRS])dnl + + dnl Perform the following tests also if --disable-nls has been given, + dnl because they are needed for "make dist" to work. + + dnl Search for GNU msgfmt in the PATH. + dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions. + dnl The second test excludes FreeBSD msgfmt. + AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, + [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 && + (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], + :) + AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) + + dnl Search for GNU xgettext 0.11 or newer in the PATH. + dnl The first test excludes Solaris xgettext and early GNU xgettext versions. + dnl The second test excludes FreeBSD xgettext. + AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, + [$ac_dir/$ac_word --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 && + (if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], + :) + dnl Remove leftover from FreeBSD xgettext call. + rm -f messages.po + + dnl Search for GNU msgmerge 0.11 or newer in the PATH. + AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, + [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :) + + dnl This could go away some day; the PATH_PROG_WITH_TEST already does it. + dnl Test whether we really found GNU msgfmt. + if test "$GMSGFMT" != ":"; then + dnl If it is no GNU msgfmt we define it as : so that the + dnl Makefiles still can work. + if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 && + (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then + : ; + else + GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'` + AC_MSG_RESULT( + [found $GMSGFMT program is not GNU msgfmt; ignore it]) + GMSGFMT=":" + fi + fi + + dnl This could go away some day; the PATH_PROG_WITH_TEST already does it. + dnl Test whether we really found GNU xgettext. + if test "$XGETTEXT" != ":"; then + dnl If it is no GNU xgettext we define it as : so that the + dnl Makefiles still can work. + if $XGETTEXT --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 && + (if $XGETTEXT --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then + : ; + else + AC_MSG_RESULT( + [found xgettext program is not GNU xgettext; ignore it]) + XGETTEXT=":" + fi + dnl Remove leftover from FreeBSD xgettext call. + rm -f messages.po + fi + + AC_CONFIG_COMMANDS([[gettext]],[[ + for ac_file in $CONFIG_FILES; do + # Support "outfile[:infile[:infile...]]" + case "$ac_file" in + *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + esac + # PO directories have a Makefile.in generated from Makefile.in.in. + case "$ac_file" in */Makefile.in) + # Adjust a relative srcdir. + ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` + ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" + ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` + # In autoconf-2.13 it is called $ac_given_srcdir. + # In autoconf-2.50 it is called $srcdir. + test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" + case "$ac_given_srcdir" in + .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; + /*) top_srcdir="$ac_given_srcdir" ;; + *) top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then + rm -f "$ac_dir/POTFILES" + test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" + cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" + # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend + # on $ac_dir but don't depend on user-specified configuration + # parameters. + if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then + # The LINGUAS file contains the set of available languages. + if test -n "$ALL_LINGUAS"; then + test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" + fi + ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"` + # Hide the ALL_LINGUAS assigment from automake. + eval 'ALL_LINGUAS''=$ALL_LINGUAS_' + fi + case "$ac_given_srcdir" in + .) srcdirpre= ;; + *) srcdirpre='$(srcdir)/' ;; + esac + POFILES= + GMOFILES= + UPDATEPOFILES= + DUMMYPOFILES= + for lang in $ALL_LINGUAS; do + POFILES="$POFILES $srcdirpre$lang.po" + GMOFILES="$GMOFILES $srcdirpre$lang.gmo" + UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" + DUMMYPOFILES="$DUMMYPOFILES $lang.nop" + done + # CATALOGS depends on both $ac_dir and the user's LINGUAS + # environment variable. + INST_LINGUAS= + if test -n "$ALL_LINGUAS"; then + for presentlang in $ALL_LINGUAS; do + useit=no + if test "%UNSET%" != "$LINGUAS"; then + desiredlanguages="$LINGUAS" + else + desiredlanguages="$ALL_LINGUAS" + fi + for desiredlang in $desiredlanguages; do + # Use the presentlang catalog if desiredlang is + # a. equal to presentlang, or + # b. a variant of presentlang (because in this case, + # presentlang can be used as a fallback for messages + # which are not translated in the desiredlang catalog). + case "$desiredlang" in + "$presentlang"*) useit=yes;; + esac + done + if test $useit = yes; then + INST_LINGUAS="$INST_LINGUAS $presentlang" + fi + done + fi + CATALOGS= + if test -n "$INST_LINGUAS"; then + for lang in $INST_LINGUAS; do + CATALOGS="$CATALOGS $lang.gmo" + done + fi + test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" + sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" + for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do + if test -f "$f"; then + case "$f" in + *.orig | *.bak | *~) ;; + *) cat "$f" >> "$ac_dir/Makefile" ;; + esac + fi + done + fi + ;; + esac + done]], + [# Capture the value of obsolete ALL_LINGUAS because we need it to compute + # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it + # from automake. + eval 'ALL_LINGUAS''="$ALL_LINGUAS"' + # Capture the value of LINGUAS because we need it to compute CATALOGS. + LINGUAS="${LINGUAS-%UNSET%}" + ]) +]) + + +dnl Checks for all prerequisites of the intl subdirectory, +dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS, +dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL. +AC_DEFUN([AM_INTL_SUBDIR], +[ + AC_REQUIRE([AC_PROG_INSTALL])dnl + AC_REQUIRE([AM_MKINSTALLDIRS])dnl + AC_REQUIRE([AC_PROG_CC])dnl + AC_REQUIRE([AC_CANONICAL_HOST])dnl + AC_REQUIRE([AC_PROG_RANLIB])dnl + AC_REQUIRE([AC_ISC_POSIX])dnl + AC_REQUIRE([AC_HEADER_STDC])dnl + AC_REQUIRE([AC_C_CONST])dnl + AC_REQUIRE([AC_C_INLINE])dnl + AC_REQUIRE([AC_TYPE_OFF_T])dnl + AC_REQUIRE([AC_TYPE_SIZE_T])dnl + AC_REQUIRE([AC_FUNC_ALLOCA])dnl + AC_REQUIRE([AC_FUNC_MMAP])dnl + AC_REQUIRE([jm_GLIBC21])dnl + AC_REQUIRE([gt_INTDIV0])dnl + AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl + AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl + AC_REQUIRE([gt_INTTYPES_PRI])dnl + + AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \ +stdlib.h string.h unistd.h sys/param.h]) + AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \ +geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \ +strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next]) + + AM_ICONV + AM_LANGINFO_CODESET + if test $ac_cv_header_locale_h = yes; then + AM_LC_MESSAGES + fi + + dnl intl/plural.c is generated from intl/plural.y. It requires bison, + dnl because plural.y uses bison specific features. It requires at least + dnl bison-1.26 because earlier versions generate a plural.c that doesn't + dnl compile. + dnl bison is only needed for the maintainer (who touches plural.y). But in + dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put + dnl the rule in general Makefile. Now, some people carelessly touch the + dnl files or have a broken "make" program, hence the plural.c rule will + dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not + dnl present or too old. + AC_CHECK_PROGS([INTLBISON], [bison]) + if test -z "$INTLBISON"; then + ac_verc_fail=yes + else + dnl Found it, now check the version. + AC_MSG_CHECKING([version of bison]) +changequote(<<,>>)dnl + ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; + 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*) +changequote([,])dnl + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; + esac + AC_MSG_RESULT([$ac_prog_version]) + fi + if test $ac_verc_fail = yes; then + INTLBISON=: + fi +]) + + +AC_DEFUN([AM_MKINSTALLDIRS], +[ + dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly + dnl find the mkinstalldirs script in another subdir but $(top_srcdir). + dnl Try to locate is. + MKINSTALLDIRS= + if test -n "$ac_aux_dir"; then + MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" + fi + if test -z "$MKINSTALLDIRS"; then + MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" + fi + AC_SUBST(MKINSTALLDIRS) +]) + + +dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) +AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) diff --git a/aclocal.m4 b/aclocal.m4 new file mode 100644 index 0000000..ff6b2e7 --- /dev/null +++ b/aclocal.m4 @@ -0,0 +1,1930 @@ +# aclocal.m4 generated automatically by aclocal 1.5 + +# Copyright 1996, 1997, 1998, 1999, 2000, 2001 +# Free Software Foundation, Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +# gettext.m4 serial 17 (gettext-0.11.5) +dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. +dnl +dnl This file can can be used in projects which are not available under +dnl the GNU General Public License or the GNU Library General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +dnl by the GNU Library General Public License, and the rest of the GNU +dnl gettext package package is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Authors: +dnl Ulrich Drepper , 1995-2000. +dnl Bruno Haible , 2000-2002. + +dnl Macro to add for using GNU gettext. + +dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). +dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The +dnl default (if it is not specified or empty) is 'no-libtool'. +dnl INTLSYMBOL should be 'external' for packages with no intl directory, +dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory. +dnl If INTLSYMBOL is 'use-libtool', then a libtool library +dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, +dnl depending on --{enable,disable}-{shared,static} and on the presence of +dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library +dnl $(top_builddir)/intl/libintl.a will be created. +dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext +dnl implementations (in libc or libintl) without the ngettext() function +dnl will be ignored. If NEEDSYMBOL is specified and is +dnl 'need-formatstring-macros', then GNU gettext implementations that don't +dnl support the ISO C 99 formatstring macros will be ignored. +dnl INTLDIR is used to find the intl libraries. If empty, +dnl the value `$(top_builddir)/intl/' is used. +dnl +dnl The result of the configuration is one of three cases: +dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled +dnl and used. +dnl Catalog format: GNU --> install in $(datadir) +dnl Catalog extension: .mo after installation, .gmo in source tree +dnl 2) GNU gettext has been found in the system's C library. +dnl Catalog format: GNU --> install in $(datadir) +dnl Catalog extension: .mo after installation, .gmo in source tree +dnl 3) No internationalization, always use English msgid. +dnl Catalog format: none +dnl Catalog extension: none +dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur. +dnl The use of .gmo is historical (it was needed to avoid overwriting the +dnl GNU format catalogs when building on a platform with an X/Open gettext), +dnl but we keep it in order not to force irrelevant filename changes on the +dnl maintainers. +dnl +AC_DEFUN([AM_GNU_GETTEXT], +[ + dnl Argument checking. + ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , + [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT +])])])])]) + ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , + [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT +])])])]) + define(gt_included_intl, ifelse([$1], [external], [no], [yes])) + define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], [])) + + AC_REQUIRE([AM_PO_SUBDIRS])dnl + ifelse(gt_included_intl, yes, [ + AC_REQUIRE([AM_INTL_SUBDIR])dnl + ]) + + dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + + dnl Sometimes libintl requires libiconv, so first search for libiconv. + dnl Ideally we would do this search only after the + dnl if test "$USE_NLS" = "yes"; then + dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then + dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT + dnl the configure script would need to contain the same shell code + dnl again, outside any 'if'. There are two solutions: + dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. + dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. + dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not + dnl documented, we avoid it. + ifelse(gt_included_intl, yes, , [ + AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) + ]) + + AC_MSG_CHECKING([whether NLS is requested]) + dnl Default is enabled NLS + AC_ARG_ENABLE(nls, + [ --disable-nls do not use Native Language Support], + USE_NLS=$enableval, USE_NLS=yes) + AC_MSG_RESULT($USE_NLS) + AC_SUBST(USE_NLS) + + ifelse(gt_included_intl, yes, [ + BUILD_INCLUDED_LIBINTL=no + USE_INCLUDED_LIBINTL=no + ]) + LIBINTL= + LTLIBINTL= + POSUB= + + dnl If we use NLS figure out what method + if test "$USE_NLS" = "yes"; then + gt_use_preinstalled_gnugettext=no + ifelse(gt_included_intl, yes, [ + AC_MSG_CHECKING([whether included gettext is requested]) + AC_ARG_WITH(included-gettext, + [ --with-included-gettext use the GNU gettext library included here], + nls_cv_force_use_gnu_gettext=$withval, + nls_cv_force_use_gnu_gettext=no) + AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) + + nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" + if test "$nls_cv_force_use_gnu_gettext" != "yes"; then + ]) + dnl User does not insist on using GNU NLS library. Figure out what + dnl to use. If GNU gettext is available we use this. Else we have + dnl to fall back to GNU NLS library. + + dnl Add a version number to the cache macros. + define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1))) + define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc]) + define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl]) + + AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc, + [AC_TRY_LINK([#include +]ifelse([$2], [need-formatstring-macros], +[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION +#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) +#endif +changequote(,)dnl +typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; +changequote([,])dnl +], [])[extern int _nl_msg_cat_cntr; +extern int *_nl_domain_bindings;], + [bindtextdomain ("", ""); +return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings], + gt_cv_func_gnugettext_libc=yes, + gt_cv_func_gnugettext_libc=no)]) + + if test "$gt_cv_func_gnugettext_libc" != "yes"; then + dnl Sometimes libintl requires libiconv, so first search for libiconv. + ifelse(gt_included_intl, yes, , [ + AM_ICONV_LINK + ]) + dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL + dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv]) + dnl because that would add "-liconv" to LIBINTL and LTLIBINTL + dnl even if libiconv doesn't exist. + AC_LIB_LINKFLAGS_BODY([intl]) + AC_CACHE_CHECK([for GNU gettext in libintl], + gt_cv_func_gnugettext_libintl, + [gt_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $INCINTL" + gt_save_LIBS="$LIBS" + LIBS="$LIBS $LIBINTL" + dnl Now see whether libintl exists and does not depend on libiconv. + AC_TRY_LINK([#include +]ifelse([$2], [need-formatstring-macros], +[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION +#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) +#endif +changequote(,)dnl +typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; +changequote([,])dnl +], [])[extern int _nl_msg_cat_cntr; +extern +#ifdef __cplusplus +"C" +#endif +const char *_nl_expand_alias ();], + [bindtextdomain ("", ""); +return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)], + gt_cv_func_gnugettext_libintl=yes, + gt_cv_func_gnugettext_libintl=no) + dnl Now see whether libintl exists and depends on libiconv. + if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then + LIBS="$LIBS $LIBICONV" + AC_TRY_LINK([#include +]ifelse([$2], [need-formatstring-macros], +[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION +#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) +#endif +changequote(,)dnl +typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; +changequote([,])dnl +], [])[extern int _nl_msg_cat_cntr; +extern +#ifdef __cplusplus +"C" +#endif +const char *_nl_expand_alias ();], + [bindtextdomain ("", ""); +return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)], + [LIBINTL="$LIBINTL $LIBICONV" + LTLIBINTL="$LTLIBINTL $LTLIBICONV" + gt_cv_func_gnugettext_libintl=yes + ]) + fi + CPPFLAGS="$gt_save_CPPFLAGS" + LIBS="$gt_save_LIBS"]) + fi + + dnl If an already present or preinstalled GNU gettext() is found, + dnl use it. But if this macro is used in GNU gettext, and GNU + dnl gettext is already preinstalled in libintl, we update this + dnl libintl. (Cf. the install rule in intl/Makefile.in.) + if test "$gt_cv_func_gnugettext_libc" = "yes" \ + || { test "$gt_cv_func_gnugettext_libintl" = "yes" \ + && test "$PACKAGE" != gettext; }; then + gt_use_preinstalled_gnugettext=yes + else + dnl Reset the values set by searching for libintl. + LIBINTL= + LTLIBINTL= + INCINTL= + fi + + ifelse(gt_included_intl, yes, [ + if test "$gt_use_preinstalled_gnugettext" != "yes"; then + dnl GNU gettext is not found in the C library. + dnl Fall back on included GNU gettext library. + nls_cv_use_gnu_gettext=yes + fi + fi + + if test "$nls_cv_use_gnu_gettext" = "yes"; then + dnl Mark actions used to generate GNU NLS library. + INTLOBJS="\$(GETTOBJS)" + BUILD_INCLUDED_LIBINTL=yes + USE_INCLUDED_LIBINTL=yes + LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV" + LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV" + LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` + fi + + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + dnl Mark actions to use GNU gettext tools. + CATOBJEXT=.gmo + fi + ]) + + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + AC_DEFINE(ENABLE_NLS, 1, + [Define to 1 if translation of program messages to the user's native language + is requested.]) + else + USE_NLS=no + fi + fi + + if test "$USE_NLS" = "yes"; then + + if test "$gt_use_preinstalled_gnugettext" = "yes"; then + if test "$gt_cv_func_gnugettext_libintl" = "yes"; then + AC_MSG_CHECKING([how to link with libintl]) + AC_MSG_RESULT([$LIBINTL]) + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) + fi + + dnl For backward compatibility. Some packages may be using this. + AC_DEFINE(HAVE_GETTEXT, 1, + [Define if the GNU gettext() function is already present or preinstalled.]) + AC_DEFINE(HAVE_DCGETTEXT, 1, + [Define if the GNU dcgettext() function is already present or preinstalled.]) + fi + + dnl We need to process the po/ directory. + POSUB=po + fi + + ifelse(gt_included_intl, yes, [ + dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL + dnl to 'yes' because some of the testsuite requires it. + if test "$PACKAGE" = gettext; then + BUILD_INCLUDED_LIBINTL=yes + fi + + dnl Make all variables we use known to autoconf. + AC_SUBST(BUILD_INCLUDED_LIBINTL) + AC_SUBST(USE_INCLUDED_LIBINTL) + AC_SUBST(CATOBJEXT) + AC_SUBST(INTLOBJS) + + dnl For backward compatibility. Some configure.ins may be using this. + nls_cv_header_intl= + nls_cv_header_libgt= + + dnl For backward compatibility. Some Makefiles may be using this. + DATADIRNAME=share + AC_SUBST(DATADIRNAME) + + dnl For backward compatibility. Some Makefiles may be using this. + INSTOBJEXT=.mo + AC_SUBST(INSTOBJEXT) + + dnl For backward compatibility. Some Makefiles may be using this. + GENCAT=gencat + AC_SUBST(GENCAT) + + dnl Enable libtool support if the surrounding package wishes it. + INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix + AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX) + ]) + + dnl For backward compatibility. Some Makefiles may be using this. + INTLLIBS="$LIBINTL" + AC_SUBST(INTLLIBS) + + dnl Make all documented variables known to autoconf. + AC_SUBST(LIBINTL) + AC_SUBST(LTLIBINTL) + AC_SUBST(POSUB) +]) + + +dnl Checks for all prerequisites of the po subdirectory, +dnl except for USE_NLS. +AC_DEFUN([AM_PO_SUBDIRS], +[ + AC_REQUIRE([AC_PROG_MAKE_SET])dnl + AC_REQUIRE([AC_PROG_INSTALL])dnl + AC_REQUIRE([AM_MKINSTALLDIRS])dnl + + dnl Perform the following tests also if --disable-nls has been given, + dnl because they are needed for "make dist" to work. + + dnl Search for GNU msgfmt in the PATH. + dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions. + dnl The second test excludes FreeBSD msgfmt. + AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, + [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 && + (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], + :) + AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) + + dnl Search for GNU xgettext 0.11 or newer in the PATH. + dnl The first test excludes Solaris xgettext and early GNU xgettext versions. + dnl The second test excludes FreeBSD xgettext. + AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, + [$ac_dir/$ac_word --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 && + (if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], + :) + dnl Remove leftover from FreeBSD xgettext call. + rm -f messages.po + + dnl Search for GNU msgmerge 0.11 or newer in the PATH. + AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge, + [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :) + + dnl This could go away some day; the PATH_PROG_WITH_TEST already does it. + dnl Test whether we really found GNU msgfmt. + if test "$GMSGFMT" != ":"; then + dnl If it is no GNU msgfmt we define it as : so that the + dnl Makefiles still can work. + if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 && + (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then + : ; + else + GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'` + AC_MSG_RESULT( + [found $GMSGFMT program is not GNU msgfmt; ignore it]) + GMSGFMT=":" + fi + fi + + dnl This could go away some day; the PATH_PROG_WITH_TEST already does it. + dnl Test whether we really found GNU xgettext. + if test "$XGETTEXT" != ":"; then + dnl If it is no GNU xgettext we define it as : so that the + dnl Makefiles still can work. + if $XGETTEXT --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 && + (if $XGETTEXT --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then + : ; + else + AC_MSG_RESULT( + [found xgettext program is not GNU xgettext; ignore it]) + XGETTEXT=":" + fi + dnl Remove leftover from FreeBSD xgettext call. + rm -f messages.po + fi + + AC_CONFIG_COMMANDS([[gettext]],[[ + for ac_file in $CONFIG_FILES; do + # Support "outfile[:infile[:infile...]]" + case "$ac_file" in + *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + esac + # PO directories have a Makefile.in generated from Makefile.in.in. + case "$ac_file" in */Makefile.in) + # Adjust a relative srcdir. + ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` + ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" + ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` + # In autoconf-2.13 it is called $ac_given_srcdir. + # In autoconf-2.50 it is called $srcdir. + test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" + case "$ac_given_srcdir" in + .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; + /*) top_srcdir="$ac_given_srcdir" ;; + *) top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then + rm -f "$ac_dir/POTFILES" + test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" + cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" + # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend + # on $ac_dir but don't depend on user-specified configuration + # parameters. + if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then + # The LINGUAS file contains the set of available languages. + if test -n "$ALL_LINGUAS"; then + test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" + fi + ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"` + # Hide the ALL_LINGUAS assigment from automake. + eval 'ALL_LINGUAS''=$ALL_LINGUAS_' + fi + case "$ac_given_srcdir" in + .) srcdirpre= ;; + *) srcdirpre='$(srcdir)/' ;; + esac + POFILES= + GMOFILES= + UPDATEPOFILES= + DUMMYPOFILES= + for lang in $ALL_LINGUAS; do + POFILES="$POFILES $srcdirpre$lang.po" + GMOFILES="$GMOFILES $srcdirpre$lang.gmo" + UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" + DUMMYPOFILES="$DUMMYPOFILES $lang.nop" + done + # CATALOGS depends on both $ac_dir and the user's LINGUAS + # environment variable. + INST_LINGUAS= + if test -n "$ALL_LINGUAS"; then + for presentlang in $ALL_LINGUAS; do + useit=no + if test "%UNSET%" != "$LINGUAS"; then + desiredlanguages="$LINGUAS" + else + desiredlanguages="$ALL_LINGUAS" + fi + for desiredlang in $desiredlanguages; do + # Use the presentlang catalog if desiredlang is + # a. equal to presentlang, or + # b. a variant of presentlang (because in this case, + # presentlang can be used as a fallback for messages + # which are not translated in the desiredlang catalog). + case "$desiredlang" in + "$presentlang"*) useit=yes;; + esac + done + if test $useit = yes; then + INST_LINGUAS="$INST_LINGUAS $presentlang" + fi + done + fi + CATALOGS= + if test -n "$INST_LINGUAS"; then + for lang in $INST_LINGUAS; do + CATALOGS="$CATALOGS $lang.gmo" + done + fi + test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" + sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" + for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do + if test -f "$f"; then + case "$f" in + *.orig | *.bak | *~) ;; + *) cat "$f" >> "$ac_dir/Makefile" ;; + esac + fi + done + fi + ;; + esac + done]], + [# Capture the value of obsolete ALL_LINGUAS because we need it to compute + # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it + # from automake. + eval 'ALL_LINGUAS''="$ALL_LINGUAS"' + # Capture the value of LINGUAS because we need it to compute CATALOGS. + LINGUAS="${LINGUAS-%UNSET%}" + ]) +]) + + +dnl Checks for all prerequisites of the intl subdirectory, +dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS, +dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL. +AC_DEFUN([AM_INTL_SUBDIR], +[ + AC_REQUIRE([AC_PROG_INSTALL])dnl + AC_REQUIRE([AM_MKINSTALLDIRS])dnl + AC_REQUIRE([AC_PROG_CC])dnl + AC_REQUIRE([AC_CANONICAL_HOST])dnl + AC_REQUIRE([AC_PROG_RANLIB])dnl + AC_REQUIRE([AC_ISC_POSIX])dnl + AC_REQUIRE([AC_HEADER_STDC])dnl + AC_REQUIRE([AC_C_CONST])dnl + AC_REQUIRE([AC_C_INLINE])dnl + AC_REQUIRE([AC_TYPE_OFF_T])dnl + AC_REQUIRE([AC_TYPE_SIZE_T])dnl + AC_REQUIRE([AC_FUNC_ALLOCA])dnl + AC_REQUIRE([AC_FUNC_MMAP])dnl + AC_REQUIRE([jm_GLIBC21])dnl + AC_REQUIRE([gt_INTDIV0])dnl + AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl + AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl + AC_REQUIRE([gt_INTTYPES_PRI])dnl + + AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \ +stdlib.h string.h unistd.h sys/param.h]) + AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \ +geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \ +strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next]) + + AM_ICONV + AM_LANGINFO_CODESET + if test $ac_cv_header_locale_h = yes; then + AM_LC_MESSAGES + fi + + dnl intl/plural.c is generated from intl/plural.y. It requires bison, + dnl because plural.y uses bison specific features. It requires at least + dnl bison-1.26 because earlier versions generate a plural.c that doesn't + dnl compile. + dnl bison is only needed for the maintainer (who touches plural.y). But in + dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put + dnl the rule in general Makefile. Now, some people carelessly touch the + dnl files or have a broken "make" program, hence the plural.c rule will + dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not + dnl present or too old. + AC_CHECK_PROGS([INTLBISON], [bison]) + if test -z "$INTLBISON"; then + ac_verc_fail=yes + else + dnl Found it, now check the version. + AC_MSG_CHECKING([version of bison]) +changequote(<<,>>)dnl + ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; + 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*) +changequote([,])dnl + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; + esac + AC_MSG_RESULT([$ac_prog_version]) + fi + if test $ac_verc_fail = yes; then + INTLBISON=: + fi +]) + + +AC_DEFUN([AM_MKINSTALLDIRS], +[ + dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly + dnl find the mkinstalldirs script in another subdir but $(top_srcdir). + dnl Try to locate is. + MKINSTALLDIRS= + if test -n "$ac_aux_dir"; then + MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" + fi + if test -z "$MKINSTALLDIRS"; then + MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" + fi + AC_SUBST(MKINSTALLDIRS) +]) + + +dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) +AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) + +# lib-prefix.m4 serial 1 (gettext-0.11) +dnl Copyright (C) 2001-2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl From Bruno Haible. + +dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed +dnl to access previously installed libraries. The basic assumption is that +dnl a user will want packages to use other packages he previously installed +dnl with the same --prefix option. +dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate +dnl libraries, but is otherwise very convenient. +AC_DEFUN([AC_LIB_PREFIX], +[ + AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) + AC_REQUIRE([AC_PROG_CC]) + AC_REQUIRE([AC_CANONICAL_HOST]) + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + dnl By default, look in $includedir and $libdir. + use_additional=yes + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + AC_ARG_WITH([lib-prefix], +[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib + --without-lib-prefix don't search for libraries in includedir and libdir], +[ + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + else + additional_includedir="$withval/include" + additional_libdir="$withval/lib" + fi + fi +]) + if test $use_additional = yes; then + dnl Potentially add $additional_includedir to $CPPFLAGS. + dnl But don't add it + dnl 1. if it's the standard /usr/include, + dnl 2. if it's already present in $CPPFLAGS, + dnl 3. if it's /usr/local/include and we are using GCC on Linux, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + for x in $CPPFLAGS; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux*) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + dnl Really add $additional_includedir to $CPPFLAGS. + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" + fi + fi + fi + fi + dnl Potentially add $additional_libdir to $LDFLAGS. + dnl But don't add it + dnl 1. if it's the standard /usr/lib, + dnl 2. if it's already present in $LDFLAGS, + dnl 3. if it's /usr/local/lib and we are using GCC on Linux, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_libdir" != "X/usr/lib"; then + haveit= + for x in $LDFLAGS; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test "X$additional_libdir" = "X/usr/local/lib"; then + if test -n "$GCC"; then + case $host_os in + linux*) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + dnl Really add $additional_libdir to $LDFLAGS. + LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" + fi + fi + fi + fi + fi +]) + +dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, +dnl acl_final_exec_prefix, containing the values to which $prefix and +dnl $exec_prefix will expand at the end of the configure script. +AC_DEFUN([AC_LIB_PREPARE_PREFIX], +[ + dnl Unfortunately, prefix and exec_prefix get only finally determined + dnl at the end of configure. + if test "X$prefix" = "XNONE"; then + acl_final_prefix="$ac_default_prefix" + else + acl_final_prefix="$prefix" + fi + if test "X$exec_prefix" = "XNONE"; then + acl_final_exec_prefix='${prefix}' + else + acl_final_exec_prefix="$exec_prefix" + fi + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" + prefix="$acl_save_prefix" +]) + +dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the +dnl variables prefix and exec_prefix bound to the values they will have +dnl at the end of the configure script. +AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], +[ + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + $1 + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" +]) + +# lib-link.m4 serial 3 (gettext-0.11.3) +dnl Copyright (C) 2001-2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl From Bruno Haible. + +dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and +dnl the libraries corresponding to explicit and implicit dependencies. +dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and +dnl augments the CPPFLAGS variable. +AC_DEFUN([AC_LIB_LINKFLAGS], +[ + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + define([Name],[translit([$1],[./-], [___])]) + define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ + AC_LIB_LINKFLAGS_BODY([$1], [$2]) + ac_cv_lib[]Name[]_libs="$LIB[]NAME" + ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" + ac_cv_lib[]Name[]_cppflags="$INC[]NAME" + ]) + LIB[]NAME="$ac_cv_lib[]Name[]_libs" + LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" + INC[]NAME="$ac_cv_lib[]Name[]_cppflags" + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) + AC_SUBST([LIB]NAME) + AC_SUBST([LTLIB]NAME) + dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the + dnl results of this search when this library appears as a dependency. + HAVE_LIB[]NAME=yes + undefine([Name]) + undefine([NAME]) +]) + +dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode) +dnl searches for libname and the libraries corresponding to explicit and +dnl implicit dependencies, together with the specified include files and +dnl the ability to compile and link the specified testcode. If found, it +dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and +dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and +dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs +dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. +AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], +[ + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + define([Name],[translit([$1],[./-], [___])]) + define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + + dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME + dnl accordingly. + AC_LIB_LINKFLAGS_BODY([$1], [$2]) + + dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, + dnl because if the user has installed lib[]Name and not disabled its use + dnl via --without-lib[]Name-prefix, he wants to use it. + ac_save_CPPFLAGS="$CPPFLAGS" + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) + + AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ + ac_save_LIBS="$LIBS" + LIBS="$LIBS $LIB[]NAME" + AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no]) + LIBS="$ac_save_LIBS" + ]) + if test "$ac_cv_lib[]Name" = yes; then + HAVE_LIB[]NAME=yes + AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.]) + AC_MSG_CHECKING([how to link with lib[]$1]) + AC_MSG_RESULT([$LIB[]NAME]) + else + HAVE_LIB[]NAME=no + dnl If $LIB[]NAME didn't lead to a usable library, we don't need + dnl $INC[]NAME either. + CPPFLAGS="$ac_save_CPPFLAGS" + LIB[]NAME= + LTLIB[]NAME= + fi + AC_SUBST([HAVE_LIB]NAME) + AC_SUBST([LIB]NAME) + AC_SUBST([LTLIB]NAME) + undefine([Name]) + undefine([NAME]) +]) + +dnl Determine the platform dependent parameters needed to use rpath: +dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator, +dnl hardcode_direct, hardcode_minus_L, +dnl sys_lib_search_path_spec, sys_lib_dlsearch_path_spec. +AC_DEFUN([AC_LIB_RPATH], +[ + AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS + AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld + AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host + AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir + AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [ + CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ + ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh + . ./conftest.sh + rm -f ./conftest.sh + acl_cv_rpath=done + ]) + wl="$acl_cv_wl" + libext="$acl_cv_libext" + shlibext="$acl_cv_shlibext" + hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" + hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" + hardcode_direct="$acl_cv_hardcode_direct" + hardcode_minus_L="$acl_cv_hardcode_minus_L" + sys_lib_search_path_spec="$acl_cv_sys_lib_search_path_spec" + sys_lib_dlsearch_path_spec="$acl_cv_sys_lib_dlsearch_path_spec" + dnl Determine whether the user wants rpath handling at all. + AC_ARG_ENABLE(rpath, + [ --disable-rpath do not hardcode runtime library paths], + :, enable_rpath=yes) +]) + +dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and +dnl the libraries corresponding to explicit and implicit dependencies. +dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. +AC_DEFUN([AC_LIB_LINKFLAGS_BODY], +[ + define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], + [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) + dnl By default, look in $includedir and $libdir. + use_additional=yes + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + AC_ARG_WITH([lib$1-prefix], +[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib + --without-lib$1-prefix don't search for lib$1 in includedir and libdir], +[ + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + AC_LIB_WITH_FINAL_PREFIX([ + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + ]) + else + additional_includedir="$withval/include" + additional_libdir="$withval/lib" + fi + fi +]) + dnl Search the library and its dependencies in $additional_libdir and + dnl $LDFLAGS. Using breadth-first-seach. + LIB[]NAME= + LTLIB[]NAME= + INC[]NAME= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='$1 $2' + while test -n "$names_next_round"; do + names_this_round="$names_next_round" + names_next_round= + for name in $names_this_round; do + already_handled= + for n in $names_already_handled; do + if test "$n" = "$name"; then + already_handled=yes + break + fi + done + if test -z "$already_handled"; then + names_already_handled="$names_already_handled $name" + dnl See if it was already located by an earlier AC_LIB_LINKFLAGS + dnl or AC_LIB_HAVE_LINKFLAGS call. + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` + eval value=\"\$HAVE_LIB$uppername\" + if test -n "$value"; then + if test "$value" = yes; then + eval value=\"\$LIB$uppername\" + test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" + else + dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined + dnl that this library doesn't exist. So just drop it. + : + fi + else + dnl Search the library lib$name in $additional_libdir and $LDFLAGS + dnl and the already constructed $LIBNAME/$LTLIBNAME. + found_dir= + found_la= + found_so= + found_a= + if test $use_additional = yes; then + if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then + found_dir="$additional_libdir" + found_so="$additional_libdir/lib$name.$shlibext" + if test -f "$additional_libdir/lib$name.la"; then + found_la="$additional_libdir/lib$name.la" + fi + else + if test -f "$additional_libdir/lib$name.$libext"; then + found_dir="$additional_libdir" + found_a="$additional_libdir/lib$name.$libext" + if test -f "$additional_libdir/lib$name.la"; then + found_la="$additional_libdir/lib$name.la" + fi + fi + fi + fi + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + case "$x" in + -L*) + dir=`echo "X$x" | sed -e 's/^X-L//'` + if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then + found_dir="$dir" + found_so="$dir/lib$name.$shlibext" + if test -f "$dir/lib$name.la"; then + found_la="$dir/lib$name.la" + fi + else + if test -f "$dir/lib$name.$libext"; then + found_dir="$dir" + found_a="$dir/lib$name.$libext" + if test -f "$dir/lib$name.la"; then + found_la="$dir/lib$name.la" + fi + fi + fi + ;; + esac + if test "X$found_dir" != "X"; then + break + fi + done + fi + if test "X$found_dir" != "X"; then + dnl Found the library. + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" + if test "X$found_so" != "X"; then + dnl Linking with a shared library. We attempt to hardcode its + dnl directory into the executable's runpath, unless it's the + dnl standard /usr/lib. + if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then + dnl No hardcoding is needed. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + dnl Use an explicit option to hardcode DIR into the resulting + dnl binary. + dnl Potentially add DIR to ltrpathdirs. + dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $found_dir" + fi + dnl The hardcoding into $LIBNAME is system dependent. + if test "$hardcode_direct" = yes; then + dnl Using DIR/libNAME.so during linking hardcodes DIR into the + dnl resulting binary. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then + dnl Use an explicit option to hardcode DIR into the resulting + dnl binary. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + dnl Potentially add DIR to rpathdirs. + dnl The rpathdirs will be appended to $LIBNAME at the end. + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $found_dir" + fi + else + dnl Rely on "-L$found_dir". + dnl But don't add it if it's already contained in the LDFLAGS + dnl or the already constructed $LIBNAME + haveit= + for x in $LDFLAGS $LIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" + fi + if test "$hardcode_minus_L" != no; then + dnl FIXME: Not sure whether we should use + dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" + dnl here. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" + else + dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH + dnl here, because this doesn't fit in flags passed to the + dnl compiler. So give up. No hardcoding. This affects only + dnl very old systems. + dnl FIXME: Not sure whether we should use + dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" + dnl here. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" + fi + fi + fi + fi + else + if test "X$found_a" != "X"; then + dnl Linking with a static library. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" + else + dnl We shouldn't come here, but anyway it's good to have a + dnl fallback. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" + fi + fi + dnl Assume the include files are nearby. + additional_includedir= + case "$found_dir" in + */lib | */lib/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` + additional_includedir="$basedir/include" + ;; + esac + if test "X$additional_includedir" != "X"; then + dnl Potentially add $additional_includedir to $INCNAME. + dnl But don't add it + dnl 1. if it's the standard /usr/include, + dnl 2. if it's /usr/local/include and we are using GCC on Linux, + dnl 3. if it's already present in $CPPFLAGS or the already + dnl constructed $INCNAME, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux*) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + for x in $CPPFLAGS $INC[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + dnl Really add $additional_includedir to $INCNAME. + INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" + fi + fi + fi + fi + fi + dnl Look for dependencies. + if test -n "$found_la"; then + dnl Read the .la file. It defines the variables + dnl dlname, library_names, old_library, dependency_libs, current, + dnl age, revision, installed, dlopen, dlpreopen, libdir. + save_libdir="$libdir" + case "$found_la" in + */* | *\\*) . "$found_la" ;; + *) . "./$found_la" ;; + esac + libdir="$save_libdir" + dnl We use only dependency_libs. + for dep in $dependency_libs; do + case "$dep" in + -L*) + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. + dnl But don't add it + dnl 1. if it's the standard /usr/lib, + dnl 2. if it's /usr/local/lib and we are using GCC on Linux, + dnl 3. if it's already present in $LDFLAGS or the already + dnl constructed $LIBNAME, + dnl 4. if it doesn't exist as a directory. + if test "X$additional_libdir" != "X/usr/lib"; then + haveit= + if test "X$additional_libdir" = "X/usr/local/lib"; then + if test -n "$GCC"; then + case $host_os in + linux*) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + haveit= + for x in $LDFLAGS $LIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + dnl Really add $additional_libdir to $LIBNAME. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" + fi + fi + haveit= + for x in $LDFLAGS $LTLIB[]NAME; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + dnl Really add $additional_libdir to $LTLIBNAME. + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" + fi + fi + fi + fi + ;; + -R*) + dir=`echo "X$dep" | sed -e 's/^X-R//'` + if test "$enable_rpath" != no; then + dnl Potentially add DIR to rpathdirs. + dnl The rpathdirs will be appended to $LIBNAME at the end. + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $dir" + fi + dnl Potentially add DIR to ltrpathdirs. + dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $dir" + fi + fi + ;; + -l*) + dnl Handle this in the next round. + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` + ;; + *.la) + dnl Handle this in the next round. Throw away the .la's + dnl directory; it is already contained in a preceding -L + dnl option. + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` + ;; + *) + dnl Most likely an immediate library name. + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" + ;; + esac + done + fi + else + dnl Didn't find the library; assume it is in the system directories + dnl known to the linker and runtime loader. (All the system + dnl directories known to the linker should also be known to the + dnl runtime loader, otherwise the system is severely misconfigured.) + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" + fi + fi + fi + done + done + if test "X$rpathdirs" != "X"; then + if test -n "$hardcode_libdir_separator"; then + dnl Weird platform: only the last -rpath option counts, the user must + dnl pass all path elements in one option. We can arrange that for a + dnl single library, but not when more than one $LIBNAMEs are used. + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" + done + dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl. + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" + else + dnl The -rpath options are cumulative. + for found_dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$found_dir" + eval flag=\"$hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" + done + fi + fi + if test "X$ltrpathdirs" != "X"; then + dnl When using libtool, the option that works for both libraries and + dnl executables is -R. The -R options are cumulative. + for found_dir in $ltrpathdirs; do + LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" + done + fi +]) + +dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, +dnl unless already present in VAR. +dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes +dnl contains two or three consecutive elements that belong together. +AC_DEFUN([AC_LIB_APPENDTOVAR], +[ + for element in [$2]; do + haveit= + for x in $[$1]; do + AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + [$1]="${[$1]}${[$1]:+ }$element" + fi + done +]) + +# lib-ld.m4 serial 1 (gettext-0.11) +dnl Copyright (C) 1996-2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl Subroutines of libtool.m4, +dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision +dnl with libtool.m4. + +dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. +AC_DEFUN([AC_LIB_PROG_LD_GNU], +[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld, +[# I'd rather use --version here, but apparently some GNU ld's only accept -v. +if $LD -v 2>&1 &5; then + acl_cv_prog_gnu_ld=yes +else + acl_cv_prog_gnu_ld=no +fi]) +with_gnu_ld=$acl_cv_prog_gnu_ld +]) + +dnl From libtool-1.4. Sets the variable LD. +AC_DEFUN([AC_LIB_PROG_LD], +[AC_ARG_WITH(gnu-ld, +[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]], +test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no) +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + AC_MSG_CHECKING([for ld used by GCC]) + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [[\\/]* | [A-Za-z]:[\\/]*)] + [re_direlt='/[^/][^/]*/\.\./'] + # Canonicalize the path of ld + ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +AC_CACHE_VAL(acl_cv_path_LD, +[if test -z "$LD"; then + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + acl_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some GNU ld's only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then + test "$with_gnu_ld" != no && break + else + test "$with_gnu_ld" != yes && break + fi + fi + done + IFS="$ac_save_ifs" +else + acl_cv_path_LD="$LD" # Let the user override the test with a path. +fi]) +LD="$acl_cv_path_LD" +if test -n "$LD"; then + AC_MSG_RESULT($LD) +else + AC_MSG_RESULT(no) +fi +test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) +AC_LIB_PROG_LD_GNU +]) + +# iconv.m4 serial AM4 (gettext-0.11.3) +dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl From Bruno Haible. + +AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], +[ + dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. + AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) + AC_REQUIRE([AC_LIB_RPATH]) + + dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV + dnl accordingly. + AC_LIB_LINKFLAGS_BODY([iconv]) +]) + +AC_DEFUN([AM_ICONV_LINK], +[ + dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and + dnl those with the standalone portable GNU libiconv installed). + + dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV + dnl accordingly. + AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) + + dnl Add $INCICONV to CPPFLAGS before performing the following checks, + dnl because if the user has installed libiconv and not disabled its use + dnl via --without-libiconv-prefix, he wants to use it. The first + dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed. + am_save_CPPFLAGS="$CPPFLAGS" + AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) + + AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [ + am_cv_func_iconv="no, consider installing GNU libiconv" + am_cv_lib_iconv=no + AC_TRY_LINK([#include +#include ], + [iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd);], + am_cv_func_iconv=yes) + if test "$am_cv_func_iconv" != yes; then + am_save_LIBS="$LIBS" + LIBS="$LIBS $LIBICONV" + AC_TRY_LINK([#include +#include ], + [iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd);], + am_cv_lib_iconv=yes + am_cv_func_iconv=yes) + LIBS="$am_save_LIBS" + fi + ]) + if test "$am_cv_func_iconv" = yes; then + AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.]) + fi + if test "$am_cv_lib_iconv" = yes; then + AC_MSG_CHECKING([how to link with libiconv]) + AC_MSG_RESULT([$LIBICONV]) + else + dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV + dnl either. + CPPFLAGS="$am_save_CPPFLAGS" + LIBICONV= + LTLIBICONV= + fi + AC_SUBST(LIBICONV) + AC_SUBST(LTLIBICONV) +]) + +AC_DEFUN([AM_ICONV], +[ + AM_ICONV_LINK + if test "$am_cv_func_iconv" = yes; then + AC_MSG_CHECKING([for iconv declaration]) + AC_CACHE_VAL(am_cv_proto_iconv, [ + AC_TRY_COMPILE([ +#include +#include +extern +#ifdef __cplusplus +"C" +#endif +#if defined(__STDC__) || defined(__cplusplus) +size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); +#else +size_t iconv(); +#endif +], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const") + am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) + am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` + AC_MSG_RESULT([$]{ac_t:- + }[$]am_cv_proto_iconv) + AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1, + [Define as const if the declaration of iconv() needs const.]) + fi +]) + +# progtest.m4 serial 2 (gettext-0.10.40) +dnl Copyright (C) 1996-2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. +dnl +dnl This file can can be used in projects which are not available under +dnl the GNU General Public License or the GNU Library General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +dnl by the GNU Library General Public License, and the rest of the GNU +dnl gettext package package is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Authors: +dnl Ulrich Drepper , 1996. + +# Search path for a program which passes the given test. + +dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, +dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) +AC_DEFUN([AM_PATH_PROG_WITH_TEST], +[# Extract the first word of "$2", so it can be a program name with args. +set dummy $2; ac_word=[$]2 +AC_MSG_CHECKING([for $ac_word]) +AC_CACHE_VAL(ac_cv_path_$1, +[case "[$]$1" in + /*) + ac_cv_path_$1="[$]$1" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in ifelse([$5], , $PATH, [$5]); do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if [$3]; then + ac_cv_path_$1="$ac_dir/$ac_word" + break + fi + fi + done + IFS="$ac_save_ifs" +dnl If no 4th arg is given, leave the cache variable unset, +dnl so AC_PATH_PROGS will keep looking. +ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" +])dnl + ;; +esac])dnl +$1="$ac_cv_path_$1" +if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then + AC_MSG_RESULT([$]$1) +else + AC_MSG_RESULT(no) +fi +AC_SUBST($1)dnl +]) + +# isc-posix.m4 serial 2 (gettext-0.11.2) +dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +# This file is not needed with autoconf-2.53 and newer. Remove it in 2005. + +# This test replaces the one in autoconf. +# Currently this macro should have the same name as the autoconf macro +# because gettext's gettext.m4 (distributed in the automake package) +# still uses it. Otherwise, the use in gettext.m4 makes autoheader +# give these diagnostics: +# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX +# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX + +undefine([AC_ISC_POSIX]) + +AC_DEFUN([AC_ISC_POSIX], + [ + dnl This test replaces the obsolescent AC_ISC_POSIX kludge. + AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"]) + ] +) + +# glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40) +dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +# Test for the GNU C Library, version 2.1 or newer. +# From Bruno Haible. + +AC_DEFUN([jm_GLIBC21], + [ + AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer, + ac_cv_gnu_library_2_1, + [AC_EGREP_CPP([Lucky GNU user], + [ +#include +#ifdef __GNU_LIBRARY__ + #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) + Lucky GNU user + #endif +#endif + ], + ac_cv_gnu_library_2_1=yes, + ac_cv_gnu_library_2_1=no) + ] + ) + AC_SUBST(GLIBC21) + GLIBC21="$ac_cv_gnu_library_2_1" + ] +) + +# intdiv0.m4 serial 1 (gettext-0.11.3) +dnl Copyright (C) 2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl From Bruno Haible. + +AC_DEFUN([gt_INTDIV0], +[ + AC_REQUIRE([AC_PROG_CC])dnl + AC_REQUIRE([AC_CANONICAL_HOST])dnl + + AC_CACHE_CHECK([whether integer division by zero raises SIGFPE], + gt_cv_int_divbyzero_sigfpe, + [ + AC_TRY_RUN([ +#include +#include + +static void +#ifdef __cplusplus +sigfpe_handler (int sig) +#else +sigfpe_handler (sig) int sig; +#endif +{ + /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */ + exit (sig != SIGFPE); +} + +int x = 1; +int y = 0; +int z; +int nan; + +int main () +{ + signal (SIGFPE, sigfpe_handler); +/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */ +#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP) + signal (SIGTRAP, sigfpe_handler); +#endif +/* Linux/SPARC yields signal SIGILL. */ +#if defined (__sparc__) && defined (__linux__) + signal (SIGILL, sigfpe_handler); +#endif + + z = x / y; + nan = y / y; + exit (1); +} +], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no, + [ + # Guess based on the CPU. + case "$host_cpu" in + alpha* | i[34567]86 | m68k | s390*) + gt_cv_int_divbyzero_sigfpe="guessing yes";; + *) + gt_cv_int_divbyzero_sigfpe="guessing no";; + esac + ]) + ]) + case "$gt_cv_int_divbyzero_sigfpe" in + *yes) value=1;; + *) value=0;; + esac + AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value, + [Define if integer division by zero raises signal SIGFPE.]) +]) + +# uintmax_t.m4 serial 6 (gettext-0.11) +dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl From Paul Eggert. + +AC_PREREQ(2.13) + +# Define uintmax_t to `unsigned long' or `unsigned long long' +# if does not exist. + +AC_DEFUN([jm_AC_TYPE_UINTMAX_T], +[ + AC_REQUIRE([jm_AC_HEADER_INTTYPES_H]) + AC_REQUIRE([jm_AC_HEADER_STDINT_H]) + if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then + AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG]) + test $ac_cv_type_unsigned_long_long = yes \ + && ac_type='unsigned long long' \ + || ac_type='unsigned long' + AC_DEFINE_UNQUOTED(uintmax_t, $ac_type, + [Define to unsigned long or unsigned long long + if and don't define.]) + fi +]) + +# inttypes_h.m4 serial 4 (gettext-0.11.4) +dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl From Paul Eggert. + +# Define HAVE_INTTYPES_H_WITH_UINTMAX if exists, +# doesn't clash with , and declares uintmax_t. + +AC_DEFUN([jm_AC_HEADER_INTTYPES_H], +[ + AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h, + [AC_TRY_COMPILE( + [#include +#include ], + [uintmax_t i = (uintmax_t) -1;], + jm_ac_cv_header_inttypes_h=yes, + jm_ac_cv_header_inttypes_h=no)]) + if test $jm_ac_cv_header_inttypes_h = yes; then + AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1, +[Define if exists, doesn't clash with , + and declares uintmax_t. ]) + fi +]) + +# stdint_h.m4 serial 2 (gettext-0.11.4) +dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl From Paul Eggert. + +# Define HAVE_STDINT_H_WITH_UINTMAX if exists, +# doesn't clash with , and declares uintmax_t. + +AC_DEFUN([jm_AC_HEADER_STDINT_H], +[ + AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h, + [AC_TRY_COMPILE( + [#include +#include ], + [uintmax_t i = (uintmax_t) -1;], + jm_ac_cv_header_stdint_h=yes, + jm_ac_cv_header_stdint_h=no)]) + if test $jm_ac_cv_header_stdint_h = yes; then + AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1, +[Define if exists, doesn't clash with , + and declares uintmax_t. ]) + fi +]) + +# ulonglong.m4 serial 2 (fileutils-4.0.32, gettext-0.10.40) +dnl Copyright (C) 1999-2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl From Paul Eggert. + +AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG], +[ + AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long, + [AC_TRY_LINK([unsigned long long ull = 1; int i = 63;], + [unsigned long long ullmax = (unsigned long long) -1; + return ull << i | ull >> i | ullmax / ull | ullmax % ull;], + ac_cv_type_unsigned_long_long=yes, + ac_cv_type_unsigned_long_long=no)]) + if test $ac_cv_type_unsigned_long_long = yes; then + AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1, + [Define if you have the unsigned long long type.]) + fi +]) + +# inttypes.m4 serial 1 (gettext-0.11.4) +dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl From Paul Eggert. + +# Define HAVE_INTTYPES_H if exists and doesn't clash with +# . + +AC_DEFUN([gt_HEADER_INTTYPES_H], +[ + AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h, + [ + AC_TRY_COMPILE( + [#include +#include ], + [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no) + ]) + if test $gt_cv_header_inttypes_h = yes; then + AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1, + [Define if exists and doesn't clash with .]) + fi +]) + +# inttypes-pri.m4 serial 1 (gettext-0.11.4) +dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl From Bruno Haible. + +# Define PRI_MACROS_BROKEN if exists and defines the PRI* +# macros to non-string values. This is the case on AIX 4.3.3. + +AC_DEFUN([gt_INTTYPES_PRI], +[ + AC_REQUIRE([gt_HEADER_INTTYPES_H]) + if test $gt_cv_header_inttypes_h = yes; then + AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken], + gt_cv_inttypes_pri_broken, + [ + AC_TRY_COMPILE([#include +#ifdef PRId32 +char *p = PRId32; +#endif +], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes) + ]) + fi + if test "$gt_cv_inttypes_pri_broken" = yes; then + AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1, + [Define if exists and defines unusable PRI* macros.]) + fi +]) + +# codeset.m4 serial AM1 (gettext-0.10.40) +dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. + +dnl From Bruno Haible. + +AC_DEFUN([AM_LANGINFO_CODESET], +[ + AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset, + [AC_TRY_LINK([#include ], + [char* cs = nl_langinfo(CODESET);], + am_cv_langinfo_codeset=yes, + am_cv_langinfo_codeset=no) + ]) + if test $am_cv_langinfo_codeset = yes; then + AC_DEFINE(HAVE_LANGINFO_CODESET, 1, + [Define if you have and nl_langinfo(CODESET).]) + fi +]) + +# lcmessage.m4 serial 3 (gettext-0.11.3) +dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. +dnl This file is free software, distributed under the terms of the GNU +dnl General Public License. As a special exception to the GNU General +dnl Public License, this file may be distributed as part of a program +dnl that contains a configuration script generated by Autoconf, under +dnl the same distribution terms as the rest of that program. +dnl +dnl This file can can be used in projects which are not available under +dnl the GNU General Public License or the GNU Library General Public +dnl License but which still want to provide support for the GNU gettext +dnl functionality. +dnl Please note that the actual code of the GNU gettext library is covered +dnl by the GNU Library General Public License, and the rest of the GNU +dnl gettext package package is covered by the GNU General Public License. +dnl They are *not* in the public domain. + +dnl Authors: +dnl Ulrich Drepper , 1995. + +# Check whether LC_MESSAGES is available in . + +AC_DEFUN([AM_LC_MESSAGES], +[ + AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, + [AC_TRY_LINK([#include ], [return LC_MESSAGES], + am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) + if test $am_cv_val_LC_MESSAGES = yes; then + AC_DEFINE(HAVE_LC_MESSAGES, 1, + [Define if your file defines LC_MESSAGES.]) + fi +]) + diff --git a/conf b/conf new file mode 100755 index 0000000..82b2af2 --- /dev/null +++ b/conf @@ -0,0 +1,17 @@ +#!/bin/sh + +AUTOTOOLS_DIR=/usr/share/misc +if [ -f "${AUTOTOOLS_DIR}/config.guess" ]; then + cp -p "${AUTOTOOLS_DIR}/config.guess" config.guess +fi +if [ -f "${AUTOTOOLS_DIR}/config.sub" ]; then + cp -p "${AUTOTOOLS_DIR}/config.sub" config.sub +fi +aclocal + +# Do not use space between -W and all, otherwise Debian's auto*-wrapper +# brokes... +autoconf -Wall +autoheader -Wall + +rm -f config.cache config.status config.log diff --git a/config.guess b/config.guess new file mode 100755 index 0000000..78f6b92 --- /dev/null +++ b/config.guess @@ -0,0 +1,1409 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + +timestamp='2003-01-10' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Originally written by Per Bothner . +# Please send patches to . Submit a context +# diff and a properly formatted ChangeLog entry. +# +# This script attempts to guess a canonical system name similar to +# config.sub. If it succeeds, it prints the system name on stdout, and +# exits with 0. Otherwise, it exits with 1. +# +# The plan is that this can be called by configure scripts if you +# don't specify an explicit build system type. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit 0 ;; + --version | -v ) + echo "$version" ; exit 0 ;; + --help | --h* | -h ) + echo "$usage"; exit 0 ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep __ELF__ >/dev/null + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit 0 ;; + amiga:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + arc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + hp300:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mac68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + macppc:OpenBSD:*:*) + echo powerpc-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme88k:OpenBSD:*:*) + echo m88k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvmeppc:OpenBSD:*:*) + echo powerpc-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + pmax:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sgi:OpenBSD:*:*) + echo mipseb-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sun3:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + wgrisc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + *:OpenBSD:*:*) + echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + *:MicroBSD:*:*) + echo ${UNAME_MACHINE}-unknown-microbsd${UNAME_RELEASE} + exit 0 ;; + alpha:OSF1:*:*) + if test $UNAME_RELEASE = "V4.0"; then + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + fi + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + eval $set_cc_for_build + cat <$dummy.s + .data +\$Lformat: + .byte 37,100,45,37,120,10,0 # "%d-%x\n" + + .text + .globl main + .align 4 + .ent main +main: + .frame \$30,16,\$26,0 + ldgp \$29,0(\$27) + .prologue 1 + .long 0x47e03d80 # implver \$0 + lda \$2,-1 + .long 0x47e20c21 # amask \$2,\$1 + lda \$16,\$Lformat + mov \$0,\$17 + not \$1,\$18 + jsr \$26,printf + ldgp \$29,0(\$26) + mov 0,\$16 + jsr \$26,exit + .end main +EOF + $CC_FOR_BUILD -o $dummy $dummy.s 2>/dev/null + if test "$?" = 0 ; then + case `$dummy` in + 0-0) + UNAME_MACHINE="alpha" + ;; + 1-0) + UNAME_MACHINE="alphaev5" + ;; + 1-1) + UNAME_MACHINE="alphaev56" + ;; + 1-101) + UNAME_MACHINE="alphapca56" + ;; + 2-303) + UNAME_MACHINE="alphaev6" + ;; + 2-307) + UNAME_MACHINE="alphaev67" + ;; + 2-1307) + UNAME_MACHINE="alphaev68" + ;; + 3-1307) + UNAME_MACHINE="alphaev7" + ;; + esac + fi + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit 0 ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit 0 ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit 0 ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit 0;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit 0 ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos + exit 0 ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit 0 ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit 0;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit 0;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit 0 ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit 0 ;; + DRS?6000:UNIX_SV:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7 && exit 0 ;; + esac ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + i86pc:SunOS:5.*:*) + echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit 0 ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit 0 ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit 0 ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit 0 ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit 0 ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit 0 ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit 0 ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit 0 ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit 0 ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit 0 ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c \ + && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ + && exit 0 + echo mips-mips-riscos${UNAME_RELEASE} + exit 0 ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit 0 ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit 0 ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit 0 ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit 0 ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit 0 ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit 0 ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit 0 ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit 0 ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit 0 ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit 0 ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit 0 ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit 0 ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit 0 ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit 0 ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit 0 ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 + echo rs6000-ibm-aix3.2.5 + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit 0 ;; + *:AIX:*:[45]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit 0 ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit 0 ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit 0 ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit 0 ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit 0 ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit 0 ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit 0 ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit 0 ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then + # avoid double evaluation of $set_cc_for_build + test -n "$CC_FOR_BUILD" || eval $set_cc_for_build + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit 0 ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit 0 ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 + echo unknown-hitachi-hiuxwe2 + exit 0 ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit 0 ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit 0 ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit 0 ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit 0 ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit 0 ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit 0 ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit 0 ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit 0 ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit 0 ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit 0 ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit 0 ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + *:UNICOS/mp:*:*) + echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit 0 ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit 0 ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit 0 ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit 0 ;; + *:FreeBSD:*:*) + # Determine whether the default compiler uses glibc. + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + #if __GLIBC__ >= 2 + LIBC=gnu + #else + LIBC= + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} + exit 0 ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit 0 ;; + i*:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit 0 ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit 0 ;; + x86:Interix*:3*) + echo i586-pc-interix3 + exit 0 ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit 0 ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i586-pc-interix + exit 0 ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit 0 ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit 0 ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + *:GNU:*:*) + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit 0 ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit 0 ;; + arm*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + mips:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips + #undef mipsel + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mipsel + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` + test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 + ;; + mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips64 + #undef mips64el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mips64el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips64 + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` + test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 + ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu + exit 0 ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit 0 ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit 0 ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-gnu ;; + PA8*) echo hppa2.0-unknown-linux-gnu ;; + *) echo hppa-unknown-linux-gnu ;; + esac + exit 0 ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit 0 ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux + exit 0 ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + x86_64:Linux:*:*) + echo x86_64-unknown-linux-gnu + exit 0 ;; + i*86:Linux:*:*) + # The BFD linker knows what the default object file format is, so + # first see if it will tell us. cd to the root directory to prevent + # problems with other programs or directories called `ld' in the path. + # Set LC_ALL=C to ensure ld outputs messages in English. + ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ + | sed -ne '/supported targets:/!d + s/[ ][ ]*/ /g + s/.*supported targets: *// + s/ .*// + p'` + case "$ld_supported_targets" in + elf32-i386) + TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" + ;; + a.out-i386-linux) + echo "${UNAME_MACHINE}-pc-linux-gnuaout" + exit 0 ;; + coff-i386) + echo "${UNAME_MACHINE}-pc-linux-gnucoff" + exit 0 ;; + "") + # Either a pre-BFD a.out linker (linux-gnuoldld) or + # one that does not give us useful --help. + echo "${UNAME_MACHINE}-pc-linux-gnuoldld" + exit 0 ;; + esac + # Determine whether the default compiler is a.out or elf + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + #ifdef __ELF__ + # ifdef __GLIBC__ + # if __GLIBC__ >= 2 + LIBC=gnu + # else + LIBC=gnulibc1 + # endif + # else + LIBC=gnulibc1 + # endif + #else + #ifdef __INTEL_COMPILER + LIBC=gnu + #else + LIBC=gnuaout + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` + test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 + test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 + ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit 0 ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit 0 ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit 0 ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit 0 ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit 0 ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit 0 ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit 0 ;; + i*86:*:5:[78]*) + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + exit 0 ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit 0 ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i386. + echo i386-pc-msdosdjgpp + exit 0 ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit 0 ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit 0 ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit 0 ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit 0 ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit 0 ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit 0 ;; + M68*:*:R3V[567]*:*) + test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; + 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4.3${OS_REL} && exit 0 + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4 && exit 0 ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit 0 ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit 0 ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit 0 ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit 0 ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit 0 ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit 0 ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit 0 ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit 0 ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit 0 ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit 0 ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit 0 ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit 0 ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit 0 ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit 0 ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit 0 ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit 0 ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; + *:Darwin:*:*) + case `uname -p` in + *86) UNAME_PROCESSOR=i686 ;; + powerpc) UNAME_PROCESSOR=powerpc ;; + esac + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit 0 ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + exit 0 ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit 0 ;; + NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit 0 ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit 0 ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit 0 ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit 0 ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit 0 ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit 0 ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit 0 ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit 0 ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit 0 ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit 0 ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit 0 ;; +esac + +#echo '(No uname command or uname output not recognized.)' 1>&2 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + +eval $set_cc_for_build +cat >$dummy.c < +# include +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +# if !defined (ultrix) +# include +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit 0 ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + c34*) + echo c34-convex-bsd + exit 0 ;; + c38*) + echo c38-convex-bsd + exit 0 ;; + c4*) + echo c4-convex-bsd + exit 0 ;; + esac +fi + +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/config.rpath b/config.rpath new file mode 100755 index 0000000..5ead758 --- /dev/null +++ b/config.rpath @@ -0,0 +1,513 @@ +#! /bin/sh +# Output a system dependent set of variables, describing how to set the +# run time search path of shared libraries in an executable. +# +# Copyright 1996-2002 Free Software Foundation, Inc. +# Taken from GNU libtool, 2001 +# Originally by Gordon Matzigkeit , 1996 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. +# +# The first argument passed to this file is the canonical host specification, +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld +# should be set by the caller. +# +# The set of defined variables is at the end of this script. + +# All known linkers require a `.a' archive for static linking (except M$VC, +# which needs '.lib'). +libext=a +shlibext= + +host="$1" +host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + +wl= +if test "$GCC" = yes; then + wl='-Wl,' +else + case "$host_os" in + aix3* | aix4* | aix5*) + wl='-Wl,' + ;; + hpux9* | hpux10* | hpux11*) + wl='-Wl,' + ;; + irix5* | irix6*) + wl='-Wl,' + ;; + linux*) + echo '__INTEL_COMPILER' > conftest.$ac_ext + if $CC -E conftest.$ac_ext >/dev/null | grep __INTEL_COMPILER >/dev/null + then + : + else + # Intel icc + wl='-Qoption,ld,' + fi + ;; + osf3* | osf4* | osf5*) + wl='-Wl,' + ;; + solaris*) + wl='-Wl,' + ;; + sunos4*) + wl='-Qoption ld ' + ;; + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + if test "x$host_vendor" = xsni; then + wl='-LD' + else + wl='-Wl,' + fi + ;; + esac +fi + +hardcode_libdir_flag_spec= +hardcode_libdir_separator= +hardcode_direct=no +hardcode_minus_L=no + +case "$host_os" in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + openbsd*) + with_gnu_ld=no + ;; +esac + +ld_shlibs=yes +if test "$with_gnu_ld" = yes; then + case "$host_os" in + aix3* | aix4* | aix5*) + # On AIX, the GNU linker is very broken + ld_shlibs=no + ;; + amigaos*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can use + # them. + ld_shlibs=no + ;; + beos*) + if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + cygwin* | mingw* | pw32*) + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + ;; + solaris* | sysv5*) + if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + sunos4*) + hardcode_direct=yes + ;; + *) + if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then + : + else + ld_shlibs=no + fi + ;; + esac + if test "$ld_shlibs" = yes; then + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + fi +else + case "$host_os" in + aix3*) + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes + if test "$GCC" = yes; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi + ;; + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + else + aix_use_runtimelinking=no + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix5*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + esac + fi + hardcode_direct=yes + hardcode_libdir_separator=':' + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + hardcode_direct=yes + else + # We have old collect2 + hardcode_direct=unsupported + hardcode_minus_L=yes + hardcode_libdir_flag_spec='-L$libdir' + hardcode_libdir_separator= + fi + esac + fi + if test "$aix_use_runtimelinking" = yes; then + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib' + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' + else + hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib' + fi + fi + ;; + amigaos*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + # see comment about different semantics on the GNU ld section + ld_shlibs=no + ;; + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec=' ' + libext=lib + ;; + darwin* | rhapsody*) + hardcode_direct=yes + ;; + freebsd1*) + ld_shlibs=no + ;; + freebsd2.2*) + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + ;; + freebsd2*) + hardcode_direct=yes + hardcode_minus_L=yes + ;; + freebsd*) + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + ;; + hpux9* | hpux10* | hpux11*) + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + hardcode_minus_L=yes # Not in the search PATH, but as the default + # location of the library. + ;; + irix5* | irix6*) + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + netbsd*) + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + ;; + newsos6) + hardcode_direct=yes + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + openbsd*) + hardcode_direct=yes + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + else + case "$host_os" in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + esac + fi + ;; + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + ;; + osf3*) + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + osf4* | osf5*) + if test "$GCC" = yes; then + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + # Both cc and cxx compiler support -rpath directly + hardcode_libdir_flag_spec='-rpath $libdir' + fi + hardcode_libdir_separator=: + ;; + sco3.2v5*) + ;; + solaris*) + hardcode_libdir_flag_spec='-R$libdir' + ;; + sunos4*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + ;; + sysv4) + if test "x$host_vendor" = xsno; then + hardcode_direct=yes # is this really true??? + else + hardcode_direct=no # Motorola manual says yes, but my tests say they lie + fi + ;; + sysv4.3*) + ;; + sysv5*) + hardcode_libdir_flag_spec= + ;; + uts4*) + hardcode_libdir_flag_spec='-L$libdir' + ;; + dgux*) + hardcode_libdir_flag_spec='-L$libdir' + ;; + sysv4*MP*) + if test -d /usr/nec; then + ld_shlibs=yes + fi + ;; + sysv4.2uw2*) + hardcode_direct=yes + hardcode_minus_L=no + ;; + sysv5uw7* | unixware7*) + ;; + *) + ld_shlibs=no + ;; + esac +fi + +# Check dynamic linker characteristics +libname_spec='lib$name' +sys_lib_dlsearch_path_spec="/lib /usr/lib" +sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +case "$host_os" in + aix3*) + shlibext=so + ;; + aix4* | aix5*) + shlibext=so + ;; + amigaos*) + shlibext=ixlibrary + ;; + beos*) + shlibext=so + ;; + bsdi4*) + shlibext=so + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + ;; + cygwin* | mingw* | pw32*) + case $GCC,$host_os in + yes,cygwin*) + shlibext=dll.a + ;; + yes,mingw*) + shlibext=dll + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"` + ;; + yes,pw32*) + shlibext=dll + ;; + *) + shlibext=dll + ;; + esac + ;; + darwin* | rhapsody*) + shlibext=dylib + ;; + freebsd1*) + ;; + freebsd*) + shlibext=so + ;; + gnu*) + shlibext=so + ;; + hpux9* | hpux10* | hpux11*) + shlibext=sl + ;; + irix5* | irix6*) + shlibext=so + case "$host_os" in + irix5*) + libsuff= shlibsuff= + ;; + *) + case $LD in + *-32|*"-32 ") libsuff= shlibsuff= ;; + *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 ;; + *-64|*"-64 ") libsuff=64 shlibsuff=64 ;; + *) libsuff= shlibsuff= ;; + esac + ;; + esac + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + ;; + linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*) + ;; + linux-gnu*) + shlibext=so + ;; + netbsd*) + shlibext=so + ;; + newsos6) + shlibext=so + ;; + openbsd*) + shlibext=so + ;; + os2*) + libname_spec='$name' + shlibext=dll + ;; + osf3* | osf4* | osf5*) + shlibext=so + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + sco3.2v5*) + shlibext=so + ;; + solaris*) + shlibext=so + ;; + sunos4*) + shlibext=so + ;; + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + shlibext=so + case "$host_vendor" in + motorola) + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + uts4*) + shlibext=so + ;; + dgux*) + shlibext=so + ;; + sysv4*MP*) + if test -d /usr/nec; then + shlibext=so + fi + ;; +esac + +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' +escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"` +escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` +escaped_sys_lib_search_path_spec=`echo "X$sys_lib_search_path_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` +escaped_sys_lib_dlsearch_path_spec=`echo "X$sys_lib_dlsearch_path_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` + +sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <. Submit a context +# diff and a properly formatted ChangeLog entry. +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit 0 ;; + --version | -v ) + echo "$version" ; exit 0 ;; + --help | --h* | -h ) + echo "$usage"; exit 0 ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit 0;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis) + os= + basic_machine=$1 + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ + | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | i370 | i860 | i960 | ia64 \ + | ip2k \ + | m32r | m68000 | m68k | m88k | mcore \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64vr | mips64vrel \ + | mips64orion | mips64orionel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | msp430 \ + | ns16k | ns32k \ + | openrisc | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | pyramid \ + | sh | sh[1234] | sh3e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ + | strongarm \ + | tahoe | thumb | tic80 | tron \ + | v850 | v850e \ + | we32k \ + | x86 | xscale | xstormy16 | xtensa \ + | z8k) + basic_machine=$basic_machine-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12) + # Motorola 68HC11/12. + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* \ + | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* \ + | clipper-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | elxsi-* \ + | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* \ + | m32r-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | mcore-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipstx39-* | mipstx39el-* \ + | msp430-* \ + | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | pyramid-* \ + | romp-* | rs6000-* \ + | sh-* | sh[1234]-* | sh3e-* | sh[34]eb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ + | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ + | tahoe-* | thumb-* | tic30-* | tic4x-* | tic54x-* | tic80-* | tron-* \ + | v850-* | v850e-* | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ + | xtensa-* \ + | ymp-* \ + | z8k-*) + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | j90) + basic_machine=j90-cray + os=-unicos + ;; + crds | unos) + basic_machine=m68k-crds + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; +# I'm not sure what "Sysv32" means. Should this be sysv3.2? + i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + mmix*) + basic_machine=mmix-knuth + os=-mmixware + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + nv1) + basic_machine=nv1-cray + os=-unicosmp + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + or32 | or32-*) + basic_machine=or32-unknown + os=-coff + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2) + basic_machine=i686-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc) basic_machine=powerpc-unknown + ;; + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sparclite-wrs | simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tic4x | c4x*) + basic_machine=tic4x-unknown + os=-coff + ;; + tic54x | c54x*) + basic_machine=tic54x-unknown + os=-coff + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh3 | sh4 | sh3eb | sh4eb | sh[1234]le | sh3ele) + basic_machine=sh-unknown + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparc | sparcv9 | sparcv9b) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ + | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -microbsd*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -atheos*) + os=-atheos + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -nova*) + os=-rtmk-nova + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + # This also exists in the configure program, but was not the + # default. + # os=-sunos4 + ;; + m68*-cisco) + os=-aout + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + or32-*) + os=-coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-ibm) + os=-aix + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os +exit 0 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/configure b/configure new file mode 100755 index 0000000..67d4ae3 --- /dev/null +++ b/configure @@ -0,0 +1,12371 @@ +#! /bin/sh +# From configure.ac 2.2.1. +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.57 for ncpfs 2.2.1. +# +# Report bugs to . +# +# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 +# 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 + +# Support unset when possible. +if (FOO=FOO; unset FOO) >/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 -n "`(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 + as_mkdir_p=false +fi + +as_executable_p="test -f" + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="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="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='ncpfs' +PACKAGE_TARNAME='-ncpfs-' +PACKAGE_VERSION='2.2.1' +PACKAGE_STRING='ncpfs 2.2.1' +PACKAGE_BUGREPORT='vandrove@vc.cvut.cz' + +ac_unique_file="lib/ncplib.c" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#if HAVE_SYS_TYPES_H +# include +#endif +#if HAVE_SYS_STAT_H +# include +#endif +#if STDC_HEADERS +# include +# include +#else +# if HAVE_STDLIB_H +# include +# endif +#endif +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H +# include +# endif +# include +#endif +#if HAVE_STRINGS_H +# include +#endif +#if HAVE_INTTYPES_H +# include +#else +# if HAVE_STDINT_H +# include +# endif +#endif +#if HAVE_UNISTD_H +# include +#endif" + +ac_subdirs_all="$ac_subdirs_all contrib/php" +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 CC_WARNINGS build build_cpu build_vendor build_os host host_cpu host_vendor host_os SET_MAKE CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S PACKAGE VERSION MKINSTALLDIRS MSGFMT GMSGFMT XGETTEXT MSGMERGE RANLIB ac_ct_RANLIB CPP EGREP ALLOCA GLIBC21 LIBICONV LTLIBICONV INTLBISON USE_NLS BUILD_INCLUDED_LIBINTL USE_INCLUDED_LIBINTL CATOBJEXT INTLOBJS DATADIRNAME INSTOBJEXT GENCAT INTL_LIBTOOL_SUFFIX_PREFIX INTLLIBS LIBINTL LTLIBINTL POSUB localedir ncp_ipx_headers_1 ncp_ipx_headers_2 ncp_ipx_defsiocprotoprivate ncp_ipx_defsiocaipx ncp_sys_mount_h ncp_linux_fs_h ncp_net_if_h ncp_net_route_h ncp_if_ether_support ncp_sys_select_h stdint_types socklen_t wchar_h LIB_PAM_SECURITY php_found REENTRANT_CFLAGS ncphost ELF_TARGET VERSIONED_LINK ncp_in_support ncp_ipx_support NDS_SUPPORT SIGNATURES MOUNT2 MOUNT3 USE_KERNEL ADDON_SUBDIRS ADDON_DEV_SUBDIRS FFUNCTION_SECTIONS GC_SECTIONS subdirs 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_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_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_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 ncpfs 2.2.1 to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +_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 + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of ncpfs 2.2.1:";; + esac + cat <<\_ACEOF + +Optional Features: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-warnings enable verbose build warnings + --enable-pam build PAM NCP authentication module + --enable-php build PHP NCP authentication module + --disable-ipx-tools disables building of ipx tools + --disable-udp disable NCP/UDP + --disable-ipx disable NCP/IPX + --disable-signatures disable packet signing code + --disable-nds disable NDS support + --disable-mount-v2 disable support for Linux 2.0 + --disable-mount-v3 disable support for Linux 2.2 + --disable-kernel do not use kernel interface + --disable-reentrant do not compile threading support into library + --disable-versions do not use version symbols in library + --disable-function-sections do not use -ffunction-sections for static libraries + --enable-trace enable trace of ncp calls + --enable-ncp-debug enable builtin debugging support + --disable-rpath do not hardcode runtime library paths + --disable-nls do not use Native Language Support + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-php-config=PATH build PHP NCP authentication module + --with-gnu-ld assume the C compiler uses GNU ld default=no + --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib + --without-libiconv-prefix don't search for libiconv in includedir and libdir + --with-included-gettext use the GNU gettext library included here + --with-libintl-prefix=DIR search for libintl in DIR/include and DIR/lib + --without-libintl-prefix don't search for libintl in includedir and libdir + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have + headers in a nonstandard directory + 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. + +Report bugs to . +_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 +# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be +# absolute. +ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` +ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` +ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` +ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` + + 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 +ncpfs configure 2.2.1 +generated by GNU Autoconf 2.57 + +Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 +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 ncpfs $as_me 2.2.1, which was +generated by GNU Autoconf 2.57. 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.* *.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 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ac_config_headers="$ac_config_headers include/config.h" + + + +# Check whether --enable-warnings or --disable-warnings was given. +if test "${enable_warnings+set}" = set; then + enableval="$enable_warnings" + +fi; + +# Check whether --enable-pam or --disable-pam was given. +if test "${enable_pam+set}" = set; then + enableval="$enable_pam" + +fi; + +# Check whether --enable-php or --disable-php was given. +if test "${enable_php+set}" = set; then + enableval="$enable_php" + +fi; + + +# Check whether --with-php-config or --without-php-config was given. +if test "${with_php_config+set}" = set; then + withval="$with_php_config" + +fi; + +# Check whether --enable-ipx-tools or --disable-ipx-tools was given. +if test "${enable_ipx_tools+set}" = set; then + enableval="$enable_ipx_tools" + +fi; + +# Check whether --enable-udp or --disable-udp was given. +if test "${enable_udp+set}" = set; then + enableval="$enable_udp" + +fi; + +# Check whether --enable-ipx or --disable-ipx was given. +if test "${enable_ipx+set}" = set; then + enableval="$enable_ipx" + +fi; + +# Check whether --enable-signatures or --disable-signatures was given. +if test "${enable_signatures+set}" = set; then + enableval="$enable_signatures" + +fi; + +# Check whether --enable-nds or --disable-nds was given. +if test "${enable_nds+set}" = set; then + enableval="$enable_nds" + +fi; + +# Check whether --enable-mount-v2 or --disable-mount-v2 was given. +if test "${enable_mount_v2+set}" = set; then + enableval="$enable_mount_v2" + +fi; + +# Check whether --enable-mount-v3 or --disable-mount-v3 was given. +if test "${enable_mount_v3+set}" = set; then + enableval="$enable_mount_v3" + +fi; + +# Check whether --enable-kernel or --disable-kernel was given. +if test "${enable_kernel+set}" = set; then + enableval="$enable_kernel" + +fi; + +# Check whether --enable-reentrant or --disable-reentrant was given. +if test "${enable_reentrant+set}" = set; then + enableval="$enable_reentrant" + +fi; + +# Check whether --enable-versions or --disable-versions was given. +if test "${enable_versions+set}" = set; then + enableval="$enable_versions" + +fi; + +# Check whether --enable-function_sections or --disable-function_sections was given. +if test "${enable_function_sections+set}" = set; then + enableval="$enable_function_sections" + +fi; + +# Check whether --enable-trace or --disable-trace was given. +if test "${enable_trace+set}" = set; then + enableval="$enable_trace" + +fi; + +# Check whether --enable-ncp_debug or --disable-ncp_debug was given. +if test "${enable_ncp_debug+set}" = set; then + enableval="$enable_ncp_debug" + +fi; + +if test "$enable_udp" = "no" +then + PROTOCOL_IP=0 +else + +cat >>confdefs.h <<\_ACEOF +#define CONFIG_NATIVE_IP 1 +_ACEOF + + PROTOCOL_IP=1 +fi + +if test "$enable_signatures" = "no" +then : ; else + +cat >>confdefs.h <<\_ACEOF +#define SIGNATURES 1 +_ACEOF + + SIGNATURES=1 +fi + +if test "$enable_nds" = "no" +then : ; else + +cat >>confdefs.h <<\_ACEOF +#define NDS_SUPPORT 1 +_ACEOF + + NDS_SUPPORT=1 +fi + +if test "$enable_kernel" = "no" +then + USE_KERNEL=0 + enable_mount_v2=no + enable_mount_v3=no +else + USE_KERNEL=1 +fi + +if test "$enable_mount_v2" = "no" +then + MOUNT2=0 +else + MOUNT2=1 +fi + +if test "$enable_mount_v3" = "no" +then + MOUNT3=0 +else + MOUNT3=1 +fi + +if test "$enable_warnings" = "yes" +then + CC_WARNINGS=yes +else + CC_WARNINGS=no +fi + + +if test "$enable_ncp_debug" = "yes" +then + NCP_DEBUG_ENABLE=yes + +cat >>confdefs.h <<\_ACEOF +#define NCP_DEBUG 1 +_ACEOF + +else + NCP_DEBUG_ENABLE=no +fi + +pam_forced=no +pam_path_forced= +if test "$enable_pam" = "" +then + PAM=1 +else + pam_forced=yes + case "$enable_pam" in + no) PAM=0; pam_path_forced="no";; + yes) PAM=1;; + /*) PAM=1; pam_path_forced="$enable_pam";; + *) { { echo "$as_me:$LINENO: error: Bad parameter for --enable-pam" >&5 +echo "$as_me: error: Bad parameter for --enable-pam" >&2;} + { (exit 1); exit 1; }; };; + esac +fi + +php_forced=no +php_path_forced= +PHP=yes +if test "$enable_php" != "" +then + case "$enable_php" in + no) PHP=no; php_path_forced="no";; + yes) PHP=yes; php_path_forced=;; + *) { { echo "$as_me:$LINENO: error: Bad parameter for --enable-php. Use --with-php-config for specifying PHP directory" >&5 +echo "$as_me: error: Bad parameter for --enable-php. Use --with-php-config for specifying PHP directory" >&2;} + { (exit 1); exit 1; }; };; + esac + php_forced=yes +fi +if test "$with_php_config" != "" +then + case "$with_php_config" in + no) PHP2=no; php_path_forced="no";; + yes) PHP2=yes; php_path_forced=;; + *) PHP2=yes; php_path_forced="$with_php_config";; + esac + if test "$php_forced" = "yes" + then + if test "$PHP" != "$PHP2" + then + p1="--enable-php" + if test "$PHP" = "no" + then + p1="--disable-php" + fi + case "$php_path_forced" in + no) p2="--without-php-config";; + yes) p2="--with-php-config";; + *) p2="--with-php-config=$php_path_forced";; + esac + { { echo "$as_me:$LINENO: error: $p1 conflicts with $p2" >&5 +echo "$as_me: error: $p1 conflicts with $p2" >&2;} + { (exit 1); exit 1; }; }; + fi + fi + PHP="${PHP2}" + php_forced=yes +fi + +reentrant_forced=no +REENTRANT=1 +if test "$enable_reentrant" != "" +then + reentrant_forced=yes + if test "$enable_reentrant" = "no" + then + REENTRANT=0 + fi +fi + +versions_forced=no +VERSIONED_LINK=yes +if test "$enable_versions" != "" +then + versions_forced=yes + if test "$enable_versions" = "no" + then + VERSIONED_LINK=no + fi +fi + +function_sections_forced=no +function_sections=yes +if test "$enable_function_sections" != "" +then + function_sections_forced=yes + if test "$enable_function_sections" = "no" + then + function_sections=no + fi +fi + +if test "$enable_trace" = "yes" +then + +cat >>confdefs.h <<\_ACEOF +#define NCP_TRACE_ENABLE 1 +_ACEOF + + NCP_TRACE_ENABLE=1 +fi + +PROTOCOL_IPX=0 +BUILD_IPX_TOOLS=0 + +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. + +# Make sure we can run config.sub. +$ac_config_sub sun4 >/dev/null 2>&1 || + { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 +echo "$as_me: error: cannot run $ac_config_sub" >&2;} + { (exit 1); exit 1; }; } + +echo "$as_me:$LINENO: checking build system type" >&5 +echo $ECHO_N "checking build system type... $ECHO_C" >&6 +if test "${ac_cv_build+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_build_alias=$build_alias +test -z "$ac_cv_build_alias" && + ac_cv_build_alias=`$ac_config_guess` +test -z "$ac_cv_build_alias" && + { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 +echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + { (exit 1); exit 1; }; } +ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +echo "${ECHO_T}$ac_cv_build" >&6 +build=$ac_cv_build +build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + + +echo "$as_me:$LINENO: checking host system type" >&5 +echo $ECHO_N "checking host system type... $ECHO_C" >&6 +if test "${ac_cv_host+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_host_alias=$host_alias +test -z "$ac_cv_host_alias" && + ac_cv_host_alias=$ac_cv_build_alias +ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +echo "${ECHO_T}$ac_cv_host" >&6 +host=$ac_cv_host +host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + + + +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 + +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 &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&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 +#line $LINENO "configure" +/* 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" >&5 +echo $ECHO_N "checking for C compiler default output... $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 +#line $LINENO "configure" +/* 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_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* 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>&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.$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 +#line $LINENO "configure" +/* 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>&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.$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 +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} +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>&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.$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>&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 \ + ''\ + '#include ' \ + '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 +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +$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>&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.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* 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>&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.$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.$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 + +# 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" +# ./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/* | \ + /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 ln -s works" >&5 +echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else + echo "$as_me:$LINENO: result: no, using $LN_S" >&5 +echo "${ECHO_T}no, using $LN_S" >&6 +fi + + +PACKAGE="$PACKAGE_NAME" + +VERSION="$PACKAGE_VERSION" + + + MKINSTALLDIRS= + if test -n "$ac_aux_dir"; then + MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" + fi + if test -z "$MKINSTALLDIRS"; then + MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" + fi + + + + + + # Extract the first word of "msgfmt", so it can be a program name with args. +set dummy msgfmt; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_MSGFMT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case "$MSGFMT" in + /*) + ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 && + (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then + ac_cv_path_MSGFMT="$ac_dir/$ac_word" + break + fi + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":" + ;; +esac +fi +MSGFMT="$ac_cv_path_MSGFMT" +if test "$MSGFMT" != ":"; then + echo "$as_me:$LINENO: result: $MSGFMT" >&5 +echo "${ECHO_T}$MSGFMT" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + # Extract the first word of "gmsgfmt", so it can be a program name with args. +set dummy gmsgfmt; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_GMSGFMT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $GMSGFMT in + [\\/]* | ?:[\\/]*) + ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" + ;; +esac +fi +GMSGFMT=$ac_cv_path_GMSGFMT + +if test -n "$GMSGFMT"; then + echo "$as_me:$LINENO: result: $GMSGFMT" >&5 +echo "${ECHO_T}$GMSGFMT" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + + # Extract the first word of "xgettext", so it can be a program name with args. +set dummy xgettext; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_XGETTEXT+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case "$XGETTEXT" in + /*) + ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 && + (if $ac_dir/$ac_word --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then + ac_cv_path_XGETTEXT="$ac_dir/$ac_word" + break + fi + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" + ;; +esac +fi +XGETTEXT="$ac_cv_path_XGETTEXT" +if test "$XGETTEXT" != ":"; then + echo "$as_me:$LINENO: result: $XGETTEXT" >&5 +echo "${ECHO_T}$XGETTEXT" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + rm -f messages.po + + # Extract the first word of "msgmerge", so it can be a program name with args. +set dummy msgmerge; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_MSGMERGE+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case "$MSGMERGE" in + /*) + ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if $ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1; then + ac_cv_path_MSGMERGE="$ac_dir/$ac_word" + break + fi + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":" + ;; +esac +fi +MSGMERGE="$ac_cv_path_MSGMERGE" +if test "$MSGMERGE" != ":"; then + echo "$as_me:$LINENO: result: $MSGMERGE" >&5 +echo "${ECHO_T}$MSGMERGE" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + + if test "$GMSGFMT" != ":"; then + if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 && + (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then + : ; + else + GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'` + echo "$as_me:$LINENO: result: found $GMSGFMT program is not GNU msgfmt; ignore it" >&5 +echo "${ECHO_T}found $GMSGFMT program is not GNU msgfmt; ignore it" >&6 + GMSGFMT=":" + fi + fi + + if test "$XGETTEXT" != ":"; then + if $XGETTEXT --omit-header --copyright-holder= /dev/null >/dev/null 2>&1 && + (if $XGETTEXT --omit-header --copyright-holder= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then + : ; + else + echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5 +echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6 + XGETTEXT=":" + fi + rm -f messages.po + fi + + ac_config_commands="$ac_config_commands gettext" + + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + RANLIB=$ac_ct_RANLIB +else + RANLIB="$ac_cv_prog_RANLIB" +fi + + + + echo "$as_me:$LINENO: checking for strerror in -lcposix" >&5 +echo $ECHO_N "checking for strerror in -lcposix... $ECHO_C" >&6 +if test "${ac_cv_lib_cposix_strerror+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcposix $LIBS" +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* 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 strerror (); +int +main () +{ +strerror (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext 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='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_lib_cposix_strerror=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_cposix_strerror=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_cposix_strerror" >&5 +echo "${ECHO_T}$ac_cv_lib_cposix_strerror" >&6 +if test $ac_cv_lib_cposix_strerror = yes; then + LIBS="$LIBS -lcposix" +fi + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (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 + 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 +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_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 + 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 to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (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 + 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 +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_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 + 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 +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (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); } && + { 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.$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 +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + 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.* *.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 + +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 +#line $LINENO "configure" +/* 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>&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.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 +echo "${ECHO_T}$ac_cv_c_const" >&6 +if test $ac_cv_c_const = no; then + +cat >>confdefs.h <<\_ACEOF +#define const +_ACEOF + +fi + +echo "$as_me:$LINENO: checking for inline" >&5 +echo $ECHO_N "checking for inline... $ECHO_C" >&6 +if test "${ac_cv_c_inline+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } +#endif + +_ACEOF +rm -f conftest.$ac_objext +if { (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); } && + { 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_inline=$ac_kw; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.$ac_objext conftest.$ac_ext +done + +fi +echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 +echo "${ECHO_T}$ac_cv_c_inline" >&6 +case $ac_cv_c_inline in + inline | yes) ;; + no) +cat >>confdefs.h <<\_ACEOF +#define inline +_ACEOF + ;; + *) cat >>confdefs.h <<_ACEOF +#define inline $ac_cv_c_inline +_ACEOF + ;; +esac + +# 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 +#line $LINENO "configure" +/* 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>&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.$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 + + +echo "$as_me:$LINENO: checking for off_t" >&5 +echo $ECHO_N "checking for off_t... $ECHO_C" >&6 +if test "${ac_cv_type_off_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if ((off_t *) 0) + return 0; +if (sizeof (off_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +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); } && + { 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_type_off_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_off_t=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 +echo "${ECHO_T}$ac_cv_type_off_t" >&6 +if test $ac_cv_type_off_t = yes; then + : +else + +cat >>confdefs.h <<_ACEOF +#define off_t long +_ACEOF + +fi + +echo "$as_me:$LINENO: checking for size_t" >&5 +echo $ECHO_N "checking for size_t... $ECHO_C" >&6 +if test "${ac_cv_type_size_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if ((size_t *) 0) + return 0; +if (sizeof (size_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +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); } && + { 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_type_size_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_size_t=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 +echo "${ECHO_T}$ac_cv_type_size_t" >&6 +if test $ac_cv_type_size_t = yes; then + : +else + +cat >>confdefs.h <<_ACEOF +#define size_t unsigned +_ACEOF + +fi + +# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works +# for constant arguments. Useless! +echo "$as_me:$LINENO: checking for working alloca.h" >&5 +echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6 +if test "${ac_cv_working_alloca_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +char *p = (char *) alloca (2 * sizeof (int)); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext 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='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_working_alloca_h=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_working_alloca_h=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5 +echo "${ECHO_T}$ac_cv_working_alloca_h" >&6 +if test $ac_cv_working_alloca_h = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ALLOCA_H 1 +_ACEOF + +fi + +echo "$as_me:$LINENO: checking for alloca" >&5 +echo $ECHO_N "checking for alloca... $ECHO_C" >&6 +if test "${ac_cv_func_alloca_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __GNUC__ +# define alloca __builtin_alloca +#else +# ifdef _MSC_VER +# include +# define alloca _alloca +# else +# if HAVE_ALLOCA_H +# include +# else +# ifdef _AIX + #pragma alloca +# else +# ifndef alloca /* predefined by HP cc +Olibcalls */ +char *alloca (); +# endif +# endif +# endif +# endif +#endif + +int +main () +{ +char *p = (char *) alloca (1); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext 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='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_func_alloca_works=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_alloca_works=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5 +echo "${ECHO_T}$ac_cv_func_alloca_works" >&6 + +if test $ac_cv_func_alloca_works = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ALLOCA 1 +_ACEOF + +else + # The SVR3 libPW and SVR4 libucb both contain incompatible functions +# that cause trouble. Some versions do not even contain alloca or +# contain a buggy version. If you still want to use their alloca, +# use ar to extract alloca.o from them instead of compiling alloca.c. + +ALLOCA=alloca.$ac_objext + +cat >>confdefs.h <<\_ACEOF +#define C_ALLOCA 1 +_ACEOF + + +echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5 +echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6 +if test "${ac_cv_os_cray+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#if defined(CRAY) && ! defined(CRAY2) +webecray +#else +wenotbecray +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "webecray" >/dev/null 2>&1; then + ac_cv_os_cray=yes +else + ac_cv_os_cray=no +fi +rm -f conftest* + +fi +echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5 +echo "${ECHO_T}$ac_cv_os_cray" >&6 +if test $ac_cv_os_cray = yes; then + for ac_func in _getb67 GETB67 getb67; do + as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ +#ifdef __STDC__ +# include +#else +# include +#endif +/* 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 $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext 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='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 + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + +cat >>confdefs.h <<_ACEOF +#define CRAY_STACKSEG_END $ac_func +_ACEOF + + break +fi + + done +fi + +echo "$as_me:$LINENO: checking stack direction for C alloca" >&5 +echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6 +if test "${ac_cv_c_stack_direction+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_c_stack_direction=0 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +int +find_stack_direction () +{ + static char *addr = 0; + auto char dummy; + if (addr == 0) + { + addr = &dummy; + return find_stack_direction (); + } + else + return (&dummy > addr) ? 1 : -1; +} + +int +main () +{ + exit (find_stack_direction () < 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 + ac_cv_c_stack_direction=1 +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_c_stack_direction=-1 +fi +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5 +echo "${ECHO_T}$ac_cv_c_stack_direction" >&6 + +cat >>confdefs.h <<_ACEOF +#define STACK_DIRECTION $ac_cv_c_stack_direction +_ACEOF + + +fi + + + +for ac_header in stdlib.h unistd.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 +#line $LINENO "configure" +/* 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>&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.$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 +#line $LINENO "configure" +/* 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 + 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 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 preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; + 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: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if 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 + + +for ac_func in getpagesize +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ +#ifdef __STDC__ +# include +#else +# include +#endif +/* 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 $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext 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='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 + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + +echo "$as_me:$LINENO: checking for working mmap" >&5 +echo $ECHO_N "checking for working mmap... $ECHO_C" >&6 +if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then + ac_cv_func_mmap_fixed_mapped=no +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +/* malloc might have been renamed as rpl_malloc. */ +#undef malloc + +/* Thanks to Mike Haertel and Jim Avera for this test. + Here is a matrix of mmap possibilities: + mmap private not fixed + mmap private fixed at somewhere currently unmapped + mmap private fixed at somewhere already mapped + mmap shared not fixed + mmap shared fixed at somewhere currently unmapped + mmap shared fixed at somewhere already mapped + For private mappings, we should verify that changes cannot be read() + back from the file, nor mmap's back from the file at a different + address. (There have been systems where private was not correctly + implemented like the infamous i386 svr4.0, and systems where the + VM page cache was not coherent with the file system buffer cache + like early versions of FreeBSD and possibly contemporary NetBSD.) + For shared mappings, we should conversely verify that changes get + propagated back to all the places they're supposed to be. + + Grep wants private fixed already mapped. + The main things grep needs to know about mmap are: + * does it exist and is it safe to write into the mmap'd area + * how to use it (BSD variants) */ + +#include +#include + +#if !STDC_HEADERS && !HAVE_STDLIB_H +char *malloc (); +#endif + +/* This mess was copied from the GNU getpagesize.h. */ +#if !HAVE_GETPAGESIZE +/* Assume that all systems that can run configure have sys/param.h. */ +# if !HAVE_SYS_PARAM_H +# define HAVE_SYS_PARAM_H 1 +# endif + +# ifdef _SC_PAGESIZE +# define getpagesize() sysconf(_SC_PAGESIZE) +# else /* no _SC_PAGESIZE */ +# if HAVE_SYS_PARAM_H +# include +# ifdef EXEC_PAGESIZE +# define getpagesize() EXEC_PAGESIZE +# else /* no EXEC_PAGESIZE */ +# ifdef NBPG +# define getpagesize() NBPG * CLSIZE +# ifndef CLSIZE +# define CLSIZE 1 +# endif /* no CLSIZE */ +# else /* no NBPG */ +# ifdef NBPC +# define getpagesize() NBPC +# else /* no NBPC */ +# ifdef PAGESIZE +# define getpagesize() PAGESIZE +# endif /* PAGESIZE */ +# endif /* no NBPC */ +# endif /* no NBPG */ +# endif /* no EXEC_PAGESIZE */ +# else /* no HAVE_SYS_PARAM_H */ +# define getpagesize() 8192 /* punt totally */ +# endif /* no HAVE_SYS_PARAM_H */ +# endif /* no _SC_PAGESIZE */ + +#endif /* no HAVE_GETPAGESIZE */ + +int +main () +{ + char *data, *data2, *data3; + int i, pagesize; + int fd; + + pagesize = getpagesize (); + + /* First, make a file with some known garbage in it. */ + data = (char *) malloc (pagesize); + if (!data) + exit (1); + for (i = 0; i < pagesize; ++i) + *(data + i) = rand (); + umask (0); + fd = creat ("conftest.mmap", 0600); + if (fd < 0) + exit (1); + if (write (fd, data, pagesize) != pagesize) + exit (1); + close (fd); + + /* Next, try to mmap the file at a fixed address which already has + something else allocated at it. If we can, also make sure that + we see the same garbage. */ + fd = open ("conftest.mmap", O_RDWR); + if (fd < 0) + exit (1); + data2 = (char *) malloc (2 * pagesize); + if (!data2) + exit (1); + data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1); + if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, + MAP_PRIVATE | MAP_FIXED, fd, 0L)) + exit (1); + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data2 + i)) + exit (1); + + /* Finally, make sure that changes to the mapped area do not + percolate back to the file as seen by read(). (This is a bug on + some variants of i386 svr4.0.) */ + for (i = 0; i < pagesize; ++i) + *(data2 + i) = *(data2 + i) + 1; + data3 = (char *) malloc (pagesize); + if (!data3) + exit (1); + if (read (fd, data3, pagesize) != pagesize) + exit (1); + for (i = 0; i < pagesize; ++i) + if (*(data + i) != *(data3 + i)) + exit (1); + close (fd); + 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 + ac_cv_func_mmap_fixed_mapped=yes +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_func_mmap_fixed_mapped=no +fi +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5 +echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6 +if test $ac_cv_func_mmap_fixed_mapped = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_MMAP 1 +_ACEOF + +fi +rm -f conftest.mmap + + + echo "$as_me:$LINENO: checking whether we are using the GNU C Library 2.1 or newer" >&5 +echo $ECHO_N "checking whether we are using the GNU C Library 2.1 or newer... $ECHO_C" >&6 +if test "${ac_cv_gnu_library_2_1+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#ifdef __GNU_LIBRARY__ + #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) + Lucky GNU user + #endif +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "Lucky GNU user" >/dev/null 2>&1; then + ac_cv_gnu_library_2_1=yes +else + ac_cv_gnu_library_2_1=no +fi +rm -f conftest* + + + +fi +echo "$as_me:$LINENO: result: $ac_cv_gnu_library_2_1" >&5 +echo "${ECHO_T}$ac_cv_gnu_library_2_1" >&6 + + GLIBC21="$ac_cv_gnu_library_2_1" + + + + + echo "$as_me:$LINENO: checking whether integer division by zero raises SIGFPE" >&5 +echo $ECHO_N "checking whether integer division by zero raises SIGFPE... $ECHO_C" >&6 +if test "${gt_cv_int_divbyzero_sigfpe+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + if test "$cross_compiling" = yes; then + + # Guess based on the CPU. + case "$host_cpu" in + alpha* | i3456786 | m68k | s390*) + gt_cv_int_divbyzero_sigfpe="guessing yes";; + *) + gt_cv_int_divbyzero_sigfpe="guessing no";; + esac + +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include + +static void +#ifdef __cplusplus +sigfpe_handler (int sig) +#else +sigfpe_handler (sig) int sig; +#endif +{ + /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */ + exit (sig != SIGFPE); +} + +int x = 1; +int y = 0; +int z; +int nan; + +int main () +{ + signal (SIGFPE, sigfpe_handler); +/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */ +#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP) + signal (SIGTRAP, sigfpe_handler); +#endif +/* Linux/SPARC yields signal SIGILL. */ +#if defined (__sparc__) && defined (__linux__) + signal (SIGILL, sigfpe_handler); +#endif + + z = x / y; + nan = y / y; + exit (1); +} + +_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 + gt_cv_int_divbyzero_sigfpe=yes +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +gt_cv_int_divbyzero_sigfpe=no +fi +rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + +fi +echo "$as_me:$LINENO: result: $gt_cv_int_divbyzero_sigfpe" >&5 +echo "${ECHO_T}$gt_cv_int_divbyzero_sigfpe" >&6 + case "$gt_cv_int_divbyzero_sigfpe" in + *yes) value=1;; + *) value=0;; + esac + +cat >>confdefs.h <<_ACEOF +#define INTDIV0_RAISES_SIGFPE $value +_ACEOF + + + + echo "$as_me:$LINENO: checking for inttypes.h" >&5 +echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6 +if test "${jm_ac_cv_header_inttypes_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +int +main () +{ +uintmax_t i = (uintmax_t) -1; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +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); } && + { 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 + jm_ac_cv_header_inttypes_h=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +jm_ac_cv_header_inttypes_h=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $jm_ac_cv_header_inttypes_h" >&5 +echo "${ECHO_T}$jm_ac_cv_header_inttypes_h" >&6 + if test $jm_ac_cv_header_inttypes_h = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_INTTYPES_H_WITH_UINTMAX 1 +_ACEOF + + fi + + + echo "$as_me:$LINENO: checking for stdint.h" >&5 +echo $ECHO_N "checking for stdint.h... $ECHO_C" >&6 +if test "${jm_ac_cv_header_stdint_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +int +main () +{ +uintmax_t i = (uintmax_t) -1; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +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); } && + { 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 + jm_ac_cv_header_stdint_h=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +jm_ac_cv_header_stdint_h=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $jm_ac_cv_header_stdint_h" >&5 +echo "${ECHO_T}$jm_ac_cv_header_stdint_h" >&6 + if test $jm_ac_cv_header_stdint_h = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_STDINT_H_WITH_UINTMAX 1 +_ACEOF + + fi + + + echo "$as_me:$LINENO: checking for unsigned long long" >&5 +echo $ECHO_N "checking for unsigned long long... $ECHO_C" >&6 +if test "${ac_cv_type_unsigned_long_long+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +unsigned long long ull = 1; int i = 63; +int +main () +{ +unsigned long long ullmax = (unsigned long long) -1; + return ull << i | ull >> i | ullmax / ull | ullmax % ull; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext 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='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_type_unsigned_long_long=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_unsigned_long_long=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long_long" >&5 +echo "${ECHO_T}$ac_cv_type_unsigned_long_long" >&6 + if test $ac_cv_type_unsigned_long_long = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_UNSIGNED_LONG_LONG 1 +_ACEOF + + fi + + + + + if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then + + test $ac_cv_type_unsigned_long_long = yes \ + && ac_type='unsigned long long' \ + || ac_type='unsigned long' + +cat >>confdefs.h <<_ACEOF +#define uintmax_t $ac_type +_ACEOF + + fi + + + echo "$as_me:$LINENO: checking for inttypes.h" >&5 +echo $ECHO_N "checking for inttypes.h... $ECHO_C" >&6 +if test "${gt_cv_header_inttypes_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +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); } && + { 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 + gt_cv_header_inttypes_h=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +gt_cv_header_inttypes_h=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext + +fi +echo "$as_me:$LINENO: result: $gt_cv_header_inttypes_h" >&5 +echo "${ECHO_T}$gt_cv_header_inttypes_h" >&6 + if test $gt_cv_header_inttypes_h = yes; then + +cat >>confdefs.h <<_ACEOF +#define HAVE_INTTYPES_H 1 +_ACEOF + + fi + + + + if test $gt_cv_header_inttypes_h = yes; then + echo "$as_me:$LINENO: checking whether the inttypes.h PRIxNN macros are broken" >&5 +echo $ECHO_N "checking whether the inttypes.h PRIxNN macros are broken... $ECHO_C" >&6 +if test "${gt_cv_inttypes_pri_broken+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#ifdef PRId32 +char *p = PRId32; +#endif + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +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); } && + { 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 + gt_cv_inttypes_pri_broken=no +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +gt_cv_inttypes_pri_broken=yes +fi +rm -f conftest.$ac_objext conftest.$ac_ext + +fi +echo "$as_me:$LINENO: result: $gt_cv_inttypes_pri_broken" >&5 +echo "${ECHO_T}$gt_cv_inttypes_pri_broken" >&6 + fi + if test "$gt_cv_inttypes_pri_broken" = yes; then + +cat >>confdefs.h <<_ACEOF +#define PRI_MACROS_BROKEN 1 +_ACEOF + + fi + + + if test "X$prefix" = "XNONE"; then + acl_final_prefix="$ac_default_prefix" + else + acl_final_prefix="$prefix" + fi + if test "X$exec_prefix" = "XNONE"; then + acl_final_exec_prefix='${prefix}' + else + acl_final_exec_prefix="$exec_prefix" + fi + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" + prefix="$acl_save_prefix" + + +# Check whether --with-gnu-ld or --without-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then + withval="$with_gnu_ld" + test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi; +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + echo "$as_me:$LINENO: checking for ld used by GCC" >&5 +echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6 + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | [A-Za-z]:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the path of ld + ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + echo "$as_me:$LINENO: checking for GNU ld" >&5 +echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 +else + echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 +fi +if test "${acl_cv_path_LD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$LD"; then + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + acl_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some GNU ld's only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then + test "$with_gnu_ld" != no && break + else + test "$with_gnu_ld" != yes && break + fi + fi + done + IFS="$ac_save_ifs" +else + acl_cv_path_LD="$LD" # Let the user override the test with a path. +fi +fi + +LD="$acl_cv_path_LD" +if test -n "$LD"; then + echo "$as_me:$LINENO: result: $LD" >&5 +echo "${ECHO_T}$LD" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi +test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 +if test "${acl_cv_prog_gnu_ld+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # I'd rather use --version here, but apparently some GNU ld's only accept -v. +if $LD -v 2>&1 &5; then + acl_cv_prog_gnu_ld=yes +else + acl_cv_prog_gnu_ld=no +fi +fi +echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5 +echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6 +with_gnu_ld=$acl_cv_prog_gnu_ld + + + + echo "$as_me:$LINENO: checking for shared library run path origin" >&5 +echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6 +if test "${acl_cv_rpath+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ + ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh + . ./conftest.sh + rm -f ./conftest.sh + acl_cv_rpath=done + +fi +echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5 +echo "${ECHO_T}$acl_cv_rpath" >&6 + wl="$acl_cv_wl" + libext="$acl_cv_libext" + shlibext="$acl_cv_shlibext" + hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" + hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" + hardcode_direct="$acl_cv_hardcode_direct" + hardcode_minus_L="$acl_cv_hardcode_minus_L" + sys_lib_search_path_spec="$acl_cv_sys_lib_search_path_spec" + sys_lib_dlsearch_path_spec="$acl_cv_sys_lib_dlsearch_path_spec" + # Check whether --enable-rpath or --disable-rpath was given. +if test "${enable_rpath+set}" = set; then + enableval="$enable_rpath" + : +else + enable_rpath=yes +fi; + + + + + + + + use_additional=yes + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + +# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given. +if test "${with_libiconv_prefix+set}" = set; then + withval="$with_libiconv_prefix" + + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + else + additional_includedir="$withval/include" + additional_libdir="$withval/lib" + fi + fi + +fi; + LIBICONV= + LTLIBICONV= + INCICONV= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='iconv ' + while test -n "$names_next_round"; do + names_this_round="$names_next_round" + names_next_round= + for name in $names_this_round; do + already_handled= + for n in $names_already_handled; do + if test "$n" = "$name"; then + already_handled=yes + break + fi + done + if test -z "$already_handled"; then + names_already_handled="$names_already_handled $name" + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` + eval value=\"\$HAVE_LIB$uppername\" + if test -n "$value"; then + if test "$value" = yes; then + eval value=\"\$LIB$uppername\" + test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" + else + : + fi + else + found_dir= + found_la= + found_so= + found_a= + if test $use_additional = yes; then + if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then + found_dir="$additional_libdir" + found_so="$additional_libdir/lib$name.$shlibext" + if test -f "$additional_libdir/lib$name.la"; then + found_la="$additional_libdir/lib$name.la" + fi + else + if test -f "$additional_libdir/lib$name.$libext"; then + found_dir="$additional_libdir" + found_a="$additional_libdir/lib$name.$libext" + if test -f "$additional_libdir/lib$name.la"; then + found_la="$additional_libdir/lib$name.la" + fi + fi + fi + fi + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + case "$x" in + -L*) + dir=`echo "X$x" | sed -e 's/^X-L//'` + if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then + found_dir="$dir" + found_so="$dir/lib$name.$shlibext" + if test -f "$dir/lib$name.la"; then + found_la="$dir/lib$name.la" + fi + else + if test -f "$dir/lib$name.$libext"; then + found_dir="$dir" + found_a="$dir/lib$name.$libext" + if test -f "$dir/lib$name.la"; then + found_la="$dir/lib$name.la" + fi + fi + fi + ;; + esac + if test "X$found_dir" != "X"; then + break + fi + done + fi + if test "X$found_dir" != "X"; then + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" + if test "X$found_so" != "X"; then + if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + else + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $found_dir" + fi + if test "$hardcode_direct" = yes; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + else + if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $found_dir" + fi + else + haveit= + for x in $LDFLAGS $LIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" + fi + if test "$hardcode_minus_L" != no; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" + else + LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" + fi + fi + fi + fi + else + if test "X$found_a" != "X"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" + else + LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" + fi + fi + additional_includedir= + case "$found_dir" in + */lib | */lib/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` + additional_includedir="$basedir/include" + ;; + esac + if test "X$additional_includedir" != "X"; then + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux*) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + for x in $CPPFLAGS $INCICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" + fi + fi + fi + fi + fi + if test -n "$found_la"; then + save_libdir="$libdir" + case "$found_la" in + */* | *\\*) . "$found_la" ;; + *) . "./$found_la" ;; + esac + libdir="$save_libdir" + for dep in $dependency_libs; do + case "$dep" in + -L*) + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + if test "X$additional_libdir" != "X/usr/lib"; then + haveit= + if test "X$additional_libdir" = "X/usr/local/lib"; then + if test -n "$GCC"; then + case $host_os in + linux*) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + haveit= + for x in $LDFLAGS $LIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" + fi + fi + haveit= + for x in $LDFLAGS $LTLIBICONV; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" + fi + fi + fi + fi + ;; + -R*) + dir=`echo "X$dep" | sed -e 's/^X-R//'` + if test "$enable_rpath" != no; then + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $dir" + fi + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $dir" + fi + fi + ;; + -l*) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` + ;; + *.la) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` + ;; + *) + LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" + ;; + esac + done + fi + else + LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" + fi + fi + fi + done + done + if test "X$rpathdirs" != "X"; then + if test -n "$hardcode_libdir_separator"; then + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" + else + for found_dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$found_dir" + eval flag=\"$hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" + done + fi + fi + if test "X$ltrpathdirs" != "X"; then + for found_dir in $ltrpathdirs; do + LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" + done + fi + + + + + + + + + + + + + + +for ac_header in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \ +stdlib.h string.h unistd.h sys/param.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 +#line $LINENO "configure" +/* 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>&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.$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 +#line $LINENO "configure" +/* 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 + 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 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 preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; + 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: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if 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 + + + + + + + + + + + + + + + + + + + + + + +for ac_func in feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \ +geteuid getgid getuid mempcpy munmap putenv setenv setlocale stpcpy \ +strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ +#ifdef __STDC__ +# include +#else +# include +#endif +/* 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 $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext 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='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 + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + + + + + + am_save_CPPFLAGS="$CPPFLAGS" + + for element in $INCICONV; do + haveit= + for x in $CPPFLAGS; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" + fi + done + + + echo "$as_me:$LINENO: checking for iconv" >&5 +echo $ECHO_N "checking for iconv... $ECHO_C" >&6 +if test "${am_cv_func_iconv+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + am_cv_func_iconv="no, consider installing GNU libiconv" + am_cv_lib_iconv=no + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +int +main () +{ +iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (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='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 + am_cv_func_iconv=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + if test "$am_cv_func_iconv" != yes; then + am_save_LIBS="$LIBS" + LIBS="$LIBS $LIBICONV" + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +int +main () +{ +iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (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='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 + am_cv_lib_iconv=yes + am_cv_func_iconv=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + LIBS="$am_save_LIBS" + fi + +fi +echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5 +echo "${ECHO_T}$am_cv_func_iconv" >&6 + if test "$am_cv_func_iconv" = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ICONV 1 +_ACEOF + + fi + if test "$am_cv_lib_iconv" = yes; then + echo "$as_me:$LINENO: checking how to link with libiconv" >&5 +echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6 + echo "$as_me:$LINENO: result: $LIBICONV" >&5 +echo "${ECHO_T}$LIBICONV" >&6 + else + CPPFLAGS="$am_save_CPPFLAGS" + LIBICONV= + LTLIBICONV= + fi + + + + if test "$am_cv_func_iconv" = yes; then + echo "$as_me:$LINENO: checking for iconv declaration" >&5 +echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6 + if test "${am_cv_proto_iconv+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include +extern +#ifdef __cplusplus +"C" +#endif +#if defined(__STDC__) || defined(__cplusplus) +size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); +#else +size_t iconv(); +#endif + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (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); } && + { 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 + am_cv_proto_iconv_arg1="" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +am_cv_proto_iconv_arg1="const" +fi +rm -f conftest.$ac_objext conftest.$ac_ext + am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);" +fi + + am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` + echo "$as_me:$LINENO: result: ${ac_t:- + }$am_cv_proto_iconv" >&5 +echo "${ECHO_T}${ac_t:- + }$am_cv_proto_iconv" >&6 + +cat >>confdefs.h <<_ACEOF +#define ICONV_CONST $am_cv_proto_iconv_arg1 +_ACEOF + + fi + + + echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5 +echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6 +if test "${am_cv_langinfo_codeset+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +char* cs = nl_langinfo(CODESET); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext 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='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 + am_cv_langinfo_codeset=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +am_cv_langinfo_codeset=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + +fi +echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5 +echo "${ECHO_T}$am_cv_langinfo_codeset" >&6 + if test $am_cv_langinfo_codeset = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LANGINFO_CODESET 1 +_ACEOF + + fi + + if test $ac_cv_header_locale_h = yes; then + + echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5 +echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6 +if test "${am_cv_val_LC_MESSAGES+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +return LC_MESSAGES + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext 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='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 + am_cv_val_LC_MESSAGES=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +am_cv_val_LC_MESSAGES=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5 +echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6 + if test $am_cv_val_LC_MESSAGES = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LC_MESSAGES 1 +_ACEOF + + fi + + fi + + for ac_prog in bison +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_INTLBISON+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$INTLBISON"; then + ac_cv_prog_INTLBISON="$INTLBISON" # 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_INTLBISON="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +INTLBISON=$ac_cv_prog_INTLBISON +if test -n "$INTLBISON"; then + echo "$as_me:$LINENO: result: $INTLBISON" >&5 +echo "${ECHO_T}$INTLBISON" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$INTLBISON" && break +done + + if test -z "$INTLBISON"; then + ac_verc_fail=yes + else + echo "$as_me:$LINENO: checking version of bison" >&5 +echo $ECHO_N "checking version of bison... $ECHO_C" >&6 + ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; + 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*) + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; + esac + echo "$as_me:$LINENO: result: $ac_prog_version" >&5 +echo "${ECHO_T}$ac_prog_version" >&6 + fi + if test $ac_verc_fail = yes; then + INTLBISON=: + fi + + + + + + + + + + + + + + + + echo "$as_me:$LINENO: checking whether NLS is requested" >&5 +echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6 + # Check whether --enable-nls or --disable-nls was given. +if test "${enable_nls+set}" = set; then + enableval="$enable_nls" + USE_NLS=$enableval +else + USE_NLS=yes +fi; + echo "$as_me:$LINENO: result: $USE_NLS" >&5 +echo "${ECHO_T}$USE_NLS" >&6 + + + + BUILD_INCLUDED_LIBINTL=no + USE_INCLUDED_LIBINTL=no + + LIBINTL= + LTLIBINTL= + POSUB= + + if test "$USE_NLS" = "yes"; then + gt_use_preinstalled_gnugettext=no + + echo "$as_me:$LINENO: checking whether included gettext is requested" >&5 +echo $ECHO_N "checking whether included gettext is requested... $ECHO_C" >&6 + +# Check whether --with-included-gettext or --without-included-gettext was given. +if test "${with_included_gettext+set}" = set; then + withval="$with_included_gettext" + nls_cv_force_use_gnu_gettext=$withval +else + nls_cv_force_use_gnu_gettext=no +fi; + echo "$as_me:$LINENO: result: $nls_cv_force_use_gnu_gettext" >&5 +echo "${ECHO_T}$nls_cv_force_use_gnu_gettext" >&6 + + nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" + if test "$nls_cv_force_use_gnu_gettext" != "yes"; then + + + + + + + echo "$as_me:$LINENO: checking for GNU gettext in libc" >&5 +echo $ECHO_N "checking for GNU gettext in libc... $ECHO_C" >&6 +if test "${gt_cv_func_gnugettext1_libc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +extern int _nl_msg_cat_cntr; +extern int *_nl_domain_bindings; +int +main () +{ +bindtextdomain ("", ""); +return (int) gettext ("") + _nl_msg_cat_cntr + *_nl_domain_bindings + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext 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='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 + gt_cv_func_gnugettext1_libc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +gt_cv_func_gnugettext1_libc=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $gt_cv_func_gnugettext1_libc" >&5 +echo "${ECHO_T}$gt_cv_func_gnugettext1_libc" >&6 + + if test "$gt_cv_func_gnugettext1_libc" != "yes"; then + + + + use_additional=yes + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + +# Check whether --with-libintl-prefix or --without-libintl-prefix was given. +if test "${with_libintl_prefix+set}" = set; then + withval="$with_libintl_prefix" + + if test "X$withval" = "Xno"; then + use_additional=no + else + if test "X$withval" = "X"; then + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + + eval additional_includedir=\"$includedir\" + eval additional_libdir=\"$libdir\" + + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + else + additional_includedir="$withval/include" + additional_libdir="$withval/lib" + fi + fi + +fi; + LIBINTL= + LTLIBINTL= + INCINTL= + rpathdirs= + ltrpathdirs= + names_already_handled= + names_next_round='intl ' + while test -n "$names_next_round"; do + names_this_round="$names_next_round" + names_next_round= + for name in $names_this_round; do + already_handled= + for n in $names_already_handled; do + if test "$n" = "$name"; then + already_handled=yes + break + fi + done + if test -z "$already_handled"; then + names_already_handled="$names_already_handled $name" + uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` + eval value=\"\$HAVE_LIB$uppername\" + if test -n "$value"; then + if test "$value" = yes; then + eval value=\"\$LIB$uppername\" + test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value" + eval value=\"\$LTLIB$uppername\" + test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value" + else + : + fi + else + found_dir= + found_la= + found_so= + found_a= + if test $use_additional = yes; then + if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then + found_dir="$additional_libdir" + found_so="$additional_libdir/lib$name.$shlibext" + if test -f "$additional_libdir/lib$name.la"; then + found_la="$additional_libdir/lib$name.la" + fi + else + if test -f "$additional_libdir/lib$name.$libext"; then + found_dir="$additional_libdir" + found_a="$additional_libdir/lib$name.$libext" + if test -f "$additional_libdir/lib$name.la"; then + found_la="$additional_libdir/lib$name.la" + fi + fi + fi + fi + if test "X$found_dir" = "X"; then + for x in $LDFLAGS $LTLIBINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + case "$x" in + -L*) + dir=`echo "X$x" | sed -e 's/^X-L//'` + if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then + found_dir="$dir" + found_so="$dir/lib$name.$shlibext" + if test -f "$dir/lib$name.la"; then + found_la="$dir/lib$name.la" + fi + else + if test -f "$dir/lib$name.$libext"; then + found_dir="$dir" + found_a="$dir/lib$name.$libext" + if test -f "$dir/lib$name.la"; then + found_la="$dir/lib$name.la" + fi + fi + fi + ;; + esac + if test "X$found_dir" != "X"; then + break + fi + done + fi + if test "X$found_dir" != "X"; then + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name" + if test "X$found_so" != "X"; then + if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" + else + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $found_dir" + fi + if test "$hardcode_direct" = yes; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" + else + if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $found_dir" + fi + else + haveit= + for x in $LDFLAGS $LIBINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$found_dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir" + fi + if test "$hardcode_minus_L" != no; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" + else + LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" + fi + fi + fi + fi + else + if test "X$found_a" != "X"; then + LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a" + else + LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name" + fi + fi + additional_includedir= + case "$found_dir" in + */lib | */lib/) + basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` + additional_includedir="$basedir/include" + ;; + esac + if test "X$additional_includedir" != "X"; then + if test "X$additional_includedir" != "X/usr/include"; then + haveit= + if test "X$additional_includedir" = "X/usr/local/include"; then + if test -n "$GCC"; then + case $host_os in + linux*) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + for x in $CPPFLAGS $INCINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-I$additional_includedir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_includedir"; then + INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir" + fi + fi + fi + fi + fi + if test -n "$found_la"; then + save_libdir="$libdir" + case "$found_la" in + */* | *\\*) . "$found_la" ;; + *) . "./$found_la" ;; + esac + libdir="$save_libdir" + for dep in $dependency_libs; do + case "$dep" in + -L*) + additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` + if test "X$additional_libdir" != "X/usr/lib"; then + haveit= + if test "X$additional_libdir" = "X/usr/local/lib"; then + if test -n "$GCC"; then + case $host_os in + linux*) haveit=yes;; + esac + fi + fi + if test -z "$haveit"; then + haveit= + for x in $LDFLAGS $LIBINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir" + fi + fi + haveit= + for x in $LDFLAGS $LTLIBINTL; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X-L$additional_libdir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + if test -d "$additional_libdir"; then + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir" + fi + fi + fi + fi + ;; + -R*) + dir=`echo "X$dep" | sed -e 's/^X-R//'` + if test "$enable_rpath" != no; then + haveit= + for x in $rpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + rpathdirs="$rpathdirs $dir" + fi + haveit= + for x in $ltrpathdirs; do + if test "X$x" = "X$dir"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + ltrpathdirs="$ltrpathdirs $dir" + fi + fi + ;; + -l*) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` + ;; + *.la) + names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` + ;; + *) + LIBINTL="${LIBINTL}${LIBINTL:+ }$dep" + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep" + ;; + esac + done + fi + else + LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name" + fi + fi + fi + done + done + if test "X$rpathdirs" != "X"; then + if test -n "$hardcode_libdir_separator"; then + alldirs= + for found_dir in $rpathdirs; do + alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" + done + acl_save_libdir="$libdir" + libdir="$alldirs" + eval flag=\"$hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" + else + for found_dir in $rpathdirs; do + acl_save_libdir="$libdir" + libdir="$found_dir" + eval flag=\"$hardcode_libdir_flag_spec\" + libdir="$acl_save_libdir" + LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" + done + fi + fi + if test "X$ltrpathdirs" != "X"; then + for found_dir in $ltrpathdirs; do + LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir" + done + fi + + echo "$as_me:$LINENO: checking for GNU gettext in libintl" >&5 +echo $ECHO_N "checking for GNU gettext in libintl... $ECHO_C" >&6 +if test "${gt_cv_func_gnugettext1_libintl+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + gt_save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $INCINTL" + gt_save_LIBS="$LIBS" + LIBS="$LIBS $LIBINTL" + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +extern int _nl_msg_cat_cntr; +extern +#ifdef __cplusplus +"C" +#endif +const char *_nl_expand_alias (); +int +main () +{ +bindtextdomain ("", ""); +return (int) gettext ("") + _nl_msg_cat_cntr + *_nl_expand_alias (0) + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext 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='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 + gt_cv_func_gnugettext1_libintl=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +gt_cv_func_gnugettext1_libintl=no +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + if test "$gt_cv_func_gnugettext1_libintl" != yes && test -n "$LIBICONV"; then + LIBS="$LIBS $LIBICONV" + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +extern int _nl_msg_cat_cntr; +extern +#ifdef __cplusplus +"C" +#endif +const char *_nl_expand_alias (); +int +main () +{ +bindtextdomain ("", ""); +return (int) gettext ("") + _nl_msg_cat_cntr + *_nl_expand_alias (0) + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext 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='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 + LIBINTL="$LIBINTL $LIBICONV" + LTLIBINTL="$LTLIBINTL $LTLIBICONV" + gt_cv_func_gnugettext1_libintl=yes + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + fi + CPPFLAGS="$gt_save_CPPFLAGS" + LIBS="$gt_save_LIBS" +fi +echo "$as_me:$LINENO: result: $gt_cv_func_gnugettext1_libintl" >&5 +echo "${ECHO_T}$gt_cv_func_gnugettext1_libintl" >&6 + fi + + if test "$gt_cv_func_gnugettext1_libc" = "yes" \ + || { test "$gt_cv_func_gnugettext1_libintl" = "yes" \ + && test "$PACKAGE" != gettext; }; then + gt_use_preinstalled_gnugettext=yes + else + LIBINTL= + LTLIBINTL= + INCINTL= + fi + + + if test "$gt_use_preinstalled_gnugettext" != "yes"; then + nls_cv_use_gnu_gettext=yes + fi + fi + + if test "$nls_cv_use_gnu_gettext" = "yes"; then + INTLOBJS="\$(GETTOBJS)" + BUILD_INCLUDED_LIBINTL=yes + USE_INCLUDED_LIBINTL=yes + LIBINTL="\${top_builddir}/intl/libintl.a $LIBICONV" + LTLIBINTL="\${top_builddir}/intl/libintl.a $LTLIBICONV" + LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` + fi + + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + CATOBJEXT=.gmo + fi + + + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + +cat >>confdefs.h <<\_ACEOF +#define ENABLE_NLS 1 +_ACEOF + + else + USE_NLS=no + fi + fi + + if test "$USE_NLS" = "yes"; then + + if test "$gt_use_preinstalled_gnugettext" = "yes"; then + if test "$gt_cv_func_gnugettext1_libintl" = "yes"; then + echo "$as_me:$LINENO: checking how to link with libintl" >&5 +echo $ECHO_N "checking how to link with libintl... $ECHO_C" >&6 + echo "$as_me:$LINENO: result: $LIBINTL" >&5 +echo "${ECHO_T}$LIBINTL" >&6 + + for element in $INCINTL; do + haveit= + for x in $CPPFLAGS; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" + fi + done + + fi + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GETTEXT 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DCGETTEXT 1 +_ACEOF + + fi + + POSUB=po + fi + + + if test "$PACKAGE" = gettext; then + BUILD_INCLUDED_LIBINTL=yes + fi + + + + + + + nls_cv_header_intl= + nls_cv_header_libgt= + + DATADIRNAME=share + + + INSTOBJEXT=.mo + + + GENCAT=gencat + + + INTL_LIBTOOL_SUFFIX_PREFIX= + + + + INTLLIBS="$LIBINTL" + + + + + + +localedir="\${prefix}/$DATADIRNAME/locale" + + +echo "$as_me:$LINENO: checking for GNU style IPX support" >&5 +echo $ECHO_N "checking for GNU style IPX support... $ECHO_C" >&6 +if test "${ncp_cv_c_ipx_netipx+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +int +main () +{ +((struct sockaddr_ipx*)0)->sipx_family == AF_IPX + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +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); } && + { 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 + ncp_cv_c_ipx_netipx="yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ncp_cv_c_ipx_netipx="no" + +fi +rm -f conftest.$ac_objext conftest.$ac_ext + +fi +echo "$as_me:$LINENO: result: $ncp_cv_c_ipx_netipx" >&5 +echo "${ECHO_T}$ncp_cv_c_ipx_netipx" >&6 +ncp_ipx_headers_1="/* not required */" +ncp_ipx_headers_2="/* <.../ipx.h> not found */" +if test "$ncp_cv_c_ipx_netipx" = "no" +then + echo "$as_me:$LINENO: checking for Linux style IPX support" >&5 +echo $ECHO_N "checking for Linux style IPX support... $ECHO_C" >&6 +if test "${ncp_cv_c_ipx_linux+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +int +main () +{ +((struct sockaddr_ipx*)0)->sipx_family == AF_IPX + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +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); } && + { 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 + ncp_cv_c_ipx_linux="yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ncp_cv_c_ipx_linux="no" + +fi +rm -f conftest.$ac_objext conftest.$ac_ext + +fi +echo "$as_me:$LINENO: result: $ncp_cv_c_ipx_linux" >&5 +echo "${ECHO_T}$ncp_cv_c_ipx_linux" >&6 + if test "$ncp_cv_c_ipx_linux" = "no" + then + enable_ipx="no" + else + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LINUX_IPX_H 1 +_ACEOF + + ncp_ipx_headers_1="#include " + ncp_ipx_headers_2="#include " + fi +else + +cat >>confdefs.h <<\_ACEOF +#define HAVE_NETIPX_IPX_H 1 +_ACEOF + + ncp_ipx_headers_1="#include " + ncp_ipx_headers_2="#include " +fi + + + +ncp_ipx_defsiocprotoprivate="#if 0 /* #define SIOCPROTOPRIVATE not needed */" +ncp_ipx_defsiocaipx="#if 0/* #define SIOCAIPX* not needed */" +if test "$enable_ipx" = "no" +then : ; else + +cat >>confdefs.h <<\_ACEOF +#define CONFIG_NATIVE_IPX 1 +_ACEOF + + PROTOCOL_IPX=1 + if test "$enable_ipx_tools" != "no" + then + ADDON_DEV_SUBDIRS="$ADDON_DEV_SUBDIRS ipx-1.0" + BUILD_IPX_TOOLS=1 + fi + + echo "$as_me:$LINENO: checking for working IPX ioctl values" >&5 +echo $ECHO_N "checking for working IPX ioctl values... $ECHO_C" >&6 +if test "${ncp_cv_c_ipx_ioctl+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ncp_ipx_headers_1 +$ncp_ipx_headers_2 +int +main () +{ +SIOCAIPXITFCRT, SIOCAIPXPRISLT, SIOCIPXCFGDATA + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +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); } && + { 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 + ncp_cv_c_ipx_ioctl="yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ncp_cv_c_ipx_ioctl="no" + +fi +rm -f conftest.$ac_objext conftest.$ac_ext + +fi +echo "$as_me:$LINENO: result: $ncp_cv_c_ipx_ioctl" >&5 +echo "${ECHO_T}$ncp_cv_c_ipx_ioctl" >&6 + if test "$ncp_cv_c_ipx_ioctl" = "no" + then + echo "$as_me:$LINENO: checking for defined SIOCPROTOPRIVATE" >&5 +echo $ECHO_N "checking for defined SIOCPROTOPRIVATE... $ECHO_C" >&6 +if test "${ncp_cv_c_siocprotoprivate+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ncp_ipx_headers_1 +$ncp_ipx_headers_2 +int +main () +{ +SIOCPROTOPRIVATE + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +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); } && + { 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 + ncp_cv_c_siocprotoprivate="yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ncp_cv_c_siocprotoprivate="no" + +fi +rm -f conftest.$ac_objext conftest.$ac_ext + +fi +echo "$as_me:$LINENO: result: $ncp_cv_c_siocprotoprivate" >&5 +echo "${ECHO_T}$ncp_cv_c_siocprotoprivate" >&6 + if test "$ncp_cv_c_siocprotoprivate" = "no" + then + ncp_ipx_defsiocprotoprivate="#if 1 /* SIOCPROTOPRIVATE was not found */" + echo "$as_me:$LINENO: checking for working IPX ioctl values after defining SIOCPROTOPRIVATE" >&5 +echo $ECHO_N "checking for working IPX ioctl values after defining SIOCPROTOPRIVATE... $ECHO_C" >&6 +if test "${ncp_cv_c_ipx_sioc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ncp_ipx_headers_1 +$ncp_ipx_headers_2 +#define SIOCPROTOPRIVATE 0x89E0 +int +main () +{ +SIOCAIPXITFCRT, SIOCAIPXPRISLT, SIOCIPXCFGDATA + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +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); } && + { 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 + ncp_cv_c_ipx_sioc="yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ncp_cv_c_ipx_sioc="no" + +fi +rm -f conftest.$ac_objext conftest.$ac_ext + +fi +echo "$as_me:$LINENO: result: $ncp_cv_c_ipx_sioc" >&5 +echo "${ECHO_T}$ncp_cv_c_ipx_sioc" >&6 + else + ncp_cv_c_ipx_sioc="no" + fi + if test "$ncp_cv_c_ipx_sioc" = "no" + then + ncp_ipx_defsiocaipx="#if 1 /* SIOCAIPX* values were not defined */" + fi + fi +fi + + + + +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 +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (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); } && + { 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.$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 +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + 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.* *.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 + +echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 +echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6 +if test "${ac_cv_header_sys_wait_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#ifndef WEXITSTATUS +# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) +#endif +#ifndef WIFEXITED +# define WIFEXITED(stat_val) (((stat_val) & 255) == 0) +#endif + +int +main () +{ + int s; + wait (&s); + s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +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); } && + { 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_sys_wait_h=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_header_sys_wait_h=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6 +if test $ac_cv_header_sys_wait_h = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SYS_WAIT_H 1 +_ACEOF + +fi + + +if test "${ac_cv_header_sys_mount_h+set}" = set; then + echo "$as_me:$LINENO: checking for sys/mount.h" >&5 +echo $ECHO_N "checking for sys/mount.h... $ECHO_C" >&6 +if test "${ac_cv_header_sys_mount_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_sys_mount_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_mount_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking sys/mount.h usability" >&5 +echo $ECHO_N "checking sys/mount.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (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); } && + { 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.$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 sys/mount.h presence" >&5 +echo $ECHO_N "checking sys/mount.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_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 + 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 in + yes:no ) + { echo "$as_me:$LINENO: WARNING: sys/mount.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: sys/mount.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/mount.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: sys/mount.h: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; + no:yes ) + { echo "$as_me:$LINENO: WARNING: sys/mount.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: sys/mount.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/mount.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: sys/mount.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/mount.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: sys/mount.h: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for sys/mount.h" >&5 +echo $ECHO_N "checking for sys/mount.h... $ECHO_C" >&6 +if test "${ac_cv_header_sys_mount_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_sys_mount_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_sys_mount_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_mount_h" >&6 + +fi + + +if test "$ac_cv_header_sys_mount_h" = "no" +then + if test "$USE_KERNEL" = "1" + then + { echo "$as_me:$LINENO: WARNING: Cannot build kernel support because of no sys/mount.h file" >&5 +echo "$as_me: WARNING: Cannot build kernel support because of no sys/mount.h file" >&2;} + USE_KERNEL=0 + fi + ncp_sys_mount_h="/* sys/mount.h does not exist */" + ncp_linux_fs_h="/* linux/fs.h is not needed */" +else + ncp_sys_mount_h="#include " + echo "$as_me:$LINENO: checking for mount constants in sys/mount.h" >&5 +echo $ECHO_N "checking for mount constants in sys/mount.h... $ECHO_C" >&6 +if test "${ncp_cv_linux_fs_needed+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +mount(0,0,0,MS_RDONLY,0); umount(0) + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +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); } && + { 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 + ncp_cv_linux_fs_needed="yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ncp_cv_linux_fs_needed="no" + +fi +rm -f conftest.$ac_objext conftest.$ac_ext + +fi +echo "$as_me:$LINENO: result: $ncp_cv_linux_fs_needed" >&5 +echo "${ECHO_T}$ncp_cv_linux_fs_needed" >&6 + if test "$ncp_cv_linux_fs_needed" = "yes"; then + ncp_linux_fs_h="/* linux/fs.h not needed */" + else + ncp_linux_fs_h="#include " + fi +fi + + + +if test "${ac_cv_header_net_if_h+set}" = set; then + echo "$as_me:$LINENO: checking for net/if.h" >&5 +echo $ECHO_N "checking for net/if.h... $ECHO_C" >&6 +if test "${ac_cv_header_net_if_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_net_if_h" >&5 +echo "${ECHO_T}$ac_cv_header_net_if_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking net/if.h usability" >&5 +echo $ECHO_N "checking net/if.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (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); } && + { 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.$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 net/if.h presence" >&5 +echo $ECHO_N "checking net/if.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_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 + 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 in + yes:no ) + { echo "$as_me:$LINENO: WARNING: net/if.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: net/if.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: net/if.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: net/if.h: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; + no:yes ) + { echo "$as_me:$LINENO: WARNING: net/if.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: net/if.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: net/if.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: net/if.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: net/if.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: net/if.h: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for net/if.h" >&5 +echo $ECHO_N "checking for net/if.h... $ECHO_C" >&6 +if test "${ac_cv_header_net_if_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_net_if_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_net_if_h" >&5 +echo "${ECHO_T}$ac_cv_header_net_if_h" >&6 + +fi +if test $ac_cv_header_net_if_h = yes; then + ncp_net_if_h="#include " +else + if test "${ac_cv_header_linux_if_h+set}" = set; then + echo "$as_me:$LINENO: checking for linux/if.h" >&5 +echo $ECHO_N "checking for linux/if.h... $ECHO_C" >&6 +if test "${ac_cv_header_linux_if_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_linux_if_h" >&5 +echo "${ECHO_T}$ac_cv_header_linux_if_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking linux/if.h usability" >&5 +echo $ECHO_N "checking linux/if.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (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); } && + { 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.$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 linux/if.h presence" >&5 +echo $ECHO_N "checking linux/if.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_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 + 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 in + yes:no ) + { echo "$as_me:$LINENO: WARNING: linux/if.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: linux/if.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/if.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: linux/if.h: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; + no:yes ) + { echo "$as_me:$LINENO: WARNING: linux/if.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: linux/if.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/if.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: linux/if.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/if.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: linux/if.h: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for linux/if.h" >&5 +echo $ECHO_N "checking for linux/if.h... $ECHO_C" >&6 +if test "${ac_cv_header_linux_if_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_linux_if_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_linux_if_h" >&5 +echo "${ECHO_T}$ac_cv_header_linux_if_h" >&6 + +fi +if test $ac_cv_header_linux_if_h = yes; then + ncp_net_if_h="#include " +else + ncp_net_if_h="/* No interfaces support... */" + +cat >>confdefs.h <<\_ACEOF +#define NO_NET_IF_SUPPORT 1 +_ACEOF + + { echo "$as_me:$LINENO: WARNING: Neither nor does exist" >&5 +echo "$as_me: WARNING: Neither nor does exist" >&2;} + +fi + + + +fi + + + + +if test "${ac_cv_header_net_route_h+set}" = set; then + echo "$as_me:$LINENO: checking for net/route.h" >&5 +echo $ECHO_N "checking for net/route.h... $ECHO_C" >&6 +if test "${ac_cv_header_net_route_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_net_route_h" >&5 +echo "${ECHO_T}$ac_cv_header_net_route_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking net/route.h usability" >&5 +echo $ECHO_N "checking net/route.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (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); } && + { 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.$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 net/route.h presence" >&5 +echo $ECHO_N "checking net/route.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_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 + 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 in + yes:no ) + { echo "$as_me:$LINENO: WARNING: net/route.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: net/route.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: net/route.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: net/route.h: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; + no:yes ) + { echo "$as_me:$LINENO: WARNING: net/route.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: net/route.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: net/route.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: net/route.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: net/route.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: net/route.h: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for net/route.h" >&5 +echo $ECHO_N "checking for net/route.h... $ECHO_C" >&6 +if test "${ac_cv_header_net_route_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_net_route_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_net_route_h" >&5 +echo "${ECHO_T}$ac_cv_header_net_route_h" >&6 + +fi +if test $ac_cv_header_net_route_h = yes; then + ncp_net_route_h="#include " +else + if test "${ac_cv_header_linux_route_h+set}" = set; then + echo "$as_me:$LINENO: checking for linux/route.h" >&5 +echo $ECHO_N "checking for linux/route.h... $ECHO_C" >&6 +if test "${ac_cv_header_linux_route_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_linux_route_h" >&5 +echo "${ECHO_T}$ac_cv_header_linux_route_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking linux/route.h usability" >&5 +echo $ECHO_N "checking linux/route.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (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); } && + { 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.$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 linux/route.h presence" >&5 +echo $ECHO_N "checking linux/route.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_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 + 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 in + yes:no ) + { echo "$as_me:$LINENO: WARNING: linux/route.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: linux/route.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/route.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: linux/route.h: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; + no:yes ) + { echo "$as_me:$LINENO: WARNING: linux/route.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: linux/route.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/route.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: linux/route.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/route.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: linux/route.h: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for linux/route.h" >&5 +echo $ECHO_N "checking for linux/route.h... $ECHO_C" >&6 +if test "${ac_cv_header_linux_route_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_linux_route_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_linux_route_h" >&5 +echo "${ECHO_T}$ac_cv_header_linux_route_h" >&6 + +fi +if test $ac_cv_header_linux_route_h = yes; then + ncp_net_route_h="#include " +else + ncp_net_route_h="/* No route support... */" + +cat >>confdefs.h <<\_ACEOF +#define NO_NET_ROUTE_SUPPORT 1 +_ACEOF + + { { echo "$as_me:$LINENO: error: Neither nor does exist" >&5 +echo "$as_me: error: Neither nor does exist" >&2;} + { (exit 1); exit 1; }; } + +fi + + + +fi + + + + +ncp_if_ether_support="yes" +if test "${ac_cv_header_netinet_if_ether_h+set}" = set; then + echo "$as_me:$LINENO: checking for netinet/if_ether.h" >&5 +echo $ECHO_N "checking for netinet/if_ether.h... $ECHO_C" >&6 +if test "${ac_cv_header_netinet_if_ether_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_netinet_if_ether_h" >&5 +echo "${ECHO_T}$ac_cv_header_netinet_if_ether_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking netinet/if_ether.h usability" >&5 +echo $ECHO_N "checking netinet/if_ether.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (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); } && + { 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.$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 netinet/if_ether.h presence" >&5 +echo $ECHO_N "checking netinet/if_ether.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_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 + 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 in + yes:no ) + { echo "$as_me:$LINENO: WARNING: netinet/if_ether.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: netinet/if_ether.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: netinet/if_ether.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: netinet/if_ether.h: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; + no:yes ) + { echo "$as_me:$LINENO: WARNING: netinet/if_ether.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: netinet/if_ether.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: netinet/if_ether.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: netinet/if_ether.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: netinet/if_ether.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: netinet/if_ether.h: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for netinet/if_ether.h" >&5 +echo $ECHO_N "checking for netinet/if_ether.h... $ECHO_C" >&6 +if test "${ac_cv_header_netinet_if_ether_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_netinet_if_ether_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_netinet_if_ether_h" >&5 +echo "${ECHO_T}$ac_cv_header_netinet_if_ether_h" >&6 + +fi + + +if test "$ac_cv_header_netinet_if_ether_h" = "no" +then + if test "${ac_cv_header_linux_if_ether_h+set}" = set; then + echo "$as_me:$LINENO: checking for linux/if_ether.h" >&5 +echo $ECHO_N "checking for linux/if_ether.h... $ECHO_C" >&6 +if test "${ac_cv_header_linux_if_ether_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_linux_if_ether_h" >&5 +echo "${ECHO_T}$ac_cv_header_linux_if_ether_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking linux/if_ether.h usability" >&5 +echo $ECHO_N "checking linux/if_ether.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (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); } && + { 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.$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 linux/if_ether.h presence" >&5 +echo $ECHO_N "checking linux/if_ether.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_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 + 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 in + yes:no ) + { echo "$as_me:$LINENO: WARNING: linux/if_ether.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: linux/if_ether.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/if_ether.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: linux/if_ether.h: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; + no:yes ) + { echo "$as_me:$LINENO: WARNING: linux/if_ether.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: linux/if_ether.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/if_ether.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: linux/if_ether.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: linux/if_ether.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: linux/if_ether.h: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for linux/if_ether.h" >&5 +echo $ECHO_N "checking for linux/if_ether.h... $ECHO_C" >&6 +if test "${ac_cv_header_linux_if_ether_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_linux_if_ether_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_linux_if_ether_h" >&5 +echo "${ECHO_T}$ac_cv_header_linux_if_ether_h" >&6 + +fi + + + if test "$ac_cv_header_linux_if_ether_h" = "no" + then + ncp_if_ether_support="no" + fi +fi + + +if test "${ac_cv_header_sys_select_h+set}" = set; then + echo "$as_me:$LINENO: checking for sys/select.h" >&5 +echo $ECHO_N "checking for sys/select.h... $ECHO_C" >&6 +if test "${ac_cv_header_sys_select_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_sys_select_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_select_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking sys/select.h usability" >&5 +echo $ECHO_N "checking sys/select.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (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); } && + { 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.$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 sys/select.h presence" >&5 +echo $ECHO_N "checking sys/select.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_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 + 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 in + yes:no ) + { echo "$as_me:$LINENO: WARNING: sys/select.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: sys/select.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/select.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: sys/select.h: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; + no:yes ) + { echo "$as_me:$LINENO: WARNING: sys/select.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: sys/select.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/select.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: sys/select.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: sys/select.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: sys/select.h: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for sys/select.h" >&5 +echo $ECHO_N "checking for sys/select.h... $ECHO_C" >&6 +if test "${ac_cv_header_sys_select_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_sys_select_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_sys_select_h" >&5 +echo "${ECHO_T}$ac_cv_header_sys_select_h" >&6 + +fi +if test $ac_cv_header_sys_select_h = yes; then + ncp_sys_select_h="#include " +else + ncp_sys_select_h="#include " + +fi + + + + +echo "$as_me:$LINENO: checking for C9X integer types" >&5 +echo $ECHO_N "checking for C9X integer types... $ECHO_C" >&6 +if test "${ncp_cv_c9x_stdint+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +int_least16_t sl16; +int_least32_t sl32; +uint_least16_t ul16; +uint_least32_t ul32; +int_fast16_t sf16; +int_fast32_t sf32; +uint_fast16_t uf16; +uint_fast32_t uf32 + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +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); } && + { 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 + ncp_cv_c9x_stdint="yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ncp_cv_c9x_stdint="no" + +fi +rm -f conftest.$ac_objext conftest.$ac_ext + +fi +echo "$as_me:$LINENO: result: $ncp_cv_c9x_stdint" >&5 +echo "${ECHO_T}$ncp_cv_c9x_stdint" >&6 +if test "$ncp_cv_c9x_stdint" = "yes" +then + stdint_types="1" +else + stdint_types="0" +fi + + +if test "$USE_KERNEL" = "1" +then + if test "$ncp_sys_select_h" = "#include " + then + echo "$as_me:$LINENO: checking whether sys/select.h and linux/posix_types.h may both be included" >&5 +echo $ECHO_N "checking whether sys/select.h and linux/posix_types.h may both be included... $ECHO_C" >&6 +if test "${ncp_cv_posix_and_select+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +int +main () +{ +fd_set a; +select(0, &a, &a, &a, 0) + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +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); } && + { 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 + ncp_cv_posix_and_select="yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ncp_cv_posix_and_select="no" + +fi +rm -f conftest.$ac_objext conftest.$ac_ext + +fi +echo "$as_me:$LINENO: result: $ncp_cv_posix_and_select" >&5 +echo "${ECHO_T}$ncp_cv_posix_and_select" >&6 + else + ncp_cv_posix_and_select="yes" + fi + if test "$ncp_cv_posix_and_select" = "no" + then + { echo "$as_me:$LINENO: WARNING: sys/select.h and linux/posix_types.h cannot be included together, will not build kernel support" >&5 +echo "$as_me: WARNING: sys/select.h and linux/posix_types.h cannot be included together, will not build kernel support" >&2;} + USE_KERNEL=0 + fi +fi + +echo "$as_me:$LINENO: checking for third parameter to accept" >&5 +echo $ECHO_N "checking for third parameter to accept... $ECHO_C" >&6 +if test "${ncp_cv_socklen_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +socklen_t a; + accept(0, NULL, &a) + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +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); } && + { 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 + ncp_cv_socklen_t="socklen_t" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +int a; + accept(0, NULL, &a) + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +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); } && + { 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 + ncp_cv_socklen_t="int" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ncp_cv_socklen_t="unsigned int" + +fi +rm -f conftest.$ac_objext conftest.$ac_ext + +fi +rm -f conftest.$ac_objext conftest.$ac_ext + +fi +echo "$as_me:$LINENO: result: $ncp_cv_socklen_t" >&5 +echo "${ECHO_T}$ncp_cv_socklen_t" >&6 +if test "$ncp_cv_socklen_t" = "socklen_t" +then + socklen_t="/* socklen_t is defined by libc */" +else + socklen_t="typedef $ncp_cv_socklen_t socklen_t;" +fi + + +echo "$as_me:$LINENO: checking for wchar_t" >&5 +echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6 +if test "${ac_cv_type_wchar_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if ((wchar_t *) 0) + return 0; +if (sizeof (wchar_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +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); } && + { 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_type_wchar_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_wchar_t=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5 +echo "${ECHO_T}$ac_cv_type_wchar_t" >&6 +if test $ac_cv_type_wchar_t = yes; then + : +else + +cat >>confdefs.h <<\_ACEOF +#define wchar_t unsigned int +_ACEOF + +fi + + + +for ac_header in wchar.h iconv.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 +#line $LINENO "configure" +/* 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>&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.$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 +#line $LINENO "configure" +/* 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 + 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 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 preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; + 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: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if 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 + +if test "$ac_cv_header_wchar_h" = "yes" +then + wchar_h="#include " +else + wchar_h="/* no wchar_h header... */" +fi + + +if test "$ac_cv_header_iconv_h" = "yes" +then + + + + + + am_save_CPPFLAGS="$CPPFLAGS" + + for element in $INCICONV; do + haveit= + for x in $CPPFLAGS; do + + acl_save_prefix="$prefix" + prefix="$acl_final_prefix" + acl_save_exec_prefix="$exec_prefix" + exec_prefix="$acl_final_exec_prefix" + eval x=\"$x\" + exec_prefix="$acl_save_exec_prefix" + prefix="$acl_save_prefix" + + if test "X$x" = "X$element"; then + haveit=yes + break + fi + done + if test -z "$haveit"; then + CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" + fi + done + + + echo "$as_me:$LINENO: checking for iconv" >&5 +echo $ECHO_N "checking for iconv... $ECHO_C" >&6 +if test "${am_cv_func_iconv+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + am_cv_func_iconv="no, consider installing GNU libiconv" + am_cv_lib_iconv=no + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +int +main () +{ +iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (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='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 + am_cv_func_iconv=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + if test "$am_cv_func_iconv" != yes; then + am_save_LIBS="$LIBS" + LIBS="$LIBS $LIBICONV" + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +int +main () +{ +iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (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='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 + am_cv_lib_iconv=yes + am_cv_func_iconv=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + LIBS="$am_save_LIBS" + fi + +fi +echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5 +echo "${ECHO_T}$am_cv_func_iconv" >&6 + if test "$am_cv_func_iconv" = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ICONV 1 +_ACEOF + + fi + if test "$am_cv_lib_iconv" = yes; then + echo "$as_me:$LINENO: checking how to link with libiconv" >&5 +echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6 + echo "$as_me:$LINENO: result: $LIBICONV" >&5 +echo "${ECHO_T}$LIBICONV" >&6 + else + CPPFLAGS="$am_save_CPPFLAGS" + LIBICONV= + LTLIBICONV= + fi + + + + if test "$am_cv_func_iconv" = yes; then + echo "$as_me:$LINENO: checking for iconv declaration" >&5 +echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6 + if test "${am_cv_proto_iconv+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include +extern +#ifdef __cplusplus +"C" +#endif +#if defined(__STDC__) || defined(__cplusplus) +size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); +#else +size_t iconv(); +#endif + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (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); } && + { 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 + am_cv_proto_iconv_arg1="" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +am_cv_proto_iconv_arg1="const" +fi +rm -f conftest.$ac_objext conftest.$ac_ext + am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);" +fi + + am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` + echo "$as_me:$LINENO: result: ${ac_t:- + }$am_cv_proto_iconv" >&5 +echo "${ECHO_T}${ac_t:- + }$am_cv_proto_iconv" >&6 + +cat >>confdefs.h <<_ACEOF +#define ICONV_CONST $am_cv_proto_iconv_arg1 +_ACEOF + + fi + +fi + + +echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 +echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 +if test "${ac_cv_c_const+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* 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>&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.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 +echo "${ECHO_T}$ac_cv_c_const" >&6 +if test $ac_cv_c_const = no; then + +cat >>confdefs.h <<\_ACEOF +#define const +_ACEOF + +fi + +echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5 +echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6 +if test "${ac_cv_type_uid_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "uid_t" >/dev/null 2>&1; then + ac_cv_type_uid_t=yes +else + ac_cv_type_uid_t=no +fi +rm -f conftest* + +fi +echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5 +echo "${ECHO_T}$ac_cv_type_uid_t" >&6 +if test $ac_cv_type_uid_t = no; then + +cat >>confdefs.h <<\_ACEOF +#define uid_t int +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define gid_t int +_ACEOF + +fi + +echo "$as_me:$LINENO: checking for inline" >&5 +echo $ECHO_N "checking for inline... $ECHO_C" >&6 +if test "${ac_cv_c_inline+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_c_inline=no +for ac_kw in inline __inline__ __inline; do + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifndef __cplusplus +typedef int foo_t; +static $ac_kw foo_t static_foo () {return 0; } +$ac_kw foo_t foo () {return 0; } +#endif + +_ACEOF +rm -f conftest.$ac_objext +if { (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); } && + { 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_inline=$ac_kw; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.$ac_objext conftest.$ac_ext +done + +fi +echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 +echo "${ECHO_T}$ac_cv_c_inline" >&6 +case $ac_cv_c_inline in + inline | yes) ;; + no) +cat >>confdefs.h <<\_ACEOF +#define inline +_ACEOF + ;; + *) cat >>confdefs.h <<_ACEOF +#define inline $ac_cv_c_inline +_ACEOF + ;; +esac + +echo "$as_me:$LINENO: checking for mode_t" >&5 +echo $ECHO_N "checking for mode_t... $ECHO_C" >&6 +if test "${ac_cv_type_mode_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if ((mode_t *) 0) + return 0; +if (sizeof (mode_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +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); } && + { 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_type_mode_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_mode_t=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5 +echo "${ECHO_T}$ac_cv_type_mode_t" >&6 +if test $ac_cv_type_mode_t = yes; then + : +else + +cat >>confdefs.h <<_ACEOF +#define mode_t int +_ACEOF + +fi + +echo "$as_me:$LINENO: checking for off_t" >&5 +echo $ECHO_N "checking for off_t... $ECHO_C" >&6 +if test "${ac_cv_type_off_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if ((off_t *) 0) + return 0; +if (sizeof (off_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +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); } && + { 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_type_off_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_off_t=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 +echo "${ECHO_T}$ac_cv_type_off_t" >&6 +if test $ac_cv_type_off_t = yes; then + : +else + +cat >>confdefs.h <<_ACEOF +#define off_t long +_ACEOF + +fi + +echo "$as_me:$LINENO: checking for pid_t" >&5 +echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 +if test "${ac_cv_type_pid_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if ((pid_t *) 0) + return 0; +if (sizeof (pid_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +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); } && + { 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_type_pid_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_pid_t=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 +echo "${ECHO_T}$ac_cv_type_pid_t" >&6 +if test $ac_cv_type_pid_t = yes; then + : +else + +cat >>confdefs.h <<_ACEOF +#define pid_t int +_ACEOF + +fi + +echo "$as_me:$LINENO: checking for size_t" >&5 +echo $ECHO_N "checking for size_t... $ECHO_C" >&6 +if test "${ac_cv_type_size_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if ((size_t *) 0) + return 0; +if (sizeof (size_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +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); } && + { 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_type_size_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_size_t=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 +echo "${ECHO_T}$ac_cv_type_size_t" >&6 +if test $ac_cv_type_size_t = yes; then + : +else + +cat >>confdefs.h <<_ACEOF +#define size_t unsigned +_ACEOF + +fi + +echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 +echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 +if test "${ac_cv_header_time+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include + +int +main () +{ +if ((struct tm *) 0) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (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); } && + { 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_time=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_header_time=no +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 +echo "${ECHO_T}$ac_cv_header_time" >&6 +if test $ac_cv_header_time = yes; then + +cat >>confdefs.h <<\_ACEOF +#define TIME_WITH_SYS_TIME 1 +_ACEOF + +fi + +echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 +echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6 +if test "${ac_cv_struct_tm+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include + +int +main () +{ +struct tm *tp; tp->tm_sec; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +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); } && + { 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_struct_tm=time.h +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_struct_tm=sys/time.h +fi +rm -f conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 +echo "${ECHO_T}$ac_cv_struct_tm" >&6 +if test $ac_cv_struct_tm = sys/time.h; then + +cat >>confdefs.h <<\_ACEOF +#define TM_IN_SYS_TIME 1 +_ACEOF + +fi + + +if test $ac_cv_c_compiler_gnu = yes; then + echo "$as_me:$LINENO: checking whether $CC needs -traditional" >&5 +echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6 +if test "${ac_cv_prog_gcc_traditional+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_pattern="Autoconf.*'x'" + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +Autoconf TIOCGETP +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "$ac_pattern" >/dev/null 2>&1; then + ac_cv_prog_gcc_traditional=yes +else + ac_cv_prog_gcc_traditional=no +fi +rm -f conftest* + + + if test $ac_cv_prog_gcc_traditional = no; then + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +Autoconf TCGETA +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "$ac_pattern" >/dev/null 2>&1; then + ac_cv_prog_gcc_traditional=yes +fi +rm -f conftest* + + fi +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_traditional" >&5 +echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6 + if test $ac_cv_prog_gcc_traditional = yes; then + CC="$CC -traditional" + fi +fi + + + + + + + + + +for ac_func in wcslen wcscpy wcsdup wcscmp wcsncmp wcscasecmp wcsncasecmp wcsrev +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ +#ifdef __STDC__ +# include +#else +# include +#endif +/* 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 $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext 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='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 + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + +if test "$PAM" = "1" +then + if test "${ac_cv_header_security_pam_appl_h+set}" = set; then + echo "$as_me:$LINENO: checking for security/pam_appl.h" >&5 +echo $ECHO_N "checking for security/pam_appl.h... $ECHO_C" >&6 +if test "${ac_cv_header_security_pam_appl_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_security_pam_appl_h" >&5 +echo "${ECHO_T}$ac_cv_header_security_pam_appl_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking security/pam_appl.h usability" >&5 +echo $ECHO_N "checking security/pam_appl.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (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); } && + { 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.$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 security/pam_appl.h presence" >&5 +echo $ECHO_N "checking security/pam_appl.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_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 + 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 in + yes:no ) + { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: security/pam_appl.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: security/pam_appl.h: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; + no:yes ) + { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: security/pam_appl.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: security/pam_appl.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: security/pam_appl.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: security/pam_appl.h: proceeding with the preprocessor's result" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------ ## +## Report this to bug-autoconf@gnu.org. ## +## ------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for security/pam_appl.h" >&5 +echo $ECHO_N "checking for security/pam_appl.h... $ECHO_C" >&6 +if test "${ac_cv_header_security_pam_appl_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_security_pam_appl_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_security_pam_appl_h" >&5 +echo "${ECHO_T}$ac_cv_header_security_pam_appl_h" >&6 + +fi + + + if test "$ac_cv_header_security_pam_appl_h" = "yes" ; then + if test "$pam_path_forced" = ""; then + echo "$as_me:$LINENO: checking for pam modules directory" >&5 +echo $ECHO_N "checking for pam modules directory... $ECHO_C" >&6 +if test "${ncp_cv_pam_directory+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -d /lib/security ; then + ncp_cv_pam_directory=/lib/security + else if test -d /usr/lib/security ; then + ncp_cv_pam_directory=/usr/lib/security + else if test -d /usr/local/lib/security ; then + ncp_cv_pam_directory=/usr/local/lib/security + else + ncp_cv_pam_directory=/lib/security + fi; fi; fi + +fi +echo "$as_me:$LINENO: result: $ncp_cv_pam_directory" >&5 +echo "${ECHO_T}$ncp_cv_pam_directory" >&6 + else + ncp_cv_pam_directory="$pam_path_forced" + fi + LIB_PAM_SECURITY=$ncp_cv_pam_directory + + + ADDON_DEV_SUBDIRS="$ADDON_DEV_SUBDIRS contrib/pam" + else + if test "$pam_forced" = "yes" + then + { { echo "$as_me:$LINENO: error: Cannot build PAM module because of PAM headers are not installed" >&5 +echo "$as_me: error: Cannot build PAM module because of PAM headers are not installed" >&2;} + { (exit 1); exit 1; }; } + fi + PAM=0 + fi +fi + +if test "$PHP" = "yes" +then + php_path_config="$php_path_forced" + if test "$php_path_config" = "" + then + php_path_config=php-config + fi + case "$php_path_config" in + /*) echo "$as_me:$LINENO: checking for $php_path_config" >&5 +echo $ECHO_N "checking for $php_path_config... $ECHO_C" >&6 + if test -r "$php_path_config" + then + php_found=yes + else + php_found=no + fi + echo "$as_me:$LINENO: result: $php_found" >&5 +echo "${ECHO_T}$php_found" >&6 + ;; + *) # Extract the first word of "$php_path_config", so it can be a program name with args. +set dummy $php_path_config; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_php_found+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$php_found"; then + ac_cv_prog_php_found="$php_found" # 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_php_found="yes" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_php_found" && ac_cv_prog_php_found="no" +fi +fi +php_found=$ac_cv_prog_php_found +if test -n "$php_found"; then + echo "$as_me:$LINENO: result: $php_found" >&5 +echo "${ECHO_T}$php_found" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + ;; + esac + if test "$php_found" = "yes" + then + ADDON_SUBDIRS="$ADDON_SUBDIRS contrib/php" + else + if test "$php_forced" = "yes" + then + { { echo "$as_me:$LINENO: error: Cannot build PHP module because of $php_path_config is not available" >&5 +echo "$as_me: error: Cannot build PHP module because of $php_path_config is not available" >&2;} + { (exit 1); exit 1; }; } + fi + php_path_config="" + fi +fi + +if test "$NDS_SUPPORT" = "1" +then + echo "$as_me:$LINENO: checking for mpilib word size" >&5 +echo $ECHO_N "checking for mpilib word size... $ECHO_C" >&6 +if test "${ncp_cv_mpilib_unit+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case "$host_cpu" in + i?86|ia32) ncp_cv_mpilib_unit="32";; + *) ncp_cv_mpilib_unit="8"; + esac + +fi +echo "$as_me:$LINENO: result: $ncp_cv_mpilib_unit" >&5 +echo "${ECHO_T}$ncp_cv_mpilib_unit" >&6 + +cat >>confdefs.h <<_ACEOF +#define UNITSIZE $ncp_cv_mpilib_unit +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define MULTUNITSIZE $ncp_cv_mpilib_unit +_ACEOF + +fi + +if test "$REENTRANT" != "0" +then + echo "$as_me:$LINENO: checking for working pthread support" >&5 +echo $ECHO_N "checking for working pthread support... $ECHO_C" >&6 +if test "${ncp_cv_pthread+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +int +main () +{ +pthread_mutex_t a; + pthread_once_t b; + pthread_mutex_init(&a, NULL); + pthread_mutex_lock(&a); + pthread_mutex_unlock(&a); + pthread_mutex_destroy(&a) + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +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); } && + { 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 + ncp_cv_pthread="yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ncp_cv_pthread="no" + +fi +rm -f conftest.$ac_objext conftest.$ac_ext + if test "$ncp_cv_pthread" = "no" + then + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#define _MIT_POSIX_THREADS 1 +#include +#include +int +main () +{ +pthread_mutex_t a; + pthread_once_t b; + pthread_mutex_init(&a, NULL); + pthread_mutex_lock(&a); + pthread_mutex_unlock(&a); + pthread_mutex_destroy(&a) + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +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); } && + { 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 + ncp_cv_pthread="MIT Posix threads needed" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ncp_cv_pthread="no" + +fi +rm -f conftest.$ac_objext conftest.$ac_ext + fi + +fi +echo "$as_me:$LINENO: result: $ncp_cv_pthread" >&5 +echo "${ECHO_T}$ncp_cv_pthread" >&6 + case "$ncp_cv_pthread" in +no) if test "$reentrant_forced" = "yes" + then + { { echo "$as_me:$LINENO: error: Cannot build threading libraries without working pthread support" >&5 +echo "$as_me: error: Cannot build threading libraries without working pthread support" >&2;} + { (exit 1); exit 1; }; } + fi + REENTRANT=0 + ;; +MIT*) +cat >>confdefs.h <<\_ACEOF +#define _MIT_POSIX_THREADS 1 +_ACEOF + + ;; + esac +fi +if test "$REENTRANT" != "0" +then + echo "$as_me:$LINENO: checking for working weak symbols" >&5 +echo $ECHO_N "checking for working weak symbols... $ECHO_C" >&6 +if test "${ncp_cv_weak_symbols+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#pragma weak pthread_mutex_lock +int +main () +{ +pthread_mutex_t a; + pthread_mutex_lock(&a) + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext 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='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 + ncp_cv_weak_symbols="yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ncp_cv_weak_symbols="no" + +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + +fi +echo "$as_me:$LINENO: result: $ncp_cv_weak_symbols" >&5 +echo "${ECHO_T}$ncp_cv_weak_symbols" >&6 + if test "$ncp_cv_weak_symbols" = "no" + then + if test "$reentrant_forced" = "yes" + then + { { echo "$as_me:$LINENO: error: Cannot build threading libraries without working weak imports" >&5 +echo "$as_me: error: Cannot build threading libraries without working weak imports" >&2;} + { (exit 1); exit 1; }; } + fi + REENTRANT=0 + fi +fi +if test "$REENTRANT" = "0" +then + REENTRANT_CFLAGS="" + + ncphost=none + ncphosttested=yes +else + REENTRANT_CFLAGS="-D_REENTRANT" + + ncphost=generic + ncphosttested=yes + case "$host" in +1750a-*) ;; +580-*) ;; +cjt90-*) ;; +a29k-*) ;; +alpha-*) ncphost=alpha; ncphosttested=no ;; +alphaev56-*) ncphost=alpha; ncphosttested=no ;; +alphaev678-*) ncphost=alpha; ncphosttested=no ;; +alphaev4-8-*) ncphost=alpha; ncphosttested=no ;; +alphapca567-*) ncphost=alpha; ncphosttested=no ;; +arc-*) ;; +arm-*) ;; +armbe-*) ;; +armle-*) ;; +armv*-*) ;; +avr-*) ;; +bs2000-*) ;; +c30-*) ;; +c4x-*) ;; +c54x-*) ;; +c123*) ;; +clipper-*) ;; +cray2-*) ;; +cris-*) ;; +cydra-*) ;; +d10v-*) ;; +d30v-*) ;; +dsp16xx-*) ;; +elxsi-*) ;; +f3001-*) ;; +f700-*) ;; +fr30-*) ;; +fx80-*) ;; +h8300-*) ;; +h8500-*) ;; +hppa-*) ;; +hppa1.0-*) ;; +hppa1.1-*) ;; +hppa2.0-*) ;; +hppa2.0n-*) ;; +hppa2.0w-*) ;; +hppa64-*) ;; +i*86-*) ncphost=i386; ncphosttested=yes ;; +i370-*) ;; +i860-*) ;; +i960-*) ;; +ia64-*) ;; +m32r-*) ;; +m5200-*) ;; +m6800123460-*) ncphost=m68k; ncphosttested=no ;; +m68112-*) ;; +m68360-*) ;; +m683?2-*) ;; +m68hc112-*) ;; +m68k-*) ncphost=m68k; ncphosttested=no ;; +m88110-*) ;; +m88k-*) ;; +mcore-*) ;; +mips-*) ncphost=mips; ncphosttested=no ;; +mips16-*) ;; +mips64*-*) ncphost=mips64; ncphosttested=no ;; +mipsbe-*) ncphost=mips; ncphosttested=no ;; +mipsel-*) ncphost=mips; ncphosttested=no ;; +mipsle-*) ncphost=mips; ncphosttested=no ;; +mipstx39-*) ;; +mipstx39el-*) ;; +mmix-*) ;; +mn102300-*) ;; +none-*) ;; +np1-*) ;; +ns16k-*) ;; +ns32k-*) ;; +nsr-*) ;; +openrisc-*) ;; +orion-*) ;; +pdp10-*) ;; +pdp11-*) ;; +pj-*) ;; +pjl-*) ;; +pn-*) ;; +power-*) ;; +powerpc-*) ncphost=ppc; ncphosttested=no ;; +powerpcle-*) ncphost=ppc; ncphosttested=no ;; +ppcbe-*) ;; +pyramid-*) ;; +romp-*) ;; +rs6000-*) ;; +s390-*) ;; +s390x-*) ;; +sh-*) ;; +sh34-*) ;; +sh34eb-*) ;; +shbe-*) ;; +shle-*) ;; +sparc-*) ;; +sparc64-*) ;; +sparc86x-*) ;; +sparclet-*) ;; +sparclite-*) ;; +sparcv9-*) ;; +sparcv9b-*) ;; +spur-*) ;; +strongarm-*) ;; +sv1-*) ;; +t3e-*) ;; +tahoe-*) ;; +thumb-*) ;; +tic30-*) ;; +tic54x-*) ;; +tic80-*) ;; +tron-*) ;; +v70-*) ;; +v810-*) ;; +v850-*) ;; +vax-*) ;; +w65-*) ;; +we32k-*) ;; +x86-*) ncphost=i386; ncphosttested=yes ;; +x86_64-*) ;; +xmp-*) ;; +xps100-*) ;; +xscale-*) ;; +ymp-*) ;; +z8k-*) ;; +esac + echo "$as_me:$LINENO: checking for working atomic operations" >&5 +echo $ECHO_N "checking for working atomic operations... $ECHO_C" >&6 +if test "${ncp_cv_asm_atomic_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$ncp_cv_asm_atomic_h" = "generic" + then + ncp_cv_asm_atomic_h="pthread based" + else + cat >conftest.$ac_ext <<_ACEOF +#line $LINENO "configure" +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include "include/private/asm-$ncphost/atomic.h" +int +main () +{ +ncpt_atomic_t a; + ncpt_atomic_set(&a,2); + ncpt_atomic_dec(&a); + if (ncpt_atomic_read(&a)) { + if (!ncpt_atomic_dec_and_test(&a)) { + ncpt_atomic_inc(&a); + } + } + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext 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='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 + ncp_cv_asm_atomic_h="optimized" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ncp_cv_asm_atomic_h="falling back to pthread based" + ncphost=generic + ncphosttested=yes + + +fi +rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext + fi + +fi +echo "$as_me:$LINENO: result: $ncp_cv_asm_atomic_h" >&5 +echo "${ECHO_T}$ncp_cv_asm_atomic_h" >&6 + if test "$ncp_cv_asm_atomic_h" = "falling back to pthread based" + then + ncphost=generic + ncphosttested=yes + fi +fi + + + +echo "$as_me:$LINENO: checking for ELF target" >&5 +echo $ECHO_N "checking for ELF target... $ECHO_C" >&6 +if test "${ncp_cv_elf_target+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ncp_cv_elf_target=no + cat >conftest.c </dev/null 2>&1 + then + (file conftest | grep ELF >/dev/null 2>&1) && ncp_cv_elf_target=yes + fi + rm -f conftest* + + +fi +echo "$as_me:$LINENO: result: $ncp_cv_elf_target" >&5 +echo "${ECHO_T}$ncp_cv_elf_target" >&6 +ELF_TARGET="$ncp_cv_elf_target" + + +FFUNCTION_SECTIONS="" +GC_SECTIONS="" +if test "$function_sections" = "yes" +then + echo "$as_me:$LINENO: checking for function sections" >&5 +echo $ECHO_N "checking for function sections... $ECHO_C" >&6 +if test "${ncp_cv_function_sections+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ncp_cv_function_sections=no + cat >conftest.c </dev/null 2>&1 + then + ncp_cv_function_sections=yes + fi + rm -f conftest* + + +fi +echo "$as_me:$LINENO: result: $ncp_cv_function_sections" >&5 +echo "${ECHO_T}$ncp_cv_function_sections" >&6 + if test "$ncp_cv_function_sections" = "no" + then + if test "$function_sections_forced" = "yes" + then + { { echo "$as_me:$LINENO: error: Your compiler does not support -ffunction-sections or -fdata-sections or your linker does not support --gc-sections. Please reconfigure without --enable-function-sections." >&5 +echo "$as_me: error: Your compiler does not support -ffunction-sections or -fdata-sections or your linker does not support --gc-sections. Please reconfigure without --enable-function-sections." >&2;} + { (exit 1); exit 1; }; } + fi + fi + function_sections="$ncp_cv_function_sections" +fi +if test "$function_sections" = "yes" +then + FFUNCTION_SECTIONS="-ffunction-sections -fdata-sections " + GC_SECTIONS="-Wl,--gc-sections " +fi + +if test "$VERSIONED_LINK" = "yes" +then + echo "$as_me:$LINENO: checking for working versioned link" >&5 +echo $ECHO_N "checking for working versioned link... $ECHO_C" >&6 +if test "${ncp_cv_versioned_link+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ncp_cv_versioned_link=no + cat >conftest.vers <conftest.c </dev/null 2>&1 + then + ncp_cv_versioned_link=yes + fi + +fi +echo "$as_me:$LINENO: result: $ncp_cv_versioned_link" >&5 +echo "${ECHO_T}$ncp_cv_versioned_link" >&6 + rm -f conftest.c conftest.vers conftest.so + if test "$ncp_cv_versioned_link" = "no" + then + if test "$versions_forced" = "yes" + then + { { echo "$as_me:$LINENO: error: Cannot use versioned symbols in your environment" >&5 +echo "$as_me: error: Cannot use versioned symbols in your environment" >&2;} + { (exit 1); exit 1; }; } + fi + VERSIONED_LINK=no + fi +fi + + +if test "$USE_KERNEL" = "0" +then + MOUNT2=0 + MOUNT3=0 +else + +cat >>confdefs.h <<\_ACEOF +#define USE_KERNEL 1 +_ACEOF + +fi +if test "$MOUNT2" = "1" +then + +cat >>confdefs.h <<\_ACEOF +#define MOUNT2 1 +_ACEOF + +fi +if test "$MOUNT3" = "1" +then + +cat >>confdefs.h <<\_ACEOF +#define MOUNT3 1 +_ACEOF + +fi +if test "$PROTOCOL_IP" = "0" +then + ncp_in_support="#undef NCP_IN_SUPPORT" +else + ncp_in_support="#define NCP_IN_SUPPORT" +fi +if test "$PROTOCOL_IPX" = "0" +then + ncp_ipx_support="#undef NCP_IPX_SUPPORT" +else + ncp_ipx_support="#define NCP_IPX_SUPPORT" +fi + + + +ADDON_SUBDIRS="$ADDON_SUBDIRS $ADDON_DEV_SUBDIRS" + + + + + + + + + + + + ac_config_files="$ac_config_files Make.rules Makefile lib/Makefile man/Makefile util/Makefile sutil/Makefile ipx-1.0/Makefile ipx-1.0/Samples/Makefile ipxdump/Makefile contrib/tknwmsg/Makefile contrib/testing/Makefile contrib/testing/pp/Makefile contrib/tcl-utils/Makefile contrib/tests/Makefile intl/Makefile po/Makefile.in contrib/pam/Makefile contrib/php/Makefile.in" + + ac_config_files="$ac_config_files include/private/libncp-atomic.h.tmp:include/private/libncp-atomic.h.in include/ncp/nwnet.h.tmp:include/ncp/nwnet.h.in include/ncp/ext/stdint.h.tmp:include/ncp/ext/stdint.h.in include/ncp/ext/socket.h.tmp:include/ncp/ext/socket.h.in include/ncp/kernel/fs.h.tmp:include/ncp/kernel/fs.h.in include/ncp/kernel/if.h.tmp:include/ncp/kernel/if.h.in include/ncp/kernel/ipx.h.tmp:include/ncp/kernel/ipx.h.in include/ncp/kernel/route.h.tmp:include/ncp/kernel/route.h.in include/ncp/kernel/types.h.tmp:include/ncp/kernel/types.h.in" + +if test "$php_path_config" != "" +then + if test "$with_php_config" = "yes" + then + { { echo "$as_me:$LINENO: error: Current PHP configure does not handle --with-php-config correctly. Use --with-php-config=php-config instead." >&5 +echo "$as_me: error: Current PHP configure does not handle --with-php-config correctly. Use --with-php-config=php-config instead." >&2;} + { (exit 1); exit 1; }; } + fi + + +subdirs="$subdirs contrib/php" + +fi +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 + + + +: ${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 + +# Support unset when possible. +if (FOO=FOO; unset FOO) >/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 -n "`(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 + as_mkdir_p=false +fi + +as_executable_p="test -f" + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="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="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 ncpfs $as_me 2.2.1, which was +generated by GNU Autoconf 2.57. 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 ." +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF +ac_cs_version="\\ +ncpfs config.status 2.2.1 +configured by $0, generated by GNU Autoconf 2.57, + with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" + +Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 +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. +# + +# Capture the value of obsolete ALL_LINGUAS because we need it to compute + # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it + # from automake. + eval 'ALL_LINGUAS''="$ALL_LINGUAS"' + # Capture the value of LINGUAS because we need it to compute CATALOGS. + LINGUAS="${LINGUAS-%UNSET%}" + + +_ACEOF + + + +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_config_target in $ac_config_targets +do + case "$ac_config_target" in + # Handling of arguments. + "Make.rules" ) CONFIG_FILES="$CONFIG_FILES Make.rules" ;; + "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "lib/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; + "man/Makefile" ) CONFIG_FILES="$CONFIG_FILES man/Makefile" ;; + "util/Makefile" ) CONFIG_FILES="$CONFIG_FILES util/Makefile" ;; + "sutil/Makefile" ) CONFIG_FILES="$CONFIG_FILES sutil/Makefile" ;; + "ipx-1.0/Makefile" ) CONFIG_FILES="$CONFIG_FILES ipx-1.0/Makefile" ;; + "ipx-1.0/Samples/Makefile" ) CONFIG_FILES="$CONFIG_FILES ipx-1.0/Samples/Makefile" ;; + "ipxdump/Makefile" ) CONFIG_FILES="$CONFIG_FILES ipxdump/Makefile" ;; + "contrib/tknwmsg/Makefile" ) CONFIG_FILES="$CONFIG_FILES contrib/tknwmsg/Makefile" ;; + "contrib/testing/Makefile" ) CONFIG_FILES="$CONFIG_FILES contrib/testing/Makefile" ;; + "contrib/testing/pp/Makefile" ) CONFIG_FILES="$CONFIG_FILES contrib/testing/pp/Makefile" ;; + "contrib/tcl-utils/Makefile" ) CONFIG_FILES="$CONFIG_FILES contrib/tcl-utils/Makefile" ;; + "contrib/tests/Makefile" ) CONFIG_FILES="$CONFIG_FILES contrib/tests/Makefile" ;; + "intl/Makefile" ) CONFIG_FILES="$CONFIG_FILES intl/Makefile" ;; + "po/Makefile.in" ) CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; + "contrib/pam/Makefile" ) CONFIG_FILES="$CONFIG_FILES contrib/pam/Makefile" ;; + "contrib/php/Makefile.in" ) CONFIG_FILES="$CONFIG_FILES contrib/php/Makefile.in" ;; + "include/private/libncp-atomic.h.tmp" ) CONFIG_FILES="$CONFIG_FILES include/private/libncp-atomic.h.tmp:include/private/libncp-atomic.h.in" ;; + "include/ncp/nwnet.h.tmp" ) CONFIG_FILES="$CONFIG_FILES include/ncp/nwnet.h.tmp:include/ncp/nwnet.h.in" ;; + "include/ncp/ext/stdint.h.tmp" ) CONFIG_FILES="$CONFIG_FILES include/ncp/ext/stdint.h.tmp:include/ncp/ext/stdint.h.in" ;; + "include/ncp/ext/socket.h.tmp" ) CONFIG_FILES="$CONFIG_FILES include/ncp/ext/socket.h.tmp:include/ncp/ext/socket.h.in" ;; + "include/ncp/kernel/fs.h.tmp" ) CONFIG_FILES="$CONFIG_FILES include/ncp/kernel/fs.h.tmp:include/ncp/kernel/fs.h.in" ;; + "include/ncp/kernel/if.h.tmp" ) CONFIG_FILES="$CONFIG_FILES include/ncp/kernel/if.h.tmp:include/ncp/kernel/if.h.in" ;; + "include/ncp/kernel/ipx.h.tmp" ) CONFIG_FILES="$CONFIG_FILES include/ncp/kernel/ipx.h.tmp:include/ncp/kernel/ipx.h.in" ;; + "include/ncp/kernel/route.h.tmp" ) CONFIG_FILES="$CONFIG_FILES include/ncp/kernel/route.h.tmp:include/ncp/kernel/route.h.in" ;; + "include/ncp/kernel/types.h.tmp" ) CONFIG_FILES="$CONFIG_FILES include/ncp/kernel/types.h.tmp:include/ncp/kernel/types.h.in" ;; + "gettext" ) CONFIG_COMMANDS="$CONFIG_COMMANDS gettext" ;; + "include/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/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,@CC_WARNINGS@,$CC_WARNINGS,;t t +s,@build@,$build,;t t +s,@build_cpu@,$build_cpu,;t t +s,@build_vendor@,$build_vendor,;t t +s,@build_os@,$build_os,;t t +s,@host@,$host,;t t +s,@host_cpu@,$host_cpu,;t t +s,@host_vendor@,$host_vendor,;t t +s,@host_os@,$host_os,;t t +s,@SET_MAKE@,$SET_MAKE,;t t +s,@CC@,$CC,;t t +s,@CFLAGS@,$CFLAGS,;t t +s,@LDFLAGS@,$LDFLAGS,;t t +s,@CPPFLAGS@,$CPPFLAGS,;t t +s,@ac_ct_CC@,$ac_ct_CC,;t t +s,@EXEEXT@,$EXEEXT,;t t +s,@OBJEXT@,$OBJEXT,;t t +s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t +s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t +s,@INSTALL_DATA@,$INSTALL_DATA,;t t +s,@LN_S@,$LN_S,;t t +s,@PACKAGE@,$PACKAGE,;t t +s,@VERSION@,$VERSION,;t t +s,@MKINSTALLDIRS@,$MKINSTALLDIRS,;t t +s,@MSGFMT@,$MSGFMT,;t t +s,@GMSGFMT@,$GMSGFMT,;t t +s,@XGETTEXT@,$XGETTEXT,;t t +s,@MSGMERGE@,$MSGMERGE,;t t +s,@RANLIB@,$RANLIB,;t t +s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t +s,@CPP@,$CPP,;t t +s,@EGREP@,$EGREP,;t t +s,@ALLOCA@,$ALLOCA,;t t +s,@GLIBC21@,$GLIBC21,;t t +s,@LIBICONV@,$LIBICONV,;t t +s,@LTLIBICONV@,$LTLIBICONV,;t t +s,@INTLBISON@,$INTLBISON,;t t +s,@USE_NLS@,$USE_NLS,;t t +s,@BUILD_INCLUDED_LIBINTL@,$BUILD_INCLUDED_LIBINTL,;t t +s,@USE_INCLUDED_LIBINTL@,$USE_INCLUDED_LIBINTL,;t t +s,@CATOBJEXT@,$CATOBJEXT,;t t +s,@INTLOBJS@,$INTLOBJS,;t t +s,@DATADIRNAME@,$DATADIRNAME,;t t +s,@INSTOBJEXT@,$INSTOBJEXT,;t t +s,@GENCAT@,$GENCAT,;t t +s,@INTL_LIBTOOL_SUFFIX_PREFIX@,$INTL_LIBTOOL_SUFFIX_PREFIX,;t t +s,@INTLLIBS@,$INTLLIBS,;t t +s,@LIBINTL@,$LIBINTL,;t t +s,@LTLIBINTL@,$LTLIBINTL,;t t +s,@POSUB@,$POSUB,;t t +s,@localedir@,$localedir,;t t +s,@ncp_ipx_headers_1@,$ncp_ipx_headers_1,;t t +s,@ncp_ipx_headers_2@,$ncp_ipx_headers_2,;t t +s,@ncp_ipx_defsiocprotoprivate@,$ncp_ipx_defsiocprotoprivate,;t t +s,@ncp_ipx_defsiocaipx@,$ncp_ipx_defsiocaipx,;t t +s,@ncp_sys_mount_h@,$ncp_sys_mount_h,;t t +s,@ncp_linux_fs_h@,$ncp_linux_fs_h,;t t +s,@ncp_net_if_h@,$ncp_net_if_h,;t t +s,@ncp_net_route_h@,$ncp_net_route_h,;t t +s,@ncp_if_ether_support@,$ncp_if_ether_support,;t t +s,@ncp_sys_select_h@,$ncp_sys_select_h,;t t +s,@stdint_types@,$stdint_types,;t t +s,@socklen_t@,$socklen_t,;t t +s,@wchar_h@,$wchar_h,;t t +s,@LIB_PAM_SECURITY@,$LIB_PAM_SECURITY,;t t +s,@php_found@,$php_found,;t t +s,@REENTRANT_CFLAGS@,$REENTRANT_CFLAGS,;t t +s,@ncphost@,$ncphost,;t t +s,@ELF_TARGET@,$ELF_TARGET,;t t +s,@VERSIONED_LINK@,$VERSIONED_LINK,;t t +s,@ncp_in_support@,$ncp_in_support,;t t +s,@ncp_ipx_support@,$ncp_ipx_support,;t t +s,@NDS_SUPPORT@,$NDS_SUPPORT,;t t +s,@SIGNATURES@,$SIGNATURES,;t t +s,@MOUNT2@,$MOUNT2,;t t +s,@MOUNT3@,$MOUNT3,;t t +s,@USE_KERNEL@,$USE_KERNEL,;t t +s,@ADDON_SUBDIRS@,$ADDON_SUBDIRS,;t t +s,@ADDON_DEV_SUBDIRS@,$ADDON_DEV_SUBDIRS,;t t +s,@FFUNCTION_SECTIONS@,$FFUNCTION_SECTIONS,;t t +s,@GC_SECTIONS@,$GC_SECTIONS,;t t +s,@subdirs@,$subdirs,;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 +# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be +# absolute. +ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` +ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` +ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` +ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` + + + 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 + + # Run the commands associated with the file. + case $ac_file in + include/private/libncp-atomic.h.tmp ) +my_file=`echo "$ac_file" | sed 's,\.tmp$,,'` +if cmp -s "$my_file" "$ac_file" +then +echo "$as_me: $my_file is unchanged" +rm -f "$ac_file" +else +mv "$ac_file" "$my_file" +fi + ;; + include/ncp/nwnet.h.tmp ) +my_file=`echo "$ac_file" | sed 's,\.tmp$,,'` +if cmp -s "$my_file" "$ac_file" +then +echo "$as_me: $my_file is unchanged" +rm -f "$ac_file" +else +mv "$ac_file" "$my_file" +fi + ;; + include/ncp/ext/stdint.h.tmp ) +my_file=`echo "$ac_file" | sed 's,\.tmp$,,'` +if cmp -s "$my_file" "$ac_file" +then +echo "$as_me: $my_file is unchanged" +rm -f "$ac_file" +else +mv "$ac_file" "$my_file" +fi + ;; + include/ncp/ext/socket.h.tmp ) +my_file=`echo "$ac_file" | sed 's,\.tmp$,,'` +if cmp -s "$my_file" "$ac_file" +then +echo "$as_me: $my_file is unchanged" +rm -f "$ac_file" +else +mv "$ac_file" "$my_file" +fi + ;; + include/ncp/kernel/fs.h.tmp ) +my_file=`echo "$ac_file" | sed 's,\.tmp$,,'` +if cmp -s "$my_file" "$ac_file" +then +echo "$as_me: $my_file is unchanged" +rm -f "$ac_file" +else +mv "$ac_file" "$my_file" +fi + ;; + include/ncp/kernel/if.h.tmp ) +my_file=`echo "$ac_file" | sed 's,\.tmp$,,'` +if cmp -s "$my_file" "$ac_file" +then +echo "$as_me: $my_file is unchanged" +rm -f "$ac_file" +else +mv "$ac_file" "$my_file" +fi + ;; + include/ncp/kernel/ipx.h.tmp ) +my_file=`echo "$ac_file" | sed 's,\.tmp$,,'` +if cmp -s "$my_file" "$ac_file" +then +echo "$as_me: $my_file is unchanged" +rm -f "$ac_file" +else +mv "$ac_file" "$my_file" +fi + ;; + include/ncp/kernel/route.h.tmp ) +my_file=`echo "$ac_file" | sed 's,\.tmp$,,'` +if cmp -s "$my_file" "$ac_file" +then +echo "$as_me: $my_file is unchanged" +rm -f "$ac_file" +else +mv "$ac_file" "$my_file" +fi + ;; + include/ncp/kernel/types.h.tmp ) +my_file=`echo "$ac_file" | sed 's,\.tmp$,,'` +if cmp -s "$my_file" "$ac_file" +then +echo "$as_me: $my_file is unchanged" +rm -f "$ac_file" +else +mv "$ac_file" "$my_file" +fi + ;; + esac +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; }; } + 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 <>$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 <>$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 +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'` + 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 +# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be +# absolute. +ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` +ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` +ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` +ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` + + + { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 +echo "$as_me: executing $ac_dest commands" >&6;} + case $ac_dest in + gettext ) + for ac_file in $CONFIG_FILES; do + # Support "outfile[:infile[:infile...]]" + case "$ac_file" in + *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + esac + # PO directories have a Makefile.in generated from Makefile.in.in. + case "$ac_file" in */Makefile.in) + # Adjust a relative srcdir. + ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` + ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" + ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` + # In autoconf-2.13 it is called $ac_given_srcdir. + # In autoconf-2.50 it is called $srcdir. + test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" + case "$ac_given_srcdir" in + .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; + /*) top_srcdir="$ac_given_srcdir" ;; + *) top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then + rm -f "$ac_dir/POTFILES" + test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" + cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" + # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend + # on $ac_dir but don't depend on user-specified configuration + # parameters. + if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then + # The LINGUAS file contains the set of available languages. + if test -n "$ALL_LINGUAS"; then + test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" + fi + ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"` + # Hide the ALL_LINGUAS assigment from automake. + eval 'ALL_LINGUAS''=$ALL_LINGUAS_' + fi + case "$ac_given_srcdir" in + .) srcdirpre= ;; + *) srcdirpre='$(srcdir)/' ;; + esac + POFILES= + GMOFILES= + UPDATEPOFILES= + DUMMYPOFILES= + for lang in $ALL_LINGUAS; do + POFILES="$POFILES $srcdirpre$lang.po" + GMOFILES="$GMOFILES $srcdirpre$lang.gmo" + UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" + DUMMYPOFILES="$DUMMYPOFILES $lang.nop" + done + # CATALOGS depends on both $ac_dir and the user's LINGUAS + # environment variable. + INST_LINGUAS= + if test -n "$ALL_LINGUAS"; then + for presentlang in $ALL_LINGUAS; do + useit=no + if test "%UNSET%" != "$LINGUAS"; then + desiredlanguages="$LINGUAS" + else + desiredlanguages="$ALL_LINGUAS" + fi + for desiredlang in $desiredlanguages; do + # Use the presentlang catalog if desiredlang is + # a. equal to presentlang, or + # b. a variant of presentlang (because in this case, + # presentlang can be used as a fallback for messages + # which are not translated in the desiredlang catalog). + case "$desiredlang" in + "$presentlang"*) useit=yes;; + esac + done + if test $useit = yes; then + INST_LINGUAS="$INST_LINGUAS $presentlang" + fi + done + fi + CATALOGS= + if test -n "$INST_LINGUAS"; then + for lang in $INST_LINGUAS; do + CATALOGS="$CATALOGS $lang.gmo" + done + fi + test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" + sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" + for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do + if test -f "$f"; then + case "$f" in + *.orig | *.bak | *~) ;; + *) cat "$f" >> "$ac_dir/Makefile" ;; + esac + fi + done + fi + ;; + esac + 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 + +# +# CONFIG_SUBDIRS section. +# +if test "$no_recursion" != yes; then + + # Remove --cache-file and --srcdir arguments so they do not pile up. + ac_sub_configure_args= + ac_prev= + for ac_arg in $ac_configure_args; do + if test -n "$ac_prev"; then + ac_prev= + continue + fi + case $ac_arg in + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ + | --c=*) + ;; + --config-cache | -C) + ;; + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + ;; + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + ;; + *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; + esac + done + + # Always prepend --prefix to ensure using the same prefix + # in subdir configurations. + ac_sub_configure_args="--prefix=$prefix $ac_sub_configure_args" + + ac_popdir=`pwd` + for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue + + # Do not complain, so a configure script can configure whichever + # parts of a large source tree are present. + test -d $srcdir/$ac_dir || continue + + { echo "$as_me:$LINENO: configuring in $ac_dir" >&5 +echo "$as_me: configuring in $ac_dir" >&6;} + { 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 +# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be +# absolute. +ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` +ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` +ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` +ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` + + + cd $ac_dir + + # Check for guested configure; otherwise get Cygnus style configure. + if test -f $ac_srcdir/configure.gnu; then + ac_sub_configure="$SHELL '$ac_srcdir/configure.gnu'" + elif test -f $ac_srcdir/configure; then + ac_sub_configure="$SHELL '$ac_srcdir/configure'" + elif test -f $ac_srcdir/configure.in; then + ac_sub_configure=$ac_configure + else + { echo "$as_me:$LINENO: WARNING: no configuration information is in $ac_dir" >&5 +echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} + ac_sub_configure= + fi + + # The recursion is here. + if test -n "$ac_sub_configure"; then + # Make the cache file name correct relative to the subdirectory. + case $cache_file in + [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; + *) # Relative path. + ac_sub_cache_file=$ac_top_builddir$cache_file ;; + esac + + { echo "$as_me:$LINENO: running $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5 +echo "$as_me: running $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} + # The eval makes quoting arguments work. + eval $ac_sub_configure $ac_sub_configure_args \ + --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir || + { { echo "$as_me:$LINENO: error: $ac_sub_configure failed for $ac_dir" >&5 +echo "$as_me: error: $ac_sub_configure failed for $ac_dir" >&2;} + { (exit 1); exit 1; }; } + fi + + cd $ac_popdir + done +fi + + +echo +tmp="" +if test "$BUILD_IPX_TOOLS" = "1" +then + tmp=" and ipx-1.0" +fi +echo "Building ${PACKAGE_NAME}-${PACKAGE_VERSION}${tmp} with following configuration options:" +if test "$USE_KERNEL" = "1" +then + tmp="yes" +else + tmp="no" +fi +echo "kernel support: ${tmp}" +if test "$tmp" = "yes" +then + case "${MOUNT3}${MOUNT2}" in + "00") tmp="none";; + "01") tmp="linux-2.0";; + "10") tmp="linux-2.2, linux-2.4";; + *) tmp="linux-2.0, linux-2.2, linux-2.4";; + esac + echo "ncpmount support: ${tmp}" +fi +case "${PROTOCOL_IPX}${PROTOCOL_IP}" in +"00") tmp="none";; +"01") tmp="UDP, TCP";; +"10") tmp="IPX";; +*) tmp="IPX, UDP, TCP";; +esac +echo "NCP supported: ${tmp}" +if test "$NDS_SUPPORT" = "1" +then + tmp="yes" +else + tmp="no" +fi +echo "NDS support: ${tmp}" + +if test "$LIB_PAM_SECURITY" = "" +then + tmp="no" +else + tmp="$LIB_PAM_SECURITY" +fi +if test "$pam_forced" = "yes" +then + if test "$pam_path_forced" = "" + then + tmp="${tmp} (forced, path autodetected)" + else + tmp="${tmp} (forced)" + fi +else + tmp="${tmp} (autodetected)" +fi +echo "PAM support: ${tmp}" + +if test "$php_path_config" = "" +then + tmp="no" +else + tmp="$php_path_config" +fi +if test "$php_forced" = "yes" +then + if test "$php_path_forced" = "" + then + tmp="${tmp} (forced, path autodetected)" + else + tmp="${tmp} (forced)" + fi +else + tmp="${tmp} (autodetected)" +fi +echo "PHP support: ${tmp}" + +if test "$REENTRANT" = "0" +then + tmp="disabled" +else + tmp="enabled" +fi +if test "$reentrant_forced" = "yes" +then + tmp="${tmp} (forced)" +else + tmp="${tmp} (autodetected)" +fi +echo "Threading support: ${tmp}" + +case "$ncphost" in +none) tmp="not needed" ;; +generic) tmp="available (pthread based)" ;; +*) if test "$ncphosttested" = "yes" + then + tmp="" + else + tmp=", untested" + fi + tmp="available (optimized ${ncphost}${tmp})" + ;; +esac +echo "Atomic operations: ${tmp}" + +tmp="$VERSIONED_LINK" +if test "$versions_forced" = "yes" +then + tmp="${tmp} (forced)" +else + tmp="${tmp} (autodetected)" +fi +echo "Versioned symbols: ${tmp}" + +tmp="$function_sections" +if test "$function_sections_forced" = "yes" +then + tmp="${tmp} (forced)" +else + tmp="${tmp} (autodetected)" +fi +echo "Function sections: ${tmp}" + +echo "Compile-time warnings: ${CC_WARNINGS}" +if test "$NCP_TRACE_ENABLE" = "1" +then + tmp="yes" +else + tmp="no" +fi +echo "NCP trace: ${tmp}" +echo "NCP debug: ${NCP_DEBUG_ENABLE}" +echo diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..37d867e --- /dev/null +++ b/configure.ac @@ -0,0 +1,1153 @@ +dnl Process this file with autoconf to produce a configure script. +AC_PREREQ(2.50) +AC_INIT([[ncpfs]],[[2.2.1]],[[vandrove@vc.cvut.cz]]) +AC_CONFIG_SRCDIR([[lib/ncplib.c]]) +AC_REVISION([[2.2.1]]) +AC_CONFIG_HEADER(include/config.h) + + +AC_ARG_ENABLE(warnings, +[ --enable-warnings enable verbose build warnings]) + +AC_ARG_ENABLE(pam, +[ --enable-pam build PAM NCP authentication module]) + +AC_ARG_ENABLE(php, +[ --enable-php build PHP NCP authentication module]) + +AC_ARG_WITH(php-config, +[ --with-php-config=PATH build PHP NCP authentication module]) + +AC_ARG_ENABLE(ipx-tools, +[ --disable-ipx-tools disables building of ipx tools]) + +AC_ARG_ENABLE(udp, +[ --disable-udp disable NCP/UDP]) + +AC_ARG_ENABLE(ipx, +[ --disable-ipx disable NCP/IPX]) + +AC_ARG_ENABLE(signatures, +[ --disable-signatures disable packet signing code]) + +AC_ARG_ENABLE(nds, +[ --disable-nds disable NDS support]) + +AC_ARG_ENABLE(mount-v2, +[ --disable-mount-v2 disable support for Linux 2.0]) + +AC_ARG_ENABLE(mount-v3, +[ --disable-mount-v3 disable support for Linux 2.2]) + +AC_ARG_ENABLE(kernel, +[ --disable-kernel do not use kernel interface]) + +AC_ARG_ENABLE(reentrant, +[ --disable-reentrant do not compile threading support into library]) + +AC_ARG_ENABLE(versions, +[ --disable-versions do not use version symbols in library]) + +AC_ARG_ENABLE(function_sections, +[ --disable-function-sections do not use -ffunction-sections for static libraries]) + +AC_ARG_ENABLE(trace, +[ --enable-trace enable trace of ncp calls]) + +AC_ARG_ENABLE(ncp_debug, +[ --enable-ncp-debug enable builtin debugging support]) + +if test "$enable_udp" = "no" +then + PROTOCOL_IP=0 +else + AC_DEFINE(CONFIG_NATIVE_IP, 1, +[If you want native IP support, uncomment CONFIG_NATIVE_IP +Do not forget that it is VERY ALPHA code, with almost no support +Enable only if you are interested in NCP over IP and you want help +me. -A ip.address is your friend. At this time you have to silently +ignore Login to server XXXX as YYYY - think that XXXX is ip.address and +not one taken from .nwclient. Also, if you have not .nwclient, you have +to add -S DUMMY on commandline.]) + PROTOCOL_IP=1 +fi + +if test "$enable_signatures" = "no" +then : ; else + AC_DEFINE(SIGNATURES, 1, +[If you want to include packet signature support uncomment this. +If you are using 2.0.x Linux kernel, make sure that you also applied +kernel patches. +Change only through 'configure', copies of this value are in makefiles]) + SIGNATURES=1 +fi + +if test "$enable_nds" = "no" +then : ; else + AC_DEFINE(NDS_SUPPORT, 1, +[If you want to include NDS support, define NDS_SUPPORT symbol +Change only through 'configure', copies of this value are in makefiles]) + NDS_SUPPORT=1 +fi + +if test "$enable_kernel" = "no" +then + USE_KERNEL=0 + enable_mount_v2=no + enable_mount_v3=no +else + USE_KERNEL=1 +fi + +if test "$enable_mount_v2" = "no" +then + MOUNT2=0 +else + MOUNT2=1 +fi + +if test "$enable_mount_v3" = "no" +then + MOUNT3=0 +else + MOUNT3=1 +fi + +if test "$enable_warnings" = "yes" +then + CC_WARNINGS=yes +else + CC_WARNINGS=no +fi +AC_SUBST(CC_WARNINGS) + +if test "$enable_ncp_debug" = "yes" +then + NCP_DEBUG_ENABLE=yes + AC_DEFINE(NCP_DEBUG, 1, +[Enable support for NCP_DEBUG environment variable.]) +else + NCP_DEBUG_ENABLE=no +fi + +pam_forced=no +pam_path_forced= +if test "$enable_pam" = "" +then + PAM=1 +else + pam_forced=yes + case "$enable_pam" in + no) PAM=0; pam_path_forced="no";; + yes) PAM=1;; + /*) PAM=1; pam_path_forced="$enable_pam";; + *) AC_MSG_ERROR(Bad parameter for --enable-pam);; + esac +fi + +php_forced=no +php_path_forced= +PHP=yes +if test "$enable_php" != "" +then + case "$enable_php" in + no) PHP=no; php_path_forced="no";; + yes) PHP=yes; php_path_forced=;; + *) AC_MSG_ERROR(Bad parameter for --enable-php. Use --with-php-config for specifying PHP directory);; + esac + php_forced=yes +fi +if test "$with_php_config" != "" +then + case "$with_php_config" in + no) PHP2=no; php_path_forced="no";; + yes) PHP2=yes; php_path_forced=;; + *) PHP2=yes; php_path_forced="$with_php_config";; + esac + if test "$php_forced" = "yes" + then + if test "$PHP" != "$PHP2" + then + p1="--enable-php" + if test "$PHP" = "no" + then + p1="--disable-php" + fi + case "$php_path_forced" in + no) p2="--without-php-config";; + yes) p2="--with-php-config";; + *) p2="--with-php-config=$php_path_forced";; + esac + AC_MSG_ERROR($p1 conflicts with $p2); + fi + fi + PHP="${PHP2}" + php_forced=yes +fi + +reentrant_forced=no +REENTRANT=1 +if test "$enable_reentrant" != "" +then + reentrant_forced=yes + if test "$enable_reentrant" = "no" + then + REENTRANT=0 + fi +fi + +versions_forced=no +VERSIONED_LINK=yes +if test "$enable_versions" != "" +then + versions_forced=yes + if test "$enable_versions" = "no" + then + VERSIONED_LINK=no + fi +fi + +function_sections_forced=no +function_sections=yes +if test "$enable_function_sections" != "" +then + function_sections_forced=yes + if test "$enable_function_sections" = "no" + then + function_sections=no + fi +fi + +if test "$enable_trace" = "yes" +then + AC_DEFINE(NCP_TRACE_ENABLE, 1, [If you want to trace ncp calls uncomment this.]) + NCP_TRACE_ENABLE=1 +fi + +PROTOCOL_IPX=0 +BUILD_IPX_TOOLS=0 + +AC_CANONICAL_HOST + +dnl Checks for programs. +AC_PROG_MAKE_SET +AC_PROG_CC +AC_PROG_INSTALL +AC_PROG_LN_S + +dnl Mandatory gettext items +AC_SUBST(PACKAGE, ["$PACKAGE_NAME"]) +AC_SUBST(VERSION, ["$PACKAGE_VERSION"]) +AM_GNU_GETTEXT +localedir="\${prefix}/$DATADIRNAME/locale" +AC_SUBST(localedir) + +dnl Checks for IPX support style +AC_CACHE_CHECK(for GNU style IPX support, ncp_cv_c_ipx_netipx, + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[[#include +#include +#include ]]], + [[[((struct sockaddr_ipx*)0)->sipx_family == AF_IPX]]])], + [ncp_cv_c_ipx_netipx="yes"], + [ncp_cv_c_ipx_netipx="no"] + ) +) +ncp_ipx_headers_1="/* not required */" +ncp_ipx_headers_2="/* <.../ipx.h> not found */" +if test "$ncp_cv_c_ipx_netipx" = "no" +then + AC_CACHE_CHECK(for Linux style IPX support, ncp_cv_c_ipx_linux, + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[[#include +#include +#include ]]], + [[[((struct sockaddr_ipx*)0)->sipx_family == AF_IPX]]])], + [ncp_cv_c_ipx_linux="yes"], + [ncp_cv_c_ipx_linux="no"] + ) + ) + if test "$ncp_cv_c_ipx_linux" = "no" + then + enable_ipx="no" + else + AC_DEFINE(HAVE_LINUX_IPX_H, 1, [Define if you have IPX header linux/ipx.h]) + ncp_ipx_headers_1="#include " + ncp_ipx_headers_2="#include " + fi +else + AC_DEFINE(HAVE_NETIPX_IPX_H, 1, [Define if you have IPX header netipx/ipx.h]) + ncp_ipx_headers_1="#include " + ncp_ipx_headers_2="#include " +fi +AC_SUBST(ncp_ipx_headers_1) +AC_SUBST(ncp_ipx_headers_2) + +dnl If IPX is selected, check some IPX constants +ncp_ipx_defsiocprotoprivate="#if 0 /* #define SIOCPROTOPRIVATE not needed */" +ncp_ipx_defsiocaipx="#if 0/* #define SIOCAIPX* not needed */" +if test "$enable_ipx" = "no" +then : ; else + AC_DEFINE(CONFIG_NATIVE_IPX, 1, +[If you do not want IPX support, comment CONFIG_NATIVE_IPX out... +I cannot recommend doing it]) + PROTOCOL_IPX=1 + if test "$enable_ipx_tools" != "no" + then + ADDON_DEV_SUBDIRS="$ADDON_DEV_SUBDIRS ipx-1.0" + BUILD_IPX_TOOLS=1 + fi + + dnl glibc-2.0.7 and 2.1.x does not have these defines... + AC_CACHE_CHECK(for working IPX ioctl values, ncp_cv_c_ipx_ioctl, + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[[$ncp_ipx_headers_1 +$ncp_ipx_headers_2]]], + [[[SIOCAIPXITFCRT, SIOCAIPXPRISLT, SIOCIPXCFGDATA]]])], + [ncp_cv_c_ipx_ioctl="yes"], + [ncp_cv_c_ipx_ioctl="no"] + ) + ) + if test "$ncp_cv_c_ipx_ioctl" = "no" + then + AC_CACHE_CHECK(for defined SIOCPROTOPRIVATE, ncp_cv_c_siocprotoprivate, + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[[$ncp_ipx_headers_1 +$ncp_ipx_headers_2]]], + [[[SIOCPROTOPRIVATE]]])], + [ncp_cv_c_siocprotoprivate="yes"], + [ncp_cv_c_siocprotoprivate="no"] + ) + ) + if test "$ncp_cv_c_siocprotoprivate" = "no" + then + ncp_ipx_defsiocprotoprivate="#if 1 /* SIOCPROTOPRIVATE was not found */" + AC_CACHE_CHECK(for working IPX ioctl values after defining SIOCPROTOPRIVATE, ncp_cv_c_ipx_sioc, + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[[$ncp_ipx_headers_1 +$ncp_ipx_headers_2 +#define SIOCPROTOPRIVATE 0x89E0]]], + [[[SIOCAIPXITFCRT, SIOCAIPXPRISLT, SIOCIPXCFGDATA]]])], + [ncp_cv_c_ipx_sioc="yes"], + [ncp_cv_c_ipx_sioc="no"] + ) + ) + else + ncp_cv_c_ipx_sioc="no" + fi + if test "$ncp_cv_c_ipx_sioc" = "no" + then + ncp_ipx_defsiocaipx="#if 1 /* SIOCAIPX* values were not defined */" + fi + fi +fi +AC_SUBST(ncp_ipx_defsiocprotoprivate) +AC_SUBST(ncp_ipx_defsiocaipx) + + +dnl Checks for header files. +AC_HEADER_STDC +AC_HEADER_SYS_WAIT + +dnl sys/mount is required by ncpmount +dnl currently code does not work without sys/mount.h +AC_CHECK_HEADER(sys/mount.h) +if test "$ac_cv_header_sys_mount_h" = "no" +then + if test "$USE_KERNEL" = "1" + then + AC_MSG_WARN(Cannot build kernel support because of no sys/mount.h file) + USE_KERNEL=0 + fi + ncp_sys_mount_h="/* sys/mount.h does not exist */" + ncp_linux_fs_h="/* linux/fs.h is not needed */" +else + ncp_sys_mount_h="#include " + AC_CACHE_CHECK(for mount constants in sys/mount.h, ncp_cv_linux_fs_needed, + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM([[[#include ]]], + [[[mount(0,0,0,MS_RDONLY,0); umount(0)]]])], + [ncp_cv_linux_fs_needed="yes"], + [ncp_cv_linux_fs_needed="no"] + ) + ) + if test "$ncp_cv_linux_fs_needed" = "yes"; then + ncp_linux_fs_h="/* linux/fs.h not needed */" + else + ncp_linux_fs_h="#include " + fi +fi +AC_SUBST(ncp_sys_mount_h) +AC_SUBST(ncp_linux_fs_h) + +dnl net/if is required by IPX tools +dnl currently code does not work without net/if.h +AC_CHECK_HEADER(net/if.h, + [ncp_net_if_h="#include "], + [AC_CHECK_HEADER(linux/if.h, + [ncp_net_if_h="#include "], + [ncp_net_if_h="/* No interfaces support... */" + AC_DEFINE(NO_NET_IF_SUPPORT, 1, [neither net/if.h nor linux/if.h was found, so ipx_* will not build...]) + AC_MSG_WARN(Neither nor does exist, only partial make configured)] + )] +) +AC_SUBST(ncp_net_if_h) + +dnl net/route is required for now in ncplib +dnl it should not be required for IP-only +AC_CHECK_HEADER(net/route.h, + [ncp_net_route_h="#include "], + [AC_CHECK_HEADER(linux/route.h, + [ncp_net_route_h="#include "], + [ncp_net_route_h="/* No route support... */" + AC_DEFINE(NO_NET_ROUTE_SUPPORT, 1, [neither net/route.h nor linux/route.h was found ...]) + dnl In future, {net|linux}/route.h should be required only by ipx code + AC_MSG_ERROR(Neither nor does exist)] + )] +) +AC_SUBST(ncp_net_route_h) + +dnl netinet/if_ether.h vs. linux/if_ether.h +dnl required only in ipxdump/ipxparse +ncp_if_ether_support="yes" +AC_CHECK_HEADER(netinet/if_ether.h) +if test "$ac_cv_header_netinet_if_ether_h" = "no" +then + AC_CHECK_HEADER(linux/if_ether.h) + if test "$ac_cv_header_linux_if_ether_h" = "no" + then + ncp_if_ether_support="no" + fi +fi +AC_SUBST(ncp_if_ether_support) + +dnl LIBC5 without problems, LIBC6/6.1 are a bit problematic +AC_CHECK_HEADER(sys/select.h, + [ncp_sys_select_h="#include "], + [ncp_sys_select_h="#include "] +) +AC_SUBST(ncp_sys_select_h) + +AC_CACHE_CHECK([for C9X integer types], + ncp_cv_c9x_stdint, + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[[#include ]]], + [[[int_least16_t sl16; +int_least32_t sl32; +uint_least16_t ul16; +uint_least32_t ul32; +int_fast16_t sf16; +int_fast32_t sf32; +uint_fast16_t uf16; +uint_fast32_t uf32]]])], + [ncp_cv_c9x_stdint="yes"], + [ncp_cv_c9x_stdint="no"] + ) +) +if test "$ncp_cv_c9x_stdint" = "yes" +then + stdint_types="1" +else + stdint_types="0" +fi +AC_SUBST(stdint_types) + +if test "$USE_KERNEL" = "1" +then + if test "$ncp_sys_select_h" = "#include " + then + AC_CACHE_CHECK([whether sys/select.h and linux/posix_types.h may both be included], + ncp_cv_posix_and_select, + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[[#include +#include ]]], + [[[fd_set a; +select(0, &a, &a, &a, 0)]]])], + [ncp_cv_posix_and_select="yes"], + [ncp_cv_posix_and_select="no"] + ) + ) + else + ncp_cv_posix_and_select="yes" + fi + if test "$ncp_cv_posix_and_select" = "no" + then + AC_MSG_WARN([sys/select.h and linux/posix_types.h cannot be included together, will not build kernel support]) + USE_KERNEL=0 + fi +fi + +dnl Third parameter to accept is socklen_t or signed int +AC_CACHE_CHECK(for third parameter to accept, + ncp_cv_socklen_t, + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[[#include ]]], + [[[socklen_t a; + accept(0, NULL, &a)]]])], + [ncp_cv_socklen_t="socklen_t"], + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[[#include ]]], + [[[int a; + accept(0, NULL, &a)]]])], + [ncp_cv_socklen_t="int"], + dnl Can you imagine another parameter? Except that sys/socket does not exist... + [ncp_cv_socklen_t="unsigned int"] + ) + ) +) +if test "$ncp_cv_socklen_t" = "socklen_t" +then + socklen_t="/* socklen_t is defined by libc */" +else + socklen_t="typedef $ncp_cv_socklen_t socklen_t;" +fi +AC_SUBST(socklen_t) + +dnl UNICODE +AC_CHECK_TYPE([wchar_t], , [AC_DEFINE([wchar_t], [unsigned int], [Define to 'unsigned int' if wchar_t is not defined.])]) +AC_CHECK_HEADERS(wchar.h iconv.h) +if test "$ac_cv_header_wchar_h" = "yes" +then + wchar_h="#include " +else + wchar_h="/* no wchar_h header... */" +fi +AC_SUBST(wchar_h) + +if test "$ac_cv_header_iconv_h" = "yes" +then + AM_ICONV +fi + +dnl AC_CHECK_HEADERS(fcntl.h malloc.h paths.h strings.h sys/ioctl.h sys/time.h syslog.h unistd.h) + +dnl Checks for typedefs, structures, and compiler characteristics. +dnl do we need them? Abort if not present... +AC_C_CONST +AC_TYPE_UID_T +AC_C_INLINE +AC_TYPE_MODE_T +AC_TYPE_OFF_T +AC_TYPE_PID_T +AC_TYPE_SIZE_T +AC_HEADER_TIME +AC_STRUCT_TM + +dnl Checks for library functions. +AC_PROG_GCC_TRADITIONAL +dnl do we need them? Abort if not present... +dnl AC_FUNC_MEMCMP +dnl AC_TYPE_SIGNAL +dnl AC_FUNC_VPRINTF +dnl AC_CHECK_FUNCS(gettimeofday mktime select socket strdup strerror strspn strstr strtol strtoul uname) +AC_CHECK_FUNCS(wcslen wcscpy wcsdup wcscmp wcsncmp wcscasecmp wcsncasecmp wcsrev) + +if test "$PAM" = "1" +then + AC_CHECK_HEADER(security/pam_appl.h) + if test "$ac_cv_header_security_pam_appl_h" = "yes" ; then + if test "$pam_path_forced" = ""; then + AC_CACHE_CHECK(for pam modules directory, + ncp_cv_pam_directory, + if test -d /lib/security ; then + ncp_cv_pam_directory=/lib/security + else if test -d /usr/lib/security ; then + ncp_cv_pam_directory=/usr/lib/security + else if test -d /usr/local/lib/security ; then + ncp_cv_pam_directory=/usr/local/lib/security + else + dnl defaulting to /lib/security by Linux FS standard + ncp_cv_pam_directory=/lib/security + fi; fi; fi + ) + else + ncp_cv_pam_directory="$pam_path_forced" + fi + LIB_PAM_SECURITY=$ncp_cv_pam_directory + + AC_SUBST(LIB_PAM_SECURITY) + ADDON_DEV_SUBDIRS="$ADDON_DEV_SUBDIRS contrib/pam" + else + if test "$pam_forced" = "yes" + then + AC_MSG_ERROR(Cannot build PAM module because of PAM headers are not installed) + fi + PAM=0 + fi +fi + +if test "$PHP" = "yes" +then + php_path_config="$php_path_forced" + if test "$php_path_config" = "" + then + php_path_config=php-config + fi + case "$php_path_config" in + /*) AC_MSG_CHECKING([for $php_path_config]) + if test -r "$php_path_config" + then + php_found=yes + else + php_found=no + fi + AC_MSG_RESULT([$php_found]) + ;; + *) AC_CHECK_PROG(php_found, $php_path_config, yes, no) ;; + esac + if test "$php_found" = "yes" + then + ADDON_SUBDIRS="$ADDON_SUBDIRS contrib/php" + else + if test "$php_forced" = "yes" + then + AC_MSG_ERROR(Cannot build PHP module because of $php_path_config is not available) + fi + php_path_config="" + fi +fi + +if test "$NDS_SUPPORT" = "1" +then + AC_CACHE_CHECK(for mpilib word size, + ncp_cv_mpilib_unit, + [case "$host_cpu" in + i?86|ia32) ncp_cv_mpilib_unit="32";; + *) ncp_cv_mpilib_unit="8"; + esac] + ) + AC_DEFINE_UNQUOTED(UNITSIZE, $ncp_cv_mpilib_unit, [Define to 8 (big-endian) or 16 (32 bit little-endian except i386) or 32 (i386)]) + AC_DEFINE_UNQUOTED(MULTUNITSIZE, $ncp_cv_mpilib_unit, [Define to 8 (big-endian) or 16 (32 bit little-endian except i386) or 32 (i386)]) +fi + +if test "$REENTRANT" != "0" +then + AC_CACHE_CHECK(for working pthread support, + ncp_cv_pthread, + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[[#include +#include ]]], + [[[pthread_mutex_t a; + pthread_once_t b; + pthread_mutex_init(&a, NULL); + pthread_mutex_lock(&a); + pthread_mutex_unlock(&a); + pthread_mutex_destroy(&a)]]])], + [ncp_cv_pthread="yes"], + [ncp_cv_pthread="no"] + ) + if test "$ncp_cv_pthread" = "no" + then + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[[#define _MIT_POSIX_THREADS 1 +#include +#include ]]], + [[[pthread_mutex_t a; + pthread_once_t b; + pthread_mutex_init(&a, NULL); + pthread_mutex_lock(&a); + pthread_mutex_unlock(&a); + pthread_mutex_destroy(&a)]]])], + [ncp_cv_pthread="MIT Posix threads needed"], + [ncp_cv_pthread="no"] + ) + fi + ) + case "$ncp_cv_pthread" in +no) if test "$reentrant_forced" = "yes" + then + AC_MSG_ERROR(Cannot build threading libraries without working pthread support) + fi + REENTRANT=0 + ;; +MIT*) AC_DEFINE(_MIT_POSIX_THREADS, 1, [Define if you need this for correct threading_MIT_POSIX_THREADS ...]) + ;; + esac +fi +if test "$REENTRANT" != "0" +then + AC_CACHE_CHECK(for working weak symbols, + ncp_cv_weak_symbols, + AC_LINK_IFELSE([AC_LANG_PROGRAM([[[#include +#pragma weak pthread_mutex_lock]]], + [[[pthread_mutex_t a; + pthread_mutex_lock(&a)]]])], + [ncp_cv_weak_symbols="yes"], + [ncp_cv_weak_symbols="no"] + ) + ) + if test "$ncp_cv_weak_symbols" = "no" + then + if test "$reentrant_forced" = "yes" + then + AC_MSG_ERROR(Cannot build threading libraries without working weak imports) + fi + REENTRANT=0 + fi +fi +if test "$REENTRANT" = "0" +then + REENTRANT_CFLAGS="" + + ncphost=none + ncphosttested=yes +else + REENTRANT_CFLAGS="-D_REENTRANT" + + ncphost=generic + ncphosttested=yes + case "$host" in +1750a-*) ;; +580-*) ;; +[cjt]90-*) ;; +a29k-*) ;; +alpha-*) ncphost=alpha; ncphosttested=no ;; +alphaev56-*) ncphost=alpha; ncphosttested=no ;; +alphaev6[78]-*) ncphost=alpha; ncphosttested=no ;; +alphaev[4-8]-*) ncphost=alpha; ncphosttested=no ;; +alphapca5[67]-*) ncphost=alpha; ncphosttested=no ;; +arc-*) ;; +arm-*) ;; +armbe-*) ;; +armle-*) ;; +armv*-*) ;; +avr-*) ;; +bs2000-*) ;; +c30-*) ;; +c4x-*) ;; +c54x-*) ;; +c[123]*) ;; +clipper-*) ;; +cray2-*) ;; +cris-*) ;; +cydra-*) ;; +d10v-*) ;; +d30v-*) ;; +dsp16xx-*) ;; +elxsi-*) ;; +f30[01]-*) ;; +f700-*) ;; +fr30-*) ;; +fx80-*) ;; +h8300-*) ;; +h8500-*) ;; +hppa-*) ;; +hppa1.0-*) ;; +hppa1.1-*) ;; +hppa2.0-*) ;; +hppa2.0n-*) ;; +hppa2.0w-*) ;; +hppa64-*) ;; +i*86-*) ncphost=i386; ncphosttested=yes ;; +i370-*) ;; +i860-*) ;; +i960-*) ;; +ia64-*) ;; +m32r-*) ;; +m5200-*) ;; +m680[012346]0-*) ncphost=m68k; ncphosttested=no ;; +m681[12]-*) ;; +m68360-*) ;; +m683?2-*) ;; +m68hc1[12]-*) ;; +m68k-*) ncphost=m68k; ncphosttested=no ;; +m88110-*) ;; +m88k-*) ;; +mcore-*) ;; +mips-*) ncphost=mips; ncphosttested=no ;; +mips16-*) ;; +mips64*-*) ncphost=mips64; ncphosttested=no ;; +mipsbe-*) ncphost=mips; ncphosttested=no ;; +mipsel-*) ncphost=mips; ncphosttested=no ;; +mipsle-*) ncphost=mips; ncphosttested=no ;; +mipstx39-*) ;; +mipstx39el-*) ;; +mmix-*) ;; +mn10[23]00-*) ;; +none-*) ;; +np1-*) ;; +ns16k-*) ;; +ns32k-*) ;; +nsr-*) ;; +openrisc-*) ;; +orion-*) ;; +pdp10-*) ;; +pdp11-*) ;; +pj-*) ;; +pjl-*) ;; +pn-*) ;; +power-*) ;; +powerpc-*) ncphost=ppc; ncphosttested=no ;; +powerpcle-*) ncphost=ppc; ncphosttested=no ;; +ppcbe-*) ;; +pyramid-*) ;; +romp-*) ;; +rs6000-*) ;; +s390-*) ;; +s390x-*) ;; +sh-*) ;; +sh[34]-*) ;; +sh[34]eb-*) ;; +shbe-*) ;; +shle-*) ;; +sparc-*) ;; +sparc64-*) ;; +sparc86x-*) ;; +sparclet-*) ;; +sparclite-*) ;; +sparcv9-*) ;; +sparcv9b-*) ;; +spur-*) ;; +strongarm-*) ;; +sv1-*) ;; +t3e-*) ;; +tahoe-*) ;; +thumb-*) ;; +tic30-*) ;; +tic54x-*) ;; +tic80-*) ;; +tron-*) ;; +v70-*) ;; +v810-*) ;; +v850-*) ;; +vax-*) ;; +w65-*) ;; +we32k-*) ;; +x86-*) ncphost=i386; ncphosttested=yes ;; +x86_64-*) ;; +xmp-*) ;; +xps100-*) ;; +xscale-*) ;; +ymp-*) ;; +z8k-*) ;; +esac + AC_CACHE_CHECK(for working atomic operations, + ncp_cv_asm_atomic_h, + if test "$ncp_cv_asm_atomic_h" = "generic" + then + ncp_cv_asm_atomic_h="pthread based" + else + AC_LINK_IFELSE([AC_LANG_PROGRAM([[[#include "include/private/asm-$ncphost/atomic.h"]]], + [[[ncpt_atomic_t a; + ncpt_atomic_set(&a,2); + ncpt_atomic_dec(&a); + if (ncpt_atomic_read(&a)) { + if (!ncpt_atomic_dec_and_test(&a)) { + ncpt_atomic_inc(&a); + } + }]]])], + [ncp_cv_asm_atomic_h="optimized"], + [ncp_cv_asm_atomic_h="falling back to pthread based" + ncphost=generic + ncphosttested=yes + ] + ) + fi + ) + if test "$ncp_cv_asm_atomic_h" = "falling back to pthread based" + then + ncphost=generic + ncphosttested=yes + fi +fi +AC_SUBST(REENTRANT_CFLAGS) +AC_SUBST(ncphost) + +AC_CACHE_CHECK(for ELF target, + ncp_cv_elf_target, +[ ncp_cv_elf_target=no + cat >conftest.c </dev/null 2>&1 + then + (file conftest | grep ELF >/dev/null 2>&1) && ncp_cv_elf_target=yes + fi + rm -f conftest* + ] +) +ELF_TARGET="$ncp_cv_elf_target" +AC_SUBST(ELF_TARGET) + +FFUNCTION_SECTIONS="" +GC_SECTIONS="" +if test "$function_sections" = "yes" +then + AC_CACHE_CHECK(for function sections, + ncp_cv_function_sections, +[ ncp_cv_function_sections=no + cat >conftest.c </dev/null 2>&1 + then + ncp_cv_function_sections=yes + fi + rm -f conftest* + ] + ) + if test "$ncp_cv_function_sections" = "no" + then + if test "$function_sections_forced" = "yes" + then + AC_MSG_ERROR([Your compiler does not support -ffunction-sections or -fdata-sections or your linker does not support --gc-sections. Please reconfigure without --enable-function-sections.]) + fi + fi + function_sections="$ncp_cv_function_sections" +fi +if test "$function_sections" = "yes" +then + FFUNCTION_SECTIONS="-ffunction-sections -fdata-sections " + GC_SECTIONS="-Wl,--gc-sections " +fi + +if test "$VERSIONED_LINK" = "yes" +then + AC_CACHE_CHECK(for working versioned link, + ncp_cv_versioned_link, +[ ncp_cv_versioned_link=no + cat >conftest.vers <conftest.c </dev/null 2>&1 + then + ncp_cv_versioned_link=yes + fi] + ) + rm -f conftest.c conftest.vers conftest.so + if test "$ncp_cv_versioned_link" = "no" + then + if test "$versions_forced" = "yes" + then + AC_MSG_ERROR(Cannot use versioned symbols in your environment) + fi + VERSIONED_LINK=no + fi +fi +AC_SUBST(VERSIONED_LINK) + +if test "$USE_KERNEL" = "0" +then + MOUNT2=0 + MOUNT3=0 +else + AC_DEFINE(USE_KERNEL, 1, [Define when compiling for Linux kernel]) +fi +if test "$MOUNT2" = "1" +then + AC_DEFINE(MOUNT2, 1, [If defined, support for Linux2.0.x is compiled in]) +fi +if test "$MOUNT3" = "1" +then + AC_DEFINE(MOUNT3, 1, [If defined, support for Linux2.1-3.x is compiled in]) +fi +if test "$PROTOCOL_IP" = "0" +then + ncp_in_support="#undef NCP_IN_SUPPORT" +else + ncp_in_support="#define NCP_IN_SUPPORT" +fi +if test "$PROTOCOL_IPX" = "0" +then + ncp_ipx_support="#undef NCP_IPX_SUPPORT" +else + ncp_ipx_support="#define NCP_IPX_SUPPORT" +fi +AC_SUBST(ncp_in_support) +AC_SUBST(ncp_ipx_support) + +ADDON_SUBDIRS="$ADDON_SUBDIRS $ADDON_DEV_SUBDIRS" + +AC_SUBST(NDS_SUPPORT) +AC_SUBST(SIGNATURES) +AC_SUBST(MOUNT2) +AC_SUBST(MOUNT3) +AC_SUBST(USE_KERNEL) +AC_SUBST(ADDON_SUBDIRS) +AC_SUBST(ADDON_DEV_SUBDIRS) +AC_SUBST(FFUNCTION_SECTIONS) +AC_SUBST(GC_SECTIONS) + +AC_CONFIG_FILES([ +Make.rules +Makefile +lib/Makefile +man/Makefile +util/Makefile +sutil/Makefile +ipx-1.0/Makefile +ipx-1.0/Samples/Makefile +ipxdump/Makefile +contrib/tknwmsg/Makefile +contrib/testing/Makefile +contrib/testing/pp/Makefile +contrib/tcl-utils/Makefile +contrib/tests/Makefile +intl/Makefile +po/Makefile.in +contrib/pam/Makefile +contrib/php/Makefile.in +]) +AC_CONFIG_FILES([ +include/private/libncp-atomic.h.tmp:include/private/libncp-atomic.h.in +include/ncp/nwnet.h.tmp:include/ncp/nwnet.h.in +include/ncp/ext/stdint.h.tmp:include/ncp/ext/stdint.h.in +include/ncp/ext/socket.h.tmp:include/ncp/ext/socket.h.in +include/ncp/kernel/fs.h.tmp:include/ncp/kernel/fs.h.in +include/ncp/kernel/if.h.tmp:include/ncp/kernel/if.h.in +include/ncp/kernel/ipx.h.tmp:include/ncp/kernel/ipx.h.in +include/ncp/kernel/route.h.tmp:include/ncp/kernel/route.h.in +include/ncp/kernel/types.h.tmp:include/ncp/kernel/types.h.in +], [ +my_file=`echo "$ac_file" | sed 's,\.tmp$,,'` +if cmp -s "$my_file" "$ac_file" +then +echo "$as_me: $my_file is unchanged" +rm -f "$ac_file" +else +mv "$ac_file" "$my_file" +fi +]) +if test "$php_path_config" != "" +then + if test "$with_php_config" = "yes" + then + AC_MSG_ERROR(Current PHP configure does not handle --with-php-config correctly. Use --with-php-config=php-config instead.) + fi + AC_CONFIG_SUBDIRS(contrib/php) +fi +AC_OUTPUT + +echo +tmp="" +if test "$BUILD_IPX_TOOLS" = "1" +then + tmp=" and ipx-1.0" +fi +echo "Building ${PACKAGE_NAME}-${PACKAGE_VERSION}${tmp} with following configuration options:" +if test "$USE_KERNEL" = "1" +then + tmp="yes" +else + tmp="no" +fi +echo "kernel support: ${tmp}" +if test "$tmp" = "yes" +then + case "${MOUNT3}${MOUNT2}" in + "00") tmp="none";; + "01") tmp="linux-2.0";; + "10") tmp="linux-2.2, linux-2.4";; + *) tmp="linux-2.0, linux-2.2, linux-2.4";; + esac + echo "ncpmount support: ${tmp}" +fi +case "${PROTOCOL_IPX}${PROTOCOL_IP}" in +"00") tmp="none";; +"01") tmp="UDP, TCP";; +"10") tmp="IPX";; +*) tmp="IPX, UDP, TCP";; +esac +echo "NCP supported: ${tmp}" +if test "$NDS_SUPPORT" = "1" +then + tmp="yes" +else + tmp="no" +fi +echo "NDS support: ${tmp}" + +if test "$LIB_PAM_SECURITY" = "" +then + tmp="no" +else + tmp="$LIB_PAM_SECURITY" +fi +if test "$pam_forced" = "yes" +then + if test "$pam_path_forced" = "" + then + tmp="${tmp} (forced, path autodetected)" + else + tmp="${tmp} (forced)" + fi +else + tmp="${tmp} (autodetected)" +fi +echo "PAM support: ${tmp}" + +if test "$php_path_config" = "" +then + tmp="no" +else + tmp="$php_path_config" +fi +if test "$php_forced" = "yes" +then + if test "$php_path_forced" = "" + then + tmp="${tmp} (forced, path autodetected)" + else + tmp="${tmp} (forced)" + fi +else + tmp="${tmp} (autodetected)" +fi +echo "PHP support: ${tmp}" + +if test "$REENTRANT" = "0" +then + tmp="disabled" +else + tmp="enabled" +fi +if test "$reentrant_forced" = "yes" +then + tmp="${tmp} (forced)" +else + tmp="${tmp} (autodetected)" +fi +echo "Threading support: ${tmp}" + +case "$ncphost" in +none) tmp="not needed" ;; +generic) tmp="available (pthread based)" ;; +*) if test "$ncphosttested" = "yes" + then + tmp="" + else + tmp=", untested" + fi + tmp="available (optimized ${ncphost}${tmp})" + ;; +esac +echo "Atomic operations: ${tmp}" + +tmp="$VERSIONED_LINK" +if test "$versions_forced" = "yes" +then + tmp="${tmp} (forced)" +else + tmp="${tmp} (autodetected)" +fi +echo "Versioned symbols: ${tmp}" + +tmp="$function_sections" +if test "$function_sections_forced" = "yes" +then + tmp="${tmp} (forced)" +else + tmp="${tmp} (autodetected)" +fi +echo "Function sections: ${tmp}" + +echo "Compile-time warnings: ${CC_WARNINGS}" +if test "$NCP_TRACE_ENABLE" = "1" +then + tmp="yes" +else + tmp="no" +fi +echo "NCP trace: ${tmp}" +echo "NCP debug: ${NCP_DEBUG_ENABLE}" +echo diff --git a/contrib/libtrace/Makefile b/contrib/libtrace/Makefile new file mode 100644 index 0000000..8fd08c9 --- /dev/null +++ b/contrib/libtrace/Makefile @@ -0,0 +1,25 @@ +# +# +# +top_srcdir = ../.. +top_builddir = ../.. +this_srcdir = ${top_srcdir}/contrib/libtrace + +include ${top_builddir}/Make.rules + +.PHONY : all clean distclean mrproper + +all: tracencp.so + +tracencp.so: tracencp.c allsyms.c + $(CC) $(CFLAGS) -o tracencp.so -shared tracencp.c -L${top_builddir}/lib -lncp -ldl + +allsyms.c: ${top_builddir}/lib/libncp.so + objdump -T ${top_builddir}/lib/libncp.so | grep 'DF .text' | rev | cut -d" " -f1 | rev | sed 's/^\(.*\)$$/DO_ASM_SYMBOL_EASY(\1)/' > allsyms.c + +clean: + -rm -f allsyms.c tracencp.so + +distclean: clean + +mrproper: clean diff --git a/contrib/libtrace/README b/contrib/libtrace/README new file mode 100644 index 0000000..dba4202 --- /dev/null +++ b/contrib/libtrace/README @@ -0,0 +1,96 @@ +Hello everybody, + +ltrace does not trace calls made to dynamically loaded objects, +and this made my testing of ncpfs Perl wrapper very hard, as +I was not able to confirm what's going inside without adding +debugging prints into either ncpfs or into generated wrapper... + +I found this unacceptable, and so I cooked this code. You can +use it to create wrapper around any library you want, it just +must be dynamic library, not a static one. + +Usage is simple: + +NCP_TRACE_FILE=demo.trc LD_PRELOAD=./tracencp.so demo.pl + +and enjoy demo.trc file. + +I hope that in future I'll be able to persuade SWIG to create +trace_in_* and trace_out_* wrappers for me automatically - but +of course you can do it yourself meanwhile. + +trace_in_XXX function has same arguments as XXX function, with +two parameters added in front of the list - const char* functionName +and void* caller. trace_out_XXX function has also arguments of +wrapped function - with added int returnValue and void* caller. +So for example for NWDSFreeContext() you have: + +NWDSCCODE NWDSFreeContext(NWDSContextHandle ctx); +void trace_in_NWDSFreeContext(const char* name, void* addr, NWDSContextHandle ctx); +void trace_out_NWDSFreeContext(NWDSCCODE err, void* addr, NWDSContextHandle ctx); + +You should not modify arguments passed to you - depending on +optimization level your changes may be visible to function you +are wrapping and/or to caller. And you should use logprintf() +in trace_in_* and resprintf() in trace_out_*. These functions +take a care of automatic indenting and printing address of caller. + +And of course, currently there are several limitations: +- only i386 version exists... Write your own assembly code, and send me it + if you want this on your architecture. +- you cannot create C wrappers around functions which return 64bit + quantities (if you'll cook wrapper in assembly, you'll find upper + 32bits in %edx register). +- on callchain deeper than 256 levels it dies. +- versioned symbols are not properly wrapped with version, they + are wrapped without version information. +- maybe more... Use of weak symbols is intentional feature and not a bug. + +Example (this example also shows that context handle is automatically +destroyed when it is no longer referenced from Perl - this is why +I wrote this tracer...): + +$ NCP_TRACE_FILE=demo.trc LD_PRELOAD=./tracencp.so demo.pl +NWDSCreateContext() = ok, ctx=ncpfs::NWDSContextHandle=SCALAR(0x80f6408) +NWDSDuplicateContext(ctx) = ok, nctx=ncpfs::NWDSContextHandle=SCALAR(0x80f6444) +$ cat demo.trc +402B593D: NWDSCreateContext() = ... +401E3787: NWDSCreateContextHandle() = ... +401E3242: NWDSInitRequester() = ... +401E22B2: my_iconv() = 0 +401E22C0: my_iconv_close() = 0 +(cont'd.) ... = 0 +401E3377: NWDSSetContext() = ... +401E39B3: my_iconv_open() = 135390952 +401E39D6: my_iconv_open() = 135305312 +(cont'd.) ... = 0 +401E33CA: NWDSSetTransport() = 0 +(cont'd.) ... = 0 +(cont'd.) ... = 137280664 +402B5BB0: NWDSDuplicateContext() = ... +401E37BE: NWDSDuplicateContextHandle() = ... +401E3508: NWDSSetContext() = ... +401E39B3: my_iconv_open() = 135292056 +401E39D6: my_iconv_open() = 135291776 +(cont'd.) ... = 0 +401E360E: NWDSSetContext() = ... +401E39B3: my_iconv_open() = 135404088 +401E39D6: my_iconv_open() = 135733664 +401E3A05: my_iconv_close() = 0 +401E3A22: my_iconv_close() = 0 +(cont'd.) ... = 0 +(cont'd.) ... = 0 +(cont'd.) ... = 136991752 +40255E93: NWDSFreeContext() = ... +401E36A1: my_iconv_close() = 0 +401E36B5: my_iconv_close() = 0 +(cont'd.) ... = 0 +40255E93: NWDSFreeContext() = ... +401E36A1: my_iconv_close() = 0 +401E36B5: my_iconv_close() = 0 +(cont'd.) ... = 0 +$ + + Enjoy, + Petr Vandrovec + vandrove@vc.cvut.cz diff --git a/contrib/libtrace/demo.pl b/contrib/libtrace/demo.pl new file mode 100755 index 0000000..cbfff22 --- /dev/null +++ b/contrib/libtrace/demo.pl @@ -0,0 +1,24 @@ +#! /usr/bin/perl -w + +use strict; +use diagnostics; + +use ncpfs; + +my ($err,$ctx); + +print 'NWDSCreateContext() = '; +$ctx = ncpfs::NWDSCreateContext(); +if (not defined($ctx)) { + print "failed\n"; +} else { + my ($nctx); + print "ok, ctx=$ctx\n"; + print 'NWDSDuplicateContext(ctx) = '; + $nctx = ncpfs::NWDSDuplicateContext($ctx); + if (not defined($nctx)) { + print "failed\n"; + } else { + print "ok, nctx=$nctx\n"; + } +} diff --git a/contrib/libtrace/demo.trc b/contrib/libtrace/demo.trc new file mode 100644 index 0000000..b16bf1b --- /dev/null +++ b/contrib/libtrace/demo.trc @@ -0,0 +1,35 @@ +402B593D: NWDSCreateContext() = ... +401E3787: NWDSCreateContextHandle() = ... +401E3242: NWDSInitRequester() = ... +401E22B2: my_iconv() = 0 +401E22C0: my_iconv_close() = 0 +(cont'd.) ... = 0 +401E3377: NWDSSetContext() = ... +401E39B3: my_iconv_open() = 135390952 +401E39D6: my_iconv_open() = 135305312 +(cont'd.) ... = 0 +401E33CA: NWDSSetTransport() = 0 +(cont'd.) ... = 0 +(cont'd.) ... = 137280664 +402B5BB0: NWDSDuplicateContext() = ... +401E37BE: NWDSDuplicateContextHandle() = ... +401E3508: NWDSSetContext() = ... +401E39B3: my_iconv_open() = 135292056 +401E39D6: my_iconv_open() = 135291776 +(cont'd.) ... = 0 +401E360E: NWDSSetContext() = ... +401E39B3: my_iconv_open() = 135404088 +401E39D6: my_iconv_open() = 135733664 +401E3A05: my_iconv_close() = 0 +401E3A22: my_iconv_close() = 0 +(cont'd.) ... = 0 +(cont'd.) ... = 0 +(cont'd.) ... = 136991752 +40255E93: NWDSFreeContext() = ... +401E36A1: my_iconv_close() = 0 +401E36B5: my_iconv_close() = 0 +(cont'd.) ... = 0 +40255E93: NWDSFreeContext() = ... +401E36A1: my_iconv_close() = 0 +401E36B5: my_iconv_close() = 0 +(cont'd.) ... = 0 diff --git a/contrib/libtrace/tracencp.c b/contrib/libtrace/tracencp.c new file mode 100644 index 0000000..5067951 --- /dev/null +++ b/contrib/libtrace/tracencp.c @@ -0,0 +1,139 @@ +#define _GNU_SOURCE +#include +#include +#include +#include +#include + +static void* freestack[256]; +static void** RetAddrPtr = freestack; + +static int infunc = 0; + +static FILE* tracefile = NULL; + +static void linesetup(void) { + int x; + + x = RetAddrPtr - freestack; + while (x--) { + fprintf(tracefile, " "); + } +} + +static void logprintf(void* calladdr, const char * message, ...) { + va_list va; + + if (!tracefile) { + char* x = getenv("NCP_TRACE_FILE"); + + if (x) { + tracefile = fopen(x, "wt"); + } + if (!tracefile) + tracefile = stderr; + } + if (infunc) { + fprintf(tracefile, "...\n"); + } + fprintf(tracefile, "%08lX: ", (unsigned long)calladdr); + linesetup(); + va_start(va, message); + vfprintf(tracefile, message, va); + va_end(va); + infunc = 1; +} + +static void resprintf(const char * message, ...) { + va_list va; + + if (!infunc) { + fprintf(tracefile, "(cont'd.) "); + linesetup(); + fprintf(tracefile, "... = "); + } + va_start(va, message); + vfprintf(tracefile, message, va); + va_end(va); + infunc = 0; +} + +#define DO_ASM_SYMBOL(SYMBOL) \ +asm( \ +".data \n" \ +" .align 4 \n" \ +" .type .L99" #SYMBOL "_wrap,@object \n" \ +" .size .L99" #SYMBOL "_wrap,4 \n" \ +".L99" #SYMBOL "_wrap: \n" \ +" .long 0 \n" \ +".section .rodata \n" \ +".LC0" #SYMBOL ": \n" \ +" .string \"" #SYMBOL "\" \n" \ +".text \n" \ +" .align 4 \n" \ +".globl " #SYMBOL " \n" \ +" .type " #SYMBOL ",@function \n" \ +#SYMBOL ": \n" \ +" movl $trace_in_" #SYMBOL ",%eax \n" \ +" testl %eax,%eax \n" \ +" jne .L8" #SYMBOL " \n" \ +" movl $trace_default_in,%eax \n" \ +".L8" #SYMBOL ": \n" \ +" pushl $.LC0" #SYMBOL " \n" \ +" call *%eax \n" \ +" addl $4,%esp \n" \ +".L3" #SYMBOL ": \n" \ +" cmpl $0,.L99" #SYMBOL "_wrap \n" \ +" jne .L4" #SYMBOL " \n" \ +" pushl $.LC0" #SYMBOL " \n" \ +" pushl $-1 \n" \ +" call dlsym \n" \ +" addl $8,%esp \n" \ +" movl %eax,.L99" #SYMBOL "_wrap \n" \ +" testl %eax,%eax \n" \ +" jne .L4" #SYMBOL " \n" \ +" call __errno_location \n" \ +" movl $-38,(%eax) \n" \ +" movl $-1,%eax \n" \ +" jmp .L6" #SYMBOL " \n" \ +" .p2align 4,,7 \n" \ +".L4" #SYMBOL ": \n" \ +" movl RetAddrPtr,%eax \n" \ +" popl (%eax) \n" \ +" addl $4,RetAddrPtr \n" \ +" pushl $.L99" #SYMBOL "_continue \n" \ +" jmp *.L99" #SYMBOL "_wrap \n" \ +".L99" #SYMBOL "_continue: \n" \ +" addl $-4,RetAddrPtr \n" \ +" movl RetAddrPtr,%ecx \n" \ +" pushl (%ecx) \n" \ +" movl $trace_out_" #SYMBOL ",%ecx \n" \ +" testl %ecx,%ecx \n" \ +" jne .L7" #SYMBOL " \n" \ +" movl $trace_default_out,%ecx \n" \ +".L7" #SYMBOL ": \n" \ +" pushl %eax \n" \ +" call *%ecx \n" \ +" popl %eax \n" \ +".L6" #SYMBOL ": \n" \ +" ret \n" \ +".Lfe1" #SYMBOL ": \n" \ +" .size " #SYMBOL ",.Lfe1" #SYMBOL "-" #SYMBOL "\n"\ +" .weak trace_out_" #SYMBOL " \n" \ +" .weak trace_in_" #SYMBOL " \n"); + +#define DO_ASM_SYMBOL_EASY(SYMBOL) \ +DO_ASM_SYMBOL(SYMBOL) + +void trace_default_in(const char* funcname, void* calladdr) { + logprintf(calladdr, "%s() = ", funcname); +} +void trace_default_out(int result) { + resprintf("%d\n", result); +} + +#include "allsyms.c" + +void trace_out_strnwerror(const char* result) { + resprintf("%s\n", result); +} diff --git a/contrib/nss64/Makefile b/contrib/nss64/Makefile new file mode 100644 index 0000000..f8d73e9 --- /dev/null +++ b/contrib/nss64/Makefile @@ -0,0 +1,27 @@ +NWSDK = /mnt/novell/nwsdk +#NWSDK = /usr/src/ndk +CFLAGS = -DN_PLAT_NLM -nostdinc -fpack-struct -I${NWSDK}/include/nlm -I${NWSDK}/include -W -Wall -Winline -O2 -fomit-frame-pointer -mpreferred-stack-boundary=2 -fverbose-asm +#SERVER = /vana2/sys +SERVER = /nw5/sys + +ncphook.nlm: ncphook.o ncphook.def prelude.o + nlmconv -T ncphook.def -l ld + +prelude.o: prelude.c + $(CC) $(CFLAGS) -c -o prelude.o prelude.c + +ncphook.o: ncphook.s + $(CC) $(CFLAGS) -c ncphook.s + +ncphook.s: ncphook.c ncphook.h + $(CC) $(CFLAGS) -S ncphook.c + +clean: + rm -f *.o *.s *.nlm + +mrproper: clean + +distclean: mrproper + +install: ncphook.nlm + cp ncphook.nlm ${SERVER}/ncphook.nlm diff --git a/contrib/nss64/ncphook.c b/contrib/nss64/ncphook.c new file mode 100644 index 0000000..e59d25f --- /dev/null +++ b/contrib/nss64/ncphook.c @@ -0,0 +1,663 @@ +#include "ncphook.h" +#include +#include +#include +#include +#include +#include + +static unsigned char NSS2NCPErrorTable[5000]; + +static void InitNSS2NCPErrorTable(void) { + memset(NSS2NCPErrorTable, 0xFF, sizeof(NSS2NCPErrorTable)); + + NSS2NCPErrorTable[ 0] = 0x96; + NSS2NCPErrorTable[ 1] = 0xFD; + NSS2NCPErrorTable[ 2] = 0xFD; + NSS2NCPErrorTable[ 4] = 0x77; + NSS2NCPErrorTable[ 7] = 0xFB; + NSS2NCPErrorTable[ 99] = 0xFC; + NSS2NCPErrorTable[ 101] = 0x83; + NSS2NCPErrorTable[ 102] = 0x83; + NSS2NCPErrorTable[ 103] = 0x01; + NSS2NCPErrorTable[ 104] = 0x01; + NSS2NCPErrorTable[ 300] = 0x9C; + NSS2NCPErrorTable[ 400] = 0x9C; + NSS2NCPErrorTable[ 401] = 0x88; + NSS2NCPErrorTable[ 402] = 0x9B; + NSS2NCPErrorTable[ 404] = 0x9E; + NSS2NCPErrorTable[ 405] = 0x9C; + NSS2NCPErrorTable[ 406] = 0x9C; + NSS2NCPErrorTable[ 408] = 0x9C; + NSS2NCPErrorTable[ 409] = 0x9C; + NSS2NCPErrorTable[ 410] = 0x9C; + NSS2NCPErrorTable[ 411] = 0x98; + NSS2NCPErrorTable[ 417] = 0xA0; + NSS2NCPErrorTable[ 421] = 0x01; + NSS2NCPErrorTable[ 438] = 0x82; + NSS2NCPErrorTable[ 439] = 0x9D; + NSS2NCPErrorTable[ 440] = 0x9C; + NSS2NCPErrorTable[ 444] = 0x9C; + NSS2NCPErrorTable[ 445] = 0x2D; + NSS2NCPErrorTable[ 499] = 0x9C; + NSS2NCPErrorTable[ 500] = 0x8E; + NSS2NCPErrorTable[ 501] = 0x8D; + NSS2NCPErrorTable[ 502] = 0x90; + NSS2NCPErrorTable[ 503] = 0x8F; + NSS2NCPErrorTable[ 504] = 0x92; + NSS2NCPErrorTable[ 505] = 0x91; + NSS2NCPErrorTable[ 506] = 0x8B; + NSS2NCPErrorTable[ 507] = 0xA4; + NSS2NCPErrorTable[ 508] = 0x9A; + NSS2NCPErrorTable[ 550] = 0xBE; + NSS2NCPErrorTable[ 601] = 0xCF; + NSS2NCPErrorTable[ 650] = 0x17; + NSS2NCPErrorTable[ 651] = 0x11; + NSS2NCPErrorTable[ 652] = 0x18; + NSS2NCPErrorTable[ 653] = 0x95; + NSS2NCPErrorTable[ 654] = 0x95; + NSS2NCPErrorTable[ 700] = 0xBF; + NSS2NCPErrorTable[ 701] = 0xBF; + NSS2NCPErrorTable[ 702] = 0xBF; + NSS2NCPErrorTable[ 703] = 0xBF; + NSS2NCPErrorTable[ 800] = 0x98; + NSS2NCPErrorTable[ 801] = 0x98; + NSS2NCPErrorTable[ 804] = 0x78; + NSS2NCPErrorTable[ 850] = 0x8C; + NSS2NCPErrorTable[ 851] = 0x84; + NSS2NCPErrorTable[ 856] = 0xFE; + NSS2NCPErrorTable[ 857] = 0x9C; + NSS2NCPErrorTable[ 859] = 0xA8; + NSS2NCPErrorTable[ 860] = 0x94; + NSS2NCPErrorTable[ 861] = 0x93; + NSS2NCPErrorTable[ 862] = 0x8A; + NSS2NCPErrorTable[ 863] = 0x8A; + NSS2NCPErrorTable[ 867] = 0xFC; + NSS2NCPErrorTable[ 868] = 0x8E; + NSS2NCPErrorTable[ 869] = 0x85; + NSS2NCPErrorTable[ 870] = 0x84; + NSS2NCPErrorTable[ 900] = 0xA2; + NSS2NCPErrorTable[ 901] = 0x80; + NSS2NCPErrorTable[ 903] = 0xFE; + NSS2NCPErrorTable[ 905] = 0x80; + NSS2NCPErrorTable[ 906] = 0x80; + NSS2NCPErrorTable[ 907] = 0x80; + NSS2NCPErrorTable[ 908] = 0x80; + NSS2NCPErrorTable[ 1303] = 0x01; + NSS2NCPErrorTable[ 1503] = 0x01; + NSS2NCPErrorTable[ 2000] = 0xA5; +} + +static LONG NSS2NCPError(nuint32 ec) { + if (ec) { + if (ec < 20000 || ec >= 20000 + sizeof(NSS2NCPErrorTable)) { + return 0xFF; + } + return NSS2NCPErrorTable[ec - 20000]; + } + return 0; +} + +static nuint32 nlmHandle; +static nuint32 NCPRTag; +//static nuint32 AllocRTag; +static int ncpHooked = 0; + +static inline void cachePut(struct cacheblk* cacheBlock) { + if (!--cacheBlock->pinCount) { + cacheUnpinned(cacheBlock); + } +} + +static inline void releaseReadReply(struct largeReadControl* lrc) { + struct largeReadControlFrag* lrcf; + unsigned int i; + + lrcf = lrc->frags + 1; + for (i = lrc->fragCount; --i; ) { + struct cacheblk* cacheBlock; + + cacheBlock = lrcf->cacheBlock; + if (cacheBlock) { + cachePut(cacheBlock); + } + lrcf++; + } + return; +} + +static void sendDone(struct ncpSendCacheCB* sendCb) { + struct largeReadControlFrag* lrcf; + struct largeReadControl* lrc; + unsigned int i; + + lrc = (**NW_connectionTable)[sendCb->connNum]->largeReadControl; + lrcf = lrc->frags + 1; + for (i = lrc->fragCount; --i; ) { + mailInterrupt(cachePut, lrcf->cacheBlock); + lrcf++; + } + return; +} + +static inline void __LBL_sSignal(struct semaphore* sem) { + if (!--sem->value && sem->queue) { + LBL_sSignal(sem); + } +} + +static inline void readAsyncCallback(struct LB_async* req) { + struct largeReadControlFrag* lrcf; + + lrcf = req->frag; + if (req->errorCode) { + lrcf->fragAddr = NULL; + lrcf->cacheBlock = NULL; + SetErrno(req->sema->data, req->errorCode); + } else { + struct cacheblk* cacheBlock = req->cacheBlock; + + cacheBlock->pinCount++; + cacheRelease(cacheBlock); + lrcf->fragAddr = cacheBlock->address + (nuint32)lrcf->fragAddr; + lrcf->cacheBlock = cacheBlock; + } + __LBL_sSignal(req->sema); + LB_freeAsyncio(req); +} + +static inline void __LBL_sWait(struct semaphore* sem) { + if (sem->value) { + if (sem->value < 0 || sem->queue) { + LBL_sWait(sem); + } else { + sem->value++; + } + } else { + sem->value = 1; + } +} + +static inline void __LBL_cntSignal(struct semaphore* sem, int val) { + sem->value += val; + if (sem->queue) { + LBL_cntSignal(sem, val); + } +} + +static inline void __LBL_cntWait(struct semaphore* sem, int val) { + if (sem->value < val) { + LBL_cntWait(sem, val); + } else { + sem->value -= val; + } +} + +static inline int __LBL_xIsLocked(struct semaphore* sem) { + return sem->value; +} + +static inline void __LBL_xSignal(struct semaphore* sem) { + sem->value = 0; + if (sem->queue) { + LBL_xSignal(sem); + } +} + +static inline void __LBL_xWait(struct semaphore* sem) { + if (sem->value) { + LBL_xWait(sem); + } else { + sem->value = -1; + } +} + +static nuint32 nssReadEnter; +static nuint32 nssReadExit; +static nuint32 nssGetSizeEnter; +static nuint32 nssGetSizeExit; + +static inline unsigned long long shr(unsigned long long val, unsigned int shift) { + return val >> shift; +} + +void Case72(struct ncpReqInfo* info, struct ncpSend* send, nuint32 unk, nuint32 reqLen, + void* workspace, nuint32 workspaceLen); + +struct fhOffsLen { + nuint16 filehandle_l PACKED; + nuint32 filehandle_h PACKED; + nuint16 rsvd PACKED; + unsigned long long offset PACKED; + unsigned long long length PACKED; + nuint8 data[1]; +}; + +struct fhReq { + nuint16 filehandle_l PACKED; + nuint32 filehandle_h PACKED; + nuint16 rsvd PACKED; +}; + +static void NWSARead(struct ncpReqInfo* info, struct ncpSend* send, struct fhOffsLen* rq, + void* workspace, nuint32 workspaceLen) { + struct fh* nssFD; + nuint32 connNum; + struct zComnFile zFile; + struct zComnInfo zInfo; + + nssReadEnter++; + zFile.fileHandle = rq->filehandle_h; + zFile.nssHandle = 0; + Inst.readRequests++; + connNum = info->conn; + zInfo.errorcode = 0; + zInfo.connection = connNum; + zInfo.conn = NULL; + zInfo.reserved2 = 0; + zInfo.reserved3 = 2; + __LBL_cntWait(&ReserveResource, 32); + if (zFile.nssHandle == NULL) { + nssFD = COMN_DoResolveFileHandle(&zInfo, &zFile); + } else { + nssFD = zFile.nssHandle; + } + if (nssFD) { + if ((nssFD->accessMode & zRR_READ_ACCESS) == 0) { + SetErrno(&zInfo, zERR_NO_READ_PRIVILEGE); + } else { + unsigned long long file_offset; + nuint32 read_length; + unsigned long long file_size; + unsigned long long requestEnd; + unsigned long long pageNumber; + nuint32 firstByte; + struct largeReadControl* lrc; + nuint32 was_read; + struct largeReadControlFrag* lrcf_base; + nuint8 cacheShift; + struct nwconnection* conn; + nuint32 pagesRead; + nuint32 cacheBlockSize; + struct fh2* nssFH2; + struct fh2* nssFH1; + struct semaphore readDoneSema; + struct nxt* fh; + struct largeReadControlFrag* lrcf; + nuint32 readBytes; + + file_offset = rq->offset; + read_length = rq->length > 65536 ? 65536 : rq->length; + + nssFH1 = nssFD->nssFH; + + __LBL_sWait(&nssFH1->sema); + if (((nssFH1->volume->flags & zATTR_COW) == 0) || ((nssFD->x2C & 4) == 0) || ((nssFH2 = nssFH1->altFH) == NULL)) { + nssFH2 = NULL; + file_size = nssFH1->file_size; + } else { + __LBL_sWait(&nssFH2->sema); + file_size = nssFH2->file_size; + } + if (file_size <= file_offset) { + __LBL_cntSignal(&ReserveResource, 32); + if (nssFH2) { + __LBL_sSignal(&nssFH2->sema); + } + __LBL_sSignal(&nssFH1->sema); + *(nuint64*)workspace = 0; + send->ReplyKeep(info, 0, 1, workspace, 8); + goto quit; + } + if (file_size < file_offset + read_length) { + read_length = file_size - file_offset; + } + cacheShift = nssFH1->cacheShift; + cacheBlockSize = 1 << cacheShift; + firstByte = file_offset & (cacheBlockSize - 1); +// asm __volatile__ (" int $3\n"); + pageNumber = shr(file_offset, cacheShift); + readBytes = cacheBlockSize - firstByte; + requestEnd = file_offset + read_length - 1; + requestEnd = shr(requestEnd, cacheShift) - pageNumber; + conn = (**NW_connectionTable)[zInfo.connection]; + if (requestEnd > conn->maxReadCacheBuf) { + read_length = (conn->maxReadCacheBuf - 1) << cacheShift; + } + if (read_length > conn->ncpDataSize - 8) { + read_length = conn->ncpDataSize - 8; + } + fh = &nssFH1->locks; + if (fh->next != fh) { + if (COMN_IsSharedByteRange(&zInfo, nssFH1, file_offset, read_length)) { + SetErrno(&zInfo, zERR_IOLOCK_ERROR); + if (nssFH2) { + __LBL_sSignal(&nssFH2->sema); + } + __LBL_sSignal(&nssFH1->sema); + goto errexit; + } + } + lrc = conn->largeReadControl; + lrc->info = info; + lrc->connNum = connNum; + lrc->send = send; + lrcf_base = lrc->frags; + lrcf_base->cacheBlock = NULL; + lrcf_base->fragLen = 8; + lrcf_base->fragAddr = lrcf_base->buffer; + *(unsigned long long*)(lrcf_base->buffer) = read_length; + was_read = 0; + readDoneSema.queue = 0; + readDoneSema.value = 0; + readDoneSema.data = &zInfo; + pagesRead = 0; + lrcf = lrcf_base + 1; + while (1) { + struct fh2* nssFH; + struct cacheblk* cacheBlock; + + if (readBytes > read_length) { + readBytes = read_length; + } + if (!--PeriodicYieldCount) { + ++Inst.readYieldRequests; + PeriodicYieldCount = 16; + CYieldIfNeeded(); + } + if (nssFH2 && COMN_ReadSnapOrDontCopyToSnap(nssFH1, pageNumber)) { + nssFH = nssFH2; + } else { + nssFH = nssFH1; + } + cacheBlock = fastReadCache(&nssFH->netwareFH, pageNumber); + if (cacheBlock) { + cacheBlock->pinCount++; + cacheRelease(cacheBlock); + lrcf->cacheBlock = cacheBlock; + lrcf->fragAddr = cacheBlock->address + firstByte; + } else { + struct LB_async* req; + + readDoneSema.value++; + req = LB_getAsyncio(); + req->errorCode = 0; + req->netwareFH = &nssFH->netwareFH; + req->cacheBlock = NULL; + req->x50 = 0; + req->x54 = 0; + req->frag = lrcf; + req->sema = &readDoneSema; + req->pageNumber = pageNumber; + lrcf->fragAddr = (void*)firstByte; + asyncReadFileBlk(req, readAsyncCallback); + } + lrcf->fragLen = readBytes; + lrcf++; + was_read += readBytes; + read_length -= readBytes; + if (read_length == 0) { + break; + } + pageNumber++; + pagesRead++; + firstByte = 0; + readBytes = 1 << nssFH1->x94; + } + lrc->fragCount = pagesRead + 2; + ++nssFH1->opsCount; + if (__LBL_xIsLocked(&readDoneSema)) { + __LBL_xWait(&readDoneSema); + __LBL_xSignal(&readDoneSema); + } + __LBL_cntSignal(&ReserveResource, 32); + if (nssFH2) { + __LBL_sSignal(&nssFH2->sema); + } + __LBL_sSignal(&nssFH1->sema); + if (zInfo.errorcode) { + COMN_Release(&nssFH1); + /* __LBL_cntSignal(&ReserveResource, 32); */ + releaseReadReply(lrc); + send->ReplyKeepNoFragments(info, NSS2NCPError(zERR_HARD_READ_ERROR)); + goto quit; + } + Inst.readBytes += was_read; + if (zInfo.conn) { + zInfo.conn->bytesRead += was_read; + } +// asm __volatile__ (" int $3\n"); + send->ReplyReleaseWithFragments(connNum, info, sendDone); + if (pagesRead == pageNumber - nssFD->nextReadAheadPage) { + if (pagesRead) { + nssFD->x2D >>= pagesRead; + nssFD->nextReadAheadPage = pageNumber + 1; + } + if (nssFD->x2D == 0) { + asyncReadAhead(nssFD); + } + } + COMN_Release(&nssFH1); + goto quit; + } + } +errexit:; + __LBL_cntSignal(&ReserveResource, 32); + send->ReplyKeepNoFragments(info, NSS2NCPError(zInfo.errorcode)); +quit:; + COMN_DoReleaseFileHandleIDP(&zInfo, &zFile); + nssReadExit++; + return; +} + +static void NWSAGetSize(struct ncpReqInfo* info, struct ncpSend* send, struct fhReq* rq, + void* workspace, nuint32 workspaceLen) { + struct fh* nssFD; + nuint32 connNum; + struct zComnFile zFile; + struct zComnInfo zInfo; + + nssGetSizeEnter++; + zFile.fileHandle = rq->filehandle_h; + zFile.nssHandle = 0; + connNum = info->conn; + zInfo.errorcode = 0; + zInfo.connection = connNum; + zInfo.conn = NULL; + zInfo.reserved2 = 0; + zInfo.reserved3 = 2; + __LBL_cntWait(&ReserveResource, 32); + if (zFile.nssHandle == NULL) { + nssFD = COMN_DoResolveFileHandle(&zInfo, &zFile); + } else { + nssFD = zFile.nssHandle; + } + if (nssFD) { + struct fh2* nssFH2; + struct fh2* nssFH1; + + nssFH1 = nssFD->nssFH; + + __LBL_sWait(&nssFH1->sema); + if (((nssFH1->volume->flags & zATTR_COW) == 0) || ((nssFD->x2C & 4) == 0) || ((nssFH2 = nssFH1->altFH) == NULL)) { + nssFH2 = NULL; + *(nuint64*)workspace = nssFH1->file_size; + } else { + __LBL_sWait(&nssFH2->sema); + *(nuint64*)workspace = nssFH2->file_size; + } + __LBL_cntSignal(&ReserveResource, 32); + if (nssFH2) { + __LBL_sSignal(&nssFH2->sema); + } + __LBL_sSignal(&nssFH1->sema); + send->ReplyKeep(info, 0, 1, workspace, 8); + } else { + __LBL_cntSignal(&ReserveResource, 32); + send->ReplyKeepNoFragments(info, NSS2NCPError(zInfo.errorcode)); + } + COMN_DoReleaseFileHandleIDP(&zInfo, &zFile); + nssGetSizeExit++; + return; +} + +static void nss64NCP(struct ncpReqInfo* i, struct ncpSend* ncpsend, nuint32 unknown, nuint32 reqLen, + void* workspace, nuint32 workspaceLen) { + nuint32 err; + struct nwconnection* conn; + + conn = (**NW_connectionTable)[i->conn]; + /* Why this happens?! Netware's NCP write suffers from this bug too - you can force it to + write random parts of memory to disk by issuing write command which says that + 60KB of data is going to be written... MTU..60000 bytes will contain random garbage */ + /* We prevent this by truncating request */ + err = 0x7E; +// asm __volatile__ (" int $3\n"); + if (reqLen < offsetof(struct ncpReqInfo, request) + 2) { + goto errquit; + } + reqLen -= offsetof(struct ncpReqInfo, request) - 2; + if (reqLen > conn->ncpDataSize - 8) { + if (i->request[1] == 2) { + reqLen = conn->ncpDataSize - 8; + } else { + goto errquit; + } + } + switch (i->request[1]) { + case 1: + if (reqLen < 8 + 8 + 8) { + break; + } + { + struct fhOffsLen* rq = (struct fhOffsLen*)(i->request + 2); + + err = 0xFF; + if (rq->rsvd != 0) { + break; + } + err = 0x84; + if (((rq->filehandle_l - 1U) & 0xFFFF) != (rq->filehandle_h & 0xFFFF)) { + break; + } + if (!(rq->filehandle_h & 0x80000000U)) { + /* only NSS handles allowed... We have to do some fallback here... */ + break; + } + NWSARead(i, ncpsend, rq, workspace, workspaceLen); + } + return; + case 2: + if (reqLen < 8 + 8 + 8) { + break; + } + reqLen -= 24; + { + struct zComnInfo info; + struct zComnFile file; + struct zComnPosition pos; + struct fhOffsLen* rq = (struct fhOffsLen*)(i->request + 2); + +// asm __volatile__ (" int $3\n"); + + if (rq->length > reqLen) { + rq->length = reqLen; + } + err = 0xFF; + if (rq->rsvd != 0) { + break; + } + err = 0x84; + if (((rq->filehandle_l - 1U) & 0xFFFF) != (rq->filehandle_h & 0xFFFF)) { + break; + } + if (!(rq->filehandle_h & 0x80000000U)) { + /* only NSS handles allowed... We have to do some fallback here... */ + break; + } + Inst.writeRequests++; + info.errorcode = 0; + info.connection = i->conn; + info.conn = NULL; + info.reserved2 = 0; + info.reserved3 = 2; + file.fileHandle = rq->filehandle_h; + file.nssHandle = NULL; + pos.written = 0; + if (rq->length) { + pos.offset = rq->offset; + pos.length = rq->length; + pos.buffer = rq->data; + pos.reserved1 = 0; + COMN_Write(&info, &pos, &file); + Inst.writtenBytes += pos.written; + if (info.conn) { + info.conn->bytesWritten += pos.written; + } + } else { + COMN_SetDataSize(&info, &file, rq->offset, 0); + } + if (info.errorcode) { + ncpsend->ReplyKeepNoFragments(i, NSS2NCPError(info.errorcode)); + } else { + unsigned long long len = pos.written; + ncpsend->ReplyKeep(i, 0, 1, &len, sizeof(len)); + } + COMN_DoReleaseFileHandleIDP(&info, &file); + } + return; + case 3: + if (reqLen < 8) { + break; + } + { + struct fhReq* rq = (struct fhReq*)(i->request + 2); + + err = 0xFF; + if (rq->rsvd != 0) { + break; + } + err = 0x84; + if (((rq->filehandle_l - 1U) & 0xFFFF) != (rq->filehandle_h & 0xFFFF)) { + break; + } + if (!(rq->filehandle_h & 0x80000000U)) { + /* only NSS handles allowed... We have to do some fallback here... */ + break; + } + NWSAGetSize(i, ncpsend, rq, workspace, workspaceLen); + } + return; + default: + break; + } +errquit:; + ncpsend->ReplyKeepNoFragments(i, err); +} + +static void termFn(int dummy) { + if (ncpHooked) { + ncpHooked = 0; + ReleaseNCPVerb(NCPRTag, NCP_NSS64Verb); + } +} + +int main(int argc, char* argv[]) { + int err; + + signal(SIGINT, termFn); + signal(SIGTERM, termFn); + + InitNSS2NCPErrorTable(); + + nlmHandle = GetNLMHandle(); +// AllocRTag = AllocateResourceTag(nlmHandle, "Buffer memory", AllocSignature); + NCPRTag = AllocateResourceTag(nlmHandle, "64-bit Linux NCP calls", NCPVerbRTag); + err = HookNCPVerb(NCPRTag, NCP_NSS64Verb, nss64NCP); + if (err) { + printf("Cannot hook NCP 0x%02X, error = %u!\r\n", NCP_NSS64Verb, err); + return 0; + } + ncpHooked = 1; + ExitThread(TSR_THREAD, 0); +} diff --git a/contrib/nss64/ncphook.def b/contrib/nss64/ncphook.def new file mode 100644 index 0000000..cafc245 --- /dev/null +++ b/contrib/nss64/ncphook.def @@ -0,0 +1,22 @@ +SCREENNAME "none" +VERSION 1 0 1 +COPYRIGHT "(c) 2001 Petr Vandrovec" +DESCRIPTION "NCPs for 64bit file access" +OS_DOMAIN +PSEUDOPREEMPTION +IMPORT memset,printf,signal +IMPORT _SetupArgv,_StartNLM,_TerminateNLM +IMPORT AllocateResourceTag,ExitThread,GetNLMHandle,CYieldIfNeeded +IMPORT HookNCPVerb,ReleaseNCPVerb +IMPORT COMN_Write,COMN_SetDataSize,COMN_DoReleaseFileHandleIDP,COMN_Release +IMPORT COMN_IsSharedByteRange,COMN_DoResolveFileHandle,COMN_ReadSnapOrDontCopyToSnap +IMPORT asyncReadAhead,asyncReadFileBlk,fastReadCache,mailInterrupt +IMPORT cacheUnpinned,cacheRelease +IMPORT LB_getAsyncio,LB_freeAsyncio +IMPORT LBL_sSignal,LBL_sWait,LBL_cntSignal,LBL_cntWait,LBL_xSignal,LBL_xWait +IMPORT SetErrno +IMPORT ReserveResource,NW_connectionTable,PeriodicYieldCount +#MODULE CLIB,MBNWSA +INPUT prelude.o +INPUT ncphook.o +OUTPUT ncphook.nlm diff --git a/contrib/nss64/ncphook.h b/contrib/nss64/ncphook.h new file mode 100644 index 0000000..4e95ad2 --- /dev/null +++ b/contrib/nss64/ncphook.h @@ -0,0 +1,223 @@ +#ifndef __NCP_HOOK_H__ +#define __NCP_HOOK_H__ + +#include +#include + +typedef unsigned long long nuint64; + +LONG AllocateResourceTag(LONG NLMHandle, const unsigned char* description, LONG resourceType); +unsigned int GetNLMHandle(void); +void* Alloc(LONG len, nuint32 rTag); + +#define PACKED __attribute__((packed)) + +#define NCPVerbRTag 0x5650434E + +struct ncpReqInfo { + nuint8 reserved1[33] PACKED; + nuint16 conn PACKED; + nuint8 task PACKED; + nuint8 request[1] PACKED; +}; + +struct ncpConnInfo { + nuint8 reserved1[0x86] PACKED; + nuint32 bytesRead PACKED; + nuint32 bytesWritten PACKED; +}; + +struct ncpSend { + void (*ReplyKeep)(struct ncpReqInfo*, nuint32 error, nuint32 fragCount, void* addr, nuint32 len, ...); + void (*ReplyDisgard)(struct ncpReqInfo*, nuint32 error, nuint32 fragCount, void* addr, nuint32 len, ...); + void (*ReplyKeepNoFragments)(struct ncpReqInfo*, nuint32 error); + void* (*GetReplyKeepBuffer)(struct ncpReqInfo*); + void (*ReplyKeepBufferFilledOut)(struct ncpReqInfo*, nuint32 len); + void (*ReplyKeepNoFragmentsWithStation)(nuint32 conn, nuint32 error); + void (*ReplyUsingAllocBuffer)(struct ncpReqInfo*, nuint32 error, void* base, nuint32 len); + void (*ReplyKeepWithBufferAndFreePtr)(struct ncpReqInfo*, nuint32 error, void* toFree, nuint32 fragCount, void* addr, nuint32 len, ...); + void (*ReplyReleaseWithFragments)(nuint32 conn, struct ncpReqInfo*, void (*fn)()); +}; + +nuint32 HookNCPVerb(nuint32 rTag, nuint32 ncpVerb, void (*ncpFunc)(struct ncpReqInfo*, struct ncpSend*, nuint32, nuint32 reqLen, + void* workspace, nuint32 workspaceLen)); + +nuint32 ReleaseNCPVerb(nuint32 rTag, nuint32 ncpVerb); + +struct cacheblk { + void* address PACKED; + nuint8 y4[0x7B-0x04] PACKED; + nuint8 pinCount PACKED; +}; + +void cacheUnpinned(struct cacheblk*); + +struct ncpSendCacheCB { + nuint8 y0[0x24-0x00] PACKED; + nuint32 connNum PACKED; +}; + +struct largeReadControlFrag { + nuint8 y0[0x04-0x00] PACKED; + void* fragAddr PACKED; + struct cacheblk* cacheBlock PACKED; + nuint32 fragLen PACKED; + nuint8 y10[0x14-0x10] PACKED; + nuint8 buffer[12] PACKED; +}; + +struct largeReadControl { + struct ncpReqInfo* info PACKED; + nuint32 connNum PACKED; + struct ncpSend* send PACKED; + nuint8 y0C[0x14-0x0C] PACKED; + nuint32 fragCount PACKED; + nuint32 y18 PACKED; + struct largeReadControlFrag frags[0] PACKED; +}; + +struct semaphore { + void* queue PACKED; + int value PACKED; + void* data PACKED; +}; + +struct nxt { + struct nxt* next PACKED; +}; + +struct nssVolume { + nuint8 y[0x168-0x00] PACKED; + nuint32 flags PACKED; +}; + +struct fh2 { + nuint8 y0[0x08-0x00] PACKED; + unsigned long long file_size PACKED; + nuint8 y10[0x14-0x10] PACKED; + nuint8 cacheShift PACKED; + nuint8 y15[0x1C-0x15] PACKED; + nuint32 opsCount PACKED; + nuint8 y20[0x38-0x20] PACKED; + struct fh2* altFH PACKED; + nuint8 y3C[0x44-0x3C] PACKED; + struct nssVolume* volume PACKED; + nuint8 y48[0x4C-0x48] PACKED; + nuint32 netwareFH PACKED; + nuint8 y50[0x60-0x50] PACKED; + struct semaphore sema PACKED; + nuint8 y6C[0x94-0x6C] PACKED; + nuint8 x94 PACKED; + nuint8 y95[0xD8-0x95] PACKED; + struct nxt locks PACKED; +}; + +struct fh { + nuint8 y0[0x0C-0x00] PACKED; + struct fh2* nssFH PACKED; + nuint8 y10[0x24-0x10] PACKED; + nuint32 accessMode PACKED; + nuint8 y28[0x2C-0x28] PACKED; + nuint8 x2C PACKED; + nuint8 x2D PACKED; + nuint8 y2E[0x38-0x2E] PACKED; + nuint32 nextReadAheadPage PACKED; +}; + +struct zComnInfo { + nuint32 errorcode PACKED; + nuint32 connection PACKED; + struct ncpConnInfo* conn PACKED; + nuint32 reserved2 PACKED; + nuint32 reserved3 PACKED; +}; + +struct zComnPosition { + unsigned long long offset PACKED; + nuint32 length PACKED; + void* buffer PACKED; + nuint32 reserved1 PACKED; + nuint32 written PACKED; +}; + +struct zComnFile { + nuint32 fileHandle PACKED; + struct fh* nssHandle PACKED; +}; + +struct nwconnection { + nuint8 y0[0x180] PACKED; + nuint32 maxReadCacheBuf PACKED; + struct largeReadControl* largeReadControl PACKED; + nuint32 ncpDataSize PACKED; +}; + +struct LB_async { + nuint8 y0[0x0C-0x00] PACKED; + struct semaphore* sema PACKED; + nuint8 y10[0x3C-0x10] PACKED; + nuint32 errorCode PACKED; + nuint32* netwareFH PACKED; + struct cacheblk* cacheBlock PACKED; + nuint8 y48[0x4C-0x48] PACKED; + nuint32 pageNumber PACKED; + nuint32 x50 PACKED; + nuint8 x54 PACKED; + nuint8 y55[0x6C-0x55] PACKED; + struct largeReadControlFrag* frag PACKED; +}; + +struct { + nuint8 y0[0x54-0x00] PACKED; + nuint32 readYieldRequests PACKED; + nuint8 y58[0x5C-0x58] PACKED; + nuint32 readRequests PACKED; + nuint32 writeRequests PACKED; + nuint32 readBytes PACKED; + nuint32 writtenBytes PACKED; +} Inst; + +extern struct nwconnection* (**NW_connectionTable)[]; +extern struct semaphore ReserveResource; +extern int PeriodicYieldCount; + +extern void LBL_sSignal(struct semaphore*); +extern void LBL_sWait(struct semaphore*); +extern void LBL_cntSignal(struct semaphore*, int); +extern void LBL_cntWait(struct semaphore*, int); +extern void LBL_xSignal(struct semaphore*); +extern void LBL_xWait(struct semaphore*); + +extern void mailInterrupt(void (*)(struct cacheblk*), struct cacheblk*); +extern struct cacheblk* fastReadCache(nuint32*, nuint32 block); +extern void asyncReadFileBlk(struct LB_async*, void (*)(struct LB_async*)); +extern void cacheRelease(struct cacheblk*); +extern void asyncReadAhead(struct fh*); + +extern void SetErrno(struct zComnInfo*, nuint32 nssErrorCode); + +extern void CYieldIfNeeded(void); + +extern void LB_freeAsyncio(struct LB_async*); +extern struct LB_async* LB_getAsyncio(void); + +extern void COMN_Write(struct zComnInfo*, struct zComnPosition*, struct zComnFile*); +extern void COMN_SetDataSize(struct zComnInfo*, struct zComnFile*, unsigned long long offs, nuint32 flags); +extern struct fh* COMN_DoResolveFileHandle(struct zComnInfo*, struct zComnFile*); +extern void COMN_DoReleaseFileHandleIDP(struct zComnInfo*, struct zComnFile*); +extern int COMN_IsSharedByteRange(struct zComnInfo*, struct fh2*, unsigned long long offs, unsigned long long len); +extern int COMN_ReadSnapOrDontCopyToSnap(struct fh2*, unsigned int page); +extern void COMN_Release(struct fh2**); + +#define zRR_READ_ACCESS 0x00000001 + +#define zERR_HARD_READ_ERROR 20101 +#define zERR_NO_READ_PRIVILEGE 20861 +#define zERR_IOLOCK_ERROR 20900 + +#define zATTR_COW 0x00040000 + +#define NCP_NSS64Verb 0xE5 + +#endif /* __NCP_HOOK_H__ */ + diff --git a/contrib/nss64/prelude.c b/contrib/nss64/prelude.c new file mode 100644 index 0000000..8e3a3dc --- /dev/null +++ b/contrib/nss64/prelude.c @@ -0,0 +1,49 @@ +/* + * prelude.c + * Copyright (c) 2001 Petr Vandrovec + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +extern void _TerminateNLM(unsigned int, unsigned int, unsigned int); +extern int _SetupArgv(void*); +extern int _StartNLM(void*, void*, const char*, + const char*, unsigned int, void*, + int (*)(), unsigned int, unsigned int, + unsigned int*, void*); +extern int main(int argc, char* argv[]); + +/* unsigned int _argc = 0; */ +static unsigned int NLMID = 0; + + +static int _cstart_(void) { + return _SetupArgv(main); +} + +void _Stop(void) { + _TerminateNLM(NLMID, 0, 5); +} + +unsigned int _Prelude(void* NLMHandle, void* errorScreen, const char* commandLine, + const char* loadDirectoryPath, + unsigned int uninitializedDataLength, void* NLMFileHandle, + int (*readRoutineP)(), unsigned int customDataOffset, + unsigned int customDataSize) { + return _StartNLM(NLMHandle, errorScreen, commandLine, loadDirectoryPath, + uninitializedDataLength, NLMFileHandle, readRoutineP, customDataOffset, + customDataSize, &NLMID, _cstart_); +} + diff --git a/contrib/pam-snapin/INSTALL b/contrib/pam-snapin/INSTALL new file mode 100644 index 0000000..b89d66b --- /dev/null +++ b/contrib/pam-snapin/INSTALL @@ -0,0 +1,48 @@ + +INSTALLATION: +CONTENT OF THE ZIP: + +Directories: +REALDS8: snapin that recognizes NDS8 Unix attributes see the README inside. + PAMNCP REG Registry entries to add this snapin to current user. + PAMNCP DLL The actual snapin DLL + +DUMMYDS8: snapin for testing on DS7 with dummy attributes (LINUX:*), see the README inside. + PAMNCP REG Registry entries to add this snapin to current user. + PAMNCP DLL The actual snapin DLL +DLLS: modules were compiled with BC++4.5. Make sure that you have CW3215.DLL + if you are going to use precompiled modules. + +Source code are for Borland C 4.5. +I am not sure that the snapin code can be provided under GPL since it +use the copyrighted NDSK API calls and the toolbox to make "snapins". +If you need to recompile , you must have subscribed to developer.novell.com (free) +to be able to download the latest NDK for C. +As far as the snapin toolkit, it can be found at the follwing place: +------------------------------------------------------------------------ +http://developer.novell.com/graveyard/index.htm + +"downloads from this page are provided as a courtesy to our development +community. From this page, you can access utilities, APIs, and some source +code for items"that are no longer in active development at Novell." +------------------------------------------------------------------------- + +Unzip this file to a temporary directory and proceed as follow, depending of your version of NWAdmin. If you run several versions of NWAdmin, repeat the process for each one. +NWADMIN95.EXE: +1. copy the appropriate pamncp.dll in the sys:public/win95 of your servers. +2. Check that snapin32.dll AND cw3220.dll are there. If absent, make sure they are in a directory of your path, or copy these files from a recent Novell distribution. To sys:public/win95. +3. Double-click on the pamncp.reg icon to register the snapin in the Current User part of the local registry. Note that this step should be done for every user running this snapin. My solution is to create a NAL application for NWadmin95 and to import the pamncp.reg file into its registry settings page. +NWADMINNT.EXE +1. copy the pamncp.dll in the sys:public/winnt of your servers. +2. steps 2 and 3 are identical to the NWADMIN95.EXE installation. + +NWADMIN32: +1. copy the pamncp.dll in the sys:public/win32/snapins directory. No registry entries are needed. + + +A more complete documentation is **under progress** at +http://cipcinsa.insa-lyon.fr/ppollet/pamncp/ + +Patrick Pollet +Feb 05/02/2001 + diff --git a/contrib/pam-snapin/dummyDS8/README b/contrib/pam-snapin/dummyDS8/README new file mode 100644 index 0000000..ef8e563 --- /dev/null +++ b/contrib/pam-snapin/dummyDS8/README @@ -0,0 +1,77 @@ +This VERSION of the snapin is for uses on pré-DS8 +shcemas +It *may* uses the following Unix properties +that must be created with Schemax +with the following names and syntaxes +and associated to USER and GROUP classes. + +If you don't like extending the schema, don't create +theses attributes and stuff everything in L ( Location +attribute) visible on the Identification page of NWADmin. + +For USERS: + +"LINUX:UID" SYN_INTEGER +"LINUX:Primary GroupName" SYN_DIST_NAME +"LINUX:Primary GroupID" SYN_INTEGER +"LINUX:GID" SYN_INTEGER +"LINUX:Login Shell" SYN_CE_STRING +"LINUX:Home Directory" SYN_CE_STRING +"LINUX:Comments" SYN_CI_STRING + +for GROUPS: +"LINUX:GID" SYN_INTEGER + + + +// Either way , the snapin will always try to get *missing* data +// from the L attribute +// Of course NDS8 real or dummy attributes have priority, that is +// if both exists "NDS8" attribute will keep their values and the +// L attribute value will be erased when saving back the NDS. +So you can migrate slowly... + + User: + U:nnn Unix UID + G:nnn Unix GID + S:/.../... Unix Shell + H:/.../.... Unix Home + Group: + G:nnn Unix GID + + Currently the following attributes recognized by the PAM module + are NOT modifiable by this snapin. You should modify them + using the "built-in" string editor of NWADmin under the Identification Page + ( Location attribute): + User: + O: Unix or NDS name of other group ( if that group is a NDS name + and has a N:nnnn attribute, this value will be used for + translation to Unix name, otherwise, a "proper Unix name" + will be made from the NDS one ( remove context part, + skip all spaces and illegal chars and prepend a Z if its + starts by a digit ( this is required by useradd/usermod + that misbehave with a group name starting with a digit) + C: Unix comment, added to the Gecos field after the full name + (-comma separator added) + P: Primary group name. So far the snapin works with the numeric + Primary Group ID for user's. It may change in the next release. + + Of course any other L (location) strings is left untouched by the snapin + ( no error message)! + + + + + + + + + + +Patrick Pollet +Feb 05/02/2001 + + + + + diff --git a/contrib/pam-snapin/dummyDS8/pamncp.dll b/contrib/pam-snapin/dummyDS8/pamncp.dll new file mode 100644 index 0000000..e5d27df Binary files /dev/null and b/contrib/pam-snapin/dummyDS8/pamncp.dll differ diff --git a/contrib/pam-snapin/pamncp.c b/contrib/pam-snapin/pamncp.c new file mode 100644 index 0000000..c412ea4 --- /dev/null +++ b/contrib/pam-snapin/pamncp.c @@ -0,0 +1,2357 @@ +/*------------------------------------------- +NWADmin snapin for PAM_NCP_AUTH module + +version 1.00a (c) Patrick Pollet + patrick.pollet@insa-lyon.fr +detailled documentation: +at http://cipcinsa.insa-lyon.fr/ppollet/pamncp/ + +I am not sure this program cant be distributed +as "Open source" since it use the Netware SDK for C(c) +and the NetWare API for snapins(c) +--------------------------------------------*/ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "pamncp.h" + +// if 1 will use dummy NDS8 attributes (LINUX:*) +// created with ShemaX ( see define below for +// the appropriate names) + +// #define USING_DUMMY_ATTRIBUTES 1 + +// UNDEFINE to USE THE REAL ONES UNIX:* +// Either way , the snapin will always try to get *missing* data +// from the L attribute +// Of course NDS8 real or dummy attributes have priority, that is +// if both exists NDS8 attribut will keep their values and the +// L atribute value will be erased when saving the NDS +/* user + U:nnn Unix UID + G:nnn Unix GID + S:/.../... Unix Shell + H:/.../.... Unix Home + Group + G:nnn Unix GID + + Currently the following attributes recognized by the PAM module + are NOT modifiable by this snapin. You should modify them + using the "built-in" string editor of NWADmin under the Identification Page + ( Location attribute): + User: + O: Unix or NDS name of other group ( if that group is a NDS name + and has a N:nnnn attribute, this value will be used for + translation to Unix name, otherwise, a "proper Unix name" + will be made from the NDS one ( remove context part, + skip all spaces and illegal chars and prepend a Z if its + starts by a digit ( this is required by useradd/usermod + that misbehave with a group name starting with a digit) + C: Unix comment, added to the Gecos field after the full name + (-comma separator added) + P: Primary group name. So far the snapin works with the numeric + Primary Group ID for user's. It may change in the next release. + + Of course any other L (location) strings is left untouched by the snapin + ( no error message)! + */ + +/*------------------------------------------------------------------------*/ +/* Function Prototypes */ +/*------------------------------------------------------------------------*/ +#ifdef __cplusplus +extern "C" +{ +#endif + +NWA_SNAPIN_CALLBACK (NWRCODE) + SnapinPamNcpProcUser (pnstr8 name, nuint16 msg, nparam p1, nparam p2); + +NWA_SNAPIN_CALLBACK (NWRCODE) + SnapinPamNcpProcGroup (pnstr8 name, nuint16 msg, nparam p1, nparam p2); + +// DLG proc: the same for users and groups +BOOL FAR PASCAL PamNcpSnapinUserPageDlg ( + HWND hwnd, + UINT message, + WPARAM wParam, + LPARAM lParam); + +// DLG proc fror help dialog +BOOL FAR PASCAL PamNcpSnapinHelpDlg ( + HWND hwnd, + UINT message, + WPARAM wParam, + LPARAM lParam); + +// DLG proc for trace dialog +BOOL FAR PASCAL PamNcpSnapinTraceDlg ( + HWND hwnd, + UINT message, + WPARAM wParam, + LPARAM lParam); + +NWDSContextHandle GetMeAContext(char * caller); +NWDSCCODE ReadObjectData (NWDSContextHandle cx, char *objectName); +NWDSCCODE ModifyObjectDataDS7 ( NWDSContextHandle cx ,char *objectName); +NWDSCCODE ModifyObjectDataDS8 ( NWDSContextHandle cx ,char *objectName,int page); +NWDSCCODE ReadAttributeDef (NWDSContextHandle cx, char* attrname,Attr_Info_T *attrInfo); +NWDSCCODE ReadUnheritedZenFlags ( char *objectName); + +void ShowAdminPreference (void); +void ReadLinuxProfileLoginScript (NWDSContextHandle cx); +int UpdateLinuxProfileLoginScript ( NWDSContextHandle cx,char* objectName,long nextUID,long nextGID); +void setZenCheckBoxes ( HWND hwnd, char * zenString); +void getZenCheckBoxes ( HWND hwnd, char * zenString); +void setZenCheckBoxesBis ( HWND hwnd, char * zenString) ; +void clearZenCheckBoxesBis ( HWND hwnd) ; +void showHideZenCheckBoxesBis ( HWND hwnd, int show) ; +void mergeZen (char * z1, char *z2); +void trim (char * string); +int doPrompt(int page) ; +void Infos (char *message); +void Debug (char *message); +void Trace (char * fmt,...); +void getNameAndContext (char* sourceDistName ,char* nameBuffer,char* contextBuffer); +long displayError (char* prelude,char* AppRoutineName,char* SysRoutineName,long errVal); +void displayMessage( char* AppRoutineName,char* Message ); + + #ifdef __cplusplus +} +#endif + +/*------------------------------------------------------------------------*/ +/* Defines and structures */ +/*------------------------------------------------------------------------*/ +#define ME "Pam Ncp authentication" +#define VERSION "version 1.00 (c) Patrick Pollet INSA Lyon 2001" +#define VERSION_NUM "v 1.00a" + +/**** translatable strings ******/ +// to translate you must also edit the pamncp.rc file +#define SHOW_UNH "Show unherited" +#define HIDE_UNH "Hide unherited" +#define FROM_DS7 " Basic Unix properties (from Location): " +#define FROM_DS8 " Basic Unix properties (from eDirectory): " +#define UID_INVALID "the Unix user ID must be a number." +#define UID_OUTRANGE "the Unix user ID %d is outside permitted range [%d to %d]." +#define GID_INVALID "the Unix group ID must be a number." +#define GID_OUTRANGE "the Unix group ID %d is outside permitted range [%d to %d]." +#define NO_DEF_LINUX_PROFILE "no default Linux profile" + +// names of NDS attributes used + +#ifndef USING_DUMMY_ATTRIBUTES +// the real ones +#define ATTR_UID "UNIX:UID" +#define ATTR_PGNAME "UNIX:Primary GroupName" +#define ATTR_PGID "UNIX:Primary GroupID" +#define ATTR_GID "UNIX:GID" +#define ATTR_SHELL "UNIX:Login Shell" +#define ATTR_COM "UNIX:Comments" +#define ATTR_HOME "UNIX:Home Directory" +#else +// created with Schemax with the same syntax +// and associated to user class and group class +#define ATTR_UID "LINUX:UID" +#define ATTR_PGNAME "LINUX:Primary GroupName" +#define ATTR_PGID "LINUX:Primary GroupID" +#define ATTR_GID "LINUX:GID" +#define ATTR_SHELL "LINUX:Login Shell" +#define ATTR_COM "LINUX:Comments" +#define ATTR_HOME "LINUX:Home Directory" +#endif + +// the attribute used to test presence of NDS8 +// either real or dummy +#define ATTR_NDS8 ATTR_UID + +// other attributes used +// absent NDS8 attributes are searched in L attribute +// also new properties ( Zenux Flags, Other group...) +#define ATTR_LOCATION "L" + +#define ATTR_LOGIN_SCRIPT "Login Script" +#define ATTR_GRP_MBS "Group Membership" + + +// syntaxes of the used attributes +#define SYN_LOCATION SYN_CI_STRING +#define SYN_LOGIN_SCRIPT SYN_STREAM +#define SYN_UID SYN_INTEGER +#define SYN_PGNAME SYN_DIST_NAME +#define SYN_PGID SYN_INTEGER +#define SYN_GID SYN_INTEGER +#define SYN_SHELL SYN_CE_STRING +#define SYN_COM SYN_CI_STRING +#define SYN_HOME SYN_CE_STRING +#define SYN_GRP_MBS SYN_DIST_NAME + + +// misc +#define MAX_STRINGS 32 +#define EGAL " = " +#define CR_LF "\r\n" // was inverted in v <105d +#define YES "Y" +#define NO "N" + + +// snapin defaults are searched in the login script +// of a Profile object named "Linux Profile" +// search starts in current objet context and , if +// not found, move up contexts up to [ROOT] +// search DOES not go in "brother contexts" at any level. +// the first found get the ticket ( no merging of defaults) +#define LINUX_PROFILE "Linux Profile" + +/*** sample login script (case sensitive for now) +no space at the beginning of any line ! +comment with any caracter (# for readability), but +a simple space will do ! +[common] +debug=0 +prompt=1 +[user] +# range of valid Unix UID +minUID=1000 +maxUID=60000 +# range of valid Unix primary group GID +minGID=100 +maxGID=60000 +# default value for primary GID +defGID=100 +#default shell +shell=/bin/bash +#default home. +#the common name of current user will be appended +#after conversion to lower case +#the ending / is REQUIRED +home=/home/ +#default Zenux Flag for user +#F,T: allow remote access by FTP and Telnet +#M: create a ~/.forward file with the NDS property +#Email Address(obsolete) or Internet Email Address +zen=FMT + +[group] +# range of valid group ID +minGID=101 +maxGID=60000 +#default Zenux Flag for members +#A=automount Netware home directory in ~/nwhome +zen=A + +[current] +#this section MUST stay at the end +#since it will be overwritten by the snapin +#in case you selected "automatic values" +#it keeps in NDS the next values to be used +#thus ensuring unique IDS in that context and all BELOW. +nextUID=2000 +nextGID=550 +****************/ + +#define USER_SECTION "[user]" +#define GRP_SECTION "[group]" +#define CUR_SECTION "[current]" +#define COM_SECTION "[common]" + +#define MYHOME "\nhome" +#define MYSHELL "\nshell" +#define MYZEN "\nzen" +#define MYMINUID "\nminUID" +#define MYMAXUID "\nmaxUID" +#define MYMINGID "\nminGID" +#define MYMAXGID "\nmaxGID" +#define MYDEFGID "\ndefGID" +#define MYNEXTUID "\nnextUID" +#define MYNEXTGID "\nnextGID" +#define MYDEBUG "\ntrace" +#define MYPROMPT "\nprompt" + +// default vlues if Linux Profile not found or incomplete +#define DEF_MINUID 1000 +#define DEF_MAXUID 60000 +#define DEF_MINGID_USR 500 +#define DEF_MAXGID_USR 30000 +#define DEF_GID_USR 100 +#define DEF_MINGID_GRP 500 +#define DEF_MAXGID_GRP 30000 +#define DEF_ZEN_USR "" +#define DEF_ZEN_GRP "" +#define DEF_HOME "/home/" +#define DEF_SHELL "/bin/bash" + + + +// what has been red from NDS ( what may has changed) +// set when reading but not used (yet) +#define HAD_UID8 0x0001 +#define HAD_GID8 0x0002 +#define HAD_GID18 0x0004 +#define HAD_SHELL8 0x0008 +#define HAD_HOME8 0x0010 +#define HAD_PGNAME8 0x0020 +#define HAD_COM8 0x0040 +#define HAD_PGID8 0x0080 +#define HAD_NAME8 0x0100 +#define HAD_ZEN 0x0200 +// important flag. If the user had NO location attribute +// we muste create it before adding strings to it. +#define HAD_LOCATION 0x8000 + +// global variables needed by Snapin API +#define NUM_PAGES_USER 1 +#define NUM_PAGES_GRP 1 +#define PAGE_USER 0 +#define PAGE_GROUP 1 + +HINSTANCE hDLL; +NWAPageStruct userPages[NUM_PAGES_USER]; // pages supplementaires +NWAPageStruct groupPages[NUM_PAGES_GRP]; // pages supplementaires + + +// my global variables. +int currentPage =PAGE_USER; // we are editing User or Group object +long DEBUG=0; +nbool bNDS8Around = N_FALSE; // true if NDS8 installed (with UNIX:* attributes) +char currentObject[MAX_DN_CHARS]; // DN of current user +char linuxProfileObjectUsed[MAX_DN_CHARS]=""; + +// some day I will use this struct ... ;-) +struct uInfo { + char initValues[MAX_DN_CHARS][MAX_STRINGS]; // initial values of Location + int nInitValues; // number of loaction red from NDS + char newValues[MAX_DN_CHARS][MAX_STRINGS]; // final values of Location + int nNewValues; // number of location to write back to NDS + long currentUID; + long currentGID; + char currentSHELL[MAX_DN_CHARS]; + char currentHOME[MAX_DN_CHARS]; + char currentPGNAME[MAX_DN_CHARS]; + char currentZEN[MAX_DN_CHARS]; + char currentCOMMENT[MAX_DN_CHARS]; + char unheritedZEN[MAX_DN_CHARS]; + + long newUID; + long newGID; + char newSHELL[MAX_DN_CHARS]; + char newHOME[MAX_DN_CHARS]; + char newPGNAME[MAX_DN_CHARS]; + + int currentReadFLAG; // what has been red + int bChanged; // has changed ? + int bShouldUpdateCurrent; +}; + +char initValues[MAX_DN_CHARS][MAX_STRINGS]; // initial values of Location +int nInitValues=0; // number of loaction red from NDS +char newValues[MAX_DN_CHARS][MAX_STRINGS]; // final values of Location +int nNewValues=0; // number of location to write back to NDS +long currentUID=-1; +long currentGID=-1; +char currentSHELL[MAX_DN_CHARS]=""; +char currentHOME[MAX_DN_CHARS]=""; +char currentPGNAME[MAX_DN_CHARS]=""; +char currentZEN[MAX_DN_CHARS]=""; +char currentCOMMENT[MAX_DN_CHARS]=""; +char unheritedZEN[MAX_DN_CHARS]=""; + +long newUID=-1; +long newGID=-1; +char newSHELL[MAX_DN_CHARS]=""; +char newHOME[MAX_DN_CHARS]=""; +char newPGNAME[MAX_DN_CHARS]=""; + +int currentReadFLAG =0; // what has been red +int bChanged =0; // has changed ? +int bShouldUpdateCurrent=0; + +// these values are set to contents of Linux Profile +// or reset to default values at every opening +// of a detail page ... +long gMinUID=-1; +long gMaxUID=-1; +long gNextUID=-1; +long gMinGID=-1; +long gMaxGID=-1; +long gNextGID=-1; +long gDefGID=-1; +char gDefHome[MAX_DN_CHARS]=""; +char gDefShell[MAX_DN_CHARS]=""; +char gDefZen[MAX_DN_CHARS]=""; +long gPrompt =0; // ask confirm before "stuffing in" next and default values + +NWDSContextHandle MyContext; + +// must be static to stay !on screen between users !!! +static nbool bTraceWindowVisible=FALSE; +static HWND TraceWindowhwnd; + +// content of the comboBox for possible shells +struct shellElement { + char * name; + char * shell; +}; + +static struct shellElement SHELLS []={ +{"Bourne","/bin/bash"}, +{"C","/bin/tch"}, +{"Korne","/bin/ksh"}, +{"Other",""} +}; +#define NB_SHELLS 4 + +/*****************************************************************************/ +// must be called at every call with NWA_GET_PAGECOUNT +// that is just before opening the user or group details multipage dialog +// name = FQDN of object being edited +/*****************************************************************************/ +int doInitValues (char * name, int page) { + + int retERR=NWA_RET_SUCCESS; + + currentPage=page; // don't forget that ! + currentReadFLAG =0; // what has been red + bChanged=FALSE; + bShouldUpdateCurrent=FALSE; + memset(initValues,0,sizeof(initValues)); + memset(linuxProfileObjectUsed,0,sizeof(linuxProfileObjectUsed)); + nInitValues=0; + nNewValues=0; + memset(currentObject,0,sizeof(currentObject)); + currentUID=-1; + currentGID=-1; + newUID=-1; + newGID=-1; + memset(currentSHELL,0,sizeof(currentSHELL)); + memset(currentHOME,0,sizeof(currentHOME)); + memset(currentPGNAME,0,sizeof(currentPGNAME)); + memset(newSHELL,0,sizeof(newSHELL)); + memset(newHOME,0,sizeof(newHOME)); + memset(newPGNAME,0,sizeof(newPGNAME)); + + memset(currentZEN,0,sizeof(currentZEN)); + memset(currentCOMMENT,0,sizeof(currentCOMMENT)); + memset(unheritedZEN,0,sizeof(unheritedZEN)); + if (name) { // should be ?? + lstrcpy(currentObject,name); + MyContext=GetMeAContext("PamNcp Snapin:doInitValues"); + retERR=NWA_ERR_ERROR; + if (MyContext !=(NWDSContextHandle) ERR_CONTEXT_CREATION) + { + // doit first, the DEBUG flag may be modified there + ReadLinuxProfileLoginScript (MyContext); + if (DEBUG && !bTraceWindowVisible) { + CreateDialog (hDLL,"TRACE_DLG",NULL,PamNcpSnapinTraceDlg); + bTraceWindowVisible=TRUE; + } + bNDS8Around=ReadAttributeDef (MyContext,ATTR_NDS8,NULL)==0; + ShowAdminPreference(); + // what to do if error ? + // if I return NWA_ERR_ERROR it may stop the loading + // of all the user's detail page !!! + if (!ReadObjectData(MyContext,currentObject)) + retERR=NWA_RET_SUCCESS; // OK OK + NWDSFreeContext (MyContext); + } + } + if (bTraceWindowVisible) + if (nInitValues) + Trace ("%d Unix properties found in L. ",nInitValues); + else + Trace ("No Unix properties found in L."); + Trace ("End of process IniSnapin: %s.","doInitValues"); + return retERR; +} + + +int doSaveValues (void ) { +NWDSCCODE err; + Trace ("Begin of process:PamNcp Snapin:doSaveValues:%s"," "); + if (bChanged && currentObject[0]) { // really important ! + MyContext=GetMeAContext("PamNcp Snapin:doSaveValues:"); + if (MyContext !=(NWDSContextHandle) ERR_CONTEXT_CREATION) + { + err=ModifyObjectDataDS7(MyContext,currentObject); + if (!err && bNDS8Around) + err= ModifyObjectDataDS8(MyContext,currentObject,currentPage); + if (!err && bShouldUpdateCurrent) { + Trace (" should update current to NUID=%d NGID%d ",gNextUID,gNextGID); + UpdateLinuxProfileLoginScript (MyContext,linuxProfileObjectUsed,gNextUID,gNextGID); + } + NWDSFreeContext (MyContext); + } + } + // MessageBox (0,"Trouble with Context" ,"",MB_OK); + Trace ("End of process:PamNcp Snapin:doSaveValues:%s"," "); + return 0; +} + +int getNumberAndCheck ( char * buffer, long minV, long maxV, + long * foundV, char * msgInvalid, char* msgOutOfRange){ + + char *v; long n; + char aux[256]; + + trim(buffer); // removes spaces + if (buffer[0]) { + n=strtoul(buffer,&v,10); + if (n) { + if (n>=minV && n<=maxV) { + *foundV=n; + return 0; + } + else { + sprintf (aux,msgOutOfRange,n,minV,maxV); + displayMessage (ME,aux); + } + } + else displayMessage(ME,msgInvalid); + return -1; + } + *foundV =-1; // just says it's empty + return 0; // OK if empty +} + + +int collectValues (HWND hwnd, int page) { +char aux [MAX_DN_CHARS+1]; +// this is the point where I should set bChanged to true or false + nNewValues=0; + getZenCheckBoxes (hwnd, aux); + if (strlen(aux)) // not empty + sprintf(newValues[nNewValues++],"Z:%s",aux); + + if (page==PAGE_GROUP) { + // GetDlgItem() returns the number of caracters copied or 0 if fails ! + // this edit line is hidden in user oject page + if (GetDlgItemText(hwnd,IDC_EDIT_GID1,aux,sizeof(aux))) { + if (getNumberAndCheck(aux,gMinGID,gMaxGID,&newGID,GID_INVALID,GID_OUTRANGE)) + return 1; + if (!bNDS8Around) // goes to a location string + sprintf(newValues[nNewValues++],"G:%s",aux); + }else newGID=-1; // empty + + // this edit line is hidden in user oject page + if (GetDlgItemText(hwnd,IDC_EDIT_GNAME,aux,sizeof(aux))) + sprintf(newValues[nNewValues++],"N:%s",aux); // not a NDS8 attribute + + }else { // unneeded test since the others are "non visible" and empty + + if (GetDlgItemText(hwnd,IDC_EDIT_UID,aux,sizeof(aux))) { + if (getNumberAndCheck(aux,gMinUID,gMaxUID,&newUID,UID_INVALID,UID_OUTRANGE)) + return 1; + if (!bNDS8Around) + sprintf(newValues[nNewValues++],"U:%s",aux); + }else newUID=-1; //empty + + if (GetDlgItemText(hwnd,IDC_EDIT_GID,aux,sizeof(aux))) { + if (getNumberAndCheck(aux,gMinGID,gMaxGID,&newGID,GID_INVALID,GID_OUTRANGE)) + return 1; + if (!bNDS8Around) + sprintf(newValues[nNewValues++],"G:%s",aux); + }else newGID=-1; //empty + + if (GetDlgItemText(hwnd,IDC_EDIT_SHELL,aux,sizeof(aux))) + if (!bNDS8Around) + sprintf(newValues[nNewValues++],"S:%s",aux); + else + sprintf(newSHELL,aux); // for ModifyObjectNDS8 + // newSHELL stays empty otherwise + + if (GetDlgItemText(hwnd,IDC_EDIT_HOME,aux,sizeof(aux))) + if (!bNDS8Around) + sprintf(newValues[nNewValues++],"H:%s",aux); + else + sprintf(newHOME,aux); // for ModifyObjectNDS8 + //newHOME stays empty otherwise + } + return 0; +} + +#define MODEL_MSG_USR "The following values will be used: \n UID= %d \n GID= %d \n Home=%s \n Shell= %s \n Zenux=%s \n" +#define MODEL_MSG_GRP "The following values will be used: \n GID= %d\n Zenux=%s \n" +int doPrompt (int page) { +char message [512]; + if (page==PAGE_USER) + sprintf(message,MODEL_MSG_USR,gNextUID,gDefGID,gDefHome,gDefShell,gDefZen); + else + sprintf(message,MODEL_MSG_GRP,gNextGID,gDefZen); + + return (MessageBox (NULL,message,ME, MB_YESNO+MB_ICONQUESTION)==IDYES); + +} + +/*-------------------------------------------------------------------------*/ +/* Function : DllEntryPoint (32-bit) */ +/* LibMain (16-bit) */ +/* From Snapin API demos */ +/* Description : */ +/* Required for DLL startup */ +/* don't ask me what is does... */ +/*-------------------------------------------------------------------------*/ +#ifdef WIN32 +#ifdef __BORLANDC__ +// the only case I have tested +BOOL WINAPI DllEntryPoint ( + HINSTANCE hinstDLL, + DWORD fdwReason, + LPVOID lpvReserved) +#else +BOOL WINAPI DllMain ( + HINSTANCE hinstDLL, + DWORD fdwReason, + LPVOID lpvReserved) +#endif +{ + (void) lpvReserved; // warnings out ! + switch (fdwReason) + { + case DLL_PROCESS_ATTACH: + { + hDLL = hinstDLL; + } + /* fall through to thread attach code */ + case DLL_THREAD_ATTACH: + { + break; + } + case DLL_THREAD_DETACH: + { + break; + } + case DLL_PROCESS_DETACH: + { + break; + } + default: + { + break; + } + } + return 1; +} + +#else +int FAR PASCAL LibMain ( + HINSTANCE hInstance, + WORD wDataSeg, + WORD cbHeapSize, + LPSTR lpCmdLine) +{ + + hDLL = hInstance; + if (cbHeapSize != 0) + { + UnlockData (0); + } + return 1; +}; + +#endif + +/*-------------------------------------------------------------------------*/ +/* Function : InitSnapin */ +/* */ +/* Description : */ +/* Every Snapin DLL must provide this function. In this function, */ +/* snapin menu items (under Tools) are registered. Also, object procs */ +/* are registered. */ +/* */ +/*-------------------------------------------------------------------------*/ +int FAR PASCAL InitSnapin () +{ + NWARegisterObjectProc ( + NWA_DS_OBJECT_TYPE, + C_USER, // we provide a page from class User + VERSION, + hDLL, + SnapinPamNcpProcUser, // call me back here + NWA_SNAPIN_VERSION); + NWARegisterObjectProc ( + NWA_DS_OBJECT_TYPE, + C_GROUP, // we provide a page from class Group + VERSION, + hDLL, + SnapinPamNcpProcGroup, // call me back here + NWA_SNAPIN_VERSION); + return NWA_RET_SUCCESS; +} + + +/*-------------------------------------------------------------------------*/ +/* Description : */ +/* Snapin Class Proc */ +/* must be exported in .DEF */ +/*-------------------------------------------------------------------------*/ +N_GLOBAL_CALLBACK (NWRCODE) +SnapinPamNcpProcUser (pnstr8 name, nuint16 msg, nparam p1, nparam p2){ + + switch (msg) + { + case NWA_MSG_INITSNAPIN: { + /*-------------------------------------------------*/ + /* initialize page(s) */ + /*-------------------------------------------------*/ + userPages[0].dlgProc = (DLGPROC) PamNcpSnapinUserPageDlg; + userPages[0].resName = "PAMNCP_UPAGE"; + userPages[0].pageTitle =ME; + userPages[0].initParam = 0; + return NWA_RET_SUCCESS; + } + case NWA_MSG_GETPAGECOUNT: { + if (!doInitValues(name,PAGE_USER)) + return NUM_PAGES_USER; + else return NWA_ERR_ERROR; + } + case NWA_MSG_REGISTERPAGE: { + NWAPageStruct *pageInfo =(NWAPageStruct *)p2; + pageInfo->dlgProc = userPages[p1].dlgProc; + pageInfo->resName = userPages[p1].resName; + pageInfo->pageTitle = userPages[p1].pageTitle; + pageInfo->hDLL = hDLL; + pageInfo->initParam = userPages[p1].initParam; + return NWA_RET_SUCCESS; + } + case NWA_MSG_MODIFY: { + doSaveValues(); + return NWA_RET_SUCCESS; + } + case NWA_MSG_CLOSESNAPIN: { + if (bTraceWindowVisible) { + DestroyWindow (TraceWindowhwnd); + bTraceWindowVisible=FALSE; + } + return NWA_RET_SUCCESS; + } + default: { + break; + } + } + return NWA_RET_SUCCESS; +} + + +// about the same for group +// we use the same "front end" and hide or show some interface elements +/*-------------------------------------------------------------------------*/ +/* Description : */ +/* Snapin Class Proc */ +/* must be exported in .DEF */ +/*-------------------------------------------------------------------------*/ +N_GLOBAL_CALLBACK (NWRCODE) +SnapinPamNcpProcGroup (pnstr8 name, nuint16 msg, nparam p1, nparam p2){ + + switch (msg) + { + case NWA_MSG_INITSNAPIN: { + /*-------------------------------------------------*/ + /* initialize pages */ + /*-------------------------------------------------*/ + groupPages[0].dlgProc = (DLGPROC) PamNcpSnapinUserPageDlg; + groupPages[0].resName = "PAMNCP_UPAGE"; + groupPages[0].pageTitle =ME; + groupPages[0].initParam = 0; + return NWA_RET_SUCCESS; + } + case NWA_MSG_GETPAGECOUNT: { + if (!doInitValues(name,PAGE_GROUP)) + return NUM_PAGES_GRP; + else return NWA_ERR_ERROR; + } + case NWA_MSG_REGISTERPAGE: { + NWAPageStruct *pageInfo =(NWAPageStruct *)p2; + pageInfo->dlgProc = groupPages[p1].dlgProc; + pageInfo->resName = groupPages[p1].resName; + pageInfo->pageTitle = groupPages[p1].pageTitle; + pageInfo->hDLL = hDLL; + pageInfo->initParam = groupPages[p1].initParam; + return NWA_RET_SUCCESS; + } + case NWA_MSG_MODIFY: { + doSaveValues(); + return NWA_RET_SUCCESS; + } + case NWA_MSG_CLOSESNAPIN: { + // evite une GPF en quittant ??? + if (bTraceWindowVisible) { + DestroyWindow (TraceWindowhwnd); + bTraceWindowVisible=FALSE; + } + return NWA_RET_SUCCESS; + } + default: { + break; + } + } + return NWA_RET_SUCCESS; +} + + +/*-------------------------------------------------------------------------*/ +/* Function : PamNCPSnapinPageDlg */ +/* */ +/* Description : */ +/* Page dialog proc to enhance User's or Group's details Details. */ +/* no need to export it in .def file */ +/*-------------------------------------------------------------------------*/ +BOOL FAR PASCAL PamNcpSnapinUserPageDlg ( + HWND hwnd, + UINT message, + WPARAM wParam, + LPARAM lParam) { + + char auxBuf [33]; + int i,selected; + +(void) lParam; // warnings out ! + switch (message) + { + case WM_INITDIALOG: + {// called if admin press my page button + // setup control + Trace("Begin of process WM_INITDIALOG%s."," "); + SetDlgItemText(hwnd,IDC_VERSION_NUM,VERSION_NUM); + if (bNDS8Around) + SetDlgItemText(hwnd,IDC_BASIC,FROM_DS8); + else + SetDlgItemText(hwnd,IDC_BASIC,FROM_DS7); + setZenCheckBoxes (hwnd,currentZEN); + + ShowWindow (GetDlgItem(hwnd,IDC_EDIT_UID), currentPage==PAGE_USER); + ShowWindow (GetDlgItem(hwnd,IDC_EDIT_GID), currentPage==PAGE_USER); + ShowWindow (GetDlgItem(hwnd,IDC_COMBO_SHELL), currentPage==PAGE_USER); + ShowWindow (GetDlgItem(hwnd,IDC_EDIT_SHELL), currentPage==PAGE_USER); + ShowWindow (GetDlgItem(hwnd,IDC_EDIT_HOME), currentPage==PAGE_USER); + ShowWindow (GetDlgItem(hwnd,IDC_UNHERITED), currentPage==PAGE_USER); + ShowWindow (GetDlgItem(hwnd,IDC_UID_LBL), currentPage==PAGE_USER); + ShowWindow (GetDlgItem(hwnd,IDC_GID_LBL), currentPage==PAGE_USER); + ShowWindow (GetDlgItem(hwnd,IDC_HOME_LBL), currentPage==PAGE_USER); + ShowWindow (GetDlgItem(hwnd,IDC_SHELL_LBL), currentPage==PAGE_USER); + ShowWindow (GetDlgItem(hwnd,IDC_EDIT_GID1), currentPage!=PAGE_USER); + ShowWindow (GetDlgItem(hwnd,IDC_GID1_LBL), currentPage!=PAGE_USER); + ShowWindow (GetDlgItem(hwnd,IDC_EDIT_GNAME), currentPage!=PAGE_USER); + ShowWindow (GetDlgItem(hwnd,IDC_GNAME_LBL), currentPage!=PAGE_USER); + showHideZenCheckBoxesBis (hwnd,currentPage==PAGE_USER); + + // activate or not the "default button" + if (linuxProfileObjectUsed[0]) { + SetDlgItemText(hwnd,IDC_DEFAULT,linuxProfileObjectUsed); + EnableWindow (GetDlgItem(hwnd,IDC_DEFAULT),TRUE); + }else{ + SetDlgItemText(hwnd,IDC_DEFAULT,NO_DEF_LINUX_PROFILE); + EnableWindow (GetDlgItem(hwnd,IDC_DEFAULT),FALSE); + } + if (currentPage==PAGE_USER) { + SetDlgItemText(hwnd,IDC_EDIT_HOME,currentHOME); + SetDlgItemText(hwnd,IDC_EDIT_SHELL,currentSHELL); + + if (currentUID !=-1 && ultoa(currentUID,auxBuf,10)) + SetDlgItemText(hwnd,IDC_EDIT_UID,auxBuf); + else + SetDlgItemText(hwnd,IDC_EDIT_UID,""); + + if (currentGID !=-1 && ultoa(currentGID,auxBuf,10)) + SetDlgItemText(hwnd,IDC_EDIT_GID,auxBuf); + else + SetDlgItemText(hwnd,IDC_EDIT_GID,""); + + selected=0; + for ( i=0; i