]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
Fixup of Makefile/configure for examples. More portable. Can build with
authorWouter Wijngaards <wouter@NLnetLabs.nl>
Thu, 14 Dec 2006 09:52:20 +0000 (09:52 +0000)
committerWouter Wijngaards <wouter@NLnetLabs.nl>
Thu, 14 Dec 2006 09:52:20 +0000 (09:52 +0000)
buiddir. ldns spec minor update (version number).

examples/Makefile.in
examples/configure.ac
packaging/fedora/ldns.spec

index 33e995b04130637626ca78b5bd327082f4ac76b4..9bf9ceb34fc22209920705e607bc9b452c28db03 100644 (file)
@@ -17,7 +17,7 @@ LDFLAGS = @LDFLAGS@
 LIBS = @LIBS@
 LDNSDIR = @LDNSDIR@
 
-INSTALL = $(libtool) --mode=install $(srcdir)/../install-sh 
+INSTALL = $(srcdir)/../install-sh 
 
 COMPILE         = $(CC) $(CPPFLAGS) $(CFLAGS)
 LINK           = $(libtool) --mode=link $(CC) $(LDFLAGS) $(LIBS)
@@ -52,20 +52,22 @@ PROGRAMS=$(SOURCES:.c=)
 .PHONY:        all clean realclean all-static
 .SECONDARY: $(SOURCES:.c=.o)
 
-all:   $(addsuffix -exe,$(PROGRAMS))
+all:   $(addsuffix .prg,$(PROGRAMS))
 
-all-static: $(addsuffix -stc,$(PROGRAMS))
+all-static: $(addsuffix .stc,$(PROGRAMS))
 
 %.o:    $(srcdir)/%.c
-       $(COMPILE) -c $<
+       $(COMPILE) -o $@ -c $<
 
-%-exe:  $(srcdir)/%.o
-       @if test $< -nt $(@:-exe=); then \
-       $(LINK) -o $(@:-exe=) $^ ; \
+%.prg:  %.o
+       @if test ! -f $(@:.prg=) -o $< -nt $(@:.prg=); then \
+       echo $(LINK) -o $(@:.prg=) $^ ; \
+       $(LINK) -o $(@:.prg=) $^ ; \
        fi
 
-%-stc: $(srcdir)/%.o
-       @if test $< -nt $@; then \
+%.stc: %.o
+       @if test ! -f $@ -o $< -nt $@; then \
+       echo $(LINK_STATIC) -o $@ $^ ; \
        $(LINK_STATIC) -o $@ $^ ; \
        fi
 
@@ -76,9 +78,10 @@ lint:
        done
 
 clean:
-       rm -f *.o *.lo
+       rm -f *.o *.lo 
+       rm -rf .libs
        rm -f $(PROGRAMS) 
-       rm -f $(addsuffix -stc,$(PROGRAMS))
+       rm -f $(addsuffix .stc,$(PROGRAMS))
 
 realclean: clean
        rm -rf autom4te.cache/
@@ -93,7 +96,7 @@ install:      $(PROGRAMS)
                $(INSTALL) -d -m 755 $(DESTDIR)$(mandir)
                $(INSTALL) -d -m 755 $(DESTDIR)$(mandir)/man1
                for i in $(PROGRAMS); do \
-                       ${INSTALL} -c $$i $(DESTDIR)$(bindir) ; \
+                       $(libtool) --mode=install ${INSTALL} -c $$i $(DESTDIR)$(bindir) ; \
                        $(INSTALL) -c -m 644 $$i.1 $(DESTDIR)$(mandir)/man1/$$i.1 ; \
                        done
                exit 0
index 4cdfcbedfea15e52fecf1cae0c46db293f4f952d..fe8186180fbd5a4c98ab0a52fd8350c4b6ce37ba 100644 (file)
@@ -120,7 +120,7 @@ AC_ARG_WITH(ldns,
        [
                specialldnsdir="$withval"
                CPPFLAGS="$CPPFLAGS -I$withval/include"
-               LDFLAGS="$LDFLAGS -L$withval/lib"
+               LDFLAGS="$LDFLAGS -L$withval -L$withval/lib"
                LDNSDIR="$withval"
        ]
 )
@@ -133,7 +133,7 @@ if test -f $ldns_dev_dir/ldns/util.h && \
        ldns_version=`grep LDNS_VERSION $ldns_dev_dir/ldns/util.h | sed -e 's/^.*"\(.*\)".*$/\1/'`
        AC_MSG_RESULT([using $ldns_dev_dir with $ldns_version])
        CPPFLAGS="$CPPFLAGS -I$ldns_dev_dir/include"
-       LDFLAGS="$LDFLAGS -L$ldns_dev_dir/lib"
+       LDFLAGS="$LDFLAGS -L$ldns_dev_dir -L$ldns_dev_dir/lib"
        LIBS="$LIBS -lldns"
        AC_DEFINE(HAVE_LIBLDNS, 1, [If the ldns library is available.])
        LDNSDIR="$ldns_dev_dir"
index b44b56272ff5a2eb94bb761360327e7551c8237f..3d55a00c1cb17cc08b3de4c33f168e6da4a61ea5 100644 (file)
@@ -1,6 +1,6 @@
 Summary: Lowlevel DNS(SEC) library with DNS tools
 Name: ldns
-Version: 1.1.0
+Version: 1.1.1
 Release: 1
 License: BSD
 Url: http://www.nlnetlabs.nl/%{name}/
@@ -78,6 +78,9 @@ rm -rf %{buildroot}
 %postun -p /sbin/ldconfig
 
 %changelog
+* Thu Dec 14 2006 Wouter Wijngaards <wouter@nlnetlabs.nl> 1.1.1-1
+- New version number.
+
 * Tue Aug 15 2006 Wouter Wijngaards <wouter@nlnetlabs.nl> 1.1.0-1
 - reworked for new Makefile. configure calls by build script.
 - names the docs for devel package in more detail.