ObjFW  Check-in [8f6ef2c686]

Overview
Comment:Don't check for -pedantic for Nintendo DS
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | 0.8
Files: files | file ages | folders
SHA3-256: 8f6ef2c686e5721d179c17a6de6cd1b4cfb9a8ec213e2c96f6994081f6b07138
User & Date: js on 2015-10-03 14:24:20
Other Links: branch diff | manifest | tags
Context
2015-10-03
14:24
Add missing include for Nintendo DS check-in: da601d2a8a user: js tags: 0.8
14:24
Don't check for -pedantic for Nintendo DS check-in: 8f6ef2c686 user: js tags: 0.8
2015-10-01
20:39
Use _Nullable instead of __nullable check-in: edd5f57b86 user: js tags: 0.8
Changes

Modified configure.ac from [3a659041ab] to [ac8ececf1f].

1
2
3
4
5
6
7
8
9
10
11



12
13
14
15
16
17
18
AC_INIT(ObjFW, 0.8, js@webkeks.org)
BUILDSYS_INIT

AS_IF([test configure.ac -nt configure], [
	AC_MSG_ERROR([configure.ac is newer than configure! Run ./autogen.sh!])
])

AC_CONFIG_SRCDIR(src)

AC_CANONICAL_HOST




case "$host" in
	*-msdosdjgpp*)
		enable_shared="no"
		enable_threads="no"
		enable_sockets="no"
		;;
	*-psp-*)











>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
AC_INIT(ObjFW, 0.8, js@webkeks.org)
BUILDSYS_INIT

AS_IF([test configure.ac -nt configure], [
	AC_MSG_ERROR([configure.ac is newer than configure! Run ./autogen.sh!])
])

AC_CONFIG_SRCDIR(src)

AC_CANONICAL_HOST

dnl Used to disable checking for -pedantic on some platforms where it's broken
check_pedantic="yes"

case "$host" in
	*-msdosdjgpp*)
		enable_shared="no"
		enable_threads="no"
		enable_sockets="no"
		;;
	*-psp-*)
27
28
29
30
31
32
33

34
35
36
37
38
39
40
		LIBS="$LIBS -L$DEVKITPSP/psp/sdk/lib -lpspdebug -lpspdisplay"
		LIBS="$LIBS -lpspge -lpspctrl -lpspsdk -lc -lpspnet"
		LIBS="$LIBS -lpspnet_inet -lpspnet_apctl -lpspnet_resolver"
		LIBS="$LIBS -lpsputility -lpspuser -lpspkernel"
		enable_shared="no"
		enable_threads="no"	# TODO
		enable_sockets="no"	# TODO


		AC_SUBST(MAP_LDFLAGS, ['-Wl,-Map,$@.map'])
		;;
esac

AC_LANG([Objective C])
AC_PROG_OBJC([clang gcc])







>







30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
		LIBS="$LIBS -L$DEVKITPSP/psp/sdk/lib -lpspdebug -lpspdisplay"
		LIBS="$LIBS -lpspge -lpspctrl -lpspsdk -lc -lpspnet"
		LIBS="$LIBS -lpspnet_inet -lpspnet_apctl -lpspnet_resolver"
		LIBS="$LIBS -lpsputility -lpspuser -lpspkernel"
		enable_shared="no"
		enable_threads="no"	# TODO
		enable_sockets="no"	# TODO
		check_pedantic="no"

		AC_SUBST(MAP_LDFLAGS, ['-Wl,-Map,$@.map'])
		;;
esac

AC_LANG([Objective C])
AC_PROG_OBJC([clang gcc])
72
73
74
75
76
77
78

79
80
81
82
83
84
85
	OBJCFLAGS="$OBJCFLAGS -mthumb -mthumb-interwork"
	CPPFLAGS="$CPPFLAGS -DARM9 -I$DEVKITPRO/libnds/include"
	LDFLAGS="$LDFLAGS -specs=ds_arm9.specs"
	LIBS="$LIBS -L$DEVKITPRO/libnds/lib -lfilesystem -lfat -lnds9"
	enable_shared="no"
	enable_threads="no"	# TODO
	enable_sockets="no"	# TODO


	AC_DEFINE(OF_NINTENDO_DS, 1,
		[Whether we are compiling for the Nintendo DS])
	AC_SUBST(MAP_LDFLAGS, ['-Wl,-Map,$@.map'])
])

CPP="$OBJCPP"







>







76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
	OBJCFLAGS="$OBJCFLAGS -mthumb -mthumb-interwork"
	CPPFLAGS="$CPPFLAGS -DARM9 -I$DEVKITPRO/libnds/include"
	LDFLAGS="$LDFLAGS -specs=ds_arm9.specs"
	LIBS="$LIBS -L$DEVKITPRO/libnds/lib -lfilesystem -lfat -lnds9"
	enable_shared="no"
	enable_threads="no"	# TODO
	enable_sockets="no"	# TODO
	check_pedantic="no"

	AC_DEFINE(OF_NINTENDO_DS, 1,
		[Whether we are compiling for the Nintendo DS])
	AC_SUBST(MAP_LDFLAGS, ['-Wl,-Map,$@.map'])
])

CPP="$OBJCPP"
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
	], [
		AC_MSG_RESULT(yes)
	], [
		AC_MSG_RESULT(no)
		OBJCFLAGS="$old_OBJCFLAGS"
	])

	case "$host" in
		*-psp*)
			# PSP headers don't work with -pedantic
			;;
		*)
			old_OBJCFLAGS="$OBJCFLAGS"
			OBJCFLAGS="$OBJCFLAGS -pedantic"
			AC_MSG_CHECKING(whether -pedantic is buggy)
			AC_TRY_COMPILE([
				#import <stdlib.h>

				#ifdef __has_attribute







<
<
|
<
<







1082
1083
1084
1085
1086
1087
1088


1089


1090
1091
1092
1093
1094
1095
1096
	], [
		AC_MSG_RESULT(yes)
	], [
		AC_MSG_RESULT(no)
		OBJCFLAGS="$old_OBJCFLAGS"
	])



	AS_IF([test x"$check_pedantic" = x"yes"], [


			old_OBJCFLAGS="$OBJCFLAGS"
			OBJCFLAGS="$OBJCFLAGS -pedantic"
			AC_MSG_CHECKING(whether -pedantic is buggy)
			AC_TRY_COMPILE([
				#import <stdlib.h>

				#ifdef __has_attribute
1107
1108
1109
1110
1111
1112
1113
1114
1115

1116
1117
1118
1119
1120
1121
1122
				@end
			], [], [
				AC_MSG_RESULT(no)
			], [
				AC_MSG_RESULT(yes)
				OBJCFLAGS="$old_OBJCFLAGS"
			])
			;;
	esac

])

AS_IF([test x"$cross_compiling" = x"yes"], [
	AC_SUBST(BIN_PREFIX, "${host_alias}-")

	case "$host" in
		*-*-mingw*)







<
<
>







1108
1109
1110
1111
1112
1113
1114


1115
1116
1117
1118
1119
1120
1121
1122
				@end
			], [], [
				AC_MSG_RESULT(no)
			], [
				AC_MSG_RESULT(yes)
				OBJCFLAGS="$old_OBJCFLAGS"
			])


	])
])

AS_IF([test x"$cross_compiling" = x"yes"], [
	AC_SUBST(BIN_PREFIX, "${host_alias}-")

	case "$host" in
		*-*-mingw*)