summaryrefslogtreecommitdiff
path: root/autogen.sh
blob: d407d5f5b826f182604e687240b1013769942b6c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/bin/sh
./make_potfiles
if test -d /usr/local/share/aclocal; then
ACLOCAL_FLAGS="-I /usr/local/share/aclocal"
else
ACLOCAL_FLAGS=""
fi

LIBTOOLIZE=`which glibtoolize`
if test "x$LIBTOOLIZE" = "x"; then
  LIBTOOLIZE=`which libtoolize`
fi

if test "x$LIBTOOLIZE" = "x"; then
  echo "No libtoolize command found"
  exit 1
fi

echo -n "doing aclocal..."
aclocal $ACLOCAL_FLAGS -I m4

if test $? != "0"; then
  echo "failed"
  exit 1
fi

echo "done"


echo -n "doing libtoolize..."
$LIBTOOLIZE --automake --copy --force

if test $? != "0"; then
  echo "failed"
  exit 1
fi

echo "done"
echo -n "doing autoheader..."
autoheader

if test $? != "0"; then
  echo "failed"
  exit 1
fi

echo "done"
echo -n "doing autoconf..."
autoconf

if test $? != "0"; then
  echo "failed"
  exit 1
fi

echo "done"
echo -n "doing automake..."
automake -a
if test $? != "0"; then
  echo -n "automake failed in first try (broken version). Trying once more..."
  $LIBTOOLIZE --automake --copy --force
  automake -a
  if test $? != "0"; then
    echo "failed"
  exit 1
  else 
    echo "Success :)"
  fi
fi
echo "done"

echo "You can now run ./configure"