]> asedeno.scripts.mit.edu Git - 1ts-debian.git/blobdiff - acinclude.m4
This commit was generated by cvs2svn to compensate for changes in r145,
[1ts-debian.git] / acinclude.m4
index 63e5fd14999bc177a1ade13db24c0c0b8c51c271..1a87fd0bbc5ebe4e05e383ba9961cad2565ff327 100644 (file)
@@ -92,8 +92,16 @@ AC_DEFUN(ATHENA_UTIL_COM_ERR,
        [com_err="$withval"], [com_err=yes])
 if test "$com_err" != no; then
        if test "$com_err" != yes; then
-               CPPFLAGS="$CPPFLAGS -I$com_err/include"
+               if test -f $com_err/include/krb5/com_right.h; then
+                       CPPFLAGS="$CPPFLAGS -I$com_err/include/krb5"
+               else
+                       CPPFLAGS="$CPPFLAGS -I$com_err/include"
+               fi
                LDFLAGS="$LDFLAGS -L$com_err/lib"
+       else
+               if test -f /usr/include/krb5/com_right.h; then
+                       CPPFLAGS="$CPPFLAGS -I/usr/include/krb5"
+               fi
        fi
        AC_CHECK_LIB(com_err, com_err, :,
                     [AC_MSG_ERROR(com_err library not found)])
@@ -107,20 +115,31 @@ AC_DEFUN(ATHENA_UTIL_SS,
 [AC_ARG_WITH(ss,
        [  --with-ss=PREFIX        Specify location of ss (requires com_err)],
        [ss="$withval"], [ss=yes])
-if test "$ss" != no; then
-       if test "$ss" != yes; then
-               CPPFLAGS="$CPPFLAGS -I$ss/include"
-               LDFLAGS="$LDFLAGS -L$ss/lib"
+if test "$ss" = no; then
+       AC_MSG_ERROR(This package requires ss.)
+fi
+if test "$ss" != yes; then
+       CPPFLAGS="$CPPFLAGS -I$ss/include"
+       if test -f $ss/include/krb5/sl.h; then
+               CPPFLAGS="$CPPFLAGS -I$ss/include/krb5"
        fi
-       AC_CHECK_LIB(ss, ss_perror, :,
-                    [unset ac_cv_lib_ss_ss_perror
-                     AC_CHECK_LIB(ss, ss_perror, :,
-                                  [AC_MSG_ERROR(ss library not found)],
-                                  -ledit -lroken -ltermcap -lcom_err)],
-                    -lcom_err)
+       LDFLAGS="$LDFLAGS -L$ss/lib"
 else
-       AC_MSG_ERROR(This package requires ss.)
-fi])
+       if test -f /usr/include/krb5/sl.h; then
+               CPPFLAGS="$CPPFLAGS -I/usr/include/krb5"
+       fi
+fi
+AC_CHECK_HEADERS(ss/ss.h krb5/ss.h)
+
+AC_CHECK_LIB(ss, ss_perror, [SS_LIBS="-lss"],
+            [unset ac_cv_lib_ss_ss_perror
+             S="-ledit -lroken -ltermcap -lcom_err -lcrypt"
+             AC_CHECK_LIB(ss, ss_perror,
+                          [SS_LIBS="-lss $S"],
+                          [AC_MSG_ERROR(ss library not found)],
+                          $S)],
+            -lcom_err)
+AC_SUBST(SS_LIBS)])
 
 dnl ----- Regular expressions -----