Compiling the Irix version can be tricky because of multiple incompatible versions of gcc, and incompatibilities between gcc and the MIPSpro compiler. On systems in which both gcc and MIPSpro are installed, the situation is even worse due to n32 and n64 library incompatibilities. This is the reason a precompiled Irix version is only intermittently available. You should try to make a 32-bit version of the program if possible.
If gcc is the only compiler on the system, the general procedure above should work.
Otherwise, set the CC environment variable to ``gcc -mips2'' or ``cc'' before
running ./configure, depending on whether gcc or the MIPSpro compiler is
desired (i.e., type setenv CC "gcc -mips2").
On some systems, it may be necessary to change the line
CF="-O2"
to
CF="-O2 -mips2"
in configure.in, and then rerun autoconf and configure.
The reason for this
is the wide variety of different compilers on Irix, each of which requires
different options, but which can't be distinguished by configure.
Note that some versions of the MIPSpro compiler also do not seem to handle C++ templates correctly. If you want to try it anyway do the following:
One user reported that only gcc 2.7.x worked with the -mips2 flag. The older gcc 2.7.x can be obtained from http://reality.sgi.com/ariel_engr/freeware/. You should also use the 32-bit libjpeg.so which can be obtained from freeware.sgi.com .
Libjpeg, the libjpeg include files, libtiff, and libpng must be on your system. If they are not found by configure, add the path to configure.in and rerun autoconf . If Xbae is not installed, and installing in the default locations is not possible, libXbae.a and its include files can be placed in a directory named ``Xbae'' under the xmtnimage source tree. If libXbae.a is not found, the program will still compile, but the spreadsheet will be disabled.
Finally, as if that weren't enough, Irix yacc produces incorrect C++ code. After running yacc, it is necessary to modify the following lines in y.tab.c:
#ifndef MIPS
extern int yylex(void);
#endif
should be changed to:
int yylex(void);
also,
#ifdef __cplusplus
extern "C" {
#endif
extern char *gettxt(const char *, const char *);
#if !defined(yylex) && !defined(__my_yylex)
extern int yylex(void);
#endif
#ifdef __cplusplus
}
#endif
should be changed to
extern char *gettxt(const char *, const char *);
#if !defined(yylex) && !defined(__my_yylex)
extern int yylex(void);
#endif
Flex and other libraries can be downloaded from http://freeware.sgi.com/index-by-alpha.html
If you install libflex, edit the makefile as shown below. If problems occur with mixed 32- and 64-bit libraries (for example crt1.o ), /usr/lib32 should be specified explicitly. The makefile should look something like:
OBJS = xmtnimage*.o lex.yy.o y.tab.o
LDFLAGS=-s
INCLUDES=-I. -I/usr/include -I/usr/include/X11 -I/usr/include/X11 -I. \
-I/usr/include
LIBS=-L/usr/lib32 -lm -ltiff -lXm -lXext -lXt -lX11 -lpng \
/usr/lib32/libjpeg.so /usr/freeware/lib32/libfl.a
CC=CC
CFLAGS=-O2
YACC=yacc -d
If the resulting executable has difficulty reading TIFF files (e.g., "Out of memory" errors), the most likely cause is an incorrect specification of byte order. This can be changed by adding the following line in xmtnimage.h before the line #include <unistd.h>
#undef LITTLE_ENDIAN