re-autoconfig.patch 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. Description: Redo autoconfig stuff
  2. Author: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
  3. Forwarded: No
  4. Last-Update: 2016-07-20
  5. --- /dev/null
  6. +++ b/Makefile.am
  7. @@ -0,0 +1,14 @@
  8. +ACLOCAL_AMFLAGS = -I m4
  9. +
  10. +noinst_LTLIBRARIES = libbgpdump.la
  11. +libbgpdump_la_SOURCES = bgpdump-config.h bgpdump_attr.h bgpdump_formats.h bgpdump_lib.c bgpdump_lib.h bgpdump_mstream.c bgpdump_mstream.h cfile_tools.c cfile_tools.h inet_ntop.c util.c util.h
  12. +
  13. +bin_PROGRAMS = bgpdump
  14. +bgpdump_SOURCES = bgpdump.c
  15. +bgpdump_LDADD = libbgpdump.la
  16. +
  17. +check-clean:
  18. + rm -f test_out/*.bgp.gz
  19. +
  20. +test: check-clean bgpdump
  21. + @[ -d test_data ] && ./test.sh || echo "Skipping upstream tests as they are huge (see README.Debian)"
  22. --- /dev/null
  23. +++ b/configure.ac
  24. @@ -0,0 +1,43 @@
  25. +AC_REVISION([m4_esyscmd([dpkg-parsechangelog -SVersion])])
  26. +
  27. +AC_INIT([libbgpdump], 1.4.99.15, [ris@ripe.net])
  28. +
  29. +AM_INIT_AUTOMAKE([foreign])
  30. +
  31. +AC_CONFIG_SRCDIR([bgpdump_lib.c])
  32. +AC_CONFIG_HEADERS([bgpdump-config.h])
  33. +
  34. +# Checks for programs.
  35. +AC_PROG_CC
  36. +
  37. +AC_PROG_LIBTOOL
  38. +AC_CONFIG_MACRO_DIRS([m4])
  39. +
  40. +# Checks for header files.
  41. +AC_CHECK_HEADERS([arpa/inet.h netinet/in.h syslog.h])
  42. +AC_STRUCT_TM
  43. +
  44. +# Check for u_*_t
  45. +AC_CHECK_TYPE(u_char_t, , AC_DEFINE(u_char_t, uchar_t, [Define if system headers do not define u_char_t]))
  46. +AC_CHECK_TYPE(u_int8_t, , AC_DEFINE(u_int8_t, uint8_t, [Define if system headers do not define u_int8_t]))
  47. +AC_CHECK_TYPE(u_int16_t, , AC_DEFINE(u_int16_t, uint16_t, [Define if system headers do not define u_int16_t]))
  48. +AC_CHECK_TYPE(u_int32_t, , AC_DEFINE(u_int32_t, uint32_t, [Define if system headers do not define u_int32_t]))
  49. +
  50. +AC_CHECK_LIB(z, gzopen, [], AC_DEFINE(DONT_HAVE_GZ, 1, Define if libz not present))
  51. +AC_CHECK_LIB(bz2, BZ2_bzReadOpen, [], AC_DEFINE(DONT_HAVE_BZ2, 1, Define if libbzip2 not present))
  52. +AC_CHECK_LIB(bsd, strlcat)
  53. +
  54. +# Check for inet_ntoa in -lnsl if not found (Solaris)
  55. +AC_CHECK_FUNCS(inet_ntoa, [], AC_CHECK_LIB(nsl, inet_ntoa, [], AC_MSG_ERROR([inet_ntoa not found],1)))
  56. +AC_CHECK_FUNCS(inet_ntop, [], AC_CHECK_LIB(nsl, inet_ntop, [], AC_MSG_ERROR([inet_ntop not found],1)))
  57. +
  58. +case `uname` in
  59. + Darwin*) LDFLAGS="$LDFLAGS -dynamiclib" ;;
  60. + *) LDFLAGS="$LDFLAGS -shared" ;;
  61. +esac
  62. +
  63. +AC_SUBST(CFLAGS)
  64. +AC_SUBST(LDFLAGS)
  65. +AC_SUBST(LIBS)
  66. +
  67. +AC_OUTPUT([bgpdump.spec Makefile])