diff --git a/packages/x11/xserver/xorg-server/build b/packages/x11/xserver/xorg-server/build index a0ed2ff111..eb45179c3e 100755 --- a/packages/x11/xserver/xorg-server/build +++ b/packages/x11/xserver/xorg-server/build @@ -23,8 +23,8 @@ $SCRIPTS/build libXfont $SCRIPTS/build libxkbfile $SCRIPTS/build libXv $SCRIPTS/build libXvMC -$SCRIPTS/build $LIBDRM -$SCRIPTS/build $MESA +$SCRIPTS/build libdrm +$SCRIPTS/build Mesa $SCRIPTS/build openssl $SCRIPTS/build freetype $SCRIPTS/build libfontenc @@ -35,7 +35,6 @@ $SCRIPTS/build dbus $SCRIPTS/build hal cd $PKG_BUILD -autoconf ./configure --host=$TARGET_NAME \ --build=$HOST_NAME \ --prefix=/usr \ @@ -72,9 +71,6 @@ autoconf --disable-xcalibrate \ --disable-tslib \ --disable-multibuffer \ - --disable-cup \ - --disable-evi \ - --disable-fontcache \ --enable-dbe \ --enable-xf86bigfont \ --disable-dpms \ diff --git a/packages/x11/xserver/xorg-server/patches/01_cache-xkbcomp-output-for-fast-start-up-v5.1.diff b/packages/x11/xserver/xorg-server/patches/01_cache-xkbcomp-output-for-fast-start-up-v5.1.diff new file mode 100644 index 0000000000..2a6368b1aa --- /dev/null +++ b/packages/x11/xserver/xorg-server/patches/01_cache-xkbcomp-output-for-fast-start-up-v5.1.diff @@ -0,0 +1,5595 @@ +diff -Naur xorg-server-1.6.1.901/aclocal.m4 xorg-server-1.6.1.901.patch/aclocal.m4 +--- xorg-server-1.6.1.901/aclocal.m4 2009-05-09 07:05:36.000000000 +0200 ++++ xorg-server-1.6.1.901.patch/aclocal.m4 2009-05-20 02:49:58.115266871 +0200 +@@ -2485,10 +2485,13 @@ + # before this can be enabled. + hardcode_into_libs=yes + ++ # Add ABI-specific directories to the system library path. ++ sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" ++ + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` +- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" ++ sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on +@@ -2500,18 +2503,6 @@ + dynamic_linker='GNU/Linux ld.so' + ;; + +-netbsdelf*-gnu) +- version_type=linux +- need_lib_prefix=no +- need_version=no +- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' +- soname_spec='${libname}${release}${shared_ext}$major' +- shlibpath_var=LD_LIBRARY_PATH +- shlibpath_overrides_runpath=no +- hardcode_into_libs=yes +- dynamic_linker='NetBSD ld.elf_so' +- ;; +- + netbsd*) + version_type=sunos + need_lib_prefix=no +@@ -3103,7 +3094,7 @@ + lt_cv_deplibs_check_method=pass_all + ;; + +-netbsd* | netbsdelf*-gnu) ++netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + else +@@ -3784,7 +3775,7 @@ + ;; + esac + ;; +- netbsd* | netbsdelf*-gnu) ++ netbsd*) + ;; + *qnx* | *nto*) + # QNX uses GNU C++, but need to define -shared option too, otherwise +@@ -4209,9 +4200,6 @@ + cygwin* | mingw* | cegcc*) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' + ;; +- linux* | k*bsd*-gnu) +- _LT_TAGVAR(link_all_deplibs, $1)=no +- ;; + *) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; +@@ -4276,9 +4264,6 @@ + openbsd*) + with_gnu_ld=no + ;; +- linux* | k*bsd*-gnu) +- _LT_TAGVAR(link_all_deplibs, $1)=no +- ;; + esac + + _LT_TAGVAR(ld_shlibs, $1)=yes +@@ -4461,7 +4446,7 @@ + fi + ;; + +- netbsd* | netbsdelf*-gnu) ++ netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= +@@ -4636,7 +4621,6 @@ + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi +- _LT_TAGVAR(link_all_deplibs, $1)=no + else + # not using gcc + if test "$host_cpu" = ia64; then +@@ -4875,7 +4859,7 @@ + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + +- netbsd* | netbsdelf*-gnu) ++ netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else +@@ -8052,16 +8036,14 @@ + # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) + # --------------------------------------------- + m4_define([_PKG_CONFIG], +-[if test -n "$PKG_CONFIG"; then +- if test -n "$$1"; then +- pkg_cv_[]$1="$$1" +- else +- PKG_CHECK_EXISTS([$3], +- [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], +- [pkg_failed=yes]) +- fi +-else +- pkg_failed=untried ++[if test -n "$$1"; then ++ pkg_cv_[]$1="$$1" ++ elif test -n "$PKG_CONFIG"; then ++ PKG_CHECK_EXISTS([$3], ++ [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], ++ [pkg_failed=yes]) ++ else ++ pkg_failed=untried + fi[]dnl + ])# _PKG_CONFIG + +@@ -8105,9 +8087,9 @@ + if test $pkg_failed = yes; then + _PKG_SHORT_ERRORS_SUPPORTED + if test $_pkg_short_errors_supported = yes; then +- $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` ++ $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` + else +- $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` ++ $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD +@@ -8142,1586 +8124,1589 @@ + fi[]dnl + ])# PKG_CHECK_MODULES + +-# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +-# +-# This file is free software; the Free Software Foundation +-# gives unlimited permission to copy and/or distribute it, +-# with or without modifications, as long as this notice is preserved. +- +-# AM_AUTOMAKE_VERSION(VERSION) +-# ---------------------------- +-# Automake X.Y traces this macro to ensure aclocal.m4 has been +-# generated from the m4 files accompanying Automake X.Y. +-# (This private macro should not be called outside this file.) +-AC_DEFUN([AM_AUTOMAKE_VERSION], +-[am__api_version='1.10' +-dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to +-dnl require some minimum version. Point them to the right macro. +-m4_if([$1], [1.10.2], [], +- [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl +-]) +- +-# _AM_AUTOCONF_VERSION(VERSION) +-# ----------------------------- +-# aclocal traces this macro to find the Autoconf version. +-# This is a private macro too. Using m4_define simplifies +-# the logic in aclocal, which can simply ignore this definition. +-m4_define([_AM_AUTOCONF_VERSION], []) +- +-# AM_SET_CURRENT_AUTOMAKE_VERSION +-# ------------------------------- +-# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. +-# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. +-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], +-[AM_AUTOMAKE_VERSION([1.10.2])dnl +-m4_ifndef([AC_AUTOCONF_VERSION], +- [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl +-_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) +- +-# Figure out how to run the assembler. -*- Autoconf -*- +- +-# Copyright (C) 2001, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +-# +-# This file is free software; the Free Software Foundation +-# gives unlimited permission to copy and/or distribute it, +-# with or without modifications, as long as this notice is preserved. +- +-# serial 5 +- +-# AM_PROG_AS +-# ---------- +-AC_DEFUN([AM_PROG_AS], +-[# By default we simply use the C compiler to build assembly code. +-AC_REQUIRE([AC_PROG_CC]) +-test "${CCAS+set}" = set || CCAS=$CC +-test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS +-AC_ARG_VAR([CCAS], [assembler compiler command (defaults to CC)]) +-AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)]) +-_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl +-]) +- +-# AM_AUX_DIR_EXPAND -*- Autoconf -*- +- +-# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +-# +-# This file is free software; the Free Software Foundation +-# gives unlimited permission to copy and/or distribute it, +-# with or without modifications, as long as this notice is preserved. ++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 ++dnl Permission is hereby granted, free of charge, to any person obtaining a ++dnl copy of this software and associated documentation files (the ++dnl "Software"), to deal in the Software without restriction, including ++dnl without limitation the rights to use, copy, modify, merge, publish, ++dnl distribute, and/or sell copies of the Software, and to permit persons ++dnl to whom the Software is furnished to do so, provided that the above ++dnl copyright notice(s) and this permission notice appear in all copies of ++dnl the Software and that both the above copyright notice(s) and this ++dnl permission notice appear in supporting documentation. ++dnl ++dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ++dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT ++dnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR ++dnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL ++dnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING ++dnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, ++dnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION ++dnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ++dnl ++dnl Except as contained in this notice, the name of a copyright holder ++dnl shall not be used in advertising or otherwise to promote the sale, use ++dnl or other dealings in this Software without prior written authorization ++dnl of the copyright holder. + +-# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +-# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to +-# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +-# +-# Of course, Automake must honor this variable whenever it calls a +-# tool from the auxiliary directory. The problem is that $srcdir (and +-# therefore $ac_aux_dir as well) can be either absolute or relative, +-# depending on how configure is run. This is pretty annoying, since +-# it makes $ac_aux_dir quite unusable in subdirectories: in the top +-# source directory, any form will work fine, but in subdirectories a +-# relative path needs to be adjusted first. ++# XORG_MACROS_VERSION(required-version) ++# ------------------------------------- ++# Minimum version: 1.1.0 + # +-# $ac_aux_dir/missing +-# fails when called from a subdirectory if $ac_aux_dir is relative +-# $top_srcdir/$ac_aux_dir/missing +-# fails if $ac_aux_dir is absolute, +-# fails when called from a subdirectory in a VPATH build with +-# a relative $ac_aux_dir ++# If you're using a macro added in Version 1.1 or newer, include this in ++# your configure.ac with the minimum required version, such as: ++# XORG_MACROS_VERSION(1.1) + # +-# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +-# are both prefixed by $srcdir. In an in-source build this is usually +-# harmless because $srcdir is `.', but things will broke when you +-# start a VPATH build or use an absolute $srcdir. ++# To force at least a version with this macro defined, also add: ++# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])]) + # +-# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +-# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +-# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +-# and then we would define $MISSING as +-# MISSING="\${SHELL} $am_aux_dir/missing" +-# This will work as long as MISSING is not called from configure, because +-# unfortunately $(top_srcdir) has no meaning in configure. +-# However there are other variables, like CC, which are often used in +-# configure, and could therefore not use this "fixed" $ac_aux_dir. + # +-# Another solution, used here, is to always expand $ac_aux_dir to an +-# absolute PATH. The drawback is that using absolute paths prevent a +-# configured tree to be moved without reconfiguration. +- +-AC_DEFUN([AM_AUX_DIR_EXPAND], +-[dnl Rely on autoconf to set up CDPATH properly. +-AC_PREREQ([2.50])dnl +-# expand $ac_aux_dir to an absolute path +-am_aux_dir=`cd $ac_aux_dir && pwd` +-]) +- +-# AM_CONDITIONAL -*- Autoconf -*- ++# See the "minimum version" comment for each macro you use to see what ++# version you require. ++AC_DEFUN([XORG_MACROS_VERSION],[ ++ [XORG_MACROS_needed_version=$1 ++ XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'` ++ XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] ++ AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}]) ++ [XORG_MACROS_version=1.2.1 ++ XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'` ++ XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] ++ if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then ++ AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x]) ++ fi ++ if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then ++ AC_MSG_ERROR([configure built with too old of a version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.${XORG_MACROS_minor}.0 or newer]) ++ fi ++ AC_MSG_RESULT([yes, $XORG_MACROS_version]) ++]) # XORG_MACROS_VERSION + +-# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 +-# Free Software Foundation, Inc. ++# XORG_PROG_RAWCPP() ++# ------------------ ++# Minimum version: 1.0.0 + # +-# 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. ++# Find cpp program and necessary flags for use in pre-processing text files ++# such as man pages and config files ++AC_DEFUN([XORG_PROG_RAWCPP],[ ++AC_REQUIRE([AC_PROG_CPP]) ++AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], ++ [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) + +-# serial 8 ++# Check for flag to avoid builtin definitions - assumes unix is predefined, ++# which is not the best choice for supporting other OS'es, but covers most ++# of the ones we need for now. ++AC_MSG_CHECKING([if $RAWCPP requires -undef]) ++AC_LANG_CONFTEST([Does cpp redefine unix ?]) ++if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then ++ AC_MSG_RESULT([no]) ++else ++ if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then ++ RAWCPPFLAGS=-undef ++ AC_MSG_RESULT([yes]) ++ # under Cygwin unix is still defined even with -undef ++ elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then ++ RAWCPPFLAGS="-undef -ansi" ++ AC_MSG_RESULT([yes, with -ansi]) ++ else ++ AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) ++ fi ++fi ++rm -f conftest.$ac_ext + +-# AM_CONDITIONAL(NAME, SHELL-CONDITION) +-# ------------------------------------- +-# Define a conditional. +-AC_DEFUN([AM_CONDITIONAL], +-[AC_PREREQ(2.52)dnl +- ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], +- [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +-AC_SUBST([$1_TRUE])dnl +-AC_SUBST([$1_FALSE])dnl +-_AM_SUBST_NOTMAKE([$1_TRUE])dnl +-_AM_SUBST_NOTMAKE([$1_FALSE])dnl +-if $2; then +- $1_TRUE= +- $1_FALSE='#' ++AC_MSG_CHECKING([if $RAWCPP requires -traditional]) ++AC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) ++if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then ++ AC_MSG_RESULT([no]) + else +- $1_TRUE='#' +- $1_FALSE= ++ if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then ++ RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" ++ AC_MSG_RESULT([yes]) ++ else ++ AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) ++ fi + fi +-AC_CONFIG_COMMANDS_PRE( +-[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then +- AC_MSG_ERROR([[conditional "$1" was never defined. +-Usually this means the macro was only invoked conditionally.]]) +-fi])]) ++rm -f conftest.$ac_ext ++AC_SUBST(RAWCPPFLAGS) ++]) # XORG_PROG_RAWCPP + +-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 +-# Free Software Foundation, Inc. ++# XORG_MANPAGE_SECTIONS() ++# ----------------------- ++# Minimum version: 1.0.0 + # +-# This file is free software; the Free Software Foundation +-# gives unlimited permission to copy and/or distribute it, +-# with or without modifications, as long as this notice is preserved. +- +-# serial 9 ++# Determine which sections man pages go in for the different man page types ++# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. ++# Not sure if there's any better way than just hardcoding by OS name. ++# Override default settings by setting environment variables + +-# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +-# written in clear, in which case automake, when reading aclocal.m4, +-# will think it sees a *use*, and therefore will trigger all it's +-# C support machinery. Also note that it means that autoscan, seeing +-# CC etc. in the Makefile, will ask for an AC_PROG_CC use... ++AC_DEFUN([XORG_MANPAGE_SECTIONS],[ ++AC_REQUIRE([AC_CANONICAL_HOST]) + ++if test x$APP_MAN_SUFFIX = x ; then ++ APP_MAN_SUFFIX=1 ++fi ++if test x$APP_MAN_DIR = x ; then ++ APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' ++fi + +-# _AM_DEPENDENCIES(NAME) +-# ---------------------- +-# See how the compiler implements dependency checking. +-# NAME is "CC", "CXX", "GCJ", or "OBJC". +-# We try a few techniques and use that to set a single cache variable. +-# +-# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was +-# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular +-# dependency, and given that the user is not expected to run this macro, +-# just rely on AC_PROG_CC. +-AC_DEFUN([_AM_DEPENDENCIES], +-[AC_REQUIRE([AM_SET_DEPDIR])dnl +-AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl +-AC_REQUIRE([AM_MAKE_INCLUDE])dnl +-AC_REQUIRE([AM_DEP_TRACK])dnl ++if test x$LIB_MAN_SUFFIX = x ; then ++ LIB_MAN_SUFFIX=3 ++fi ++if test x$LIB_MAN_DIR = x ; then ++ LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' ++fi + +-ifelse([$1], CC, [depcc="$CC" am_compiler_list=], +- [$1], CXX, [depcc="$CXX" am_compiler_list=], +- [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], +- [$1], UPC, [depcc="$UPC" am_compiler_list=], +- [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], +- [depcc="$$1" am_compiler_list=]) ++if test x$FILE_MAN_SUFFIX = x ; then ++ case $host_os in ++ solaris*) FILE_MAN_SUFFIX=4 ;; ++ *) FILE_MAN_SUFFIX=5 ;; ++ esac ++fi ++if test x$FILE_MAN_DIR = x ; then ++ FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' ++fi + +-AC_CACHE_CHECK([dependency style of $depcc], +- [am_cv_$1_dependencies_compiler_type], +-[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then +- # We make a subdir and do the tests there. Otherwise we can end up +- # making bogus files that we don't know about and never remove. For +- # instance it was reported that on HP-UX the gcc test will end up +- # making a dummy file named `D' -- because `-MD' means `put the output +- # in D'. +- mkdir conftest.dir +- # Copy depcomp to subdir because otherwise we won't find it if we're +- # using a relative directory. +- cp "$am_depcomp" conftest.dir +- cd conftest.dir +- # We will build objects and dependencies in a subdirectory because +- # it helps to detect inapplicable dependency modes. For instance +- # both Tru64's cc and ICC support -MD to output dependencies as a +- # side effect of compilation, but ICC will put the dependencies in +- # the current directory while Tru64 will put them in the object +- # directory. +- mkdir sub ++if test x$MISC_MAN_SUFFIX = x ; then ++ case $host_os in ++ solaris*) MISC_MAN_SUFFIX=5 ;; ++ *) MISC_MAN_SUFFIX=7 ;; ++ esac ++fi ++if test x$MISC_MAN_DIR = x ; then ++ MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' ++fi + +- am_cv_$1_dependencies_compiler_type=none +- if test "$am_compiler_list" = ""; then +- am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` +- fi +- for depmode in $am_compiler_list; do +- # Setup a source with many dependencies, because some compilers +- # like to wrap large dependency lists on column 80 (with \), and +- # we should not choose a depcomp mode which is confused by this. +- # +- # We need to recreate these files for each test, as the compiler may +- # overwrite some of them when testing with obscure command lines. +- # This happens at least with the AIX C compiler. +- : > sub/conftest.c +- for i in 1 2 3 4 5 6; do +- echo '#include "conftst'$i'.h"' >> sub/conftest.c +- # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with +- # Solaris 8's {/usr,}/bin/sh. +- touch sub/conftst$i.h +- done +- echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf ++if test x$DRIVER_MAN_SUFFIX = x ; then ++ case $host_os in ++ solaris*) DRIVER_MAN_SUFFIX=7 ;; ++ *) DRIVER_MAN_SUFFIX=4 ;; ++ esac ++fi ++if test x$DRIVER_MAN_DIR = x ; then ++ DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' ++fi + +- 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 ;; ++if test x$ADMIN_MAN_SUFFIX = x ; then ++ case $host_os in ++ solaris*) ADMIN_MAN_SUFFIX=1m ;; ++ *) ADMIN_MAN_SUFFIX=8 ;; + 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/conftst1.h sub/conftest.Po > /dev/null 2>&1 && +- grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && +- grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && +- ${MAKE-make} -s -f confmf > /dev/null 2>&1; then +- # icc doesn't choke on unknown options, it will just issue warnings +- # or remarks (even with -Werror). So we grep stderr for any message +- # that says an option was ignored or not supported. +- # When given -MP, icc 7.0 and 7.1 complain thusly: +- # icc: Command line warning: ignoring option '-M'; no argument required +- # The diagnosis changed in icc 8.0: +- # icc: Command line remark: option '-MP' not supported +- if (grep 'ignoring option' conftest.err || +- grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else +- am_cv_$1_dependencies_compiler_type=$depmode +- break +- fi +- fi +- done ++fi ++if test x$ADMIN_MAN_DIR = x ; then ++ ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' ++fi + +- cd .. +- rm -rf conftest.dir ++ ++AC_SUBST([APP_MAN_SUFFIX]) ++AC_SUBST([LIB_MAN_SUFFIX]) ++AC_SUBST([FILE_MAN_SUFFIX]) ++AC_SUBST([MISC_MAN_SUFFIX]) ++AC_SUBST([DRIVER_MAN_SUFFIX]) ++AC_SUBST([ADMIN_MAN_SUFFIX]) ++AC_SUBST([APP_MAN_DIR]) ++AC_SUBST([LIB_MAN_DIR]) ++AC_SUBST([FILE_MAN_DIR]) ++AC_SUBST([MISC_MAN_DIR]) ++AC_SUBST([DRIVER_MAN_DIR]) ++AC_SUBST([ADMIN_MAN_DIR]) ++]) # XORG_MANPAGE_SECTIONS ++ ++# XORG_CHECK_LINUXDOC ++# ------------------- ++# Minimum version: 1.0.0 ++# ++# Defines the variable MAKE_TEXT if the necessary tools and ++# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. ++# Whether or not the necessary tools and files are found can be checked ++# with the AM_CONDITIONAL "BUILD_LINUXDOC" ++AC_DEFUN([XORG_CHECK_LINUXDOC],[ ++if test x$XORG_SGML_PATH = x ; then ++ XORG_SGML_PATH=$prefix/share/sgml ++fi ++HAVE_DEFS_ENT= ++ ++if test x"$cross_compiling" = x"yes" ; then ++ HAVE_DEFS_ENT=no + else +- am_cv_$1_dependencies_compiler_type=none ++ AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) + fi +-]) +-AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +-AM_CONDITIONAL([am__fastdep$1], [ +- test "x$enable_dependency_tracking" != xno \ +- && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +-]) + ++AC_PATH_PROG(LINUXDOC, linuxdoc) ++AC_PATH_PROG(PS2PDF, ps2pdf) + +-# AM_SET_DEPDIR +-# ------------- +-# Choose a directory name for dependency files. +-# This macro is AC_REQUIREd in _AM_DEPENDENCIES +-AC_DEFUN([AM_SET_DEPDIR], +-[AC_REQUIRE([AM_SET_LEADING_DOT])dnl +-AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +-]) ++AC_MSG_CHECKING([Whether to build documentation]) + ++if test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then ++ BUILDDOC=yes ++else ++ BUILDDOC=no ++fi + +-# AM_DEP_TRACK +-# ------------ +-AC_DEFUN([AM_DEP_TRACK], +-[AC_ARG_ENABLE(dependency-tracking, +-[ --disable-dependency-tracking speeds up one-time build +- --enable-dependency-tracking do not reject slow dependency extractors]) +-if test "x$enable_dependency_tracking" != xno; then +- am_depcomp="$ac_aux_dir/depcomp" +- AMDEPBACKSLASH='\' ++AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) ++ ++AC_MSG_RESULT([$BUILDDOC]) ++ ++AC_MSG_CHECKING([Whether to build pdf documentation]) ++ ++if test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then ++ BUILDPDFDOC=yes ++else ++ BUILDPDFDOC=no + fi +-AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +-AC_SUBST([AMDEPBACKSLASH])dnl +-_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +-]) + +-# Generate code to set up dependency tracking. -*- Autoconf -*- ++AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) + +-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 +-# 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. ++AC_MSG_RESULT([$BUILDPDFDOC]) + +-#serial 4 +- +-# _AM_OUTPUT_DEPENDENCY_COMMANDS +-# ------------------------------ +-AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +-[# Autoconf 2.62 quotes --file arguments for eval, but not when files +-# are listed without --file. Let's play safe and only enable the eval +-# if we detect the quoting. +-case $CONFIG_FILES in +-*\'*) eval set x "$CONFIG_FILES" ;; +-*) set x $CONFIG_FILES ;; +-esac +-shift +-for mf +-do +- # Strip MF so we end up with the name of the file. +- mf=`echo "$mf" | sed -e 's/:.*$//'` +- # Check whether this is an Automake generated Makefile or not. +- # We used to match only the files named `Makefile.in', but +- # some people rename them; so instead we look at the file content. +- # Grep'ing the first line is not enough: some people post-process +- # each Makefile.in and add a new line on top of each file to say so. +- # Grep'ing the whole file is not good either: AIX grep has a line +- # limit of 2048, but all sed's we know have understand at least 4000. +- if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then +- dirpart=`AS_DIRNAME("$mf")` +- else +- continue +- fi +- # Extract the definition of DEPDIR, am__include, and am__quote +- # from the Makefile without running `make'. +- DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` +- test -z "$DEPDIR" && continue +- am__include=`sed -n 's/^am__include = //p' < "$mf"` +- test -z "am__include" && continue +- am__quote=`sed -n 's/^am__quote = //p' < "$mf"` +- # When using ansi2knr, U may be empty or an underscore; expand it +- U=`sed -n 's/^U = //p' < "$mf"` +- # Find all dependency output files, they are included files with +- # $(DEPDIR) in their names. We invoke sed twice because it is the +- # simplest approach to changing $(DEPDIR) to its actual value in the +- # expansion. +- for file in `sed -n " +- s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ +- sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do +- # Make sure the directory exists. +- test -f "$dirpart/$file" && continue +- fdir=`AS_DIRNAME(["$file"])` +- AS_MKDIR_P([$dirpart/$fdir]) +- # echo "creating $dirpart/$file" +- echo '# dummy' > "$dirpart/$file" +- done +-done +-])# _AM_OUTPUT_DEPENDENCY_COMMANDS ++MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" ++MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" ++MAKE_PDF="$PS2PDF" ++MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" + ++AC_SUBST(MAKE_TEXT) ++AC_SUBST(MAKE_PS) ++AC_SUBST(MAKE_PDF) ++AC_SUBST(MAKE_HTML) ++]) # XORG_CHECK_LINUXDOC + +-# AM_OUTPUT_DEPENDENCY_COMMANDS +-# ----------------------------- +-# This macro should only be invoked once -- use via AC_REQUIRE. ++# XORG_CHECK_DOCBOOK ++# ------------------- ++# Minimum version: 1.0.0 + # +-# This code is only required when automatic dependency tracking +-# is enabled. FIXME. This creates each `.P' file that we will +-# need in order to bootstrap the dependency handling code. +-AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], +-[AC_CONFIG_COMMANDS([depfiles], +- [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], +- [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) +-]) ++# Checks for the ability to build output formats from SGML DocBook source. ++# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" ++# indicates whether the necessary tools and files are found and, if set, ++# $(MAKE_XXX) blah.sgml will produce blah.xxx. ++AC_DEFUN([XORG_CHECK_DOCBOOK],[ ++if test x$XORG_SGML_PATH = x ; then ++ XORG_SGML_PATH=$prefix/share/sgml ++fi ++HAVE_DEFS_ENT= ++BUILDTXTDOC=no ++BUILDPDFDOC=no ++BUILDPSDOC=no ++BUILDHTMLDOC=no + +-# Do all the work for Automake. -*- Autoconf -*- ++AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) + +-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, +-# 2005, 2006, 2008 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. ++AC_PATH_PROG(DOCBOOKPS, docbook2ps) ++AC_PATH_PROG(DOCBOOKPDF, docbook2pdf) ++AC_PATH_PROG(DOCBOOKHTML, docbook2html) ++AC_PATH_PROG(DOCBOOKTXT, docbook2txt) + +-# serial 13 ++AC_MSG_CHECKING([Whether to build text documentation]) ++if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x && ++ test x$BUILD_TXTDOC != xno; then ++ BUILDTXTDOC=yes ++fi ++AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) ++AC_MSG_RESULT([$BUILDTXTDOC]) + +-# This macro actually does too much. Some checks are only needed if +-# your package does certain things. But this isn't really a big deal. ++AC_MSG_CHECKING([Whether to build PDF documentation]) ++if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x && ++ test x$BUILD_PDFDOC != xno; then ++ BUILDPDFDOC=yes ++fi ++AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) ++AC_MSG_RESULT([$BUILDPDFDOC]) + +-# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +-# AM_INIT_AUTOMAKE([OPTIONS]) +-# ----------------------------------------------- +-# The call with PACKAGE and VERSION arguments is the old style +-# call (pre autoconf-2.50), which is being phased out. PACKAGE +-# and VERSION should now be passed to AC_INIT and removed from +-# the call to AM_INIT_AUTOMAKE. +-# We support both call styles for the transition. After +-# the next Automake release, Autoconf can make the AC_INIT +-# arguments mandatory, and then we can depend on a new Autoconf +-# release and drop the old call support. +-AC_DEFUN([AM_INIT_AUTOMAKE], +-[AC_PREREQ([2.60])dnl +-dnl Autoconf wants to disallow AM_ names. We explicitly allow +-dnl the ones we care about. +-m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +-AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +-AC_REQUIRE([AC_PROG_INSTALL])dnl +-if test "`cd $srcdir && pwd`" != "`pwd`"; then +- # Use -I$(srcdir) only when $(srcdir) != ., so that make's output +- # is not polluted with repeated "-I." +- AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl +- # test to see if srcdir already configured +- if test -f $srcdir/config.status; then +- AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) +- fi ++AC_MSG_CHECKING([Whether to build PostScript documentation]) ++if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x && ++ test x$BUILD_PSDOC != xno; then ++ BUILDPSDOC=yes + fi ++AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) ++AC_MSG_RESULT([$BUILDPSDOC]) + +-# test whether we have cygpath +-if test -z "$CYGPATH_W"; then +- if (cygpath --version) >/dev/null 2>/dev/null; then +- CYGPATH_W='cygpath -w' +- else +- CYGPATH_W=echo +- fi ++AC_MSG_CHECKING([Whether to build HTML documentation]) ++if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x && ++ test x$BUILD_HTMLDOC != xno; then ++ BUILDHTMLDOC=yes + fi +-AC_SUBST([CYGPATH_W]) ++AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) ++AC_MSG_RESULT([$BUILDHTMLDOC]) + +-# Define the identity of the package. +-dnl Distinguish between old-style and new-style calls. +-m4_ifval([$2], +-[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl +- AC_SUBST([PACKAGE], [$1])dnl +- AC_SUBST([VERSION], [$2])], +-[_AM_SET_OPTIONS([$1])dnl +-dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. +-m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, +- [m4_fatal([AC_INIT should be called with package and version arguments])])dnl +- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl +- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl ++MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" ++MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" ++MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" ++MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" + +-_AM_IF_OPTION([no-define],, +-[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) +- AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl ++AC_SUBST(MAKE_TEXT) ++AC_SUBST(MAKE_PS) ++AC_SUBST(MAKE_PDF) ++AC_SUBST(MAKE_HTML) ++]) # XORG_CHECK_DOCBOOK + +-# Some tools Automake needs. +-AC_REQUIRE([AM_SANITY_CHECK])dnl +-AC_REQUIRE([AC_ARG_PROGRAM])dnl +-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) +-AM_MISSING_PROG(AUTOCONF, autoconf) +-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) +-AM_MISSING_PROG(AUTOHEADER, autoheader) +-AM_MISSING_PROG(MAKEINFO, makeinfo) +-AM_PROG_INSTALL_SH +-AM_PROG_INSTALL_STRIP +-AC_REQUIRE([AM_PROG_MKDIR_P])dnl +-# We need awk for the "check" target. The system "awk" is bad on +-# some platforms. +-AC_REQUIRE([AC_PROG_AWK])dnl +-AC_REQUIRE([AC_PROG_MAKE_SET])dnl +-AC_REQUIRE([AM_SET_LEADING_DOT])dnl +-_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], +- [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], +- [_AM_PROG_TAR([v7])])]) +-_AM_IF_OPTION([no-dependencies],, +-[AC_PROVIDE_IFELSE([AC_PROG_CC], +- [_AM_DEPENDENCIES(CC)], +- [define([AC_PROG_CC], +- defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl +-AC_PROVIDE_IFELSE([AC_PROG_CXX], +- [_AM_DEPENDENCIES(CXX)], +- [define([AC_PROG_CXX], +- defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +-AC_PROVIDE_IFELSE([AC_PROG_OBJC], +- [_AM_DEPENDENCIES(OBJC)], +- [define([AC_PROG_OBJC], +- defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl +-]) +-]) ++# XORG_CHECK_MALLOC_ZERO ++# ---------------------- ++# Minimum version: 1.0.0 ++# ++# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if ++# malloc(0) returns NULL. Packages should add one of these cflags to ++# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. ++AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ ++AC_ARG_ENABLE(malloc0returnsnull, ++ AC_HELP_STRING([--enable-malloc0returnsnull], ++ [malloc(0) returns NULL (default: auto)]), ++ [MALLOC_ZERO_RETURNS_NULL=$enableval], ++ [MALLOC_ZERO_RETURNS_NULL=auto]) + ++AC_MSG_CHECKING([whether malloc(0) returns NULL]) ++if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then ++ AC_RUN_IFELSE([ ++char *malloc(); ++char *realloc(); ++char *calloc(); ++main() { ++ char *m0, *r0, *c0, *p; ++ m0 = malloc(0); ++ p = malloc(10); ++ r0 = realloc(p,0); ++ c0 = calloc(0); ++ exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); ++}], ++ [MALLOC_ZERO_RETURNS_NULL=yes], ++ [MALLOC_ZERO_RETURNS_NULL=no]) ++fi ++AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) + +-# When config.status generates a header, we must update the stamp-h file. +-# This file resides in the same directory as the config header +-# that is generated. The stamp files are numbered to have different names. ++if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then ++ MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" ++ XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS ++ XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" ++else ++ MALLOC_ZERO_CFLAGS="" ++ XMALLOC_ZERO_CFLAGS="" ++ XTMALLOC_ZERO_CFLAGS="" ++fi + +-# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +-# loop where config.status creates the headers, so we can generate +-# our stamp files there. +-AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +-[# Compute $1's index in $config_headers. +-_am_arg=$1 +-_am_stamp_count=1 +-for _am_header in $config_headers :; do +- case $_am_header in +- $_am_arg | $_am_arg:* ) +- break ;; +- * ) +- _am_stamp_count=`expr $_am_stamp_count + 1` ;; +- esac +-done +-echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) ++AC_SUBST([MALLOC_ZERO_CFLAGS]) ++AC_SUBST([XMALLOC_ZERO_CFLAGS]) ++AC_SUBST([XTMALLOC_ZERO_CFLAGS]) ++]) # XORG_CHECK_MALLOC_ZERO + +-# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. ++# XORG_WITH_LINT() ++# ---------------- ++# Minimum version: 1.1.0 + # +-# This file is free software; the Free Software Foundation +-# gives unlimited permission to copy and/or distribute it, +-# with or without modifications, as long as this notice is preserved. +- +-# AM_PROG_INSTALL_SH +-# ------------------ +-# Define $install_sh. +-AC_DEFUN([AM_PROG_INSTALL_SH], +-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +-install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} +-AC_SUBST(install_sh)]) +- +-# Copyright (C) 2003, 2005 Free Software Foundation, Inc. ++# Sets up flags for source checkers such as lint and sparse if --with-lint ++# is specified. (Use --with-lint=sparse for sparse.) ++# Sets $LINT to name of source checker passed with --with-lint (default: lint) ++# Sets $LINT_FLAGS to flags to pass to source checker ++# Sets LINT automake conditional if enabled (default: disabled) + # +-# This file is free software; the Free Software Foundation +-# gives unlimited permission to copy and/or distribute it, +-# with or without modifications, as long as this notice is preserved. +- +-# serial 2 ++AC_DEFUN([XORG_WITH_LINT],[ + +-# Check whether the underlying file-system supports filenames +-# with a leading dot. For instance MS-DOS doesn't. +-AC_DEFUN([AM_SET_LEADING_DOT], +-[rm -rf .tst 2>/dev/null +-mkdir .tst 2>/dev/null +-if test -d .tst; then +- am__leading_dot=. ++# Allow checking code with lint, sparse, etc. ++AC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint], ++ [Use a lint-style source code checker (default: disabled)])], ++ [use_lint=$withval], [use_lint=no]) ++if test "x$use_lint" = "xyes" ; then ++ LINT="lint" + else +- am__leading_dot=_ ++ LINT="$use_lint" ++fi ++if test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then ++ case $LINT in ++ lint|*/lint) ++ case $host_os in ++ solaris*) ++ LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" ++ ;; ++ esac ++ ;; ++ esac + fi +-rmdir .tst 2>/dev/null +-AC_SUBST([am__leading_dot])]) +- +-# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- +-# From Jim Meyering +- +-# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 +-# Free Software Foundation, Inc. +-# +-# This file is free software; the Free Software Foundation +-# gives unlimited permission to copy and/or distribute it, +-# with or without modifications, as long as this notice is preserved. +- +-# serial 4 +- +-AC_DEFUN([AM_MAINTAINER_MODE], +-[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) +- dnl maintainer-mode is disabled by default +- AC_ARG_ENABLE(maintainer-mode, +-[ --enable-maintainer-mode enable make rules and dependencies not useful +- (and sometimes confusing) to the casual installer], +- USE_MAINTAINER_MODE=$enableval, +- USE_MAINTAINER_MODE=no) +- AC_MSG_RESULT([$USE_MAINTAINER_MODE]) +- AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) +- MAINT=$MAINTAINER_MODE_TRUE +- AC_SUBST(MAINT)dnl +-] +-) + +-AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) ++AC_SUBST(LINT) ++AC_SUBST(LINT_FLAGS) ++AM_CONDITIONAL(LINT, [test x$LINT != xno]) + +-# Check to see how 'make' treats includes. -*- Autoconf -*- ++]) # XORG_WITH_LINT + +-# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. ++# XORG_LINT_LIBRARY(LIBNAME) ++# -------------------------- ++# Minimum version: 1.1.0 + # +-# This file is free software; the Free Software Foundation +-# gives unlimited permission to copy and/or distribute it, +-# with or without modifications, as long as this notice is preserved. +- +-# serial 3 +- +-# AM_MAKE_INCLUDE() +-# ----------------- +-# Check to see how make treats includes. +-AC_DEFUN([AM_MAKE_INCLUDE], +-[am_make=${MAKE-make} +-cat > confinc << 'END' +-am__doit: +- @echo done +-.PHONY: am__doit +-END +-# If we don't find an include directive, just comment out the code. +-AC_MSG_CHECKING([for style of include used by $am_make]) +-am__include="#" +-am__quote= +-_am_result=none +-# First try GNU make style include. +-echo "include confinc" > confmf +-# We grep out `Entering directory' and `Leaving directory' +-# messages which can occur if `w' ends up in MAKEFLAGS. +-# In particular we don't look at `^make:' because GNU make might +-# be invoked under some other name (usually "gmake"), in which +-# case it prints its new name instead of `make'. +-if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then +- am__include=include +- am__quote= +- _am_result=GNU +-fi +-# Now try BSD make style include. +-if test "$am__include" = "#"; then +- echo '.include "confinc"' > confmf +- if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then +- am__include=.include +- am__quote="\"" +- _am_result=BSD +- fi +-fi +-AC_SUBST([am__include]) +-AC_SUBST([am__quote]) +-AC_MSG_RESULT([$_am_result]) +-rm -f confinc confmf +-]) +- +-# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- +- +-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 +-# Free Software Foundation, Inc. ++# Sets up flags for building lint libraries for checking programs that call ++# functions in the library. ++# Disabled by default, enable with --enable-lint-library ++# Sets: ++# @LINTLIB@ - name of lint library file to make ++# MAKE_LINT_LIB - automake conditional + # +-# 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 5 +- +-# AM_MISSING_PROG(NAME, PROGRAM) +-# ------------------------------ +-AC_DEFUN([AM_MISSING_PROG], +-[AC_REQUIRE([AM_MISSING_HAS_RUN]) +-$1=${$1-"${am_missing_run}$2"} +-AC_SUBST($1)]) + +- +-# AM_MISSING_HAS_RUN +-# ------------------ +-# Define MISSING if not defined so far and test if it supports --run. +-# If it does, set am_missing_run to use it, otherwise, to nothing. +-AC_DEFUN([AM_MISSING_HAS_RUN], +-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +-AC_REQUIRE_AUX_FILE([missing])dnl +-test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +-# Use eval to expand $SHELL +-if eval "$MISSING --run true"; then +- am_missing_run="$MISSING --run " +-else +- am_missing_run= +- AC_MSG_WARN([`missing' script is too old or missing]) ++AC_DEFUN([XORG_LINT_LIBRARY],[ ++AC_REQUIRE([XORG_WITH_LINT]) ++# Build lint "library" for more indepth checks of programs calling this library ++AC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library], ++ [Create lint library (default: disabled)])], ++ [make_lint_lib=$enableval], [make_lint_lib=no]) ++if test "x$make_lint_lib" != "xno" ; then ++ if test "x$LINT" = "xno" ; then ++ AC_MSG_ERROR([Cannot make lint library without --with-lint]) ++ fi ++ if test "x$make_lint_lib" = "xyes" ; then ++ LINTLIB=llib-l$1.ln ++ else ++ LINTLIB=$make_lint_lib ++ fi + fi +-]) ++AC_SUBST(LINTLIB) ++AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) + +-# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +-# +-# This file is free software; the Free Software Foundation +-# gives unlimited permission to copy and/or distribute it, +-# with or without modifications, as long as this notice is preserved. ++]) # XORG_LINT_LIBRARY + +-# AM_PROG_MKDIR_P ++# XORG_CWARNFLAGS + # --------------- +-# Check for `mkdir -p'. +-AC_DEFUN([AM_PROG_MKDIR_P], +-[AC_PREREQ([2.60])dnl +-AC_REQUIRE([AC_PROG_MKDIR_P])dnl +-dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, +-dnl while keeping a definition of mkdir_p for backward compatibility. +-dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. +-dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of +-dnl Makefile.ins that do not define MKDIR_P, so we do our own +-dnl adjustment using top_builddir (which is defined more often than +-dnl MKDIR_P). +-AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl +-case $mkdir_p in +- [[\\/$]]* | ?:[[\\/]]*) ;; +- */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; +-esac +-]) +- +-# Helper functions for option handling. -*- Autoconf -*- +- +-# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. ++# Minimum version: 1.2.0 + # +-# This file is free software; the Free Software Foundation +-# gives unlimited permission to copy and/or distribute it, +-# with or without modifications, as long as this notice is preserved. +- +-# serial 4 +- +-# _AM_MANGLE_OPTION(NAME) +-# ----------------------- +-AC_DEFUN([_AM_MANGLE_OPTION], +-[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) +- +-# _AM_SET_OPTION(NAME) +-# ------------------------------ +-# Set option NAME. Presently that only means defining a flag for this option. +-AC_DEFUN([_AM_SET_OPTION], +-[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) +- +-# _AM_SET_OPTIONS(OPTIONS) +-# ---------------------------------- +-# OPTIONS is a space-separated list of Automake options. +-AC_DEFUN([_AM_SET_OPTIONS], +-[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) +- +-# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +-# ------------------------------------------- +-# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +-AC_DEFUN([_AM_IF_OPTION], +-[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) +- +-# Check to make sure that the build environment is sane. -*- Autoconf -*- +- +-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 +-# Free Software Foundation, Inc. ++# Defines CWARNFLAGS to enable C compiler warnings. + # +-# This file is free software; the Free Software Foundation +-# gives unlimited permission to copy and/or distribute it, +-# with or without modifications, as long as this notice is preserved. +- +-# serial 4 +- +-# AM_SANITY_CHECK +-# --------------- +-AC_DEFUN([AM_SANITY_CHECK], +-[AC_MSG_CHECKING([whether build environment is sane]) +-# Just in case +-sleep 1 +-echo timestamp > conftest.file +-# Do `set' in a subshell so we don't clobber the current shell's +-# arguments. Must try -L first in case configure is actually a +-# symlink; some systems play weird games with the mod time of symlinks +-# (eg FreeBSD returns the mod time of the symlink's containing +-# directory). +-if ( +- set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` +- if test "$[*]" = "X"; then +- # -L didn't work. +- set X `ls -t $srcdir/configure conftest.file` +- fi +- rm -f conftest.file +- if test "$[*]" != "X $srcdir/configure conftest.file" \ +- && test "$[*]" != "X conftest.file $srcdir/configure"; then +- +- # If neither matched, then we have a broken ls. This can happen +- # if, for instance, CONFIG_SHELL is bash and it inherits a +- # broken ls alias from the environment. This has actually +- # happened. Such a system could not be considered "sane". +- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +-alias in your environment]) +- fi +- +- test "$[2]" = conftest.file +- ) +-then +- # Ok. +- : ++AC_DEFUN([XORG_CWARNFLAGS], [ ++AC_REQUIRE([AC_PROG_CC]) ++if test "x$GCC" = xyes ; then ++ CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ ++-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ ++-Wbad-function-cast" ++ case `gcc -dumpversion` in ++ 3.4.* | 4.*) ++ CWARNFLAGS+=" -Wold-style-definition -Wdeclaration-after-statement" ++ ;; ++ esac + else +- AC_MSG_ERROR([newly created file is older than distributed files! +-Check your system clock]) ++ AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) ++ if test "x$SUNCC" = "xyes"; then ++ CWARNFLAGS="-v" ++ fi + fi +-AC_MSG_RESULT(yes)]) +- +-# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +-# +-# This file is free software; the Free Software Foundation +-# gives unlimited permission to copy and/or distribute it, +-# with or without modifications, as long as this notice is preserved. ++AC_SUBST(CWARNFLAGS) ++]) # XORG_CWARNFLAGS ++dnl Copyright 2005 Red Hat, Inc ++dnl ++dnl Permission to use, copy, modify, distribute, and sell this software and its ++dnl documentation for any purpose is hereby granted without fee, provided that ++dnl the above copyright notice appear in all copies and that both that ++dnl copyright notice and this permission notice appear in supporting ++dnl documentation. ++dnl ++dnl The above copyright notice and this permission notice shall be included ++dnl in all copies or substantial portions of the Software. ++dnl ++dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ++dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. ++dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR ++dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ++dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR ++dnl OTHER DEALINGS IN THE SOFTWARE. ++dnl ++dnl Except as contained in this notice, the name of the copyright holders shall ++dnl not be used in advertising or otherwise to promote the sale, use or ++dnl other dealings in this Software without prior written authorization ++dnl from the copyright holders. ++dnl + +-# AM_PROG_INSTALL_STRIP +-# --------------------- +-# One issue with vendor `install' (even GNU) is that you can't +-# specify the program used to strip binaries. This is especially +-# annoying in cross-compiling environments, where the build's strip +-# is unlikely to handle the host's binaries. +-# Fortunately install-sh will honor a STRIPPROG variable, so we +-# always use install-sh in `make install-strip', and initialize +-# STRIPPROG with the value of the STRIP variable (set by the user). +-AC_DEFUN([AM_PROG_INSTALL_STRIP], +-[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +-# Installed binaries are usually stripped using `strip' when the user +-# run `make install-strip'. However `strip' might not be the right +-# tool to use in cross-compilation environments, therefore Automake +-# will honor the `STRIP' environment variable to overrule this program. +-dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +-if test "$cross_compiling" != no; then +- AC_CHECK_TOOL([STRIP], [strip], :) +-fi +-INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" +-AC_SUBST([INSTALL_STRIP_PROGRAM])]) ++# XORG_RELEASE_VERSION ++# -------------------- ++# Adds --with/without-release-string and changes the PACKAGE and ++# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If ++# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also ++# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. ++ ++AC_DEFUN([XORG_RELEASE_VERSION],[ ++ AC_ARG_WITH(release-version, ++ AC_HELP_STRING([--with-release-version=STRING], ++ [Use release version string in package name]), ++ [RELEASE_VERSION="$withval"], ++ [RELEASE_VERSION=""]) ++ if test "x$RELEASE_VERSION" != "x"; then ++ PACKAGE="$PACKAGE-$RELEASE_VERSION" ++ PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" ++ AC_MSG_NOTICE([Building with package name set to $PACKAGE]) ++ fi ++ AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], ++ [`echo $PACKAGE_VERSION | cut -d . -f 1`], ++ [Major version of this package]) ++ PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` ++ if test "x$PVM" = "x"; then ++ PVM="0" ++ fi ++ AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], ++ [$PVM], ++ [Minor version of this package]) ++ PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` ++ if test "x$PVP" = "x"; then ++ PVP="0" ++ fi ++ AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], ++ [$PVP], ++ [Patch version of this package]) ++]) + +-# Copyright (C) 2006 Free Software Foundation, Inc. ++# XORG_CHANGELOG() ++# ---------------- ++# Minimum version: 1.2.0 + # +-# 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. ++# Defines the variable CHANGELOG_CMD as the command to generate ++# ChangeLog from git. ++# ++# Arrange that distcleancheck ignores ChangeLog left over by distclean. ++# ++AC_DEFUN([XORG_CHANGELOG], [ ++CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \ ++mv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \ ++echo 'git directory not found: installing possibly empty changelog.' >&2)" ++AC_SUBST([CHANGELOG_CMD]) ++AC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print']) ++]) # XORG_CHANGELOG + +-# _AM_SUBST_NOTMAKE(VARIABLE) +-# --------------------------- +-# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. +-# This macro is traced by Automake. +-AC_DEFUN([_AM_SUBST_NOTMAKE]) ++dnl $XdotOrg: lib/xtrans/xtrans.m4,v 1.6 2005/07/26 18:59:11 alanc Exp $ ++dnl ++dnl Copyright 2005 Sun Microsystems, Inc. All rights reserved. ++dnl ++dnl Permission to use, copy, modify, distribute, and sell this software and its ++dnl documentation for any purpose is hereby granted without fee, provided that ++dnl the above copyright notice appear in all copies and that both that ++dnl copyright notice and this permission notice appear in supporting ++dnl documentation. ++dnl ++dnl The above copyright notice and this permission notice shall be included ++dnl in all copies or substantial portions of the Software. ++dnl ++dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ++dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ++dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. ++dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR ++dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ++dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR ++dnl OTHER DEALINGS IN THE SOFTWARE. ++dnl ++dnl Except as contained in this notice, the name of the copyright holders shall ++dnl not be used in advertising or otherwise to promote the sale, use or ++dnl other dealings in this Software without prior written authorization ++dnl from the copyright holders. ++dnl + +-# Check how to create a tarball. -*- Autoconf -*- ++# XTRANS_TCP_FLAGS() ++# ------------------ ++# Find needed libraries for TCP sockets, and check for IPv6 support ++AC_DEFUN([XTRANS_TCP_FLAGS],[ ++ # SVR4 hides these in libraries other than libc ++ AC_SEARCH_LIBS(socket, [socket]) ++ AC_SEARCH_LIBS(gethostbyname, [nsl]) + +-# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +-# +-# This file is free software; the Free Software Foundation +-# gives unlimited permission to copy and/or distribute it, +-# with or without modifications, as long as this notice is preserved. ++ # Needs to come after above checks for libsocket & libnsl for SVR4 systems ++ AC_ARG_ENABLE(ipv6, ++ AC_HELP_STRING([--enable-IPv6],[Enable IPv6 support]), ++ [IPV6CONN=$enableval], ++ [AC_CHECK_FUNC(getaddrinfo,[IPV6CONN=yes],[IPV6CONN=no])]) ++ AC_MSG_CHECKING([if IPv6 support should be built]) ++ if test "$IPV6CONN" = "yes"; then ++ AC_DEFINE(IPv6,1,[Support IPv6 for TCP connections]) ++ fi ++ AC_MSG_RESULT($IPV6CONN) + +-# serial 2 ++ # 4.3BSD-Reno added a new member to struct sockaddr_in ++ AC_CHECK_MEMBER([struct sockaddr_in.sin_len], ++ AC_DEFINE([BSD44SOCKETS],1, ++ [Define to 1 if `struct sockaddr_in' has a `sin_len' member]), [], [ ++#include ++#include ++#include ++ ]) + +-# _AM_PROG_TAR(FORMAT) +-# -------------------- +-# Check how to create a tarball in format FORMAT. +-# FORMAT should be one of `v7', `ustar', or `pax'. +-# +-# Substitute a variable $(am__tar) that is a command +-# writing to stdout a FORMAT-tarball containing the directory +-# $tardir. +-# tardir=directory && $(am__tar) > result.tar ++ # POSIX.1g changed the type of pointer passed to getsockname/getpeername/etc. ++ AC_CHECK_TYPES([socklen_t], [], [], [ ++AC_INCLUDES_DEFAULT ++#include ]) ++ ++]) # XTRANS_TCP_FLAGS ++ ++# XTRANS_CONNECTION_FLAGS() ++# ------------------------- ++# Standard checks for which Xtrans transports to use by the Xorg packages ++# that use Xtrans functions ++AC_DEFUN([XTRANS_CONNECTION_FLAGS],[ ++ AC_REQUIRE([AC_CANONICAL_HOST]) ++ AC_REQUIRE([AC_TYPE_SIGNAL]) ++ [case $host_os in ++ mingw*) unixdef="no" ;; ++ *) unixdef="yes" ;; ++ esac] ++ AC_ARG_ENABLE(unix-transport, ++ AC_HELP_STRING([--enable-unix-transport],[Enable UNIX domain socket transport]), ++ [UNIXCONN=$enableval], [UNIXCONN=$unixdef]) ++ AC_MSG_CHECKING([if Xtrans should support UNIX socket connections]) ++ if test "$UNIXCONN" = "yes"; then ++ AC_DEFINE(UNIXCONN,1,[Support UNIX socket connections]) ++ fi ++ AC_MSG_RESULT($UNIXCONN) ++ AC_ARG_ENABLE(tcp-transport, ++ AC_HELP_STRING([--enable-tcp-transport],[Enable TCP socket transport]), ++ [TCPCONN=$enableval], [TCPCONN=yes]) ++ AC_MSG_CHECKING([if Xtrans should support TCP socket connections]) ++ AC_MSG_RESULT($TCPCONN) ++ if test "$TCPCONN" = "yes"; then ++ AC_DEFINE(TCPCONN,1,[Support TCP socket connections]) ++ XTRANS_TCP_FLAGS ++ fi ++ [case $host_os in ++ solaris*|sco*|sysv4*) localdef="yes" ;; ++ *) localdef="no" ;; ++ esac] ++ AC_ARG_ENABLE(local-transport, ++ AC_HELP_STRING([--enable-local-transport],[Enable os-specific local transport]), ++ [LOCALCONN=$enableval], [LOCALCONN=$localdef]) ++ AC_MSG_CHECKING([if Xtrans should support os-specific local connections]) ++ AC_MSG_RESULT($LOCALCONN) ++ if test "$LOCALCONN" = "yes"; then ++ AC_DEFINE(LOCALCONN,1,[Support os-specific local connections]) ++ fi ++ ++]) # XTRANS_CONNECTION_FLAGS ++ ++ ++# XTRANS_SECURE_RPC_FLAGS() ++# ------------------------- ++# Check for Secure RPC functions - must come after XTRANS_TCP_FLAGS ++# so that any necessary networking libraries are already found ++AC_DEFUN([XTRANS_SECURE_RPC_FLAGS], ++[AC_REQUIRE([XTRANS_TCP_FLAGS]) ++ AC_ARG_ENABLE(secure-rpc, ++ AC_HELP_STRING([--enable-secure-rpc],[Enable Secure RPC]), ++ [SECURE_RPC=$enableval], [SECURE_RPC="try"]) ++ ++ if test "x$SECURE_RPC" = "xyes" -o "x$SECURE_RPC" = "xtry" ; then ++ FOUND_SECURE_RPC="no" ++ AC_CHECK_FUNCS([authdes_seccreate authdes_create], ++ [FOUND_SECURE_RPC="yes"]) ++ if test "x$FOUND_SECURE_RPC" = "xno" ; then ++ if test "x$SECURE_RPC" = "xyes" ; then ++ AC_MSG_ERROR([Secure RPC requested, but required functions not found]) ++ fi ++ SECURE_RPC="no" ++ else ++ dnl FreeBSD keeps getsecretkey in librpcsvc ++ AC_SEARCH_LIBS(getsecretkey, [rpcsvc]) ++ SECURE_RPC="yes" ++ fi ++ fi ++ AC_MSG_CHECKING([if Secure RPC authentication ("SUN-DES-1") should be supported]) ++ if test "x$SECURE_RPC" = "xyes" ; then ++ AC_DEFINE(SECURE_RPC, 1, [Support Secure RPC ("SUN-DES-1") authentication for X11 clients]) ++ fi ++ AC_MSG_RESULT($SECURE_RPC) ++]) # XTRANS_SECURE_RPC_FLAGS ++ ++ ++# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. + # +-# Substitute a variable $(am__untar) that extract such +-# a tarball read from stdin. +-# $(am__untar) < result.tar +-AC_DEFUN([_AM_PROG_TAR], +-[# Always define AMTAR for backward compatibility. +-AM_MISSING_PROG([AMTAR], [tar]) +-m4_if([$1], [v7], +- [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], +- [m4_case([$1], [ustar],, [pax],, +- [m4_fatal([Unknown tar format])]) +-AC_MSG_CHECKING([how to create a $1 tar archive]) +-# Loop over all known methods to create a tar archive until one works. +-_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' +-_am_tools=${am_cv_prog_tar_$1-$_am_tools} +-# Do not fold the above two line into one, because Tru64 sh and +-# Solaris sh will not grok spaces in the rhs of `-'. +-for _am_tool in $_am_tools +-do +- case $_am_tool in +- gnutar) +- for _am_tar in tar gnutar gtar; +- do +- AM_RUN_LOG([$_am_tar --version]) && break +- done +- am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' +- am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' +- am__untar="$_am_tar -xf -" +- ;; +- plaintar) +- # Must skip GNU tar: if it does not support --format= it doesn't create +- # ustar tarball either. +- (tar --version) >/dev/null 2>&1 && continue +- am__tar='tar chf - "$$tardir"' +- am__tar_='tar chf - "$tardir"' +- am__untar='tar xf -' +- ;; +- pax) +- am__tar='pax -L -x $1 -w "$$tardir"' +- am__tar_='pax -L -x $1 -w "$tardir"' +- am__untar='pax -r' +- ;; +- cpio) +- am__tar='find "$$tardir" -print | cpio -o -H $1 -L' +- am__tar_='find "$tardir" -print | cpio -o -H $1 -L' +- am__untar='cpio -i -H $1 -d' +- ;; +- none) +- am__tar=false +- am__tar_=false +- am__untar=false +- ;; +- esac ++# 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. + +- # If the value was cached, stop now. We just wanted to have am__tar +- # and am__untar set. +- test -n "${am_cv_prog_tar_$1}" && break ++# AM_AUTOMAKE_VERSION(VERSION) ++# ---------------------------- ++# Automake X.Y traces this macro to ensure aclocal.m4 has been ++# generated from the m4 files accompanying Automake X.Y. ++# (This private macro should not be called outside this file.) ++AC_DEFUN([AM_AUTOMAKE_VERSION], ++[am__api_version='1.10' ++dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to ++dnl require some minimum version. Point them to the right macro. ++m4_if([$1], [1.10.2], [], ++ [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ++]) + +- # tar/untar a dummy directory, and stop if the command works +- rm -rf conftest.dir +- mkdir conftest.dir +- echo GrepMe > conftest.dir/file +- AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) +- rm -rf conftest.dir +- if test -s conftest.tar; then +- AM_RUN_LOG([$am__untar /dev/null 2>&1 && break +- fi +-done +-rm -rf conftest.dir ++# _AM_AUTOCONF_VERSION(VERSION) ++# ----------------------------- ++# aclocal traces this macro to find the Autoconf version. ++# This is a private macro too. Using m4_define simplifies ++# the logic in aclocal, which can simply ignore this definition. ++m4_define([_AM_AUTOCONF_VERSION], []) + +-AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) +-AC_MSG_RESULT([$am_cv_prog_tar_$1])]) +-AC_SUBST([am__tar]) +-AC_SUBST([am__untar]) +-]) # _AM_PROG_TAR ++# AM_SET_CURRENT_AUTOMAKE_VERSION ++# ------------------------------- ++# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. ++# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. ++AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], ++[AM_AUTOMAKE_VERSION([1.10.2])dnl ++m4_ifndef([AC_AUTOCONF_VERSION], ++ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl ++_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) + +-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 +-dnl Permission is hereby granted, free of charge, to any person obtaining a +-dnl copy of this software and associated documentation files (the +-dnl "Software"), to deal in the Software without restriction, including +-dnl without limitation the rights to use, copy, modify, merge, publish, +-dnl distribute, and/or sell copies of the Software, and to permit persons +-dnl to whom the Software is furnished to do so, provided that the above +-dnl copyright notice(s) and this permission notice appear in all copies of +-dnl the Software and that both the above copyright notice(s) and this +-dnl permission notice appear in supporting documentation. +-dnl +-dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +-dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +-dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +-dnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +-dnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL +-dnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING +-dnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, +-dnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION +-dnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +-dnl +-dnl Except as contained in this notice, the name of a copyright holder +-dnl shall not be used in advertising or otherwise to promote the sale, use +-dnl or other dealings in this Software without prior written authorization +-dnl of the copyright holder. ++# Figure out how to run the assembler. -*- Autoconf -*- + +-# XORG_MACROS_VERSION(required-version) +-# ------------------------------------- +-# Minimum version: 1.1.0 ++# Copyright (C) 2001, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. + # +-# If you're using a macro added in Version 1.1 or newer, include this in +-# your configure.ac with the minimum required version, such as: +-# XORG_MACROS_VERSION(1.1) ++# 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 5 ++ ++# AM_PROG_AS ++# ---------- ++AC_DEFUN([AM_PROG_AS], ++[# By default we simply use the C compiler to build assembly code. ++AC_REQUIRE([AC_PROG_CC]) ++test "${CCAS+set}" = set || CCAS=$CC ++test "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS ++AC_ARG_VAR([CCAS], [assembler compiler command (defaults to CC)]) ++AC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)]) ++_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl ++]) ++ ++# AM_AUX_DIR_EXPAND -*- Autoconf -*- ++ ++# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. + # +-# To force at least a version with this macro defined, also add: +-# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])]) ++# This file is free software; the Free Software Foundation ++# gives unlimited permission to copy and/or distribute it, ++# with or without modifications, as long as this notice is preserved. ++ ++# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets ++# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to ++# `$srcdir', `$srcdir/..', or `$srcdir/../..'. + # ++# Of course, Automake must honor this variable whenever it calls a ++# tool from the auxiliary directory. The problem is that $srcdir (and ++# therefore $ac_aux_dir as well) can be either absolute or relative, ++# depending on how configure is run. This is pretty annoying, since ++# it makes $ac_aux_dir quite unusable in subdirectories: in the top ++# source directory, any form will work fine, but in subdirectories a ++# relative path needs to be adjusted first. + # +-# See the "minimum version" comment for each macro you use to see what +-# version you require. +-AC_DEFUN([XORG_MACROS_VERSION],[ +- [XORG_MACROS_needed_version=$1 +- XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'` +- XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] +- AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}]) +- [XORG_MACROS_version=1.2.0 +- XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'` +- XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] +- if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then +- AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x]) +- fi +- if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then +- AC_MSG_ERROR([configure built with too old of a version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.${XORG_MACROS_minor}.0 or newer]) +- fi +- AC_MSG_RESULT([yes, $XORG_MACROS_version]) +-]) # XORG_MACROS_VERSION ++# $ac_aux_dir/missing ++# fails when called from a subdirectory if $ac_aux_dir is relative ++# $top_srcdir/$ac_aux_dir/missing ++# fails if $ac_aux_dir is absolute, ++# fails when called from a subdirectory in a VPATH build with ++# a relative $ac_aux_dir ++# ++# The reason of the latter failure is that $top_srcdir and $ac_aux_dir ++# are both prefixed by $srcdir. In an in-source build this is usually ++# harmless because $srcdir is `.', but things will broke when you ++# start a VPATH build or use an absolute $srcdir. ++# ++# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, ++# iff we strip the leading $srcdir from $ac_aux_dir. That would be: ++# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` ++# and then we would define $MISSING as ++# MISSING="\${SHELL} $am_aux_dir/missing" ++# This will work as long as MISSING is not called from configure, because ++# unfortunately $(top_srcdir) has no meaning in configure. ++# However there are other variables, like CC, which are often used in ++# configure, and could therefore not use this "fixed" $ac_aux_dir. ++# ++# Another solution, used here, is to always expand $ac_aux_dir to an ++# absolute PATH. The drawback is that using absolute paths prevent a ++# configured tree to be moved without reconfiguration. + +-# XORG_PROG_RAWCPP() +-# ------------------ +-# Minimum version: 1.0.0 ++AC_DEFUN([AM_AUX_DIR_EXPAND], ++[dnl Rely on autoconf to set up CDPATH properly. ++AC_PREREQ([2.50])dnl ++# expand $ac_aux_dir to an absolute path ++am_aux_dir=`cd $ac_aux_dir && pwd` ++]) ++ ++# AM_CONDITIONAL -*- Autoconf -*- ++ ++# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 ++# Free Software Foundation, Inc. + # +-# Find cpp program and necessary flags for use in pre-processing text files +-# such as man pages and config files +-AC_DEFUN([XORG_PROG_RAWCPP],[ +-AC_REQUIRE([AC_PROG_CPP]) +-AC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], +- [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) ++# 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. + +-# Check for flag to avoid builtin definitions - assumes unix is predefined, +-# which is not the best choice for supporting other OS'es, but covers most +-# of the ones we need for now. +-AC_MSG_CHECKING([if $RAWCPP requires -undef]) +-AC_LANG_CONFTEST([Does cpp redefine unix ?]) +-if test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then +- AC_MSG_RESULT([no]) +-else +- if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then +- RAWCPPFLAGS=-undef +- AC_MSG_RESULT([yes]) +- # under Cygwin unix is still defined even with -undef +- elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then +- RAWCPPFLAGS="-undef -ansi" +- AC_MSG_RESULT([yes, with -ansi]) +- else +- AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) +- fi +-fi +-rm -f conftest.$ac_ext ++# serial 8 + +-AC_MSG_CHECKING([if $RAWCPP requires -traditional]) +-AC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) +-if test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then +- AC_MSG_RESULT([no]) ++# AM_CONDITIONAL(NAME, SHELL-CONDITION) ++# ------------------------------------- ++# Define a conditional. ++AC_DEFUN([AM_CONDITIONAL], ++[AC_PREREQ(2.52)dnl ++ ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], ++ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl ++AC_SUBST([$1_TRUE])dnl ++AC_SUBST([$1_FALSE])dnl ++_AM_SUBST_NOTMAKE([$1_TRUE])dnl ++_AM_SUBST_NOTMAKE([$1_FALSE])dnl ++if $2; then ++ $1_TRUE= ++ $1_FALSE='#' + else +- if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then +- RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" +- AC_MSG_RESULT([yes]) +- else +- AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) +- fi ++ $1_TRUE='#' ++ $1_FALSE= + fi +-rm -f conftest.$ac_ext +-AC_SUBST(RAWCPPFLAGS) +-]) # XORG_PROG_RAWCPP ++AC_CONFIG_COMMANDS_PRE( ++[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then ++ AC_MSG_ERROR([[conditional "$1" was never defined. ++Usually this means the macro was only invoked conditionally.]]) ++fi])]) + +-# XORG_MANPAGE_SECTIONS() +-# ----------------------- +-# Minimum version: 1.0.0 ++# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 ++# Free Software Foundation, Inc. + # +-# Determine which sections man pages go in for the different man page types +-# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. +-# Not sure if there's any better way than just hardcoding by OS name. +-# Override default settings by setting environment variables ++# 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. + +-AC_DEFUN([XORG_MANPAGE_SECTIONS],[ +-AC_REQUIRE([AC_CANONICAL_HOST]) ++# serial 9 + +-if test x$APP_MAN_SUFFIX = x ; then +- APP_MAN_SUFFIX=1 +-fi +-if test x$APP_MAN_DIR = x ; then +- APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' +-fi ++# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be ++# written in clear, in which case automake, when reading aclocal.m4, ++# will think it sees a *use*, and therefore will trigger all it's ++# C support machinery. Also note that it means that autoscan, seeing ++# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + +-if test x$LIB_MAN_SUFFIX = x ; then +- LIB_MAN_SUFFIX=3 +-fi +-if test x$LIB_MAN_DIR = x ; then +- LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' +-fi + +-if test x$FILE_MAN_SUFFIX = x ; then +- case $host_os in +- solaris*) FILE_MAN_SUFFIX=4 ;; +- *) FILE_MAN_SUFFIX=5 ;; +- esac +-fi +-if test x$FILE_MAN_DIR = x ; then +- FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' +-fi ++# _AM_DEPENDENCIES(NAME) ++# ---------------------- ++# See how the compiler implements dependency checking. ++# NAME is "CC", "CXX", "GCJ", or "OBJC". ++# We try a few techniques and use that to set a single cache variable. ++# ++# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was ++# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular ++# dependency, and given that the user is not expected to run this macro, ++# just rely on AC_PROG_CC. ++AC_DEFUN([_AM_DEPENDENCIES], ++[AC_REQUIRE([AM_SET_DEPDIR])dnl ++AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl ++AC_REQUIRE([AM_MAKE_INCLUDE])dnl ++AC_REQUIRE([AM_DEP_TRACK])dnl + +-if test x$MISC_MAN_SUFFIX = x ; then +- case $host_os in +- solaris*) MISC_MAN_SUFFIX=5 ;; +- *) MISC_MAN_SUFFIX=7 ;; ++ifelse([$1], CC, [depcc="$CC" am_compiler_list=], ++ [$1], CXX, [depcc="$CXX" am_compiler_list=], ++ [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], ++ [$1], UPC, [depcc="$UPC" am_compiler_list=], ++ [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], ++ [depcc="$$1" am_compiler_list=]) ++ ++AC_CACHE_CHECK([dependency style of $depcc], ++ [am_cv_$1_dependencies_compiler_type], ++[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then ++ # We make a subdir and do the tests there. Otherwise we can end up ++ # making bogus files that we don't know about and never remove. For ++ # instance it was reported that on HP-UX the gcc test will end up ++ # making a dummy file named `D' -- because `-MD' means `put the output ++ # in D'. ++ mkdir conftest.dir ++ # Copy depcomp to subdir because otherwise we won't find it if we're ++ # using a relative directory. ++ cp "$am_depcomp" conftest.dir ++ cd conftest.dir ++ # We will build objects and dependencies in a subdirectory because ++ # it helps to detect inapplicable dependency modes. For instance ++ # both Tru64's cc and ICC support -MD to output dependencies as a ++ # side effect of compilation, but ICC will put the dependencies in ++ # the current directory while Tru64 will put them in the object ++ # directory. ++ mkdir sub ++ ++ am_cv_$1_dependencies_compiler_type=none ++ if test "$am_compiler_list" = ""; then ++ am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` ++ fi ++ for depmode in $am_compiler_list; do ++ # Setup a source with many dependencies, because some compilers ++ # like to wrap large dependency lists on column 80 (with \), and ++ # we should not choose a depcomp mode which is confused by this. ++ # ++ # We need to recreate these files for each test, as the compiler may ++ # overwrite some of them when testing with obscure command lines. ++ # This happens at least with the AIX C compiler. ++ : > sub/conftest.c ++ for i in 1 2 3 4 5 6; do ++ echo '#include "conftst'$i'.h"' >> sub/conftest.c ++ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with ++ # Solaris 8's {/usr,}/bin/sh. ++ touch sub/conftst$i.h ++ done ++ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf ++ ++ case $depmode in ++ nosideeffect) ++ # after this tag, mechanisms are not by side-effect, so they'll ++ # only be used when explicitly requested ++ if test "x$enable_dependency_tracking" = xyes; then ++ continue ++ else ++ break ++ fi ++ ;; ++ none) break ;; + esac ++ # We check with `-c' and `-o' for the sake of the "dashmstdout" ++ # mode. It turns out that the SunPro C++ compiler does not properly ++ # handle `-M -o', and we need to detect this. ++ if depmode=$depmode \ ++ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ ++ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ ++ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ ++ >/dev/null 2>conftest.err && ++ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && ++ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && ++ grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ++ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then ++ # icc doesn't choke on unknown options, it will just issue warnings ++ # or remarks (even with -Werror). So we grep stderr for any message ++ # that says an option was ignored or not supported. ++ # When given -MP, icc 7.0 and 7.1 complain thusly: ++ # icc: Command line warning: ignoring option '-M'; no argument required ++ # The diagnosis changed in icc 8.0: ++ # icc: Command line remark: option '-MP' not supported ++ if (grep 'ignoring option' conftest.err || ++ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else ++ am_cv_$1_dependencies_compiler_type=$depmode ++ break ++ fi ++ fi ++ done ++ ++ cd .. ++ rm -rf conftest.dir ++else ++ am_cv_$1_dependencies_compiler_type=none + fi +-if test x$MISC_MAN_DIR = x ; then +- MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' +-fi ++]) ++AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) ++AM_CONDITIONAL([am__fastdep$1], [ ++ test "x$enable_dependency_tracking" != xno \ ++ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ++]) ++ ++ ++# AM_SET_DEPDIR ++# ------------- ++# Choose a directory name for dependency files. ++# This macro is AC_REQUIREd in _AM_DEPENDENCIES ++AC_DEFUN([AM_SET_DEPDIR], ++[AC_REQUIRE([AM_SET_LEADING_DOT])dnl ++AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ++]) + +-if test x$DRIVER_MAN_SUFFIX = x ; then +- case $host_os in +- solaris*) DRIVER_MAN_SUFFIX=7 ;; +- *) DRIVER_MAN_SUFFIX=4 ;; +- esac +-fi +-if test x$DRIVER_MAN_DIR = x ; then +- DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' +-fi + +-if test x$ADMIN_MAN_SUFFIX = x ; then +- case $host_os in +- solaris*) ADMIN_MAN_SUFFIX=1m ;; +- *) ADMIN_MAN_SUFFIX=8 ;; +- esac +-fi +-if test x$ADMIN_MAN_DIR = x ; then +- ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' ++# AM_DEP_TRACK ++# ------------ ++AC_DEFUN([AM_DEP_TRACK], ++[AC_ARG_ENABLE(dependency-tracking, ++[ --disable-dependency-tracking speeds up one-time build ++ --enable-dependency-tracking do not reject slow dependency extractors]) ++if test "x$enable_dependency_tracking" != xno; then ++ am_depcomp="$ac_aux_dir/depcomp" ++ AMDEPBACKSLASH='\' + fi ++AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) ++AC_SUBST([AMDEPBACKSLASH])dnl ++_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ++]) + ++# Generate code to set up dependency tracking. -*- Autoconf -*- + +-AC_SUBST([APP_MAN_SUFFIX]) +-AC_SUBST([LIB_MAN_SUFFIX]) +-AC_SUBST([FILE_MAN_SUFFIX]) +-AC_SUBST([MISC_MAN_SUFFIX]) +-AC_SUBST([DRIVER_MAN_SUFFIX]) +-AC_SUBST([ADMIN_MAN_SUFFIX]) +-AC_SUBST([APP_MAN_DIR]) +-AC_SUBST([LIB_MAN_DIR]) +-AC_SUBST([FILE_MAN_DIR]) +-AC_SUBST([MISC_MAN_DIR]) +-AC_SUBST([DRIVER_MAN_DIR]) +-AC_SUBST([ADMIN_MAN_DIR]) +-]) # XORG_MANPAGE_SECTIONS +- +-# XORG_CHECK_LINUXDOC +-# ------------------- +-# Minimum version: 1.0.0 ++# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 ++# Free Software Foundation, Inc. + # +-# Defines the variable MAKE_TEXT if the necessary tools and +-# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. +-# Whether or not the necessary tools and files are found can be checked +-# with the AM_CONDITIONAL "BUILD_LINUXDOC" +-AC_DEFUN([XORG_CHECK_LINUXDOC],[ +-if test x$XORG_SGML_PATH = x ; then +- XORG_SGML_PATH=$prefix/share/sgml +-fi +-HAVE_DEFS_ENT= ++# 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. + +-if test x"$cross_compiling" = x"yes" ; then +- HAVE_DEFS_ENT=no +-else +- AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) +-fi ++#serial 4 + +-AC_PATH_PROG(LINUXDOC, linuxdoc) +-AC_PATH_PROG(PS2PDF, ps2pdf) ++# _AM_OUTPUT_DEPENDENCY_COMMANDS ++# ------------------------------ ++AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], ++[# Autoconf 2.62 quotes --file arguments for eval, but not when files ++# are listed without --file. Let's play safe and only enable the eval ++# if we detect the quoting. ++case $CONFIG_FILES in ++*\'*) eval set x "$CONFIG_FILES" ;; ++*) set x $CONFIG_FILES ;; ++esac ++shift ++for mf ++do ++ # Strip MF so we end up with the name of the file. ++ mf=`echo "$mf" | sed -e 's/:.*$//'` ++ # Check whether this is an Automake generated Makefile or not. ++ # We used to match only the files named `Makefile.in', but ++ # some people rename them; so instead we look at the file content. ++ # Grep'ing the first line is not enough: some people post-process ++ # each Makefile.in and add a new line on top of each file to say so. ++ # Grep'ing the whole file is not good either: AIX grep has a line ++ # limit of 2048, but all sed's we know have understand at least 4000. ++ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then ++ dirpart=`AS_DIRNAME("$mf")` ++ else ++ continue ++ fi ++ # Extract the definition of DEPDIR, am__include, and am__quote ++ # from the Makefile without running `make'. ++ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` ++ test -z "$DEPDIR" && continue ++ am__include=`sed -n 's/^am__include = //p' < "$mf"` ++ test -z "am__include" && continue ++ am__quote=`sed -n 's/^am__quote = //p' < "$mf"` ++ # When using ansi2knr, U may be empty or an underscore; expand it ++ U=`sed -n 's/^U = //p' < "$mf"` ++ # Find all dependency output files, they are included files with ++ # $(DEPDIR) in their names. We invoke sed twice because it is the ++ # simplest approach to changing $(DEPDIR) to its actual value in the ++ # expansion. ++ for file in `sed -n " ++ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ ++ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do ++ # Make sure the directory exists. ++ test -f "$dirpart/$file" && continue ++ fdir=`AS_DIRNAME(["$file"])` ++ AS_MKDIR_P([$dirpart/$fdir]) ++ # echo "creating $dirpart/$file" ++ echo '# dummy' > "$dirpart/$file" ++ done ++done ++])# _AM_OUTPUT_DEPENDENCY_COMMANDS + +-AC_MSG_CHECKING([Whether to build documentation]) + +-if test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then +- BUILDDOC=yes +-else +- BUILDDOC=no +-fi ++# AM_OUTPUT_DEPENDENCY_COMMANDS ++# ----------------------------- ++# This macro should only be invoked once -- use via AC_REQUIRE. ++# ++# This code is only required when automatic dependency tracking ++# is enabled. FIXME. This creates each `.P' file that we will ++# need in order to bootstrap the dependency handling code. ++AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], ++[AC_CONFIG_COMMANDS([depfiles], ++ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], ++ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ++]) + +-AM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) ++# Do all the work for Automake. -*- Autoconf -*- + +-AC_MSG_RESULT([$BUILDDOC]) ++# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, ++# 2005, 2006, 2008 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. + +-AC_MSG_CHECKING([Whether to build pdf documentation]) ++# serial 13 + +-if test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then +- BUILDPDFDOC=yes +-else +- BUILDPDFDOC=no ++# This macro actually does too much. Some checks are only needed if ++# your package does certain things. But this isn't really a big deal. ++ ++# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) ++# AM_INIT_AUTOMAKE([OPTIONS]) ++# ----------------------------------------------- ++# The call with PACKAGE and VERSION arguments is the old style ++# call (pre autoconf-2.50), which is being phased out. PACKAGE ++# and VERSION should now be passed to AC_INIT and removed from ++# the call to AM_INIT_AUTOMAKE. ++# We support both call styles for the transition. After ++# the next Automake release, Autoconf can make the AC_INIT ++# arguments mandatory, and then we can depend on a new Autoconf ++# release and drop the old call support. ++AC_DEFUN([AM_INIT_AUTOMAKE], ++[AC_PREREQ([2.60])dnl ++dnl Autoconf wants to disallow AM_ names. We explicitly allow ++dnl the ones we care about. ++m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl ++AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl ++AC_REQUIRE([AC_PROG_INSTALL])dnl ++if test "`cd $srcdir && pwd`" != "`pwd`"; then ++ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output ++ # is not polluted with repeated "-I." ++ AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl ++ # test to see if srcdir already configured ++ if test -f $srcdir/config.status; then ++ AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) ++ fi + fi + +-AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) ++# test whether we have cygpath ++if test -z "$CYGPATH_W"; then ++ if (cygpath --version) >/dev/null 2>/dev/null; then ++ CYGPATH_W='cygpath -w' ++ else ++ CYGPATH_W=echo ++ fi ++fi ++AC_SUBST([CYGPATH_W]) + +-AC_MSG_RESULT([$BUILDPDFDOC]) ++# Define the identity of the package. ++dnl Distinguish between old-style and new-style calls. ++m4_ifval([$2], ++[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl ++ AC_SUBST([PACKAGE], [$1])dnl ++ AC_SUBST([VERSION], [$2])], ++[_AM_SET_OPTIONS([$1])dnl ++dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. ++m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, ++ [m4_fatal([AC_INIT should be called with package and version arguments])])dnl ++ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl ++ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +-MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" +-MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" +-MAKE_PDF="$PS2PDF" +-MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" ++_AM_IF_OPTION([no-define],, ++[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) ++ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl + +-AC_SUBST(MAKE_TEXT) +-AC_SUBST(MAKE_PS) +-AC_SUBST(MAKE_PDF) +-AC_SUBST(MAKE_HTML) +-]) # XORG_CHECK_LINUXDOC ++# Some tools Automake needs. ++AC_REQUIRE([AM_SANITY_CHECK])dnl ++AC_REQUIRE([AC_ARG_PROGRAM])dnl ++AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) ++AM_MISSING_PROG(AUTOCONF, autoconf) ++AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) ++AM_MISSING_PROG(AUTOHEADER, autoheader) ++AM_MISSING_PROG(MAKEINFO, makeinfo) ++AM_PROG_INSTALL_SH ++AM_PROG_INSTALL_STRIP ++AC_REQUIRE([AM_PROG_MKDIR_P])dnl ++# We need awk for the "check" target. The system "awk" is bad on ++# some platforms. ++AC_REQUIRE([AC_PROG_AWK])dnl ++AC_REQUIRE([AC_PROG_MAKE_SET])dnl ++AC_REQUIRE([AM_SET_LEADING_DOT])dnl ++_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], ++ [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], ++ [_AM_PROG_TAR([v7])])]) ++_AM_IF_OPTION([no-dependencies],, ++[AC_PROVIDE_IFELSE([AC_PROG_CC], ++ [_AM_DEPENDENCIES(CC)], ++ [define([AC_PROG_CC], ++ defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl ++AC_PROVIDE_IFELSE([AC_PROG_CXX], ++ [_AM_DEPENDENCIES(CXX)], ++ [define([AC_PROG_CXX], ++ defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl ++AC_PROVIDE_IFELSE([AC_PROG_OBJC], ++ [_AM_DEPENDENCIES(OBJC)], ++ [define([AC_PROG_OBJC], ++ defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ++]) ++]) + +-# XORG_CHECK_DOCBOOK +-# ------------------- +-# Minimum version: 1.0.0 +-# +-# Checks for the ability to build output formats from SGML DocBook source. +-# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" +-# indicates whether the necessary tools and files are found and, if set, +-# $(MAKE_XXX) blah.sgml will produce blah.xxx. +-AC_DEFUN([XORG_CHECK_DOCBOOK],[ +-if test x$XORG_SGML_PATH = x ; then +- XORG_SGML_PATH=$prefix/share/sgml +-fi +-HAVE_DEFS_ENT= +-BUILDTXTDOC=no +-BUILDPDFDOC=no +-BUILDPSDOC=no +-BUILDHTMLDOC=no + +-AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) ++# When config.status generates a header, we must update the stamp-h file. ++# This file resides in the same directory as the config header ++# that is generated. The stamp files are numbered to have different names. + +-AC_PATH_PROG(DOCBOOKPS, docbook2ps) +-AC_PATH_PROG(DOCBOOKPDF, docbook2pdf) +-AC_PATH_PROG(DOCBOOKHTML, docbook2html) +-AC_PATH_PROG(DOCBOOKTXT, docbook2txt) ++# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the ++# loop where config.status creates the headers, so we can generate ++# our stamp files there. ++AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], ++[# Compute $1's index in $config_headers. ++_am_arg=$1 ++_am_stamp_count=1 ++for _am_header in $config_headers :; do ++ case $_am_header in ++ $_am_arg | $_am_arg:* ) ++ break ;; ++ * ) ++ _am_stamp_count=`expr $_am_stamp_count + 1` ;; ++ esac ++done ++echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) + +-AC_MSG_CHECKING([Whether to build text documentation]) +-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x && +- test x$BUILD_TXTDOC != xno; then +- BUILDTXTDOC=yes +-fi +-AM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) +-AC_MSG_RESULT([$BUILDTXTDOC]) ++# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. ++# ++# This file is free software; the Free Software Foundation ++# gives unlimited permission to copy and/or distribute it, ++# with or without modifications, as long as this notice is preserved. + +-AC_MSG_CHECKING([Whether to build PDF documentation]) +-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x && +- test x$BUILD_PDFDOC != xno; then +- BUILDPDFDOC=yes +-fi +-AM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) +-AC_MSG_RESULT([$BUILDPDFDOC]) ++# AM_PROG_INSTALL_SH ++# ------------------ ++# Define $install_sh. ++AC_DEFUN([AM_PROG_INSTALL_SH], ++[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl ++install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} ++AC_SUBST(install_sh)]) + +-AC_MSG_CHECKING([Whether to build PostScript documentation]) +-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x && +- test x$BUILD_PSDOC != xno; then +- BUILDPSDOC=yes +-fi +-AM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) +-AC_MSG_RESULT([$BUILDPSDOC]) ++# Copyright (C) 2003, 2005 Free Software Foundation, Inc. ++# ++# This file is free software; the Free Software Foundation ++# gives unlimited permission to copy and/or distribute it, ++# with or without modifications, as long as this notice is preserved. + +-AC_MSG_CHECKING([Whether to build HTML documentation]) +-if test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x && +- test x$BUILD_HTMLDOC != xno; then +- BUILDHTMLDOC=yes +-fi +-AM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) +-AC_MSG_RESULT([$BUILDHTMLDOC]) ++# serial 2 + +-MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" +-MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" +-MAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" +-MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" ++# Check whether the underlying file-system supports filenames ++# with a leading dot. For instance MS-DOS doesn't. ++AC_DEFUN([AM_SET_LEADING_DOT], ++[rm -rf .tst 2>/dev/null ++mkdir .tst 2>/dev/null ++if test -d .tst; then ++ am__leading_dot=. ++else ++ am__leading_dot=_ ++fi ++rmdir .tst 2>/dev/null ++AC_SUBST([am__leading_dot])]) + +-AC_SUBST(MAKE_TEXT) +-AC_SUBST(MAKE_PS) +-AC_SUBST(MAKE_PDF) +-AC_SUBST(MAKE_HTML) +-]) # XORG_CHECK_DOCBOOK ++# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- ++# From Jim Meyering + +-# XORG_CHECK_MALLOC_ZERO +-# ---------------------- +-# Minimum version: 1.0.0 ++# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 ++# Free Software Foundation, Inc. + # +-# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if +-# malloc(0) returns NULL. Packages should add one of these cflags to +-# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. +-AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ +-AC_ARG_ENABLE(malloc0returnsnull, +- AC_HELP_STRING([--enable-malloc0returnsnull], +- [malloc(0) returns NULL (default: auto)]), +- [MALLOC_ZERO_RETURNS_NULL=$enableval], +- [MALLOC_ZERO_RETURNS_NULL=auto]) ++# 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. + +-AC_MSG_CHECKING([whether malloc(0) returns NULL]) +-if test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then +- AC_RUN_IFELSE([ +-char *malloc(); +-char *realloc(); +-char *calloc(); +-main() { +- char *m0, *r0, *c0, *p; +- m0 = malloc(0); +- p = malloc(10); +- r0 = realloc(p,0); +- c0 = calloc(0); +- exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); +-}], +- [MALLOC_ZERO_RETURNS_NULL=yes], +- [MALLOC_ZERO_RETURNS_NULL=no]) +-fi +-AC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) ++# serial 4 + +-if test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then +- MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" +- XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS +- XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" +-else +- MALLOC_ZERO_CFLAGS="" +- XMALLOC_ZERO_CFLAGS="" +- XTMALLOC_ZERO_CFLAGS="" +-fi ++AC_DEFUN([AM_MAINTAINER_MODE], ++[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) ++ dnl maintainer-mode is disabled by default ++ AC_ARG_ENABLE(maintainer-mode, ++[ --enable-maintainer-mode enable make rules and dependencies not useful ++ (and sometimes confusing) to the casual installer], ++ USE_MAINTAINER_MODE=$enableval, ++ USE_MAINTAINER_MODE=no) ++ AC_MSG_RESULT([$USE_MAINTAINER_MODE]) ++ AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) ++ MAINT=$MAINTAINER_MODE_TRUE ++ AC_SUBST(MAINT)dnl ++] ++) + +-AC_SUBST([MALLOC_ZERO_CFLAGS]) +-AC_SUBST([XMALLOC_ZERO_CFLAGS]) +-AC_SUBST([XTMALLOC_ZERO_CFLAGS]) +-]) # XORG_CHECK_MALLOC_ZERO ++AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) + +-# XORG_WITH_LINT() +-# ---------------- +-# Minimum version: 1.1.0 +-# +-# Sets up flags for source checkers such as lint and sparse if --with-lint +-# is specified. (Use --with-lint=sparse for sparse.) +-# Sets $LINT to name of source checker passed with --with-lint (default: lint) +-# Sets $LINT_FLAGS to flags to pass to source checker +-# Sets LINT automake conditional if enabled (default: disabled) ++# Check to see how 'make' treats includes. -*- Autoconf -*- ++ ++# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. + # +-AC_DEFUN([XORG_WITH_LINT],[ ++# 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. + +-# Allow checking code with lint, sparse, etc. +-AC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint], +- [Use a lint-style source code checker (default: disabled)])], +- [use_lint=$withval], [use_lint=no]) +-if test "x$use_lint" = "xyes" ; then +- LINT="lint" +-else +- LINT="$use_lint" ++# serial 3 ++ ++# AM_MAKE_INCLUDE() ++# ----------------- ++# Check to see how make treats includes. ++AC_DEFUN([AM_MAKE_INCLUDE], ++[am_make=${MAKE-make} ++cat > confinc << 'END' ++am__doit: ++ @echo done ++.PHONY: am__doit ++END ++# If we don't find an include directive, just comment out the code. ++AC_MSG_CHECKING([for style of include used by $am_make]) ++am__include="#" ++am__quote= ++_am_result=none ++# First try GNU make style include. ++echo "include confinc" > confmf ++# We grep out `Entering directory' and `Leaving directory' ++# messages which can occur if `w' ends up in MAKEFLAGS. ++# In particular we don't look at `^make:' because GNU make might ++# be invoked under some other name (usually "gmake"), in which ++# case it prints its new name instead of `make'. ++if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then ++ am__include=include ++ am__quote= ++ _am_result=GNU + fi +-if test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then +- case $LINT in +- lint|*/lint) +- case $host_os in +- solaris*) +- LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" +- ;; +- esac +- ;; +- esac ++# Now try BSD make style include. ++if test "$am__include" = "#"; then ++ echo '.include "confinc"' > confmf ++ if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then ++ am__include=.include ++ am__quote="\"" ++ _am_result=BSD ++ fi + fi ++AC_SUBST([am__include]) ++AC_SUBST([am__quote]) ++AC_MSG_RESULT([$_am_result]) ++rm -f confinc confmf ++]) + +-AC_SUBST(LINT) +-AC_SUBST(LINT_FLAGS) +-AM_CONDITIONAL(LINT, [test x$LINT != xno]) +- +-]) # XORG_WITH_LINT ++# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- + +-# XORG_LINT_LIBRARY(LIBNAME) +-# -------------------------- +-# Minimum version: 1.1.0 +-# +-# Sets up flags for building lint libraries for checking programs that call +-# functions in the library. +-# Disabled by default, enable with --enable-lint-library +-# Sets: +-# @LINTLIB@ - name of lint library file to make +-# MAKE_LINT_LIB - automake conditional ++# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 ++# Free Software Foundation, Inc. + # ++# This file is free software; the Free Software Foundation ++# gives unlimited permission to copy and/or distribute it, ++# with or without modifications, as long as this notice is preserved. + +-AC_DEFUN([XORG_LINT_LIBRARY],[ +-AC_REQUIRE([XORG_WITH_LINT]) +-# Build lint "library" for more indepth checks of programs calling this library +-AC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library], +- [Create lint library (default: disabled)])], +- [make_lint_lib=$enableval], [make_lint_lib=no]) +-if test "x$make_lint_lib" != "xno" ; then +- if test "x$LINT" = "xno" ; then +- AC_MSG_ERROR([Cannot make lint library without --with-lint]) +- fi +- if test "x$make_lint_lib" = "xyes" ; then +- LINTLIB=llib-l$1.ln +- else +- LINTLIB=$make_lint_lib +- fi +-fi +-AC_SUBST(LINTLIB) +-AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) ++# serial 5 + +-]) # XORG_LINT_LIBRARY ++# AM_MISSING_PROG(NAME, PROGRAM) ++# ------------------------------ ++AC_DEFUN([AM_MISSING_PROG], ++[AC_REQUIRE([AM_MISSING_HAS_RUN]) ++$1=${$1-"${am_missing_run}$2"} ++AC_SUBST($1)]) + +-# XORG_CWARNFLAGS +-# --------------- +-# Minimum version: 1.2.0 +-# +-# Defines CWARNFLAGS to enable C compiler warnings. +-# +-AC_DEFUN([XORG_CWARNFLAGS], [ +-AC_REQUIRE([AC_PROG_CC]) +-if test "x$GCC" = xyes ; then +- CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ +--Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ +--Wbad-function-cast" +- case `gcc -dumpversion` in +- 3.4.* | 4.*) +- CWARNFLAGS+=" -Wold-style-definition -Wdeclaration-after-statement" +- ;; +- esac ++ ++# AM_MISSING_HAS_RUN ++# ------------------ ++# Define MISSING if not defined so far and test if it supports --run. ++# If it does, set am_missing_run to use it, otherwise, to nothing. ++AC_DEFUN([AM_MISSING_HAS_RUN], ++[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl ++AC_REQUIRE_AUX_FILE([missing])dnl ++test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" ++# Use eval to expand $SHELL ++if eval "$MISSING --run true"; then ++ am_missing_run="$MISSING --run " + else +- AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) +- if test "x$SUNCC" = "xyes"; then +- CWARNFLAGS="-v" +- fi ++ am_missing_run= ++ AC_MSG_WARN([`missing' script is too old or missing]) + fi +-AC_SUBST(CWARNFLAGS) +-]) # XORG_CWARNFLAGS +-dnl Copyright 2005 Red Hat, Inc +-dnl +-dnl Permission to use, copy, modify, distribute, and sell this software and its +-dnl documentation for any purpose is hereby granted without fee, provided that +-dnl the above copyright notice appear in all copies and that both that +-dnl copyright notice and this permission notice appear in supporting +-dnl documentation. +-dnl +-dnl The above copyright notice and this permission notice shall be included +-dnl in all copies or substantial portions of the Software. +-dnl +-dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +-dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +-dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +-dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR +-dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +-dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +-dnl OTHER DEALINGS IN THE SOFTWARE. +-dnl +-dnl Except as contained in this notice, the name of the copyright holders shall +-dnl not be used in advertising or otherwise to promote the sale, use or +-dnl other dealings in this Software without prior written authorization +-dnl from the copyright holders. +-dnl ++]) + +-# XORG_RELEASE_VERSION +-# -------------------- +-# Adds --with/without-release-string and changes the PACKAGE and +-# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If +-# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also +-# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. +- +-AC_DEFUN([XORG_RELEASE_VERSION],[ +- AC_ARG_WITH(release-version, +- AC_HELP_STRING([--with-release-version=STRING], +- [Use release version string in package name]), +- [RELEASE_VERSION="$withval"], +- [RELEASE_VERSION=""]) +- if test "x$RELEASE_VERSION" != "x"; then +- PACKAGE="$PACKAGE-$RELEASE_VERSION" +- PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" +- AC_MSG_NOTICE([Building with package name set to $PACKAGE]) +- fi +- AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], +- [`echo $PACKAGE_VERSION | cut -d . -f 1`], +- [Major version of this package]) +- PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` +- if test "x$PVM" = "x"; then +- PVM="0" +- fi +- AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], +- [$PVM], +- [Minor version of this package]) +- PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` +- if test "x$PVP" = "x"; then +- PVP="0" +- fi +- AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], +- [$PVP], +- [Patch version of this package]) ++# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. ++# ++# This file is free software; the Free Software Foundation ++# gives unlimited permission to copy and/or distribute it, ++# with or without modifications, as long as this notice is preserved. ++ ++# AM_PROG_MKDIR_P ++# --------------- ++# Check for `mkdir -p'. ++AC_DEFUN([AM_PROG_MKDIR_P], ++[AC_PREREQ([2.60])dnl ++AC_REQUIRE([AC_PROG_MKDIR_P])dnl ++dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, ++dnl while keeping a definition of mkdir_p for backward compatibility. ++dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. ++dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of ++dnl Makefile.ins that do not define MKDIR_P, so we do our own ++dnl adjustment using top_builddir (which is defined more often than ++dnl MKDIR_P). ++AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl ++case $mkdir_p in ++ [[\\/$]]* | ?:[[\\/]]*) ;; ++ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; ++esac + ]) + +-# XORG_CHANGELOG() +-# ---------------- +-# Minimum version: 1.2.0 ++# Helper functions for option handling. -*- Autoconf -*- ++ ++# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. + # +-# Defines the variable CHANGELOG_CMD as the command to generate +-# ChangeLog from git. ++# This file is free software; the Free Software Foundation ++# gives unlimited permission to copy and/or distribute it, ++# with or without modifications, as long as this notice is preserved. ++ ++# serial 4 ++ ++# _AM_MANGLE_OPTION(NAME) ++# ----------------------- ++AC_DEFUN([_AM_MANGLE_OPTION], ++[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) ++ ++# _AM_SET_OPTION(NAME) ++# ------------------------------ ++# Set option NAME. Presently that only means defining a flag for this option. ++AC_DEFUN([_AM_SET_OPTION], ++[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) ++ ++# _AM_SET_OPTIONS(OPTIONS) ++# ---------------------------------- ++# OPTIONS is a space-separated list of Automake options. ++AC_DEFUN([_AM_SET_OPTIONS], ++[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) ++ ++# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) ++# ------------------------------------------- ++# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. ++AC_DEFUN([_AM_IF_OPTION], ++[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) ++ ++# Check to make sure that the build environment is sane. -*- Autoconf -*- ++ ++# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 ++# Free Software Foundation, Inc. + # +-AC_DEFUN([XORG_CHANGELOG], [ +-CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \ +-mv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \ +-echo 'git directory not found: installing possibly empty changelog.' >&2)" +-AC_SUBST([CHANGELOG_CMD]) +-]) # XORG_CHANGELOG ++# This file is free software; the Free Software Foundation ++# gives unlimited permission to copy and/or distribute it, ++# with or without modifications, as long as this notice is preserved. ++ ++# serial 4 ++ ++# AM_SANITY_CHECK ++# --------------- ++AC_DEFUN([AM_SANITY_CHECK], ++[AC_MSG_CHECKING([whether build environment is sane]) ++# Just in case ++sleep 1 ++echo timestamp > conftest.file ++# Do `set' in a subshell so we don't clobber the current shell's ++# arguments. Must try -L first in case configure is actually a ++# symlink; some systems play weird games with the mod time of symlinks ++# (eg FreeBSD returns the mod time of the symlink's containing ++# directory). ++if ( ++ set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` ++ if test "$[*]" = "X"; then ++ # -L didn't work. ++ set X `ls -t $srcdir/configure conftest.file` ++ fi ++ rm -f conftest.file ++ if test "$[*]" != "X $srcdir/configure conftest.file" \ ++ && test "$[*]" != "X conftest.file $srcdir/configure"; then ++ ++ # If neither matched, then we have a broken ls. This can happen ++ # if, for instance, CONFIG_SHELL is bash and it inherits a ++ # broken ls alias from the environment. This has actually ++ # happened. Such a system could not be considered "sane". ++ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken ++alias in your environment]) ++ fi ++ ++ test "$[2]" = conftest.file ++ ) ++then ++ # Ok. ++ : ++else ++ AC_MSG_ERROR([newly created file is older than distributed files! ++Check your system clock]) ++fi ++AC_MSG_RESULT(yes)]) + +-dnl $XdotOrg: lib/xtrans/xtrans.m4,v 1.6 2005/07/26 18:59:11 alanc Exp $ +-dnl +-dnl Copyright 2005 Sun Microsystems, Inc. All rights reserved. +-dnl +-dnl Permission to use, copy, modify, distribute, and sell this software and its +-dnl documentation for any purpose is hereby granted without fee, provided that +-dnl the above copyright notice appear in all copies and that both that +-dnl copyright notice and this permission notice appear in supporting +-dnl documentation. +-dnl +-dnl The above copyright notice and this permission notice shall be included +-dnl in all copies or substantial portions of the Software. +-dnl +-dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +-dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +-dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +-dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR +-dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +-dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +-dnl OTHER DEALINGS IN THE SOFTWARE. +-dnl +-dnl Except as contained in this notice, the name of the copyright holders shall +-dnl not be used in advertising or otherwise to promote the sale, use or +-dnl other dealings in this Software without prior written authorization +-dnl from the copyright holders. +-dnl ++# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. ++# ++# This file is free software; the Free Software Foundation ++# gives unlimited permission to copy and/or distribute it, ++# with or without modifications, as long as this notice is preserved. + +-# XTRANS_TCP_FLAGS() +-# ------------------ +-# Find needed libraries for TCP sockets, and check for IPv6 support +-AC_DEFUN([XTRANS_TCP_FLAGS],[ +- # SVR4 hides these in libraries other than libc +- AC_SEARCH_LIBS(socket, [socket]) +- AC_SEARCH_LIBS(gethostbyname, [nsl]) ++# AM_PROG_INSTALL_STRIP ++# --------------------- ++# One issue with vendor `install' (even GNU) is that you can't ++# specify the program used to strip binaries. This is especially ++# annoying in cross-compiling environments, where the build's strip ++# is unlikely to handle the host's binaries. ++# Fortunately install-sh will honor a STRIPPROG variable, so we ++# always use install-sh in `make install-strip', and initialize ++# STRIPPROG with the value of the STRIP variable (set by the user). ++AC_DEFUN([AM_PROG_INSTALL_STRIP], ++[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl ++# Installed binaries are usually stripped using `strip' when the user ++# run `make install-strip'. However `strip' might not be the right ++# tool to use in cross-compilation environments, therefore Automake ++# will honor the `STRIP' environment variable to overrule this program. ++dnl Don't test for $cross_compiling = yes, because it might be `maybe'. ++if test "$cross_compiling" != no; then ++ AC_CHECK_TOOL([STRIP], [strip], :) ++fi ++INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" ++AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +- # Needs to come after above checks for libsocket & libnsl for SVR4 systems +- AC_ARG_ENABLE(ipv6, +- AC_HELP_STRING([--enable-IPv6],[Enable IPv6 support]), +- [IPV6CONN=$enableval], +- [AC_CHECK_FUNC(getaddrinfo,[IPV6CONN=yes],[IPV6CONN=no])]) +- AC_MSG_CHECKING([if IPv6 support should be built]) +- if test "$IPV6CONN" = "yes"; then +- AC_DEFINE(IPv6,1,[Support IPv6 for TCP connections]) +- fi +- AC_MSG_RESULT($IPV6CONN) ++# Copyright (C) 2006 Free Software Foundation, Inc. ++# ++# This file is free software; the Free Software Foundation ++# gives unlimited permission to copy and/or distribute it, ++# with or without modifications, as long as this notice is preserved. + +- # 4.3BSD-Reno added a new member to struct sockaddr_in +- AC_CHECK_MEMBER([struct sockaddr_in.sin_len], +- AC_DEFINE([BSD44SOCKETS],1, +- [Define to 1 if `struct sockaddr_in' has a `sin_len' member]), [], [ +-#include +-#include +-#include +- ]) ++# _AM_SUBST_NOTMAKE(VARIABLE) ++# --------------------------- ++# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. ++# This macro is traced by Automake. ++AC_DEFUN([_AM_SUBST_NOTMAKE]) + +- # POSIX.1g changed the type of pointer passed to getsockname/getpeername/etc. +- AC_CHECK_TYPES([socklen_t], [], [], [ +-AC_INCLUDES_DEFAULT +-#include ]) +- +-]) # XTRANS_TCP_FLAGS ++# Check how to create a tarball. -*- Autoconf -*- + +-# XTRANS_CONNECTION_FLAGS() +-# ------------------------- +-# Standard checks for which Xtrans transports to use by the Xorg packages +-# that use Xtrans functions +-AC_DEFUN([XTRANS_CONNECTION_FLAGS],[ +- AC_REQUIRE([AC_CANONICAL_HOST]) +- AC_REQUIRE([AC_TYPE_SIGNAL]) +- [case $host_os in +- mingw*) unixdef="no" ;; +- *) unixdef="yes" ;; +- esac] +- AC_ARG_ENABLE(unix-transport, +- AC_HELP_STRING([--enable-unix-transport],[Enable UNIX domain socket transport]), +- [UNIXCONN=$enableval], [UNIXCONN=$unixdef]) +- AC_MSG_CHECKING([if Xtrans should support UNIX socket connections]) +- if test "$UNIXCONN" = "yes"; then +- AC_DEFINE(UNIXCONN,1,[Support UNIX socket connections]) +- fi +- AC_MSG_RESULT($UNIXCONN) +- AC_ARG_ENABLE(tcp-transport, +- AC_HELP_STRING([--enable-tcp-transport],[Enable TCP socket transport]), +- [TCPCONN=$enableval], [TCPCONN=yes]) +- AC_MSG_CHECKING([if Xtrans should support TCP socket connections]) +- AC_MSG_RESULT($TCPCONN) +- if test "$TCPCONN" = "yes"; then +- AC_DEFINE(TCPCONN,1,[Support TCP socket connections]) +- XTRANS_TCP_FLAGS +- fi +- [case $host_os in +- solaris*|sco*|sysv4*) localdef="yes" ;; +- *) localdef="no" ;; +- esac] +- AC_ARG_ENABLE(local-transport, +- AC_HELP_STRING([--enable-local-transport],[Enable os-specific local transport]), +- [LOCALCONN=$enableval], [LOCALCONN=$localdef]) +- AC_MSG_CHECKING([if Xtrans should support os-specific local connections]) +- AC_MSG_RESULT($LOCALCONN) +- if test "$LOCALCONN" = "yes"; then +- AC_DEFINE(LOCALCONN,1,[Support os-specific local connections]) +- fi +- +-]) # XTRANS_CONNECTION_FLAGS ++# Copyright (C) 2004, 2005 Free Software Foundation, Inc. ++# ++# This file is free software; the Free Software Foundation ++# gives unlimited permission to copy and/or distribute it, ++# with or without modifications, as long as this notice is preserved. + ++# serial 2 + +-# XTRANS_SECURE_RPC_FLAGS() +-# ------------------------- +-# Check for Secure RPC functions - must come after XTRANS_TCP_FLAGS +-# so that any necessary networking libraries are already found +-AC_DEFUN([XTRANS_SECURE_RPC_FLAGS], +-[AC_REQUIRE([XTRANS_TCP_FLAGS]) +- AC_ARG_ENABLE(secure-rpc, +- AC_HELP_STRING([--enable-secure-rpc],[Enable Secure RPC]), +- [SECURE_RPC=$enableval], [SECURE_RPC="try"]) ++# _AM_PROG_TAR(FORMAT) ++# -------------------- ++# Check how to create a tarball in format FORMAT. ++# FORMAT should be one of `v7', `ustar', or `pax'. ++# ++# Substitute a variable $(am__tar) that is a command ++# writing to stdout a FORMAT-tarball containing the directory ++# $tardir. ++# tardir=directory && $(am__tar) > result.tar ++# ++# Substitute a variable $(am__untar) that extract such ++# a tarball read from stdin. ++# $(am__untar) < result.tar ++AC_DEFUN([_AM_PROG_TAR], ++[# Always define AMTAR for backward compatibility. ++AM_MISSING_PROG([AMTAR], [tar]) ++m4_if([$1], [v7], ++ [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], ++ [m4_case([$1], [ustar],, [pax],, ++ [m4_fatal([Unknown tar format])]) ++AC_MSG_CHECKING([how to create a $1 tar archive]) ++# Loop over all known methods to create a tar archive until one works. ++_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' ++_am_tools=${am_cv_prog_tar_$1-$_am_tools} ++# Do not fold the above two line into one, because Tru64 sh and ++# Solaris sh will not grok spaces in the rhs of `-'. ++for _am_tool in $_am_tools ++do ++ case $_am_tool in ++ gnutar) ++ for _am_tar in tar gnutar gtar; ++ do ++ AM_RUN_LOG([$_am_tar --version]) && break ++ done ++ am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' ++ am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' ++ am__untar="$_am_tar -xf -" ++ ;; ++ plaintar) ++ # Must skip GNU tar: if it does not support --format= it doesn't create ++ # ustar tarball either. ++ (tar --version) >/dev/null 2>&1 && continue ++ am__tar='tar chf - "$$tardir"' ++ am__tar_='tar chf - "$tardir"' ++ am__untar='tar xf -' ++ ;; ++ pax) ++ am__tar='pax -L -x $1 -w "$$tardir"' ++ am__tar_='pax -L -x $1 -w "$tardir"' ++ am__untar='pax -r' ++ ;; ++ cpio) ++ am__tar='find "$$tardir" -print | cpio -o -H $1 -L' ++ am__tar_='find "$tardir" -print | cpio -o -H $1 -L' ++ am__untar='cpio -i -H $1 -d' ++ ;; ++ none) ++ am__tar=false ++ am__tar_=false ++ am__untar=false ++ ;; ++ esac + +- if test "x$SECURE_RPC" = "xyes" -o "x$SECURE_RPC" = "xtry" ; then +- FOUND_SECURE_RPC="no" +- AC_CHECK_FUNCS([authdes_seccreate authdes_create], +- [FOUND_SECURE_RPC="yes"]) +- if test "x$FOUND_SECURE_RPC" = "xno" ; then +- if test "x$SECURE_RPC" = "xyes" ; then +- AC_MSG_ERROR([Secure RPC requested, but required functions not found]) +- fi +- SECURE_RPC="no" +- else +- dnl FreeBSD keeps getsecretkey in librpcsvc +- AC_SEARCH_LIBS(getsecretkey, [rpcsvc]) +- SECURE_RPC="yes" +- fi +- fi +- AC_MSG_CHECKING([if Secure RPC authentication ("SUN-DES-1") should be supported]) +- if test "x$SECURE_RPC" = "xyes" ; then +- AC_DEFINE(SECURE_RPC, 1, [Support Secure RPC ("SUN-DES-1") authentication for X11 clients]) +- fi +- AC_MSG_RESULT($SECURE_RPC) +-]) # XTRANS_SECURE_RPC_FLAGS ++ # If the value was cached, stop now. We just wanted to have am__tar ++ # and am__untar set. ++ test -n "${am_cv_prog_tar_$1}" && break ++ ++ # tar/untar a dummy directory, and stop if the command works ++ rm -rf conftest.dir ++ mkdir conftest.dir ++ echo GrepMe > conftest.dir/file ++ AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) ++ rm -rf conftest.dir ++ if test -s conftest.tar; then ++ AM_RUN_LOG([$am__untar /dev/null 2>&1 && break ++ fi ++done ++rm -rf conftest.dir + ++AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) ++AC_MSG_RESULT([$am_cv_prog_tar_$1])]) ++AC_SUBST([am__tar]) ++AC_SUBST([am__untar]) ++]) # _AM_PROG_TAR + + m4_include([acinclude.m4]) +diff -Naur xorg-server-1.6.1.901/configure xorg-server-1.6.1.901.patch/configure +--- xorg-server-1.6.1.901/configure 2009-05-09 07:05:40.000000000 +0200 ++++ xorg-server-1.6.1.901.patch/configure 2009-05-20 02:50:02.638011723 +0200 +@@ -2138,7 +2138,7 @@ + Comma separated list of font dirs + --with-xkb-path=PATH Path to XKB base dir (default: ${datadir}/X11/xkb) + --with-xkb-output=PATH Path to XKB output dir (default: +- ${datadir}/X11/xkb/compiled) ++ ${localstatedir}/cache/xkb) + --with-serverconfig-path=PATH + Directory where ancillary server config files are + installed (default: ${libdir}/xorg) +@@ -6066,7 +6066,7 @@ + lt_cv_deplibs_check_method=pass_all + ;; + +-netbsd* | netbsdelf*-gnu) ++netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + else +@@ -9241,9 +9241,6 @@ + openbsd*) + with_gnu_ld=no + ;; +- linux* | k*bsd*-gnu) +- link_all_deplibs=no +- ;; + esac + + ld_shlibs=yes +@@ -9426,7 +9423,7 @@ + fi + ;; + +- netbsd* | netbsdelf*-gnu) ++ netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= +@@ -9601,7 +9598,6 @@ + if test "$aix_use_runtimelinking" = yes; then + shared_flag="$shared_flag "'${wl}-G' + fi +- link_all_deplibs=no + else + # not using gcc + if test "$host_cpu" = ia64; then +@@ -10016,7 +10012,7 @@ + link_all_deplibs=yes + ;; + +- netbsd* | netbsdelf*-gnu) ++ netbsd*) + if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else +@@ -10978,10 +10974,13 @@ + # before this can be enabled. + hardcode_into_libs=yes + ++ # Add ABI-specific directories to the system library path. ++ sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" ++ + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` +- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" ++ sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on +@@ -10993,18 +10992,6 @@ + dynamic_linker='GNU/Linux ld.so' + ;; + +-netbsdelf*-gnu) +- version_type=linux +- need_lib_prefix=no +- need_version=no +- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' +- soname_spec='${libname}${release}${shared_ext}$major' +- shlibpath_var=LD_LIBRARY_PATH +- shlibpath_overrides_runpath=no +- hardcode_into_libs=yes +- dynamic_linker='NetBSD ld.elf_so' +- ;; +- + netbsd*) + version_type=sunos + need_lib_prefix=no +@@ -11938,7 +11925,7 @@ + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 11941 "configure" ++#line 11928 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -12034,7 +12021,7 @@ + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext <<_LT_EOF +-#line 12037 "configure" ++#line 12024 "configure" + #include "confdefs.h" + + #if HAVE_DLFCN_H +@@ -19472,7 +19459,7 @@ + if test "${with_xkb_output+set}" = set; then + withval=$with_xkb_output; XKBOUTPUT="$withval" + else +- XKBOUTPUT="compiled" ++ XKBOUTPUT="${localstatedir}/cache/xkb" + fi + + +@@ -21150,11 +21137,10 @@ + { $as_echo "$as_me:$LINENO: checking for DBUS" >&5 + $as_echo_n "checking for DBUS... " >&6; } + +-if test -n "$PKG_CONFIG"; then +- if test -n "$DBUS_CFLAGS"; then +- pkg_cv_DBUS_CFLAGS="$DBUS_CFLAGS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$DBUS_CFLAGS"; then ++ pkg_cv_DBUS_CFLAGS="$DBUS_CFLAGS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dbus-1\"") >&5 + ($PKG_CONFIG --exists --print-errors "dbus-1") 2>&5 + ac_status=$? +@@ -21164,15 +21150,13 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi +-if test -n "$PKG_CONFIG"; then +- if test -n "$DBUS_LIBS"; then +- pkg_cv_DBUS_LIBS="$DBUS_LIBS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$DBUS_LIBS"; then ++ pkg_cv_DBUS_LIBS="$DBUS_LIBS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dbus-1\"") >&5 + ($PKG_CONFIG --exists --print-errors "dbus-1") 2>&5 + ac_status=$? +@@ -21182,9 +21166,8 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi + + +@@ -21197,9 +21180,9 @@ + _pkg_short_errors_supported=no + fi + if test $_pkg_short_errors_supported = yes; then +- DBUS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "dbus-1"` ++ DBUS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "dbus-1" 2>&1` + else +- DBUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-1"` ++ DBUS_PKG_ERRORS=`$PKG_CONFIG --print-errors "dbus-1" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$DBUS_PKG_ERRORS" >&5 +@@ -21263,11 +21246,10 @@ + { $as_echo "$as_me:$LINENO: checking for HAL" >&5 + $as_echo_n "checking for HAL... " >&6; } + +-if test -n "$PKG_CONFIG"; then +- if test -n "$HAL_CFLAGS"; then +- pkg_cv_HAL_CFLAGS="$HAL_CFLAGS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$HAL_CFLAGS"; then ++ pkg_cv_HAL_CFLAGS="$HAL_CFLAGS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"hal\"") >&5 + ($PKG_CONFIG --exists --print-errors "hal") 2>&5 + ac_status=$? +@@ -21277,15 +21259,13 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi +-if test -n "$PKG_CONFIG"; then +- if test -n "$HAL_LIBS"; then +- pkg_cv_HAL_LIBS="$HAL_LIBS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$HAL_LIBS"; then ++ pkg_cv_HAL_LIBS="$HAL_LIBS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"hal\"") >&5 + ($PKG_CONFIG --exists --print-errors "hal") 2>&5 + ac_status=$? +@@ -21295,9 +21275,8 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi + + +@@ -21310,9 +21289,9 @@ + _pkg_short_errors_supported=no + fi + if test $_pkg_short_errors_supported = yes; then +- HAL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "hal"` ++ HAL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "hal" 2>&1` + else +- HAL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "hal"` ++ HAL_PKG_ERRORS=`$PKG_CONFIG --print-errors "hal" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$HAL_PKG_ERRORS" >&5 +@@ -21831,11 +21810,10 @@ + { $as_echo "$as_me:$LINENO: checking for XLIB" >&5 + $as_echo_n "checking for XLIB... " >&6; } + +-if test -n "$PKG_CONFIG"; then +- if test -n "$XLIB_CFLAGS"; then +- pkg_cv_XLIB_CFLAGS="$XLIB_CFLAGS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$XLIB_CFLAGS"; then ++ pkg_cv_XLIB_CFLAGS="$XLIB_CFLAGS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11\"") >&5 + ($PKG_CONFIG --exists --print-errors "x11") 2>&5 + ac_status=$? +@@ -21845,15 +21823,13 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi +-if test -n "$PKG_CONFIG"; then +- if test -n "$XLIB_LIBS"; then +- pkg_cv_XLIB_LIBS="$XLIB_LIBS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$XLIB_LIBS"; then ++ pkg_cv_XLIB_LIBS="$XLIB_LIBS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11\"") >&5 + ($PKG_CONFIG --exists --print-errors "x11") 2>&5 + ac_status=$? +@@ -21863,9 +21839,8 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi + + +@@ -21878,9 +21853,9 @@ + _pkg_short_errors_supported=no + fi + if test $_pkg_short_errors_supported = yes; then +- XLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11"` ++ XLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "x11" 2>&1` + else +- XLIB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11"` ++ XLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors "x11" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$XLIB_PKG_ERRORS" >&5 +@@ -21944,11 +21919,10 @@ + { $as_echo "$as_me:$LINENO: checking for GL" >&5 + $as_echo_n "checking for GL... " >&6; } + +-if test -n "$PKG_CONFIG"; then +- if test -n "$GL_CFLAGS"; then +- pkg_cv_GL_CFLAGS="$GL_CFLAGS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$GL_CFLAGS"; then ++ pkg_cv_GL_CFLAGS="$GL_CFLAGS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glproto >= 1.4.9 gl >= 7.1.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "glproto >= 1.4.9 gl >= 7.1.0") 2>&5 + ac_status=$? +@@ -21958,15 +21932,13 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi +-if test -n "$PKG_CONFIG"; then +- if test -n "$GL_LIBS"; then +- pkg_cv_GL_LIBS="$GL_LIBS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$GL_LIBS"; then ++ pkg_cv_GL_LIBS="$GL_LIBS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glproto >= 1.4.9 gl >= 7.1.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "glproto >= 1.4.9 gl >= 7.1.0") 2>&5 + ac_status=$? +@@ -21976,9 +21948,8 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi + + +@@ -21991,9 +21962,9 @@ + _pkg_short_errors_supported=no + fi + if test $_pkg_short_errors_supported = yes; then +- GL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "glproto >= 1.4.9 gl >= 7.1.0"` ++ GL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "glproto >= 1.4.9 gl >= 7.1.0" 2>&1` + else +- GL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "glproto >= 1.4.9 gl >= 7.1.0"` ++ GL_PKG_ERRORS=`$PKG_CONFIG --print-errors "glproto >= 1.4.9 gl >= 7.1.0" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$GL_PKG_ERRORS" >&5 +@@ -22116,11 +22087,10 @@ + { $as_echo "$as_me:$LINENO: checking for DRIPROTO" >&5 + $as_echo_n "checking for DRIPROTO... " >&6; } + +-if test -n "$PKG_CONFIG"; then +- if test -n "$DRIPROTO_CFLAGS"; then +- pkg_cv_DRIPROTO_CFLAGS="$DRIPROTO_CFLAGS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$DRIPROTO_CFLAGS"; then ++ pkg_cv_DRIPROTO_CFLAGS="$DRIPROTO_CFLAGS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xf86driproto\"") >&5 + ($PKG_CONFIG --exists --print-errors "xf86driproto") 2>&5 + ac_status=$? +@@ -22130,15 +22100,13 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi +-if test -n "$PKG_CONFIG"; then +- if test -n "$DRIPROTO_LIBS"; then +- pkg_cv_DRIPROTO_LIBS="$DRIPROTO_LIBS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$DRIPROTO_LIBS"; then ++ pkg_cv_DRIPROTO_LIBS="$DRIPROTO_LIBS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xf86driproto\"") >&5 + ($PKG_CONFIG --exists --print-errors "xf86driproto") 2>&5 + ac_status=$? +@@ -22148,9 +22116,8 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi + + +@@ -22163,9 +22130,9 @@ + _pkg_short_errors_supported=no + fi + if test $_pkg_short_errors_supported = yes; then +- DRIPROTO_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xf86driproto"` ++ DRIPROTO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xf86driproto" 2>&1` + else +- DRIPROTO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xf86driproto"` ++ DRIPROTO_PKG_ERRORS=`$PKG_CONFIG --print-errors "xf86driproto" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$DRIPROTO_PKG_ERRORS" >&5 +@@ -22229,11 +22196,10 @@ + { $as_echo "$as_me:$LINENO: checking for GL" >&5 + $as_echo_n "checking for GL... " >&6; } + +-if test -n "$PKG_CONFIG"; then +- if test -n "$GL_CFLAGS"; then +- pkg_cv_GL_CFLAGS="$GL_CFLAGS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$GL_CFLAGS"; then ++ pkg_cv_GL_CFLAGS="$GL_CFLAGS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glproto >= 1.4.1 dri >= 7.1.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "glproto >= 1.4.1 dri >= 7.1.0") 2>&5 + ac_status=$? +@@ -22243,15 +22209,13 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi +-if test -n "$PKG_CONFIG"; then +- if test -n "$GL_LIBS"; then +- pkg_cv_GL_LIBS="$GL_LIBS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$GL_LIBS"; then ++ pkg_cv_GL_LIBS="$GL_LIBS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glproto >= 1.4.1 dri >= 7.1.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "glproto >= 1.4.1 dri >= 7.1.0") 2>&5 + ac_status=$? +@@ -22261,9 +22225,8 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi + + +@@ -22276,9 +22239,9 @@ + _pkg_short_errors_supported=no + fi + if test $_pkg_short_errors_supported = yes; then +- GL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "glproto >= 1.4.1 dri >= 7.1.0"` ++ GL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "glproto >= 1.4.1 dri >= 7.1.0" 2>&1` + else +- GL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "glproto >= 1.4.1 dri >= 7.1.0"` ++ GL_PKG_ERRORS=`$PKG_CONFIG --print-errors "glproto >= 1.4.1 dri >= 7.1.0" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$GL_PKG_ERRORS" >&5 +@@ -22346,11 +22309,10 @@ + { $as_echo "$as_me:$LINENO: checking for DRI2PROTO" >&5 + $as_echo_n "checking for DRI2PROTO... " >&6; } + +-if test -n "$PKG_CONFIG"; then +- if test -n "$DRI2PROTO_CFLAGS"; then +- pkg_cv_DRI2PROTO_CFLAGS="$DRI2PROTO_CFLAGS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$DRI2PROTO_CFLAGS"; then ++ pkg_cv_DRI2PROTO_CFLAGS="$DRI2PROTO_CFLAGS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dri2proto >= 1.99.3\"") >&5 + ($PKG_CONFIG --exists --print-errors "dri2proto >= 1.99.3") 2>&5 + ac_status=$? +@@ -22360,15 +22322,13 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi +-if test -n "$PKG_CONFIG"; then +- if test -n "$DRI2PROTO_LIBS"; then +- pkg_cv_DRI2PROTO_LIBS="$DRI2PROTO_LIBS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$DRI2PROTO_LIBS"; then ++ pkg_cv_DRI2PROTO_LIBS="$DRI2PROTO_LIBS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dri2proto >= 1.99.3\"") >&5 + ($PKG_CONFIG --exists --print-errors "dri2proto >= 1.99.3") 2>&5 + ac_status=$? +@@ -22378,9 +22338,8 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi + + +@@ -22393,9 +22352,9 @@ + _pkg_short_errors_supported=no + fi + if test $_pkg_short_errors_supported = yes; then +- DRI2PROTO_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "dri2proto >= 1.99.3"` ++ DRI2PROTO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "dri2proto >= 1.99.3" 2>&1` + else +- DRI2PROTO_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dri2proto >= 1.99.3"` ++ DRI2PROTO_PKG_ERRORS=`$PKG_CONFIG --print-errors "dri2proto >= 1.99.3" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$DRI2PROTO_PKG_ERRORS" >&5 +@@ -22442,11 +22401,10 @@ + { $as_echo "$as_me:$LINENO: checking for LIBDRM" >&5 + $as_echo_n "checking for LIBDRM... " >&6; } + +-if test -n "$PKG_CONFIG"; then +- if test -n "$LIBDRM_CFLAGS"; then +- pkg_cv_LIBDRM_CFLAGS="$LIBDRM_CFLAGS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$LIBDRM_CFLAGS"; then ++ pkg_cv_LIBDRM_CFLAGS="$LIBDRM_CFLAGS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libdrm >= 2.3.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "libdrm >= 2.3.0") 2>&5 + ac_status=$? +@@ -22456,15 +22414,13 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi +-if test -n "$PKG_CONFIG"; then +- if test -n "$LIBDRM_LIBS"; then +- pkg_cv_LIBDRM_LIBS="$LIBDRM_LIBS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$LIBDRM_LIBS"; then ++ pkg_cv_LIBDRM_LIBS="$LIBDRM_LIBS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libdrm >= 2.3.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "libdrm >= 2.3.0") 2>&5 + ac_status=$? +@@ -22474,9 +22430,8 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi + + +@@ -22489,9 +22444,9 @@ + _pkg_short_errors_supported=no + fi + if test $_pkg_short_errors_supported = yes; then +- LIBDRM_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libdrm >= 2.3.0"` ++ LIBDRM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libdrm >= 2.3.0" 2>&1` + else +- LIBDRM_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libdrm >= 2.3.0"` ++ LIBDRM_PKG_ERRORS=`$PKG_CONFIG --print-errors "libdrm >= 2.3.0" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$LIBDRM_PKG_ERRORS" >&5 +@@ -23688,11 +23643,10 @@ + { $as_echo "$as_me:$LINENO: checking for XDMCP" >&5 + $as_echo_n "checking for XDMCP... " >&6; } + +-if test -n "$PKG_CONFIG"; then +- if test -n "$XDMCP_CFLAGS"; then +- pkg_cv_XDMCP_CFLAGS="$XDMCP_CFLAGS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$XDMCP_CFLAGS"; then ++ pkg_cv_XDMCP_CFLAGS="$XDMCP_CFLAGS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xdmcp\"") >&5 + ($PKG_CONFIG --exists --print-errors "xdmcp") 2>&5 + ac_status=$? +@@ -23702,15 +23656,13 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi +-if test -n "$PKG_CONFIG"; then +- if test -n "$XDMCP_LIBS"; then +- pkg_cv_XDMCP_LIBS="$XDMCP_LIBS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$XDMCP_LIBS"; then ++ pkg_cv_XDMCP_LIBS="$XDMCP_LIBS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xdmcp\"") >&5 + ($PKG_CONFIG --exists --print-errors "xdmcp") 2>&5 + ac_status=$? +@@ -23720,9 +23672,8 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi + + +@@ -23735,9 +23686,9 @@ + _pkg_short_errors_supported=no + fi + if test $_pkg_short_errors_supported = yes; then +- XDMCP_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xdmcp"` ++ XDMCP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xdmcp" 2>&1` + else +- XDMCP_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xdmcp"` ++ XDMCP_PKG_ERRORS=`$PKG_CONFIG --print-errors "xdmcp" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$XDMCP_PKG_ERRORS" >&5 +@@ -24251,11 +24202,10 @@ + { $as_echo "$as_me:$LINENO: checking for XSERVERCFLAGS" >&5 + $as_echo_n "checking for XSERVERCFLAGS... " >&6; } + +-if test -n "$PKG_CONFIG"; then +- if test -n "$XSERVERCFLAGS_CFLAGS"; then +- pkg_cv_XSERVERCFLAGS_CFLAGS="$XSERVERCFLAGS_CFLAGS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$XSERVERCFLAGS_CFLAGS"; then ++ pkg_cv_XSERVERCFLAGS_CFLAGS="$XSERVERCFLAGS_CFLAGS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$REQUIRED_MODULES \$REQUIRED_LIBS\"") >&5 + ($PKG_CONFIG --exists --print-errors "$REQUIRED_MODULES $REQUIRED_LIBS") 2>&5 + ac_status=$? +@@ -24265,15 +24215,13 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi +-if test -n "$PKG_CONFIG"; then +- if test -n "$XSERVERCFLAGS_LIBS"; then +- pkg_cv_XSERVERCFLAGS_LIBS="$XSERVERCFLAGS_LIBS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$XSERVERCFLAGS_LIBS"; then ++ pkg_cv_XSERVERCFLAGS_LIBS="$XSERVERCFLAGS_LIBS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$REQUIRED_MODULES \$REQUIRED_LIBS\"") >&5 + ($PKG_CONFIG --exists --print-errors "$REQUIRED_MODULES $REQUIRED_LIBS") 2>&5 + ac_status=$? +@@ -24283,9 +24231,8 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi + + +@@ -24298,9 +24245,9 @@ + _pkg_short_errors_supported=no + fi + if test $_pkg_short_errors_supported = yes; then +- XSERVERCFLAGS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$REQUIRED_MODULES $REQUIRED_LIBS"` ++ XSERVERCFLAGS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$REQUIRED_MODULES $REQUIRED_LIBS" 2>&1` + else +- XSERVERCFLAGS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$REQUIRED_MODULES $REQUIRED_LIBS"` ++ XSERVERCFLAGS_PKG_ERRORS=`$PKG_CONFIG --print-errors "$REQUIRED_MODULES $REQUIRED_LIBS" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$XSERVERCFLAGS_PKG_ERRORS" >&5 +@@ -24364,11 +24311,10 @@ + { $as_echo "$as_me:$LINENO: checking for XSERVERLIBS" >&5 + $as_echo_n "checking for XSERVERLIBS... " >&6; } + +-if test -n "$PKG_CONFIG"; then +- if test -n "$XSERVERLIBS_CFLAGS"; then +- pkg_cv_XSERVERLIBS_CFLAGS="$XSERVERLIBS_CFLAGS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$XSERVERLIBS_CFLAGS"; then ++ pkg_cv_XSERVERLIBS_CFLAGS="$XSERVERLIBS_CFLAGS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$REQUIRED_LIBS\"") >&5 + ($PKG_CONFIG --exists --print-errors "$REQUIRED_LIBS") 2>&5 + ac_status=$? +@@ -24378,15 +24324,13 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi +-if test -n "$PKG_CONFIG"; then +- if test -n "$XSERVERLIBS_LIBS"; then +- pkg_cv_XSERVERLIBS_LIBS="$XSERVERLIBS_LIBS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$XSERVERLIBS_LIBS"; then ++ pkg_cv_XSERVERLIBS_LIBS="$XSERVERLIBS_LIBS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$REQUIRED_LIBS\"") >&5 + ($PKG_CONFIG --exists --print-errors "$REQUIRED_LIBS") 2>&5 + ac_status=$? +@@ -24396,9 +24340,8 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi + + +@@ -24411,9 +24354,9 @@ + _pkg_short_errors_supported=no + fi + if test $_pkg_short_errors_supported = yes; then +- XSERVERLIBS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$REQUIRED_LIBS"` ++ XSERVERLIBS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$REQUIRED_LIBS" 2>&1` + else +- XSERVERLIBS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$REQUIRED_LIBS"` ++ XSERVERLIBS_PKG_ERRORS=`$PKG_CONFIG --print-errors "$REQUIRED_LIBS" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$XSERVERLIBS_PKG_ERRORS" >&5 +@@ -24582,11 +24525,10 @@ + { $as_echo "$as_me:$LINENO: checking for XNESTMODULES" >&5 + $as_echo_n "checking for XNESTMODULES... " >&6; } + +-if test -n "$PKG_CONFIG"; then +- if test -n "$XNESTMODULES_CFLAGS"; then +- pkg_cv_XNESTMODULES_CFLAGS="$XNESTMODULES_CFLAGS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$XNESTMODULES_CFLAGS"; then ++ pkg_cv_XNESTMODULES_CFLAGS="$XNESTMODULES_CFLAGS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xfont xext x11 xau \$XDMCP_MODULES\"") >&5 + ($PKG_CONFIG --exists --print-errors "xfont xext x11 xau $XDMCP_MODULES") 2>&5 + ac_status=$? +@@ -24596,15 +24538,13 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi +-if test -n "$PKG_CONFIG"; then +- if test -n "$XNESTMODULES_LIBS"; then +- pkg_cv_XNESTMODULES_LIBS="$XNESTMODULES_LIBS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$XNESTMODULES_LIBS"; then ++ pkg_cv_XNESTMODULES_LIBS="$XNESTMODULES_LIBS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xfont xext x11 xau \$XDMCP_MODULES\"") >&5 + ($PKG_CONFIG --exists --print-errors "xfont xext x11 xau $XDMCP_MODULES") 2>&5 + ac_status=$? +@@ -24614,9 +24554,8 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi + + +@@ -24629,9 +24568,9 @@ + _pkg_short_errors_supported=no + fi + if test $_pkg_short_errors_supported = yes; then +- XNESTMODULES_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xfont xext x11 xau $XDMCP_MODULES"` ++ XNESTMODULES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xfont xext x11 xau $XDMCP_MODULES" 2>&1` + else +- XNESTMODULES_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xfont xext x11 xau $XDMCP_MODULES"` ++ XNESTMODULES_PKG_ERRORS=`$PKG_CONFIG --print-errors "xfont xext x11 xau $XDMCP_MODULES" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$XNESTMODULES_PKG_ERRORS" >&5 +@@ -24701,11 +24640,10 @@ + { $as_echo "$as_me:$LINENO: checking for PCIACCESS" >&5 + $as_echo_n "checking for PCIACCESS... " >&6; } + +-if test -n "$PKG_CONFIG"; then +- if test -n "$PCIACCESS_CFLAGS"; then +- pkg_cv_PCIACCESS_CFLAGS="$PCIACCESS_CFLAGS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$PCIACCESS_CFLAGS"; then ++ pkg_cv_PCIACCESS_CFLAGS="$PCIACCESS_CFLAGS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"pciaccess >= 0.8.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "pciaccess >= 0.8.0") 2>&5 + ac_status=$? +@@ -24715,15 +24653,13 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi +-if test -n "$PKG_CONFIG"; then +- if test -n "$PCIACCESS_LIBS"; then +- pkg_cv_PCIACCESS_LIBS="$PCIACCESS_LIBS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$PCIACCESS_LIBS"; then ++ pkg_cv_PCIACCESS_LIBS="$PCIACCESS_LIBS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"pciaccess >= 0.8.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "pciaccess >= 0.8.0") 2>&5 + ac_status=$? +@@ -24733,9 +24669,8 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi + + +@@ -24748,9 +24683,9 @@ + _pkg_short_errors_supported=no + fi + if test $_pkg_short_errors_supported = yes; then +- PCIACCESS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "pciaccess >= 0.8.0"` ++ PCIACCESS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "pciaccess >= 0.8.0" 2>&1` + else +- PCIACCESS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "pciaccess >= 0.8.0"` ++ PCIACCESS_PKG_ERRORS=`$PKG_CONFIG --print-errors "pciaccess >= 0.8.0" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$PCIACCESS_PKG_ERRORS" >&5 +@@ -25428,11 +25363,10 @@ + { $as_echo "$as_me:$LINENO: checking for DGA" >&5 + $as_echo_n "checking for DGA... " >&6; } + +-if test -n "$PKG_CONFIG"; then +- if test -n "$DGA_CFLAGS"; then +- pkg_cv_DGA_CFLAGS="$DGA_CFLAGS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$DGA_CFLAGS"; then ++ pkg_cv_DGA_CFLAGS="$DGA_CFLAGS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xf86dgaproto\"") >&5 + ($PKG_CONFIG --exists --print-errors "xf86dgaproto") 2>&5 + ac_status=$? +@@ -25442,15 +25376,13 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi +-if test -n "$PKG_CONFIG"; then +- if test -n "$DGA_LIBS"; then +- pkg_cv_DGA_LIBS="$DGA_LIBS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$DGA_LIBS"; then ++ pkg_cv_DGA_LIBS="$DGA_LIBS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xf86dgaproto\"") >&5 + ($PKG_CONFIG --exists --print-errors "xf86dgaproto") 2>&5 + ac_status=$? +@@ -25460,9 +25392,8 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi + + +@@ -25475,9 +25406,9 @@ + _pkg_short_errors_supported=no + fi + if test $_pkg_short_errors_supported = yes; then +- DGA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xf86dgaproto"` ++ DGA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xf86dgaproto" 2>&1` + else +- DGA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xf86dgaproto"` ++ DGA_PKG_ERRORS=`$PKG_CONFIG --print-errors "xf86dgaproto" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$DGA_PKG_ERRORS" >&5 +@@ -25502,11 +25433,10 @@ + { $as_echo "$as_me:$LINENO: checking for DGA" >&5 + $as_echo_n "checking for DGA... " >&6; } + +-if test -n "$PKG_CONFIG"; then +- if test -n "$DGA_CFLAGS"; then +- pkg_cv_DGA_CFLAGS="$DGA_CFLAGS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$DGA_CFLAGS"; then ++ pkg_cv_DGA_CFLAGS="$DGA_CFLAGS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xf86dgaproto\"") >&5 + ($PKG_CONFIG --exists --print-errors "xf86dgaproto") 2>&5 + ac_status=$? +@@ -25516,15 +25446,13 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi +-if test -n "$PKG_CONFIG"; then +- if test -n "$DGA_LIBS"; then +- pkg_cv_DGA_LIBS="$DGA_LIBS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$DGA_LIBS"; then ++ pkg_cv_DGA_LIBS="$DGA_LIBS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xf86dgaproto\"") >&5 + ($PKG_CONFIG --exists --print-errors "xf86dgaproto") 2>&5 + ac_status=$? +@@ -25534,9 +25462,8 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi + + +@@ -25549,9 +25476,9 @@ + _pkg_short_errors_supported=no + fi + if test $_pkg_short_errors_supported = yes; then +- DGA_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xf86dgaproto"` ++ DGA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xf86dgaproto" 2>&1` + else +- DGA_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xf86dgaproto"` ++ DGA_PKG_ERRORS=`$PKG_CONFIG --print-errors "xf86dgaproto" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$DGA_PKG_ERRORS" >&5 +@@ -25628,11 +25555,10 @@ + { $as_echo "$as_me:$LINENO: checking for XF86VIDMODE" >&5 + $as_echo_n "checking for XF86VIDMODE... " >&6; } + +-if test -n "$PKG_CONFIG"; then +- if test -n "$XF86VIDMODE_CFLAGS"; then +- pkg_cv_XF86VIDMODE_CFLAGS="$XF86VIDMODE_CFLAGS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$XF86VIDMODE_CFLAGS"; then ++ pkg_cv_XF86VIDMODE_CFLAGS="$XF86VIDMODE_CFLAGS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xf86vidmodeproto\"") >&5 + ($PKG_CONFIG --exists --print-errors "xf86vidmodeproto") 2>&5 + ac_status=$? +@@ -25642,15 +25568,13 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi +-if test -n "$PKG_CONFIG"; then +- if test -n "$XF86VIDMODE_LIBS"; then +- pkg_cv_XF86VIDMODE_LIBS="$XF86VIDMODE_LIBS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$XF86VIDMODE_LIBS"; then ++ pkg_cv_XF86VIDMODE_LIBS="$XF86VIDMODE_LIBS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xf86vidmodeproto\"") >&5 + ($PKG_CONFIG --exists --print-errors "xf86vidmodeproto") 2>&5 + ac_status=$? +@@ -25660,9 +25584,8 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi + + +@@ -25675,9 +25598,9 @@ + _pkg_short_errors_supported=no + fi + if test $_pkg_short_errors_supported = yes; then +- XF86VIDMODE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xf86vidmodeproto"` ++ XF86VIDMODE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xf86vidmodeproto" 2>&1` + else +- XF86VIDMODE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xf86vidmodeproto"` ++ XF86VIDMODE_PKG_ERRORS=`$PKG_CONFIG --print-errors "xf86vidmodeproto" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$XF86VIDMODE_PKG_ERRORS" >&5 +@@ -25702,11 +25625,10 @@ + { $as_echo "$as_me:$LINENO: checking for XF86VIDMODE" >&5 + $as_echo_n "checking for XF86VIDMODE... " >&6; } + +-if test -n "$PKG_CONFIG"; then +- if test -n "$XF86VIDMODE_CFLAGS"; then +- pkg_cv_XF86VIDMODE_CFLAGS="$XF86VIDMODE_CFLAGS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$XF86VIDMODE_CFLAGS"; then ++ pkg_cv_XF86VIDMODE_CFLAGS="$XF86VIDMODE_CFLAGS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xf86vidmodeproto\"") >&5 + ($PKG_CONFIG --exists --print-errors "xf86vidmodeproto") 2>&5 + ac_status=$? +@@ -25716,15 +25638,13 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi +-if test -n "$PKG_CONFIG"; then +- if test -n "$XF86VIDMODE_LIBS"; then +- pkg_cv_XF86VIDMODE_LIBS="$XF86VIDMODE_LIBS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$XF86VIDMODE_LIBS"; then ++ pkg_cv_XF86VIDMODE_LIBS="$XF86VIDMODE_LIBS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xf86vidmodeproto\"") >&5 + ($PKG_CONFIG --exists --print-errors "xf86vidmodeproto") 2>&5 + ac_status=$? +@@ -25734,9 +25654,8 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi + + +@@ -25749,9 +25668,9 @@ + _pkg_short_errors_supported=no + fi + if test $_pkg_short_errors_supported = yes; then +- XF86VIDMODE_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xf86vidmodeproto"` ++ XF86VIDMODE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xf86vidmodeproto" 2>&1` + else +- XF86VIDMODE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xf86vidmodeproto"` ++ XF86VIDMODE_PKG_ERRORS=`$PKG_CONFIG --print-errors "xf86vidmodeproto" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$XF86VIDMODE_PKG_ERRORS" >&5 +@@ -25823,11 +25742,10 @@ + { $as_echo "$as_me:$LINENO: checking for XORG_MODULES" >&5 + $as_echo_n "checking for XORG_MODULES... " >&6; } + +-if test -n "$PKG_CONFIG"; then +- if test -n "$XORG_MODULES_CFLAGS"; then +- pkg_cv_XORG_MODULES_CFLAGS="$XORG_MODULES_CFLAGS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$XORG_MODULES_CFLAGS"; then ++ pkg_cv_XORG_MODULES_CFLAGS="$XORG_MODULES_CFLAGS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$XORG_MODULES\"") >&5 + ($PKG_CONFIG --exists --print-errors "$XORG_MODULES") 2>&5 + ac_status=$? +@@ -25837,15 +25755,13 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi +-if test -n "$PKG_CONFIG"; then +- if test -n "$XORG_MODULES_LIBS"; then +- pkg_cv_XORG_MODULES_LIBS="$XORG_MODULES_LIBS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$XORG_MODULES_LIBS"; then ++ pkg_cv_XORG_MODULES_LIBS="$XORG_MODULES_LIBS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$XORG_MODULES\"") >&5 + ($PKG_CONFIG --exists --print-errors "$XORG_MODULES") 2>&5 + ac_status=$? +@@ -25855,9 +25771,8 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi + + +@@ -25870,9 +25785,9 @@ + _pkg_short_errors_supported=no + fi + if test $_pkg_short_errors_supported = yes; then +- XORG_MODULES_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$XORG_MODULES"` ++ XORG_MODULES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$XORG_MODULES" 2>&1` + else +- XORG_MODULES_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$XORG_MODULES"` ++ XORG_MODULES_PKG_ERRORS=`$PKG_CONFIG --print-errors "$XORG_MODULES" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$XORG_MODULES_PKG_ERRORS" >&5 +@@ -26272,11 +26187,10 @@ + { $as_echo "$as_me:$LINENO: checking for XWINMODULES" >&5 + $as_echo_n "checking for XWINMODULES... " >&6; } + +-if test -n "$PKG_CONFIG"; then +- if test -n "$XWINMODULES_CFLAGS"; then +- pkg_cv_XWINMODULES_CFLAGS="$XWINMODULES_CFLAGS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$XWINMODULES_CFLAGS"; then ++ pkg_cv_XWINMODULES_CFLAGS="$XWINMODULES_CFLAGS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xdmcp xau xfont\"") >&5 + ($PKG_CONFIG --exists --print-errors "x11 xdmcp xau xfont") 2>&5 + ac_status=$? +@@ -26286,15 +26200,13 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi +-if test -n "$PKG_CONFIG"; then +- if test -n "$XWINMODULES_LIBS"; then +- pkg_cv_XWINMODULES_LIBS="$XWINMODULES_LIBS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$XWINMODULES_LIBS"; then ++ pkg_cv_XWINMODULES_LIBS="$XWINMODULES_LIBS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xdmcp xau xfont\"") >&5 + ($PKG_CONFIG --exists --print-errors "x11 xdmcp xau xfont") 2>&5 + ac_status=$? +@@ -26304,9 +26216,8 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi + + +@@ -26319,9 +26230,9 @@ + _pkg_short_errors_supported=no + fi + if test $_pkg_short_errors_supported = yes; then +- XWINMODULES_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11 xdmcp xau xfont"` ++ XWINMODULES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "x11 xdmcp xau xfont" 2>&1` + else +- XWINMODULES_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 xdmcp xau xfont"` ++ XWINMODULES_PKG_ERRORS=`$PKG_CONFIG --print-errors "x11 xdmcp xau xfont" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$XWINMODULES_PKG_ERRORS" >&5 +@@ -26399,11 +26310,10 @@ + { $as_echo "$as_me:$LINENO: checking for XWINMODULES" >&5 + $as_echo_n "checking for XWINMODULES... " >&6; } + +-if test -n "$PKG_CONFIG"; then +- if test -n "$XWINMODULES_CFLAGS"; then +- pkg_cv_XWINMODULES_CFLAGS="$XWINMODULES_CFLAGS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$XWINMODULES_CFLAGS"; then ++ pkg_cv_XWINMODULES_CFLAGS="$XWINMODULES_CFLAGS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xdmcp xau xfont\"") >&5 + ($PKG_CONFIG --exists --print-errors "x11 xdmcp xau xfont") 2>&5 + ac_status=$? +@@ -26413,15 +26323,13 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi +-if test -n "$PKG_CONFIG"; then +- if test -n "$XWINMODULES_LIBS"; then +- pkg_cv_XWINMODULES_LIBS="$XWINMODULES_LIBS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$XWINMODULES_LIBS"; then ++ pkg_cv_XWINMODULES_LIBS="$XWINMODULES_LIBS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xdmcp xau xfont\"") >&5 + ($PKG_CONFIG --exists --print-errors "x11 xdmcp xau xfont") 2>&5 + ac_status=$? +@@ -26431,9 +26339,8 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi + + +@@ -26446,9 +26353,9 @@ + _pkg_short_errors_supported=no + fi + if test $_pkg_short_errors_supported = yes; then +- XWINMODULES_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11 xdmcp xau xfont"` ++ XWINMODULES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "x11 xdmcp xau xfont" 2>&1` + else +- XWINMODULES_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 xdmcp xau xfont"` ++ XWINMODULES_PKG_ERRORS=`$PKG_CONFIG --print-errors "x11 xdmcp xau xfont" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$XWINMODULES_PKG_ERRORS" >&5 +@@ -26728,11 +26635,10 @@ + { $as_echo "$as_me:$LINENO: checking for XPBPROXY" >&5 + $as_echo_n "checking for XPBPROXY... " >&6; } + +-if test -n "$PKG_CONFIG"; then +- if test -n "$XPBPROXY_CFLAGS"; then +- pkg_cv_XPBPROXY_CFLAGS="$XPBPROXY_CFLAGS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$XPBPROXY_CFLAGS"; then ++ pkg_cv_XPBPROXY_CFLAGS="$XPBPROXY_CFLAGS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"applewmproto >= 1.1.1 applewm >= 1.0.0 xfixes fixesproto x11\"") >&5 + ($PKG_CONFIG --exists --print-errors "applewmproto >= 1.1.1 applewm >= 1.0.0 xfixes fixesproto x11") 2>&5 + ac_status=$? +@@ -26742,15 +26648,13 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi +-if test -n "$PKG_CONFIG"; then +- if test -n "$XPBPROXY_LIBS"; then +- pkg_cv_XPBPROXY_LIBS="$XPBPROXY_LIBS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$XPBPROXY_LIBS"; then ++ pkg_cv_XPBPROXY_LIBS="$XPBPROXY_LIBS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"applewmproto >= 1.1.1 applewm >= 1.0.0 xfixes fixesproto x11\"") >&5 + ($PKG_CONFIG --exists --print-errors "applewmproto >= 1.1.1 applewm >= 1.0.0 xfixes fixesproto x11") 2>&5 + ac_status=$? +@@ -26760,9 +26664,8 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi + + +@@ -26775,9 +26678,9 @@ + _pkg_short_errors_supported=no + fi + if test $_pkg_short_errors_supported = yes; then +- XPBPROXY_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "applewmproto >= 1.1.1 applewm >= 1.0.0 xfixes fixesproto x11"` ++ XPBPROXY_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "applewmproto >= 1.1.1 applewm >= 1.0.0 xfixes fixesproto x11" 2>&1` + else +- XPBPROXY_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "applewmproto >= 1.1.1 applewm >= 1.0.0 xfixes fixesproto x11"` ++ XPBPROXY_PKG_ERRORS=`$PKG_CONFIG --print-errors "applewmproto >= 1.1.1 applewm >= 1.0.0 xfixes fixesproto x11" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$XPBPROXY_PKG_ERRORS" >&5 +@@ -27004,11 +26907,10 @@ + { $as_echo "$as_me:$LINENO: checking for DMXMODULES" >&5 + $as_echo_n "checking for DMXMODULES... " >&6; } + +-if test -n "$PKG_CONFIG"; then +- if test -n "$DMXMODULES_CFLAGS"; then +- pkg_cv_DMXMODULES_CFLAGS="$DMXMODULES_CFLAGS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$DMXMODULES_CFLAGS"; then ++ pkg_cv_DMXMODULES_CFLAGS="$DMXMODULES_CFLAGS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xmuu xext x11 xrender xfixes xfont xi dmxproto xau \$XDMCP_MODULES\"") >&5 + ($PKG_CONFIG --exists --print-errors "xmuu xext x11 xrender xfixes xfont xi dmxproto xau $XDMCP_MODULES") 2>&5 + ac_status=$? +@@ -27018,15 +26920,13 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi +-if test -n "$PKG_CONFIG"; then +- if test -n "$DMXMODULES_LIBS"; then +- pkg_cv_DMXMODULES_LIBS="$DMXMODULES_LIBS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$DMXMODULES_LIBS"; then ++ pkg_cv_DMXMODULES_LIBS="$DMXMODULES_LIBS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xmuu xext x11 xrender xfixes xfont xi dmxproto xau \$XDMCP_MODULES\"") >&5 + ($PKG_CONFIG --exists --print-errors "xmuu xext x11 xrender xfixes xfont xi dmxproto xau $XDMCP_MODULES") 2>&5 + ac_status=$? +@@ -27036,9 +26936,8 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi + + +@@ -27051,9 +26950,9 @@ + _pkg_short_errors_supported=no + fi + if test $_pkg_short_errors_supported = yes; then +- DMXMODULES_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xmuu xext x11 xrender xfixes xfont xi dmxproto xau $XDMCP_MODULES"` ++ DMXMODULES_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xmuu xext x11 xrender xfixes xfont xi dmxproto xau $XDMCP_MODULES" 2>&1` + else +- DMXMODULES_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xmuu xext x11 xrender xfixes xfont xi dmxproto xau $XDMCP_MODULES"` ++ DMXMODULES_PKG_ERRORS=`$PKG_CONFIG --print-errors "xmuu xext x11 xrender xfixes xfont xi dmxproto xau $XDMCP_MODULES" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$DMXMODULES_PKG_ERRORS" >&5 +@@ -27390,11 +27289,10 @@ + { $as_echo "$as_me:$LINENO: checking for GL" >&5 + $as_echo_n "checking for GL... " >&6; } + +-if test -n "$PKG_CONFIG"; then +- if test -n "$GL_CFLAGS"; then +- pkg_cv_GL_CFLAGS="$GL_CFLAGS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$GL_CFLAGS"; then ++ pkg_cv_GL_CFLAGS="$GL_CFLAGS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glproto\"") >&5 + ($PKG_CONFIG --exists --print-errors "glproto") 2>&5 + ac_status=$? +@@ -27404,15 +27302,13 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi +-if test -n "$PKG_CONFIG"; then +- if test -n "$GL_LIBS"; then +- pkg_cv_GL_LIBS="$GL_LIBS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$GL_LIBS"; then ++ pkg_cv_GL_LIBS="$GL_LIBS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glproto\"") >&5 + ($PKG_CONFIG --exists --print-errors "glproto") 2>&5 + ac_status=$? +@@ -27422,9 +27318,8 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi + + +@@ -27437,9 +27332,9 @@ + _pkg_short_errors_supported=no + fi + if test $_pkg_short_errors_supported = yes; then +- GL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "glproto"` ++ GL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "glproto" 2>&1` + else +- GL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "glproto"` ++ GL_PKG_ERRORS=`$PKG_CONFIG --print-errors "glproto" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$GL_PKG_ERRORS" >&5 +@@ -27504,11 +27399,10 @@ + { $as_echo "$as_me:$LINENO: checking for XDMXCONFIG_DEP" >&5 + $as_echo_n "checking for XDMXCONFIG_DEP... " >&6; } + +-if test -n "$PKG_CONFIG"; then +- if test -n "$XDMXCONFIG_DEP_CFLAGS"; then +- pkg_cv_XDMXCONFIG_DEP_CFLAGS="$XDMXCONFIG_DEP_CFLAGS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$XDMXCONFIG_DEP_CFLAGS"; then ++ pkg_cv_XDMXCONFIG_DEP_CFLAGS="$XDMXCONFIG_DEP_CFLAGS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xaw7 xmu xt xpm x11\"") >&5 + ($PKG_CONFIG --exists --print-errors "xaw7 xmu xt xpm x11") 2>&5 + ac_status=$? +@@ -27518,15 +27412,13 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi +-if test -n "$PKG_CONFIG"; then +- if test -n "$XDMXCONFIG_DEP_LIBS"; then +- pkg_cv_XDMXCONFIG_DEP_LIBS="$XDMXCONFIG_DEP_LIBS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$XDMXCONFIG_DEP_LIBS"; then ++ pkg_cv_XDMXCONFIG_DEP_LIBS="$XDMXCONFIG_DEP_LIBS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xaw7 xmu xt xpm x11\"") >&5 + ($PKG_CONFIG --exists --print-errors "xaw7 xmu xt xpm x11") 2>&5 + ac_status=$? +@@ -27536,9 +27428,8 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi + + +@@ -27551,9 +27442,9 @@ + _pkg_short_errors_supported=no + fi + if test $_pkg_short_errors_supported = yes; then +- XDMXCONFIG_DEP_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xaw7 xmu xt xpm x11"` ++ XDMXCONFIG_DEP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xaw7 xmu xt xpm x11" 2>&1` + else +- XDMXCONFIG_DEP_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xaw7 xmu xt xpm x11"` ++ XDMXCONFIG_DEP_PKG_ERRORS=`$PKG_CONFIG --print-errors "xaw7 xmu xt xpm x11" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$XDMXCONFIG_DEP_PKG_ERRORS" >&5 +@@ -27619,11 +27510,10 @@ + { $as_echo "$as_me:$LINENO: checking for DMXEXAMPLES_DEP" >&5 + $as_echo_n "checking for DMXEXAMPLES_DEP... " >&6; } + +-if test -n "$PKG_CONFIG"; then +- if test -n "$DMXEXAMPLES_DEP_CFLAGS"; then +- pkg_cv_DMXEXAMPLES_DEP_CFLAGS="$DMXEXAMPLES_DEP_CFLAGS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$DMXEXAMPLES_DEP_CFLAGS"; then ++ pkg_cv_DMXEXAMPLES_DEP_CFLAGS="$DMXEXAMPLES_DEP_CFLAGS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dmx xext x11\"") >&5 + ($PKG_CONFIG --exists --print-errors "dmx xext x11") 2>&5 + ac_status=$? +@@ -27633,15 +27523,13 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi +-if test -n "$PKG_CONFIG"; then +- if test -n "$DMXEXAMPLES_DEP_LIBS"; then +- pkg_cv_DMXEXAMPLES_DEP_LIBS="$DMXEXAMPLES_DEP_LIBS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$DMXEXAMPLES_DEP_LIBS"; then ++ pkg_cv_DMXEXAMPLES_DEP_LIBS="$DMXEXAMPLES_DEP_LIBS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dmx xext x11\"") >&5 + ($PKG_CONFIG --exists --print-errors "dmx xext x11") 2>&5 + ac_status=$? +@@ -27651,9 +27539,8 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi + + +@@ -27666,9 +27553,9 @@ + _pkg_short_errors_supported=no + fi + if test $_pkg_short_errors_supported = yes; then +- DMXEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "dmx xext x11"` ++ DMXEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "dmx xext x11" 2>&1` + else +- DMXEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dmx xext x11"` ++ DMXEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --print-errors "dmx xext x11" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$DMXEXAMPLES_DEP_PKG_ERRORS" >&5 +@@ -27733,11 +27620,10 @@ + { $as_echo "$as_me:$LINENO: checking for DMXXMUEXAMPLES_DEP" >&5 + $as_echo_n "checking for DMXXMUEXAMPLES_DEP... " >&6; } + +-if test -n "$PKG_CONFIG"; then +- if test -n "$DMXXMUEXAMPLES_DEP_CFLAGS"; then +- pkg_cv_DMXXMUEXAMPLES_DEP_CFLAGS="$DMXXMUEXAMPLES_DEP_CFLAGS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$DMXXMUEXAMPLES_DEP_CFLAGS"; then ++ pkg_cv_DMXXMUEXAMPLES_DEP_CFLAGS="$DMXXMUEXAMPLES_DEP_CFLAGS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dmx xmu xext x11\"") >&5 + ($PKG_CONFIG --exists --print-errors "dmx xmu xext x11") 2>&5 + ac_status=$? +@@ -27747,15 +27633,13 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi +-if test -n "$PKG_CONFIG"; then +- if test -n "$DMXXMUEXAMPLES_DEP_LIBS"; then +- pkg_cv_DMXXMUEXAMPLES_DEP_LIBS="$DMXXMUEXAMPLES_DEP_LIBS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$DMXXMUEXAMPLES_DEP_LIBS"; then ++ pkg_cv_DMXXMUEXAMPLES_DEP_LIBS="$DMXXMUEXAMPLES_DEP_LIBS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dmx xmu xext x11\"") >&5 + ($PKG_CONFIG --exists --print-errors "dmx xmu xext x11") 2>&5 + ac_status=$? +@@ -27765,9 +27649,8 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi + + +@@ -27780,9 +27663,9 @@ + _pkg_short_errors_supported=no + fi + if test $_pkg_short_errors_supported = yes; then +- DMXXMUEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "dmx xmu xext x11"` ++ DMXXMUEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "dmx xmu xext x11" 2>&1` + else +- DMXXMUEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dmx xmu xext x11"` ++ DMXXMUEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --print-errors "dmx xmu xext x11" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$DMXXMUEXAMPLES_DEP_PKG_ERRORS" >&5 +@@ -27847,11 +27730,10 @@ + { $as_echo "$as_me:$LINENO: checking for DMXXIEXAMPLES_DEP" >&5 + $as_echo_n "checking for DMXXIEXAMPLES_DEP... " >&6; } + +-if test -n "$PKG_CONFIG"; then +- if test -n "$DMXXIEXAMPLES_DEP_CFLAGS"; then +- pkg_cv_DMXXIEXAMPLES_DEP_CFLAGS="$DMXXIEXAMPLES_DEP_CFLAGS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$DMXXIEXAMPLES_DEP_CFLAGS"; then ++ pkg_cv_DMXXIEXAMPLES_DEP_CFLAGS="$DMXXIEXAMPLES_DEP_CFLAGS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dmx xi xext x11\"") >&5 + ($PKG_CONFIG --exists --print-errors "dmx xi xext x11") 2>&5 + ac_status=$? +@@ -27861,15 +27743,13 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi +-if test -n "$PKG_CONFIG"; then +- if test -n "$DMXXIEXAMPLES_DEP_LIBS"; then +- pkg_cv_DMXXIEXAMPLES_DEP_LIBS="$DMXXIEXAMPLES_DEP_LIBS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$DMXXIEXAMPLES_DEP_LIBS"; then ++ pkg_cv_DMXXIEXAMPLES_DEP_LIBS="$DMXXIEXAMPLES_DEP_LIBS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dmx xi xext x11\"") >&5 + ($PKG_CONFIG --exists --print-errors "dmx xi xext x11") 2>&5 + ac_status=$? +@@ -27879,9 +27759,8 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi + + +@@ -27894,9 +27773,9 @@ + _pkg_short_errors_supported=no + fi + if test $_pkg_short_errors_supported = yes; then +- DMXXIEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "dmx xi xext x11"` ++ DMXXIEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "dmx xi xext x11" 2>&1` + else +- DMXXIEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dmx xi xext x11"` ++ DMXXIEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --print-errors "dmx xi xext x11" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$DMXXIEXAMPLES_DEP_PKG_ERRORS" >&5 +@@ -27961,11 +27840,10 @@ + { $as_echo "$as_me:$LINENO: checking for XTSTEXAMPLES_DEP" >&5 + $as_echo_n "checking for XTSTEXAMPLES_DEP... " >&6; } + +-if test -n "$PKG_CONFIG"; then +- if test -n "$XTSTEXAMPLES_DEP_CFLAGS"; then +- pkg_cv_XTSTEXAMPLES_DEP_CFLAGS="$XTSTEXAMPLES_DEP_CFLAGS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$XTSTEXAMPLES_DEP_CFLAGS"; then ++ pkg_cv_XTSTEXAMPLES_DEP_CFLAGS="$XTSTEXAMPLES_DEP_CFLAGS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xtst xext x11\"") >&5 + ($PKG_CONFIG --exists --print-errors "xtst xext x11") 2>&5 + ac_status=$? +@@ -27975,15 +27853,13 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi +-if test -n "$PKG_CONFIG"; then +- if test -n "$XTSTEXAMPLES_DEP_LIBS"; then +- pkg_cv_XTSTEXAMPLES_DEP_LIBS="$XTSTEXAMPLES_DEP_LIBS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$XTSTEXAMPLES_DEP_LIBS"; then ++ pkg_cv_XTSTEXAMPLES_DEP_LIBS="$XTSTEXAMPLES_DEP_LIBS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xtst xext x11\"") >&5 + ($PKG_CONFIG --exists --print-errors "xtst xext x11") 2>&5 + ac_status=$? +@@ -27993,9 +27869,8 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi + + +@@ -28008,9 +27883,9 @@ + _pkg_short_errors_supported=no + fi + if test $_pkg_short_errors_supported = yes; then +- XTSTEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xtst xext x11"` ++ XTSTEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xtst xext x11" 2>&1` + else +- XTSTEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xtst xext x11"` ++ XTSTEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --print-errors "xtst xext x11" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$XTSTEXAMPLES_DEP_PKG_ERRORS" >&5 +@@ -28075,11 +27950,10 @@ + { $as_echo "$as_me:$LINENO: checking for XRESEXAMPLES_DEP" >&5 + $as_echo_n "checking for XRESEXAMPLES_DEP... " >&6; } + +-if test -n "$PKG_CONFIG"; then +- if test -n "$XRESEXAMPLES_DEP_CFLAGS"; then +- pkg_cv_XRESEXAMPLES_DEP_CFLAGS="$XRESEXAMPLES_DEP_CFLAGS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$XRESEXAMPLES_DEP_CFLAGS"; then ++ pkg_cv_XRESEXAMPLES_DEP_CFLAGS="$XRESEXAMPLES_DEP_CFLAGS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xres xext x11\"") >&5 + ($PKG_CONFIG --exists --print-errors "xres xext x11") 2>&5 + ac_status=$? +@@ -28089,15 +27963,13 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi +-if test -n "$PKG_CONFIG"; then +- if test -n "$XRESEXAMPLES_DEP_LIBS"; then +- pkg_cv_XRESEXAMPLES_DEP_LIBS="$XRESEXAMPLES_DEP_LIBS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$XRESEXAMPLES_DEP_LIBS"; then ++ pkg_cv_XRESEXAMPLES_DEP_LIBS="$XRESEXAMPLES_DEP_LIBS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xres xext x11\"") >&5 + ($PKG_CONFIG --exists --print-errors "xres xext x11") 2>&5 + ac_status=$? +@@ -28107,9 +27979,8 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi + + +@@ -28122,9 +27993,9 @@ + _pkg_short_errors_supported=no + fi + if test $_pkg_short_errors_supported = yes; then +- XRESEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xres xext x11"` ++ XRESEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xres xext x11" 2>&1` + else +- XRESEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xres xext x11"` ++ XRESEXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --print-errors "xres xext x11" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$XRESEXAMPLES_DEP_PKG_ERRORS" >&5 +@@ -28189,11 +28060,10 @@ + { $as_echo "$as_me:$LINENO: checking for X11EXAMPLES_DEP" >&5 + $as_echo_n "checking for X11EXAMPLES_DEP... " >&6; } + +-if test -n "$PKG_CONFIG"; then +- if test -n "$X11EXAMPLES_DEP_CFLAGS"; then +- pkg_cv_X11EXAMPLES_DEP_CFLAGS="$X11EXAMPLES_DEP_CFLAGS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$X11EXAMPLES_DEP_CFLAGS"; then ++ pkg_cv_X11EXAMPLES_DEP_CFLAGS="$X11EXAMPLES_DEP_CFLAGS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xext x11\"") >&5 + ($PKG_CONFIG --exists --print-errors "xext x11") 2>&5 + ac_status=$? +@@ -28203,15 +28073,13 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi +-if test -n "$PKG_CONFIG"; then +- if test -n "$X11EXAMPLES_DEP_LIBS"; then +- pkg_cv_X11EXAMPLES_DEP_LIBS="$X11EXAMPLES_DEP_LIBS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$X11EXAMPLES_DEP_LIBS"; then ++ pkg_cv_X11EXAMPLES_DEP_LIBS="$X11EXAMPLES_DEP_LIBS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xext x11\"") >&5 + ($PKG_CONFIG --exists --print-errors "xext x11") 2>&5 + ac_status=$? +@@ -28221,9 +28089,8 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi + + +@@ -28236,9 +28103,9 @@ + _pkg_short_errors_supported=no + fi + if test $_pkg_short_errors_supported = yes; then +- X11EXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xext x11"` ++ X11EXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "xext x11" 2>&1` + else +- X11EXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xext x11"` ++ X11EXAMPLES_DEP_PKG_ERRORS=`$PKG_CONFIG --print-errors "xext x11" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$X11EXAMPLES_DEP_PKG_ERRORS" >&5 +@@ -28939,11 +28806,10 @@ + { $as_echo "$as_me:$LINENO: checking for XEPHYR" >&5 + $as_echo_n "checking for XEPHYR... " >&6; } + +-if test -n "$PKG_CONFIG"; then +- if test -n "$XEPHYR_CFLAGS"; then +- pkg_cv_XEPHYR_CFLAGS="$XEPHYR_CFLAGS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$XEPHYR_CFLAGS"; then ++ pkg_cv_XEPHYR_CFLAGS="$XEPHYR_CFLAGS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$XEPHYR_REQUIRED_LIBS\"") >&5 + ($PKG_CONFIG --exists --print-errors "$XEPHYR_REQUIRED_LIBS") 2>&5 + ac_status=$? +@@ -28953,15 +28819,13 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi +-if test -n "$PKG_CONFIG"; then +- if test -n "$XEPHYR_LIBS"; then +- pkg_cv_XEPHYR_LIBS="$XEPHYR_LIBS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$XEPHYR_LIBS"; then ++ pkg_cv_XEPHYR_LIBS="$XEPHYR_LIBS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$XEPHYR_REQUIRED_LIBS\"") >&5 + ($PKG_CONFIG --exists --print-errors "$XEPHYR_REQUIRED_LIBS") 2>&5 + ac_status=$? +@@ -28971,9 +28835,8 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi + + +@@ -28986,9 +28849,9 @@ + _pkg_short_errors_supported=no + fi + if test $_pkg_short_errors_supported = yes; then +- XEPHYR_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$XEPHYR_REQUIRED_LIBS"` ++ XEPHYR_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$XEPHYR_REQUIRED_LIBS" 2>&1` + else +- XEPHYR_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$XEPHYR_REQUIRED_LIBS"` ++ XEPHYR_PKG_ERRORS=`$PKG_CONFIG --print-errors "$XEPHYR_REQUIRED_LIBS" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$XEPHYR_PKG_ERRORS" >&5 +@@ -29176,11 +29039,10 @@ + { $as_echo "$as_me:$LINENO: checking for TSLIB" >&5 + $as_echo_n "checking for TSLIB... " >&6; } + +-if test -n "$PKG_CONFIG"; then +- if test -n "$TSLIB_CFLAGS"; then +- pkg_cv_TSLIB_CFLAGS="$TSLIB_CFLAGS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$TSLIB_CFLAGS"; then ++ pkg_cv_TSLIB_CFLAGS="$TSLIB_CFLAGS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"tslib-1.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "tslib-1.0") 2>&5 + ac_status=$? +@@ -29190,15 +29052,13 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi +-if test -n "$PKG_CONFIG"; then +- if test -n "$TSLIB_LIBS"; then +- pkg_cv_TSLIB_LIBS="$TSLIB_LIBS" +- else +- if test -n "$PKG_CONFIG" && \ ++if test -n "$TSLIB_LIBS"; then ++ pkg_cv_TSLIB_LIBS="$TSLIB_LIBS" ++ elif test -n "$PKG_CONFIG"; then ++ if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"tslib-1.0\"") >&5 + ($PKG_CONFIG --exists --print-errors "tslib-1.0") 2>&5 + ac_status=$? +@@ -29208,9 +29068,8 @@ + else + pkg_failed=yes + fi +- fi +-else +- pkg_failed=untried ++ else ++ pkg_failed=untried + fi + + +@@ -29223,9 +29082,9 @@ + _pkg_short_errors_supported=no + fi + if test $_pkg_short_errors_supported = yes; then +- TSLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "tslib-1.0"` ++ TSLIB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "tslib-1.0" 2>&1` + else +- TSLIB_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "tslib-1.0"` ++ TSLIB_PKG_ERRORS=`$PKG_CONFIG --print-errors "tslib-1.0" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$TSLIB_PKG_ERRORS" >&5 +@@ -29396,7 +29255,9 @@ + XKBOUTPUT_FIRSTCHAR=`echo $XKBOUTPUT | cut -b 1` + + if [ x$XKBOUTPUT_FIRSTCHAR != x/ ] ; then +- XKBOUTPUT="$XKB_BASE_DIRECTORY/$XKBOUTPUT" ++ { { $as_echo "$as_me:$LINENO: error: xkb-output must be an absolute path." >&5 ++$as_echo "$as_me: error: xkb-output must be an absolute path." >&2;} ++ { (exit 1); exit 1; }; } + fi + + # XKM_OUTPUT_DIR (used in code) must end in / or file names get hosed +diff -Naur xorg-server-1.6.1.901/configure.ac xorg-server-1.6.1.901.patch/configure.ac +--- xorg-server-1.6.1.901/configure.ac 2009-05-09 07:04:53.000000000 +0200 ++++ xorg-server-1.6.1.901.patch/configure.ac 2009-05-20 02:48:38.082025122 +0200 +@@ -476,9 +476,9 @@ + AC_ARG_WITH(xkb-path, AS_HELP_STRING([--with-xkb-path=PATH], [Path to XKB base dir (default: ${datadir}/X11/xkb)]), + [ XKBPATH="$withval" ], + [ XKBPATH="${datadir}/X11/xkb" ]) +-AC_ARG_WITH(xkb-output, AS_HELP_STRING([--with-xkb-output=PATH], [Path to XKB output dir (default: ${datadir}/X11/xkb/compiled)]), ++AC_ARG_WITH(xkb-output, AS_HELP_STRING([--with-xkb-output=PATH], [Path to XKB output dir (default: ${localstatedir}/cache/xkb)]), + [ XKBOUTPUT="$withval" ], +- [ XKBOUTPUT="compiled" ]) ++ [ XKBOUTPUT="${localstatedir}/cache/xkb" ]) + AC_ARG_WITH(serverconfig-path, AS_HELP_STRING([--with-serverconfig-path=PATH], + [Directory where ancillary server config files are installed (default: ${libdir}/xorg)]), + [ SERVERCONFIG="$withval" ], +@@ -1757,7 +1757,7 @@ + XKBOUTPUT_FIRSTCHAR=`echo $XKBOUTPUT | cut -b 1` + + if [[ x$XKBOUTPUT_FIRSTCHAR != x/ ]] ; then +- XKBOUTPUT="$XKB_BASE_DIRECTORY/$XKBOUTPUT" ++ AC_MSG_ERROR([xkb-output must be an absolute path.]) + fi + + # XKM_OUTPUT_DIR (used in code) must end in / or file names get hosed +diff -Naur xorg-server-1.6.1.901/xkb/ddxLoad.c xorg-server-1.6.1.901.patch/xkb/ddxLoad.c +--- xorg-server-1.6.1.901/xkb/ddxLoad.c 2009-03-21 00:57:51.000000000 +0100 ++++ xorg-server-1.6.1.901.patch/xkb/ddxLoad.c 2009-05-20 02:48:38.085276592 +0200 +@@ -32,6 +32,12 @@ + #include + #endif + ++#ifdef HAVE_SHA1_IN_LIBMD /* Use libmd for SHA1 */ ++# include ++#else /* Use OpenSSL's libcrypto */ ++# include /* buggy openssl/sha.h wants size_t */ ++# include ++#endif + #include + #include + #define NEED_EVENTS 1 +@@ -46,24 +52,13 @@ + #define XKBSRV_NEED_FILE_FUNCS + #include + #include ++#include + #include "xkb.h" + + #if defined(CSRG_BASED) || defined(linux) || defined(__GNU__) + #include + #endif + +- /* +- * If XKM_OUTPUT_DIR specifies a path without a leading slash, it is +- * relative to the top-level XKB configuration directory. +- * Making the server write to a subdirectory of that directory +- * requires some work in the general case (install procedure +- * has to create links to /var or somesuch on many machines), +- * so we just compile into /usr/tmp for now. +- */ +-#ifndef XKM_OUTPUT_DIR +-#define XKM_OUTPUT_DIR "compiled/" +-#endif +- + #define PRE_ERROR_MSG "\"The XKEYBOARD keymap compiler (xkbcomp) reports:\"" + #define ERROR_PREFIX "\"> \"" + #define POST_ERROR_MSG1 "\"Errors from xkbcomp are not fatal to the X server\"" +@@ -179,6 +174,45 @@ + } + + static Bool ++Sha1Asc(char sha1Asc[SHA_DIGEST_LENGTH*2+1], const char * input) ++{ ++ int i; ++ unsigned char sha1[SHA_DIGEST_LENGTH]; ++ ++#ifdef HAVE_SHA1_IN_LIBMD /* Use libmd for SHA1 */ ++ SHA1_CTX ctx; ++ ++ SHA1Init (&ctx); ++ SHA1Update (&ctx, input, strlen(input)); ++ SHA1Final (sha1, &ctx); ++#else /* Use OpenSSL's libcrypto */ ++ SHA_CTX ctx; ++ int success; ++ ++ success = SHA1_Init (&ctx); ++ if (! success) ++ return BadAlloc; ++ ++ success = SHA1_Update (&ctx, input, strlen(input)); ++ if (! success) ++ return BadAlloc; ++ ++ success = SHA1_Final (sha1, &ctx); ++ if (! success) ++ return BadAlloc; ++#endif ++ ++ /* convert sha1 to sha1_asc */ ++ for(i=0; i nameRtrnLen) && nameRtrn) { ++ ErrorF("[xkb] nameRtrn too small to hold xkmfile name\n"); ++ return False; ++ } ++ strncpy(nameRtrn, xkmfile, nameRtrnLen); ++ ++ /* if the xkm file already exists, reuse it */ ++ canonicalXkmFileName = Xprintf("%s%s.xkm", xkm_output_dir, xkmfile); ++ if (access(canonicalXkmFileName, R_OK) == 0) { ++ /* yes, we can reuse the old xkm file */ ++ LogMessage(X_INFO, "XKB: reuse xkmfile %s\n", canonicalXkmFileName); ++ result = True; ++ goto _ret; ++ } ++ LogMessage(X_INFO, "XKB: generating xkmfile %s\n", canonicalXkmFileName); ++ ++ /* continue to call xkbcomp to compile the keymap. to avoid race ++ condition, we compile it to a tmpfile then rename it to ++ xkmfile */ ++ + #ifdef WIN32 + strcpy(tmpname, Win32TempDir()); + strcat(tmpname, "\\xkb_XXXXXX"); +@@ -230,19 +322,30 @@ + } + } + ++ if ( (tmpXkmFile = tempnam(xkm_output_dir, NULL)) == NULL ) { ++ ErrorF("[xkb] Can't generate temp xkm file name"); ++ result = False; ++ goto _ret; ++ } ++ + buf = Xprintf("\"%s%sxkbcomp\" -w %d %s -xkm \"%s\" " +- "-em1 %s -emp %s -eml %s \"%s%s.xkm\"", ++ "-em1 %s -emp %s -eml %s \"%s\"", + xkbbindir, xkbbindirsep, + ( (xkbDebugFlags < 2) ? 1 : + ((xkbDebugFlags > 10) ? 10 : (int)xkbDebugFlags) ), +- xkbbasedirflag, xkmfile, ++ xkbbasedirflag, xkbfile, + PRE_ERROR_MSG, ERROR_PREFIX, POST_ERROR_MSG1, +- xkm_output_dir, keymap); ++ tmpXkmFile); + + if (xkbbasedirflag != emptystring) { + xfree(xkbbasedirflag); + } + ++ /* there's a potential race condition between calling tempnam() ++ and invoking xkbcomp to write the result file (potential temp ++ file name conflicts), but since xkbcomp is a standalone ++ program, we have to live with this */ ++ + #ifndef WIN32 + out= Popen(buf,"w"); + #else +@@ -250,31 +353,43 @@ + #endif + + if (out!=NULL) { +-#ifdef DEBUG +- if (xkbDebugFlags) { +- ErrorF("[xkb] XkbDDXCompileKeymapByNames compiling keymap:\n"); +- XkbWriteXKBKeymapForNames(stderr,names,xkb,want,need); ++ /* write XKBKeyMapBuf to xkbcomp */ ++ if (EOF==fputs(xkbKeyMapBuf, out)) ++ { ++ ErrorF("[xkb] Sending keymap to xkbcomp failed\n"); ++ result = False; ++ goto _ret; + } +-#endif +- XkbWriteXKBKeymapForNames(out,names,xkb,want,need); + #ifndef WIN32 + if (Pclose(out)==0) + #else + if (fclose(out)==0 && System(buf) >= 0) + #endif + { ++ /* xkbcomp success */ + if (xkbDebugFlags) + DebugF("[xkb] xkb executes: %s\n",buf); +- if (nameRtrn) { +- strncpy(nameRtrn,keymap,nameRtrnLen); +- nameRtrn[nameRtrnLen-1]= '\0'; ++ ++ /* if canonicalXkmFileName already exists now, we simply ++ overwrite it, this is OK */ ++ ret = rename(tmpXkmFile, canonicalXkmFileName); ++ if (0 != ret) { ++ ErrorF("[xkb] Can't rename %s to %s, error: %s\n", ++ tmpXkmFile, canonicalXkmFileName, ++ strerror(errno)); ++ ++ /* in case of error, don't unlink tmpXkmFile, leave it ++ for debugging */ ++ ++ result = False; ++ goto _ret; + } +- if (buf != NULL) +- xfree (buf); +- return True; ++ ++ result = True; ++ goto _ret; + } + else +- LogMessage(X_ERROR, "Error compiling keymap (%s)\n", keymap); ++ LogMessage(X_ERROR, "Error compiling keymap (%s)\n", xkbfile); + #ifdef WIN32 + /* remove the temporary file */ + unlink(tmpname); +@@ -289,9 +404,17 @@ + } + if (nameRtrn) + nameRtrn[0]= '\0'; ++ result = False; ++ ++_ret: ++ if (tmpXkmFile) ++ free(tmpXkmFile); ++ if (canonicalXkmFileName) ++ xfree(canonicalXkmFileName); + if (buf != NULL) + xfree (buf); +- return False; ++ ++ return result; + } + + static FILE * +@@ -375,7 +498,6 @@ + DebugF("Loaded XKB keymap %s, defined=0x%x\n",fileName,(*xkbRtrn)->defined); + } + fclose(file); +- (void) unlink (fileName); + return (need|want)&(~missing); + } + +diff -Naur xorg-server-1.6.1.901/xkb/README.compiled xorg-server-1.6.1.901.patch/xkb/README.compiled +--- xorg-server-1.6.1.901/xkb/README.compiled 2008-10-13 01:19:06.000000000 +0200 ++++ xorg-server-1.6.1.901.patch/xkb/README.compiled 2009-05-20 02:48:38.082025122 +0200 +@@ -4,10 +4,10 @@ + or some other tool might destroy or replace the files in this directory, + so it is not a safe place to store compiled keymaps for long periods of + time. The default keymap for any server is usually stored in: +- X-default.xkm +-where is the display number of the server in question, which makes +-it possible for several servers *on the same host* to share the same +-directory. ++ server-.xkm ++ ++where is the SHA1 hash of keymap source, so that compiled ++keymap of different keymap sources are stored in different files. + + Unless the X server is modified, sharing this directory between servers on + different hosts could cause problems. diff --git a/packages/x11/xserver/xorg-server/patches/50-pkgconfig_gl.diff b/packages/x11/xserver/xorg-server/patches/50-pkgconfig_gl.diff deleted file mode 100644 index 67600d3d06..0000000000 --- a/packages/x11/xserver/xorg-server/patches/50-pkgconfig_gl.diff +++ /dev/null @@ -1,35 +0,0 @@ -diff -Naur xorg-server-1.6.1.901.orig/configure xorg-server-1.6.1.901/configure ---- xorg-server-1.6.1.901.orig/configure 2009-05-09 13:58:58.000000000 +0200 -+++ xorg-server-1.6.1.901/configure 2009-05-09 14:12:45.000000000 +0200 -@@ -21949,12 +21949,12 @@ - pkg_cv_GL_CFLAGS="$GL_CFLAGS" - else - if test -n "$PKG_CONFIG" && \ -- { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glproto >= 1.4.9 gl >= 7.1.0\"") >&5 -- ($PKG_CONFIG --exists --print-errors "glproto >= 1.4.9 gl >= 7.1.0") 2>&5 -+ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glproto >= 1.4.9\"") >&5 -+ ($PKG_CONFIG --exists --print-errors "glproto >= 1.4.9") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then -- pkg_cv_GL_CFLAGS=`$PKG_CONFIG --cflags "glproto >= 1.4.9 gl >= 7.1.0" 2>/dev/null` -+ pkg_cv_GL_CFLAGS=`$PKG_CONFIG --cflags "glproto >= 1.4.9" 2>/dev/null` - else - pkg_failed=yes - fi -@@ -21967,12 +21967,12 @@ - pkg_cv_GL_LIBS="$GL_LIBS" - else - if test -n "$PKG_CONFIG" && \ -- { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glproto >= 1.4.9 gl >= 7.1.0\"") >&5 -- ($PKG_CONFIG --exists --print-errors "glproto >= 1.4.9 gl >= 7.1.0") 2>&5 -+ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"glproto >= 1.4.9\"") >&5 -+ ($PKG_CONFIG --exists --print-errors "glproto >= 1.4.9") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then -- pkg_cv_GL_LIBS=`$PKG_CONFIG --libs "glproto >= 1.4.9 gl >= 7.1.0" 2>/dev/null` -+ pkg_cv_GL_LIBS=`$PKG_CONFIG --libs "glproto >= 1.4.9" 2>/dev/null` - else - pkg_failed=yes - fi diff --git a/packages/x11/xserver/xorg-server/patches/cache-xkbcomp-output-for-fast-start-up-v3.diff b/packages/x11/xserver/xorg-server/patches/cache-xkbcomp-output-for-fast-start-up-v3.diff deleted file mode 100644 index f974eab1be..0000000000 --- a/packages/x11/xserver/xorg-server/patches/cache-xkbcomp-output-for-fast-start-up-v3.diff +++ /dev/null @@ -1,277 +0,0 @@ -xkbcomp outputs will be cached in files with hashed keymap as -names. This saves boot time for around 1s on commodity netbooks. - -Signed-off-by: Yan Li ---- - configure.ac | 6 +- - xkb/README.compiled | 8 ++-- - xkb/ddxLoad.c | 141 +++++++++++++++++++++++++++++++++++++++----------- - 3 files changed, 117 insertions(+), 38 deletions(-) - -diff --git a/configure.ac b/configure.ac -index f2718b8..5d8a6e5 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -476,9 +476,9 @@ AC_ARG_WITH(default-font-path, AS_HELP_STRING([--with-default-font-path=PATH], [ - AC_ARG_WITH(xkb-path, AS_HELP_STRING([--with-xkb-path=PATH], [Path to XKB base dir (default: ${datadir}/X11/xkb)]), - [ XKBPATH="$withval" ], - [ XKBPATH="${datadir}/X11/xkb" ]) --AC_ARG_WITH(xkb-output, AS_HELP_STRING([--with-xkb-output=PATH], [Path to XKB output dir (default: ${datadir}/X11/xkb/compiled)]), -+AC_ARG_WITH(xkb-output, AS_HELP_STRING([--with-xkb-output=PATH], [Path to XKB output dir (default: ${localstatedir}/cache/xkb)]), - [ XKBOUTPUT="$withval" ], -- [ XKBOUTPUT="compiled" ]) -+ [ XKBOUTPUT="${localstatedir}/cache/xkb" ]) - AC_ARG_WITH(serverconfig-path, AS_HELP_STRING([--with-serverconfig-path=PATH], - [Directory where ancillary server config files are installed (default: ${libdir}/xorg)]), - [ SERVERCONFIG="$withval" ], -@@ -1753,7 +1753,7 @@ AC_DEFINE_DIR(XKB_BIN_DIRECTORY, bindir, [Path to XKB bin dir]) - XKBOUTPUT_FIRSTCHAR=`echo $XKBOUTPUT | cut -b 1` - - if [[ x$XKBOUTPUT_FIRSTCHAR != x/ ]] ; then -- XKBOUTPUT="$XKB_BASE_DIRECTORY/$XKBOUTPUT" -+ AC_MSG_ERROR([xkb-output must be an absolute path.]) - fi - - # XKM_OUTPUT_DIR (used in code) must end in / or file names get hosed -diff --git a/xkb/README.compiled b/xkb/README.compiled -index 71caa2f..a4a2ae0 100644 ---- a/xkb/README.compiled -+++ b/xkb/README.compiled -@@ -4,10 +4,10 @@ current keymap and/or any scratch keymaps used by clients. The X server - or some other tool might destroy or replace the files in this directory, - so it is not a safe place to store compiled keymaps for long periods of - time. The default keymap for any server is usually stored in: -- X-default.xkm --where is the display number of the server in question, which makes --it possible for several servers *on the same host* to share the same --directory. -+ server-.xkm -+ -+where is the SHA1 hash of keymap source, so that compiled -+keymap of different keymap sources are stored in different files. - - Unless the X server is modified, sharing this directory between servers on - different hosts could cause problems. -diff --git a/xkb/ddxLoad.c b/xkb/ddxLoad.c -index 4d5dfb6..8819353 100644 ---- a/xkb/ddxLoad.c -+++ b/xkb/ddxLoad.c -@@ -32,6 +32,12 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. - #include - #endif - -+#ifdef HAVE_SHA1_IN_LIBMD /* Use libmd for SHA1 */ -+# include -+#else /* Use OpenSSL's libcrypto */ -+# include /* buggy openssl/sha.h wants size_t */ -+# include -+#endif - #include - #include - #define NEED_EVENTS 1 -@@ -52,18 +58,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. - #include - #endif - -- /* -- * If XKM_OUTPUT_DIR specifies a path without a leading slash, it is -- * relative to the top-level XKB configuration directory. -- * Making the server write to a subdirectory of that directory -- * requires some work in the general case (install procedure -- * has to create links to /var or somesuch on many machines), -- * so we just compile into /usr/tmp for now. -- */ --#ifndef XKM_OUTPUT_DIR --#define XKM_OUTPUT_DIR "compiled/" --#endif -- - #define PRE_ERROR_MSG "\"The XKEYBOARD keymap compiler (xkbcomp) reports:\"" - #define ERROR_PREFIX "\"> \"" - #define POST_ERROR_MSG1 "\"Errors from xkbcomp are not fatal to the X server\"" -@@ -179,6 +173,45 @@ OutputDirectory( - } - - static Bool -+Sha1Asc(char sha1Asc[SHA_DIGEST_LENGTH*2+1], const char * input) -+{ -+ int i; -+ unsigned char sha1[SHA_DIGEST_LENGTH]; -+ -+#ifdef HAVE_SHA1_IN_LIBMD /* Use libmd for SHA1 */ -+ SHA1_CTX ctx; -+ -+ SHA1Init (&ctx); -+ SHA1Update (&ctx, input, strlen(input)); -+ SHA1Final (sha1, &ctx); -+#else /* Use OpenSSL's libcrypto */ -+ SHA_CTX ctx; -+ int success; -+ -+ success = SHA1_Init (&ctx); -+ if (! success) -+ return BadAlloc; -+ -+ success = SHA1_Update (&ctx, input, strlen(input)); -+ if (! success) -+ return BadAlloc; -+ -+ success = SHA1_Final (sha1, &ctx); -+ if (! success) -+ return BadAlloc; -+#endif -+ -+ /* convert sha1 to sha1_asc */ -+ for(i=0; i nameRtrnLen) && nameRtrn) { -+ ErrorF("[xkb] nameRtrn too small to hold xkmfile name\n"); -+ return False; -+ } -+ strncpy(nameRtrn, xkmfile, nameRtrnLen); -+ -+ /* if the xkm file already exists, reuse it */ -+ canonicalXkmfileName = Xprintf("%s%s.xkm", xkm_output_dir, xkmfile); -+ if (access(canonicalXkmfileName, R_OK) == 0) { -+ /* yes, we can reuse the old xkm file */ -+ LogMessage(X_INFO, "XKB: reuse xkmfile %s\n", canonicalXkmfileName); -+ xfree(canonicalXkmfileName); -+ return True; -+ } -+ LogMessage(X_INFO, "XKB: generating xkmfile %s\n", canonicalXkmfileName); -+ xfree(canonicalXkmfileName); -+ -+ /* continue to call xkbcomp to compile the keymap */ -+ - #ifdef WIN32 - strcpy(tmpname, Win32TempDir()); - strcat(tmpname, "\\xkb_XXXXXX"); -@@ -235,9 +320,9 @@ XkbDDXCompileKeymapByNames( XkbDescPtr xkb, - xkbbindir, xkbbindirsep, - ( (xkbDebugFlags < 2) ? 1 : - ((xkbDebugFlags > 10) ? 10 : (int)xkbDebugFlags) ), -- xkbbasedirflag, xkmfile, -+ xkbbasedirflag, xkbfile, - PRE_ERROR_MSG, ERROR_PREFIX, POST_ERROR_MSG1, -- xkm_output_dir, keymap); -+ xkm_output_dir, xkmfile); - - if (xkbbasedirflag != emptystring) { - xfree(xkbbasedirflag); -@@ -250,13 +335,12 @@ XkbDDXCompileKeymapByNames( XkbDescPtr xkb, - #endif - - if (out!=NULL) { --#ifdef DEBUG -- if (xkbDebugFlags) { -- ErrorF("[xkb] XkbDDXCompileKeymapByNames compiling keymap:\n"); -- XkbWriteXKBKeymapForNames(stderr,names,xkb,want,need); -+ /* write XKBKeyMapBuf to xkbcomp */ -+ if (EOF==fputs(xkbKeyMapBuf, out)) -+ { -+ ErrorF("[xkb] Sending keymap to xkbcomp failed\n"); -+ return False; - } --#endif -- XkbWriteXKBKeymapForNames(out,names,xkb,want,need); - #ifndef WIN32 - if (Pclose(out)==0) - #else -@@ -265,16 +349,12 @@ XkbDDXCompileKeymapByNames( XkbDescPtr xkb, - { - if (xkbDebugFlags) - DebugF("[xkb] xkb executes: %s\n",buf); -- if (nameRtrn) { -- strncpy(nameRtrn,keymap,nameRtrnLen); -- nameRtrn[nameRtrnLen-1]= '\0'; -- } - if (buf != NULL) - xfree (buf); - return True; - } - else -- LogMessage(X_ERROR, "Error compiling keymap (%s)\n", keymap); -+ LogMessage(X_ERROR, "Error compiling keymap (%s)\n", xkbfile); - #ifdef WIN32 - /* remove the temporary file */ - unlink(tmpname); -@@ -375,7 +455,6 @@ unsigned missing; - DebugF("Loaded XKB keymap %s, defined=0x%x\n",fileName,(*xkbRtrn)->defined); - } - fclose(file); -- (void) unlink (fileName); - return (need|want)&(~missing); - } - --- 1.5.6.5 --- Li, Yan