176888252Smrg# Copyright 2005 Adam Jackson. 276888252Smrg# 376888252Smrg# Permission is hereby granted, free of charge, to any person obtaining a 476888252Smrg# copy of this software and associated documentation files (the "Software"), 576888252Smrg# to deal in the Software without restriction, including without limitation 676888252Smrg# on the rights to use, copy, modify, merge, publish, distribute, sub 776888252Smrg# license, and/or sell copies of the Software, and to permit persons to whom 876888252Smrg# the Software is furnished to do so, subject to the following conditions: 976888252Smrg# 1076888252Smrg# The above copyright notice and this permission notice (including the next 1176888252Smrg# paragraph) shall be included in all copies or substantial portions of the 1276888252Smrg# Software. 1376888252Smrg# 1476888252Smrg# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1576888252Smrg# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1676888252Smrg# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL 1776888252Smrg# ADAM JACKSON BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 1876888252Smrg# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 1976888252Smrg# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 2076888252Smrg# 2176888252Smrg# Process this file with autoconf to produce a configure script 2276888252Smrg 2363847c39Smrg# Initialize Autoconf 2463847c39SmrgAC_PREREQ([2.60]) 2576888252SmrgAC_INIT([xf86-video-cirrus], 260814a2baSmrg [1.6.0], 270814a2baSmrg [https://gitlab.freedesktop.org/xorg/driver/xf86-video-cirrus/issues], 2863847c39Smrg [xf86-video-cirrus]) 2976888252SmrgAC_CONFIG_SRCDIR([Makefile.am]) 3063847c39SmrgAC_CONFIG_HEADERS([config.h]) 3176888252SmrgAC_CONFIG_AUX_DIR(.) 3276888252Smrg 3363847c39Smrg# Initialize Automake 340814a2baSmrgAM_INIT_AUTOMAKE([foreign dist-xz]) 3576888252Smrg 3663847c39Smrg# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS 3763847c39Smrgm4_ifndef([XORG_MACROS_VERSION], 3863847c39Smrg [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])]) 3963847c39SmrgXORG_MACROS_VERSION(1.8) 4063847c39SmrgXORG_DEFAULT_OPTIONS 411ae1b5e8Smrg 4263847c39Smrg# Initialize libtool 4376888252SmrgAC_DISABLE_STATIC 4476888252SmrgAC_PROG_LIBTOOL 4576888252Smrg 4676888252SmrgAH_TOP([#include "xorg-server.h"]) 4776888252Smrg 4863847c39Smrg# Define a configure option for an alternate module directory 4976888252SmrgAC_ARG_WITH(xorg-module-dir, 5063847c39Smrg AS_HELP_STRING([--with-xorg-module-dir=DIR], 5176888252Smrg [Default xorg module directory [[default=$libdir/xorg/modules]]]), 5276888252Smrg [moduledir="$withval"], 5376888252Smrg [moduledir="$libdir/xorg/modules"]) 5476888252Smrg 5563847c39Smrg# Store the list of server defined optional extensions in REQUIRED_MODULES 5676888252SmrgXORG_DRIVER_CHECK_EXT(RANDR, randrproto) 5776888252SmrgXORG_DRIVER_CHECK_EXT(RENDER, renderproto) 5876888252SmrgXORG_DRIVER_CHECK_EXT(XV, videoproto) 5976888252SmrgXORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto) 6076888252Smrg 6163847c39Smrg# Obtain compiler/linker options for the driver dependencies 621ae1b5e8SmrgPKG_CHECK_MODULES(XORG, [xorg-server >= 1.4 xproto fontsproto $REQUIRED_MODULES]) 6376888252Smrg 6476888252Smrg# Checks for libraries. 651ae1b5e8SmrgSAVE_CPPFLAGS="$CPPFLAGS" 661ae1b5e8SmrgCPPFLAGS="$CPPFLAGS $XORG_CFLAGS" 671ae1b5e8SmrgAC_CHECK_DECL(XSERVER_LIBPCIACCESS, 681ae1b5e8Smrg [XSERVER_LIBPCIACCESS=yes],[XSERVER_LIBPCIACCESS=no], 691ae1b5e8Smrg [#include "xorg-server.h"]) 701ae1b5e8SmrgAC_CHECK_HEADER(xf1bpp.h,[AC_DEFINE(HAVE_XF1BPP, 1, [Have 1bpp support])],[]) 711ae1b5e8SmrgAC_CHECK_HEADER(xf4bpp.h,[AC_DEFINE(HAVE_XF4BPP, 1, [Have 4bpp support])],[]) 721ae1b5e8SmrgCPPFLAGS="$SAVE_CPPFLAGS" 731ae1b5e8Smrg 7463847c39SmrgAC_ARG_ENABLE(xaa, 7563847c39Smrg AS_HELP_STRING([--enable-xaa], 7663847c39Smrg [Enable legacy X Acceleration Architecture (XAA) [default=auto]]), 7763847c39Smrg [XAA="$enableval"], 7863847c39Smrg [XAA=auto]) 7963847c39Smrgif test "x$XAA" != xno; then 8063847c39Smrg save_CFLAGS=$CFLAGS 8163847c39Smrg save_CPPFLAGS=$CPPFLAGS 8263847c39Smrg CFLAGS=$XORG_CFLAGS 8363847c39Smrg CPPFLAGS="$XORG_CFLAGS" 8463847c39Smrg AC_CHECK_HEADERS([xaa.h], XAA=yes, XAA=no) 8563847c39Smrg CFLAGS=$save_CFLAGS 8663847c39Smrg CPPFLAGS=$save_CPPFLAGS 8763847c39Smrgfi 8863847c39SmrgAC_MSG_CHECKING([whether to include XAA support]) 8963847c39SmrgAM_CONDITIONAL(XAA, test "x$XAA" = xyes) 9063847c39SmrgAC_MSG_RESULT([$XAA]) 9163847c39Smrg 921ae1b5e8Smrgif test "x$XSERVER_LIBPCIACCESS" = xyes; then 931ae1b5e8Smrg PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.8.0]) 941ae1b5e8Smrg XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS" 951ae1b5e8Smrgfi 961ae1b5e8SmrgAM_CONDITIONAL(XSERVER_LIBPCIACCESS, test "x$XSERVER_LIBPCIACCESS" = xyes) 9776888252Smrg 9876888252Smrg 9976888252SmrgAC_SUBST([moduledir]) 10076888252Smrg 10176888252SmrgDRIVER_NAME=cirrus 10276888252SmrgAC_SUBST([DRIVER_NAME]) 10376888252Smrg 10463847c39SmrgAC_CONFIG_FILES([ 10563847c39Smrg Makefile 10663847c39Smrg src/Makefile 10763847c39Smrg man/Makefile 10876888252Smrg]) 10963847c39SmrgAC_OUTPUT 110