Fixes to ODBC checking
authorcantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Fri, 27 Jan 2006 04:51:58 +0000 (04:51 +0000)
committercantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Fri, 27 Jan 2006 04:51:58 +0000 (04:51 +0000)
git-svn-id: https://svn.middleware.georgetown.edu/cpp-sp/trunk@1966 cb58f699-b61c-0410-a6fe-9272a202ed29

configure.ac

index 27cff46..3faa59a 100644 (file)
@@ -794,26 +794,10 @@ if test "$build_odbc" = "yes" ; then
    fi
 fi
 
-# if we found odbc_config then build_odbc is 'yes'
-if test "$ODBC_CONFIG" != no ; then
-   AC_MSG_CHECKING(for ODBC libraries)
-   ODBC_LIBS=`$ODBC_CONFIG --libs`
-   if test $? != 0 ; then
-      found_odbc=no
-      if test "$odbc_enabled" = "yes" ; then
-        AC_MSG_ERROR(Could not find the ODBC libraries.)
-      else
-        AC_MSG_RESULT(no.. skipping ODBC)
-      fi
-   else
-      found_odbc=yes
-      AC_MSG_RESULT(yes)
-   fi
-fi
-
-if test "$found_odbc" = yes ; then
+if test "$build_odbc" = yes ; then
    ODBC_CFLAGS=`$ODBC_CONFIG --cflags`
    ODBC_CFLAGS=`eval echo $ODBC_CFLAGS`
+   ODBC_LIBS=`$ODBC_CONFIG --libs`
    ODBC_LIBS=`eval echo $ODBC_LIBS`
 
    save_CPPFLAGS="$CPPFLAGS"
@@ -830,6 +814,7 @@ if test "$found_odbc" = yes ; then
       AC_MSG_CHECKING(if we can link againt ODBC)
       AC_TRY_LINK(
         [#include <sql.h>
+         #include <sqlext.h>
          #include <stdio.h>],
         [SQLSetEnvAttr(SQL_NULL_HANDLE, SQL_ATTR_CONNECTION_POOLING, (void*)SQL_CP_ONE_PER_HENV, 0)],
         [have_odbc_libs=yes],