2958b695109f6baa33c2c9965fd6d614e90921f0
[platform/upstream/libexif.git] / autogen.sh
1 #!/bin/sh
2 # Run this to generate all the initial makefiles, etc.
3 # This was lifted from the Gimp, and adapted slightly by
4 # Raph Levien .
5
6 DIE=0
7 srcdir=`dirname $0`
8 test -z "$srcdir" && srcdir=.
9 test "$srcdir" = "." && srcdir=`pwd`
10
11 PROJECT=libexif
12
13 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
14     echo
15     echo "You must have autoconf installed to compile $PROJECT."
16     echo "Download the appropriate package for your distribution,"
17     echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
18     DIE=1
19 }
20
21 (libtool --version) < /dev/null > /dev/null 2>&1 || {
22     echo
23     echo "You must have libtool installed to compile $PROJECT."
24     echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2.tar.gz"
25     echo "(or a newer version if it is available)"
26     DIE=1
27 }
28
29 (automake --version) < /dev/null > /dev/null 2>&1 || {
30     echo
31     echo "You must have automake installed to compile $PROJECT."
32     echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
33     echo "(or a newer version if it is available)"
34     DIE=1
35 }
36
37 if test "$DIE" -eq 1; then
38     exit 1
39 fi
40
41 test -f libexif/exif.h || {
42         echo "You must run this script in the top-level gphoto2 directory"
43         exit 1
44 }
45
46 if test -z "$*"; then
47     echo "I am going to run ./configure with no arguments - if you wish "
48     echo "to pass any to it, please specify them on the $0 command line."
49 fi
50
51
52 case "$CC" in
53 *xlc | *xlc\ * | *lcc | *lcc\ *) am_opt=--include-deps;;
54 esac
55
56 echo "Running aclocal $ACLOCAL_FLAGS"
57 aclocal $ACLOCAL_FLAGS
58 echo "Running autoheader"
59 autoheader
60 echo "Running automake --add-missing --gnu $am_opt"
61 automake --add-missing --gnu $am_opt
62 echo "Running autoconf"
63 autoconf
64 echo "Running ./configure"
65 ./configure "$@"
66
67 echo 
68 echo "Now type 'make' to compile $PROJECT."