8 #--------------------------------------------------------------------------
9 # autoconf 2.57 or newer
12 ac_version=`${AUTOCONF:-autoconf} --version 2>/dev/null|head -1| sed -e 's/^[^0-9]*//' -e 's/[a-z]* *$//'`
13 if test -z "$ac_version"; then
14 echo "buildconf: autoconf not found."
15 echo " You need autoconf version $need_autoconf or newer installed."
18 IFS=.; set $ac_version; IFS=' '
19 if test "$1" = "2" -a "$2" -lt "57" || test "$1" -lt "2"; then
20 echo "buildconf: autoconf version $ac_version found."
21 echo " You need autoconf version $need_autoconf or newer installed."
22 echo " If you have a sufficient autoconf installed, but it"
23 echo " is not named 'autoconf', then try setting the"
24 echo " AUTOCONF environment variable."
28 echo "buildconf: autoconf version $ac_version (ok)"
30 #--------------------------------------------------------------------------
31 # autoheader 2.50 or newer
33 ah_version=`${AUTOHEADER:-autoheader} --version 2>/dev/null|head -1| sed -e 's/^[^0-9]*//' -e 's/[a-z]* *$//'`
34 if test -z "$ah_version"; then
35 echo "buildconf: autoheader not found."
36 echo " You need autoheader version 2.50 or newer installed."
39 IFS=.; set $ah_version; IFS=' '
40 if test "$1" = "2" -a "$2" -lt "50" || test "$1" -lt "2"; then
41 echo "buildconf: autoheader version $ah_version found."
42 echo " You need autoheader version 2.50 or newer installed."
43 echo " If you have a sufficient autoheader installed, but it"
44 echo " is not named 'autoheader', then try setting the"
45 echo " AUTOHEADER environment variable."
49 echo "buildconf: autoheader version $ah_version (ok)"
51 #--------------------------------------------------------------------------
52 # automake 1.7 or newer
55 am_version=`${AUTOMAKE:-automake} --version 2>/dev/null|head -1| sed -e 's/^.* \([0-9]\)/\1/' -e 's/[a-z]* *$//'`
56 if test -z "$am_version"; then
57 echo "buildconf: automake not found."
58 echo " You need automake version $need_automake or newer installed."
61 IFS=.; set $am_version; IFS=' '
62 if test "$1" = "1" -a "$2" -lt "7" || test "$1" -lt "1"; then
63 echo "buildconf: automake version $am_version found."
64 echo " You need automake version $need_automake or newer installed."
65 echo " If you have a sufficient automake installed, but it"
66 echo " is not named 'autommake', then try setting the"
67 echo " AUTOMAKE environment variable."
71 echo "buildconf: automake version $am_version (ok)"
74 #--------------------------------------------------------------------------
75 # libtool 1.5 or newer
77 LIBTOOL_WANTED_MAJOR=1
78 LIBTOOL_WANTED_MINOR=4
79 LIBTOOL_WANTED_PATCH=2
80 LIBTOOL_WANTED_VERSION=1.4.2
82 libtool=`which glibtool 2>/dev/null`
83 if test ! -x "$libtool"; then
84 libtool=`which libtool`
86 #lt_pversion=`${LIBTOOL:-$libtool} --version 2>/dev/null|head -1| sed -e 's/^.* \([0-9]\)/\1/' -e 's/[a-z]* *$//'`
87 lt_pversion=`$libtool --version 2>/dev/null|head -1|sed -e 's/^[^0-9]*//g' -e 's/[- ].*//'`
88 if test -z "$lt_pversion"; then
89 echo "buildconf: libtool not found."
90 echo " You need libtool version $LIBTOOL_WANTED_VERSION or newer installed"
93 lt_version=`echo $lt_pversion` #|sed -e 's/\([a-z]*\)$/.\1/'`
94 IFS=.; set $lt_version; IFS=' '
96 if test "$1" = "$LIBTOOL_WANTED_MAJOR"; then
97 if test "$2" -lt "$LIBTOOL_WANTED_MINOR"; then
99 elif test ! -z "$LIBTOOL_WANTED_PATCH"; then
100 if test -n "$3"; then
101 if test "$3" -lt "$LIBTOOL_WANTED_PATCH"; then
107 if test $lt_status != "good"; then
108 echo "buildconf: libtool version $lt_pversion found."
109 echo " You need libtool version $LIBTOOL_WANTED_VERSION or newer installed"
113 echo "buildconf: libtool version $lt_version (ok)"
115 # ------------------------------------------------------------
117 # run the correct scripts now
119 echo "buildconf: running libtoolize"
120 ${LIBTOOLIZE:-libtoolize} --copy --automake || die "The command '${LIBTOOLIZE:-libtoolize} --copy --automake' failed"
121 echo "buildconf: running aclocal"
122 ${ACLOCAL:-aclocal} || die "The command '${AUTOHEADER:-aclocal}' failed"
123 echo "buildconf: running autoheader"
124 ${AUTOHEADER:-autoheader} || die "The command '${AUTOHEADER:-autoheader}' failed"
125 echo "buildconf: running autoconf"
126 ${AUTOCONF:-autoconf} || die "The command '${AUTOCONF:-autoconf}' failed"
127 echo "buildconf: running automake"
128 ${AUTOMAKE:-automake} -a || die "The command '${AUTOMAKE:-automake} -a' failed"