Fixed build error by poppler-cpp
[platform/upstream/cups-filters.git] / autogen.sh
1 #!/bin/sh
2 TESTLIBTOOLIZE="glibtoolize libtoolize"
3
4 LIBTOOLIZEFOUND="0"
5
6 srcdir=`dirname $0`
7 test -z "$srcdir" && srcdir=.
8
9 olddir=`pwd`
10 cd $srcdir
11
12 aclocal --version > /dev/null 2> /dev/null || {
13     echo "error: aclocal not found"
14     exit 1
15 }
16 automake --version > /dev/null 2> /dev/null || {
17     echo "error: automake not found"
18     exit 1
19 }
20
21 for i in $TESTLIBTOOLIZE; do
22         if which $i > /dev/null 2>&1; then
23                 LIBTOOLIZE=$i
24                 LIBTOOLIZEFOUND="1"
25                 break
26         fi
27 done
28
29 if [ "$LIBTOOLIZEFOUND" = "0" ]; then
30         echo "$0: need libtoolize tool to build cups-filters" >&2
31         exit 1
32 fi
33
34 amcheck=`automake --version | grep 'automake (GNU automake) 1.5'`
35 if test "x$amcheck" = "xautomake (GNU automake) 1.5"; then
36     echo "warning: you appear to be using automake 1.5"
37     echo "         this version has a bug - GNUmakefile.am dependencies are not generated"
38 fi
39
40 rm -rf autom4te*.cache
41
42 $LIBTOOLIZE --force --copy || {
43     echo "error: libtoolize failed"
44     exit 1
45 }
46 aclocal $ACLOCAL_FLAGS || {
47     echo "error: aclocal $ACLOCAL_FLAGS failed"
48     exit 1
49 }
50 autoheader || {
51     echo "error: autoheader failed"
52     exit 1
53 }
54 automake -a -c --gnu --add-missing || {
55     echo "warning: automake failed"
56 }
57 autoconf || {
58     echo "error: autoconf failed"
59     exit 1
60 }