?RCS: $Id$
?RCS:
?RCS: Copyright (c) 2023 TAKAI Kousuke + H.Merijn Brand
?RCS:
?RCS: You may distribute under the terms of either the GNU General Public
?RCS: License or the Artistic License, as specified in the README file.
?RCS:
?MAKE:i32dformat u32XUformat u32oformat u32uformat u32xformat: \
	i32type echo
?MAKE:	-pick add $@ %<
?S:i32dformat:
?S:	This variable contains the format string used for printing
?S:	a Perl I32 as a signed decimal integer.
?S:.
?S:u32oformat:
?S:	This variable contains the format string used for printing
?S:	a Perl U32 as an unsigned octal integer.
?S:.
?S:u32uformat:
?S:	This variable contains the format string used for printing
?S:	a Perl U32 as an unsigned decimal integer.
?S:.
?S:u32xformat:
?S:	This variable contains the format string used for printing
?S:	a Perl U32 as an unsigned hexadecimal integer in lowercase abcdef.
?S:.
?S:u32XUformat:
?S:	This variable contains the format string used for printing
?S:	a Perl U32 as an unsigned hexadecimal integer in uppercase ABCDEF.
?S:.
?C:I32df:
?C:	This symbol defines the format string used for printing a Perl I32
?C:	as a signed decimal integer.
?C:.
?C:U32uf:
?C:	This symbol defines the format string used for printing a Perl U32
?C:	as an unsigned decimal integer.
?C:.
?C:U32of:
?C:	This symbol defines the format string used for printing a Perl U32
?C:	as an unsigned octal integer.
?C:.
?C:U32xf:
?C:	This symbol defines the format string used for printing a Perl U32
?C:	as an unsigned hexadecimal integer in lowercase abcdef.
?C:.
?C:U32Xf:
?C:	This symbol defines the format string used for printing a Perl U32
?C:	as an unsigned hexadecimal integer in uppercase ABCDEF.
?C:.
?H:#define	I32df		$i32dformat		/**/
?H:#define	U32of		$u32oformat		/**/
?H:#define	U32uf		$u32uformat		/**/
?H:#define	U32xf		$u32xformat		/**/
?H:#define	U32Xf		$u32XUformat		/**/
?H:.
: Check format strings for internal 32bit types
echo " "
$echo "Checking the format strings to be used for Perl's internal 32bit-types..." >&4

case "$i32dformat" in
'')	case "$i32type" in
	int)
		i32dformat='"d"'
		u32uformat='"u"'
		u32oformat='"o"'
		u32xformat='"x"'
		u32XUformat='"X"'
		;;
	long)
		i32dformat='"ld"'
		u32uformat='"lu"'
		u32oformat='"lo"'
		u32xformat='"lx"'
		u32XUformat='"lX"'
		;;
	int_least32_t)		: will not happen currently
		i32dformat=PRIdLEAST32
		u32uformat=PRIuLEAST32
		u32oformat=PRIoLEAST32
		u32xformat=PRIxLEAST32
		u32XUformat=PRIXLEAST32
		;;
	int32_t)
		i32dformat=PRId32
		u32uformat=PRIu32
		u32oformat=PRIo32
		u32xformat=PRIx32
		u32XUformat=PRIX32
		;;
	esac ;;
esac

case "$i32dformat" in
'') echo "$0: Fatal: failed to find format strings for 32-bit integers, cannot continue." >&4
    exit 1
    ;;
esac

