From: Ken Raeburn Date: Thu, 19 Sep 2002 18:19:38 +0000 (+0000) Subject: * aclocal.m4 (KRB5_AC_CHOOSE_SS): Check that the indicated system ss package X-Git-Tag: krb5-1.3-alpha1~370 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=781d57316f48c46e74c7b2a1448804f0aa1a3fab;p=krb5.git * aclocal.m4 (KRB5_AC_CHOOSE_SS): Check that the indicated system ss package can actually be linked against and will produce programs that run. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14881 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/ChangeLog b/src/ChangeLog index 71fab49ea..a6639e2e3 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2002-09-19 Ken Raeburn + + * aclocal.m4 (KRB5_AC_CHOOSE_SS): Check that the indicated system + ss package can actually be linked against and will produce + programs that run. + 2002-09-15 Tom Yu * aclocal.m4 (AC_KRB5_TCL_FIND_CONFIG): Set TCL_LIBPATH and diff --git a/src/aclocal.m4 b/src/aclocal.m4 index 381b99835..aa2da119b 100644 --- a/src/aclocal.m4 +++ b/src/aclocal.m4 @@ -1437,13 +1437,31 @@ AC_DEFUN([KRB5_AC_CHOOSE_SS],[ AC_ARG_WITH(system-ss, AC_HELP_STRING(--with-system-ss,use system -lss and mk_cmds @<:@default: use a private version@:>@)) AC_ARG_VAR(SS_LIB,[system libraries for 'ss' package, if --with-system-ss was specified [-lss]]) +AC_MSG_CHECKING(which version of subsystem package to use) if test "x$with_system_ss" = xyes ; then SS_VERSION=sys + AC_MSG_RESULT(system) # todo: check for various libraries we might need # in the meantime... test "x${SS_LIB+set}" = xset || SS_LIB=-lss + old_LIBS="$LIBS" + LIBS="$LIBS $SS_LIB" + AC_CACHE_CHECK(whether system ss package works, krb5_cv_system_ss_okay,[ + AC_TRY_RUN([ +#include +int main(int argc, char *argv[]) { + if (argc == 42) { + int i, err; + i = ss_create_invocation("foo","foo","",0,&err); + ss_listen(i); + } + return 0; +}], krb5_cv_system_ss_okay=yes, AC_MSG_ERROR(cannot run test program), + krb5_cv_system_ss_okay="assumed")]) + LIBS="$old_LIBS" else SS_VERSION=k5 + AC_MSG_RESULT(krb5) fi AC_SUBST(SS_LIB) AC_SUBST(SS_VERSION)