root / pykota / trunk / autogen.sh @ 2074

Revision 1417, 3.2 kB (checked in by jalet, 20 years ago)

Inclusion of Michele Baldessari's work on autotools

  • 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
4srcdir=`dirname $0`
5test -z "$srcdir" && srcdir=.
6
7ORIGDIR=`pwd`
8cd $srcdir
9
10 PROJECT=pykota
11
12 CONFIGURE=configure.in
13
14 TEST_TYPE=-f
15 
16 DIE=0
17
18
19 for autoconf in autoconf autoconf-2.57 autoconf-2.56 autoconf-2.55 autoconf-2.54 autoconf-2.53 autoconf-2.52 ; do
20        if "$autoconf" --version < /dev/null > /dev/null 2>&1 ; then
21                version=`"$autoconf" --version | head -1 | awk '{print $NF}'`
22                acmajor=`echo "$version" | cut -f1 -d.`
23                acminor=`echo "$version" | cut -f2 -d.`
24                if test "$acmajor" -gt 3 ; then
25                        break
26                fi
27                if test "$acmajor" -ge 2 ; then
28                        if test "$acminor" -ge 50 ; then
29                                break
30                        fi
31                fi
32        fi
33 done
34 if ! "$autoconf" --version < /dev/null > /dev/null 2>&1 ; then
35
36        echo
37
38        echo "You must have autoconf 2.52 installed to compile $PROJECT."
39
40        echo "Install the appropriate package for your distribution,"
41
42        echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
43
44        DIE=1
45
46 fi
47 autoheader=`echo "$autoconf" | sed s,autoconf,autoheader,g`
48
49 have_automake=false
50
51 for automakev in 1.7 1.6 ; do
52
53        if automake-$automakev --version < /dev/null > /dev/null 2>&1 ; then
54
55                have_automake=true
56
57                break;
58        fi
59 done
60
61 if $have_automake ; then : ; else
62        echo
63
64        echo "You must have automake 1.6 installed to compile $PROJECT."
65        echo "Get ftp://ftp.gnu.org/pub/gnu/automake/automake-1.6.tar.gz"
66
67        echo "(or a newer version if it is available)"
68        DIE=1
69 fi
70 
71 if test "$DIE" -eq 1; then
72        exit 1
73 fi
74 
75 if test -z "$AUTOGEN_SUBDIR_MODE"; then
76         if test -z "$*"; then
77                 echo "I am going to run ./configure with no arguments - if you wish "
78                 echo "to pass any to it, please specify them on the $0 command line."
79         fi
80 fi
81 
82 case $CC in
83 *xlc | *xlc\ * | *lcc | *lcc\ *) am_opt=--include-deps;;
84 esac
85
86 if grep "^AM_[A-Z0-9_]\{1,\}_GETTEXT" "$CONFIGURE" >/dev/null; then
87  if grep "sed.*POTFILES" "$CONFIGURE" >/dev/null; then
88    GETTEXTIZE=""
89  else
90    if grep "^AM_GLIB_GNU_GETTEXT" "$CONFIGURE" >/dev/null; then
91      GETTEXTIZE="glib-gettextize"
92      GETTEXTIZE_URL="ftp://ftp.gtk.org/pub/gtk/v2.0/glib-2.0.0.tar.gz"
93    else
94      GETTEXTIZE="gettextize"
95      GETTEXTIZE_URL="ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
96    fi
97                                                                                                                                                                                   
98    $GETTEXTIZE --version < /dev/null > /dev/null 2>&1
99    if test $? -ne 0; then
100      echo
101      echo "**Error**: You must have \`$GETTEXTIZE' installed to compile $PKG_NAME."
102      echo "Get $GETTEXTIZE_URL"
103      echo "(or a newer version if it is available)"
104      DIE=1
105    fi
106  fi
107fi
108
109
110 touch config.h.in
111
112 echo "running autopoint --force --copy"
113 autopoint --force 
114
115 echo "running aclocal-$automakev $ACLOCAL_FLAGS"
116 aclocal-$automakev $ACLOCAL_FLAGS
117
118 echo "running $autoheader"
119 $autoheader
120
121 echo "running automake-$automakev -a -c $am_opt --foreign"
122 automake-$automakev -a -c $am_opt --foreign
123
124 echo "$autoconf"
125 $autoconf
126
127 cd $ORIGDIR
128 
129 if test -z "$AUTOGEN_SUBDIR_MODE"; then
130    $srcdir/configure --enable-maintainer-mode "$@"
131
132        chmod -Rf u+w $srcdir
133
134    echo
135    echo "Now type 'make' to compile $PROJECT."
136
137 fi
Note: See TracBrowser for help on using the browser.