configure.ac revision f5990ea7
1d983712dSmrg#  Copyright 2005 Adam Jackson.
2d983712dSmrg#
3d983712dSmrg#  Permission is hereby granted, free of charge, to any person obtaining a
4d983712dSmrg#  copy of this software and associated documentation files (the "Software"),
5d983712dSmrg#  to deal in the Software without restriction, including without limitation
6d983712dSmrg#  on the rights to use, copy, modify, merge, publish, distribute, sub
7d983712dSmrg#  license, and/or sell copies of the Software, and to permit persons to whom
8d983712dSmrg#  the Software is furnished to do so, subject to the following conditions:
9d983712dSmrg#
10d983712dSmrg#  The above copyright notice and this permission notice (including the next
11d983712dSmrg#  paragraph) shall be included in all copies or substantial portions of the
12d983712dSmrg#  Software.
13d983712dSmrg#
14d983712dSmrg#  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15d983712dSmrg#  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16d983712dSmrg#  FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.  IN NO EVENT SHALL
17d983712dSmrg#  ADAM JACKSON BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
18d983712dSmrg#  IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19d983712dSmrg#  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20d983712dSmrg#
21d983712dSmrg# Process this file with autoconf to produce a configure script
22d983712dSmrg
23d983712dSmrgAC_PREREQ(2.57)
24d983712dSmrgAC_INIT([xf86-video-tseng],
25f5990ea7Smrg        1.2.4,
26d983712dSmrg        [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
27d983712dSmrg        xf86-video-tseng)
28d983712dSmrg
29d983712dSmrgAC_CONFIG_SRCDIR([Makefile.am])
30d983712dSmrgAM_CONFIG_HEADER([config.h])
31d983712dSmrgAC_CONFIG_AUX_DIR(.)
32d983712dSmrg
33f5990ea7SmrgAM_INIT_AUTOMAKE([foreign dist-bzip2])
34d983712dSmrg
35d983712dSmrgAM_MAINTAINER_MODE
36d983712dSmrg
37f5990ea7Smrg# Require xorg-macros: XORG_DEFAULT_OPTIONS
38f5990ea7Smrgm4_ifndef([XORG_MACROS_VERSION],
39f5990ea7Smrg          [m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])])
40f5990ea7SmrgXORG_MACROS_VERSION(1.3)
41f5990ea7SmrgXORG_DEFAULT_OPTIONS
42f5990ea7Smrg
43d983712dSmrg# Checks for programs.
44d983712dSmrgAC_DISABLE_STATIC
45d983712dSmrgAC_PROG_LIBTOOL
46d983712dSmrgAC_PROG_CC
47d983712dSmrg
48d983712dSmrgAH_TOP([#include "xorg-server.h"])
49d983712dSmrg
50d983712dSmrgAC_ARG_WITH(xorg-module-dir,
51d983712dSmrg            AC_HELP_STRING([--with-xorg-module-dir=DIR],
52d983712dSmrg                           [Default xorg module directory [[default=$libdir/xorg/modules]]]),
53d983712dSmrg            [moduledir="$withval"],
54d983712dSmrg            [moduledir="$libdir/xorg/modules"])
55d983712dSmrg
56d983712dSmrg# Checks for extensions
57d983712dSmrgXORG_DRIVER_CHECK_EXT(RANDR, randrproto)
58d983712dSmrgXORG_DRIVER_CHECK_EXT(RENDER, renderproto)
59d983712dSmrgXORG_DRIVER_CHECK_EXT(XV, videoproto)
60d983712dSmrgXORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto)
61d983712dSmrg
62d983712dSmrg# Checks for pkg-config packages
63d983712dSmrgPKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.99.901 xproto fontsproto $REQUIRED_MODULES])
64d983712dSmrg
65d983712dSmrg# Checks for libraries.
66962c3257SmrgSAVE_CPPFLAGS="$CPPFLAGS"
67962c3257SmrgCPPFLAGS="$CPPFLAGS $XORG_CFLAGS"
68962c3257SmrgAC_CHECK_DECL(XSERVER_LIBPCIACCESS,
69962c3257Smrg              [XSERVER_LIBPCIACCESS=yes],[XSERVER_LIBPCIACCESS=no],
70962c3257Smrg              [#include "xorg-server.h"])
71962c3257SmrgAC_CHECK_HEADER(xf1bpp.h,[AC_DEFINE(HAVE_XF1BPP, 1, [Have 1bpp support])],[])
72962c3257SmrgAC_CHECK_HEADER(xf4bpp.h,[AC_DEFINE(HAVE_XF4BPP, 1, [Have 4bpp support])],[])
73962c3257SmrgCPPFLAGS="$SAVE_CPPFLAGS"
74962c3257Smrg
75962c3257Smrgif test "x$XSERVER_LIBPCIACCESS" = xyes; then
76962c3257Smrg    PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.8.0])
77962c3257Smrg    XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS"
78962c3257Smrgfi
79962c3257SmrgAM_CONDITIONAL(XSERVER_LIBPCIACCESS, test "x$XSERVER_LIBPCIACCESS" = xyes)
80d983712dSmrg
81d983712dSmrg# Checks for header files.
82d983712dSmrgAC_HEADER_STDC
83d983712dSmrg
84d983712dSmrgAC_SUBST([XORG_CFLAGS])
85d983712dSmrgAC_SUBST([moduledir])
86d983712dSmrg
87d983712dSmrgDRIVER_NAME=tseng
88d983712dSmrgAC_SUBST([DRIVER_NAME])
89d983712dSmrg
90d983712dSmrgAC_OUTPUT([
91d983712dSmrg	Makefile
92d983712dSmrg	src/Makefile
93d983712dSmrg	man/Makefile
94d983712dSmrg])
95