~cordia-team/+junk/hildon-home

« back to all changes in this revision

Viewing changes to autogen.sh

  • Committer: Thomas-Karl Pietrowski
  • Date: 2011-10-09 16:56:50 UTC
  • Revision ID: thopiekar@googlemail.com-20111009165650-4c3oct3pk33c2fb3
first release

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
ACLOCAL_FLAGS="$ACLOCAL_FLAGS"
 
4
DIE=0
 
5
 
 
6
srcdir=`dirname $0`
 
7
test -z "$srcdir" && srcdir=.
 
8
 
 
9
(autoconf --version) < /dev/null > /dev/null 2>&1 || {
 
10
  echo
 
11
  echo "**Error**: You must have \`autoconf' installed."
 
12
  echo "Download the appropriate package for your distribution,"
 
13
  echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
 
14
  DIE=1
 
15
}
 
16
 
 
17
if [ -z "$LIBTOOL" ]; then
 
18
  LIBTOOL=`which glibtool 2>/dev/null` 
 
19
  if [ ! -x "$LIBTOOL" ]; then
 
20
    LIBTOOL=`which libtool`
 
21
  fi
 
22
fi
 
23
 
 
24
(grep "^AM_PROG_LIBTOOL" $srcdir/configure.ac >/dev/null) && {
 
25
  ($LIBTOOL --version) < /dev/null > /dev/null 2>&1 || {
 
26
    echo
 
27
    echo "**Error**: You must have \`libtool' installed."
 
28
    echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz"
 
29
    echo "(or a newer version if it is available)"
 
30
    DIE=1
 
31
  }
 
32
}
 
33
 
 
34
(automake --version) < /dev/null > /dev/null 2>&1 || {
 
35
  echo
 
36
  echo "**Error**: You must have \`automake' installed."
 
37
  echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
 
38
  echo "(or a newer version if it is available)"
 
39
  DIE=1
 
40
  NO_AUTOMAKE=yes
 
41
}
 
42
 
 
43
# if no automake, don't bother testing for aclocal
 
44
test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
 
45
  echo
 
46
  echo "**Error**: Missing \`aclocal'.  The version of \`automake'"
 
47
  echo "installed doesn't appear recent enough."
 
48
  echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
 
49
  echo "(or a newer version if it is available)"
 
50
  DIE=1
 
51
}
 
52
 
 
53
if test "$DIE" -eq 1; then
 
54
  exit 1
 
55
fi
 
56
 
 
57
if [ -z "$*" -a "x$NOCONFIGURE" = "x" ]; then
 
58
  echo "**Warning**: I am going to run \`configure' with no arguments."
 
59
  echo "If you wish to pass any to it, please specify them on the"
 
60
  echo \`$0\'" command line."
 
61
  echo
 
62
fi
 
63
 
 
64
case $CC in
 
65
xlc )
 
66
  am_opt=--include-deps;;
 
67
esac
 
68
 
 
69
 
 
70
if grep "^AM_PROG_LIBTOOL" configure.ac >/dev/null; then
 
71
  if test -z "$NO_LIBTOOLIZE" ; then 
 
72
    echo "Running libtoolize..."
 
73
    libtoolize --force --copy
 
74
  fi
 
75
fi
 
76
 
 
77
echo "Running aclocal $ACLOCAL_FLAGS ..."
 
78
aclocal $ACLOCAL_FLAGS || {
 
79
  echo
 
80
  echo "**Error**: aclocal failed. This may mean that you have not"
 
81
  echo "installed all of the packages you need, or you may need to"
 
82
  echo "set ACLOCAL_FLAGS to include \"-I \$prefix/share/aclocal\""
 
83
  echo "for the prefix where you installed the packages whose"
 
84
  echo "macros were not found"
 
85
  exit 1
 
86
}
 
87
 
 
88
if grep "^AM_CONFIG_HEADER" configure.ac >/dev/null; then
 
89
  echo "Running autoheader..."
 
90
  autoheader || { echo "**Error**: autoheader failed."; exit 1; }
 
91
fi
 
92
 
 
93
echo "Running automake --gnu $am_opt ..."
 
94
automake --add-missing --gnu $am_opt ||
 
95
  { echo "**Error**: automake failed."; exit 1; }
 
96
echo "Running autoconf ..."
 
97
autoconf || { echo "**Error**: autoconf failed."; exit 1; }
 
98
 
 
99
 
 
100
conf_flags="--enable-maintainer-mode"
 
101
 
 
102
if test x$NOCONFIGURE = x; then
 
103
  echo Running $srcdir/configure $conf_flags "$@" ...
 
104
  $srcdir/configure $conf_flags "$@" \
 
105
  && echo Now type \`make\' to compile $PKG_NAME || exit 1
 
106
else
 
107
  echo Skipping configure process.
 
108
fi