1943345d3Smrg# Copyright 2005 Adam Jackson. 2943345d3Smrg# 3943345d3Smrg# Permission is hereby granted, free of charge, to any person obtaining a 4943345d3Smrg# copy of this software and associated documentation files (the "Software"), 5943345d3Smrg# to deal in the Software without restriction, including without limitation 6943345d3Smrg# on the rights to use, copy, modify, merge, publish, distribute, sub 7943345d3Smrg# license, and/or sell copies of the Software, and to permit persons to whom 8943345d3Smrg# the Software is furnished to do so, subject to the following conditions: 9943345d3Smrg# 10943345d3Smrg# The above copyright notice and this permission notice (including the next 11943345d3Smrg# paragraph) shall be included in all copies or substantial portions of the 12943345d3Smrg# Software. 13943345d3Smrg# 14943345d3Smrg# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15943345d3Smrg# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16943345d3Smrg# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL 17943345d3Smrg# ADAM JACKSON BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 18943345d3Smrg# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 19943345d3Smrg# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 20943345d3Smrg# 21943345d3Smrg# Process this file with autoconf to produce a configure script 22943345d3Smrg 23a7b590b3Smrg# Initialize Autoconf 24a7b590b3SmrgAC_PREREQ([2.60]) 25943345d3SmrgAC_INIT([xf86-video-ark], 2615ffece8Smrg [0.7.6], 2715ffece8Smrg [https://gitlab.freedesktop.org/xorg/driver/xf86-video-ark/-/issues], 28a7b590b3Smrg [xf86-video-ark]) 29943345d3SmrgAC_CONFIG_SRCDIR([Makefile.am]) 30a7b590b3SmrgAC_CONFIG_HEADERS([config.h]) 31943345d3SmrgAC_CONFIG_AUX_DIR(.) 32943345d3Smrg 33a7b590b3Smrg# Initialize Automake 3415ffece8SmrgAM_INIT_AUTOMAKE([foreign dist-xz]) 35943345d3SmrgAM_MAINTAINER_MODE 36943345d3Smrg 37a7b590b3Smrg# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS 38a7b590b3Smrgm4_ifndef([XORG_MACROS_VERSION], 39a7b590b3Smrg [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])]) 40a7b590b3SmrgXORG_MACROS_VERSION(1.8) 41a7b590b3SmrgXORG_DEFAULT_OPTIONS 42a7b590b3Smrg 43a7b590b3Smrg# Initialize libtool 44943345d3SmrgAC_DISABLE_STATIC 45943345d3SmrgAC_PROG_LIBTOOL 46943345d3Smrg 47943345d3SmrgAH_TOP([#include "xorg-server.h"]) 48943345d3Smrg 49a7b590b3Smrg# Define a configure option for an alternate module directory 50943345d3SmrgAC_ARG_WITH(xorg-module-dir, [ --with-xorg-module-dir=DIR ], 51943345d3Smrg [ moduledir="$withval" ], 52943345d3Smrg [ moduledir="$libdir/xorg/modules" ]) 53943345d3SmrgAC_SUBST(moduledir) 54943345d3Smrg 55a7b590b3Smrg# Store the list of server defined optional extensions in REQUIRED_MODULES 56943345d3SmrgXORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto) 57943345d3Smrg 58a7b590b3Smrg# Obtain compiler/linker options for the driver dependencies 59943345d3SmrgPKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.99.901] xproto fontsproto $REQUIRED_MODULES) 60943345d3Smrg 61943345d3Smrg# Checks for libraries. 62f67b85aaSmrgSAVE_CPPFLAGS="$CPPFLAGS" 63f67b85aaSmrgCPPFLAGS="$CPPFLAGS $XORG_CFLAGS" 64f67b85aaSmrgAC_CHECK_DECL(XSERVER_LIBPCIACCESS, 65f67b85aaSmrg [XSERVER_LIBPCIACCESS=yes],[XSERVER_LIBPCIACCESS=no], 66f67b85aaSmrg [#include "xorg-server.h"]) 67f67b85aaSmrgCPPFLAGS="$SAVE_CPPFLAGS" 68943345d3Smrg 69f67b85aaSmrgif test "x$XSERVER_LIBPCIACCESS" = xyes; then 703e51e026Smrg PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.12.901]) 71f67b85aaSmrgfi 72f67b85aaSmrgAM_CONDITIONAL(XSERVER_LIBPCIACCESS, test "x$XSERVER_LIBPCIACCESS" = xyes) 733e51e026SmrgAC_ARG_ENABLE(xaa, 743e51e026Smrg AS_HELP_STRING([--enable-xaa], 753e51e026Smrg [Enable legacy X Acceleration Architecture (XAA) [default=auto]]), 763e51e026Smrg [XAA="$enableval"], 773e51e026Smrg [XAA=auto]) 783e51e026Smrgif test "x$XAA" != xno; then 793e51e026Smrg save_CFLAGS=$CFLAGS 803e51e026Smrg save_CPPFLAGS=$CPPFLAGS 813e51e026Smrg CFLAGS=$XORG_CFLAGS 823e51e026Smrg CPPFLAGS="$XORG_CFLAGS" 833e51e026Smrg AC_CHECK_HEADERS([xaa.h], XAA=yes, XAA=no) 843e51e026Smrg CFLAGS=$save_CFLAGS 853e51e026Smrg CPPFLAGS=$save_CPPFLAGS 863e51e026Smrgfi 873e51e026SmrgAC_MSG_CHECKING([whether to include XAA support]) 883e51e026SmrgAM_CONDITIONAL(XAA, test "x$XAA" = xyes) 893e51e026SmrgAC_MSG_RESULT([$XAA]) 90f67b85aaSmrg 91943345d3SmrgDRIVER_NAME=ark 92943345d3SmrgAC_SUBST([DRIVER_NAME]) 93943345d3Smrg 94a7b590b3SmrgAC_CONFIG_FILES([ 95a7b590b3Smrg Makefile 96a7b590b3Smrg src/Makefile 97943345d3Smrg]) 98a7b590b3SmrgAC_OUTPUT 99