#!/bin/sh
-# $Id: autogen.sh 2844 2009-07-18 12:59:21Z chrfranke $
+# $Id: autogen.sh 3748 2013-01-18 20:12:44Z chrfranke $
#
# Generate ./configure from config.in and Makefile.in from Makefile.am.
# This also adds files like missing,depcomp,install-sh to the source
return 1
}
-test -x "$AUTOMAKE" || AUTOMAKE=`typep automake-1.11` || AUTOMAKE=`typep automake-1.10` ||
+test -x "$AUTOMAKE" || AUTOMAKE=`typep automake-1.12` ||
+ AUTOMAKE=`typep automake-1.11` || AUTOMAKE=`typep automake-1.10` ||
AUTOMAKE=`typep automake-1.9` || AUTOMAKE=`typep automake-1.8` ||
AUTOMAKE=`typep automake-1.7` || AUTOMAKE=`typep automake17` ||
{
*automake-1.8)
ver=1.8 ;;
*)
- ver="`$AUTOMAKE --version | sed -n '1s,^.*\([12]\.[.0-9]*[-pl0-9]*\).*$,\1,p'`"
+ ver="`$AUTOMAKE --version | sed -n '1s,^.*[^.0-9]\([12]\.[0-9][-.0-9pl]*\).*$,\1,p'`"
ver="${ver:-?.?.?}"
esac
rm -f casetest.tmp
;;
- 1.9.[1-6]|1.10|1.10.[12]|1.11)
+ 1.9.[1-6]|1.10|1.10.[12]|1.11|1.11.[1-6]|1.12.[3-5])
# OK
;;
echo "Please report success/failure to the smartmontools-support mailing list."
esac
+# Install pkg-config macros
+# (Don't use 'aclocal -I m4 --install' to keep support for automake < 1.10)
+test -d m4 || mkdir m4 || exit 1
+test -f m4/pkg.m4 || acdir=`${ACLOCAL} --print-ac-dir` &&
+ test -n "$acdir" && test -f "$acdir/pkg.m4" &&
+{
+ echo "$0: installing \`m4/pkg.m4' from \`$acdir/pkg.m4'"
+ cp "$acdir/pkg.m4" m4/pkg.m4
+}
+test -f m4/pkg.m4 ||
+ echo "Warning: cannot install m4/pkg.m4, 'make dist' and systemd detection will not work."
+
set -e # stops on error status
-${ACLOCAL}
+${ACLOCAL} -I m4
autoheader
-${AUTOMAKE} --add-missing --copy --foreign
+${AUTOMAKE} --add-missing --copy
autoconf