blob: bde2213816a97a6ab51c27a24562adce2c99dbd6 [file] [log] [blame]
Rob Clark487687e2011-07-17 17:29:02 -05001# -*- Autoconf -*-
David Garbett13c713c2013-04-05 13:56:20 +01002#
3# Copyright 2013 ARM
4#
5# Permission is hereby granted, free of charge, to any person obtaining a
6# copy of this software and associated documentation files (the "Software"),
7# to deal in the Software without restriction, including without limitation
8# on the rights to use, copy, modify, merge, publish, distribute, sub
9# license, and/or sell copies of the Software, and to permit persons to whom
10# the Software is furnished to do so, subject to the following conditions:
11#
12# The above copyright notice and this permission notice (including the next
13# paragraph) shall be included in all copies or substantial portions of the
14# Software.
15#
16# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18# FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
Dave Barnish40c8ee22013-05-16 17:28:38 +010019# ARM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
David Garbett13c713c2013-04-05 13:56:20 +010020# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22#
Rob Clark487687e2011-07-17 17:29:02 -050023# Process this file with autoconf to produce a configure script.
24
25AC_PREREQ(2.60)
John Sheu1c8161d2012-05-31 16:26:33 -070026AC_INIT([xf86-video-armsoc],
David Garbett9983d3d2013-08-28 12:02:06 +010027 [0.6.0],
David Garbett02465b12013-04-05 14:49:55 +010028 [],
John Sheu1c8161d2012-05-31 16:26:33 -070029 [xf86-video-armsoc])
Rob Clark487687e2011-07-17 17:29:02 -050030AC_CONFIG_SRCDIR([Makefile.am])
31AC_CONFIG_HEADERS([config.h])
32AC_CONFIG_AUX_DIR(.)
David Garbette76eb322013-04-05 14:11:25 +010033AC_CONFIG_MACRO_DIR([m4])
Rob Clark487687e2011-07-17 17:29:02 -050034
35AM_INIT_AUTOMAKE([dist-bzip2])
36
37AM_MAINTAINER_MODE
38
39# Require xorg-macros: XORG_DEFAULT_OPTIONS
40m4_ifndef([XORG_MACROS_VERSION],
41 [m4_fatal([must install xorg-macros 1.4 or later before running autoconf/autogen])])
42XORG_MACROS_VERSION(1.4)
43XORG_DEFAULT_OPTIONS
44
Dave Barnish40c8ee22013-05-16 17:28:38 +010045# Initialize libtool
46LT_INIT([disable-static])
Rob Clark487687e2011-07-17 17:29:02 -050047# Checks for programs.
Rob Clark487687e2011-07-17 17:29:02 -050048AC_PROG_CC
49
50AC_CHECK_HEADERS([sys/ioctl.h])
Stéphane Marchesinb55fb4a2012-11-27 15:16:04 -080051AC_CHECK_HEADERS([stdint.h])
Rob Clark487687e2011-07-17 17:29:02 -050052
53AH_TOP([#include "xorg-server.h"])
54
55AC_ARG_WITH(xorg-module-dir,
Dave Barnish40c8ee22013-05-16 17:28:38 +010056 AS_HELP_STRING([--with-xorg-module-dir=DIR],
Rob Clark487687e2011-07-17 17:29:02 -050057 [Default xorg module directory [[default=$libdir/xorg/modules]]]),
58 [moduledir="$withval"],
59 [moduledir="$libdir/xorg/modules"])
60
Ray Smith3c33c3d2013-03-26 16:06:37 +000061AC_MSG_CHECKING([which DRM driver to use])
62AC_ARG_WITH(drmmode,
Dave Barnish40c8ee22013-05-16 17:28:38 +010063 AS_HELP_STRING([--with-drmmode],
Ray Smith3c33c3d2013-03-26 16:06:37 +000064 [Which DRM driver to use (see README)]),
65 [drmmode=$withval],
66 AC_MSG_FAILURE([You must specify which DRM driver to build for - see README]))
67AC_MSG_RESULT([$drmmode])
68AC_SUBST(drmmode)
69
Rob Clark487687e2011-07-17 17:29:02 -050070# Checks for extensions
71XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
72XORG_DRIVER_CHECK_EXT(RENDER, renderproto)
Rob Clark487687e2011-07-17 17:29:02 -050073XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto)
74
75# Checks for pkg-config packages
David Garbetta0659152013-09-02 11:48:07 +010076PKG_CHECK_MODULES(XORG,
77 [xorg-server >= 1.10]
78 xproto
79 fontsproto
80 libdrm
81 dri2proto
82 pixman-1
83 $REQUIRED_MODULES)
Rob Clark487687e2011-07-17 17:29:02 -050084
85# Checks for header files.
86AC_HEADER_STDC
87
Rob Clark487687e2011-07-17 17:29:02 -050088
John Sheu1c8161d2012-05-31 16:26:33 -070089DRIVER_NAME=armsoc
Rob Clark487687e2011-07-17 17:29:02 -050090AC_SUBST([DRIVER_NAME])
91AC_SUBST([moduledir])
92
93AC_OUTPUT([
94 Makefile
95 src/Makefile
96 man/Makefile
97])