9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
AC_PROG_LN_S
AC_PROG_INSTALL
AC_PROG_EGREP
CPP="$OBJCPP"
CPPFLAGS="$CPPFLAGS $OBJCPPFLAGS"
OBJCFLAGS="$OBJCFLAGS -Wall -fexceptions -fobjc-exceptions"
OBJCFLAGS="$OBJCFLAGS -fconstant-string-class=OFConstString"
AX_CHECK_COMPILER_FLAGS(-pipe, [OBJCFLAGS="$OBJCFLAGS -pipe"])
AX_CHECK_COMPILER_FLAGS(-fno-common, [OBJCFLAGS="$OBJCFLAGS -fno-common"])
AX_CHECK_COMPILER_FLAGS(-fno-constant-cfstrings, [
NO_CONST_CFSTRINGS="-fno-constant-cfstrings"
OBJCFLAGS="$OBJCFLAGS -fno-constant-cfstrings"])
AC_SUBST(NO_CONST_CFSTRINGS)
|
|
|
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
AC_PROG_LN_S
AC_PROG_INSTALL
AC_PROG_EGREP
CPP="$OBJCPP"
CPPFLAGS="$CPPFLAGS $OBJCPPFLAGS"
OBJCFLAGS="$OBJCFLAGS -Wall -fexceptions -fobjc-exceptions"
OBJCFLAGS="$OBJCFLAGS -fconstant-string-class=OFConstantString"
AX_CHECK_COMPILER_FLAGS(-pipe, [OBJCFLAGS="$OBJCFLAGS -pipe"])
AX_CHECK_COMPILER_FLAGS(-fno-common, [OBJCFLAGS="$OBJCFLAGS -fno-common"])
AX_CHECK_COMPILER_FLAGS(-fno-constant-cfstrings, [
NO_CONST_CFSTRINGS="-fno-constant-cfstrings"
OBJCFLAGS="$OBJCFLAGS -fno-constant-cfstrings"])
AC_SUBST(NO_CONST_CFSTRINGS)
|
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
|
if test x"$GOBJC" = x"yes"; then
OBJCFLAGS="$OBJCFLAGS -Werror"
AC_MSG_CHECKING(whether gcc has bug objc/27438)
AC_TRY_COMPILE([
#import <objc/objc.h>
@interface OFConstString
{
Class isa;
const char *string;
unsigned long size;
}
@end
void *_OFConstStringClassReference;
], [
OFConstString *test = @"";
test++; /* Get rid of unused variable warning */
], [AC_MSG_RESULT(no)], [
AC_MSG_RESULT([yes, adding -Wno-unused-variable])
OBJCFLAGS="$OBJCFLAGS -Wno-unused-variable"
AC_SUBST(NO_WARN_UNUSED, "-Wno-unused-variable")])
AC_MSG_CHECKING(whether we need -Wno-strict-aliasing due to gcc bugs)
|
|
|
|
|
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
|
if test x"$GOBJC" = x"yes"; then
OBJCFLAGS="$OBJCFLAGS -Werror"
AC_MSG_CHECKING(whether gcc has bug objc/27438)
AC_TRY_COMPILE([
#import <objc/objc.h>
@interface OFConstantString
{
Class isa;
const char *string;
unsigned long size;
}
@end
void *_OFConstantStringClassReference;
], [
OFConstantString *test = @"";
test++; /* Get rid of unused variable warning */
], [AC_MSG_RESULT(no)], [
AC_MSG_RESULT([yes, adding -Wno-unused-variable])
OBJCFLAGS="$OBJCFLAGS -Wno-unused-variable"
AC_SUBST(NO_WARN_UNUSED, "-Wno-unused-variable")])
AC_MSG_CHECKING(whether we need -Wno-strict-aliasing due to gcc bugs)
|