1 dnl $Heimdal: roken.m4 14162 2004-08-26 11:27:32Z joda $
4 dnl try to look for an installed roken library with sufficient stuff
6 dnl set LIB_roken to the what we should link with
7 dnl set DIR_roken to if the directory should be built
8 dnl set CPPFLAGS_roken to stuff to add to CPPFLAGS
10 dnl AC_ROKEN(version,directory-to-try,roken-dir,fallback-library,fallback-cppflags)
11 AC_DEFUN([AC_ROKEN], [
14 AS_HELP_STRING([--with-roken=dir],[use the roken library in dir]),
15 [if test "$withval" = "no"; then
16 AC_MSG_ERROR(roken is required)
19 save_CPPFLAGS="${CPPFLAGS}"
32 AC_MSG_CHECKING(for roken in $i)
34 CPPFLAGS="-I$i/include ${CPPFLAGS}"
36 AC_PREPROC_IFELSE([AC_LANG_SOURCE([[
38 #if ROKEN_VERSION < $1
39 #error old roken version, should be $1
42 ]])],[roken_installed=yes; break])
44 AC_MSG_RESULT($roken_installed)
48 CPPFLAGS="$save_CPPFLAGS"
50 if test "$roken_installed" != "yes"; then
54 AC_CONFIG_SUBDIRS(lib/roken)
56 LIB_roken="$i/lib/libroken.la"
57 CPPFLAGS_roken="-I$i/include"
60 LIB_roken="${LIB_roken} \$(LIB_crypt) \$(LIB_dbopen)"
62 AC_SUBST(LIB_roken)dnl
63 AC_SUBST(DIR_roken)dnl
64 AC_SUBST(CPPFLAGS_roken)dnl