#
-# Implement the checks of the ODBC Credential Cache
+# Implement the checks of the ODBC Storage Service
#
# 1) Assume the user wants ODBC; if it's not found then just continue without
# 2) If the user specifically requested odbc, look for it and ERROR if not found
-# 3) If the user specifically requested no-odbc, don't build it.
+# 3) If the user specifically requested no odbc, don't build it.
#
-#AC_CONFIG_FILES([odbc_ccache/Makefile])
+AC_CONFIG_FILES([odbc-store/Makefile])
# determine whether we should enable the odbc ccache
-#AC_ARG_ENABLE([odbc],
-# AC_HELP_STRING([--disable-odbc], [disable the ODBC Credential Cache]),
-# [odbc_enabled=$enableval], [odbc_enabled=default])
+AC_ARG_ENABLE([odbc],
+ AC_HELP_STRING([--disable-odbc], [disable the ODBC Storage Service]),
+ [odbc_enabled=$enableval], [odbc_enabled=default])
-#if test "x$odbc_enabled" = "x" ; then
-# odbc_enabled=yes
-#fi
+if test "x$odbc_enabled" = "x" ; then
+ odbc_enabled=yes
+fi
# Are we trying to build ODBC?
-#AC_MSG_CHECKING(whether to build the ODBC ccache)
-#if test "$odbc_enabled" = "yes" ; then
-# build_odbc=yes
-# AC_MSG_RESULT(yes)
-#elif test "$odbc_enabled" = "default" ; then
-# build_odbc=yes
-# AC_MSG_RESULT([yes, if it can be found])
-#else
-# build_odbc=no
-# AC_MSG_RESULT(no)
-#fi
+AC_MSG_CHECKING(whether to build the ODBC storage service)
+if test "$odbc_enabled" = "yes" ; then
+ build_odbc=yes
+ AC_MSG_RESULT(yes)
+elif test "$odbc_enabled" = "default" ; then
+ build_odbc=yes
+ AC_MSG_RESULT([yes, if it can be found])
+else
+ build_odbc=no
+ AC_MSG_RESULT(no)
+fi
# If we're trying to build ODBC, try to find the odbc_config program.
-#if test "$build_odbc" = "yes" ; then
-# odbc_dir=""
-# AC_ARG_WITH(odbc,
-# AC_HELP_STRING([--with-odbc=PATH], [directory where odbc is installed]),
-# [if test "$with_odbc" = no ; then
-# AC_MSG_ERROR([Try running --disable-odbc instead.])
-# elif test "$with_odbc" != yes ; then
-# odbc_dir="$with_odbc/bin"
-# fi ])
-
- # Try to find the mysql_config program
-# AC_PATH_PROG(ODBC_CONFIG, odbc_config, no, $odbc_dir $PATH )
-
-# if test "$ODBC_CONFIG" = no ; then
-# if test "$odbc_enabled" = "yes" ; then
-# AC_MSG_ERROR(Cannot find odbc_config)
-# else
-# AC_MSG_WARN(ODBC not found, skipping.)
-# fi
-# fi
-#fi
-
-#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"
-# CPPFLAGS="$CPPFLAGS $ODBC_CFLAGS"
-
-# AC_CHECK_HEADER([sql.h], [have_sql_h=yes], [have_sql_h=no])
-# if test "$have_sql_h" = no -a "$odbc_enabled" = "yes" ; then
-# AC_MSG_ERROR(unable to find ODBC header files)
-# fi
-
-# if test "$have_sql_h" = yes ; then
-# save_LIBS="$LIBS"
-# LIBS="$LIBS $ODBC_LIBS"
-# 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],
-# [have_odbc_libs=no])
-# LIBS="$save_LIBS"
-
-# if test "$have_odbc_libs" = no ; then
-# if test "$odbc_enabled" = "yes" ; then
-# AC_MSG_ERROR([unable to link with ODBC Library])
-# else
-# AC_MSG_RESULT(no, skipping ODBC)
-# fi
-# fi
-# fi
-
-# CPPFLAGS="$save_CPPFLAGS"
-#fi
+if test "$build_odbc" = "yes" ; then
+ odbc_dir=""
+ AC_ARG_WITH(odbc,
+ AC_HELP_STRING([--with-odbc=PATH], [directory where odbc is installed]),
+ [if test "$with_odbc" = no ; then
+ AC_MSG_ERROR([Try running --disable-odbc instead.])
+ elif test "$with_odbc" != yes ; then
+ odbc_dir="$with_odbc/bin"
+ fi ])
+
+ AC_PATH_PROG(ODBC_CONFIG, odbc_config, no, $odbc_dir $PATH )
+
+ if test "$ODBC_CONFIG" = no ; then
+ if test "$odbc_enabled" = "yes" ; then
+ AC_MSG_ERROR(Cannot find odbc_config)
+ else
+ AC_MSG_WARN(ODBC not found, skipping.)
+ fi
+ fi
+fi
+
+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"
+ CPPFLAGS="$CPPFLAGS $ODBC_CFLAGS"
+
+ AC_CHECK_HEADER([sql.h], [have_sql_h=yes], [have_sql_h=no])
+ if test "$have_sql_h" = no -a "$odbc_enabled" = "yes" ; then
+ AC_MSG_ERROR(unable to find ODBC header files)
+ fi
+
+ if test "$have_sql_h" = yes ; then
+ save_LIBS="$LIBS"
+ LIBS="$LIBS $ODBC_LIBS"
+ 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],
+ [have_odbc_libs=no])
+ LIBS="$save_LIBS"
+
+ if test "$have_odbc_libs" = no ; then
+ if test "$odbc_enabled" = "yes" ; then
+ AC_MSG_ERROR([unable to link with ODBC Library])
+ else
+ AC_MSG_RESULT(no, skipping ODBC)
+ fi
+ fi
+ fi
+
+ CPPFLAGS="$save_CPPFLAGS"
+fi
# if have_odbc_libs=yes then go ahead with building ODBC
-#if test "$have_odbc_libs" = yes ; then
-# # this AC_MSG_RESULT is from above!
-# AC_MSG_RESULT(yes)
-# WANT_SUBDIRS="$WANT_SUBDIRS odbc_ccache"
-# AC_SUBST(ODBC_CFLAGS)
-# AC_SUBST(ODBC_LIBS)
-#fi
+if test "$have_odbc_libs" = yes ; then
+ # this AC_MSG_RESULT is from above!
+ AC_MSG_RESULT(yes)
+ WANT_SUBDIRS="$WANT_SUBDIRS odbc-store"
+ AC_SUBST(ODBC_CFLAGS)
+ AC_SUBST(ODBC_LIBS)
+fi
AC_SUBST(WANT_SUBDIRS)
--- /dev/null
+// Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+/////////////////////////////////////////////////////////////////////////////
+// English (U.S.) resources
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+#ifdef _WIN32
+LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
+#pragma code_page(1252)
+#endif //_WIN32
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+ "#include ""afxres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+ "\r\n"
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 2,0,0,0
+ PRODUCTVERSION 2,0,0,0
+ FILEFLAGSMASK 0x17L
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x40004L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904b0"
+ BEGIN
+ VALUE "CompanyName", "Internet2"
+ VALUE "FileDescription", "Shibboleth ODBC Storage Service Plugin"
+ VALUE "FileVersion", "2, 0, 0, 0"
+ VALUE "InternalName", "odbc-store"
+ VALUE "LegalCopyright", "Copyright (C) 2007 Internet2"
+ VALUE "OriginalFilename", "odbc-store.so"
+ VALUE "ProductName", "Shibboleth 2.0"
+ VALUE "ProductVersion", "2, 0, 0, 0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 1200
+ END
+END
+
+#endif // English (U.S.) resources
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
\ No newline at end of file