diff --git a/config.h.in b/config.h.in
index 7a4d4c8f2dba89b30c60488e64a5f95fcccd7589..78ca94c24654036470854537802e9aaaebf5c08e 100644
--- a/config.h.in
+++ b/config.h.in
@@ -4,6 +4,7 @@
 #undef PACKAGE
 #undef VERSION
 
+#undef TBROOT
 #undef TBDBNAME
 #undef TBADMINGROUP
 #undef IPBASE
diff --git a/configure b/configure
index 3b44866ff003c14a0307b4147d1f7ad45ff2865d..11ae7fc2c33d18c05a5020160caf4bf013982c06 100755
--- a/configure
+++ b/configure
@@ -1004,6 +1004,10 @@ fi
 #
 # Be sure to add to config.h.in!
 #
+cat >> confdefs.h <<EOF
+#define TBROOT "$prefix"
+EOF
+
 cat >> confdefs.h <<EOF
 #define TBDBNAME "$TBDBNAME"
 EOF
@@ -1395,7 +1399,7 @@ fi
 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
 # ./install, which can be erroneously created by make from ./install.sh.
 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1399: checking for a BSD compatible install" >&5
+echo "configure:1403: checking for a BSD compatible install" >&5
 if test -z "$INSTALL"; then
 if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
diff --git a/configure.in b/configure.in
index b385de6b657ca8056f6981c373049053c18ce105..aa7ff31a52de529df6c720342007584eb02584d5 100755
--- a/configure.in
+++ b/configure.in
@@ -191,6 +191,7 @@ fi
 #
 # Be sure to add to config.h.in!
 #
+AC_DEFINE_UNQUOTED(TBROOT, "$prefix")
 AC_DEFINE_UNQUOTED(TBDBNAME, "$TBDBNAME")
 AC_DEFINE_UNQUOTED(TBADMINGROUP, "$TBADMINGROUP")
 AC_DEFINE_UNQUOTED(IPBASE, "$IPBASE")