From cca389769001c657435f056e1f1c26b0f52a48bd Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Thu, 19 Apr 2007 13:15:23 -0700 Subject: Clean up 1.2 xserver build support. Convert relative X server source path to absolute. Check for local copies of needed header files before building, rather than requiring server source. Remove extra duplicate -I elements in AM_CFLAGS in sub directories. --- configure.ac | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 2d265530..a06d3e4b 100644 --- a/configure.ac +++ b/configure.ac @@ -131,19 +131,14 @@ if test "x$XSERVER_SOURCE" = x; then fi fi -if test "x$XMODES" = xyes; then - echo built-in mode code - AC_DEFINE(XMODES, 1,[X server has built-in mode code]) - XMODES_CFLAGS= -else - echo symlink mode code - if test "x$XSERVER_SOURCE" = x; then - AC_MSG_ERROR([Must have X server >= 1.3 source tree for mode setting code. Please specify --with-xserver-source]) - fi - XMODES_CFLAGS='-DXF86_MODES_RENAME -I$(top_srcdir)/src/modes -I$(top_srcdir)/src/parser' -fi - if test -d "$XSERVER_SOURCE"; then + case "$XSERVER_SOURCE" in + /*) + ;; + *) + XSERVER_SOURCE="`cd $XSERVER_SOURCE && pwd`" + ;; + esac if test -f src/modes/xf86Modes.h; then : else @@ -156,6 +151,20 @@ if test -d "$XSERVER_SOURCE"; then ln -sf $XSERVER_SOURCE/hw/xfree86/parser src/parser fi fi + +if test "x$XMODES" = xyes; then + AC_MSG_NOTICE([X server has new mode code]) + AC_DEFINE(XMODES, 1,[X server has built-in mode code]) + XMODES_CFLAGS= +else + if test -f src/modes/xf86Modes.h -a -f src/parser/xf86Parser.h; then + AC_MSG_NOTICE([X server is missing new mode code, using local copy]) + else + AC_MSG_ERROR([Must have X server >= 1.3 source tree for mode setting code. Please specify --with-xserver-source]) + fi + XMODES_CFLAGS='-DXF86_MODES_RENAME -I$(top_srcdir)/src -I$(top_srcdir)/src/modes -I$(top_srcdir)/src/parser' +fi + AC_SUBST([XMODES_CFLAGS]) dnl Use lots of warning flags with GCC -- cgit v1.2.3