]> git.sur5r.net Git - openldap/blobdiff - configure.in
Added connection initialisation and destruction notification. Now backends can regist...
[openldap] / configure.in
index f5c3a2e186e4b785f122275ffb87c1aa4d2d9e86..47d5db1c19266982867836fbc35c564d165022e0 100644 (file)
@@ -35,7 +35,7 @@ dnl We use autoconf features new to 2.13.
 dnl    aclocal.m4 should be built using aclocal from automake 1.4
 AC_PREREQ(2.13)dnl Required Autoconf version
 
-AC_CONFIG_HEADER(include/portable.h include/ldap_features.h)dnl
+AC_CONFIG_HEADER(include/portable.h include/ldap_features.h include/lber_types.h)dnl
 
 dnl
 dnl Start Args
@@ -334,19 +334,22 @@ case "$target" in
 ;;
 esac
 
-if test -z "${CC}" -a $ol_aix_threads = yes ; then
-       AC_CHECK_PROGS(CC,cc_r xlc_r cc)
+if test $ol_aix_threads = yes ; then
+       if test -z "${CC}" ; then
+               AC_CHECK_PROGS(CC,cc_r xlc_r cc)
 
-       if test "$CC" = cc ; then
-               dnl no CC! don't allow --with-threads
-               if test $ol_with_threads != auto ; then
-                       AC_MSG_ERROR([--with-threads requires cc_r (or other suitable compiler) on AIX])
-               else
-                       AC_MSG_WARN([disabling threads, no cc_r on AIX])
-               fi
-               ol_with_threads=no
+               if test "$CC" = cc ; then
+                       dnl no CC! don't allow --with-threads
+                       if test $ol_with_threads != auto ; then
+                               AC_MSG_ERROR([--with-threads requires cc_r (or other suitable compiler) on AIX])
+                       else
+                               AC_MSG_WARN([disabling threads, no cc_r on AIX])
+                       fi
+                       ol_with_threads=no
+               fi
+       fi
 
-       elif test "$CC" ; then
+       if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
                ol_with_threads=posix
                ol_cv_pthread_create=yes
        fi
@@ -446,7 +449,7 @@ AC_DEFINE_UNQUOTED( EXEEXT, "${EXEEXT}", [defined to be the EXE extension])
 dnl OpenLDAP requires STDC features
 AM_PROG_CC_STDC
 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
-       AC_MSG_ERROR([OpenLDAP requires compiler to support STDC prototypes.])
+       AC_MSG_ERROR([OpenLDAP requires compiler to support STDC constructs.])
 fi
 
 dnl AM_C_PROTOTYPES
@@ -1618,6 +1621,11 @@ OL_C_VOLATILE
 
 if test $cross_compiling = yes ; then
        AC_DEFINE(CROSS_COMPILING, 1, [define if cross compiling])
+
+       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) 
@@ -1626,9 +1634,19 @@ else
 
        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
 fi
 
+AC_DEFINE(LBER_LEN_T,long)
+
 dnl ----------------------------------------------------------------
 dnl Checks for library functions.
 AC_FUNC_MEMCMP