File: bootstrap

package info (click to toggle)
coin 1.0.4-6
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 13,272 kB
  • ctags: 14,754
  • sloc: cpp: 111,242; sh: 9,180; ansic: 5,303; makefile: 3,267; yacc: 174; lex: 99; perl: 8
file content (151 lines) | stat: -rwxr-xr-x 4,039 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
#!/bin/sh

# Regenerate all files which are constructed by the autoconf, automake
# and libtool tool-chain. Note: only developers should need to use
# this script.

# Author: Morten Eriksen, <mortene@sim.no>.


wd=`echo "$0" | sed 's,[^\/]*$,,g'`;
me=`echo "$0" | sed 's,^.*/,,g'`;

cd $wd
if test ! -f ./"$me"; then
  echo >&2 "$me: error: unexpected problem with your shell - bailing out"
  exit 1
fi

if test x"$@" = x"" -a ! -f cfg/mkinstalldirs; then
  echo "$me: assuming '--add' was meant."
  set : --add
  shift
fi

AUTOCONF_VER=2.5[023456789]
AUTOMAKE_VER=1.5
LIBTOOL_VER=1.4.2

PROJECT=Coin
MACRODIR=cfg/m4
AUTOMAKE_ADD=

do_libtoolize=false
if test "$1" = "--clean"; then
  rm -f aclocal.m4 \
        config.h.in \
        stamp-h*
  ( cd cfg;
    rm -f aclocal.m4 \
          config.guess \
          config.sub \
          configure \
          depcomp \
          install-sh \
          ltconfig \
          ltmain.sh \
          missing \
          mkinstalldirs \
          ltcf-*.sh
  )
  find . -name Makefile.in -print | grep -v "^./data/" | xargs rm -f
  exit
elif test "$1" = "--add"; then
  AUTOMAKE_ADD="--add-missing --gnu --copy"
  do_libtoolize=true
fi

echo "Checking the installed configuration tools..."

if test -z "`autoconf --version 2>/dev/null | grep \" $AUTOCONF_VER\"`"; then
  echo ""
  echo "You must have autoconf version $AUTOCONF_VER installed to"
  echo "generate configure information and Makefiles for $PROJECT."
  echo ""
  echo "Get ftp://ftp.gnu.org/gnu/autoconf/autoconf-$AUTOCONF_VER.tar.gz"
  DIE=true
fi

if test -z "`automake --version 2>/dev/null | grep \" $AUTOMAKE_VER\"`"; then
  echo ""
  echo "You must have automake version $AUTOMAKE_VER installed to"
  echo "generate configure information and Makefiles for $PROJECT."
  echo ""
  echo "(The Automake version we are using is the bleeding edge"
  echo "from the CVS repository.)"
  DIE=true
fi

libtoolize=false
if libtoolize --version >/dev/null 2>&1; then
  libtoolize=libtoolize
elif glibtoolize --version >/dev/null 2>&1; then
  libtoolize=glibtoolize
fi

if test -z "`$libtoolize --version 2>/dev/null | egrep \"$LIBTOOL_VER\"`"; then
  echo ""
  echo "You must have libtool version $LIBTOOL_VER installed to"
  echo "generate configure information and Makefiles for $PROJECT."
  echo ""
  echo "Go to ftp://ftp.gnu.org/gnu/libtool/"
  DIE=true
fi

# The separate $MACRODIR module was added late in the project, and
# since we need to do a cvs checkout to obtain it (cvs update won't do
# with modules), we run this check.

if test ! -d $MACRODIR; then
  cvs -z3 checkout -P $MACRODIR
  if test ! -d $MACRODIR; then
    echo ""
    echo "Couldn't fetch $MACRODIR module!"
    echo ""
    echo "Directory ``$MACRODIR'' (a separate CVS module) seems to be missing."
    echo "You probably checked out $PROJECT before ``$MACRODIR'' was added."
    echo "Run 'cvs -d :pserver:cvs@cvs.sim.no:/export/cvsroot co $MACRODIR'"
    echo "to try again."
    DIE=true
  fi
fi

# abnormal exit?
${DIE=false} && echo "" && echo "Aborted." && exit 1

# **************************************************************************

echo "Running aclocal (generating aclocal.m4)..."
rm -f aclocal.m4.old
test -f aclocal.m4 && mv aclocal.m4 aclocal.m4.old
aclocal -I $MACRODIR
if test -f aclocal.m4.old; then
  if cmp -s aclocal.m4 aclocal.m4.old; then
    echo "aclocal: aclocal.m4 is unchanged"
    rm -f aclocal.m4
    mv aclocal.m4.old aclocal.m4
  else
    rm -f aclocal.m4.old
  fi
fi

if $do_libtoolize; then
  $libtoolize --copy --force
  ( cd cfg;
    test -f ltmain.sh.diff && patch -p0 < ltmain.sh.diff
    test -f ltconfig.diff  && patch -p0 < ltconfig.diff
  )
fi

echo "Running autoconf (generating the configure script)..."
( autoconf 3>&1 1>&2 2>&3 | grep -v AR_FLAGS) 3>&1 1>&2 2>&3

echo "Running autoheader (generating config.h.in)..."
autoheader

echo "Running automake (generating the Makefile.in files)..."
( automake $AUTOMAKE_ADD 3>&1 1>&2 2>&3 | \
  grep -v 'not a standard library name' ) 3>&1 1>&2 2>&3

echo "Done."