diff --git a/README.md b/README.md index 716fc41e..9eeb1ddf 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,12 @@ getdns API ========== -* Date: 2013-06-20 +* Date: 2013-06-27 * GitHub: getdns is a [modern asynchronous DNS API] intended to make all types of DNS information easily available as described by Paul Hoffman. This implementation is licensed under the [MIT license](http://opensource.org/licenses/MIT). -This file captures the goals and direcxtion of the project and the current state of the implementation. +This file captures the goals and direction of the project and the current state of the implementation. The goals of this implemtation of the getdns API are: @@ -23,14 +23,14 @@ Contributors ============ Neel Goyal, Verisign, Inc. Allison Mankin, Verisign, Inc. -Melinda Shore +Melinda Shore, No Mountain Software LLC Glen Wiley, Verisign, Inc. External Dependencies ===================== External dependencies are linked outside the getdns API build tree (we rely on configure to find them). -The project relies on [libdns from NL](https://www.nlnetlabs.nl/projects/ldns/) for parsing and constructing DNS packets. Version 1.6.16 +The project relies on [libldns from NL](https://www.nlnetlabs.nl/projects/ldns/) for parsing and constructing DNS packets. Version 1.6.16 (note that building ldns may require openssl headers and libraries) Although [libevent](http://libevent.org) is used initially to implement the asynchronous model, future work may include a move to other mechanisms (epoll based etc.). Version 2.0.21 stable diff --git a/src/src/AUTHORS b/src/AUTHORS similarity index 100% rename from src/src/AUTHORS rename to src/AUTHORS diff --git a/src/src/COPYING b/src/COPYING similarity index 100% rename from src/src/COPYING rename to src/COPYING diff --git a/src/src/INSTALL b/src/INSTALL similarity index 100% rename from src/src/INSTALL rename to src/INSTALL diff --git a/src/Makefile b/src/Makefile new file mode 100644 index 00000000..e86697f1 --- /dev/null +++ b/src/Makefile @@ -0,0 +1,50 @@ +# +# Makefile. Generated from Makefile.in by configure. +# + + +package = getdns +version = 0.320 +tarname = getdns +distdir = $(tarname)-$(version) + +prefix = /usr/local +exec_prefix = ${prefix} +bindir = ${exec_prefix}/bin + +srcdir = . + + +all clean getdns: + cd common && $(MAKE) $@ + +$(distdir): FORCE + mkdir -p $(distdir)/src + cp $(srcdir)/configure.ac $(distdir) + cp $(srcdir)/configure $(distdir) + cp $(srcdir)/Makefile.in $(distdir) + cp $(srcdir)/src/Makefile.in $(distdir)/src + +distcheck: $(distdir).tar.gz + gzip -cd $(distdir).tar.gz | tar xvf - + cd $(distdir) && ./configure + cd $(distdir) && $(MAKE) all + cd $(distdir) && $(MAKE) check + cd $(distdir) && $(MAKE) DESTDIR=$${PWD}/_inst install + cd $(distdir) && $(MAKE) DESTDIR=$${PWD}/_inst uninstall + @remaining="`find $${PWD}/$(distdir)/_inst -type f | wc -l`"; \ + if test "$${remaining}" -ne 0; then + echo "@@@ $${remaining} file(s) remaining in stage directory!"; \ + exit 1; \ + fi + cd $(distdir) && $(MAKE) clean + rm -rf $(distdir) + @echo "*** Package $(distdir).tar.gz is ready for distribution" + +Makefile: Makefile.in config.status + ./config.status $@ + +configure.status: configure + ./config.status --recheck + +.PHONY: all clean diff --git a/src/src/NEWS b/src/NEWS similarity index 100% rename from src/src/NEWS rename to src/NEWS diff --git a/src/src/README b/src/README similarity index 100% rename from src/src/README rename to src/README diff --git a/src/src/.DS_Store b/src/common/.DS_Store similarity index 100% rename from src/src/.DS_Store rename to src/common/.DS_Store diff --git a/src/src/.deps/example_all_functions.Po b/src/common/.deps/example_all_functions.Po similarity index 100% rename from src/src/.deps/example_all_functions.Po rename to src/common/.deps/example_all_functions.Po diff --git a/src/src/.deps/example_simple_answers.Po b/src/common/.deps/example_simple_answers.Po similarity index 100% rename from src/src/.deps/example_simple_answers.Po rename to src/common/.deps/example_simple_answers.Po diff --git a/src/src/.deps/example_synchronous.Po b/src/common/.deps/example_synchronous.Po similarity index 100% rename from src/src/.deps/example_synchronous.Po rename to src/common/.deps/example_synchronous.Po diff --git a/src/src/.deps/example_tree.Po b/src/common/.deps/example_tree.Po similarity index 100% rename from src/src/.deps/example_tree.Po rename to src/common/.deps/example_tree.Po diff --git a/src/src/ChangeLog b/src/common/ChangeLog similarity index 100% rename from src/src/ChangeLog rename to src/common/ChangeLog diff --git a/src/common/Makefile b/src/common/Makefile new file mode 100644 index 00000000..5ca8cc08 --- /dev/null +++ b/src/common/Makefile @@ -0,0 +1,64 @@ +# +# common/Makefile. Generated from Makefile.in by configure. +# + +package = getdns +version = 0.320 +tarname = getdns +distdir = $(tarname)-$(version) + +prefix = /usr/local +exec_prefix = ${prefix} +bindir = ${exec_prefix}/bin + +srcdir = . + + +CC=gcc +CFLAGS=-g -I$(srcdir)/ -std=c99 +LDFLAGS=-L. +LDLIBS=-levent_core -lldns -lgetdns +PROGRAMS=example-simple-answers example-tree example-all-functions example-synchronous + +all: libgetdns example-simple-answers example-tree example-all-functions example-synchronous + +getdns_core_only.o: getdns_core_only.c + $(CC) -c -Wall -fPIC $(CFLAGS) $^ + +libgetdns: getdns_core_only.c + $(CC) $(CFLAGS) -shared -o libgetdns.so $^ + +clean: + rm -f *.o $(PROGRAMS) libgetdns.so + +$(distdir): FORCE + mkdir -p $(distdir)/src + cp configure.ac $(distdir) + cp configure $(distdir) + cp Makefile.in $(distdir) + cp src/Makefile.in $(distdir)/src + +distcheck: $(distdir).tar.gz + gzip -cd $(distdir).tar.gz | tar xvf - + cd $(distdir) && ./configure + cd $(distdir) && $(MAKE) all + cd $(distdir) && $(MAKE) check + cd $(distdir) && $(MAKE) DESTDIR=$${PWD}/_inst install + cd $(distdir) && $(MAKE) DESTDIR=$${PWD}/_inst uninstall + @remaining="`find $${PWD}/$(distdir)/_inst -type f | wc -l`"; \ + if test "$${remaining}" -ne 0; then + echo "@@@ $${remaining} file(s) remaining in stage directory!"; \ + exit 1; \ + fi + cd $(distdir) && $(MAKE) clean + rm -rf $(distdir) + @echo "*** Package $(distdir).tar.gz is ready for distribution" + +Makefile: Makefile.in ../config.status + cd .. && ./config.status $@ + +configure.status: configure + cd .. && ./config.status --recheck + +.PHONY: clean + diff --git a/src/src/Makefile.in b/src/common/Makefile.in similarity index 86% rename from src/src/Makefile.in rename to src/common/Makefile.in index ac4ebe2e..1a822bcd 100644 --- a/src/src/Makefile.in +++ b/src/common/Makefile.in @@ -15,14 +15,11 @@ srcdir = @srcdir@ VPATH = @srcdir@ CC=gcc -CFLAGS=-g -I. -std=c99 +CFLAGS=-g -I$(srcdir)/ -std=c99 LDFLAGS=-L. LDLIBS=-levent_core -lldns -lgetdns PROGRAMS=example-simple-answers example-tree example-all-functions example-synchronous -# example-simple-answers.c example-tree.c -# example-all-functions.c example-synchronous.c getdns_core_only.c - all: libgetdns example-simple-answers example-tree example-all-functions example-synchronous getdns_core_only.o: getdns_core_only.c @@ -57,11 +54,11 @@ distcheck: $(distdir).tar.gz rm -rf $(distdir) @echo "*** Package $(distdir).tar.gz is ready for distribution" -Makefile: Makefile.in config.status - ./config.status $@ +Makefile: Makefile.in ../config.status + cd .. && ./config.status $@ configure.status: configure - ./config.status --recheck + cd .. && ./config.status --recheck .PHONY: clean diff --git a/src/common/Makefile.in~ b/src/common/Makefile.in~ new file mode 100644 index 00000000..05e9015f --- /dev/null +++ b/src/common/Makefile.in~ @@ -0,0 +1,64 @@ +# +# @configure_input@ +# + +package = @PACKAGE_NAME@ +version = @PACKAGE_VERSION@ +tarname = @PACKAGE_TARNAME@ +distdir = $(tarname)-$(version) + +prefix = @prefix@ +exec_prefix = @exec_prefix@ +bindir = @bindir@ + +srcdir = @srcdir@ +VPATH = @srcdir@ + +CC=gcc +CFLAGS=-g -I. -std=c99 +LDFLAGS=-L. +LDLIBS=-levent_core -lldns -lgetdns +PROGRAMS=example-simple-answers example-tree example-all-functions example-synchronous + +all: libgetdns example-simple-answers example-tree example-all-functions example-synchronous + +getdns_core_only.o: getdns_core_only.c + $(CC) -c -Wall -fPIC $(CFLAGS) $^ + +libgetdns: getdns_core_only.c + $(CC) $(CFLAGS) -shared -o libgetdns.so $^ + +clean: + rm -f *.o $(PROGRAMS) libgetdns.so + +$(distdir): FORCE + mkdir -p $(distdir)/src + cp configure.ac $(distdir) + cp configure $(distdir) + cp Makefile.in $(distdir) + cp src/Makefile.in $(distdir)/src + +distcheck: $(distdir).tar.gz + gzip -cd $(distdir).tar.gz | tar xvf - + cd $(distdir) && ./configure + cd $(distdir) && $(MAKE) all + cd $(distdir) && $(MAKE) check + cd $(distdir) && $(MAKE) DESTDIR=$${PWD}/_inst install + cd $(distdir) && $(MAKE) DESTDIR=$${PWD}/_inst uninstall + @remaining="`find $${PWD}/$(distdir)/_inst -type f | wc -l`"; \ + if test "$${remaining}" -ne 0; then + echo "@@@ $${remaining} file(s) remaining in stage directory!"; \ + exit 1; \ + fi + cd $(distdir) && $(MAKE) clean + rm -rf $(distdir) + @echo "*** Package $(distdir).tar.gz is ready for distribution" + +Makefile: Makefile.in ../config.status + cd .. && ./config.status $@ + +configure.status: configure + cd .. && ./config.status --recheck + +.PHONY: clean + diff --git a/src/src/aclocal.m4 b/src/common/aclocal.m4 similarity index 100% rename from src/src/aclocal.m4 rename to src/common/aclocal.m4 diff --git a/src/src/config.h.in b/src/common/config.h.in similarity index 100% rename from src/src/config.h.in rename to src/common/config.h.in diff --git a/src/common/config.log b/src/common/config.log new file mode 100644 index 00000000..95ad71cc --- /dev/null +++ b/src/common/config.log @@ -0,0 +1,17 @@ + +## ---------------------- ## +## Running config.status. ## +## ---------------------- ## + +This file was extended by getdns config.status 0.320, which was +generated by GNU Autoconf 2.68. Invocation command line was + + CONFIG_FILES = + CONFIG_HEADERS = + CONFIG_LINKS = + CONFIG_COMMANDS = + $ ../config.status Makefile + +on ubuntu-11-10 + +config.status:737: creating Makefile diff --git a/src/src/configure.ac b/src/common/configure.ac similarity index 100% rename from src/src/configure.ac rename to src/common/configure.ac diff --git a/src/src/depcomp b/src/common/depcomp similarity index 100% rename from src/src/depcomp rename to src/common/depcomp diff --git a/src/src/example-all-functions.c b/src/common/example-all-functions.c similarity index 100% rename from src/src/example-all-functions.c rename to src/common/example-all-functions.c diff --git a/src/src/example-simple-answers.c b/src/common/example-simple-answers.c similarity index 100% rename from src/src/example-simple-answers.c rename to src/common/example-simple-answers.c diff --git a/src/src/example-synchronous.c b/src/common/example-synchronous.c similarity index 100% rename from src/src/example-synchronous.c rename to src/common/example-synchronous.c diff --git a/src/src/example-tree.c b/src/common/example-tree.c similarity index 100% rename from src/src/example-tree.c rename to src/common/example-tree.c diff --git a/src/src/getdns_core_only.c b/src/common/getdns_core_only.c similarity index 100% rename from src/src/getdns_core_only.c rename to src/common/getdns_core_only.c diff --git a/src/src/getdns_core_only.h b/src/common/getdns_core_only.h similarity index 100% rename from src/src/getdns_core_only.h rename to src/common/getdns_core_only.h diff --git a/src/src/getdns_libevent.h b/src/common/getdns_libevent.h similarity index 100% rename from src/src/getdns_libevent.h rename to src/common/getdns_libevent.h diff --git a/src/src/index.html b/src/common/index.html similarity index 100% rename from src/src/index.html rename to src/common/index.html diff --git a/src/src/install-sh b/src/common/install-sh similarity index 100% rename from src/src/install-sh rename to src/common/install-sh diff --git a/src/src/make-examples-linux.sh b/src/common/make-examples-linux.sh similarity index 100% rename from src/src/make-examples-linux.sh rename to src/common/make-examples-linux.sh diff --git a/src/src/make-examples-mac.sh b/src/common/make-examples-mac.sh similarity index 100% rename from src/src/make-examples-mac.sh rename to src/common/make-examples-mac.sh diff --git a/src/configure.ac b/src/configure.ac new file mode 100644 index 00000000..f69b0516 --- /dev/null +++ b/src/configure.ac @@ -0,0 +1,31 @@ +# -*- Autoconf -*- +# Process this file with autoconf to produce a configure script. +# @configure_input@ +# + +AC_PREREQ([2.68]) +AC_INIT([getdns], [0.320], [melinda.shore@nomountain.net]) +# AM_INIT_AUTOMAKE([getkey], [0.320]) +AC_CONFIG_SRCDIR([configure.ac]) + +# Checks for programs. +AC_PROG_CC + +# Checks for libraries. +AC_CHECK_LIB([event_core], [event_base_new]) +AC_CHECK_LIB([getdns], [getdns_context_create]) +AC_CHECK_LIB([ldns], [ldns_dname_new_frm_str]) + +# Checks for header files. +AC_CHECK_HEADERS([inttypes.h netinet/in.h stdint.h stdlib.h string.h]) + +# Checks for typedefs, structures, and compiler characteristics. +AC_HEADER_STDBOOL +AC_TYPE_SIZE_T +AC_TYPE_UINT16_T +AC_TYPE_UINT32_T +AC_TYPE_UINT64_T +AC_TYPE_UINT8_T + +AC_CONFIG_FILES([Makefile common/Makefile]) +AC_OUTPUT