diff options
author | Aaron Plattner <aplattner@nvidia.com> | 2007-04-24 15:43:48 -0700 |
---|---|---|
committer | Aaron Plattner <aplattner@nvidia.com> | 2007-04-24 15:43:48 -0700 |
commit | c6e4105ce40ef053e026cc0ffe4925ab568ea700 (patch) | |
tree | fc0dc085da1e894a95ae8fddd6d06e4703d143ad /configure.ac | |
parent | 5d9b75b432dbc525e10c1c00436a1820456f6fb4 (diff) | |
parent | 4ff648c85f8aa90b343b7e2df176c0511b3cdaa5 (diff) |
Merge branch 'randr-1.2'
Conflicts:
configure.ac
man/Makefile.am
man/nv.man
src/g80_display.h
src/g80_output.c
src/nv_driver.c
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 70 |
1 files changed, 49 insertions, 21 deletions
diff --git a/configure.ac b/configure.ac index e2f3999..75e954a 100644 --- a/configure.ac +++ b/configure.ac @@ -41,47 +41,74 @@ AC_PROG_CC AH_TOP([#include "xorg-server.h"]) +# Options AC_ARG_WITH(xorg-module-dir, AC_HELP_STRING([--with-xorg-module-dir=DIR], [Default xorg module directory [[default=$libdir/xorg/modules]]]), [moduledir="$withval"], [moduledir="$libdir/xorg/modules"]) +AC_ARG_WITH(xserver-source,AC_HELP_STRING([--with-xserver-source=XSERVER_SOURCE], + [Path to X server source tree]), + [ XSERVER_SOURCE="$withval" ], + [ XSERVER_SOURCE="" ]) + # Checks for extensions XORG_DRIVER_CHECK_EXT(RANDR, randrproto) XORG_DRIVER_CHECK_EXT(RENDER, renderproto) XORG_DRIVER_CHECK_EXT(XV, videoproto) XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto) -# Determine whether XV PutImage takes a DrawablePtr and whether or not to use -# the libcwrapper. -PKG_CHECK_EXISTS([xorg-server >= 1.0.99.901], - [AC_DEFINE(HAVE_XV_DRAWABLE,1,[XV hooks take a DrawablePtr])], - [AC_DEFINE(USE_LIBC_WRAPPER,1,[Use the libc wrapper])]) - -PKG_CHECK_EXISTS([xorg-server >= 1.1.99.901], - [AC_DEFINE(USE_CVTMODE_FUNC,1,[Use xf86CVTMode func])]) - # Checks for pkg-config packages -PKG_CHECK_MODULES(XORG, [xorg-server xproto fontsproto $REQUIRED_MODULES]) +PKG_CHECK_MODULES(XORG, [xorg-server >= 1.2 xproto fontsproto $REQUIRED_MODULES]) sdkdir=$(pkg-config --variable=sdkdir xorg-server) -# Check for optional compile-time support -AC_ARG_ENABLE(g80, AC_HELP_STRING([--disable-g80], - [Disable G80 support [[default=no]]]), - [SUPPORT_G80="$enableval"], - [SUPPORT_G80=yes]) -AM_CONDITIONAL(SUPPORT_G80, test x$SUPPORT_G80 = xyes) -if test "$SUPPORT_G80" = yes; then - AC_DEFINE(SUPPORT_G80,1,[Enable G80 support]) - echo "Enabling G80 support" -fi - # Checks for libraries. # Checks for header files. AC_HEADER_STDC +save_CFLAGS="$CFLAGS" +CFLAGS="$XORG_CFLAGS" +AC_CHECK_HEADER(xf86Modes.h,[BUILD_XMODES=no],[BUILD_XMODES=yes],[#include "xorg-server.h"]) +CFLAGS="$save_CFLAGS" +AM_CONDITIONAL(BUILD_XMODES, test "x$BUILD_XMODES" = xyes) +if test "x$XSERVER_SOURCE" != x; then + if test -d "$XSERVER_SOURCE"; then + XSERVER_SOURCE=`cd "$XSERVER_SOURCE" && pwd` + if test -f "$XSERVER_SOURCE/hw/xfree86/modes/xf86Modes.h" -a -f "$XSERVER_SOURCE/hw/xfree86/parser/xf86Parser.h"; then + : + else + AC_ERROR([Server source at $XSERVER_SOURCE doesn't have the new mode code]) + fi + else + AC_ERROR([Can't find xserver-source path $XSERVER_SOURCE]) + fi +fi +if test "x$BUILD_XMODES" = xno; then + AC_MSG_NOTICE([X server has new mode code]) + XMODES_CFLAGS= + parser_dir= + modes_dir= +else + if test "x$XSERVER_SOURCE" = x; then + AC_MSG_NOTICE([X server is missing new mode code and --with-xserver-source not specified, using local copy]) + AC_MSG_NOTICE([If you're building from git, please read compat/README]) + parser_dir='$(top_srcdir)/compat/parser' + modes_dir='$(top_srcdir)/compat/modes' + else + AC_MSG_NOTICE([Using mode code from $XSERVER_SOURCE]) + parser_dir="$XSERVER_SOURCE/hw/xfree86/parser" + modes_dir="$XSERVER_SOURCE/hw/xfree86/modes" + fi + XMODES_CFLAGS="-DXF86_MODES_RENAME -I\"$modes_dir\" -I\"$parser_dir\"" + AC_DEFINE(BUILD_XMODES, 1,[X server doesn't have built-in mode code, so we need to build it]) +fi +AC_SUBST([XMODES_CFLAGS]) +AC_SUBST([parser_dir]) +AC_SUBST([modes_dir]) + +# Substitutions AC_SUBST([XORG_CFLAGS]) AC_SUBST([moduledir]) @@ -95,4 +122,5 @@ AC_OUTPUT([ Makefile src/Makefile man/Makefile + compat/Makefile ]) |