summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/configure.ac2
-rw-r--r--source4/heimdal_build/config.m423
-rw-r--r--source4/heimdal_build/external.m454
3 files changed, 78 insertions, 1 deletions
diff --git a/source4/configure.ac b/source4/configure.ac
index 7f4b4d01f8..29db34eddf 100644
--- a/source4/configure.ac
+++ b/source4/configure.ac
@@ -13,7 +13,7 @@ AC_DEFINE(CONFIG_H_IS_FROM_SAMBA,1,[Marker for samba's config.h])
m4_include(build/m4/env.m4)
m4_include(lib/replace/samba.m4)
m4_include(lib/smbreadline/readline.m4)
-m4_include(heimdal_build/internal.m4)
+m4_include(heimdal_build/config.m4)
m4_include(lib/util/fault.m4)
m4_include(lib/util/signal.m4)
m4_include(lib/util/util.m4)
diff --git a/source4/heimdal_build/config.m4 b/source4/heimdal_build/config.m4
new file mode 100644
index 0000000000..99aed8c093
--- /dev/null
+++ b/source4/heimdal_build/config.m4
@@ -0,0 +1,23 @@
+
+external_heimdal=no
+AC_MSG_CHECKING([Whether to use external heimdal libraries])
+AC_ARG_ENABLE(external-heimdal,
+[ --enable-external-heimdal Enable external heimdal libraries (experimental,default=no)],
+[ external_heimdal=$enableval ],
+[ external_heimdal=no ])
+AC_MSG_RESULT($external_heimdal)
+
+if test x"$external_heimdal" = x"yes"; then
+
+# external_heimdal_start
+m4_include(heimdal_build/external.m4)
+# external_heimdal_end
+
+else
+
+# internal_heimdal_start
+m4_include(heimdal_build/internal.m4)
+# internal_heimdal_end
+
+fi
+
diff --git a/source4/heimdal_build/external.m4 b/source4/heimdal_build/external.m4
new file mode 100644
index 0000000000..3cd8900a12
--- /dev/null
+++ b/source4/heimdal_build/external.m4
@@ -0,0 +1,54 @@
+# This is every experimental
+# We should really add configure checks
+# to verify the installed heimdal libraries
+# are good enough for our usage!!!
+
+HEIMDAL_KRB5_LIBS="-lkrb5 -lcom_err"
+HEIMDAL_KRB5_CFLAGS=""
+HEIMDAL_KRB5_CPPFLAGS=""
+HEIMDAL_KRB5_LDFLAGS=""
+SMB_EXT_LIB(HEIMDAL_KRB5,
+ [${HEIMDAL_KRB5_LIBS}],
+ [${HEIMDAL_KRB5_CFLAGS}],
+ [${HEIMDAL_KRB5_CPPFLAGS}],
+ [${HEIMDAL_KRB5_LDFLAGS}])
+SMB_ENABLE(HEIMDAL_KRB5)
+AC_DEFINE(HAVE_KRB5,1,[Whether kerberos is available])
+HAVE_KRB5=YES
+AC_DEFINE(HAVE_COM_ERR,1,[Whether com_err is available])
+HAVE_COM_ERR=YES
+
+HEIMDAL_GSSAPI_LIBS="-lgssapi"
+HEIMDAL_GSSAPI_CFLAGS=""
+HEIMDAL_GSSAPI_CPPFLAGS=""
+HEIMDAL_GSSAPI_LDFLAGS=""
+SMB_EXT_LIB(HEIMDAL_GSSAPI,
+ [${HEIMDAL_GSSAPI_LIBS}],
+ [${HEIMDAL_GSSAPI_CFLAGS}],
+ [${HEIMDAL_GSSAPI_CPPFLAGS}],
+ [${HEIMDAL_GSSAPI_LDFLAGS}])
+SMB_ENABLE(HEIMDAL_GSSAPI)
+AC_DEFINE(HAVE_GSSAPI,1,[Whether GSSAPI is available])
+HAVE_GSSAPI=YES
+
+HEIMDAL_HDB_LIBS="-lhdb"
+HEIMDAL_HDB_CFLAGS=""
+HEIMDAL_HDB_CPPFLAGS=""
+HEIMDAL_HDB_LDFLAGS=""
+SMB_EXT_LIB(HEIMDAL_HDB,
+ [${HEIMDAL_HDB_LIBS}],
+ [${HEIMDAL_HDB_CFLAGS}],
+ [${HEIMDAL_HDB_CPPFLAGS}],
+ [${HEIMDAL_HDB_LDFLAGS}])
+SMB_ENABLE(HEIMDAL_HDB)
+
+HEIMDAL_KDC_LIBS="-lkdc"
+HEIMDAL_KDC_CFLAGS=""
+HEIMDAL_KDC_CPPFLAGS=""
+HEIMDAL_KDC_LDFLAGS=""
+SMB_EXT_LIB(HEIMDAL_KDC,
+ [${HEIMDAL_KDC_LIBS}],
+ [${HEIMDAL_KDC_CFLAGS}],
+ [${HEIMDAL_KDC_CPPFLAGS}],
+ [${HEIMDAL_KDC_LDFLAGS}])
+SMB_ENABLE(HEIMDAL_KDC)