Elrond <[EMAIL PROTECTED]> writes: > Hi, > > Okay, I've probably missed something obvious... > > Can someone get me a pointer on how to detect shishi (and > shisa) from autoconf? > > Or is it as simple as this? > > AC_CHECK_HEADER(shishi.h, > AC_CHECK_LIB(shishi, shishi_init, > LIB_SHISHI=-lshishi > AC_SUBST(LIB_SHISHI) > AC_DEFINE(HAVE_SHISHI)))
The manual has a node on this, see: http://josefsson.org/shishi/manual/html_node/Autoconf-tests.html#Autoconf-tests But, yes, your test will work. If you want to support -rpath and stuff, here's what I use in GSS: # Test for Shishi. AC_ARG_ENABLE(kerberos5, AC_HELP_STRING([--disable-kerberos5], [disable Kerberos V5 mechanism unconditionally]), kerberos5=$enableval) if test "$kerberos5" != "no" ; then AC_LIB_HAVE_LINKFLAGS(shishi,, [#include <shishi.h>], [shishi ();]) if test "$ac_cv_libshishi" = yes; then AC_DEFINE(USE_KERBEROS5, 1, [Define to 1 if you want Kerberos 5 mech.]) INCLUDE_GSS_KRB5='#include <gss/krb5.h>' kerberos5=yes else kerberos5=no fi fi AC_MSG_CHECKING([if the Kerberos V5 mechanism should be supported]) AC_MSG_RESULT($kerberos5) AM_CONDITIONAL(KRB5, test "$kerberos5" = "yes") AC_SUBST(INCLUDE_GSS_KRB5) The AC_LIB_HAVE_LINKFLAGS macro is part of gnulib, see gl/m4/lib-*.m4 in Shishi. /Simon _______________________________________________ Help-shishi mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-shishi
