pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/pkgtools/libnbcompat/files * configure.ac: Add AC_TYPE...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/4c5e04dcdc5d
branches:  trunk
changeset: 531149:4c5e04dcdc5d
user:      tnn <tnn%pkgsrc.org@localhost>
date:      Sat Jul 21 13:57:33 2007 +0000

description:
* configure.ac: Add AC_TYPE_UINTPTR_T, needed by sha2.c.
  Fixes build on Interix. Suggested by joerg@
* configure, config.h.in: regen

diffstat:

 pkgtools/libnbcompat/files/configure            |  116 ++++++++++++++++++++++++
 pkgtools/libnbcompat/files/configure.ac         |    3 +-
 pkgtools/libnbcompat/files/nbcompat/config.h.in |    7 +
 3 files changed, 125 insertions(+), 1 deletions(-)

diffs (167 lines):

diff -r 728c19888de2 -r 4c5e04dcdc5d pkgtools/libnbcompat/files/configure
--- a/pkgtools/libnbcompat/files/configure      Sat Jul 21 12:48:31 2007 +0000
+++ b/pkgtools/libnbcompat/files/configure      Sat Jul 21 13:57:33 2007 +0000
@@ -6396,6 +6396,122 @@
 
 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 -r 728c19888de2 -r 4c5e04dcdc5d pkgtools/libnbcompat/files/configure.ac
--- a/pkgtools/libnbcompat/files/configure.ac   Sat Jul 21 12:48:31 2007 +0000
+++ b/pkgtools/libnbcompat/files/configure.ac   Sat Jul 21 13:57:33 2007 +0000
@@ -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 @@
 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 -r 728c19888de2 -r 4c5e04dcdc5d pkgtools/libnbcompat/files/nbcompat/config.h.in
--- a/pkgtools/libnbcompat/files/nbcompat/config.h.in   Sat Jul 21 12:48:31 2007 +0000
+++ b/pkgtools/libnbcompat/files/nbcompat/config.h.in   Sat Jul 21 13:57:33 2007 +0000
@@ -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. */
 



Home | Main Index | Thread Index | Old Index