ObjFW  Check-in [8897d12b45]

Overview
Comment:configure: Check for INFINITY

If it is missing, check for __builtin_inf() and define it to that.
Otherwise, fail loudly.

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 8897d12b4549cf6e1bd4e2654fade5bf90665e4e03c6cc7ce6eb53e203e5eb1a
User & Date: js on 2018-03-10 19:57:14
Other Links: manifest | tags
Context
2018-03-10
20:19
OFCountedSet: Improve deserialization check-in: 43a93d8a16 user: js tags: trunk
19:57
configure: Check for INFINITY check-in: 8897d12b45 user: js tags: trunk
19:43
socket.h: Provide sockaddr_storage on AmigaOS 4 check-in: 3924c79b73 user: js tags: trunk
Changes

Modified configure.ac from [7d12a01c47] to [96c544111a].

609
610
611
612
613
614
615



























616
617
618
619
620
621
622
], [
	fp_endianess="universal"
])
AC_MSG_RESULT($fp_endianess)
AS_IF([test x"$fp_endianess" = x"unknown"], [
	AC_MSG_ERROR(
		[Floating point implementation does not conform to IEEE 754!])])




























case "$host_cpu" in
	arm* | earm*)
		AC_MSG_CHECKING(if VFP2 or above is available)
		AC_TRY_COMPILE([], [
			#if !defined(__arm64__) && !defined(__aarch64__) && \
			    !defined(__ARM64_ARCH_8__)







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
], [
	fp_endianess="universal"
])
AC_MSG_RESULT($fp_endianess)
AS_IF([test x"$fp_endianess" = x"unknown"], [
	AC_MSG_ERROR(
		[Floating point implementation does not conform to IEEE 754!])])

AC_MSG_CHECKING(for INFINITY)
AC_TRY_COMPILE([
	#include <stdio.h>
	#include <math.h>
], [
	printf("%f", INFINITY);
], [
	AC_MSG_RESULT(yes)
], [
	AC_MSG_RESULT(no)

	AC_MSG_CHECKING(for __builtin_inf)
	AC_TRY_COMPILE([
		#include <stdio.h>
	], [
		printf("%f", __builtin_inf());
	], [
		AC_MSG_RESULT(yes)
		AC_DEFINE(INFINITY, [(__builtin_inf())],
			[Workaround for missing INFINITY])
	], [
		AC_MSG_RESULT(no)

		AC_MSG_ERROR([Neither INFINITY or __builtin_inf was found!])
	])
])

case "$host_cpu" in
	arm* | earm*)
		AC_MSG_CHECKING(if VFP2 or above is available)
		AC_TRY_COMPILE([], [
			#if !defined(__arm64__) && !defined(__aarch64__) && \
			    !defined(__ARM64_ARCH_8__)