]>
git.proxmox.com Git - mirror_smartmontools-debian.git/blob - autogen.sh
caf17449e8e87478283033b28cf0590701e372ad
2 # $Id: autogen.sh 4053 2015-04-14 20:18:50Z chrfranke $
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 # 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."
28 cmd
=$1 ; TMP
=$IFS ; IFS
=: ; set $PATH
31 if [ -x "$dir/$cmd" ]; then
41 test -x "$AUTOMAKE" ||
42 AUTOMAKE
=`typep automake-1.15` || AUTOMAKE
=`typep automake-1.14` ||
43 AUTOMAKE
=`typep automake-1.13` || AUTOMAKE
=`typep automake-1.12` ||
44 AUTOMAKE
=`typep automake-1.11` || AUTOMAKE
=`typep automake-1.10` ||
45 AUTOMAKE
=`typep automake-1.9` || AUTOMAKE
=`typep automake-1.8` ||
46 AUTOMAKE
=`typep automake-1.7` || AUTOMAKE
=`typep automake17` ||
49 echo "You must have at least GNU Automake 1.7 (up to 1.15) installed"
50 echo "in order to bootstrap smartmontools from SVN. Download the"
51 echo "appropriate package for your distribution, or the source tarball"
52 echo "from ftp://ftp.gnu.org/gnu/automake/ ."
54 echo "Also note that support for new Automake series (anything newer"
55 echo "than 1.15) is only added after extensive tests. If you live in"
56 echo "the bleeding edge, you should know what you're doing, mainly how"
57 echo "to test it before the developers. Be patient."
61 test -x "$ACLOCAL" || ACLOCAL
="aclocal`echo "$AUTOMAKE" | sed 's/.*automake//'`" && ACLOCAL
=`typep "$ACLOCAL"` ||
64 echo "autogen.sh found automake-1.X, but not the respective aclocal-1.X."
65 echo "Your installation of GNU Automake is broken or incomplete."
69 # Detect Automake version
71 *automake-1.7|
*automake17
)
76 ver
="`$AUTOMAKE --version | sed -n '1s,^.*[^.0-9]\([12]\.[0-9][-.0-9pl]*\).*$,\1,p'`"
80 # Warn if Automake version was not tested or does not support filesystem
84 # Check for case sensitive filesystem
85 # (to avoid e.g. "DIST_COMMON = ... ChangeLog ..." in Makefile.in on Cygwin)
88 test -f CASETEST.TMP
&&
90 echo "Warning: GNU Automake version ${ver} does not properly handle case"
91 echo "insensitive filesystems. Some make targets may not work."
96 1.9.
[1-6]|
1.10|
1.10.
[123]|
1.11|
1.11.
[1-6]|
1.12.
[2-6]|
1.13.
[34])
101 # TODO: Enable 'subdir-objects' in configure.ac
102 # For now, suppress 'subdir-objects' forward-incompatibility warning
103 test -n "$warnings" || amwarnings
="--warnings=no-unsupported"
107 echo "Note: GNU Automake version ${ver} was not tested by the developers."
108 echo "Please report success/failure to the smartmontools-support mailing list."
111 # Warn if Automake version is too old
115 echo "The use of GNU Automake version $ver is deprecated. Support for Automake"
116 echo "versions 1.7 - 1.9.x will be removed in a future release of smartmontools."
119 # Install pkg-config macros
120 # (Don't use 'aclocal -I m4 --install' to keep support for automake < 1.10)
121 test -d m4 || mkdir
m4 ||
exit 1
122 test -z "$force" ||
rm -f m
4/pkg.
m4
123 test -f m
4/pkg.
m4 || acdir
=`${ACLOCAL} --print-ac-dir` &&
124 test -n "$acdir" && test -f "$acdir/pkg.m4" &&
126 echo "$0: installing \`m4/pkg.m4' from \`$acdir/pkg.m4'"
127 cp "$acdir/pkg.m4" m
4/pkg.
m4
130 echo "Warning: cannot install m4/pkg.m4, 'make dist' and systemd detection will not work."
132 set -e # stops on error status
134 test -z "$warnings" ||
set -x
136 ${ACLOCAL} -I m4 $force $warnings
137 autoheader
$force $warnings
138 ${AUTOMAKE} --add-missing --copy ${force:+--force-missing} $amwarnings
139 autoconf
$force $warnings