2 # Process this file with autoconf to produce a configure script.
5 AC_INIT([libnfsidmap],[0.24],[linux-nfs@vger.kernel.org])
6 AC_CONFIG_SRCDIR([nfsidmap.h])
7 AC_CONFIG_MACRO_DIR([m4])
11 # Checks for programs.
14 # Checks for libraries.
17 [AS_HELP_STRING([--disable-ldap],[Disable support for LDAP @<:@default=detect@:>@])])
18 if test "x$enable_ldap" != "xno" ; then
19 AC_CHECK_HEADER([ldap.h],
20 [AC_CHECK_LIB([ldap], [ldap_initialize],
21 [have_ldap="yes"],[have_ldap="no"])],
23 if test "x$have_ldap" = "xyes" ; then
24 AC_DEFINE([ENABLE_LDAP], 1, [Enable LDAP Support])
25 elif test "x$enable_ldap$have_ldap" = "xyesno" ; then
26 AC_MSG_ERROR(LDAP support not found!)
29 AM_CONDITIONAL(ENABLE_LDAP, test "x$have_ldap" = "xyes")
31 # Should we build gums mapping library?
33 [AS_HELP_STRING([--enable-gums],[Enable support for the GUMS mapping library @<:@default=false@:>@])])
34 if test "x$enable_gums" = "xyes" ; then
35 AC_DEFINE([ENABLE_GUMS], 1, [Enable GUMS mapping library support])
37 AM_CONDITIONAL(ENABLE_GUMS, test "x$enable_gums" = "xyes")
40 # Checks for header files.
42 AC_CHECK_HEADERS([stdlib.h string.h unistd.h errno.h])
44 # Checks for typedefs, structures, and compiler characteristics.
48 # Checks for library functions.
50 AC_CHECK_FUNCS([strchr strdup])
52 AC_CONFIG_FILES([Makefile])
53 AC_CONFIG_FILES([libnfsidmap.pc])