summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2010-04-13 19:54:47 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2010-04-13 19:54:47 +0000
commitadf90efb468836718a65424c703e4363b17e5e39 (patch)
treeb3b53765b85ecf464c153af52327a32e126635f3
parentca12b4fa619e24d52d0feb4dab5d579f82b4b8d7 (diff)
Add a configure test for newer proto headers and use it to enable
building xserver 1.6 with those headers. ok oga@.
-rw-r--r--xserver/Xext/dpms.c4
-rw-r--r--xserver/Xext/saver.c4
-rw-r--r--xserver/Xext/shape.c4
-rw-r--r--xserver/Xext/shm.c4
-rw-r--r--xserver/Xext/shmint.h34
-rw-r--r--xserver/Xext/sync.c5
-rw-r--r--xserver/Xext/syncsrv.h177
-rw-r--r--xserver/Xext/xtest.c4
-rw-r--r--xserver/Xext/xvdisp.c4
-rw-r--r--xserver/aclocal.m451
-rw-r--r--xserver/configure227
-rw-r--r--xserver/configure.ac14
-rw-r--r--xserver/dbe/dbestruct.h21
-rw-r--r--xserver/dix/main.c4
-rw-r--r--xserver/hw/xfree86/common/xf86DPMS.c4
-rw-r--r--xserver/hw/xfree86/common/xf86Events.c4
-rw-r--r--xserver/hw/xfree86/common/xf86Init.c4
-rw-r--r--xserver/hw/xfree86/common/xf86Xinput.c4
-rw-r--r--xserver/hw/xfree86/dixmods/extmod/modinit.h16
-rw-r--r--xserver/hw/xfree86/modes/xf86Crtc.c4
-rw-r--r--xserver/hw/xfree86/modes/xf86Cursors.c4
-rw-r--r--xserver/hw/xfree86/modes/xf86Rotate.c4
-rw-r--r--xserver/hw/xfree86/vbe/vbe.c4
-rw-r--r--xserver/hw/xfree86/vgahw/vgaHW.h4
-rw-r--r--xserver/include/dix-config.h.in18
-rw-r--r--xserver/include/do-not-use-config.h.in18
-rw-r--r--xserver/include/xorg-server.h.in6
-rw-r--r--xserver/mi/mieq.c6
-rw-r--r--xserver/mi/miinitext.c8
-rw-r--r--xserver/mi/miscrinit.c5
-rw-r--r--xserver/os/WaitFor.c4
31 files changed, 673 insertions, 1 deletions
diff --git a/xserver/Xext/dpms.c b/xserver/Xext/dpms.c
index d3e0dde8b..7a21d3661 100644
--- a/xserver/Xext/dpms.c
+++ b/xserver/Xext/dpms.c
@@ -44,9 +44,13 @@ Equipment Corporation.
#include "dixstruct.h"
#include "extnsionst.h"
#include "opaque.h"
+#ifdef HAVE_X11_EXTENSIONS_DPMSCONST_H
+#include <X11/extensions/dpmsproto.h>
+#else
#define DPMS_SERVER
#include <X11/extensions/dpms.h>
#include <X11/extensions/dpmsstr.h>
+#endif
#include "dpmsproc.h"
#include "modinit.h"
diff --git a/xserver/Xext/saver.c b/xserver/Xext/saver.c
index 86db7b0b9..5ae7a33aa 100644
--- a/xserver/Xext/saver.c
+++ b/xserver/Xext/saver.c
@@ -54,9 +54,13 @@ in this Software without prior written authorization from the X Consortium.
#include "panoramiXsrv.h"
#endif
#ifdef DPMSExtension
+#ifdef HAVE_X11_EXTENSIONS_DPMSCONST_H
+#include <X11/extensions/dpmsconst.h>
+#else
#define DPMS_SERVER
#include <X11/extensions/dpms.h>
#endif
+#endif
#include <stdio.h>
diff --git a/xserver/Xext/shape.c b/xserver/Xext/shape.c
index 332e58743..240523587 100644
--- a/xserver/Xext/shape.c
+++ b/xserver/Xext/shape.c
@@ -43,8 +43,12 @@ in this Software without prior written authorization from The Open Group.
#include "dixstruct.h"
#include "resource.h"
#include "opaque.h"
+#ifdef HAVE_X11_EXTENSIONS_SHAPEPROTO_H
+#include <X11/extensions/shapeproto.h>
+#else
#define _SHAPE_SERVER_ /* don't want Xlib structures */
#include <X11/extensions/shapestr.h>
+#endif
#include "regionstr.h"
#include "gcstruct.h"
#include "modinit.h"
diff --git a/xserver/Xext/shm.c b/xserver/Xext/shm.c
index a48d2bd5b..e4962faf6 100644
--- a/xserver/Xext/shm.c
+++ b/xserver/Xext/shm.c
@@ -54,8 +54,12 @@ in this Software without prior written authorization from The Open Group.
#include "servermd.h"
#include "shmint.h"
#include "xace.h"
+#ifdef HAVE_X11_EXTENSIONS_SHMPROTO_H
+#include <X11/extensions/shmproto.h>
+#else
#define _XSHM_SERVER_
#include <X11/extensions/shmstr.h>
+#endif
#include <X11/Xfuncproto.h>
/* Needed for Solaris cross-zone shared memory extension */
diff --git a/xserver/Xext/shmint.h b/xserver/Xext/shmint.h
index f659fd23a..f9b69282a 100644
--- a/xserver/Xext/shmint.h
+++ b/xserver/Xext/shmint.h
@@ -24,12 +24,46 @@
#define _SHMINT_H_
#define _XSHM_SERVER_
+#ifndef HAVE_X11_EXTENSIONS_SHMPROTO_H
#include <X11/extensions/shmstr.h>
+#else
+#include <X11/extensions/shmproto.h>
+#endif
#include "screenint.h"
#include "pixmap.h"
#include "gc.h"
+#ifdef HAVE_X11_EXTENSIONS_SHMPROTO_H
+#define XSHM_PUT_IMAGE_ARGS \
+ DrawablePtr /* dst */, \
+ GCPtr /* pGC */, \
+ int /* depth */, \
+ unsigned int /* format */, \
+ int /* w */, \
+ int /* h */, \
+ int /* sx */, \
+ int /* sy */, \
+ int /* sw */, \
+ int /* sh */, \
+ int /* dx */, \
+ int /* dy */, \
+ char * /* data */
+
+#define XSHM_CREATE_PIXMAP_ARGS \
+ ScreenPtr /* pScreen */, \
+ int /* width */, \
+ int /* height */, \
+ int /* depth */, \
+ char * /* addr */
+
+typedef struct _ShmFuncs {
+ PixmapPtr (* CreatePixmap)(XSHM_CREATE_PIXMAP_ARGS);
+ void (* PutImage)(XSHM_PUT_IMAGE_ARGS);
+} ShmFuncs, *ShmFuncsPtr;
+
+#endif
+
void
ShmRegisterFuncs(ScreenPtr pScreen, ShmFuncsPtr funcs);
diff --git a/xserver/Xext/sync.c b/xserver/Xext/sync.c
index a006ae95b..94e5a884f 100644
--- a/xserver/Xext/sync.c
+++ b/xserver/Xext/sync.c
@@ -67,9 +67,14 @@ PERFORMANCE OF THIS SOFTWARE.
#include "dixstruct.h"
#include "resource.h"
#include "opaque.h"
+#ifdef HAVE_X11_EXTENSIONS_SYNCPROTO_H
+#include <X11/extensions/syncproto.h>
+#include "syncsrv.h"
+#else
#define _SYNC_SERVER
#include <X11/extensions/sync.h>
#include <X11/extensions/syncstr.h>
+#endif
#include <stdio.h>
#if !defined(WIN32)
diff --git a/xserver/Xext/syncsrv.h b/xserver/Xext/syncsrv.h
new file mode 100644
index 000000000..6d0e3d64a
--- /dev/null
+++ b/xserver/Xext/syncsrv.h
@@ -0,0 +1,177 @@
+/*
+
+Copyright 1991, 1993, 1994, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+*/
+
+/***********************************************************
+Copyright 1991,1993 by Digital Equipment Corporation, Maynard, Massachusetts,
+and Olivetti Research Limited, Cambridge, England.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the names of Digital or Olivetti
+not be used in advertising or publicity pertaining to distribution of the
+software without specific, written prior permission.
+
+DIGITAL AND OLIVETTI DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS, IN NO EVENT SHALL THEY BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
+USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+
+******************************************************************/
+
+#ifndef _SYNCSRV_H_
+#define _SYNCSRV_H_
+
+#define CARD64 XSyncValue /* XXX temporary! need real 64 bit values for Alpha */
+
+typedef struct _SyncCounter {
+ ClientPtr client; /* Owning client. 0 for system counters */
+ XSyncCounter id; /* resource ID */
+ CARD64 value; /* counter value */
+ struct _SyncTriggerList *pTriglist; /* list of triggers */
+ Bool beingDestroyed; /* in process of going away */
+ struct _SysCounterInfo *pSysCounterInfo; /* NULL if not a system counter */
+} SyncCounter;
+
+/*
+ * The System Counter interface
+ */
+
+typedef enum {
+ XSyncCounterNeverChanges,
+ XSyncCounterNeverIncreases,
+ XSyncCounterNeverDecreases,
+ XSyncCounterUnrestricted
+} SyncCounterType;
+
+typedef struct _SysCounterInfo {
+ char *name;
+ CARD64 resolution;
+ CARD64 bracket_greater;
+ CARD64 bracket_less;
+ SyncCounterType counterType; /* how can this counter change */
+ void (*QueryValue)(
+ pointer /*pCounter*/,
+ CARD64 * /*freshvalue*/
+);
+ void (*BracketValues)(
+ pointer /*pCounter*/,
+ CARD64 * /*lessthan*/,
+ CARD64 * /*greaterthan*/
+);
+} SysCounterInfo;
+
+
+
+typedef struct _SyncTrigger {
+ SyncCounter *pCounter;
+ CARD64 wait_value; /* wait value */
+ unsigned int value_type; /* Absolute or Relative */
+ unsigned int test_type; /* transition or Comparision type */
+ CARD64 test_value; /* trigger event threshold value */
+ Bool (*CheckTrigger)(
+ struct _SyncTrigger * /*pTrigger*/,
+ CARD64 /*newval*/
+ );
+ void (*TriggerFired)(
+ struct _SyncTrigger * /*pTrigger*/
+ );
+ void (*CounterDestroyed)(
+ struct _SyncTrigger * /*pTrigger*/
+ );
+} SyncTrigger;
+
+typedef struct _SyncTriggerList {
+ SyncTrigger *pTrigger;
+ struct _SyncTriggerList *next;
+} SyncTriggerList;
+
+typedef struct _SyncAlarmClientList {
+ ClientPtr client;
+ XID delete_id;
+ struct _SyncAlarmClientList *next;
+} SyncAlarmClientList;
+
+typedef struct _SyncAlarm {
+ SyncTrigger trigger;
+ ClientPtr client;
+ XSyncAlarm alarm_id;
+ CARD64 delta;
+ int events;
+ int state;
+ SyncAlarmClientList *pEventClients;
+} SyncAlarm;
+
+typedef struct {
+ ClientPtr client;
+ CARD32 delete_id;
+ int num_waitconditions;
+} SyncAwaitHeader;
+
+typedef struct {
+ SyncTrigger trigger;
+ CARD64 event_threshold;
+ SyncAwaitHeader *pHeader;
+} SyncAwait;
+
+typedef union {
+ SyncAwaitHeader header;
+ SyncAwait await;
+} SyncAwaitUnion;
+
+
+extern pointer SyncCreateSystemCounter(
+ char * /* name */,
+ CARD64 /* inital_value */,
+ CARD64 /* resolution */,
+ SyncCounterType /* change characterization */,
+ void (* /*QueryValue*/ ) (
+ pointer /* pCounter */,
+ CARD64 * /* pValue_return */), /* XXX prototype */
+ void (* /*BracketValues*/) (
+ pointer /* pCounter */,
+ CARD64 * /* pbracket_less */,
+ CARD64 * /* pbracket_greater */)
+);
+
+extern void SyncChangeCounter(
+ SyncCounter * /* pCounter*/,
+ CARD64 /* new_value */
+);
+
+extern void SyncDestroySystemCounter(
+ pointer pCounter
+);
+extern void InitServertime(void);
+
+extern void SyncExtensionInit(void);
+#endif /* _SYNCSRV_H_ */
diff --git a/xserver/Xext/xtest.c b/xserver/Xext/xtest.c
index e5ab7b451..86b5b851c 100644
--- a/xserver/Xext/xtest.c
+++ b/xserver/Xext/xtest.c
@@ -43,9 +43,13 @@
#include "dixevents.h"
#include "sleepuntil.h"
#include "mi.h"
+#ifdef HAVE_X11_EXTENSIONS_XTESTPROTO_H
+#include <X11/extensions/xtestproto.h>
+#else
#define _XTEST_SERVER_
#include <X11/extensions/XTest.h>
#include <X11/extensions/xteststr.h>
+#endif
#include <X11/extensions/XI.h>
#include <X11/extensions/XIproto.h>
diff --git a/xserver/Xext/xvdisp.c b/xserver/Xext/xvdisp.c
index de0128e14..e5e752a33 100644
--- a/xserver/Xext/xvdisp.c
+++ b/xserver/Xext/xvdisp.c
@@ -42,9 +42,13 @@ SOFTWARE.
#include <X11/extensions/Xvproto.h>
#include "xvdix.h"
#ifdef MITSHM
+#ifdef HAVE_X11_EXTENSIONS_SHMPROTO_H
+#include <X11/extensions/shmproto.h>
+#else
#define _XSHM_SERVER_
#include <X11/extensions/shmstr.h>
#endif
+#endif
#include "xvdisp.h"
diff --git a/xserver/aclocal.m4 b/xserver/aclocal.m4
index 91e3f7115..ca58988f9 100644
--- a/xserver/aclocal.m4
+++ b/xserver/aclocal.m4
@@ -7952,6 +7952,57 @@ AC_SUBST(MAKE_PDF)
AC_SUBST(MAKE_HTML)
]) # XORG_CHECK_DOCBOOK
+# XORG_WITH_XMLTO
+# ----------------
+# Minimum version: 1.5.0
+#
+# Documentation tools are not always available on all platforms and sometimes
+# not at the appropriate level. This macro enables a module to test for the
+# presence of the tool and obtain it's path in separate variables. Coupled with
+# the --with-xmlto option, it allows maximum flexibilty in making decisions
+# as whether or not to use the xmlto package.
+#
+# Interface to module:
+# HAVE_XMLTO: used in makefiles to conditionally generate documentation
+# XMLTO: returns the path of the xmlto program found
+# returns the path set by the user in the environment
+# --with-xmlto: 'yes' user instructs the module to use xmlto
+# 'no' user instructs the module not to use xmlto
+#
+# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
+#
+AC_DEFUN([XORG_WITH_XMLTO],[
+AC_ARG_VAR([XMLTO], [Path to xmlto command])
+AC_ARG_WITH(xmlto,
+ AS_HELP_STRING([--with-xmlto],
+ [Use xmlto to regenerate documentation (default: yes, if installed)]),
+ [use_xmlto=$withval], [use_xmlto=auto])
+
+if test "x$use_xmlto" = x"auto"; then
+ AC_PATH_PROG([XMLTO], [xmlto])
+ if test "x$XMLTO" = "x"; then
+ AC_MSG_WARN([xmlto not found - documentation targets will be skipped])
+ have_xmlto=no
+ else
+ have_xmlto=yes
+ fi
+elif test "x$use_xmlto" = x"yes" ; then
+ AC_PATH_PROG([XMLTO], [xmlto])
+ if test "x$XMLTO" = "x"; then
+ AC_MSG_WARN([--with-xmlto=yes specified but xmlto not found in PATH])
+ fi
+ have_xmlto=yes
+elif test "x$use_xmlto" = x"no" ; then
+ if test "x$XMLTO" != "x"; then
+ AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified])
+ fi
+ have_xmlto=no
+else
+ AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
+fi
+AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
+]) # XORG_CHECK_XMLTO
+
# XORG_CHECK_MALLOC_ZERO
# ----------------------
# Minimum version: 1.0.0
diff --git a/xserver/configure b/xserver/configure
index 744786a07..10b253b05 100644
--- a/xserver/configure
+++ b/xserver/configure
@@ -38628,6 +38628,233 @@ BUILD_DATE="$(date +'%Y%m%d')"
BUILD_TIME="$(date +'1%H%M%S')"
+# XXX proto shuffle
+_saved_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="-I$prefix/include"
+
+for ac_header in X11/extensions/dpmsconst.h
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_header_compiler=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ ac_header_preproc=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ ( cat <<\_ASBOX
+## ---------------------------------------------------------------------- ##
+## Report this to https://bugs.freedesktop.org/enter_bug.cgi?product=xorg ##
+## ---------------------------------------------------------------------- ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+
+fi
+if test `eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+
+
+for ac_header in X11/extensions/shmproto.h \
+ X11/extensions/dbeproto.h \
+ X11/extensions/shapeproto.h \
+ X11/extensions/syncproto.h \
+ X11/extensions/xtestproto.h
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <X11/X.h>
+#include <X11/Xmd.h>
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ eval "$as_ac_Header=yes"
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_Header=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+if test `eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+CPPFLAGS="$_saved_CPPFLAGS"
+
+
DIX_CFLAGS="-DHAVE_DIX_CONFIG_H $XSERVER_CFLAGS"
diff --git a/xserver/configure.ac b/xserver/configure.ac
index 091dca8d0..37d33ca00 100644
--- a/xserver/configure.ac
+++ b/xserver/configure.ac
@@ -1846,6 +1846,20 @@ AC_SUBST([BUILD_DATE])
BUILD_TIME="$(date +'1%H%M%S')"
AC_SUBST([BUILD_TIME])
+# XXX proto shuffle
+_saved_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="-I$prefix/include"
+AC_CHECK_HEADERS(X11/extensions/dpmsconst.h)
+AC_CHECK_HEADERS([X11/extensions/shmproto.h \
+ X11/extensions/dbeproto.h \
+ X11/extensions/shapeproto.h \
+ X11/extensions/syncproto.h \
+ X11/extensions/xtestproto.h],,,[
+#include <X11/X.h>
+#include <X11/Xmd.h>])
+CPPFLAGS="$_saved_CPPFLAGS"
+
+
DIX_CFLAGS="-DHAVE_DIX_CONFIG_H $XSERVER_CFLAGS"
AC_SUBST([DIX_CFLAGS])
diff --git a/xserver/dbe/dbestruct.h b/xserver/dbe/dbestruct.h
index 641f209da..448f779eb 100644
--- a/xserver/dbe/dbestruct.h
+++ b/xserver/dbe/dbestruct.h
@@ -37,11 +37,32 @@
/* INCLUDES */
#define NEED_DBE_PROTOCOL
+#ifdef HAVE_X11_EXTENSIONS_DBEPROTO_H
+#include <X11/extensions/dbeproto.h>
+#else
#include <X11/extensions/Xdbeproto.h>
+#endif
#include "windowstr.h"
#include "privates.h"
+#ifdef HAVE_X11_EXTENSIONS_DBEPROTO_H
+typedef struct
+{
+ VisualID visual; /* one visual ID that supports double-buffering */
+ int depth; /* depth of visual in bits */
+ int perflevel; /* performance level of visual */
+}
+XdbeVisualInfo;
+
+typedef struct
+{
+ int count; /* number of items in visual_depth */
+ XdbeVisualInfo *visinfo; /* list of visuals & depths for scrn */
+}
+XdbeScreenVisualInfo;
+#endif
+
/* DEFINES */
#define DBE_SCREEN_PRIV(pScreen) ((DbeScreenPrivPtr) \
diff --git a/xserver/dix/main.c b/xserver/dix/main.c
index 0527621e7..74179d8c3 100644
--- a/xserver/dix/main.c
+++ b/xserver/dix/main.c
@@ -112,7 +112,11 @@ Equipment Corporation.
#ifdef DPMSExtension
#define DPMS_SERVER
+#ifndef HAVE_X11_EXTENSIONS_DPMSCONST_H
#include <X11/extensions/dpms.h>
+#else
+#include <X11/extensions/dpmsconst.h>
+#endif
#include "dpmsproc.h"
#endif
diff --git a/xserver/hw/xfree86/common/xf86DPMS.c b/xserver/hw/xfree86/common/xf86DPMS.c
index 5ee5e2451..70bfd58b6 100644
--- a/xserver/hw/xfree86/common/xf86DPMS.c
+++ b/xserver/hw/xfree86/common/xf86DPMS.c
@@ -40,8 +40,12 @@
#include "xf86.h"
#include "xf86Priv.h"
#ifdef DPMSExtension
+#ifdef HAVE_X11_EXTENSIONS_DPMSCONST_H
+#include <X11/extensions/dpmsconst.h>
+#else
#define DPMS_SERVER
#include <X11/extensions/dpms.h>
+#endif
#include "dpmsproc.h"
#endif
diff --git a/xserver/hw/xfree86/common/xf86Events.c b/xserver/hw/xfree86/common/xf86Events.c
index d6ef93a1b..fb096da60 100644
--- a/xserver/hw/xfree86/common/xf86Events.c
+++ b/xserver/hw/xfree86/common/xf86Events.c
@@ -82,8 +82,12 @@
#endif
#ifdef DPMSExtension
+#ifdef HAVE_X11_EXTENSIONS_DPMSCONST_H
+#include <X11/extensions/dpmsconst.h>
+#else
#define DPMS_SERVER
#include <X11/extensions/dpms.h>
+#endif
#include "dpmsproc.h"
#endif
diff --git a/xserver/hw/xfree86/common/xf86Init.c b/xserver/hw/xfree86/common/xf86Init.c
index b4efa4278..ae1960e0f 100644
--- a/xserver/hw/xfree86/common/xf86Init.c
+++ b/xserver/hw/xfree86/common/xf86Init.c
@@ -83,10 +83,14 @@
#include "globals.h"
#ifdef DPMSExtension
+#ifdef HAVE_X11_EXTENSIONS_DPMSCONST_H
+#include <X11/extensions/dpmsconst.h>
+#else
#define DPMS_SERVER
#include <X11/extensions/dpms.h>
#include "dpmsproc.h"
#endif
+#endif
#include <pciaccess.h>
#include "Pci.h"
diff --git a/xserver/hw/xfree86/common/xf86Xinput.c b/xserver/hw/xfree86/common/xf86Xinput.c
index 1f412349c..abb54bb1b 100644
--- a/xserver/hw/xfree86/common/xf86Xinput.c
+++ b/xserver/hw/xfree86/common/xf86Xinput.c
@@ -65,8 +65,12 @@
#include "extinit.h"
#ifdef DPMSExtension
+#ifdef HAVE_X11_EXTENSIONS_DPMSCONST_H
+#include <X11/extensions/dpmsconst.h>
+#else
#define DPMS_SERVER
#include <X11/extensions/dpms.h>
+#endif
#include "dpmsproc.h"
#endif
diff --git a/xserver/hw/xfree86/dixmods/extmod/modinit.h b/xserver/hw/xfree86/dixmods/extmod/modinit.h
index 1de14858c..a05014a17 100644
--- a/xserver/hw/xfree86/dixmods/extmod/modinit.h
+++ b/xserver/hw/xfree86/dixmods/extmod/modinit.h
@@ -7,8 +7,12 @@
#define INITARGS void
#endif
+#ifdef HAVE_X11_EXTENSIONS_SHAPEPROTO_H
+#include <X11/extensions/shapeproto.h>
+#else
#define _SHAPE_SERVER_ /* don't want Xlib structures */
#include <X11/extensions/shapestr.h>
+#endif
#ifdef MULTIBUFFER
extern void MultibufferExtensionInit(INITARGS);
@@ -18,10 +22,14 @@ extern void MultibufferExtensionInit(INITARGS);
#ifdef XTEST
extern void XTestExtensionInit(INITARGS);
+#ifdef HAVE_X11_EXTENSIONS_XTESTPROTO_H
+#include <X11/extensions/xtestproto.h>
+#else
#define _XTEST_SERVER_
#include <X11/extensions/XTest.h>
#include <X11/extensions/xteststr.h>
#endif
+#endif
#if 1
extern void XTestExtension1Init(INITARGS);
@@ -47,8 +55,12 @@ extern void XFree86DGARegister(INITARGS);
#ifdef DPMSExtension
extern void DPMSExtensionInit(INITARGS);
+#ifdef HAVE_X11_EXTENSIONS_DPMSCONST_H
+#include <X11/extensions/dpmsconst.h>
+#else
#include <X11/extensions/dpmsstr.h>
#endif
+#endif
#ifdef XV
extern void XvExtensionInit(INITARGS);
@@ -65,7 +77,11 @@ extern void ResExtensionInit(INITARGS);
#ifdef SHM
extern void ShmExtensionInit(INITARGS);
+#ifdef HAVE_X11_EXTENSIONS_SHMPROTO_H
+#include <X11/extensions/shmproto.h>
+#else
#include <X11/extensions/shmstr.h>
+#endif
extern void ShmRegisterFuncs(
ScreenPtr pScreen,
ShmFuncsPtr funcs);
diff --git a/xserver/hw/xfree86/modes/xf86Crtc.c b/xserver/hw/xfree86/modes/xf86Crtc.c
index ec2089d09..54a3e5f57 100644
--- a/xserver/hw/xfree86/modes/xf86Crtc.c
+++ b/xserver/hw/xfree86/modes/xf86Crtc.c
@@ -40,8 +40,12 @@
#include "xf86Priv.h"
#include "xf86RandR12.h"
#include "X11/extensions/render.h"
+#ifdef HAVE_X11_EXTENSIONS_DPMSCONST_H
+#include <X11/extensions/dpmsproto.h>
+#else
#define DPMS_SERVER
#include "X11/extensions/dpms.h"
+#endif
#include "X11/Xatom.h"
#ifdef RENDER
#include "picturestr.h"
diff --git a/xserver/hw/xfree86/modes/xf86Cursors.c b/xserver/hw/xfree86/modes/xf86Cursors.c
index fbd61e9fd..91dd8c751 100644
--- a/xserver/hw/xfree86/modes/xf86Cursors.c
+++ b/xserver/hw/xfree86/modes/xf86Cursors.c
@@ -39,8 +39,12 @@
#include "xf86RandR12.h"
#include "xf86CursorPriv.h"
#include "X11/extensions/render.h"
+#ifdef HAVE_X11_EXTENSIONS_DPMSCONST_H
+#include <X11/extensions/dpmsconst.h>
+#else
#define DPMS_SERVER
#include "X11/extensions/dpms.h"
+#endif
#include "X11/Xatom.h"
#ifdef RENDER
#include "picturestr.h"
diff --git a/xserver/hw/xfree86/modes/xf86Rotate.c b/xserver/hw/xfree86/modes/xf86Rotate.c
index bb17df431..d945d2271 100644
--- a/xserver/hw/xfree86/modes/xf86Rotate.c
+++ b/xserver/hw/xfree86/modes/xf86Rotate.c
@@ -40,8 +40,12 @@
#include "xf86Modes.h"
#include "xf86RandR12.h"
#include "X11/extensions/render.h"
+#ifdef HAVE_X11_EXTENSIONS_DPMSCONST_H
+#include <X11/extensions/dpmsconst.h>
+#else
#define DPMS_SERVER
#include "X11/extensions/dpms.h"
+#endif
#include "X11/Xatom.h"
/* borrowed from composite extension, move to Render and publish? */
diff --git a/xserver/hw/xfree86/vbe/vbe.c b/xserver/hw/xfree86/vbe/vbe.c
index 4986b5b29..cff1ef47c 100644
--- a/xserver/hw/xfree86/vbe/vbe.c
+++ b/xserver/hw/xfree86/vbe/vbe.c
@@ -18,8 +18,12 @@
#include "xf86.h"
#include "vbe.h"
#include <X11/Xarch.h>
+#ifdef HAVE_X11_EXTENSIONS_DPMSCONST_H
+#include <X11/extensions/dpmsconst.h>
+#else
#define DPMS_SERVER
#include <X11/extensions/dpms.h>
+#endif
#define VERSION(x) VBE_VERSION_MAJOR(x),VBE_VERSION_MINOR(x)
diff --git a/xserver/hw/xfree86/vgahw/vgaHW.h b/xserver/hw/xfree86/vgahw/vgaHW.h
index a38ea7559..be6c3edad 100644
--- a/xserver/hw/xfree86/vgahw/vgaHW.h
+++ b/xserver/hw/xfree86/vgahw/vgaHW.h
@@ -25,8 +25,12 @@
#include "xf86DDC.h"
#include "globals.h"
+#ifdef HAVE_X11_EXTENSIONS_DPMSCONST_H
+#include <X11/extensions/dpmsconst.h>
+#else
#define DPMS_SERVER
#include <X11/extensions/dpms.h>
+#endif
extern int vgaHWGetIndex(void);
diff --git a/xserver/include/dix-config.h.in b/xserver/include/dix-config.h.in
index e25bc753c..ce60c33b0 100644
--- a/xserver/include/dix-config.h.in
+++ b/xserver/include/dix-config.h.in
@@ -216,6 +216,24 @@
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
+/* Define to 1 if you have the <X11/extensions/dbeproto.h> header file. */
+#undef HAVE_X11_EXTENSIONS_DBEPROTO_H
+
+/* Define to 1 if you have the <X11/extensions/dpmsconst.h> header file. */
+#undef HAVE_X11_EXTENSIONS_DPMSCONST_H
+
+/* Define to 1 if you have the <X11/extensions/shapeproto.h> header file. */
+#undef HAVE_X11_EXTENSIONS_SHAPEPROTO_H
+
+/* Define to 1 if you have the <X11/extensions/shmproto.h> header file. */
+#undef HAVE_X11_EXTENSIONS_SHMPROTO_H
+
+/* Define to 1 if you have the <X11/extensions/syncproto.h> header file. */
+#undef HAVE_X11_EXTENSIONS_SYNCPROTO_H
+
+/* Define to 1 if you have the <X11/extensions/xtestproto.h> header file. */
+#undef HAVE_X11_EXTENSIONS_XTESTPROTO_H
+
/* Have /dev/urandom */
#undef HAVE_URANDOM
diff --git a/xserver/include/do-not-use-config.h.in b/xserver/include/do-not-use-config.h.in
index 32b2596f8..d97c66eb4 100644
--- a/xserver/include/do-not-use-config.h.in
+++ b/xserver/include/do-not-use-config.h.in
@@ -363,6 +363,24 @@
/* Define to 1 if you have the `walkcontext' function. */
#undef HAVE_WALKCONTEXT
+/* Define to 1 if you have the <X11/extensions/dbeproto.h> header file. */
+#undef HAVE_X11_EXTENSIONS_DBEPROTO_H
+
+/* Define to 1 if you have the <X11/extensions/dpmsconst.h> header file. */
+#undef HAVE_X11_EXTENSIONS_DPMSCONST_H
+
+/* Define to 1 if you have the <X11/extensions/shapeproto.h> header file. */
+#undef HAVE_X11_EXTENSIONS_SHAPEPROTO_H
+
+/* Define to 1 if you have the <X11/extensions/shmproto.h> header file. */
+#undef HAVE_X11_EXTENSIONS_SHMPROTO_H
+
+/* Define to 1 if you have the <X11/extensions/syncproto.h> header file. */
+#undef HAVE_X11_EXTENSIONS_SYNCPROTO_H
+
+/* Define to 1 if you have the <X11/extensions/xtestproto.h> header file. */
+#undef HAVE_X11_EXTENSIONS_XTESTPROTO_H
+
/* Support IPv6 for TCP connections */
#undef IPv6
diff --git a/xserver/include/xorg-server.h.in b/xserver/include/xorg-server.h.in
index f3355dd6b..06bc13fe8 100644
--- a/xserver/include/xorg-server.h.in
+++ b/xserver/include/xorg-server.h.in
@@ -199,4 +199,10 @@
/* Use X server privilege separation */
#undef X_PRIVSEP
+/* Define to 1 if you have the <X11/extensions/dpmsconst.h> header file. */
+#undef HAVE_X11_EXTENSIONS_DPMSCONST_H
+
+/* Define to 1 if you have the <X11/extensions/shmproto.h> header file. */
+#undef HAVE_X11_EXTENSIONS_SHMPROTO_H
+
#endif /* _XORG_SERVER_H_ */
diff --git a/xserver/mi/mieq.c b/xserver/mi/mieq.c
index 478e68b7e..8090c257c 100644
--- a/xserver/mi/mieq.c
+++ b/xserver/mi/mieq.c
@@ -56,7 +56,11 @@ in this Software without prior written authorization from The Open Group.
#ifdef DPMSExtension
# include "dpmsproc.h"
# define DPMS_SERVER
-# include <X11/extensions/dpms.h>
+#ifndef HAVE_X11_EXTENSIONS_DPMSCONST_H
+#include <X11/extensions/dpms.h>
+#else
+#include <X11/extensions/dpmsconst.h>
+#endif
#endif
#define QUEUE_SIZE 512
diff --git a/xserver/mi/miinitext.c b/xserver/mi/miinitext.c
index 92d6cd2f0..ca473c0f9 100644
--- a/xserver/mi/miinitext.c
+++ b/xserver/mi/miinitext.c
@@ -160,13 +160,21 @@ typedef void (*InitExtension)(INITARGS);
#endif
#ifdef MITSHM
+#ifdef HAVE_X11_EXTENSIONS_SHMPROTO_H
+#include <X11/extensions/shmproto.h>
+#else
#define _XSHM_SERVER_
#include <X11/extensions/shmstr.h>
#endif
+#endif
#ifdef XTEST
+#ifdef HAVE_X11_EXTENSIONS_XTESTPROTO_H
+#include <X11/extensions/xtestproto.h>
+#else
#define _XTEST_SERVER_
#include <X11/extensions/XTest.h>
#endif
+#endif
#ifdef XKB
#include <X11/extensions/XKB.h>
#endif
diff --git a/xserver/mi/miscrinit.c b/xserver/mi/miscrinit.c
index 28d331653..c5a7d82a7 100644
--- a/xserver/mi/miscrinit.c
+++ b/xserver/mi/miscrinit.c
@@ -39,9 +39,14 @@ from The Open Group.
#include "dix.h"
#include "miline.h"
#ifdef MITSHM
+#ifdef HAVE_X11_EXTENSIONS_SHMPROTO_H
+#include <X11/extensions/shmproto.h>
+#include "shmint.h"
+#else
#define _XSHM_SERVER_
#include <X11/extensions/XShm.h>
#endif
+#endif
/* We use this structure to propogate some information from miScreenInit to
* miCreateScreenResources. miScreenInit allocates the structure, fills it
diff --git a/xserver/os/WaitFor.c b/xserver/os/WaitFor.c
index d6dd99553..8afc958ea 100644
--- a/xserver/os/WaitFor.c
+++ b/xserver/os/WaitFor.c
@@ -109,9 +109,13 @@ mffs(fd_mask mask)
}
#ifdef DPMSExtension
+#ifdef HAVE_X11_EXTENSIONS_DPMSCONST_H
+#include <X11/extensions/dpmsconst.h>
+#else
#define DPMS_SERVER
#include <X11/extensions/dpms.h>
#endif
+#endif
struct _OsTimerRec {
OsTimerPtr next;