configure.ac revision 22f7e8e5
16df26cacSmrg# Copyright 2005 Adam Jackson. 26df26cacSmrg# 36df26cacSmrg# Permission is hereby granted, free of charge, to any person obtaining a 46df26cacSmrg# copy of this software and associated documentation files (the "Software"), 56df26cacSmrg# to deal in the Software without restriction, including without limitation 66df26cacSmrg# on the rights to use, copy, modify, merge, publish, distribute, sub 76df26cacSmrg# license, and/or sell copies of the Software, and to permit persons to whom 86df26cacSmrg# the Software is furnished to do so, subject to the following conditions: 96df26cacSmrg# 106df26cacSmrg# The above copyright notice and this permission notice (including the next 116df26cacSmrg# paragraph) shall be included in all copies or substantial portions of the 126df26cacSmrg# Software. 136df26cacSmrg# 146df26cacSmrg# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 156df26cacSmrg# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 166df26cacSmrg# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL 176df26cacSmrg# ADAM JACKSON BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 186df26cacSmrg# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 196df26cacSmrg# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 206df26cacSmrg# 216df26cacSmrg# Process this file with autoconf to produce a configure script 226df26cacSmrg 231f27ce9aSmrg# Initialize Autoconf 241f27ce9aSmrgAC_PREREQ([2.60]) 256df26cacSmrgAC_INIT([xf86-video-vmware], 2622f7e8e5Smrg [13.0.2], 276df26cacSmrg [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], 281f27ce9aSmrg [xf86-video-vmware]) 296df26cacSmrgAC_CONFIG_SRCDIR([Makefile.am]) 301f27ce9aSmrgAC_CONFIG_HEADERS([config.h]) 316df26cacSmrgAC_CONFIG_AUX_DIR(.) 323bfa90b6SmrgAC_SYS_LARGEFILE 336df26cacSmrg 341f27ce9aSmrg# Initialize Automake 35b68e1f86SmrgAM_INIT_AUTOMAKE([foreign dist-bzip2]) 366df26cacSmrgAM_MAINTAINER_MODE 376df26cacSmrg 381f27ce9aSmrg# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS 39b68e1f86Smrgm4_ifndef([XORG_MACROS_VERSION], 401f27ce9aSmrg [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])]) 411f27ce9aSmrgXORG_MACROS_VERSION(1.8) 42b68e1f86SmrgXORG_DEFAULT_OPTIONS 43b68e1f86Smrg 441f27ce9aSmrg# Initialize libtool 456df26cacSmrgAC_DISABLE_STATIC 466df26cacSmrgAC_PROG_LIBTOOL 471f27ce9aSmrg 481f27ce9aSmrg# Checks for programs. 491f27ce9aSmrgAM_PROG_CC_C_O 506df26cacSmrg 516df26cacSmrgAH_TOP([#include "xorg-server.h"]) 526df26cacSmrg 531f27ce9aSmrg# Define a configure option for an alternate module directory 546df26cacSmrgAC_ARG_WITH(xorg-module-dir, 551f27ce9aSmrg AS_HELP_STRING([--with-xorg-module-dir=DIR], 566df26cacSmrg [Default xorg module directory [[default=$libdir/xorg/modules]]]), 576df26cacSmrg [moduledir="$withval"], 586df26cacSmrg [moduledir="$libdir/xorg/modules"]) 596df26cacSmrg 60a241306cSmrg# Define a configure option to build the vmwarectrl client tool 61a241306cSmrgAC_ARG_ENABLE(vmwarectrl-client, 62a241306cSmrg AS_HELP_STRING([--enable-vmwarectrl-client], 63a241306cSmrg [Enable vmwarectrl client (default: disabled)]), 64a241306cSmrg [VMWARECTRL=$enableval], [VMWARECTRL=no]) 65a241306cSmrgAM_CONDITIONAL(BUILD_VMWARECTRL, [test "x$VMWARECTRL" = xyes]) 66a241306cSmrg 671f27ce9aSmrg# Store the list of server defined optional extensions in REQUIRED_MODULES 686df26cacSmrgXORG_DRIVER_CHECK_EXT(RANDR, randrproto) 696df26cacSmrgXORG_DRIVER_CHECK_EXT(RENDER, renderproto) 706df26cacSmrgXORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto) 716df26cacSmrgXORG_DRIVER_CHECK_EXT(XINERAMA, xineramaproto) 726df26cacSmrgXORG_DRIVER_CHECK_EXT(XV, videoproto) 736df26cacSmrg 741f27ce9aSmrg# Obtain compiler/linker options for the driver dependencies 756df26cacSmrgPKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.1 xproto fontsproto $REQUIRED_MODULES]) 7616fd1166SmrgPKG_CHECK_EXISTS([xorg-server >= 1.1.0], 7716fd1166Smrg [AC_DEFINE([HAVE_XORG_SERVER_1_1_0], 1, 7816fd1166Smrg [Has version 1.1.0 or greater of the Xserver])]) 7916fd1166Smrg 8016fd1166SmrgPKG_CHECK_EXISTS([xorg-server >= 1.2.0], 8116fd1166Smrg [AC_DEFINE([HAVE_XORG_SERVER_1_2_0], 1, 8216fd1166Smrg [Has version 1.2.0 or greater of the Xserver])]) 8316fd1166Smrg 84a241306cSmrgPKG_CHECK_EXISTS([xorg-server >= 1.4.99], 85a241306cSmrg [AC_DEFINE([HAVE_XORG_SERVER_1_5_0], 1, 86a241306cSmrg [Has version 1.5.0 or greater of the Xserver])]) 87a241306cSmrg 88b68e1f86SmrgPKG_CHECK_EXISTS([xorg-server >= 1.7.0], 89b68e1f86Smrg [AC_DEFINE([HAVE_XORG_SERVER_1_7_0], 1, 903bfa90b6Smrg [Has version 1.7.0 or greater of the Xserver]) 913bfa90b6Smrg BUILD_VMWGFX=yes],[BUILD_VMWGFX=no]) 923bfa90b6Smrg 933bfa90b6SmrgPKG_CHECK_EXISTS([xorg-server >= 1.12.0], 943bfa90b6Smrg [AC_DEFINE([HAVE_XORG_SERVER_1_12_0], 1, 953bfa90b6Smrg [Has version 1.12.0 or greater of the Xserver])]) 96b68e1f86Smrg 97a241306cSmrg# Obtain compiler/linker options for the vmwarectrl client tool 98a241306cSmrgPKG_CHECK_MODULES(X11, x11 xext) 99a241306cSmrg 1006df26cacSmrg# Checks for libraries. 1016df26cacSmrg 1026df26cacSmrgsave_CFLAGS="$CFLAGS" 1036df26cacSmrgCFLAGS="$XORG_CFLAGS" 1046df26cacSmrgAC_CHECK_DECL(XSERVER_LIBPCIACCESS, 1056df26cacSmrg [XSERVER_LIBPCIACCESS=yes], [XSERVER_LIBPCIACCESS=no], 1066df26cacSmrg [#include "xorg-server.h"]) 1076df26cacSmrgCFLAGS="$save_CFLAGS" 1086df26cacSmrg 1096df26cacSmrgif test x$XSERVER_LIBPCIACCESS = xyes; then 1106df26cacSmrg PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.8.0]) 1116df26cacSmrgfi 1126df26cacSmrg 1136df26cacSmrgAM_CONDITIONAL(XSERVER_LIBPCIACCESS, test "x$XSERVER_LIBPCIACCESS" = xyes) 1146df26cacSmrg 1156df26cacSmrgAC_SUBST([moduledir]) 1166df26cacSmrg 1173bfa90b6Smrgif test x$BUILD_VMWGFX = xyes; then 1183bfa90b6Smrg PKG_CHECK_MODULES([LIBDRM], [libdrm],[],[BUILD_VMWGFX=no]) 1193bfa90b6Smrgfi 1203bfa90b6Smrgif test x$BUILD_VMWGFX = xyes; then 12122f7e8e5Smrg# 12222f7e8e5Smrg# Early versions of mesa 10 forgot to bump the XA major version number in 12322f7e8e5Smrg# the xa_tracker.h header 12422f7e8e5Smrg# 12522f7e8e5Smrg PKG_CHECK_MODULES([XATRACKER], [xatracker >= 0.4.0], 12622f7e8e5Smrg [PKG_CHECK_EXISTS([xatracker = 2.0.0], 12722f7e8e5Smrg [AC_DEFINE([HAVE_XA_2], 1, 12822f7e8e5Smrg [Has version 2 of XA])])], 12922f7e8e5Smrg [],[BUILD_VMWGFX=no]) 13022f7e8e5Smrg# 13122f7e8e5Smrg# Check for prime. 13222f7e8e5Smrg# 13322f7e8e5Smrg PKG_CHECK_EXISTS([libdrm >= 2.4.38], 13422f7e8e5Smrg [AC_DEFINE([HAVE_LIBDRM_2_4_38], 1, 13522f7e8e5Smrg [Has version 2.4.38 or greater of libdrm])]) 1363bfa90b6Smrgfi 1373bfa90b6Smrg 1386df26cacSmrgDRIVER_NAME=vmware 1396df26cacSmrgAC_SUBST([DRIVER_NAME]) 1406df26cacSmrg 1413bfa90b6SmrgAC_MSG_CHECKING([whether to build Kernel Mode Setting and 3D]) 1423bfa90b6Smrgif test x$BUILD_VMWGFX = xyes; then 1433bfa90b6Smrg AC_MSG_RESULT([yes]) 1443bfa90b6Smrg AC_DEFINE([BUILD_VMWGFX], 1, [Building the vmwgfx driver path]) 1453bfa90b6Smrgelse 1463bfa90b6Smrg AC_MSG_RESULT([no]) 1473bfa90b6Smrgfi 1483bfa90b6Smrg 1493bfa90b6SmrgAM_CONDITIONAL(BUILD_VMWGFX, test "x$BUILD_VMWGFX" = xyes) 1503bfa90b6Smrg 1511f27ce9aSmrgAC_CONFIG_FILES([ 1521f27ce9aSmrg Makefile 1533bfa90b6Smrg man/Makefile 1543bfa90b6Smrg saa/Makefile 1553bfa90b6Smrg vmwgfx/Makefile 1561f27ce9aSmrg src/Makefile 157a241306cSmrg vmwarectrl/Makefile 1586df26cacSmrg]) 1593bfa90b6Smrg 1601f27ce9aSmrgAC_OUTPUT 161