-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathconfigure.ac
63 lines (42 loc) · 1.34 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
AC_INIT([Corbenik], [0.3.1], [https://github.com/chaoskagami/corbenik],
[corbenik])
export CONFIGURE_OPTIONS="$@"
AM_INIT_AUTOMAKE([foreign no-dist-gzip dist-xz subdir-objects])
# Find AR and RANLIB for lto support before initializing libtool
AC_CHECK_TOOL([AR],gcc-ar)
AC_CHECK_TOOL([RANLIB],gcc-ranlib)
AC_PROG_SED
AC_PROG_CC
AC_PROG_CXX
AM_PROG_AS
AC_CHECK_TOOL([OBJCOPY],objcopy)
LT_INIT
AC_ARG_ENABLE([chainloader],
AS_HELP_STRING([--disable-chainloader], [Disable chainloading of external programs]))
AC_PREFIX_DEFAULT([/corbenik])
CHAINLOADER=1
test "$enable_chainloader" = "no" && CHAINLOADER=0
AC_DEFINE_UNQUOTED([CHAINLOADER], [$CHAINLOADER])
COMPILER_ID="$($CC --version | head -n1)"
AC_DEFINE_UNQUOTED([COMPILER_ID], [$COMPILER_ID])
AC_DEFINE_UNQUOTED([CONFIGURE_OPTIONS], [$CONFIGURE_OPTIONS])
AC_CONFIG_FILES([Makefile boot/Makefile external/Makefile include/Makefile])
AC_CONFIG_SUBDIRS([external/libctr9])
AC_OUTPUT
echo "
Corbenik $VERSION
========================
Prefix: ${prefix}
cc: ${CC}
cxx: ${CXX}
ld: ${LD}
oc: ${OBJCOPY}
sed: ${SED}
cflags: ${CFLAGS}
cxxflags: ${CXXFLAGS}
ldflags: ${LDFLAGS}
ocflags: ${OCFLAGS}
Chainloader: ${CHAINLOADER}
Configure: ${CONFIGURE_OPTIONS}
Compiler ID: ${COMPILER_ID}
"