Do not build shared-only libs for --disable-shared
[openafs.git] / src / cf / options.m4
index 37c0927..904e097 100644 (file)
@@ -108,10 +108,10 @@ AC_ARG_ENABLE([kauth],
      enable_pam="no"])
 
 dnl modern crypto
-AC_ARG_ENABLE([rxgk],
 dnl Note that this flag only dictates whether or not rxgk support is turned on
 dnl in various daemons, utilities, etc. Without this flag, we still always try
 dnl to build rxgk when we can (when a suitable gssapi is available).
+AC_ARG_ENABLE([rxgk],
     [AS_HELP_STRING([--enable-rxgk],
         [Include experimental support for the RXGK security class (defaults to disabled)])],
     [],
@@ -347,4 +347,12 @@ fi
 if test "x$enable_pthreaded_ubik" = "xyes"; then
 ENABLE_PTHREADED_UBIK=yes
 fi
+
+dnl If the libtool --disable-shared option is specified, comment out the
+dnl @SHARED_ONLY@ lines in our Makefiles.
+AS_IF([test x"$enable_shared" = xyes],
+ [SHARED_ONLY=],
+ [SHARED_ONLY=#])
+AC_SUBST([SHARED_ONLY])
+
 ])