SOURCES: sane-backends-missing-files.patch (NEW) - missing files from sane CVS

qboosh qboosh at pld-linux.org
Sat May 31 00:20:07 CEST 2008


Author: qboosh                       Date: Fri May 30 22:20:07 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- missing files from sane CVS

---- Files affected:
SOURCES:
   sane-backends-missing-files.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/sane-backends-missing-files.patch
diff -u /dev/null SOURCES/sane-backends-missing-files.patch:1.1
--- /dev/null	Sat May 31 00:20:07 2008
+++ SOURCES/sane-backends-missing-files.patch	Sat May 31 00:20:02 2008
@@ -0,0 +1,1096 @@
+diff -Nur sane-backends-1.0.19/m4.ne/byteorder.m4 sane-backends-1.0.19/m4/byteorder.m4
+--- sane-backends-1.0.19/m4.ne/byteorder.m4	1970-01-01 01:00:00.000000000 +0100
++++ sane-backends-1.0.19/m4/byteorder.m4	2008-05-30 18:54:17.627166176 +0200
+@@ -0,0 +1,354 @@
++dnl AC_NEED_BYTEORDER_H ( HEADER-TO-GENERATE )
++dnl Copyright 2001-2002 by Dan Fandrich <dan at coneharvesters.com>
++dnl This file may be copied and used freely without restrictions.  No warranty
++dnl is expressed or implied.
++dnl
++dnl Create a header file that guarantees that byte swapping macros of the
++dnl ntohl variety as well as the extended types included in OpenBSD and
++dnl NetBSD such as le32toh are defined.  If possible, the standard ntohl
++dnl are overloaded as they are optimized for the given platform, but when
++dnl this is not possible (e.g. on a big-endian machine) they are defined
++dnl in this file.
++
++dnl Look for a symbol in a header file
++dnl AC_HAVE_SYMBOL ( IDENTIFIER, HEADER-FILE, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND )
++AC_DEFUN([AC_HAVE_SYMBOL],
++[
++AC_MSG_CHECKING(for $1 in $2)
++AC_EGREP_CPP([symbol is present|\<$1\>],[
++#include <$2>
++#ifdef $1
++ 	symbol is present
++#endif
++	], 
++[AC_MSG_RESULT(yes)
++$3
++],
++[AC_MSG_RESULT(no)
++$4
++])])
++
++
++dnl Create a header file that defines extended byte swapping macros
++AC_DEFUN([AC_NEED_BYTEORDER_H],
++[
++changequote(, )dnl
++ac_dir=`echo $1|sed 's%/[^/][^/]*$%%'`
++changequote([, ])dnl
++if test "$ac_dir" != "$1" && test "$ac_dir" != .; then
++  # The file is in a subdirectory.
++  test ! -d "$ac_dir" && mkdir "$ac_dir"
++fi
++
++# We're only interested in the target CPU, but it's not always set
++effective_target="$target"
++if test "x$effective_target" = xNONE -o "x$effective_target" = x ; then
++	effective_target="$host"
++fi
++AC_SUBST(effective_target)
++
++cat > "$1" << EOF
++/* This file is generated automatically by configure */
++/* It is valid only for the system type ${effective_target} */
++
++#ifndef __BYTEORDER_H
++#define __BYTEORDER_H
++
++EOF
++
++dnl First, do an endian check
++AC_C_BIGENDIAN
++
++dnl Look for NetBSD-style extended byte swapping macros
++AC_HAVE_SYMBOL(le32toh,machine/endian.h,
++ [HAVE_LE32TOH=1
++ cat >> "$1" << EOF
++/* extended byte swapping macros are already available */
++#include <machine/endian.h>
++
++EOF],
++
++[
++
++dnl Look for standard byte swapping macros
++AC_HAVE_SYMBOL(ntohl,arpa/inet.h,
++ [cat >> "$1" << EOF
++/* ntohl and relatives live here */
++#include <arpa/inet.h>
++
++EOF],
++
++ [AC_HAVE_SYMBOL(ntohl,netinet/in.h,
++  [cat >> "$1" << EOF
++/* ntohl and relatives live here */
++#include <netinet/in.h>
++
++EOF],true)])
++])
++
++dnl Look for generic byte swapping macros
++
++dnl OpenBSD
++AC_HAVE_SYMBOL(swap32,machine/endian.h,
++ [cat >> "$1" << EOF
++/* swap32 and swap16 are defined in machine/endian.h */
++
++EOF],
++
++ [
++dnl Linux GLIBC
++  AC_HAVE_SYMBOL(bswap_32,byteswap.h,
++   [cat >> "$1" << EOF
++/* Define generic byte swapping functions */
++#include <byteswap.h>
++#define swap16(x) bswap_16(x)
++#define swap32(x) bswap_32(x)
++#define swap64(x) bswap_64(x)
++
++EOF],
++
++   [
++dnl NetBSD
++  	AC_HAVE_SYMBOL(bswap32,machine/endian.h,
++    dnl We're already including machine/endian.h if this test succeeds
++  	 [cat >> "$1" << EOF
++/* Define generic byte swapping functions */
++EOF
++	if test "$HAVE_LE32TOH" != "1"; then
++		echo '#include <machine/endian.h>'>> "$1"
++	fi
++cat >> "$1" << EOF
++#define swap16(x) bswap16(x)
++#define swap32(x) bswap32(x)
++#define swap64(x) bswap64(x)
++
++EOF],
++
++   [
++dnl FreeBSD
++  	AC_HAVE_SYMBOL(__byte_swap_long,sys/types.h,
++  	 [cat >> "$1" << EOF
++/* Define generic byte swapping functions */
++#include <sys/types.h>
++#define swap16(x) __byte_swap_word(x)
++#define swap32(x) __byte_swap_long(x)
++/* No optimized 64 bit byte swapping macro is available */
++#define swap64(x) ((uint64_t)(((uint64_t)(x) << 56) & 0xff00000000000000ULL | \\
++			      ((uint64_t)(x) << 40) & 0x00ff000000000000ULL | \\
++			      ((uint64_t)(x) << 24) & 0x0000ff0000000000ULL | \\
++			      ((uint64_t)(x) << 8)  & 0x000000ff00000000ULL | \\
++			      ((x) >> 8)  & 0x00000000ff000000ULL | \\
++			      ((x) >> 24) & 0x0000000000ff0000ULL | \\
++			      ((x) >> 40) & 0x000000000000ff00ULL | \\
++			      ((x) >> 56) & 0x00000000000000ffULL))
++
++EOF],
++
++  	 [
++dnl OS X
++  	AC_HAVE_SYMBOL(NXSwapLong,machine/byte_order.h,
++  	 [cat >> "$1" << EOF
++/* Define generic byte swapping functions */
++#include <machine/byte_order.h>
++#define swap16(x) NXSwapShort(x)
++#define swap32(x) NXSwapLong(x)
++#define swap64(x) NXSwapLongLong(x)
++
++EOF],
++         [
++	if test $ac_cv_c_bigendian = yes; then
++		cat >> "$1" << EOF
++/* No other byte swapping functions are available on this big-endian system */
++#define swap16(x)	((uint16_t)(((x) << 8) | ((uint16_t)(x) >> 8)))
++#define swap32(x)	((uint32_t)(((uint32_t)(x) << 24) & 0xff000000UL | \\
++				    ((uint32_t)(x) << 8)  & 0x00ff0000UL | \\
++				    ((x) >> 8)  & 0x0000ff00UL | \\
++				    ((x) >> 24) & 0x000000ffUL))
++#define swap64(x) ((uint64_t)(((uint64_t)(x) << 56) & 0xff00000000000000ULL | \\
++			      ((uint64_t)(x) << 40) & 0x00ff000000000000ULL | \\
++			      ((uint64_t)(x) << 24) & 0x0000ff0000000000ULL | \\
++			      ((uint64_t)(x) << 8)  & 0x000000ff00000000ULL | \\
++			      ((x) >> 8)  & 0x00000000ff000000ULL | \\
++			      ((x) >> 24) & 0x0000000000ff0000ULL | \\
++			      ((x) >> 40) & 0x000000000000ff00ULL | \\
++			      ((x) >> 56) & 0x00000000000000ffULL))
++
++EOF
++	else
++ cat >> "$1" << EOF
++/* Use these as generic byteswapping macros on this little endian system */
++#define swap16(x)		ntohs(x)
++#define swap32(x)		ntohl(x)
++/* No optimized 64 bit byte swapping macro is available */
++#define swap64(x) ((uint64_t)(((uint64_t)(x) << 56) & 0xff00000000000000ULL | \\
++			      ((uint64_t)(x) << 40) & 0x00ff000000000000ULL | \\
++			      ((uint64_t)(x) << 24) & 0x0000ff0000000000ULL | \\
++			      ((uint64_t)(x) << 8)  & 0x000000ff00000000ULL | \\
++			      ((x) >> 8)  & 0x00000000ff000000ULL | \\
++			      ((x) >> 24) & 0x0000000000ff0000ULL | \\
++			      ((x) >> 40) & 0x000000000000ff00ULL | \\
++			      ((x) >> 56) & 0x00000000000000ffULL))
++
++EOF
++	fi
++])
++  	  ])
++    ])
++  ])
++])
++
++
++[
++if test "$HAVE_LE32TOH" != "1"; then
++ cat >> "$1" << EOF
++/* The byte swapping macros have the form: */
++/*   EENN[a]toh or htoEENN[a] where EE is be (big endian) or */
++/* le (little-endian), NN is 16 or 32 (number of bits) and a, */
++/* if present, indicates that the endian side is a pointer to an */
++/* array of uint8_t bytes instead of an integer of the specified length. */
++/* h refers to the host's ordering method. */
++
++/* So, to convert a 32-bit integer stored in a buffer in little-endian */
++/* format into a uint32_t usable on this machine, you could use: */
++/*   uint32_t value = le32atoh(&buf[3]); */
++/* To put that value back into the buffer, you could use: */
++/*   htole32a(&buf[3], value); */
++
++/* Define aliases for the standard byte swapping macros */
++/* Arguments to these macros must be properly aligned on natural word */
++/* boundaries in order to work properly on all architectures */
++#define htobe16(x) htons(x)
++#define htobe32(x) htonl(x)
++#define be16toh(x) ntohs(x)
++#define be32toh(x) ntohl(x)
++
++#define HTOBE16(x) (x) = htobe16(x)
++#define HTOBE32(x) (x) = htobe32(x)
++#define BE32TOH(x) (x) = be32toh(x)
++#define BE16TOH(x) (x) = be16toh(x)
++
++EOF
++
++ if test $ac_cv_c_bigendian = yes; then
++  cat >> "$1" << EOF
++/* Define our own extended byte swapping macros for big-endian machines */
++#define htole16(x)      swap16(x)
++#define htole32(x)      swap32(x)
++#define le16toh(x)      swap16(x)
++#define le32toh(x)      swap32(x)
++
++#define htobe64(x)      (x)
++#define be64toh(x)      (x)
++
++#define HTOLE16(x)      (x) = htole16(x)
++#define HTOLE32(x)      (x) = htole32(x)
++#define LE16TOH(x)      (x) = le16toh(x)
++#define LE32TOH(x)      (x) = le32toh(x)
++
++#define HTOBE64(x)      (void) (x)
++#define BE64TOH(x)      (void) (x)
++
++EOF
++ else
++  cat >> "$1" << EOF
++/* On little endian machines, these macros are null */
++#define htole16(x)      (x)
++#define htole32(x)      (x)
++#define htole64(x)      (x)
++#define le16toh(x)      (x)
++#define le32toh(x)      (x)
++#define le64toh(x)      (x)
++
++#define HTOLE16(x)      (void) (x)
++#define HTOLE32(x)      (void) (x)
++#define HTOLE64(x)      (void) (x)
++#define LE16TOH(x)      (void) (x)
++#define LE32TOH(x)      (void) (x)
++#define LE64TOH(x)      (void) (x)
++
++/* These don't have standard aliases */
++#define htobe64(x)      swap64(x)
++#define be64toh(x)      swap64(x)
++
++#define HTOBE64(x)      (x) = htobe64(x)
++#define BE64TOH(x)      (x) = be64toh(x)
++
++EOF
++ fi
++fi
++
++cat >> "$1" << EOF
++/* Define the C99 standard length-specific integer types */
++#include <_stdint.h>
++
++EOF
++
++case "${effective_target}" in
++ i[3456]86-*)
++  cat >> "$1" << EOF
++/* Here are some macros to create integers from a byte array */
++/* These are used to get and put integers from/into a uint8_t array */
++/* with a specific endianness.  This is the most portable way to generate */
++/* and read messages to a network or serial device.  Each member of a */
++/* packet structure must be handled separately. */
++
++/* The i386 and compatibles can handle unaligned memory access, */
++/* so use the optimized macros above to do this job */
++#define be16atoh(x)     be16toh(*(uint16_t*)(x))
++#define be32atoh(x)     be32toh(*(uint32_t*)(x))
++#define be64atoh(x)     be64toh(*(uint64_t*)(x))
++#define le16atoh(x)     le16toh(*(uint16_t*)(x))
++#define le32atoh(x)     le32toh(*(uint32_t*)(x))
++#define le64atoh(x)     le64toh(*(uint64_t*)(x))
++
++#define htobe16a(a,x)   *(uint16_t*)(a) = htobe16(x)
++#define htobe32a(a,x)   *(uint32_t*)(a) = htobe32(x)
++#define htobe64a(a,x)   *(uint64_t*)(a) = htobe64(x)
++#define htole16a(a,x)   *(uint16_t*)(a) = htole16(x)
++#define htole32a(a,x)   *(uint32_t*)(a) = htole32(x)
++#define htole64a(a,x)   *(uint64_t*)(a) = htole64(x)
++
++EOF
++  ;;
++
++ *)
++  cat >> "$1" << EOF
++/* Here are some macros to create integers from a byte array */
++/* These are used to get and put integers from/into a uint8_t array */
++/* with a specific endianness.  This is the most portable way to generate */
++/* and read messages to a network or serial device.  Each member of a */
++/* packet structure must be handled separately. */
++
++/* Non-optimized but portable macros */
++#define be16atoh(x)     ((uint16_t)(((x)[0]<<8)|(x)[1]))
++#define be32atoh(x)     ((uint32_t)(((x)[0]<<24)|((x)[1]<<16)|((x)[2]<<8)|(x)[3]))
++#define be64atoh(x)     ((uint64_t)(((x)[0]<<56)|((x)[1]<<48)|((x)[2]<<40)| \\
++        ((x)[3]<<32)|((x)[4]<<24)|((x)[5]<<16)|((x)[6]<<8)|(x)[7]))
++#define le16atoh(x)     ((uint16_t)(((x)[1]<<8)|(x)[0]))
++#define le32atoh(x)     ((uint32_t)(((x)[3]<<24)|((x)[2]<<16)|((x)[1]<<8)|(x)[0]))
++#define le64atoh(x)     ((uint64_t)(((x)[7]<<56)|((x)[6]<<48)|((x)[5]<<40)| \\
++        ((x)[4]<<32)|((x)[3]<<24)|((x)[2]<<16)|((x)[1]<<8)|(x)[0]))
++
++#define htobe16a(a,x)   (a)[0]=(uint8_t)((x)>>8), (a)[1]=(uint8_t)(x)
++#define htobe32a(a,x)   (a)[0]=(uint8_t)((x)>>24), (a)[1]=(uint8_t)((x)>>16), \\
++        (a)[2]=(uint8_t)((x)>>8), (a)[3]=(uint8_t)(x)
++#define htobe64a(a,x)   (a)[0]=(uint8_t)((x)>>56), (a)[1]=(uint8_t)((x)>>48), \\
++        (a)[2]=(uint8_t)((x)>>40), (a)[3]=(uint8_t)((x)>>32), \\
++        (a)[4]=(uint8_t)((x)>>24), (a)[5]=(uint8_t)((x)>>16), \\
++        (a)[6]=(uint8_t)((x)>>8), (a)[7]=(uint8_t)(x)
++#define htole16a(a,x)   (a)[1]=(uint8_t)((x)>>8), (a)[0]=(uint8_t)(x)
++#define htole32a(a,x)   (a)[3]=(uint8_t)((x)>>24), (a)[2]=(uint8_t)((x)>>16), \\
++        (a)[1]=(uint8_t)((x)>>8), (a)[0]=(uint8_t)(x)
++#define htole64a(a,x)   (a)[7]=(uint8_t)((x)>>56), (a)[6]=(uint8_t)((x)>>48), \\
++        (a)[5]=(uint8_t)((x)>>40), (a)[4]=(uint8_t)((x)>>32), \\
++        (a)[3]=(uint8_t)((x)>>24), (a)[2]=(uint8_t)((x)>>16), \\
++        (a)[1]=(uint8_t)((x)>>8), (a)[0]=(uint8_t)(x)
++
++EOF
++  ;;
++esac
++]
++
++cat >> "$1" << EOF
++#endif /*__BYTEORDER_H*/
++EOF])
+diff -Nur sane-backends-1.0.19/m4.ne/stdint.m4 sane-backends-1.0.19/m4/stdint.m4
+--- sane-backends-1.0.19/m4.ne/stdint.m4	1970-01-01 01:00:00.000000000 +0100
++++ sane-backends-1.0.19/m4/stdint.m4	2008-05-30 18:54:17.627166176 +0200
+@@ -0,0 +1,734 @@
++dnl AC_NEED_STDINT_H ( HEADER-TO-GENERATE )
++dnl Copyright 2001-2002 by Dan Fandrich <dan at coneharvesters.com>
++dnl This file may be copied and used freely without restrictions.  No warranty
++dnl is expressed or implied.
++dnl
++dnl Look for a header file that defines size-specific integer types like the
++dnl ones recommended to be in stdint.h in the C99 standard (e.g. uint32_t).
++dnl This is a dumbed-down version of the macro of the same name in the file
++dnl ac_need_stdint_h.m4 which is part of the ac-archive, available at
++dnl <URL:http://ac-archive.sourceforge.net/> (also, another macro
++dnl AC_CREATE_STDINT_H by the same author).  This version is not as smart,
++dnl but works on older autoconf versions and has a different license.
++
++dnl AX_CHECK_DEFINED_TYPE ( TYPE, FILE, ACTION-IF-FOUND, ACTION-IF-NOT-FOUND )
++dnl This is similar to _AC_CHECK_TYPE_NEW (a.k.a. new syntax version of
++dnl AC_CHECK_TYPE) in autoconf 2.50 but works on older versions
++AC_DEFUN([AX_CHECK_DEFINED_TYPE],
++[AC_MSG_CHECKING([for $1 in $2])
++AC_EGREP_CPP(changequote(<<,>>)dnl
++<<(^|[^a-zA-Z_0-9])$1[^a-zA-Z_0-9]>>dnl
++changequote([,]), [#include <$2>],
++ac_cv_type_$1=yes, ac_cv_type_$1=no)dnl
++AC_MSG_RESULT($ac_cv_type_$1)
++if test $ac_cv_type_$1 = yes; then
++  $3
++else
++  $4
++fi
++])
++
++dnl Look for a header file that defines size-specific integer types
++AC_DEFUN([AX_NEED_STDINT_H],
++[
++changequote(, )dnl
++ac_dir=`echo "$1"|sed 's%/[^/][^/]*$%%'`
++changequote([, ])dnl
++if test "$ac_dir" != "$1" && test "$ac_dir" != .; then
++  # The file is in a subdirectory.
++  test ! -d "$ac_dir" && mkdir "$ac_dir"
++fi
++
++AX_CHECK_DEFINED_TYPE(uint8_t,
++stdint.h,
++[
++cat > "$1" <<EOF
++/* This file is generated automatically by configure */
++#include <stdint.h>
++EOF],
++[AX_CHECK_DEFINED_TYPE(uint8_t,
++inttypes.h,
++[cat > "$1" <<EOF
++/* This file is generated automatically by configure */
++#include <inttypes.h>
++EOF],
++[AX_CHECK_DEFINED_TYPE(uint8_t,
++sys/types.h,
++[cat > "$1" <<EOF
++/* This file is generated automatically by configure */
++#include <sys/types.h>
++EOF],
++[AX_CHECK_DEFINED_TYPE(u_int8_t,
++sys/types.h,
++[cat > "$1" <<EOF
++/* This file is generated automatically by configure */
++#ifndef __STDINT_H
++#define __STDINT_H
++#include <sys/types.h>
++typedef u_int8_t uint8_t;
++typedef u_int16_t uint16_t;
++typedef u_int32_t uint32_t;
++EOF
++
++AX_CHECK_DEFINED_TYPE(u_int64_t,
++sys/types.h,
++[cat >> "$1" <<EOF
++typedef u_int64_t uint64_t;
++#endif /*!__STDINT_H*/
++EOF],
++[cat >> "$1" <<EOF
++/* 64-bit types are not available on this system */
++/* typedef u_int64_t uint64_t; */
++#endif /*!__STDINT_H*/
++EOF])
++
++],
++[AC_MSG_WARN([I can't find size-specific integer definitions on this system])
++if test -e "$1" ; then
++	rm -f "$1"
++fi
++])])])])dnl
++])
++
++AC_DEFUN([AX_CHECK_DATA_MODEL],[
++   AC_CHECK_SIZEOF(char)
++   AC_CHECK_SIZEOF(short)
++   AC_CHECK_SIZEOF(int)
++   AC_CHECK_SIZEOF(long)
++   AC_CHECK_SIZEOF(void*)
++   ac_cv_char_data_model=""
++   ac_cv_char_data_model="$ac_cv_char_data_model$ac_cv_sizeof_char"
++   ac_cv_char_data_model="$ac_cv_char_data_model$ac_cv_sizeof_short"
++   ac_cv_char_data_model="$ac_cv_char_data_model$ac_cv_sizeof_int"
++   ac_cv_long_data_model=""
++   ac_cv_long_data_model="$ac_cv_long_data_model$ac_cv_sizeof_int"
++   ac_cv_long_data_model="$ac_cv_long_data_model$ac_cv_sizeof_long"
++   ac_cv_long_data_model="$ac_cv_long_data_model$ac_cv_sizeof_voidp"
++   AC_MSG_CHECKING([data model])
++   case "$ac_cv_char_data_model/$ac_cv_long_data_model" in
++    122/242)     ac_cv_data_model="IP16"  ; n="standard 16bit machine" ;;
++    122/244)     ac_cv_data_model="LP32"  ; n="standard 32bit machine" ;;
++    122/*)       ac_cv_data_model="i16"   ; n="unusual int16 model" ;;
++    124/444)     ac_cv_data_model="ILP32" ; n="standard 32bit unixish" ;;
++    124/488)     ac_cv_data_model="LP64"  ; n="standard 64bit unixish" ;;
++    124/448)     ac_cv_data_model="LLP64" ; n="unusual 64bit unixish" ;;
++    124/*)       ac_cv_data_model="i32"   ; n="unusual int32 model" ;;
++    128/888)     ac_cv_data_model="ILP64" ; n="unusual 64bit numeric" ;;
++    128/*)       ac_cv_data_model="i64"   ; n="unusual int64 model" ;;
++    222/*2)      ac_cv_data_model="DSP16" ; n="strict 16bit dsptype" ;;
++    333/*3)      ac_cv_data_model="DSP24" ; n="strict 24bit dsptype" ;;
++    444/*4)      ac_cv_data_model="DSP32" ; n="strict 32bit dsptype" ;;
++    666/*6)      ac_cv_data_model="DSP48" ; n="strict 48bit dsptype" ;;
++    888/*8)      ac_cv_data_model="DSP64" ; n="strict 64bit dsptype" ;;
++    222/*|333/*|444/*|666/*|888/*) :
++                 ac_cv_data_model="iDSP"  ; n="unusual dsptype" ;;
++     *)          ac_cv_data_model="none"  ; n="very unusual model" ;;
++   esac
++   AC_MSG_RESULT([$ac_cv_data_model ($ac_cv_long_data_model, $n)])
++])
++
++dnl AX_CHECK_HEADER_STDINT_X([HEADERLIST][,ACTION-IF])
++AC_DEFUN([AX_CHECK_HEADER_STDINT_X],[
++AC_CACHE_CHECK([for stdint uintptr_t], [ac_cv_header_stdint_x],[
++ ac_cv_header_stdint_x="" # the 1997 typedefs (inttypes.h)
++  AC_MSG_RESULT([(..)])
++  for i in m4_ifval([$1],[$1],[stdint.h inttypes.h sys/inttypes.h]) ; do
++   unset ac_cv_type_uintptr_t
++   unset ac_cv_type_uint64_t
++   AC_CHECK_TYPE(uintptr_t,[ac_cv_header_stdint_x=$i],continue,[#include <$i>])
++   AC_CHECK_TYPE(uint64_t,[and64="/uint64_t"],[and64=""],[#include<$i>])
++   m4_ifvaln([$1],[$1]) break
++  done
++  AC_MSG_CHECKING([for stdint uintptr_t])
++ ])
++])
++
++AC_DEFUN([AX_CHECK_HEADER_STDINT_O],[
++AC_CACHE_CHECK([for stdint uint32_t], [ac_cv_header_stdint_o],[
++ ac_cv_header_stdint_o="" # the 1995 typedefs (sys/inttypes.h)
++  AC_MSG_RESULT([(..)])
++  for i in m4_ifval([$1],[$1],[inttypes.h sys/inttypes.h stdint.h]) ; do
++   unset ac_cv_type_uint32_t
++   unset ac_cv_type_uint64_t
++   AC_CHECK_TYPE(uint32_t,[ac_cv_header_stdint_o=$i],continue,[#include <$i>])
++   AC_CHECK_TYPE(uint64_t,[and64="/uint64_t"],[and64=""],[#include<$i>])
++   m4_ifvaln([$1],[$1]) break
++   break;
++  done
++  AC_MSG_CHECKING([for stdint uint32_t])
++ ])
++])
++
++AC_DEFUN([AX_CHECK_HEADER_STDINT_U],[
++AC_CACHE_CHECK([for stdint u_int32_t], [ac_cv_header_stdint_u],[
++ ac_cv_header_stdint_u="" # the BSD typedefs (sys/types.h)
++  AC_MSG_RESULT([(..)])
++  for i in m4_ifval([$1],[$1],[sys/types.h inttypes.h sys/inttypes.h]) ; do
++   unset ac_cv_type_u_int32_t
++   unset ac_cv_type_u_int64_t
++   AC_CHECK_TYPE(u_int32_t,[ac_cv_header_stdint_u=$i],continue,[#include <$i>])
++   AC_CHECK_TYPE(u_int64_t,[and64="/u_int64_t"],[and64=""],[#include<$i>])
++   m4_ifvaln([$1],[$1]) break
++   break;
++  done
++  AC_MSG_CHECKING([for stdint u_int32_t])
++ ])
++])
++
++AC_DEFUN([AX_CREATE_STDINT_H],
++[# ------ AX CREATE STDINT H -------------------------------------
++AC_MSG_CHECKING([for stdint types])
++ac_stdint_h=`echo ifelse($1, , _stdint.h, $1)`
++# try to shortcircuit - if the default include path of the compiler
++# can find a "stdint.h" header then we assume that all compilers can.
++AC_CACHE_VAL([ac_cv_header_stdint_t],[
++old_CXXFLAGS="$CXXFLAGS" ; CXXFLAGS=""
++old_CPPFLAGS="$CPPFLAGS" ; CPPFLAGS=""
++old_CFLAGS="$CFLAGS"     ; CFLAGS=""
++AC_TRY_COMPILE([#include <stdint.h>],[int_least32_t v = 0;],
++[ac_cv_stdint_result="(assuming C99 compatible system)"
++ ac_cv_header_stdint_t="stdint.h"; ],
++[ac_cv_header_stdint_t=""])
++CXXFLAGS="$old_CXXFLAGS"
++CPPFLAGS="$old_CPPFLAGS"
++CFLAGS="$old_CFLAGS" ])
++
++v="... $ac_cv_header_stdint_h"
++if test "$ac_stdint_h" = "stdint.h" ; then
++ AC_MSG_RESULT([(are you sure you want them in ./stdint.h?)])
++elif test "$ac_stdint_h" = "inttypes.h" ; then
++ AC_MSG_RESULT([(are you sure you want them in ./inttypes.h?)])
++elif test "_$ac_cv_header_stdint_t" = "_" ; then
++ AC_MSG_RESULT([(putting them into $ac_stdint_h)$v])
++else
++ ac_cv_header_stdint="$ac_cv_header_stdint_t"
++ AC_MSG_RESULT([$ac_cv_header_stdint (shortcircuit)])
++fi
++
++if test "_$ac_cv_header_stdint_t" = "_" ; then # can not shortcircuit..
++
++dnl .....intro message done, now do a few system checks.....
++dnl btw, all old CHECK_TYPE macros do automatically "DEFINE" a type,
++dnl therefore we use the autoconf implementation detail CHECK_TYPE_NEW
++dnl instead that is triggered with 3 or more arguments (see types.m4)
++
++inttype_headers=`echo $2 | sed -e 's/,/ /g'`
++
++ac_cv_stdint_result="(no helpful system typedefs seen)"
++AX_CHECK_HEADER_STDINT_X(dnl
++   stdint.h inttypes.h sys/inttypes.h $inttype_headers,
++   ac_cv_stdint_result="(seen uintptr_t$and64 in $i)")
++
++if test "_$ac_cv_header_stdint_x" = "_" ; then
++AX_CHECK_HEADER_STDINT_O(dnl,
++   inttypes.h sys/inttypes.h stdint.h $inttype_headers,
++   ac_cv_stdint_result="(seen uint32_t$and64 in $i)")
++fi
++
++if test "_$ac_cv_header_stdint_x" = "_" ; then
++if test "_$ac_cv_header_stdint_o" = "_" ; then
<<Diff was trimmed, longer than 597 lines>>


More information about the pld-cvs-commit mailing list