mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-23 08:09:34 -05:00
allow checking for odbc32 library (blind fix to ITS#5602)
This commit is contained in:
parent
65cfb058cb
commit
b781b16be1
2 changed files with 90 additions and 7 deletions
84
configure
vendored
84
configure
vendored
|
|
@ -1,5 +1,5 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# From configure.in OpenLDAP: pkg/ldap/configure.in,v 1.660 2007/09/07 10:02:43 hyc Exp .
|
# From configure.in OpenLDAP: pkg/ldap/configure.in,v 1.662 2008/01/07 23:19:59 kurt Exp .
|
||||||
# Guess values for system-dependent variables and create Makefiles.
|
# Guess values for system-dependent variables and create Makefiles.
|
||||||
# Generated by GNU Autoconf 2.59.
|
# Generated by GNU Autoconf 2.59.
|
||||||
#
|
#
|
||||||
|
|
@ -1085,7 +1085,7 @@ Optional Packages:
|
||||||
--with-tls with TLS/SSL support auto|openssl|gnutls [auto]
|
--with-tls with TLS/SSL support auto|openssl|gnutls [auto]
|
||||||
--with-yielding-select with implicitly yielding select [auto]
|
--with-yielding-select with implicitly yielding select [auto]
|
||||||
--with-mp with multiple precision statistics auto|longlong|long|bignum|gmp [auto]
|
--with-mp with multiple precision statistics auto|longlong|long|bignum|gmp [auto]
|
||||||
--with-odbc with specific ODBC support iodbc|unixodbc|auto [auto]
|
--with-odbc with specific ODBC support iodbc|unixodbc|odbc32|auto [auto]
|
||||||
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
|
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
|
||||||
--with-pic try to use only PIC/non-PIC objects [default=use
|
--with-pic try to use only PIC/non-PIC objects [default=use
|
||||||
both]
|
both]
|
||||||
|
|
@ -2455,7 +2455,7 @@ if test "${with_odbc+set}" = set; then
|
||||||
withval="$with_odbc"
|
withval="$with_odbc"
|
||||||
|
|
||||||
ol_arg=invalid
|
ol_arg=invalid
|
||||||
for ol_val in auto iodbc unixodbc ; do
|
for ol_val in auto iodbc unixodbc odbc32 ; do
|
||||||
if test "$withval" = "$ol_val" ; then
|
if test "$withval" = "$ol_val" ; then
|
||||||
ol_arg="$ol_val"
|
ol_arg="$ol_val"
|
||||||
fi
|
fi
|
||||||
|
|
@ -31915,7 +31915,7 @@ done
|
||||||
LIBS="$LTHREAD_LIBS"
|
LIBS="$LTHREAD_LIBS"
|
||||||
|
|
||||||
if test $ol_with_odbc = auto ; then
|
if test $ol_with_odbc = auto ; then
|
||||||
ol_with_odbc="iodbc unixodbc"
|
ol_with_odbc="iodbc unixodbc odbc32"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for odbc in $ol_with_odbc ; do
|
for odbc in $ol_with_odbc ; do
|
||||||
|
|
@ -32073,6 +32073,82 @@ fi
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
odbc32)
|
||||||
|
echo "$as_me:$LINENO: checking for SQLDriverConnect in -lodbc32" >&5
|
||||||
|
echo $ECHO_N "checking for SQLDriverConnect in -lodbc32... $ECHO_C" >&6
|
||||||
|
if test "${ac_cv_lib_odbc32_SQLDriverConnect+set}" = set; then
|
||||||
|
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||||
|
else
|
||||||
|
ac_check_lib_save_LIBS=$LIBS
|
||||||
|
LIBS="-lodbc32 $LIBS"
|
||||||
|
cat >conftest.$ac_ext <<_ACEOF
|
||||||
|
/* confdefs.h. */
|
||||||
|
_ACEOF
|
||||||
|
cat confdefs.h >>conftest.$ac_ext
|
||||||
|
cat >>conftest.$ac_ext <<_ACEOF
|
||||||
|
/* end confdefs.h. */
|
||||||
|
|
||||||
|
/* Override any gcc2 internal prototype to avoid an error. */
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C"
|
||||||
|
#endif
|
||||||
|
/* We use char because int might match the return type of a gcc2
|
||||||
|
builtin and then its argument prototype would still apply. */
|
||||||
|
char SQLDriverConnect ();
|
||||||
|
int
|
||||||
|
main ()
|
||||||
|
{
|
||||||
|
SQLDriverConnect ();
|
||||||
|
;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
_ACEOF
|
||||||
|
rm -f conftest.$ac_objext conftest$ac_exeext
|
||||||
|
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
||||||
|
(eval $ac_link) 2>conftest.er1
|
||||||
|
ac_status=$?
|
||||||
|
grep -v '^ *+' conftest.er1 >conftest.err
|
||||||
|
rm -f conftest.er1
|
||||||
|
cat conftest.err >&5
|
||||||
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
|
(exit $ac_status); } &&
|
||||||
|
{ ac_try='test -z "$ac_c_werror_flag"
|
||||||
|
|| test ! -s conftest.err'
|
||||||
|
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||||
|
(eval $ac_try) 2>&5
|
||||||
|
ac_status=$?
|
||||||
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
|
(exit $ac_status); }; } &&
|
||||||
|
{ ac_try='test -s conftest$ac_exeext'
|
||||||
|
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||||
|
(eval $ac_try) 2>&5
|
||||||
|
ac_status=$?
|
||||||
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
|
(exit $ac_status); }; }; then
|
||||||
|
ac_cv_lib_odbc32_SQLDriverConnect=yes
|
||||||
|
else
|
||||||
|
echo "$as_me: failed program was:" >&5
|
||||||
|
sed 's/^/| /' conftest.$ac_ext >&5
|
||||||
|
|
||||||
|
ac_cv_lib_odbc32_SQLDriverConnect=no
|
||||||
|
fi
|
||||||
|
rm -f conftest.err conftest.$ac_objext \
|
||||||
|
conftest$ac_exeext conftest.$ac_ext
|
||||||
|
LIBS=$ac_check_lib_save_LIBS
|
||||||
|
fi
|
||||||
|
echo "$as_me:$LINENO: result: $ac_cv_lib_odbc32_SQLDriverConnect" >&5
|
||||||
|
echo "${ECHO_T}$ac_cv_lib_odbc32_SQLDriverConnect" >&6
|
||||||
|
if test $ac_cv_lib_odbc32_SQLDriverConnect = yes; then
|
||||||
|
have_odbc32=yes
|
||||||
|
else
|
||||||
|
have_odbc32=no
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test $have_odbc32 = yes ; then
|
||||||
|
ol_link_sql="-lodbc32"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
{ { echo "$as_me:$LINENO: error: unknown ODBC library" >&5
|
{ { echo "$as_me:$LINENO: error: unknown ODBC library" >&5
|
||||||
echo "$as_me: error: unknown ODBC library" >&2;}
|
echo "$as_me: error: unknown ODBC library" >&2;}
|
||||||
|
|
|
||||||
13
configure.in
13
configure.in
|
|
@ -253,8 +253,8 @@ OL_ARG_WITH(mp,
|
||||||
[ --with-mp with multiple precision statistics auto|longlong|long|bignum|gmp],
|
[ --with-mp with multiple precision statistics auto|longlong|long|bignum|gmp],
|
||||||
auto, [auto longlong long bignum gmp yes no])
|
auto, [auto longlong long bignum gmp yes no])
|
||||||
OL_ARG_WITH(odbc,
|
OL_ARG_WITH(odbc,
|
||||||
[ --with-odbc with specific ODBC support iodbc|unixodbc|auto],
|
[ --with-odbc with specific ODBC support iodbc|unixodbc|odbc32|auto],
|
||||||
auto, [auto iodbc unixodbc] )
|
auto, [auto iodbc unixodbc odbc32] )
|
||||||
|
|
||||||
dnl ----------------------------------------------------------------
|
dnl ----------------------------------------------------------------
|
||||||
dnl Server options
|
dnl Server options
|
||||||
|
|
@ -1929,7 +1929,7 @@ if test $ol_enable_sql != no ; then
|
||||||
LIBS="$LTHREAD_LIBS"
|
LIBS="$LTHREAD_LIBS"
|
||||||
|
|
||||||
if test $ol_with_odbc = auto ; then
|
if test $ol_with_odbc = auto ; then
|
||||||
ol_with_odbc="iodbc unixodbc"
|
ol_with_odbc="iodbc unixodbc odbc32"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for odbc in $ol_with_odbc ; do
|
for odbc in $ol_with_odbc ; do
|
||||||
|
|
@ -1949,6 +1949,13 @@ if test $ol_enable_sql != no ; then
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
odbc32)
|
||||||
|
AC_CHECK_LIB(odbc32, SQLDriverConnect, [have_odbc32=yes], [have_odbc32=no])
|
||||||
|
if test $have_odbc32 = yes ; then
|
||||||
|
ol_link_sql="-lodbc32"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
AC_MSG_ERROR([unknown ODBC library])
|
AC_MSG_ERROR([unknown ODBC library])
|
||||||
;;
|
;;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue