From: Quanah Gibson-Mount Date: Thu, 24 Mar 2011 01:18:25 +0000 (+0000) Subject: ITS#6125 X-Git-Tag: OPENLDAP_REL_ENG_2_4_25~35 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=228ea9b5458369a58fc6f60ea5eb00f8c7554900;p=openldap ITS#6125 --- diff --git a/configure.in b/configure.in index bc98c5755d..0e4485883f 100644 --- a/configure.in +++ b/configure.in @@ -1989,6 +1989,21 @@ if test $ol_enable_sql != no ; then odbc32) AC_CHECK_LIB(odbc32, SQLDriverConnect, [have_odbc32=yes], [have_odbc32=no]) + + dnl The windows API uses __stdcall which cannot be detected by AC_CHECK_LIB + if test $have_odbc32 = no ; then + AC_MSG_CHECKING([for SQLDriverConnect in -lodbc32 with windows.h]) + save_LIBS="$LIBS" + LIBS="$LIBS -lodbc32" + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include + #include + ]], [[ + SQLDriverConnect(NULL,NULL,NULL,0,NULL,0,NULL,0); + ]])],[have_odbc32=yes], [have_odbc32=no]) + LIBS="$save_LIBS" + AC_MSG_RESULT($have_odbc32) + fi + if test $have_odbc32 = yes ; then ol_link_sql="-lodbc32" fi