dnl $OpenLDAP$
dnl This work is part of OpenLDAP Software <http://www.openldap.org/>.
dnl
-dnl Copyright 1998-2006 The OpenLDAP Foundation.
+dnl Copyright 1998-2007 The OpenLDAP Foundation.
dnl All rights reserved.
dnl
dnl Redistribution and use in source and binary forms, with or without
define([AC_LIBTOOL_LANG_GCJ_CONFIG], [:])dnl
dnl ================================================================
dnl Configure.in for OpenLDAP
-AC_COPYRIGHT([[Copyright 1998-2006 The OpenLDAP Foundation. All rights reserved.
+AC_COPYRIGHT([[Copyright 1998-2007 The OpenLDAP Foundation. All rights reserved.
Restrictions apply, see COPYRIGHT and LICENSE files.]])
AC_REVISION([$OpenLDAP$])
AC_INIT([OpenLDAP],,[http://www.openldap.org/its/])
/* begin of portable.h.pre */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 1998-2006 The OpenLDAP Foundation
+ * Copyright 1998-2007 The OpenLDAP Foundation
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
OL_ARG_WITH(mp,
[ --with-mp with multiple precision statistics auto|longlong|long|bignum|gmp],
auto, [auto longlong long bignum gmp yes no])
+OL_ARG_WITH(odbc,
+ [ --with-odbc with specific ODBC support iodbc|unixodbc|auto],
+ auto, [auto iodbc unixodbc] )
dnl ----------------------------------------------------------------
dnl Server options
termios.h \
unistd.h \
utime.h \
- winsock.h \
- winsock2.h \
)
+dnl Only check Winsock on MinGW
+if test "$ac_cv_mingw32" = yes ; then
+ AC_CHECK_HEADERS( winsock.h winsock2.h )
+fi
+
AC_CHECK_HEADERS( resolv.h, [], [],
[$ac_includes_default
#include <netinet/in.h>
dnl The following is INTENTIONALLY scripted out because shell does not
dnl support variable names with the '@' character, which is what
dnl autoconf would try to generate if one merely used AC_SEARCH_LIBS
-dnl
-dnl Skip Winsock tests on Cygwin
-if test "$ac_cv_cygwin" != yes && test "$ac_cv_header_winsock_h" = yes; then
+if test "$ac_cv_header_winsock_h" = yes; then
AC_CACHE_CHECK([for winsock], [ol_cv_winsock],
save_LIBS="$LIBS"
for curlib in ws2_32 wsock32; do
sql_LIBS="$LIBS"
LIBS="$LTHREAD_LIBS"
- 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
+ if test $ol_with_odbc = auto ; then
+ ol_with_odbc="iodbc unixodbc"
fi
+ for odbc in $ol_with_odbc ; do
+ if test $ol_link_sql = no ; then
+ case $odbc in
+ iodbc)
+ AC_CHECK_LIB(iodbc, SQLDriverConnect, [have_iodbc=yes], [have_iodbc=no])
+ if test $have_iodbc = yes ; then
+ ol_link_sql="-liodbc"
+ fi
+ ;;
+
+ unixodbc)
+ AC_CHECK_LIB(odbc, SQLDriverConnect, [have_odbc=yes], [have_odbc=no])
+ if test $have_odbc = yes ; then
+ ol_link_sql="-lodbc"
+ fi
+ ;;
+
+ *)
+ AC_MSG_ERROR([unknown ODBC library])
+ ;;
+ esac
+ fi
+ done
+
LIBS="$sql_LIBS"
if test $ol_link_sql != no ; then
if test $ol_with_mp = gmp || test $ol_with_mp = auto ; then
AC_CHECK_HEADERS(gmp.h)
AC_CHECK_LIB(gmp, __gmpz_add_ui)
- if test $ac_cv_header_gmp_h = yes && test $ac_cv_lib_gmp = yes ; then
+ if test $ac_cv_header_gmp_h = yes && test $ac_cv_lib_gmp___gmpz_add_ui = yes ; then
AC_DEFINE(USE_MP_GMP,1,[define to use GMP for MP])
ol_with_mp=gmp
elif test $ol_with_mp = gmp ; then
cat > $BACKENDSC << ENDX
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 1998-2006 The OpenLDAP Foundation.
+ * Copyright 1998-2007 The OpenLDAP Foundation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
cat > $OVERLAYSC << ENDX
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 1998-2006 The OpenLDAP Foundation.
+ * Copyright 1998-2007 The OpenLDAP Foundation.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without