View | Details | Raw Unified | Return to bug 386
Collapse All | Expand All

(-)b/Makefile.in (-12 / +34 lines)
 Lines 45-50   UB_ON_WINDOWS=@UB_ON_WINDOWS@ Link Here 
45
WITH_PYTHONMODULE=@WITH_PYTHONMODULE@
45
WITH_PYTHONMODULE=@WITH_PYTHONMODULE@
46
WITH_PYUNBOUND=@WITH_PYUNBOUND@
46
WITH_PYUNBOUND=@WITH_PYUNBOUND@
47
PYTHON_SITE_PKG=@PYTHON_SITE_PKG@
47
PYTHON_SITE_PKG=@PYTHON_SITE_PKG@
48
EXPORT_ALL_SYMBOLS=@EXPORT_ALL_SYMBOLS@
48
49
49
SWIG=@SWIG@
50
SWIG=@SWIG@
50
YACC=@YACC@
51
YACC=@YACC@
 Lines 102-114   UNITTEST_SRC=$(patsubst $(srcdir)/%,%, \ Link Here 
102
	testcode/readhex.c testcode/ldns-testpkts.c smallapp/worker_cb.c \
103
	testcode/readhex.c testcode/ldns-testpkts.c smallapp/worker_cb.c \
103
	$(COMMON_SRC)
104
	$(COMMON_SRC)
104
UNITTEST_OBJ=$(addprefix $(BUILD),$(UNITTEST_SRC:.c=.lo)) $(COMPAT_OBJ)
105
UNITTEST_OBJ=$(addprefix $(BUILD),$(UNITTEST_SRC:.c=.lo)) $(COMPAT_OBJ)
105
DAEMON_SRC=$(patsubst $(srcdir)/%,%, $(wildcard $(srcdir)/daemon/*.c)) \
106
106
	$(COMMON_SRC)
107
DAEMON_SRC=$(patsubst $(srcdir)/%,%, $(wildcard $(srcdir)/daemon/*.c))
108
ifneq "$(EXPORT_ALL_SYMBOLS)" "yes"
109
DAEMON_SRC+=$(COMMON_SRC)
110
endif
107
DAEMON_OBJ=$(addprefix $(BUILD),$(DAEMON_SRC:.c=.lo)) $(COMPAT_OBJ)
111
DAEMON_OBJ=$(addprefix $(BUILD),$(DAEMON_SRC:.c=.lo)) $(COMPAT_OBJ)
108
CHECKCONF_SRC=smallapp/unbound-checkconf.c smallapp/worker_cb.c $(COMMON_SRC)
112
113
CHECKCONF_SRC=smallapp/unbound-checkconf.c smallapp/worker_cb.c
114
ifneq "$(EXPORT_ALL_SYMBOLS)" "yes"
115
CHECKCONF_SRC+=$(COMMON_SRC)
116
endif
109
CHECKCONF_OBJ=$(addprefix $(BUILD),$(CHECKCONF_SRC:.c=.lo)) $(COMPAT_OBJ)
117
CHECKCONF_OBJ=$(addprefix $(BUILD),$(CHECKCONF_SRC:.c=.lo)) $(COMPAT_OBJ)
110
CONTROL_SRC=smallapp/unbound-control.c smallapp/worker_cb.c $(COMMON_SRC)
118
119
CONTROL_SRC=smallapp/unbound-control.c smallapp/worker_cb.c
120
ifneq "$(EXPORT_ALL_SYMBOLS)" "yes"
121
CONTROL_SRC+=$(COMMON_SRC)
122
endif
111
CONTROL_OBJ=$(addprefix $(BUILD),$(CONTROL_SRC:.c=.lo)) $(COMPAT_OBJ)
123
CONTROL_OBJ=$(addprefix $(BUILD),$(CONTROL_SRC:.c=.lo)) $(COMPAT_OBJ)
124
112
HOST_SRC=smallapp/unbound-host.c
125
HOST_SRC=smallapp/unbound-host.c
113
HOST_OBJ=$(addprefix $(BUILD),$(HOST_SRC:.c=.lo)) $(filter-out $(BUILD)compat/ctime_r.lo, $(COMPAT_OBJ))
126
HOST_OBJ=$(addprefix $(BUILD),$(HOST_SRC:.c=.lo)) $(filter-out $(BUILD)compat/ctime_r.lo, $(COMPAT_OBJ))
114
UBANCHOR_SRC=smallapp/unbound-anchor.c
127
UBANCHOR_SRC=smallapp/unbound-anchor.c
 Lines 224-233   else Link Here 
224
ldnslib=
237
ldnslib=
225
endif
238
endif
226
239
240
UBSYMS+=-export-symbols $(srcdir)/libunbound/ubsyms.def
241
CLUBSYMS=-export-symbols $(BUILD)clubsyms.def
242
EXTRALINK=
243
ifeq "$(EXPORT_ALL_SYMBOLS)" "yes"
244
UBSYMS=
245
CLUBSYMS=
246
EXTRALINK=-L. -L.libs -lunbound
247
endif
248
227
libunbound.la:	$(LIBUNBOUND_OBJ) $(ldnslib)
249
libunbound.la:	$(LIBUNBOUND_OBJ) $(ldnslib)
228
	$(INFO) Link $@
250
	$(INFO) Link $@
229
ifeq ($(CHECKLOCK_SRC),)
251
ifeq ($(CHECKLOCK_SRC),)
230
	$Q$(LINK_LIB) -export-symbols $(srcdir)/libunbound/ubsyms.def -o $@ $(sort $(LIBUNBOUND_OBJ)) -rpath $(libdir) $(LIBS)
252
	$Q$(LINK_LIB) $(UBSYMS) -o $@ $(sort $(LIBUNBOUND_OBJ)) -rpath $(libdir) $(LIBS)
231
else
253
else
232
	cp $(srcdir)/libunbound/ubsyms.def $(BUILD)clubsyms.def
254
	cp $(srcdir)/libunbound/ubsyms.def $(BUILD)clubsyms.def
233
	echo lock_protect >> $(BUILD)clubsyms.def
255
	echo lock_protect >> $(BUILD)clubsyms.def
 Lines 240-259   else Link Here 
240
	echo checklock_init >> $(BUILD)clubsyms.def
262
	echo checklock_init >> $(BUILD)clubsyms.def
241
	echo checklock_thrcreate >> $(BUILD)clubsyms.def
263
	echo checklock_thrcreate >> $(BUILD)clubsyms.def
242
	echo checklock_thrjoin >> $(BUILD)clubsyms.def
264
	echo checklock_thrjoin >> $(BUILD)clubsyms.def
243
	$Q$(LINK_LIB) -export-symbols $(BUILD)clubsyms.def -o $@ $(sort $(LIBUNBOUND_OBJ)) -rpath $(libdir) $(LIBS)
265
	$Q$(LINK_LIB) $(CLUBSYMS) -o $@ $(sort $(LIBUNBOUND_OBJ)) -rpath $(libdir) $(LIBS)
244
endif
266
endif
245
267
246
unbound$(EXEEXT):	$(DAEMON_OBJ) $(ldnslib)
268
unbound$(EXEEXT):	$(DAEMON_OBJ) libunbound.la $(ldnslib)
247
	$(INFO) Link $@
269
	$(INFO) Link $@
248
	$Q$(LINK) -o $@ $(sort $(DAEMON_OBJ)) -lssl $(LIBS)
270
	$Q$(LINK) -o $@ $(sort $(DAEMON_OBJ)) $(EXTRALINK) -lssl $(LIBS)
249
271
250
unbound-checkconf$(EXEEXT):	$(CHECKCONF_OBJ) $(ldnslib)
272
unbound-checkconf$(EXEEXT):	$(CHECKCONF_OBJ) libunbound.la $(ldnslib)
251
	$(INFO) Link $@
273
	$(INFO) Link $@
252
	$Q$(LINK) -o $@ $(sort $(CHECKCONF_OBJ)) $(LIBS)
274
	$Q$(LINK) -o $@ $(sort $(CHECKCONF_OBJ)) $(EXTRALINK) -lssl $(LIBS)
253
275
254
unbound-control$(EXEEXT):	$(CONTROL_OBJ) $(ldnslib)
276
unbound-control$(EXEEXT):	$(CONTROL_OBJ) libunbound.la $(ldnslib)
255
	$(INFO) Link $@
277
	$(INFO) Link $@
256
	$Q$(LINK) -o $@ $(sort $(CONTROL_OBJ)) -lssl $(LIBS)
278
	$Q$(LINK) -o $@ $(sort $(CONTROL_OBJ)) $(EXTRALINK) -lssl $(LIBS)
257
279
258
unbound-host$(EXEEXT):	$(HOST_OBJ) libunbound.la $(ldnslib)
280
unbound-host$(EXEEXT):	$(HOST_OBJ) libunbound.la $(ldnslib)
259
	$(INFO) Link $@
281
	$(INFO) Link $@
(-)b/configure.ac (+11 lines)
 Lines 695-700   AC_REPLACE_FUNCS(memmove) Link Here 
695
AC_REPLACE_FUNCS(gmtime_r)
695
AC_REPLACE_FUNCS(gmtime_r)
696
AC_REPLACE_FUNCS(ctime_r)
696
AC_REPLACE_FUNCS(ctime_r)
697
697
698
AC_ARG_ENABLE(allsymbols, AC_HELP_STRING([--enable-allsymbols], [export all symbols from libunbound and link binaries to it]))
699
case "$enable_allsymbols" in
700
	no)
701
	EXPORT_ALL_SYMBOLS=no
702
	;;
703
	yes)
704
	EXPORT_ALL_SYMBOLS=yes
705
	;;
706
esac
707
AC_SUBST(EXPORT_ALL_SYMBOLS)
708
698
# check this after all other compilation checks, since the linking of the lib
709
# check this after all other compilation checks, since the linking of the lib
699
# may break checks after this.
710
# may break checks after this.
700
use_ldns_builtin="no"
711
use_ldns_builtin="no"

Return to bug 386