]> git.ipfire.org Git - thirdparty/util-linux.git/blob - autogen.sh
flock: fix printf format error in usage()
[thirdparty/util-linux.git] / autogen.sh
1 #!/bin/sh
2
3 #
4 # Helps generate autoconf/automake stuff, when code is checked out from SCM.
5 #
6 # Copyright (C) 2006-2009 - Karel Zak <kzak@redhat.com>
7 #
8
9 srcdir=`dirname $0`
10 test -z "$srcdir" && srcdir=.
11
12 THEDIR=`pwd`
13 cd $srcdir
14 DIE=0
15
16 (autopoint --version) < /dev/null > /dev/null 2>&1 || {
17 echo
18 echo "You must have autopoint installed to generate util-linux-ng build system.."
19 echo "Download the appropriate package for your distribution,"
20 echo "or see http://www.gnu.org/software/gettext"
21 DIE=1
22 }
23 (autoconf --version) < /dev/null > /dev/null 2>&1 || {
24 echo
25 echo "You must have autoconf installed to generate util-linux-ng build system."
26 echo
27 echo "Download the appropriate package for your distribution,"
28 echo "or see http://www.gnu.org/software/autoconf"
29 DIE=1
30 }
31
32 #(libtool --version) < /dev/null > /dev/null 2>&1 || {
33 # echo
34 # echo "You must have libtool-2 installed to generate util-linux-ng build system."
35 # echo "Download the appropriate package for your distribution,"
36 # echo "or see http://www.gnu.org/software/libtool"
37 # DIE=1
38 #}
39
40 (automake --version) < /dev/null > /dev/null 2>&1 || {
41 echo
42 echo "You must have automake installed to generate util-linux-ng build system."
43 echo
44 echo "Download the appropriate package for your distribution,"
45 echo "or see http://www.gnu.org/software/automake"
46 DIE=1
47 }
48 (autoheader --version) < /dev/null > /dev/null 2>&1 || {
49 echo
50 echo "You must have autoheader installed to generate util-linux-ng build system."
51 echo
52 echo "Download the appropriate package for your distribution,"
53 echo "or see http://www.gnu.org/software/autoheader"
54 DIE=1
55 }
56 if test "$DIE" -eq 1; then
57 exit 1
58 fi
59
60 test -f mount/mount.c || {
61 echo "You must run this script in the top-level util-linux-ng directory"
62 exit 1
63 }
64
65 #ltver=$(libtoolize --version | awk '/^libtoolize/ { print $4 }')
66 #test ${ltver##2.} == "$ltver" && {
67 # echo "You must have libtool version >= 2.x.x, but you have $ltver."
68 # exit 1
69 #}
70
71 echo
72 echo "Generate build-system by:"
73 echo " autopoint: $(autopoint --version | head -1)"
74 echo " aclocal: $(aclocal --version | head -1)"
75 echo " autoconf: $(autoconf --version | head -1)"
76 echo " autoheader: $(autoheader --version | head -1)"
77 echo " automake: $(automake --version | head -1)"
78 #echo " libtoolize: $(libtoolize --version | head -1)"
79 echo
80
81 set -e
82 autopoint --force $AP_OPTS
83 #libtoolize --force --copy $LT_OPTS
84 aclocal -I m4 $AL_OPTS
85 autoconf $AC_OPTS
86 autoheader $AH_OPTS
87 automake --add-missing $AM_OPTS
88
89 cd $THEDIR
90
91 echo
92 echo "Now type '$srcdir/configure' and 'make' to compile."
93 echo
94
95