root/config/autorun.sh

Revision cd7c6dd57bbc8aba47b72d9b975f5062c729286d, 3.3 kB (checked in by RedBrain - Philip Herron <herron.philip@…>, 3 years ago)

On branch master

strictness to gnu :)

modified: config/autorun.sh

  • Property mode set to 100755
Line 
1#!/usr/bin/env bash
2# Taken from lighthttpd server (BSD). Thanks Jan!
3# Run this to generate all the initial makefiles, etc.
4
5die() { echo "$@"; exit 1; }
6
7# LIBTOOLIZE=${LIBTOOLIZE:-libtoolize}
8LIBTOOLIZE_FLAGS=" --automake --copy --force"
9# ACLOCAL=${ACLOCAL:-aclocal}
10ACLOCAL_FLAGS="-I m4"
11# AUTOHEADER=${AUTOHEADER:-autoheader}
12# AUTOMAKE=${AUTOMAKE:-automake}
13# --add-missing instructs automake to install missing auxiliary files
14# --copy tells it to make copies and not symlinks
15AUTOMAKE_FLAGS="--gnu --add-missing --copy --force"
16# AUTOCONF=${AUTOCONF:-autoconf}
17
18ARGV0=$0
19ARGS="$@"
20
21
22run() {
23        echo "$ARGV0: running \`$@' $ARGS"
24        $@ $ARGS
25}
26
27## jump out if one of the programs returns 'false'
28set -e
29
30if test x$LIBTOOLIZE = x; then
31  if test \! "x`which glibtoolize 2> /dev/null | grep -v '^no'`" = x; then
32    LIBTOOLIZE=glibtoolize
33  elif test \! "x`which libtoolize-1.5 2> /dev/null | grep -v '^no'`" = x; then
34    LIBTOOLIZE=libtoolize-1.5
35  elif test \! "x`which libtoolize 2> /dev/null | grep -v '^no'`" = x; then
36    LIBTOOLIZE=libtoolize
37  elif test \! "x`which glibtoolize 2> /dev/null | grep -v '^no'`" = x; then
38    LIBTOOLIZE=glibtoolize
39  else
40    echo "libtoolize 1.5.x wasn't found, exiting"; exit 1
41  fi
42fi
43
44if test x$ACLOCAL = x; then
45  if test \! "x`which aclocal-1.10 2> /dev/null | grep -v '^no'`" = x; then
46    ACLOCAL=aclocal-1.10
47  elif test \! "x`which aclocal110 2> /dev/null | grep -v '^no'`" = x; then
48    ACLOCAL=aclocal110
49  elif test \! "x`which aclocal 2> /dev/null | grep -v '^no'`" = x; then
50    ACLOCAL=aclocal
51  else
52    echo "automake 1.10.x (aclocal) wasn't found, exiting"; exit 1
53  fi
54fi
55
56if test x$AUTOMAKE = x; then
57  if test \! "x`which automake-1.10 2> /dev/null | grep -v '^no'`" = x; then
58    AUTOMAKE=automake-1.10
59  elif test \! "x`which automake110 2> /dev/null | grep -v '^no'`" = x; then
60    AUTOMAKE=automake110
61  elif test \! "x`which automake 2> /dev/null | grep -v '^no'`" = x; then
62    AUTOMAKE=automake
63  else
64    echo "automake 1.10.x wasn't found, exiting"; exit 1
65  fi
66fi
67
68
69## macosx has autoconf-2.59 and autoconf-2.60
70if test x$AUTOCONF = x; then
71  if test \! "x`which autoconf-2.59 2> /dev/null | grep -v '^no'`" = x; then
72    AUTOCONF=autoconf-2.59
73  elif test \! "x`which autoconf259 2> /dev/null | grep -v '^no'`" = x; then
74    AUTOCONF=autoconf259
75  elif test \! "x`which autoconf 2> /dev/null | grep -v '^no'`" = x; then
76    AUTOCONF=autoconf
77  else
78    echo "autoconf 2.59+ wasn't found, exiting"; exit 1
79  fi
80fi
81
82if test x$AUTOHEADER = x; then
83  if test \! "x`which autoheader-2.59 2> /dev/null | grep -v '^no'`" = x; then
84    AUTOHEADER=autoheader-2.59
85  elif test \! "x`which autoheader259 2> /dev/null | grep -v '^no'`" = x; then
86    AUTOHEADER=autoheader259
87  elif test \! "x`which autoheader 2> /dev/null | grep -v '^no'`" = x; then
88    AUTOHEADER=autoheader
89  else
90    echo "autoconf 2.59+ (autoheader) wasn't found, exiting"; exit 1
91  fi
92fi
93
94
95# --force means overwrite ltmain.sh script if it already exists
96run $LIBTOOLIZE $LIBTOOLIZE_FLAGS || die "Can't execute libtoolize"
97
98run $ACLOCAL $ACLOCAL_FLAGS || die "Can't execute aclocal"
99run $AUTOHEADER || die "Can't execute autoheader"
100run $AUTOMAKE $AUTOMAKE_FLAGS  || die "Can't execute automake"
101run $AUTOCONF || die "Can't execute autoconf"
102echo -n "Automade with: "
103$AUTOMAKE --version | head -1
104echo -n "Configured with: "
105$AUTOCONF --version | head -1
Note: See TracBrowser for help on using the browser.