3 # Copyright (c) 2004 Silicon Graphics, Inc. All Rights Reserved.
5 # Do a build using the IRIX TOOLROOT
6 # Use "-f" to force a configure.
13 # check have root/toolroot set
14 if [ -z "$TOOLROOT" ]; then
15 echo "TOOLROOT needs to be set to a populated IRIX toolroot"
18 if [ -z "$ROOT" ]; then
19 echo "ROOT needs to be set to a populated IRIX root"
23 # check we have c compiler license
24 if ! grep -iq '^feature cc' /var/flexlm/license.dat; then
25 echo "Unable to find cc license for IRIX"
26 echo "Get license: http://www.csd.sgi.com/prod/software/swl/keyrequest.html"
30 # check we have dev.sw.lib installed
31 # needed by ld32 even though we have $ROOT
32 if versions dev.sw.lib | grep -q dev.sw.lib; then
35 echo "dev.sw.lib is not installed"
36 echo "Install from irix-6.5-development-libraries-1/dist"
40 # any check failures then exit out
44 fw_bin=$TOOLROOT/usr/freeware/bin
45 fw_tools=$TOOLROOT/usr/fw_tools
46 fw_share=$ROOT/usr/freeware/share
47 irix_bin=$TOOLROOT/usr/bin
50 export AC_MACRODIR=$fw_share/autoconf
51 export M4=$irix_bin/gnum4
52 export CC=$irix_bin/cc
53 export LIBTOOL=$fw_bin/libtool
54 export MAKE=$fw_tools/gmake
55 export AWK=$irix_bin/nawk
57 # check all tools/files are in root/toolroot that we need
58 FILES="$AC_MACRODIR $M4 $CC $LIBTOOL $MAKE $fw_bin/aclocal $fw_bin/autoheader $fw_bin/autoconf"
61 echo "file $f not found in ROOT/TOOLROOT"
67 # force a full configure
69 if [ $1 = "-f" ]; then
70 rm -f config.cache configure include/builddefs
75 # --- do all the configure stuff using the toolroot paths ---
77 # aclocal.m4 is actually checked in - probably won't recreate it often
78 if [ ! -e aclocal.m4 ]; then
80 $fw_bin/aclocal --acdir=m4 --output=aclocal.m4
84 if [ ! -e ./configure ]; then
91 if [ ! -e include/builddefs ]; then
97 # Now call gmake with any args we were given