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
7 # CONFCFLAGS: flags to pass to all configure scripts in ""
8 # MAKEFLAGS: flags to pass to all make calls
9 # LIBDIR: Path under $prefix for libraries (e.g., lib64)
12 nonexistent_components
=""
15 if test x
"$NOQUIT" = x1
; then
16 echo "***** $1 failed on $2/$3"
17 failed_components
="$failed_components $2/$3"
29 "cursors") C
="xcursor-themes" ;;
30 "bitmaps") C
="xbitmaps" ;;
34 if [ "$C" != "encodings" ]; then
40 "libXRes") C
="libXres" ;;
41 "libxtrans") C
="xtrans" ;;
50 "evieproto") C
="evieext" ;;
51 "x11proto") C
="xproto" ;;
56 "cf") C
="xorg-cf-files" ;;
57 "macros") C
="util-macros" ;;
62 "proto") C
="xcb-proto" ;;
63 "pthread-stubs") M
="lib"; C
="libpthread-stubs" ;;
64 "util") C
="xcb-util" ;;
73 TARFILE
=`ls -1rt $ii/$C-*.tar.$jj 2> /dev/null | tail -n 1`
74 if [ -n "$TARFILE" ]; then
75 SRCDIR
=`echo $TARFILE | sed "s,.tar.$jj,,"`
76 if [ ! -d $SRCDIR ]; then
78 if [ "$jj" = "gz" ]; then
81 tar $TAROPTS $TARFILE -C $ii || failed
tar $1 $2
90 if [ -n "$RESUME" ]; then
91 if [ "$RESUME" = "$1/$2" ]; then
93 # Resume build at this module
95 echo "Skipping $1 module component $2..."
102 if [ -f $1/$2/autogen.sh
]; then
110 if [ -z $SRCDIR ]; then
111 echo "$1 module component $2 does not exist, skipping."
112 nonexistent_components
="$nonexistent_components $1/$2"
116 echo "Building $1 module component $2..."
118 if test x
"$BUILT_MODULES_FILE" != "x"; then
119 echo "$1/$2" >> $BUILT_MODULES_FILE
123 cd $SRCDIR || failed cd1
$1 $2
125 if test x
"$PULL" = x1
; then
126 git pull
--rebase || failed
"git pull" $1 $2
129 # Build outside source directory
130 if [ "x$DIR_ARCH" != x
] ; then
131 mkdir
-p "$DIR_ARCH" || failed mkdir
$1 $2
132 if cd "$DIR_ARCH" ; then :; else
139 # Special configure flags for certain modules
142 if test "$1" = "lib" && test "$2" = "libX11" && test x
"$USE_XCB" = xNO
; then
143 MOD_SPECIFIC
="--with-xcb=no"
147 if test x
$LIBDIR != x
; then
148 LIB_FLAGS
="--libdir=${PREFIX}/${LIBDIR}"
151 # Use "sh autogen.sh" since some scripts are not executable in CVS
152 if test "x$NOAUTOGEN" != x1
; then
153 sh
${DIR_CONFIG}/${CONFCMD} --prefix=${PREFIX} ${LIB_FLAGS} \
154 ${MOD_SPECIFIC} ${QUIET:+--quiet} \
155 ${CACHE:+--cache-file=}${CACHE} ${CONFFLAGS} "$CONFCFLAGS" || \
156 failed
${CONFCMD} $1 $2
158 ${MAKE} $MAKEFLAGS || failed
make $1 $2
159 if test x
"$CLEAN" = x1
; then
160 ${MAKE} $MAKEFLAGS clean || failed clean
$1 $2
162 if test x
"$DIST" = x1
; then
163 ${MAKE} $MAKEFLAGS dist || failed dist
$1 $2
165 if test x
"$DISTCHECK" = x1
; then
166 ${MAKE} $MAKEFLAGS distcheck || failed distcheck
$1 $2
168 $SUDO env LD_LIBRARY_PATH
=$LD_LIBRARY_PATH ${MAKE} $MAKEFLAGS install || \
173 if test x
"$BUILD_ONE" = x1
; then
174 echo "Single-component build complete"
179 # protocol headers have no build order dependencies
181 build proto applewmproto
182 build proto bigreqsproto
183 build proto compositeproto
184 build proto damageproto
186 build proto dri2proto
187 build proto evieproto
188 build proto fixesproto
189 build proto fontcacheproto
190 build proto fontsproto
192 build proto inputproto
194 build proto randrproto
195 build proto recordproto
196 build proto renderproto
197 build proto resourceproto
198 build proto scrnsaverproto
199 build proto trapproto
200 build proto videoproto
201 build proto windowswmproto
203 build proto xcmiscproto
204 build proto xextproto
205 build proto xf86bigfontproto
206 build proto xf86dgaproto
207 build proto xf86driproto
208 build proto xf86miscproto
209 build proto xf86vidmodeproto
210 build proto xineramaproto
211 if test x
"$USE_XCB" != xNO
; then
216 # bitmaps is needed for building apps, so has to be done separately first
217 # cursors depends on apps/xcursorgen
218 # xkbdata is obsolete - use xkbdesc from xkeyboard-config instead
225 # All protocol modules must be installed before the libs (okay, that's an
226 # overstatement, but all protocol modules should be installed anyway)
228 # the libraries have a dependency order:
229 # xtrans, Xau, Xdmcp before anything else
230 # fontenc before Xfont
233 # (X11 and SM) before Xt
234 # Xt before Xmu and Xpm
235 # Xext before any other extension library
236 # Xfixes before Xcomposite
237 # Xp before XprintUtil before XprintAppUtil
239 # If xcb is being used for libX11, it must be built before libX11, but after
246 if test x
"$USE_XCB" != xNO
; then
247 build xcb pthread-stubs
253 build lib libWindowsWM
258 #build lib liblbxutil
266 build lib libXcomposite
272 build lib libXfontcache
275 build lib libXinerama
280 build lib libXScrnSaver
285 build lib libXxf86dga
286 build lib libXxf86misc
288 build lib libpciaccess
292 # Most apps depend at least on libX11.
294 # bdftopcf depends on libXfont
295 # mkfontscale depends on libfontenc and libfreetype
296 # mkfontdir depends on mkfontscale
298 # TODO: detailed breakdown of which apps require which libs
302 build app beforelight
313 build app mkfontscale
316 build app rendercheck
375 build app xsetpointer
385 # if test x"$USE_XCB" != xNO ; then
395 # The server requires at least the following libraries:
396 # Xfont, Xau, Xdmcp, pciaccess
401 build_driver_input
() {
402 # Some drivers are only buildable on some OS'es
405 build driver xf86-input-aiptek
406 build driver xf86-input-evdev
407 build driver xf86-input-joystick
408 #build driver xf86-input-ur98
411 build driver xf86-input-joystick
417 # And some drivers are only buildable on some CPUs.
419 i
*86* | amd64
* | x86
*64*)
420 build driver xf86-input-vmmouse
426 build driver xf86-input-acecad
427 #build driver xf86-input-calcomp
428 #build driver xf86-input-citron
429 #build driver xf86-input-digitaledge
430 #build driver xf86-input-dmc
431 #build driver xf86-input-dynapro
432 #build driver xf86-input-elo2300
433 #build driver xf86-input-elographics
434 #build driver xf86-input-fpit
435 #build driver xf86-input-hyperpen
436 #build driver xf86-input-jamstudio
437 build driver xf86-input-keyboard
438 #build driver xf86-input-magellan
439 #build driver xf86-input-magictouch
440 #build driver xf86-input-microtouch
441 build driver xf86-input-mouse
442 #build driver xf86-input-mutouch
443 #build driver xf86-input-palmax
444 #build driver xf86-input-penmount
445 #build driver xf86-input-spaceorb
446 #build driver xf86-input-summa
447 build driver xf86-input-synaptics
448 #build driver xf86-input-tek4957
449 build driver xf86-input-void
452 build_driver_video
() {
453 # Some drivers are only buildable on some OS'es
458 build driver xf86-video-sunffb
464 *NetBSD
* |
*OpenBSD
*)
465 build driver xf86-video-wsfb
466 build driver xf86-video-sunffb
469 build driver xf86-video-sisusb
470 build driver xf86-video-sunffb
471 build driver xf86-video-v4l
477 # Some drivers are only buildable on some architectures
480 build driver xf86-video-sunbw2
481 build driver xf86-video-suncg14
482 build driver xf86-video-suncg3
483 build driver xf86-video-suncg6
484 build driver xf86-video-sunleo
485 build driver xf86-video-suntcx
487 i
*86* | amd64
* | x86
*64*)
488 build driver xf86-video-i740
489 build driver xf86-video-intel
490 # build driver xf86-video-via
496 build driver xf86-video-apm
497 build driver xf86-video-ark
498 build driver xf86-video-ast
499 build driver xf86-video-ati
500 build driver xf86-video-chips
501 build driver xf86-video-cirrus
502 build driver xf86-video-dummy
503 build driver xf86-video-fbdev
504 build driver xf86-video-geode
505 # build driver xf86-video-glide
506 build driver xf86-video-glint
507 build driver xf86-video-i128
508 build driver xf86-video-imstt
509 build driver xf86-video-mga
510 build driver xf86-video-neomagic
511 build driver xf86-video-newport
512 build driver xf86-video-nouveau
513 build driver xf86-video-nv
514 build driver xf86-video-radeonhd
515 build driver xf86-video-rendition
516 build driver xf86-video-s3
517 build driver xf86-video-s3virge
518 build driver xf86-video-savage
519 build driver xf86-video-siliconmotion
520 build driver xf86-video-sis
521 build driver xf86-video-tdfx
522 build driver xf86-video-tga
523 build driver xf86-video-trident
524 build driver xf86-video-tseng
525 build driver xf86-video-vesa
526 build driver xf86-video-vmware
527 build driver xf86-video-voodoo
528 build driver xf86-video-xgi
529 build driver xf86-video-xgixp
532 # The server must be built before the drivers
534 # XQuartz doesn't need these...
543 # All fonts require mkfontscale and mkfontdir to be available
545 # The following fonts require bdftopcf to be available:
546 # adobe-100dpi, adobe-75dpi, adobe-utopia-100dpi, adobe-utopia-75dpi,
547 # arabic-misc, bh-100dpi, bh-75dpi, bh-lucidatypewriter-100dpi,
548 # bh-lucidatypewriter-75dpi, bitstream-100dpi, bitstream-75dpi,
549 # cronyx-cyrillic, cursor-misc, daewoo-misc, dec-misc, isas-misc,
550 # jis-misc, micro-misc, misc-cyrillic, misc-misc, mutt-misc,
551 # schumacher-misc, screen-cyrillic, sony-misc, sun-misc and
554 # Within the font module, the util component must be built before the
556 # adobe-100dpi, adobe-75dpi, adobe-utopia-100dpi, adobe-utopia-75dpi,
557 # bh-100dpi, bh-75dpi, bh-lucidatypewriter-100dpi, bh-lucidatypewriter-75dpi,
558 # misc-misc and schumacher-misc
560 # The alias component is recommended to be installed after the other fonts
561 # since the fonts.alias files reference specific fonts installed from the
562 # other font components
566 build font adobe-100dpi
567 build font adobe-75dpi
568 build font adobe-utopia-100dpi
569 build font adobe-utopia-75dpi
570 build font adobe-utopia-type1
571 build font arabic-misc
574 build font bh-lucidatypewriter-100dpi
575 build font bh-lucidatypewriter-75dpi
578 build font bitstream-100dpi
579 build font bitstream-75dpi
580 build font bitstream-speedo
581 build font bitstream-type1
582 build font cronyx-cyrillic
583 build font cursor-misc
584 build font daewoo-misc
589 build font micro-misc
590 build font misc-cyrillic
591 build font misc-ethiopic
592 build font misc-meltho
595 build font schumacher-misc
596 build font screen-cyrillic
599 build font winitzki-cyrillic
600 build font xfree86-type1
604 # makedepend requires xproto
608 build util makedepend
609 build util gccmakedep
611 if test x
"$USE_XCB" != xNO
; then
615 build xkeyboard-config
""
618 # xorg-docs requires xorg-sgml-doctools
620 build doc xorg-sgml-doctools
625 echo "Usage: $0 [options] prefix"
626 echo " where options are:"
627 echo " -a : do NOT run auto config tools (autogen.sh, configure)"
628 echo " -b : use .build.$HAVE_ARCH build directory"
629 echo " -c : run make clean in addition to others"
630 echo " -d : run make distcheck in addition to others"
631 echo " -D : run make dist in addition to others"
632 echo " -f file: append module being built to file. The last line of this"
633 echo " file can be used for resuming with -r."
634 echo " -g : build with debug information"
635 echo " -n : do not quit after error; just print error message"
636 echo " -o module/component : build just this component"
637 echo " -p : run git pull on each component"
638 echo " -r module/component : resume building with this comonent"
639 echo " -s sudo-command : sudo command to use"
642 HAVE_ARCH
="`uname -i`"
647 # Process command line args
655 DIR_ARCH
=".build.$HAVE_ARCH"
669 BUILT_MODULES_FILE
=$1
674 CONFCFLAGS
="CFLAGS=-g3 -O0"
706 if test x
"${PREFIX}" = x
; then
714 if test x
$LIBDIR = x
; then
722 echo "Building to run $HOST_OS / $HOST_CPU ($HOST)"
724 # Must create local aclocal dir or aclocal fails
725 ACLOCAL_LOCALDIR
="${DESTDIR}${PREFIX}/share/aclocal"
726 $SUDO mkdir
-p ${ACLOCAL_LOCALDIR}
728 # The following is required to make aclocal find our .m4 macros
729 if test x
"$ACLOCAL" = x
; then
730 ACLOCAL
="aclocal -I ${ACLOCAL_LOCALDIR}"
732 ACLOCAL
="${ACLOCAL} -I ${ACLOCAL_LOCALDIR}"
736 # The following is required to make pkg-config find our .pc metadata files
737 if test x
"$PKG_CONFIG_PATH" = x
; then
738 PKG_CONFIG_PATH
=${DESTDIR}${PREFIX}/${LIBDIR}/pkgconfig
740 PKG_CONFIG_PATH
=${DESTDIR}${PREFIX}/${LIBDIR}/pkgconfig:${PKG_CONFIG_PATH}
742 export PKG_CONFIG_PATH
744 # Set the library path so that locally built libs will be found by apps
745 if test x
"$LD_LIBRARY_PATH" = x
; then
746 LD_LIBRARY_PATH
=${DESTDIR}${PREFIX}/${LIBDIR}
748 LD_LIBRARY_PATH
=${DESTDIR}${PREFIX}/${LIBDIR}:${LD_LIBRARY_PATH}
750 export LD_LIBRARY_PATH
752 # Set the path so that locally built apps will be found and used
753 if test x
"$PATH" = x
; then
754 PATH
=${DESTDIR}${PREFIX}/bin
756 PATH
=${DESTDIR}${PREFIX}/bin:${PATH}
760 # Choose which make program to use
761 if test x
"$MAKE" = x
; then
765 # Set the default font path for xserver/xorg unless it's already set
766 if test x
"$FONTPATH" = x
; then
767 FONTPATH
="${PREFIX}/${LIBDIR}/X11/fonts/misc/,${PREFIX}/${LIBDIR}/X11/fonts/Type1/,${PREFIX}/${LIBDIR}/X11/fonts/75dpi/,${PREFIX}/${LIBDIR}/X11/fonts/100dpi/,${PREFIX}/${LIBDIR}/X11/fonts/cyrillic/,${PREFIX}/${LIBDIR}/X11/fonts/TTF/"
771 # Create the log file directory
772 $SUDO mkdir
-p ${DESTDIR}${PREFIX}/var
/log
776 # We must install the global macros before anything else
783 if test $LIB_ONLY -eq 0; then
796 if test "x$nonexistent_components" != x
; then
798 echo "***** Skipped components (not available) *****"
799 echo "$nonexistent_components"
803 if test "x$failed_components" != x
; then
805 echo "***** Failed components *****"
806 echo "$failed_components"