Commit 8de11deb authored by Ondrej Zajicek's avatar Ondrej Zajicek
Browse files

Better checks for M4 in configure.

parent 6c84554b
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -145,3 +145,16 @@ if test -z "$bird_cv_sys_linux_version" ; then
	AC_MSG_ERROR([Cannot determine kernel version])
fi
])])

# BIRD_CHECK_PROG_FLAVOR_GNU(PROGRAM-PATH, IF-SUCCESS, [IF-FAILURE])
# copied autoconf internal _AC_PATH_PROG_FLAVOR_GNU
m4_define([BIRD_CHECK_PROG_FLAVOR_GNU],
[# Check for GNU $1
case `"$1" --version 2>&1` in
*GNU*)
  $2;;
m4_ifval([$3],
[*)
  $3;;
])esac
])#
+9 −4
Original line number Diff line number Diff line
@@ -14,6 +14,9 @@ AC_ARG_ENABLE(ipv6,[ --enable-ipv6 enable building of IPv6 version (d
AC_ARG_WITH(sysconfig,[  --with-sysconfig=FILE   use specified BIRD system configuration file])
AC_ARG_WITH(protocols,[  --with-protocols=LIST   include specified routing protocols (default: all)],,[with_protocols="all"])
AC_ARG_WITH(sysinclude,[  --with-sysinclude=PATH  search for system includes on specified place])
AC_ARG_VAR([FLEX], [location of the Flex program]) 
AC_ARG_VAR([BISON], [location of the Bison program]) 
AC_ARG_VAR([M4], [location of the M4 program]) 

if test "$srcdir" = . ; then
	# Building in current directory => create obj directory holding all objects
@@ -76,10 +79,12 @@ AC_PROG_INSTALL
AC_PROG_RANLIB
AC_CHECK_PROG(FLEX, flex, flex)
AC_CHECK_PROG(BISON, bison, bison)
AC_CHECK_PROGS(M4, gm4 m4, m4)
if test -z "$FLEX" -o -z "$BISON" -o -z "$M4" ; then
	AC_MSG_ERROR([Some tools required for building BIRD are missing.])
	fi
AC_CHECK_PROGS(M4, gm4 m4)

test -z "$FLEX"	 && AC_MSG_ERROR([Flex is missing.])
test -z "$BISON" && AC_MSG_ERROR([Bison is missing.])
test -z "$M4"	 && AC_MSG_ERROR([M4 is missing.])
BIRD_CHECK_PROG_FLAVOR_GNU([$M4], , [AC_MSG_ERROR([Provided M4 is not GNU M4.])])

if test -n "$with_sysconfig" -a "$with_sysconfig" != no ; then
	if test -f $with_sysconfig ; then