115fb4814Smrg# Copyright 2005 Adam Jackson. 215fb4814Smrg# 315fb4814Smrg# Permission is hereby granted, free of charge, to any person obtaining a 415fb4814Smrg# copy of this software and associated documentation files (the "Software"), 515fb4814Smrg# to deal in the Software without restriction, including without limitation 615fb4814Smrg# on the rights to use, copy, modify, merge, publish, distribute, sub 715fb4814Smrg# license, and/or sell copies of the Software, and to permit persons to whom 815fb4814Smrg# the Software is furnished to do so, subject to the following conditions: 915fb4814Smrg# 1015fb4814Smrg# The above copyright notice and this permission notice (including the next 1115fb4814Smrg# paragraph) shall be included in all copies or substantial portions of the 1215fb4814Smrg# Software. 1315fb4814Smrg# 1415fb4814Smrg# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1515fb4814Smrg# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1615fb4814Smrg# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL 1715fb4814Smrg# ADAM JACKSON BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 1815fb4814Smrg# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 1915fb4814Smrg# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 2015fb4814Smrg# 2115fb4814Smrg# Process this file with autoconf to produce a configure script 2215fb4814Smrg 23b410ddbeSmrg# Initialize Autoconf 24b410ddbeSmrgAC_PREREQ([2.60]) 2515fb4814SmrgAC_INIT([xf86-video-ast], 26f010a93dSmrg [1.1.6], 27f010a93dSmrg [https://gitlab.freedesktop.org/xorg/driver/xf86-video-ast/-/issues], 28b410ddbeSmrg [xf86-video-ast]) 2915fb4814SmrgAC_CONFIG_SRCDIR([Makefile.am]) 30b410ddbeSmrgAC_CONFIG_HEADERS([config.h]) 3115fb4814SmrgAC_CONFIG_AUX_DIR(.) 3215fb4814Smrg 33b410ddbeSmrg# Initialize Automake 34f010a93dSmrgAM_INIT_AUTOMAKE([foreign dist-xz]) 3515fb4814Smrg 36b410ddbeSmrg# Require xorg-macros: XORG_DEFAULT_OPTIONS 37b410ddbeSmrgm4_ifndef([XORG_MACROS_VERSION], 38b410ddbeSmrg [m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])]) 39b410ddbeSmrgXORG_MACROS_VERSION(1.3) 40b410ddbeSmrgXORG_DEFAULT_OPTIONS 41b410ddbeSmrg 42b410ddbeSmrg# Initialize libtool 4315fb4814SmrgAC_DISABLE_STATIC 4415fb4814SmrgAC_PROG_LIBTOOL 4515fb4814Smrg 4615fb4814SmrgAH_TOP([#include "xorg-server.h"]) 4715fb4814Smrg 48b410ddbeSmrg# Define a configure option for an alternate module directory 4915fb4814SmrgAC_ARG_WITH(xorg-module-dir, 50b410ddbeSmrg AS_HELP_STRING([--with-xorg-module-dir=DIR], 5115fb4814Smrg [Default xorg module directory [[default=$libdir/xorg/modules]]]), 5215fb4814Smrg [moduledir="$withval"], 5315fb4814Smrg [moduledir="$libdir/xorg/modules"]) 5415fb4814Smrg 55b410ddbeSmrg# Store the list of server defined optional extensions in REQUIRED_MODULES 5615fb4814SmrgXORG_DRIVER_CHECK_EXT(RANDR, randrproto) 5715fb4814SmrgXORG_DRIVER_CHECK_EXT(RENDER, renderproto) 5815fb4814SmrgXORG_DRIVER_CHECK_EXT(XV, videoproto) 5915fb4814SmrgXORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto) 6015fb4814Smrg 61b410ddbeSmrg# Obtain compiler/linker options for the driver dependencies 62f010a93dSmrgPKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.99.901 xproto >= 7.0.22 fontsproto $REQUIRED_MODULES]) 6315fb4814Smrg 6415fb4814Smrg# Checks for libraries. 65de78e416SmrgSAVE_CPPFLAGS="$CPPFLAGS" 66de78e416SmrgCPPFLAGS="$CPPFLAGS $XORG_CFLAGS" 67de78e416SmrgAC_CHECK_DECL(XSERVER_LIBPCIACCESS, 68de78e416Smrg [XSERVER_LIBPCIACCESS=yes],[XSERVER_LIBPCIACCESS=no], 69de78e416Smrg [#include "xorg-server.h"]) 70de78e416SmrgCPPFLAGS="$SAVE_CPPFLAGS" 7115fb4814Smrg 72de78e416Smrgif test "x$XSERVER_LIBPCIACCESS" = xyes; then 73de78e416Smrg PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.8.0]) 74de78e416Smrg XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS" 75de78e416Smrgfi 76de78e416SmrgAM_CONDITIONAL(XSERVER_LIBPCIACCESS, test "x$XSERVER_LIBPCIACCESS" = xyes) 77de78e416Smrg 78b4d38c65SmrgAC_ARG_ENABLE(xaa, 79b4d38c65Smrg AS_HELP_STRING([--enable-xaa], 80b4d38c65Smrg [Enable legacy X Acceleration Architecture (XAA) [default=auto]]), 81b4d38c65Smrg [XAA="$enableval"], 82b4d38c65Smrg [XAA=auto]) 83b4d38c65Smrgif test "x$XAA" != xno; then 84b4d38c65Smrg save_CFLAGS=$CFLAGS 85b4d38c65Smrg save_CPPFLAGS=$CPPFLAGS 86b4d38c65Smrg CFLAGS=$XORG_CFLAGS 87b4d38c65Smrg CPPFLAGS="$XORG_CFLAGS" 88b4d38c65Smrg AC_CHECK_HEADERS([xaa.h], XAA=yes, XAA=no) 89b4d38c65Smrg CFLAGS=$save_CFLAGS 90b4d38c65Smrg CPPFLAGS=$save_CPPFLAGS 91b4d38c65Smrgfi 92b4d38c65SmrgAC_MSG_CHECKING([whether to include XAA support]) 93b4d38c65SmrgAM_CONDITIONAL(XAA, test "x$XAA" = xyes) 94b4d38c65SmrgAC_MSG_RESULT([$XAA]) 95b4d38c65Smrg 96b4d38c65Smrg 9715fb4814SmrgAC_SUBST([moduledir]) 9815fb4814Smrg 9915fb4814SmrgDRIVER_NAME=nv 10015fb4814SmrgAC_SUBST([DRIVER_NAME]) 10115fb4814Smrg 102b410ddbeSmrgAC_CONFIG_FILES([ 103b410ddbeSmrg Makefile 104b410ddbeSmrg src/Makefile 10515fb4814Smrg]) 106b410ddbeSmrgAC_OUTPUT 107