3 # Helps generate autoconf/automake stuff, when code is checked
7 test -z "${SRCDIR}" && SRCDIR=.
14 echo "You must run this script in the top-level procps-ng directory"
18 (autopoint --version) < /dev/null > /dev/null 2>&1 || {
19 echo "You must have autopoint installed to generate procps-ng build system."
20 echo "The autopoint command is part of the GNU gettext package."
24 (autoconf --version) < /dev/null > /dev/null || {
25 echo "You must have autoconf installed to generate procps-ng build system."
28 (autoheader --version) < /dev/null > /dev/null || {
29 echo "You must have autoheader installed to generate procps-ng build system."
30 echo "The autoheader command is part of the GNU autoconf package."
33 (libtool --version) < /dev/null > /dev/null || {
34 echo "You must have libtool-2 installed to generate procps-ng build system."
37 (automake --version) < /dev/null > /dev/null || {
38 echo "You must have automake installed to generate procps-ng build system."
42 LTVER=$(libtoolize --version | awk '/^libtoolize/ { print $4 }')
43 LTVER=${LTVER:-"none"}
44 test ${LTVER##2.} = "${LTVER}" && {
45 echo "You must have libtoolize version >= 2.x.x, but you have ${LTVER}."
49 if test ${DIE} -ne 0; then
53 echo "Generate build-system by:"
54 echo " autopoint: $(autopoint --version | head -1)"
55 echo " aclocal: $(aclocal --version | head -1)"
56 echo " autoconf: $(autoconf --version | head -1)"
57 echo " autoheader: $(autoheader --version | head -1)"
58 echo " automake: $(automake --version | head -1)"
59 echo " libtoolize: $(libtoolize --version | head -1)"
65 autopoint --force $AP_OPTS
66 if ! grep -q datarootdir po/Makefile.in.in; then
67 echo autopoint does not honor dataroot variable, patching.
68 sed -i -e 's/^datadir *=\(.*\)/datarootdir = @datarootdir@\
69 datadir = @datadir@/g' po/Makefile.in.in
71 libtoolize --force ${LT_OPTS}
72 aclocal -I m4 ${AL_OPTS}
76 automake --add-missing ${AM_OPTS}
79 echo "Now type '${SRCDIR}/configure' and 'make' to compile."