]> git.proxmox.com Git - mirror_smartmontools-debian.git/blobdiff - autogen.sh
Imported Upstream version 6.1+svn3812
[mirror_smartmontools-debian.git] / autogen.sh
index ca1c41118128a851b6b42a4bd75b06032233020e..90d1e9561565cb1f845fa9e9fe1de5efdb501a8c 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $Id: autogen.sh 3043 2010-01-22 19:24:59Z 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
@@ -32,7 +32,8 @@ typep()
     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` ||
 {
@@ -83,7 +84,7 @@ case "$ver" in
     rm -f casetest.tmp
     ;;
 
-  1.9.[1-6]|1.10|1.10.[12]|1.11|1.11.1)
+  1.9.[1-6]|1.10|1.10.[12]|1.11|1.11.[1-6]|1.12.[3-5])
     # OK
     ;;
 
@@ -92,9 +93,21 @@ case "$ver" in
     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