buildconf script configures directlry when -d / -c is given
[idzebra-moved-to-github.git] / buildconf.sh
1 #!/bin/sh
2 # $Id: buildconf.sh,v 1.13 2005-03-04 12:00:06 adam Exp $
3 set -x
4 dir=`aclocal --print-ac-dir`
5 aclocal -I .
6 libtoolize --automake --force 
7 automake -a 
8 automake -a 
9 autoconf
10 set -
11 if [ -f config.cache ]; then
12         rm config.cache
13 fi
14
15 enable_configure=false
16 enable_help=true
17 sh_flags=""
18 conf_flags=""
19 case $1 in
20     -d)
21         sh_flags="-g -Wall"
22         enable_configure=true
23         enable_help=false
24         shift
25         ;;
26     -c)
27         sh_flags=""
28         enable_configure=true
29         enable_help=false
30         shift
31         ;;
32 esac
33
34 if $enable_configure; then
35     if test -n "$sh_flags"; then
36         CFLAGS="$sh_flags" ./configure $*
37     else
38         ./configure $*
39     fi
40 fi
41 if $enable_help; then
42     cat <<EOF
43
44 Build the Makefiles with the configure command.
45   ./configure [--someoption=somevalue ...]
46
47 For help on options or configuring run
48   ./configure --help
49
50 Build and install binaries with the usual
51   make
52   make check
53   make install
54
55 Build distribution tarball with
56   make dist
57
58 Verify distribution tarball with
59   make distcheck
60
61 Or just build the Debian packages without configuring
62   dpkg-buildpackage -rfakeroot
63
64 When building from a CVS checkout, you need these Debian tools:
65   docbook-utils, docbook, docbook-xml, docbook-dsssl, jade, jadetex,
66   libyaz-dev, libexpat1-dev, libtcl8.3-dev, libbz2-dev
67 EOF
68 fi