]> git.mxchange.org Git - flightgear.git/blob - autogen.sh
Removed unused cur_view_fdm variable as suggested by Bernie Bright.
[flightgear.git] / autogen.sh
1 #!/bin/sh
2
3 OSTYPE=`uname -s`
4 MACHINE=`uname -m`
5 AUTO_MAKE_VERSION=`automake --version | head -1 | awk '{print $4}' | sed -e 's/\-p[0-9]$//' | sed -e 's/\.//'`
6
7 echo "Host info: $OSTYPE $MACHINE"
8 echo -n " automake: `automake --version | head -1 | awk '{print $4}'`"
9 echo " ($AUTO_MAKE_VERSION)"
10 echo ""
11
12 ACLOCAL_OPTS=""
13 if [ $AUTO_MAKE_VERSION -ge 14 ]; then
14     if [ $OSTYPE = "IRIX" -o $OSTYPE = "IRIX64" ]; then    echo " -I ."
15         ACLOCAL_OPTS="-I ."
16     fi
17 fi
18 echo "Running aclocal $ACLOCAL_OPTS"
19 aclocal $ACLOCAL_OPTS
20
21 echo "Running autoheader"
22 autoheader
23 if [ ! -e src/Include/config.h.in ]; then
24     echo "ERROR: autoheader didn't create simgear/simgear_config.h.in!"
25     exit 1
26 fi    
27
28 echo -n "Running automake"
29 if [ $OSTYPE = "IRIX" -o $OSTYPE = "IRIX64" ]; then
30     echo " --add-missing --include-deps"
31     automake --add-missing --include-deps
32 else
33     echo " --add-missing"
34     automake --add-missing
35 fi
36
37 echo "Running autoconf"
38 autoconf
39
40 if [ ! -e configure ]; then
41     echo "ERROR: configure was not created!"
42     exit 1
43 fi
44
45 # fixup Makefiles for Irix
46 if test "$OSTYPE" = "IRIX" -o "$OSTYPE" = "IRIX64"; then
47     echo "Fixing Makefiles for Irix"
48     for n in `find . -name Makefile.in`; do \
49         mv -f $n $n.ar-new; \
50         sed 's/$(AR) cru/$(AR) -o/g' $n.ar-new > $n; \
51         rm -f $n.ar-new; \
52     done;
53 fi
54
55 echo ""
56 echo "======================================"
57
58 if [ -f config.cache ]; then
59     echo "config.cache exists.  Removing the config.cache file will force"
60     echo "the ./configure script to rerun all it's tests rather than using"
61     echo "the previously cached values."
62     echo ""
63 fi
64
65 echo "Now you are ready to run './configure'"
66 echo "======================================"