ObjFW  Check-in [fdbe09e8ea]

Overview
Comment:configure: Check whether *_l need _GNU_SOURCE
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: fdbe09e8eaf909ea040f1f9e8fce01e33c31a414ccf9895bfd89442ed9252ac9
User & Date: js on 2020-04-05 11:46:49
Other Links: manifest | tags
Context
2020-04-05
13:23
configure: Check return type of strerror_r check-in: af603291de user: js tags: trunk
11:46
configure: Check whether *_l need _GNU_SOURCE check-in: fdbe09e8ea user: js tags: trunk
2020-04-01
22:36
Use case insensitive compare for URL scheme check-in: ccc1b1989d user: js tags: trunk
Changes

Modified configure.ac from [ca4bd1bcf9] to [d98714da44].

425
426
427
428
429
430
431
432
433


434
435
436
437
438
439
440
....
1231
1232
1233
1234
1235
1236
1237





























1238
1239
1240
1241
1242
1243
1244
	#include <stdlib.h>

	#if defined(__GLIBC__) || defined(__MINGW32__) || \
	    defined(__NEWLIB__) || defined(__MORPHOS__)
	egrep_cpp_yes
	#endif
], [
	CPPFLAGS="-D_GNU_SOURCE $CPPFLAGS"
	AC_MSG_RESULT(yes)


], [
	AC_MSG_RESULT(no)
])

case "$host_os" in
	solaris*)
		CPPFLAGS="-D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS $CPPFLAGS"
................................................................................
])

AC_CHECK_HEADERS(fcntl.h dirent.h)
AC_CHECK_FUNCS([sysconf gmtime_r localtime_r nanosleep fcntl])

AC_CHECK_HEADERS(xlocale.h)
AC_CHECK_FUNCS([strtod_l strtof_l asprintf_l])






























AC_CHECK_HEADERS(sys/utsname.h)
AC_CHECK_FUNCS(uname)

case "$host_os" in
	amigaos*)
		;;







<

>
>







 







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







425
426
427
428
429
430
431

432
433
434
435
436
437
438
439
440
441
....
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
	#include <stdlib.h>

	#if defined(__GLIBC__) || defined(__MINGW32__) || \
	    defined(__NEWLIB__) || defined(__MORPHOS__)
	egrep_cpp_yes
	#endif
], [

	AC_MSG_RESULT(yes)
	CPPFLAGS="-D_GNU_SOURCE $CPPFLAGS"
	gnu_source="yes"
], [
	AC_MSG_RESULT(no)
])

case "$host_os" in
	solaris*)
		CPPFLAGS="-D__EXTENSIONS__ -D_POSIX_PTHREAD_SEMANTICS $CPPFLAGS"
................................................................................
])

AC_CHECK_HEADERS(fcntl.h dirent.h)
AC_CHECK_FUNCS([sysconf gmtime_r localtime_r nanosleep fcntl])

AC_CHECK_HEADERS(xlocale.h)
AC_CHECK_FUNCS([strtod_l strtof_l asprintf_l])
AS_IF([test x"$gnu_source" != x"yes" -a \( \
    x"$ac_cv_func_strtod_l" = x"yes" -o x"$ac_cv_func_strtof_l" = x"yes" -o \
    x"$ac_cv_func_asprintf_l" = x"yes" \)], [
	AC_MSG_CHECKING(whether *_l functions need _GNU_SOURCE)
	AC_TRY_COMPILE([
		#include <stdlib.h>
		#include <stdio.h>

		#include <locale.h>
		#ifdef HAVE_XLOCALE_H
		# include <xlocale.h>
		#endif
	], [
		#ifdef HAVE_STRTOD_L
		(void)strtod_l;
		#endif
		#ifdef HAVE_STRTOF_L
		(void)strtof_l;
		#endif
		#ifdef HAVE_ASPRINTF_L
		(void)asprintf_l;
		#endif
	], [
		AC_MSG_RESULT(no)
	], [
		AC_MSG_RESULT(yes)
		CPPFLAGS="-D_GNU_SOURCE $CPPFLAGS"
	])
])

AC_CHECK_HEADERS(sys/utsname.h)
AC_CHECK_FUNCS(uname)

case "$host_os" in
	amigaos*)
		;;