1
dnl $OpenLDAP: pkg/ldap/configure.in,v 1.631.2.9 2008/02/11 23:26:37 kurt Exp $
1
dnl $OpenLDAP: pkg/ldap/configure.in,v 1.631.2.22 2009/01/26 21:54:23 quanah Exp $
2
2
dnl This work is part of OpenLDAP Software <http://www.openldap.org/>.
4
dnl Copyright 1998-2008 The OpenLDAP Foundation.
4
dnl Copyright 1998-2009 The OpenLDAP Foundation.
5
5
dnl All rights reserved.
7
7
dnl Redistribution and use in source and binary forms, with or without
23
23
define([AC_LIBTOOL_LANG_GCJ_CONFIG], [:])dnl
24
24
dnl ================================================================
25
25
dnl Configure.in for OpenLDAP
26
AC_COPYRIGHT([[Copyright 1998-2008 The OpenLDAP Foundation. All rights reserved.
26
AC_COPYRIGHT([[Copyright 1998-2009 The OpenLDAP Foundation. All rights reserved.
27
27
Restrictions apply, see COPYRIGHT and LICENSE files.]])
28
AC_REVISION([$OpenLDAP: pkg/ldap/configure.in,v 1.631.2.9 2008/02/11 23:26:37 kurt Exp $])
28
AC_REVISION([$OpenLDAP: pkg/ldap/configure.in,v 1.631.2.22 2009/01/26 21:54:23 quanah Exp $])
29
29
AC_INIT([OpenLDAP],,[http://www.openldap.org/its/])
30
30
m4_define([AC_PACKAGE_BUGREPORT],[<http://www.openldap.org/its/>])
31
31
AC_CONFIG_SRCDIR(build/version.sh)dnl
96
96
/* begin of portable.h.pre */
97
97
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
99
* Copyright 1998-2008 The OpenLDAP Foundation
99
* Copyright 1998-2009 The OpenLDAP Foundation
100
100
* All rights reserved.
102
102
* Redistribution and use in source and binary forms, with or without
242
242
auto, [auto yes no] )
243
243
OL_ARG_WITH(fetch,[ --with-fetch with fetch(3) URL support],
244
244
auto, [auto yes no] )
245
OL_ARG_WITH(gssapi,[ --with-gssapi with GSSAPI support],
246
auto, [auto yes no] )
245
247
OL_ARG_WITH(threads,[ --with-threads with threads],
246
248
auto, [auto nt posix mach pth lwp yes no manual] )
247
249
OL_ARG_WITH(tls,[ --with-tls with TLS/SSL support auto|openssl|gnutls],
253
255
[ --with-mp with multiple precision statistics auto|longlong|long|bignum|gmp],
254
256
auto, [auto longlong long bignum gmp yes no])
255
257
OL_ARG_WITH(odbc,
256
[ --with-odbc with specific ODBC support iodbc|unixodbc|auto],
257
auto, [auto iodbc unixodbc] )
258
[ --with-odbc with specific ODBC support iodbc|unixodbc|odbc32|auto],
259
auto, [auto iodbc unixodbc odbc32] )
259
261
dnl ----------------------------------------------------------------
260
262
dnl Server options
311
314
no, [no yes mod], ol_enable_backends)dnl
312
315
OL_ARG_ENABLE(monitor,[ --enable-monitor enable monitor backend],
313
316
yes, [no yes mod], ol_enable_backends)dnl
317
OL_ARG_ENABLE(ndb,[ --enable-ndb enable MySQL NDB Cluster backend],
318
no, [no yes mod], ol_enable_backends)dnl
314
319
OL_ARG_ENABLE(null,[ --enable-null enable null backend],
315
320
no, [no yes mod], ol_enable_backends)dnl
316
321
OL_ARG_ENABLE(passwd,[ --enable-passwd enable passwd backend],
355
362
no, [no yes mod], ol_enable_overlays)
356
363
OL_ARG_ENABLE(auditlog,[ --enable-auditlog Audit Logging overlay],
357
364
no, [no yes mod], ol_enable_overlays)
365
OL_ARG_ENABLE(collect,[ --enable-collect Collect overlay],
366
no, [no yes mod], ol_enable_overlays)
358
367
OL_ARG_ENABLE(constraint,[ --enable-constraint Attribute Constraint overlay],
359
368
no, [no yes mod], ol_enable_overlays)
360
369
OL_ARG_ENABLE(dds,[ --enable-dds Dynamic Directory Services overlay],
361
370
no, [no yes mod], ol_enable_overlays)
371
OL_ARG_ENABLE(deref,[ --enable-deref Dereference overlay],
372
no, [no yes mod], ol_enable_overlays)
362
373
OL_ARG_ENABLE(dyngroup,[ --enable-dyngroup Dynamic Group overlay],
363
374
no, [no yes mod], ol_enable_overlays)
364
375
OL_ARG_ENABLE(dynlist,[ --enable-dynlist Dynamic List overlay],
460
471
test $ol_enable_ldap = no &&
461
472
test $ol_enable_meta = no &&
462
473
test $ol_enable_monitor = no &&
474
test $ol_enable_ndb = no &&
463
475
test $ol_enable_null = no &&
464
476
test $ol_enable_passwd = no &&
465
477
test $ol_enable_perl = no &&
679
696
dnl ----------------------------------------------------------------
680
697
dnl Checks for Windows NT
682
699
*mingw32* ) ac_cv_mingw32=yes ;;
683
700
*cygwin* ) ac_cv_cygwin=yes ;;
701
*interix* ) ac_cv_interix=yes ;;
686
704
dnl ----------------------------------------------------------------
858
879
AC_CHECK_LIB(V3, sigset)
882
if test $ol_cv_msvc ; then
861
886
dnl The following is INTENTIONALLY scripted out because shell does not
862
887
dnl support variable names with the '@' character, which is what
863
888
dnl autoconf would try to generate if one merely used AC_SEARCH_LIBS
864
889
if test "$ac_cv_header_winsock_h" = yes; then
865
AC_CACHE_CHECK([for winsock], [ol_cv_winsock],
867
for curlib in ws2_32 wsock32; do
868
LIBS="$LIBS -l$curlib"
869
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <winsock.h>
890
AC_CACHE_CHECK([for winsock], [ol_cv_winsock],[
892
for curlib in none ws2_32 wsock32; do
893
if test curlib != none ; then
894
LIBS="$save_LIBS -l$curlib"
896
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <winsock.h>
872
899
select(0,NULL,NULL,NULL,NULL);
874
901
gethostname(NULL,0);
875
]])],[ol_cv_winsock=yes],[ol_cv_winsock=no])
877
if test $ol_cv_winsock = yes; then
878
AC_DEFINE(HAVE_WINSOCK, 1, [define if you have winsock])
879
ac_cv_func_socket=yes
880
ac_cv_func_select=yes
881
ac_cv_func_closesocket=yes
882
ac_cv_func_gethostname=yes
883
if test $curlib = ws2_32; then
884
ol_cv_winsock=winsock2
885
AC_DEFINE(HAVE_WINSOCK2, 1,
886
[define if you have winsock2])
902
]])],[ol_cv_winsock=$curlib],[ol_cv_winsock=no])
904
test "$ol_cv_winsock" != no && break
909
if test $ol_cv_winsock != no ; then
910
AC_DEFINE(HAVE_WINSOCK, 1, [define if you have winsock])
911
ac_cv_func_socket=yes
912
ac_cv_func_select=yes
913
ac_cv_func_closesocket=yes
914
ac_cv_func_gethostname=yes
916
if test $ol_cv_winsock != none -a $ol_cv_winsock != yes ; then
917
LIBS="$LIBS -l$ol_cv_winsock"
920
if test $ol_cv_winsock = ws2_32 -o $ol_cv_winsock = yes ; then
921
AC_DEFINE(HAVE_WINSOCK2, 1, [define if you have winsock2])
894
926
dnl Find socket()
983
1014
AC_CHECK_HEADERS(sys/uuid.h)
1015
dnl The HAVE_UUID_TO_STR code path also needs uuid_create
984
1016
if test $ac_cv_header_sys_uuid_h = yes ; then
985
1017
save_LIBS="$LIBS"
986
1018
AC_SEARCH_LIBS([uuid_to_str], [uuid], [have_uuid=yes], :)
1019
AC_SEARCH_LIBS([uuid_create], [uuid], :, [have_uuid=no])
987
1020
LIBS="$save_LIBS"
989
if test have_uuid = yes ; then
1022
if test $have_uuid = yes ; then
990
1023
AC_DEFINE(HAVE_UUID_TO_STR,1,
991
1024
[define if you have uuid_to_str()])
998
1031
dnl Look for uuid_generate
1032
dnl The HAVE_UUID_GENERATE code path also needs uuid_unparse_lower
999
1033
if test $have_uuid = no ; then
1000
1034
AC_CHECK_HEADERS(uuid/uuid.h)
1001
1035
if test $ac_cv_header_uuid_uuid_h = yes ; then
1002
1036
save_LIBS="$LIBS"
1003
1037
AC_SEARCH_LIBS([uuid_generate], [uuid], [have_uuid=yes], :)
1038
AC_SEARCH_LIBS([uuid_unparse_lower], [uuid], :, [have_uuid=no])
1004
1039
LIBS="$save_LIBS"
1006
if test have_uuid = yes ; then
1041
if test $have_uuid = yes ; then
1007
1042
AC_DEFINE(HAVE_UUID_GENERATE,1,
1008
1043
[define if you have uuid_generate()])
1113
1148
dnl ----------------------------------------------------------------
1152
case $ol_with_gssapi in yes | auto)
1155
AC_CHECK_HEADERS(gssapi/gssapi.h)
1156
if test $ac_cv_header_gssapi_gssapi_h = yes ; then
1157
ol_header_gssapi=yes
1159
AC_CHECK_HEADERS(gssapi.h)
1160
if test $ac_cv_header_gssapi_h = yes ; then
1161
ol_header_gssapi=yes
1164
dnl## not every gssapi has gss_oid_to_str()
1165
dnl## as it's not defined in the GSSAPI V2 API
1168
LIBS="$LIBS $GSSAPI_LIBS"
1169
AC_CHECK_FUNCS(gss_oid_to_str)
1173
if test $ol_header_gssapi = yes ; then
1174
dnl## we check for gss_wrap
1175
dnl## as it's new to the GSSAPI V2 API
1176
AC_CHECK_LIB(gssapi, gss_wrap,
1177
[ol_link_gssapi=yes;GSSAPI_LIBS="-lgssapi"],
1178
[ol_link_gssapi=no])
1179
if test $ol_link_gssapi != yes ; then
1180
AC_CHECK_LIB(gssapi_krb5, gss_wrap,
1181
[ol_link_gssapi=yes;GSSAPI_LIBS="-lgssapi_krb5"],
1182
[ol_link_gssapi=no])
1184
if test $ol_link_gssapi != yes ; then
1185
AC_CHECK_LIB(gss, gss_wrap,
1186
[ol_link_gssapi=yes;GSSAPI_LIBS="-lgss"],
1187
[ol_link_gssapi=no])
1195
if test $ol_link_gssapi = yes; then
1196
AC_DEFINE(HAVE_GSSAPI, 1, [define if you have GSSAPI])
1198
elif test $ol_with_gssapi = auto ; then
1199
AC_MSG_WARN([Could not locate GSSAPI package])
1200
AC_MSG_WARN([GSSAPI authentication not supported!])
1201
elif test $ol_with_gssapi = yes ; then
1202
AC_MSG_ERROR([GSSAPI detection failed])
1205
dnl ----------------------------------------------------------------
1116
1208
if test $ol_with_tls = yes ; then
1969
2062
dnl ----------------------------------------------------------------
2064
dnl Note: uses C++, but we don't want to add C++ test overhead to
2065
dnl the rest of the libtool machinery.
2067
if test $ol_enable_ndb != no ; then
2068
AC_CHECK_PROG(MYSQL,mysql_config,yes)
2069
if test "$MYSQL" != yes ; then
2070
AC_MSG_ERROR([could not locate mysql_config])
2073
SQL_INC=`mysql_config --include`
2074
SLAPD_NDB_INCS="$SQL_INC $SQL_INC/storage/ndb $SQL_INC/storage/ndb/ndbapi"
2076
save_CPPFLAGS="$CPPFLAGS"
2077
CPPFLAGS="$SLAPD_NDB_INCS"
2078
AC_MSG_CHECKING(for NdbApi.hpp)
2080
[AC_LANG_SOURCE([[#include <NdbApi.hpp>]])],
2082
AC_MSG_ERROR([could not locate NdbApi headers])
2084
CPPFLAGS="$save_CPPFLAGS"
2086
SQL_LIB=`mysql_config --libs_r`
2087
SLAPD_NDB_LIBS="$SQL_LIB -lndbclient -lstdc++"
2089
save_LDFLAGS="$LDFLAGS"
2092
AC_CHECK_LIB(ndbclient,ndb_init,[: ok],[
2093
AC_MSG_ERROR([could not locate ndbclient library])
2096
LDFLAGS="$save_LDFLAGS"
2098
if test "$ol_enable_ndb" = yes ; then
2099
SLAPD_LIBS="$SLAPD_LIBS \$(SLAPD_NDB_LIBS)"
2103
dnl ----------------------------------------------------------------
1970
2104
dnl International Components for Unicode
1972
2106
if test "$ol_icu" = no ; then
2292
2426
AC_DEFINE(snprintf, _snprintf, [define to snprintf routine])
2295
AC_CHECK_FUNC(_vsnprintf, [ac_cv_func_vsnprintf=yes
2429
AC_CHECK_FUNCS(vsnprintf _vsnprintf)
2431
if test $ac_cv_func_vsnprintf = no -a $ac_cv_func__vsnprintf = yes ; then
2432
ac_cv_func_vsnprintf=yes
2296
2433
AC_DEFINE(vsnprintf, _vsnprintf, [define to vsnprintf routine])
2299
2436
AC_FUNC_VPRINTF
2572
2710
AC_DEFINE_UNQUOTED(SLAPD_META,$MFLAG,[define to support LDAP Metadirectory backend])
2713
if test "$ol_enable_ndb" != no ; then
2715
BUILD_NDB=$ol_enable_ndb
2716
if test "$ol_enable_ndb" = mod ; then
2717
SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ndb"
2718
MFLAG=SLAPD_MOD_DYNAMIC
2720
SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ndb"
2721
MFLAG=SLAPD_MOD_STATIC
2723
AC_DEFINE_UNQUOTED(SLAPD_NDB,$MFLAG,[define to support NDB backend])
2575
2726
if test "$ol_enable_null" != no ; then
2576
2727
BUILD_SLAPD=yes
2577
2728
BUILD_NULL=$ol_enable_null
2690
2841
AC_DEFINE_UNQUOTED(SLAPD_OVER_AUDITLOG,$MFLAG,[define for Audit Logging overlay])
2844
if test "$ol_enable_collect" != no ; then
2845
BUILD_COLLECT=$ol_enable_collect
2846
if test "$ol_enable_collect" = mod ; then
2847
MFLAG=SLAPD_MOD_DYNAMIC
2848
SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS collect.la"
2850
MFLAG=SLAPD_MOD_STATIC
2851
SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS collect.o"
2853
AC_DEFINE_UNQUOTED(SLAPD_OVER_COLLECT,$MFLAG,[define for Collect overlay])
2693
2856
if test "$ol_enable_constraint" != no ; then
2694
2857
BUILD_CONSTRAINT=$ol_enable_constraint
2695
2858
if test "$ol_enable_constraint" = mod ; then
2714
2877
AC_DEFINE_UNQUOTED(SLAPD_OVER_DDS,$MFLAG,[define for Dynamic Directory Services overlay])
2880
if test "$ol_enable_deref" != no ; then
2881
BUILD_DDS=$ol_enable_deref
2882
if test "$ol_enable_deref" = mod ; then
2883
MFLAG=SLAPD_MOD_DYNAMIC
2884
SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS deref.la"
2886
MFLAG=SLAPD_MOD_STATIC
2887
SLAPD_STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS deref.o"
2889
AC_DEFINE_UNQUOTED(SLAPD_OVER_DEREF,$MFLAG,[define for Dynamic Directory Services overlay])
2717
2892
if test "$ol_enable_dyngroup" != no ; then
2718
2893
BUILD_DYNGROUP=$ol_enable_dyngroup
2719
2894
if test "$ol_enable_dyngroup" = mod ; then
3017
3197
[servers/slapd/back-ldif/Makefile:build/top.mk:servers/slapd/back-ldif/Makefile.in:build/mod.mk]
3018
3198
[servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk]
3019
3199
[servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk]
3200
[servers/slapd/back-ndb/Makefile:build/top.mk:servers/slapd/back-ndb/Makefile.in:build/mod.mk]
3020
3201
[servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk]
3021
3202
[servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk]
3022
3203
[servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk]