bindir=@bindir@
mandir=@mandir@
libdir=@libdir@
+# datarootdir is here to please some checkers, use datadir.
datarootdir=@datarootdir@
datadir=@datadir@
includedir=@includedir@
doxygen=@doxygen@
libtool=@libtool@
ldnsdir=@ldnsdir@
+staticexe=@staticexe@
YACC=@YACC@
LEX=@LEX@
# compat with openssl linux edition.
LINTFLAGS+="-DBN_ULONG=unsigned long" -Dkrb5_int32=int "-Dkrb5_ui_4=unsigned int" -DPQ_64BIT=uint64_t
-INSTALL=$(srcdir)/install-sh
+INSTALL=$(srcdir)/install-sh
COMMON_SRC=$(wildcard services/*.c services/cache/*.c util/*.c \
util/data/*.c util/storage/*.c iterator/*.c) util/configparser.c \
$(addprefix compat/,$(LIBOBJS))) $(COMPAT_OBJ)
COMPILE=$(LIBTOOL) --tag=CC --mode=compile $(CC) $(CPPFLAGS) $(CFLAGS)
-LINK=$(LIBTOOL) --tag=CC --mode=link $(CC) $(CFLAGS) $(LDFLAGS)
+LINK=$(LIBTOOL) --tag=CC --mode=link $(CC) $(staticexe) $(CFLAGS) $(LDFLAGS)
LINK_LIB=$(LIBTOOL) --tag=CC --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -release $(VERSION)
$(BUILD)%.o: $(srcdir)/%.c
@if test ! -d $(dir $@); then $(INSTALL) -d $(patsubst %/,%,$(dir $@)); fi
$Q$(COMPILE) -c $< -o $@
-.PHONY: clean realclean doc lint all
+.PHONY: clean realclean doc lint all install uninstall
all: $(COMMON_OBJ) unbound unittest testbound lock-verify pktview
$(doxygen) $(srcdir)/doc/unbound.doxygen
endif
+install:
+ $(INSTALL) -d $(bindir)
+ $(INSTALL) -d $(mandir)
+ $(INSTALL) -d $(mandir)/man8
+ $(INSTALL) -d $(mandir)/man5
+ $(LIBTOOL) --mode=install cp unbound $(bindir)/unbound
+ $(INSTALL) -c -m 644 $(srcdir)/doc/unbound.8 $(mandir)/man8
+ $(INSTALL) -c -m 644 $(srcdir)/doc/unbound.conf.5 $(mandir)/man5
+
+uninstall:
+ rm -f -- $(bindir)/unbound
+ rm -f -- $(mandir)/man8/unbound.8 $(mandir)/man5/unbound.conf.5
+
# Automatic dependencies.
$(BUILD)%.d: $(srcdir)/%.c
$(INFO) Depend $<
AC_DEFINE(USE_MINI_EVENT, 1, [Define if you want to use internal select based events])
fi
+# set static linking if requested
+AC_SUBST(staticexe)
+staticexe=""
+AC_ARG_ENABLE(staticexe, AC_HELP_STRING([--enable-static-exe],
+ [ enable to compile executables statically against event, ldns libs, for debug purposes ]),
+ , )
+if test x_$enable_static_exe = x_yes; then
+ staticexe="-static"
+fi
+
# check to see if libraries are needed for these functions.
AC_CHECK_LIB(socket, socket)
AC_CHECK_LIB(nsl, inet_pton)
+13 June 2007: Wouter
+ - debug option: configure --enable-static-exe for compile where
+ ldns and libevent are linked statically. Default is off.
+ - make install and make uninstall. Works with static-exe and without.
+ installation of unbound binary and manual pages.
+
12 June 2007: Wouter
- num target queries was set to 0 at a bad time. Default it to 0 and
increase as target queries are done.
* run libtoolize -c if config.sub is missing.
* autoreconf (autoheader && autoconf), if ./configure is missing.
-* Make and install: ./configure; make
+* Make and install: ./configure; make; make install
* --with-ldns=/path/to/ldns
* --with-libevent=/path/to/libevent
Can be set to either the system install or the build directory.
* --without-pthreads
This disables pthreads, and uses Solaris thr library or no threading.
Without this option the pthreads library is detected automatically.
+ * --enable-static-exe
+ This enables a debug option to statically link, against ldns and
+ libevent libraries.
Known issues
------------