Add support for building Xdmx and Xvfb
[xorg-util-modular.git] / build.sh
blob36bfe3b9930fae6b03b9ae0630ba083967cdde64
1 #!/bin/sh
3 # global environment variables you may set:
4 # CACHE: absolute path to a global autoconf cache
5 # QUIET: hush the configure script noise
7 build() {
8 echo "Building $1 module component $2..."
9 cd $1/$2
11 # Use "sh autogen.sh" since some scripts are not executable in CVS
12 sh autogen.sh --prefix=${PREFIX} ${QUIET:+--quiet} \
13 ${CACHE:+--cache-file=}${CACHE}
14 # make
15 make install
16 # make clean
17 # make dist
18 # make distcheck
20 cd ../..
23 # protocol headers have no build order dependencies
24 build_proto() {
25 build proto BigReqs
26 build proto Composite
27 build proto Damage
28 build proto DMX
29 build proto EvIE
30 build proto Fixes
31 build proto Fontcache
32 build proto Fonts
33 build proto GL
34 build proto Input
35 build proto KB
36 build proto Panoramix
37 build proto Print
38 build proto Randr
39 build proto Record
40 build proto Render
41 build proto Resource
42 build proto ScrnSaver
43 build proto Trap
44 build proto Video
45 build proto X11
46 build proto XCMisc
47 build proto XExt
48 build proto XF86BigFont
49 build proto XF86DGA
50 build proto XF86DRI
51 build proto XF86Misc
52 build proto XF86Rush
53 build proto XF86VidMode
56 # All protocol modules must be installed before the libs (okay, that's an
57 # overstatement, but all protocol modules should be installed anyway)
59 # the libraries have a dependency order:
60 # xtrans, Xau, Xdmcp before anything else
61 # fontenc before Xfont
62 # ICE before SM
63 # X11 before Xext
64 # (X11 and SM) before Xt
65 # Xt before Xmu and Xpm
66 # Xext before any other extension library
67 # Xp before XprintUtil before XprintAppUtil
68 build_lib() {
69 build lib xtrans
70 build lib Xau
71 build lib Xdmcp
72 build lib X11
73 build lib Xext
74 build lib dmx
75 build lib fontenc
76 build lib FS
77 build lib ICE
78 build lib lbxutil
79 build lib oldX
80 build lib SM
81 build lib Xt
82 build lib Xmu
83 build lib Xpm
84 build lib Xp
85 build lib Xaw
86 build lib Xcomposite
87 build lib Xrender
88 build lib Xfixes
89 build lib Xdamage
90 build lib Xcursor
91 build lib Xevie
92 build lib Xfont
93 build lib Xfontcache
94 build lib Xi
95 build lib Xinerama
96 build lib xkbfile
97 build lib xkbui
98 build lib XprintUtil
99 build lib XprintAppUtil
100 build lib Xrandr
101 build lib XRes
102 build lib XScrnSaver
103 build lib XTrap
104 build lib Xtst
105 build lib Xv
106 build lib XvMC
107 build lib Xxf86dga
108 build lib Xxf86misc
109 build lib Xxf86vm
112 # Most apps depend at least on libX11.
114 # bdftopcf depends on libXfont
115 # mkfontscale depends on libfontenc and libfreetype
116 # mkfontdir depends on mkfontscale
118 # TODO: detailed breakdown of which apps require which libs
119 build_app() {
120 build app bdftopcf
121 build app mkfontscale
122 build app mkfontdir
125 # The server requires at least the following libraries:
126 # Xfont, Xau, Xdmcp
127 build_xserver() {
128 build
131 # The server must be built before the drivers
132 build_driver() {
133 build
136 # All fonts require mkfontscale and mkfontdir to be available
138 # The following fonts require bdftopcf to be available:
139 # adobe-100dpi, adobe-75dpi, adobe-utopia-100dpi, adobe-utopia-75dpi,
140 # arabic-misc, bh-100dpi, bh-75dpi, bh-lucidatypewriter-100dpi,
141 # bh-lucidatypewriter-75dpi, bitstream-100dpi, bitstream-75dpi,
142 # cronyx-cyrillic, cursor-misc, daewoo-misc, dec-misc, isas-misc,
143 # jis-misc, micro-misc, misc-cyrillic, misc-misc, mutt-misc,
144 # schumacher-misc, screen-cyrillic, sony-misc, sun-misc and
145 # winitzki-cyrillic
147 # Within the font module, the util component must be built before the
148 # following fonts:
149 # adobe-100dpi, adobe-75dpi, adobe-utopia-100dpi, adobe-utopia-75dpi,
150 # bh-100dpi, bh-75dpi, bh-lucidatypewriter-100dpi, bh-lucidatypewriter-75dpi,
151 # misc-misc and schumacher-misc
152 build_font() {
153 build font util
154 build font adobe-100dpi
155 build font adobe-75dpi
156 build font adobe-utopia-100dpi
157 build font adobe-utopia-75dpi
158 build font adobe-utopia-type1
159 build font arabic-misc
160 build font bh-100dpi
161 build font bh-75dpi
162 build font bh-lucidatypewriter-100dpi
163 build font bh-lucidatypewriter-75dpi
164 build font bh-ttf
165 build font bh-type1
166 build font bitstream-100dpi
167 build font bitstream-75dpi
168 build font bitstream-type1
169 build font cronyx-cyrillic
170 build font cursor-misc
171 build font daewoo-misc
172 build font dec-misc
173 build font ibm-type1
174 build font isas-misc
175 build font jis-misc
176 build font micro-misc
177 build font misc-cyrillic
178 build font misc-misc
179 build font mutt-misc
180 build font schumacher-misc
181 build font screen-cyrillic
182 build font sony-misc
183 build font sun-misc
184 build font winitzki-cyrillic
185 build font xfree86-type1
188 # TODO
189 build_doc() {
190 build
193 PREFIX=$1
195 if test "x${PREFIX}" = "x" ; then
196 echo "Usage: $0 prefix"
197 exit
200 # Must create local aclocal dir or aclocal fails
201 ACLOCAL_LOCALDIR="${PREFIX}/share/aclocal"
202 mkdir -p ${ACLOCAL_LOCALDIR}
204 # The following is required to make aclocal find our .m4 macros
205 if [ x"$ACLOCAL" = x ] ; then
206 ACLOCAL="aclocal -I ${ACLOCAL_LOCALDIR}"
207 else
208 ACLOCAL="${ACLOCAL} -I ${ACLOCAL_LOCALDIR}"
210 export ACLOCAL
212 # The following is required to make pkg-config find our .pc metadata files
213 if [ x"$PKG_CONFIG_PATH" = x ] ; then
214 PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig
215 else
216 PKG_CONFIG_PATH=${PREFIX}/lib/pkgconfig:${PKG_CONFIG_PATH}
218 export PKG_CONFIG_PATH
220 # Set the library path so that locally built libs will be found by apps
221 if [ x"$LD_LIBRARY_PATH" = x ] ; then
222 LD_LIBRARY_PATH=${PREFIX}/lib
223 else
224 LD_LIBRARY_PATH=${PREFIX}/lib:${LD_LIBRARY_PATH}
226 export LD_LIBRARY_PATH
228 # Set the path so that locally built apps will be found and used
229 if [ x"$PATH" = x ] ; then
230 PATH=${PREFIX}/bin
231 else
232 PATH=${PREFIX}/bin:${PATH}
234 export PATH
236 date
238 build_proto
239 build_lib
240 build_app
241 # build_xserver
242 # build_driver
243 build_font
244 # build_doc
246 date