summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorKeith Packard <keithp@neko.keithp.com>2007-04-19 13:15:23 -0700
committerKeith Packard <keithp@neko.keithp.com>2007-04-19 13:15:23 -0700
commitcca389769001c657435f056e1f1c26b0f52a48bd (patch)
tree8ce6b6f001d4bf32dd25a122c1a015ef34496cad /configure.ac
parent07797fee88d6be0dfb30394a419dd86f8a3c9095 (diff)
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.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac33
1 files changed, 21 insertions, 12 deletions
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