blob: 95a60aed171d16d9198f0bb2269866775f130f6a [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
19# ADAM JACKSON BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
20# 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)
26# XXX bug URL should be https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
27# but this makes autoheader choke..
John Sheu1c8161d2012-05-31 16:26:33 -070028AC_INIT([xf86-video-armsoc],
David Garbett4942d782012-09-20 10:41:11 +010029 [0.5.1],
Rob Clark487687e2011-07-17 17:29:02 -050030 [https://bugs.freedesktop.org/enter_bug.cgi],
John Sheu1c8161d2012-05-31 16:26:33 -070031 [xf86-video-armsoc])
Rob Clark487687e2011-07-17 17:29:02 -050032AC_CONFIG_SRCDIR([Makefile.am])
33AC_CONFIG_HEADERS([config.h])
34AC_CONFIG_AUX_DIR(.)
David Garbette76eb322013-04-05 14:11:25 +010035AC_CONFIG_MACRO_DIR([m4])
Rob Clark487687e2011-07-17 17:29:02 -050036
37AM_INIT_AUTOMAKE([dist-bzip2])
38
39AM_MAINTAINER_MODE
40
41# Require xorg-macros: XORG_DEFAULT_OPTIONS
42m4_ifndef([XORG_MACROS_VERSION],
43 [m4_fatal([must install xorg-macros 1.4 or later before running autoconf/autogen])])
44XORG_MACROS_VERSION(1.4)
45XORG_DEFAULT_OPTIONS
46
47# Checks for programs.
48AC_DISABLE_STATIC
49AC_PROG_LIBTOOL
50AC_PROG_CC
51
52AC_CHECK_HEADERS([sys/ioctl.h])
Stéphane Marchesinb55fb4a2012-11-27 15:16:04 -080053AC_CHECK_HEADERS([stdint.h])
Rob Clark487687e2011-07-17 17:29:02 -050054
55AH_TOP([#include "xorg-server.h"])
56
57AC_ARG_WITH(xorg-module-dir,
58 AC_HELP_STRING([--with-xorg-module-dir=DIR],
59 [Default xorg module directory [[default=$libdir/xorg/modules]]]),
60 [moduledir="$withval"],
61 [moduledir="$libdir/xorg/modules"])
62
Ray Smith3c33c3d2013-03-26 16:06:37 +000063AC_MSG_CHECKING([which DRM driver to use])
64AC_ARG_WITH(drmmode,
65 AC_HELP_STRING([--with-drmmode],
66 [Which DRM driver to use (see README)]),
67 [drmmode=$withval],
68 AC_MSG_FAILURE([You must specify which DRM driver to build for - see README]))
69AC_MSG_RESULT([$drmmode])
70AC_SUBST(drmmode)
71
Rob Clark487687e2011-07-17 17:29:02 -050072# Checks for extensions
73XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
74XORG_DRIVER_CHECK_EXT(RENDER, renderproto)
Rob Clark487687e2011-07-17 17:29:02 -050075XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto)
76
77# Checks for pkg-config packages
David Garbett13c713c2013-04-05 13:56:20 +010078PKG_CHECK_MODULES(XORG, [xorg-server >= 1.10] xproto fontsproto libdrm dri2proto $REQUIRED_MODULES)
Rob Clark487687e2011-07-17 17:29:02 -050079
80# Checks for header files.
81AC_HEADER_STDC
82
Rob Clark487687e2011-07-17 17:29:02 -050083
John Sheu1c8161d2012-05-31 16:26:33 -070084DRIVER_NAME=armsoc
Rob Clark487687e2011-07-17 17:29:02 -050085AC_SUBST([DRIVER_NAME])
86AC_SUBST([moduledir])
87
88AC_OUTPUT([
89 Makefile
90 src/Makefile
91 man/Makefile
92])