ObjXMPP  Check-in [0869fda6d7]

Overview
Comment:configure: Check for buggy -Wcast-align.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 0869fda6d7d701946070a7698014e01e8201488689134c355c8897ed31c89357
User & Date: js on 2012-11-21 22:26:50
Other Links: manifest | tags
Context
2012-11-24
00:36
Make it possible to get exceptions in async mode. check-in: 2fc4d4a103 user: js tags: trunk
2012-11-21
22:26
configure: Check for buggy -Wcast-align. check-in: 0869fda6d7 user: js tags: trunk
2012-11-11
11:30
Make rosterItems a property. check-in: e69da0f2df user: js tags: trunk
Changes

Modified configure.ac from [1adb69b99d] to [b0c64c78c5].

86
87
88
89
90
91
92
93

94
95
96






















97
98
99
100
101
102
103
86
87
88
89
90
91
92

93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125







-
+



+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+







	CPPFLAGS="$CPPFLAGS $libidn_CFLAGS"
	LIBS="$LIBS $libidn_LIBS"
], [
	AC_MSG_ERROR(You need at least libidn 2.5 installed!)
])

AS_IF([test x"$GOBJC" = x"yes"], [
	OBJCFLAGS="$OBJCFLAGS -Wwrite-strings -Wcast-align -Wpointer-arith"
	OBJCFLAGS="$OBJCFLAGS -Wwrite-strings -Wpointer-arith"
	dnl We need -Wno-deprecated-declarations as OpenSSL is deprecated on
	dnl OS X.
	OBJCFLAGS="$OBJCFLAGS -Wno-deprecated-declarations -Werror"

	old_OBJCFLAGS="$OBJCFLAGS"
	OBJCFLAGS="$OBJCFLAGS -Wcast-align"
	AC_MSG_CHECKING(whether -Wcast-align is buggy)
	AC_TRY_COMPILE([
		#import <ObjFW/OFObject.h>

		@interface Foo: OFObject
		@end

		@implementation Foo
		- (void)foo
		{
		}
		@end
	], [
	], [
		AC_MSG_RESULT(no)
	], [
		AC_MSG_RESULT(yes)
		OBJCFLAGS="$old_OBJCFLAGS"
	])
])

BUILDSYS_INIT
BUILDSYS_TOUCH_DEPS

dnl We don't call AC_PROG_CPP, but only AC_PROG_OBJCPP and set CPP to OBJCPP
dnl and add OBJCPPFLAGS to CPPFLAGS, thus we need to AC_SUBST these ourself.