2003-11-17 09:43:43 -05:00
|
|
|
AC_INIT(scsh-ldap, 0.1)
|
|
|
|
AC_CONFIG_SRCDIR(configure.in)
|
|
|
|
AM_INIT_AUTOMAKE
|
|
|
|
|
|
|
|
dnl AM_MAINTAINER_MODE
|
|
|
|
|
2003-12-31 10:40:26 -05:00
|
|
|
AM_CONFIG_HEADER(c/config.h)
|
2003-11-17 09:43:43 -05:00
|
|
|
AC_PROG_LIBTOOL
|
2003-10-28 11:52:37 -05:00
|
|
|
AC_PROG_CC
|
|
|
|
|
2003-12-31 10:40:26 -05:00
|
|
|
AC_HEADER_STDC
|
2004-01-14 05:25:48 -05:00
|
|
|
AC_CHECK_HEADERS([sys/time.h errno.h])
|
|
|
|
|
|
|
|
dnl scsh includes (scheme48.h)
|
2003-11-17 13:49:03 -05:00
|
|
|
|
2003-10-28 11:52:37 -05:00
|
|
|
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)
|
2003-12-31 10:40:26 -05:00
|
|
|
dnl AC_SUBST(CFLAGS, "$CFLAGS -I${scsh_includes}")
|
|
|
|
dnl AC_CHECK_HEADER([scheme48.h], [],
|
|
|
|
dnl AC_MSG_FAILURE("Could not find scheme48.h"))
|
2003-10-28 11:52:37 -05:00
|
|
|
|
2003-12-31 10:40:26 -05:00
|
|
|
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)
|
2003-10-28 11:52:37 -05:00
|
|
|
|
2003-11-17 13:49:03 -05:00
|
|
|
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}")
|
2004-02-09 08:55:35 -05:00
|
|
|
AC_SUBST(CPPFLAGS, "$CPPFLAGS -I${ldap_include}")
|
2003-11-17 13:49:03 -05:00
|
|
|
|
2004-01-14 05:25:48 -05:00
|
|
|
dnl Check for LDAP libraries and headers
|
|
|
|
|
2003-11-17 09:43:43 -05:00
|
|
|
AC_CHECK_HEADER([ldap.h], [], AC_MSG_FAILURE("Could not find ldap.h"))
|
2004-01-14 05:25:48 -05:00
|
|
|
AC_CHECK_HEADER([lber.h], [], AC_MSG_FAILURE("Could not find lber.h"))
|
|
|
|
|
|
|
|
AC_CHECK_LIB(ldap, ldap_init, [AC_SUBST(LIBS, "-lldap $LIBS")],
|
|
|
|
AC_MSG_FAILURE("Could not find ldap library"))
|
|
|
|
AC_CHECK_LIB(lber, ber_free, [AC_SUBST(LIBS, "-llber $LIBS")],
|
|
|
|
AC_MSG_FAILURE("Could not find lber library"))
|
|
|
|
AC_SUBST(LIBS)
|
2003-11-17 09:43:43 -05:00
|
|
|
|
2004-01-14 05:25:48 -05:00
|
|
|
dnl Check for functions
|
|
|
|
|
|
|
|
AC_CHECK_FUNC([ldap_init], [],
|
2003-11-17 09:43:43 -05:00
|
|
|
AC_MSG_FAILURE("Could not find ldap_open()"))
|
|
|
|
AC_CHECK_FUNC([ldap_simple_bind_s], [],
|
|
|
|
AC_MSG_FAILURE("Could not find ldap_simple_bind_s()"))
|
2004-01-14 05:25:48 -05:00
|
|
|
AC_CHECK_FUNC([ldap_sasl_bind_s], [],
|
|
|
|
AC_MSG_FAILURE("Could not find ldap_sasl_bind_s()"))
|
2003-11-17 09:43:43 -05:00
|
|
|
AC_CHECK_FUNC([ldap_unbind_s], [],
|
|
|
|
AC_MSG_FAILURE("Could not find ldap_unbind_s()"))
|
2004-01-14 05:25:48 -05:00
|
|
|
AC_CHECK_FUNC([ldap_err2string], [],
|
|
|
|
AC_MSG_FAILURE("Could not find ldap_err2string()"))
|
2003-11-17 09:43:43 -05:00
|
|
|
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()"))
|
2004-01-14 05:25:48 -05:00
|
|
|
AC_CHECK_FUNC([ber_free], [],
|
|
|
|
AC_MSG_FAILURE("Could not find ber_free()"))
|
2003-11-17 09:43:43 -05:00
|
|
|
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()"))
|
2004-01-14 05:25:48 -05:00
|
|
|
AC_CHECK_FUNC([ldap_compare_s], [],
|
|
|
|
AC_MSG_FAILURE("Could not find ldap_compare_s()"))
|
2003-11-17 09:43:43 -05:00
|
|
|
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()"))
|
2004-01-14 05:25:48 -05:00
|
|
|
AC_CHECK_FUNC([ldap_first_message], [],
|
|
|
|
AC_MSG_FAILURE("Could not find ldap_first_message()"))
|
|
|
|
AC_CHECK_FUNC([ldap_next_message], [],
|
|
|
|
AC_MSG_FAILURE("Could not find ldap_next_message()"))
|
|
|
|
AC_CHECK_FUNC([ldap_count_messages], [],
|
|
|
|
AC_MSG_FAILURE("Could not find ldap_count_messages()"))
|
|
|
|
AC_CHECK_FUNC([ldap_first_reference], [],
|
|
|
|
AC_MSG_FAILURE("Could not find ldap_first_reference()"))
|
|
|
|
AC_CHECK_FUNC([ldap_next_reference], [],
|
|
|
|
AC_MSG_FAILURE("Could not find ldap_next_reference()"))
|
|
|
|
AC_CHECK_FUNC([ldap_count_references], [],
|
|
|
|
AC_MSG_FAILURE("Could not find ldap_count_references()"))
|
|
|
|
AC_CHECK_FUNC([ldap_first_attribute], [],
|
|
|
|
AC_MSG_FAILURE("Could not find ldap_first_attribute()"))
|
|
|
|
AC_CHECK_FUNC([ldap_next_attribute], [],
|
|
|
|
AC_MSG_FAILURE("Could not find ldap_next_attribute()"))
|
2003-11-17 09:43:43 -05:00
|
|
|
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()"))
|
2004-01-14 05:25:48 -05:00
|
|
|
AC_CHECK_FUNC([ldap_get_dn], [],
|
|
|
|
AC_MSG_FAILURE("Could not find ldap_get_dn()"))
|
|
|
|
AC_CHECK_FUNC([ldap_explode_dn], [],
|
|
|
|
AC_MSG_FAILURE("Could not find ldap_explode_dn()"))
|
|
|
|
AC_CHECK_FUNC([ldap_explode_rdn], [],
|
|
|
|
AC_MSG_FAILURE("Could not find ldap_explode_rdn()"))
|
|
|
|
AC_CHECK_FUNC([ldap_dn2ufn], [],
|
|
|
|
AC_MSG_FAILURE("Could not find ldap_dn2ufn()"))
|
2003-11-17 09:43:43 -05:00
|
|
|
AC_CHECK_FUNC([ldap_get_values], [],
|
|
|
|
AC_MSG_FAILURE("Could not find ldap_get_values()"))
|
2004-01-14 05:25:48 -05:00
|
|
|
AC_CHECK_FUNC([ldap_modify_s], [],
|
|
|
|
AC_MSG_FAILURE("Could not find ldap_modify_s()"))
|
|
|
|
AC_CHECK_FUNC([ldap_add_s], [],
|
|
|
|
AC_MSG_FAILURE("Could not find ldap_add_s()"))
|
|
|
|
AC_CHECK_FUNC([ldap_delete_s], [],
|
|
|
|
AC_MSG_FAILURE("Could not find ldap_delete_s()"))
|
|
|
|
AC_CHECK_FUNC([ldap_abandon], [],
|
|
|
|
AC_MSG_FAILURE("Could not find ldap_abandon()"))
|
|
|
|
AC_CHECK_FUNC([ldap_get_option], [],
|
|
|
|
AC_MSG_FAILURE("Could not find ldap_get_option()"))
|
|
|
|
AC_CHECK_FUNC([ldap_set_option], [],
|
|
|
|
AC_MSG_FAILURE("Could not find ldap_set_option()"))
|
2003-10-28 11:52:37 -05:00
|
|
|
|
2003-12-31 10:40:26 -05:00
|
|
|
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)
|
2003-10-28 11:52:37 -05:00
|
|
|
AC_SUBST(CC)
|
2004-02-09 08:55:35 -05:00
|
|
|
AC_OUTPUT([Makefile c/Makefile])
|