1#! /bin/sh
2
3PROJECT=Origin
4FILE=
5CONFIGURE=configure.ac
6
7: ${AUTOCONF=autoconf}
8: ${AUTOHEADER=autoheader}
9: ${AUTOMAKE=automake}
10: ${LIBTOOLIZE=libtoolize}
11: ${ACLOCAL=aclocal}
12: ${LIBTOOL=libtool}
13
14srcdir=`dirname $0`
15test -z "$srcdir" && srcdir=.
16
17ORIGDIR=`pwd`
18cd $srcdir
19TEST_TYPE=-f
20aclocalinclude="-I . $ACLOCAL_FLAGS"
21
22DIE=0
23
24($AUTOCONF --version) < /dev/null > /dev/null 2>&1 || {
25        echo
26        echo "You must have autoconf installed to compile $PROJECT."
27        echo "Download the appropriate package for your distribution,"
28        echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
29        DIE=1
30}
31
32($AUTOMAKE --version) < /dev/null > /dev/null 2>&1 || {
33        echo
34        echo "You must have automake installed to compile $PROJECT."
35        echo "Get ftp://sourceware.cygnus.com/pub/automake/automake-1.4.tar.gz"
36        echo "(or a newer version if it is available)"
37        DIE=1
38}
39
40(grep "^AM_PROG_LIBTOOL" $CONFIGURE >/dev/null) && {
41  ($LIBTOOL --version) < /dev/null > /dev/null 2>&1 || {
42    echo
43    echo "**Error**: You must have \`libtool' installed to compile $PROJECT."
44    echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz"
45    echo "(or a newer version if it is available)"
46    DIE=1
47  }
48}
49
50if test "$DIE" -eq 1; then
51        exit 1
52fi
53
54#test $TEST_TYPE $FILE || {
55#        echo "You must run this script in the top-level $PROJECT directory"
56#        exit 1
57#}
58
59if test -z "$*"; then
60        echo "I am going to run ./configure with no arguments - if you wish "
61        echo "to pass any to it, please specify them on the $0 command line."
62fi
63
64case $CC in
65*xlc | *xlc\ * | *lcc | *lcc\ *) am_opt=--include-deps;;
66esac
67
68(grep "^AM_PROG_LIBTOOL" $CONFIGURE >/dev/null) && {
69    echo "Running $LIBTOOLIZE ..."
70    $LIBTOOLIZE --force --copy
71}
72
73echo "Running $ACLOCAL $aclocalinclude ..."
74$ACLOCAL $aclocalinclude
75
76echo "Running $AUTOMAKE --gnu $am_opt ..."
77$AUTOMAKE --add-missing --gnu $am_opt
78
79echo "Running $AUTOCONF ..."
80$AUTOCONF
81
82echo Running $srcdir/configure $conf_flags "$@" ...
83$srcdir/configure --enable-maintainer-mode $conf_flags "$@" \
84