]> git.sur5r.net Git - openldap/blobdiff - configure.in
Added a "dnattr" case for ACIs (still need to check the ACI OID).
[openldap] / configure.in
index 8824fd806d2405b7111db39929672f82b2809c6f..0d6d7f70dfac35fd09413d637ce22c96cadf48e3 100644 (file)
@@ -113,7 +113,7 @@ OL_ARG_WITH(kerberos,[  --with-kerberos     with Kerberos support],
 OL_ARG_WITH(readline,[  --with-readline        with readline support],
        auto, [auto yes no] )
 OL_ARG_WITH(threads,[  --with-threads  use threads],
-       auto, [auto posix mach pth lwp yes no manual] )
+       auto, [auto nt posix mach pth lwp yes no manual] )
 OL_ARG_WITH(tls,[  --with-tls          with TLS/SSL support],
        auto, [auto ssleay openssl yes no] )
 OL_ARG_WITH(yielding_select,[  --with-yielding-select  with implicitly yielding select],
@@ -670,12 +670,9 @@ AC_CHECK_HEADERS(  \
        syslog.h                \
        termios.h               \
        unistd.h                \
+       winsock.h               \
 )
 
-dnl Check for winsock.h on a Mingw32 system
-if test "$ac_cv_mingw32" = yes ; then
-    AC_CHECK_HEADERS(winsock.h)
-fi
 
 dnl ----------------------------------------------------------------
 dnl Checks for libraries
@@ -684,25 +681,22 @@ dnl HP-UX requires -lV3
 AC_CHECK_LIB(V3, sigset)
 
 dnl Gotta check for winsock manually
-if test "${ac_cv_header_winsock_h}" = yes; then
-    AC_MSG_CHECKING(for winsock support)
-    AC_TRY_LINK([
-#include <winsock.h>
-    ],[
-socket(0,0,0);
-select(0,NULL,NULL,NULL,NULL);
-closesocket(0);
-gethostname(NULL,0);
-    ],[
-       AC_MSG_RESULT(yes)
-       AC_DEFINE(HAVE_WINSOCK,1,[define if you have winsock])
-       ac_cv_func_socket=yes
-       ac_cv_func_select=yes
-       ac_cv_func_closesocket=yes
-       ac_cv_func_gethostname=yes
-    ],[
-       AC_MSG_RESULT(no)
-    ])
+if test $ac_cv_header_winsock_h = yes; then
+       AC_CACHE_CHECK([for winsock], [ol_cv_winsock], 
+       AC_TRY_LINK([#include <winsock.h>],[
+                       socket(0,0,0);
+                       select(0,NULL,NULL,NULL,NULL);
+                       closesocket(0);
+                       gethostname(NULL,0);
+       ],[ol_cv_winsock=yes],[ol_cv_winsock=no])])
+
+       if test $ol_cv_winsock = yes ; then
+               AC_DEFINE(HAVE_WINSOCK,1,[define if you have winsock])
+               ac_cv_func_socket=yes
+               ac_cv_func_select=yes
+               ac_cv_func_closesocket=yes
+               ac_cv_func_gethostname=yes
+       fi
 fi
 
 dnl Find socket()
@@ -993,14 +987,23 @@ dnl ----------------------------------------------------------------
 dnl Threads?
 ol_link_threads=no
 
-dnl Not much to check. If we're in mingw32, we assume win32 threads.
-if test "$ac_cv_mingw32" = yes ; then
-    ol_link_threads=nt
-    ol_with_threads=found
-    ol_with_yielding_select=yes
-    AC_MSG_CHECKING(for NT threads)
-    AC_MSG_RESULT(yes)
-    AC_DEFINE(HAVE_NT_THREADS,1,[if you have NT threads])
+if test $ol_with_threads = auto -o $ol_with_threads = yes \
+       -o $ol_with_threads = nt ; then
+
+       OL_NT_THREADS
+
+       if test "$ol_cv_nt_threads" = yes ; then
+       ol_link_threads=nt
+       ol_with_threads=found
+       ol_with_yielding_select=yes
+
+               AC_DEFINE(HAVE_NT_SERVICE_MANAGER,1,[if you have NT Service Manager])
+               AC_DEFINE(HAVE_NT_EVENT_LOG,1,[if you have NT Event Log])
+       fi
+
+       if test $ol_with_threads = nt ; then
+               AC_MSG_ERROR([could not locate NT Threads])
+       fi
 fi
 
 if test $ol_with_threads = auto -o $ol_with_threads = yes \
