]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
easy installation.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Wed, 13 Jun 2007 11:14:20 +0000 (11:14 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Wed, 13 Jun 2007 11:14:20 +0000 (11:14 +0000)
git-svn-id: file:///svn/unbound/trunk@385 be551aaa-1e26-0410-a405-d3ace91eadb9

Makefile.in
configure.ac
doc/Changelog
doc/README

index ba1b75369b1299918188c1119958d18eaca13190..a6c11ca81c39f0b267f81d827bccd3cc6a65ea94 100644 (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 $<
index 4400a2c0f0004983658a8437bf09876c584daf0c..523cf2de9b3c22d5a3d1e7a2e3530ec64a1402af 100644 (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)
index c0523a64979c5f393088b746dd084df33b2f3c2a..273a2cdf24739971e2928f29c56d8f5d3821c1fd 100644 (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.
index c7b9430bf624a82ba753f9dfa432594946f89633..c6b6085d77502d5fb12a41967695b768cb4eba1e 100644 (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
 ------------