]>
git.ipfire.org Git - thirdparty/lldpd.git/blob - autogen.sh
5 [ ! -e .gitmodules
] ||
[ ! -e .git
] ||
{
6 echo "autogen.sh: updating git submodules"
13 LIBTOOLIZE
=${LIBTOOLIZE:-glibtoolize}
16 LIBTOOLIZE
=${LIBTOOLIZE:-libtoolize}
19 AUTORECONF
=${AUTORECONF:-autoreconf}
20 ACLOCAL
=${ACLOCAL:-aclocal}
21 AUTOCONF
=${AUTOCONF:-autoconf}
22 AUTOHEADER
=${AUTOHEADER:-autoheader}
23 AUTOMAKE
=${AUTOMAKE:-automake}
25 # Check we have all tools installed
27 command -v "${1}" > /dev
/null
2>&1 ||
{
28 >&2 echo "autogen.sh: could not find \`$1'. \`$1' is required to run autogen.sh."
32 check_command
"$LIBTOOLIZE"
33 check_command
"$AUTORECONF"
34 check_command
"$ACLOCAL"
35 check_command
"$AUTOCONF"
36 check_command
"$AUTOHEADER"
37 check_command
"$AUTOMAKE"
39 # Absence of pkg-config or misconfiguration can make some odd error
40 # messages, we check if it is installed correctly. See:
41 # https://blogs.oracle.com/mandy/entry/autoconf_weirdness
43 # We cannot just check for pkg-config command, we need to check for
44 # PKG_* macros. The pkg-config command can be defined in ./configure,
45 # we cannot tell anything when not present.
47 grep -q '^AC_DEFUN.*PKG_CHECK_MODULES' aclocal.
m4 ||
{
49 autogen.sh: could not find PKG_CHECK_MODULES macro.
51 Either pkg-config is not installed on your system or
52 \`pkg.m4' is missing or not found by aclocal.
54 If \`pkg.m4' is installed at an unusual location, re-run
55 \`autogen.sh' by setting \`ACLOCAL_FLAGS':
57 ACLOCAL_FLAGS="-I <prefix>/share/aclocal" ./autogen.sh
65 echo "autogen.sh: start libtoolize to get ltmain.sh"
66 ${LIBTOOLIZE} --copy --force
67 echo "autogen.sh: reconfigure with autoreconf"
68 ${AUTORECONF} -vif -I m4 ||
{
69 echo "autogen.sh: autoreconf has failed ($?), let's do it manually"
71 [ -d "$dir" ] ||
continue
72 [ -f "$dir"/configure.ac
] ||
[ -f "$dir"/configure.
in ] ||
continue
73 echo "autogen.sh: configure `basename $dir`"
74 (cd "$dir" && ${ACLOCAL} -I m4 ${ACLOCAL_FLAGS})
75 if [ x
"$dir" = x
"$PWD" ]; then
76 (cd "$dir" && check_pkg_config
)
78 (cd "$dir" && ${LIBTOOLIZE} --automake --copy --force)
79 (cd "$dir" && ${ACLOCAL} -I m4 ${ACLOCAL_FLAGS})
80 (cd "$dir" && ${AUTOCONF} --force)
81 (cd "$dir" && ${AUTOHEADER})
82 (cd "$dir" && ${AUTOMAKE} --add-missing --copy --force-missing)
86 echo "autogen.sh: for the next step, run ./configure"