Rob Clark | 487687e | 2011-07-17 17:29:02 -0500 | [diff] [blame] | 1 | # -*- Autoconf -*- |
David Garbett | 13c713c | 2013-04-05 13:56:20 +0100 | [diff] [blame] | 2 | # |
| 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 Barnish | 40c8ee2 | 2013-05-16 17:28:38 +0100 | [diff] [blame] | 19 | # ARM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER |
David Garbett | 13c713c | 2013-04-05 13:56:20 +0100 | [diff] [blame] | 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 Clark | 487687e | 2011-07-17 17:29:02 -0500 | [diff] [blame] | 23 | # Process this file with autoconf to produce a configure script. |
| 24 | |
| 25 | AC_PREREQ(2.60) |
John Sheu | 1c8161d | 2012-05-31 16:26:33 -0700 | [diff] [blame] | 26 | AC_INIT([xf86-video-armsoc], |
David Garbett | 9983d3d | 2013-08-28 12:02:06 +0100 | [diff] [blame] | 27 | [0.6.0], |
David Garbett | 02465b1 | 2013-04-05 14:49:55 +0100 | [diff] [blame] | 28 | [], |
John Sheu | 1c8161d | 2012-05-31 16:26:33 -0700 | [diff] [blame] | 29 | [xf86-video-armsoc]) |
Rob Clark | 487687e | 2011-07-17 17:29:02 -0500 | [diff] [blame] | 30 | AC_CONFIG_SRCDIR([Makefile.am]) |
| 31 | AC_CONFIG_HEADERS([config.h]) |
| 32 | AC_CONFIG_AUX_DIR(.) |
David Garbett | e76eb32 | 2013-04-05 14:11:25 +0100 | [diff] [blame] | 33 | AC_CONFIG_MACRO_DIR([m4]) |
Rob Clark | 487687e | 2011-07-17 17:29:02 -0500 | [diff] [blame] | 34 | |
| 35 | AM_INIT_AUTOMAKE([dist-bzip2]) |
| 36 | |
| 37 | AM_MAINTAINER_MODE |
| 38 | |
| 39 | # Require xorg-macros: XORG_DEFAULT_OPTIONS |
| 40 | m4_ifndef([XORG_MACROS_VERSION], |
| 41 | [m4_fatal([must install xorg-macros 1.4 or later before running autoconf/autogen])]) |
| 42 | XORG_MACROS_VERSION(1.4) |
| 43 | XORG_DEFAULT_OPTIONS |
| 44 | |
Dave Barnish | 40c8ee2 | 2013-05-16 17:28:38 +0100 | [diff] [blame] | 45 | # Initialize libtool |
| 46 | LT_INIT([disable-static]) |
Rob Clark | 487687e | 2011-07-17 17:29:02 -0500 | [diff] [blame] | 47 | # Checks for programs. |
Rob Clark | 487687e | 2011-07-17 17:29:02 -0500 | [diff] [blame] | 48 | AC_PROG_CC |
| 49 | |
| 50 | AC_CHECK_HEADERS([sys/ioctl.h]) |
Stéphane Marchesin | b55fb4a | 2012-11-27 15:16:04 -0800 | [diff] [blame] | 51 | AC_CHECK_HEADERS([stdint.h]) |
Rob Clark | 487687e | 2011-07-17 17:29:02 -0500 | [diff] [blame] | 52 | |
| 53 | AH_TOP([#include "xorg-server.h"]) |
| 54 | |
| 55 | AC_ARG_WITH(xorg-module-dir, |
Dave Barnish | 40c8ee2 | 2013-05-16 17:28:38 +0100 | [diff] [blame] | 56 | AS_HELP_STRING([--with-xorg-module-dir=DIR], |
Rob Clark | 487687e | 2011-07-17 17:29:02 -0500 | [diff] [blame] | 57 | [Default xorg module directory [[default=$libdir/xorg/modules]]]), |
| 58 | [moduledir="$withval"], |
| 59 | [moduledir="$libdir/xorg/modules"]) |
| 60 | |
Ray Smith | 3c33c3d | 2013-03-26 16:06:37 +0000 | [diff] [blame] | 61 | AC_MSG_CHECKING([which DRM driver to use]) |
| 62 | AC_ARG_WITH(drmmode, |
Dave Barnish | 40c8ee2 | 2013-05-16 17:28:38 +0100 | [diff] [blame] | 63 | AS_HELP_STRING([--with-drmmode], |
Ray Smith | 3c33c3d | 2013-03-26 16:06:37 +0000 | [diff] [blame] | 64 | [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])) |
| 67 | AC_MSG_RESULT([$drmmode]) |
| 68 | AC_SUBST(drmmode) |
| 69 | |
Rob Clark | 487687e | 2011-07-17 17:29:02 -0500 | [diff] [blame] | 70 | # Checks for extensions |
| 71 | XORG_DRIVER_CHECK_EXT(RANDR, randrproto) |
| 72 | XORG_DRIVER_CHECK_EXT(RENDER, renderproto) |
Rob Clark | 487687e | 2011-07-17 17:29:02 -0500 | [diff] [blame] | 73 | XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto) |
| 74 | |
| 75 | # Checks for pkg-config packages |
David Garbett | a065915 | 2013-09-02 11:48:07 +0100 | [diff] [blame] | 76 | PKG_CHECK_MODULES(XORG, |
| 77 | [xorg-server >= 1.10] |
| 78 | xproto |
| 79 | fontsproto |
| 80 | libdrm |
| 81 | dri2proto |
| 82 | pixman-1 |
| 83 | $REQUIRED_MODULES) |
Rob Clark | 487687e | 2011-07-17 17:29:02 -0500 | [diff] [blame] | 84 | |
| 85 | # Checks for header files. |
| 86 | AC_HEADER_STDC |
| 87 | |
Rob Clark | 487687e | 2011-07-17 17:29:02 -0500 | [diff] [blame] | 88 | |
John Sheu | 1c8161d | 2012-05-31 16:26:33 -0700 | [diff] [blame] | 89 | DRIVER_NAME=armsoc |
Rob Clark | 487687e | 2011-07-17 17:29:02 -0500 | [diff] [blame] | 90 | AC_SUBST([DRIVER_NAME]) |
| 91 | AC_SUBST([moduledir]) |
| 92 | |
| 93 | AC_OUTPUT([ |
| 94 | Makefile |
| 95 | src/Makefile |
| 96 | man/Makefile |
| 97 | ]) |