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