summaryrefslogtreecommitdiff
path: root/configure.ac
blob: fdf2d332b5b81a0c17d743ddd6e03ba32f25d8da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
AC_INIT([nouveau], 1.0.2)
AC_CONFIG_SRCDIR([configure.ac])
AC_CONFIG_MACRO_DIR([m4])

AC_PROG_CC
AC_LANG_C
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AC_PROG_LIBTOOL

AM_INIT_AUTOMAKE
AM_SILENT_RULES([yes])

PKG_CHECK_MODULES(PCIACCESS, pciaccess)
AC_SUBST([PCIACCESS_CFLAGS])
AC_SUBST([PCIACCESS_LIBS])

AC_ARG_ENABLE([debug-level],
	      [AS_HELP_STRING([--enable-debug-level=LEVEL],
			      [select highest debug level to build support for
			       (fatal, error, warning, info, debug,
				trace, paranoia, spam) [default = debug]])],
	      [ debug=$enableval ],
	      [ debug=debug ])

AC_MSG_CHECKING([for maximum debug level to build])
if test "x$debug" = "xfatal"; then
	AC_DEFINE([CONFIG_NOUVEAU_DEBUG], [0])
elif test "x$debug" = "xerror"; then
	AC_DEFINE([CONFIG_NOUVEAU_DEBUG], [1])
elif test "x$debug" = "xwarning"; then
	AC_DEFINE([CONFIG_NOUVEAU_DEBUG], [2])
elif test "x$debug" = "xinfo"; then
	AC_DEFINE([CONFIG_NOUVEAU_DEBUG], [3])
elif test "x$debug" = "xdebug"; then
	AC_DEFINE([CONFIG_NOUVEAU_DEBUG], [4])
elif test "x$debug" = "xtrace"; then
	AC_DEFINE([CONFIG_NOUVEAU_DEBUG], [5])
elif test "x$debug" = "xparanoia"; then
	AC_DEFINE([CONFIG_NOUVEAU_DEBUG], [6])
elif test "x$debug" = "xspam"; then
	AC_DEFINE([CONFIG_NOUVEAU_DEBUG], [7])
else
	AC_MSG_ERROR([invalid debug level specified])
fi
AC_MSG_RESULT($debug)
AC_DEFINE([CONFIG_NOUVEAU_DEBUG_DEFAULT], [3])

AC_ARG_ENABLE([internal-bitbang],
	      [AS_HELP_STRING([--enable-internal-bitbang[[=default]]],
			      [enable use of internal i2c bit-banging algo ])],
	      [ bitbang=$enableval ],
	      [ bitbang=default ])

AC_MSG_CHECKING([whether to enable internal i2c bit-banging algo])
if test "x$bitbang" = "xdefault"; then
	AC_DEFINE([CONFIG_NOUVEAU_I2C_INTERNAL], [1])
	AC_DEFINE([CONFIG_NOUVEAU_I2C_INTERNAL_DEFAULT], [1])
	AC_MSG_RESULT([default])
elif test "x$bitbang" = "xyes"; then
	AC_DEFINE([CONFIG_NOUVEAU_I2C_INTERNAL], [1])
	AC_MSG_RESULT([yes])
else
	AC_MSG_RESULT([no])
fi

AC_OUTPUT( Makefile \
	   nvkm/Makefile \
	   nvkm/core/Makefile \
	   nvkm/subdev/Makefile \
	   nvkm/subdev/bar/Makefile \
	   nvkm/subdev/bios/Makefile \
	   nvkm/subdev/bus/Makefile \
	   nvkm/subdev/clock/Makefile \
	   nvkm/subdev/devinit/Makefile \
	   nvkm/subdev/fb/Makefile \
	   nvkm/subdev/gpio/Makefile \
	   nvkm/subdev/i2c/Makefile \
	   nvkm/subdev/ibus/Makefile \
	   nvkm/subdev/instmem/Makefile \
	   nvkm/subdev/ltcg/Makefile \
	   nvkm/subdev/mc/Makefile \
	   nvkm/subdev/mxm/Makefile \
	   nvkm/subdev/therm/Makefile \
	   nvkm/subdev/timer/Makefile \
	   nvkm/subdev/vm/Makefile \
	   nvkm/engine/Makefile \
	   nvkm/engine/bsp/Makefile \
	   nvkm/engine/copy/Makefile \
	   nvkm/engine/crypt/Makefile \
	   nvkm/engine/device/Makefile \
	   nvkm/engine/disp/Makefile \
	   nvkm/engine/dmaobj/Makefile \
	   nvkm/engine/fifo/Makefile \
	   nvkm/engine/graph/Makefile \
	   nvkm/engine/mpeg/Makefile \
	   nvkm/engine/ppp/Makefile \
	   nvkm/engine/software/Makefile \
	   nvkm/engine/vp/Makefile \
	   lib/Makefile \
	   bin/Makefile \
)