mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-09 02:52:04 +08:00
Use compile time, instead of run time, sizeof checks.
This commit is contained in:
parent
4cc712db53
commit
4757d60fb4
@ -56,6 +56,33 @@ dnl AC_VERBOSE(OpenLDAP --with-$1 $ol_with_$1)
|
||||
])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_TRY_COMPILE([#include "confdefs.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
|
||||
AC_DEFUN([OL_PROG_LN_H], [# test for ln hardlink support
|
||||
|
253
configure
vendored
253
configure
vendored
@ -13809,30 +13809,16 @@ if test $cross_compiling = yes ; then
|
||||
#define CROSS_COMPILING 1
|
||||
EOF
|
||||
|
||||
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define LBER_INT_T long
|
||||
EOF
|
||||
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define LBER_TAG_T long
|
||||
EOF
|
||||
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define LBER_SOCKET_T int
|
||||
EOF
|
||||
|
||||
|
||||
else
|
||||
echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
|
||||
echo "configure:13829: checking whether byte ordering is bigendian" >&5
|
||||
echo "configure:13815: checking whether byte ordering is bigendian" >&5
|
||||
if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
ac_cv_c_bigendian=unknown
|
||||
# See if sys/param.h defines the BYTE_ORDER macro.
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 13836 "configure"
|
||||
#line 13822 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
@ -13843,11 +13829,11 @@ int main() {
|
||||
#endif
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:13847: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:13833: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
# It does; now see whether it defined to BIG_ENDIAN or not.
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 13851 "configure"
|
||||
#line 13837 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
@ -13858,7 +13844,7 @@ int main() {
|
||||
#endif
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:13862: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:13848: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
ac_cv_c_bigendian=yes
|
||||
else
|
||||
@ -13878,7 +13864,7 @@ if test "$cross_compiling" = yes; then
|
||||
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 13882 "configure"
|
||||
#line 13868 "configure"
|
||||
#include "confdefs.h"
|
||||
main () {
|
||||
/* Are we little or big endian? From Harbison&Steele. */
|
||||
@ -13891,7 +13877,7 @@ main () {
|
||||
exit (u.c[sizeof (long) - 1] == 1);
|
||||
}
|
||||
EOF
|
||||
if { (eval echo configure:13895: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
||||
if { (eval echo configure:13881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
||||
then
|
||||
ac_cv_c_bigendian=no
|
||||
else
|
||||
@ -13914,38 +13900,40 @@ EOF
|
||||
|
||||
fi
|
||||
|
||||
echo $ac_n "checking size of short""... $ac_c" 1>&6
|
||||
echo "configure:13919: checking size of short" >&5
|
||||
fi
|
||||
|
||||
echo $ac_n "checking size of short""... $ac_c" 1>&6
|
||||
echo "configure:13907: checking size of short" >&5
|
||||
if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
if test "$cross_compiling" = yes; then
|
||||
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
|
||||
else
|
||||
for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 13927 "configure"
|
||||
#line 13913 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <stdio.h>
|
||||
main()
|
||||
{
|
||||
FILE *f=fopen("conftestval", "w");
|
||||
if (!f) exit(1);
|
||||
fprintf(f, "%d\n", sizeof(short));
|
||||
exit(0);
|
||||
}
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
|
||||
|
||||
int main() {
|
||||
switch (0) case 0: case (sizeof (short) == $ac_size):;
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:13938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
||||
then
|
||||
ac_cv_sizeof_short=`cat conftestval`
|
||||
if { (eval echo configure:13923: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
ac_cv_sizeof_short=$ac_size
|
||||
else
|
||||
echo "configure: failed program was:" >&5
|
||||
cat conftest.$ac_ext >&5
|
||||
rm -fr conftest*
|
||||
ac_cv_sizeof_short=0
|
||||
fi
|
||||
rm -fr conftest*
|
||||
rm -f conftest*
|
||||
if test x$ac_cv_sizeof_short != x ; then break; fi
|
||||
done
|
||||
|
||||
fi
|
||||
|
||||
if test x$ac_cv_sizeof_short = x ; then
|
||||
{ echo "configure: error: cannot determine a size for short" 1>&2; exit 1; }
|
||||
fi
|
||||
echo "$ac_t""$ac_cv_sizeof_short" 1>&6
|
||||
cat >> confdefs.h <<EOF
|
||||
@ -13953,38 +13941,38 @@ cat >> confdefs.h <<EOF
|
||||
EOF
|
||||
|
||||
|
||||
echo $ac_n "checking size of int""... $ac_c" 1>&6
|
||||
echo "configure:13958: checking size of int" >&5
|
||||
echo $ac_n "checking size of int""... $ac_c" 1>&6
|
||||
echo "configure:13946: checking size of int" >&5
|
||||
if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
if test "$cross_compiling" = yes; then
|
||||
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
|
||||
else
|
||||
for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 13966 "configure"
|
||||
#line 13952 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <stdio.h>
|
||||
main()
|
||||
{
|
||||
FILE *f=fopen("conftestval", "w");
|
||||
if (!f) exit(1);
|
||||
fprintf(f, "%d\n", sizeof(int));
|
||||
exit(0);
|
||||
}
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
|
||||
|
||||
int main() {
|
||||
switch (0) case 0: case (sizeof (int) == $ac_size):;
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:13977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
||||
then
|
||||
ac_cv_sizeof_int=`cat conftestval`
|
||||
if { (eval echo configure:13962: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
ac_cv_sizeof_int=$ac_size
|
||||
else
|
||||
echo "configure: failed program was:" >&5
|
||||
cat conftest.$ac_ext >&5
|
||||
rm -fr conftest*
|
||||
ac_cv_sizeof_int=0
|
||||
fi
|
||||
rm -fr conftest*
|
||||
rm -f conftest*
|
||||
if test x$ac_cv_sizeof_int != x ; then break; fi
|
||||
done
|
||||
|
||||
fi
|
||||
|
||||
if test x$ac_cv_sizeof_int = x ; then
|
||||
{ echo "configure: error: cannot determine a size for int" 1>&2; exit 1; }
|
||||
fi
|
||||
echo "$ac_t""$ac_cv_sizeof_int" 1>&6
|
||||
cat >> confdefs.h <<EOF
|
||||
@ -13992,38 +13980,38 @@ cat >> confdefs.h <<EOF
|
||||
EOF
|
||||
|
||||
|
||||
echo $ac_n "checking size of long""... $ac_c" 1>&6
|
||||
echo "configure:13997: checking size of long" >&5
|
||||
echo $ac_n "checking size of long""... $ac_c" 1>&6
|
||||
echo "configure:13985: checking size of long" >&5
|
||||
if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
if test "$cross_compiling" = yes; then
|
||||
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
|
||||
else
|
||||
for ac_size in 4 8 1 2 16 ; do # List sizes in rough order of prevalence.
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 14005 "configure"
|
||||
#line 13991 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <stdio.h>
|
||||
main()
|
||||
{
|
||||
FILE *f=fopen("conftestval", "w");
|
||||
if (!f) exit(1);
|
||||
fprintf(f, "%d\n", sizeof(long));
|
||||
exit(0);
|
||||
}
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
|
||||
|
||||
int main() {
|
||||
switch (0) case 0: case (sizeof (long) == $ac_size):;
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:14016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
||||
then
|
||||
ac_cv_sizeof_long=`cat conftestval`
|
||||
if { (eval echo configure:14001: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
ac_cv_sizeof_long=$ac_size
|
||||
else
|
||||
echo "configure: failed program was:" >&5
|
||||
cat conftest.$ac_ext >&5
|
||||
rm -fr conftest*
|
||||
ac_cv_sizeof_long=0
|
||||
fi
|
||||
rm -fr conftest*
|
||||
rm -f conftest*
|
||||
if test x$ac_cv_sizeof_long != x ; then break; fi
|
||||
done
|
||||
|
||||
fi
|
||||
|
||||
if test x$ac_cv_sizeof_long = x ; then
|
||||
{ echo "configure: error: cannot determine a size for long" 1>&2; exit 1; }
|
||||
fi
|
||||
echo "$ac_t""$ac_cv_sizeof_long" 1>&6
|
||||
cat >> confdefs.h <<EOF
|
||||
@ -14032,35 +14020,34 @@ EOF
|
||||
|
||||
|
||||
|
||||
if test "$ac_cv_sizeof_int" -lt 4 ; then
|
||||
echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
|
||||
if test "$ac_cv_sizeof_int" -lt 4 ; then
|
||||
echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
|
||||
|
||||
cat >> confdefs.h <<\EOF
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define LBER_INT_T long
|
||||
EOF
|
||||
|
||||
cat >> confdefs.h <<\EOF
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define LBER_TAG_T long
|
||||
EOF
|
||||
|
||||
cat >> confdefs.h <<\EOF
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define LBER_SOCKET_T int
|
||||
EOF
|
||||
|
||||
else
|
||||
cat >> confdefs.h <<\EOF
|
||||
else
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define LBER_INT_T int
|
||||
EOF
|
||||
|
||||
cat >> confdefs.h <<\EOF
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define LBER_TAG_T long
|
||||
EOF
|
||||
|
||||
cat >> confdefs.h <<\EOF
|
||||
cat >> confdefs.h <<\EOF
|
||||
#define LBER_SOCKET_T int
|
||||
EOF
|
||||
|
||||
fi
|
||||
fi
|
||||
|
||||
cat >> confdefs.h <<\EOF
|
||||
@ -14069,7 +14056,7 @@ EOF
|
||||
|
||||
|
||||
echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
|
||||
echo "configure:14073: checking for 8-bit clean memcmp" >&5
|
||||
echo "configure:14060: checking for 8-bit clean memcmp" >&5
|
||||
if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
@ -14077,7 +14064,7 @@ else
|
||||
ac_cv_func_memcmp_clean=no
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 14081 "configure"
|
||||
#line 14068 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
main()
|
||||
@ -14087,7 +14074,7 @@ main()
|
||||
}
|
||||
|
||||
EOF
|
||||
if { (eval echo configure:14091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
||||
if { (eval echo configure:14078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
|
||||
then
|
||||
ac_cv_func_memcmp_clean=yes
|
||||
else
|
||||
@ -14105,12 +14092,12 @@ echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
|
||||
test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
|
||||
|
||||
echo $ac_n "checking for strftime""... $ac_c" 1>&6
|
||||
echo "configure:14109: checking for strftime" >&5
|
||||
echo "configure:14096: checking for strftime" >&5
|
||||
if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 14114 "configure"
|
||||
#line 14101 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char strftime(); below. */
|
||||
@ -14134,7 +14121,7 @@ f = strftime;
|
||||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:14138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:14125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_func_strftime=yes"
|
||||
else
|
||||
@ -14156,7 +14143,7 @@ else
|
||||
echo "$ac_t""no" 1>&6
|
||||
# strftime is in -lintl on SCO UNIX.
|
||||
echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
|
||||
echo "configure:14160: checking for strftime in -lintl" >&5
|
||||
echo "configure:14147: checking for strftime in -lintl" >&5
|
||||
ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
|
||||
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
@ -14164,7 +14151,7 @@ else
|
||||
ac_save_LIBS="$LIBS"
|
||||
LIBS="-lintl $LIBS"
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 14168 "configure"
|
||||
#line 14155 "configure"
|
||||
#include "confdefs.h"
|
||||
/* Override any gcc2 internal prototype to avoid an error. */
|
||||
/* We use char because int might match the return type of a gcc2
|
||||
@ -14175,7 +14162,7 @@ int main() {
|
||||
strftime()
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:14179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:14166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_lib_$ac_lib_var=yes"
|
||||
else
|
||||
@ -14203,12 +14190,12 @@ fi
|
||||
|
||||
|
||||
echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
|
||||
echo "configure:14207: checking for inet_aton()" >&5
|
||||
echo "configure:14194: checking for inet_aton()" >&5
|
||||
if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 14212 "configure"
|
||||
#line 14199 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
@ -14230,7 +14217,7 @@ struct in_addr in;
|
||||
int rc = inet_aton( "255.255.255.255", &in );
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:14234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:14221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
rm -rf conftest*
|
||||
ol_cv_func_inet_aton=yes
|
||||
else
|
||||
@ -14252,12 +14239,12 @@ EOF
|
||||
|
||||
|
||||
echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
|
||||
echo "configure:14256: checking for _spawnlp" >&5
|
||||
echo "configure:14243: checking for _spawnlp" >&5
|
||||
if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 14261 "configure"
|
||||
#line 14248 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char _spawnlp(); below. */
|
||||
@ -14281,7 +14268,7 @@ f = _spawnlp;
|
||||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:14285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:14272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_func__spawnlp=yes"
|
||||
else
|
||||
@ -14305,12 +14292,12 @@ fi
|
||||
|
||||
|
||||
echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
|
||||
echo "configure:14309: checking for _snprintf" >&5
|
||||
echo "configure:14296: checking for _snprintf" >&5
|
||||
if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 14314 "configure"
|
||||
#line 14301 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char _snprintf(); below. */
|
||||
@ -14334,7 +14321,7 @@ f = _snprintf;
|
||||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:14338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:14325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_func__snprintf=yes"
|
||||
else
|
||||
@ -14360,12 +14347,12 @@ fi
|
||||
|
||||
|
||||
echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
|
||||
echo "configure:14364: checking for _vsnprintf" >&5
|
||||
echo "configure:14351: checking for _vsnprintf" >&5
|
||||
if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 14369 "configure"
|
||||
#line 14356 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char _vsnprintf(); below. */
|
||||
@ -14389,7 +14376,7 @@ f = _vsnprintf;
|
||||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:14393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:14380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_func__vsnprintf=yes"
|
||||
else
|
||||
@ -14415,12 +14402,12 @@ fi
|
||||
|
||||
|
||||
echo $ac_n "checking for vprintf""... $ac_c" 1>&6
|
||||
echo "configure:14419: checking for vprintf" >&5
|
||||
echo "configure:14406: checking for vprintf" >&5
|
||||
if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 14424 "configure"
|
||||
#line 14411 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char vprintf(); below. */
|
||||
@ -14444,7 +14431,7 @@ f = vprintf;
|
||||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:14448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:14435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_func_vprintf=yes"
|
||||
else
|
||||
@ -14468,12 +14455,12 @@ fi
|
||||
|
||||
if test "$ac_cv_func_vprintf" != yes; then
|
||||
echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
|
||||
echo "configure:14472: checking for _doprnt" >&5
|
||||
echo "configure:14459: checking for _doprnt" >&5
|
||||
if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 14477 "configure"
|
||||
#line 14464 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char _doprnt(); below. */
|
||||
@ -14497,7 +14484,7 @@ f = _doprnt;
|
||||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:14501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:14488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_func__doprnt=yes"
|
||||
else
|
||||
@ -14526,12 +14513,12 @@ if test $ac_cv_func_vprintf = yes ; then
|
||||
for ac_func in vsnprintf vsprintf
|
||||
do
|
||||
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||
echo "configure:14530: checking for $ac_func" >&5
|
||||
echo "configure:14517: checking for $ac_func" >&5
|
||||
if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 14535 "configure"
|
||||
#line 14522 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char $ac_func(); below. */
|
||||
@ -14555,7 +14542,7 @@ f = $ac_func;
|
||||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:14559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:14546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_func_$ac_func=yes"
|
||||
else
|
||||
@ -14632,12 +14619,12 @@ for ac_func in \
|
||||
|
||||
do
|
||||
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||
echo "configure:14636: checking for $ac_func" >&5
|
||||
echo "configure:14623: checking for $ac_func" >&5
|
||||
if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 14641 "configure"
|
||||
#line 14628 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char $ac_func(); below. */
|
||||
@ -14661,7 +14648,7 @@ f = $ac_func;
|
||||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:14665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:14652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_func_$ac_func=yes"
|
||||
else
|
||||
@ -14689,12 +14676,12 @@ done
|
||||
for ac_func in getopt tempnam
|
||||
do
|
||||
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||
echo "configure:14693: checking for $ac_func" >&5
|
||||
echo "configure:14680: checking for $ac_func" >&5
|
||||
if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 14698 "configure"
|
||||
#line 14685 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char $ac_func(); below. */
|
||||
@ -14718,7 +14705,7 @@ f = $ac_func;
|
||||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:14722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:14709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_func_$ac_func=yes"
|
||||
else
|
||||
@ -14755,13 +14742,13 @@ fi
|
||||
|
||||
# Check Configuration
|
||||
echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
|
||||
echo "configure:14759: checking declaration of sys_errlist" >&5
|
||||
echo "configure:14746: checking declaration of sys_errlist" >&5
|
||||
if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 14765 "configure"
|
||||
#line 14752 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#include <stdio.h>
|
||||
@ -14774,7 +14761,7 @@ int main() {
|
||||
char *c = (char *) *sys_errlist
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:14778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:14765: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
ol_cv_dcl_sys_errlist=yes
|
||||
ol_cv_have_sys_errlist=yes
|
||||
@ -14797,20 +14784,20 @@ EOF
|
||||
|
||||
|
||||
echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
|
||||
echo "configure:14801: checking existence of sys_errlist" >&5
|
||||
echo "configure:14788: checking existence of sys_errlist" >&5
|
||||
if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 14807 "configure"
|
||||
#line 14794 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <errno.h>
|
||||
int main() {
|
||||
char *c = (char *) *sys_errlist
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:14814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
if { (eval echo configure:14801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
|
||||
rm -rf conftest*
|
||||
ol_cv_have_sys_errlist=yes
|
||||
else
|
||||
|
30
configure.in
30
configure.in
@ -1933,28 +1933,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)
|
||||
|
@ -160,15 +160,6 @@ typedef char * caddr_t;
|
||||
LBER_TAG_T
|
||||
*/
|
||||
|
||||
/* The number of bytes in a int. */
|
||||
#undef SIZEOF_INT
|
||||
|
||||
/* The number of bytes in a long. */
|
||||
#undef SIZEOF_LONG
|
||||
|
||||
/* The number of bytes in a short. */
|
||||
#undef SIZEOF_SHORT
|
||||
|
||||
/* Define if you have the bcopy function. */
|
||||
#undef HAVE_BCOPY
|
||||
|
||||
@ -811,6 +802,15 @@ typedef char * caddr_t;
|
||||
/* define if cross compiling */
|
||||
#undef CROSS_COMPILING
|
||||
|
||||
/* The number of bytes in type short */
|
||||
#undef SIZEOF_SHORT
|
||||
|
||||
/* The number of bytes in type int */
|
||||
#undef SIZEOF_INT
|
||||
|
||||
/* The number of bytes in type long */
|
||||
#undef SIZEOF_LONG
|
||||
|
||||
/* define to you inet_aton(3) is available */
|
||||
#undef HAVE_INET_ATON
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user