Ignore more files
[yazpp-moved-to-github.git] / buildconf.sh
1 #!/bin/sh
2 # $Id: buildconf.sh,v 1.17 2006-07-07 06:21:29 adam Exp $
3
4 test -d config || mkdir config
5 if test -d m4/.git -a -d doc/common/.git; then
6     :
7 else
8     git submodule init
9     git submodule update
10 fi
11
12 if automake --version|head -1 |grep '1\.[4-7]'; then
13     echo "automake 1.4-1.7 is active. You should use automake 1.8 or later"
14     if test -f /etc/debian_version; then
15         echo " sudo apt-get install automake1.9"
16         echo " sudo update-alternatives --config automake"
17     fi
18     exit 1
19 fi
20
21 set -x
22 # I am tired of underquoted warnings for Tcl macros
23 aclocal -I m4 2>&1 | grep -v aclocal/tcl.m4
24 libtoolize --automake --force 
25 automake --add-missing 
26 autoconf
27 set -
28 if [ -f config.cache ]; then
29         rm config.cache
30 fi
31
32 enable_configure=false
33 enable_help=true
34 sh_flags=""
35 conf_flags=""
36 case $1 in
37     -d)
38         sh_flags="-g -Wall"
39         enable_configure=true
40         enable_help=false
41         shift
42         ;;
43     -c)
44         sh_flags=""
45         enable_configure=true
46         enable_help=false
47         shift
48         ;;
49 esac
50
51 if $enable_configure; then
52     if test -n "$sh_flags"; then
53         CFLAGS="$sh_flags" CXXFLAGS="$sh_flags" ./configure --disable-shared --enable-static $*
54     else
55         ./configure $*
56     fi
57 fi
58 if $enable_help; then
59     cat <<EOF
60
61 Build the Makefiles with the configure command.
62   ./configure [--someoption=somevalue ...]
63
64 For help on options or configuring run
65   ./configure --help
66
67 Build and install binaries with the usual
68   make
69   make check
70   make install
71
72 Build distribution tarball with
73   make dist
74
75 Verify distribution tarball with
76   make distcheck
77
78 Or just build the Debian packages without configuring
79   dpkg-buildpackage -rfakeroot
80
81 When building from a CVS checkout, you need these Debian tools:
82   autoconf, automake, libtool, gcc, g++, libyaz-dev,
83   xsltproc, docbook, docbook-xml, docbook-xsl, make,
84   libssl-dev, libreadline5-dev, g++
85 EOF
86 fi