@@ -1912,6 +1915,10 @@ AC_TYPE_PID_T
 AM_TYPE_PTRDIFF_T
 AC_TYPE_SIGNAL
 AC_TYPE_SIZE_T
+
+AC_CHECK_TYPE(ssize_t, [signed int])
+AC_CHECK_TYPE(caddr_t, [char *])
+
 OL_TYPE_SOCKLEN_T
 AC_STRUCT_ST_BLKSIZE
 AC_HEADER_TIME
@@ -1919,12 +1926,10 @@ AC_STRUCT_TM
 AC_TYPE_UID_T
 OL_TYPE_SIG_ATOMIC_T
 
-dnl only check these if we're not Mingw32
-if test "$ac_cv_mingw32" != yes ; then
-    AC_TYPE_GETGROUPS
-    OL_STRUCT_PASSWD_PW_GECOS
-    OL_STRUCT_PASSWD_PW_PASSWD
-fi
+dnl AC_TYPE_GETGROUPS
+
+OL_STRUCT_PASSWD_PW_GECOS
+OL_STRUCT_PASSWD_PW_PASSWD
 
 OL_C_UPPER_LOWER
 AC_C_CONST
@@ -1932,28 +1937,24 @@ OL_C_VOLATILE
 
 if test $cross_compiling = yes ; then
        AC_DEFINE(CROSS_COMPILING, 1, [define if cross compiling])
+else
+       AC_C_BIGENDIAN
+fi
+
+AC_COMPILE_CHECK_SIZEOF(short) 
+AC_COMPILE_CHECK_SIZEOF(int) 
+AC_COMPILE_CHECK_SIZEOF(long)
+
+if test "$ac_cv_sizeof_int" -lt 4 ; then
+       AC_MSG_WARN([OpenLDAP requires 'int' to be 32 bits or greater.])
 
        AC_DEFINE(LBER_INT_T,long)
        AC_DEFINE(LBER_TAG_T,long)
        AC_DEFINE(LBER_SOCKET_T,int)
-
 else
-       AC_C_BIGENDIAN
-       AC_CHECK_SIZEOF(short) 
-       AC_CHECK_SIZEOF(int) 
-       AC_CHECK_SIZEOF(long)
-
-       if test "$ac_cv_sizeof_int" -lt 4 ; then
-               AC_MSG_WARN([OpenLDAP requires 'int' to be 32 bits or greater.])
-
-               AC_DEFINE(LBER_INT_T,long)
-               AC_DEFINE(LBER_TAG_T,long)
-               AC_DEFINE(LBER_SOCKET_T,int)
-       else
-               AC_DEFINE(LBER_INT_T,int)
-               AC_DEFINE(LBER_TAG_T,long)
-               AC_DEFINE(LBER_SOCKET_T,int)
-       fi
+       AC_DEFINE(LBER_INT_T,int)
+       AC_DEFINE(LBER_TAG_T,long)
+       AC_DEFINE(LBER_SOCKET_T,int)
 fi
 
 AC_DEFINE(LBER_LEN_T,long)
@@ -1967,23 +1968,17 @@ dnl AM_FUNC_STRTOD
 
 OL_FUNC_INET_ATON
 
-dnl Check for Mingw32 specific functions.
-if test "$ac_cv_mingw32" = yes ; then
-    AC_CHECK_FUNC(_snprintf, [
-       ac_cv_func_snprintf=yes
+dnl Check for NT specific routines
+AC_CHECK_FUNC(_spawnlp, AC_DEFINE(HAVE_SPAWNLP,1,[if you have spawnlp()]))
+
+AC_CHECK_FUNC(_snprintf, [ac_cv_func_snprintf=yes
        AC_DEFINE(snprintf, _snprintf, [define to snprintf routine])
-    ])
+])
 
-    AC_CHECK_FUNC(_vsnprintf, [
-       ac_cv_func_vsnprintf=yes
+AC_CHECK_FUNC(_vsnprintf, [ac_cv_func_vsnprintf=yes
        AC_DEFINE(vsnprintf, _vsnprintf, [define to vsnprintf routine])
-    ])
-
-    AC_CHECK_FUNC(_spawnlp, AC_DEFINE(HAVE_SPAWNLP,1,[if you have spawnlp()]))
-fi
+])
 
-dnl we should use vfork instead of fork in a number of places...
-dnl AC_FUNC_VFORK
 AC_FUNC_VPRINTF
 
 if test $ac_cv_func_vprintf = yes ; then