]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
Configure scripts detect development source dir.
authorWouter Wijngaards <wouter@NLnetLabs.nl>
Tue, 4 Jul 2006 11:36:33 +0000 (11:36 +0000)
committerWouter Wijngaards <wouter@NLnetLabs.nl>
Tue, 4 Jul 2006 11:36:33 +0000 (11:36 +0000)
README.svn
drill/configure.ac
examples/configure.ac
examples/nsd-test/configure.ac
lua/lua.c
pcat/configure.ac

index f6fce4af23abb6aacde6def8995cd463a1bf3d27..f4da01a0a2c7f64f2dc9b781b284d9ea6fe4f319 100644 (file)
@@ -9,5 +9,7 @@ autoreconf
 ./configure
 make
 make doc  # needs doxygen for the html pages
-(cd examples && autoreconf && ./configure --with-ldns=../ && make)
-(cd drill && autoreconf && ./configure --with-ldns=../ && make)
+(cd examples && autoreconf && ./configure && make)
+(cd drill && autoreconf && ./configure && make)
+(cd pcat && autoreconf && ./configure && make)
+(cd examples/nsd-test && autoreconf && ./configure && make)
index 3790b1e197990072a2f566f45e124468bf9bafa8..bfd0bb5047f9a3d35ba8c3cb69b305eee784c353 100644 (file)
@@ -75,8 +75,22 @@ AC_ARG_WITH(ldns,
        ]
 )
 
+# check for ldns development source tree
+AC_MSG_CHECKING([for ldns devel source])
+ldns_dev_dir=..
+if test -f $ldns_dev_dir/ldns/util.h && \
+       grep LDNS_VERSION $ldns_dev_dir/ldns/util.h >/dev/null; then
+       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"
+       LDNSDIR="$ldns_dev_dir"
+else
+       AC_MSG_RESULT([no])
+fi
+
 AC_CHECK_LIB(ldns, ldns_rr_new,, [
-       AC_MSG_ERROR([Can't find ldns library])
+               AC_MSG_ERROR([Can't find ldns library])
        ]
 )
 
index 2267d19aa1fd277052d1376812ff46650d9cf1ba..38de87ea77a73a21aebcc1c3ea52f08d27b33d76 100644 (file)
@@ -35,22 +35,22 @@ AC_ARG_WITH(ldns,
        ]
 )
 
+# check for ldns development source tree
+AC_MSG_CHECKING([for ldns devel source])
+ldns_dev_dir=..
+if test -f $ldns_dev_dir/ldns/util.h && \
+       grep LDNS_VERSION $ldns_dev_dir/ldns/util.h >/dev/null; then
+       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"
+       LDNSDIR="$ldns_dev_dir"
+else
+       AC_MSG_RESULT([no])
+fi
+
 AC_CHECK_LIB(ldns, ldns_rr_new,, [
-       # if no -lldns, check for ldns development source tree
-       AC_MSG_CHECKING([for ldns devel source])
-       ldns_dev_dir=..
-       if test -f $ldns_dev_dir/ldns/util.h && \
-               grep LDNS_VERSION $ldns_dev_dir/ldns/util.h >/dev/null; then
-               ldns_version=`grep LDNS_VERSION $ldns_dev_dir/ldns/util.h | sed -e 's/^.*"\(.*\)".*$/\1/'`
-               AC_MSG_RESULT([in $ldns_dev_dir have $ldns_version])
-               CPPFLAGS="$CPPFLAGS -I$ldns_dev_dir/include"
-               LDFLAGS="$LDFLAGS -L$ldns_dev_dir/lib"
-               LIBS="$LIBS -lldns"
-               LDNSDIR="$ldns_dev_dir"
-       else
-               AC_MSG_RESULT([no])
                AC_MSG_ERROR([Can't find ldns library])
-       fi
        ]
 )
 
index 330531258974c7f429f6b38db923787e67892e7e..1d606ec4d93da7194c855040bc8c340b1bd62169 100644 (file)
@@ -35,8 +35,22 @@ AC_ARG_WITH(ldns,
        ]
 )
 
+# check for ldns development source tree
+AC_MSG_CHECKING([for ldns devel source])
+ldns_dev_dir=../..
+if test -f $ldns_dev_dir/ldns/util.h && \
+       grep LDNS_VERSION $ldns_dev_dir/ldns/util.h >/dev/null; then
+       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"
+       LDNSDIR="$ldns_dev_dir"
+else
+       AC_MSG_RESULT([no])
+fi
+
 AC_CHECK_LIB(ldns, ldns_rr_new,, [
-       AC_MSG_ERROR([Can't find ldns library])
+               AC_MSG_ERROR([Can't find ldns library])
        ]
 )
 
index a24b9a6b91469a58b02020c24df112bfd4ede835..e12fbdea02bf10abe6c82782566d815d62a53c99 100644 (file)
--- a/lua/lua.c
+++ b/lua/lua.c
@@ -13,9 +13,9 @@
 #include <stdint.h>
 
 /* lua includes */
-#include <lua50/lua.h>
-#include <lua50/lualib.h>
-#include <lua50/lauxlib.h>
+#include <lua.h>
+#include <lualib.h>
+#include <lauxlib.h>
 
 /* ldns include */
 #include <ldns/dns.h>
@@ -33,7 +33,7 @@ usage(FILE *f, char *progname)
 void
 version(FILE *f, char *progname)
 {
-       fprintf(f, "%s version %s\n", progname, VERSION);
+       fprintf(f, "%s version %s\n", progname, LDNS_VERSION);
 }
 
 /*
@@ -48,6 +48,7 @@ version(FILE *f, char *progname)
  RDF
 ==========
  */
+static int
 l_rdf_new_frm_str(lua_State *L)
 {
        uint16_t t = (uint16_t)lua_tonumber(L, 1);
index 020e51cef2b97f469f1bd56ab20e6ab3056999cd..72acc398d97422332558eaaad9465568cf8d2370 100644 (file)
@@ -34,8 +34,22 @@ AC_ARG_WITH(ldns,
        ]
 )
 
+# check for ldns development source tree
+AC_MSG_CHECKING([for ldns devel source])
+ldns_dev_dir=..
+if test -f $ldns_dev_dir/ldns/util.h && \
+       grep LDNS_VERSION $ldns_dev_dir/ldns/util.h >/dev/null; then
+       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"
+       LDNSDIR="$ldns_dev_dir"
+else
+       AC_MSG_RESULT([no])
+fi
+
 AC_CHECK_LIB(ldns, ldns_rr_new,, [
-       AC_MSG_ERROR([Can't find ldns library])
+               AC_MSG_ERROR([Can't find ldns library])
        ]
 )