summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2010-11-01 08:52:29 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2010-11-01 08:52:29 +0000
commitc11896e1fb9593e2e35dfa6efa7a90b30ff8fbaa (patch)
tree24f4d07010ac45a0aa7a82edc3d97b7c11c0d855 /app
parent4a712f215d0f98b1a7431bf73c3b6dce5f0124f3 (diff)
Update to xinit 1.3.0
Diffstat (limited to 'app')
-rw-r--r--app/xinit/ChangeLog237
-rw-r--r--app/xinit/Makefile.am2
-rw-r--r--app/xinit/Makefile.in6
-rw-r--r--app/xinit/aclocal.m4182
-rw-r--r--app/xinit/compile143
-rw-r--r--app/xinit/config.h.in30
-rw-r--r--app/xinit/configure1876
-rw-r--r--app/xinit/configure.ac22
-rw-r--r--app/xinit/startx.cmd80
-rw-r--r--app/xinit/startx.cpp18
-rw-r--r--app/xinit/xinit.c1164
-rw-r--r--app/xinit/xinit.def4
-rw-r--r--app/xinit/xinitrc.cmd61
13 files changed, 875 insertions, 2950 deletions
diff --git a/app/xinit/ChangeLog b/app/xinit/ChangeLog
index c1757d7f5..47e3a86c7 100644
--- a/app/xinit/ChangeLog
+++ b/app/xinit/ChangeLog
@@ -1,3 +1,240 @@
+commit cc92823c61f9f4d31a25d107017198d1e16d4fcf
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Sat Oct 30 16:44:22 2010 -0700
+
+ xinit 1.3.0
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit b5ff96271ebf30422f0a4af487ba9b35ce9c2e80
+Author: Alan Coopersmith <alan.coopersmith@oracle.com>
+Date: Thu Sep 23 20:26:42 2010 -0700
+
+ config: Remove unnecessary calls from configure.ac
+
+ AC_PROG_CC, AC_PROG_SED, & AC_PROG_INSTALL are provided by
+ XORG_DEFAULT_OPTIONS 1.8
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 4afe755b28f48390b16d16434cd14a756ef464ce
+Author: Gaetan Nadon <memsize@videotron.ca>
+Date: Tue Jul 20 18:45:18 2010 -0400
+
+ config: update AC_PREREQ statement to 2.60
+
+ Unrelated to the previous patches, the new value simply reflects
+ the reality that the minimum level for autoconf to configure
+ all x.org modules is 2.60 dated June 2006.
+
+ ftp://ftp.gnu.org/gnu/autoconf/autoconf-2.60.tar.gz
+
+ Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
+
+commit d15d988eaf63d4f840d09ba12caade6bea5f7618
+Author: Jeremy Huddleston <jeremyhu@apple.com>
+Date: Mon Jul 12 16:55:03 2010 -0700
+
+ launchd: Explicitly search /sbin
+
+ Previously, launchd wasn't found if /sbin wasn't in the user's PATH.
+ https://bugs.freedesktop.org/show_bug.cgi?id=29028
+
+ Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
+
+commit 908273df8c0a7a13ff20e4ed4b7b470521f12ce2
+Author: David Shao <davshao@gmail.com>
+Date: Fri May 21 12:44:53 2010 -0700
+
+ DragonFly BSD: includes for PRIO_PROCESS and setpriority() in xinit.c
+
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 8464a8ab360b72f6817b19ce99b12f0793fbee74
+Author: Jeremy Huddleston <jeremyhu@apple.com>
+Date: Mon May 3 00:25:30 2010 -0700
+
+ darwin: Make __APPLE__ path in startx POSIX compliant
+
+ http://xquartz.macosforge.org/trac/ticket/399
+
+ Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
+
+commit e4548fe62d58d7cb891dc142c400c22031d471fb
+Author: Mikhail Gusarov <dottedmag@dottedmag.net>
+Date: Sun Apr 25 03:21:43 2010 +0700
+
+ Remove OS/2 leftovers
+
+ Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit c82295911409c611c097ef2e1269a78d54314304
+Author: Jeremy Huddleston <jeremyhu@apple.com>
+Date: Thu Apr 15 11:40:33 2010 -0700
+
+ Enable support for an xinitrc.d directory
+
+ This was already done on darwin and Gentoo. Now others can benefit.
+
+ Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
+ Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
+ Reviewed-by: RĂ©mi Cardona <remi@gentoo.org>
+ Reviewed-by: James Cloos <cloos@jhcloos.com>
+
+commit 7f9d31e6342ffe5f2903fb2f4e5d3a1e4e5ed1df
+Author: Mikhail Gusarov <dottedmag@dottedmag.net>
+Date: Wed Apr 14 03:03:29 2010 +0700
+
+ Rationalize errors output
+
+ Implement Errorx/Fatalx in addition to existing Error/Fatal, replace
+ all fprintf(stderr)/exit with Fatal, all fprintf(stderr) with Error.
+
+ Additionally harmonize capitalization and punctuation of error messages.
+
+ Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 3676185a3e3bf1e57362ed4978825d9d6d53592c
+Author: Mikhail Gusarov <dottedmag@dottedmag.net>
+Date: Wed Apr 14 03:03:28 2010 +0700
+
+ Fix comment indentation
+
+ Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit c0f6753d2de16826300a04232e54fbd3aa54c406
+Author: Mikhail Gusarov <dottedmag@dottedmag.net>
+Date: Wed Apr 14 03:03:27 2010 +0700
+
+ Use signals from Unix98 and drop pre-POSIX compatibility
+
+ Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 15cf3d560ab5b6847d8891208080ac964c1682fb
+Author: Mikhail Gusarov <dottedmag@dottedmag.net>
+Date: Wed Apr 14 03:03:26 2010 +0700
+
+ Use sigaction(2) instead of signal(2) to handle SIGUSR1 and SIGALRM
+
+ Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit fa009dcc191e1d70937e5fb4dd8ae8d9c151a607
+Author: Mikhail Gusarov <dottedmag@dottedmag.net>
+Date: Wed Apr 14 03:03:25 2010 +0700
+
+ sys/wait.h is in Unix98
+
+ Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit a13649f91f3856040f53c47d14a2cccff943c702
+Author: Mikhail Gusarov <dottedmag@dottedmag.net>
+Date: Wed Apr 14 03:03:24 2010 +0700
+
+ setpriority and PRIO_PROCESS are in Unix98
+
+ Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 598cb2f5e433014b02eec6270a73bcb95cd7b15a
+Author: Mikhail Gusarov <dottedmag@dottedmag.net>
+Date: Wed Apr 14 03:03:23 2010 +0700
+
+ SIGTT{IN,OU} is in Unix98
+
+ Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit ce5aa4e7a30bff3207695b9ce8cbdcd56ff7b36c
+Author: Mikhail Gusarov <dottedmag@dottedmag.net>
+Date: Wed Apr 14 03:03:22 2010 +0700
+
+ SIGCHLD is in Unix98
+
+ Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit d12f1f2dd625f507cf8a504854dad0a9efd86259
+Author: Mikhail Gusarov <dottedmag@dottedmag.net>
+Date: Wed Apr 14 03:03:21 2010 +0700
+
+ killpg(2) is in Unix98
+
+ Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 36e3f13a32c8ced264d666f1091db7e1bb523e86
+Author: Mikhail Gusarov <dottedmag@dottedmag.net>
+Date: Wed Apr 14 03:03:20 2010 +0700
+
+ waitpid(2) is in Unix98
+
+ Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 63ba277c694104b3f01d0a1adee7903631607694
+Author: Mikhail Gusarov <dottedmag@dottedmag.net>
+Date: Wed Apr 14 03:03:19 2010 +0700
+
+ Use EXIT_{SUCCESS, FAILURE} from C90 instead of homegrown equivalents
+
+ Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit a63c31f74e1c11509b561ab9687138f5c960df0f
+Author: Mikhail Gusarov <dottedmag@dottedmag.net>
+Date: Wed Apr 14 03:03:18 2010 +0700
+
+ Stop converting functions' return types to void
+
+ Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 5dea0c1caaeb0d7f1280fd28c80c3c1bc10c34d0
+Author: Mikhail Gusarov <dottedmag@dottedmag.net>
+Date: Wed Apr 14 03:03:17 2010 +0700
+
+ Simplify environment juggling by using fork() instead of vfork()
+
+ xinit used to copy process environment in order to give client correct DISPLAY
+ and WINDOWPATH variables. It was not possible to do it in client process because
+ it was vforked, not forked.
+
+ As vfork() usage was not entirely correct (manpage specifies that behaviour is
+ undefined if there are any memory modifications between vfork and exec), switch
+ to fork(), move setting environment variables to client process and and drop all
+ the manual mucking with environment.
+
+ Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 2df4ba3b0ef40cefcac2774e042dad0d2df17424
+Author: Mikhail Gusarov <dottedmag@dottedmag.net>
+Date: Wed Apr 14 03:03:16 2010 +0700
+
+ Fix whitespace
+
+ File was indented with mix of 8-space and tab symbols and inconsistently
+ formatted. Apply more-or-less consistent formatting and reindent everything to
+ 4-space.
+
+ Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
+commit 0ffa7f2402ae06371aa09a513798a4400b5727c0
+Author: Mikhail Gusarov <dottedmag@dottedmag.net>
+Date: Wed Mar 31 18:15:03 2010 +0700
+
+ Nuke OS/2 and LynxOS support remnants.
+
+ Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
+ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
+
commit eb541d73b35716e1deaccc3c328473e04a5ef024
Author: Jeremy Huddleston <jeremyhu@freedesktop.org>
Date: Mon Mar 15 15:41:48 2010 -0700
diff --git a/app/xinit/Makefile.am b/app/xinit/Makefile.am
index 42b25f0e8..d0eac0796 100644
--- a/app/xinit/Makefile.am
+++ b/app/xinit/Makefile.am
@@ -78,7 +78,7 @@ MAINTAINERCLEANFILES = ChangeLog INSTALL
CLEANFILES = xinitrc startx $(appman_DATA) $(launchagents_DATA)
EXTRA_DIST = xinitrc.cpp startx.cpp org.x.startx.plist.cpp $(appman_PRE) \
- startx.cmd xinitrc.cmd xinit.def autogen.sh
+ autogen.sh
.PHONY: ChangeLog INSTALL
diff --git a/app/xinit/Makefile.in b/app/xinit/Makefile.in
index 8b7db38a6..cf10864f0 100644
--- a/app/xinit/Makefile.in
+++ b/app/xinit/Makefile.in
@@ -70,8 +70,8 @@ bin_PROGRAMS = xinit$(EXEEXT)
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
$(top_srcdir)/configure $(top_srcdir)/cpprules.in AUTHORS \
- COPYING ChangeLog INSTALL NEWS compile config.guess config.sub \
- depcomp install-sh missing
+ 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)/configure.ac
@@ -337,7 +337,7 @@ xinitrc_DATA = xinitrc
MAINTAINERCLEANFILES = ChangeLog INSTALL
CLEANFILES = xinitrc startx $(appman_DATA) $(launchagents_DATA)
EXTRA_DIST = xinitrc.cpp startx.cpp org.x.startx.plist.cpp $(appman_PRE) \
- startx.cmd xinitrc.cmd xinit.def autogen.sh
+ autogen.sh
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
diff --git a/app/xinit/aclocal.m4 b/app/xinit/aclocal.m4
index 39fc2accc..3f71a4321 100644
--- a/app/xinit/aclocal.m4
+++ b/app/xinit/aclocal.m4
@@ -740,34 +740,6 @@ AC_MSG_RESULT([$_am_result])
rm -f confinc confmf
])
-# Copyright (C) 1999, 2000, 2001, 2003, 2005 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 3
-
-# AM_PROG_CC_C_O
-# --------------
-# Like AC_PROG_CC_C_O, but changed for automake.
-AC_DEFUN([AM_PROG_CC_C_O],
-[AC_REQUIRE([AC_PROG_CC_C_O])dnl
-AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-# FIXME: we rely on the cache variable name because
-# there is no other way.
-set dummy $CC
-ac_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
-if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
- # Losing compiler, so override with the script.
- # FIXME: It is wrong to rewrite CC.
- # But if we don't then we get into trouble of one sort or another.
- # A longer-term fix would be to have automake use am__CC in this case,
- # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
- CC="$am_aux_dir/compile $CC"
-fi
-])
-
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
@@ -1025,7 +997,7 @@ AC_SUBST([am__untar])
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 Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
dnl
dnl Permission is hereby granted, free of charge, to any person obtaining a
dnl copy of this software and associated documentation files (the "Software"),
@@ -1062,7 +1034,7 @@ dnl DEALINGS IN THE SOFTWARE.
# See the "minimum version" comment for each macro you use to see what
# version you require.
m4_defun([XORG_MACROS_VERSION],[
-m4_define([vers_have], [1.8.0])
+m4_define([vers_have], [1.11.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,,
@@ -1213,6 +1185,7 @@ MAN_SUBSTS="\
-e 's|__xservername__|Xorg|g' \
-e 's|__xconfigfile__|xorg.conf|g' \
-e 's|__projectroot__|\$(prefix)|g' \
+ -e 's|__apploaddir__|\$(appdefaultdir)|g' \
-e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
-e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
-e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
@@ -1241,13 +1214,20 @@ PKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])],
fi])
])
+# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing
+# the path and the name of the doc stylesheet
if test "x$XORG_SGML_PATH" != "x" ; then
AC_MSG_RESULT([$XORG_SGML_PATH])
+ STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11
+ XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl
else
AC_MSG_RESULT([no])
fi
AC_SUBST(XORG_SGML_PATH)
+AC_SUBST(STYLESHEET_SRCDIR)
+AC_SUBST(XSL_STYLESHEET)
+AM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"])
]) # XORG_CHECK_SGML_DOCTOOLS
# XORG_CHECK_LINUXDOC
@@ -1363,15 +1343,17 @@ AC_SUBST(MAKE_PDF)
AC_SUBST(MAKE_HTML)
]) # XORG_CHECK_DOCBOOK
-# XORG_WITH_XMLTO([MIN-VERSION])
+# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT])
# ----------------
# Minimum version: 1.5.0
+# Minimum version for optional DEFAULT argument: 1.11.0
#
# Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-xmlto option, it allows maximum flexibilty in making decisions
-# as whether or not to use the xmlto package.
+# as whether or not to use the xmlto package. When DEFAULT is not specified,
+# --with-xmlto assumes 'auto'.
#
# Interface to module:
# HAVE_XMLTO: used in makefiles to conditionally generate documentation
@@ -1380,14 +1362,20 @@ AC_SUBST(MAKE_HTML)
# --with-xmlto: 'yes' user instructs the module to use xmlto
# 'no' user instructs the module not to use xmlto
#
+# Added in version 1.10.0
+# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation
+# xmlto for text output requires either lynx, links, or w3m browsers
+#
# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
#
AC_DEFUN([XORG_WITH_XMLTO],[
AC_ARG_VAR([XMLTO], [Path to xmlto command])
+m4_define([_defopt], m4_default([$2], [auto]))
AC_ARG_WITH(xmlto,
AS_HELP_STRING([--with-xmlto],
- [Use xmlto to regenerate documentation (default: yes, if installed)]),
- [use_xmlto=$withval], [use_xmlto=auto])
+ [Use xmlto to regenerate documentation (default: ]_defopt[)]),
+ [use_xmlto=$withval], [use_xmlto=]_defopt)
+m4_undefine([_defopt])
if test "x$use_xmlto" = x"auto"; then
AC_PATH_PROG([XMLTO], [xmlto])
@@ -1411,6 +1399,8 @@ elif test "x$use_xmlto" = x"no" ; then
else
AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
fi
+
+# Test for a minimum version of xmlto, if provided.
m4_ifval([$1],
[if test "$have_xmlto" = yes; then
# scrape the xmlto version
@@ -1425,18 +1415,31 @@ m4_ifval([$1],
AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed])
fi])
fi])
+
+# Test for the ability of xmlto to generate a text target
+have_xmlto_text=no
+cat > conftest.xml << "EOF"
+EOF
+AS_IF([test "$have_xmlto" = yes],
+ [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
+ [have_xmlto_text=yes],
+ [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])
+rm -f conftest.xml
+AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
]) # XORG_WITH_XMLTO
-# XORG_WITH_ASCIIDOC([MIN-VERSION])
+# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT])
# ----------------
# Minimum version: 1.5.0
+# Minimum version for optional DEFAULT argument: 1.11.0
#
# Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-asciidoc option, it allows maximum flexibilty in making decisions
-# as whether or not to use the asciidoc package.
+# as whether or not to use the asciidoc package. When DEFAULT is not specified,
+# --with-asciidoc assumes 'auto'.
#
# Interface to module:
# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
@@ -1449,10 +1452,12 @@ AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
#
AC_DEFUN([XORG_WITH_ASCIIDOC],[
AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
+m4_define([_defopt], m4_default([$2], [auto]))
AC_ARG_WITH(asciidoc,
AS_HELP_STRING([--with-asciidoc],
- [Use asciidoc to regenerate documentation (default: yes, if installed)]),
- [use_asciidoc=$withval], [use_asciidoc=auto])
+ [Use asciidoc to regenerate documentation (default: ]_defopt[)]),
+ [use_asciidoc=$withval], [use_asciidoc=]_defopt)
+m4_undefine([_defopt])
if test "x$use_asciidoc" = x"auto"; then
AC_PATH_PROG([ASCIIDOC], [asciidoc])
@@ -1493,15 +1498,17 @@ fi])
AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
]) # XORG_WITH_ASCIIDOC
-# XORG_WITH_DOXYGEN([MIN-VERSION])
+# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT])
# --------------------------------
# Minimum version: 1.5.0
+# Minimum version for optional DEFAULT argument: 1.11.0
#
# Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-doxygen option, it allows maximum flexibilty in making decisions
-# as whether or not to use the doxygen package.
+# as whether or not to use the doxygen package. When DEFAULT is not specified,
+# --with-doxygen assumes 'auto'.
#
# Interface to module:
# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
@@ -1514,10 +1521,12 @@ AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
#
AC_DEFUN([XORG_WITH_DOXYGEN],[
AC_ARG_VAR([DOXYGEN], [Path to doxygen command])
+m4_define([_defopt], m4_default([$2], [auto]))
AC_ARG_WITH(doxygen,
AS_HELP_STRING([--with-doxygen],
- [Use doxygen to regenerate documentation (default: yes, if installed)]),
- [use_doxygen=$withval], [use_doxygen=auto])
+ [Use doxygen to regenerate documentation (default: ]_defopt[)]),
+ [use_doxygen=$withval], [use_doxygen=]_defopt)
+m4_undefine([_defopt])
if test "x$use_doxygen" = x"auto"; then
AC_PATH_PROG([DOXYGEN], [doxygen])
@@ -1558,15 +1567,17 @@ fi])
AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
]) # XORG_WITH_DOXYGEN
-# XORG_WITH_GROFF
+# XORG_WITH_GROFF([DEFAULT])
# ----------------
# Minimum version: 1.6.0
+# Minimum version for optional DEFAULT argument: 1.11.0
#
# Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-groff option, it allows maximum flexibilty in making decisions
-# as whether or not to use the groff package.
+# as whether or not to use the groff package. When DEFAULT is not specified,
+# --with-groff assumes 'auto'.
#
# Interface to module:
# HAVE_GROFF: used in makefiles to conditionally generate documentation
@@ -1577,6 +1588,12 @@ AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
# --with-groff: 'yes' user instructs the module to use groff
# 'no' user instructs the module not to use groff
#
+# Added in version 1.9.0:
+# HAVE_GROFF_HTML: groff has dependencies to output HTML format:
+# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package.
+# psselect from the psutils package.
+# the ghostcript package. Refer to the grohtml man pages
+#
# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path.
#
# OS and distros often splits groff in a basic and full package, the former
@@ -1589,10 +1606,12 @@ AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
#
AC_DEFUN([XORG_WITH_GROFF],[
AC_ARG_VAR([GROFF], [Path to groff command])
+m4_define([_defopt], m4_default([$1], [auto]))
AC_ARG_WITH(groff,
AS_HELP_STRING([--with-groff],
- [Use groff to regenerate documentation (default: yes, if installed)]),
- [use_groff=$withval], [use_groff=auto])
+ [Use groff to regenerate documentation (default: ]_defopt[)]),
+ [use_groff=$withval], [use_groff=]_defopt)
+m4_undefine([_defopt])
if test "x$use_groff" = x"auto"; then
AC_PATH_PROG([GROFF], [groff])
@@ -1616,6 +1635,7 @@ elif test "x$use_groff" = x"no" ; then
else
AC_MSG_ERROR([--with-groff expects 'yes' or 'no'])
fi
+
# We have groff, test for the presence of the macro packages
if test "x$have_groff" = x"yes"; then
AC_MSG_CHECKING([for ${GROFF} -ms macros])
@@ -1633,20 +1653,38 @@ if test "x$have_groff" = x"yes"; then
fi
AC_MSG_RESULT([$groff_mm_works])
fi
+
+# We have groff, test for HTML dependencies, one command per package
+if test "x$have_groff" = x"yes"; then
+ AC_PATH_PROGS(GS_PATH, [gs gswin32c])
+ AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng])
+ AC_PATH_PROG(PSSELECT_PATH, [psselect])
+ if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then
+ have_groff_html=yes
+ else
+ have_groff_html=no
+ AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages])
+ fi
+fi
+
+# Set Automake conditionals for Makefiles
AM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes])
AM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes])
AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
+AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
]) # XORG_WITH_GROFF
-# XORG_WITH_FOP
+# XORG_WITH_FOP([DEFAULT])
# ----------------
# Minimum version: 1.6.0
+# Minimum version for optional DEFAULT argument: 1.11.0
#
# Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-fop option, it allows maximum flexibilty in making decisions
-# as whether or not to use the fop package.
+# as whether or not to use the fop package. When DEFAULT is not specified,
+# --with-fop assumes 'auto'.
#
# Interface to module:
# HAVE_FOP: used in makefiles to conditionally generate documentation
@@ -1659,10 +1697,12 @@ AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
#
AC_DEFUN([XORG_WITH_FOP],[
AC_ARG_VAR([FOP], [Path to fop command])
+m4_define([_defopt], m4_default([$1], [auto]))
AC_ARG_WITH(fop,
AS_HELP_STRING([--with-fop],
- [Use fop to regenerate documentation (default: yes, if installed)]),
- [use_fop=$withval], [use_fop=auto])
+ [Use fop to regenerate documentation (default: ]_defopt[)]),
+ [use_fop=$withval], [use_fop=]_defopt)
+m4_undefine([_defopt])
if test "x$use_fop" = x"auto"; then
AC_PATH_PROG([FOP], [fop])
@@ -1689,15 +1729,17 @@ fi
AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
]) # XORG_WITH_FOP
-# XORG_WITH_PS2PDF
+# XORG_WITH_PS2PDF([DEFAULT])
# ----------------
# Minimum version: 1.6.0
+# Minimum version for optional DEFAULT argument: 1.11.0
#
# Documentation tools are not always available on all platforms and sometimes
# not at the appropriate level. This macro enables a module to test for the
# presence of the tool and obtain it's path in separate variables. Coupled with
# the --with-ps2pdf option, it allows maximum flexibilty in making decisions
-# as whether or not to use the ps2pdf package.
+# as whether or not to use the ps2pdf package. When DEFAULT is not specified,
+# --with-ps2pdf assumes 'auto'.
#
# Interface to module:
# HAVE_PS2PDF: used in makefiles to conditionally generate documentation
@@ -1710,10 +1752,12 @@ AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
#
AC_DEFUN([XORG_WITH_PS2PDF],[
AC_ARG_VAR([PS2PDF], [Path to ps2pdf command])
+m4_define([_defopt], m4_default([$1], [auto]))
AC_ARG_WITH(ps2pdf,
AS_HELP_STRING([--with-ps2pdf],
- [Use ps2pdf to regenerate documentation (default: yes, if installed)]),
- [use_ps2pdf=$withval], [use_ps2pdf=auto])
+ [Use ps2pdf to regenerate documentation (default: ]_defopt[)]),
+ [use_ps2pdf=$withval], [use_ps2pdf=]_defopt)
+m4_undefine([_defopt])
if test "x$use_ps2pdf" = x"auto"; then
AC_PATH_PROG([PS2PDF], [ps2pdf])
@@ -1764,14 +1808,12 @@ AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
# parm1: specify the default value, yes or no.
#
AC_DEFUN([XORG_ENABLE_DOCS],[
-default=$1
-if test "x$default" = x ; then
- default="yes"
-fi
+m4_define([default], m4_default([$1], [yes]))
AC_ARG_ENABLE(docs,
AS_HELP_STRING([--enable-docs],
- [Enable building the documentation (default: yes)]),
- [build_docs=$enableval], [build_docs=$default])
+ [Enable building the documentation (default: ]default[)]),
+ [build_docs=$enableval], [build_docs=]default)
+m4_undefine([default])
AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
AC_MSG_CHECKING([whether to build documentation])
AC_MSG_RESULT([$build_docs])
@@ -1799,14 +1841,12 @@ AC_MSG_RESULT([$build_docs])
# parm1: specify the default value, yes or no.
#
AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[
-devel_default=$1
-if test "x$devel_default" = x ; then
- devel_default="yes"
-fi
+m4_define([devel_default], m4_default([$1], [yes]))
AC_ARG_ENABLE(devel-docs,
AS_HELP_STRING([--enable-devel-docs],
- [Enable building the developer documentation (default: yes)]),
- [build_devel_docs=$enableval], [build_devel_docs=$devel_default])
+ [Enable building the developer documentation (default: ]devel_default[)]),
+ [build_devel_docs=$enableval], [build_devel_docs=]devel_default)
+m4_undefine([devel_default])
AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
AC_MSG_CHECKING([whether to build developer documentation])
AC_MSG_RESULT([$build_devel_docs])
@@ -1834,14 +1874,12 @@ AC_MSG_RESULT([$build_devel_docs])
# parm1: specify the default value, yes or no.
#
AC_DEFUN([XORG_ENABLE_SPECS],[
-spec_default=$1
-if test "x$spec_default" = x ; then
- spec_default="yes"
-fi
+m4_define([spec_default], m4_default([$1], [yes]))
AC_ARG_ENABLE(specs,
AS_HELP_STRING([--enable-specs],
- [Enable building the specs (default: yes)]),
- [build_specs=$enableval], [build_specs=$spec_default])
+ [Enable building the specs (default: ]spec_default[)]),
+ [build_specs=$enableval], [build_specs=]spec_default)
+m4_undefine([spec_default])
AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
AC_MSG_CHECKING([whether to build functional specifications])
AC_MSG_RESULT([$build_specs])
diff --git a/app/xinit/compile b/app/xinit/compile
deleted file mode 100644
index c0096a7b5..000000000
--- a/app/xinit/compile
+++ /dev/null
@@ -1,143 +0,0 @@
-#! /bin/sh
-# Wrapper for compilers which do not understand `-c -o'.
-
-scriptversion=2009-10-06.20; # UTC
-
-# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009 Free Software
-# Foundation, Inc.
-# Written by Tom Tromey <tromey@cygnus.com>.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# This file is maintained in Automake, please report
-# bugs to <bug-automake@gnu.org> or send patches to
-# <automake-patches@gnu.org>.
-
-case $1 in
- '')
- echo "$0: No command. Try \`$0 --help' for more information." 1>&2
- exit 1;
- ;;
- -h | --h*)
- cat <<\EOF
-Usage: compile [--help] [--version] PROGRAM [ARGS]
-
-Wrapper for compilers which do not understand `-c -o'.
-Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
-arguments, and rename the output as expected.
-
-If you are trying to build a whole package this is not the
-right script to run: please start by reading the file `INSTALL'.
-
-Report bugs to <bug-automake@gnu.org>.
-EOF
- exit $?
- ;;
- -v | --v*)
- echo "compile $scriptversion"
- exit $?
- ;;
-esac
-
-ofile=
-cfile=
-eat=
-
-for arg
-do
- if test -n "$eat"; then
- eat=
- else
- case $1 in
- -o)
- # configure might choose to run compile as `compile cc -o foo foo.c'.
- # So we strip `-o arg' only if arg is an object.
- eat=1
- case $2 in
- *.o | *.obj)
- ofile=$2
- ;;
- *)
- set x "$@" -o "$2"
- shift
- ;;
- esac
- ;;
- *.c)
- cfile=$1
- set x "$@" "$1"
- shift
- ;;
- *)
- set x "$@" "$1"
- shift
- ;;
- esac
- fi
- shift
-done
-
-if test -z "$ofile" || test -z "$cfile"; then
- # If no `-o' option was seen then we might have been invoked from a
- # pattern rule where we don't need one. That is ok -- this is a
- # normal compilation that the losing compiler can handle. If no
- # `.c' file was seen then we are probably linking. That is also
- # ok.
- exec "$@"
-fi
-
-# Name of file we expect compiler to create.
-cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
-
-# Create the lock directory.
-# Note: use `[/\\:.-]' here to ensure that we don't use the same name
-# that we are using for the .o file. Also, base the name on the expected
-# object file name, since that is what matters with a parallel build.
-lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
-while true; do
- if mkdir "$lockdir" >/dev/null 2>&1; then
- break
- fi
- sleep 1
-done
-# FIXME: race condition here if user kills between mkdir and trap.
-trap "rmdir '$lockdir'; exit 1" 1 2 15
-
-# Run the compile.
-"$@"
-ret=$?
-
-if test -f "$cofile"; then
- test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
-elif test -f "${cofile}bj"; then
- test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
-fi
-
-rmdir "$lockdir"
-exit $ret
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
-# time-stamp-end: "; # UTC"
-# End:
diff --git a/app/xinit/config.h.in b/app/xinit/config.h.in
index 47ae34c39..f016d5a2a 100644
--- a/app/xinit/config.h.in
+++ b/app/xinit/config.h.in
@@ -1,14 +1,8 @@
/* config.h.in. Generated from configure.ac by autoheader. */
-/* Define to 1 if you have the `fork' function. */
-#undef HAVE_FORK
-
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
-/* Define to 1 if you have the `killpg' function. */
-#undef HAVE_KILLPG
-
/* launchd support available */
#undef HAVE_LAUNCHD
@@ -36,24 +30,9 @@
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
-/* Define to 1 if you have the `vfork' function. */
-#undef HAVE_VFORK
-
-/* Define to 1 if you have the <vfork.h> header file. */
-#undef HAVE_VFORK_H
-
-/* Define to 1 if `fork' works. */
-#undef HAVE_WORKING_FORK
-
-/* Define to 1 if `vfork' works. */
-#undef HAVE_WORKING_VFORK
-
/* Prefix to use for launchd identifiers */
#undef LAUNCHD_ID_PREFIX
-/* Define to 1 if your C compiler doesn't accept -c and -o together. */
-#undef NO_MINUS_C_MINUS_O
-
/* Name of package */
#undef PACKAGE
@@ -81,17 +60,8 @@
/* Patch version of this package */
#undef PACKAGE_VERSION_PATCHLEVEL
-/* Define as the return type of signal handlers (`int' or `void'). */
-#undef RETSIGTYPE
-
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Version number of package */
#undef VERSION
-
-/* Define to `int' if <sys/types.h> does not define. */
-#undef pid_t
-
-/* Define as `fork' if `vfork' does not work. */
-#undef vfork
diff --git a/app/xinit/configure b/app/xinit/configure
index 1e169eb21..75168af06 100644
--- a/app/xinit/configure
+++ b/app/xinit/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.62 for xinit 1.2.1.
+# Generated by GNU Autoconf 2.62 for xinit 1.3.0.
#
# Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
#
@@ -596,8 +596,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='xinit'
PACKAGE_TARNAME='xinit'
-PACKAGE_VERSION='1.2.1'
-PACKAGE_STRING='xinit 1.2.1'
+PACKAGE_VERSION='1.3.0'
+PACKAGE_STRING='xinit 1.3.0'
PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
# Factoring default headers for most tests.
@@ -1362,7 +1362,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 xinit 1.2.1 to adapt to many kinds of systems.
+\`configure' configures xinit 1.3.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1432,7 +1432,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of xinit 1.2.1:";;
+ short | recursive ) echo "Configuration of xinit 1.3.0:";;
esac
cat <<\_ACEOF
@@ -1556,7 +1556,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-xinit configure 1.2.1
+xinit configure 1.3.0
generated by GNU Autoconf 2.62
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1570,7 +1570,7 @@ 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 xinit $as_me 1.2.1, which was
+It was created by xinit $as_me 1.3.0, which was
generated by GNU Autoconf 2.62. Invocation command line was
$ $0 $@
@@ -2219,7 +2219,7 @@ fi
# Define the identity of the package.
PACKAGE='xinit'
- VERSION='1.2.1'
+ VERSION='1.3.0'
cat >>confdefs.h <<_ACEOF
@@ -2390,7 +2390,7 @@ fi
-# Require xorg-macros: XORG_DEFAULT_OPTIONS
+# Require X.Org macros 1.8 or later for AC_PROG_SED in XORG_DEFAULT_OPTIONS
@@ -4945,6 +4945,7 @@ MAN_SUBSTS="\
-e 's|__xservername__|Xorg|g' \
-e 's|__xconfigfile__|xorg.conf|g' \
-e 's|__projectroot__|\$(prefix)|g' \
+ -e 's|__apploaddir__|\$(appdefaultdir)|g' \
-e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
-e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
-e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
@@ -4961,934 +4962,6 @@ AM_DEFAULT_VERBOSITY=1
ac_config_headers="$ac_config_headers config.h"
-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
- 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
- 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
-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
-
-
-if test "x$CC" != xcc; then
- { $as_echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
-$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
-else
- { $as_echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5
-$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
-fi
-set dummy $CC; ac_cc=`$as_echo "$2" |
- sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
-if { as_var=ac_cv_prog_cc_${ac_cc}_c_o; eval "test \"\${$as_var+set}\" = set"; }; then
- $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. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-# Make sure it works both with $CC and with simple cc.
-# We do the test twice because some compilers refuse to overwrite an
-# existing .o file with -o, though they will create one.
-ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
-rm -f conftest2.*
-if { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- test -f conftest2.$ac_objext && { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); };
-then
- eval ac_cv_prog_cc_${ac_cc}_c_o=yes
- if test "x$CC" != xcc; then
- # Test first that cc exists at all.
- if { ac_try='cc -c conftest.$ac_ext >&5'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
- rm -f conftest2.*
- if { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- test -f conftest2.$ac_objext && { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); };
- then
- # cc works too.
- :
- else
- # cc exists but doesn't like -o.
- eval ac_cv_prog_cc_${ac_cc}_c_o=no
- fi
- fi
- fi
-else
- eval ac_cv_prog_cc_${ac_cc}_c_o=no
-fi
-rm -f core conftest*
-
-fi
-if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
- { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define NO_MINUS_C_MINUS_O 1
-_ACEOF
-
-fi
-
-# FIXME: we rely on the cache variable name because
-# there is no other way.
-set dummy $CC
-ac_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
-if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" != yes"; then
- # Losing compiler, so override with the script.
- # FIXME: It is wrong to rewrite CC.
- # But if we don't then we get into trouble of one sort or another.
- # A longer-term fix would be to have automake use am__CC in this case,
- # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
- CC="$am_aux_dir/compile $CC"
-fi
-
for ac_prog in cpp
@@ -5990,139 +5063,6 @@ fi
rm -f conftest.$ac_ext
-# 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'
-
-# Extract the first word of "sed", so it can be a program name with args.
-set dummy sed; 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_SED+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- case $SED in
- [\\/]* | ?:[\\/]*)
- ac_cv_path_SED="$SED" # 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_SED="$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
-SED=$ac_cv_path_SED
-if test -n "$SED"; then
- { $as_echo "$as_me:$LINENO: result: $SED" >&5
-$as_echo "$SED" >&6; }
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
{ $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
@@ -6161,778 +5101,6 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
-{ $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
- $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. */
-#include <sys/types.h>
-#include <signal.h>
-
-int
-main ()
-{
-return *(signal (0, 0)) (0) == 1;
- ;
- 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_type_signal=int
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cv_type_signal=void
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $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
-_ACEOF
-
-
-{ $as_echo "$as_me:$LINENO: checking for pid_t" >&5
-$as_echo_n "checking for pid_t... " >&6; }
-if test "${ac_cv_type_pid_t+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- ac_cv_type_pid_t=no
-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 ()
-{
-if (sizeof (pid_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=$?
- 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
- 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 ()
-{
-if (sizeof ((pid_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=$?
- 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_cv_type_pid_t=yes
-fi
-
-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
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
-$as_echo "$ac_cv_type_pid_t" >&6; }
-if test $ac_cv_type_pid_t = yes; then
- :
-else
-
-cat >>confdefs.h <<_ACEOF
-#define pid_t int
-_ACEOF
-
-fi
-
-
-for ac_header in vfork.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
- $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: $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:* )
- { $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
- ;;
-esac
-{ $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
-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 'as_val=${'$as_ac_Header'}
- $as_echo "$as_val"'` = yes; then
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
-
-
-for ac_func in fork vfork
-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
-
-if test "x$ac_cv_func_fork" = xyes; then
- { $as_echo "$as_me:$LINENO: checking for working fork" >&5
-$as_echo_n "checking for working fork... " >&6; }
-if test "${ac_cv_func_fork_works+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then
- ac_cv_func_fork_works=cross
-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 ()
-{
-
- /* By Ruediger Kuhlmann. */
- return fork () < 0;
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_func_fork_works=yes
-else
- $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_func_fork_works=no
-fi
-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
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
-$as_echo "$ac_cv_func_fork_works" >&6; }
-
-else
- ac_cv_func_fork_works=$ac_cv_func_fork
-fi
-if test "x$ac_cv_func_fork_works" = xcross; then
- case $host in
- *-*-amigaos* | *-*-msdosdjgpp*)
- # Override, as these systems have only a dummy fork() stub
- ac_cv_func_fork_works=no
- ;;
- *)
- ac_cv_func_fork_works=yes
- ;;
- esac
- { $as_echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
-$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
-fi
-ac_cv_func_vfork_works=$ac_cv_func_vfork
-if test "x$ac_cv_func_vfork" = xyes; then
- { $as_echo "$as_me:$LINENO: checking for working vfork" >&5
-$as_echo_n "checking for working vfork... " >&6; }
-if test "${ac_cv_func_vfork_works+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then
- ac_cv_func_vfork_works=cross
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Thanks to Paul Eggert for this test. */
-$ac_includes_default
-#include <sys/wait.h>
-#ifdef HAVE_VFORK_H
-# include <vfork.h>
-#endif
-/* On some sparc systems, changes by the child to local and incoming
- argument registers are propagated back to the parent. The compiler
- is told about this with #include <vfork.h>, but some compilers
- (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
- static variable whose address is put into a register that is
- clobbered by the vfork. */
-static void
-#ifdef __cplusplus
-sparc_address_test (int arg)
-# else
-sparc_address_test (arg) int arg;
-#endif
-{
- static pid_t child;
- if (!child) {
- child = vfork ();
- if (child < 0) {
- perror ("vfork");
- _exit(2);
- }
- if (!child) {
- arg = getpid();
- write(-1, "", 0);
- _exit (arg);
- }
- }
-}
-
-int
-main ()
-{
- pid_t parent = getpid ();
- pid_t child;
-
- sparc_address_test (0);
-
- child = vfork ();
-
- if (child == 0) {
- /* Here is another test for sparc vfork register problems. This
- test uses lots of local variables, at least as many local
- variables as main has allocated so far including compiler
- temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
- 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
- reuse the register of parent for one of the local variables,
- since it will think that parent can't possibly be used any more
- in this routine. Assigning to the local variable will thus
- munge parent in the parent process. */
- pid_t
- p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
- p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
- /* Convince the compiler that p..p7 are live; otherwise, it might
- use the same hardware register for all 8 local variables. */
- if (p != p1 || p != p2 || p != p3 || p != p4
- || p != p5 || p != p6 || p != p7)
- _exit(1);
-
- /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
- from child file descriptors. If the child closes a descriptor
- before it execs or exits, this munges the parent's descriptor
- as well. Test for this by closing stdout in the child. */
- _exit(close(fileno(stdout)) != 0);
- } else {
- int status;
- struct stat st;
-
- while (wait(&status) != child)
- ;
- return (
- /* Was there some problem with vforking? */
- child < 0
-
- /* Did the child fail? (This shouldn't happen.) */
- || status
-
- /* Did the vfork/compiler bug occur? */
- || parent != getpid()
-
- /* Did the file descriptor bug occur? */
- || fstat(fileno(stdout), &st) != 0
- );
- }
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_func_vfork_works=yes
-else
- $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_func_vfork_works=no
-fi
-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
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
-$as_echo "$ac_cv_func_vfork_works" >&6; }
-
-fi;
-if test "x$ac_cv_func_fork_works" = xcross; then
- ac_cv_func_vfork_works=$ac_cv_func_vfork
- { $as_echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
-$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
-fi
-
-if test "x$ac_cv_func_vfork_works" = xyes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_WORKING_VFORK 1
-_ACEOF
-
-else
-
-cat >>confdefs.h <<\_ACEOF
-#define vfork fork
-_ACEOF
-
-fi
-if test "x$ac_cv_func_fork_works" = xyes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_WORKING_FORK 1
-_ACEOF
-
-fi
-
-
-
-for ac_func in killpg
-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
-
-
@@ -7094,7 +5262,7 @@ else
ac_cv_prog_LAUNCHD="$LAUNCHD" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
+for as_dir in $PATH$PATH_SEPARATOR/sbin
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
@@ -7516,13 +5684,6 @@ $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 "${LAUNCHD_TRUE}" && test -z "${LAUNCHD_FALSE}"; then
{ { $as_echo "$as_me:$LINENO: error: conditional \"LAUNCHD\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
@@ -7859,7 +6020,7 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by xinit $as_me 1.2.1, which was
+This file was extended by xinit $as_me 1.3.0, which was
generated by GNU Autoconf 2.62. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -7912,7 +6073,7 @@ Report bugs to <bug-autoconf@gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
-xinit config.status 1.2.1
+xinit config.status 1.3.0
configured by $0, generated by GNU Autoconf 2.62,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
@@ -8967,13 +7128,6 @@ $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 "${LAUNCHD_TRUE}" && test -z "${LAUNCHD_FALSE}"; then
{ { $as_echo "$as_me:$LINENO: error: conditional \"LAUNCHD\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
@@ -9310,7 +7464,7 @@ exec 6>&1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by xinit $as_me 1.2.1, which was
+This file was extended by xinit $as_me 1.3.0, which was
generated by GNU Autoconf 2.62. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -9363,7 +7517,7 @@ Report bugs to <bug-autoconf@gnu.org>."
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_version="\\
-xinit config.status 1.2.1
+xinit config.status 1.3.0
configured by $0, generated by GNU Autoconf 2.62,
with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
diff --git a/app/xinit/configure.ac b/app/xinit/configure.ac
index 6b9706f60..0d23ad9cd 100644
--- a/app/xinit/configure.ac
+++ b/app/xinit/configure.ac
@@ -20,31 +20,23 @@ dnl PERFORMANCE OF THIS SOFTWARE.
dnl
dnl Process this file with autoconf to create configure.
-AC_PREREQ([2.57])
-AC_INIT(xinit,[1.2.1], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],xinit)
+AC_PREREQ([2.60])
+AC_INIT([xinit], [1.3.0],
+ [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [xinit])
AM_INIT_AUTOMAKE([foreign dist-bzip2])
AM_MAINTAINER_MODE
-# Require xorg-macros: XORG_DEFAULT_OPTIONS
+# Require X.Org macros 1.8 or later for AC_PROG_SED in XORG_DEFAULT_OPTIONS
m4_ifndef([XORG_MACROS_VERSION],
- [m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])])
-XORG_MACROS_VERSION(1.3)
+ [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.8)
XORG_DEFAULT_OPTIONS
AM_CONFIG_HEADER(config.h)
-AC_PROG_CC
-AM_PROG_CC_C_O
XORG_PROG_RAWCPP
-AC_PROG_INSTALL
-AC_PATH_PROG(SED,sed)
AC_CANONICAL_HOST
-AC_TYPE_SIGNAL
-AC_FUNC_FORK
-
-AC_CHECK_FUNCS([killpg])
-
m4_ifdef([AS_HELP_STRING], , [m4_define([AS_HELP_STRING], m4_defn([AC_HELP_STRING]))])
@@ -129,7 +121,7 @@ AC_ARG_WITH(launchd-id-prefix, AS_HELP_STRING([--with-launchd-id-prefix=PATH],
if test "x$LAUNCHD" = "xauto"; then
unset LAUNCHD
- AC_CHECK_PROG(LAUNCHD, [launchd], [yes], [no])
+ AC_CHECK_PROG(LAUNCHD, [launchd], [yes], [no], [$PATH$PATH_SEPARATOR/sbin])
fi
TIGER_LAUNCHD=no
diff --git a/app/xinit/startx.cmd b/app/xinit/startx.cmd
deleted file mode 100644
index 950ab9dba..000000000
--- a/app/xinit/startx.cmd
+++ /dev/null
@@ -1,80 +0,0 @@
-/* OS/2 REXX */
-/*
- * This is just a sample implementation of a slightly less primitive
- * interface than xinit. It looks for user xinitrc.cmd and xservrc.cmd
- * files, then system xinitrc.cmd and xservrc.cmd files, else lets xinit choose
- * its default. The system xinitrc should probably do things like check
- * for Xresources files and merge them in, startup up a window manager,
- * and pop a clock and serveral xterms.
- *
- * Site administrators are STRONGLY urged to write nicer versions.
- */
-'@echo off'
-ADDRESS CMD
-env = 'OS2ENVIRONMENT'
-x11root = VALUE('X11ROOT',,env)
-IF x11root = '' THEN DO
- SAY "The environment variable X11ROOT is not set. X/OS2 won't run without it."
- EXIT
-END
-
-home = VALUE('HOME',,env)
-IF home = '' THEN home = x11root
-os_shell = VALUE('X11SHELL',,env)
-IF os_shell = '' THEN os_shell = VALUE('SHELL',,env)
-IF os_shell = '' THEN os_shell = VALUE('OS2_SHELL',,env)
-IF os_shell = '' THEN DO
- SAY "There is no command interpreter in OS2_SHELL ???"
- EXIT
-END
-
-userclientrc = home'\xinitrc.cmd'
-userserverrc = home'\xservrc.cmd'
-sysclientrc = x11root'\usr\X11R6\lib\X11\xinit\xinitrc.cmd'
-sysserverrc = x11root'\usr\X11R6\lib\X11\xinit\xservrc.cmd'
-clientargs = ''
-serverargs = ''
-
-IF exists(userclientrc) THEN
- clientargs = userclientrc
-ELSE
-IF exists(sysclientrc) THEN
- clientargs = sysclientrc
-
-IF exists(userserverrc) THEN
- serverargs = userserverrc
-ELSE
-IF exists(sysserverrc) THEN
- serverargs = sysserverrc
-
-whoseargs = "client"
-PARSE ARG all
-
-DO i=1 TO WORDS(all)
- cur = WORD(all,i)
- IF \(FILESPEC('DRIVE',cur) = '') THEN DO
- IF whoseargs = "client" THEN
- clientargs = cur
- ELSE
- serverargs = cur
- END
- ELSE
- IF cur = "--" THEN
- whoseargs = "server"
- ELSE
- IF whoseargs = "client" THEN
- clientargs = clientargs' 'cur
- ELSE
- serverargs = serverargs' 'cur
-END
-
-xinit = x11root'\usr\X11R6\bin\xinit'
-xinit os_shell' /c 'clientargs' -- 'serverargs
-
-RETURN
-
-exists:
- IF STREAM(arg(1), 'C', 'QUERY EXISTS') = '' THEN
- RETURN 0
- ELSE
- RETURN 1
diff --git a/app/xinit/startx.cpp b/app/xinit/startx.cpp
index 48d40aae3..f055ad9f6 100644
--- a/app/xinit/startx.cpp
+++ b/app/xinit/startx.cpp
@@ -87,15 +87,15 @@ if [ "x$X11_PREFS_DOMAIN" = x ] ; then
fi
XCOMM Initialize defaults (this will cut down on "safe" error messages)
-if ! defaults read $X11_PREFS_DOMAIN cache_fonts >& /dev/null ; then
+if ! defaults read $X11_PREFS_DOMAIN cache_fonts > /dev/null 2>&1 ; then
defaults write $X11_PREFS_DOMAIN cache_fonts -bool true
fi
-if ! defaults read $X11_PREFS_DOMAIN no_auth >& /dev/null ; then
+if ! defaults read $X11_PREFS_DOMAIN no_auth > /dev/null 2>&1 ; then
defaults write $X11_PREFS_DOMAIN no_auth -bool false
fi
-if ! defaults read $X11_PREFS_DOMAIN nolisten_tcp >& /dev/null ; then
+if ! defaults read $X11_PREFS_DOMAIN nolisten_tcp > /dev/null 2>&1 ; then
defaults write $X11_PREFS_DOMAIN nolisten_tcp -bool true
fi
@@ -126,14 +126,17 @@ if [ x`defaults read $X11_PREFS_DOMAIN nolisten_tcp` = x1 ] ; then
defaultserverargs="$defaultserverargs -nolisten tcp"
fi
-if defaults read $X11_PREFS_DOMAIN dpi >& /dev/null ; then
+if defaults read $X11_PREFS_DOMAIN dpi > /dev/null 2>&1 ; then
defaultserverargs="$defaultserverargs -dpi `defaults read $X11_PREFS_DOMAIN dpi`"
fi
-for ((d=0; ; d++)) ; do
- [[ -e /tmp/.X$d-lock ]] || break
+d=0
+while true ; do
+ [ -e /tmp/.X$d-lock ] || break
+ d=$(($d + 1))
done
defaultdisplay=":$d"
+unset d
#else
enable_xauth=1
@@ -278,7 +281,8 @@ if [ x"$enable_xauth" = x1 ] ; then
add :$dummy . $mcookie
EOF
#if defined(__APPLE__) || defined(__CYGWIN__)
- serverargs=${serverargs}" -auth '"${xserverauthfile//\'/\'\\\'\'}"'"
+ xserverauthfilequoted=$(echo ${xserverauthfile} | sed "s/'/'\\\\''/g")
+ serverargs=${serverargs}" -auth '"${xserverauthfilequoted}"'"
#else
serverargs=${serverargs}" -auth "${xserverauthfile}
#endif
diff --git a/app/xinit/xinit.c b/app/xinit/xinit.c
index 8c7902a33..8d1848118 100644
--- a/app/xinit/xinit.c
+++ b/app/xinit/xinit.c
@@ -36,23 +36,8 @@ in this Software without prior written authorization from The Open Group.
#include <ctype.h>
#include <stdint.h>
-#ifdef X_POSIX_C_SOURCE
-#define _POSIX_C_SOURCE X_POSIX_C_SOURCE
#include <signal.h>
-#undef _POSIX_C_SOURCE
-#else
-#if defined(X_NOT_POSIX) || defined(_POSIX_SOURCE)
-#include <signal.h>
-#else
-#define _POSIX_SOURCE
-#include <signal.h>
-#undef _POSIX_SOURCE
-#endif
-#endif
-
-#ifndef SYSV
#include <sys/wait.h>
-#endif
#include <errno.h>
#include <setjmp.h>
#include <stdarg.h>
@@ -64,51 +49,18 @@ in this Software without prior written authorization from The Open Group.
#endif
#endif
-#if !defined(SIGCHLD) && defined(SIGCLD)
-#define SIGCHLD SIGCLD
-#endif
-#ifdef __UNIXOS2__
-#define INCL_DOSMODULEMGR
-#include <os2.h>
-#define setpgid(a,b)
-#define setuid(a)
-#define setgid(a)
-#define SHELL "cmd.exe"
-#define XINITRC "xinitrc.cmd"
-#define XSERVERRC "xservrc.cmd"
-char **envsave; /* to circumvent an UNIXOS2 problem */
-#define environ envsave
-#endif
+/* For PRIO_PROCESS and setpriority() */
+#if defined(__DragonFly__) || defined(__OpenBSD__)
+#include <sys/time.h>
+#include <sys/resource.h>
+#endif /* __DragonFly__ || __OpenBSD__ */
#include <stdlib.h>
-extern char **environ;
-char **newenviron = NULL;
-char **newenvironlast = NULL;
#ifndef SHELL
#define SHELL "sh"
#endif
-#ifndef HAVE_WORKING_VFORK
-# ifndef vfork
-# define vfork() fork()
-# endif
-#else
-# ifdef HAVE_VFORK_H
-# include <vfork.h>
-# endif
-#endif
-
-#ifdef __UNIXOS2__
-#define HAS_EXECVPE
-#endif
-
-#ifdef HAS_EXECVPE
-#define Execvpe(path, argv, envp) execvpe(path, argv, envp)
-#else
-#define Execvpe(path, argv, envp) execvp(path, argv)
-#endif
-
const char *bindir = BINDIR;
const char * const server_names[] = {
#ifdef __APPLE__
@@ -138,347 +90,277 @@ char xinitrcbuf[256];
#endif
char xserverrcbuf[256];
-#define TRUE 1
-#define FALSE 0
-#define OK_EXIT 0
-#define ERR_EXIT 1
+#define TRUE 1
+#define FALSE 0
static char *default_server = "X";
-static char *default_display = ":0"; /* choose most efficient */
+static char *default_display = ":0"; /* choose most efficient */
static char *default_client[] = {"xterm", "-geometry", "+1+1", "-n", "login", NULL};
static char *serverargv[100];
static char *clientargv[100];
-static char **server = serverargv + 2; /* make sure room for sh .xserverrc args */
-static char **client = clientargv + 2; /* make sure room for sh .xinitrc args */
+static char **server = serverargv + 2; /* make sure room for sh .xserverrc args */
+static char **client = clientargv + 2; /* make sure room for sh .xinitrc args */
static char *displayNum = NULL;
static char *program = NULL;
-static Display *xd = NULL; /* server connection */
-#ifndef SYSV
-#if defined(__CYGWIN__) || defined(SVR4) || defined(_POSIX_SOURCE) || defined(CSRG_BASED) || defined(__UNIXOS2__) || defined(Lynx) || defined(__APPLE__)
+static Display *xd = NULL; /* server connection */
int status;
-#else
-union wait status;
-#endif
-#endif /* SYSV */
int serverpid = -1;
int clientpid = -1;
volatile int gotSignal = 0;
-static void Execute ( char **vec, char **envp );
-static Bool waitforserver ( void );
-static Bool processTimeout ( int timeout, char *string );
-static int startServer ( char *server[] );
-static int startClient ( char *client[] );
-static int ignorexio ( Display *dpy );
-static void shutdown ( void );
-static void set_environment ( void );
-static void Fatal(char *msg);
-static void Error ( char *fmt, ... );
-
-#ifdef RETSIGTYPE /* autoconf AC_TYPE_SIGNAL */
-# define SIGVAL RETSIGTYPE
-#endif /* RETSIGTYPE */
-
-static SIGVAL
-sigCatch(int sig)
-{
- /* On system with POSIX signals, just interrupt the system call */
- gotSignal = sig;
-}
+static void Execute(char **vec);
+static Bool waitforserver(void);
+static Bool processTimeout(int timeout, char *string);
+static int startServer(char *server[]);
+static int startClient(char *client[]);
+static int ignorexio(Display *dpy);
+static void shutdown(void);
+static void set_environment(void);
+
+static void Fatal(const char *fmt, ...);
+static void Error(const char *fmt, ...);
+static void Fatalx(const char *fmt, ...);
+static void Errorx(const char *fmt, ...);
-static SIGVAL
-sigAlarm(int sig)
+static void
+sigCatch(int sig)
{
-#if defined(SYSV) || defined(SVR4) || defined(linux) || defined(__UNIXOS2__) || defined(__APPLE__)
- signal (sig, sigAlarm);
-#endif
+ /* On system with POSIX signals, just interrupt the system call */
+ gotSignal = sig;
}
-static SIGVAL
-sigUsr1(int sig)
+static void
+sigIgnore(int sig)
{
-#if defined(SYSV) || defined(SVR4) || defined(linux) || defined(__UNIXOS2__) || defined(__APPLE__)
- signal (sig, sigUsr1);
-#endif
}
-static void
-Execute(char **vec, /* has room from up above */
- char **envp)
+static void
+Execute(char **vec) /* has room from up above */
{
- Execvpe (vec[0], vec, envp);
-#ifndef __UNIXOS2__
- if (access (vec[0], R_OK) == 0) {
+ execvp(vec[0], vec);
+ if (access(vec[0], R_OK) == 0) {
vec--; /* back it up to stuff shell in */
vec[0] = SHELL;
- Execvpe (vec[0], vec, envp);
+ execvp(vec[0], vec);
}
-#endif
return;
}
-#ifndef __UNIXOS2__
int
main(int argc, char *argv[])
-#else
-int
-main(int argc, char *argv[], char *envp[])
-#endif
{
- register char **sptr = server;
- register char **cptr = client;
- register char **ptr;
- int pid;
- int client_given = 0, server_given = 0;
- int client_args_given = 0, server_args_given = 0;
- int start_of_client_args, start_of_server_args;
- struct sigaction sa;
+ register char **sptr = server;
+ register char **cptr = client;
+ register char **ptr;
+ int pid;
+ int client_given = 0, server_given = 0;
+ int client_args_given = 0, server_args_given = 0;
+ int start_of_client_args, start_of_server_args;
+ struct sigaction sa, si;
#ifdef __APPLE__
#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
- vproc_transaction_t vt;
+ vproc_transaction_t vt;
#endif
#endif
-#ifdef __UNIXOS2__
- envsave = envp; /* circumvent an EMX problem */
-
- /* Check whether the system will run at all */
- if (_emx_rev < 50) {
- APIRET rc;
- HMODULE hmod;
- char name[CCHMAXPATH];
- char fail[9];
- fputs ("This program requires emx.dll revision 50 (0.9c) "
- "or later.\n", stderr);
- rc = DosLoadModule (fail, sizeof (fail), "emx", &hmod);
- if (rc == 0) {
- rc = DosQueryModuleName (hmod, sizeof (name), name);
- if (rc == 0)
- fprintf (stderr, "Please delete or update `%s'.\n", name);
- DosFreeModule (hmod);
- }
- exit (2);
- }
-#endif
- program = *argv++;
- argc--;
- /*
- * copy the client args.
- */
- if (argc == 0 ||
-#ifndef __UNIXOS2__
- (**argv != '/' && **argv != '.')) {
-#else
- (**argv != '/' && **argv != '\\' && **argv != '.' &&
- !(isalpha(**argv) && (*argv)[1]==':'))) {
-#endif
- for (ptr = default_client; *ptr; )
- *cptr++ = *ptr++;
- } else {
- client_given = 1;
- }
- start_of_client_args = (cptr - client);
- while (argc && strcmp(*argv, "--")) {
- client_args_given++;
- *cptr++ = *argv++;
- argc--;
- }
- *cptr = NULL;
- if (argc) {
- argv++;
- argc--;
- }
-
- /*
- * Copy the server args.
- */
- if (argc == 0 ||
-#ifndef __UNIXOS2__
- (**argv != '/' && **argv != '.')) {
- *sptr++ = default_server;
-#else
- (**argv != '/' && **argv != '\\' && **argv != '.' &&
- !(isalpha(**argv) && (*argv)[1]==':'))) {
- *sptr = getenv("XSERVER");
- if (!*sptr) {
- Error("No XSERVER environment variable set");
- exit(1);
- }
- *sptr++;
-#endif
- } else {
- server_given = 1;
- *sptr++ = *argv++;
- argc--;
- }
- if (argc > 0 && (argv[0][0] == ':' && isdigit(argv[0][1])))
- displayNum = *argv;
- else
- displayNum = *sptr++ = default_display;
-
- start_of_server_args = (sptr - server);
- while (--argc >= 0) {
- server_args_given++;
- *sptr++ = *argv++;
- }
- *sptr = NULL;
-
- /*
- * if no client arguments given, check for a startup file and copy
- * that into the argument list
- */
- if (!client_given) {
- char *cp;
- Bool required = False;
-
- xinitrcbuf[0] = '\0';
- if ((cp = getenv ("XINITRC")) != NULL) {
- (void) snprintf (xinitrcbuf, sizeof(xinitrcbuf), "%s", cp);
- required = True;
- } else if ((cp = getenv ("HOME")) != NULL) {
- (void) snprintf (xinitrcbuf, sizeof(xinitrcbuf),
- "%s/%s", cp, XINITRC);
- }
- if (xinitrcbuf[0]) {
- if (access (xinitrcbuf, F_OK) == 0) {
- client += start_of_client_args - 1;
- client[0] = xinitrcbuf;
- } else if (required) {
- fprintf (stderr,
- "%s: warning, no client init file \"%s\"\n",
- program, xinitrcbuf);
- }
- }
- }
-
- /*
- * if no server arguments given, check for a startup file and copy
- * that into the argument list
- */
- if (!server_given) {
- char *cp;
- Bool required = False;
-
- xserverrcbuf[0] = '\0';
- if ((cp = getenv ("XSERVERRC")) != NULL) {
- (void) snprintf (xserverrcbuf, sizeof(xserverrcbuf), "%s", cp);
- required = True;
- } else if ((cp = getenv ("HOME")) != NULL) {
- (void) snprintf (xserverrcbuf, sizeof(xserverrcbuf),
- "%s/%s", cp, XSERVERRC);
- }
- if (xserverrcbuf[0]) {
- if (access (xserverrcbuf, F_OK) == 0) {
- server += start_of_server_args - 1;
- server[0] = xserverrcbuf;
- } else if (required) {
- fprintf (stderr,
- "%s: warning, no server init file \"%s\"\n",
- program, xserverrcbuf);
- }
- }
- }
-
- /*
- * put the display name into the environment
- */
- set_environment ();
-
- /*
- * Start the server and client.
- */
-#ifdef SIGCHLD
- signal(SIGCHLD, SIG_DFL); /* Insurance */
-#endif
+ program = *argv++;
+ argc--;
+ /*
+ * copy the client args.
+ */
+ if (argc == 0 ||
+ (**argv != '/' && **argv != '.')) {
+ for (ptr = default_client; *ptr; )
+ *cptr++ = *ptr++;
+ } else {
+ client_given = 1;
+ }
+ start_of_client_args = (cptr - client);
+ while (argc && strcmp(*argv, "--")) {
+ client_args_given++;
+ *cptr++ = *argv++;
+ argc--;
+ }
+ *cptr = NULL;
+ if (argc) {
+ argv++;
+ argc--;
+ }
+
+ /*
+ * Copy the server args.
+ */
+ if (argc == 0 ||
+ (**argv != '/' && **argv != '.')) {
+ *sptr++ = default_server;
+ } else {
+ server_given = 1;
+ *sptr++ = *argv++;
+ argc--;
+ }
+ if (argc > 0 && (argv[0][0] == ':' && isdigit(argv[0][1])))
+ displayNum = *argv;
+ else
+ displayNum = *sptr++ = default_display;
+
+ start_of_server_args = (sptr - server);
+ while (--argc >= 0) {
+ server_args_given++;
+ *sptr++ = *argv++;
+ }
+ *sptr = NULL;
+
+ /*
+ * if no client arguments given, check for a startup file and copy
+ * that into the argument list
+ */
+ if (!client_given) {
+ char *cp;
+ Bool required = False;
+
+ xinitrcbuf[0] = '\0';
+ if ((cp = getenv("XINITRC")) != NULL) {
+ snprintf(xinitrcbuf, sizeof(xinitrcbuf), "%s", cp);
+ required = True;
+ } else if ((cp = getenv("HOME")) != NULL) {
+ snprintf(xinitrcbuf, sizeof(xinitrcbuf),
+ "%s/%s", cp, XINITRC);
+ }
+ if (xinitrcbuf[0]) {
+ if (access(xinitrcbuf, F_OK) == 0) {
+ client += start_of_client_args - 1;
+ client[0] = xinitrcbuf;
+ } else if (required) {
+ Error("warning, no client init file \"%s\"", xinitrcbuf);
+ }
+ }
+ }
+
+ /*
+ * if no server arguments given, check for a startup file and copy
+ * that into the argument list
+ */
+ if (!server_given) {
+ char *cp;
+ Bool required = False;
+
+ xserverrcbuf[0] = '\0';
+ if ((cp = getenv("XSERVERRC")) != NULL) {
+ snprintf(xserverrcbuf, sizeof(xserverrcbuf), "%s", cp);
+ required = True;
+ } else if ((cp = getenv("HOME")) != NULL) {
+ snprintf(xserverrcbuf, sizeof(xserverrcbuf),
+ "%s/%s", cp, XSERVERRC);
+ }
+ if (xserverrcbuf[0]) {
+ if (access(xserverrcbuf, F_OK) == 0) {
+ server += start_of_server_args - 1;
+ server[0] = xserverrcbuf;
+ } else if (required) {
+ Error("warning, no server init file \"%s\"", xserverrcbuf);
+ }
+ }
+ }
+
+ /*
+ * Start the server and client.
+ */
+ signal(SIGCHLD, SIG_DFL); /* Insurance */
+
+ /* Let those signal interrupt the wait() call in the main loop */
+ memset(&sa, 0, sizeof sa);
+ sa.sa_handler = sigCatch;
+ sigemptyset(&sa.sa_mask);
+ sa.sa_flags = 0; /* do not set SA_RESTART */
+
+ sigaction(SIGTERM, &sa, NULL);
+ sigaction(SIGQUIT, &sa, NULL);
+ sigaction(SIGINT, &sa, NULL);
+ sigaction(SIGHUP, &sa, NULL);
+ sigaction(SIGPIPE, &sa, NULL);
- /* Let those signal interrupt the wait() call in the main loop */
- memset(&sa, 0, sizeof sa);
- sa.sa_handler = sigCatch;
- sigemptyset(&sa.sa_mask);
- sa.sa_flags = 0; /* do not set SA_RESTART */
-
- sigaction(SIGTERM, &sa, NULL);
- sigaction(SIGQUIT, &sa, NULL);
- sigaction(SIGINT, &sa, NULL);
- sigaction(SIGHUP, &sa, NULL);
- sigaction(SIGPIPE, &sa, NULL);
-
- signal(SIGALRM, sigAlarm);
- signal(SIGUSR1, sigUsr1);
+ memset(&si, 0, sizeof(si));
+ si.sa_handler = sigIgnore;
+ sigemptyset(&si.sa_mask);
+ si.sa_flags = SA_RESTART;
+
+ sigaction(SIGALRM, &si, NULL);
+ sigaction(SIGUSR1, &si, NULL);
#ifdef __APPLE__
#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
- vt = vproc_transaction_begin(NULL);
+ vt = vproc_transaction_begin(NULL);
#endif
#endif
- if (startServer(server) > 0
- && startClient(client) > 0) {
- pid = -1;
- while (pid != clientpid && pid != serverpid
- && gotSignal == 0
- )
- pid = wait(NULL);
- }
+ if (startServer(server) > 0
+ && startClient(client) > 0) {
+ pid = -1;
+ while (pid != clientpid && pid != serverpid
+ && gotSignal == 0
+ )
+ pid = wait(NULL);
+ }
#ifdef __APPLE__
#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
- vproc_transaction_end(NULL, vt);
+ vproc_transaction_end(NULL, vt);
#endif
#endif
- signal(SIGTERM, SIG_IGN);
- signal(SIGQUIT, SIG_IGN);
- signal(SIGINT, SIG_IGN);
- signal(SIGHUP, SIG_IGN);
- signal(SIGPIPE, SIG_IGN);
+ signal(SIGTERM, SIG_IGN);
+ signal(SIGQUIT, SIG_IGN);
+ signal(SIGINT, SIG_IGN);
+ signal(SIGHUP, SIG_IGN);
+ signal(SIGPIPE, SIG_IGN);
- shutdown();
+ shutdown();
- if (gotSignal != 0) {
- Error("unexpected signal %d.\n", gotSignal);
- exit(ERR_EXIT);
- }
+ if (gotSignal != 0) {
+ Errorx("unexpected signal %d", gotSignal);
+ exit(EXIT_FAILURE);
+ }
- if (serverpid < 0 )
- Fatal("Server error.\n");
- if (clientpid < 0)
- Fatal("Client error.\n");
- exit(OK_EXIT);
+ if (serverpid < 0)
+ Fatalx("server error");
+ if (clientpid < 0)
+ Fatalx("client error");
+ exit(EXIT_SUCCESS);
}
/*
- * waitforserver - wait for X server to start up
+ * waitforserver - wait for X server to start up
*/
static Bool
waitforserver(void)
{
- int ncycles = 120; /* # of cycles to wait */
- int cycles; /* Wait cycle count */
+ int ncycles = 120; /* # of cycles to wait */
+ int cycles; /* Wait cycle count */
#ifdef __APPLE__
- /* For Apple, we don't get signaled by the server when it's ready, so we just
- * want to sleep now since we're going to sleep later anyways and this allows us
- * to avoid the awkard, "why is there an error message in the log" questions
- * from users.
- */
+ /* For Apple, we don't get signaled by the server when it's ready, so we just
+ * want to sleep now since we're going to sleep later anyways and this allows us
+ * to avoid the awkard, "why is there an error message in the log" questions
+ * from users.
+ */
+
+ sleep(2);
+#endif
+
+ for (cycles = 0; cycles < ncycles; cycles++) {
+ if ((xd = XOpenDisplay(displayNum))) {
+ return(TRUE);
+ }
+ else {
+ if (!processTimeout(1, "X server to begin accepting connections"))
+ break;
+ }
+ }
- sleep(2);
-#endif
+ Errorx("giving up");
- for (cycles = 0; cycles < ncycles; cycles++) {
- if ((xd = XOpenDisplay(displayNum))) {
- return(TRUE);
- }
- else {
- if (!processTimeout (1, "X server to begin accepting connections"))
- break;
- }
- }
-
- fprintf (stderr, "giving up.\r\n");
- return(FALSE);
+ return(FALSE);
}
/*
@@ -487,391 +369,327 @@ waitforserver(void)
static Bool
processTimeout(int timeout, char *string)
{
- int i = 0, pidfound = -1;
- static char *laststring;
-
- for (;;) {
-#if defined(SYSV) || defined(__UNIXOS2__)
- alarm(1);
- if ((pidfound = wait(NULL)) == serverpid)
- break;
- alarm(0);
-#else /* SYSV */
-#if defined(SVR4) || defined(_POSIX_SOURCE) || defined(Lynx) || defined(__APPLE__)
- if ((pidfound = waitpid(serverpid, &status, WNOHANG)) == serverpid)
- break;
-#else
- if ((pidfound = wait3(&status, WNOHANG, NULL)) == serverpid)
- break;
-#endif
-#endif /* SYSV */
- if (timeout) {
- if (i == 0 && string != laststring)
- fprintf(stderr, "\r\nwaiting for %s ", string);
- else
- fprintf(stderr, ".");
- fflush(stderr);
- }
- if (timeout)
- sleep (1);
- if (++i > timeout)
- break;
- }
- if ( i > 0 ) fputc( '\n', stderr ); /* tidy up after message */
- laststring = string;
- return( serverpid != pidfound );
+ int i = 0, pidfound = -1;
+ static char *laststring;
+
+ for (;;) {
+ if ((pidfound = waitpid(serverpid, &status, WNOHANG)) == serverpid)
+ break;
+ if (timeout) {
+ if (i == 0 && string != laststring)
+ fprintf(stderr, "\r\nwaiting for %s ", string);
+ else
+ fprintf(stderr, ".");
+ fflush(stderr);
+ }
+ if (timeout)
+ sleep(1);
+ if (++i > timeout)
+ break;
+ }
+ if (i > 0) fputc('\n', stderr); /* tidy up after message */
+ laststring = string;
+ return (serverpid != pidfound);
}
static int
startServer(char *server[])
{
- sigset_t mask, old;
-#ifdef __UNIXOS2__
- sigset_t pendings;
-#endif
+ sigset_t mask, old;
+ const char * const *cpp;
- sigemptyset(&mask);
- sigaddset(&mask, SIGUSR1);
- sigprocmask(SIG_BLOCK, &mask, &old);
+ sigemptyset(&mask);
+ sigaddset(&mask, SIGUSR1);
+ sigprocmask(SIG_BLOCK, &mask, &old);
- serverpid = fork();
+ serverpid = fork();
- switch(serverpid) {
- case 0:
- /* Unblock */
- sigprocmask(SIG_SETMASK, &old, NULL);
+ switch(serverpid) {
+ case 0:
+ /* Unblock */
+ sigprocmask(SIG_SETMASK, &old, NULL);
- /*
- * don't hang on read/write to control tty
- */
-#ifdef SIGTTIN
- (void) signal(SIGTTIN, SIG_IGN);
-#endif
-#ifdef SIGTTOU
- (void) signal(SIGTTOU, SIG_IGN);
-#endif
- /*
- * ignore SIGUSR1 in child. The server
- * will notice this and send SIGUSR1 back
- * at xinit when ready to accept connections
- */
- (void) signal(SIGUSR1, SIG_IGN);
- /*
- * prevent server from getting sighup from vhangup()
- * if client is xterm -L
- */
-#ifndef __UNIXOS2__
- setpgid(0,getpid());
-#endif
- Execute (server, environ);
- Error ("no server \"%s\" in PATH\n", server[0]);
- {
- const char * const *cpp;
-
- fprintf (stderr,
-"\nUse the -- option, or make sure that %s is in your path and\n",
- bindir);
- fprintf (stderr,
-"that \"%s\" is a program or a link to the right type of server\n",
- server[0]);
- fprintf (stderr,
-"for your display. Possible server names include:\n\n");
- for (cpp = server_names; *cpp; cpp++) {
- fprintf (stderr, " %s\n", *cpp);
- }
- fprintf (stderr, "\n");
- }
- exit (ERR_EXIT);
-
- break;
- case -1:
- break;
- default:
- /*
- * don't nice server
- */
-#ifdef PRIO_PROCESS
- setpriority( PRIO_PROCESS, serverpid, -1 );
-#endif
+ /*
+ * don't hang on read/write to control tty
+ */
+ signal(SIGTTIN, SIG_IGN);
+ signal(SIGTTOU, SIG_IGN);
+ /*
+ * ignore SIGUSR1 in child. The server
+ * will notice this and send SIGUSR1 back
+ * at xinit when ready to accept connections
+ */
+ signal(SIGUSR1, SIG_IGN);
+ /*
+ * prevent server from getting sighup from vhangup()
+ * if client is xterm -L
+ */
+ setpgid(0,getpid());
+ Execute(server);
+
+ Error("unable to run server \"%s\"", server[0]);
+
+ fprintf(stderr, "Use the -- option, or make sure that %s is in your path and\n", bindir);
+ fprintf(stderr, "that \"%s\" is a program or a link to the right type of server\n", server[0]);
+ fprintf(stderr, "for your display. Possible server names include:\n\n");
+ for (cpp = server_names; *cpp; cpp++)
+ fprintf(stderr, " %s\n", *cpp);
+ fprintf(stderr, "\n");
+
+ exit(EXIT_FAILURE);
+
+ break;
+ case -1:
+ break;
+ default:
+ /*
+ * don't nice server
+ */
+ setpriority(PRIO_PROCESS, serverpid, -1);
+
+ errno = 0;
+ if(! processTimeout(0, "")) {
+ serverpid = -1;
+ break;
+ }
+ /*
+ * kludge to avoid race with TCP, giving server time to
+ * set his socket options before we try to open it,
+ * either use the 15 second timeout, or await SIGUSR1.
+ *
+ * If your machine is substantially slower than 15 seconds,
+ * you can easily adjust this value.
+ */
+ alarm(15);
+
+ sigsuspend(&old);
+ alarm(0);
+ sigprocmask(SIG_SETMASK, &old, NULL);
+
+ if (waitforserver() == 0) {
+ Error("unable to connect to X server");
+ shutdown();
+ serverpid = -1;
+ }
+ break;
+ }
- errno = 0;
- if (! processTimeout(0, "")) {
- serverpid = -1;
- break;
- }
- /*
- * kludge to avoid race with TCP, giving server time to
- * set his socket options before we try to open it,
- * either use the 15 second timeout, or await SIGUSR1.
- *
- * If your machine is substantially slower than 15 seconds,
- * you can easily adjust this value.
- */
- alarm (15);
-
-#ifdef __UNIXOS2__
- /*
- * fg2003/05/06: work around a problem in EMX: sigsuspend()
- * does not deliver pending signals when called but when
- * returning; so if SIGUSR1 has already been sent by the
- * server, we would still have to await SIGALRM
- */
- sigemptyset(&pendings);
- sigpending(&pendings);
- if (!sigismember(&pendings, SIGUSR1))
-#endif /* __UNIXOS2__ */
- sigsuspend(&old);
- alarm (0);
- sigprocmask(SIG_SETMASK, &old, NULL);
-
- if (waitforserver() == 0) {
- Error("unable to connect to X server\r\n");
- shutdown();
- serverpid = -1;
- }
- break;
- }
-
- return(serverpid);
+ return(serverpid);
}
static void
setWindowPath(void)
{
- /* setting WINDOWPATH for clients */
- Atom prop;
- Atom actualtype;
- int actualformat;
- unsigned long nitems;
- unsigned long bytes_after;
- unsigned char *buf;
- const char *windowpath;
- char *newwindowpath;
- unsigned long num;
- char nums[10];
- int numn;
- size_t len;
- prop = XInternAtom(xd, "XFree86_VT", False);
- if (prop == None) {
-#ifdef DEBUG
- fprintf(stderr, "no XFree86_VT atom\n");
-#endif
- return;
- }
- if (XGetWindowProperty(xd, DefaultRootWindow(xd), prop, 0, 1,
- False, AnyPropertyType, &actualtype, &actualformat,
- &nitems, &bytes_after, &buf)) {
-#ifdef DEBUG
- fprintf(stderr, "no XFree86_VT property\n");
-#endif
- return;
- }
- if (nitems != 1) {
-#ifdef DEBUG
- fprintf(stderr, "%lu items in XFree86_VT property!\n", nitems);
-#endif
- XFree(buf);
- return;
- }
- switch (actualtype) {
- case XA_CARDINAL:
- case XA_INTEGER:
- case XA_WINDOW:
- switch (actualformat) {
- case 8:
- num = (*(uint8_t *)(void *)buf);
- break;
- case 16:
- num = (*(uint16_t *)(void *)buf);
- break;
- case 32:
- num = (*(uint32_t *)(void *)buf);
- break;
- default:
-#ifdef DEBUG
- fprintf(stderr, "format %d in XFree86_VT property!\n", actualformat);
-#endif
- XFree(buf);
- return;
- }
- break;
- default:
-#ifdef DEBUG
- fprintf(stderr, "type %lx in XFree86_VT property!\n", actualtype);
-#endif
- XFree(buf);
- return;
- }
- XFree(buf);
- windowpath = getenv("WINDOWPATH");
- numn = snprintf(nums, sizeof(nums), "%lu", num);
- if (!windowpath) {
- len = 10 + 1 + numn + 1;
- newwindowpath = malloc(len);
- if (newwindowpath == NULL)
- return;
- snprintf(newwindowpath, len, "WINDOWPATH=%s", nums);
- } else {
- len = 10 + 1 + strlen(windowpath) + 1 + numn + 1;
- newwindowpath = malloc(len);
- if (newwindowpath == NULL)
- return;
- snprintf(newwindowpath, len, "WINDOWPATH=%s:%s",
- windowpath, nums);
- }
- *newenvironlast++ = newwindowpath;
- *newenvironlast = NULL;
+ /* setting WINDOWPATH for clients */
+ Atom prop;
+ Atom actualtype;
+ int actualformat;
+ unsigned long nitems;
+ unsigned long bytes_after;
+ unsigned char *buf;
+ const char *windowpath;
+ char *newwindowpath;
+ unsigned long num;
+ char nums[10];
+ int numn;
+ size_t len;
+ prop = XInternAtom(xd, "XFree86_VT", False);
+ if (prop == None) {
+ Errorx("Unable to intern XFree86_VT atom");
+ return;
+ }
+ if (XGetWindowProperty(xd, DefaultRootWindow(xd), prop, 0, 1,
+ False, AnyPropertyType, &actualtype, &actualformat,
+ &nitems, &bytes_after, &buf)) {
+ Errorx("No XFree86_VT property detected on X server, WINDOWPATH won't be set");
+ return;
+ }
+ if (nitems != 1) {
+ Errorx("XFree86_VT property unexpectedly has %lu items instead of 1", nitems);
+ XFree(buf);
+ return;
+ }
+ switch (actualtype) {
+ case XA_CARDINAL:
+ case XA_INTEGER:
+ case XA_WINDOW:
+ switch (actualformat) {
+ case 8:
+ num = (*(uint8_t *)(void *)buf);
+ break;
+ case 16:
+ num = (*(uint16_t *)(void *)buf);
+ break;
+ case 32:
+ num = (*(uint32_t *)(void *)buf);
+ break;
+ default:
+ Errorx("XFree86_VT property has unexpected format %d", actualformat);
+ XFree(buf);
+ return;
+ }
+ break;
+ default:
+ Errorx("XFree86_VT property has unexpected type %lx", actualtype);
+ XFree(buf);
+ return;
+ }
+ XFree(buf);
+ windowpath = getenv("WINDOWPATH");
+ numn = snprintf(nums, sizeof(nums), "%lu", num);
+ if (!windowpath) {
+ len = numn + 1;
+ newwindowpath = malloc(len);
+ if (newwindowpath == NULL)
+ return;
+ snprintf(newwindowpath, len, "%s", nums);
+ } else {
+ len = strlen(windowpath) + 1 + numn + 1;
+ newwindowpath = malloc(len);
+ if (newwindowpath == NULL)
+ return;
+ snprintf(newwindowpath, len, "%s:%s",
+ windowpath, nums);
+ }
+ if (setenv("WINDOWPATH", newwindowpath, TRUE) == -1)
+ Error("unable to set WINDOWPATH");
+
+
+ free(newwindowpath);
}
static int
startClient(char *client[])
{
- setWindowPath();
- if ((clientpid = vfork()) == 0) {
- if (setuid(getuid()) == -1) {
- Error("cannot change uid: %s\n", strerror(errno));
- _exit(ERR_EXIT);
- }
- setpgid(0, getpid());
- environ = newenviron;
-#ifdef __UNIXOS2__
-#undef environ
- environ = newenviron;
- client[0] = (char*)__XOS2RedirRoot(client[0]);
-#endif
- Execute (client,newenviron);
- Error ("no program named \"%s\" in PATH\r\n", client[0]);
- fprintf (stderr,
-"\nSpecify a program on the command line or make sure that %s\r\n", bindir);
- fprintf (stderr,
-"is in your path.\r\n");
- fprintf (stderr, "\n");
- _exit (ERR_EXIT);
- }
- return (clientpid);
+ clientpid = fork();
+ if (clientpid == 0) {
+ set_environment();
+ setWindowPath();
+
+ if (setuid(getuid()) == -1) {
+ Error("cannot change uid");
+ _exit(EXIT_FAILURE);
+ }
+ setpgid(0, getpid());
+ Execute(client);
+ Error("Unable to run program \"%s\"", client[0]);
+
+ fprintf(stderr, "Specify a program on the command line or make sure that %s\n", bindir);
+ fprintf(stderr, "is in your path.\n\n");
+
+ _exit(EXIT_FAILURE);
+ } else {
+ return clientpid;
+ }
}
-#ifndef HAVE_KILLPG
-#define killpg(pgrp, sig) kill(-(pgrp), sig)
-#endif
-
static jmp_buf close_env;
-static int
+static int
ignorexio(Display *dpy)
{
- fprintf (stderr, "%s: connection to X server lost.\r\n", program);
- longjmp (close_env, 1);
+ Errorx("connection to X server lost");
+ longjmp(close_env, 1);
/*NOTREACHED*/
return 0;
}
-static void
+static void
shutdown(void)
{
- /* have kept display opened, so close it now */
- if (clientpid > 0) {
- XSetIOErrorHandler (ignorexio);
- if (! setjmp(close_env)) {
- XCloseDisplay(xd);
- }
-
- /* HUP all local clients to allow them to clean up */
- errno = 0;
- if ((killpg(clientpid, SIGHUP) != 0) &&
- (errno != ESRCH))
- Error("can't send HUP to process group %d\r\n",
- clientpid);
- }
-
- if (serverpid < 0)
- return;
- errno = 0;
- if (killpg(serverpid, SIGTERM) < 0) {
- if (errno == EPERM)
- Fatal("Can't kill X server\r\n");
- if (errno == ESRCH)
- return;
- }
- if (! processTimeout(10, "X server to shut down")) {
- fprintf (stderr, "\r\n");
- return;
- }
-
- fprintf(stderr,
- "\r\n%s: X server slow to shut down, sending KILL signal.\r\n",
- program);
- fflush(stderr);
- errno = 0;
- if (killpg(serverpid, SIGKILL) < 0) {
- if (errno == ESRCH)
- return;
- }
- if (processTimeout(3, "server to die")) {
- fprintf (stderr, "\r\n");
- Fatal("Can't kill server\r\n");
- }
- fprintf (stderr, "\r\n");
- return;
-}
+ /* have kept display opened, so close it now */
+ if (clientpid > 0) {
+ XSetIOErrorHandler(ignorexio);
+ if (! setjmp(close_env)) {
+ XCloseDisplay(xd);
+ }
+
+ /* HUP all local clients to allow them to clean up */
+ if (killpg(clientpid, SIGHUP) < 0 && errno != ESRCH)
+ Error("can't send HUP to process group %d", clientpid);
+ }
+ if (serverpid < 0)
+ return;
-/*
- * make a new copy of environment that has room for DISPLAY
- */
+ if (killpg(serverpid, SIGTERM) < 0) {
+ if (errno == ESRCH)
+ return;
+ Fatal("can't kill X server");
+ }
+
+ if (!processTimeout(10, "X server to shut down"))
+ return;
-static void
+ Errorx("X server slow to shut down, senging KILL signal");
+
+ if (killpg(serverpid, SIGKILL) < 0) {
+ if (errno == ESRCH)
+ return;
+ Error("can't SIGKILL X server");
+ }
+
+ if (processTimeout(3, "server to die"))
+ Fatalx("X server refuses to die");
+}
+
+static void
set_environment(void)
{
- int nenvvars;
- char **newPtr, **oldPtr;
- static char displaybuf[512];
-
- /* count number of environment variables */
- for (oldPtr = environ; *oldPtr; oldPtr++) ;
-
- nenvvars = (oldPtr - environ);
- newenviron = (char **) malloc ((nenvvars + 3) * sizeof(char **));
- if (!newenviron) {
- fprintf (stderr,
- "%s: unable to allocate %d pointers for environment\n",
- program, nenvvars + 3);
- exit (1);
- }
+ if (setenv("DISPLAY", displayNum, TRUE) == -1)
+ Fatal("unable to set DISPLAY");
+}
- /* put DISPLAY=displayname as first element */
- snprintf (displaybuf, sizeof(displaybuf), "DISPLAY=%s", displayNum);
- newPtr = newenviron;
- *newPtr++ = displaybuf;
-
- /* copy pointers to other variables */
- for (oldPtr = environ; *oldPtr; oldPtr++) {
- if (strncmp (*oldPtr, "DISPLAY=", 8) != 0
- && strncmp (*oldPtr, "WINDOWPATH=", 11) != 0) {
- *newPtr++ = *oldPtr;
- }
- }
- *newPtr = NULL;
- newenvironlast=newPtr;
- return;
+static void
+verror(const char *fmt, va_list ap)
+{
+ fprintf(stderr, "%s: ", program);
+ vfprintf(stderr, fmt, ap);
+ fprintf(stderr, ": %s\n", strerror(errno));
+}
+
+static void
+verrorx(const char *fmt, va_list ap)
+{
+ fprintf(stderr, "%s: ", program);
+ vfprintf(stderr, fmt, ap);
+ fprintf(stderr, "\n");
+}
+
+static void
+Fatal(const char *fmt, ...)
+{
+ va_list ap;
+ va_start(ap, fmt);
+ verror(fmt, ap);
+ va_end(ap);
+ exit(EXIT_FAILURE);
+}
+
+static void
+Fatalx(const char *fmt, ...)
+{
+ va_list ap;
+ va_start(ap, fmt);
+ verrorx(fmt, ap);
+ va_end(ap);
+ exit(EXIT_FAILURE);
}
static void
-Fatal(char *msg)
+Error(const char *fmt, ...)
{
- Error(msg);
- exit(ERR_EXIT);
+ va_list ap;
+ va_start(ap, fmt);
+ verror(fmt, ap);
+ va_end(ap);
}
static void
-Error(char *fmt, ...)
+Errorx(const char *fmt, ...)
{
- va_list ap;
-
- va_start(ap, fmt);
- fprintf(stderr, "%s: ", program);
- if (errno > 0)
- fprintf (stderr, "%s (errno %d): ", strerror(errno), errno);
- vfprintf(stderr, fmt, ap);
- va_end(ap);
+ va_list ap;
+ va_start(ap, fmt);
+ verrorx(fmt, ap);
+ va_end(ap);
}
diff --git a/app/xinit/xinit.def b/app/xinit/xinit.def
deleted file mode 100644
index 92c417696..000000000
--- a/app/xinit/xinit.def
+++ /dev/null
@@ -1,4 +0,0 @@
-NAME xinit NOTWINDOWCOMPAT
-DESCRIPTION "@#XFREE86:4.4.0#@ $XFree86: xc/programs/xinit/xinit.def,v 3.2 2002/05/31 18:46:13 dawes Exp $"
-PROTMODE
-EXETYPE OS2
diff --git a/app/xinit/xinitrc.cmd b/app/xinit/xinitrc.cmd
deleted file mode 100644
index 623a15910..000000000
--- a/app/xinit/xinitrc.cmd
+++ /dev/null
@@ -1,61 +0,0 @@
-/* OS/2 REXX */
-'@echo off'
-env = 'OS2ENVIRONMENT'
-x11root = VALUE('X11ROOT',,env)
-IF x11root = '' THEN DO
- SAY "The environment variable X11ROOT is not set. X/OS2 won't run without it."
- EXIT
-END
-home = VALUE('HOME',,env)
-IF home = '' THEN home = x11root
-
-userresources = home'\.Xresources'
-usermodmap = home'\.Xmodmap'
-sysresources = x11root'\usr\X11R6\lib\X11\xinit\.Xresources'
-sysmodmap = x11root'\usr\X11R6\lib\X11\xinit\.Xmodmap'
-xbitmapdir = x11root'\usr\X11R6\include\X11\bitmaps'
-manpath = VALUE('MANPATH',,env)
-
-/* merge in defaults */
-IF exists(sysresources) THEN
- 'xrdb -merge 'sysresources
-
-IF exists(sysmodmap) THEN
- 'xmodmap 'sysmodmap
-
-IF exists(userresources) THEN
- 'xrdb -merge 'userresources
-
-IF exists(usermodmap) THEN
- 'xmodmap 'usermodmap
-
-/* start some nice :-) test programs */
-'xsetroot -bitmap 'xbitmapdir'\xos2'
-/* also try out the following ones:
- * 'xsetroot -bitmap 'xbitmapdir'\xfree1'
- * 'xsetroot -bitmap 'xbitmapdir'\xfree2'
- */
-
-/****** WARNING! *********
- * Below some programs are started minimized, some are started detached.
- * In general, those that spawn other shells are minimized, others may be
- * detached. You might be tempted to run the xterm's as well as detached.
- * This works, but leaves you with an independent xterm/cmd pair, when the
- * server shuts down, which you can only see in watchcat, not the process list.
- * If you start and stop x11 multiple times, this will let you run out of
- * PTYs, and will lead to a large number of background sessions.
- */
-'detach xclock -update 1 -geometry 100x100-1+1'
-'start/min/n "Login Xterm" xterm -sb -geometry 80x25+0+0 -name login'
-IF manpath \= '' THEN
- 'detach xman -geometry 100x100-105+1'
-/* 'startx/min/n "Xterm 1" xterm -sb -geometry 80x50+494+51' */
-/* 'startx/min/n "Xterm 2" xterm -sb -geometry 80x20+494-0' */
-'twm'
-
-EXIT
-
-exists:
-'DIR "'arg(1)'" >nul 2>&1'
-if rc = 0 THEN RETURN 1
-RETURN 0