Enable GSS on Linux and Android (mono/mono#17223)
authorEgor Bogatov <egorbo@gmail.com>
Thu, 17 Oct 2019 23:01:44 +0000 (02:01 +0300)
committerSteve Pfister <steveisok@users.noreply.github.com>
Thu, 17 Oct 2019 23:01:44 +0000 (19:01 -0400)
Commit migrated from https://github.com/mono/mono/commit/4908d1f19a615b033ec148b49c8fab83f1e6f0ec

src/mono/configure.ac
src/mono/mono/native/Makefile.am

index a192008..ee53553 100644 (file)
@@ -3797,6 +3797,7 @@ if test x$host_win32 = xno; then
                        AC_DEFINE(HAVE_GSSFW_HEADERS, 1, [GSS/GSS.h])
                        AC_DEFINE(HAVE_GSS_SPNEGO_MECHANISM, 1, [GSS_SPNEGO_MECHANISM])
                        enable_gss=yes
+                       AC_DEFINE(ENABLE_GSS, 1, [ENABLE_GSS])
        ], [
                        AC_MSG_RESULT(no)
        ])
@@ -3808,6 +3809,7 @@ if test x$host_win32 = xno; then
        ],[
                        AC_MSG_RESULT(yes)
                        enable_gss=yes
+                       AC_DEFINE(ENABLE_GSS, 1, [ENABLE_GSS])
        ], [
                        AC_MSG_RESULT(no)
        ])
@@ -6421,7 +6423,11 @@ elif test x$host_linux = xyes; then
        MONO_NATIVE_CXXFLAGS=$CXXFLAGS
        MONO_NATIVE_CFLAGS=$CFLAGS
        MONO_NATIVE_LDFLAGS=$LDFLAGS
-
+       if test x$enable_gss = xyes; then
+               MONO_NATIVE_LDFLAGS="$MONO_NATIVE_LDFLAGS -lgssapi_krb5"
+       else
+               AC_MSG_WARN([GSS is not enabled, it requires libkrb5-dev package])
+       fi
        mono_native=yes
        mono_native_compat=no
        MONO_NATIVE_PLATFORM=linux
index e2af96e..9ade5e3 100644 (file)
@@ -114,7 +114,7 @@ gss_sources = \
 
 if ENABLE_GSS
 macos_sources += $(gss_sources)
-
+linux_sources += $(gss_sources)
 ios_sources += $(gss_sources)
 endif