]> granicus.if.org Git - pdns/commitdiff
Cleanup linking with YaHTTP
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Fri, 10 Oct 2014 18:49:19 +0000 (20:49 +0200)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Fri, 10 Oct 2014 18:49:19 +0000 (20:49 +0200)
Replace the hardcoded paths with variables.

configure.ac
modules/remotebackend/Makefile.am
pdns/Makefile.am

index 8240225e5486b09a17c37e431fce081af55011ab..aa4e83f0bb9f8784a431ee1d26474cc1c3605979 100644 (file)
@@ -355,6 +355,9 @@ AC_SUBST([AM_CPPFLAGS],
   ["AS_ESCAPE([-I$(top_builddir) -I$(top_srcdir)]) $THREADFLAGS $BOOST_CPPFLAGS"]
 )
 
+AC_SUBST([YAHTTP_CFLAGS], ['-I$(top_srcdir)/pdns/ext/yahttp'])
+AC_SUBST([YAHTTP_LIBS], ['-L$(top_builddir)/pdns/ext/yahttp/yahttp -lyahttp'])
+
 export moduledirs moduleobjects modulelibs
 
 AC_CONFIG_FILES([
index b6e4fb428298c3cf3d17653d03df6b53811d491f..c48e49957abfb7284b18bc9045ec11500798c2bc 100644 (file)
@@ -1,6 +1,6 @@
 AM_CPPFLAGS += \
        -I../../pdns/ext/rapidjson/include \
-       -I../../pdns/ext/yahttp \
+       $(YAHTTP_CFLAGS) \
        $(POLARSSL_CFLAGS) \
        $(LIBZMQ_CFLAGS)
 
@@ -46,7 +46,7 @@ libremotebackend_la_SOURCES = \
 
 libremotebackend_la_LDFLAGS = -module -avoid-version
 
-libremotebackend_la_LIBADD = ../../pdns/ext/yahttp/yahttp/libyahttp.la
+libremotebackend_la_LIBADD = $(YAHTTP_LIBS)
 
 if REMOTEBACKEND_ZEROMQ
 libremotebackend_la_LIBADD += $(LIBZMQ_LIBS)
@@ -103,7 +103,7 @@ libtestremotebackend_la_SOURCES = \
        remotebackend.hh remotebackend.cc
 
 libtestremotebackend_la_LIBADD = \
-       -L../../pdns/ext/yahttp/yahttp -lyahttp \
+       $(YAHTTP_LIBS) \
        $(POLARSSL_LIBS) \
        $(BOOST_UNIT_TEST_FRAMEWORK_LIBS) \
        $(BOOST_SERIALIZATION_LIBS) \
index b79e8120471334022e9eb84f0be6b73f968aad89..935b827ef0f5174ffa958df279016116cda5b35a 100644 (file)
@@ -1,6 +1,6 @@
 AM_CPPFLAGS += \
        -I$(top_srcdir)/pdns/ext/rapidjson/include \
-       -I$(top_srcdir)/pdns/ext/yahttp
+       $(YAHTTP_CFLAGS)
 
 AM_CXXFLAGS = \
        -DSYSCONFDIR=\"$(sysconfdir)\" \
@@ -9,8 +9,6 @@ AM_CXXFLAGS = \
        $(LUA_CFLAGS) \
        $(POLARSSL_CFLAGS)
 
-YAHTTP_LIBS = -Lext/yahttp/yahttp -lyahttp
-
 AM_LFLAGS = -i
 AM_YFLAGS = -d --verbose --debug
 
@@ -881,8 +879,6 @@ pdns_recursor_SOURCES = \
        dnsrecords.cc dnsrecords.hh \
        dnswriter.cc dnswriter.hh \
        epollmplexer.cc \
-       ext/yahttp/yahttp/reqresp.cpp \
-       ext/yahttp/yahttp/router.cpp \
        htimer.cc htimer.hh \
        json.cc json.hh \
        logger.cc \