root / branches / linbox-2.0.0 / autogen.sh

Revision 2815, 4.4 kB (checked in by pernet, 1 year ago)

Applied M Abshoff patch, for local copy of automake files.

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
Line 
1#!/bin/sh
2# Run this to generate all the initial makefiles, etc.
3
4echo "$0 $*" > autogen.status
5chmod +x autogen.status
6
7srcdir=`dirname $0`
8test -z "$srcdir" && srcdir=.
9
10PKG_NAME="Linbox Library"
11
12(test -f $srcdir/configure.in \
13  && test -f $srcdir/linbox/linbox.doxy) || {
14    echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
15    echo " top-level "\`$PKG_NAME\'" directory"
16    exit 1
17}
18
19ORIGDIR=`pwd`
20cd $srcdir
21PROJECT=linbox
22TEST_TYPE=-f
23
24DIE=0
25
26(autoconf --version) < /dev/null > /dev/null 2>&1 || {
27        echo
28        echo "You must have autoconf installed to compile $PROJECT."
29        echo "Download the appropriate package for your distribution,"
30        echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
31        DIE=1
32}
33
34(automake --version) < /dev/null > /dev/null 2>&1 || {
35        echo
36        echo "You must have automake installed to compile $PROJECT."
37        echo "Download the appropriate package for your distribution,"
38        echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
39        DIE=1
40 }
41 
42(libtool --version) < /dev/null > /dev/null 2>&1 || {
43        echo
44        echo "You must have libtool installed to compile $PROJECT."
45        echo "Download the appropriate package for your distribution,"
46        echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
47        DIE=1
48}
49
50
51(grep "^AM_PROG_LIBTOOL" configure.in >/dev/null) && {
52  (libtool --version) < /dev/null > /dev/null 2>&1 || {
53    echo
54    echo "You must have libtool installed to compile $PROJECT."
55    echo "Download the appropriate package for your distribution,"
56    echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
57    DIE=1
58  }
59}
60
61grep "^AM_GNU_GETTEXT" configure.in >/dev/null && {
62  grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \
63  (gettext --version) < /dev/null > /dev/null 2>&1 || {
64    echo
65    echo "You must have gettext installed to compile $PROJECT."
66    echo "Download the appropriate package for your distribution,"
67    echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
68    DIE=1
69  }
70}
71
72if test "$DIE" -eq 1; then
73        exit 1
74fi
75
76
77if test -z "$*"; then
78        echo "I am going to run ./configure with no arguments - if you wish "
79        echo "to pass any to it, please specify them on the $0 command line."
80fi
81
82case $CC in
83*xlc | *xlc\ * | *lcc | *lcc\ *) am_opt=--include-deps;;
84esac
85
86for coin in `find . -name configure.in -print`
87do
88  dr=`dirname $coin`
89  if test -f $dr/NO-AUTO-GEN; then
90    echo skipping $dr -- flagged as no auto-gen
91  else
92    echo processing $dr
93    macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin`
94    ( cd $dr
95      aclocalinclude="$ACLOCAL_FLAGS"
96      for k in $macrodirs; do
97        if test -d $k; then
98          aclocalinclude="$aclocalinclude -I $k"
99        ##else
100        ##  echo "**Warning**: No such directory \`$k'.  Ignored."
101        fi
102      done
103      if grep "^AM_GNU_GETTEXT" configure.in >/dev/null; then
104        if grep "sed.*POTFILES" configure.in >/dev/null; then
105          : do nothing -- we still have an old unmodified configure.in
106        else
107          echo "Creating $dr/aclocal.m4 ..."
108          test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
109          echo "Running gettextize...  Ignore non-fatal messages."
110          echo "no" | gettextize --force --copy
111          echo "Making $dr/aclocal.m4 writable ..."
112          test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
113        fi
114      fi
115      if grep "^AM_GNOME_GETTEXT" configure.in >/dev/null; then
116        echo "Creating $dr/aclocal.m4 ..."
117        test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
118        echo "Running gettextize...  Ignore non-fatal messages."
119        echo "no" | gettextize --force --copy
120        echo "Making $dr/aclocal.m4 writable ..."
121        test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
122      fi
123      if grep "^AC_PROG_LIBTOOL" configure.in >/dev/null; then
124        echo "Running libtoolize..."
125        libtoolize --force --copy
126      fi
127      echo "Running aclocal $aclocalinclude ..."
128      aclocal $aclocalinclude
129      if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then
130        echo "Running autoheader..."
131        autoheader
132      fi
133      echo "Running automake --gnu $am_opt ..."
134      automake -c --add-missing --gnu $am_opt
135      echo "Running autoconf ..."
136      autoconf
137    )
138  fi
139done
140
141conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
142
143cd "$ORIGDIR"
144
145if test x$NOCONFIGURE = x; then
146  echo Running $srcdir/configure $conf_flags "$@" ...
147  $srcdir/configure $conf_flags "$@" \
148  && echo Now type \`make\' to compile $PROJECT  || exit 1
149else
150  echo Skipping configure process.
151fi
Note: See TracBrowser for help on using the browser.