1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
#!/bin/sh
#
# Check the kernel headers available to us.
#
#
# But not for production builds. we assume a 2.4 kernel
if [ -n "$RELEASE" ]
then
return 0
fi
rm -f include/netdnet/dn.h
if [ -f /usr/src/linux/include/netdnet/dn.h ]
then
#
# Eduardo's kernel - only use dn.h if it doesn't define nodeent
# (which belongs in dnetdb.h)
#
grep -q nodeent /usr/src/linux/include/netdnet/dn.h
if [ $? = 1 ]
then
echo Using dn.h from Eduardo\'s kernel
cp /usr/src/linux/include/netdnet/dn.h include/netdnet
else
echo Using dn.h from our distribution
cp include/kernel/netdnet/dn.h include/netdnet
fi
fi
if [ -f /usr/src/linux/include/linux/dn.h ]
then
#
# Steve's kernel
#
echo Using dn.h from Steve\'s kernel
cp /usr/src/linux/include/linux/dn.h include/netdnet
fi
if [ ! -f include/netdnet/dn.h ]
then
#
# Use our fallback include file
#
echo Assuming 2.4+ kernel
cp include/kernel/netdnet/dn.h include/netdnet
fi
return 0
|