Fix deactivation of device when failed underlying node disappeared
[platform/upstream/cryptsetup.git] / autogen.sh
1 #!/bin/sh
2 # Run this to generate all the initial makefiles, etc.
3
4 srcdir=`dirname $0`
5 PKG_NAME="cryptsetup"
6
7 DIE=0
8
9 (autopoint --version) < /dev/null > /dev/null 2>&1 || {
10   echo
11   echo "**Error**: You must have autopoint installed."
12   echo "Download the appropriate package for your distribution,"
13   echo "or see http://www.gnu.org/software/gettext"
14   DIE=1
15 }
16
17 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
18   echo
19   echo "**Error**: You must have autoconf installed to."
20   echo "Download the appropriate package for your distribution,"
21   echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
22   DIE=1
23 }
24
25 (grep "^AM_PROG_LIBTOOL" $srcdir/configure.ac >/dev/null) && {
26   (libtool --version) < /dev/null > /dev/null 2>&1 || {
27     echo
28     echo "**Error**: You must have libtool installed."
29     echo "Get ftp://ftp.gnu.org/pub/gnu/"
30     echo "(or a newer version if it is available)"
31     DIE=1
32   }
33 }
34
35 (automake --version) < /dev/null > /dev/null 2>&1 || {
36   echo
37   echo "**Error**: You must have automake installed."
38   echo "Get ftp://ftp.gnu.org/pub/gnu/"
39   echo "(or a newer version if it is available)"
40   DIE=1
41   NO_AUTOMAKE=yes
42 }
43
44
45 # if no automake, don't bother testing for aclocal
46 test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
47   echo
48   echo "**Error**: Missing aclocal.  The version of automake"
49   echo "installed doesn't appear recent enough."
50   echo "Get ftp://ftp.gnu.org/pub/gnu/"
51   echo "(or a newer version if it is available)"
52   DIE=1
53 }
54
55 if test "$DIE" -eq 1; then
56   exit 1
57 fi
58
59 if test -z "$*"; then
60   echo
61   echo "**Warning**: I am going to run 'configure' with no arguments."
62   echo "If you wish to pass any to it, please specify them on the"
63   echo \'$0\'" command line."
64 fi
65
66 echo
67 echo "Generate build-system by:"
68 echo "   autopoint:  $(autopoint --version | head -1)"
69 echo "   aclocal:    $(aclocal --version | head -1)"
70 echo "   autoconf:   $(autoconf --version | head -1)"
71 echo "   automake:   $(automake --version | head -1)"
72 echo "   libtoolize: $(libtoolize --version | head -1)"
73 echo
74
75
76 set -e
77 autopoint --force $AP_OPTS
78 libtoolize --force --copy
79 aclocal -I m4 $AL_OPTS
80 autoheader $AH_OPTS
81 automake --add-missing --gnu $AM_OPTS
82 autoconf $AC_OPTS
83
84 if test x$NOCONFIGURE = x; then
85   echo Running $srcdir/configure $conf_flags "$@" ...
86   $srcdir/configure $conf_flags "$@" \
87   && echo Now type \`make\' to compile $PKG_NAME
88 else
89   echo Skipping configure process.
90 fi