1- From d5dd0f3c9934f11d5e8a77a4d34ab59a0a9f7a13 Mon Sep 17 00:00:00 2001
1+ From 13df793bce0a09769676455cc923410c1af04cc6 Mon Sep 17 00:00:00 2001
22From: Jian Chang <aa65535@live.com>
3- Date: Thu, 2 Feb 2017 20:23:46 +0800
3+ Date: Tue, 7 Feb 2017 20:53:44 +0800
44Subject: [PATCH] embed libudns
55
66---
7- Makefile.am | 2 +-
8- configure.ac | 3 +-
7+ Makefile.am | 4 +-
8+ configure.ac | 1 +
99 libudns/Makefile.am | 8 +
1010 libudns/dnsget.1 | 195 +++++++
1111 libudns/dnsget.c | 759 ++++++++++++++++++++++++++
@@ -33,7 +33,7 @@ Subject: [PATCH] embed libudns
3333 libudns/udns_rr_srv.c | 155 ++++++
3434 libudns/udns_rr_txt.c | 98 ++++
3535 src/Makefile.am | 11 +-
36- 29 files changed, 7604 insertions(+), 8 deletions(-)
36+ 29 files changed, 7605 insertions(+), 7 deletions(-)
3737 create mode 100644 libudns/Makefile.am
3838 create mode 100644 libudns/dnsget.1
3939 create mode 100644 libudns/dnsget.c
@@ -62,36 +62,31 @@ Subject: [PATCH] embed libudns
6262 create mode 100644 libudns/udns_rr_txt.c
6363
6464diff --git a/Makefile.am b/Makefile.am
65- index 4a25c0f..06457eb 100644
65+ index 06af285..8d6070e 100644
6666--- a/Makefile.am
6767+++ b/Makefile.am
68- @@ -1,4 +1,4 @@
68+ @@ -1,7 +1,7 @@
69+ if USE_SYSTEM_SHARED_LIB
70+ - SUBDIRS = src
71+ + SUBDIRS = libudns src
72+ else
6973- SUBDIRS = libcork libipset src
7074+ SUBDIRS = libcork libipset libudns src
75+ endif
7176
7277 if ENABLE_DOCUMENTATION
73- SUBDIRS += doc
7478diff --git a/configure.ac b/configure.ac
75- index b91c297..67f641a 100755
79+ index 008c2d2..ce5df55 100755
7680--- a/configure.ac
7781+++ b/configure.ac
78- @@ -277,8 +277,6 @@ dnl Add define for libudns to enable IPv6 support
79- dnl This is an option defined in the origin configure script
80- AC_DEFINE([HAVE_IPv6], [1], [Enable IPv6 support in libudns])
81-
82- - AC_CHECK_HEADERS([udns.h], [], [AC_MSG_ERROR([Couldn't find libudns. Try installing libudns-dev or udns-devel.])])
83- - AC_CHECK_LIB([udns], [dns_dnlen], [LIBS="-ludns $LIBS"], [AC_MSG_ERROR([Couldn't find libudns. Try installing libudns-dev or udns-devel.])])
84- AC_CHECK_HEADERS([ev.h], [], [AC_MSG_ERROR([Couldn't find libev. Try installing libev-dev@<:@el@:>@.])])
85- AC_CHECK_LIB([ev], [ev_loop_destroy], [LIBS="-lev $LIBS"], [AC_MSG_ERROR([Couldn't find libev. Try installing libev-dev@<:@el@:>@.])])
82+ @@ -284,6 +284,7 @@ AC_CHECK_LIB([ev], [ev_loop_destroy], [LIBS="-lev $LIBS"], [AC_MSG_ERROR([Couldn
8683
87- @@ -290,6 +288,7 @@ AC_CONFIG_FILES([shadowsocks-libev.pc
84+ AC_CONFIG_FILES([shadowsocks-libev.pc
8885 Makefile
89- libcork/Makefile
90- libipset/Makefile
9186+ libudns/Makefile
9287 src/Makefile])
9388
94- AC_OUTPUT
89+ AM_COND_IF([USE_SYSTEM_SHARED_LIB],
9590diff --git a/libudns/Makefile.am b/libudns/Makefile.am
9691new file mode 100644
9792index 0000000..4812e22
@@ -7845,18 +7840,18 @@ index 0000000..97f1dfb
78457840+ dns_resolve_p(ctx, name, qcls, DNS_T_TXT, flags, dns_parse_txt);
78467841+ }
78477842diff --git a/src/Makefile.am b/src/Makefile.am
7848- index 5f44848..ba03950 100644
7843+ index 955fb57..45aa0aa 100644
78497844--- a/src/Makefile.am
78507845+++ b/src/Makefile.am
7851- @@ -4,6 +4,7 @@ AM_CFLAGS = -g -O2 -Wall -Werror -Wno-deprecated-declarations -fno-strict-aliasi
7852- AM_CFLAGS += $(PTHREAD_CFLAGS)
7846+ @@ -6,6 +6,7 @@ if !USE_SYSTEM_SHARED_LIB
78537847 AM_CFLAGS += -I$(top_srcdir)/libipset/include
78547848 AM_CFLAGS += -I$(top_srcdir)/libcork/include
7849+ endif
78557850+ AM_CFLAGS += -I$(top_srcdir)/libudns
78567851 AM_CFLAGS += $(LIBPCRE_CFLAGS)
78577852
7858- SS_COMMON_LIBS = $(top_builddir)/libipset/libipset.la \
7859- @@ -68 ,10 +69 ,10 @@ ss_local_LDADD = $(SS_COMMON_LIBS)
7853+ SS_COMMON_LIBS = $(INET_NTOP_LIB) $(LIBPCRE_LIBS)
7854+ @@ -75 ,10 +76 ,10 @@ ss_local_LDADD = $(SS_COMMON_LIBS)
78607855 ss_tunnel_LDADD = $(SS_COMMON_LIBS)
78617856 ss_server_LDADD = $(SS_COMMON_LIBS)
78627857 ss_manager_LDADD = $(SS_COMMON_LIBS)
@@ -7871,7 +7866,7 @@ index 5f44848..ba03950 100644
78717866
78727867 ss_local_CFLAGS = $(AM_CFLAGS) -DMODULE_LOCAL
78737868 ss_tunnel_CFLAGS = $(AM_CFLAGS) -DMODULE_TUNNEL
7874- @@ -94 ,7 +95 ,7 @@ ss_redir_SOURCES = utils.c \
7869+ @@ -101 ,7 +102 ,7 @@ ss_redir_SOURCES = utils.c \
78757870
78767871 ss_redir_CFLAGS = $(AM_CFLAGS) -DMODULE_REDIR
78777872 ss_redir_LDADD = $(SS_COMMON_LIBS)
0 commit comments