Browse Source

install auth.spec and use the right one

git-svn-id: svn://bind10.isc.org/svn/bind10/branches/parkinglot@697 e5f2f494-b856-4b98-b285-d166d9295462
Jelte Jansen 15 years ago
parent
commit
a042fbdc36
3 changed files with 12 additions and 2 deletions
  1. 4 0
      src/bin/auth/Makefile.am
  2. 1 1
      src/bin/auth/config.h.in
  3. 7 1
      src/bin/auth/main.cc

+ 4 - 0
src/bin/auth/Makefile.am

@@ -8,3 +8,7 @@ b10_auth_LDADD =  $(top_builddir)/src/lib/dns/cpp/.libs/libdns.a
 b10_auth_LDADD +=  $(top_builddir)/src/lib/auth/cpp/.libs/libauth.a
 b10_auth_LDADD += $(top_builddir)/src/lib/config/cpp/libclient.a
 b10_auth_LDADD += $(top_builddir)/src/lib/cc/cpp/libcc.a
+
+b10_authdir = $(DESTDIR)$(pkgdatadir)
+b10_auth_DATA = auth.spec
+

+ 1 - 1
src/bin/auth/config.h.in

@@ -1 +1 @@
-#define AUTH_SPECFILE_LOCATION "@abs_top_srcdir@/src/bin/auth/auth.spec"
+#define AUTH_SPECFILE_LOCATION "@prefix@/share/bind/auth.spec"

+ 7 - 1
src/bin/auth/main.cc

@@ -100,7 +100,13 @@ main(int argc, char* argv[]) {
 
     // initialize command channel
     try {
-        CommandSession cs = CommandSession(AUTH_SPECFILE_LOCATION,
+        std::string specfile;
+        if (getenv("B10_FROM_SOURCE")) {
+            specfile = std::string(getenv("B10_FROM_SOURCE")) + "/src/bin/auth/auth.spec";
+        } else {
+            specfile = std::string(AUTH_SPECFILE_LOCATION);
+        }
+        CommandSession cs = CommandSession(specfile,
                                            my_config_handler,
                                            my_command_handler);