This repository has been archived by the owner on Nov 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
/
configure.ac
170 lines (140 loc) · 4.2 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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
AC_PREREQ([2.54])
AC_INIT([MoonAtkBridge], [1.8.93])
AM_INIT_AUTOMAKE([foreign])
# pkg-config
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
if test "x$PKG_CONFIG" = "xno"; then
AC_MSG_ERROR([You need to install pkg-config])
fi
m4_include(expansions.m4)
SHAMROCK_EXPAND_LIBDIR
SHAMROCK_EXPAND_BINDIR
SHAMROCK_EXPAND_DATADIR
AC_CHECK_TOOL(CC, gcc, gcc)
AC_PROG_CC
AC_PROG_INSTALL
AM_PROG_LIBTOOL
AC_PATH_PROG(MONO, mono, no)
if test "x$MONO" = "xno"; then
AC_MSG_ERROR([mono Not found])
fi
AC_SUBST(MONO)
AC_PATH_PROG(GMCS, gmcs, no)
if test "x$GMCS" = "xno"; then
AC_MSG_ERROR([gmcs Not found])
fi
AC_PATH_PROG(SMCS, smcs, no)
if test "x$SMCS" = "xno"; then
AC_MSG_ERROR([smcs Not found, please install moonlight])
fi
AC_PATH_PROG(MXAP, mxap, no)
if test "x$MXAP" = "xno"; then
AC_MSG_ERROR([mxap Not found, please install moonlight])
fi
AC_PATH_PROG(CC, gcc, no)
if test "x$CC" = "xno"; then
AC_MSG_ERROR([gcc Not found])
fi
AC_PATH_PROG(GACUTIL, gacutil, no)
if test "x$GACUTIL" = "xno" ; then
AC_MSG_ERROR([No gacutil tool found])
fi
AC_PATH_PROG(WGET, wget, no)
if test "x$WGET" = "xno" ; then
AC_MSG_ERROR([No wget tool found])
fi
AC_PATH_PROG(DIFF, diff, no)
if test "x$DIFF" = "xno" ; then
AC_MSG_ERROR([No diff tool found])
fi
AC_ARG_ENABLE(tests,
AC_HELP_STRING([--disable-tests],
[Do not build unit tests [default=no]]),
enable_tests=no, enable_tests=yes)
NUNIT_PATH=
PKG_CHECK_MODULES(NUNIT, mono-nunit >= 2.4, nunit_24=yes, nunit_24=no)
if test "x$nunit_24" = "xno"; then
AC_MSG_WARN([Could not find mono-nunit >= 2.4; unit tests will not be available.])
enable_tests=no
else
NUNIT_PATH=`pkg-config --variable=libdir mono-nunit`/mono/2.0/
fi
AC_SUBST(NUNIT_PATH)
AM_CONDITIONAL(ENABLE_TESTS, test "x$enable_tests" = "xyes")
dnl package checks, common for all configs
PKG_CHECK_MODULES([MONO], [mono >= 2.5])
AC_ARG_VAR(MOON_PATH, "Path to built checkout of moon")
if test "x$MOON_PATH" = "x"; then
MOON_PATH=../../moon
fi
# Convert relative path to absolute path
MOON_PATH=`(cd $MOON_PATH && pwd)`
PKG_CHECK_MODULES(CECIL, cecil)
LINKING_PATH=$MOON_PATH/class/lib/tuner
#uncomment this when we can do a proper check instead of using the monolinker.exe in lib/tuner
#AC_PATH_PROG(MONOLINKER, monolinker, no)
#if test "x$MONO" = "xno"; then
# AC_MSG_ERROR([monolinker Not found])
#fi
if [ ! test -f "$LINKING_PATH/Mono.Tuner.dll" ]
then
AC_MSG_ERROR([You need a built checkout of moon either at the same level of the uia2atk folder, or at a location specified by MOON_PATH])
fi
AC_SUBST(LINKING_PATH)
AC_PATH_PROG(ZIP, zip, no)
if test "x$ZIP" = "xno" ; then
AC_MSG_ERROR([No zip tool found])
fi
AC_ARG_ENABLE(debug,
AC_HELP_STRING([--enable-debug],
[Use 'DEBUG' Configuration [default=YES]]),
enable_debug=yes, enable_debug=no)
AM_CONDITIONAL(ENABLE_DEBUG, test x$enable_debug = xyes)
if test "x$enable_debug" = "xyes" ; then
CONFIG_REQUESTED="yes"
fi
AC_ARG_ENABLE(release,
AC_HELP_STRING([--enable-release],
[Use 'RELEASE' Configuration [default=NO]]),
enable_release=yes, enable_release=no)
AM_CONDITIONAL(ENABLE_RELEASE, test x$enable_release = xyes)
if test "x$enable_release" = "xyes" ; then
CONFIG_REQUESTED="yes"
fi
if test -z "$CONFIG_REQUESTED" ; then
AM_CONDITIONAL(ENABLE_DEBUG, true)
enable_debug=yes
fi
# package checks, common for all configs
TOPDIR=$PWD
AC_SUBST(TOPDIR)
AC_SUBST(VERSION)
AC_CONFIG_FILES([
Makefile
resources/install.rdf
tests/Makefile
tests/assets/Makefile
tests/assets/AdapterEventsTest/Makefile
tests/assets/AddRemoveAdapterTest/Makefile
tests/assets/ButtonTest/Makefile
tests/assets/CheckBoxTest/Makefile
tests/assets/ComboBoxTest/Makefile
tests/assets/ExpandCollapseEventsTest/Makefile
tests/assets/FakeBridgeTest/Makefile
tests/assets/HyperlinkButtonTest/Makefile
tests/assets/PasswordBoxTest/Makefile
tests/assets/ProgressBarTest/Makefile
tests/assets/RadioButtonTest/Makefile
tests/assets/RangeValueTest/Makefile
tests/assets/ReflectionTest/Makefile
tests/assets/RepeatButtonTest/Makefile
tests/assets/ScrollBarTest/Makefile
tests/assets/SelectionTest/Makefile
tests/assets/TableTest/Makefile
tests/assets/TextBlockTest/Makefile
tests/assets/ToggleButtonTest/Makefile
tests/assets/ToggleEventsTest/Makefile
tests/assets/ValueEventsTest/Makefile
tests/assets/ValueTest/Makefile
])
AC_OUTPUT