3 # Helps generate autoconf/automake stuff, when code is checked
7 test -z "${SRCDIR}" && SRCDIR=.
13 test -f autogen.sh || {
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 (automake --version) < /dev/null > /dev/null || {
34 echo "You must have automake installed to generate procps-ng build system."
38 LTVER=$(libtoolize --version | awk '/^libtoolize/ { print $4 }')
39 LTVER=${LTVER:-"none"}
40 test ${LTVER##2.} = "${LTVER}" && {
41 echo "You must have libtoolize version >= 2.x.x, but you have ${LTVER}."
45 if test ${DIE} -ne 0; then
49 echo "Generate build-system by:"
50 echo " autopoint: $(autopoint --version | head -1)"
51 echo " aclocal: $(aclocal --version | head -1)"
52 echo " autoconf: $(autoconf --version | head -1)"
53 echo " autoheader: $(autoheader --version | head -1)"
54 echo " automake: $(automake --version | head -1)"
55 echo " libtoolize: $(libtoolize --version | head -1)"
61 autopoint --force $AP_OPTS
62 if ! grep -q datarootdir po/Makefile.in.in; then
63 echo autopoint does not honor dataroot variable, patching.
64 sed -i -e 's/^datadir *=\(.*\)/datarootdir = @datarootdir@\
65 datadir = @datadir@/g' po/Makefile.in.in
67 libtoolize --force ${LT_OPTS}
68 aclocal -I m4 ${AL_OPTS}
72 automake --add-missing ${AM_OPTS}
75 echo "Now type '${SRCDIR}/configure' and 'make' to compile."