mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-20 22:59:34 -05:00
Replace openldap.m4/AC_COMPILE_CHECK_SIZEOF use with AC_CHECK_SIZEOF
Use AC_CHECK_TYPE(S) instead of old macros
This commit is contained in:
parent
7434c31079
commit
b867b4f49b
4 changed files with 1755 additions and 416 deletions
|
|
@ -65,34 +65,6 @@ dnl AC_MSG_RESULT([OpenLDAP --with-$1 $ol_with_$1])
|
||||||
])dnl
|
])dnl
|
||||||
dnl
|
dnl
|
||||||
dnl ====================================================================
|
dnl ====================================================================
|
||||||
dnl
|
|
||||||
AC_DEFUN([AC_COMPILE_CHECK_SIZEOF],
|
|
||||||
[changequote(<<, >>)dnl
|
|
||||||
dnl The name to #define.
|
|
||||||
define(<<AC_TYPE_NAME>>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl
|
|
||||||
dnl The cache variable name.
|
|
||||||
define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl
|
|
||||||
changequote([, ])dnl
|
|
||||||
AC_MSG_CHECKING(size of $1)
|
|
||||||
AC_CACHE_VAL(AC_CV_NAME,
|
|
||||||
[for ac_size in 4 8 1 2 16 $2 ; do # List sizes in rough order of prevalence.
|
|
||||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include "confdefs.h"
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
$2
|
|
||||||
]], [[switch (0) case 0: case (sizeof ($1) == $ac_size):;]])],[AC_CV_NAME=$ac_size],[])
|
|
||||||
if test x$AC_CV_NAME != x ; then break; fi
|
|
||||||
done
|
|
||||||
])
|
|
||||||
if test x$AC_CV_NAME = x ; then
|
|
||||||
AC_MSG_ERROR([cannot determine a size for $1])
|
|
||||||
fi
|
|
||||||
AC_MSG_RESULT($AC_CV_NAME)
|
|
||||||
AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The number of bytes in type $1])
|
|
||||||
undefine([AC_TYPE_NAME])dnl
|
|
||||||
undefine([AC_CV_NAME])dnl
|
|
||||||
])
|
|
||||||
dnl ====================================================================
|
|
||||||
dnl check if hard links are supported.
|
dnl check if hard links are supported.
|
||||||
dnl
|
dnl
|
||||||
AC_DEFUN([OL_PROG_LN_H], [# test for ln hardlink support
|
AC_DEFUN([OL_PROG_LN_H], [# test for ln hardlink support
|
||||||
|
|
|
||||||
33
configure.in
33
configure.in
|
|
@ -2418,28 +2418,23 @@ fi
|
||||||
dnl ----------------------------------------------------------------
|
dnl ----------------------------------------------------------------
|
||||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||||
|
|
||||||
dnl Checks for long long
|
AC_CHECK_TYPE(mode_t, int)
|
||||||
AC_CACHE_CHECK([long long], ol_cv_type_long_long, [
|
AC_CHECK_TYPE(off_t, long)
|
||||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[long long x;]])],[ol_cv_type_long_long=yes],[ol_cv_type_long_long=no])])
|
AC_CHECK_TYPE(pid_t, int)
|
||||||
if test $ol_cv_type_long_long = yes; then
|
|
||||||
AC_DEFINE(HAVE_LONG_LONG, 1, [define if you have 'long long'])
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_TYPE_MODE_T
|
|
||||||
AC_TYPE_OFF_T
|
|
||||||
AC_TYPE_PID_T
|
|
||||||
AC_CHECK_TYPES([ptrdiff_t])
|
|
||||||
AC_TYPE_SIGNAL
|
|
||||||
AC_TYPE_SIZE_T
|
|
||||||
|
|
||||||
AC_CHECK_TYPE(ssize_t, [signed int])
|
AC_CHECK_TYPE(ssize_t, [signed int])
|
||||||
AC_CHECK_TYPE(caddr_t, [char *])
|
AC_CHECK_TYPE(caddr_t, [char *])
|
||||||
|
AC_CHECK_TYPE(size_t, unsigned)
|
||||||
|
|
||||||
|
AC_CHECK_TYPES([long long])
|
||||||
|
AC_CHECK_TYPES([ptrdiff_t])
|
||||||
|
|
||||||
|
AC_TYPE_SIGNAL
|
||||||
|
AC_TYPE_UID_T
|
||||||
|
|
||||||
OL_TYPE_SOCKLEN_T
|
OL_TYPE_SOCKLEN_T
|
||||||
AC_CHECK_MEMBERS([struct stat.st_blksize])
|
AC_CHECK_MEMBERS([struct stat.st_blksize])
|
||||||
AC_HEADER_TIME
|
AC_HEADER_TIME
|
||||||
AC_STRUCT_TM
|
AC_STRUCT_TM
|
||||||
AC_TYPE_UID_T
|
|
||||||
OL_TYPE_SIG_ATOMIC_T
|
OL_TYPE_SIG_ATOMIC_T
|
||||||
|
|
||||||
dnl AC_TYPE_GETGROUPS
|
dnl AC_TYPE_GETGROUPS
|
||||||
|
|
@ -2458,10 +2453,10 @@ else
|
||||||
AC_C_BIGENDIAN
|
AC_C_BIGENDIAN
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_COMPILE_CHECK_SIZEOF(short)
|
AC_CHECK_SIZEOF(short)
|
||||||
AC_COMPILE_CHECK_SIZEOF(int)
|
AC_CHECK_SIZEOF(int)
|
||||||
AC_COMPILE_CHECK_SIZEOF(long)
|
AC_CHECK_SIZEOF(long)
|
||||||
AC_COMPILE_CHECK_SIZEOF(wchar_t)
|
AC_CHECK_SIZEOF(wchar_t)
|
||||||
|
|
||||||
if test "$ac_cv_sizeof_int" -lt 4 ; then
|
if test "$ac_cv_sizeof_int" -lt 4 ; then
|
||||||
AC_MSG_WARN([OpenLDAP requires 'int' to be 32 bits or greater.])
|
AC_MSG_WARN([OpenLDAP requires 'int' to be 32 bits or greater.])
|
||||||
|
|
|
||||||
|
|
@ -358,7 +358,7 @@
|
||||||
/* Define to 1 if you have the `lockf' function. */
|
/* Define to 1 if you have the `lockf' function. */
|
||||||
#undef HAVE_LOCKF
|
#undef HAVE_LOCKF
|
||||||
|
|
||||||
/* define if you have 'long long' */
|
/* Define to 1 if the system has the type `long long'. */
|
||||||
#undef HAVE_LONG_LONG
|
#undef HAVE_LONG_LONG
|
||||||
|
|
||||||
/* Define to 1 if you have the <ltdl.h> header file. */
|
/* Define to 1 if you have the <ltdl.h> header file. */
|
||||||
|
|
@ -912,16 +912,16 @@
|
||||||
/* Define to the type of arg 5 for `select'. */
|
/* Define to the type of arg 5 for `select'. */
|
||||||
#undef SELECT_TYPE_ARG5
|
#undef SELECT_TYPE_ARG5
|
||||||
|
|
||||||
/* The number of bytes in type int */
|
/* The size of a `int', as computed by sizeof. */
|
||||||
#undef SIZEOF_INT
|
#undef SIZEOF_INT
|
||||||
|
|
||||||
/* The number of bytes in type long */
|
/* The size of a `long', as computed by sizeof. */
|
||||||
#undef SIZEOF_LONG
|
#undef SIZEOF_LONG
|
||||||
|
|
||||||
/* The number of bytes in type short */
|
/* The size of a `short', as computed by sizeof. */
|
||||||
#undef SIZEOF_SHORT
|
#undef SIZEOF_SHORT
|
||||||
|
|
||||||
/* The number of bytes in type wchar_t */
|
/* The size of a `wchar_t', as computed by sizeof. */
|
||||||
#undef SIZEOF_WCHAR_T
|
#undef SIZEOF_WCHAR_T
|
||||||
|
|
||||||
/* define to support per-object ACIs */
|
/* define to support per-object ACIs */
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue