]>
git.proxmox.com Git - mirror_smartmontools-debian.git/blob - autogen.sh
2 # $Id: autogen.sh 4838 2018-11-27 17:27:02Z chrfranke $
4 # Generate ./configure from configure.ac and Makefile.in from Makefile.am.
5 # This also adds files like missing,depcomp,install-sh to the source
6 # directory. To update these files at a later date use:
10 while [ $# -gt 0 ]; do case $1 in
11 --force) force
=$1; shift ;;
12 --warnings=?
*) warnings
="${warnings} $1"; shift ;;
13 *) echo "Usage: $0 [--force] [--warnings=CATEGORY ...]"; exit 1 ;;
17 test -x /usr
/bin
/uname
&& /usr
/bin
/uname |
grep -i CYGWIN
>/dev
/null
&&
19 # Check for Unix text file type
21 test "`wc -c < dostest.tmp`" -eq 1 ||
22 echo "Warning: DOS text file type set, 'make dist' and related targets will not work."
27 if [ -n "$AUTOMAKE" ]; then
28 ver
=$
("$AUTOMAKE" --version) ||
exit 1
31 for v
in 1.16 1.15 1.14 1.13 1.12 1.11 1.10; do
32 minver
=$v; test -n "$maxver" || maxver
=$v
33 ver
=$
(automake-
$v --version 2>/dev
/null
) ||
continue
34 AUTOMAKE
="automake-$v"
37 if [ -z "$AUTOMAKE" ]; then
38 echo "GNU Automake $minver (up to $maxver) is required to bootstrap smartmontools from SVN."
43 ver
=$
(echo "$ver" |
sed -n '1s,^.*[^.0-9]\([12]\.[0-9][-.0-9pl]*\).*$,\1,p')
44 if [ -z "$ver" ]; then
45 echo "$AUTOMAKE: Unable to determine automake version."
50 if [ -z "$ACLOCAL" ]; then
51 ACLOCAL
="aclocal$(echo "$AUTOMAKE" | sed -n 's,^.*automake\(-[.0-9]*\),\1,p')"
54 "$ACLOCAL" --version >/dev
/null ||
exit 1
56 # Warn if Automake version was not tested
59 1.10|
1.10.
[123]|
1.11|
1.11.
[1-6]|
1.12.
[2-6]|
1.13.
[34])
63 1.14|
1.14.1|
1.15|
1.15.1|
1.16|
1.16.1)
64 # TODO: Enable 'subdir-objects' in configure.ac
65 # For now, suppress 'subdir-objects' forward-incompatibility warning
66 test -n "$warnings" || amwarnings
="--warnings=no-unsupported"
70 echo "Note: GNU Automake version ${ver} was not tested by the developers."
71 echo "Please report success/failure to the smartmontools-support mailing list."
74 # required for aclocal-1.10 --install
75 test -d m4 || mkdir
m4 ||
exit 1
77 set -e # stops on error status
79 test -z "$warnings" ||
set -x
81 ${ACLOCAL} -I m4 --install $force $warnings
82 autoheader
$force $warnings
83 ${AUTOMAKE} --add-missing --copy ${force:+--force-missing} $amwarnings
84 autoconf
$force $warnings