diff options
author | tnn <tnn@pkgsrc.org> | 2007-07-21 13:57:33 +0000 |
---|---|---|
committer | tnn <tnn@pkgsrc.org> | 2007-07-21 13:57:33 +0000 |
commit | dc991988c108a78a62289419cd866bbad084f4c0 (patch) | |
tree | 67119f39f68cee4220a9ef6d0377dd92cf96313b /pkgtools/libnbcompat | |
parent | b61d8add4aa5c568d226234e6c4e0a0b2aceda43 (diff) | |
download | pkgsrc-dc991988c108a78a62289419cd866bbad084f4c0.tar.gz |
* configure.ac: Add AC_TYPE_UINTPTR_T, needed by sha2.c.
Fixes build on Interix. Suggested by joerg@
* configure, config.h.in: regen
Diffstat (limited to 'pkgtools/libnbcompat')
-rwxr-xr-x | pkgtools/libnbcompat/files/configure | 116 | ||||
-rw-r--r-- | pkgtools/libnbcompat/files/configure.ac | 3 | ||||
-rw-r--r-- | pkgtools/libnbcompat/files/nbcompat/config.h.in | 7 |
3 files changed, 125 insertions, 1 deletions
diff --git a/pkgtools/libnbcompat/files/configure b/pkgtools/libnbcompat/files/configure index 51a94a4acbb..3953f5c581d 100755 --- a/pkgtools/libnbcompat/files/configure +++ b/pkgtools/libnbcompat/files/configure @@ -6396,6 +6396,122 @@ _ACEOF fi + + { echo "$as_me:$LINENO: checking for uintptr_t" >&5 +echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; } +if test "${ac_cv_type_uintptr_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +typedef uintptr_t ac__type_new_; +int +main () +{ +if ((ac__type_new_ *) 0) + return 0; +if (sizeof (ac__type_new_)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + ac_cv_type_uintptr_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_cv_type_uintptr_t=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5 +echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; } +if test $ac_cv_type_uintptr_t = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_UINTPTR_T 1 +_ACEOF + +else + for ac_type in 'unsigned int' 'unsigned long int' \ + 'unsigned long long int'; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then + +cat >>confdefs.h <<_ACEOF +#define uintptr_t $ac_type +_ACEOF + + ac_type= +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + test -z "$ac_type" && break + done +fi + + { echo "$as_me:$LINENO: checking for long long" >&5 echo $ECHO_N "checking for long long... $ECHO_C" >&6; } if test "${ac_cv_type_long_long+set}" = set; then diff --git a/pkgtools/libnbcompat/files/configure.ac b/pkgtools/libnbcompat/files/configure.ac index 15b3ffccf79..5e2d29bb5d4 100644 --- a/pkgtools/libnbcompat/files/configure.ac +++ b/pkgtools/libnbcompat/files/configure.ac @@ -1,4 +1,4 @@ -dnl $NetBSD: configure.ac,v 1.56 2007/07/20 00:21:02 tnn Exp $ +dnl $NetBSD: configure.ac,v 1.57 2007/07/21 13:57:33 tnn Exp $ dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.52) @@ -181,6 +181,7 @@ fi dnl Checks for typedefs, structures, and compiler characteristics. AC_C___ATTRIBUTE__ AC_TYPE_SIZE_T +AC_TYPE_UINTPTR_T AC_CHECK_TYPES([long long, long double, int8_t, int16_t, int32_t, int64_t, u_int8_t, u_int16_t, u_int32_t, u_int64_t, uint8_t, uint16_t, uint32_t, uint64_t],[],[], [#if STDC_HEADERS #include <stdlib.h> diff --git a/pkgtools/libnbcompat/files/nbcompat/config.h.in b/pkgtools/libnbcompat/files/nbcompat/config.h.in index c1902ceb8ab..961e98f0c1a 100644 --- a/pkgtools/libnbcompat/files/nbcompat/config.h.in +++ b/pkgtools/libnbcompat/files/nbcompat/config.h.in @@ -425,6 +425,9 @@ /* Define to 1 if the system has the type `uint8_t'. */ #undef HAVE_UINT8_T +/* Define to 1 if the system has the type `uintptr_t'. */ +#undef HAVE_UINTPTR_T + /* Define to 1 if you have the <unistd.h> header file. */ #undef HAVE_UNISTD_H @@ -516,6 +519,10 @@ /* Define to `unsigned int' if <sys/types.h> does not define. */ #undef size_t +/* Define to the type of an unsigned integer type wide enough to hold a + pointer, if such a type exists, and if the system does not define it. */ +#undef uintptr_t + /* NBCOMPAT template section follows. */ |