You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

78 lines
2.1 KiB

  1. --- a/dev/null 2017-05-06 19:04:40.272000000 +0800
  2. +++ b/configure.ac 2017-05-13 20:56:26.761460807 +0800
  3. @@ -0,0 +1,56 @@
  4. +# Copyright 2016 Yousong Zhou
  5. +
  6. +AC_PREREQ([2.67])
  7. +AC_INIT([libudns], [0.4])
  8. +AC_CONFIG_HEADERS([config.h])
  9. +
  10. +AM_INIT_AUTOMAKE([foreign])
  11. +LT_INIT
  12. +
  13. +dnl Checks for programs.
  14. +AC_PROG_CC
  15. +AC_PROG_INSTALL
  16. +AC_PROG_LN_S
  17. +AC_PROG_LIBTOOL
  18. +
  19. +dnl Checks for library functions.
  20. +AC_CHECK_LIB(socket, connect)
  21. +AC_CHECK_FUNCS([malloc memset socket])
  22. +AC_CHECK_FUNCS([getopt poll])
  23. +AC_CHECK_FUNCS([inet_pton inet_ntop],
  24. + [AC_DEFINE([HAVE_INET_PTON_NTOP], [1], [Have inet_pton and inet_ntop])])
  25. +
  26. +AC_ARG_ENABLE(ipv6,
  27. + AC_HELP_STRING([--disable-ipv6],[disable IPv6 support]),
  28. + [case "${enable_ipv6}" in
  29. + no)
  30. + AC_MSG_NOTICE([disabling IPv6 at user request])
  31. + ipv6=no
  32. + ;;
  33. + yes)
  34. + ipv6=yes
  35. + force_ipv6=yes
  36. + ;;
  37. + *)
  38. + AC_MSG_ERROR([Invalid --enable-ipv6 argument \`$enable_ipv6'])
  39. + ;;
  40. + esac
  41. + ], [
  42. + dnl If nothing is specified, assume auto-detection.
  43. + ipv6=yes
  44. + force_ipv6=no
  45. + ]
  46. +)
  47. +
  48. +if test "x$ipv6" = "xyes"; then
  49. + AC_CHECK_TYPE([struct sockaddr_in6],
  50. + [AC_DEFINE([HAVE_IPv6], [1], [Have ipv6 support])],
  51. + [if test "x$force_ipv6" = "xyes"; then
  52. + AC_MSG_ERROR([ipv6 support requested but cannot be fulfilled])
  53. + fi],
  54. + [#include <sys/socket.h>
  55. + #include <netinet/in.h>])
  56. +fi
  57. +
  58. +AC_CONFIG_FILES([Makefile])
  59. +AC_OUTPUT
  60. --- a/dev/null 2016-01-04 02:31:18.900000000 +0800
  61. +++ b/Makefile.am 2016-02-22 20:12:01.938987311 +0800
  62. @@ -0,0 +1,16 @@
  63. +# Copyright 2016 Yousong Zhou
  64. +
  65. +lib_LTLIBRARIES=libudns.la
  66. +libudns_la_SOURCES= udns_dn.c udns_dntosp.c udns_parse.c udns_resolver.c udns_init.c \
  67. + udns_misc.c udns_XtoX.c \
  68. + udns_rr_a.c udns_rr_ptr.c udns_rr_mx.c udns_rr_txt.c udns_bl.c \
  69. + udns_rr_srv.c udns_rr_naptr.c udns_codes.c udns_jran.c
  70. +include_HEADERS= udns.h
  71. +
  72. +bin_PROGRAMS = dnsget rblcheck ex-rdns
  73. +dnsget_SOURCES = dnsget.c
  74. +rblcheck_SOURCES = rblcheck.c
  75. +ex_rdns_SOURCES = ex-rdns.c
  76. +dnsget_LDADD = $(top_builddir)/libudns.la
  77. +rblcheck_LDADD = $(top_builddir)/libudns.la
  78. +ex_rdns_LDADD = $(top_builddir)/libudns.la