From: Kurt Zeilenga Date: Sat, 26 Aug 2000 18:59:51 +0000 (+0000) Subject: Update SQL detection X-Git-Tag: OPENLDAP_REL_ENG_2_0_0~15 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=379df7e2b0fe98194bc420f0b106221abb6f2dc7;p=openldap Update SQL detection --- diff --git a/configure.in b/configure.in index fe6f2434d1..ac975ca7a6 100644 --- a/configure.in +++ b/configure.in @@ -1706,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 @@ -2156,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])