forked from pspdev/pspsdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
139 lines (124 loc) · 4.27 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.69)
AC_INIT([PSP Software Development Kit], m4_esyscmd_s([cat VERSION]),
[https://github.com/pspdev/pspsdk/issues], [pspsdk],
[https://pspdev.github.io/pspsdk])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([tools/bin2c.c])
AC_CONFIG_HEADERS([config.h])
AC_PSPDEV_PATH
AM_INIT_AUTOMAKE([1.14 foreign])
AM_SILENT_RULES([yes])
# Checks for programs.
AC_PSPDEV_TOOLCHAIN
AC_PROG_CC
# These will actually be overridden by the psp-specific counterparts. They are
# here mainly to shut automake up.
AC_PROG_CXX
AM_PROG_AS
AC_PROG_RANLIB
# Checks for libraries.
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([fcntl.h malloc.h stdlib.h string.h unistd.h zlib.h])
AC_CHECK_LIB([z], [compress])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_BIGENDIAN
AC_ARG_WITH(gprofflags, [ --with-gprofflags build with gprof flag included], [], [--with_gprofflags=no])
AC_ARG_WITH(pthread, [ --with-pthread build with pthread support], [], [with_pthread=yes])
# Checks for library functions.
AC_FUNC_MEMCMP
AC_CHECK_FUNCS([getcwd strchr])
# Doxygen.
DX_HTML_FEATURE(ON)
DX_DOT_FEATURE(ON)
DX_CHM_FEATURE(OFF)
DX_CHI_FEATURE(OFF)
DX_MAN_FEATURE(OFF)
DX_RTF_FEATURE(OFF)
DX_XML_FEATURE(OFF)
DX_PDF_FEATURE(OFF)
DX_PS_FEATURE(OFF)
DX_INIT_DOXYGEN(PSPSDK, Doxyfile, doc)
# Override the default prefix to point to where the pspdev tools should be installed.
# The binaries will end up in $prefix/bin, but pspsdk itself will end up in $prefix/$target/sdk.
# TODO: We should see if the user will ever want to override this.
prefix="$pspdev"
psp_targetdir="psp"
# Create the pspsdk installation paths.
pspsdk_topdir="$psp_targetdir/sdk"
pspsdk="$prefix/$pspsdk_topdir"
pspsdk_includedir="$pspsdk/include"
pspsdk_libdir="$pspsdk/lib"
PSPSDK="$pspsdk"
PSPSDK_INCLUDEDIR="$pspsdk_includedir"
PSPSDK_LIBDIR="$pspsdk_libdir"
AC_DEFINE_UNQUOTED(PSPSDK_TOPDIR, ["$pspsdk_topdir"],
[Toplevel directory where PSPSDK will be installed, relative to $prefix])
AC_SUBST(PSPSDK)
AC_SUBST(PSPSDK_INCLUDEDIR)
AC_SUBST(PSPSDK_LIBDIR)
# CFLAGS and CXXFLAGS used to build pspsdk libraries.
PSPSDK_CFLAGS="$CFLAGS -mno-gpopt -Wall -Werror -D_PSP_FW_VERSION=600"
if test "$with_gprofflags" = yes ; then
PSPSDK_CFLAGS="$PSPSDK_CFLAGS -pg -g"
fi
PSPSDK_CXXFLAGS="$PSPSDK_CFLAGS -fno-exceptions -fno-rtti"
if test "$with_pthread" = no ; then
PSPSDK_CFLAGS="$PSPSDK_CFLAGS -DPSP_WITHOUT_PTHREAD"
fi
AC_SUBST(PSPSDK_CFLAGS)
AC_SUBST(PSPSDK_CXXFLAGS)
# Turn on all warnings (for host programs).
if test x$ac_compiler_gnu = xyes; then
CFLAGS="$CFLAGS $CFLAGS_FOR_HOST -Wall"
fi
AC_SUBST(CFLAGS)
AC_SUBST(LDFLAGS)
AC_CONFIG_FILES([Makefile
src/Makefile
src/atrac3/Makefile
src/audio/Makefile
src/base/Makefile
src/base/linkfile.prx
src/ctrl/Makefile
src/debug/Makefile
src/display/Makefile
src/dmac/Makefile
src/fpu/Makefile
src/ge/Makefile
src/gu/Makefile
src/gum/Makefile
src/hprm/Makefile
src/kernel/Makefile
src/libcglue/Makefile
src/libpthreadglue/Makefile
src/modinfo/Makefile
src/mp3/Makefile
src/mpeg/Makefile
src/nand/Makefile
src/net/Makefile
src/openpsid/Makefile
src/power/Makefile
src/prof/Makefile
src/registry/Makefile
src/rtc/Makefile
src/sircs/Makefile
src/sdk/Makefile
src/startup/Makefile
src/umd/Makefile
src/usb/Makefile
src/usbstor/Makefile
src/user/Makefile
src/utility/Makefile
src/vaudio/Makefile
src/vfpu/Makefile
src/video/Makefile
src/vsh/Makefile
src/wlan/Makefile
src/samples/Makefile
tools/Makefile
tools/PrxEncrypter/Makefile])
AC_OUTPUT