]> git.proxmox.com Git - mirror_smartmontools-debian.git/blob - autogen.sh
document changes
[mirror_smartmontools-debian.git] / autogen.sh
1 #!/bin/sh
2 # $Id: autogen.sh,v 1.13 2005/09/19 09:28:11 chrfranke Exp $
3 #
4 # Generate ./configure from config.in and Makefile.in from Makefile.am.
5 # This also adds files like missing,depcomp,install-sh to the source
6 # direcory. To update these files at a later date use:
7 # autoreconf -f -i -v
8
9
10 # Cygwin?
11 test -x /usr/bin/uname && /usr/bin/uname | grep -i CYGWIN >/dev/null &&
12 {
13 # Enable strict case checking
14 # (to avoid e.g. "DIST_COMMON = ... ChangeLog ..." in Makefile.in)
15 export CYGWIN="${CYGWIN}${CYGWIN:+ }check_case:strict"
16
17 # Check for Unix text file type
18 echo > dostest.tmp
19 test "`wc -c < dostest.tmp`" -eq 1 ||
20 echo "Warning: DOS text file type set, 'make dist' and related targets will not work."
21 rm -f dostest.tmp
22 }
23
24 typep()
25 {
26 cmd=$1 ; TMP=$IFS ; IFS=: ; set $PATH
27 for dir
28 do
29 if [ -x "$dir/$cmd" ]; then
30 echo "$dir/$cmd"
31 IFS=$TMP
32 return 0
33 fi
34 done
35 IFS=$TMP
36 return 1
37 }
38
39 test -x "$AUTOMAKE" || AUTOMAKE=`typep automake-1.9` || AUTOMAKE=`typep automake-1.8` || AUTOMAKE=`typep automake-1.7` || AUTOMAKE=`typep automake17` ||
40 {
41 echo
42 echo "You must have at least GNU Automake 1.7 (up to 1.9.x) installed"
43 echo "in order to bootstrap smartmontools from CVS. Download the"
44 echo "appropriate package for your distribution, or the source tarball"
45 echo "from ftp://ftp.gnu.org/gnu/automake/ ."
46 echo
47 echo "Also note that support for new Automake series (anything newer"
48 echo "than 1.9.x) is only added after extensive tests. If you live in"
49 echo "the bleeding edge, you should know what you're doing, mainly how"
50 echo "to test it before the developers. Be patient."
51 exit 1;
52 }
53
54 test -x "$ACLOCAL" || ACLOCAL="aclocal`echo "$AUTOMAKE" | sed 's/.*automake//'`" && ACLOCAL=`typep "$ACLOCAL"` ||
55 {
56 echo
57 echo "autogen.sh found automake-1.7, automake-1.8, or automake-1.9 in"
58 echo "your PATH, but not the respective aclocal-1.7, aclocal-1.8, or"
59 echo "aclocal-1.9. Your installation of GNU Automake is broken or"
60 echo "incomplete."
61 exit 2;
62 }
63
64 # Warn if Automake version is unknown
65 ver=
66 case "$AUTOMAKE" in
67 *automake-1.[78]|*automake17)
68 ;;
69 *)
70 ver="`$AUTOMAKE --version | head -1 | sed -n 's,^.*\([12]\.[.0-9]*[-pl0-9]*\).*$,\1,p'`"
71 ver="${ver:-?.?.?}"
72 case "$ver" in
73 1.[78]*|1.9.[1-6]) ver= ;;
74 esac ;;
75 esac
76
77 test -z "$ver" ||
78 {
79 echo "Note: GNU Automake version ${ver} was not tested by the developers."
80 echo "Please report success/failure to the smartmontools-support mailing list."
81 }
82
83 set -e # stops on error status
84
85 ${ACLOCAL}
86 autoheader
87 ${AUTOMAKE} --add-missing --copy --foreign
88 autoconf