summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSPIGOT <root@jerkcity.com>2010-11-02 04:21:14 (GMT)
committerSPIGOT <root@jerkcity.com>2010-11-02 04:21:14 (GMT)
commit231683e2f111bb064125f64f2da797d744cde7fa (patch)
tree80eeb89a3d078854ea44de516a3497bf5b785849
parent80ba041afc5f892c0a91e00746c6b364ddca7fa5 (diff)
PERHAPS BONGHITS WILL FIX MY MAKEFILEspigot
Signed-off-by: SPIGOT <root@jerkcity.com>
-rw-r--r--Makefile.am38
-rw-r--r--RadeonHD.am35
-rw-r--r--RadeonHD.tmpl39
-rwxr-xr-xautogen.sh12
-rw-r--r--configure.ac392
-rw-r--r--man/Makefile.am54
-rw-r--r--src/Makefile.am206
-rw-r--r--utils/conntest/Makefile.am44
8 files changed, 1 insertions, 819 deletions
diff --git a/Makefile.am b/Makefile.am
deleted file mode 100644
index 534c3fd..0000000
--- a/Makefile.am
+++ /dev/null
@@ -1,38 +0,0 @@
1# Copyright 2007 Luc Verhaegen <libv@exsuse.de>
2# Copyright 2007 Matthias Hopf <mhopf@novell.com>
3# Copyright 2007 Egbert Eich <eich@novell.com>
4# Copyright 2007 Advanced Micro Devices, Inc.
5#
6# Permission is hereby granted, free of charge, to any person obtaining a
7# copy of this software and associated documentation files (the "Software"),
8# to deal in the Software without restriction, including without limitation
9# the rights to use, copy, modify, merge, publish, distribute, sublicense,
10# and/or sell copies of the Software, and to permit persons to whom the
11# Software is furnished to do so, subject to the following conditions:
12#
13# The above copyright notice and this permission notice shall be included in
14# all copies or substantial portions of the 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 NONINFRINGEMENT. IN NO EVENT SHALL
19# THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
20# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22# OTHER DEALINGS IN THE SOFTWARE.
23
24AUTOMAKE_OPTIONS = foreign
25# src before man: src/ may update sources in man/
26SUBDIRS = src man utils/conntest
27
28EXTRA_DIST = RadeonHD.tmpl Imakefile git_version.sh ChangeLog INSTALL
29MAINTAINERCLEANFILES = ChangeLog
30
31.PHONY: ChangeLog
32
33# "git log" with the space should be available since git 1.3.0
34ChangeLog:
35 (GIT_DIR=$(top_srcdir)/.git git log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2)
36
37dist-hook: ChangeLog
38
diff --git a/RadeonHD.am b/RadeonHD.am
deleted file mode 100644
index 5c12cf6..0000000
--- a/RadeonHD.am
+++ /dev/null
@@ -1,35 +0,0 @@
1# Copyright (c) 2007 Hans Ulrich Niedermann <hun@n-dimensional.de>
2#
3# This Makefile fragment is free software; the author(s) give(s)
4# unlimited permission to copy, distribute and modify it.
5
6# The stamp file which is never created ensures that git_version.h is updated
7# before every build. Having git_version.h in foo_SOURCES ensures a recompile
8# of foo-bar.c if it is newer than the foo-bar.o file. Using noinst_foo_SOURCES
9# instead of foo_SOURCES prevents shipping git_version.h in dist tarballs,
10# which may cause false GIT_FOO readings.
11BUILT_SOURCES += git_version.stamp
12CLEANFILES += git_version.h
13GIT_VERSION_CMD = $(SHELL) $(top_srcdir)/git_version.sh
14git_version.stamp:
15 @if test -f "$(srcdir)/git_version.h"; then \
16 if test -f "git_version.h"; then :; \
17 else \
18 cp "$(srcdir)/git_version.h" "git_version.h"; \
19 fi; \
20 fi
21 $(GIT_VERSION_CMD) -k -s $(top_srcdir) -o git_version.h
22 @if test -s "$(srcdir)/git_version.h"; then \
23 if cmp "$(srcdir)/git_version.h" "git_version.h"; then :; \
24 else \
25 echo "Error: $(srcdir)/git_version.h and git_version.h differ."; \
26 echo " You probably want to remove the former."; \
27 exit 1; \
28 fi; \
29 fi
30
31dist-hook: git_version.stamp
32 if test -f "git_version.h"; then \
33 $(SED) -e 's|^#undef GIT_IS_DIST.*|#define GIT_IS_DIST 1|' \
34 "git_version.h" > "$(distdir)/git_version.h"; \
35 fi
diff --git a/RadeonHD.tmpl b/RadeonHD.tmpl
deleted file mode 100644
index 2b798e2..0000000
--- a/RadeonHD.tmpl
+++ /dev/null
@@ -1,39 +0,0 @@
1/* imake template for radeonhd driver -*- makefile -*- */
2
3/* Copyright (c) 2007 Hans Ulrich Niedermann <hun@n-dimensional.de>
4 *
5 * This Makefile fragment is free software; the author(s) give(s)
6 * unlimited permission to copy, distribute and modify it.
7 */
8
9VER_GREP = grep -A 4 AC_INIT $(TOP)/configure.ac
10VER_SED = sed -n '2s/[^0-9]*\([0-9][^,]*\).*/\1/p'
11VER_CUT = cut -d . -f
12PACKAGE_VERSION = `$(VER_GREP) | $(VER_SED)`
13PACKAGE_VERSION_MAJOR = `$(VER_GREP) | $(VER_SED) | $(VER_CUT) 1`
14PACKAGE_VERSION_MINOR = `$(VER_GREP) | $(VER_SED) | $(VER_CUT) 2`
15PACKAGE_VERSION_PATCHLEVEL = `$(VER_GREP) | $(VER_SED) | $(VER_CUT) 3`
16
17PACKAGE_NAME = xf86-video-radeonhd
18
19RHD_VERSION_DEFINES = \
20 -DPACKAGE_VERSION="\"$(PACKAGE_VERSION)\"" \
21 -DPACKAGE_VERSION_MAJOR="$(PACKAGE_VERSION_MAJOR)" \
22 -DPACKAGE_VERSION_MINOR="$(PACKAGE_VERSION_MINOR)" \
23 -DPACKAGE_VERSION_PATCHLEVEL="$(PACKAGE_VERSION_PATCHLEVEL)"
24
25
26/*
27 * The only way to make sure the git version check is run and git_version.h is
28 * updated before a compile. Creating a normal make rule cannot do that.
29 */
30GIT_VERSION_CMD = $(SHELL) $(TOP)/git_version.sh
31RHD_GIT_DEFINES = \
32 `$(GIT_VERSION_CMD) -q -k -s $(TOP) -o git_version.h`
33
34clean::
35 RemoveFile(git_version.h)
36 RemoveFile(git_version.h.new)
37
38/* vim: syntax=make
39 */
diff --git a/autogen.sh b/autogen.sh
index 5216615..2204f59 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,13 +1,3 @@
1#! /bin/sh 1#! /bin/sh
2 2
3srcdir=`dirname "$0"` 3echo "It's dead, Jim."
4test -z "$srcdir" && srcdir=.
5
6ORIGDIR=`pwd`
7cd "$srcdir"
8
9rm -rf autom4te.cache
10autoreconf --force -v --install || exit 1
11cd "$ORIGDIR" || exit $?
12
13"$srcdir"/configure --enable-maintainer-mode "$@"
diff --git a/configure.ac b/configure.ac
deleted file mode 100644
index 4a8fec1..0000000
--- a/configure.ac
+++ /dev/null
@@ -1,392 +0,0 @@
1# Process this file with autoconf to produce a configure script
2
3AC_PREREQ(2.57)
4AC_INIT([xf86-video-radeonhd],
5 1.3.0,
6 [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/radeonhd],
7 xf86-video-radeonhd)
8
9AC_CONFIG_SRCDIR([Makefile.am])
10AM_CONFIG_HEADER([config.h])
11AC_CONFIG_AUX_DIR(.)
12
13AM_INIT_AUTOMAKE([dist-bzip2])
14
15AM_MAINTAINER_MODE
16
17AC_CONFIG_FILES([shave shave-libtool])
18
19
20# Program checks.
21AC_DISABLE_STATIC
22AC_PROG_CC
23
24dnl Define SED var without requiring AC_PROG_SED (new in autoconf-2.59b)
25m4_ifdef([AC_PROG_SED], [AC_PROG_SED], [AC_SUBST([SED], [${SED-sed}])])
26
27AC_MSG_CHECKING([whether $SED can substitute tabs and newlines for text])
28dnl One tab, a letter and two newlines
29cat>sed-test.1<<EOF
30 y
31
32EOF
33echo x | sed 's/x/\ty\n/' > sed-test.2
34if cmp -s sed-test.1 sed-test.2; then
35 AC_MSG_RESULT([yes])
36else
37 AC_MSG_RESULT([no])
38fi
39AM_CONDITIONAL([HAVE_SED_WITH_REASONABLE_SUBSTITUTION], [cmp -s sed-test.1 sed-test.2])
40rm -f sed-test.1 sed-test.2
41
42CXX=no
43F77=no
44AC_PROG_LIBTOOL
45
46
47AH_TOP([#ifndef _CONFIG_H])
48AH_TOP([# define _CONFIG_H])
49AH_TOP([# include "xorg-server.h"])
50AH_BOTTOM([#endif])
51
52AC_ARG_WITH(xorg-module-dir,
53 AC_HELP_STRING([--with-xorg-module-dir=DIR],
54 [Default xorg module directory (default $libdir/xorg/modules)]),
55 [moduledir="$withval"],
56 [moduledir="$libdir/xorg/modules"])
57
58AC_ARG_ENABLE(exa,
59 AC_HELP_STRING([--disable-exa],
60 [Disable EXA support (default enabled)]),
61 [EXA="$enableval"],
62 [EXA=yes])
63
64AC_ARG_ENABLE(dri,
65 AC_HELP_STRING([--disable-dri],
66 [Disable DRI support (default enabled)]),
67 [DRI="$enableval"],
68 [DRI=yes])
69
70# Extensions checks.
71m4_pattern_forbid([XORG_DRIVER_CHECK_EXT])dnl
72XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
73XORG_DRIVER_CHECK_EXT(RENDER, renderproto)
74XORG_DRIVER_CHECK_EXT(XV, videoproto)
75XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto)
76# @@@@ We don't do DGA any more
77
78# pkg-config packages checks
79# @@@@ need to check for the right server version once RandR 1.2 is in.
80# @@@ do we really need fontsproto here?
81PKG_CHECK_MODULES(XORG, [xorg-server xproto fontsproto $REQUIRED_MODULES])
82PKG_CHECK_MODULES(XEXT, [xextproto >= 7.0.99.1],
83 HAVE_XEXTPROTO_71="yes"; AC_DEFINE(HAVE_XEXTPROTO_71, 1, [xextproto 7.1 available]),
84 HAVE_XEXTPROTO_71="no")
85AM_CONDITIONAL(HAVE_XEXTPROTO_71, [ test "$HAVE_XEXTPROTO_71" = "yes" ])
86sdkdir=$(pkg-config --variable=sdkdir xorg-server)
87
88
89# Header files checks.
90AC_HEADER_STDC
91
92PKG_CHECK_MODULES(PCIUTILS, libpci,,
93 [AC_MSG_WARN([libpci not registered in pkgconfig, will guess instead])
94 test "x$PCIUTILS_CFLAGS$PCIUTILS_LIBS" = "x" && PCIUTILS_LIBS="-lpci -lz"
95])
96
97SAVED_CPPFLAGS="$CPPFLAGS"
98SAVED_CFLAGS="$CFLAGS"
99CFLAGS="$CFLAGS $PCIUTILS_CFLAGS"
100CPPFLAGS="$CPPFLAGS $PCIUTILS_CFLAGS"
101AC_CHECK_HEADER([pci/pci.h],
102 [AC_DEFINE([HAVE_PCI_PCI_H], [1],
103 [Define to 1 if you have <pci/pci.h>.])
104 have_pci_pci_h=yes],
105 [AC_MSG_WARN([Caution: Will not compile rhd_conntest without pciutils headers.])])
106AM_CONDITIONAL([HAVE_PCI_PCI_H], [test "x$have_pci_pci_h" = "xyes"])
107
108# Properly handle EXA.
109CPPFLAGS="$SAVED_CPPFLAGS $XORG_CFLAGS"
110CFLAGS="$SAVED_CFLAGS"
111
112AC_CHECK_DECL(XSERVER_LIBPCIACCESS,
113 [XSERVER_LIBPCIACCESS=yes],[XSERVER_LIBPCIACCESS=no],
114 [#include "xorg-server.h"])
115if test "x$XSERVER_LIBPCIACCESS" = xyes; then
116 PKG_CHECK_MODULES([PCIACCESS], [pciaccess])
117 XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS"
118fi
119AM_CONDITIONAL(XSERVER_LIBPCIACCESS, test "x$XSERVER_LIBPCIACCESS" = xyes)
120
121# basic exa check.
122AC_MSG_CHECKING([whether to enable EXA support])
123if test "x$EXA" = xyes; then
124 AC_MSG_RESULT(yes)
125 AC_CHECK_HEADER(exa.h,
126 [have_exa_h="yes"], [have_exa_h="no"])
127else
128 AC_MSG_RESULT(no)
129fi
130
131# exa version check.
132if test "x$have_exa_h" = xyes; then
133 AC_MSG_CHECKING([whether EXA version is at least 2.0.0])
134 AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
135#include "exa.h"
136#if EXA_VERSION_MAJOR < 2
137#error OLD EXA!
138#endif
139 ]])],
140 [USE_EXA=yes],
141 [USE_EXA=no])
142 AC_MSG_RESULT($USE_EXA)
143
144 if test "x$USE_EXA" = xyes; then
145 AC_DEFINE(USE_EXA, 1, [Build support for Exa])
146 fi
147fi
148
149AM_CONDITIONAL(USE_EXA, test "x$USE_EXA" = xyes)
150
151# Handle RandR1.2
152AC_CHECK_HEADER(xf86RandR12.h, [have_randr12="yes"], [have_randr12="no"], [#include <xf86.h>])
153if test "x$have_randr12" = xyes; then
154 AC_DEFINE(RANDR_12_SUPPORT, 1, [Build RandR 1.2 Support])
155fi
156
157AC_MSG_CHECKING([whether to enable RandR1.2 support])
158AC_MSG_RESULT($have_randr12)
159
160# Handle DRI
161CPPFLAGS="$SAVED_CPPFLAGS $XORG_CFLAGS"
162CFLAGS="$SAVED_CFLAGS $XORG_CFLAGS"
163
164# basic dri check.
165USE_DRI=no
166if test "x$DRI" = xyes; then
167 USE_DRI="yes"
168 AC_CHECK_DECL(XF86DRI,, [USE_DRI=no], [#include <xorg-server.h>])
169 XORG_CFLAGS="$XORG_CFLAGS $DRI_CFLAGS"
170 PKG_CHECK_MODULES(DRI, [libdrm >= 2.2 xf86driproto glproto],, [USE_DRI=no])
171fi
172
173AC_MSG_CHECKING([whether to enable DRI support])
174AC_MSG_RESULT($USE_DRI)
175AM_CONDITIONAL(USE_DRI, test "x$USE_DRI" = xyes)
176
177if test "x$USE_DRI" = "xyes"; then
178 AC_DEFINE(USE_DRI, 1, [Build support for DRI])
179 CFLAGS="$CFLAGS $DRI_CFLAGS"
180 CPPFLAGS="$CPPFLAGS $DRI_CFLAGS"
181 AC_CHECK_HEADER([xf86drmMode.h],
182 [AC_DEFINE([HAVE_XF86DRMMODE_H], [1],
183 [Define to 1 if you have xf86drmMode.h])])
184fi
185
186AC_CHECK_FILE([${sdkdir}/damage.h],
187 [AC_DEFINE(DAMAGE,1,[Use Damage extension])], [])
188
189# check for xf86_ansic.h
190CFLAGS="$SAVED_CFLAGS"
191CPPFLAGS="$SAVED_CPPFLAGS"
192
193AC_CHECK_HEADER([${sdkdir}/xf86_ansic.h],
194 [AC_DEFINE([HAVE_XF86_ANSIC_H], [1],
195 [Define to 1 if you have <${sdkdir}/xf86_ansic.h>.])
196 have_xf86_ansic_h=yes])
197AM_CONDITIONAL([HAVE_XF86_ANSIC_H], [test "x$have_xf86_ansic_h" = "xyes"])
198
199SAVED_CFLAGS="$CFLAGS"
200CFLAGS="$CFLAGS $XORG_CFLAGS"
201
202# Check whether MonRec has a reducedblanking member.
203AC_CHECK_MEMBER([MonRec.reducedblanking],
204 [MONREC_HAS_REDUCED=yes], [MONREC_HAS_REDUCED=no],
205 [#include "${sdkdir}/xf86.h"])
206if test "x$MONREC_HAS_REDUCED" = xyes; then
207 AC_DEFINE(MONREC_HAS_REDUCED, 1, [MonRec has member reducedblanking])
208fi
209
210# Check whether MonRec has a maxPixClock member.
211AC_CHECK_MEMBER([MonRec.maxPixClock],
212 [MONREC_HAS_BANDWIDTH=yes], [MONREC_HAS_BANDWIDTH=no],
213 [#include "${sdkdir}/xf86.h"])
214if test "x$MONREC_HAS_BANDWIDTH" = xyes; then
215 AC_DEFINE(MONREC_HAS_BANDWIDTH, 1, [MonRec has member maxPixClock])
216fi
217
218# Check whether xf86CrtcFuncsRec has a set_mode_major member.
219AC_CHECK_MEMBER([xf86CrtcFuncsRec.set_mode_major],
220 [XF86CRTCFUNCS_HAS_SETMODEMAJOR=yes], [XF86CRTCFUNCS_HAS_SETMODEMAJOR=no],
221 [#include "${sdkdir}/xorg-server.h"
222#include "${sdkdir}/xf86.h"
223#include "${sdkdir}/xf86Crtc.h"])
224if test "x$XF86CRTCFUNCS_HAS_SETMODEMAJOR" = xyes; then
225 AC_DEFINE(XF86CRTCFUNCS_HAS_SETMODEMAJOR, 1, [xf86CrtcFuncsRec has member set_mode_major])
226fi
227
228AC_CHECK_DECL(xf86RotateFreeShadow,
229 [AC_DEFINE(HAVE_FREE_SHADOW, 1, [have RotateFreeShadow API])],
230 [],
231 [#include <xorg-server.h>
232 #include <windowstr.h>
233 #include <xf86Crtc.h>])
234
235AC_CHECK_DECL(pci_device_enable,
236 [AC_DEFINE(HAVE_PCI_DEVICE_ENABLE, 1, [Have pci_device_enable prototype])],
237 [],
238 [#include <pciaccess.h>])
239
240CFLAGS="$SAVED_CFLAGS"
241
242AC_ARG_ENABLE(atombios, AC_HELP_STRING([--disable-atombios],
243 [Disable AtomBIOS support [[default=no]]]),
244 [do_atombios="$enableval"],
245 [do_atombios=yes])
246
247AC_ARG_ENABLE(atombios-parser, AC_HELP_STRING([--disable-atombios-parser],
248 [Disable AtomBIOS parser support [[default=no]]]),
249 [do_atombios_parser="$enableval"],
250 [do_atombios_parser=yes])
251
252AC_CHECK_FILE([${srcdir}/src/AtomBios/includes/atombios.h],
253 [have_atombios_h="yes"], [have_atombios_h="no"])
254
255AC_CHECK_FILE([${srcdir}/src/AtomBios/includes/Decoder.h],
256 [have_atombios_parser="yes"], [have_atombios_parser="no"])
257
258AC_MSG_CHECKING([whether to include AtomBIOS])
259if test "$have_atombios_h" = yes -a \
260 "$do_atombios" = yes; then
261 support_atombios="yes"
262 AC_DEFINE(ATOM_BIOS, 1, [Add support for AtomBIOS tables])
263else
264 support_atombios="no"
265fi
266
267AC_MSG_RESULT([$support_atombios])
268
269AC_MSG_CHECKING([whether to include AtomBIOS parser])
270if test "$support_atombios" = yes -a \
271 "$do_atombios_parser" = yes -a \
272 "$have_atombios_parser" = yes; then
273 support_atombios_parser="yes"
274 AC_DEFINE(ATOM_BIOS_PARSER, 1, [Add support for AtomBIOS code])
275else
276 support_atombios_parser="no"
277fi
278
279AC_MSG_RESULT([$support_atombios_parser])
280
281AM_CONDITIONAL(ATOM_BIOS, test x$support_atombios = xyes)
282
283AM_CONDITIONAL(ATOM_BIOS_PARSER, test x$support_atombios_parser = xyes)
284
285# libraries checks.
286AC_CHECK_LIB([z], [gzopen], [have_zlib=yes], [have_zlib=no])
287AM_CONDITIONAL([HAVE_ZLIB], [test "x$have_zlib" = "xyes"])
288
289# compiler flags
290
291dnl AC_PROG_CC_FLAG(flag,action-if-found,action-if-not-found)
292AC_DEFUN([AC_PROG_CC_FLAG],[
293 AC_LANG_CONFTEST([AC_LANG_PROGRAM([[]])])
294 AC_MSG_CHECKING([whether $CC supports $1])
295 if $CC $1 -c -o /dev/null conftest.c >/dev/null 2>&1 ; then
296 AC_MSG_RESULT([yes])
297 $2
298 else
299 AC_MSG_RESULT([no])
300 $3
301 fi
302])
303
304# Extra Warnings
305# Due to xorg/os.h: -Wno-variadic-macros
306# For testing: make CFLAGS="-O2 -Wshadow -Wunreachable-code -fno-inline-functions"
307WARN_CFLAGS=""
308for w in \
309 -Wall \
310 -Wextra -Wno-unused-parameter \
311 -Werror-implicit-function-declaration \
312 -Wstrict-aliasing -Wstrict-overflow \
313 -Wpointer-arith -Woverlength-strings -Wvolatile-register-var \
314 -Winit-self -Wbad-function-cast \
315 -Wstrict-prototypes -Wold-style-definition \
316 -Wnested-externs -Wdisabled-optimization \
317 -Wno-unknown-pragmas ;
318do
319 AC_PROG_CC_FLAG($w,[WARN_CFLAGS="$WARN_CFLAGS $w"],)
320done
321
322# atombios.h prohibits -std=c99 due to unnamed unions
323PEDANTIC_CFLAGS=""
324for w in -Wno-long-long -Wno-variadic-macros ; do
325 AC_PROG_CC_FLAG($w,[PEDANTIC_CFLAGS="$PEDANTIC_CFLAGS $w"],)
326done
327
328# AtomBios special flags
329ATOMBIOS_CFLAGS=""
330for w in -Wno-unknown-pragmas ; do
331 AC_PROG_CC_FLAG($w,[ATOMBIOS_CFLAGS="$ATOMBIOS_CFLAGS $w"],)
332done
333
334# Optimizations
335case "x$CFLAGS" in
336dnl Automake needs extra escaping
337 [*-O[2-9]*)]
338 AC_MSG_NOTICE([Doing optimized build, checking for additional options])
339 for w in -finline-functions ; do
340 AC_PROG_CC_FLAG($w,[CFLAGS="$CFLAGS -finline-functions"],)
341 done
342 ;;
343esac
344
345# Substitute
346
347AC_SUBST([PCIUTILS_CFLAGS])
348AC_SUBST([PCIUTILS_LIBS])
349AC_SUBST([XORG_CFLAGS])
350AC_SUBST([DRI_CFLAGS])
351AC_SUBST([WARN_CFLAGS])
352AC_SUBST([PEDANTIC_CFLAGS])
353AC_SUBST([ATOMBIOS_CFLAGS])
354AC_SUBST([RANDR_VERSION],[`pkg-config --modversion randrproto`])
355AC_SUBST([moduledir])
356
357DRIVER_NAME=radeonhd
358AC_SUBST([DRIVER_NAME])
359
360m4_pattern_forbid([XORG_MANPAGE_SECTIONS])dnl
361XORG_MANPAGE_SECTIONS
362m4_pattern_forbid([XORG_RELEASE_VERSION])dnl
363XORG_RELEASE_VERSION
364
365dnl These are also defined in XORG_RELEASE_VERSION since 2006-11-30.
366dnl So we check whether XORG_RELEASE_VERSION has already done this
367dnl for us.
368if test "x$PVM$PVP" = "x"; then
369AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
370 [$(echo $PACKAGE_VERSION | cut -d . -f 1)],
371 [Major Version])
372AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
373 [$(echo $PACKAGE_VERSION | cut -d . -f 2)],
374 [Minor Version])
375AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
376 [$(echo $PACKAGE_VERSION | cut -d . -f 3)],
377 [Patchlevel Version])
378fi
379
380SHAVE_INIT(.,enable)
381
382AC_OUTPUT([
383 Makefile
384 man/Makefile
385 src/Makefile
386 utils/conntest/Makefile
387])
388if test "x$USE_DRI" != xyes ; then
389 echo ""
390 echo "NOTE: DRI support is disabled"
391 echo ""
392fi
diff --git a/man/Makefile.am b/man/Makefile.am
deleted file mode 100644
index 38c5643..0000000
--- a/man/Makefile.am
+++ /dev/null
@@ -1,54 +0,0 @@
1# $Id$
2#
3# Copyright 2005 Sun Microsystems, Inc. All rights reserved.
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# the rights to use, copy, modify, merge, publish, distribute, sublicense,
9# and/or sell copies of the Software, and to permit persons to whom the
10# 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 NONINFRINGEMENT. IN NO EVENT SHALL
19# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22# DEALINGS IN THE SOFTWARE.
23#
24
25drivermandir = $(DRIVER_MAN_DIR)
26
27driverman_PRE = @DRIVER_NAME@.man
28
29driverman_DATA = $(driverman_PRE:man=@DRIVER_MAN_SUFFIX@)
30
31EXTRA_DIST = @DRIVER_NAME@.man Imakefile
32
33CLEANFILES = $(driverman_DATA)
34
35# Strings to replace in man pages
36XORGRELSTRING = @PACKAGE_STRING@
37 XORGMANNAME = X Version 11
38
39MAN_SUBSTS = \
40 -e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
41 -e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \
42 -e 's|__xservername__|Xorg|g' \
43 -e 's|__xconfigfile__|xorg.conf|g' \
44 -e 's|__projectroot__|$(prefix)|g' \
45 -e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \
46 -e 's|__drivermansuffix__|$(DRIVER_MAN_SUFFIX)|g' \
47 -e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \
48 -e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \
49 -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g'
50
51SUFFIXES = .$(DRIVER_MAN_SUFFIX) .man
52
53.man.$(DRIVER_MAN_SUFFIX):
54 sed $(MAN_SUBSTS) < $< > $@
diff --git a/src/Makefile.am b/src/Makefile.am
deleted file mode 100644
index 49429f9..0000000
--- a/src/Makefile.am
+++ /dev/null
@@ -1,206 +0,0 @@
1BUILT_SOURCES =
2CLEANFILES =
3include $(top_srcdir)/RadeonHD.am
4
5EXTRA_DIST = Imakefile
6
7AM_CFLAGS = @XORG_CFLAGS@ @DRI_CFLAGS@ @WARN_CFLAGS@
8
9driversdir = ${moduledir}/drivers
10drivers_LTLIBRARIES = radeonhd_drv.la
11
12radeonhd_drv_la_LDFLAGS = -module -avoid-version
13radeonhd_drv_la_CFLAGS = $(AM_CFLAGS) @PEDANTIC_CFLAGS@
14radeonhd_drv_la_LIBADD =
15
16if XSERVER_LIBPCIACCESS
17radeonhd_drv_la_LIBADD += @PCIACCESS_LIBS@
18endif
19
20radeonhd_drv_la_SOURCES = \
21 atombios_rev.h \
22 r5xx_3dregs.h \
23 r5xx_accel.c \
24 r5xx_accel.h \
25 r5xx_regs.h \
26 r5xx_xaa.c \
27 r600_reg.h \
28 r600_reg_auto_r6xx.h \
29 r600_reg_r6xx.h \
30 r600_reg_r7xx.h \
31 r600_shader.h \
32 r600_shader.c \
33 r600_state.h \
34 radeon_3d.c \
35 radeon_textured_videofuncs.c \
36 rhd_atombios.c \
37 rhd_atombios.h \
38 rhd_atomcrtc.c \
39 rhd_atomout.c \
40 rhd_atomout.h \
41 rhd_atompll.c \
42 rhd_audio.c \
43 rhd_audio.h \
44 rhd_biosscratch.c \
45 rhd_biosscratch.h \
46 rhd_card.h \
47 rhd_connector.c \
48 rhd_connector.h \
49 rhd_crtc.c \
50 rhd_crtc.h \
51 rhd_cs.c \
52 rhd_cs.h \
53 rhd_cursor.c \
54 rhd_cursor.h \
55 rhd_dac.c \
56 rhd_ddia.c \
57 rhd_dig.c \
58 rhd_driver.c \
59 rhd_edid.c \
60 rhd.h \
61 rhd_hdmi.c \
62 rhd_hdmi.h \
63 rhd_helper.c \
64 rhd_i2c.c \
65 rhd_i2c.h \
66 rhd_id.c \
67 rhd_lut.c \
68 rhd_lut.h \
69 rhd_lvtma.c \
70 rhd_mc.c \
71 rhd_mc.h \
72 rhd_modes.c \
73 rhd_modes.h \
74 rhd_monitor.c \
75 rhd_monitor.h \
76 rhd_output.c \
77 rhd_output.h \
78 rhd_pll.c \
79 rhd_pll.h \
80 rhd_pm.c \
81 rhd_pm.h \
82 rhd_randr.c \
83 rhd_randr.h \
84 rhd_regs.h \
85 rhd_shadow.c \
86 rhd_shadow.h \
87 rhd_tmds.c \
88 rhd_vga.c \
89 rhd_vga.h \
90 rhd_video.c \
91 rhd_video.h \
92 rhd_acpi.c \
93 rhd_acpi.h
94
95nodist_radeonhd_drv_la_SOURCES = \
96 git_version.h
97
98if USE_EXA
99radeonhd_drv_la_SOURCES += r5xx_exa.c radeon_exa_render.c
100endif
101
102if USE_DRI
103radeonhd_drv_la_SOURCES += rhd_dri.c rhd_dri.h radeon_dri.h radeon_drm.h
104radeonhd_drv_la_SOURCES += r6xx_accel.c r6xx_accel.h
105radeonhd_drv_la_SOURCES += r600_exa.c r600_textured_videofuncs.c
106radeonhd_drv_la_LIBADD += @DRI_LIBS@
107endif
108
109if ATOM_BIOS
110radeonhd_drv_la_SOURCES += \
111 AtomBios/includes/atombios.h
112
113INCLUDES = -I$(srcdir)/AtomBios/includes
114
115endif
116
117if ATOM_BIOS_PARSER
118radeonhd_drv_la_SOURCES += \
119 rhd_atomwrapper.h
120endif
121
122if ATOM_BIOS_PARSER
123
124noinst_LTLIBRARIES = libatom.la
125libatom_la_CFLAGS = $(AM_CFLAGS) @ATOMBIOS_CFLAGS@ -DDRIVER_PARSER -DDISABLE_EASF -DENABLE_ALL_SERVICE_FUNCTIONS
126# libatom_la_LDFLAGS = -module -avoid-version
127
128libatom_la_SOURCES = \
129 rhd_atomwrapper.c \
130 rhd_atomwrapper.h \
131 AtomBios/CD_Operations.c \
132 AtomBios/Decoder.c \
133 AtomBios/hwserv_drv.c \
134 AtomBios/includes/atombios.h \
135 AtomBios/includes/CD_binding.h \
136 AtomBios/includes/CD_Common_Types.h \
137 AtomBios/includes/CD_Definitions.h \
138 AtomBios/includes/CD_hw_services.h \
139 AtomBios/includes/CD_Opcodes.h \
140 AtomBios/includes/CD_Structs.h \
141 AtomBios/includes/Decoder.h \
142 AtomBios/includes/ObjectID.h \
143 AtomBios/includes/regsdef.h
144
145radeonhd_drv_la_LIBADD += libatom.la
146
147endif
148
149if MAINTAINER_MODE
150if HAVE_SED_WITH_REASONABLE_SUBSTITUTION
151SRCMAN = $(top_srcdir)/man/radeonhd.man
152CLEANFILES += radeonhd.man.new
153radeonhd.man.new: rhd_id.c $(SRCMAN)
154 $(Q)( $(SED) -n '1,/^\.\\" START_DEVICE_LIST marker - do not delete/p' "$(SRCMAN)"; \
155 $(SED) -e '1,/^[ ]*\/\* START_DEVICE_LIST marker - do not delete \*\/ *$$/d' \
156 -e '/^[ ]*\/\* END_DEVICE_LIST marker - do not delete \*\/ *$$/,$$d' \
157 -e '/^[ ]\{1,\}xf86Msg(X_NONE,/d' \
158 -e '/^[ ]\{1,\}\/\*/d' \
159 -e 's/^[ ]\{1,\}"\\t\([A-Z0-9]\{1,\}\) \{1,\}: \(.*;\)\\n"$$/.TP 8\n.B \1\n\2/' \
160 -e 's/^[ ]\{1,\}"\\t\\t\(.*\)\.\\n"\();\)\{0,1\}$$/\1/' \
161 -e 's/^[ ]\{1,\}"\\t\([A-Z0-9]\{1,\}\) \{1,\}: \(.*\)\.\\n"\();\)\{0,1\}$$/.TP 8\n.B \1\n\2/' \
162 "$(srcdir)/rhd_id.c"; \
163 $(SED) -n '/^\.\\" END_DEVICE_LIST marker - do not delete/,$$p' "$(SRCMAN)" \
164 ) > radeonhd.man.new
165
166SRCREADME = $(top_srcdir)/README
167CLEANFILES += README.new
168README.new: rhd_id.c $(top_srcdir)/README
169 $(Q)( $(SED) -n '1,/^BEGIN_DEVICE_LIST$$/p' "$(SRCREADME)"; \
170 $(SED) -e '1,/^[ ]*\/\* START_DEVICE_LIST marker - do not delete \*\/ *$$/d' \
171 -e '/^[ ]*\/\* END_DEVICE_LIST marker - do not delete \*\/ *$$/,$$d' \
172 -e '/^[ ]\{1,\}xf86Msg(X_NONE,/d' \
173 -e '/^[ ]\{1,\}\/\*/d' \
174 -e 's/^[ ]\{1,\}"\\t\([A-Z0-9]\{1,\}\) \{1,\}: \(.*;\)\\n"$$/ * \1:\t\2/' \
175 -e 's/^[ ]\{1,\}"\\t\\t\(.*\)\.\\n"\();\)\{0,1\}$$/ \t\1/' \
176 -e 's/^[ ]\{1,\}"\\t\([A-Z0-9]\{1,\}\) \{1,\}: \(.*\)\.\\n"\();\)\{0,1\}$$/ * \1:\t\2/' \
177 "$(srcdir)/rhd_id.c"; \
178 $(SED) -n '/^END_DEVICE_LIST$$/,$$p' "$(SRCREADME)" \
179 ) > README.new
180
181# Update man page and README from rhd_id.c RHDIdentify() output.
182# The exit(1) makes sure the updates do not go unnoticed.
183all-local: radeonhd.man.new README.new
184 @changed=""; \
185 if diff -u "$(SRCMAN)" radeonhd.man.new; then \
186 if test "x$(Q)" = "x@"; then :; else echo "radeon(4) man page is current."; fi \
187 else \
188 changed="$$changed $(SRCMAN)"; \
189 mv -f radeonhd.man.new "$(SRCMAN)"; \
190 fi; \
191 if diff -u "$(SRCREADME)" README.new; then \
192 if test "x$(Q)" = "x@"; then :; else echo "README file is current."; fi \
193 else \
194 changed="$$changed $(SRCREADME)"; \
195 mv -f README.new "$(SRCREADME)"; \
196 fi; \
197 if test "x$$changed" = "x"; then :; else \
198 echo "WARNING: Due to changes to src/rhd_id.c, some files differ from the original ones."; \
199 echo " Please verify the changes to the following files"; \
200 for f in $$changed; do echo " $$f"; done; \
201 echo " and commit them together with your changes to"; \
202 echo " $(srcdir)/rhd_id.c"; \
203 exit 1; \
204 fi
205endif
206endif
diff --git a/utils/conntest/Makefile.am b/utils/conntest/Makefile.am
deleted file mode 100644
index 48fafbe..0000000
--- a/utils/conntest/Makefile.am
+++ /dev/null
@@ -1,44 +0,0 @@
1BUILT_SOURCES =
2CLEANFILES =
3include $(top_srcdir)/RadeonHD.am
4
5EXTRA_DIST = README Imakefile
6
7EXTRA_PROGRAMS = rhd_conntest rhd_dump
8
9if XSERVER_LIBPCIACCESS
10noinst_PROGRAMS = rhd_conntest rhd_dump
11endif
12
13if HAVE_PCI_PCI_H
14if HAVE_ZLIB
15noinst_PROGRAMS = rhd_conntest rhd_dump
16endif
17endif
18
19all-local:
20 @if test "x$(noinst_PROGRAMS)" = "x"; then \
21 echo "WARNING: Cannot build the rhd_conntest program due to missing dependencies."; \
22 echo " *IF* you want to build rhd_conntest, install development packages of"; \
23 echo " both pciutils and zlib/libz and re-run the configure (or autogen) script."; \
24 fi
25
26# Including config.h requires xorg-config.h, so we need the XORG_CFLAGS here
27AM_CFLAGS = @XORG_CFLAGS@ @WARN_CFLAGS@ @PCIUTILS_CFLAGS@
28AM_CPPFLAGS = -I$(top_srcdir)/src/AtomBios/includes
29
30rhd_conntest_SOURCES = rhd_conntest.c
31nodist_rhd_conntest_SOURCES = git_version.h
32if XSERVER_LIBPCIACCESS
33rhd_conntest_LDADD = @PCIACCESS_LIBS@
34else
35rhd_conntest_LDADD = @PCIUTILS_LIBS@
36endif
37
38rhd_dump_SOURCES = rhd_dump.c
39nodist_rhd_dump_SOURCES = git_version.h
40if XSERVER_LIBPCIACCESS
41rhd_dump_LDADD = @PCIACCESS_LIBS@
42else
43rhd_dump_LDADD = @PCIUTILS_LIBS@
44endif