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 -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 cd $SRCDIR || failed cd1
$1 $2
120 # Build outside source directory
121 if [ "x$DIR_ARCH" != x
] ; then
122 mkdir
-p "$DIR_ARCH" || failed mkdir
$1 $2
123 if cd "$DIR_ARCH" ; then :; else
130 # Special configure flags for certain modules
133 if test "$1" = "xserver" && test -n "$MESAPATH"; then
134 MOD_SPECIFIC
="--with-mesa-source=${MESAPATH}"
136 if test "$1" = "lib" && test "$2" = "libX11" && test x
"$USE_XCB" = xNO
; then
137 MOD_SPECIFIC
="--with-xcb=no"
141 if test x
$LIBDIR != x
; then
142 LIB_FLAGS
="--libdir=${PREFIX}/${LIBDIR}"
145 # Use "sh autogen.sh" since some scripts are not executable in CVS
146 if test "x$NOAUTOGEN" != x1
; then
147 sh
${DIR_CONFIG}/${CONFCMD} --prefix=${PREFIX} ${LIB_FLAGS} \
148 ${MOD_SPECIFIC} ${QUIET:+--quiet} \
149 ${CACHE:+--cache-file=}${CACHE} ${CONFFLAGS} "$CONFCFLAGS" || \
150 failed
${CONFCMD} $1 $2
152 ${MAKE} $MAKEFLAGS || failed
make $1 $2
153 if test x
"$CLEAN" = x1
; then
154 ${MAKE} $MAKEFLAGS clean || failed clean
$1 $2
156 if test x
"$DIST" = x1
; then
157 ${MAKE} $MAKEFLAGS dist || failed dist
$1 $2
159 if test x
"$DISTCHECK" = x1
; then
160 ${MAKE} $MAKEFLAGS distcheck || failed distcheck
$1 $2
162 $SUDO env LD_LIBRARY_PATH
=$LD_LIBRARY_PATH ${MAKE} $MAKEFLAGS install || \
168 # protocol headers have no build order dependencies
170 build proto applewmproto
171 build proto bigreqsproto
172 build proto compositeproto
173 build proto damageproto
175 build proto dri2proto
176 build proto evieproto
177 build proto fixesproto
178 build proto fontcacheproto
179 build proto fontsproto
181 build proto inputproto
183 build proto randrproto
184 build proto recordproto
185 build proto renderproto
186 build proto resourceproto
187 build proto scrnsaverproto
188 build proto trapproto
189 build proto videoproto
190 build proto windowswmproto
192 build proto xcmiscproto
193 build proto xextproto
194 build proto xf86bigfontproto
195 build proto xf86dgaproto
196 build proto xf86driproto
197 build proto xf86miscproto
198 build proto xf86vidmodeproto
199 build proto xineramaproto
200 if test x
"$USE_XCB" != xNO
; then
205 # bitmaps is needed for building apps, so has to be done separately first
206 # cursors depends on apps/xcursorgen
207 # xkbdata is obsolete - use xkbdesc from xkeyboard-config instead
214 # All protocol modules must be installed before the libs (okay, that's an
215 # overstatement, but all protocol modules should be installed anyway)
217 # the libraries have a dependency order:
218 # xtrans, Xau, Xdmcp before anything else
219 # fontenc before Xfont
222 # (X11 and SM) before Xt
223 # Xt before Xmu and Xpm
224 # Xext before any other extension library
225 # Xfixes before Xcomposite
226 # Xp before XprintUtil before XprintAppUtil
228 # If xcb is being used for libX11, it must be built before libX11, but after
235 if test x
"$USE_XCB" != xNO
; then
236 build xcb pthread-stubs
242 build lib libWindowsWM
247 #build lib liblbxutil
255 build lib libXcomposite
261 build lib libXfontcache
264 build lib libXinerama
269 build lib libXScrnSaver
274 build lib libXxf86dga
275 build lib libXxf86misc
277 build lib libpciaccess
281 # Most apps depend at least on libX11.
283 # bdftopcf depends on libXfont
284 # mkfontscale depends on libfontenc and libfreetype
285 # mkfontdir depends on mkfontscale
287 # TODO: detailed breakdown of which apps require which libs
291 build app beforelight
303 build app mkfontscale
307 build app rendercheck
362 build app xphelloworld
363 build app xplsprinters
365 build app xprehashprinterlist
373 build app xsetpointer
383 # if test x"$USE_XCB" != xNO ; then
393 # The server requires at least the following libraries:
394 # Xfont, Xau, Xdmcp, pciaccess
399 build_driver_input
() {
400 # Some drivers are only buildable on some OS'es
403 build driver xf86-input-aiptek
404 build driver xf86-input-evdev
405 #build driver xf86-input-ur98
411 # And some drivers are only buildable on some CPUs.
413 i
*86* | amd64
* | x86
*64*)
414 build driver xf86-input-vmmouse
420 build driver xf86-input-acecad
421 #build driver xf86-input-calcomp
422 #build driver xf86-input-citron
423 #build driver xf86-input-digitaledge
424 #build driver xf86-input-dmc
425 #build driver xf86-input-dynapro
426 #build driver xf86-input-elo2300
427 #build driver xf86-input-elographics
428 #build driver xf86-input-fpit
429 #build driver xf86-input-hyperpen
430 #build driver xf86-input-jamstudio
431 build driver xf86-input-joystick
432 build driver xf86-input-keyboard
433 #build driver xf86-input-magellan
434 #build driver xf86-input-magictouch
435 #build driver xf86-input-microtouch
436 build driver xf86-input-mouse
437 #build driver xf86-input-mutouch
438 #build driver xf86-input-palmax
439 #build driver xf86-input-penmount
440 #build driver xf86-input-spaceorb
441 #build driver xf86-input-summa
442 build driver xf86-input-synaptics
443 #build driver xf86-input-tek4957
444 build driver xf86-input-void
447 build_driver_video
() {
448 # Some drivers are only buildable on some OS'es
453 build driver xf86-video-sunffb
459 *NetBSD
* |
*OpenBSD
*)
460 build driver xf86-video-wsfb
461 build driver xf86-video-sunffb
464 build driver xf86-video-sisusb
465 build driver xf86-video-sunffb
466 build driver xf86-video-v4l
472 # Some drivers are only buildable on some architectures
475 build driver xf86-video-sunbw2
476 build driver xf86-video-suncg14
477 build driver xf86-video-suncg3
478 build driver xf86-video-suncg6
479 build driver xf86-video-sunleo
480 build driver xf86-video-suntcx
482 i
*86* | amd64
* | x86
*64*)
483 build driver xf86-video-i740
484 build driver xf86-video-intel
485 build driver xf86-video-via
491 build driver xf86-video-apm
492 build driver xf86-video-ark
493 build driver xf86-video-ast
494 build driver xf86-video-ati
495 build driver xf86-video-avivo
496 build driver xf86-video-chips
497 build driver xf86-video-cirrus
498 build driver xf86-video-dummy
499 build driver xf86-video-fbdev
500 build driver xf86-video-geode
501 # build driver xf86-video-glide
502 build driver xf86-video-glint
503 build driver xf86-video-i128
504 build driver xf86-video-imstt
505 build driver xf86-video-mga
506 build driver xf86-video-neomagic
507 build driver xf86-video-newport
508 build driver xf86-video-nouveau
509 build driver xf86-video-nv
510 build driver xf86-video-radeonhd
511 build driver xf86-video-rendition
512 build driver xf86-video-s3
513 build driver xf86-video-s3virge
514 build driver xf86-video-savage
515 build driver xf86-video-siliconmotion
516 build driver xf86-video-sis
517 build driver xf86-video-tdfx
518 build driver xf86-video-tga
519 build driver xf86-video-trident
520 build driver xf86-video-tseng
521 build driver xf86-video-vesa
522 build driver xf86-video-vmware
523 build driver xf86-video-voodoo
524 build driver xf86-video-xgi
525 build driver xf86-video-xgixp
528 # The server must be built before the drivers
534 # All fonts require mkfontscale and mkfontdir to be available
536 # The following fonts require bdftopcf to be available:
537 # adobe-100dpi, adobe-75dpi, adobe-utopia-100dpi, adobe-utopia-75dpi,
538 # arabic-misc, bh-100dpi, bh-75dpi, bh-lucidatypewriter-100dpi,
539 # bh-lucidatypewriter-75dpi, bitstream-100dpi, bitstream-75dpi,
540 # cronyx-cyrillic, cursor-misc, daewoo-misc, dec-misc, isas-misc,
541 # jis-misc, micro-misc, misc-cyrillic, misc-misc, mutt-misc,
542 # schumacher-misc, screen-cyrillic, sony-misc, sun-misc and
545 # Within the font module, the util component must be built before the
547 # adobe-100dpi, adobe-75dpi, adobe-utopia-100dpi, adobe-utopia-75dpi,
548 # bh-100dpi, bh-75dpi, bh-lucidatypewriter-100dpi, bh-lucidatypewriter-75dpi,
549 # misc-misc and schumacher-misc
551 # The alias component is recommended to be installed after the other fonts
552 # since the fonts.alias files reference specific fonts installed from the
553 # other font components
557 build font adobe-100dpi
558 build font adobe-75dpi
559 build font adobe-utopia-100dpi
560 build font adobe-utopia-75dpi
561 build font adobe-utopia-type1
562 build font arabic-misc
565 build font bh-lucidatypewriter-100dpi
566 build font bh-lucidatypewriter-75dpi
569 build font bitstream-100dpi
570 build font bitstream-75dpi
571 build font bitstream-speedo
572 build font bitstream-type1
573 build font cronyx-cyrillic
574 build font cursor-misc
575 build font daewoo-misc
580 build font micro-misc
581 build font misc-cyrillic
582 build font misc-ethiopic
583 build font misc-meltho
586 build font schumacher-misc
587 build font screen-cyrillic
590 build font winitzki-cyrillic
591 build font xfree86-type1
595 # makedepend requires xproto
599 build util makedepend
600 build util gccmakedep
602 if test x
"$USE_XCB" != xNO
; then
607 # xorg-docs requires xorg-sgml-doctools
609 build doc xorg-sgml-doctools
614 echo "Usage: $0 [options] prefix"
615 echo " where options are:"
616 echo " -a : do NOT run auto config tools (autogen.sh, configure)"
617 echo " -b : use .build.$HAVE_ARCH build directory"
618 echo " -c : run make clean in addition to others"
619 echo " -d : run make distcheck in addition to others"
620 echo " -D : run make dist in addition to others"
621 echo " -g : build with debug information"
622 echo " -m path-to-mesa-sources-for-xserver : full path to Mesa sources"
623 echo " -n : do not quit after error; just print error message"
624 echo " -r module/component : resume building with this comonent"
625 echo " -s sudo-command : sudo command to use"
628 HAVE_ARCH
="`uname -i`"
632 # Process command line args
640 DIR_ARCH
=".build.$HAVE_ARCH"
655 CONFCFLAGS
="CFLAGS=-g3 -O0"
680 if test x
"${PREFIX}" = x
; then
688 if test x
$LIBDIR = x
; then
696 echo "Building to run $HOST_OS / $HOST_CPU ($HOST)"
698 # Must create local aclocal dir or aclocal fails
699 ACLOCAL_LOCALDIR
="${DESTDIR}${PREFIX}/share/aclocal"
700 $SUDO mkdir
-p ${ACLOCAL_LOCALDIR}
702 # The following is required to make aclocal find our .m4 macros
703 if test x
"$ACLOCAL" = x
; then
704 ACLOCAL
="aclocal -I ${ACLOCAL_LOCALDIR}"
706 ACLOCAL
="${ACLOCAL} -I ${ACLOCAL_LOCALDIR}"
710 # The following is required to make pkg-config find our .pc metadata files
711 if test x
"$PKG_CONFIG_PATH" = x
; then
712 PKG_CONFIG_PATH
=${DESTDIR}${PREFIX}/${LIBDIR}/pkgconfig
714 PKG_CONFIG_PATH
=${DESTDIR}${PREFIX}/${LIBDIR}/pkgconfig:${PKG_CONFIG_PATH}
716 export PKG_CONFIG_PATH
718 # Set the library path so that locally built libs will be found by apps
719 if test x
"$LD_LIBRARY_PATH" = x
; then
720 LD_LIBRARY_PATH
=${DESTDIR}${PREFIX}/${LIBDIR}
722 LD_LIBRARY_PATH
=${DESTDIR}${PREFIX}/${LIBDIR}:${LD_LIBRARY_PATH}
724 export LD_LIBRARY_PATH
726 # Set the path so that locally built apps will be found and used
727 if test x
"$PATH" = x
; then
728 PATH
=${DESTDIR}${PREFIX}/bin
730 PATH
=${DESTDIR}${PREFIX}/bin:${PATH}
734 # Choose which make program to use
735 if test x
"$MAKE" = x
; then
739 # Set the default font path for xserver/xorg unless it's already set
740 if test x
"$FONTPATH" = x
; then
741 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/"
745 # Create the log file directory
746 $SUDO mkdir
-p ${DESTDIR}${PREFIX}/var
/log
750 # We must install the global macros before anything else
767 if test "x$nonexistent_components" != x
; then
769 echo "***** Skipped components (not available) *****"
770 echo "$nonexistent_components"
774 if test "x$failed_components" != x
; then
776 echo "***** Failed components *****"
777 echo "$failed_components"