ObjFW  Check-in [975fa1d8f3]

Overview
Comment:configure.ac: Fix AC_CHECK_HEADER(S) confusion
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 975fa1d8f3d79e47c5f059134f7d2a48a05a90d96c55ec07704a15ac49df1632
User & Date: js on 2015-08-22 11:56:12
Other Links: manifest | tags
Context
2015-08-22
12:10
Increase library major version check-in: 5a7d40aced user: js tags: trunk
11:56
configure.ac: Fix AC_CHECK_HEADER(S) confusion check-in: 975fa1d8f3 user: js tags: trunk
11:38
utils/ofhttp: Add includes required on Solaris check-in: ee6fb4df7f user: js tags: trunk
Changes

Modified configure.ac from [56a0b6e652] to [08109c93e0].

514
515
516
517
518
519
520
521

522
523
524
525
526
527
528
514
515
516
517
518
519
520

521
522
523
524
525
526
527
528







-
+







])
test x"$have_asprintf" != x"yes" -a x"$ac_cv_snprintf_useful_ret" != x"yes" && \
	AC_MSG_ERROR(No asprintf and no snprintf returning required space!)

AC_CHECK_FUNCS([arc4random random], break)

AC_CHECK_LIB(dl, dlopen, LIBS="$LIBS -ldl")
AC_CHECK_HEADERS(dlfcn.h)
AC_CHECK_HEADERS_ONCE(dlfcn.h)
case "$host_os" in
	netbsd*)
		dnl dladdr exists on NetBSD, but it is completely broken.
		dnl When using it with code that uses __thread, it freezes the
		dnl process so that it has to be killed using SIGKILL.
		dnl When disabling __thread, it doesn't freeze, but all symbols
		dnl are wrong.
591
592
593
594
595
596
597
598

599
600
601
602
603
604
605
591
592
593
594
595
596
597

598
599
600
601
602
603
604
605







-
+







	AC_DEFINE(OF_HAVE_THREADS, 1, [Whether we have threads])
	AC_SUBST(USE_SRCS_THREADS, '${SRCS_THREADS}')

	AC_ARG_ENABLE(compiler-tls,
		AS_HELP_STRING([--disable-compiler-tls],
			[disable compiler thread local storage]))
	AS_IF([test x"$enable_compiler_tls" != x"no"], [
		AC_CHECK_HEADERS(threads.h, [
		AC_CHECK_HEADER(threads.h, [
			AC_DEFINE(OF_HAVE_THREADS_H, 1,
				[Whether we have threads.h])
		])

		AC_MSG_CHECKING(whether _Thread_local works)
		AC_TRY_LINK([
			static _Thread_local int x = 0;
763
764
765
766
767
768
769
770

771
772
773
774

775
776
777
778
779
780
781
763
764
765
766
767
768
769

770
771
772
773

774
775
776
777
778
779
780
781







-
+



-
+







	AC_CHECK_LIB(network, socket, LIBS="$LIBS -lnetwork")
	AC_CHECK_LIB(ws2_32, main, LIBS="$LIBS -lws2_32")

	AC_CHECK_HEADER(sys/socket.h, [
		AC_DEFINE(OF_HAVE_SYS_SOCKET_H, 1,
			[Whether we have sys/socket.h])
	])
	AC_CHECK_HEADERS(netinet/in.h, [
	AC_CHECK_HEADER(netinet/in.h, [
		AC_DEFINE(OF_HAVE_NETINET_IN_H, 1,
			[Whether we have netinet/in.h])
	])
	AC_CHECK_HEADERS(netinet/tcp.h, [
	AC_CHECK_HEADER(netinet/tcp.h, [
		AC_DEFINE(OF_HAVE_NETINET_TCP_H, 1,
			[Whether we have netinet/tcp.h])
	])
	AC_CHECK_HEADERS([arpa/inet.h netdb.h])

	AC_CHECK_FUNCS([paccept accept4])

960
961
962
963
964
965
966
967

968
969
970
971
972
973
974
960
961
962
963
964
965
966

967
968
969
970
971
972
973
974







-
+







		;;
esac
AS_IF([test x"$have_processes" = x"yes"], [
	AC_SUBST(OFPROCESS_M, "OFProcess.m")
	AC_DEFINE(OF_HAVE_PROCESSES, 1, [Whether we have processes])
])

AC_CHECK_HEADERS([sys/ioctl.h sys/termios.h])
AC_CHECK_HEADERS_ONCE([sys/ioctl.h sys/termios.h])

AS_IF([test x"$objc_runtime" = x"Apple runtime"], [
	AC_CHECK_HEADER(Foundation/NSObject.h, [
		AC_SUBST(FOUNDATION_COMPAT_M, "foundation-compat.m")
		AC_SUBST(BRIDGE, "bridge")

		AS_IF([test x"$enable_shared" != x"no"], [