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
;;
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
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
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)
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