-AX_PROG_BISON([
- BISON=`echo $YACC | $SED -e 's/ -y//'`
- BISON_VERSION=`$BISON -V | $SED -e 's/^bison (GNU Bison) \(.*\)$/\1/p;d'`
-], [AC_MSG_ERROR([You need bison 2.4 or greater])])
-AC_PROG_AWK
-AC_MSG_CHECKING([if bison is >= 2.4])
-AS_VERSION_COMPARE([$BISON_VERSION], [2.4], [
- AC_MSG_RESULT([no])
- AC_MSG_ERROR([You need bison 2.4 or greater])
-], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([yes])])
-AC_SUBST([BISON])
-AX_PROG_FLEX([
- FLEX=$LEX
- FLEX_VERSION=`$FLEX --version | $SED -e 's/^.* \(.*\)$/\1/p;d'`
-], [
- AC_MSG_ERROR([You need flex 2.5.35 or greater])
+LT_INIT([disable-static])
+PKG_PROG_PKG_CONFIG([0.22])
+AX_CHECK_GNU_MAKE
+AC_SUBST([GMAKE], [$_cv_gnu_make_command])
+AC_SUBST([LTFLAGS])
+AS_IF([test "x$GMAKE" = x], [AC_MSG_ERROR([You need GNU make])])
+AC_PATH_PROGS([_BASH], [bash])
+AS_IF([test "x$_BASH" = x], [AC_MSG_ERROR([You need GNU bash])])
+AC_PATH_PROGS([TIME], [time])
+AC_DEFUN([CY_CHECK_PROGS_VERSION], [
+ AC_MSG_CHECKING(for ]$2[ >= ]$5[)
+ AC_PATH_PROGS_FEATURE_CHECK(]$1[, ]$3[,
+ AS_VERSION_COMPARE(`$ac_path_]$1[ ]$4[`, ]$5[, ,
+ ac_cv_path_]$1[=$ac_path_]$1[
+ ,
+ ac_cv_path_]$1[=$ac_path_]$1[
+ )
+ ,
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR(You need ]$2[ ]$5[ or greater)
+ )
+ AC_SUBST(]$1[, $ac_cv_path_]$1[)
+ AC_MSG_RESULT($]$1[)
+])
+AC_ARG_VAR([BISON], [GNU Project parser generator (yacc replacement)])
+CY_CHECK_PROGS_VERSION([BISON], [bison], [bison],
+ [-V | $SED -e '1 s/^bison (GNU Bison) \(.*\)$/\1/p;d'], [2.3])
+AC_ARG_VAR([FLEX], [the fast lexical analyser generator])
+CY_CHECK_PROGS_VERSION([FLEX], [flex], [flex],
+ [--version | $SED -e '1 s/^@<:@^0-9.@:>@* \(@<:@0-9.@:>@*\).*$/\1/p;d'], [2.5.33])
+AC_ARG_VAR([GPERF], [perfect hash function generator])
+CY_CHECK_PROGS_VERSION([GPERF], [gperf], [gperf],
+ [--version | $SED -e '1 s/^.* \(@<:@0-9.@:>@*\)$/\1/p;d'], [3.0.3])
+AC_PROG_INSTALL
+AC_MSG_CHECKING([for GNU tar >=1.19])
+AC_PATH_PROGS_FEATURE_CHECK([GNUTAR], [tar gtar gnutar], [
+ AS_IF([test "x`$ac_path_GNUTAR --version | $SED -e '1 s/^tar (GNU tar)/&/p;d'`" != x], [
+ AS_VERSION_COMPARE([`$ac_path_GNUTAR --version | $SED -e '1 s/^tar (GNU tar) \(.*\)$/\1/p;d'`], [1.19], , [
+ ac_cv_path_GNUTAR=$ac_path_GNUTAR
+ ], [
+ ac_cv_path_GNUTAR=$ac_path_GNUTAR
+ ])
+ ])