3 # global environment variables you may set:
4 # CACHE: absolute path to a global autoconf cache
5 # QUIET: hush the configure script noise
6 # CONFFLAGS: flags to pass to all configure scripts
9 if test x
"$NOQUIT" = x1
; then
10 echo "***** $1 failed on $2/$3"
17 if [ -n "$RESUME" ]; then
18 if [ "$RESUME" = "$1/$2" ]; then
20 # Resume build at this module
22 echo "Skipping $1 module component $2..."
26 echo "Building $1 module component $2..."
28 cd $1/$2 || failed
cd $1 $2
30 # Special configure flags for certain modules
33 if test "$1" = "xserver" && test -n "$MESAPATH"; then
34 MOD_SPECIFIC
="--with-mesa-source=${MESAPATH}"
36 if test "$1" = "lib" && test "$2" = "libX11" && test x
"$USE_XCB" = xNO
; then
37 MOD_SPECIFIC
="--with-xcb=no"
40 # Use "sh autogen.sh" since some scripts are not executable in CVS
41 sh autogen.sh
--prefix=${PREFIX} ${MOD_SPECIFIC} ${QUIET:+--quiet} \
42 ${CACHE:+--cache-file=}${CACHE} ${CONFFLAGS} || failed autogen
$1 $2
43 ${MAKE} || failed
make $1 $2
44 if test x
"$CLEAN" = x1
; then
45 ${MAKE} clean || failed clean
$1 $2
47 if test x
"$DIST" = x1
; then
48 ${MAKE} dist || failed dist
$1 $2
50 if test x
"$DISTCHECK" = x1
; then
51 ${MAKE} distcheck || failed distcheck
$1 $2
53 $SUDO env LD_LIBRARY_PATH
=$LD_LIBRARY_PATH ${MAKE} install || \
59 # protocol headers have no build order dependencies
61 build proto applewmproto
62 build proto bigreqsproto
63 build proto compositeproto
64 build proto damageproto
67 build proto fixesproto
68 build proto fontcacheproto
69 build proto fontsproto
71 build proto inputproto
74 build proto printproto
75 build proto randrproto
76 build proto recordproto
77 build proto renderproto
78 build proto resourceproto
79 build proto scrnsaverproto
81 build proto videoproto
82 build proto windowswmproto
84 build proto xcmiscproto
86 build proto xf86bigfontproto
87 build proto xf86dgaproto
88 build proto xf86driproto
89 build proto xf86miscproto
90 build proto xf86rushproto
91 build proto xf86vidmodeproto
92 build proto xineramaproto
93 if test x
"$USE_XCB" != xNO
; then
98 # bitmaps is needed for building apps, so has to be done separately first
99 # cursors depends on apps/xcursorgen
100 # xkbdata is obsolete - use xkbdesc from xkeyboard-config instead
107 # All protocol modules must be installed before the libs (okay, that's an
108 # overstatement, but all protocol modules should be installed anyway)
110 # the libraries have a dependency order:
111 # xtrans, Xau, Xdmcp before anything else
112 # fontenc before Xfont
115 # (X11 and SM) before Xt
116 # Xt before Xmu and Xpm
117 # Xext before any other extension library
118 # Xfixes before Xcomposite
119 # Xp before XprintUtil before XprintAppUtil
121 # If xcb is being used for libX11, it must be built before libX11, but after
128 if test x
"$USE_XCB" != xNO
; then
129 build xcb pthread-stubs
135 build lib libWindowsWM
149 build lib libXcomposite
155 build lib libXfontcache
158 build lib libXinerama
161 build lib libXprintUtil
162 build lib libXprintAppUtil
165 build lib libXScrnSaver
170 build lib libXxf86dga
171 build lib libXxf86misc
175 # Most apps depend at least on libX11.
177 # bdftopcf depends on libXfont
178 # mkfontscale depends on libfontenc and libfreetype
179 # mkfontdir depends on mkfontscale
181 # TODO: detailed breakdown of which apps require which libs
185 build app beforelight
198 build app mkfontscale
203 build app rendercheck
256 build app xphelloworld
257 build app xplsprinters
259 build app xprehashprinterlist
267 build app xsetpointer
277 # if test x"$USE_XCB" != xNO ; then
282 # The server requires at least the following libraries:
288 build_driver_input
() {
293 # Some drivers are only buildable on some OS'es
296 build driver xf86-input-aiptek
297 build driver xf86-input-evdev
298 build driver xf86-input-ur98
304 # And some drivers are only buildable on some CPUs.
306 i
*86* | amd64
* | x86
*64*)
307 build driver xf86-input-vmmouse
313 build driver xf86-input-acecad
314 build driver xf86-input-calcomp
315 build driver xf86-input-citron
316 build driver xf86-input-digitaledge
317 build driver xf86-input-dmc
318 build driver xf86-input-dynapro
319 build driver xf86-input-elo2300
320 build driver xf86-input-elographics
321 build driver xf86-input-fpit
322 build driver xf86-input-hyperpen
323 build driver xf86-input-jamstudio
324 build driver xf86-input-joystick
325 build driver xf86-input-keyboard
326 build driver xf86-input-magellan
327 build driver xf86-input-magictouch
328 build driver xf86-input-microtouch
329 build driver xf86-input-mouse
330 build driver xf86-input-mutouch
331 build driver xf86-input-palmax
332 build driver xf86-input-penmount
333 build driver xf86-input-spaceorb
334 build driver xf86-input-summa
335 build driver xf86-input-tek4957
336 build driver xf86-input-void
339 build_driver_video
() {
344 # Some drivers are only buildable on some OS'es
349 build driver xf86-video-sunffb
355 *NetBSD
* |
*OpenBSD
*)
356 build driver xf86-video-wsfb
357 build driver xf86-video-sunffb
360 build driver xf86-video-sisusb
361 build driver xf86-video-sunffb
362 build driver xf86-video-v4l
368 # Some drivers are only buildable on some architectures
371 build driver xf86-video-sunbw2
372 build driver xf86-video-suncg14
373 build driver xf86-video-suncg3
374 build driver xf86-video-suncg6
375 build driver xf86-video-sunleo
376 build driver xf86-video-suntcx
382 build driver xf86-video-apm
383 build driver xf86-video-ark
384 build driver xf86-video-ast
385 build driver xf86-video-ati
386 build driver xf86-video-chips
387 build driver xf86-video-cirrus
388 build driver xf86-video-cyrix
389 build driver xf86-video-dummy
390 build driver xf86-video-fbdev
391 # build driver xf86-video-glide
392 build driver xf86-video-glint
393 build driver xf86-video-i128
394 build driver xf86-video-i740
395 build driver xf86-video-intel
396 build driver xf86-video-imstt
397 build driver xf86-video-mga
398 build driver xf86-video-neomagic
399 build driver xf86-video-newport
400 build driver xf86-video-nsc
401 build driver xf86-video-nv
402 build driver xf86-video-rendition
403 build driver xf86-video-s3
404 build driver xf86-video-s3virge
405 build driver xf86-video-savage
406 build driver xf86-video-siliconmotion
407 build driver xf86-video-sis
408 build driver xf86-video-tdfx
409 build driver xf86-video-tga
410 build driver xf86-video-trident
411 build driver xf86-video-tseng
412 build driver xf86-video-vesa
413 build driver xf86-video-vga
414 build driver xf86-video-via
415 build driver xf86-video-vmware
416 build driver xf86-video-voodoo
419 # The server must be built before the drivers
425 # All fonts require mkfontscale and mkfontdir to be available
427 # The following fonts require bdftopcf to be available:
428 # adobe-100dpi, adobe-75dpi, adobe-utopia-100dpi, adobe-utopia-75dpi,
429 # arabic-misc, bh-100dpi, bh-75dpi, bh-lucidatypewriter-100dpi,
430 # bh-lucidatypewriter-75dpi, bitstream-100dpi, bitstream-75dpi,
431 # cronyx-cyrillic, cursor-misc, daewoo-misc, dec-misc, isas-misc,
432 # jis-misc, micro-misc, misc-cyrillic, misc-misc, mutt-misc,
433 # schumacher-misc, screen-cyrillic, sony-misc, sun-misc and
436 # Within the font module, the util component must be built before the
438 # adobe-100dpi, adobe-75dpi, adobe-utopia-100dpi, adobe-utopia-75dpi,
439 # bh-100dpi, bh-75dpi, bh-lucidatypewriter-100dpi, bh-lucidatypewriter-75dpi,
440 # misc-misc and schumacher-misc
442 # The alias component is recommended to be installed after the other fonts
443 # since the fonts.alias files reference specific fonts installed from the
444 # other font components
448 build font adobe-100dpi
449 build font adobe-75dpi
450 build font adobe-utopia-100dpi
451 build font adobe-utopia-75dpi
452 build font adobe-utopia-type1
453 build font arabic-misc
456 build font bh-lucidatypewriter-100dpi
457 build font bh-lucidatypewriter-75dpi
460 build font bitstream-100dpi
461 build font bitstream-75dpi
462 build font bitstream-speedo
463 build font bitstream-type1
464 build font cronyx-cyrillic
465 build font cursor-misc
466 build font daewoo-misc
471 build font micro-misc
472 build font misc-cyrillic
473 build font misc-ethiopic
474 build font misc-meltho
477 build font schumacher-misc
478 build font screen-cyrillic
481 build font winitzki-cyrillic
482 build font xfree86-type1
486 # makedepend requires xproto
490 build util makedepend
491 build util gccmakedep
495 # xorg-docs requires xorg-sgml-doctools
497 build doc xorg-sgml-doctools
502 echo "Usage: $0 [options] prefix"
503 echo " where options are:"
504 echo " -d : run make distcheck in addition to others"
505 echo " -D : run make dist in addition to others"
506 echo " -c : run make clean in addition to others"
507 echo " -m path-to-mesa-sources-for-xserver : full path to Mesa sources"
508 echo " -n : do not quit after error; just print error message"
509 echo " -s sudo-command : sudo command to use"
510 echo " -r module/component : resume building with this comonent"
513 # Process command line args
549 if test x
"${PREFIX}" = x
; then
554 # Must create local aclocal dir or aclocal fails
555 ACLOCAL_LOCALDIR
="${DESTDIR}${PREFIX}/share/aclocal"
556 $SUDO mkdir
-p ${ACLOCAL_LOCALDIR}
558 # The following is required to make aclocal find our .m4 macros
559 if test x
"$ACLOCAL" = x
; then
560 ACLOCAL
="aclocal -I ${ACLOCAL_LOCALDIR}"
562 ACLOCAL
="${ACLOCAL} -I ${ACLOCAL_LOCALDIR}"
566 # The following is required to make pkg-config find our .pc metadata files
567 if test x
"$PKG_CONFIG_PATH" = x
; then
568 PKG_CONFIG_PATH
=${DESTDIR}${PREFIX}/lib
/pkgconfig
570 PKG_CONFIG_PATH
=${DESTDIR}${PREFIX}/lib/pkgconfig:${PKG_CONFIG_PATH}
572 export PKG_CONFIG_PATH
574 # Set the library path so that locally built libs will be found by apps
575 if test x
"$LD_LIBRARY_PATH" = x
; then
576 LD_LIBRARY_PATH
=${DESTDIR}${PREFIX}/lib
578 LD_LIBRARY_PATH
=${DESTDIR}${PREFIX}/lib:${LD_LIBRARY_PATH}
580 export LD_LIBRARY_PATH
582 # Set the path so that locally built apps will be found and used
583 if test x
"$PATH" = x
; then
584 PATH
=${DESTDIR}${PREFIX}/bin
586 PATH
=${DESTDIR}${PREFIX}/bin:${PATH}
590 # Choose which make program to use
591 if test x
"$MAKE" = x
; then
595 # Set the default font path for xserver/xorg unless it's already set
596 if test x
"$FONTPATH" = x
; then
597 FONTPATH
="${PREFIX}/lib/X11/fonts/misc/,${PREFIX}/lib/X11/fonts/Type1/,${PREFIX}/lib/X11/fonts/75dpi/,${PREFIX}/lib/X11/fonts/100dpi/,${PREFIX}/lib/X11/fonts/cyrillic/,${PREFIX}/lib/X11/fonts/TTF/"
601 # Create the log file directory
602 $SUDO mkdir
-p ${DESTDIR}${PREFIX}/var
/log
606 # We must install the global macros before anything else