#!/bin/sh
CONFIG="config.h"
echo "/* System features detected by configure */" > $CONFIG
echo -n "Looking for ng_bpf ..."
if [ -e /usr/include/netgraph/ng_bpf.h \
-o -e /usr/include/bpf/netgraph/ng_bpf.h ]
then
echo " found."
echo "#define HAVE_NG_BPF 1" >> $CONFIG
else
echo " not found."
fi
echo -n "Looking for ng_car ..."
if [ -e /usr/include/netgraph/ng_car.h ]
then
echo " found."
echo "#define HAVE_NG_CAR 1" >> $CONFIG
else
echo " not found."
fi
echo -n "Looking for ng_deflate ..."
if [ -e /usr/include/netgraph/ng_deflate.h ]
then
echo " found."
echo "#define HAVE_NG_DEFLATE 1" >> $CONFIG
else
echo " not found."
fi
echo -n "Looking for ng_ipacct ..."
if [ "$USE_NG_IPACCT" = no ]; then
echo " disabled."
else if [ -e /usr/include/netgraph/ng_ipacct.h \
-o -e /usr/local/include/netgraph/ng_ipacct.h ]
then
echo " found."
echo "#define HAVE_NG_IPACCT 1" >> $CONFIG
else
echo " not found."
fi
fi
echo -n "Looking for ng_mppc ..."
if [ -e /usr/include/netgraph/ng_mppc.h \
-o -e /usr/include/netgraph/mppc/ng_mppc.h ]
then
echo " found."
echo "#define HAVE_NG_MPPC 1" >> $CONFIG
else
echo " not found."
fi
echo -n "Looking for ng_nat ..."
if [ -e /usr/include/netgraph/ng_nat.h ]
then
echo " found."
echo "#define HAVE_NG_NAT 1" >> $CONFIG
else
echo " not found."
fi
echo -n "Looking for ng_netflow ..."
if [ -e /usr/include/netgraph/netflow/ng_netflow.h \
-o -e /usr/local/include/netgraph/netflow/ng_netflow.h ]
then
if [ -e /usr/include/netgraph/netflow/ng_netflow.h ] && \
/usr/bin/grep NG_NETFLOW_HOOK_OUT /usr/include/netgraph/netflow/ng_netflow.h >/dev/null 2>&1
then
echo " found."
echo "#define HAVE_NG_NETFLOW 1" >> $CONFIG
elif [ -e /usr/local/include/netgraph/netflow/ng_netflow.h ] && \
/usr/bin/grep NG_NETFLOW_HOOK_OUT /usr/local/include/netgraph/netflow/ng_netflow.h >/dev/null 2>&1
then
echo " found."
echo "#define HAVE_NG_NETFLOW 1" >> $CONFIG
else
echo " too old, unsupported."
fi
else
echo " not found."
fi
echo -n "Looking for ng_pred1 ..."
if [ -e /usr/include/netgraph/ng_pred1.h ]
then
echo " found."
echo "#define HAVE_NG_PRED1 1" >> $CONFIG
else
echo " not found."
fi
echo -n "Looking for ng_tcpmss ..."
if [ -e /usr/include/netgraph/ng_tcpmss.h ]
then
echo " found."
echo "#define HAVE_NG_TCPMSS 1" >> $CONFIG
else
echo " not found."
fi
echo -n "Looking for ng_vjc ..."
if [ -e /usr/include/netgraph/ng_vjc.h \
-o -e /usr/include/vjc/netgraph/ng_vjc.h ]
then
echo " found."
echo "#define HAVE_NG_VJC 1" >> $CONFIG
else
echo " not found."
fi
echo -n "Looking for ipfw ..."
if [ -e /sbin/ipfw ]
then
echo " found."
echo "#define HAVE_IPFW 1" >> $CONFIG
else
echo " not found."
fi
echo -n "Looking for rad_bind_to() ..."
if /usr/bin/grep rad_bind_to /usr/include/radlib.h >/dev/null 2>&1
then
echo " found."
echo "#define HAVE_RAD_BIND 1" >> $CONFIG
else
echo " not found."
fi
echo -n "Looking for rad_cvt_addr6() ..."
if /usr/bin/grep rad_cvt_addr6 /usr/include/radlib.h >/dev/null 2>&1
then
echo " found."
echo "#define HAVE_RAD_ADDR6 1" >> $CONFIG
else
echo " not found."
fi
echo -n "Looking for ether_ntoa_r() ..."
if /usr/bin/grep ether_ntoa_r /usr/include/net/ethernet.h >/dev/null 2>&1
then
echo " found."
echo "#define HAVE_NTOA_R 1" >> $CONFIG
else
echo " not found."
fi
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>