3 # Copyright (c) 2004 Silicon Graphics, Inc. All Rights Reserved.
5 # This program is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU General Public License as
7 # published by the Free Software Foundation.
9 # This program is distributed in the hope that it would be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write the Free Software Foundation,
16 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 # Do a build using the IRIX TOOLROOT
20 # Use "-f" to force a configure.
27 # check have root/toolroot set
28 if [ -z "$TOOLROOT" ]; then
29 echo "TOOLROOT needs to be set to a populated IRIX toolroot"
32 if [ -z "$ROOT" ]; then
33 echo "ROOT needs to be set to a populated IRIX root"
37 # check we have c compiler license
38 if ! grep -iq '^feature cc' /var/flexlm/license.dat; then
39 echo "Unable to find cc license for IRIX"
40 echo "Get license: http://www.csd.sgi.com/prod/software/swl/keyrequest.html"
44 # check we have dev.sw.lib installed
45 # needed by ld32 even though we have $ROOT
46 if versions dev.sw.lib | grep -q dev.sw.lib; then
49 echo "dev.sw.lib is not installed"
50 echo "Install from irix-6.5-development-libraries-1/dist"
54 # any check failures then exit out
58 fw_bin=$TOOLROOT/usr/freeware/bin
59 fw_tools=$TOOLROOT/usr/fw_tools
60 fw_share=$ROOT/usr/freeware/share
61 irix_bin=$TOOLROOT/usr/bin
64 export AC_MACRODIR=$fw_share/autoconf
65 export M4=$irix_bin/gnum4
66 export CC=$irix_bin/cc
67 export LIBTOOL=$fw_bin/libtool
68 export MAKE=$fw_tools/gmake
69 export AWK=$irix_bin/nawk
71 # check all tools/files are in root/toolroot that we need
72 FILES="$AC_MACRODIR $M4 $CC $LIBTOOL $MAKE $fw_bin/aclocal $fw_bin/autoheader $fw_bin/autoconf"
75 echo "file $f not found in ROOT/TOOLROOT"
81 # force a full configure
83 if [ $1 = "-f" ]; then
84 rm -f config.cache configure include/builddefs
89 # --- do all the configure stuff using the toolroot paths ---
91 # aclocal.m4 is actually checked in - probably won't recreate it often
92 if [ ! -e aclocal.m4 ]; then
94 $fw_bin/aclocal --acdir=m4 --output=aclocal.m4
98 if [ ! -e ./configure ]; then
105 if [ ! -e include/builddefs ]; then
111 # Now call gmake with any args we were given