forked from libpcp/pcp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
autogen.sh
executable file
·24 lines (19 loc) · 1.05 KB
/
autogen.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
rm -rf autom4te.cache
rm -f aclocal.m4 ltmain.sh
autoconf_minor_version=`autoconf --version | egrep -o "^autoconf.* ([0-9]+\.[0-9]+)" | egrep -o "([0-9]+)$"`
autoconf_major_version=`autoconf --version | egrep -o "^autoconf.* ([0-9]+\.[0-9]+)" | egrep -o " ([0-9]+)"`
if ! [ $autoconf_minor_version -gt "61" -a $autoconf_major_version -ge "2" ]; then
[ -f configure.ac.orig ] || mv configure.ac configure.ac.orig
grep -v -e AM_PROG_AR configure.ac.orig >configure.ac
sed -i 's/AM_SILENT_RULES.*/AC_MSG_NOTICE\(\[\]\)/' configure.ac
sed -i 's/AC_PREREQ.*/AC_PREREQ\(\[2\.61\]\)/' configure.ac
sed -i 's/color-tests subdir-objects//' configure.ac
fi
mkdir -p m4
echo "Running aclocal..." ; aclocal $ACLOCAL_FLAGS -I m4 || exit 1
echo "Running autoheader..." ; autoheader || exit 1
echo "Running autoconf..." ; autoconf || exit 1
echo "Running libtoolize..." ; (libtoolize --copy --automake || glibtoolize --automake) || exit 1
echo "Running automake..." ; automake --add-missing --copy --gnu || exit 1
[ -f configure.ac.orig ] && mv configure.ac.orig configure.ac