diff options
72 files changed, 8237 insertions, 3763 deletions
diff --git a/app/xfs/COPYING b/app/xfs/COPYING index 7f33cbfd2..054ff2773 100644 --- a/app/xfs/COPYING +++ b/app/xfs/COPYING @@ -1,12 +1,146 @@ -This is a stub file. This package has not yet had its complete licensing -information compiled. Please see the individual source files for details on -your rights to use and modify this software. -Please submit updated COPYING files to the Xorg bugzilla: +Copyright 1987, 1990, 1991, 1998 The Open Group -https://bugs.freedesktop.org/enter_bug.cgi?product=xorg +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. -All licensing questions regarding this software should be directed at the -Xorg mailing list: +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. -http://lists.freedesktop.org/mailman/listinfo/xorg +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + + ---------------------------------------------------------------- + +Copyright 1990, 1991 Network Computing Devices; +Portions Copyright 1987 by Digital Equipment Corporation + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation, and that the names of Network Computing Devices, +or Digital not be used in advertising or +publicity pertaining to distribution of the software without specific, +written prior permission. Network Computing Devices, or Digital +make no representations about the +suitability of this software for any purpose. It is provided "as is" +without express or implied warranty. + +NETWORK COMPUTING DEVICES, AND DIGITAL DISCLAIM ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES, OR DIGITAL BE +LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION +OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + ---------------------------------------------------------------- + +Copyright (c) 1987, 1988 X Consortium + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall +not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization +from the X Consortium. + + ---------------------------------------------------------------- + +Copyright (C) 1999 The XFree86 Project, Inc. All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the XFree86 Project shall +not be used in advertising or otherwise to promote the sale, use or other +dealings in this Software without prior written authorization from the +XFree86 Project. + + ---------------------------------------------------------------- + +Copyright 1998 by Thomas E. Dickey <dickey@clark.net> + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of the above listed +copyright holder(s) not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior +permission. + +THE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD +TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE +LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + ---------------------------------------------------------------- + +Copyright © 2003 Keith Packard + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation, and that the name of Keith Packard not be used in +advertising or publicity pertaining to distribution of the software without +specific, written prior permission. Keith Packard makes no +representations about the suitability of this software for any purpose. It +is provided "as is" without express or implied warranty. + +KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, +INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO +EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR +CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. diff --git a/app/xfs/ChangeLog b/app/xfs/ChangeLog index 896916df9..57214ec6d 100644 --- a/app/xfs/ChangeLog +++ b/app/xfs/ChangeLog @@ -1,3 +1,372 @@ +commit eccddc3753e97b0b47c68e59b6650eb314ef5402 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Thu Jun 18 14:00:28 2009 -0700 + + xfs 1.1.0 + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit 7fc0d81f660eaec16f10ebdff6367da7bcc204f9 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Thu Jun 18 10:29:39 2009 -0700 + + remove SCCS ids + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit be599b68334d2dea71e12f478e3201d3087ddf56 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Wed Jun 17 18:56:09 2009 -0700 + + Add --disable-devel-docs flag to configure to skip xfs-design doc conversion + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit 93f75eed7b7dd1208d6d24ec065dfd1518efa599 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Wed Jun 17 17:29:16 2009 -0700 + + Update README and COPYING files and man page + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit 66c3c3e95b0faa005d2a5cdcd196cdc6de027d16 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Wed Jun 17 16:49:20 2009 -0700 + + Add support for starting xfs from inetd + + Adds -inetd command line flag to be used when starting via inetd. + Assumes inetd is set to "wait" mode, and will thus let xfs, once + started, deal with waiting for & handling all further clients, + until xfs is killed. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit 6edc36cf965501149889ebb2a8afe61330f895c5 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Wed Jun 17 16:47:04 2009 -0700 + + Add --enable-syslog (on by default) to configure for use-syslog option + + Oops, guess we missed providing a way to #define USE_SYSLOG in the + Imake -> autoconf conversion. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit 0f3597e7f313bbc231817172b9786cbfe2e974d0 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Tue Jun 16 20:57:43 2009 -0700 + + Bug 22084: XFS server crash with many dropped connections + + http://bugs.freedesktop.org/show_bug.cgi?id=22084 + + Fixes three crashes I hit investigating this report: + + 1) Replace ffs() with a version that handles fd_mask sized arguments instead + of int sized ones, so we don't get stuck in 64-bit builds when fd bits + are set past the 32-bit boundary. (os/WaitFor.c in the X server already does + this.) + + 2) Check that the client OsPrivate isn't already NULL before dismantling it + in CloseDownConnection() + + 3) Make sure we aren't overflowing the pClientsReady buffer when returning + the list of clients ready for processing. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit c8f86a023411c3697fe86beb4be1fe7fffc7e487 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Tue Jun 16 08:16:27 2009 -0700 + + daemon(): use configure to see if it exists, FatalError on failure + + Matches similar changes to xdm's copy of daemon.c + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit 33c5f6836d8233f91b2c3890ef8419894b7a94d0 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Mon Jun 15 19:32:06 2009 -0700 + + Remove leftover includes that should have gone away with c47d3d3795c8d + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit 8d5838bb075dc995dcfce5634c6c70be4ecff832 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Thu Jun 11 17:12:08 2009 -0700 + + Use AC_SYSTEM_EXTENSIONS instead of maintaining _GNU_SOURCE OS list + + Bumps minimum autoconf version required to 2.60 + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit 91c61d56cf6c780db011b8386ce094e11ec5ef42 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Thu Jun 11 17:05:24 2009 -0700 + + Make sure all source files #include "xfs-config.h" + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit 6741315a7e839a3c3e8c725e458ec0da5ad3012b +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Tue Jun 9 13:58:59 2009 -0700 + + Add #includes of access.h to clear prototype warnings + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit 6b8f4459861bda8c2cce70490cca0fe1f7784305 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Mon Jun 8 16:22:33 2009 -0700 + + Convert xfs design doc from troff/.ms to docbook/xml + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit 6fad03d2626c568ba9563a1d4d4f7c85f488341c +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Wed May 27 11:07:29 2009 -0700 + + Remove include/accstr.h from Makefile.am + + Fixes distcheck error introduced by 4b1a9e1a20049fa55f780c8fd4bb9eaba7540712 + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit 2c37901f2f64a0e188dd42386f6364c0a154f78b +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Wed May 27 08:03:45 2009 -0700 + + Move design.ms from xorg-docs/specs/xfs/design.ms to this module + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit 95b40e0235109d4b963d385008bb73636f89aead +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Tue May 19 01:30:52 2009 -0700 + + Update AC_DEFINE_DIR to latest version from Autoconf Archive + +commit 3c2390c461f15386a8e2676572c520f01e9c600f +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Tue May 19 01:20:14 2009 -0700 + + xfs shouldn't re-create the log file every time it clones + + Port to current xfs of a part of the fix for Sun bug 4302139: + patch 108117-01 removes error-file configuration option for xfs + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit 346a316f5e39ca6d99b98372914294988e79758d +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Tue May 19 01:14:11 2009 -0700 + + Simplify OPEN_MAX #ifdefs down to POSIX standard sysconf(_SC_OPEN_MAX) + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit a1583d53a44f65d0930282e193365f5605bde547 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Tue May 19 01:10:06 2009 -0700 + + Crash in CloseSockets() after StopListening() + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit d78622007b9102d1818f2c73a00670351f026262 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Mon May 18 21:28:46 2009 -0700 + + Remove more #if 0 bits + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit 4b1a9e1a20049fa55f780c8fd4bb9eaba7540712 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Mon May 18 21:28:03 2009 -0700 + + Remove unused HostAddress list manipulation code + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit b0c41c110bb05947fccc9a6228bc3e9badff38c5 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Mon May 18 21:06:59 2009 -0700 + + Convert to POSIX standard signal handling + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit c5985b93dd2c96ab9c1cfbfe7881b0f80e349879 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Mon May 18 21:05:35 2009 -0700 + + Fix definition of WRITES macro for debug messages in os/utils.c + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit a97048bd750f2d514dd8bb2959e3bbab4443178e +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Mon May 18 19:50:07 2009 -0700 + + Server miscounts clients who exit before finishing handshake + + nClients could go negative since it wasn't incremented until + ProcInitialConnection, but was always decremented in DoCloseDownClient + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit e47728904d50566ec4390829fc9a511e54e9157e +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Mon May 18 19:17:16 2009 -0700 + + Delete #ifdef MEMBUG code + + Couldn't build since modularization, since it depended on old memleak code + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit 02b3a024b151177246e026d05d8e0efe4eda47b4 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Mon May 18 18:58:46 2009 -0700 + + Coalesce PATH_MAX ifdefs into a single copy in osdep.h + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit c47d3d3795c8d9152dcfed7b806eab1204830e7d +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Mon May 18 18:42:18 2009 -0700 + + Remove X_NOT_POSIX #ifdefs + + Hadn't been compiled since modularization, was previously only used + on pre-POSIX-1.1990 systems, which are no longer supported by X.Org. + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit 7ccc50b6a7dd47f89e3b2aff5accaab4cad24a64 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Mon May 18 16:53:31 2009 -0700 + + Remove #ifdef Lynx code + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit a1d254a81b5dffd0f706c77e28ec72aff11169f8 +Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br> +Date: Wed Jan 21 18:02:36 2009 -0200 + + Correct all sparse warnings. + + All extern declarations were moved from C sources to header files, + with the exception of the new prototype for SnfSetFormat() as it + is not available on installed libXfont headers. + difs/difsutils.c:CopyISOLatin1Lowered() had it's arguments sign + changed to avoid conflict with libXfont's X11/fonts/fontmisc.h + prototype. + +commit f7f149457581fa819c88e1958e7c154a6d9824fa +Author: Ademar de Souza Reis Jr <ademar@mandriva.com.br> +Date: Fri Dec 19 18:43:53 2008 -0800 + + Bug #11567: Fix handling of invalid, non-path FPE + + FPE's which are not valid and are not in the form of paths cause a + failure on the parser which invalidates all subsequent FPEs. If + the invalid FPE is the first on the list, this will cause a + fatal-error and the server will abort. + + https://bugs.freedesktop.org/show_bug.cgi?id=11567 + + Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com> + +commit ffbdfc9bbe8a38a5658197a95e0cf5266ef51604 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Tue Dec 16 16:27:30 2008 -0800 + + `ReadConfigFile': 'fp' might be used uninitialized in this function + + In the unlikely event that default_config_files is completely empty, + fp would never have been set to NULL to trigger error check at line 363. + +commit 158e7f062a21ea4abfe64aa976735804f00bc3b5 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Tue Dec 16 16:24:37 2008 -0800 + + Clear many sparse warnings: Using plain integer as NULL pointer + +commit 2b529e155a2a414cc225d8fd8014ff6c2e8231cb +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Fri Dec 5 08:57:11 2008 -0800 + + Use XORG_CWARNFLAGS & XORG_CHANGELOG from xorg-macros 1.2 + +commit cbd9f1b5b36789474788ca6ff60ccbaee4969ff1 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Fri Dec 5 08:54:43 2008 -0800 + + Clear warnings about redefining command-line -D values in xfstrans.c + +commit b02fa1750fa20cb1784a16cd2402a303146f8c99 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Fri Dec 5 08:51:18 2008 -0800 + + os/daemon.c:100: warning: old-style parameter declaration + +commit 302e3fcf221843d42141f73277911dfab9428d71 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Thu Dec 4 18:01:17 2008 -0800 + + When byte swapping authentication data, try to workaround bad X servers + + Port/reworking of fix for Sun bug 4783714 ("fix for 4764193 [CERT CA-2002-34] + breaks cross-platform font service") to try to figure out whether the + authentication data follows the FS protocol spec or the way the X11 Sample + Implementation has worked for years, and handle it either way. + +commit 3fe28a31a2974287acc182c7c9bfd68d94ea6292 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Thu Dec 4 14:45:17 2008 -0800 + + Don't overcalculate size of authentication packets with no data + + If a font server client wasn't providing any authentication methods, + the code was adding 4 to the packet length, then rejecting the packet + as having more data than the length field said - but the X server + side wasn't actually putting those 4 bytes into the packet anywhere. + +commit c1fda34275583b7ae8d2b1b749bd362443874bda +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Wed Dec 3 19:52:16 2008 -0800 + + Use cpp instead of sed for processing man page & sample config file + + Make fontcache entries in sample config only appear #ifdef FONTCACHE + +commit c66a46e35ae40a23ad9acee838ab42300eddbd67 +Author: Alan Coopersmith <alan.coopersmith@sun.com> +Date: Mon Oct 6 21:19:27 2008 -0700 + + Use configure to determine font path to put into xfs config file + + Uses --default-font-path if specified, otherwise checks for + /etc/X11/fontpath.d, otherwise uses default path copied + from xserver configure.ac + +commit 8b3e40688a9b829eee56d8b2aabadc4093227da6 +Author: Matthieu Herrb <matthieu.herrb@laas.fr> +Date: Fri Jun 13 15:37:13 2008 -0600 + + remove RCS Ids + commit 3e6b854aa4ce0636fd63f63afd04d68b28c0fa68 Author: Brice Goglin <bgoglin@debian.org> Date: Fri May 23 22:29:50 2008 +0200 diff --git a/app/xfs/Makefile.am b/app/xfs/Makefile.am index acaec230d..a93124500 100644 --- a/app/xfs/Makefile.am +++ b/app/xfs/Makefile.am @@ -30,6 +30,8 @@ FONT_FLAGS = -DFONT_PCF -DFONT_FS -DFONT_SPEEDO -DFONTCACHE AM_CPPFLAGS = $(XFS_CFLAGS) -I$(top_srcdir)/include -DXFSPIDDIR=\"/var/run\" \ $(FONT_FLAGS) -D_BSD_SOURCE -DFONT_t -DTRANS_SERVER -DTRANS_REOPEN +AM_CFLAGS = $(CWARNFLAGS) + LDADD = $(XFS_LIBS) xfs_SOURCES = \ @@ -64,7 +66,6 @@ xfs_SOURCES = \ os/waitfor.c \ os/xfstrans.c \ include/access.h \ - include/accstr.h \ include/assert.h \ include/auth.h \ include/authstr.h \ @@ -98,10 +99,9 @@ FSERRORS = /var/log/xfs.log FONTDIR = $(libdir)/X11/fonts -FONTPATH = $(FONTDIR)/misc/,$(FONTDIR)/TTF/,$(FONTDIR)/Type1/,$(FONTDIR)/CID/,$(FONTDIR)/100dpi/,$(FONTDIR)/75dpi/ - -config: config.cpp - sed -e s/XCOMM/\#/ -e s@DEFAULTFONTPATH@$(FONTPATH)@ -e s@FSERRORS@$(FSERRORS)@ < $(top_srcdir)/config.cpp > config +# Strings to replace in config.cpp +CPP_FILES_FLAGS = $(MANDEFS) \ + -DDEFAULTFONTPATH="$(FONTPATH)" -DFSERRORS="$(FSERRORS)" config_DATA = config @@ -117,31 +117,42 @@ CLEANFILES += $(appman_DATA) SED = sed +# Translate XCOMM into pound sign with sed, rather than passing -DXCOMM=XCOMM +# to cpp, because that trick does not work on all ANSI C preprocessors. +# Delete line numbers from the cpp output (-P is not portable, I guess). +# Allow XCOMM to be preceded by whitespace and provide a means of generating +# output lines with trailing backslashes. +# Allow XHASH to always be substituted, even in cases where XCOMM isn't. + +CPP_SED_MAGIC = $(SED) -e '/^\# *[0-9][0-9]* *.*$$/d' \ + -e '/^\#line *[0-9][0-9]* *.*$$/d' \ + -e '/^[ ]*XCOMM$$/s/XCOMM/\#/' \ + -e '/^[ ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/\#/' \ + -e '/^[ ]*XHASH/s/XHASH/\#/' \ + -e '/XSLASHGLOB/s/XSLASHGLOB/\/\*/' \ + -e '/\@\@$$/s/\@\@$$/\\/' + # Strings to replace in man pages XORGRELSTRING = @PACKAGE_STRING@ XORGMANNAME = X Version 11 -MAN_SUBSTS = \ - -e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \ - -e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \ - -e 's|__xservername__|Xorg|g' \ - -e 's|__xconfigfile__|xorg.conf|g' \ - -e 's|__projectroot__|$(prefix)|g' \ - -e 's|__apploaddir__|$(appdefaultdir)|' \ - -e 's|__configdir__|$(configdir)|' \ - -e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \ - -e 's|__libmansuffix__|$(LIB_MAN_SUFFIX)|g' \ - -e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \ - -e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \ - -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g' \ - -e 's|__configfiledesc__|$(CONFIG_FILE_DESC)|g' \ - -e 's|__configfilepath__|$(CONFIG_FILE_PATH)|g' \ - -e 's|XCOMM|\#|g' - -SUFFIXES = .$(APP_MAN_SUFFIX) .man +MANDEFS = \ + -D__xorgversion__="\"$(XORGRELSTRING)\" \"$(XORGMANNAME)\"" \ + -D__appmansuffix__=$(APP_MAN_SUFFIX) \ + -D__libmansuffix__=$(LIB_MAN_SUFFIX) \ + -D__adminmansuffix__=$(ADMIN_MAN_SUFFIX) \ + -D__miscmansuffix__=$(MISC_MAN_SUFFIX) \ + -D__filemansuffix__=$(FILE_MAN_SUFFIX) \ + -D__configfiledesc__="$(CONFIG_FILE_DESC)" \ + -D__configfilepath__="$(CONFIG_FILE_PATH)" + +SUFFIXES = .$(APP_MAN_SUFFIX) .man .cpp + +.cpp: + $(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < $< | $(CPP_SED_MAGIC) > $@ .man.$(APP_MAN_SUFFIX): - sed $(MAN_SUBSTS) < $< > $@ + $(RAWCPP) $(RAWCPPFLAGS) $(MANDEFS) $(EXTRAMANDEFS) < $< | $(CPP_SED_MAGIC) > $@ EXTRA_DIST += ChangeLog MAINTAINERCLEANFILES = ChangeLog @@ -149,7 +160,7 @@ MAINTAINERCLEANFILES = ChangeLog .PHONY: ChangeLog ChangeLog: - (GIT_DIR=$(top_srcdir)/.git git-log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2) + $(CHANGELOG_CMD) dist-hook: ChangeLog @@ -160,3 +171,31 @@ ALL_LINT_FLAGS=$(LINT_FLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ lint: $(LINT) $(ALL_LINT_FLAGS) $(xfs_SOURCES) endif LINT + +# Developer documentation - not installed on system +EXTRA_DIST += doc/xfs-design.xml doc/xfs-design.css doc/xfs-design.xsl + +if MAKE_DEVEL_DOCS +if HAVE_XMLTO +noinst_DATA = doc/xfs-design/index.html doc/xfs-design.pdf doc/xfs-design.txt +CLEANFILES += $(noinst_DATA) + +doc/xfs-design/index.html: $(srcdir)/doc/xfs-design.xml $(srcdir)/doc/xfs-design.xsl doc/xfs-design/xfs-design.css + $(XMLTO) -m $(srcdir)/doc/xfs-design.xsl -o doc/xfs-design xhtml $(srcdir)/doc/xfs-design.xml + +doc/xfs-design/xfs-design.css: $(srcdir)/doc/xfs-design.css + -rm -f doc/xfs-design/xfs-design.css + $(MKDIR_P) doc/xfs-design + cp -pf $(srcdir)/doc/xfs-design.css doc/xfs-design/xfs-design.css + +clean-local: + -rm -rf doc/xfs-design + +doc/xfs-design.pdf: $(srcdir)/doc/xfs-design.xml $(srcdir)/doc/xfs-design.xsl + $(XMLTO) -m $(srcdir)/doc/xfs-design.xsl -o doc pdf $(srcdir)/doc/xfs-design.xml + +doc/xfs-design.txt: $(srcdir)/doc/xfs-design.xml $(srcdir)/doc/xfs-design.xsl + $(XMLTO) -m $(srcdir)/doc/xfs-design.xsl -o doc txt $(srcdir)/doc/xfs-design.xml + +endif HAVE_XMLTO +endif MAKE_DEVEL_DOCS diff --git a/app/xfs/Makefile.in b/app/xfs/Makefile.in index accd3c8d6..b8971a3d1 100644 --- a/app/xfs/Makefile.in +++ b/app/xfs/Makefile.in @@ -59,13 +59,14 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = xfs$(EXEEXT) +@HAVE_XMLTO_TRUE@@MAKE_DEVEL_DOCS_TRUE@am__append_1 = $(noinst_DATA) DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/xfs-config.h.in \ $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ config.guess config.sub depcomp install-sh missing subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) @@ -108,7 +109,7 @@ am__vpath_adj = case $$p in \ am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; appmanDATA_INSTALL = $(INSTALL_DATA) configDATA_INSTALL = $(INSTALL_DATA) -DATA = $(appman_DATA) $(config_DATA) +DATA = $(appman_DATA) $(config_DATA) $(noinst_DATA) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -121,7 +122,6 @@ am__remove_distdir = \ DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print -distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ @@ -137,10 +137,12 @@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ CONFIG_FILE_DESC = @CONFIG_FILE_DESC@ CONFIG_FILE_PATH = @CONFIG_FILE_PATH@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFAULT_CONFIG_FILE = @DEFAULT_CONFIG_FILE@ DEFS = @DEFS@ @@ -154,6 +156,10 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FONTPATH = @FONTPATH@ +GREP = @GREP@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ @@ -172,6 +178,8 @@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ +MAKE_DEVEL_DOCS_FALSE = @MAKE_DEVEL_DOCS_FALSE@ +MAKE_DEVEL_DOCS_TRUE = @MAKE_DEVEL_DOCS_TRUE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ OBJEXT = @OBJEXT@ @@ -183,15 +191,16 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ XFS_CFLAGS = @XFS_CFLAGS@ XFS_LIBS = @XFS_LIBS@ +XMLTO = @XMLTO@ ac_ct_CC = @ac_ct_CC@ -ac_ct_STRIP = @ac_ct_STRIP@ -ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ @@ -206,23 +215,31 @@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ +datarootdir = @datarootdir@ +distcleancheck_listfiles = @distcleancheck_listfiles@ +docdir = @docdir@ +dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ +htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ +localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ +psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ @@ -233,6 +250,7 @@ FONT_FLAGS = -DFONT_PCF -DFONT_FS -DFONT_SPEEDO -DFONTCACHE AM_CPPFLAGS = $(XFS_CFLAGS) -I$(top_srcdir)/include -DXFSPIDDIR=\"/var/run\" \ $(FONT_FLAGS) -D_BSD_SOURCE -DFONT_t -DTRANS_SERVER -DTRANS_REOPEN +AM_CFLAGS = $(CWARNFLAGS) LDADD = $(XFS_LIBS) xfs_SOURCES = \ difs/atom.c \ @@ -266,7 +284,6 @@ xfs_SOURCES = \ os/waitfor.c \ os/xfstrans.c \ include/access.h \ - include/accstr.h \ include/assert.h \ include/auth.h \ include/authstr.h \ @@ -298,44 +315,60 @@ appman_PRE = \ FSERRORS = /var/log/xfs.log FONTDIR = $(libdir)/X11/fonts -FONTPATH = $(FONTDIR)/misc/,$(FONTDIR)/TTF/,$(FONTDIR)/Type1/,$(FONTDIR)/CID/,$(FONTDIR)/100dpi/,$(FONTDIR)/75dpi/ + +# Strings to replace in config.cpp +CPP_FILES_FLAGS = $(MANDEFS) \ + -DDEFAULTFONTPATH="$(FONTPATH)" -DFSERRORS="$(FSERRORS)" + config_DATA = config -EXTRA_DIST = xfs.def config.cpp $(appman_PRE) ChangeLog -CLEANFILES = config $(appman_DATA) + +# Developer documentation - not installed on system +EXTRA_DIST = xfs.def config.cpp $(appman_PRE) ChangeLog \ + doc/xfs-design.xml doc/xfs-design.css doc/xfs-design.xsl +CLEANFILES = config $(appman_DATA) $(am__append_1) appmandir = $(APP_MAN_DIR) appman_DATA = $(appman_PRE:man=@APP_MAN_SUFFIX@) SED = sed +# Translate XCOMM into pound sign with sed, rather than passing -DXCOMM=XCOMM +# to cpp, because that trick does not work on all ANSI C preprocessors. +# Delete line numbers from the cpp output (-P is not portable, I guess). +# Allow XCOMM to be preceded by whitespace and provide a means of generating +# output lines with trailing backslashes. +# Allow XHASH to always be substituted, even in cases where XCOMM isn't. +CPP_SED_MAGIC = $(SED) -e '/^\# *[0-9][0-9]* *.*$$/d' \ + -e '/^\#line *[0-9][0-9]* *.*$$/d' \ + -e '/^[ ]*XCOMM$$/s/XCOMM/\#/' \ + -e '/^[ ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/\#/' \ + -e '/^[ ]*XHASH/s/XHASH/\#/' \ + -e '/XSLASHGLOB/s/XSLASHGLOB/\/\*/' \ + -e '/\@\@$$/s/\@\@$$/\\/' + + # Strings to replace in man pages XORGRELSTRING = @PACKAGE_STRING@ XORGMANNAME = X Version 11 -MAN_SUBSTS = \ - -e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \ - -e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \ - -e 's|__xservername__|Xorg|g' \ - -e 's|__xconfigfile__|xorg.conf|g' \ - -e 's|__projectroot__|$(prefix)|g' \ - -e 's|__apploaddir__|$(appdefaultdir)|' \ - -e 's|__configdir__|$(configdir)|' \ - -e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \ - -e 's|__libmansuffix__|$(LIB_MAN_SUFFIX)|g' \ - -e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \ - -e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \ - -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g' \ - -e 's|__configfiledesc__|$(CONFIG_FILE_DESC)|g' \ - -e 's|__configfilepath__|$(CONFIG_FILE_PATH)|g' \ - -e 's|XCOMM|\#|g' - -SUFFIXES = .$(APP_MAN_SUFFIX) .man +MANDEFS = \ + -D__xorgversion__="\"$(XORGRELSTRING)\" \"$(XORGMANNAME)\"" \ + -D__appmansuffix__=$(APP_MAN_SUFFIX) \ + -D__libmansuffix__=$(LIB_MAN_SUFFIX) \ + -D__adminmansuffix__=$(ADMIN_MAN_SUFFIX) \ + -D__miscmansuffix__=$(MISC_MAN_SUFFIX) \ + -D__filemansuffix__=$(FILE_MAN_SUFFIX) \ + -D__configfiledesc__="$(CONFIG_FILE_DESC)" \ + -D__configfilepath__="$(CONFIG_FILE_PATH)" + +SUFFIXES = .$(APP_MAN_SUFFIX) .man .cpp MAINTAINERCLEANFILES = ChangeLog @LINT_TRUE@ALL_LINT_FLAGS = $(LINT_FLAGS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ @LINT_TRUE@ $(AM_CPPFLAGS) $(CPPFLAGS) +@HAVE_XMLTO_TRUE@@MAKE_DEVEL_DOCS_TRUE@noinst_DATA = doc/xfs-design/index.html doc/xfs-design.pdf doc/xfs-design.txt all: xfs-config.h $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: -.SUFFIXES: .$(APP_MAN_SUFFIX) .man .c .o .obj +.SUFFIXES: .$(APP_MAN_SUFFIX) .man .cpp .c .o .obj am--refresh: @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @@ -925,7 +958,7 @@ distclean-tags: distdir: $(DISTFILES) $(am__remove_distdir) mkdir $(distdir) - $(mkdir_p) $(distdir)/m4 + $(mkdir_p) $(distdir)/doc @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ @@ -1085,9 +1118,11 @@ maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) +@HAVE_XMLTO_FALSE@clean-local: +@MAKE_DEVEL_DOCS_FALSE@clean-local: clean: clean-am -clean-am: clean-binPROGRAMS clean-generic mostlyclean-am +clean-am: clean-binPROGRAMS clean-generic clean-local mostlyclean-am distclean: distclean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) @@ -1139,36 +1174,54 @@ uninstall-am: uninstall-appmanDATA uninstall-binPROGRAMS \ uninstall-configDATA uninstall-info-am .PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ - clean-binPROGRAMS clean-generic ctags dist dist-all dist-bzip2 \ - dist-gzip dist-hook dist-shar dist-tarZ dist-zip distcheck \ - distclean distclean-compile distclean-generic distclean-hdr \ - distclean-tags distcleancheck distdir distuninstallcheck dvi \ - dvi-am html html-am info info-am install install-am \ - install-appmanDATA install-binPROGRAMS install-configDATA \ - install-data install-data-am install-exec install-exec-am \ - install-info install-info-am install-man install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ + clean-binPROGRAMS clean-generic clean-local ctags dist \ + dist-all dist-bzip2 dist-gzip dist-hook dist-shar dist-tarZ \ + dist-zip distcheck distclean distclean-compile \ + distclean-generic distclean-hdr distclean-tags distcleancheck \ + distdir distuninstallcheck dvi dvi-am html html-am info \ + info-am install install-am install-appmanDATA \ + install-binPROGRAMS install-configDATA install-data \ + install-data-am install-exec install-exec-am install-info \ + install-info-am install-man install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-appmanDATA uninstall-binPROGRAMS \ uninstall-configDATA uninstall-info-am -config: config.cpp - sed -e s/XCOMM/\#/ -e s@DEFAULTFONTPATH@$(FONTPATH)@ -e s@FSERRORS@$(FSERRORS)@ < $(top_srcdir)/config.cpp > config +.cpp: + $(RAWCPP) $(RAWCPPFLAGS) $(CPP_FILES_FLAGS) < $< | $(CPP_SED_MAGIC) > $@ .man.$(APP_MAN_SUFFIX): - sed $(MAN_SUBSTS) < $< > $@ + $(RAWCPP) $(RAWCPPFLAGS) $(MANDEFS) $(EXTRAMANDEFS) < $< | $(CPP_SED_MAGIC) > $@ .PHONY: ChangeLog ChangeLog: - (GIT_DIR=$(top_srcdir)/.git git-log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2) + $(CHANGELOG_CMD) dist-hook: ChangeLog @LINT_TRUE@lint: @LINT_TRUE@ $(LINT) $(ALL_LINT_FLAGS) $(xfs_SOURCES) + +@HAVE_XMLTO_TRUE@@MAKE_DEVEL_DOCS_TRUE@doc/xfs-design/index.html: $(srcdir)/doc/xfs-design.xml $(srcdir)/doc/xfs-design.xsl doc/xfs-design/xfs-design.css +@HAVE_XMLTO_TRUE@@MAKE_DEVEL_DOCS_TRUE@ $(XMLTO) -m $(srcdir)/doc/xfs-design.xsl -o doc/xfs-design xhtml $(srcdir)/doc/xfs-design.xml + +@HAVE_XMLTO_TRUE@@MAKE_DEVEL_DOCS_TRUE@doc/xfs-design/xfs-design.css: $(srcdir)/doc/xfs-design.css +@HAVE_XMLTO_TRUE@@MAKE_DEVEL_DOCS_TRUE@ -rm -f doc/xfs-design/xfs-design.css +@HAVE_XMLTO_TRUE@@MAKE_DEVEL_DOCS_TRUE@ $(MKDIR_P) doc/xfs-design +@HAVE_XMLTO_TRUE@@MAKE_DEVEL_DOCS_TRUE@ cp -pf $(srcdir)/doc/xfs-design.css doc/xfs-design/xfs-design.css + +@HAVE_XMLTO_TRUE@@MAKE_DEVEL_DOCS_TRUE@clean-local: +@HAVE_XMLTO_TRUE@@MAKE_DEVEL_DOCS_TRUE@ -rm -rf doc/xfs-design + +@HAVE_XMLTO_TRUE@@MAKE_DEVEL_DOCS_TRUE@doc/xfs-design.pdf: $(srcdir)/doc/xfs-design.xml $(srcdir)/doc/xfs-design.xsl +@HAVE_XMLTO_TRUE@@MAKE_DEVEL_DOCS_TRUE@ $(XMLTO) -m $(srcdir)/doc/xfs-design.xsl -o doc pdf $(srcdir)/doc/xfs-design.xml + +@HAVE_XMLTO_TRUE@@MAKE_DEVEL_DOCS_TRUE@doc/xfs-design.txt: $(srcdir)/doc/xfs-design.xml $(srcdir)/doc/xfs-design.xsl +@HAVE_XMLTO_TRUE@@MAKE_DEVEL_DOCS_TRUE@ $(XMLTO) -m $(srcdir)/doc/xfs-design.xsl -o doc txt $(srcdir)/doc/xfs-design.xml # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/app/xfs/README b/app/xfs/README index a0490dcab..fbb88b9a2 100644 --- a/app/xfs/README +++ b/app/xfs/README @@ -1,12 +1,41 @@ -/* $Xorg: README,v 1.3 2000/08/17 19:54:19 cpqbld Exp $ */ +All questions regarding this software should be directed at the +Xorg mailing list: + + http://lists.freedesktop.org/mailman/listinfo/xorg + +Please submit bug reports to the Xorg bugzilla: + + https://bugs.freedesktop.org/enter_bug.cgi?product=xorg + +The master development code repository can be found at: + + git://anongit.freedesktop.org/git/xorg/app/xfs + + http://cgit.freedesktop.org/xorg/app/xfs + +For patch submission instructions, see: + + http://www.x.org/wiki/Development/Documentation/SubmittingPatches + +For more information on the git code manager, see: + + http://wiki.x.org/wiki/GitPage + +------------------------------------------------------------------------------ + +[The rest of these notes come from the original X11R5 implementation + in 1991, and have been updated slightly for the xfs 1.1.0 modular release, + but are otherwise a bit stale.] + Installation instructions for fontserver -1 - set DefaultFSConfigFile to point to the correct place, if the default - is not what you want. +1 - If you don't want to use the default config file location, + run configure with the --with-default-config-file=path option to + point to the correct place. - an example config file is in ./config + An example config file is in ./config -2 - modify the file named by DefaultFsConfigFile so the 'catalogue' +2 - modify the config file so the 'catalogue' parameter points to a set of valid font directories. At this point the test programs should work. Start the font server @@ -15,17 +44,12 @@ At this point the test programs should work. Start the font server FSlib understands the environment variable FONTSERVER. The format is the same as Xlib, (ie, hostname:server_number). -See mit/doc/fontserver: - -./doc - various pieces of documentation on the font server and associated - software: +The doc directory contains various pieces of documentation on the font +server and associated software: - FSlib.doc - short summary of the FSlib functions and their args - test_progs - description of the clients & test programs - design.ms - troff source of fontserver design overview + xfs-design.xml - DocBook source of fontserver design overview -Tested font formats. +Tested font formats: The fontserver has been tested with PCF, Speedo, SNF and BDF formats. @@ -34,3 +58,6 @@ Tested environments: the fontserver and clients have been built & tested on SPARC running 4.x and a DECstation 3100 running V4.0. it should work ok on any 32 bit UNIX w/ BSD sockets. + +------------------------------------------------------------------------------ + diff --git a/app/xfs/acinclude.m4 b/app/xfs/acinclude.m4 new file mode 100644 index 000000000..44971b986 --- /dev/null +++ b/app/xfs/acinclude.m4 @@ -0,0 +1,45 @@ +# =========================================================================== +# http://www.nongnu.org/autoconf-archive/ac_define_dir.html +# =========================================================================== +# +# SYNOPSIS +# +# AC_DEFINE_DIR(VARNAME, DIR [, DESCRIPTION]) +# +# DESCRIPTION +# +# This macro sets VARNAME to the expansion of the DIR variable, taking +# care of fixing up ${prefix} and such. +# +# VARNAME is then offered as both an output variable and a C preprocessor +# symbol. +# +# Example: +# +# AC_DEFINE_DIR([DATADIR], [datadir], [Where data are placed to.]) +# +# LICENSE +# +# Copyright (c) 2008 Stepan Kasal <kasal@ucw.cz> +# Copyright (c) 2008 Andreas Schwab <schwab@suse.de> +# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de> +# Copyright (c) 2008 Alexandre Oliva +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. + +AC_DEFUN([AC_DEFINE_DIR], [ + prefix_NONE= + exec_prefix_NONE= + test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix + test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix +dnl In Autoconf 2.60, ${datadir} refers to ${datarootdir}, which in turn +dnl refers to ${prefix}. Thus we have to use `eval' twice. + eval ac_define_dir="\"[$]$2\"" + eval ac_define_dir="\"$ac_define_dir\"" + AC_SUBST($1, "$ac_define_dir") + AC_DEFINE_UNQUOTED($1, "$ac_define_dir", [$3]) + test "$prefix_NONE" && prefix=NONE + test "$exec_prefix_NONE" && exec_prefix=NONE +]) diff --git a/app/xfs/aclocal.m4 b/app/xfs/aclocal.m4 index 9384d2c2b..9e036f3c0 100644 --- a/app/xfs/aclocal.m4 +++ b/app/xfs/aclocal.m4 @@ -995,7 +995,7 @@ AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR -m4_include([m4/ac_define_dir.m4]) +dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. dnl dnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. dnl @@ -1032,27 +1032,24 @@ dnl of the copyright holder. # your configure.ac with the minimum required version, such as: # XORG_MACROS_VERSION(1.1) # -# To force at least a version with this macro defined, also add: -# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])]) +# To ensure that this macro is defined, also add: +# m4_ifndef([XORG_MACROS_VERSION], +# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) # # # See the "minimum version" comment for each macro you use to see what # version you require. -AC_DEFUN([XORG_MACROS_VERSION],[ - [XORG_MACROS_needed_version=$1 - XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'` - XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] - AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}]) - [XORG_MACROS_version=1.1.6 - XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'` - XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] - if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then - AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x]) - fi - if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then - AC_MSG_ERROR([configure built with too old of a version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.${XORG_MACROS_minor}.0 or newer]) - fi - AC_MSG_RESULT([yes, $XORG_MACROS_version]) +m4_defun([XORG_MACROS_VERSION],[ +m4_define([vers_have], [1.3.0]) +m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) +m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) +m4_if(m4_cmp(maj_have, maj_needed), 0,, + [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) +m4_if(m4_version_compare(vers_have, [$1]), -1, + [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) +m4_undefine([vers_have]) +m4_undefine([maj_have]) +m4_undefine([maj_needed]) ]) # XORG_MACROS_VERSION # XORG_PROG_RAWCPP() @@ -1077,6 +1074,10 @@ else if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then RAWCPPFLAGS=-undef AC_MSG_RESULT([yes]) + # under Cygwin unix is still defined even with -undef + elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then + RAWCPPFLAGS="-undef -ansi" + AC_MSG_RESULT([yes, with -ansi]) else AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) fi @@ -1189,7 +1190,9 @@ AC_SUBST([ADMIN_MAN_DIR]) # Whether or not the necessary tools and files are found can be checked # with the AM_CONDITIONAL "BUILD_LINUXDOC" AC_DEFUN([XORG_CHECK_LINUXDOC],[ -XORG_SGML_PATH=$prefix/share/sgml +if test x$XORG_SGML_PATH = x ; then + XORG_SGML_PATH=$prefix/share/sgml +fi HAVE_DEFS_ENT= if test x"$cross_compiling" = x"yes" ; then @@ -1245,7 +1248,9 @@ AC_SUBST(MAKE_HTML) # indicates whether the necessary tools and files are found and, if set, # $(MAKE_XXX) blah.sgml will produce blah.xxx. AC_DEFUN([XORG_CHECK_DOCBOOK],[ -XORG_SGML_PATH=$prefix/share/sgml +if test x$XORG_SGML_PATH = x ; then + XORG_SGML_PATH=$prefix/share/sgml +fi HAVE_DEFS_ENT= BUILDTXTDOC=no BUILDPDFDOC=no @@ -1311,7 +1316,7 @@ AC_SUBST(MAKE_HTML) # their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ AC_ARG_ENABLE(malloc0returnsnull, - AC_HELP_STRING([--enable-malloc0returnsnull], + AS_HELP_STRING([--enable-malloc0returnsnull], [malloc(0) returns NULL (default: auto)]), [MALLOC_ZERO_RETURNS_NULL=$enableval], [MALLOC_ZERO_RETURNS_NULL=auto]) @@ -1363,7 +1368,7 @@ AC_SUBST([XTMALLOC_ZERO_CFLAGS]) AC_DEFUN([XORG_WITH_LINT],[ # Allow checking code with lint, sparse, etc. -AC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint], +AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], [Use a lint-style source code checker (default: disabled)])], [use_lint=$withval], [use_lint=no]) if test "x$use_lint" = "xyes" ; then @@ -1404,7 +1409,7 @@ AM_CONDITIONAL(LINT, [test x$LINT != xno]) AC_DEFUN([XORG_LINT_LIBRARY],[ AC_REQUIRE([XORG_WITH_LINT]) # Build lint "library" for more indepth checks of programs calling this library -AC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library], +AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], [Create lint library (default: disabled)])], [make_lint_lib=$enableval], [make_lint_lib=no]) if test "x$make_lint_lib" != "xno" ; then @@ -1422,6 +1427,75 @@ AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) ]) # XORG_LINT_LIBRARY +# XORG_CWARNFLAGS +# --------------- +# Minimum version: 1.2.0 +# +# Defines CWARNFLAGS to enable C compiler warnings. +# +AC_DEFUN([XORG_CWARNFLAGS], [ +AC_REQUIRE([AC_PROG_CC]) +if test "x$GCC" = xyes ; then + CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ +-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ +-Wbad-function-cast" + case `$CC -dumpversion` in + 3.4.* | 4.*) + CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement" + ;; + esac +else + AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) + if test "x$SUNCC" = "xyes"; then + CWARNFLAGS="-v" + fi +fi +AC_SUBST(CWARNFLAGS) +m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) +]) # XORG_CWARNFLAGS + +# XORG_STRICT_OPTION +# ----------------------- +# Minimum version: 1.3.0 +# +# Add configure option to enable strict compilation +AC_DEFUN([XORG_STRICT_OPTION], [ +AC_REQUIRE([AC_PROG_CC]) +AC_REQUIRE([AC_PROG_CC_C99]) +AC_REQUIRE([XORG_CWARNFLAGS]) + +AC_ARG_ENABLE(strict-compilation, + AS_HELP_STRING([--enable-strict-compilation], + [Enable all warnings from compiler and make them errors (default: disabled)]), + [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) +if test "x$STRICT_COMPILE" = "xyes"; then + AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) + AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) + if test "x$GCC" = xyes ; then + STRICT_CFLAGS="-pedantic -Werror" + elif test "x$SUNCC" = "xyes"; then + STRICT_CFLAGS="-errwarn" + elif test "x$INTELCC" = "xyes"; then + STRICT_CFLAGS="-Werror" + fi +fi +CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS" +AC_SUBST([CWARNFLAGS]) +]) # XORG_STRICT_OPTION + +# XORG_DEFAULT_OPTIONS +# -------------------- +# Minimum version: 1.3.0 +# +# Defines default options for X.Org modules. +# +AC_DEFUN([XORG_DEFAULT_OPTIONS], [ +XORG_CWARNFLAGS +XORG_STRICT_OPTION +XORG_RELEASE_VERSION +XORG_CHANGELOG +XORG_MANPAGE_SECTIONS +]) # XORG_DEFAULT_OPTIONS dnl Copyright 2005 Red Hat, Inc dnl dnl Permission to use, copy, modify, distribute, and sell this software and its @@ -1456,7 +1530,7 @@ dnl AC_DEFUN([XORG_RELEASE_VERSION],[ AC_ARG_WITH(release-version, - AC_HELP_STRING([--with-release-version=STRING], + AS_HELP_STRING([--with-release-version=STRING], [Use release version string in package name]), [RELEASE_VERSION="$withval"], [RELEASE_VERSION=""]) @@ -1484,6 +1558,23 @@ AC_DEFUN([XORG_RELEASE_VERSION],[ [Patch version of this package]) ]) +# XORG_CHANGELOG() +# ---------------- +# Minimum version: 1.2.0 +# +# Defines the variable CHANGELOG_CMD as the command to generate +# ChangeLog from git. +# +# Arrange that distcleancheck ignores ChangeLog left over by distclean. +# +AC_DEFUN([XORG_CHANGELOG], [ +CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \ +mv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \ +echo 'git directory not found: installing possibly empty changelog.' >&2)" +AC_SUBST([CHANGELOG_CMD]) +AC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print']) +]) # XORG_CHANGELOG + dnl $XdotOrg: lib/xtrans/xtrans.m4,v 1.6 2005/07/26 18:59:11 alanc Exp $ dnl dnl Copyright 2005 Sun Microsystems, Inc. All rights reserved. @@ -1518,10 +1609,11 @@ AC_DEFUN([XTRANS_TCP_FLAGS],[ # SVR4 hides these in libraries other than libc AC_SEARCH_LIBS(socket, [socket]) AC_SEARCH_LIBS(gethostbyname, [nsl]) + AC_HAVE_LIBRARY([ws2_32]) # Needs to come after above checks for libsocket & libnsl for SVR4 systems AC_ARG_ENABLE(ipv6, - AC_HELP_STRING([--enable-IPv6],[Enable IPv6 support]), + AC_HELP_STRING([--enable-ipv6],[Enable IPv6 support]), [IPV6CONN=$enableval], [AC_CHECK_FUNC(getaddrinfo,[IPV6CONN=yes],[IPV6CONN=no])]) AC_MSG_CHECKING([if IPv6 support should be built]) @@ -1623,3 +1715,4 @@ AC_DEFUN([XTRANS_SECURE_RPC_FLAGS], ]) # XTRANS_SECURE_RPC_FLAGS +m4_include([acinclude.m4]) diff --git a/app/xfs/config.cpp b/app/xfs/config.cpp index cd4a08c57..46680891c 100644 --- a/app/xfs/config.cpp +++ b/app/xfs/config.cpp @@ -1,5 +1,5 @@ -XCOMM font server configuration file -XCOMM $Xorg: config.cpp,v 1.3 2000/08/17 19:54:19 cpqbld Exp $ +XCOMM X font server configuration file +XCOMM See xfs(__appmansuffix__) man page for more information. clone-self = on use-syslog = off @@ -9,7 +9,9 @@ XCOMM in decipoints default-point-size = 120 default-resolutions = 75,75,100,100 +#ifdef FONTCACHE XCOMM font cache control, specified in KB cache-hi-mark = 2048 cache-low-mark = 1433 cache-balance = 70 +#endif /* FONTCACHE */ diff --git a/app/xfs/configure b/app/xfs/configure index cda478654..fa2512749 100644 --- a/app/xfs/configure +++ b/app/xfs/configure @@ -1,27 +1,84 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for xfs 1.0.8. +# Generated by GNU Autoconf 2.62 for xfs 1.1.0. # # Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>. # -# Copyright (C) 2003 Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +# 2002, 2003, 2004, 2005, 2006, 2007, 2008 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 +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # Pre-4.2 versions of Zsh do 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 + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } fi -DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -31,33 +88,60 @@ else fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + # Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - $as_unset $as_var - fi -done +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -65,157 +149,391 @@ fi # Name of the executable. -as_me=`$as_basename "$0" || +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'` + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` +# CDPATH. +$as_unset CDPATH -# 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 +if test "x$CONFIG_SHELL" = x; then + if (eval ":") 2>/dev/null; then + as_have_required=yes +else + as_have_required=no fi + if test $as_have_required = yes && (eval ": +(as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} - 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 +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi - ;; - 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 - '') +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0) || { (exit 1); exit 1; } + +( + as_lineno_1=\$LINENO + as_lineno_2=\$LINENO + test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && + test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } +") 2> /dev/null; then + : +else + as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - for as_base in sh bash ksh sh5; do - case $as_dir in + case $as_dir in /*) - if ("$as_dir/$as_base" -c ' + for as_base in sh bash ksh sh5; do + as_candidate_shells="$as_candidate_shells $as_dir/$as_base" + done;; + esac +done +IFS=$as_save_IFS + + + for as_shell in $as_candidate_shells $SHELL; do + # Try only shells that exist, to save several forks. + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { ("$as_shell") 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +_ASEOF +}; then + CONFIG_SHELL=$as_shell + as_have_required=yes + if { "$as_shell" 2> /dev/null <<\_ASEOF +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + +: +(as_func_return () { + (exit $1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = "$1" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test $exitcode = 0) || { (exit 1); exit 1; } + +( as_lineno_1=$LINENO as_lineno_2=$LINENO - 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 + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } + +_ASEOF +}; then + break +fi + +fi + + done + + if test "x$CONFIG_SHELL" != x; then + for as_var in BASH_ENV ENV + do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var + done + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} +fi + + + if test $as_have_required = no; then + echo This script requires a shell more modern than all the + echo shells that I found on your system. Please install a + echo modern shell, or manually run the script under such a + echo shell if you do have one. + { (exit 1); exit 1; } +fi + + +fi + +fi + + + +(eval "as_func_return () { + (exit \$1) +} +as_func_success () { + as_func_return 0 +} +as_func_failure () { + as_func_return 1 +} +as_func_ret_success () { + return 0 +} +as_func_ret_failure () { + return 1 +} + +exitcode=0 +if as_func_success; then + : +else + exitcode=1 + echo as_func_success failed. +fi + +if as_func_failure; then + exitcode=1 + echo as_func_failure succeeded. +fi + +if as_func_ret_success; then + : +else + exitcode=1 + echo as_func_ret_success failed. +fi + +if as_func_ret_failure; then + exitcode=1 + echo as_func_ret_failure succeeded. +fi + +if ( set x; as_func_ret_success y && test x = \"\$1\" ); then + : +else + exitcode=1 + echo positional parameters were not saved. +fi + +test \$exitcode = 0") || { + echo No shell found that supports shell functions. + echo Please tell bug-autoconf@gnu.org about your system, + echo including any error possibly output before this message. + echo This can help us improve future autoconf versions. + echo Configuration will now proceed without shell functions. +} + + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line 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. + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop - s,-$,, - s,^['$as_cr_digits']*\n,, + s/-\n.*// ' >$as_me.lineno && - chmod +x $as_me.lineno || - { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + chmod +x "$as_me.lineno" || + { $as_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 + # original and so on. Autoconf is especially sensitive 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 (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi -if expr a : '\(a\)' >/dev/null 2>&1; then +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file -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 +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' fi -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 +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -224,7 +542,28 @@ else as_mkdir_p=false fi -as_executable_p="test -f" +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -233,89 +572,230 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH +exec 7<&0 </dev/null 6>&1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` -exec 6>&1 - # # Initializations. # ac_default_prefix=/usr/local +ac_clean_files= ac_config_libobj_dir=. +LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} -# 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='xfs' PACKAGE_TARNAME='xfs' -PACKAGE_VERSION='1.0.8' -PACKAGE_STRING='xfs 1.0.8' +PACKAGE_VERSION='1.1.0' +PACKAGE_STRING='xfs 1.1.0' PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg' # Factoring default headers for most tests. ac_includes_default="\ #include <stdio.h> -#if HAVE_SYS_TYPES_H +#ifdef HAVE_SYS_TYPES_H # include <sys/types.h> #endif -#if HAVE_SYS_STAT_H +#ifdef HAVE_SYS_STAT_H # include <sys/stat.h> #endif -#if STDC_HEADERS +#ifdef STDC_HEADERS # include <stdlib.h> # include <stddef.h> #else -# if HAVE_STDLIB_H +# ifdef HAVE_STDLIB_H # include <stdlib.h> # endif #endif -#if HAVE_STRING_H -# if !STDC_HEADERS && HAVE_MEMORY_H +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include <memory.h> # endif # include <string.h> #endif -#if HAVE_STRINGS_H +#ifdef HAVE_STRINGS_H # include <strings.h> #endif -#if HAVE_INTTYPES_H +#ifdef HAVE_INTTYPES_H # include <inttypes.h> -#else -# if HAVE_STDINT_H -# include <stdint.h> -# endif #endif -#if HAVE_UNISTD_H +#ifdef HAVE_STDINT_H +# include <stdint.h> +#endif +#ifdef HAVE_UNISTD_H # include <unistd.h> #endif" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE build build_cpu build_vendor build_os host host_cpu host_vendor host_os CPP EGREP DEFAULT_CONFIG_FILE CONFIG_FILE_DESC CONFIG_FILE_PATH PKG_CONFIG ac_pt_PKG_CONFIG XFS_CFLAGS XFS_LIBS LINT LINT_FLAGS LINT_TRUE LINT_FALSE APP_MAN_SUFFIX LIB_MAN_SUFFIX FILE_MAN_SUFFIX MISC_MAN_SUFFIX DRIVER_MAN_SUFFIX ADMIN_MAN_SUFFIX APP_MAN_DIR LIB_MAN_DIR FILE_MAN_DIR MISC_MAN_DIR DRIVER_MAN_DIR ADMIN_MAN_DIR LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL +PATH_SEPARATOR +PACKAGE_NAME +PACKAGE_TARNAME +PACKAGE_VERSION +PACKAGE_STRING +PACKAGE_BUGREPORT +exec_prefix +prefix +program_transform_name +bindir +sbindir +libexecdir +datarootdir +datadir +sysconfdir +sharedstatedir +localstatedir +includedir +oldincludedir +docdir +infodir +htmldir +dvidir +pdfdir +psdir +libdir +localedir +mandir +DEFS +ECHO_C +ECHO_N +ECHO_T +LIBS +build_alias +host_alias +target_alias +INSTALL_PROGRAM +INSTALL_SCRIPT +INSTALL_DATA +CYGPATH_W +PACKAGE +VERSION +ACLOCAL +AUTOCONF +AUTOMAKE +AUTOHEADER +MAKEINFO +install_sh +STRIP +INSTALL_STRIP_PROGRAM +mkdir_p +AWK +SET_MAKE +am__leading_dot +AMTAR +am__tar +am__untar +MAINTAINER_MODE_TRUE +MAINTAINER_MODE_FALSE +MAINT +CC +CFLAGS +LDFLAGS +CPPFLAGS +ac_ct_CC +EXEEXT +OBJEXT +DEPDIR +am__include +am__quote +AMDEP_TRUE +AMDEP_FALSE +AMDEPBACKSLASH +CCDEPMODE +am__fastdepCC_TRUE +am__fastdepCC_FALSE +CPP +GREP +EGREP +RAWCPP +RAWCPPFLAGS +CWARNFLAGS +build +build_cpu +build_vendor +build_os +host +host_cpu +host_vendor +host_os +XMLTO +HAVE_XMLTO_TRUE +HAVE_XMLTO_FALSE +DEFAULT_CONFIG_FILE +CONFIG_FILE_DESC +CONFIG_FILE_PATH +FONTPATH +MAKE_DEVEL_DOCS_TRUE +MAKE_DEVEL_DOCS_FALSE +PKG_CONFIG +XFS_CFLAGS +XFS_LIBS +LINT +LINT_FLAGS +LINT_TRUE +LINT_FALSE +APP_MAN_SUFFIX +LIB_MAN_SUFFIX +FILE_MAN_SUFFIX +MISC_MAN_SUFFIX +DRIVER_MAN_SUFFIX +ADMIN_MAN_SUFFIX +APP_MAN_DIR +LIB_MAN_DIR +FILE_MAN_DIR +MISC_MAN_DIR +DRIVER_MAN_DIR +ADMIN_MAN_DIR +CHANGELOG_CMD +distcleancheck_listfiles +LIBOBJS +LTLIBOBJS' ac_subst_files='' +ac_user_opts=' +enable_option_checking +enable_maintainer_mode +enable_dependency_tracking +with_default_config_file +with_default_font_path +enable_devel_docs +enable_inetd +enable_syslog +enable_unix_transport +enable_tcp_transport +enable_ipv6 +enable_local_transport +with_lint +with_release_version +' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP +XMLTO +PKG_CONFIG +XFS_CFLAGS +XFS_LIBS' + # Initialize some variables set by options. ac_init_help= ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null @@ -338,34 +818,48 @@ x_libraries=NONE # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' -datadir='${prefix}/share' +datarootdir='${prefix}/share' +datadir='${datarootdir}' 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' +docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' ac_prev= +ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" + eval $ac_prev=\$ac_option ac_prev= continue fi - ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` + case $ac_option in + *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *) ac_optarg=yes ;; + esac # Accept the important Cygnus configure options, so we can diagnose typos. - case $ac_option in + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; @@ -387,33 +881,61 @@ do --config-cache | -C) cache_file=config.cache ;; - -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ - | --da=*) + -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + -disable-* | --disable-*) - ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + ac_useropt=`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 + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2 { (exit 1); exit 1; }; } - ac_feature=`echo $ac_feature | sed 's/-/_/g'` - eval "enable_$ac_feature=no" ;; + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; -enable-* | --enable-*) - ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + ac_useropt=`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 + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&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 ;; + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; esac - eval "enable_$ac_feature='$ac_optarg'" ;; + eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ @@ -440,6 +962,12 @@ do -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; @@ -464,13 +992,16 @@ do | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst \ - | --locals | --local | --loca | --loc | --lo) + | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* \ - | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) @@ -535,6 +1066,16 @@ do | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; @@ -585,26 +1126,38 @@ do ac_init_version=: ;; -with-* | --with-*) - ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + ac_useropt=`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 + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&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 ;; + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; esac - eval "with_$ac_package='$ac_optarg'" ;; + eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) - ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + ac_useropt=`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 + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2 { (exit 1); exit 1; }; } - ac_package=`echo $ac_package | sed 's/-/_/g'` - eval "with_$ac_package=no" ;; + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. @@ -624,7 +1177,7 @@ do | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) { echo "$as_me: error: unrecognized option: $ac_option + -*) { $as_echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; @@ -633,17 +1186,16 @@ Try \`$0 --help' for more information." >&2 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 + { $as_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'" + 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 + $as_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 + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; @@ -652,31 +1204,39 @@ 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 + { $as_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; }; };; +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) { $as_echo "$as_me: error: Unrecognized options: $ac_unrecognized_opts" >&2 + { (exit 1); exit 1; }; } ;; + *) $as_echo "$as_me: WARNING: Unrecognized options: $ac_unrecognized_opts" >&2 ;; esac -done +fi -# Be sure to have absolute paths. -for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ - localstatedir libdir includedir oldincludedir infodir mandir +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir do - eval ac_val=$`echo $ac_var` + eval ac_val=\$$ac_var + # Remove trailing slashes. case $ac_val in - [\\/$]* | ?:[\\/]* ) ;; - *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; };; + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac + { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; } done # There might be people who depend on the old broken behavior: `$host' @@ -690,7 +1250,7 @@ target=$target_alias 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. + $as_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 @@ -703,86 +1263,76 @@ test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + { $as_echo "$as_me: error: Working directory cannot be determined" >&2 + { (exit 1); exit 1; }; } +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + { $as_echo "$as_me: error: pwd does not report name of working directory" >&2 + { (exit 1); exit 1; }; } + + # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes - # Try the directory containing this script, then 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'` + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` srcdir=$ac_confdir - if test ! -r $srcdir/$ac_unique_file; then + 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 +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + { $as_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 +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&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 -ac_env_PKG_CONFIG_set=${PKG_CONFIG+set} -ac_env_PKG_CONFIG_value=$PKG_CONFIG -ac_cv_env_PKG_CONFIG_set=${PKG_CONFIG+set} -ac_cv_env_PKG_CONFIG_value=$PKG_CONFIG -ac_env_XFS_CFLAGS_set=${XFS_CFLAGS+set} -ac_env_XFS_CFLAGS_value=$XFS_CFLAGS -ac_cv_env_XFS_CFLAGS_set=${XFS_CFLAGS+set} -ac_cv_env_XFS_CFLAGS_value=$XFS_CFLAGS -ac_env_XFS_LIBS_set=${XFS_LIBS+set} -ac_env_XFS_LIBS_value=$XFS_LIBS -ac_cv_env_XFS_LIBS_set=${XFS_LIBS+set} -ac_cv_env_XFS_LIBS_value=$XFS_LIBS + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done # # Report the --help message. @@ -791,7 +1341,7 @@ 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 xfs 1.0.8 to adapt to many kinds of systems. +\`configure' configures xfs 1.1.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -811,14 +1361,11 @@ Configuration: -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] + [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] + [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify @@ -828,18 +1375,25 @@ 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] + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/xfs] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF @@ -857,20 +1411,27 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of xfs 1.0.8:";; + short | recursive ) echo "Configuration of xfs 1.1.0:";; esac cat <<\_ACEOF Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors + --enable-devel-docs Build internals documentation for developers + (default: enabled) + --enable-inetd Support -inetd flag for starting from inetd + (default: enabled) + --enable-syslog Support option for logging via syslog (default: + enabled) --enable-unix-transport Enable UNIX domain socket transport --enable-tcp-transport Enable TCP socket transport - --enable-IPv6 Enable IPv6 support + --enable-ipv6 Enable IPv6 support --enable-local-transport Enable os-specific local transport @@ -881,6 +1442,8 @@ Optional Packages: comma-separated list of paths to look for config file when not specified (default: ${sysconfdir}/X11/fs/config) + --with-default-font-path=PATH + Comma separated list of font path entries --with-lint Use a lint-style source code checker (default: disabled) --with-release-version=STRING @@ -891,9 +1454,11 @@ Some influential environment variables: CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a nonstandard directory <lib dir> - CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have - headers in a nonstandard directory <include dir> + LIBS libraries to pass to the linker, e.g. -l<library> + CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if + you have headers in a nonstandard directory <include dir> CPP C preprocessor + XMLTO Path to xmlto command PKG_CONFIG path to pkg-config utility XFS_CFLAGS C compiler flags for XFS, overriding pkg-config XFS_LIBS linker flags for XFS, overriding pkg-config @@ -903,120 +1468,88 @@ it to find libraries and programs with nonstandard names/locations. Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>. _ACEOF +ac_status=$? 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 + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && 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 "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix case $srcdir in - .) # No --srcdir option. We are building in place. + .) # 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_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac - -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac - - cd $ac_dir - # Check for guested configure; otherwise get Cygnus style configure. - if test -f $ac_srcdir/configure.gnu; then - echo - $SHELL $ac_srcdir/configure.gnu --help=recursive - elif test -f $ac_srcdir/configure; then - echo - $SHELL $ac_srcdir/configure --help=recursive - elif test -f $ac_srcdir/configure.ac || - test -f $ac_srcdir/configure.in; then - echo - $ac_configure --help +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive else - echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi - cd $ac_popdir + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } done fi -test -n "$ac_init_help" && exit 0 +test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -xfs configure 1.0.8 -generated by GNU Autoconf 2.59 +xfs configure 1.1.0 +generated by GNU Autoconf 2.62 -Copyright (C) 2003 Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, +2002, 2003, 2004, 2005, 2006, 2007, 2008 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 + exit fi -exec 5>config.log -cat >&5 <<_ACEOF +cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by xfs $as_me 1.0.8, which was -generated by GNU Autoconf 2.59. Invocation command line was +It was created by xfs $as_me 1.1.0, which was +generated by GNU Autoconf 2.62. Invocation command line was $ $0 $@ _ACEOF +exec 5>>config.log { cat <<_ASUNAME ## --------- ## @@ -1035,7 +1568,7 @@ uname -v = `(uname -v) 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` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` @@ -1047,8 +1580,9 @@ for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. - echo "PATH: $as_dir" + $as_echo "PATH: $as_dir" done +IFS=$as_save_IFS } >&5 @@ -1070,7 +1604,6 @@ _ACEOF ac_configure_args= ac_configure_args0= ac_configure_args1= -ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do @@ -1081,8 +1614,8 @@ do -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; @@ -1103,9 +1636,7 @@ do -* ) 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=" " + ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done @@ -1116,8 +1647,8 @@ $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_ # 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. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { @@ -1130,20 +1661,35 @@ trap 'exit_status=$? _ASBOX echo # The following way of writing the cache mishandles newlines in values, -{ +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +$as_echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done (set) 2>&1 | - case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in - *ac_space=\ *) + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) sed -n \ - "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" - ;; + "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" + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; - esac; -} + esac | + sort +) echo cat <<\_ASBOX @@ -1154,22 +1700,28 @@ _ASBOX echo for ac_var in $ac_subst_vars do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX -## ------------- ## -## Output files. ## -## ------------- ## +## ------------------- ## +## File substitutions. ## +## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do - eval ac_val=$`echo $ac_var` - echo "$ac_var='"'"'$ac_val'"'"'" + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi @@ -1181,26 +1733,24 @@ _ASBOX ## ----------- ## _ASBOX echo - sed "/^$/d" confdefs.h | sort + cat confdefs.h echo fi test "$ac_signal" != 0 && - echo "$as_me: caught signal $ac_signal" - echo "$as_me: exit $exit_status" + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" } >&5 - rm -f core *.core && - rm -rf conftest* confdefs* conf$$* $ac_clean_files && + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status - ' 0 +' 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 +rm -f -r conftest* confdefs.h # Predefined preprocessor variables. @@ -1230,18 +1780,24 @@ _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 +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + ac_site_file1=$CONFIG_SITE +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site +fi +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue if test -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;} + { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi @@ -1251,54 +1807,61 @@ 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;} + { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in - [\\/]* | ?:[\\/]* ) . $cache_file;; - *) . ./$cache_file;; + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; esac fi else - { echo "$as_me:$LINENO: creating cache $cache_file" >&5 -echo "$as_me: creating cache $cache_file" >&6;} + { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false -for ac_var in `(set) 2>&1 | - sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do +for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val="\$ac_cv_env_${ac_var}_value" - eval ac_new_val="\$ac_env_${ac_var}_value" + 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;} + { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) - { 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;} + { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then - { 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=: + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in - *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) - ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in @@ -1308,19 +1871,13 @@ echo "$as_me: current value: $ac_new_val" >&2;} 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;} + { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +$as_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 - @@ -1345,33 +1902,44 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu am__api_version="1.9" ac_aux_dir= -for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do - if test -f $ac_dir/install-sh; then +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 + 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 + 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;} + { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 +$as_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. + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -1386,11 +1954,12 @@ ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. -echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -1409,7 +1978,7 @@ case $as_dir/ in # 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 -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -1419,30 +1988,43 @@ case $as_dir/ in # 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 + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi fi fi done done ;; esac + done +IFS=$as_save_IFS +rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else - # As a last resort, use the slow shell script. We don't cache a - # path for INSTALL within a source directory, because that will + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is - # removed, or if the path is relative. + # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi -echo "$as_me:$LINENO: result: $INSTALL" >&5 -echo "${ECHO_T}$INSTALL" >&6 +{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. @@ -1453,17 +2035,14 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' test "$program_prefix" != NONE && - program_transform_name="s,^,$program_prefix,;$program_transform_name" + program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && - program_transform_name="s,\$,$program_suffix,;$program_transform_name" -# Double any \ or $. echo might interpret backslashes. + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. # By default was `s,x,x', remove it if useless. -cat <<\_ACEOF >conftest.sed -s/[\\$]/&&/g;s/;s,x,x,$// -_ACEOF -program_transform_name=`echo $program_transform_name | sed -f conftest.sed` -rm conftest.sed +ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` @@ -1474,8 +2053,8 @@ if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= - { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 -echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then @@ -1515,10 +2094,10 @@ for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AWK+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. @@ -1529,54 +2108,58 @@ 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 -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then - echo "$as_me:$LINENO: result: $AWK" >&5 -echo "${ECHO_T}$AWK" >&6 + { $as_echo "$as_me:$LINENO: result: $AWK" >&5 +$as_echo "$AWK" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + test -n "$AWK" && break done -echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 -set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` -if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then - echo $ECHO_N "(cached) $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF +SHELL = /bin/sh all: - @echo 'ac_maketemp="$(MAKE)"' + @echo '@@@%%%=$(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 +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac rm -f conftest.make fi -if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } SET_MAKE= else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi @@ -1592,8 +2175,8 @@ rmdir .tst 2>/dev/null # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then - { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 -echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} + { { $as_echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 +$as_echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi @@ -1609,7 +2192,7 @@ fi # Define the identity of the package. PACKAGE='xfs' - VERSION='1.0.8' + VERSION='1.1.0' cat >>confdefs.h <<_ACEOF @@ -1647,10 +2230,10 @@ if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. @@ -1661,34 +2244,36 @@ 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 -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then - echo "$as_me:$LINENO: result: $STRIP" >&5 -echo "${ECHO_T}$STRIP" >&6 + { $as_echo "$as_me:$LINENO: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. @@ -1699,27 +2284,41 @@ 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 -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS - test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then - echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 -echo "${ECHO_T}$ac_ct_STRIP" >&6 + { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi - STRIP=$ac_ct_STRIP + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi else STRIP="$ac_cv_prog_STRIP" fi @@ -1739,17 +2338,17 @@ am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' -echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 -echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6 - # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. +{ $as_echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 +$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } + # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then - enableval="$enable_maintainer_mode" - USE_MAINTAINER_MODE=$enableval + enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no -fi; - echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 -echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6 +fi + + { $as_echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 +$as_echo "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then @@ -1764,32 +2363,89 @@ fi - ac_config_headers="$ac_config_headers xfs-config.h" +# xfs already have a header called config.h +ac_config_headers="$ac_config_headers xfs-config.h" -# Require xorg-macros version 1.1.0 or newer for XORG_WITH_LINT macro +# Require xorg-macros version >= 1.2.0 for XORG_CWARNFLAGS & XORG_CHANGELOG - XORG_MACROS_needed_version=1.1 - XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'` - XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'` - echo "$as_me:$LINENO: checking if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}" >&5 -echo $ECHO_N "checking if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}... $ECHO_C" >&6 - XORG_MACROS_version=1.1.6 - XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'` - XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'` - if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then - { { echo "$as_me:$LINENO: error: configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x" >&5 -echo "$as_me: error: configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x" >&2;} - { (exit 1); exit 1; }; } - fi - if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then - { { echo "$as_me:$LINENO: error: configure built with too old of a version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.${XORG_MACROS_minor}.0 or newer" >&5 -echo "$as_me: error: configure built with too old of a version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.${XORG_MACROS_minor}.0 or newer" >&2;} - { (exit 1); exit 1; }; } - fi - echo "$as_me:$LINENO: result: yes, $XORG_MACROS_version" >&5 -echo "${ECHO_T}yes, $XORG_MACROS_version" >&6 + + + + + + + + + + +# Set common system defines for POSIX extensions, such as _GNU_SOURCE +# Must be called before any macros that run the compiler (like AC_PROG_LIBTOOL) +# to avoid autoconf errors. +DEPDIR="${am__leading_dot}deps" + +ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo done +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +{ $as_echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 +$as_echo_n "checking for style of include used by $am_make... " >&6; } +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# We grep out `Entering directory' and `Leaving directory' +# messages which can occur if `w' ends up in MAKEFLAGS. +# In particular we don't look at `^make:' because GNU make might +# be invoked under some other name (usually "gmake"), in which +# case it prints its new name instead of `make'. +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then + am__include=include + am__quote= + _am_result=GNU +fi +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then + am__include=.include + am__quote="\"" + _am_result=BSD + fi +fi + + +{ $as_echo "$as_me:$LINENO: result: $_am_result" >&5 +$as_echo "$_am_result" >&6; } +rm -f confinc confmf + +# Check whether --enable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then + enableval=$enable_dependency_tracking; +fi + +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi + + +if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + ac_ext=c @@ -1800,10 +2456,10 @@ 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 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1814,34 +2470,36 @@ 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 -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -1852,38 +2510,53 @@ 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 -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi ac_ct_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 + { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. + 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 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1894,76 +2567,36 @@ 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 -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "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 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 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -1975,17 +2608,18 @@ 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 -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. @@ -2003,24 +2637,25 @@ fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. @@ -2031,38 +2666,40 @@ 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 -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then - echo "$as_me:$LINENO: result: $CC" >&5 -echo "${ECHO_T}$CC" >&6 + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC - for ac_prog in cl + for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. @@ -2073,58 +2710,92 @@ 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 -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS fi fi ac_ct_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 + { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + test -n "$ac_ct_CC" && break done - CC=$ac_ct_CC + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi fi fi -test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +test -z "$CC" && { { $as_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 +$as_echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. -echo "$as_me:$LINENO:" \ - "checking for C compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5 - (eval $ac_compiler --version </dev/null >&5) 2>&5 +$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5 - (eval $ac_compiler -v </dev/null >&5) 2>&5 +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } -{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5 - (eval $ac_compiler -V </dev/null >&5) 2>&5 +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF @@ -2143,111 +2814,146 @@ main () } _ACEOF ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.exe b.out" +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 -echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 -ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` -if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 - (eval $ac_link_default) 2>&5 +{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { (ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link_default") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_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 + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) - ;; - conftest.$ac_ext ) - # This is the source file. + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) - 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 + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. break;; * ) break;; esac done +test "$ac_cv_exeext" = no && ac_cv_exeext= + else - echo "$as_me: failed program was:" >&5 + ac_file='' +fi + +{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +if test -z "$ac_file"; then + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -{ { echo "$as_me:$LINENO: error: C compiler cannot create executables +{ { $as_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 +$as_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 +# Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether the C compiler works" >&5 -echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&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 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_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. + { { $as_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. +$as_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 +{ $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } -rm -f a.out a.exe conftest$ac_cv_exeext b.out +rm -f -r a.out a.out.dSYM 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 +# Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. -echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 -echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 -echo "$as_me:$LINENO: result: $cross_compiling" >&5 -echo "${ECHO_T}$cross_compiling" >&6 - -echo "$as_me:$LINENO: checking for suffix of executables" >&5 -echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_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 @@ -2256,32 +2962,31 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 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_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.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 + { { $as_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 +$as_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 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +$as_echo "$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 +{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } if test "${ac_cv_objext+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2299,39 +3004,46 @@ main () } _ACEOF rm -f conftest.o conftest.obj -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>&5 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_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 + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else - echo "$as_me: failed program was:" >&5 + $as_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 +{ { $as_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 +$as_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 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +$as_echo "$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 +{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2352,50 +3064,54 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_compiler_gnu=no + ac_compiler_gnu=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi -echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 -echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 -GCC=`test $ac_compiler_gnu = yes && echo yes` +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS -CFLAGS="-g" -echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 -echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -2411,38 +3127,121 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 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 + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_prog_cc_g=no + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then @@ -2458,12 +3257,12 @@ 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 +{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then + $as_echo_n "(cached) " >&6 else - ac_cv_prog_cc_stdc=no + ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -2497,12 +3296,17 @@ static char *f (char * (*g) (char **, int), char **p, ...) /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std1 is added to get + as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std1. */ + that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; @@ -2517,282 +3321,70 @@ 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__" +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_prog_cc_stdc=$ac_arg -break -else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_c89=$ac_arg +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext + +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break done -rm -f conftest.$ac_ext conftest.$ac_objext +rm -f conftest.$ac_ext 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 ;; +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:$LINENO: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:$LINENO: result: unsupported" >&5 +$as_echo "unsupported" >&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" ;; + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac -# Some people use a C++ compiler to compile C. Since we use `exit', -# in C++ we need to declare it. In case someone uses the same compiler -# for both compiling C and C++ we need to have the C++ compiler decide -# the declaration of exit, since it's the most demanding environment. -cat >conftest.$ac_ext <<_ACEOF -#ifndef __cplusplus - choke me -#endif -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - for ac_declaration in \ - '' \ - 'extern "C" void std::exit (int) throw (); using std::exit;' \ - 'extern "C" void std::exit (int); using std::exit;' \ - 'extern "C" void exit (int) throw ();' \ - 'extern "C" void exit (int);' \ - 'void exit (int);' -do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -#include <stdlib.h> -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -continue -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -$ac_declaration -int -main () -{ -exit (42); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -done -rm -f conftest* -if test -n "$ac_declaration"; then - echo '#ifdef __cplusplus' >>confdefs.h - echo $ac_declaration >>confdefs.h - echo '#endif' >>confdefs.h -fi -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -DEPDIR="${am__leading_dot}deps" - - ac_config_commands="$ac_config_commands depfiles" - - -am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo done -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 -echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6 -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# We grep out `Entering directory' and `Leaving directory' -# messages which can occur if `w' ends up in MAKEFLAGS. -# In particular we don't look at `^make:' because GNU make might -# be invoked under some other name (usually "gmake"), in which -# case it prints its new name instead of `make'. -if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then - am__include=include - am__quote= - _am_result=GNU -fi -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then - am__include=.include - am__quote="\"" - _am_result=BSD - fi -fi - - -echo "$as_me:$LINENO: result: $_am_result" >&5 -echo "${ECHO_T}$_am_result" >&6 -rm -f confinc confmf - -# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then - enableval="$enable_dependency_tracking" - -fi; -if test "x$enable_dependency_tracking" != xno; then - am_depcomp="$ac_aux_dir/depcomp" - AMDEPBACKSLASH='\' -fi - - -if test "x$enable_dependency_tracking" != xno; then - AMDEP_TRUE= - AMDEP_FALSE='#' -else - AMDEP_TRUE='#' - AMDEP_FALSE= -fi - - - depcc="$CC" am_compiler_list= -echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 -echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up @@ -2879,8 +3471,8 @@ else fi fi -echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 -echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6 +{ $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type @@ -2896,164 +3488,21 @@ else fi -# Find a good install program. We prefer a C program (faster), -# so one script is as good as another. But avoid the broken or -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 -echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 -if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in - ./ | .// | /cC/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then - if test $ac_prog = install && - grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # AIX install. It has an incompatible calling convention. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - done - done - ;; -esac -done - - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. We don't cache a - # path for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the path is relative. - INSTALL=$ac_install_sh - fi -fi -echo "$as_me:$LINENO: result: $INSTALL" >&5 -echo "${ECHO_T}$INSTALL" >&6 - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' - -# 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/'` - - - -case $host_os in - linux*|gnu*|*-gnu) - OS_CFLAGS="-D_XOPEN_SOURCE" - ;; - *) - OS_CFLAGS= - ;; -esac - ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu -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 +{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" @@ -3080,35 +3529,35 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : else - echo "$as_me: failed program was:" >&5 + $as_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 + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -3118,34 +3567,34 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <ac_nonexistent.h> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else - echo "$as_me: failed program was:" >&5 + $as_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 @@ -3163,8 +3612,8 @@ fi else ac_cv_prog_CPP=$CPP fi -echo "$as_me:$LINENO: result: $CPP" >&5 -echo "${ECHO_T}$CPP" >&6 +{ $as_echo "$as_me:$LINENO: result: $CPP" >&5 +$as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do @@ -3187,35 +3636,35 @@ cat >>conftest.$ac_ext <<_ACEOF #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 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : else - echo "$as_me: failed program was:" >&5 + $as_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 + # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -3225,34 +3674,34 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <ac_nonexistent.h> _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag - else - ac_cpp_err= - fi -else - ac_cpp_err=yes -fi -if test -z "$ac_cpp_err"; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then # Broken: success on invalid input. continue else - echo "$as_me: failed program was:" >&5 + $as_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 @@ -3261,9 +3710,9 @@ rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else - { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check + { { $as_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 +$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi @@ -3275,25 +3724,144 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ 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 +{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if test "${ac_cv_path_GREP+set}" = set; then + $as_echo_n "(cached) " >&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' + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done +done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } + fi +else + ac_cv_path_GREP=$GREP fi -echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 -echo "${ECHO_T}$ac_cv_prog_egrep" >&6 - EGREP=$ac_cv_prog_egrep +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" -echo "$as_me:$LINENO: checking for ANSI C header files" >&5 -echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 + +{ $as_echo "$as_me:$LINENO: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if test "${ac_cv_path_EGREP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + ac_count=`expr $ac_count + 1` + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done +done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 +$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} + { (exit 1); exit 1; }; } + fi +else + ac_cv_path_EGREP=$EGREP +fi + + fi +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -3315,35 +3883,32 @@ main () } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_header_stdc=no + ac_cv_header_stdc=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. @@ -3399,6 +3964,7 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <ctype.h> +#include <stdlib.h> #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) @@ -3418,36 +3984,50 @@ main () for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) - exit(2); - exit (0); + return 2; + return 0; } _ACEOF rm -f conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_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 + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_try") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_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 + $as_echo "$as_me: program exited with status $ac_status" >&5 +$as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +rm -rf conftest.dSYM +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi + + fi fi -echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 -echo "${ECHO_T}$ac_cv_header_stdc" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF @@ -3469,11 +4049,11 @@ fi 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 +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -3486,41 +4066,41 @@ $ac_includes_default #include <$ac_header> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -eval "$as_ac_Header=no" + eval "$as_ac_Header=no" fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 -if test `eval echo '${'$as_ac_Header'}'` = yes; then +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test `eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` = yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -3529,21 +4109,18 @@ done -for ac_header in stdint.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 + if test "${ac_cv_header_minix_config_h+set}" = set; then + { $as_echo "$as_me:$LINENO: checking for minix/config.h" >&5 +$as_echo_n "checking for minix/config.h... " >&6; } +if test "${ac_cv_header_minix_config_h+set}" = set; then + $as_echo_n "(cached) " >&6 fi -echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 -echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5 +$as_echo "$ac_cv_header_minix_config_h" >&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 +{ $as_echo "$as_me:$LINENO: checking minix/config.h usability" >&5 +$as_echo_n "checking minix/config.h usability... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -3551,127 +4128,1572 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default -#include <$ac_header> +#include <minix/config.h> _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_header_compiler=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_header_compiler=no + ac_header_compiler=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 -echo "${ECHO_T}$ac_header_compiler" >&6 + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$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 +{ $as_echo "$as_me:$LINENO: checking minix/config.h presence" >&5 +$as_echo_n "checking minix/config.h presence... " >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -#include <$ac_header> +#include <minix/config.h> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then + ac_header_preproc=yes +else + $as_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 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ---------------------------------------------------------------------- ## +## Report this to https://bugs.freedesktop.org/enter_bug.cgi?product=xorg ## +## ---------------------------------------------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ $as_echo "$as_me:$LINENO: checking for minix/config.h" >&5 +$as_echo_n "checking for minix/config.h... " >&6; } +if test "${ac_cv_header_minix_config_h+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_header_minix_config_h=$ac_header_preproc +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5 +$as_echo "$ac_cv_header_minix_config_h" >&6; } + +fi +if test $ac_cv_header_minix_config_h = yes; then + MINIX=yes +else + MINIX= +fi + + + if test "$MINIX" = yes; then + +cat >>confdefs.h <<\_ACEOF +#define _POSIX_SOURCE 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define _POSIX_1_SOURCE 2 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define _MINIX 1 +_ACEOF + + fi + + + + { $as_echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5 +$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } +if test "${ac_cv_safe_to_define___extensions__+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +# define __EXTENSIONS__ 1 + $ac_includes_default +int +main () +{ + + ; + return 0; +} _ACEOF -if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 - (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } >/dev/null; then - if test -s conftest.err; then - ac_cpp_err=$ac_c_preproc_warn_flag - ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_safe_to_define___extensions__=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_safe_to_define___extensions__=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5 +$as_echo "$ac_cv_safe_to_define___extensions__" >&6; } + test $ac_cv_safe_to_define___extensions__ = yes && + cat >>confdefs.h <<\_ACEOF +#define __EXTENSIONS__ 1 +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define _ALL_SOURCE 1 +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define _GNU_SOURCE 1 +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define _POSIX_PTHREAD_SEMANTICS 1 +_ACEOF + + cat >>confdefs.h <<\_ACEOF +#define _TANDEM_SOURCE 1 +_ACEOF + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:$LINENO: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" else - ac_cpp_err= + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC fi +fi + +fi + + +test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +$as_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. +$as_echo "$as_me:$LINENO: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +{ (ac_try="$ac_compiler --version >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler --version >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -v >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -v >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (ac_try="$ac_compiler -V >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compiler -V >&5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if test "${ac_cv_c_compiler_gnu+set}" = set; then + $as_echo_n "(cached) " >&6 else - ac_cpp_err=yes + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_compiler_gnu=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_compiler_gnu=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= fi -if test -z "$ac_cpp_err"; then +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if test "${ac_cv_prog_cc_g+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + CFLAGS="" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_g=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if test "${ac_cv_prog_cc_c89+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <stdarg.h> +#include <stdio.h> +#include <sys/types.h> +#include <sys/stat.h> +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_prog_cc_c89=$ac_arg +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:$LINENO: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:$LINENO: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +depcc="$CC" am_compiler_list= + +{ $as_echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + + +if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + + + +for ac_prog in cpp +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_RAWCPP+set}" = set; then + $as_echo_n "(cached) " >&6 +else + case $RAWCPP in + [\\/]* | ?:[\\/]*) + ac_cv_path_RAWCPP="$RAWCPP" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_RAWCPP="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +RAWCPP=$ac_cv_path_RAWCPP +if test -n "$RAWCPP"; then + { $as_echo "$as_me:$LINENO: result: $RAWCPP" >&5 +$as_echo "$RAWCPP" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$RAWCPP" && break +done +test -n "$RAWCPP" || RAWCPP="${CPP}" + + +# Check for flag to avoid builtin definitions - assumes unix is predefined, +# which is not the best choice for supporting other OS'es, but covers most +# of the ones we need for now. +{ $as_echo "$as_me:$LINENO: checking if $RAWCPP requires -undef" >&5 +$as_echo_n "checking if $RAWCPP requires -undef... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +Does cpp redefine unix ? +_ACEOF +if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +else + if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then + RAWCPPFLAGS=-undef + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + # under Cygwin unix is still defined even with -undef + elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then + RAWCPPFLAGS="-undef -ansi" + { $as_echo "$as_me:$LINENO: result: yes, with -ansi" >&5 +$as_echo "yes, with -ansi" >&6; } + else + { { $as_echo "$as_me:$LINENO: error: ${RAWCPP} defines unix with or without -undef. I don't know what to do." >&5 +$as_echo "$as_me: error: ${RAWCPP} defines unix with or without -undef. I don't know what to do." >&2;} + { (exit 1); exit 1; }; } + fi +fi +rm -f conftest.$ac_ext + +{ $as_echo "$as_me:$LINENO: checking if $RAWCPP requires -traditional" >&5 +$as_echo_n "checking if $RAWCPP requires -traditional... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +Does cpp preserve "whitespace"? +_ACEOF +if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +else + if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then + RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + else + { { $as_echo "$as_me:$LINENO: error: ${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do." >&5 +$as_echo "$as_me: error: ${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do." >&2;} + { (exit 1); exit 1; }; } + fi +fi +rm -f conftest.$ac_ext + + + + +if test "x$GCC" = xyes ; then + CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ +-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ +-Wbad-function-cast" + case `$CC -dumpversion` in + 3.4.* | 4.*) + CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement" + ;; + esac +else + { $as_echo "$as_me:$LINENO: checking whether __SUNPRO_C is declared" >&5 +$as_echo_n "checking whether __SUNPRO_C is declared... " >&6; } +if test "${ac_cv_have_decl___SUNPRO_C+set}" = set; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +#ifndef __SUNPRO_C + (void) __SUNPRO_C; +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_have_decl___SUNPRO_C=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_have_decl___SUNPRO_C=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl___SUNPRO_C" >&5 +$as_echo "$ac_cv_have_decl___SUNPRO_C" >&6; } +if test $ac_cv_have_decl___SUNPRO_C = yes; then + SUNCC="yes" +else + SUNCC="no" +fi + + if test "x$SUNCC" = "xyes"; then + CWARNFLAGS="-v" + fi +fi + + + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done + ;; +esac + +done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 +$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} + { (exit 1); exit 1; }; } + +{ $as_echo "$as_me:$LINENO: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if test "${ac_cv_build+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 +$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + { (exit 1); exit 1; }; } +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 +$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 +$as_echo "$as_me: error: invalid value of canonical build" >&2;} + { (exit 1); exit 1; }; };; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:$LINENO: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if test "${ac_cv_host+set}" = set; then + $as_echo_n "(cached) " >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 +$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} + { (exit 1); exit 1; }; } +fi + +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 +$as_echo "$as_me: error: invalid value of canonical host" >&2;} + { (exit 1); exit 1; }; };; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + + +# xmlto is used to convert doc/design.xml from DocBook to PDF/HTML + +# Extract the first word of "xmlto", so it can be a program name with args. +set dummy xmlto; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_XMLTO+set}" = set; then + $as_echo_n "(cached) " >&6 +else + case $XMLTO in + [\\/]* | ?:[\\/]*) + ac_cv_path_XMLTO="$XMLTO" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_XMLTO="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +XMLTO=$ac_cv_path_XMLTO +if test -n "$XMLTO"; then + { $as_echo "$as_me:$LINENO: result: $XMLTO" >&5 +$as_echo "$XMLTO" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + +if test "x$XMLTO" != "x"; then + HAVE_XMLTO_TRUE= + HAVE_XMLTO_FALSE='#' +else + HAVE_XMLTO_TRUE='#' + HAVE_XMLTO_FALSE= +fi + + + +for ac_header in stdint.h +do +as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +fi +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5 +$as_echo_n "checking $ac_header usability... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_header_compiler=yes +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5 +$as_echo_n "checking $ac_header presence... " >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then ac_header_preproc=yes else - echo "$as_me: failed program was:" >&5 + $as_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 +{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) - { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) - { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 -echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX ## ---------------------------------------------------------------------- ## ## Report this to https://bugs.freedesktop.org/enter_bug.cgi?product=xorg ## ## ---------------------------------------------------------------------- ## _ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 + ) | 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 +{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5 +$as_echo_n "checking for $ac_header... " >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&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 +ac_res=`eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } fi -if test `eval echo '${'$as_ac_Header'}'` = yes; then +if test `eval 'as_val=${'$as_ac_Header'} + $as_echo "$as_val"'` = yes; then cat >>confdefs.h <<_ACEOF -#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi @@ -3680,13 +5702,13 @@ done -# Check whether --with-default-config-file or --without-default-config-file was given. +# Check whether --with-default-config-file was given. if test "${with_default_config_file+set}" = set; then - withval="$with_default_config_file" - CONFIG_FILE="$withval" + withval=$with_default_config_file; CONFIG_FILE="$withval" else CONFIG_FILE="${sysconfdir}/X11/fs/config" -fi; +fi + DEFAULT_CONFIG_FILE=`echo ${CONFIG_FILE} | sed 's/,/\\\\\\\\\\\",\\\\\\\\\\\"/'g` @@ -3721,6 +5743,206 @@ esac +# Determine font path to put in config file +# Uses --default-font-path if set, otherwise checks for /etc/X11/fontpath.d, +# otherwise uses default path copied from xserver configure.ac +as_ac_File=`$as_echo "ac_cv_file_${sysconfdir}/X11/fontpath.d" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for ${sysconfdir}/X11/fontpath.d" >&5 +$as_echo_n "checking for ${sysconfdir}/X11/fontpath.d... " >&6; } +if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + test "$cross_compiling" = yes && + { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { (exit 1); exit 1; }; } +if test -r "${sysconfdir}/X11/fontpath.d"; then + eval "$as_ac_File=yes" +else + eval "$as_ac_File=no" +fi +fi +ac_res=`eval 'as_val=${'$as_ac_File'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test `eval 'as_val=${'$as_ac_File'} + $as_echo "$as_val"'` = yes; then + DEFAULT_FONT_PATH='catalogue:$(sysconfdir)/X11/fontpath.d' +else + + DEFAULT_FONT_PATH='$(FONTDIR)/misc/,$(FONTDIR)/TTF/,$(FONTDIR)/OTF/,$(FONTDIR)/Type1/,$(FONTDIR)/100dpi/,$(FONTDIR)/75dpi/' + case $host_os in + darwin*) DEFAULT_FONT_PATH="${DEFAULT_FONT_PATH},/Library/Fonts,/System/Library/Fonts" ;; + esac + +fi + + + +# Check whether --with-default-font-path was given. +if test "${with_default_font_path+set}" = set; then + withval=$with_default_font_path; FONTPATH="$withval" +else + FONTPATH="${DEFAULT_FONT_PATH}" +fi + + + +# Option to enable support for building developer internals docs +# Check whether --enable-devel-docs was given. +if test "${enable_devel_docs+set}" = set; then + enableval=$enable_devel_docs; DEVEL_DOCS=$enableval +else + DEVEL_DOCS=yes +fi + + + +if test "x$DEVEL_DOCS" = "xyes"; then + MAKE_DEVEL_DOCS_TRUE= + MAKE_DEVEL_DOCS_FALSE='#' +else + MAKE_DEVEL_DOCS_TRUE='#' + MAKE_DEVEL_DOCS_FALSE= +fi + + +# Option to enable support for starting from inetd +# Check whether --enable-inetd was given. +if test "${enable_inetd+set}" = set; then + enableval=$enable_inetd; INETD=$enableval +else + INETD=yes +fi + +if test "x$INETD" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define XFS_INETD 1 +_ACEOF + +fi + +# Option to enable support for logging to syslog +# Check whether --enable-syslog was given. +if test "${enable_syslog+set}" = set; then + enableval=$enable_syslog; SYSLOG=$enableval +else + SYSLOG=yes +fi + +if test "x$SYSLOG" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define USE_SYSLOG 1 +_ACEOF + +fi + + +# Checks for system functions / libraries + +for ac_func in daemon +do +as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5 +$as_echo_n "checking for $ac_func... " >&6; } +if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then + $as_echo_n "(cached) " >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func. + For example, HP-UX 11i <limits.h> declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer <limits.h> to <assert.h> if __STDC__ is defined, since + <limits.h> exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include <limits.h> +#else +# include <assert.h> +#endif + +#undef $ac_func + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$ac_func || defined __stub___$ac_func +choke me +#endif + +int +main () +{ +return $ac_func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + eval "$as_ac_var=yes" +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + eval "$as_ac_var=no" +fi + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext conftest.$ac_ext +fi +ac_res=`eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` + { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +if test `eval 'as_val=${'$as_ac_var'} + $as_echo "$as_val"'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + # Checks for pkg-config packages @@ -3728,10 +5950,10 @@ if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -3744,36 +5966,37 @@ 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 -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG - if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 + { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi + fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 -echo "$as_me:$LINENO: checking for $ac_word" >&5 -echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) @@ -3786,28 +6009,42 @@ 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 -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done +IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG - if test -n "$ac_pt_PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5 -echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6 + { $as_echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5 +$as_echo "$ac_pt_PKG_CONFIG" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi - PKG_CONFIG=$ac_pt_PKG_CONFIG + if test "x$ac_pt_PKG_CONFIG" = x; then + PKG_CONFIG="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&5 +$as_echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools +whose name does not start with the host triplet. If you think this +configuration is useful to you, please write to autoconf@gnu.org." >&2;} +ac_tool_warned=yes ;; +esac + PKG_CONFIG=$ac_pt_PKG_CONFIG + fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi @@ -3815,32 +6052,32 @@ fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 - echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5 -echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5 +$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } PKG_CONFIG="" fi fi pkg_failed=no -echo "$as_me:$LINENO: checking for XFS" >&5 -echo $ECHO_N "checking for XFS... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking for XFS" >&5 +$as_echo_n "checking for XFS... " >&6; } if test -n "$PKG_CONFIG"; then if test -n "$XFS_CFLAGS"; then pkg_cv_XFS_CFLAGS="$XFS_CFLAGS" else if test -n "$PKG_CONFIG" && \ - { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libfs xfont xtrans\"") >&5 + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libfs xfont xtrans\"") >&5 ($PKG_CONFIG --exists --print-errors "libfs xfont xtrans") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_XFS_CFLAGS=`$PKG_CONFIG --cflags "libfs xfont xtrans" 2>/dev/null` else @@ -3855,10 +6092,10 @@ if test -n "$PKG_CONFIG"; then pkg_cv_XFS_LIBS="$XFS_LIBS" else if test -n "$PKG_CONFIG" && \ - { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libfs xfont xtrans\"") >&5 + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libfs xfont xtrans\"") >&5 ($PKG_CONFIG --exists --print-errors "libfs xfont xtrans") 2>&5 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_XFS_LIBS=`$PKG_CONFIG --libs "libfs xfont xtrans" 2>/dev/null` else @@ -3886,7 +6123,7 @@ fi # Put the nasty error message in config.log where it belongs echo "$XFS_PKG_ERRORS" >&5 - { { echo "$as_me:$LINENO: error: Package requirements (libfs xfont xtrans) were not met: + { { $as_echo "$as_me:$LINENO: error: Package requirements (libfs xfont xtrans) were not met: $XFS_PKG_ERRORS @@ -3897,7 +6134,7 @@ Alternatively, you may set the environment variables XFS_CFLAGS and XFS_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " >&5 -echo "$as_me: error: Package requirements (libfs xfont xtrans) were not met: +$as_echo "$as_me: error: Package requirements (libfs xfont xtrans) were not met: $XFS_PKG_ERRORS @@ -3910,7 +6147,7 @@ See the pkg-config man page for more details. " >&2;} { (exit 1); exit 1; }; } elif test $pkg_failed = untried; then - { { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it + { { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. @@ -3920,7 +6157,7 @@ See the pkg-config man page for more details. To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>. See \`config.log' for more details." >&5 -echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. @@ -3934,19 +6171,18 @@ See \`config.log' for more details." >&2;} else XFS_CFLAGS=$pkg_cv_XFS_CFLAGS XFS_LIBS=$pkg_cv_XFS_LIBS - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } : fi -XFS_CFLAGS="$XFS_CFLAGS $OS_CFLAGS" # Transport selection macro from xtrans.m4 -echo "$as_me:$LINENO: checking return type of signal handlers" >&5 -echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6 +{ $as_echo "$as_me:$LINENO: checking return type of signal handlers" >&5 +$as_echo_n "checking return type of signal handlers... " >&6; } if test "${ac_cv_type_signal+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -3956,56 +6192,45 @@ cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <sys/types.h> #include <signal.h> -#ifdef signal -# undef signal -#endif -#ifdef __cplusplus -extern "C" void (*signal (int, void (*)(int)))(int); -#else -void (*signal ()) (); -#endif int main () { -int i; +return *(signal (0, 0)) (0) == 1; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_signal=void -else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type_signal=int +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_signal=int + ac_cv_type_signal=void fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 -echo "${ECHO_T}$ac_cv_type_signal" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 +$as_echo "$ac_cv_type_signal" >&6; } cat >>confdefs.h <<_ACEOF #define RETSIGTYPE $ac_cv_type_signal @@ -4019,15 +6244,15 @@ _ACEOF mingw*) unixdef="no" ;; *) unixdef="yes" ;; esac - # Check whether --enable-unix-transport or --disable-unix-transport was given. + # Check whether --enable-unix-transport was given. if test "${enable_unix_transport+set}" = set; then - enableval="$enable_unix_transport" - UNIXCONN=$enableval + enableval=$enable_unix_transport; UNIXCONN=$enableval else UNIXCONN=$unixdef -fi; - echo "$as_me:$LINENO: checking if Xtrans should support UNIX socket connections" >&5 -echo $ECHO_N "checking if Xtrans should support UNIX socket connections... $ECHO_C" >&6 +fi + + { $as_echo "$as_me:$LINENO: checking if Xtrans should support UNIX socket connections" >&5 +$as_echo_n "checking if Xtrans should support UNIX socket connections... " >&6; } if test "$UNIXCONN" = "yes"; then cat >>confdefs.h <<\_ACEOF @@ -4035,19 +6260,19 @@ cat >>confdefs.h <<\_ACEOF _ACEOF fi - echo "$as_me:$LINENO: result: $UNIXCONN" >&5 -echo "${ECHO_T}$UNIXCONN" >&6 - # Check whether --enable-tcp-transport or --disable-tcp-transport was given. + { $as_echo "$as_me:$LINENO: result: $UNIXCONN" >&5 +$as_echo "$UNIXCONN" >&6; } + # Check whether --enable-tcp-transport was given. if test "${enable_tcp_transport+set}" = set; then - enableval="$enable_tcp_transport" - TCPCONN=$enableval + enableval=$enable_tcp_transport; TCPCONN=$enableval else TCPCONN=yes -fi; - echo "$as_me:$LINENO: checking if Xtrans should support TCP socket connections" >&5 -echo $ECHO_N "checking if Xtrans should support TCP socket connections... $ECHO_C" >&6 - echo "$as_me:$LINENO: result: $TCPCONN" >&5 -echo "${ECHO_T}$TCPCONN" >&6 +fi + + { $as_echo "$as_me:$LINENO: checking if Xtrans should support TCP socket connections" >&5 +$as_echo_n "checking if Xtrans should support TCP socket connections... " >&6; } + { $as_echo "$as_me:$LINENO: result: $TCPCONN" >&5 +$as_echo "$TCPCONN" >&6; } if test "$TCPCONN" = "yes"; then cat >>confdefs.h <<\_ACEOF @@ -4056,13 +6281,12 @@ _ACEOF # SVR4 hides these in libraries other than libc - echo "$as_me:$LINENO: checking for library containing socket" >&5 -echo $ECHO_N "checking for library containing socket... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for library containing socket" >&5 +$as_echo_n "checking for library containing socket... " >&6; } if test "${ac_cv_search_socket+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS -ac_cv_search_socket=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4070,125 +6294,86 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char socket (); int main () { -socket (); +return socket (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +for ac_lib in '' socket; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_socket="none required" -else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_search_socket=$ac_res +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test "$ac_cv_search_socket" = no; then - for ac_lib in socket; do - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char socket (); -int -main () -{ -socket (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 - ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_socket="-l$ac_lib" -break -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 +fi +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext + if test "${ac_cv_search_socket+set}" = set; then + break fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - done +done +if test "${ac_cv_search_socket+set}" = set; then + : +else + ac_cv_search_socket=no fi +rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi -echo "$as_me:$LINENO: result: $ac_cv_search_socket" >&5 -echo "${ECHO_T}$ac_cv_search_socket" >&6 -if test "$ac_cv_search_socket" != no; then - test "$ac_cv_search_socket" = "none required" || LIBS="$ac_cv_search_socket $LIBS" +{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_socket" >&5 +$as_echo "$ac_cv_search_socket" >&6; } +ac_res=$ac_cv_search_socket +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi - echo "$as_me:$LINENO: checking for library containing gethostbyname" >&5 -echo $ECHO_N "checking for library containing gethostbyname... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for library containing gethostbyname" >&5 +$as_echo_n "checking for library containing gethostbyname... " >&6; } if test "${ac_cv_search_gethostbyname+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS -ac_cv_search_gethostbyname=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -4196,129 +6381,160 @@ cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char gethostbyname (); int main () { -gethostbyname (); +return gethostbyname (); ; return 0; } _ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +for ac_lib in '' nsl; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + rm -f conftest.$ac_objext conftest$ac_exeext +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_gethostbyname="none required" -else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_search_gethostbyname=$ac_res +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -if test "$ac_cv_search_gethostbyname" = no; then - for ac_lib in nsl; do - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - cat >conftest.$ac_ext <<_ACEOF + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ + conftest$ac_exeext + if test "${ac_cv_search_gethostbyname+set}" = set; then + break +fi +done +if test "${ac_cv_search_gethostbyname+set}" = set; then + : +else + ac_cv_search_gethostbyname=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_gethostbyname" >&5 +$as_echo "$ac_cv_search_gethostbyname" >&6; } +ac_res=$ac_cv_search_gethostbyname +if test "$ac_res" != no; then + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +fi + + +{ $as_echo "$as_me:$LINENO: checking for main in -lws2_32" >&5 +$as_echo_n "checking for main in -lws2_32... " >&6; } +if test "${ac_cv_lib_ws2_32_main+set}" = set; then + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lws2_32 $LIBS" +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ -/* Override any gcc2 internal prototype to avoid an error. */ -#ifdef __cplusplus -extern "C" -#endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char gethostbyname (); + int main () { -gethostbyname (); +return main (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_search_gethostbyname="-l$ac_lib" -break -else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then + ac_cv_lib_ws2_32_main=yes +else + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 + ac_cv_lib_ws2_32_main=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext - done +LIBS=$ac_check_lib_save_LIBS fi -LIBS=$ac_func_search_save_LIBS -fi -echo "$as_me:$LINENO: result: $ac_cv_search_gethostbyname" >&5 -echo "${ECHO_T}$ac_cv_search_gethostbyname" >&6 -if test "$ac_cv_search_gethostbyname" != no; then - test "$ac_cv_search_gethostbyname" = "none required" || LIBS="$ac_cv_search_gethostbyname $LIBS" +{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ws2_32_main" >&5 +$as_echo "$ac_cv_lib_ws2_32_main" >&6; } +if test $ac_cv_lib_ws2_32_main = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBWS2_32 1 +_ACEOF + + LIBS="-lws2_32 $LIBS" fi +ac_cv_lib_ws2_32=ac_cv_lib_ws2_32_main # Needs to come after above checks for libsocket & libnsl for SVR4 systems - # Check whether --enable-ipv6 or --disable-ipv6 was given. + # Check whether --enable-ipv6 was given. if test "${enable_ipv6+set}" = set; then - enableval="$enable_ipv6" - IPV6CONN=$enableval + enableval=$enable_ipv6; IPV6CONN=$enableval else - echo "$as_me:$LINENO: checking for getaddrinfo" >&5 -echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for getaddrinfo" >&5 +$as_echo_n "checking for getaddrinfo... " >&6; } if test "${ac_cv_func_getaddrinfo+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -4343,77 +6559,73 @@ cat >>conftest.$ac_ext <<_ACEOF #undef getaddrinfo -/* Override any gcc2 internal prototype to avoid an error. */ +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" -{ #endif -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ char getaddrinfo (); /* 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_getaddrinfo) || defined (__stub___getaddrinfo) +#if defined __stub_getaddrinfo || defined __stub___getaddrinfo choke me -#else -char (*f) () = getaddrinfo; -#endif -#ifdef __cplusplus -} #endif int main () { -return f != getaddrinfo; +return getaddrinfo (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext -if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>conftest.er1 +if { (ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest$ac_exeext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + $as_test_x conftest$ac_exeext + }; then ac_cv_func_getaddrinfo=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_func_getaddrinfo=no + ac_cv_func_getaddrinfo=no fi -rm -f conftest.err conftest.$ac_objext \ + +rm -rf conftest.dSYM +rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5 -echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5 +$as_echo "$ac_cv_func_getaddrinfo" >&6; } if test $ac_cv_func_getaddrinfo = yes; then IPV6CONN=yes else IPV6CONN=no fi -fi; - echo "$as_me:$LINENO: checking if IPv6 support should be built" >&5 -echo $ECHO_N "checking if IPv6 support should be built... $ECHO_C" >&6 +fi + + { $as_echo "$as_me:$LINENO: checking if IPv6 support should be built" >&5 +$as_echo_n "checking if IPv6 support should be built... " >&6; } if test "$IPV6CONN" = "yes"; then cat >>confdefs.h <<\_ACEOF @@ -4421,14 +6633,14 @@ cat >>confdefs.h <<\_ACEOF _ACEOF fi - echo "$as_me:$LINENO: result: $IPV6CONN" >&5 -echo "${ECHO_T}$IPV6CONN" >&6 + { $as_echo "$as_me:$LINENO: result: $IPV6CONN" >&5 +$as_echo "$IPV6CONN" >&6; } # 4.3BSD-Reno added a new member to struct sockaddr_in - echo "$as_me:$LINENO: checking for struct sockaddr_in.sin_len" >&5 -echo $ECHO_N "checking for struct sockaddr_in.sin_len... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for struct sockaddr_in.sin_len" >&5 +$as_echo_n "checking for struct sockaddr_in.sin_len... " >&6; } if test "${ac_cv_member_struct_sockaddr_in_sin_len+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ @@ -4453,33 +6665,29 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_member_struct_sockaddr_in_sin_len=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -cat >conftest.$ac_ext <<_ACEOF + cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -4502,40 +6710,38 @@ return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then ac_cv_member_struct_sockaddr_in_sin_len=yes else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_member_struct_sockaddr_in_sin_len=no + ac_cv_member_struct_sockaddr_in_sin_len=no fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_in_sin_len" >&5 -echo "${ECHO_T}$ac_cv_member_struct_sockaddr_in_sin_len" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_in_sin_len" >&5 +$as_echo "$ac_cv_member_struct_sockaddr_in_sin_len" >&6; } if test $ac_cv_member_struct_sockaddr_in_sin_len = yes; then cat >>confdefs.h <<\_ACEOF @@ -4546,12 +6752,13 @@ fi # POSIX.1g changed the type of pointer passed to getsockname/getpeername/etc. - echo "$as_me:$LINENO: checking for socklen_t" >&5 -echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6 + { $as_echo "$as_me:$LINENO: checking for socklen_t" >&5 +$as_echo_n "checking for socklen_t... " >&6; } if test "${ac_cv_type_socklen_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 + $as_echo_n "(cached) " >&6 else - cat >conftest.$ac_ext <<_ACEOF + ac_cv_type_socklen_t=no +cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -4564,47 +6771,87 @@ $ac_includes_default int main () { -if ((socklen_t *) 0) - return 0; if (sizeof (socklen_t)) - return 0; + return 0; ; return 0; } _ACEOF rm -f conftest.$ac_objext -if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 - (eval $ac_compile) 2>conftest.er1 +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && - { ac_try='test -z "$ac_c_werror_flag" - || test ! -s conftest.err' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; } && - { ac_try='test -s conftest.$ac_objext' - { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 - (eval $ac_try) 2>&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +$ac_includes_default +#include <sys/socket.h> + +int +main () +{ +if (sizeof ((socklen_t))) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" +$as_echo "$ac_try_echo") >&5 + (eval "$ac_compile") 2>conftest.er1 ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_type_socklen_t=yes + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + : else - echo "$as_me: failed program was:" >&5 + $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 -ac_cv_type_socklen_t=no + ac_cv_type_socklen_t=yes fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5 -echo "${ECHO_T}$ac_cv_type_socklen_t" >&6 +{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5 +$as_echo "$ac_cv_type_socklen_t" >&6; } if test $ac_cv_type_socklen_t = yes; then cat >>confdefs.h <<_ACEOF @@ -4621,17 +6868,17 @@ fi solaris*|sco*|sysv4*) localdef="yes" ;; *) localdef="no" ;; esac - # Check whether --enable-local-transport or --disable-local-transport was given. + # Check whether --enable-local-transport was given. if test "${enable_local_transport+set}" = set; then - enableval="$enable_local_transport" - LOCALCONN=$enableval + enableval=$enable_local_transport; LOCALCONN=$enableval else LOCALCONN=$localdef -fi; - echo "$as_me:$LINENO: checking if Xtrans should support os-specific local connections" >&5 -echo $ECHO_N "checking if Xtrans should support os-specific local connections... $ECHO_C" >&6 - echo "$as_me:$LINENO: result: $LOCALCONN" >&5 -echo "${ECHO_T}$LOCALCONN" >&6 +fi + + { $as_echo "$as_me:$LINENO: checking if Xtrans should support os-specific local connections" >&5 +$as_echo_n "checking if Xtrans should support os-specific local connections... " >&6; } + { $as_echo "$as_me:$LINENO: result: $LOCALCONN" >&5 +$as_echo "$LOCALCONN" >&6; } if test "$LOCALCONN" = "yes"; then cat >>confdefs.h <<\_ACEOF @@ -4646,13 +6893,13 @@ _ACEOF # Allow checking code with lint, sparse, etc. -# Check whether --with-lint or --without-lint was given. +# Check whether --with-lint was given. if test "${with_lint+set}" = set; then - withval="$with_lint" - use_lint=$withval + withval=$with_lint; use_lint=$withval else use_lint=no -fi; +fi + if test "x$use_lint" = "xyes" ; then LINT="lint" else @@ -4758,18 +7005,18 @@ fi -# Check whether --with-release-version or --without-release-version was given. +# Check whether --with-release-version was given. if test "${with_release_version+set}" = set; then - withval="$with_release_version" - RELEASE_VERSION="$withval" + withval=$with_release_version; RELEASE_VERSION="$withval" else RELEASE_VERSION="" -fi; +fi + if test "x$RELEASE_VERSION" != "x"; then PACKAGE="$PACKAGE-$RELEASE_VERSION" PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" - { echo "$as_me:$LINENO: Building with package name set to $PACKAGE" >&5 -echo "$as_me: Building with package name set to $PACKAGE" >&6;} + { $as_echo "$as_me:$LINENO: Building with package name set to $PACKAGE" >&5 +$as_echo "$as_me: Building with package name set to $PACKAGE" >&6;} fi cat >>confdefs.h <<_ACEOF @@ -4796,7 +7043,16 @@ _ACEOF - ac_config_files="$ac_config_files Makefile" +CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \ +mv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \ +echo 'git directory not found: installing possibly empty changelog.' >&2)" + +distcleancheck_listfiles='find . -type f ! -name ChangeLog -print' + + + +ac_config_files="$ac_config_files Makefile" + cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure @@ -4815,39 +7071,59 @@ _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. +# So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. -{ +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 +$as_echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) $as_unset $ac_var ;; + esac ;; + esac + done + (set) 2>&1 | - case `(ac_space=' '; set | grep ac_space) 2>&1` in - *ac_space=\ *) + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; + ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n \ - "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; - esac; -} | + esac | + sort +) | sed ' + /^ac_cv_env_/b end t clear - : 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" + 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" && + { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else - echo "not updating unwritable cache $cache_file" + { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache @@ -4856,32 +7132,18 @@ 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' + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs @@ -4889,40 +7151,62 @@ LTLIBOBJS=$ac_ltlibobjs if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. + { { $as_echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. +$as_echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. + { { $as_echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"AMDEP\" was never defined. +$as_echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. + { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_XMLTO_TRUE}" && test -z "${HAVE_XMLTO_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_XMLTO\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"HAVE_XMLTO\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${MAKE_DEVEL_DOCS_TRUE}" && test -z "${MAKE_DEVEL_DOCS_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"MAKE_DEVEL_DOCS\" was never defined. Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +$as_echo "$as_me: error: conditional \"MAKE_DEVEL_DOCS\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${LINT_TRUE}" && test -z "${LINT_FALSE}"; then - { { echo "$as_me:$LINENO: error: conditional \"LINT\" was never defined. + { { $as_echo "$as_me:$LINENO: error: conditional \"LINT\" was never defined. Usually this means the macro was only invoked conditionally." >&5 -echo "$as_me: error: conditional \"LINT\" was never defined. +$as_echo "$as_me: error: conditional \"LINT\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi : ${CONFIG_STATUS=./config.status} +ac_write_fail=0 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 +{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. @@ -4935,22 +7219,78 @@ ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## -# Be Bourne compatible +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # Pre-4.2 versions of Zsh do 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 + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in + *posix*) set -o posix ;; +esac + +fi + + + + +# PATH needs CR +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } fi -DUALCASE=1; export DUALCASE # for MKS sh # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then @@ -4960,33 +7300,60 @@ else fi +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + { (exit 1); exit 1; } +fi + # Work around bugs in pre-3.0 UWIN ksh. -$as_unset ENV MAIL MAILPATH +for as_var in ENV MAIL MAILPATH +do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var +done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. -for as_var in \ - LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ - LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ - LC_TELEPHONE LC_TIME -do - if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then - eval $as_var=C; export $as_var - else - $as_unset $as_var - fi -done +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE # Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1; then +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi -if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false @@ -4994,159 +7361,122 @@ fi # Name of the executable. -as_me=`$as_basename "$0" || +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 + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` -# 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 +# CDPATH. +$as_unset CDPATH - 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 + test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a - # line-number line 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. + # line-number line after each line using $LINENO; the second 'sed' + # does the real work. The second script uses 'N' to pair each + # line-number line with the line containing $LINENO, and appends + # trailing '-' during substitution so that $LINENO is not a special + # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the - # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) - sed '=' <$as_myself | + # scripts with optimization help from Paolo Bonzini. Blame Lee + # E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno N - s,$,-, - : loop - s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop - s,-$,, - s,^['$as_cr_digits']*\n,, + s/-\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;} + chmod +x "$as_me.lineno" || + { $as_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 + # original and so on. Autoconf is especially sensitive 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 (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi -if expr a : '\(a\)' >/dev/null 2>&1; then +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in +-n*) + case `echo 'x\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + *) ECHO_C='\c';; + esac;; +*) + ECHO_N='-n';; +esac +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file -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 +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -p'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -p' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -p' fi -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 +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p=: @@ -5155,7 +7485,28 @@ else as_mkdir_p=false fi -as_executable_p="test -f" +if test -x / >/dev/null 2>&1; then + as_test_x='test -x' +else + if ls -dL / >/dev/null 2>&1; then + as_ls_L_option=L + else + as_ls_L_option= + fi + as_test_x=' + eval sh -c '\'' + if test -d "$1"; then + test -d "$1/."; + else + case $1 in + -*)set "./$1";; + esac; + case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in + ???[sx]*):;;*)false;;esac;fi + '\'' sh + ' +fi +as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -5164,31 +7515,14 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" -# IFS -# We need space, tab and new line, in precisely that order. -as_nl=' -' -IFS=" $as_nl" - -# CDPATH. -$as_unset CDPATH - exec 6>&1 -# Open the log real soon, to keep \$[0] and so on meaningful, and to +# Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. 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 xfs $as_me 1.0.8, which was -generated by GNU Autoconf 2.59. Invocation command line was +# values after options handling. +ac_log=" +This file was extended by xfs $as_me 1.1.0, which was +generated by GNU Autoconf 2.62. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -5196,30 +7530,20 @@ generated by GNU Autoconf 2.59. Invocation command line was CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ -_CSEOF -echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 -echo >&5 +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + _ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # 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 +config_files="$ac_config_files" +config_headers="$ac_config_headers" +config_commands="$ac_config_commands" -cat >>$CONFIG_STATUS <<\_ACEOF +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. @@ -5227,14 +7551,14 @@ current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit - -V, --version print version number, then exit + -V, --version print version number and configuration settings, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] - instantiate the configuration file FILE + instantiate the configuration file FILE --header=FILE[:TEMPLATE] - instantiate the configuration header FILE + instantiate the configuration header FILE Configuration files: $config_files @@ -5246,83 +7570,83 @@ Configuration commands: $config_commands Report bugs to <bug-autoconf@gnu.org>." -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ -xfs config.status 1.0.8 -configured by $0, generated by GNU Autoconf 2.59, - with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" +xfs config.status 1.1.0 +configured by $0, generated by GNU Autoconf 2.62, + with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" -Copyright (C) 2003 Free Software Foundation, Inc. +Copyright (C) 2008 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" + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +AWK='$AWK' +test -n "\$AWK" || AWK=awk _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. +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) - ac_option=`expr "x$1" : 'x\([^=]*\)='` - ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + ac_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 ) + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift - CONFIG_FILES="$CONFIG_FILES $ac_optarg" + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + CONFIG_FILES="$CONFIG_FILES '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift - CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'" ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + { $as_echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. - -*) { { 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;} + -*) { $as_echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; - *) ac_config_targets="$ac_config_targets $1" ;; + *) ac_config_targets="$ac_config_targets $1" + ac_need_defaults=false ;; esac shift @@ -5336,39 +7660,53 @@ if $ac_cs_silent; then fi _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 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 + set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" fi _ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 -cat >>$CONFIG_STATUS <<_ACEOF +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # -# INIT-COMMANDS section. +# INIT-COMMANDS # - AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<\_ACEOF +# Handling of arguments. for ac_config_target in $ac_config_targets do - case "$ac_config_target" in - # Handling of arguments. - "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "xfs-config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS xfs-config.h" ;; - *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 -echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + case $ac_config_target in + "xfs-config.h") CONFIG_HEADERS="$CONFIG_HEADERS xfs-config.h" ;; + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + + *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +$as_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 @@ -5380,748 +7718,634 @@ if $ac_need_defaults; then 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, +# simply because there is no reason against having 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. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. $debug || { - trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + tmp= + trap 'exit_status=$? + { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status +' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } - # Create a (secure) tmp directory for tmp files. { - tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { - tmp=./confstat$$-$RANDOM - (umask 077 && mkdir $tmp) + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") } || { - echo "$me: cannot create a temporary directory in ." >&2 + $as_echo "$as_me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr='
' +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$tmp/subs1.awk" && _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF -# -# CONFIG_FILES section. -# +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } +ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } -# No need to generate the scripts if there are no CONFIG_FILES. -# This happens for instance when ./config.status config.h -if test -n "\$CONFIG_FILES"; then - # Protect against being on the right side of a sed subst in config.status. - sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; - s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF -s,@SHELL@,$SHELL,;t t -s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t -s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t -s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t -s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t -s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t -s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t -s,@exec_prefix@,$exec_prefix,;t t -s,@prefix@,$prefix,;t t -s,@program_transform_name@,$program_transform_name,;t t -s,@bindir@,$bindir,;t t -s,@sbindir@,$sbindir,;t t -s,@libexecdir@,$libexecdir,;t t -s,@datadir@,$datadir,;t t -s,@sysconfdir@,$sysconfdir,;t t -s,@sharedstatedir@,$sharedstatedir,;t t -s,@localstatedir@,$localstatedir,;t t -s,@libdir@,$libdir,;t t -s,@includedir@,$includedir,;t t -s,@oldincludedir@,$oldincludedir,;t t -s,@infodir@,$infodir,;t t -s,@mandir@,$mandir,;t t -s,@build_alias@,$build_alias,;t t -s,@host_alias@,$host_alias,;t t -s,@target_alias@,$target_alias,;t t -s,@DEFS@,$DEFS,;t t -s,@ECHO_C@,$ECHO_C,;t t -s,@ECHO_N@,$ECHO_N,;t t -s,@ECHO_T@,$ECHO_T,;t t -s,@LIBS@,$LIBS,;t t -s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t -s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t -s,@INSTALL_DATA@,$INSTALL_DATA,;t t -s,@CYGPATH_W@,$CYGPATH_W,;t t -s,@PACKAGE@,$PACKAGE,;t t -s,@VERSION@,$VERSION,;t t -s,@ACLOCAL@,$ACLOCAL,;t t -s,@AUTOCONF@,$AUTOCONF,;t t -s,@AUTOMAKE@,$AUTOMAKE,;t t -s,@AUTOHEADER@,$AUTOHEADER,;t t -s,@MAKEINFO@,$MAKEINFO,;t t -s,@install_sh@,$install_sh,;t t -s,@STRIP@,$STRIP,;t t -s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t -s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t -s,@mkdir_p@,$mkdir_p,;t t -s,@AWK@,$AWK,;t t -s,@SET_MAKE@,$SET_MAKE,;t t -s,@am__leading_dot@,$am__leading_dot,;t t -s,@AMTAR@,$AMTAR,;t t -s,@am__tar@,$am__tar,;t t -s,@am__untar@,$am__untar,;t t -s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t -s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t -s,@MAINT@,$MAINT,;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,@DEPDIR@,$DEPDIR,;t t -s,@am__include@,$am__include,;t t -s,@am__quote@,$am__quote,;t t -s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t -s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t -s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t -s,@CCDEPMODE@,$CCDEPMODE,;t t -s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t -s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;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,@CPP@,$CPP,;t t -s,@EGREP@,$EGREP,;t t -s,@DEFAULT_CONFIG_FILE@,$DEFAULT_CONFIG_FILE,;t t -s,@CONFIG_FILE_DESC@,$CONFIG_FILE_DESC,;t t -s,@CONFIG_FILE_PATH@,$CONFIG_FILE_PATH,;t t -s,@PKG_CONFIG@,$PKG_CONFIG,;t t -s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t -s,@XFS_CFLAGS@,$XFS_CFLAGS,;t t -s,@XFS_LIBS@,$XFS_LIBS,;t t -s,@LINT@,$LINT,;t t -s,@LINT_FLAGS@,$LINT_FLAGS,;t t -s,@LINT_TRUE@,$LINT_TRUE,;t t -s,@LINT_FALSE@,$LINT_FALSE,;t t -s,@APP_MAN_SUFFIX@,$APP_MAN_SUFFIX,;t t -s,@LIB_MAN_SUFFIX@,$LIB_MAN_SUFFIX,;t t -s,@FILE_MAN_SUFFIX@,$FILE_MAN_SUFFIX,;t t -s,@MISC_MAN_SUFFIX@,$MISC_MAN_SUFFIX,;t t -s,@DRIVER_MAN_SUFFIX@,$DRIVER_MAN_SUFFIX,;t t -s,@ADMIN_MAN_SUFFIX@,$ADMIN_MAN_SUFFIX,;t t -s,@APP_MAN_DIR@,$APP_MAN_DIR,;t t -s,@LIB_MAN_DIR@,$LIB_MAN_DIR,;t t -s,@FILE_MAN_DIR@,$FILE_MAN_DIR,;t t -s,@MISC_MAN_DIR@,$MISC_MAN_DIR,;t t -s,@DRIVER_MAN_DIR@,$DRIVER_MAN_DIR,;t t -s,@ADMIN_MAN_DIR@,$ADMIN_MAN_DIR,;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 + if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` = $ac_delim_num; then + break + elif $ac_last_try; then + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\).*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\).*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' <conf$$subs.awk | sed ' +/^[^""]/{ + N + s/\n// +} +' >>$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ + || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5 +$as_echo "$as_me: error: could not setup config files machinery" >&2;} + { (exit 1); exit 1; }; } +_ACEOF + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/ +s/:*\${srcdir}:*/:/ +s/:*@srcdir@:*/:/ +s/^\([^=]*=[ ]*\):*/\1/ +s/:*$// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" +# Set up the scripts for CONFIG_HEADERS section. +# No need to generate them if there are no CONFIG_HEADERS. +# This happens for instance with `./config.status Makefile'. +if test -n "$CONFIG_HEADERS"; then +cat >"$tmp/defines.awk" <<\_ACAWK || +BEGIN { _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 ;; + +# Transform confdefs.h into an awk script `defines.awk', embedded as +# here-document in config.status, that substitutes the proper values into +# config.h.in to produce config.h. + +# Create a delimiter string that does not exist in confdefs.h, to ease +# handling of long lines. +ac_delim='%!_!# ' +for ac_last_try in false false :; do + ac_t=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_t"; then + break + elif $ac_last_try; then + { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5 +$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;} + { (exit 1); exit 1; }; } + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +# For the awk script, D is an array of macro values keyed by name, +# likewise P contains macro parameters if any. Preserve backslash +# newline sequences. + +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +sed -n ' +s/.\{148\}/&'"$ac_delim"'/g +t rset +:rset +s/^[ ]*#[ ]*define[ ][ ]*/ / +t def +d +:def +s/\\$// +t bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3"/p +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p +d +:bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3\\\\\\n"\\/p +t cont +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p +t cont +d +:cont +n +s/.\{148\}/&'"$ac_delim"'/g +t clear +:clear +s/\\$// +t bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/"/p +d +:bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p +b cont +' <confdefs.h | sed ' +s/'"$ac_delim"'/"\\\ +"/g' >>$CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + for (key in D) D_is_set[key] = 1 + FS = "" +} +/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { + line = \$ 0 + split(line, arg, " ") + if (arg[1] == "#") { + defundef = arg[2] + mac1 = arg[3] + } else { + defundef = substr(arg[1], 2) + mac1 = arg[2] + } + split(mac1, mac2, "(") #) + macro = mac2[1] + if (D_is_set[macro]) { + # Preserve the white space surrounding the "#". + prefix = substr(line, 1, index(line, defundef) - 1) + print prefix "define", macro P[macro] D[macro] + next + } else { + # Replace #undef with comments. This is necessary, for example, + # in the case of _POSIX_SOURCE, which is predefined and required + # on some systems where configure will not decide to define it. + if (defundef == "undef") { + print "/*", line, "*/" + next + } + } +} +{ print } +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5 +$as_echo "$as_me: error: could not setup config headers machinery" >&2;} + { (exit 1); exit 1; }; } +fi # test -n "$CONFIG_HEADERS" + + +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 +$as_echo "$as_me: error: Invalid tag $ac_tag." >&2;} + { (exit 1); exit 1; }; };; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 +$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;} + { (exit 1); exit 1; }; };; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + ac_file_inputs="$ac_file_inputs '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:$LINENO: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$tmp/stdin" \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } ;; + esac + ;; esac - # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. - ac_dir=`(dirname "$ac_file") 2>/dev/null || + ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir="$ac_dir" + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break done - test ! -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;} + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +$as_echo "$as_me: error: cannot create directory $as_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 "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix case $srcdir in - .) # No --srcdir option. We are building in place. + .) # 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_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. 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 ;; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac + case $ac_mode in + :F) + # + # CONFIG_FILE + # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_builddir$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac +_ACEOF - 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; } +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= + +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p +' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF -cat >>$CONFIG_STATUS <<_ACEOF - sed "$ac_vpsub +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub $extrasub _ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s,@configure_input@,$configure_input,;t t -s,@srcdir@,$ac_srcdir,;t t -s,@abs_srcdir@,$ac_abs_srcdir,;t t -s,@top_srcdir@,$ac_top_srcdir,;t t -s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t -s,@builddir@,$ac_builddir,;t t -s,@abs_builddir@,$ac_abs_builddir,;t t -s,@top_builddir@,$ac_top_builddir,;t t -s,@abs_top_builddir@,$ac_abs_top_builddir,;t t -s,@INSTALL@,$ac_INSTALL,;t t -" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out - rm -f $tmp/stdin - if test x"$ac_file" != x-; then - mv $tmp/out $ac_file - else - cat $tmp/out - rm -f $tmp/out - fi - -done -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } -# -# CONFIG_HEADER section. -# +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined." >&2;} -# 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". + rm -f "$tmp/stdin" case $ac_file in - - | *:- | *:-:* ) # input from stdin - cat >$tmp/stdin - ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; - * ) ac_file_in=$ac_file.in ;; - esac - - test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - - # First look for the input files in the build tree, otherwise in the - # src tree. - ac_file_inputs=`IFS=: - for f in $ac_file_in; do - case $f in - -) echo $tmp/stdin ;; - [\\/$]*) - # Absolute (can't be DOS-style, as IFS=:) - test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} - { (exit 1); exit 1; }; } - # Do quote $f, to prevent DOS paths from being IFS'd. - echo "$f";; - *) # Relative - if test -f "$f"; then - # Build tree - echo "$f" - elif test -f "$srcdir/$f"; then - # Source tree - echo "$srcdir/$f" - else - # /dev/null tree - { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 -echo "$as_me: error: cannot find input file: $f" >&2;} + -) cat "$tmp/out" && rm -f "$tmp/out";; + *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + esac \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} { (exit 1); exit 1; }; } - fi;; - esac - done` || { (exit 1); exit 1; } - # Remove the trailing spaces. - sed 's/[ ]*$//' $ac_file_inputs >$tmp/in - -_ACEOF - -# Transform confdefs.h into two sed scripts, `conftest.defines' and -# `conftest.undefs', that substitutes the proper values into -# config.h.in to produce config.h. The first handles `#define' -# templates, and the second `#undef' templates. -# And first: Protect against being on the right side of a sed subst in -# config.status. Protect against being in an unquoted here document -# in config.status. -rm -f conftest.defines conftest.undefs -# Using a here document instead of a string reduces the quoting nightmare. -# Putting comments in sed scripts is not portable. -# -# `end' is used to avoid that the second main sed command (meant for -# 0-ary CPP macros) applies to n-ary macro definitions. -# See the Autoconf documentation for `clear'. -cat >confdef2sed.sed <<\_ACEOF -s/[\\&,]/\\&/g -s,[\\$`],\\&,g -t clear -: clear -s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp -t end -s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp -: end -_ACEOF -# If some macros were called several times there might be several times -# the same #defines, which is useless. Nevertheless, we may not want to -# sort them, since we want the *last* AC-DEFINE to be honored. -uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines -sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs -rm -f confdef2sed.sed - -# This sed command replaces #undef with comments. This is necessary, for -# example, in the case of _POSIX_SOURCE, which is predefined and required -# on some systems where configure will not decide to define it. -cat >>conftest.undefs <<\_ACEOF -s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, -_ACEOF - -# Break up conftest.defines because some shells have a limit on the size -# of here documents, and old seds have small limits too (100 cmds). -echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS -echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS -echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS -echo ' :' >>$CONFIG_STATUS -rm -f conftest.tail -while grep . conftest.defines >/dev/null -do - # Write a limited-size here document to $tmp/defines.sed. - echo ' cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS - # Speed up: don't consider the non `#define' lines. - echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS - # Work around the forget-to-reset-the-flag bug. - echo 't clr' >>$CONFIG_STATUS - echo ': clr' >>$CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS - echo 'CEOF - sed -f $tmp/defines.sed $tmp/in >$tmp/out - rm -f $tmp/in - mv $tmp/out $tmp/in -' >>$CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail - rm -f conftest.defines - mv conftest.tail conftest.defines -done -rm -f conftest.defines -echo ' fi # grep' >>$CONFIG_STATUS -echo >>$CONFIG_STATUS - -# Break up conftest.undefs because some shells have a limit on the size -# of here documents, and old seds have small limits too (100 cmds). -echo ' # Handle all the #undef templates' >>$CONFIG_STATUS -rm -f conftest.tail -while grep . conftest.undefs >/dev/null -do - # Write a limited-size here document to $tmp/undefs.sed. - echo ' cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS - # Speed up: don't consider the non `#undef' - echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS - # Work around the forget-to-reset-the-flag bug. - echo 't clr' >>$CONFIG_STATUS - echo ': clr' >>$CONFIG_STATUS - sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS - echo 'CEOF - sed -f $tmp/undefs.sed $tmp/in >$tmp/out - rm -f $tmp/in - mv $tmp/out $tmp/in -' >>$CONFIG_STATUS - sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail - rm -f conftest.undefs - mv conftest.tail conftest.undefs -done -rm -f conftest.undefs - -cat >>$CONFIG_STATUS <<\_ACEOF - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - if test x"$ac_file" = x-; then - echo "/* Generated by configure. */" >$tmp/config.h - else - echo "/* $ac_file. Generated by configure. */" >$tmp/config.h - fi - cat $tmp/in >>$tmp/config.h - rm -f $tmp/in + ;; + :H) + # + # CONFIG_HEADER + # 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;} + { + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" + } >"$tmp/config.h" \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } + if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +$as_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 + rm -f "$ac_file" + mv "$tmp/config.h" "$ac_file" \ + || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5 +$as_echo "$as_me: error: could not create $ac_file" >&2;} + { (exit 1); exit 1; }; } fi else - cat $tmp/config.h - rm -f $tmp/config.h + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ + || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5 +$as_echo "$as_me: error: could not create -" >&2;} + { (exit 1); exit 1; }; } fi -# Compute $ac_file's index in $config_headers. +# Compute "$ac_file"'s index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in - $ac_file | $ac_file:* ) + "$ac_file" | "$ac_file":* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done -echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null || -$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X$ac_file : 'X\(//\)[^/]' \| \ - X$ac_file : 'X\(//\)$' \| \ - X$ac_file : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X$ac_file | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'`/stamp-h$_am_stamp_count -done -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF - -# -# CONFIG_COMMANDS section. -# -for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue - ac_dest=`echo "$ac_file" | sed 's,:.*,,'` - ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` - ac_dir=`(dirname "$ac_dest") 2>/dev/null || -$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_dest" : 'X\(//\)[^/]' \| \ - X"$ac_dest" : 'X\(//\)$' \| \ - X"$ac_dest" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$ac_dest" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p "$ac_dir" - else - as_dir="$ac_dir" - as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 -echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} - { (exit 1); exit 1; }; }; } - - ac_builddir=. - -if test "$ac_dir" != .; then - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A "../" for each directory in $ac_dir_suffix. - ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` -else - ac_dir_suffix= ac_top_builddir= -fi - -case $srcdir in - .) # No --srcdir option. We are building in place. - ac_srcdir=. - if test -z "$ac_top_builddir"; then - ac_top_srcdir=. - else - ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` - fi ;; - [\\/]* | ?:[\\/]* ) # Absolute path. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir ;; - *) # Relative path. - ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_builddir$srcdir ;; -esac +echo "timestamp for "$ac_file"" >`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'`/stamp-h$_am_stamp_count + ;; -# Do not use `cd foo && pwd` to compute absolute paths, because -# the directories may not exist. -case `pwd` in -.) ac_abs_builddir="$ac_dir";; -*) - case "$ac_dir" in - .) ac_abs_builddir=`pwd`;; - [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; - *) ac_abs_builddir=`pwd`/"$ac_dir";; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_builddir=${ac_top_builddir}.;; -*) - case ${ac_top_builddir}. in - .) ac_abs_top_builddir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; - *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_srcdir=$ac_srcdir;; -*) - case $ac_srcdir in - .) ac_abs_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; - *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; - esac;; -esac -case $ac_abs_builddir in -.) ac_abs_top_srcdir=$ac_top_srcdir;; -*) - case $ac_top_srcdir in - .) ac_abs_top_srcdir=$ac_abs_builddir;; - [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; - *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; - esac;; -esac + :C) { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac - { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 -echo "$as_me: executing $ac_dest commands" >&6;} - case $ac_dest in - depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do + case $ac_file$ac_mode in + "depfiles":C) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. @@ -6131,18 +8355,29 @@ echo "$as_me: executing $ac_dest commands" >&6;} # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then - dirpart=`(dirname "$mf") 2>/dev/null || + dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$mf" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` else continue fi @@ -6164,59 +8399,90 @@ echo X"$mf" | sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue - fdir=`(dirname "$file") 2>/dev/null || + fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` - { if $as_mkdir_p; then - mkdir -p $dirpart/$fdir - else - as_dir=$dirpart/$fdir + X"$file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + { as_dir=$dirpart/$fdir + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= - while test ! -d "$as_dir"; do - as_dirs="$as_dir $as_dirs" - as_dir=`(dirname "$as_dir") 2>/dev/null || + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| \ - . : '\(.\)' 2>/dev/null || -echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } - /^X\(\/\/\)[^/].*/{ s//\1/; q; } - /^X\(\/\/\)$/{ s//\1/; q; } - /^X\(\/\).*/{ s//\1/; q; } - s/.*/./; q'` + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break done - test ! -n "$as_dirs" || mkdir $as_dirs - fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5 -echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;} + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 +$as_echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } - # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; + esac -done -_ACEOF +done # for ac_tag -cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save +test $ac_write_fail = 0 || + { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;} + { (exit 1); exit 1; }; } + # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. @@ -6238,4 +8504,8 @@ if test "$no_create" != yes; then # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:$LINENO: WARNING: Unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: Unrecognized options: $ac_unrecognized_opts" >&2;} +fi diff --git a/app/xfs/configure.ac b/app/xfs/configure.ac index 54f81de55..dc7559c48 100644 --- a/app/xfs/configure.ac +++ b/app/xfs/configure.ac @@ -20,29 +20,33 @@ dnl PERFORMANCE OF THIS SOFTWARE. dnl dnl Process this file with autoconf to create configure. -AC_PREREQ([2.57]) -AC_INIT(xfs,[1.0.8], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xfs) +AC_PREREQ([2.60]) +AC_INIT(xfs,[1.1.0], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xfs) AM_INIT_AUTOMAKE([dist-bzip2]) AM_MAINTAINER_MODE +# xfs already have a header called config.h AM_CONFIG_HEADER(xfs-config.h) -# Require xorg-macros version 1.1.0 or newer for XORG_WITH_LINT macro -m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])]) -XORG_MACROS_VERSION(1.1) +# Require xorg-macros version >= 1.2.0 for XORG_CWARNFLAGS & XORG_CHANGELOG +m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.2 or later before running autoconf/autogen])]) +XORG_MACROS_VERSION(1.2) + +# Set common system defines for POSIX extensions, such as _GNU_SOURCE +# Must be called before any macros that run the compiler (like AC_PROG_LIBTOOL) +# to avoid autoconf errors. +AC_USE_SYSTEM_EXTENSIONS AC_PROG_CC +XORG_PROG_RAWCPP +XORG_CWARNFLAGS AC_PROG_INSTALL AC_CANONICAL_HOST -case $host_os in - linux*|gnu*|*-gnu) - OS_CFLAGS="-D_XOPEN_SOURCE" - ;; - *) - OS_CFLAGS= - ;; -esac +# xmlto is used to convert doc/design.xml from DocBook to PDF/HTML +AC_ARG_VAR([XMLTO], [Path to xmlto command]) +AC_PATH_PROG([XMLTO], [xmlto]) +AM_CONDITIONAL([HAVE_XMLTO], [test "x$XMLTO" != "x"]) AC_CHECK_HEADERS([stdint.h]) @@ -58,7 +62,7 @@ AC_DEFINE_DIR([DEFAULT_CONFIG_FILE], DEFAULT_CONFIG_FILE, # generate text for the man page case $CONFIG_FILE in *,*) - CONFIG_FILE_DESC="the first file found from the list:" + CONFIG_FILE_DESC="the first file found from the list:" CONFIG_FILE_PATH=`echo ${CONFIG_FILE} | sed 's/,/\\\\\\\\fR, \\\\\\\\fI/g'` ;; *) @@ -69,9 +73,54 @@ esac AC_SUBST([CONFIG_FILE_DESC]) AC_SUBST([CONFIG_FILE_PATH]) +# Determine font path to put in config file +# Uses --default-font-path if set, otherwise checks for /etc/X11/fontpath.d, +# otherwise uses default path copied from xserver configure.ac +AC_CHECK_FILE([${sysconfdir}/X11/fontpath.d], + [DEFAULT_FONT_PATH='catalogue:$(sysconfdir)/X11/fontpath.d'], + [ + DEFAULT_FONT_PATH='$(FONTDIR)/misc/,$(FONTDIR)/TTF/,$(FONTDIR)/OTF/,$(FONTDIR)/Type1/,$(FONTDIR)/100dpi/,$(FONTDIR)/75dpi/' + case $host_os in + darwin*) DEFAULT_FONT_PATH="${DEFAULT_FONT_PATH},/Library/Fonts,/System/Library/Fonts" ;; + esac +]) + +AC_ARG_WITH(default-font-path, AS_HELP_STRING([--with-default-font-path=PATH], [Comma separated list of font path entries]), + [ FONTPATH="$withval" ], + [ FONTPATH="${DEFAULT_FONT_PATH}" ]) +AC_SUBST([FONTPATH]) + +# Option to enable support for building developer internals docs +AC_ARG_ENABLE(devel-docs, + AS_HELP_STRING([--enable-devel-docs], + [Build internals documentation for developers (default: enabled)]), + [DEVEL_DOCS=$enableval], [DEVEL_DOCS=yes]) +AM_CONDITIONAL([MAKE_DEVEL_DOCS], [test "x$DEVEL_DOCS" = "xyes"]) + +# Option to enable support for starting from inetd +AC_ARG_ENABLE(inetd, + AS_HELP_STRING([--enable-inetd], + [Support -inetd flag for starting from inetd (default: enabled)]), + [INETD=$enableval], [INETD=yes]) +if test "x$INETD" = xyes; then + AC_DEFINE(XFS_INETD, 1, [Build support for starting from inetd]) +fi + +# Option to enable support for logging to syslog +AC_ARG_ENABLE(syslog, + AS_HELP_STRING([--enable-syslog], + [Support option for logging via syslog (default: enabled)]), + [SYSLOG=$enableval], [SYSLOG=yes]) +if test "x$SYSLOG" = xyes; then + AC_DEFINE(USE_SYSLOG, 1, [Build support for logging via syslog]) +fi + + +# Checks for system functions / libraries +AC_CHECK_FUNCS([daemon]) + # Checks for pkg-config packages PKG_CHECK_MODULES(XFS, libfs xfont xtrans) -XFS_CFLAGS="$XFS_CFLAGS $OS_CFLAGS" AC_SUBST(XFS_CFLAGS) AC_SUBST(XFS_LIBS) @@ -83,5 +132,6 @@ XORG_WITH_LINT XORG_MANPAGE_SECTIONS XORG_RELEASE_VERSION +XORG_CHANGELOG AC_OUTPUT([Makefile]) diff --git a/app/xfs/difs/atom.c b/app/xfs/difs/atom.c index 55d878fbb..d59c77670 100644 --- a/app/xfs/difs/atom.c +++ b/app/xfs/difs/atom.c @@ -1,4 +1,3 @@ -/* $Xorg: atom.c,v 1.4 2001/02/09 02:05:42 xorgcvs Exp $ */ /* * font server atom manipulations */ @@ -47,10 +46,9 @@ in this Software without prior written authorization from The Open Group. * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * @(#)atom.c 4.1 5/2/91 - * */ -/* $XFree86: xc/programs/xfs/difs/atom.c,v 3.4tsi Exp $ */ + +#include "xfs-config.h" #include "misc.h" #include "fsresource.h" @@ -156,9 +154,9 @@ NameForAtom(Atom atom) NodePtr node; if (atom > lastAtom) - return 0; + return NULL; if ((node = nodeTable[atom]) == (NodePtr) NULL) - return 0; + return NULL; return node->string; } diff --git a/app/xfs/difs/cache.c b/app/xfs/difs/cache.c index 905feacbd..8ec3fd86b 100644 --- a/app/xfs/difs/cache.c +++ b/app/xfs/difs/cache.c @@ -1,5 +1,3 @@ -/* $XdotOrg: $ */ -/* $Xorg: cache.c,v 1.4 2001/02/09 02:05:42 xorgcvs Exp $ */ /* Copyright 1987, 1998 The Open Group @@ -45,10 +43,9 @@ in this Software without prior written authorization from The Open Group. * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * @(#)cache.c 4.2 91/05/02 - * */ -/* $XFree86: xc/programs/xfs/difs/cache.c,v 1.6 2001/12/14 20:01:33 dawes Exp $ */ + +#include "xfs-config.h" #include "cachestr.h" #include "misc.h" @@ -242,7 +239,7 @@ flush_cache(CachePtr cache, unsigned long needed) /* fixup list */ oldprev = &cache->entries[oldbucket]; cp = *oldprev; - for (; (cp = *oldprev) != 0; oldprev = &cp->next) { + for (; (cp = *oldprev) != NULL; oldprev = &cp->next) { if (cp == oldest) { *oldprev = oldest->next; break; diff --git a/app/xfs/difs/charinfo.c b/app/xfs/difs/charinfo.c index f47665f2c..6fc8e0396 100644 --- a/app/xfs/difs/charinfo.c +++ b/app/xfs/difs/charinfo.c @@ -1,4 +1,3 @@ -/* $Xorg: charinfo.c,v 1.4 2001/02/09 02:05:42 xorgcvs Exp $ */ /* Copyright 1990, 1991, 1998 The Open Group @@ -49,20 +48,23 @@ in this Software without prior written authorization from The Open Group. * This file was once on the other side of * the font library interface as util/fsfuncs.c. */ -/* $XFree86: xc/programs/xfs/difs/charinfo.c,v 1.11 2001/10/28 03:34:34 tsi Exp $ */ + +#include "xfs-config.h" #include <X11/Xos.h> #include "misc.h" #include <X11/fonts/fontstruct.h> #include <X11/fonts/fontutil.h> + +/* Don't conflict with macros/prototypes in difsutils.h */ +#define _HAVE_XALLOC_DECLS +#include <X11/fonts/fontmisc.h> + #include "clientstr.h" #define FSMD_H #include <X11/fonts/FSproto.h> #include "difs.h" -extern void TwoByteSwap(unsigned char *, int); -extern void FourByteSwap(unsigned char *, int); - #define GLWIDTHBYTESPADDED(bits,nbytes) \ ((nbytes) == 1 ? (((bits)+7)>>3) /* pad to 1 byte */ \ :(nbytes) == 2 ? ((((bits)+15)>>3)&~1) /* pad to 2 bytes */ \ @@ -157,7 +159,7 @@ getCharInfos ( (*metrics_func) (pfont, 1, ch, encoding, &glyphCount, &defaultPtr); if (glyphCount != 1) - defaultPtr = 0; + defaultPtr = NULL; /* for each range, get each character individually, undoing the default character substitution so we get zero metrics for @@ -287,7 +289,7 @@ packGlyphs ( int dst_extra; int r, w; CharInfoPtr *bitChars, *bitCharsFree, bitc; - CharInfoPtr *inkChars, *inkCharsFree = 0, inkc; + CharInfoPtr *inkChars, *inkCharsFree = NULL, inkc; FontInfoPtr pinfo = &pfont->info; xCharInfo *bitm, *inkm; @@ -356,7 +358,7 @@ packGlyphs ( if (mappad == BitmapFormatImageRectMax) charsize = dstbpr * height; size = 0; - gdata = 0; + gdata = NULL; contiguous = TRUE; l = lengths; inkChars = inkCharsFree; diff --git a/app/xfs/difs/difsutils.c b/app/xfs/difs/difsutils.c index 48f7d5254..e5c318ab8 100644 --- a/app/xfs/difs/difsutils.c +++ b/app/xfs/difs/difsutils.c @@ -1,4 +1,3 @@ -/* $Xorg: difsutils.c,v 1.4 2001/02/09 02:05:42 xorgcvs Exp $ */ /* * misc utility routines */ @@ -46,7 +45,8 @@ in this Software without prior written authorization from The Open Group. * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF * THIS SOFTWARE. */ -/* $XFree86: xc/programs/xfs/difs/difsutils.c,v 1.6 2001/01/17 23:45:28 dawes Exp $ */ + +#include "xfs-config.h" #define XK_LATIN1 @@ -57,15 +57,14 @@ in this Software without prior written authorization from The Open Group. #include "misc.h" #include "globals.h" #include "clientstr.h" -#include "accstr.h" #include <X11/fonts/fontstruct.h> #include <X11/keysymdef.h> #include "authstr.h" #include "auth.h" #include "client.h" +#include "dispatch.h" -extern ClientPtr currentClient; static FontResolutionPtr default_resolutions; static int num_resolutions; static int default_point_size = 120; @@ -191,9 +190,10 @@ XpClientIsPrintClient(ClientPtr client, FontPathElementPtr fpe) } void -CopyISOLatin1Lowered(unsigned char *dest, unsigned char *source, int length) +CopyISOLatin1Lowered(char *d, char *s, int length) { register int i; + unsigned char *dest = d, *source = s; for (i = 0; i < length; i++, source++, dest++) { if ((*source >= XK_A) && (*source <= XK_Z)) @@ -255,80 +255,6 @@ NoopDDA(void) { } -/* host list manipulation */ -int -AddHost( - HostList *list, - HostAddress *addr) -{ - HostAddress *new; - - new = (HostAddress *) fsalloc(sizeof(HostAddress)); - if (!new) - return FSBadAlloc; - new->address = (pointer) fsalloc(addr->addr_len); - if (!new->address) { - fsfree((char *) addr); - return FSBadAlloc; - } - new->type = addr->type; - new->addr_len = addr->addr_len; - memmove( (char *) new->address, (char *) addr->address, new->addr_len); - - new->next = *list; - *list = new; - return FSSuccess; -} - -int -RemoveHost( - HostList *list, - HostAddress *addr) -{ - HostAddress *t, - *last; - - last = (HostAddress *) 0; - t = *list; - while (t) { - if (t->type == addr->type && - t->addr_len == addr->addr_len && - memcmp((char *) t->address, (char *) addr->address, - min(t->addr_len, addr->addr_len)) == 0) { - if (last) { - last->next = t->next; - } else { - *list = t->next; - } - fsfree((char *) t->address); - fsfree((char *) t); - return FSSuccess; - } - last = t; - t = t->next; - } - return FSBadName; /* bad host name */ -} - -Bool -ValidHost( - HostList list, - HostAddress *addr) -{ - HostAddress *t; - - t = list; - while (t) { - if (t->type == addr->type && - t->addr_len == addr->addr_len && - memcmp((char *) t->address, (char *) addr->address, - min(t->addr_len, addr->addr_len)) == 0) { - return TRUE; - } - } - return FALSE; -} - /* block & wakeup handlers */ typedef struct _BlockHandler { diff --git a/app/xfs/difs/dispatch.c b/app/xfs/difs/dispatch.c index f1a0a859a..bb05613a1 100644 --- a/app/xfs/difs/dispatch.c +++ b/app/xfs/difs/dispatch.c @@ -1,4 +1,3 @@ -/* $Xorg: dispatch.c,v 1.6 2001/02/09 02:05:42 xorgcvs Exp $ */ /* * protocol dispatcher */ @@ -46,7 +45,8 @@ in this Software without prior written authorization from The Open Group. * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF * THIS SOFTWARE. */ -/* $XFree86: xc/programs/xfs/difs/dispatch.c,v 3.12 2001/12/14 20:01:33 dawes Exp $ */ + +#include "xfs-config.h" #include <stdlib.h> #include "dispatch.h" @@ -68,6 +68,7 @@ in this Software without prior written authorization from The Open Group. #include "cache.h" #include "globals.h" #include "difs.h" +#include "access.h" static void kill_all_clients(void); @@ -79,13 +80,6 @@ ClientPtr currentClient; static int nClients = 0; static int nextFreeClientID; -extern char *ConnectionInfo; -extern int ConnInfoLen; - -extern char *configfilename; - -extern Bool drone_server; - #define MAJOROP ((fsReq *)client->requestBuffer)->reqType #define ALL_FORMAT_BITS (BitmapFormatByteOrderMask | \ @@ -204,7 +198,6 @@ ProcInitialConnection(ClientPtr client) fsConnClientPrefix *prefix; int whichbyte = 1; - nClients++; prefix = (fsConnClientPrefix *) stuff+1; if ((prefix->byteOrder != 'l') && (prefix->byteOrder != 'B')) return (client->noClientException = -2); @@ -304,8 +297,6 @@ ProcEstablishConnection(ClientPtr client) SendErrToClient(client, FSBadAlloc, (pointer) 0); return FSBadAlloc; } - authp->authname = 0; - authp->authdata = 0; authp->authname = (char *) fsalloc(client_auth[auth_index - 1].namelen + 1); authp->authdata = @@ -590,12 +581,12 @@ ProcCreateAC(ClientPtr client) SendErrToClient(client, FSBadIDChoice, (pointer) &aligned_acid); return FSBadIDChoice; } - acp = 0; + acp = NULL; if (stuff->num_auths) { acp = (AuthPtr) ALLOCATE_LOCAL(stuff->num_auths * sizeof(AuthRec)); if (!acp) { - SendErrToClient(client, FSBadAlloc, (pointer) 0); + SendErrToClient(client, FSBadAlloc, (pointer) NULL); return FSBadAlloc; } } @@ -621,8 +612,6 @@ ProcCreateAC(ClientPtr client) acp[i].data = (char *) ad; ad += acp[i].datalen; } - if (!(int)stuff->num_auths) - ad += 4; if (ad - (char *)stuff > (stuff->length << 2)) { int lengthword = stuff->length; @@ -645,8 +634,8 @@ ProcCreateAC(ClientPtr client) if (!authp) { goto alloc_failure; } - authp->authname = 0; - authp->authdata = 0; + authp->authname = NULL; + authp->authdata = NULL; if (index > 0) { authp->authname = (char *) fsalloc(acp[index - 1].namelen + 1); @@ -933,6 +922,13 @@ ProcQueryXExtents(ClientPtr client) } item_size = (stuff->reqType == FS_QueryXExtents8) ? 1 : 2; + if (stuff->num_ranges > + ((stuff->length << 2) - SIZEOF(fsQueryXExtents8Req))/item_size) { + int num_ranges = stuff->num_ranges; + SendErrToClient(client, FSBadLength, (pointer)&num_ranges); + return FSBadLength; + } + /* get the extents */ err = QueryExtents(client, cfp, item_size, stuff->num_ranges, stuff->range, @@ -969,6 +965,12 @@ ProcQueryXBitmaps(ClientPtr client) assert((stuff->reqType == FS_QueryXBitmaps8) || (stuff->reqType == FS_QueryXBitmaps16)); item_size = (stuff->reqType == FS_QueryXBitmaps8) ? 1 : 2; + if (stuff->num_ranges > + ((stuff->length << 2) - SIZEOF(fsQueryXBitmaps8Req))/item_size) { + int num_ranges = stuff->num_ranges; + SendErrToClient(client, FSBadLength, (pointer)&num_ranges); + return FSBadLength; + } /* get the glyphs */ err = QueryBitmaps(client, cfp, item_size, stuff->format, stuff->num_ranges, stuff->range, @@ -1074,6 +1076,9 @@ InitClient( int i, pointer ospriv) { + if (i != SERVER_CLIENT) { + nClients++; + } client->index = i; client->sequence = 0; client->last_request_time = GetTimeInMillis(); diff --git a/app/xfs/difs/events.c b/app/xfs/difs/events.c index 91ae7b92c..79e59b132 100644 --- a/app/xfs/difs/events.c +++ b/app/xfs/difs/events.c @@ -1,4 +1,3 @@ -/* $Xorg: events.c,v 1.4 2001/02/09 02:05:42 xorgcvs Exp $ */ /* * event handling stuff */ @@ -46,7 +45,8 @@ in this Software without prior written authorization from The Open Group. * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF * THIS SOFTWARE. */ -/* $XFree86: xc/programs/xfs/difs/events.c,v 3.7tsi Exp $ */ + +#include "xfs-config.h" #include <swaprep.h> diff --git a/app/xfs/difs/extensions.c b/app/xfs/difs/extensions.c index fb1d227b3..a360700e9 100644 --- a/app/xfs/difs/extensions.c +++ b/app/xfs/difs/extensions.c @@ -1,4 +1,3 @@ -/* $Xorg: extensions.c,v 1.4 2001/02/09 02:05:42 xorgcvs Exp $ */ /* * font server extensions */ @@ -46,7 +45,8 @@ in this Software without prior written authorization from The Open Group. * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF * THIS SOFTWARE. */ -/* $XFree86: xc/programs/xfs/difs/extensions.c,v 1.6 2001/08/01 00:45:04 tsi Exp $ */ + +#include "xfs-config.h" #include <X11/fonts/FSproto.h> #include "misc.h" @@ -62,7 +62,7 @@ in this Software without prior written authorization from The Open Group. static ExtensionEntry **extensions = (ExtensionEntry **) NULL; -int lastEvent = EXTENSION_EVENT_BASE; +static int lastEvent = EXTENSION_EVENT_BASE; static int lastError = FirstExtensionError; static int NumExtensions = 0; diff --git a/app/xfs/difs/fontinfo.c b/app/xfs/difs/fontinfo.c index a5615d439..52080899a 100644 --- a/app/xfs/difs/fontinfo.c +++ b/app/xfs/difs/fontinfo.c @@ -1,4 +1,3 @@ -/* $Xorg: fontinfo.c,v 1.4 2001/02/09 02:05:42 xorgcvs Exp $ */ /* * font data query */ @@ -46,9 +45,8 @@ in this Software without prior written authorization from The Open Group. * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF * THIS SOFTWARE. */ -/* $XFree86: xc/programs/xfs/difs/fontinfo.c,v 1.10 2001/12/14 20:01:34 dawes Exp $ */ -#include <xfs-config.h> +#include "xfs-config.h" #include <X11/fonts/FS.h> #include <X11/fonts/FSproto.h> @@ -290,7 +288,7 @@ do_query_extents(ClientPtr client, pointer data) pPtr->flags, pPtr->nranges, pPtr->range, &num_extents, &extents); if (err == Suspended) { if (!pPtr->slept) { - pPtr->pfont->unload_glyphs = 0; /* Not a safe call for this font */ + pPtr->pfont->unload_glyphs = NULL; /* Not a safe call for this font */ pPtr->slept = TRUE; ClientSleep(client, do_query_extents, (pointer) pPtr); } @@ -340,7 +338,7 @@ QueryExtents( &nranges, &all_glyphs, &cfp->font->info); if (!fixed_range && !all_glyphs) { - SendErrToClient(client, FSBadRange, 0); + SendErrToClient(client, FSBadRange, NULL); return FSBadRange; } c = (QEclosurePtr) fsalloc(sizeof(QEclosureRec)); @@ -378,7 +376,7 @@ do_query_bitmaps(ClientPtr client, pointer data) if (err == Suspended) { if (!pPtr->slept) { - pPtr->pfont->unload_glyphs = 0; /* Not a safe call for this font */ + pPtr->pfont->unload_glyphs = NULL; /* Not a safe call for this font */ pPtr->slept = TRUE; ClientSleep(client, do_query_bitmaps, (pointer) pPtr); } @@ -436,7 +434,7 @@ QueryBitmaps( &nranges, &all_glyphs, &cfp->font->info); if (!fixed_range && !all_glyphs) { - SendErrToClient(client, FSBadRange, 0); + SendErrToClient(client, FSBadRange, NULL); return FSBadRange; } c = (QBclosurePtr) fsalloc(sizeof(QBclosureRec)); diff --git a/app/xfs/difs/fonts.c b/app/xfs/difs/fonts.c index 2ba7c4276..a3fe1a211 100644 --- a/app/xfs/difs/fonts.c +++ b/app/xfs/difs/fonts.c @@ -1,4 +1,3 @@ -/* $Xorg: fonts.c,v 1.5 2001/02/09 02:05:42 xorgcvs Exp $ */ /* * font control */ @@ -47,6 +46,9 @@ in this Software without prior written authorization from The Open Group. * THIS SOFTWARE. */ /*#define DEBUG*/ + +#include "xfs-config.h" + #include <X11/fonts/FS.h> #include <X11/fonts/FSproto.h> #include <stdio.h> @@ -71,8 +73,6 @@ static int num_slept_fpes = 0; static int size_slept_fpes = 0; static FontPathElementPtr *slept_fpes = (FontPathElementPtr *) 0; -extern FontPatternCachePtr fontPatternCache; - #define NUM_IDS_PER_CLIENT 5 int @@ -688,6 +688,7 @@ set_font_path_elements( { NoticeF("ignoring font path element %s (bad font path descriptor)\n", name); fsfree(name); + cp += len; continue; } /* must be new -- make it */ @@ -863,7 +864,7 @@ do_list_fonts_and_aliases(ClientPtr client, pointer data) cPtr->current.list_started = TRUE; } if (err == Successful) { - name = 0; + name = NULL; err = (*fpe_functions[fpe->type].list_next_font_or_alias) ((pointer) cPtr->client, fpe, &name, &namelen, &resolved, &resolvedlen, cPtr->current.private); @@ -910,7 +911,7 @@ do_list_fonts_and_aliases(ClientPtr client, pointer data) char *tmpname; int tmpnamelen; - tmpname = 0; + tmpname = NULL; (void) (*fpe_functions[fpe->type].list_next_font_or_alias) ((pointer) cPtr->client, fpe, &tmpname, &tmpnamelen, &tmpname, &tmpnamelen, cPtr->current.private); @@ -936,7 +937,7 @@ do_list_fonts_and_aliases(ClientPtr client, pointer data) cPtr->current.patlen = resolvedlen; cPtr->current.max_names = cPtr->names->nnames + 1; cPtr->current.current_fpe = -1; - cPtr->current.private = 0; + cPtr->current.private = NULL; err = BadFontName; } } @@ -1087,10 +1088,10 @@ ListFonts( c->current.current_fpe = 0; c->current.max_names = maxNames; c->current.list_started = FALSE; - c->current.private = 0; + c->current.private = NULL; c->haveSaved = FALSE; c->slept = FALSE; - c->savedName = 0; + c->savedName = NULL; do_list_fonts_and_aliases(client, (pointer) c); return TRUE; badAlloc: @@ -1149,7 +1150,7 @@ do_list_fonts_with_info(ClientPtr client, pointer data) cPtr->current.list_started = TRUE; } if (err == Successful) { - name = 0; + name = NULL; pFontInfo = &fontInfo; err = (*fpe_functions[fpe->type].list_next_font_with_info) ((pointer) cPtr->client, fpe, &name, &namelen, @@ -1182,7 +1183,7 @@ do_list_fonts_with_info(ClientPtr client, pointer data) int tmpnamelen; FontInfoPtr tmpFontInfo; - tmpname = 0; + tmpname = NULL; tmpFontInfo = &fontInfo; (void) (*fpe_functions[fpe->type].list_next_font_with_info) ((pointer) client, fpe, &tmpname, &tmpnamelen, @@ -1209,7 +1210,7 @@ do_list_fonts_with_info(ClientPtr client, pointer data) cPtr->current.patlen = namelen; cPtr->current.max_names = 1; cPtr->current.current_fpe = 0; - cPtr->current.private = 0; + cPtr->current.private = NULL; cPtr->current.list_started = FALSE; } /* @@ -1368,17 +1369,17 @@ StartListFontsWithInfo( } c->client = client; c->num_fpes = num_fpes; - c->reply = 0; + c->reply = NULL; c->length = 0; c->current.patlen = length; c->current.current_fpe = 0; c->current.max_names = maxNames; c->current.list_started = FALSE; - c->current.private = 0; + c->current.private = NULL; c->savedNumFonts = 0; c->haveSaved = FALSE; c->slept = FALSE; - c->savedName = 0; + c->savedName = NULL; do_list_fonts_with_info(client, (pointer) c); return TRUE; badAlloc: diff --git a/app/xfs/difs/globals.c b/app/xfs/difs/globals.c index 2ad924da7..bda1572b3 100644 --- a/app/xfs/difs/globals.c +++ b/app/xfs/difs/globals.c @@ -1,4 +1,3 @@ -/* $Xorg: globals.c,v 1.4 2001/02/09 02:05:42 xorgcvs Exp $ */ /* * various font server globals */ @@ -47,18 +46,19 @@ in this Software without prior written authorization from The Open Group. * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * @(#)globals.c 4.3 5/3/91 - * */ + +#include "xfs-config.h" + #include <X11/fonts/FSproto.h> #include "clientstr.h" #include "misc.h" #include "site.h" +#include "globals.h" ClientPtr *clients; ClientPtr serverClient; int currentMaxClients; -char *server; int serverGeneration = 0; int argcGlobal; char **argvGlobal; diff --git a/app/xfs/difs/initfonts.c b/app/xfs/difs/initfonts.c index 54dca7259..84a51409e 100644 --- a/app/xfs/difs/initfonts.c +++ b/app/xfs/difs/initfonts.c @@ -1,4 +1,3 @@ -/* $Xorg: initfonts.c,v 1.4 2001/02/09 02:05:42 xorgcvs Exp $ */ /* Copyright 1987, 1998 The Open Group @@ -47,10 +46,12 @@ in this Software without prior written authorization from The Open Group. * %W% %E% * */ -/* $XFree86: xc/programs/xfs/difs/initfonts.c,v 1.6 2001/08/01 00:45:04 tsi Exp $ */ + +#include "xfs-config.h" #include <X11/fonts/font.h> #include "difs.h" +#include "globals.h" #ifdef FONTCACHE #include "misc.h" #include <X11/extensions/fontcacheP.h> diff --git a/app/xfs/difs/main.c b/app/xfs/difs/main.c index 4b3a5ccc5..ec6886760 100644 --- a/app/xfs/difs/main.c +++ b/app/xfs/difs/main.c @@ -1,4 +1,3 @@ -/* $Xorg: main.c,v 1.5 2001/02/09 02:05:42 xorgcvs Exp $ */ /* * Font server main routine */ @@ -46,7 +45,8 @@ in this Software without prior written authorization from The Open Group. * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF * THIS SOFTWARE. */ -/* $XFree86: xc/programs/xfs/difs/main.c,v 3.11 2001/12/14 20:01:35 dawes Exp $ */ + +#include "xfs-config.h" #include <stdlib.h> #include <sys/types.h> @@ -74,10 +74,6 @@ Cache serverCache; static Bool create_connection_block(void); char *configfilename; -extern Bool drone_server; - -extern OldListenRec *OldListen; -extern int OldListenCount; int main(int argc, char *argv[]) diff --git a/app/xfs/difs/resource.c b/app/xfs/difs/resource.c index 42227fea8..3c616f9b8 100644 --- a/app/xfs/difs/resource.c +++ b/app/xfs/difs/resource.c @@ -1,4 +1,3 @@ -/* $Xorg: resource.c,v 1.4 2001/02/09 02:05:42 xorgcvs Exp $ */ /* Copyright 1987, 1998 The Open Group @@ -47,7 +46,6 @@ in this Software without prior written authorization from The Open Group. * %W% %G% * */ -/* $XFree86: xc/programs/xfs/difs/resource.c,v 3.8tsi Exp $ */ /* * a resource is a 32 bit quantity. the upper 12 bits are client id. * client provides a 19 bit resource id. this is "hashed" by me by @@ -65,6 +63,8 @@ in this Software without prior written authorization from The Open Group. * 1 - allocated color to be freed when the client dies */ +#include "xfs-config.h" + #include <X11/fonts/FS.h> #include "misc.h" #include "os.h" @@ -72,6 +72,7 @@ in this Software without prior written authorization from The Open Group. #include "clientstr.h" #include "dispatch.h" #include "globals.h" +#include "difs.h" static void rebuild_table(int client); @@ -106,8 +107,6 @@ static RESTYPE TypeMask; typedef int (*DeleteType) (void *, FSID); -extern int CloseClientFont(ClientPtr, FSID); - static DeleteType *DeleteFuncs = (DeleteType *) NULL; #ifdef NOTYET @@ -143,7 +142,7 @@ CreateNewResourceClass(void) #endif /* NOTYET */ -ClientResourceRec clientTable[MAXCLIENTS]; +static ClientResourceRec clientTable[MAXCLIENTS]; /***************** * InitClientResources diff --git a/app/xfs/difs/swaprep.c b/app/xfs/difs/swaprep.c index b7cb2b2ef..38447ffb9 100644 --- a/app/xfs/difs/swaprep.c +++ b/app/xfs/difs/swaprep.c @@ -1,4 +1,3 @@ -/* $Xorg: swaprep.c,v 1.4 2001/02/09 02:05:43 xorgcvs Exp $ */ /* * font server reply swapping */ @@ -46,7 +45,8 @@ in this Software without prior written authorization from The Open Group. * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF * THIS SOFTWARE. */ -/* $XFree86: xc/programs/xfs/difs/swaprep.c,v 1.4 2001/01/17 23:45:29 dawes Exp $ */ + +#include "xfs-config.h" #include <swaprep.h> #include <swapreq.h> diff --git a/app/xfs/difs/swapreq.c b/app/xfs/difs/swapreq.c index f4741587a..6d67b2e6d 100644 --- a/app/xfs/difs/swapreq.c +++ b/app/xfs/difs/swapreq.c @@ -1,4 +1,3 @@ -/* $Xorg: swapreq.c,v 1.4 2001/02/09 02:05:43 xorgcvs Exp $ */ /* * swapped requests */ @@ -46,7 +45,8 @@ in this Software without prior written authorization from The Open Group. * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF * THIS SOFTWARE. */ -/* $XFree86: xc/programs/xfs/difs/swapreq.c,v 1.6 2001/06/25 20:40:17 paulo Exp $ */ + +#include "xfs-config.h" #include <swapreq.h> @@ -55,6 +55,9 @@ in this Software without prior written authorization from The Open Group. #include "globals.h" #include "dispatch.h" +/* Size including padding to next 32-bit boundary */ +#define PAD_TO_32BIT(e) (((e) + 3) & ~3) + void SwapLongs(long *list, unsigned long count) { @@ -149,49 +152,79 @@ swap_auth(ClientPtr client, pointer data, int num, int length) datalen; int i; - p = data; - for (i = 0; i < num; i++) { - if (p - (unsigned char *)data > length - 4) { - int lengthword = length; + if (num == 0) { /* Nothing to swap */ + return (FSSuccess); + } - SendErrToClient(client, FSBadLength, (pointer)&lengthword); - return (FSBadLength); - } - namelen = *(CARD16 *) p; + /* The font service protocol spec states that the lengths should always + * be in the client's native byte order, and thus need swapping for a + * byte-swapped client - but set_font_authorizations() in the X server + * sample implementation has always filled them in in big-endian format, + * and xfs was swapping when running on a byte-swapped connection, and + * then assuming the result was big-endian. + * + * It also specifies padding each string out to the next 32-bit boundary, + * but again, set_font_authorizations() in the X server sample + * implementation has always failed to do so, but byte-pads the total + * length of data instead. + * + * This code determines if the individual string lengths add up to the + * correct total length when interpreted as generated by the traditional + * sample implementation, and if so, uses them that way, otherwise it + * will swap them, to make them big-endian, before passing on to the + * unswapped code that assumes that they are big-endian. + */ + + /* First determine if data matches the traditional sample + implementation format */ + for (i = 0, p = data; i < num; i++) { + if ((p - (unsigned char *)data) > (length - 4)) + break; + + namelen = (p[0] << 8) + p[1]; + datalen = (p[2] << 8) + p[3]; + p += 4 + namelen + datalen; + } + if ((i == num) && (PAD_TO_32BIT(p - (unsigned char *)data) == length)) + return (FSSuccess); + + /* Length didn't match, so we'll try swapping & padding */ + for (i = 0, p = data; i < num; i++) { + if ((p - (unsigned char *)data) > (length - 4)) + break; + + namelen = (p[1] << 8) + p[0]; t = p[0]; p[0] = p[1]; p[1] = t; p += 2; - datalen = *(CARD16 *) p; + + datalen = (p[1] << 8) + p[0]; t = p[0]; p[0] = p[1]; p[1] = t; - p += 2; - p += (namelen + 3) & ~3; - p += (datalen + 3) & ~3; - } - if (!num) - p += 4; - if (p - (unsigned char *)data != length) { - int lengthword = length; - - SendErrToClient(client, FSBadLength, (pointer)&lengthword); - return (FSBadLength); + p += 2 + PAD_TO_32BIT(namelen) + PAD_TO_32BIT(datalen); } + if ((i == num) && ((p - (unsigned char *)data) == length)) + return (FSSuccess); - return (FSSuccess); + /* If length didn't match either way, we give up. */ + SendErrToClient(client, FSBadLength, (pointer)&length); + return (FSBadLength); } int SProcCreateAC(ClientPtr client) { int status; - + int length; + REQUEST(fsCreateACReq); stuff->length = lswaps(stuff->length); stuff->acid = lswapl(stuff->acid); + length = (stuff->length << 2) - sizeof(fsCreateACReq); status = swap_auth(client, (pointer) &stuff[1], - stuff->num_auths, stuff->length); + stuff->num_auths, length); if (status != FSSuccess) return (status); return ((*ProcVector[stuff->reqType]) (client)); @@ -287,11 +320,13 @@ SProcQueryXBitmaps(ClientPtr client) int SwapConnClientPrefix(ClientPtr client, fsConnClientPrefix *pCCP) { +#if 0 REQUEST(fsFakeReq); +#endif pCCP->major_version = lswaps(pCCP->major_version); pCCP->minor_version = lswaps(pCCP->minor_version); pCCP->auth_len = lswaps(pCCP->auth_len); return (swap_auth(client, (pointer) &pCCP[1], - pCCP->num_auths, stuff->length)); + pCCP->num_auths, pCCP->auth_len)); } diff --git a/app/xfs/difs/tables.c b/app/xfs/difs/tables.c index 3a2ab3c9f..ef8c0dcde 100644 --- a/app/xfs/difs/tables.c +++ b/app/xfs/difs/tables.c @@ -1,4 +1,3 @@ -/* $Xorg: tables.c,v 1.4 2001/02/09 02:05:43 xorgcvs Exp $ */ /* * all the dispatch, error, event and reply vectors */ @@ -46,7 +45,8 @@ in this Software without prior written authorization from The Open Group. * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF * THIS SOFTWARE. */ -/* $XFree86: xc/programs/xfs/difs/tables.c,v 1.5 2001/01/17 23:45:29 dawes Exp $ */ + +#include "xfs-config.h" #include <dispatch.h> #include <swaprep.h> @@ -60,7 +60,7 @@ in this Software without prior written authorization from The Open Group. InitialFunc InitialVector[3] = { - 0, + NULL, ProcInitialConnection, ProcEstablishConnection }; @@ -89,9 +89,9 @@ ProcFunc ProcVector[NUM_PROC_VECTORS] = ProcQueryXBitmaps, ProcQueryXBitmaps, /* 20 */ ProcCloseFont, - 0, - 0, - 0 + NULL, + NULL, + NULL }; SwappedProcFunc SwappedProcVector[NUM_PROC_VECTORS] = @@ -118,21 +118,21 @@ SwappedProcFunc SwappedProcVector[NUM_PROC_VECTORS] = SProcQueryXBitmaps, SProcQueryXBitmaps, /* 20 */ SProcResourceRequest, - 0, - 0, - 0 + NULL, + NULL, + NULL }; EventSwapFunc EventSwapVector[NUM_EVENT_VECTORS] = { SErrorEvent, (EventSwapFunc)NotImplemented, - 0, - 0, - 0, - 0, - 0, - 0 + NULL, + NULL, + NULL, + NULL, + NULL, + NULL }; ReplySwapFunc ReplySwapVector[NUM_PROC_VECTORS] = diff --git a/app/xfs/doc/xfs-design.css b/app/xfs/doc/xfs-design.css new file mode 100644 index 000000000..760fa7c70 --- /dev/null +++ b/app/xfs/doc/xfs-design.css @@ -0,0 +1,31 @@ +/* Copyright 2009 Sun Microsystems, Inc. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, and/or sell copies of the Software, and to permit persons + * to whom the Software is furnished to do so, provided that the above + * copyright notice(s) and this permission notice appear in all copies of + * the Software and that both the above copyright notice(s) and this + * permission notice appear in supporting documentation. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT + * OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR + * HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL + * INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING + * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, + * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION + * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Except as contained in this notice, the name of a copyright holder + * shall not be used in advertising or otherwise to promote the sale, use + * or other dealings in this Software without prior written authorization + * of the copyright holder. + */ + +.structname, .property, .errorname, .function, .parameter, .filename { + font-family: monospace; +} diff --git a/app/xfs/doc/xfs-design.xml b/app/xfs/doc/xfs-design.xml new file mode 100644 index 000000000..4bc6423b9 --- /dev/null +++ b/app/xfs/doc/xfs-design.xml @@ -0,0 +1,1551 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" + "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"> +<!-- lifted from troff+ms by doclifter --> +<!-- previous version was in xorg-docs/specs/xfs/design.ms --> +<!-- encoding notes: + - for lack of a better match, the systemitem tag is used for + protocol request names + --> +<article id='designms'> + <articleinfo> + <title>Font server implementation overview</title> + <author> + <firstname>Dave</firstname> + <surname>Lemke</surname> + <affiliation> + <orgname>Network Computing Devices, Inc.</orgname> + </affiliation> + </author> + <copyright> + <year>1991</year> + <holder>Network Computing Devices, Inc.</holder> + </copyright> + </articleinfo> + <sect1 id='introduction'> + <title>Introduction</title> + <para>The font server uses the same client/server model as X. + The basic structure is that of the X Consortium X11R5 X server, + and those who know that code should find the + <firstterm remap='I'>os</firstterm> and + <firstterm remap='I'>difs</firstterm> (device independent font + server) layers familiar.</para> + <literallayout class='monospaced'> + ┌─────────────────┐ + ┌─────┤ difs ├──────┐ + │ └─────────────────┘ │ + │ │ + ┌─┴──┐ ┌────────┴───┐ + │ os │ │ renderers │ + └────┘ └────────────┘ + </literallayout> + <sect2 id='definitions'> + <title>Definitions</title> + <glosslist> + <glossentry> + <glossterm> + <firstterm>Renderer</firstterm> + <indexterm><primary>renderer</primary></indexterm> + </glossterm> + <glossdef><para>Code that knows how to take font data in + its raw format and convert it to the font server's + format.</para></glossdef> + </glossentry> + <glossentry> + <glossterm> + <firstterm>Font Path Element (<acronym>FPE</acronym>)</firstterm> + <indexterm><primary>Font Path Element</primary></indexterm> + <indexterm><primary><acronym>FPE</acronym></primary><see>Font Path Element</see></indexterm> + </glossterm> + <glossdef><para>An instance of a renderer, associated with a specific + font source, (ie a directory of PCF bitmaps).</para></glossdef> + </glossentry> + </glosslist> + + <para><indexterm><primary>difs layer</primary></indexterm> + The <firstterm>difs</firstterm> layer interprets the + requests, and handles the renderer independent work. This + includes error checking of requests, and the top level + font database. It also contains various utility + functionality such as caching and byte swapping.</para> + + <para><indexterm><primary>os layer</primary></indexterm> + The <firstterm>os</firstterm> layer sets up the + communications channel, reads requests and sends the raw + data of replies and events. It also handles font server + configuration issues, controlled by command line + arguments and a configuration file.</para> + + <para><indexterm><primary>renderer layer</primary></indexterm> + The <firstterm>renderer</firstterm> layer contains all + font-specific code, and is responsible for rendering a font + (which may mean just reading a bitmap from disk, or may + include scaling of outline data), computing a fonts + properties and header information.</para> + + </sect2> + </sect1> + <sect1 id='startup'> + <title>Startup</title> + <para>At startup, the font server handles any command line + arguments, initializes any OS-specific data, and then sets up + the communications. Various internal databases are then + initialized (extensions, the font catalogue, etc).</para> + + <para><indexterm><primary>configuration file</primary></indexterm> + The config file, an ordered list of font sources, cache + size hints, default resolutions, and security information, is + then read in. Each of these source names could be a directory + name, the name of another font server, or some other string + that a particular renderer can recognize.</para> + + <para>The default font catalogue is then built up by taking + each of the font source names and comparing it with the + names a renderer recognizes. The one that matches this name + will become attached to this source. A renderer will + “understand” a name if it can parse the data in + that directory, or recognize that it is a valid font server + address, or recognizes a special string. Thus a collection + of valid font path elements is built up. Each + <emphasis remap='B'>FPE</emphasis> has a set of functions to + support opening a font and accessing its data.</para> + + <para>Font information is accessed via method functions in the + <indexterm><primary><structname>Font</structname></primary></indexterm> + <structname>Font</structname>. When a font is first + loaded, the header information and properties are + loaded/computed. The font also initializes its function + pointers to do the proper work. When specific metrics or + bitmaps are required, they are access via the font's + functions. A disk-based bitmap font will probably want to + load all data when first accessed. A scaled font or FS font + may want to do more selective caching. In both cases, the + renderer can use the utility functions to keep track of this + data. Changing values of bitmap formats could result in the + font having multiple copies of data in different formats, + which the renderer may use the utility functions to + manage.</para> + </sect1> + <sect1 id='per_client_processing'> + <title>Per client processing</title> + <para>Each entity attaching to the server is a client. Each + client has its own authorization and resolution information, + and its own view of the font database. A font open to one + client may not be open to another, though the font server + may have it loaded.</para> + + <para>After initialization, new clients can attach to the font + server and have their requests processed. For each request that + is searching for a font (<systemitem>OpenBitmapFont</systemitem>) or + listing font names (<systemitem>ListFonts</systemitem>, + <systemitem>ListFontsWithXInfo</systemitem>), the pattern + is given to each <emphasis remap='B'>FPE</emphasis>.</para> + + <para><indexterm><primary><systemitem>OpenBitmapFont</systemitem></primary></indexterm> + <systemitem>OpenBitmapFont</systemitem> will take the supplied + name and pass it to each <emphasis remap='B'>FPE</emphasis>. + The <emphasis remap='B'>FPE</emphasis> will return one of + three things: <errorname>Success</errorname>, and the font + object; <errorname>BadFont</errorname>, because it doesn't + know the font; or <errorname>BadFont</errorname> and an + alias name, when it has an alias for the font. If + <errorname>Success</errorname> is returned, the server goes + on to create an ID (or find an existing one) and return a + reply. If <errorname>BadFont</errorname> is returned, it + goes on to the next <emphasis remap='B'>FPE</emphasis>. If + it reaches the end without finding a font, an error is + returned to the client. If an alias is returned, the search + resets to the first <emphasis remap='B'>FPE</emphasis> and + starts again, using the alias as the new font name. This + allows aliases to work across different + <emphasis remap='B'>FPEs</emphasis>, without any ordering + restrictions.</para> + + <para>When each <emphasis remap='B'>FPE</emphasis> receives a font + name to open, it searches for the font's existence. If it + can't find, or can only find an alias, it returns + <errorname>BadFont</errorname> and any alias. If it finds + the font, it checks the authorization and license status of + the font to that of the client. If it passes, it then + creates a new font object, and reads and/or computes at + least the font's header information and properties. (It may + also want to produce the bitmaps and extents, but that + choice is left to the renderer.)</para> + + <para>When a font's information is accessed, the interpreter + routine looks up the font ID to find the font object, and + then uses the font's access functions to get the data. These + functions will return the data in the format expected by the + client.</para> + </sect1> + + <sect1 id='client_shutdown'> + <title>Client shutdown</title> + <para>When a client disconnects, all its references to any + fonts it still has opened are removed. If no other clients + reference these fonts, they may be freed, though the server may + choose to cache them.</para> + </sect1> + + <sect1 id='server_reset_and_cleanup'> + <title>Server reset and cleanup</title> + <para>A server may be reset to flush the caches, re-read the + configuration file, and a new list of + <emphasis remap='B'>FPEs</emphasis> to be built, via an + OS-specific outside action. In UNIX, this will be handled via + signals; in VMS it could be handled via an async trap or event + flag.</para> + </sect1> + + <sect1 id='server_offloading'> + <title>Server offloading</title> + <para>In order to deal with numerous clients without major + performance degradation, the server must be able to clone + itself, or provide the client with a substitute server via the + alternate server mechanism. Since both strategies have their + uses, both will be supported. For a server that has plenty of + host memory or CPU, but insufficient sockets, cloning may be a + good choice. For a host with limited memory, assigning an + alternate server on a different host may be a good choice. The + server will make this decision based on configuration options.</para> + </sect1> + + <sect1 id='font_server_data_structures'> + <title>Font server data structures</title> + <para>The + <indexterm><primary><structname>Client</structname></primary></indexterm> + <firstterm id='struct_client'><structname>Client</structname></firstterm> + handles per-client information and interpreter status. + <synopsis> +typedef struct _Client { + int index; + pointer osPrivate; + int noClientException; + int (**requestVector) (); + pointer requestBuffer; + int clientGone; + int sequence; + Bool swapped; + long last_request_time; + void (*pSwapReplyFunc) (); + AuthContextPtr auth; + char *catalogues; + int num_catalogues; + Mask eventmask; + fsResolution *resolutions; + int num_resolutions; +} ClientRec, *ClientPtr; + </synopsis></para> + <para>The + <indexterm><primary><structname>Font</structname></primary></indexterm> + <firstterm id='struct_font'><structname>Font</structname></firstterm> + contains basic font information, including header information and + properties. + <synopsis> +typedef struct _font { + int refcount; + fsHeader header; + fsBitmapFormat format; + int (*get_glyphs)(); + int (*get_metrics)(); + int (*get_extents)(); + int (*get_bitmaps)(); + int (*unload_font)(); + FontPathElementPtr fpe; + int *client_ids; + Bool restricted_font; +} FontRec *FontPtr; + </synopsis></para> + <para>The + <indexterm><primary><structname>ClientFont</structname></primary></indexterm> + <firstterm id='struct_clientfont'><structname>ClientFont</structname></firstterm> + is a wrapper on top of <structname>Font</structname>, + handling client specific font information. + <synopsis> +typedef struct _clientfont { + FontPtr font; + int clientindex; +} ClientFontRec, *ClientFontRec; + </synopsis></para> + <para>The + <indexterm><primary><structname>AuthContext</structname></primary></indexterm> + + <firstterm id='struct_authcontext'><structname>AuthContext</structname></firstterm> + contains authorization information. + <synopsis> +typedef struct _authcontext { + char *authname; + char *authdata; + FSID acid; +} AuthContextRec *AuthContextPtr; + </synopsis></para> + </sect1> + <sect1 id='font_path_element_functions'> + <title>Font Path Element functions</title> + <indexterm id='fpe_functions' class='startofrange'> + <primary>Font Path Element</primary></indexterm> + <para>These functions are associated with each renderer, and + handle all aspects of font access. Font data access is + controlled via another set of functions described later. These + functions are intended to support the R5 X server as well as + the font server. As a result, some design decisions were made + to support both models. When the + <emphasis remap='I'>difs</emphasis> layer needs to access a + font, it uses these functions.</para> + + + <synopsis> +typedef unsigned long Mask; +typedef unsigned char *pointer; + +typedef struct _FontPathElement { + int name_length; + char *name; + int type; + int refcount; + pointer private; +} FontPathElementRec, *FontPathElementPtr; + </synopsis> + + + <para>The FPE's reference count is incremented when it is added + to the current list of FPEs and when it opens a font. It is + decremented when it is no longer in the current list and when + it closes a font. All reference changes are handled by the + <emphasis remap='I'>difs</emphasis> layer. The count is required + to support font catalogue changes that may occur while the + fontserver has fonts open, and keeps FPEs from being + lost.</para> + + + <synopsis> +typedef struct FontNames { + int nnames; + int size; + int *length; + char **names; +} FontNamesRec, *FontNamesPtr; + +typedef struct { + Bool (*name_check)(); + int (*init_fpe)(); + int (*reset_fpe)(); + int (*free_fpe)(); + int (*open_font)(); + int (*close_font)(); + int (*list_fonts)(); + int (*start_list_fonts_with_info)(); + int (*list_next_font_with_info)(); + int (*wakeup_fpe)(); + int (*client_died); + FontNamesPtr renderer_names; +} FPEFunctions; + +int init_fpe_type(Bool (name_func)(), + int (init_func)(), int (free_func)(), int (reset_func), + int (open_func)(), int (close_func)(), + int (list_func)(), + int (start_lfwi_func)(), int (next_lfwi_func)(), + int (wakeup_func)(), + int (client_died_func)() + ) + </synopsis> + <para>This is called by the renderer when it is initialized at + the beginning of time, and sets up an FPEFunctions entry for + the renderer.</para> + <para>The + <emphasis remap='B'>FPEFunctions</emphasis> have the following + parameters:</para> + <para> + <synopsis> +Bool name_check(char *<parameter>name</parameter>); + </synopsis> + + If <parameter class="function">name</parameter> is something the + renderer recognizes as a valid font source name, it returns + <constant>True</constant>, otherwise <constant>False</constant>. + ie, if <parameter class="function">name</parameter> + is a directory name, or is prefixed by the renderer's prefix, + and the directory contains font data the renderer can interpret, + it would return <constant>True</constant>. + </para> + <para> + <synopsis> +int init_fpe(FontPathElementPtr <parameter>fpe</parameter>); + </synopsis> + Does any initialization work for the renderer. The name in + <parameter class="function">fpe</parameter> will be one whose prefix + matches the list returned when the renderer was initialized. + </para> + <para> + <synopsis> +int reset_fpe(FontPathElementPtr <parameter>fpe</parameter>); + </synopsis> + Tells <parameter class="function">fpe</parameter> to reset any + internal state about what fonts it has available. This will typically be + called because the font server's <emphasis remap='B'>FPE</emphasis> + search list has been changed. The + <parameter class="function">fpe</parameter> should reset any cached state + of available fonts (ie, re-read <filename>fonts.dir</filename>) + </para> + <para> + <synopsis> +int free_fpe(FontPathElementPtr <parameter>fpe</parameter>); + </synopsis> + Frees any renderer-specific data and closes any files or sockets. + </para> + <para> + <synopsis> +int open_font(pointer <parameter>client</parameter>, FontPathElementPtr <parameter>fpe</parameter>, Mask <parameter>flags</parameter>, + char *<parameter>fontname</parameter>, int <parameter>namelength</parameter>, + fsBitmapFormat <parameter>format_hint</parameter>, fsBitmapFormatMask <parameter>format_mask</parameter>, + XID <parameter>fontid</parameter>, FontPtr *<parameter>ppfont</parameter>, char **<parameter>alias</parameter>); + </synopsis> + + Opens the font. The bits marked by + <parameter class="function">format_mask</parameter> and + <parameter class="function">format_hint</parameter> + are used where applicable. The resulting FontPtr is returned in + <parameter class="function">ppfont</parameter>. The + <parameter class="function">client</parameter> is optional state + information for use with blocking renderers. If the + <parameter class="function">fontname</parameter> resolves to an + alias, it is returned in <parameter class="function">alias</parameter> + with a <errorcode>FontNameAlias</errorcode> error. This tells + the calling code to start searching again, using + <parameter class="function">alias</parameter> as the font name. The + renderer is expected to fill in any information specified by the + <parameter class="function">flags</parameter>. + </para> + <para>Possible <parameter class="function">flags</parameter> values are: + <synopsis> +#define FontLoadInfo 0x0001 /* font header info */ +#define FontLoadProps 0x0002 /* font properties */ +#define FontLoadMetrics 0x0004 /* font extents */ +#define FontLoadBitmaps 0x0008 /* glyph bitmaps */ +#define FontLoadAll 0x000f +#define FontOpenSync 0x0010 /* force synchronous loading */ + </synopsis> + </para> + + <para>Once a font has been opened, the server may place it and + the pattern it matched into a name cache, to avoid lengthy + searching if the font is reopened. If the renderer does not wish + the font to be in this cache (for licensing reasons), it should + set the font's <emphasis remap='I'>restricted_access</emphasis> + flag. + </para> + + <para> + <synopsis> +int close_font(FontPtr <parameter>pfont</parameter>); + </synopsis> + + Frees up all the data associated with the font. + </para> + + <para> + <synopsis> +int list_fonts(pointer <parameter>client</parameter>, FontPathElementPtr <parameter>fpe</parameter>, + char *<parameter>pattern</parameter>, int <parameter>pattern_length</parameter>, int <parameter>maxnames</parameter>, + FontNamesPtr *<parameter>paths</parameter>); + </synopsis> + + Returns in <parameter class="function">paths</parameter> up to + <parameter class="function">maxnames</parameter> font names the fpe + recognizes as matching the given pattern. + </para> + + <para> + <synopsis> +int start_list_fonts_with_info(pointer <parameter>client</parameter>, + FontPathElementPtr <parameter>fpe</parameter>, char *<parameter>pattern</parameter>, int <parameter>pattern_length</parameter>, + int <parameter>maxnames</parameter>, pointer <parameter>fpe_data</parameter>); + </synopsis> + + Initiates a <systemitem>ListFontsWithXInfo</systemitem>. + Typically, a disk-based renderer will do the equivalent of + <systemitem>ListFonts</systemitem> to gather all the font names + matching the pattern. A font server renderer will send the + request. <parameter class="function">fpe_data</parameter> + provides a handle for any FPE-private data that needs to be + passed in later via + <function>list_next_font_with_info()</function>, eg, the list of + font names for a disk-based renderer. + </para> + + <para> + <synopsis> +int list_next_font_with_info(pointer <parameter>client</parameter>, FontPathElementPtr <parameter>fpe</parameter>, + char **<parameter>name</parameter>, int *<parameter>namelen</parameter>, FontInfoPtr *<parameter>pinfo</parameter>, + int *<parameter>num_fonts</parameter>, pointer <parameter>fpe_data</parameter>); + </synopsis> + + Returns the next font's information. The renderer should keep any state + it requires in the <parameter class="function">fpe_data</parameter> + field. <parameter class="function">num_fonts</parameter> contains the + number of replies remaining. + </para> + + <para>These two routines are split for because of the way both + disk-based renderers and font server renderers handle this + request. The first function initiates the action, the second is + used to gather the results. For a disk-based renderer, a list of + font names matching the pattern is first built up when + <function>start_list_fonts_with_info()</function>is called, and + the results are gathered with each call to + <function>list_next_font_with_info()</function>. In a font + server renderer, the first function sends the + <systemitem>ListFontsWithXInfo</systemitem> request, and the + second processes the replies. + </para> + + <para> + <synopsis> +int wakeup_fpe(FontPathElementPtr <parameter>fpe</parameter>, unsigned long *<parameter>mask</parameter>) + </synopsis> + + Optional function which can be used for blocking + renderers. Typical usage is for a font server renderer, where it + is called when a reply is received, allowing the data to be read + and the client to be signaled and unblocked. + </para> + + <para> + <synopsis> +int client_died(pointer <parameter>client</parameter>, FontPathElementPtr <parameter>fpe</parameter>) + </synopsis> + + + This function is called when a client dies in the middle of a + blocked request, allowing the renderer to clean up. + </para> + <indexterm startref='fpe_functions' class='endofrange' /> + </sect1> + <sect1 id='font_specific_functions'> + <title>Font specific functions</title> + <indexterm id='font_functions' class='startofrange'> + <primary><structname>Font</structname></primary></indexterm> + <para>These functions are contained in each + <structname>Font</structname>. For many renderers, every + font will use the same functions, but some renderers may wish + to use different interfaces for different fonts.</para> + + + <synopsis> +typedef struct { + INT16 left B16, + right B16; + INT16 width B16; + INT16 ascent B16, + descent B16; + CARD16 attributes B16; +} fsCharInfo; + +typedef struct { + CARD8 low, + high; +} fsChar2b; + +typedef struct { + fsChar2b min_char, + max_char; +} fsRange; + +int get_extents(pointer <parameter>client</parameter>, + FontPtr <parameter>pfont</parameter>, Mask <parameter>flags</parameter>, int <parameter>num_ranges</parameter>, fsRange *<parameter>ranges</parameter>, + int *<parameter>num_extents</parameter>, fsCharInfo **<parameter>extents</parameter>); + </synopsis> + + + <para>Possible flags:</para> + + + <synopsis> +LoadAll /* ignore the ranges and get everything */ +FinishRange /* magic for range completion as specified by protocol */ + </synopsis> + + + <para>Builds up the requested array of extents. The extent data + (which the renderer allocates) is returned, as well as the + number of extents. + <emphasis remap='I'>closure</emphasis> contains any blocking + state information.</para> + + <synopsis> + + +int get_bitmaps(pointer <parameter>client</parameter>, + FontPtr <parameter>pfont</parameter>, fsBitmapFormat <parameter>format</parameter>, Mask <parameter>flags</parameter>, + int <parameter>num_ranges</parameter>, fsRange *<parameter>ranges</parameter>, + unsigned long *<parameter>size</parameter>, unsigned long *<parameter>num_glyphs</parameter>, + unsigned long **<parameter>offsets</parameter>, pointer *<parameter>glyph_data</parameter>); + </synopsis> + + + <para>Possible flags:</para> + + <synopsis> +LoadAll +FinishRange /* magic for range completion as specified by protocol */ + </synopsis> + + + <para>Builds up the requested array of bitmaps. The glyph and + offset data (which the renderer allocates) is returned, as well + as the number of glyphs. The + <emphasis remap='I'>closure</emphasis> contains any blocking + state information. This function will build up the bitmap data + in the format specified by + <parameter class="function">format</parameter> so that the interpreter + can return it without any additional modification. This should + minimize data massaging, since outline renderers will hopefully + be able to produce the bitmaps in the proper format.</para> + + <synopsis> +void unload_font(FontPtr <parameter>pfont</parameter>) + </synopsis> + + + <para>The render will free any allocated data. Note that the + <emphasis remap='B'>FPE</emphasis> function + <function>close_font()</function> will also be called, and + should handle any + <emphasis remap='B'>FPE</emphasis> data allocated for the + font.</para> + + <synopsis> +int get_glyphs() +int get_metrics() + </synopsis> + + + <para>These two functions are used by the X server for loading + glyphs and metrics. They expect the results in a considerably + different form. The + <function>get_bitmaps()</function> and + <function>get_extents()</function> routines both allow for + better cache control by the renderer.</para> + <indexterm startref='font_functions' class='endofrange' /> + </sect1> + <sect1 id='font_directories_and_aliases'> + <title>Font directories and aliases</title> + <para>Existing bitmap renderers already have their own concept + of font organization. In the X sample server, the files + <filename>fonts.dir</filename> and <filename>fonts.alias</filename> + are used to list the known fonts. <filename>fonts.dir</filename> + maps file names to font names, while <filename>fonts.alias</filename> + maps font names to other font names. + </para> + <para>These concepts will also be needed by other forms of + fonts which the sample X server does not currently use, but the + font server will, like Bitstream outlines.</para> + </sect1> + <sect1 id='handling_scalable_fonts'> + <title>Handling scalable fonts</title> + <para>For those renderers that support scalable fonts, several + issues must be addressed:</para> + <variablelist spacing='compact'> + <varlistentry> + <term><link linkend='name_parsing'>Name Parsing</link>.</term> + <listitem> + <para>An <acronym>XLFD</acronym> name must be parsed to + determine the requested resolutions and/or sizes.</para> + </listitem> + </varlistentry> + <varlistentry> + <term><link linkend='property_scaling'>Property scaling</link>.</term> + <listitem> + <para>Many of the standard font + properties have values that depend on scaling (eg, + <property>RESOLUTION_X</property>, + <property>POINT_SIZE</property>). </para> + </listitem> + </varlistentry> + <varlistentry> + <term><link linkend='default_values'>Default values</link>.</term> + <listitem> + <para>If resolution information is + wildcarded, the proper default resolution should be + supplied.</para> + </listitem> + </varlistentry> + </variablelist> + <sect2 id='name_parsing'> + <title>Name Parsing</title> + <para>The font name pattern supplied to + <systemitem>OpenBitmapFont</systemitem> or + <systemitem>ListFonts</systemitem> may require some + parsing to be recognized as a scalable font known to the + renderer. The + <property>PIXEL_SIZE</property>, + <property>POINT_SIZE</property>, + <property>RESOLUTION_X</property>, + <property>RESOLUTION_Y</property>, and + <property>AVERAGE_WIDTH</property> all need to + determined from the font name pattern. The master font + must then be found, and scaled appropriately. Any + unspecified values that cannot be determined should be + replaced by the proper defaults. For size fields, this is + whatever the configuration specifies. For resolution + fields, these should be taken from the client's + resolution list, if set, or from the server's + configuration.</para> + </sect2> + <sect2 id='property_scaling'> + <title>Property scaling</title> + <para>Part of scaling a font is scaling its properties. + Many scalable fonts will have a very large number of + scalable properties. One way to deal with these is for + the “master” outline to keep track of the + property names, and supply new values for each instance + of the font. If the property names are stored as Atoms, + memory usage is kept to a minimum.</para> + </sect2> + <sect2 id='default_values'> + <title>Using defaults</title> + <para>Using default values as substitutions for missing + values was covered above. These defaults will also be + useful in handling <systemitem>ListFonts</systemitem> requests. + Returning a scalable font with an instance using the + default values will provide the most user-friendly + environment.</para> + </sect2> + </sect1> + <sect1 id='access_control'> + <title>Access control</title> + <para>The font server will also support large grain security. + It will have both a limit of the number of users, and on the + hosts which it will support.</para> + <para>Limiting the number of users is as much a server loading + issue as a security issue. The limitation will be typically be + set via configuration options or OS limitations. To change it, + use:</para> + + <synopsis> +void AccessSetConnectionLimit(int <parameter>limit</parameter>) + </synopsis> + + + <para>A + <parameter class="function">limit</parameter> of 0 will set it to a + compiled constant based on OS resources (eg, number of file + descriptors).</para> + + <para>Client-host based access control can be used to + supplement licensing, and support font server load balancing by + restricting access. As with licensing, this is OS-specific + code. To manipulate these functions, use: + + <synopsis> +typedef struct _host_address { + int type; + pointer address; + struct _host_address *next; +} HostAddress; + +typedef HostAddress *HostList; + +int AddHost(HostList <parameter>list</parameter>, HostAddress *<parameter>address</parameter>) +int RemoveHost(HostList <parameter>list</parameter>, HostAddress *<parameter>address</parameter>) +Bool ValidHost(HostList <parameter>list</parameter>, HostAddress *<parameter>address</parameter>) + </synopsis> + + + <function>AddHost()</function> adds a host to the + <parameter class="function">list</parameter>. + <function>RemoveHost()</function> removes it, and + <function>ValidHost()</function> checks to see if its on the + <parameter class="function">list</parameter>. In all functions, + the <parameter class="function">address</parameter> will ignore + any value in the <structfield>next</structfield> field. + </para> + <para>Network addresses are used here to avoid issues with host + name aliases. The caller fills in the desired type, and an + address of that form is returned. This is highly OS-specific, + but values for the <structfield>type</structfield> and + <structfield>address</structfield> fields could include: + + <synopsis> +#define HOST_AF_INET 1 +struct in_addr *address; + +#define HOST_AF_DECnet 2 +struct dn_addr *address; + </synopsis> + </para> + + <para>The server will use a global host list, but having the + list as an argument will allow licensing schemes to have their + own host lists.</para> + </sect1> + <sect1 id='licensing'> + <title>Licensing</title> + <para>Licensing is a tricky issue, which each renderer will + support in a different way. The sample font server will attempt + to provide some guidelines, and present a possible + implementation of some simple licensing schemes.</para> + <sect2> + <title>Host Address licensing</title> + <para>This is simplistic licensing based on the client's host. + With this form of licensing, a font may be accessible to some + host but not others. To get the current client's host, the + following is used: + + <synopsis> +void GetHostAddress(HostAddress *<parameter>address</parameter>); + </synopsis> + + A renderer can also use the host access functions to keep + a list of the licensed hosts, and <function>ValidHost()</function> + to check a client.</para> + </sect2> + <sect2> + <title>Simultaneous use license</title> + <para>This licensing allows for a limited number of copies of + the font to be open at once. Since this should be a simple + per-font counter, no support should be required outside of the + renderer.</para> + </sect2> + </sect1> + <sect1 id='difs_contents'> + <title>DIFS contents</title> + <indexterm id='difs_functions' class='startofrange'> + <primary>difs layer</primary></indexterm> + <para>This contains the protocol dispatcher, interpreter and + reply encoding routines.</para> + + <para>The interpreter is table driven off the request code. The + dispatcher gets a request from the os layer from + <function>WaitForSomething()</function>, and uses the + request code to determine which function to call. eg, a + <systemitem>CloseFont</systemitem> request would call + <function>ProcCloseFont()</function>.</para> + + <para>Each request's routine handles any applicable error + checking, and then does as much work as it can. For font + related requests, this means converting the request to the + proper arguments for the renderers.</para> + + <para>If any replies are generated, the reply data is gathered + into the bytestream format, and sent via + <emphasis remap='I'>os</emphasis> write functions to the + client.</para> + + <para>If the byte order of the client and server differ, the + above is modified by having the dispatcher call an intermediate + function which re-orders the request to the proper byte order. + Replies go through similar swapping.</para> + + <sect2> + <title>Client blocking</title> + <para>To minimize delay caused by font server request, clients + can be blocked while they wait for data to be produced. This is + primarily intended for + <emphasis remap='B'>FPEs</emphasis> using a remote font server, + but can be used anywhere where the font server can pause to + handle other client requests while data needed to satisfy + another is produced (possibly via multiple processes).</para> + + <para> + <synopsis> +Bool ClientSleep(ClientPtr <parameter>client</parameter>, Bool (*<parameter>function</parameter>)(), pointer <parameter>closure</parameter>) + </synopsis> + + Puts a client to 'sleep'. This means the client will no + longer be considered while the server is dispatching requests. + <parameter class="function">function</parameter> will be called + when the client is signaled, with the + <parameter class="function">client</parameter> and + <parameter class="function">closure</parameter> as its arguments. + </para> + + <para> + <synopsis> + Bool ClientSignal(ClientPtr <parameter>client</parameter>) + </synopsis> + + This should be called when the client is ready to do more + work. At this point, the function given to + <function>ClientSleep()</function> will be called. + </para> + + <para> + <synopsis> + void ClientWakeup(ClientPtr <parameter>client</parameter>) + </synopsis> + + Puts the client back to its normal state processing requests. + </para> + + <para> + <synopsis> + Bool ClientIsAsleep(ClientPtr <parameter>client</parameter>) + </synopsis> + + + Can be used to check if a client is asleep. This is + useful for handling client termination, so that any requests + the client is waiting upon can be properly cleaned up. + </para> + </sect2> + <sect2> + <title>Sample Usage</title> + + <para>For handling a font server renderer request for + <function>OpenBitmapFont</function> the renderer will + send the request to the remote font server, and the call + <function>ClientSleep()</function>. The font server + will then continue processing requests from other clients, + while the one making the request is blocked. When the reply + returns, the renderer will notice when its + <function>wakeup_fpe()</function> function is called. At this + point the font server renderer will read and process the reply, + <function>ClientSignal()</function> will be called, + and the <parameter>closure</parameter> function will be called. + It will request the data from the renderer, completing the + request, and call + <function>ClientWakeup()</function> to return the + client to normal status.</para> + + <para>This layer also contains the resource database, which + associates fonts with IDs, extension interface functions and + the server initialization and reset control.</para> + <indexterm startref='difs_functions' class='endofrange' /> + </sect2> + </sect1> + <sect1 id='os_contents'> + <title>OS contents</title> + <indexterm id='os_functions' class='startofrange'> + <primary>os layer</primary></indexterm> + <para>This layer contains OS specific routines for + configuration, command line parsing, client/server + communications, and various OS-dependent utilities such as + memory management and error handling.</para> + <para><function>ReadRequestFromClient()</function> + returns a full request to the dispatcher. + <function>WaitForSomething()</function> is where the + server spends its idle time, waiting for any action from a + client or processing any work left from a blocked + client.</para> + + <para>When a client attempts to connect, the server will + call + + <synopsis> +int CheckClientAuthorization(ClientPtr <parameter>client</parameter>, AuthPtr <parameter>client_auth</parameter>, + int *<parameter>accept</parameter>, int *<parameter>index</parameter>, int *<parameter>size</parameter>, char **<parameter>authdata</parameter>) + </synopsis> + + to see if the server is set to allow the client to connect. It + may use licensing or configuration information to determine if + the client can connect. + </para> + + <para>When then connection is established, the server will use the + + <synopsis> +typedef struct _alt_server { + char subset; + char namelen; + char *name; +} AlternateServerRec, *AlternateServerPtr; + +int ListAlternateServers(AlternateServerPtr *<parameter>servers</parameter>) + </synopsis> + + + to return any alternate server information it may have. + </para> + <para>When the client limit is reached, the font server may + attempt to copy itself, by calling + + <synopsis> +int CloneMyself() + </synopsis> + + + This function will (if the configuration options allow) + start a new font server process. This is done in such a way + that no pending connections should be lost, and that the + original server will accept no new connections. Once the + original server has no more clients, it will exit.</para> + + <sect2> + <title>Catalogue manipulation</title> + + <para>Catalogues are configuration dependent, and hence sent by + OS-dependent methods. In order for the + <emphasis remap='I'>difs</emphasis> layer to get them, it + uses + + <synopsis> +int ListCatalogues(char *<parameter>pattern</parameter>, int <parameter>pattern_length</parameter>, + int <parameter>maxnames</parameter>, char **<parameter>catalogues</parameter>, int *<parameter>len</parameter>) + </synopsis> + + which returns the list of all catalogues it supports which match + the pattern. This function will be used by the catalogue + manipulation requests, as well as by renderers when they give + their <systemitem>ListFonts</systemitem> results. + </para> + + <para> + <synopsis> +int ValidateCatalogues(int <parameter>number</parameter>, char *<parameter>catalogues</parameter>) + </synopsis> + Can be used to validate a list of catalogues, returning + <constant>True</constant> if the list is acceptable.</para> + <indexterm startref='os_functions' class='endofrange' /> + </sect2> + </sect1> + <sect1 id='utility_functions'> + <title>Utility functions</title> + <sect2> + <title>Client data functions</title> + + <para>These provide access to the current client's resolution + and authorization data. This form of interface is supplied + rather than passing it to all renderers in the <emphasis + remap='B'>FPE</emphasis> functions because the data may be + complex and/or uninteresting to all renderers.</para> + + <para><synopsis> +AuthContextPtr GetClientAuthorization() + </synopsis> + + <indexterm><primary><structname>AuthContext</structname></primary></indexterm> + Returns the authorization data for the current client.</para> + + <para><synopsis> +fsResolution *GetClientResolutions(int *<parameter>num_resolutions</parameter>) + </synopsis> + + + Returns the list of resolutions that the current client has set.</para> + </sect2> + <sect2> + <title>Caching functions</title> + + <para>These are functions that simplify caching of renderer + data. These are for use by renderers that take significant + resources to produce data. The data must be re-creatable -- the + cache is not meant for general storage. The data may also be + moved by the cache, so it should only be accessed by + CacheID.</para> + + <para><synopsis> +typedef void (*CacheFree)(); +typedef unsigned long CacheID; +typedef unsigned long Cache; + +Cache CacheInit(int <parameter>renderer_id</parameter>) + </synopsis> + + + Initializes a cache object for the renderer. the returned + ID should be passed to <function>CacheStoreMemory()</function> + when adding an object to the cache.</para> + + <para><synopsis> +void CacheStats(Cache <parameter>cid</parameter>, unsigned long *<parameter>num_entries</parameter>, + unsigned long *<parameter>max_storage</parameter>, unsigned long *<parameter>current_storage</parameter>, + unsigned long *<parameter>num_lookups</parameter>, unsigned long *<parameter>hit_ratio</parameter>) + </synopsis> + + + Returns statistics on the cache. Useful if the renderer + wants some hints about whether to place an object in the cache. + If the cache is nearly full, and the priority low, it may want + to take different action.</para> + + <para><synopsis> +CacheID CacheStoreMemory(Cache <parameter>cacheid</parameter>, pointer <parameter>data</parameter>, unsigned long <parameter>size</parameter>, + CacheFree <parameter>free_func</parameter>) + </synopsis> + + + The renderer hands the cache some chunk of contiguous + memory, which the cache timestamps and stores. When it needs to + remove them, it calls the + <parameter class="function">free_func</parameter>, which must + take responsibility for properly freeing the data. + <parameter class="function">size</parameter> is primarily a hint + to the cache, so that cache limits can be properly calculated. A + return value of zero means the store failed, probably because + the given size was over the cache limit. If the given data is + too large for the current cache, it will attempt to free old + data to make room. The returned ID is a unique value that refers + both to the object and the cache in which it was placed.</para> + + <para><synopsis> +pointer CacheFetchMemory(CacheID <parameter>cid</parameter>, Bool <parameter>update</parameter>) + </synopsis> + + + Returns the memory attached to the id. If + <parameter class="function">update</parameter> is set, the + timestamp is updated. (Some accesses may wish to be 'silent', + which allows some control over the freeing scheduling.) If the + cid is invalid, <constant>NULL</constant> is returned.</para> + + <para><synopsis> +pointer CacheFetchMemory(CacheID <parameter>cid</parameter>, Bool <parameter>update</parameter>) + </synopsis> + + + Allows the cache to flush the data. If + <emphasis remap='I'>notify</emphasis> is set, the CacheFree + function passed in when the data was cached will also be + called.</para> + + <para><synopsis> +void MemoryFreed(CacheID <parameter>cid</parameter>, pointer <parameter>data</parameter>, int <parameter>reason</parameter>) + </synopsis> + + + Callback function from the cache to the renderer notifying + it that its data has been flushed. This function then has the + responsibility to free that data. + <parameter class="function">reason</parameter> may be one of: + + <synopsis> +CacheReset /* all cache freed because of server reset */ +CacheEntryFreed /* explicit request via free_memory() */ +CacheEntryOld /* cache hit limit, and memory being freed because its old */ + </synopsis> + + + and is supplied so that the renderer may choose how to + deal with the free request. (It will probably be ignored by + most, but some may want to keep the memory around by bypassing + the cache, or re-inserting it.) Note that the cache will + consider the data gone, so it <emphasis remap='B'>must</emphasis> + be re-inserted to keep it alive.</para> + + <para><synopsis> +void CacheSimpleFree(CacheID <parameter>cid</parameter>, pointer <parameter>data</parameter>, int <parameter>reason</parameter>) + </synopsis> + + + Just calls <function>free()</function> on the data. Simple + CacheFree defined here to prevent it being redefined in each + renderer.</para> + + <para>Typical usage of the cache is for the renderer to store a + CacheID rather than a pointer to the cacheable data. The + renderer is responsible for both allocating and freeing the + data, as well as keeping track of just what it is. When the + renderer needs the cached data, it will request it from the + cache. If it fails, it must rebuild it.</para> + + <para>A possible configuration parameter is the size of the + cache. when the cache is filled (with the calculation based on + the given size), it sweeps the cache and frees old data. The + amount of memory actually freed may wish to be tunable: some + systems may want to keep the cache as full as possible, others + may want to free some percentage such that sweeps occur less + frequently.</para> + + <para>Cache statistics may want to be available for + administrators. They could be dumped to a file when a signal is + received. (SNMP seems like a perfect match, but apparently the + technology isn't there yet.)</para> + + <para>Cached data could also be compressed, if the memory/CPU + tradeoffs make it worthwhile.</para> + + <note><title>ISSUE: Is a time-based freeing schedule sufficient?</title> + <para>Should priorities or size also be taken into account? [ No. + Anything that the renderer thinks should have a higher priority + should probably not be placed into the cache. ]</para></note> + + </sect2> + <sect2> + <title>Byte swapping</title> + + <para>Functions for swapping a 4-byte quantity, a 2-byte + quantity and inverting a byte.</para> + + <synopsis> +void BitOrderInvert(pointer <parameter>buffer</parameter>, unsigned long <parameter>num_bytes</parameter>) +void TwoByteSwap(pointer <parameter>buffer</parameter>, unsigned long <parameter>num_shorts</parameter>) +void FourByteSwap(pointer <parameter>buffer</parameter>, unsigned long <parameter>num_longs</parameter>) + </synopsis> + + + </sect2> + <sect2> + <title>Bitmap padding</title> + + <para>Functions taking a desired extents and a bitmap that will + return the bitmap properly padded.</para> + + <para><synopsis> +int RepadBitmap(pointer <parameter>src</parameter>, pointer <parameter>dst</parameter>, fsFormat <parameter>src_format</parameter>, + fsFormat <parameter>dst_format</parameter>, int <parameter>width</parameter>, int <parameter>height</parameter>) + </synopsis> + + Takes a bitmap in <parameter class="function">src_format</parameter> + and converts it to one in + <parameter class="function">dst_format</parameter>.</para> + + </sect2> + <sect2> + <title>Atoms</title> + + <para>Existing bitmap-based renderers use atoms to store strings + for property information. Rather than duplicate this code in + each renderer, it lives in the + <filename class="directory">util</filename> directory.</para> + + <para>Atoms will be especially useful for property information, + to prevent many copies of the same strings from being saved. + Using atoms for comparison when modifying properties after + scaling is also more efficient. Since + <emphasis remap='I'>atoms</emphasis> will will exist until the + server is reset, they may want to be used sparingly for property + values to avoid extraneous string data.</para> + + <para><synopsis> +typedef unsigned long Atom; + +Atom MakeAtom(char *<parameter>string</parameter>, unsigned int <parameter>length</parameter>, Bool <parameter>create</parameter>) + </synopsis> + + + Returns the atom associated with + <parameter class='function'>string</parameter>. If + <parameter>create</parameter> is true, a new atom will be + created. + </para> + + <para><synopsis> +char *NameForAtom(Atom atom) + </synopsis> + + Returns the string associated with + <parameter class="function">atom</parameter>. + </para> + </sect2> + </sect1> + <sect1 id='server_request_details'> + <title>Server request details</title> + <para>This section describes in-depth the action of each + protocol request. In all cases, the request is first error + checked for simple length or value errors, with the server + immediately returning an error if one is encountered.</para> + <sect2 id='connection'> + <title>Connection</title> + <para>When a new client attempts to connect, the server first + checks its initial authorization information to see if the + server is willing to talk to it. This will be handled in some + OS-specific form using <function>CheckClientAuthorization()</function>. + If it passes this test, and the server has sufficient to + resources to talk to it, the server sends accepts the + connection and returns its connection block. If the + connection fails, the server returns the proper status and a + list of any alternate servers it may know of (gathered from + <function> + ListAlternateServers().)</function></para> + </sect2> + <sect2 id='listextension'> + <title>ListExtension</title> + <para>Returns the list of extensions the server knows about. + Any extensions will be initialized when the server is first + started.</para> + </sect2> + <sect2 id='queryextension'> + <title>QueryExtension</title> + <para>Returns the information about the requested extension, + which was set when the extension was initialized.</para> + </sect2> + <sect2 id='listcatalogues'> + <title>ListCatalogues</title> + <para>Returns the catalogues the server recognizes (the + results of <function>ListCatalogues()</function>.)</para> + </sect2> + <sect2 id='setcatalogues'> + <title>SetCatalogues</title> + <para>Sets the requesting client's catalogues after verifying + them with the supported catalogues.</para> + </sect2> + <sect2 id='getcatalogues'> + <title>GetCatalogues</title> + <para>Returns the requesting client's catalogues.</para> + </sect2> + <sect2 id='createac'> + <title>CreateAC</title> + <para>Creates a new authorization context and fills it in. + The list of authorization protocols is then checked by the + server with + <function>CheckClientAuthorization()</function>. If + any are accepted, the + <emphasis remap='B'>AC</emphasis> is placed in the resource + database and <constant>Success</constant> is returned with the + name of the accepted protocol. If more than one is accepted, + <constant>Continue</constant> is returned with each + of the accepted protocols, until the last one which has + status <constant>Success</constant>. Otherwise + <constant>Denied</constant> is returned.</para> + </sect2> + <sect2 id='freeac'> + <title>FreeAC</title> + <para>Looks up the + <emphasis remap='B'>AC</emphasis> in the resource database, + and frees it if it finds it. Otherwise an + <errorname>Access</errorname> error is returned.</para> + </sect2> + <sect2 id='setauthorization'> + <title>SetAuthorization</title> + <indexterm><primary><structname>AuthContext</structname></primary></indexterm> + <para>Looks up the + <emphasis remap='B'>AC</emphasis> in the resource database, + and set the client's AuthContextPtr to its value if it is + found. Otherwise it sends an + <errorname>Access</errorname> error.</para> + </sect2> + <sect2 id='setresolution'> + <title>SetResolution</title> + <para>Sets the requesting client's resolution list to the + supplied list.</para> + </sect2> + <sect2 id='getresolution'> + <title>GetResolution</title> + <para>Returns the requesting client's list of resolutions.</para> + </sect2> + <sect2 id='listfonts'> + <title>ListFonts</title> + <para>Iterates over each open FPE, calling the FPE's + <function>list_fonts()</function>routine passing it the + pattern. When all FPE's have been processed, the list that + has been built up is returned. Note that the same + <structname>FontNamesPtr</structname> is sent to each + FPE in turn, so that one list is built up. An FPE may + restrict the fonts it returns based on the client's + catalogue.</para> + </sect2> + <sect2 id='listfontswithxinfo'> + <title>ListFontsWithXInfo</title> + <para>Iterates over each FPE, calling its + <function>start_list_fonts_with_info()</function>function to + prime the FPE's renderer. It then calls the FPE's + <function>list_next_font_with_info()</function>, sending each font's + data to the client until no more fonts remain. When all FPEs + have been processed, the final reply with a zero-length name + is then sent to mark the end of the replies. An FPE may + restrict the fonts it returns based on the client's + catalogue. Note: an issue exists with font aliases which may + require this to change, since an FPE may contain an alias + pointing to another FPE, and cannot therefore return the + font's info.</para> + </sect2> + <sect2 id='openbitmapfont'> + <title>OpenBitmapFont</title> + <para>The pattern is first searched for in the font server's + name cache. If it doesn't find it, the server iterates over + each FPE, calling its + <function>open_font</function> function with the + supplied pattern. This will return one of the following + values:</para> + <itemizedlist remap='IP'> + <listitem> + <para>an <errorname>Access</errorname> error, which means + the renderer has the font but the client does not have + access to it because of some form of licensing + restriction</para> + </listitem> + <listitem> + <para>a <errorname>Font</errorname> error and a NULL + <emphasis remap='I'>alias</emphasis> parameter, which + will cause the next FPE to be tried</para> + </listitem> + <listitem> + <para>a <errorname>Font</errorname> error but a non-NULL + <emphasis remap='I'>alias</emphasis>, which will cause + the search to start over with the first FPE using + <emphasis remap='I'>alias</emphasis> as the new font + pattern</para> + </listitem> + <listitem> + <para><errorname>Success</errorname>, + in which case a valid font has been found.</para> + </listitem> + </itemizedlist> + + <para>If the end of the FPE list is reached without having found + the font, an error is returned to the client. If an + <errorname>Access</errorname> error was encountered, it is + returned, otherwise a <errorname>Font</errorname> error is + returned. If a valid font is found, its reference count will + be incremented and it will be checked to see if the client has + already opened it before. If so, the previous ID will be + returned. Otherwise the font will be placed in the resource + database.</para> + + <para>The renderer will fill in the font's header and property + information, and may also choose to load or create the font's + metrics or glyphs. If the glyphs are built, they will use any + supplied <emphasis remap='I'>format hint</emphasis>.</para> + + <para>Whenever a new font is successfuly opened, the font and + its name pattern will be placed in a name cache. This cache + exists to minimize the amount of work spent searching for a + font. It will be flushed when the font catalogue is + modified. Client's with private font catalogues will require + private name caches.</para> + + </sect2> + <sect2 id='queryxinfo'> + <title>QueryXInfo</title> + <para>The + <emphasis remap='I'>fontid</emphasis> is looked up in the + resource database, and the font's header and property info is + returned.</para> + </sect2> + <sect2 id='queryxextents8_queryxextents16'> + <title>QueryXExtents8 QueryXExtents16</title> + <para>The + <emphasis remap='I'>fontid</emphasis> is looked up in the + resource database. The supplied list of characters + (interpreted according to request type) is then translated + into a list of ranges. The font's + <function>get_extents()</function>function is then called. It + builds the requested list of extents, and returns them along + with the number of extents. The results are properly swapped + and sent to the client.</para> + </sect2> + <sect2 id='queryxbitmaps8_queryxbitmaps16'> + <title>QueryXBitmaps8 QueryXBitmaps16</title> + <para>The + <emphasis remap='I'>fontid</emphasis> is looked up in the + resource database. The supplied list of characters + (interpreted according to request type) is then translated + into a list of ranges. The font's + <function>get_bitmaps()</function>function is called, and the + renderer will build up the requested bitmaps, using the + specified + <emphasis remap='I'>format</emphasis>, and returns the + bitmaps, the number of glyphs and the offsets. The offsets + are properly swapped and the offsets and bitmaps are sent to + the clients.</para> + </sect2> + <sect2 id='closefont'> + <title>CloseFont</title> + <para>The font's reference count is decremented. If this was + the last reference, the font's + <function>unload_font()</function>function is called to free + the renderer's data, and the font's FPE + <function>close_font()</function>function is called to free + up any FPE specific data.</para> + </sect2> + </sect1> + <sect1 id='configuration'> + <title>Configuration</title> + <indexterm><primary>configuration file</primary></indexterm> + <para>The configuration mechanism is a simple keyword-value + pair, separated by an '<literal>=</literal>'.</para> + <variablelist> + <title>Configuration types:</title> + <varlistentry> + <term><type>cardinal</type></term> + <listitem><para>non-negative number</para></listitem> + </varlistentry> + <varlistentry> + <term><type>boolean</type></term> + <listitem><para>"[Yy]es", "[Yy]" "on", "1", "[Nn]o", "[Nn]", "off", "0"</para></listitem> + </varlistentry> + <varlistentry> + <term><type>resolution</type></term> + <listitem><para><type>cardinal</type><literal>,</literal><type>cardinal</type></para></listitem> + </varlistentry> + <varlistentry> + <term><type>list of foo</type></term> + <listitem><para>1 or more of foo, separated by commas</para></listitem> + </varlistentry> + </variablelist> + <variablelist> + <title>Here is an incomplete list of the supported keywords:</title> + <varlistentry> + <term><literal>#</literal></term> + <listitem><para>in the first column, a comment character</para></listitem> + </varlistentry> +<!-- + <varlistentry> + <term><literal>cache-size</literal> <type>(cardinal)</type></term> + <listitem><para>Size in bytes of the FS cache.r</para></listitem> + </varlistentry> + --> + <varlistentry> + <term><literal>catalogue</literal> <type>(list of string)</type></term> + <listitem><para>Ordered list of font path element names.</para></listitem> + </varlistentry> + <varlistentry> + <term><literal>alternate-servers</literal> <type>(list of string)</type></term> + <listitem><para>List of alternate servers for this FS.</para></listitem> + </varlistentry> + <varlistentry> + <term><literal>client-limit</literal> <type>(cardinal)</type></term> + <listitem><para>Number of clients this FS will support before refusing + service.</para></listitem> + </varlistentry> + <varlistentry> + <term><literal>clone-self</literal> <type>(boolean)</type></term> + <listitem><para>Whether this FS should attempt to clone itself or + use delegates when it reachs the client-limit.</para></listitem> + </varlistentry> + <varlistentry> + <term><literal>default-point-size</literal> <type>(cardinal)</type></term> + <listitem><para>The default pointsize (in decipoints) for fonts that + don't specify.</para></listitem> + </varlistentry> + <varlistentry> + <term><literal>default-resolutions</literal> <type>(list of resolutions)</type></term> + <listitem><para>Resolutions the server supports by default. + This information may be used as a hint for pre-rendering.</para></listitem> + </varlistentry> + <varlistentry> + <term><literal>error-file</literal> <type>(string)</type></term> + <listitem><para>Filename of the error file. All warnings and errors + will be logged here. This information may be used as a hint + for pre-rendering.</para></listitem> + </varlistentry> + <varlistentry> + <term><literal>port</literal> <type>(cardinal)</type></term> + <listitem><para> + The TCP port on which the server will listen for connections. + </para></listitem> + </varlistentry> + <varlistentry> + <term><literal>use-syslog</literal> <type>(boolean)</type></term> + <listitem><para> + Whether syslog(3) is to be used for errors. + </para></listitem> + </varlistentry> +<!-- + <varlistentry> + <term><literal>trusted-clients</literal> <type>(list of string)</type></term> + <listitem><para> + Those clients the fontserver will talk to. Others + will be refused for the initial connection. An empty + list means the server will talk to any client. + </para></listitem> + </varlistentry> + --> + </variablelist> + <para>Each renderer may also want private configuration + options. The names should be prefixed by the renderer name, ie + <literal>pcf-</literal>, <literal>atm-</literal>.</para> + <example> + <title>Sample Configuration Entries:</title> + <programlisting> +# allow a ~a megabyte of memory to be reserved for cache data +cache-size = 1000000 + +catalogue = pcf:/usr/lib/X11/fonts/misc,speedo:/usr/lib/fonts/speedo + </programlisting> + </example> + </sect1> + <index/> +</article> diff --git a/app/xfs/doc/xfs-design.xsl b/app/xfs/doc/xfs-design.xsl new file mode 100644 index 000000000..eed67e757 --- /dev/null +++ b/app/xfs/doc/xfs-design.xsl @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="utf-8"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + version="1.0"> + <!-- + Copyright 2009 Sun Microsystems, Inc. All rights reserved. + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, and/or sell copies of the Software, and to permit persons + to whom the Software is furnished to do so, provided that the above + copyright notice(s) and this permission notice appear in all copies of + the Software and that both the above copyright notice(s) and this + permission notice appear in supporting documentation. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT + OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR + HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL + INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING + FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, + NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION + WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + Except as contained in this notice, the name of a copyright holder + shall not be used in advertising or otherwise to promote the sale, use + or other dealings in this Software without prior written authorization + of the copyright holder. + --> + + <xsl:param name="html.stylesheet" select="'xfs-design.css'"/> + <xsl:param name="chunker.output.indent">yes</xsl:param> + <xsl:param name="html.extra.head.links" select="1"></xsl:param> + <xsl:param name="saxon.character.representation" select="'entity;decimal'"></xsl:param> + <xsl:param name="function.parens" select="0"></xsl:param> +</xsl:stylesheet> diff --git a/app/xfs/include/access.h b/app/xfs/include/access.h index 19c774c90..58bb230ab 100644 --- a/app/xfs/include/access.h +++ b/app/xfs/include/access.h @@ -1,4 +1,3 @@ -/* $Xorg: access.h,v 1.4 2001/02/09 02:05:43 xorgcvs Exp $ */ /* Copyright 1987, 1998 The Open Group @@ -44,22 +43,14 @@ in this Software without prior written authorization from The Open Group. * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * @(#)access.h 4.1 91/05/02 - * */ -/* $XFree86: xc/programs/xfs/include/access.h,v 1.4 2001/01/17 23:45:30 dawes Exp $ */ #ifndef _ACCESS_H_ #define _ACCESS_H_ -typedef struct _hostaddress *HostList; - #include <os.h> #include <client.h> -#define HOST_AF_INET 1 -#define HOST_AF_DECnet 2 - extern int CheckClientAuthorization( ClientPtr client, AuthPtr client_auth, diff --git a/app/xfs/include/accstr.h b/app/xfs/include/accstr.h deleted file mode 100644 index 50a134dd8..000000000 --- a/app/xfs/include/accstr.h +++ /dev/null @@ -1,76 +0,0 @@ -/* $Xorg: accstr.h,v 1.4 2001/02/09 02:05:43 xorgcvs Exp $ */ -/* -Copyright 1987, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - - * Copyright 1990, 1991 Network Computing Devices; - * Portions Copyright 1987 by Digital Equipment Corporation - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the names of Network Computing Devices, - * or Digital not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. Network Computing Devices, or Digital - * make no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - * - * NETWORK COMPUTING DEVICES, AND DIGITAL DISCLAIM ALL WARRANTIES WITH - * REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY - * AND FITNESS, IN NO EVENT SHALL NETWORK COMPUTING DEVICES, DIGITAL OR MIT BE - * LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION - * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - * - * @(#)accstr.h 4.1 91/05/02 - * - */ -/* $XFree86: xc/programs/xfs/include/accstr.h,v 1.6 2001/06/25 20:40:18 paulo Exp $ */ - -#ifndef _ACCSTR_H_ -#define _ACCSTR_H_ - -typedef struct _hostaddress { - int type; - pointer address; - int addr_len; - struct _hostaddress *next; -} HostAddress; - -#include <misc.h> -#include <access.h> - -#if 0 -/* difs/difsutils.c */ -extern int AddHost(HostList *list, HostAddress *addr); -extern int RemoveHost(HostList *list, HostAddress *addr); -extern int ValidHost(HostList list, HostAddress *addr); -#endif - -/* os/access.c */ -extern int GetHostAddress(HostAddress *addr); - -#endif /* _ACCSTR_H_ */ diff --git a/app/xfs/include/assert.h b/app/xfs/include/assert.h index aa95a6957..23817e60b 100644 --- a/app/xfs/include/assert.h +++ b/app/xfs/include/assert.h @@ -1,4 +1,3 @@ -/* $Xorg: assert.h,v 1.4 2001/02/09 02:05:43 xorgcvs Exp $ */ /* Copyright 1987, 1998 The Open Group @@ -44,8 +43,6 @@ in this Software without prior written authorization from The Open Group. * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * @(#)assert.h 4.1 91/05/02 - * */ #ifdef DEBUG #include <stdio.h> diff --git a/app/xfs/include/auth.h b/app/xfs/include/auth.h index 0ea06f0cc..763d87438 100644 --- a/app/xfs/include/auth.h +++ b/app/xfs/include/auth.h @@ -1,4 +1,3 @@ -/* $Xorg: auth.h,v 1.4 2001/02/09 02:05:43 xorgcvs Exp $ */ /* Copyright 1987, 1998 The Open Group @@ -44,10 +43,7 @@ in this Software without prior written authorization from The Open Group. * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * @(#)auth.h 4.1 91/05/02 - * */ -/* $XFree86: xc/programs/xfs/include/auth.h,v 1.5 2001/01/17 23:45:31 dawes Exp $ */ #ifndef _AUTH_H_ #define _AUTH_H_ diff --git a/app/xfs/include/authstr.h b/app/xfs/include/authstr.h index de01f4240..4b77b0515 100644 --- a/app/xfs/include/authstr.h +++ b/app/xfs/include/authstr.h @@ -1,4 +1,3 @@ -/* $Xorg: authstr.h,v 1.4 2001/02/09 02:05:43 xorgcvs Exp $ */ /* Copyright 1987, 1998 The Open Group @@ -44,8 +43,6 @@ in this Software without prior written authorization from The Open Group. * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * @(#)authstr.h 4.1 91/05/02 - * */ #ifndef _AUTHSTR_H_ diff --git a/app/xfs/include/cache.h b/app/xfs/include/cache.h index 7e5a2b245..254dd49cc 100644 --- a/app/xfs/include/cache.h +++ b/app/xfs/include/cache.h @@ -1,4 +1,3 @@ -/* $Xorg: cache.h,v 1.4 2001/02/09 02:05:43 xorgcvs Exp $ */ /* Copyright 1987, 1998 The Open Group @@ -44,10 +43,7 @@ in this Software without prior written authorization from The Open Group. * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * @(#)cache.h 4.1 91/05/02 - * */ -/* $XFree86: xc/programs/xfs/include/cache.h,v 1.4 2001/01/17 23:45:31 dawes Exp $ */ #ifndef _CACHE_H_ #define _CACHE_H_ diff --git a/app/xfs/include/cachestr.h b/app/xfs/include/cachestr.h index 19bdd5aff..3360e5cf4 100644 --- a/app/xfs/include/cachestr.h +++ b/app/xfs/include/cachestr.h @@ -1,4 +1,3 @@ -/* $Xorg: cachestr.h,v 1.4 2001/02/09 02:05:43 xorgcvs Exp $ */ /* Copyright 1987, 1998 The Open Group @@ -44,8 +43,6 @@ in this Software without prior written authorization from The Open Group. * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * @(#)cachestr.h 4.1 91/05/02 - * */ #ifndef _CACHSTR_H_ diff --git a/app/xfs/include/client.h b/app/xfs/include/client.h index 722959dbb..9e93c0dfd 100644 --- a/app/xfs/include/client.h +++ b/app/xfs/include/client.h @@ -1,4 +1,3 @@ -/* $Xorg: client.h,v 1.4 2001/02/09 02:05:43 xorgcvs Exp $ */ /* Copyright 1990, 1991, 1998 The Open Group @@ -43,7 +42,6 @@ in this Software without prior written authorization from The Open Group. * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF * THIS SOFTWARE. */ -/* $XFree86: xc/programs/xfs/include/client.h,v 1.6 2001/01/17 23:45:31 dawes Exp $ */ #ifndef _CLIENT_H_ #define _CLIENT_H_ diff --git a/app/xfs/include/clientstr.h b/app/xfs/include/clientstr.h index ceaba9114..b65ec1c10 100644 --- a/app/xfs/include/clientstr.h +++ b/app/xfs/include/clientstr.h @@ -1,4 +1,3 @@ -/* $Xorg: clientstr.h,v 1.4 2001/02/09 02:05:43 xorgcvs Exp $ */ /* Copyright 1987, 1998 The Open Group @@ -44,7 +43,6 @@ in this Software without prior written authorization from The Open Group. * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/xfs/include/clientstr.h,v 1.6 2001/08/28 23:44:53 paulo Exp $ */ #ifndef _CLIENTSTR_H_ #define _CLIENTSTR_H_ diff --git a/app/xfs/include/closestr.h b/app/xfs/include/closestr.h index 1e3e41203..caf938693 100644 --- a/app/xfs/include/closestr.h +++ b/app/xfs/include/closestr.h @@ -1,4 +1,3 @@ -/* $Xorg: closestr.h,v 1.4 2001/02/09 02:05:44 xorgcvs Exp $ */ /* Copyright 1987, 1998 The Open Group @@ -44,8 +43,6 @@ in this Software without prior written authorization from The Open Group. * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $NCDXorg: @(#)closestr.h,v 4.1 1991/05/02 04:15:46 lemke Exp $ - * */ #ifndef CLOSESTR_H diff --git a/app/xfs/include/closure.h b/app/xfs/include/closure.h index ea8e260bc..9d63b3bc7 100644 --- a/app/xfs/include/closure.h +++ b/app/xfs/include/closure.h @@ -1,4 +1,3 @@ -/* $Xorg: closure.h,v 1.4 2001/02/09 02:05:44 xorgcvs Exp $ */ /* Copyright 1987, 1998 The Open Group @@ -44,8 +43,6 @@ in this Software without prior written authorization from The Open Group. * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * @(#)closure.h 4.1 91/05/02 - * */ #ifndef CLOSURE_H #define CLOSURE_H 1 diff --git a/app/xfs/include/difs.h b/app/xfs/include/difs.h index 2299f25d9..2064bb37b 100644 --- a/app/xfs/include/difs.h +++ b/app/xfs/include/difs.h @@ -1,4 +1,3 @@ -/* $XFree86: xc/programs/xfs/include/difs.h,v 1.4 2001/08/01 00:45:04 tsi Exp $ */ /* * Copyright (C) 1999 The XFree86 Project, Inc. All Rights Reserved. * diff --git a/app/xfs/include/difsfn.h b/app/xfs/include/difsfn.h index 0922810d1..e21242c43 100644 --- a/app/xfs/include/difsfn.h +++ b/app/xfs/include/difsfn.h @@ -1,4 +1,3 @@ -/* $Xorg: difsfn.h,v 1.4 2001/02/09 02:05:44 xorgcvs Exp $ */ /* Copyright 1987, 1998 The Open Group @@ -44,7 +43,6 @@ in this Software without prior written authorization from The Open Group. * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/xfs/include/difsfn.h,v 1.4 2001/01/17 23:45:31 dawes Exp $ */ #ifndef _DIFSFONT_H_ #define _DIFSFONT_H_ diff --git a/app/xfs/include/difsfnst.h b/app/xfs/include/difsfnst.h index 3d7080e4f..7434b7b7c 100644 --- a/app/xfs/include/difsfnst.h +++ b/app/xfs/include/difsfnst.h @@ -1,4 +1,3 @@ -/* $Xorg: difsfnst.h,v 1.4 2001/02/09 02:05:44 xorgcvs Exp $ */ /* Copyright 1987, 1998 The Open Group @@ -44,7 +43,6 @@ in this Software without prior written authorization from The Open Group. * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/xfs/include/difsfnst.h,v 1.4 2001/01/17 23:45:31 dawes Exp $ */ #ifndef _DIFSFONTST_H_ #define _DIFSFONTST_H_ diff --git a/app/xfs/include/difsutils.h b/app/xfs/include/difsutils.h index d25a270b1..39133584c 100644 --- a/app/xfs/include/difsutils.h +++ b/app/xfs/include/difsutils.h @@ -1,7 +1,3 @@ -/* - * $XFree86: xc/programs/xfs/include/difsutils.h,v 1.4 2001/06/25 20:40:18 paulo Exp $ - */ - /************************************************************ Copyright 1998 by Thomas E. Dickey <dickey@clark.net> @@ -33,7 +29,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include <misc.h> #include <auth.h> #include <X11/fonts/font.h> -#include <accstr.h> #include <X11/fonts/fontstruct.h> typedef void (*DifsWakeupFunc)(pointer data, int result, unsigned long * pReadmask); @@ -44,17 +39,14 @@ extern Bool ClientIsAsleep (ClientPtr client); extern Bool ClientSleep (ClientPtr client, Bool (*function) (ClientPtr, pointer), pointer data); extern Bool QueueWorkProc (DifsWorkFunc function, ClientPtr client, pointer data); extern Bool RegisterBlockAndWakeupHandlers (BlockHandlerProcPtr blockHandler, DifsWakeupFunc wakeupHandler, pointer blockData); -extern Bool ValidHost (HostList list, HostAddress *addr); #if 0 extern Bool XpClientIsBitmapClient (ClientPtr client); extern Bool XpClientIsPrintClient (ClientPtr client, FontPathElementPtr fpe); extern FontResolutionPtr GetClientResolutions (int *num); #endif -extern int AddHost (HostList *list, HostAddress *addr); #if 0 extern int GetDefaultPointSize (void); #endif -extern int RemoveHost (HostList *list, HostAddress *addr); extern int SetDefaultResolutions (char *str); #if 0 extern int client_auth_generation (ClientPtr client); @@ -65,7 +57,7 @@ extern pointer Xalloc (unsigned long m); extern pointer Xrealloc (pointer n, unsigned long m); extern void BlockHandler (OSTimePtr pTimeout, pointer pReadmask); extern void ClientWakeup (ClientPtr client); -extern void CopyISOLatin1Lowered (unsigned char *dest, unsigned char *source, int length); +extern void CopyISOLatin1Lowered (char *d, char *s, int length); extern void InitBlockAndWakeupHandlers (void); extern void NoopDDA (void); extern void ProcessWorkQueue (void); diff --git a/app/xfs/include/dispatch.h b/app/xfs/include/dispatch.h index c476d1771..943322221 100644 --- a/app/xfs/include/dispatch.h +++ b/app/xfs/include/dispatch.h @@ -1,7 +1,3 @@ -/* - * $XFree86: xc/programs/xfs/include/dispatch.h,v 1.2 1999/03/07 11:41:00 dawes Exp $ - */ - /************************************************************ Copyright 1998 by Thomas E. Dickey <dickey@clark.net> @@ -62,9 +58,6 @@ extern int ProcQueryXInfo (ClientPtr client); extern int ProcQueryXExtents (ClientPtr client); extern int ProcQueryXBitmaps (ClientPtr client); extern int ProcCloseFont (ClientPtr client); -#if 0 -extern void CloseDownClient (ClientPtr client); -#endif extern void InitProcVectors (void); extern void InitClient (ClientPtr client, int i, pointer ospriv); extern ClientPtr NextAvailableClient (pointer ospriv); diff --git a/app/xfs/include/extentst.h b/app/xfs/include/extentst.h index 48a5dca92..9010d877a 100644 --- a/app/xfs/include/extentst.h +++ b/app/xfs/include/extentst.h @@ -1,4 +1,3 @@ -/* $Xorg: extentst.h,v 1.4 2001/02/09 02:05:44 xorgcvs Exp $ */ /* Copyright 1987, 1998 The Open Group @@ -44,10 +43,7 @@ in this Software without prior written authorization from The Open Group. * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * @(#)extentst.h 4.1 91/05/02 - * */ -/* $XFree86: xc/programs/xfs/include/extentst.h,v 1.6 2001/12/14 20:01:38 dawes Exp $ */ #ifndef _EXTENTST_H_ #define _EXTENTST_H_ diff --git a/app/xfs/include/fsevents.h b/app/xfs/include/fsevents.h index 9ff03a565..3f4bc8e67 100644 --- a/app/xfs/include/fsevents.h +++ b/app/xfs/include/fsevents.h @@ -1,4 +1,3 @@ -/* $XConsortium: events.h,v 1.5 94/04/17 19:55:57 dpw Exp $ */ /* Copyright (c) 1987 X Consortium @@ -45,10 +44,7 @@ in this Software without prior written authorization from the X Consortium. * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * @(#)events.h 4.2 91/05/03 - * */ -/* $XFree86$ */ #ifndef _EVENTS_H_ #define _EVENTS_H_ diff --git a/app/xfs/include/fsresource.h b/app/xfs/include/fsresource.h index d68343eac..e003e8451 100644 --- a/app/xfs/include/fsresource.h +++ b/app/xfs/include/fsresource.h @@ -1,4 +1,3 @@ -/* $XConsortium: resource.h,v 1.4 94/04/17 19:56:00 dpw Exp $ */ /* Copyright (c) 1987 X Consortium @@ -45,10 +44,7 @@ in this Software without prior written authorization from the X Consortium. * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * @(#)resource.h 4.1 91/05/02 - * */ -/* $XFree86: xc/programs/xfs/include/fsresource.h,v 1.3 1998/10/25 12:48:04 dawes Exp $ */ #ifndef _RESOURCE_H_ #define _RESOURCE_H_ diff --git a/app/xfs/include/globals.h b/app/xfs/include/globals.h index 678a7d97b..1bcf01747 100644 --- a/app/xfs/include/globals.h +++ b/app/xfs/include/globals.h @@ -1,4 +1,3 @@ -/* $Xorg: globals.h,v 1.4 2001/02/09 02:05:44 xorgcvs Exp $ */ /* Copyright 1987, 1998 The Open Group @@ -44,14 +43,17 @@ in this Software without prior written authorization from The Open Group. * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * @(#)globals.h 4.2 91/05/03 - * */ #ifndef _GLOBALS_H_ #define _GLOBALS_H_ #include <X11/fonts/FSproto.h> /* for fsResolution */ +#include <X11/Xtrans/Xtrans.h> /* XtransConnInfo */ +#include <X11/fonts/font.h> /* FontPatternCachePtr */ +#include <X11/Xpoll.h> /* select & fd_set */ +#include "client.h" /* WorkQueuePtr */ +#include "misc.h" /* OldListenRec */ extern long TimeOutValue; extern long ReapClientTime; @@ -66,6 +68,43 @@ extern volatile char dispatchException; extern int argcGlobal; extern char **argvGlobal; +extern WorkQueuePtr workQueue; + +extern fd_set WellKnownConnections; +extern fd_set LastSelectMask; +extern fd_set WriteMask; +extern fd_set ClientsWithInput; +extern fd_set ClientsWriteBlocked; +extern fd_set AllSockets; +extern fd_set AllClients; +extern fd_set OutputPending; + +extern Bool AnyClientsWriteBlocked; +extern Bool NewOutputPending; + +extern int ConnectionTranslation[]; + +extern FontPatternCachePtr fontPatternCache; + +extern long LastReapTime; +extern Bool drone_server; +extern char *progname; +extern char *configfilename; + +extern XtransConnInfo *ListenTransConns; +extern int *ListenTransFds; +extern int ListenTransCount; + +extern OldListenRec *OldListen; +extern int OldListenCount; + +extern Bool portFromCmdline; + +extern char *ConnectionInfo; +extern int ConnInfoLen; + +extern long OutputBufferSize; + /* bit values for dispatchException */ #define DE_RESET 0x1 #define DE_TERMINATE 0x2 diff --git a/app/xfs/include/misc.h b/app/xfs/include/misc.h index 43d87338b..7224ac0e6 100644 --- a/app/xfs/include/misc.h +++ b/app/xfs/include/misc.h @@ -1,4 +1,3 @@ -/* $Xorg: misc.h,v 1.4 2001/02/09 02:05:44 xorgcvs Exp $ */ /* Copyright 1990, 1991, 1998 The Open Group @@ -43,7 +42,6 @@ in this Software without prior written authorization from The Open Group. * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF * THIS SOFTWARE. */ -/* $XFree86: xc/programs/xfs/include/misc.h,v 3.8 2001/07/25 15:05:21 dawes Exp $ */ #ifndef _MISC_H_ #define _MISC_H_ @@ -179,4 +177,7 @@ typedef struct { /* when cloning, need old transport info */ /* os/connection.c */ extern void CreateSockets(int old_listen_count, OldListenRec *old_listen); +/* os/xfstrans.c */ +extern OldListenRec *_FontTransGetInetdListenInfo (int fd); + #endif /* _MISC_H_ */ diff --git a/app/xfs/include/os.h b/app/xfs/include/os.h index e98778a5d..0ac4c4240 100644 --- a/app/xfs/include/os.h +++ b/app/xfs/include/os.h @@ -1,4 +1,3 @@ -/* $Xorg: os.h,v 1.5 2001/02/09 02:05:44 xorgcvs Exp $ */ /* Copyright 1987, 1998 The Open Group @@ -44,10 +43,7 @@ in this Software without prior written authorization from The Open Group. * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $NCDXorg: @(#)os.h,v 4.2 1991/05/10 07:59:16 lemke Exp $ - * */ -/* $XFree86: xc/programs/xfs/include/os.h,v 3.14 2002/10/15 01:45:03 dawes Exp $ */ #ifndef _OS_H_ #define _OS_H_ @@ -69,12 +65,6 @@ typedef pointer FID; #define MAX_REQUEST_SIZE 8192 -#ifdef SIGNALRETURNSINT -#define SIGVAL int -#else -#define SIGVAL void -#endif - #define fsalloc(size) FSalloc((unsigned long)size) #define fsrealloc(ptr, size) FSrealloc((pointer)ptr, (unsigned long)size) #define fsfree(ptr) FSfree((pointer)ptr) @@ -106,6 +96,7 @@ extern void StopListening(void); /* os/daemon.c */ extern void BecomeDaemon(void); +extern void DetachStdio(void); /* os/error.c */ extern void Error(char *str); @@ -137,11 +128,11 @@ extern int CloneMyself(void); extern void OsInit(void); /* os/utils.c */ -extern SIGVAL AutoResetServer (int n); -extern SIGVAL CleanupChild (int n); -extern SIGVAL GiveUp (int n); -extern SIGVAL ServerCacheFlush (int n); -extern SIGVAL ServerReconfig (int n); +extern void AutoResetServer (int n); +extern void CleanupChild (int n); +extern void GiveUp (int n); +extern void ServerCacheFlush (int n); +extern void ServerReconfig (int n); extern long GetTimeInMillis (void); extern pointer FSalloc(unsigned long); extern pointer FScalloc (unsigned long amount); diff --git a/app/xfs/include/osstruct.h b/app/xfs/include/osstruct.h index 686f4daa7..495b7daf6 100644 --- a/app/xfs/include/osstruct.h +++ b/app/xfs/include/osstruct.h @@ -1,4 +1,3 @@ -/* $Xorg: osstruct.h,v 1.4 2001/02/09 02:05:44 xorgcvs Exp $ */ /* Copyright 1987, 1998 The Open Group @@ -44,10 +43,7 @@ in this Software without prior written authorization from The Open Group. * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * @(#)osstruct.h 4.1 91/05/02 - * */ -/* $XFree86: xc/programs/xfs/include/osstruct.h,v 1.3 2001/07/29 22:08:16 tsi Exp $ */ #ifndef _OSSTRUCT_H_ #define _OSSTRUCT_H_ diff --git a/app/xfs/include/servermd.h b/app/xfs/include/servermd.h index ccd6629be..dd6004546 100644 --- a/app/xfs/include/servermd.h +++ b/app/xfs/include/servermd.h @@ -1,4 +1,3 @@ -/* $Xorg: servermd.h,v 1.6 2001/02/09 02:05:44 xorgcvs Exp $ */ /* Copyright 1987, 1998 The Open Group @@ -44,7 +43,6 @@ in this Software without prior written authorization from The Open Group. * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -/* $XFree86: xc/programs/xfs/include/servermd.h,v 1.4 2001/12/14 20:01:38 dawes Exp $ */ #ifndef _SERVERMD_H_ #define _SERVERMD_H_ diff --git a/app/xfs/include/site.h b/app/xfs/include/site.h index 41ebc15db..97d72b005 100644 --- a/app/xfs/include/site.h +++ b/app/xfs/include/site.h @@ -1,4 +1,3 @@ -/* $Xorg: site.h,v 1.4 2001/02/09 02:05:44 xorgcvs Exp $ */ /* Copyright 1987, 1998 The Open Group @@ -44,8 +43,6 @@ in this Software without prior written authorization from The Open Group. * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * @(#)site.h 4.3 91/05/06 - * */ #ifndef _SITE_H_ diff --git a/app/xfs/include/swaprep.h b/app/xfs/include/swaprep.h index ca911412d..e27562ee7 100644 --- a/app/xfs/include/swaprep.h +++ b/app/xfs/include/swaprep.h @@ -1,7 +1,3 @@ -/* - * $XFree86$ - */ - /************************************************************ Copyright 1998 by Thomas E. Dickey <dickey@clark.net> diff --git a/app/xfs/include/swapreq.h b/app/xfs/include/swapreq.h index b3d4e3d0c..19abfa2a8 100644 --- a/app/xfs/include/swapreq.h +++ b/app/xfs/include/swapreq.h @@ -1,7 +1,3 @@ -/* - * $XFree86: xc/programs/xfs/include/swapreq.h,v 1.1 1998/10/25 07:12:32 dawes Exp $ - */ - /************************************************************ Copyright 1998 by Thomas E. Dickey <dickey@clark.net> diff --git a/app/xfs/os/access.c b/app/xfs/os/access.c index c50072848..36c459cf3 100644 --- a/app/xfs/os/access.c +++ b/app/xfs/os/access.c @@ -1,4 +1,3 @@ -/* $Xorg: access.c,v 1.4 2001/02/09 02:05:44 xorgcvs Exp $ */ /* Copyright 1990, 1991, 1998 The Open Group @@ -43,68 +42,40 @@ in this Software without prior written authorization from The Open Group. * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF * THIS SOFTWARE. */ -/* $XFree86: xc/programs/xfs/os/access.c,v 3.7tsi Exp $ */ + +#include "xfs-config.h" #include <X11/Xos.h> -#ifndef Lynx #include <sys/param.h> #include <sys/socket.h> -#else -#include <socket.h> -#endif #include <netdb.h> #include <netinet/in.h> #include "clientstr.h" #include "misc.h" #include "site.h" -#include "accstr.h" #include "osdep.h" #include "osstruct.h" -#include "accstr.h" +#include "globals.h" +#include "access.h" long MaxClients = DEFAULT_CLIENT_LIMIT; void AccessSetConnectionLimit(int num) { - num++; /* take serverClient into account */ - if (num > MAXSOCKS) { + int newlim = num + 8; /* allow room for serverClient, logs, etc. */ + int maxfd = sysconf(_SC_OPEN_MAX) - 1; + + if ((maxfd < 0) || (maxfd > MAXSOCKS)) { + maxfd = MAXSOCKS; + } + if (newlim > maxfd) { ErrorF("Client limit of %d too high; using default of %d\n", num, DEFAULT_CLIENT_LIMIT); return; } - MaxClients = num; -} - -#ifdef NOTDEF -/* - * XXX - * - * needs massive amounts of OS-dependent work (big surprise) - * needs IPv6 support as well - */ -int -GetHostAddress(HostAddress *addr) -{ - char hname[64]; - struct hostent *hp; - - addr->addr_len = sizeof(struct in_addr); - addr->address = (pointer) fsalloc(addr->addr_len); - if (!addr->address) - return FSBadAlloc; - addr->type = HOST_AF_INET; - gethostname(hname, sizeof(hname)); - hp = gethostbyname(hname); - if (hp) { - memmove( (char *) addr->address, (char *) hp->h_addr, addr->addr_len); - } else { - fsfree((char *) addr->address); - return FSBadName; - } - return FSSuccess; + MaxClients = newlim; } -#endif /* ARGSUSED */ int diff --git a/app/xfs/os/config.c b/app/xfs/os/config.c index 1abf2afff..298dc2f30 100644 --- a/app/xfs/os/config.c +++ b/app/xfs/os/config.c @@ -1,4 +1,3 @@ -/* $Xorg: config.c,v 1.4 2001/02/09 02:05:44 xorgcvs Exp $ */ /* Copyright 1987, 1998 The Open Group @@ -44,12 +43,9 @@ in this Software without prior written authorization from The Open Group. * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $NCDXorg: @(#)config.c,v 4.6 1991/07/09 14:08:09 lemke Exp $ - * */ -/* $XFree86: xc/programs/xfs/os/config.c,v 3.15 2002/05/31 18:46:12 dawes Exp $ */ -#include <xfs-config.h> +#include "xfs-config.h" #include <stdio.h> #include <stdlib.h> @@ -68,6 +64,9 @@ in this Software without prior written authorization from The Open Group. #include <X11/fonts/fontutil.h> #include "difs.h" +/* libXfont/src/bitmap/snfstr.h */ +extern void SnfSetFormat(int bit, int byte, int glyph, int scan); + static const char * const default_config_files[] = { #ifdef DEFAULT_CONFIG_FILE DEFAULT_CONFIG_FILE, @@ -77,8 +76,6 @@ static const char * const default_config_files[] = { NULL }; -extern int portFromCmdline; - static char *font_catalogue = NULL; static char *config_set_int(ConfigOptionPtr parm, char *val); @@ -114,7 +111,7 @@ static ConfigOptionRec config_options[] = { {"snf-format", config_set_snf_format}, {"trusted-clients", config_set_list}, {"use-syslog", config_set_bool}, - {(char *) 0, 0}, + {NULL, NULL}, }; char *ConfigErrors[] = { @@ -195,7 +192,7 @@ match_param_name(char *name) } pos = ((high + low) >> 1); } - return 0; + return NULL; } static int @@ -334,7 +331,7 @@ char *__XFSRedirRoot(char *fname) int ReadConfigFile(const char *filename) { - FILE *fp; + FILE *fp = NULL; int ret; int len; int i; @@ -359,8 +356,12 @@ ReadConfigFile(const char *filename) #ifdef __UNIXOS2__ filename = __XFSRedirRoot(filename); #endif - if ((fp = fopen(filename, "r")) != NULL) + if ((fp = fopen(filename, "r")) != NULL) { + if (configfilename == NULL) { + configfilename = strdup(filename); /* save for clones */ + } break; + } } if (fp == NULL) { for (i = 0; default_config_files[i] != NULL; i++) { diff --git a/app/xfs/os/config.h b/app/xfs/os/config.h index ba6db45cb..1a4de08a4 100644 --- a/app/xfs/os/config.h +++ b/app/xfs/os/config.h @@ -1,4 +1,3 @@ -/* $Xorg: config.h,v 1.4 2001/02/09 02:05:44 xorgcvs Exp $ */ /* Copyright 1987, 1998 The Open Group @@ -44,8 +43,6 @@ in this Software without prior written authorization from The Open Group. * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * @(#)config.h 4.1 91/05/02 - * */ #ifndef _CONFIG_H_ diff --git a/app/xfs/os/configstr.h b/app/xfs/os/configstr.h index 9c1a8afa1..0d55e2325 100644 --- a/app/xfs/os/configstr.h +++ b/app/xfs/os/configstr.h @@ -1,4 +1,3 @@ -/* $Xorg: configstr.h,v 1.4 2001/02/09 02:05:44 xorgcvs Exp $ */ /* Copyright 1987, 1998 The Open Group @@ -44,10 +43,7 @@ in this Software without prior written authorization from The Open Group. * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * @(#)configstr.h 4.1 91/05/02 - * */ -/* $XFree86: xc/programs/xfs/os/configstr.h,v 1.4 2001/01/17 23:45:32 dawes Exp $ */ #ifndef _CONFIGSTR_H_ #define _CONFIGSTR_H_ #include "config.h" diff --git a/app/xfs/os/connection.c b/app/xfs/os/connection.c index 2035312c7..bc35a6066 100644 --- a/app/xfs/os/connection.c +++ b/app/xfs/os/connection.c @@ -1,4 +1,3 @@ -/* $Xorg: connection.c,v 1.5 2001/02/09 02:05:44 xorgcvs Exp $ */ /* * handles connections */ @@ -67,7 +66,8 @@ in this Software without prior written authorization from The Open Group. * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF * THIS SOFTWARE. */ -/* $XFree86: xc/programs/xfs/os/connection.c,v 3.25tsi Exp $ */ + +#include "xfs-config.h" #include <stdlib.h> #include <X11/Xtrans/Xtrans.h> @@ -76,16 +76,11 @@ in this Software without prior written authorization from The Open Group. #include <stdio.h> #include <errno.h> #include <X11/Xos.h> -#ifndef Lynx #include <sys/param.h> #include <sys/socket.h> #ifndef __UNIXOS2__ #include <sys/uio.h> #endif -#else -#include <socket.h> -#include <uio.h> -#endif #include <signal.h> #include <X11/fonts/FS.h> @@ -161,6 +156,7 @@ StopListening(void) ListenTransFds = NULL; ListenTransConns = NULL; + ListenTransCount = 0; } /* @@ -172,6 +168,7 @@ void CreateSockets(int old_listen_count, OldListenRec *old_listen) { int i; + struct sigaction act; FD_ZERO(&AllSockets); FD_ZERO(&AllClients); @@ -182,20 +179,9 @@ CreateSockets(int old_listen_count, OldListenRec *old_listen) for (i = 0; i < MAXSOCKS; i++) ConnectionTranslation[i] = 0; -#ifdef XNO_SYSCONF /* should only be on FreeBSD 1.x and NetBSD 0.x */ -#undef _SC_OPEN_MAX -#endif -#ifdef _SC_OPEN_MAX lastfdesc = sysconf(_SC_OPEN_MAX) - 1; -#else -#if defined(hpux) || defined(__UNIXOS2__) - lastfdesc = _NFILE - 1; -#else - lastfdesc = getdtablesize() - 1; -#endif /* hpux */ -#endif - if (lastfdesc > MAXSOCKS) { + if ((lastfdesc < 0) || (lastfdesc > MAXSOCKS)) { lastfdesc = MAXSOCKS; } @@ -261,13 +247,17 @@ CreateSockets(int old_listen_count, OldListenRec *old_listen) FatalError("cannot establish any listening sockets\n"); /* set up all the signal handlers */ - signal(SIGPIPE, SIG_IGN); - signal(SIGHUP, AutoResetServer); - signal(SIGINT, GiveUp); - signal(SIGTERM, GiveUp); - signal(SIGUSR1, ServerReconfig); - signal(SIGUSR2, ServerCacheFlush); - signal(SIGCHLD, CleanupChild); + sigemptyset(&act.sa_mask); + act.sa_flags = SA_RESTART; +#define HANDLE_SIGNAL(s, h) act.sa_handler = h; sigaction(s, &act, NULL) + + HANDLE_SIGNAL(SIGPIPE, SIG_IGN); + HANDLE_SIGNAL(SIGHUP, AutoResetServer); + HANDLE_SIGNAL(SIGINT, GiveUp); + HANDLE_SIGNAL(SIGTERM, GiveUp); + HANDLE_SIGNAL(SIGUSR1, ServerReconfig); + HANDLE_SIGNAL(SIGUSR2, ServerCacheFlush); + HANDLE_SIGNAL(SIGCHLD, CleanupChild); XFD_COPYSET (&WellKnownConnections, &AllSockets); } @@ -480,6 +470,9 @@ CloseDownConnection(ClientPtr client) { OsCommPtr oc = (OsCommPtr) client->osPrivate; + if (oc == NULL) + return; + if (oc->output && oc->output->count) FlushClient(client, oc, (char *) NULL, 0, 0); ConnectionTranslation[oc->fd] = 0; diff --git a/app/xfs/os/daemon.c b/app/xfs/os/daemon.c index 2b23de328..e1f826ee0 100644 --- a/app/xfs/os/daemon.c +++ b/app/xfs/os/daemon.c @@ -27,81 +27,33 @@ other dealings in this Software without prior written authorization from the X Consortium. */ -/* $XFree86: xc/programs/xfs/os/daemon.c,v 1.12 2002/10/20 21:42:50 tsi Exp $ */ + +#include "xfs-config.h" #include <X11/Xos.h> #include <sys/types.h> #include <errno.h> #include <stdlib.h> -#if defined(USG) -# include <termios.h> -#else -# include <sys/ioctl.h> -#endif -#ifdef hpux -# include <sys/ptyio.h> -#endif - -#ifdef X_NOT_POSIX -# define Pid_t int -#else -# define Pid_t pid_t -#endif - #include "os.h" -#if defined(__GLIBC__) || defined(CSRG_BASED) -#define HAS_DAEMON -#endif - -#ifndef X_NOT_POSIX -#define HAS_SETSID -#endif - -#ifndef HAS_SETSID - -#define setsid() MySetsid() - -static Pid_t -MySetsid(void) -{ -#if defined(TIOCNOTTY) || defined(TCCLRCTTY) || defined(TIOCTTY) - int fd; -#endif - int stat; - - fd = open("/dev/tty", O_RDWR); - if (fd >= 0) { -#if defined(USG) && defined(TCCLRCTTY) - int zero = 0; - (void) ioctl (fd, TCCLRCTTY, &zero); -#elif (defined(SYSV) || defined(SVR4)) && defined(TIOCTTY) - int zero = 0; - (void) ioctl (i, TIOCTTY, &zero); -#elif defined(TIOCNOTTY) - (void) ioctl (i, TIOCNOTTY, (char *) 0); /* detach, BSD style */ -#endif - close(fd); - } - -#if defined(SYSV) || defined(__QNXNTO__) - return setpgrp(); -#else - return setpgid(0, getpid()); -#endif -} - -#endif /* !HAS_SETSID */ - - /* detach */ void -BecomeDaemon () +BecomeDaemon (void) { /* If our C library has the daemon() function, just use it. */ -#ifdef HAS_DAEMON - daemon (0, 0); +#ifdef HAVE_DAEMON + if (daemon (0, 0) < 0) { + /* error */ + FatalError("daemon() failed, %s\n", strerror(errno)); + } + + /* Open/reopen log file on stderr */ +#ifdef USE_SYSLOG + if (!UseSyslog) +#endif + CloseErrors(); + InitErrors(); #else switch (fork()) { @@ -123,6 +75,14 @@ BecomeDaemon () chdir("/"); + DetachStdio(); +#endif /* HAVE_DAEMON */ +} + +void +DetachStdio (void) +{ + int nullfd; close (0); close (1); close (2); @@ -130,9 +90,21 @@ BecomeDaemon () /* * Set up the standard file descriptors. */ - (void) open ("/dev/null", O_RDWR); - (void) dup2 (0, 1); - (void) dup2 (0, 2); + nullfd = open ("/dev/null", O_RDWR); + if (nullfd != 0) { + dup2(nullfd, 0); + close(nullfd); + } + dup2 (0, 1); + +#ifdef USE_SYSLOG + if (UseSyslog) { + dup2 (0, 2); + return; + } +#endif -#endif /* HAS_DAEMON */ + /* open/reopen log file on stderr */ + CloseErrors(); + InitErrors(); } diff --git a/app/xfs/os/error.c b/app/xfs/os/error.c index 8c72a657c..d078f640c 100644 --- a/app/xfs/os/error.c +++ b/app/xfs/os/error.c @@ -1,4 +1,3 @@ -/* $Xorg: error.c,v 1.4 2001/02/09 02:05:44 xorgcvs Exp $ */ /* * error message handling */ @@ -44,33 +43,14 @@ in this Software without prior written authorization from The Open Group. * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF * THIS SOFTWARE. */ -/* $XFree86: error.c,v 1.11 2002/10/15 01:45:03 dawes Exp $ */ + +#include "xfs-config.h" #include <stdio.h> #include <stdlib.h> #include <stdarg.h> #include <X11/Xos.h> -#ifndef X_NOT_POSIX -#ifdef _POSIX_SOURCE -#include <limits.h> -#else -#define _POSIX_SOURCE -#include <limits.h> -#undef _POSIX_SOURCE -#endif -#endif -#ifndef PATH_MAX -#include <sys/param.h> -#ifndef PATH_MAX -#ifdef MAXPATHLEN -#define PATH_MAX MAXPATHLEN -#else -#define PATH_MAX 1024 -#endif -#endif -#endif - #ifdef USE_SYSLOG #include <syslog.h> #endif @@ -78,13 +58,11 @@ in this Software without prior written authorization from The Open Group. #include <errno.h> #include "misc.h" - -extern char *progname; +#include "globals.h" +#include "osdep.h" Bool UseSyslog; -#ifdef USE_SYSLOG Bool log_open = FALSE; -#endif char ErrorFile[PATH_MAX]; static char CurrentErrorFile[PATH_MAX]; @@ -113,11 +91,13 @@ InitErrors(void) } #endif - if (ErrorFile[0] && strcmp(CurrentErrorFile, ErrorFile) != 0) { - i = creat(ErrorFile, 0666); + if (ErrorFile[0] && + (!log_open || (strcmp(CurrentErrorFile, ErrorFile) != 0)) ) { + i = open(ErrorFile, O_WRONLY | O_APPEND | O_CREAT, 0666); if (i != -1) { dup2(i, 2); close(i); + log_open = TRUE; } else { ErrorF("can't open error file \"%s\"\n", ErrorFile); } @@ -128,13 +108,26 @@ InitErrors(void) void CloseErrors(void) { + int nullfd; + + if (!log_open) + return; + + log_open = FALSE; + #ifdef USE_SYSLOG if (UseSyslog) { closelog(); - log_open = FALSE; return; } #endif + + close (2); + nullfd = open ("/dev/null", O_RDWR); + if (nullfd != 2) { + dup2 (nullfd, 2); + close(nullfd); + } } void diff --git a/app/xfs/os/io.c b/app/xfs/os/io.c index a5603e24f..13c7fe47e 100644 --- a/app/xfs/os/io.c +++ b/app/xfs/os/io.c @@ -1,4 +1,3 @@ -/* $Xorg: io.c,v 1.5 2001/02/09 02:05:44 xorgcvs Exp $ */ /* * i/o functions */ @@ -46,20 +45,17 @@ in this Software without prior written authorization from The Open Group. * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF * THIS SOFTWARE. */ -/* $XFree86: xc/programs/xfs/os/io.c,v 3.18 2001/12/14 20:01:41 dawes Exp $ */ + +#include "xfs-config.h" #include <X11/Xtrans/Xtrans.h> #include <stdio.h> #include <errno.h> #include <sys/types.h> -#ifndef Lynx #include <sys/param.h> #ifndef __UNIXOS2__ #include <sys/uio.h> #endif -#else -#include <uio.h> -#endif #include <X11/fonts/FSproto.h> #include "clientstr.h" @@ -85,18 +81,6 @@ in this Software without prior written authorization from The Open Group. #endif - -extern fd_set ClientsWithInput; -extern fd_set ClientsWriteBlocked; -extern fd_set OutputPending; - -extern long OutputBufferSize; - -extern int ConnectionTranslation[]; - -extern Bool AnyClientsWriteBlocked; -extern Bool NewOutputPending; - static int timesThisConnection = 0; static ConnectionInputPtr FreeInputs = (ConnectionInputPtr) NULL; static ConnectionOutputPtr FreeOutputs = (ConnectionOutputPtr) NULL; @@ -628,7 +612,7 @@ AllocateInputBuffer(void) fsfree(oci); return (ConnectionInputPtr) NULL; } - oci->next = 0; + oci->next = NULL; oci->size = BUFSIZE; oci->bufptr = oci->buffer; oci->bufcnt = 0; diff --git a/app/xfs/os/osdep.h b/app/xfs/os/osdep.h index 4b07b283e..d8799bec3 100644 --- a/app/xfs/os/osdep.h +++ b/app/xfs/os/osdep.h @@ -1,4 +1,3 @@ -/* $Xorg: osdep.h,v 1.4 2001/02/09 02:05:44 xorgcvs Exp $ */ /* Copyright 1987, 1998 The Open Group @@ -44,10 +43,7 @@ in this Software without prior written authorization from The Open Group. * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * @(#)osdep.h 4.1 5/2/91 - * */ -/* $XFree86: xc/programs/xfs/os/osdep.h,v 3.11 2001/12/14 20:01:41 dawes Exp $ */ #ifndef _OSDEP_H_ #define _OSDEP_H_ @@ -57,53 +53,26 @@ in this Software without prior written authorization from The Open Group. #define BUFWATERMARK 8192 #define MAXBUFSIZE (1 << 15) -#ifndef sgi /* SGI defines OPEN_MAX in a useless way */ -#ifndef X_NOT_POSIX #ifdef _POSIX_SOURCE -#include <limits.h> +# include <limits.h> #else -#define _POSIX_SOURCE -#include <limits.h> -#undef _POSIX_SOURCE -#endif -#endif +# define _POSIX_SOURCE +# include <limits.h> +# undef _POSIX_SOURCE #endif - -#ifndef OPEN_MAX -#if defined(__UNIXOS2__) || defined(__QNX__) -#define OPEN_MAX 256 -#else -#ifdef SVR4 -#define OPEN_MAX 128 -#else #include <sys/param.h> -#ifdef __GNU__ -#define OPEN_MAX (sysconf(_SC_OPEN_MAX)) -#endif /*__GNU__*/ -#ifndef OPEN_MAX -#ifdef SCO325 -#define OPEN_MAX (sysconf(_SC_OPEN_MAX)) -#else -#if defined(NOFILE) && !defined(NOFILES_MAX) -#define OPEN_MAX NOFILE -#else -#define OPEN_MAX NOFILES_MAX -#endif -#endif -#endif -#endif -#endif -#endif -#if defined(__GNU__) || defined(SCO325) -#define MAXSOCKS 128 -#else /*__GNU__*/ -#if OPEN_MAX <= 128 /* 128 is value of MAXCLIENTS */ -#define MAXSOCKS (OPEN_MAX - 1) -#else -#define MAXSOCKS 128 -#endif -#endif /*__GNU__*/ +#ifndef PATH_MAX +# ifndef PATH_MAX +# ifdef MAXPATHLEN +# define PATH_MAX MAXPATHLEN +# else +# define PATH_MAX 1024 +# endif +# endif +#endif /* PATH_MAX */ + +#define MAXSOCKS MAXCLIENTS #include <stddef.h> diff --git a/app/xfs/os/osglue.c b/app/xfs/os/osglue.c index e1e9ef239..bcfce2f1f 100644 --- a/app/xfs/os/osglue.c +++ b/app/xfs/os/osglue.c @@ -1,4 +1,3 @@ -/* $Xorg: osglue.c,v 1.4 2001/02/09 02:05:44 xorgcvs Exp $ */ /* Copyright 1987, 1998 The Open Group @@ -44,10 +43,7 @@ in this Software without prior written authorization from The Open Group. * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $NCDXorg: @(#)osglue.c,v 4.6 1991/07/09 14:07:30 lemke Exp $ - * */ -/* $XFree86: xc/programs/xfs/os/osglue.c,v 3.18 2002/10/15 01:45:03 dawes Exp $ */ /* * this is miscellaneous OS specific stuff. @@ -55,6 +51,8 @@ in this Software without prior written authorization from The Open Group. * Catalogue support, alternate servers, and cloneing */ +#include "xfs-config.h" + #include <X11/Xtrans/Xtrans.h> #include "osstruct.h" #include <stdio.h> @@ -64,18 +62,14 @@ in this Software without prior written authorization from The Open Group. #ifdef __UNIXOS2__ #define _NFILE 256 #endif +#include "globals.h" +#include "osdep.h" Bool drone_server = FALSE; -extern char *progname; -extern char *configfilename; static int num_alts; static AlternateServerPtr alt_servers = (AlternateServerPtr) 0; -extern XtransConnInfo *ListenTransConns; -extern int *ListenTransFds; -extern int ListenTransCount; - /* * XXX * @@ -301,18 +295,10 @@ CloneMyself(void) old_listen_arg[0] = '\0'; -#ifdef XNO_SYSCONF /* should only be on FreeBSD 1.x and NetBSD 0.x */ -#undef _SC_OPEN_MAX -#endif -#ifdef _SC_OPEN_MAX lastfdesc = sysconf(_SC_OPEN_MAX) - 1; -#else -#if defined(hpux) || defined(__UNIXOS2__) - lastfdesc = _NFILE - 1; -#else - lastfdesc = getdtablesize() - 1; -#endif /* hpux */ -#endif + if ( (lastfdesc < 0) || (lastfdesc > MAXSOCKS)) { + lastfdesc = MAXSOCKS; + } NoticeF("attempting clone...\n"); chdir("/"); diff --git a/app/xfs/os/osinit.c b/app/xfs/os/osinit.c index a12bb002d..dcefe2877 100644 --- a/app/xfs/os/osinit.c +++ b/app/xfs/os/osinit.c @@ -1,4 +1,3 @@ -/* $Xorg: osinit.c,v 1.4 2001/02/09 02:05:45 xorgcvs Exp $ */ /* * os init code */ @@ -47,14 +46,12 @@ in this Software without prior written authorization from The Open Group. * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * @(#)osinit.c 4.3 5/7/91 - * */ -/* $XFree86: xc/programs/xfs/os/osinit.c,v 1.4 2001/01/17 23:45:33 dawes Exp $ */ -#include "os.h" +#include "xfs-config.h" -extern long LastReapTime; +#include "os.h" +#include "globals.h" void OsInit(void) diff --git a/app/xfs/os/utils.c b/app/xfs/os/utils.c index 5ee8b6e94..7714e7533 100644 --- a/app/xfs/os/utils.c +++ b/app/xfs/os/utils.c @@ -1,4 +1,3 @@ -/* $Xorg: utils.c,v 1.4 2001/02/09 02:05:45 xorgcvs Exp $ */ /* * misc os utilities */ @@ -46,7 +45,8 @@ in this Software without prior written authorization from The Open Group. * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF * THIS SOFTWARE. */ -/* $XFree86: xc/programs/xfs/os/utils.c,v 3.20 2002/10/15 01:45:03 dawes Exp $ */ + +#include "xfs-config.h" #include <stdio.h> #include <X11/Xos.h> @@ -54,9 +54,6 @@ in this Software without prior written authorization from The Open Group. #include "misc.h" #include "globals.h" #include <signal.h> -#ifdef MEMBUG -#include <util/memleak/memleak.h> -#endif #include <sys/wait.h> #include <unistd.h> #include <pwd.h> @@ -65,40 +62,19 @@ in this Software without prior written authorization from The Open Group. #include <sys/types.h> #include <errno.h> #include <string.h> - -#ifndef X_NOT_POSIX -#ifdef _POSIX_SOURCE -#include <limits.h> -#else -#define _POSIX_SOURCE -#include <limits.h> -#undef _POSIX_SOURCE -#endif -#endif /* X_NOT_POSIX */ -#ifndef PATH_MAX -#include <sys/param.h> -#ifndef PATH_MAX -#ifdef MAXPATHLEN -#define PATH_MAX MAXPATHLEN -#else -#define PATH_MAX 1024 -#endif -#endif -#endif /* PATH_MAX */ - -#if defined(X_NOT_POSIX) && (defined(SYSV) || defined(SVR4)) -#define SIGNALS_RESET_WHEN_CAUGHT -#endif +#include "osdep.h" #include <stdlib.h> -extern char *configfilename; static Bool dropPriv = FALSE; /* whether or not to drop root privileges */ #ifdef DEFAULT_DAEMON static Bool becomeDaemon = TRUE; /* whether to become a daemon or not */ #else static Bool becomeDaemon = FALSE; /* whether to become a daemon or not */ #endif +#ifdef XFS_INETD +static Bool runFromInetd = FALSE; /* whether we were run from inetd or not */ +#endif static const char *userId = NULL; char *progname; Bool CloneSelf; @@ -107,11 +83,10 @@ Bool portFromCmdline = FALSE; OldListenRec *OldListen = NULL; int OldListenCount = 0; -#ifdef STDERR_FILENO -# define WRITES write(STDERR_FILENO, s, strlen(s)) -#else -# define WRITES write(fileno(stderr), s, strlen(s)) +#ifndef STDERR_FILENO +# define STDERR_FILENO fileno(stderr) #endif +#define WRITES(s) write(STDERR_FILENO, s, strlen(s)) static char *pidFile = XFSPIDDIR "/xfs.pid"; static int pidFd; @@ -119,7 +94,7 @@ static FILE *pidFilePtr; static int StorePid (void); /* ARGSUSED */ -SIGVAL +void AutoResetServer(int n) { int olderrno = errno; @@ -131,14 +106,11 @@ AutoResetServer(int n) dispatchException |= DE_RESET; isItTimeToYield = TRUE; -#ifdef SIGNALS_RESET_WHEN_CAUGHT - signal(SIGHUP, AutoResetServer); -#endif errno = olderrno; } /* ARGSUSED */ -SIGVAL +void GiveUp(int n) { int olderrno = errno; @@ -152,7 +124,7 @@ GiveUp(int n) } /* ARGSUSED */ -SIGVAL +void ServerReconfig(int n) { int olderrno = errno; @@ -164,14 +136,11 @@ ServerReconfig(int n) dispatchException |= DE_RECONFIG; isItTimeToYield = TRUE; -#ifdef SIGNALS_RESET_WHEN_CAUGHT - signal(SIGUSR1, ServerReconfig); -#endif errno = olderrno; } /* ARGSUSED */ -SIGVAL +void ServerCacheFlush(int n) { int olderrno = errno; @@ -183,27 +152,29 @@ ServerCacheFlush(int n) dispatchException |= DE_FLUSH; isItTimeToYield = TRUE; -#ifdef SIGNALS_RESET_WHEN_CAUGHT - signal(SIGUSR2, ServerCacheFlush); -#endif errno = olderrno; } /* ARGSUSED */ -SIGVAL +void CleanupChild(int n) { int olderrno = errno; + pid_t child; #ifdef DEBUG WRITES("got a child signal\n"); #endif - wait(NULL); + while ( (child = waitpid((pid_t)-1, NULL, WNOHANG)) > 0 ) { +#ifdef DEBUG + char msgbuf[64]; -#ifdef SIGNALS_RESET_WHEN_CAUGHT - signal(SIGCHLD, CleanupChild); + snprintf(msgbuf, sizeof(msgbuf), " child %d exited\n", child); + WRITES(msgbuf); #endif + } + errno = olderrno; } @@ -227,9 +198,7 @@ usage(void) void OsInitAllocator (void) { -#ifdef MEMBUG - CheckMemory (); -#endif + return; } @@ -339,6 +308,13 @@ ProcessCmdLine(int argc, char **argv) becomeDaemon = TRUE; } else if (!strcmp(argv[i], "-nodaemon")) { becomeDaemon = FALSE; + } else if (!strcmp(argv[i], "-inetd")) { +#ifdef XFS_INETD + runFromInetd = TRUE; +#else + FatalError("-inetd specified, but xfs was not built" + " with inetd support\n"); +#endif } else if (!strcmp(argv[i], "-user")) { if (argv[i + 1]) userId = argv[++i]; @@ -350,16 +326,6 @@ ProcessCmdLine(int argc, char **argv) else usage(); } -#ifdef MEMBUG - else if ( strcmp( argv[i], "-alloc") == 0) - { - extern unsigned long MemoryFail; - if(++i < argc) - MemoryFail = atoi(argv[i]); - else - usage (); - } -#endif else usage(); } @@ -370,11 +336,6 @@ ProcessCmdLine(int argc, char **argv) unsigned long Must_have_memory; -#ifdef MEMBUG -#define MEM_FAIL_SCALE 100000 -unsigned long MemoryFail; - -#endif /* FSalloc -- FS's internal memory allocator. Why does it return unsigned * int * instead of the more common char *? Well, if you read K&R you'll @@ -399,16 +360,8 @@ FSalloc (unsigned long amount) amount++; /* aligned extra on long word boundary */ amount = (amount + 3) & ~3; -#ifdef MEMBUG - if (!Must_have_memory && MemoryFail && - ((random() % MEM_FAIL_SCALE) < MemoryFail)) - return 0; - if (ptr = (pointer)fmalloc(amount)) - return ptr; -#else if ((ptr = (pointer)malloc(amount)) != 0) return ptr; -#endif if (Must_have_memory) FatalError("out of memory\n"); return 0; @@ -436,14 +389,6 @@ FScalloc (unsigned long amount) pointer FSrealloc (pointer ptr, unsigned long amount) { -#ifdef MEMBUG - if (!Must_have_memory && MemoryFail && - ((random() % MEM_FAIL_SCALE) < MemoryFail)) - return 0; - ptr = (pointer)frealloc((char *) ptr, amount); - if (ptr) - return ptr; -#else if ((long)amount <= 0) { if (ptr && !amount) @@ -457,7 +402,6 @@ FSrealloc (pointer ptr, unsigned long amount) ptr = (pointer)malloc(amount); if (ptr) return ptr; -#endif if (Must_have_memory) FatalError("out of memory\n"); return 0; @@ -471,13 +415,8 @@ FSrealloc (pointer ptr, unsigned long amount) void FSfree(pointer ptr) { -#ifdef MEMBUG - if (ptr) - ffree((char *)ptr); -#else if (ptr) free((char *)ptr); -#endif } #endif /* SPECIAL_MALLOC */ @@ -525,6 +464,36 @@ SetDaemonState(void) { int oldpid; +#ifdef XFS_INETD + if (runFromInetd) { + int inetdListener; + + /* fd's 0, 1, & 2 are the initial listen socket provided by inetd, + * so dup it and then clear them so stdin/out/err aren't in use. + */ + inetdListener = dup(0); + if (inetdListener == -1) { + FatalError("failed to dup inetd socket: %s\n", + strerror(errno)); + } + DetachStdio(); + + /* Setup & pass the inetd socket back through the connection setup + * code the same way as a cloned listening port + */ + OldListenCount = 1; + OldListen = _FontTransGetInetdListenInfo (inetdListener); + if (OldListen == NULL) { + FatalError("failed to initialize OldListen to inetd socket: %s\n", + strerror(errno)); + } + ListenPort = OldListen[0].portnum; + NoticeF("accepting listener from inetd on fd %d, port %d\n", + inetdListener, ListenPort); + return; + } +#endif /* XFS_INETD */ + if (becomeDaemon) { BecomeDaemon(); if ((oldpid = StorePid ())) { diff --git a/app/xfs/os/waitfor.c b/app/xfs/os/waitfor.c index 09e30c87c..1a29a974f 100644 --- a/app/xfs/os/waitfor.c +++ b/app/xfs/os/waitfor.c @@ -1,4 +1,3 @@ -/* $Xorg: waitfor.c,v 1.4 2001/02/09 02:05:45 xorgcvs Exp $ */ /* * waits for input */ @@ -47,18 +46,15 @@ in this Software without prior written authorization from The Open Group. * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $NCDXorg: @(#)waitfor.c,v 4.5 1991/06/24 11:59:20 lemke Exp $ - * */ -/* $XFree86: xc/programs/xfs/os/waitfor.c,v 3.15 2001/12/14 20:01:41 dawes Exp $ */ + +#include "xfs-config.h" #include <X11/Xos.h> /* strings, time, etc */ #include <stdio.h> #include <errno.h> -#if !defined(Lynx) #include <sys/param.h> -#endif #include "clientstr.h" #include "globals.h" @@ -70,24 +66,24 @@ in this Software without prior written authorization from The Open Group. #define select(n,r,w,x,t) os2PseudoSelect(n,r,w,x,t) #endif -extern WorkQueuePtr workQueue; - +long LastReapTime; -extern fd_set WellKnownConnections; -extern fd_set LastSelectMask; -extern fd_set WriteMask; -extern fd_set ClientsWithInput; -extern fd_set ClientsWriteBlocked; -extern fd_set AllSockets; -extern fd_set AllClients; -extern fd_set OutputPending; +/* like ffs, but uses fd_mask instead of int as argument, so it works + when fd_mask is longer than an int, such as common 64-bit platforms */ +static inline int +xfd_ffs(fd_mask mask) +{ + int i; -extern Bool AnyClientsWriteBlocked; -extern Bool NewOutputPending; + if (!mask) return 0; -extern int ConnectionTranslation[]; + for (i = 1; !(mask & 1); i++) + { + mask >>= 1; + } + return i; +} -long LastReapTime; /* * wait_for_something @@ -198,7 +194,7 @@ WaitForSomething(int *pClientsReady) current_time = GetTimeInMillis(); for (i = 0; i < howmany(XFD_SETSIZE, NFDBITS); i++) { while (clientsReadable.fds_bits[i]) { - curclient = ffs(clientsReadable.fds_bits[i]) - 1; + curclient = xfd_ffs(clientsReadable.fds_bits[i]) - 1; conn = ConnectionTranslation[curclient + (i << 5)]; clientsReadable.fds_bits[i] &= ~(((fd_mask)1L) << curclient); client = clients[conn]; @@ -207,25 +203,14 @@ WaitForSomething(int *pClientsReady) pClientsReady[nready++] = conn; client->last_request_time = current_time; client->clientGone = CLIENT_ALIVE; + + if (nready >= MaxClients) { + /* pClientsReady buffer has no more room, get the + rest on the next time through select() loop */ + return nready; + } } } } return nready; } - -#if 0 -/* - * This is not always a macro - */ -int -ANYSET(long *src) -{ - int i; - - for (i = 0; i < howmany(XFD_SETSIZE, NFDBITS); i++) - if (src[i]) - return (1); - return (0); -} - -#endif diff --git a/app/xfs/os/xfstrans.c b/app/xfs/os/xfstrans.c index f74a23a6b..b24e7ec0a 100644 --- a/app/xfs/os/xfstrans.c +++ b/app/xfs/os/xfstrans.c @@ -1,5 +1,5 @@ /* - * $Id: xfstrans.c,v 1.2 2008/06/13 21:00:36 matthieu Exp $ + * $Id: xfstrans.c,v 1.3 2009/10/10 10:12:49 matthieu Exp $ * * Copyright © 2003 Keith Packard * @@ -24,8 +24,79 @@ #include <xfs-config.h> -#define FONT_t -#define TRANS_REOPEN -#define TRANS_SERVER +#define FONT_t 1 +#define TRANS_REOPEN 1 +#define TRANS_SERVER 1 #include <X11/Xtrans/transport.c> + +#ifdef XFS_INETD +/* xfs special handling for listen socket passed from inetd */ +#include "misc.h" + +OldListenRec * +TRANS(GetInetdListenInfo) (int fd) +{ + char *port = "0"; + XtransConnInfo inetdCI; + OldListenRec *old_listen; + int portnum; + + /* Create a XtransConnInfo struct for this connection */ + inetdCI = TRANS(ReopenCOTSServer)(TRANS_SOCKET_TCP_INDEX, fd, port); + + /* Fill in correct address/portnum */ + TRANS(SocketINETGetAddr)(inetdCI); +#ifdef AF_INET6 + if ( ((struct sockaddr *)(inetdCI->addr))->sa_family == AF_INET6 ) + portnum = ntohs(((struct sockaddr_in6 *)(inetdCI->addr))->sin6_port); + else +#endif + portnum = ntohs(((struct sockaddr_in *)(inetdCI->addr))->sin_port); + inetdCI->port = xalloc(6); /* Base 10 integer <= 65535 + trailing NUL */ + snprintf(inetdCI->port, 6, "%d", portnum); + + /* Do the socket setup that xtrans normally takes care of in + * TRANS(SocketOpen) && TRANS(SocketCreateListener) + */ + { + /* + * turn off TCP coalescence for INET sockets + */ + + int tmp = 1; + setsockopt (fd, IPPROTO_TCP, TCP_NODELAY, + (char *) &tmp, sizeof (int)); + } +#ifdef SO_DONTLINGER + setsockopt (fd, SOL_SOCKET, SO_DONTLINGER, NULL, 0); +#else +# ifdef SO_LINGER + { + static int linger[2] = { 0, 0 }; + setsockopt (fd, SOL_SOCKET, SO_LINGER, + (char *) linger, sizeof (linger)); + } +# endif +#endif + + if (listen (fd, BACKLOG) < 0) + { + FatalError("listen() failed on inetd socket: %s\n", + strerror(errno)); + } + + /* Pass the inetd socket back through the connection setup code + * the same way as a cloned listening port + */ + old_listen = malloc (sizeof (OldListenRec)); + if (old_listen != NULL) { + TRANS(GetReopenInfo)(inetdCI, &(old_listen->trans_id), + &(old_listen->fd), &port); + + old_listen->portnum = portnum; + } + + return old_listen; +} +#endif /* XFS_INETD */ diff --git a/app/xfs/xfs-config.h.in b/app/xfs/xfs-config.h.in index b44d4b4d8..fad2ea47d 100644 --- a/app/xfs/xfs-config.h.in +++ b/app/xfs/xfs-config.h.in @@ -6,9 +6,15 @@ /* comma-separated list of strings for config file paths when not specified */ #undef DEFAULT_CONFIG_FILE +/* Define to 1 if you have the `daemon' function. */ +#undef HAVE_DAEMON + /* Define to 1 if you have the <inttypes.h> header file. */ #undef HAVE_INTTYPES_H +/* Define to 1 if you have the `ws2_32' library (-lws2_32). */ +#undef HAVE_LIBWS2_32 + /* Define to 1 if you have the <memory.h> header file. */ #undef HAVE_MEMORY_H @@ -81,5 +87,43 @@ /* Support UNIX socket connections */ #undef UNIXCONN +/* Build support for logging via syslog */ +#undef USE_SYSLOG + /* Version number of package */ #undef VERSION + +/* Build support for starting from inetd */ +#undef XFS_INETD + +/* Define to 1 if on MINIX. */ +#undef _MINIX + +/* Define to 2 if the system does not provide POSIX.1 features except with + this defined. */ +#undef _POSIX_1_SOURCE + +/* Define to 1 if you need to in order for `stat' and other things to work. */ +#undef _POSIX_SOURCE + +/* Enable extensions on AIX 3, Interix. */ +#ifndef _ALL_SOURCE +# undef _ALL_SOURCE +#endif +/* Enable GNU extensions on systems that have them. */ +#ifndef _GNU_SOURCE +# undef _GNU_SOURCE +#endif +/* Enable threading extensions on Solaris. */ +#ifndef _POSIX_PTHREAD_SEMANTICS +# undef _POSIX_PTHREAD_SEMANTICS +#endif +/* Enable extensions on HP NonStop. */ +#ifndef _TANDEM_SOURCE +# undef _TANDEM_SOURCE +#endif +/* Enable general extensions on Solaris. */ +#ifndef __EXTENSIONS__ +# undef __EXTENSIONS__ +#endif + diff --git a/app/xfs/xfs.man b/app/xfs/xfs.man index 4f71ce2e4..8e582f973 100644 --- a/app/xfs/xfs.man +++ b/app/xfs/xfs.man @@ -1,4 +1,3 @@ -.\" $XFree86: xc/programs/xfs/xfs.man,v 3.15 2001/04/18 16:13:22 dawes Exp $ .\" .\" Copyright 1991, 1998 The Open Group .\" @@ -36,7 +35,6 @@ .\" no representations about the .\" suitability of this software for any purpose. It is provided "as is" .\" without express or implied warranty. -.\" $Xorg: xfs.man,v 1.4 2001/02/09 02:05:42 xorgcvs Exp $ .TH xfs __appmansuffix__ __xorgversion__ .SH NAME xfs \- X font server @@ -52,6 +50,9 @@ xfs \- X font server .B \-droppriv ] [ +.B \-inetd +] +[ .BI "\-ls " listen_socket ] [ @@ -68,7 +69,9 @@ xfs \- X font server is the X Window System font server. It supplies fonts to X Window System display servers. The server is usually run by a system administrator, and started via -.BR init (__adminmansuffix__). +.BR init (__adminmansuffix__) +or +.BR inetd (__adminmansuffix__). Users may also wish to start private font servers for specific sets of fonts. .PP @@ -83,7 +86,8 @@ specifies the configuration file .B xfs will use. If this parameter is not specified, xfs will read its configuration from -__configfiledesc__ \fI__configfilepath__\fR. +__configfiledesc__ +.IR __configfilepath__ . .TP .B \-daemon instructs @@ -118,6 +122,16 @@ By default, .B xfs runs with the user and group IDs of the user who invoked it. .TP +.B \-inetd +informs +.B xfs +that it is being started by inetd, and that a listening socket on the +appropriate port is being passed as standard input. Assumes that inetd +is configured to "wait" mode, and will thus allow xfs to handle +listening for and accepting further connections on this port. This allows +xfs to be started on demand when the first font client connects. +When using this option, the -daemon and -port flags are ignored. +.TP .BI "\-ls " listen_socket specifies a file descriptor which is already set up to be used as the listen socket. @@ -297,9 +311,9 @@ XCOMM Look for fonts in the following directories. The first is a set of XCOMM TrueType outlines, the second is a set of misc bitmaps (such as terminal XCOMM and cursor fonts), and the last is a set of 100dpi bitmaps. XCOMM -catalogue = /usr/X11R6/lib/X11/fonts/TTF, - /usr/X11R6/lib/X11/fonts/misc, - /usr/X11R6/lib/X11/fonts/100dpi/ +catalogue = /usr/share/X11/fonts/TTF, + /usr/share/X11/fonts/misc, + /usr/share/X11/fonts/100dpi/ XCOMM in 12 points, decipoints default\-point\-size = 120 @@ -316,9 +330,10 @@ use\-syslog = off .SH "OUTPUT FILES" When operating in daemon mode, .B xfs -sends diagnostic messages (errors and warnings) to the system log via the -.B syslog -C library function by default. +sends diagnostic messages (errors and warnings) to the log file +specified by the +.B error-file +configuration variable by default. However, these messages can be sent to an alternate location via the .B error\-file and @@ -368,6 +383,7 @@ Keith Packard, Massachusetts Institute of Technology .BR xfsinfo (__appmansuffix__), .BR fslsfonts (__appmansuffix__), .BR init (__adminmansuffix__), +.BR inetd (__adminmansuffix__), .BR syslog (__libmansuffix__), .IR "The X Font Service Protocol" , .I Font Server Implementation Overview |