build: fixup autoconf for cross-compiling (to OpenWRT)

MALLOC/REALLOC aren't used properly (no rpl_malloc), remove them

while at it, infer some sane ipforwarding method from the OS value.
(v2 on that, "==" is not a proper operator for standard "test")
This commit is contained in:
David Lamparter 2009-09-16 02:11:00 +02:00 committed by Denis Ovsienko
parent a34eb3689c
commit ca9f342c2c

View File

@ -692,11 +692,9 @@ dnl ----------------------------
AC_FUNC_CHOWN AC_FUNC_CHOWN
AC_FUNC_FNMATCH AC_FUNC_FNMATCH
AC_FUNC_FORK AC_FUNC_FORK
AC_FUNC_MALLOC
AC_FUNC_MEMCMP AC_FUNC_MEMCMP
AC_FUNC_MKTIME AC_FUNC_MKTIME
AC_FUNC_STRFTIME AC_FUNC_STRFTIME
AC_FUNC_REALLOC
AC_FUNC_STAT AC_FUNC_STAT
AC_FUNC_SELECT_ARGTYPES AC_FUNC_SELECT_ARGTYPES
AC_FUNC_STRFTIME AC_FUNC_STRFTIME
@ -1008,10 +1006,18 @@ dnl -----------------------------
dnl check ipforward detect method dnl check ipforward detect method
dnl ----------------------------- dnl -----------------------------
AC_CACHE_CHECK([ipforward method], [quagga_cv_ipforward_method], AC_CACHE_CHECK([ipforward method], [quagga_cv_ipforward_method],
[for quagga_cv_ipforward_method in /proc/net/snmp /dev/ip /dev/null; [if test x$cross_compiling = xyes; then
do if test x"$opsys" = x"gnu-linux"; then
test x`ls $quagga_cv_ipforward_method 2>/dev/null` = x"$quagga_cv_ipforward_method" && break quagga_cv_ipforward_method=/proc/net/snmp
done else
quagga_cv_ipforward_method=/dev/ip
fi
else
for quagga_cv_ipforward_method in /proc/net/snmp /dev/ip /dev/null;
do
test x`ls $quagga_cv_ipforward_method 2>/dev/null` = x"$quagga_cv_ipforward_method" && break
done
fi
case $quagga_cv_ipforward_method in case $quagga_cv_ipforward_method in
"/proc/net/snmp") quagga_cv_ipforward_method="proc";; "/proc/net/snmp") quagga_cv_ipforward_method="proc";;
"/dev/ip") "/dev/ip")