85 lines
3.0 KiB
Plaintext
85 lines
3.0 KiB
Plaintext
AC_INIT(scsh-ldap, 0.1)
|
|
AC_CONFIG_SRCDIR(configure.in)
|
|
AM_INIT_AUTOMAKE
|
|
|
|
dnl AM_MAINTAINER_MODE
|
|
|
|
AM_CONFIG_HEADER(c/config.h)
|
|
AC_PROG_LIBTOOL
|
|
AC_PROG_CC
|
|
|
|
AC_HEADER_STDC
|
|
AC_CHECK_HEADERS(sys/time.h)
|
|
|
|
AC_ARG_WITH(scsh-includes,
|
|
AC_HELP_STRING([--with-scsh-includes=DIR],
|
|
[scsh include files are in DIR [/usr/local/include]]),
|
|
scsh_includes=$withval,
|
|
scsh_includes=/usr/local/include)
|
|
AC_SUBST(scsh_includes)
|
|
dnl AC_SUBST(CFLAGS, "$CFLAGS -I${scsh_includes}")
|
|
dnl AC_CHECK_HEADER([scheme48.h], [],
|
|
dnl AC_MSG_FAILURE("Could not find scheme48.h"))
|
|
|
|
AC_PATH_PROG([SCSH], [scsh], [-not found-], [$PATH])
|
|
if test "$SCSH" = "-not found-"; then
|
|
AC_MSG_FAILURE("No scsh binary in path")
|
|
fi
|
|
AC_SUBST(SCSH)
|
|
|
|
AC_ARG_WITH(ldap-prefix,
|
|
AC_HELP_STRING([--with-ldap-prefix=DIR],
|
|
[ldap lib and include has prefix DIR [/usr]]),
|
|
[ldap_lib=$withval/lib ldap_include=$withval/include],
|
|
[ldap_lib=/usr/lib ldap_include=/usr/include])
|
|
|
|
AC_SUBST(LDFLAGS, "$LDFLAGS -L${ldap_lib}")
|
|
AC_SUBST(CFLAGS, "$CFLAGS -I${ldap_include}")
|
|
|
|
AC_CHECK_LIB(ldap, ldap_init, [], AC_MSG_FAILURE("Could not find ldap library"))
|
|
AC_CHECK_HEADER([ldap.h], [], AC_MSG_FAILURE("Could not find ldap.h"))
|
|
|
|
AC_CHECK_FUNC([ldap_open], [],
|
|
AC_MSG_FAILURE("Could not find ldap_open()"))
|
|
AC_CHECK_FUNC([ldap_bind_s], [],
|
|
AC_MSG_FAILURE("Could not find ldap_bind_s()"))
|
|
AC_CHECK_FUNC([ldap_simple_bind_s], [],
|
|
AC_MSG_FAILURE("Could not find ldap_simple_bind_s()"))
|
|
AC_CHECK_FUNC([ldap_unbind_s], [],
|
|
AC_MSG_FAILURE("Could not find ldap_unbind_s()"))
|
|
AC_CHECK_FUNC([ldap_result2error], [],
|
|
AC_MSG_FAILURE("Could not find ldap_result2error()"))
|
|
AC_CHECK_FUNC([ldap_memfree], [],
|
|
AC_MSG_FAILURE("Could not find ldap_memfree()"))
|
|
AC_CHECK_FUNC([ldap_msgfree], [],
|
|
AC_MSG_FAILURE("Could not find ldap_msgfree()"))
|
|
AC_CHECK_FUNC([ldap_search_s], [],
|
|
AC_MSG_FAILURE("Could not find ldap_search_s()"))
|
|
AC_CHECK_FUNC([ldap_search_st], [],
|
|
AC_MSG_FAILURE("Could not find ldap_search_st()"))
|
|
AC_CHECK_FUNC([ldap_count_entries], [],
|
|
AC_MSG_FAILURE("Could not find ldap_count_entries()"))
|
|
AC_CHECK_FUNC([ldap_first_entry], [],
|
|
AC_MSG_FAILURE("Could not find ldap_first_entry()"))
|
|
AC_CHECK_FUNC([ldap_next_entry], [],
|
|
AC_MSG_FAILURE("Could not find ldap_next_entry()"))
|
|
AC_CHECK_FUNC([ldap_msgtype], [],
|
|
AC_MSG_FAILURE("Could not find ldap_msgtype()"))
|
|
AC_CHECK_FUNC([ldap_msgid], [],
|
|
AC_MSG_FAILURE("Could not find ldap_msgid()"))
|
|
AC_CHECK_FUNC([ldap_get_values], [],
|
|
AC_MSG_FAILURE("Could not find ldap_get_values()"))
|
|
|
|
AC_CHECK_FUNCS([ldap_kerberos_bind_s])
|
|
|
|
schemedir='${prefix}'"/scheme"
|
|
libdir='${prefix}'"/lib"
|
|
libsysdir=${libdir}"/`scsh -lm ${srcdir}/scheme/configure.scm -o configure -c '(display (host))'`"
|
|
|
|
AC_SUBST(libdir)
|
|
AC_SUBST(libsysdir)
|
|
AC_SUBST(schemedir)
|
|
AC_SUBST(LIBS)
|
|
AC_SUBST(CC)
|
|
AC_OUTPUT([Makefile c/Makefile scheme/Makefile])
|