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
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
|
], [
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
# if __has_attribute(objc_root_class)
__attribute__((__objc_root_class__))
# endif
#endif
@interface Foo
{
void *foo;
}
@end
@interface Bar: Foo
@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*)
|
<
<
|
<
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
<
>
|
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
|
], [
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
# if __has_attribute(objc_root_class)
__attribute__((__objc_root_class__))
# endif
#endif
@interface Foo
{
void *foo;
}
@end
@interface Bar: Foo
@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*)
|