3 # Do a build using the IRIX TOOLROOT
4 # Use "-f" to force a configure.
6 # Copyright (c) 2004 Silicon Graphics, Inc. All Rights Reserved.
8 # This program is free software; you can redistribute it and/or modify it
9 # under the terms of version 2 of the GNU General Public License as
10 # published by the Free Software Foundation.
12 # This program is distributed in the hope that it would be useful, but
13 # WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16 # Further, this software is distributed without any warranty that it is
17 # free of the rightful claim of any third person regarding infringement
18 # or the like. Any license provided herein, whether implied or
19 # otherwise, applies only to this software file. Patent licenses, if
20 # any, provided herein do not apply to combinations of this program with
21 # other software, or any other product whatsoever.
23 # You should have received a copy of the GNU General Public License along
24 # with this program; if not, write the Free Software Foundation, Inc., 59
25 # Temple Place - Suite 330, Boston MA 02111-1307, USA.
27 # Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
28 # Mountain View, CA 94043, or:
32 # For further information regarding this notice, see:
34 # http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
42 # check have root/toolroot set
43 if [ -z "$TOOLROOT" ]; then
44 echo "TOOLROOT needs to be set to a populated IRIX toolroot"
47 if [ -z "$ROOT" ]; then
48 echo "ROOT needs to be set to a populated IRIX root"
52 # check we have c compiler license
53 if ! grep -iq '^feature cc' /var/flexlm/license.dat; then
54 echo "Unable to find cc license for IRIX"
55 echo "Get license: http://www.csd.sgi.com/prod/software/swl/keyrequest.html"
59 # check we have dev.sw.lib installed
60 # needed by ld32 even though we have $ROOT
61 if versions dev.sw.lib | grep -q dev.sw.lib; then
64 echo "dev.sw.lib is not installed"
65 echo "Install from irix-6.5-development-libraries-1/dist"
69 # any check failures then exit out
73 fw_bin=$TOOLROOT/usr/freeware/bin
74 fw_tools=$TOOLROOT/usr/fw_tools
75 fw_share=$ROOT/usr/freeware/share
76 irix_bin=$TOOLROOT/usr/bin
79 export AC_MACRODIR=$fw_share/autoconf
80 export M4=$irix_bin/gnum4
81 export CC=$irix_bin/cc
82 export LIBTOOL=$fw_bin/libtool
83 export MAKE=$fw_tools/gmake
84 export AWK=$irix_bin/nawk
86 # check all tools/files are in root/toolroot that we need
87 FILES="$AC_MACRODIR $M4 $CC $LIBTOOL $MAKE $fw_bin/aclocal $fw_bin/autoheader $fw_bin/autoconf"
90 echo "file $f not found in ROOT/TOOLROOT"
96 # force a full configure
98 if [ $1 = "-f" ]; then
99 rm -f config.cache configure include/builddefs
104 # --- do all the configure stuff using the toolroot paths ---
106 # aclocal.m4 is actually checked in - probably won't recreate it often
107 if [ ! -e aclocal.m4 ]; then
109 $fw_bin/aclocal --acdir=m4 --output=aclocal.m4
113 if [ ! -e ./configure ]; then
120 if [ ! -e include/builddefs ]; then
126 # Now call gmake with any args we were given