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 test "$USEMODULEDIRS" = "yes" && cd $1
19 TARBALL
=`ls -1rt $2-*.tar.$COMPRESSION 2> /dev/null | tail -1`
21 if test x
"$TARBALL" = x
; then
22 echo "WARNING: $2 does not exist -- skipping"
23 test "$USEMODULEDIRS" = "yes" && cd ..
26 TARDIR
=`echo $TARBALL | sed "s,.tar.$COMPRESSION,,"`
28 echo "Building $1 module component $TARDIR..."
41 if test "$1" = "xserver" && test "$2" = "xorg-server" && test -n "$MESAPATH"; then
42 MESA
=-"-with-mesa-source=${MESAPATH}"
47 eval sh configure
--prefix=${PREFIX} ${MESA} ${QUIET:+--quiet} \
48 ${CACHE:+--cache-file=}${CACHE} ${CONFFLAGS} || failed configure
$1 $2
49 make || failed
make $1 $2
50 if test x
"$CLEAN" = x1
; then
51 make clean || failed clean
$1 $2
53 if test x
"$DIST" = x1
; then
54 make dist || failed dist
$1 $2
56 if test x
"$DISTCHECK" = x1
; then
57 make distcheck || failed distcheck
$1 $2
59 $SUDO env LD_LIBRARY_PATH
=$LD_LIBRARY_PATH make install || \
63 test "$USEMODULEDIRS" = "yes" && cd ..
66 # protocol headers have no build order dependencies
68 build proto applewmproto
69 build proto bigreqsproto
70 build proto compositeproto
71 build proto damageproto
74 build proto fixesproto
75 build proto fontcacheproto
76 build proto fontsproto
78 build proto inputproto
80 build proto printproto
81 build proto randrproto
82 build proto recordproto
83 build proto renderproto
84 build proto resourceproto
85 build proto scrnsaverproto
87 build proto videoproto
88 build proto windowswmproto
89 build proto xcmiscproto
91 build proto xf86bigfontproto
92 build proto xf86dgaproto
93 build proto xf86driproto
94 build proto xf86miscproto
95 build proto xf86rushproto
96 build proto xf86vidmodeproto
97 build proto xineramaproto
99 build proto xproxymanagementprotocol
102 # bitmaps is needed for building apps, so has to be done separately first
103 # cursors depends on apps/xcursorgen
104 # xkbdata depends on apps/xkbcomp
106 # build data xbitmaps
107 build data xcursor-themes
111 # All protocol modules must be installed before the libs (okay, that's an
112 # overstatement, but all protocol modules should be installed anyway)
114 # the libraries have a dependency order:
115 # xtrans, Xau, Xdmcp before anything else
116 # fontenc before Xfont
119 # (X11 and SM) before Xt
120 # Xt before Xmu and Xpm
121 # Xext before any other extension library
122 # Xfixes before Xcomposite
123 # Xp before XprintUtil before XprintAppUtil
131 build lib libWindowsWM
145 build lib libXcomposite
151 build lib libXfontcache
154 build lib libXinerama
157 build lib libXprintUtil
158 build lib libXprintAppUtil
161 build lib libXScrnSaver
166 build lib libXxf86dga
167 build lib libXxf86misc
171 # Most apps depend at least on libX11.
173 # bdftopcf depends on libXfont
174 # mkfontscale depends on libfontenc and libfreetype
175 # mkfontdir depends on mkfontscale
177 # TODO: detailed breakdown of which apps require which libs
181 build app beforelight
194 build app mkfontscale
252 build app xphelloworld
253 build app xplsprinters
255 build app xprehashprinterlist
263 build app xsetpointer
275 # The server requires at least the following libraries:
278 build xserver xorg-server
281 build_driver_input
() {
286 # Some drivers are only buildable on some OS'es
289 build driver xf86-input-aiptek
290 build driver xf86-input-evdev
291 build driver xf86-input-ur98
297 # And some drivers are only buildable on some CPUs.
299 i
*86* | amd64
* | x86
*64*)
300 build driver xf86-input-vmmouse
306 build driver xf86-input-acecad
307 build driver xf86-input-calcomp
308 build driver xf86-input-citron
309 build driver xf86-input-digitaledge
310 build driver xf86-input-dmc
311 build driver xf86-input-dynapro
312 build driver xf86-input-elo2300
313 build driver xf86-input-elographics
314 build driver xf86-input-fpit
315 build driver xf86-input-hyperpen
316 build driver xf86-input-jamstudio
317 build driver xf86-input-joystick
318 build driver xf86-input-keyboard
319 build driver xf86-input-magellan
320 build driver xf86-input-magictouch
321 build driver xf86-input-microtouch
322 build driver xf86-input-mouse
323 build driver xf86-input-mutouch
324 build driver xf86-input-palmax
325 build driver xf86-input-penmount
326 build driver xf86-input-spaceorb
327 build driver xf86-input-summa
328 build driver xf86-input-tek4957
329 build driver xf86-input-void
332 build_driver_video
() {
336 # Some drivers are only buildable on some OS'es
339 build driver xf86-video-wsfb
340 build driver xf86-video-sunffb
343 build driver xf86-video-sisusb
344 build driver xf86-video-sunffb
345 build driver xf86-video-v4l
351 build driver xf86-video-apm
352 build driver xf86-video-ark
353 build driver xf86-video-ati
354 build driver xf86-video-chips
355 build driver xf86-video-cirrus
356 build driver xf86-video-cyrix
357 build driver xf86-video-dummy
358 build driver xf86-video-fbdev
359 build driver xf86-video-glide
360 build driver xf86-video-glint
361 build driver xf86-video-i128
362 build driver xf86-video-i740
363 build driver xf86-video-i810
364 build driver xf86-video-imstt
365 build driver xf86-video-mga
366 build driver xf86-video-neomagic
367 build driver xf86-video-newport
368 build driver xf86-video-nsc
369 build driver xf86-video-nv
370 build driver xf86-video-rendition
371 build driver xf86-video-s3
372 build driver xf86-video-s3virge
373 build driver xf86-video-savage
374 build driver xf86-video-siliconmotion
375 build driver xf86-video-sis
376 build driver xf86-video-sunbw2
377 build driver xf86-video-suncg14
378 build driver xf86-video-suncg3
379 build driver xf86-video-suncg6
380 build driver xf86-video-sunleo
381 build driver xf86-video-suntcx
382 build driver xf86-video-tdfx
383 build driver xf86-video-tga
384 build driver xf86-video-trident
385 build driver xf86-video-tseng
386 build driver xf86-video-vesa
387 build driver xf86-video-vga
388 build driver xf86-video-via
389 build driver xf86-video-vmware
390 build driver xf86-video-voodoo
393 # The server must be built before the drivers
399 # All fonts require mkfontscale and mkfontdir to be available
401 # The following fonts require bdftopcf to be available:
402 # adobe-100dpi, adobe-75dpi, adobe-utopia-100dpi, adobe-utopia-75dpi,
403 # arabic-misc, bh-100dpi, bh-75dpi, bh-lucidatypewriter-100dpi,
404 # bh-lucidatypewriter-75dpi, bitstream-100dpi, bitstream-75dpi,
405 # cronyx-cyrillic, cursor-misc, daewoo-misc, dec-misc, isas-misc,
406 # jis-misc, micro-misc, misc-cyrillic, misc-misc, mutt-misc,
407 # schumacher-misc, screen-cyrillic, sony-misc, sun-misc and
410 # Within the font module, the util component must be built before the
412 # adobe-100dpi, adobe-75dpi, adobe-utopia-100dpi, adobe-utopia-75dpi,
413 # bh-100dpi, bh-75dpi, bh-lucidatypewriter-100dpi, bh-lucidatypewriter-75dpi,
414 # misc-misc and schumacher-misc
416 # The alias component is recommended to be installed after the other fonts
417 # since the fonts.alias files reference specific fonts installed from the
418 # other font components
422 build font font-adobe-100dpi
423 build font font-adobe-75dpi
424 build font font-adobe-utopia-100dpi
425 build font font-adobe-utopia-75dpi
426 build font font-adobe-utopia-type1
427 build font font-arabic-misc
428 build font font-bh-100dpi
429 build font font-bh-75dpi
430 build font font-bh-lucidatypewriter-100dpi
431 build font font-bh-lucidatypewriter-75dpi
432 build font font-bh-ttf
433 build font font-bh-type1
434 build font font-bitstream-100dpi
435 build font font-bitstream-75dpi
436 build font font-bitstream-speedo
437 build font font-bitstream-type1
438 build font font-cronyx-cyrillic
439 build font font-cursor-misc
440 build font font-daewoo-misc
441 build font font-dec-misc
442 build font font-ibm-type1
443 build font font-isas-misc
444 build font font-jis-misc
445 build font font-micro-misc
446 build font font-misc-cyrillic
447 build font font-misc-ethiopic
448 build font font-misc-meltho
449 build font font-misc-misc
450 build font font-mutt-misc
451 build font font-schumacher-misc
452 build font font-screen-cyrillic
453 build font font-sony-misc
454 build font font-sun-misc
455 build font font-winitzki-cyrillic
456 build font font-xfree86-type1
457 build font font-alias
460 # makedepend requires xproto
462 build util xorg-cf-files
464 build util makedepend
465 build util gccmakedep
469 # xorg-docs requires xorg-sgml-doctools
471 build doc xorg-sgml-doctools
476 echo "Usage: $0 [options] prefix"
477 echo " where options are:"
478 echo " -d : run make distcheck in addition to others"
479 echo " -D : run make dist in addition to others"
480 echo " -c : run make clean in addition to others"
481 echo " -m path-to-mesa-sources-for-xserver : full path to Mesa sources"
482 echo " -n : do not quit after error; just print error message"
483 echo " -s sudo-command : sudo command to use"
484 echo " -bz2 : use tarballs with bzip2 compression (default)"
485 echo " -gz : use tarballs with gzip compression"
486 echo " -e : build from witin the 'everything' dir instead of module dirs"
489 # Initialize defaults
493 # Process command line args
534 if test x
"${PREFIX}" = x
; then
539 # Must create local aclocal dir or aclocal fails
540 ACLOCAL_LOCALDIR
="${DESTDIR}${PREFIX}/share/aclocal"
541 $SUDO mkdir
-p ${ACLOCAL_LOCALDIR}
543 # The following is required to make aclocal find our .m4 macros
544 if test x
"$ACLOCAL" = x
; then
545 ACLOCAL
="aclocal -I ${ACLOCAL_LOCALDIR}"
547 ACLOCAL
="${ACLOCAL} -I ${ACLOCAL_LOCALDIR}"
551 # The following is required to make pkg-config find our .pc metadata files
552 if test x
"$PKG_CONFIG_PATH" = x
; then
553 PKG_CONFIG_PATH
=${DESTDIR}${PREFIX}/lib
/pkgconfig
555 PKG_CONFIG_PATH
=${DESTDIR}${PREFIX}/lib/pkgconfig:${PKG_CONFIG_PATH}
557 export PKG_CONFIG_PATH
559 # Set the library path so that locally built libs will be found by apps
560 if test x
"$LD_LIBRARY_PATH" = x
; then
561 LD_LIBRARY_PATH
=${DESTDIR}${PREFIX}/lib
563 LD_LIBRARY_PATH
=${DESTDIR}${PREFIX}/lib:${LD_LIBRARY_PATH}
565 export LD_LIBRARY_PATH
567 # Set the path so that locally built apps will be found and used
568 if test x
"$PATH" = x
; then
569 PATH
=${DESTDIR}${PREFIX}/bin
571 PATH
=${DESTDIR}${PREFIX}/bin:${PATH}
575 # Set the default font path for xserver/xorg unless it's already set
576 if test x
"$FONTPATH" = x
; then
577 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/"
581 # Create the log file directory
582 $SUDO mkdir
-p ${DESTDIR}${PREFIX}/var
/log
586 # We must install the global macros before anything else
587 build util util-macros