Lines 1214-1232
Link Here
|
1214 |
else |
1214 |
else |
1215 |
libnet_dir="/usr/include /usr/local/include /sw/include" |
1215 |
libnet_dir="/usr/include /usr/local/include /sw/include" |
1216 |
fi |
1216 |
fi |
1217 |
AC_MSG_CHECKING("for libnet.h version 1.0.x") |
1217 |
AC_MSG_CHECKING("for libnet-1.0.h version 1.0.x") |
1218 |
for i in $libnet_dir; do |
1218 |
for i in $libnet_dir; do |
1219 |
if test -r "$i/libnet.h"; then |
1219 |
if test -r "$i/libnet-1.0.h"; then |
1220 |
LIBNET_INC_DIR="$i" |
1220 |
LIBNET_INC_DIR="$i" |
1221 |
fi |
1221 |
fi |
1222 |
done |
1222 |
done |
1223 |
|
1223 |
|
1224 |
if test "$LIBNET_INC_DIR" != ""; then |
1224 |
if test "$LIBNET_INC_DIR" != ""; then |
1225 |
if eval "grep LIBNET_VERSION $LIBNET_INC_DIR/libnet.h | grep -v 1.0 >/dev/null"; then |
1225 |
if eval "grep LIBNET_VERSION $LIBNET_INC_DIR/libnet-1.0.h | grep -v 1.0 >/dev/null"; then |
1226 |
FAIL_MESSAGE("libnet 1.0.x (libnet.h)", $LIBNET_INC_DIR) |
1226 |
FAIL_MESSAGE("libnet 1.0.x (libnet-1.0.h)", $LIBNET_INC_DIR) |
1227 |
fi |
1227 |
fi |
1228 |
CFLAGS="${CFLAGS} `libnet-config --defines` `libnet-config --cflags`" |
1228 |
CFLAGS="${CFLAGS} `libnet-1.0-config --defines` `libnet-1.0-config --cflags`" |
1229 |
LIBS="${LIBS} `libnet-config --libs`" |
1229 |
LIBS="${LIBS} `libnet-1.0-config --libs`" |
1230 |
CPPFLAGS="${CPPFLAGS} -I${LIBNET_INC_DIR}" |
1230 |
CPPFLAGS="${CPPFLAGS} -I${LIBNET_INC_DIR}" |
1231 |
AC_MSG_RESULT($i) |
1231 |
AC_MSG_RESULT($i) |
1232 |
else |
1232 |
else |
Lines 1248-1255
Link Here
|
1248 |
[ --enable-flexresp Flexible Responses on hostile connection attempts], |
1248 |
[ --enable-flexresp Flexible Responses on hostile connection attempts], |
1249 |
enable_flexresp="$enableval", enable_flexresp="no") |
1249 |
enable_flexresp="$enableval", enable_flexresp="no") |
1250 |
if test "x$enable_flexresp" = "xyes"; then |
1250 |
if test "x$enable_flexresp" = "xyes"; then |
1251 |
CPPFLAGS="${CPPFLAGS} -DENABLE_RESPONSE `libnet-config --defines --cflags`" |
1251 |
CPPFLAGS="${CPPFLAGS} -DENABLE_RESPONSE `libnet-1.0-config --defines --cflags`" |
1252 |
LDFLAGS="${LDFLAGS} `libnet-config --libs`" |
1252 |
LDFLAGS="${LDFLAGS} `libnet-1.0-config --libs`" |
1253 |
fi |
1253 |
fi |
1254 |
|
1254 |
|
1255 |
if test "x$enable_flexresp" != "xno" -a "x$enable_flexresp" = "xyes"; then |
1255 |
if test "x$enable_flexresp" != "xno" -a "x$enable_flexresp" = "xyes"; then |
Lines 1259-1279
Link Here
|
1259 |
exit |
1259 |
exit |
1260 |
fi |
1260 |
fi |
1261 |
|
1261 |
|
1262 |
if test `libnet-config --cflags | wc -c` = "1"; then |
1262 |
if test `libnet-1.0-config --cflags | wc -c` = "1"; then |
1263 |
CPPFLAGS="${CPPFLAGS} -I/usr/local/include -I/sw/include" |
1263 |
CPPFLAGS="${CPPFLAGS} -I/usr/local/include -I/sw/include" |
1264 |
LIBNET_CONFIG_BROKEN_CFLAGS="yes" |
1264 |
LIBNET_CONFIG_BROKEN_CFLAGS="yes" |
1265 |
fi |
1265 |
fi |
1266 |
|
1266 |
|
1267 |
if test `libnet-config --libs | wc -c` = "1"; then |
1267 |
if test `libnet-1.0-config --libs | wc -c` = "1"; then |
1268 |
AC_MSG_WARN(libnet-config --libs is broken on your system. If you) |
1268 |
AC_MSG_WARN(libnet-1.0-config --libs is broken on your system. If you) |
1269 |
AC_MSG_WARN(are using a precompiled package please notify the) |
1269 |
AC_MSG_WARN(are using a precompiled package please notify the) |
1270 |
AC_MSG_WARN(maintainer.) |
1270 |
AC_MSG_WARN(maintainer.) |
1271 |
LDFLAGS="${LDFLAGS} -L/usr/local/lib -L/sw/lib" |
1271 |
LDFLAGS="${LDFLAGS} -L/usr/local/lib -L/sw/lib" |
1272 |
LIBS="${LIBS} -lnet" |
1272 |
LIBS="${LIBS} -lnet-1.0" |
1273 |
fi |
1273 |
fi |
1274 |
|
1274 |
|
1275 |
LNET="" |
1275 |
LNET="" |
1276 |
AC_CHECK_HEADERS(libnet.h,, LNET="no") |
1276 |
AC_CHECK_HEADERS(libnet-1.0.h,, LNET="no") |
1277 |
if test "x$LNET" = "xno"; then |
1277 |
if test "x$LNET" = "xno"; then |
1278 |
echo |
1278 |
echo |
1279 |
echo " ERROR! Libnet header not found, go get it from" |
1279 |
echo " ERROR! Libnet header not found, go get it from" |
Lines 1291-1323
Link Here
|
1291 |
libnet_dir="/usr/include /usr/local/include /sw/include" |
1291 |
libnet_dir="/usr/include /usr/local/include /sw/include" |
1292 |
fi |
1292 |
fi |
1293 |
else |
1293 |
else |
1294 |
libnet_dir=`libnet-config --cflags | cut -dI -f2` |
1294 |
libnet_dir=`libnet-1.0-config --cflags | cut -dI -f2` |
1295 |
fi |
1295 |
fi |
1296 |
|
1296 |
|
1297 |
LIBNET_INC_DIR="" |
1297 |
LIBNET_INC_DIR="" |
1298 |
for i in $libnet_dir; do |
1298 |
for i in $libnet_dir; do |
1299 |
if test -r "$i/libnet.h"; then |
1299 |
if test -r "$i/libnet-1.0.h"; then |
1300 |
LIBNET_INC_DIR="$i" |
1300 |
LIBNET_INC_DIR="$i" |
1301 |
fi |
1301 |
fi |
1302 |
done |
1302 |
done |
1303 |
|
1303 |
|
1304 |
if test "x$LIBNET_INC_DIR" != "x"; then |
1304 |
if test "x$LIBNET_INC_DIR" != "x"; then |
1305 |
if eval "grep LIBNET_VERSION $LIBNET_INC_DIR/libnet.h | grep -v 1.0.2a >/dev/null"; then |
1305 |
if eval "grep LIBNET_VERSION $LIBNET_INC_DIR/libnet-1.0.h | grep -v 1.0.2a >/dev/null"; then |
1306 |
AC_MSG_RESULT(no) |
1306 |
AC_MSG_RESULT(no) |
1307 |
echo |
1307 |
echo |
1308 |
echo " ERROR! Snort with --enable-flexresp will *only* work with" |
1308 |
echo " ERROR! Snort with --enable-flexresp will *only* work with" |
1309 |
echo " libnet version 1.0.2a, go get it from" |
1309 |
echo " libnet version 1.0.2a, go get it from" |
1310 |
echo " http://www.packetfactory.net/projects/libnet/" |
1310 |
echo " http://www.packetfactory.net/projects/libnet/" |
1311 |
FAIL_MESSAGE("libnet 1.0.2a (libnet.h)", $LIBNET_INC_DIR) |
1311 |
FAIL_MESSAGE("libnet 1.0.2a (libnet-1.0.h)", $LIBNET_INC_DIR) |
1312 |
fi |
1312 |
fi |
1313 |
AC_MSG_RESULT(yes) |
1313 |
AC_MSG_RESULT(yes) |
1314 |
else |
1314 |
else |
1315 |
AC_MSG_RESULT(no) |
1315 |
AC_MSG_RESULT(no) |
1316 |
FAIL_MESSAGE("libnet 1.0.2a (libnet.h)", $libnet_dir) |
1316 |
FAIL_MESSAGE("libnet 1.0.2a (libnet-1.0.h)", $libnet_dir) |
1317 |
fi |
1317 |
fi |
1318 |
|
1318 |
|
1319 |
LNET="" |
1319 |
LNET="" |
1320 |
AC_CHECK_LIB(net, libnet_build_ip,, LNET="no") |
1320 |
AC_CHECK_LIB(net-1.0, libnet_build_ip,, LNET="no") |
1321 |
if test "x$LNET" = "xno"; then |
1321 |
if test "x$LNET" = "xno"; then |
1322 |
echo |
1322 |
echo |
1323 |
echo " ERROR! Libnet library not found, go get it from" |
1323 |
echo " ERROR! Libnet library not found, go get it from" |
Lines 1368-1375
Link Here
|
1368 |
[ --enable-react Intercept and terminate offending HTTP accesses], |
1368 |
[ --enable-react Intercept and terminate offending HTTP accesses], |
1369 |
enable_react="$enableval", enable_react="no") |
1369 |
enable_react="$enableval", enable_react="no") |
1370 |
if test "x$enable_react" = "xyes"; then |
1370 |
if test "x$enable_react" = "xyes"; then |
1371 |
CPPFLAGS="${CPPFLAGS} -DENABLE_REACT `libnet-config --defines --cflags`" |
1371 |
CPPFLAGS="${CPPFLAGS} -DENABLE_REACT `libnet-1.0-config --defines --cflags`" |
1372 |
LDFLAGS="${LDFLAGS} `libnet-config --libs`" |
1372 |
LDFLAGS="${LDFLAGS} `libnet-1.0-config --libs`" |
1373 |
fi |
1373 |
fi |
1374 |
|
1374 |
|
1375 |
if test "x$enable_react" != "xno" -a "x$enable_react" = "xyes"; then |
1375 |
if test "x$enable_react" != "xno" -a "x$enable_react" = "xyes"; then |
Lines 1380-1392
Link Here
|
1380 |
exit |
1380 |
exit |
1381 |
fi |
1381 |
fi |
1382 |
|
1382 |
|
1383 |
if test `libnet-config --cflags | wc -c` = "1"; then |
1383 |
if test `libnet-1.0-config --cflags | wc -c` = "1"; then |
1384 |
CPPFLAGS="${CPPFLAGS} -I/usr/local/include -I/sw/include" |
1384 |
CPPFLAGS="${CPPFLAGS} -I/usr/local/include -I/sw/include" |
1385 |
LIBNET_CONFIG_BROKEN_CFLAGS="yes" |
1385 |
LIBNET_CONFIG_BROKEN_CFLAGS="yes" |
1386 |
fi |
1386 |
fi |
1387 |
|
1387 |
|
1388 |
if test `libnet-config --libs | wc -c` = "1"; then |
1388 |
if test `libnet-1.0-config --libs | wc -c` = "1"; then |
1389 |
AC_MSG_WARN(libnet-config --libs is broken on your system. If you) |
1389 |
AC_MSG_WARN(libnet-1.0-config --libs is broken on your system. If you) |
1390 |
AC_MSG_WARN(are using a precompiled package please notify the) |
1390 |
AC_MSG_WARN(are using a precompiled package please notify the) |
1391 |
AC_MSG_WARN(maintainer.) |
1391 |
AC_MSG_WARN(maintainer.) |
1392 |
LDFLAGS="${LDFLAGS} -L/usr/local/lib -L/sw/lib" |
1392 |
LDFLAGS="${LDFLAGS} -L/usr/local/lib -L/sw/lib" |
Lines 1394-1400
Link Here
|
1394 |
fi |
1394 |
fi |
1395 |
|
1395 |
|
1396 |
LNET="" |
1396 |
LNET="" |
1397 |
AC_CHECK_HEADERS(libnet.h,, LNET="no") |
1397 |
AC_CHECK_HEADERS(libnet-1.0.h,, LNET="no") |
1398 |
if test "x$LNET" = "xno"; then |
1398 |
if test "x$LNET" = "xno"; then |
1399 |
echo |
1399 |
echo |
1400 |
echo " ERROR! Libnet header not found, go get it from" |
1400 |
echo " ERROR! Libnet header not found, go get it from" |
Lines 1412-1444
Link Here
|
1412 |
libnet_dir="/usr/include /usr/local/include /sw/include" |
1412 |
libnet_dir="/usr/include /usr/local/include /sw/include" |
1413 |
fi |
1413 |
fi |
1414 |
else |
1414 |
else |
1415 |
libnet_dir=`libnet-config --cflags | cut -dI -f2` |
1415 |
libnet_dir=`libnet-1.0-config --cflags | cut -dI -f2` |
1416 |
fi |
1416 |
fi |
1417 |
|
1417 |
|
1418 |
LIBNET_INC_DIR="" |
1418 |
LIBNET_INC_DIR="" |
1419 |
for i in $libnet_dir; do |
1419 |
for i in $libnet_dir; do |
1420 |
if test -r "$i/libnet.h"; then |
1420 |
if test -r "$i/libnet-1.0.h"; then |
1421 |
LIBNET_INC_DIR="$i" |
1421 |
LIBNET_INC_DIR="$i" |
1422 |
fi |
1422 |
fi |
1423 |
done |
1423 |
done |
1424 |
|
1424 |
|
1425 |
if test "x$LIBNET_INC_DIR" != "x"; then |
1425 |
if test "x$LIBNET_INC_DIR" != "x"; then |
1426 |
if eval "grep LIBNET_VERSION $LIBNET_INC_DIR/libnet.h | grep -v 1.0.2a >/dev/null"; then |
1426 |
if eval "grep LIBNET_VERSION $LIBNET_INC_DIR/libnet-1.0.h | grep -v 1.0.2a >/dev/null"; then |
1427 |
AC_MSG_RESULT(no) |
1427 |
AC_MSG_RESULT(no) |
1428 |
echo |
1428 |
echo |
1429 |
echo " ERROR! Snort with --enable-react will *only* work with" |
1429 |
echo " ERROR! Snort with --enable-react will *only* work with" |
1430 |
echo " libnet version 1.0.2a, go get it from" |
1430 |
echo " libnet version 1.0.2a, go get it from" |
1431 |
echo " http://www.packetfactory.net/projects/libnet/" |
1431 |
echo " http://www.packetfactory.net/projects/libnet/" |
1432 |
FAIL_MESSAGE("libnet 1.0.2a (libnet.h)", $LIBNET_INC_DIR) |
1432 |
FAIL_MESSAGE("libnet 1.0.2a (libnet-1.0.h)", $LIBNET_INC_DIR) |
1433 |
fi |
1433 |
fi |
1434 |
AC_MSG_RESULT(yes) |
1434 |
AC_MSG_RESULT(yes) |
1435 |
else |
1435 |
else |
1436 |
AC_MSG_RESULT(no) |
1436 |
AC_MSG_RESULT(no) |
1437 |
FAIL_MESSAGE("libnet 1.0.2a (libnet.h)", $libnet_dir) |
1437 |
FAIL_MESSAGE("libnet 1.0.2a (libnet-1.0.h)", $libnet_dir) |
1438 |
fi |
1438 |
fi |
1439 |
|
1439 |
|
1440 |
LNET="" |
1440 |
LNET="" |
1441 |
AC_CHECK_LIB(net, libnet_build_ip,, LNET="no") |
1441 |
AC_CHECK_LIB(net-1.0, libnet_build_ip,, LNET="no") |
1442 |
if test "x$LNET" = "xno"; then |
1442 |
if test "x$LNET" = "xno"; then |
1443 |
echo |
1443 |
echo |
1444 |
echo " ERROR! Libnet library not found, go get it from" |
1444 |
echo " ERROR! Libnet library not found, go get it from" |