configure.patch 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. diff -Nur libnids-1.18/configure libnids-1.18.patched/configure
  2. --- libnids-1.18.orig/configure 2003-10-15 01:40:09.000000000 +0200
  3. +++ libnids-1.18/configure 2007-01-23 00:18:43.000000000 +0100
  4. @@ -3253,7 +3253,7 @@ presetting ac_cv_c_bigendian=no (or yes)
  5. esac
  6. -CFLAGS="$CFLAGS -D_BSD_SOURCE"
  7. +CFLAGS="$CFLAGS"
  8. for ac_func in gettimeofday
  9. do
  10. @@ -3489,17 +3489,21 @@ if test "${with_libpcap+set}" = set; the
  11. echo "${ECHO_T}no" >&6
  12. ;;
  13. *)
  14. - echo "$as_me:$LINENO: result: $withval" >&5
  15. -echo "${ECHO_T}$withval" >&6
  16. + echo "$ac_t""$withval" 1>&6
  17. if test -f $withval/pcap.h -a -f $withval/libpcap.a; then
  18. owd=`pwd`
  19. if cd $withval; then withval=`pwd`; cd $owd; fi
  20. - PCAP_CFLAGS="-I$withval -I$withval/bpf"
  21. + PCAPINC="-I$withval -I$withval/bpf"
  22. PCAPLIB="-L$withval -lpcap"
  23. + elif test -f $withval/include/pcap.h -a \
  24. + -f $withval/include/pcap-bpf.h -a \
  25. + -f $withval/lib/libpcap.a; then
  26. + owd=`pwd`
  27. + if cd $withval; then withval=`pwd`; cd $owd; fi
  28. + PCAPINC="-I$withval/include"
  29. + PCAPLIB="-L$withval/lib -lpcap"
  30. else
  31. - { { echo "$as_me:$LINENO: error: pcap.h or libpcap.a not found in $withval" >&5
  32. -echo "$as_me: error: pcap.h or libpcap.a not found in $withval" >&2;}
  33. - { (exit 1); exit 1; }; }
  34. + { echo "configure: error: pcap.h" 1>&2; exit 1; }
  35. fi
  36. ;;
  37. esac
  38. @@ -3605,18 +3609,18 @@ echo "${ECHO_T}no" >&6
  39. *)
  40. echo "$as_me:$LINENO: result: $withval" >&5
  41. echo "${ECHO_T}$withval" >&6
  42. - if test -f $withval/include/libnet.h -a -f $withval/lib/libnet.a -a -f $withval/libnet-config ; then
  43. + if test -f $withval/include/libnet.h -a -f $withval/bin/libnet-config ; then
  44. owd=`pwd`
  45. if cd $withval; then withval=`pwd`; cd $owd; fi
  46. - LNET_CFLAGS="-I$withval/include `$withval/libnet-config --defines`"
  47. + LNET_CFLAGS="-I$withval/include `$withval/bin/libnet-config --defines`"
  48. LNETLIB="-L$withval/lib -lnet"
  49. - elif test -f $withval/include/libnet.h -a -f $withval/src/libnet.a; then
  50. + elif test -f $withval/include/libnet.h; then
  51. owd=`pwd`
  52. if cd $withval; then withval=`pwd`; cd $owd; fi
  53. LNET_CFLAGS="-I$withval/include"
  54. - LNETLIB="-L$withval/src -lnet"
  55. + LNETLIB="-L$withval/lib -lnet"
  56. else
  57. - echo "A working combination of libnet.h, libnet.a and libnet-config not found in $withval; get libnet from www.packetfactory.net/projects/libnet and reinstall"
  58. + echo "A working combination of libnet.h and libnet-config not found in $withval; get libnet from www.packetfactory.net/projects/libnet and reinstall"
  59. { { echo "$as_me:$LINENO: error: libnet" >&5
  60. echo "$as_me: error: libnet" >&2;}
  61. { (exit 1); exit 1; }; }
  62. @@ -3861,7 +3865,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_c
  63. else
  64. echo "$as_me: failed program was:" >&5
  65. cat conftest.$ac_ext >&5
  66. -HAVE_BSD_UDPHDR=0
  67. +HAVE_BSD_UDPHDR=1
  68. fi
  69. rm -f conftest.$ac_objext conftest.$ac_ext