This repository has been archived by the owner on Feb 8, 2018. It is now read-only.
/
configure.in
265 lines (229 loc) · 6.56 KB
/
configure.in
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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
AC_INIT(README)
AC_CANONICAL_SYSTEM
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(mono-debugger, 0.20)
AM_MAINTAINER_MODE
AC_CHECK_TOOL(CC, gcc, gcc)
AC_PROG_CC
AM_PROG_CC_STDC
AC_PROG_INSTALL
build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
AC_ARG_ENABLE(build-warnings,
[ --enable-build-warnings Enable build-time compiler warnings if gcc is used],
[case "${enableval}" in
yes) ;;
no) build_warnings="-w";;
,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
build_warnings="${build_warnings} ${t}";;
*,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
build_warnings="${t} ${build_warnings}";;
*) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
esac
if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
echo "Setting warning flags = $build_warnings" 6>&1
fi])dnl
WARN_CFLAGS=""
if test "x${build_warnings}" != x && test "x$GCC" = xyes ; then
WARN_CFLAGS="${build_warnings}"
fi
AC_SUBST(WARN_CFLAGS)
AC_MSG_CHECKING([host platform characteristics])
case "$host" in
x86_64-*-linux*)
glue_cflags=-D_GNU_SOURCE
server_cflags=-D_GNU_SOURCE
server_only=no
bfd_target=x86_64
platform=x86_64
;;
*-*-linux*)
glue_cflags=-D_GNU_SOURCE
server_cflags=-D_GNU_SOURCE
server_only=no
bfd_target=i386linux
platform=i386linux
;;
powerpc-apple-darwin*)
glue_flags=
server_cflags=
server_only=yes
bfd_target=powerpc
platform=powerpc
;;
*)
AC_MSG_ERROR([*** This platform is not yet supported.])
;;
esac
AC_MSG_RESULT(ok)
AC_ARG_WITH(bfd-target,
[ --with-bfd-target Manually override the BFD target],
if test x$with_bfd_target != "x"; then
bfd_target=$with_bfd_target
fi
)
AM_CONDITIONAL(BFD_TARGET_POWERPC, test x$bfd_target = xpowerpc)
AM_CONDITIONAL(BFD_TARGET_X86_64, test x$bfd_target = xx86_64)
AM_CONDITIONAL(PLATFORM_X86_64, test x$platform = xx86_64)
AM_CONDITIONAL(PLATFORM_POWERPC, test x$platform = xpowerpc)
AC_SUBST(glue_cflags)
AC_SUBST(server_cflags)
#if test x$platform = xi386linux -a x$server_only != xyes; then
# LINUX_NPTL_CHECK
#fi
dnl may require a specific autoconf version
dnl AC_PROG_CC_FOR_BUILD
dnl CC_FOR_BUILD not automatically detected
CC_FOR_BUILD=$CC
BUILD_EXEEXT=
if test "x$cross_compiling" = "xyes"; then
CC_FOR_BUILD=cc
BUILD_EXEEXT=""
fi
AC_SUBST(CC_FOR_BUILD)
AC_SUBST(HOST_CC)
AC_SUBST(BUILD_EXEEXT)
dnl These must be called before AM_PROG_LIBTOOL, because it may want
dnl to call AC_CHECK_PROG.
AC_CHECK_TOOL(AR, ar)
AC_CHECK_TOOL(RANLIB, ranlib, :)
# Set STDC_HEADERS
AC_HEADER_STDC
AM_PROG_LIBTOOL
# not 64 bit clean in cross-compile
AC_CHECK_SIZEOF(void *, 4)
CFLAGS='-g -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wshadow -Wpointer-arith -Wno-cast-qual -Wcast-align -Wwrite-strings'
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
AC_MSG_CHECKING([whether we're compiling from CVS])
if test -f "$srcdir/.cvs_version" ; then
from_cvs=yes
else
from_cvs=no
fi
AC_MSG_RESULT($from_cvs)
AM_CONDITIONAL(COMPILING_FROM_CVS, test x$from_cvs = xyes)
pkg_config_path=
AC_ARG_WITH(crosspkgdir, [ --with-crosspkgdir=/path/to/pkg-config/dir],
if test x$with_crosspkgdir = "x"; then
if test -s $PKG_CONFIG_PATH; then
pkg_config_path=$PKG_CONFIG_PATH
fi
else
pkg_config_path=$with_crosspkgdir
PKG_CONFIG_PATH=$pkg_config_path
export PKG_CONFIG_PATH
fi
)
## Versions of dependencies
GLIB_REQUIRED_VERSION=2.0.0
MONO_REQUIRED_VERSION=1.1.15
PKG_CHECK_MODULES(BASE_DEPENDENCIES, glib-2.0 >= $GLIB_REQUIRED_VERSION)
AC_SUBST(BASE_DEPENDENCIES_CFLAGS)
AC_SUBST(BASE_DEPENDENCIES_LIBS)
## Versions of dependencies
PKG_CHECK_MODULES(SERVER_DEPENDENCIES, mono >= $MONO_REQUIRED_VERSION glib-2.0 >= $GLIB_REQUIRED_VERSION $martin_deps)
AC_SUBST(SERVER_DEPENDENCIES_CFLAGS)
AC_SUBST(SERVER_DEPENDENCIES_LIBS)
if test x$server_only != xyes ; then
PKG_CHECK_MODULES(WRAPPER, mono >= $MONO_REQUIRED_VERSION gthread-2.0 >= $GLIB_REQUIRED_VERSION)
AC_SUBST(WRAPPER_CFLAGS)
AC_SUBST(WRAPPER_LIBS)
GACUTIL_FLAGS='/package $(PACKAGE) /gacdir $(prefix)/lib /root $(DESTDIR)$(prefix)/lib'
AC_PATH_PROG(GACUTIL, gacutil, no)
if test "x$GACUTIL" = "xno" ; then
AC_MSG_ERROR([No gacutil tool found])
fi
else
GACUTIL_FLAGS=
fi
AC_SUBST(GACUTIL)
AC_SUBST(GACUTIL_FLAGS)
AC_SUBST(CFLAGS)
if test x$server_only != xyes; then
mono_prefix="`$PKG_CONFIG --variable=prefix mono`"
monodoc_prefix="`$PKG_CONFIG --variable=prefix monodoc`"
AC_SUBST(mono_prefix)
AC_SUBST(monodoc_prefix)
AC_PATH_PROG(MONO, mono)
AC_PATH_PROG(MCS, mcs)
if test "x$MONO" = "x" ; then
AC_MSG_ERROR([Can't find "mono" in your PATH])
fi
if test "x$MCS" = "x" ; then
AC_MSG_ERROR([Can't find "mcs" in your PATH])
fi
AC_PATH_PROG(NUNIT_CONSOLE, nunit-console)
if test "x$NUNIT_CONSOLE" = "x" ; then
AC_MSG_ERROR([Can't find "nunit-console" in your PATH])
fi
fi
top_srcdir=`pwd`
AC_SUBST(top_srcdir)
AC_SUBST(PATH)
AC_SUBST(LD_LIBRARY_PATH)
dnl
dnl BFD checks
dnl
if test `uname -s` = "Darwin"; then
LIB_PREFIX=
LIB_SUFFIX=.dylib
else
LIB_PREFIX=.so
LIB_SUFFIX=
fi
AC_SUBST(LIB_PREFIX)
AC_SUBST(LIB_SUFFIX)
AC_CHECK_HEADERS(stddef.h string.h strings.h stdlib.h time.h unistd.h)
AC_CHECK_HEADERS(fcntl.h sys/file.h sys/time.h termcap.h termcap/termcap.h)
AC_HEADER_TIME
AC_HEADER_DIRENT
AC_CHECK_FUNCS(fcntl getpagesize setitimer sysconf fdopen getuid getgid)
AC_CHECK_FUNCS(strlcpy strlcat)
CHECK_READLINE
AC_MSG_CHECKING([Whether your Mono is working])
old_CFLAGS=$cflags
CFLAGS=$WRAPPER_CFLAGS
AC_TRY_COMPILE([#include <mono/metadata/mono-debug.h>
], [
#if MONO_DEBUGGER_VERSION < 57
#error "Your mono is too old for this version of the debugger."
#endif
], mono_working=yes, mono_working=no)
AC_MSG_RESULT($mono_working)
CFLAGS=$old_CFLAGS
if test x$mono_working != xyes; then
AC_MSG_ERROR([*** Your Mono is too old for this version of the debugger.])
fi
AM_CONDITIONAL(DISABLED, false)
AC_OUTPUT([
Makefile
mono-debugger.pc
jay/Makefile
interfaces/Makefile
classes/Makefile
build/Makefile
build/Mono.Debugger.dll.config
backends/Makefile
backends/server/Makefile
languages/Makefile
languages/mono/Makefile
languages/native/Makefile
frontend/Makefile
frontend/libedit/Makefile
arch/Makefile
arch/libiberty/Makefile
arch/opcodes/Makefile
arch/bfd/Makefile
arch/bfd/hosts/Makefile
arch/bfd/include/Makefile
arch/bfd/include/aout/Makefile
arch/bfd/include/coff/Makefile
arch/bfd/include/elf/Makefile
arch/bfd/include/opcode/Makefile
test/Makefile
test/src/Makefile
test/testsuite/Makefile
doc/Makefile
])