easy installation.

git-svn-id: file:///svn/unbound/trunk@385 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2007-06-13 11:14:20 +00:00
parent 330a321f13
commit ccafa0830f
4 changed files with 38 additions and 4 deletions

View file

@ -20,12 +20,14 @@ exec_prefix=@exec_prefix@
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@
@ -48,7 +50,7 @@ LINTFLAGS=+quiet -weak -warnposix -unrecog -Din_addr_t=uint32_t -Du_int=unsigned
# 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 \
@ -74,7 +76,7 @@ ALL_OBJ=$(addprefix $(BUILD),$(ALL_SRC:.c=.o) \
$(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
@ -82,7 +84,7 @@ $(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
@ -149,6 +151,19 @@ ifdef doxygen
$(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 $<

View file

@ -449,6 +449,16 @@ else
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)

View file

@ -1,3 +1,9 @@
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.

View file

@ -17,7 +17,7 @@ This software is under BSD license, see LICENSE for details.
* 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.
@ -25,6 +25,9 @@ This software is under BSD license, see LICENSE for details.
* --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
------------