3 dnl try to look for an installed roken library with sufficient stuff
5 dnl set LIB_roken to the what we should link with
6 dnl set DIR_roken to if the directory should be built
7 dnl set CPPFLAGS_roken to stuff to add to CPPFLAGS
9 dnl AC_ROKEN(version,directory-to-try,roken-dir,fallback-library,fallback-cppflags)
10 AC_DEFUN([AC_ROKEN], [
13 AC_HELP_STRING([--with-roken=dir],[use the roken library in dir]),
14 [if test "$withval" = "no"; then
15 AC_MSG_ERROR(roken is required)
18 save_CPPFLAGS="${CPPFLAGS}"
31 AC_MSG_CHECKING(for roken in $i)
33 CPPFLAGS="-I$i/include ${CPPFLAGS}"
37 #if ROKEN_VERSION < $1
38 #error old roken version, should be $1
41 ],[roken_installed=yes; break])
43 AC_MSG_RESULT($roken_installed)
47 CPPFLAGS="$save_CPPFLAGS"
49 if test "$roken_installed" != "yes"; then
53 AC_CONFIG_SUBDIRS(lib/roken)
55 LIB_roken="$i/lib/libroken.la"
56 CPPFLAGS_roken="-I$i/include"
59 LIB_roken="${LIB_roken} \$(LIB_crypt) \$(LIB_dbopen)"
61 AC_SUBST(LIB_roken)dnl
62 AC_SUBST(DIR_roken)dnl
63 AC_SUBST(CPPFLAGS_roken)dnl