root/trunk/autogen.sh

Revision 1859, 2.5 kB (checked in by moo, 15 months ago)

marked as executable

  • Property svn:eol-style set to native
  • Property svn:executable set to *
Line 
1#!/bin/sh
2# Run this to generate all the initial makefiles, etc.
3
4# LIBTOOLIZE=${LIBTOOLIZE:-libtoolize}
5LIBTOOLIZE_FLAGS="--copy --force"
6# ACLOCAL=${ACLOCAL:-aclocal}
7# AUTOHEADER=${AUTOHEADER:-autoheader}
8# AUTOMAKE=${AUTOMAKE:-automake}
9AUTOMAKE_FLAGS="--add-missing --copy"
10# AUTOCONF=${AUTOCONF:-autoconf}
11
12ARGV0=$0
13ARGS="$@"
14
15
16run() {
17        echo "$ARGV0: running \`$@' $ARGS"
18        $@ $ARGS
19}
20
21## jump out if one of the programs returns 'false'
22set -e
23
24## on macosx glibtoolize, others have libtool
25if test x$LIBTOOLIZE = x; then
26  if test \! x`which glibtoolize 2> /dev/null` = x; then
27    LIBTOOLIZE=glibtoolize
28  elif test \! x`which libtoolize-1.5 2> /dev/null` = x; then
29    LIBTOOLIZE=libtoolize-1.5
30  elif test \! x`which libtoolize 2> /dev/null` = x; then
31    LIBTOOLIZE=libtoolize
32  else
33    echo "libtoolize 1.5.x wasn't found, exiting"; exit 0
34  fi
35fi
36
37## suse has aclocal and aclocal-1.9
38if test x$ACLOCAL = x; then
39  if test \! x`which aclocal-1.9 2> /dev/null` = x; then
40    ACLOCAL=aclocal-1.9
41  elif test \! x`which aclocal19 2> /dev/null` = x; then
42    ACLOCAL=aclocal19
43  elif test \! x`which aclocal 2> /dev/null` = x; then
44    ACLOCAL=aclocal
45  else
46    echo "automake 1.9.x (aclocal) wasn't found, exiting"; exit 0
47  fi
48fi
49
50if test x$AUTOMAKE = x; then
51  if test \! x`which automake-1.9 2> /dev/null` = x; then
52    AUTOMAKE=automake-1.9
53  elif test \! x`which automake19 2> /dev/null` = x; then
54    AUTOMAKE=automake19
55  elif test \! x`which automake 2> /dev/null` = x; then
56    AUTOMAKE=automake
57  else
58    echo "automake 1.9.x wasn't found, exiting"; exit 0
59  fi
60fi
61
62
63## macosx has autoconf-2.59 and autoconf-2.60
64if test x$AUTOCONF = x; then
65  if test \! x`which autoconf-2.59 2> /dev/null` = x; then
66    AUTOCONF=autoconf-2.59
67  elif test \! x`which autoconf259 2> /dev/null` = x; then
68    AUTOCONF=autoconf259
69  elif test \! x`which autoconf 2> /dev/null` = x; then
70    AUTOCONF=autoconf
71  else
72    echo "autoconf 2.59+ wasn't found, exiting"; exit 0
73  fi
74fi
75
76if test x$AUTOHEADER = x; then
77  if test \! x`which autoheader-2.59 2> /dev/null` = x; then
78    AUTOHEADER=autoheader-2.59
79  elif test \! x`which autoheader259 2> /dev/null` = x; then
80    AUTOHEADER=autoheader259
81  elif test \! x`which autoheader 2> /dev/null` = x; then
82    AUTOHEADER=autoheader
83  else
84    echo "autoconf 2.59+ (autoheader) wasn't found, exiting"; exit 0
85  fi
86fi
87
88
89run $LIBTOOLIZE $LIBTOOLIZE_FLAGS
90run $ACLOCAL $ACLOCAL_FLAGS
91run $AUTOHEADER
92run $AUTOMAKE $AUTOMAKE_FLAGS
93run $AUTOCONF
94test "$ARGS" = "" && echo "Now type './configure ...' and 'make' to compile."
Note: See TracBrowser for help on using the browser.