]> git.sur5r.net Git - openldap/blobdiff - configure.in
run autoconf after SQL configure.in change
[openldap] / configure.in
index 041e532f12aaf5a8d137f68aff01a61e3ad7f093..ac975ca7a6427de9d39a4195680c0ce5c6640674 100644 (file)
@@ -106,7 +106,6 @@ OL_ARG_ENABLE(proctitle,[  --enable-proctitle         enable proctitle support], yes)d
 OL_ARG_ENABLE(cache,[  --enable-cache    enable caching], yes)dnl
 OL_ARG_ENABLE(referrals,[  --enable-referrals    enable V2 Referrals extension], yes)dnl
 OL_ARG_ENABLE(kbind,[  --enable-kbind    enable V2 Kerberos IV bind], auto)dnl
-OL_ARG_ENABLE(cldap,[  --enable-cldap    enable connectionless ldap], no)dnl
 OL_ARG_ENABLE(ipv6,[  --enable-ipv6      enable IPv6 support], auto)dnl
 OL_ARG_ENABLE(local,[  --enable-local    enable AF_LOCAL (AF_UNIX) socket support], auto)dnl
 OL_ARG_ENABLE(x_compile,[  --enable-x-compile    enable cross compiling],
@@ -1707,6 +1706,28 @@ if test $ol_enable_syslog != no ; then
        ol_enable_syslog=$ac_cv_func_openlog
 fi
 
+dnl ----------------------------------------------------------------
+dnl SQL
+ol_link_sql=no
+if test $ol_enable_sql != no ; then
+       AC_CHECK_LIB(iodbc,SQLDriverConnect,[have_iodbc=yes],[have_iodbc=no])
+       if test $have_iodbc = yes ; then
+               ol_link_sql="-liodbc"
+       else
+               AC_CHECK_LIB(odbc,SQLDriverConnect,[have_odbc=yes],[have_odbc=no])
+               if test $have_odbc = yes ; then
+                       ol_link_sql="-lodbc"
+               fi
+       fi
+
+       if test $ol_link_sql != no ; then
+               SLAPD_SQL_LIBS="$ol_link_sql"
+
+       elif test $ol_enable_sql != auto ; then
+               AC_MSG_ERROR([could not locate suitable ODBC library])
+       fi
+fi
+
 dnl ----------------------------------------------------------------
 dnl ud needs termcap (should insert check here)
 ol_link_termcap=no
@@ -2051,9 +2072,6 @@ fi
 if test "$ol_enable_referrals" != no ; then
        AC_DEFINE(LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS,LDAP_VENDOR_VERSION)
 fi
-if test "$ol_enable_cldap" != no ; then
-       AC_DEFINE(LDAP_CONNECTIONLESS,1,[define to support CLDAP])
-fi
 if test "$ol_enable_local" != no; then
        AC_DEFINE(LDAP_PF_LOCAL,1,[define to support PF_LOCAL])
 fi
@@ -2160,7 +2178,6 @@ if test "$ol_enable_sql" != no ; then
        AC_DEFINE(SLAPD_SQL,1,[define to support SQL backend])
        BUILD_SLAPD=yes
        BUILD_SQL=yes
-       SLAPD_SQL_LIBS=-liodbc
        if test "$ol_with_sql_module" != static; then
                AC_DEFINE(SLAPD_SQL_DYNAMIC,1,
                        [define to support dynamic SQL backend])