* configure.ac: Fix broken regex.h test.
[cacao.git] / configure.ac
1 dnl configure.ac
2 dnl
3 dnl Copyright (C) 1996-2005, 2006, 2007 R. Grafl, A. Krall, C. Kruegel,
4 dnl C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
5 dnl E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
6 dnl J. Wenninger, Institut f. Computersprachen - TU Wien
7 dnl 
8 dnl This file is part of CACAO.
9 dnl 
10 dnl This program is free software; you can redistribute it and/or
11 dnl modify it under the terms of the GNU General Public License as
12 dnl published by the Free Software Foundation; either version 2, or (at
13 dnl your option) any later version.
14 dnl 
15 dnl This program is distributed in the hope that it will be useful, but
16 dnl WITHOUT ANY WARRANTY; without even the implied warranty of
17 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18 dnl General Public License for more details.
19 dnl 
20 dnl You should have received a copy of the GNU General Public License
21 dnl along with this program; if not, write to the Free Software
22 dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
23 dnl 02110-1301, USA.
24 dnl 
25 dnl $Id: configure.ac 8002 2007-06-03 18:24:44Z pm $
26
27 dnl Process this file with autoconf to produce a configure script.
28
29
30 AC_INIT(cacao, 0.98rc, cacao@cacaojvm.org)
31 AC_CONFIG_SRCDIR(src/cacao/cacao.c)
32 AC_CANONICAL_HOST
33 AC_PREREQ(2.59)
34 AM_INIT_AUTOMAKE([1.9.0 dist-bzip2])
35 AM_MAINTAINER_MODE
36
37 AM_CONFIG_HEADER([config.h])
38
39 AC_PREFIX_DEFAULT(/usr/local/cacao)
40
41
42 dnl set optimization and debugging for all architectures and systems
43 if test x"$CFLAGS" = "x"; then
44     OPT_CFLAGS="-O2 -g3"
45 else
46     OPT_CFLAGS=$CFLAGS
47 fi
48
49 dnl system type
50 case "$host_cpu" in
51 alpha | alphaev56 | alphapca56 )
52     ARCH_DIR="alpha"
53     ARCH_CFLAGS="-mieee -D__ALPHA__"
54     ;;
55
56 arm | armv4 | armv4tl | armv5b | armv5l )
57     ARCH_DIR="arm"
58     ARCH_CFLAGS="-D__ARM__"
59     ;;
60
61 hppa2.0 )
62     ARCH_DIR="parisc"
63     ARCH_CFLAGS="-D__PARISC__"
64     ;;
65
66 i386 | i486 | i586 | i686 )
67     ARCH_DIR="i386"
68     ARCH_CFLAGS="-D__I386__"
69     ;;
70
71 m68k )
72     ARCH_DIR="m68k"
73     ARCH_CFLAGS="-D__M68K__"
74     ;;
75
76 mips | mipsel )
77     ARCH_DIR="mips"
78     ARCH_CFLAGS="-D__MIPS__"
79     ;;
80
81 powerpc )
82     ARCH_DIR="powerpc"
83     ARCH_CFLAGS="-D__POWERPC__"
84     ;;
85
86 powerpc64 )
87     ARCH_DIR="powerpc64"
88     ARCH_CFLAGS="-D__POWERPC64__"
89     ;;
90
91 s390 )
92     ARCH_DIR="s390"
93     ARCH_CFLAGS="-D__S390__"
94     ;;
95
96 sparc | sparc64 )
97     ARCH_DIR="sparc64"
98     ARCH_CFLAGS="-mcpu=v9 -m64 -D__SPARC_64__"
99     ;;
100
101 x86_64 )
102     ARCH_DIR="x86_64"
103     ARCH_CFLAGS="-D__X86_64__"
104     ;;
105
106 xdspcore )
107     ARCH_DIR="xdspcore"
108     ENABLE_STATICVM="yes"
109     ARCH_CFLAGS="-D__XDSPCORE__"
110     USE_SCHEDULER="1"
111     ;;
112
113 * )
114     AC_MSG_ERROR($host_cpu systems are not supported at this time)
115     ;;
116 esac
117
118 dnl host type
119 case "$host_os" in
120 *cygwin* )
121     OS_DIR="cygwin"
122     INTRP_CFLAGS="$ARCH_CFLAGS -D__WINDOWS__ -D__CYGWIN__ -Wall -Wno-long-long"
123     ARCH_CFLAGS="$ARCH_CFLAGS -D__WINDOWS__ -D__CYGWIN__ -ansi -pedantic -Wall -Wno-long-long"
124     ;;
125
126 *darwin* )
127     OS_DIR="darwin"
128     INTRP_CFLAGS="$ARCH_CFLAGS -D__DARWIN__ -Wall -Wno-long-long"
129     ARCH_CFLAGS="$ARCH_CFLAGS -D__DARWIN__ -ansi -pedantic -Wall -Wno-long-long"
130     ;;
131
132 *freebsd* )
133     OS_DIR="freebsd"
134     INTRP_CFLAGS="$ARCH_CFLAGS -D__FREEBSD__ -Wall -Wno-long-long -D_XOPEN_SOURCE_EXTENDED"
135     ARCH_CFLAGS="$ARCH_CFLAGS -D__FREEBSD__ -ansi -pedantic -Wall -Wno-long-long -D_XOPEN_SOURCE_EXTENDED"
136     ;;
137
138 *irix* )
139     OS_DIR="irix"
140     INTRP_CFLAGS="$ARCH_CFLAGS -D__IRIX__"
141     ARCH_CFLAGS="$ARCH_CFLAGS -D__IRIX__"
142     ;;
143
144 *kfreebsd*-gnu)
145     OS_DIR="freebsd"
146     INTRP_CFLAGS="$ARCH_CFLAGS -D__FREEBSD__ -Wall -Wno-long-long -D_POSIX_C_SOURCE=199506L -D_XOPEN_SOURCE=500 -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE"
147     ARCH_CFLAGS="$ARCH_CFLAGS -D__FREEBSD__ -ansi -pedantic -Wall -Wno-long-long -D_POSIX_C_SOURCE=199506L -D_XOPEN_SOURCE=500 -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE"
148     ;;
149
150 dnl must be before *linux*
151 *uclinux | *elf )
152     OS_DIR="uclinux"
153     INTRP_CFLAGS="$ARCH_CFLAGS -D__LINUX__ -Wall -Wno-long-long -D_POSIX_C_SOURCE=199506L -D_XOPEN_SOURCE=500 -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE"
154     ARCH_CFLAGS="$ARCH_CFLAGS -D__LINUX__ -ansi -pedantic -Wall -Wno-long-long -D_POSIX_C_SOURCE=199506L -D_XOPEN_SOURCE=500 -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE"
155     ;;
156
157 *linux* | *Linux* )
158     OS_DIR="linux"
159     INTRP_CFLAGS="$ARCH_CFLAGS -D__LINUX__ -Wall -Wno-long-long -D_POSIX_C_SOURCE=199506L -D_XOPEN_SOURCE=500 -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE"
160     ARCH_CFLAGS="$ARCH_CFLAGS -D__LINUX__ -ansi -pedantic -Wall -Wno-long-long -D_POSIX_C_SOURCE=199506L -D_XOPEN_SOURCE=500 -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE"
161     ;;
162
163 *netbsd* )
164     OS_DIR="netbsd"
165     INTRP_CFLAGS="$ARCH_CFLAGS -D__NETBSD__ -Wall -Wno-long-long -D_POSIX_C_SOURCE=199506L -D_XOPEN_SOURCE=500 -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE"
166     ARCH_CFLAGS="$ARCH_CFLAGS -D__NETBSD__ -ansi -pedantic -Wall -Wno-long-long -D_POSIX_C_SOURCE=199506L -D_XOPEN_SOURCE=500 -D_XOPEN_SOURCE_EXTENDED -D_BSD_SOURCE"
167     ;;
168
169 *solaris* )
170     OS_DIR="solaris"
171         dnl on solaris the architecture defines 'sparc','sun','unix' are not set when cpp is called with -ansi
172         dnl therefore we add them here
173     INTRP_CFLAGS="$ARCH_CFLAGS -D__SOLARIS__ -Wall -Wno-long-long -D_POSIX_C_SOURCE=199506L -D_XOPEN_SOURCE=500 -D__EXTENSIONS__ -D_BSD_SOURCE -Dsparc -Dsun -Dunix"
174     ARCH_CFLAGS="$ARCH_CFLAGS -D__SOLARIS__ -ansi -pedantic -Wall -Wno-long-long -D_POSIX_C_SOURCE=199506L -D_XOPEN_SOURCE=500 -D__EXTENSIONS__ -D_BSD_SOURCE -Dsparc -Dsun -Dunix"
175     ;;
176
177 * )
178     ;;
179 esac
180
181
182 dnl temporary set the CFLAGS for configure tests (e.g. inline keyword)
183 dnl we set it properly at the end of this file
184 CFLAGS="$ARCH_CFLAGS $OPT_CFLAGS"
185
186 dnl set interpreter flags
187 AC_SUBST(INTRP_CFLAGS)
188
189 dnl define some stuff required for --fullversion
190 AC_DEFINE_UNQUOTED(VERSION_CONFIGURE_ARGS, "$ac_configure_args", [configure arguments])
191 AC_DEFINE_UNQUOTED(VERSION_CC, "$CC", [CC used])
192 AC_DEFINE_UNQUOTED(VERSION_CFLAGS, "$OPT_CFLAGS $ARCH_CFLAGS", [CFLAGS used])
193
194
195 dnl define and substitute some architecture specific variables
196 AC_DEFINE_UNQUOTED([ARCH_DIR], "${ARCH_DIR}", [architecture directory])
197 AC_SUBST(ARCH_DIR)
198 AC_SUBST(OS_DIR)
199 AC_SUBST(USE_SCHEDULER)
200
201
202 dnl Checks for programs.
203 AC_PROG_CC
204 AM_PROG_AS
205 AC_PROG_LD
206 AC_PROG_LD_GNU
207 AC_PROG_RANLIB
208 AC_PROG_LN_S
209 AC_PROG_MAKE_SET
210 AM_PROG_MKDIR_P
211
212 dnl Checks for header files.
213 AC_HEADER_DIRENT
214 AC_HEADER_STDC
215
216 dnl keep them alpha-sorted!
217 AC_CHECK_HEADERS([fcntl.h])
218 AC_CHECK_HEADERS([stdlib.h])
219 AC_CHECK_HEADERS([string.h])
220 AC_CHECK_HEADERS([time.h])
221 AC_CHECK_HEADERS([unistd.h])
222 AC_CHECK_HEADERS([sys/ioctl.h])
223 AC_CHECK_HEADERS([sys/mman.h])
224 AC_CHECK_HEADERS([sys/resource.h])
225 AC_CHECK_HEADERS([sys/time.h])
226
227 dnl this is for fdlibm
228 AC_CHECK_HEADERS([stdint.h])
229 AC_CHECK_HEADERS([inttypes.h])
230 AC_CHECK_HEADERS([sys/config.h])
231 AC_CHECK_HEADERS([sys/types.h])
232 AC_EGREP_HEADER(uint32_t, stdint.h, AC_DEFINE(HAVE_INT32_DEFINED, 1, [Define to 1 if you have uint32_t]))
233 AC_EGREP_HEADER(uint32_t, inttypes.h, AC_DEFINE(HAVE_INT32_DEFINED, 1, [Define to 1 if you have uint32_t]))
234 AC_EGREP_HEADER(u_int32_t, sys/types.h, AC_DEFINE(HAVE_BSD_INT32_DEFINED, 1, [Define to 1 if you have BSD u_int32_t]))
235 AC_EGREP_HEADER(u_int32_t, sys/config.h, AC_DEFINE(HAVE_BSD_INT32_DEFINED, 1, [Define to 1 if you have BSD u_int32_t]))
236
237 dnl Checks for typedefs, structures, and compiler characteristics.
238 AC_C_CONST
239 AC_C_INLINE
240 AC_C_ATTRIBUTE
241 AC_TYPE_OFF_T
242 AC_TYPE_SIZE_T
243 AC_HEADER_TIME
244 AC_STRUCT_TM
245
246 dnl Checks for library functions.
247 AC_PROG_GCC_TRADITIONAL
248 AC_TYPE_SIGNAL
249 AC_FUNC_MEMCMP
250 AC_FUNC_MMAP
251
252 dnl keep them alpha-sorted!
253 AC_CHECK_FUNCS([calloc])
254 AC_CHECK_FUNCS([confstr])
255 AC_CHECK_FUNCS([getpagesize])
256 AC_CHECK_FUNCS([free])
257 AC_CHECK_FUNCS([getcwd])
258 AC_CHECK_FUNCS([gettimeofday])
259 AC_CHECK_FUNCS([getrusage])
260 AC_CHECK_FUNCS([isnan])
261 AC_CHECK_FUNCS([localtime])
262 AC_CHECK_FUNCS([localtime_r])
263 AC_CHECK_FUNCS([mmap])
264 AC_CHECK_FUNCS([mprotect])
265 AC_CHECK_FUNCS([scandir])
266 AC_CHECK_FUNCS([strdup])
267 AC_CHECK_FUNCS([strstr])
268 AC_CHECK_FUNCS([time])
269
270
271 dnl Checks for libraries.
272
273 dnl Checking sizeof void *
274 AC_CHECK_SIZEOF(void *)
275 AC_C_BIGENDIAN
276
277
278 dnl define install prefix
279 if test "x$prefix" = "xNONE"; then
280     CACAO_PREFIX=$ac_default_prefix
281 else
282     CACAO_PREFIX=$prefix
283 fi
284 AC_DEFINE_UNQUOTED([CACAO_PREFIX], "${CACAO_PREFIX}", [installation prefix])
285 AC_SUBST(CACAO_PREFIX)
286
287 dnl define libdir prefix
288 if test "x$libdir" = "xNONE"; then
289     CACAO_LIBDIR=$ac_default_libdir
290 else
291     CACAO_LIBDIR=$libdir
292 fi
293 dnl expand CACAO_LIBDIR to something that is usable in C code
294 AS_AC_EXPAND([CACAO_LIBDIR], ${CACAO_LIBDIR})
295 AC_DEFINE_UNQUOTED([CACAO_LIBDIR], "${CACAO_LIBDIR}", [library installation prefix])
296 AC_SUBST(CACAO_LIBDIR)
297
298
299 dnl Features
300
301 AC_CHECK_ENABLE_JAVA
302 AC_CHECK_ENABLE_JIT
303
304 dnl with-options
305 AC_CHECK_WITH_CACAOH
306
307 dnl check for stuff that should be done in software
308 AC_CHECK_SOFTFLOAT
309 AC_CHECK_SOFT_FLOAT_CMP
310 AC_CHECK_SOFT_DOUBLE_CMP
311
312
313 dnl check for interpreter
314 AC_ARG_ENABLE([intrp], [AS_HELP_STRING(--enable-intrp,enable interpreter [[default=no]])])
315
316 AC_MSG_CHECKING(whether interpreter should be compiled)
317 if test x"$enable_intrp" = "xyes"; then
318     AC_MSG_RESULT(yes)
319     AC_DEFINE([ENABLE_INTRP], 1, [enable interpreter])
320     AM_CONDITIONAL([ENABLE_INTRP], [true])
321     ENABLE_INTRP=yes
322
323     AC_ASM_SKIP16
324
325     dnl check for libffi
326     AC_ARG_WITH([ffi],
327                 [AS_HELP_STRING(--with-ffi,use libffi to call native functions)],
328                 [WITH_FFI=yes
329                  AC_CHECK_HEADERS([ffi.h],, [AC_MSG_ERROR(cannot find ffi.h)])
330                  AC_CHECK_LIB(ffi, ffi_call,, [AC_MSG_ERROR(cannot find libffi)])
331                  AC_DEFINE([WITH_FFI], 1, [use libffi])],
332                 [WITH_FFI=no])
333
334     dnl check for libffcall
335     AC_ARG_WITH([ffcall],
336                 [AS_HELP_STRING(--with-ffcall,use libffcall to call native functions)],
337                 [WITH_FFCALL=yes
338                  AC_CHECK_HEADERS([avcall.h],, [AC_MSG_ERROR(cannot find avcall.h)])
339                  AC_CHECK_LIB(avcall, __builtin_avcall,, [AC_MSG_ERROR(cannot find libavcall (from libffcall))])
340                  AC_DEFINE([WITH_FFCALL], 1, [use libffcall])],
341                 [WITH_FFCALL=no])
342
343     dnl check for libffi or libffcall
344     if test x"${WITH_FFI}" = "xyes" -a x"${WITH_FFCALL}" = "xyes"; then
345         AC_ERROR(Enable only libffi or libffcall.)
346     fi
347     if test x"${WITH_FFI}" = "xno" -a x"${WITH_FFCALL}" = "xno"; then
348         AC_ERROR(Enable one of libffi or libffcall.)
349     fi
350
351 else
352     AC_MSG_RESULT(no)
353     AM_CONDITIONAL([ENABLE_INTRP], [false])
354     ENABLE_INTRP="no"
355 fi
356
357 if test x"${ENABLE_JIT}" = "xno" -a x"${ENABLE_INTRP}" = "xno"; then
358     AC_ERROR(You have to enable at least the JIT or the interpreter.)
359 fi
360
361
362 dnl check for garbage collector usage
363 AC_ARG_ENABLE([gc], [AS_HELP_STRING(--enable-gc,enable garbage collector support (none,boehm,cacao) [[default=boehm]])])
364 AC_MSG_CHECKING(whether GC should be enabled)
365 enable_gc=${enable_gc:-boehm}
366 case "$enable_gc" in
367 no | none)
368     AC_DEFINE([DISABLE_GC], 1, [disable garbage collector])
369     ENABLE_GC=none
370     AC_MSG_RESULT(no)
371     ;;
372
373 boehm)
374     AC_DEFINE([ENABLE_GC_BOEHM], 1, [enable conservative boehm-gc])
375     ENABLE_GC=boehm
376     AC_MSG_RESULT(yes, boehm-gc)
377     ;;
378
379 cacao)
380     AC_DEFINE([ENABLE_GC_CACAO], 1, [enable exact cacao-gc])
381     ENABLE_GC=cacao
382     AC_MSG_RESULT(yes, cacao-gc)
383     ;;
384
385 *)
386     AC_MSG_ERROR($enable_gc is an unknown garbage collector package)
387     ;;
388 esac
389 AM_CONDITIONAL([DISABLE_GC], test x"${ENABLE_GC}" = "xnone")
390 AM_CONDITIONAL([ENABLE_GC_BOEHM], test x"${ENABLE_GC}" = "xboehm")
391 AM_CONDITIONAL([ENABLE_GC_CACAO], test x"${ENABLE_GC}" = "xcacao")
392
393
394
395 dnl check for dump memory usage
396 AC_MSG_CHECKING(whether dump memory should be disabled)
397 AC_ARG_ENABLE([dump],
398               [AS_HELP_STRING(--disable-dump,disable dump memory (for debugging only!) [[default=yes]])],
399               [case "${enableval}" in
400                    no)
401                        DISABLE_DUMP=yes
402                        AC_DEFINE([DISABLE_DUMP], 1, [disable dump memory])
403                        ;;
404                    *) DISABLE_DUMP=no;;
405                esac],
406                [DISABLE_DUMP=no])
407 AC_MSG_RESULT(${DISABLE_DUMP})
408
409
410 dnl check for debug
411 AC_MSG_CHECKING(whether debug code generation should be enabled)
412 AC_ARG_ENABLE([debug],
413               [AS_HELP_STRING(--disable-debug,disable debug code generation [[default=yes]])],
414               [case "${enableval}" in
415                    no) NDEBUG=yes
416                        AC_DEFINE([NDEBUG], 1, [disable debug code])
417                        ;;
418                    *) NDEBUG=no;;
419                esac],
420               [NDEBUG=no])
421
422 if test x"${NDEBUG}" = "xno"; then
423     AC_MSG_RESULT(yes)
424 else
425     AC_MSG_RESULT(no)
426 fi
427 AM_CONDITIONAL([NDEBUG], test x"${NDEBUG}" = "xyes")
428
429
430 dnl check for memcheck support
431 AC_MSG_CHECKING(whether debugging memory checks should be enabled)
432 AC_ARG_ENABLE([memcheck],
433               [AS_HELP_STRING(--enable-memcheck,enable debugging memory checks [[default=no]])],
434               [case "${enableval}" in
435                    yes) ENABLE_MEMCHECK=yes;;
436                    *) ENABLE_MEMCHECK=no;;
437                esac],
438               [ENABLE_MEMCHECK=no])
439 AC_MSG_RESULT(${ENABLE_MEMCHECK})
440 AM_CONDITIONAL([ENABLE_MEMCHECK], test x"${ENABLE_MEMCHECK}" = "xyes")
441
442 if test x"${ENABLE_MEMCHECK}" = "xyes"; then
443     AC_DEFINE([ENABLE_MEMCHECK], 1, [perform debugging memory checks])
444 fi
445
446
447 dnl check for vmlog support
448 AC_MSG_CHECKING(whether vmlog tracing should be enabled)
449 AC_ARG_ENABLE([vmlog],
450               [AS_HELP_STRING(--enable-vmlog,enable vmlog tracing [[default=no]])],
451               [case "${enableval}" in
452                    yes) ENABLE_VMLOG=yes;;
453                    *) ENABLE_VMLOG=no;;
454                esac],
455               [ENABLE_VMLOG=no])
456 AC_MSG_RESULT(${ENABLE_VMLOG})
457 AM_CONDITIONAL([ENABLE_VMLOG], test x"${ENABLE_VMLOG}" = "xyes")
458
459 if test x"${ENABLE_VMLOG}" = "xyes"; then
460     AC_DEFINE([ENABLE_VMLOG], 1, [enable vmlog tracing code])
461 fi
462
463
464 dnl check for disassembler support
465 AC_MSG_CHECKING(whether disassembler should be enabled)
466 AC_ARG_ENABLE([disassembler],
467               [AS_HELP_STRING(--enable-disassembler,enable disassembler [[default=no]])],
468               [case "${enableval}" in
469                    yes) ENABLE_DISASSEMBLER=yes;;
470                    *) ENABLE_DISASSEMBLER=no;;
471                esac],
472               [ENABLE_DISASSEMBLER=no])
473 AC_MSG_RESULT(${ENABLE_DISASSEMBLER})
474 AM_CONDITIONAL([ENABLE_DISASSEMBLER], test x"${ENABLE_DISASSEMBLER}" = "xyes")
475
476 if test x"${ENABLE_DISASSEMBLER}" = "xyes"; then
477     AC_DEFINE([ENABLE_DISASSEMBLER], 1, [enable disassembler])
478
479     dnl check for binutils headers and libraries on some architectures for the
480     dnl disassembler
481     case "${ARCH_DIR}" in
482         arm | i386 | powerpc | x86_64 | sparc64 | powerpc64 | s390 | m68k)
483             AC_CHECK_HEADER([ansidecl.h],, [AC_MSG_ERROR(cannot find ansidecl.h)])
484             AC_CHECK_HEADER([symcat.h],, [AC_MSG_ERROR(cannot find symcat.h)])
485             AC_CHECK_HEADER([bfd.h],, [AC_MSG_ERROR(cannot find bfd.h)])
486             AC_CHECK_HEADER([dis-asm.h],, [AC_MSG_ERROR(cannot find dis-asm.h)])
487
488             case "${OS_DIR}" in
489                 cygwin | darwin | netbsd | solaris)
490                      AC_CHECK_LIB(intl, dcgettext,, [AC_MSG_ERROR(cannot find libintl (from binutils))])
491                      ;;
492             esac
493
494             AC_CHECK_LIB(iberty, xstrerror,, [AC_MSG_ERROR(cannot find libiberty (from binutils))])
495             AC_CHECK_LIB(bfd, bfd_get_arch,, [AC_MSG_ERROR(cannot find libbfd (from binutils))])
496             AC_CHECK_LIB(opcodes, disassembler,, [AC_MSG_ERROR(cannot find libopcodes (from binutils))])
497             AC_DEFINE([WITH_BINUTILS_DISASSEMBLER], 1, [use binutils disassembler])
498             AM_CONDITIONAL([WITH_BINUTILS_DISASSEMBLER], [true])
499             ;;
500         * )
501             AM_CONDITIONAL([WITH_BINUTILS_DISASSEMBLER], [false])
502             ;;
503     esac
504 else
505     AM_CONDITIONAL([WITH_BINUTILS_DISASSEMBLER], [false])
506 fi
507
508
509 dnl check for statistics
510 AC_MSG_CHECKING(whether statistics generation should be enabled)
511 AC_ARG_ENABLE([statistics],
512               [AS_HELP_STRING(--enable-statistics,enable statistics generation [[default=no]])],
513               [case "${enableval}" in
514                    yes) ENABLE_STATISTICS=yes;;
515                    *) ENABLE_STATISTICS=no;;
516                esac],
517               [ENABLE_STATISTICS=no])
518 AC_MSG_RESULT(${ENABLE_STATISTICS})
519 AM_CONDITIONAL([ENABLE_STATISTICS], test x"${ENABLE_STATISTICS}" = "xyes")
520
521 if test x"${ENABLE_STATISTICS}" = "xyes"; then
522     AC_DEFINE([ENABLE_STATISTICS], 1, [enable statistics])
523 fi
524
525
526 dnl check for verifier
527 AC_MSG_CHECKING(whether classfile verification should be enabled)
528 AC_ARG_ENABLE([verifier],
529               [AS_HELP_STRING(--disable-verifier,disable classfile verification [[default=yes]])],
530               [case "${enableval}" in
531                    no) ENABLE_VERIFIER=no;;
532                    *) ENABLE_VERIFIER=yes;;
533                esac],
534               [ENABLE_VERIFIER=yes])
535 AC_MSG_RESULT(${ENABLE_VERIFIER})
536 AM_CONDITIONAL([ENABLE_VERIFIER], test x"${ENABLE_VERIFIER}" = "xyes")
537
538 if test x"${ENABLE_VERIFIER}" = "xyes"; then
539     AC_DEFINE([ENABLE_VERIFIER], 1, [enable classfile verification])
540 fi
541
542
543 dnl check for compiler timing
544 AC_MSG_CHECKING(whether real-time timing should be enabled)
545 AC_ARG_ENABLE([rt-timing],
546               [AS_HELP_STRING(--enable-rt-timing,enable real-time timing [[default=no]])],
547               [case "${enableval}" in
548                    yes) ENABLE_RT_TIMING=yes;;
549                    *) ENABLE_RT_TIMING=no;;
550                esac],
551               [ENABLE_RT_TIMING=no])
552 AC_MSG_RESULT(${ENABLE_RT_TIMING})
553 AM_CONDITIONAL([ENABLE_RT_TIMING], test x"${ENABLE_RT_TIMING}" = "xyes")
554
555 if test x"${ENABLE_RT_TIMING}" = "xyes"; then
556     AC_DEFINE([ENABLE_RT_TIMING], 1, [enable real-time timing])
557 fi
558
559
560 dnl check for cycle count statistics
561 AC_MSG_CHECKING(whether cycle count statistics should be enabled)
562 AC_ARG_ENABLE([cycles-stats],
563               [AS_HELP_STRING(--enable-cycles-stats,enable cycle count statistics [[default=no]])],
564               [case "${enableval}" in
565                    yes) ENABLE_CYCLES_STATS=yes;;
566                    *) ENABLE_CYCLES_STATS=no;;
567                esac],
568               [ENABLE_CYCLES_STATS=no])
569 AC_MSG_RESULT(${ENABLE_CYCLES_STATS})
570 AM_CONDITIONAL([ENABLE_CYCLES_STATS], test x"${ENABLE_CYCLES_STATS}" = "xyes")
571
572 if test x"${ENABLE_CYCLES_STATS}" = "xyes"; then
573     AC_DEFINE([ENABLE_CYCLES_STATS], 1, [enable cycle count statistics])
574 fi
575
576
577 dnl check for JVMTI
578 AC_MSG_CHECKING(whether to compile JVMTI support)
579 AC_ARG_ENABLE([jvmti],
580               [AS_HELP_STRING(--enable-jvmti,enable JVMTI [[default=no]])],
581               [case "${enableval}" in
582                    yes) ENABLE_JVMTI=yes;;
583                    *) ENABLE_JVMTI=no;;
584                esac],
585               [ENABLE_JVMTI=no])
586 AC_MSG_RESULT(${ENABLE_JVMTI})
587 AM_CONDITIONAL([ENABLE_JVMTI], test x"${ENABLE_JVMTI}" = "xyes")
588
589 if test x"${ENABLE_JVMTI}" = "xyes"; then
590     AC_DEFINE([ENABLE_JVMTI], 1, [use JVMTI])
591 fi
592
593
594 AC_CHECK_ENABLE_THREADS
595
596
597 dnl check if if-conversion should be supported
598 AC_MSG_CHECKING(whether if-conversion should be supported)
599 AC_ARG_ENABLE([ifconv],
600               [AS_HELP_STRING(--disable-ifconv,disable if-conversion [[default=yes]])],
601               [case "${enableval}" in
602                    no) ENABLE_IFCONV=no;;
603                    *) ENABLE_IFCONV=yes;;
604                esac],
605               [ENABLE_IFCONV=yes])
606 AC_MSG_RESULT(${ENABLE_IFCONV})
607 AM_CONDITIONAL([ENABLE_IFCONV], test x"${ENABLE_IFCONV}" = "xyes")
608    
609 if test x"${ENABLE_IFCONV}" = "xyes"; then
610     AC_DEFINE([ENABLE_IFCONV], 1, [enable if-conversion])
611 fi
612
613
614 dnl check for inlining
615 AC_MSG_CHECKING(whether method inlining should be supported)
616 AC_ARG_ENABLE([inlining],
617               [AS_HELP_STRING(--enable-inlining,enable method inlining [[default=no]])],
618               [case "${enableval}" in
619                    yes) ENABLE_INLINING=yes;;
620                    *) ENABLE_INLINING=no;;
621                esac],
622               [ENABLE_INLINING=no])
623 AC_MSG_RESULT(${ENABLE_INLINING})
624 AM_CONDITIONAL([ENABLE_INLINING], test x"${ENABLE_INLINING}" = "xyes")
625
626 if test x"${ENABLE_INLINING}" = "xyes"; then
627     AC_DEFINE([ENABLE_INLINING], 1, [use method inlining])
628 fi
629
630
631 dnl check for inlining debug options
632 AC_MSG_CHECKING(whether method inlining debug options should be enabled)
633 AC_ARG_ENABLE([inlining-debug],
634               [AS_HELP_STRING(--enable-inlining-debug,enable method inlining debug options [[default=no]])],
635               [case "${enableval}" in
636                    yes) ENABLE_INLINING_DEBUG=yes;;
637                    *) ENABLE_INLINING_DEBUG=no;;
638                esac],
639               [ENABLE_INLINING_DEBUG=no])
640 AC_MSG_RESULT(${ENABLE_INLINING_DEBUG})
641 AM_CONDITIONAL([ENABLE_INLINING_DEBUG], test x"${ENABLE_INLINING_DEBUG}" = "xyes")
642
643 if test x"${ENABLE_INLINING_DEBUG}" = "xyes"; then
644     AC_DEFINE([ENABLE_INLINING_DEBUG], 1, [enable method inlining debug options])
645 fi
646
647
648 dnl check for replacement
649 AC_MSG_CHECKING(whether on-stack replacement should be supported)
650 AC_ARG_ENABLE([replacement],
651               [AS_HELP_STRING(--enable-replacement,enable on-stack replacement [[default=no]])],
652               [case "${enableval}" in
653                    yes) ENABLE_REPLACEMENT=yes;;
654                    *) ENABLE_REPLACEMENT=no;;
655                esac],
656               [ENABLE_REPLACEMENT=no])
657 AC_MSG_RESULT(${ENABLE_REPLACEMENT})
658 AM_CONDITIONAL([ENABLE_REPLACEMENT], test x"${ENABLE_REPLACEMENT}" = "xyes")
659
660 if test x"${ENABLE_REPLACEMENT}" = "xyes"; then
661     AC_DEFINE([ENABLE_REPLACEMENT], 1, [use on-stack replacement])
662 fi
663
664
665 dnl check for loop optimization
666 AC_MSG_CHECKING(whether loop optimization should be supported)
667 AC_ARG_ENABLE([loop],
668               [AS_HELP_STRING(--enable-loop,enable loop optimization [[default=no]])],
669               [case "${enableval}" in
670                    yes) ENABLE_LOOP=yes;;
671                    *) ENABLE_LOOP=no;;
672                esac],
673               [ENABLE_LOOP=no])
674 AC_MSG_RESULT(${ENABLE_LOOP})
675 AM_CONDITIONAL([ENABLE_LOOP], test x"${ENABLE_LOOP}" = "xyes")
676
677 if test x"${ENABLE_LOOP}" = "xyes"; then
678     AC_DEFINE([ENABLE_LOOP], 1, [use loop optimization])
679 fi
680
681
682 dnl check if linear scan register allocator(lsra) with SSA should be used
683 AC_MSG_CHECKING(whether lsra with ssa should be supported)
684 AC_ARG_ENABLE([ssa],
685               [AS_HELP_STRING(--disable-ssa,disable ssa [[default=no]])],
686               [case "${enableval}" in
687                    no) ENABLE_SSA=no;;
688                    *) ENABLE_SSA=yes;;
689                esac],
690               [ENABLE_SSA=no])
691 AC_MSG_RESULT(${ENABLE_SSA})
692 AM_CONDITIONAL([ENABLE_SSA], test x"${ENABLE_SSA}" = "xyes")
693
694 if test x"${ENABLE_SSA}" = "xyes"; then
695     AC_DEFINE([ENABLE_SSA], 1, [enable lsra with ssa])
696     ENABLE_LSRA="no"
697 fi
698
699
700 dnl check if linear scan register allocator(lsra) should be used
701 AC_MSG_CHECKING(whether lsra should be supported)
702 AC_ARG_ENABLE([lsra],
703               [AS_HELP_STRING(--enable-lsra,enable linear scan register allocator [[default=no]])],
704               [case "${enableval}" in
705                    yes) ENABLE_LSRA=yes;;
706                    *) ENABLE_LSRA=no;;
707                esac],
708               [ENABLE_LSRA=no])
709    
710 if test x"${ENABLE_LSRA}" = "xyes"; then
711     if test x"${ENABLE_SSA}" = "xyes"; then
712         ENABLE_LSRA="no"
713     fi
714 fi
715 AC_MSG_RESULT(${ENABLE_LSRA})
716 AM_CONDITIONAL([ENABLE_LSRA], test x"${ENABLE_LSRA}" = "xyes")
717  
718 if test x"${ENABLE_LSRA}" = "xyes"; then
719     AC_DEFINE([ENABLE_LSRA], 1, [enable lsra])
720 fi
721
722
723 dnl check if profiling should be supported
724 AC_MSG_CHECKING(whether profiling should be supported)
725 AC_ARG_ENABLE([profiling],
726               [AS_HELP_STRING(--enable-profiling,enable profiling [[default=no]])],
727               [case "${enableval}" in
728                    yes) ENABLE_PROFILING=yes;;
729                    *) ENABLE_PROFILING=no;;
730                esac],
731               [ENABLE_PROFILING=no])
732 AC_MSG_RESULT(${ENABLE_PROFILING})
733 AM_CONDITIONAL([ENABLE_PROFILING], test x"${ENABLE_PROFILING}" = "xyes")
734    
735 if test x"${ENABLE_PROFILING}" = "xyes"; then
736     AC_DEFINE([ENABLE_PROFILING], 1, [enable profiling])
737 fi
738
739
740 dnl check for instruction scheduler
741 AC_ARG_ENABLE([scheduler], [AS_HELP_STRING(--enable-scheduler,enable instruction scheduler [[default=no]])])
742
743 AC_MSG_CHECKING(whether instruction scheduler should be supported)
744 if test x"${USE_SCHEDULER}" = "x1" -o x"$enable_scheduler" = "xyes"; then
745         case "${ARCH_DIR}" in
746                 xdspcore )
747                         ;;
748                 * )
749                         AC_MSG_ERROR(instruction scheduler is not available for ${ARCH_DIR} code generator)
750                         ;;
751         esac
752
753         AC_MSG_RESULT(yes)
754         AC_DEFINE([USE_SCHEDULER], 1, [use scheduler])
755         AM_CONDITIONAL([USE_SCHEDULER], [true])
756 else
757         AC_MSG_RESULT(no)
758         AM_CONDITIONAL([USE_SCHEDULER], [false])
759 fi
760
761
762 dnl check if zlib should be used
763 AC_MSG_CHECKING(whether ZIP/JAR archives should be supported)
764 AC_ARG_ENABLE([zlib],
765               [AS_HELP_STRING(--disable-zlib,disable ZIP/JAR archive support (needs zlib) [[default=yes]])],
766               [case "${enableval}" in
767                   no) ENABLE_ZLIB=no;;
768                   *) ENABLE_ZLIB=yes;;
769                esac],
770               [ENABLE_ZLIB=yes])
771 AC_MSG_RESULT(${ENABLE_ZLIB})
772
773 if test x"${ENABLE_ZLIB}" = "xyes"; then
774     AC_CHECK_HEADERS([zconf.h],, [AC_MSG_ERROR(cannot find zconf.h)])
775     AC_CHECK_HEADERS([zlib.h],, [AC_MSG_ERROR(cannot find zlib.h)])
776     AC_CHECK_LIB(z, inflate,, [AC_MSG_ERROR(cannot find libz)])
777     AC_DEFINE([ENABLE_ZLIB], 1, [use zlib])
778 fi
779 AM_CONDITIONAL([ENABLE_ZLIB], test x"${ENABLE_ZLIB}" = "xyes")
780
781
782 dnl check for stuff to be built
783 AC_CHECK_ENABLE_JNI
784
785
786 dnl check if a libjvm.so should be built
787 AC_MSG_CHECKING(whether to build a libjvm.so)
788 AC_ARG_ENABLE([libjvm],
789               [AS_HELP_STRING(--disable-libjvm,build a libjvm.so [[default=yes]])],
790               [case "${enableval}" in
791                   no) ENABLE_LIBJVM=no;;
792                   *) ENABLE_LIBJVM=yes;;
793                esac],
794               [ENABLE_LIBJVM=yes])
795 AC_MSG_RESULT(${ENABLE_LIBJVM})
796 AM_CONDITIONAL([ENABLE_LIBJVM], test x"${ENABLE_LIBJVM}" = "xyes")
797 AC_SUBST(ENABLE_LIBJVM)
798
799 if test x"${ENABLE_LIBJVM}" = "xyes"; then
800     AC_DEFINE([ENABLE_LIBJVM], 1, [enable libjvm.so])
801
802     dnl set AC_ENABLE_SHARED and AC_DISABLE_STATIC properly
803     enable_shared=yes
804     enable_static=no
805 else
806     enable_shared=no
807     enable_static=yes
808 fi
809
810 dnl libtool stuff
811 AC_LIBTOOL_DLOPEN
812 AC_PROG_LIBTOOL
813
814
815 dnl check if CACAO should be linked statically
816 AC_MSG_CHECKING(whether to link CACAO statically)
817 AC_ARG_ENABLE([staticvm],
818               [AS_HELP_STRING(--enable-staticvm,link CACAO statically [[default=no]])],
819               [case "${enableval}" in
820                   yes) ENABLE_STATICVM=yes
821                        AC_DEFINE([ENABLE_STATICVM], 1, [link CACAO statically])
822                        ;;
823                   *) ENABLE_STATICVM=no;;
824                esac],
825               [ENABLE_STATICVM=no])
826 AC_MSG_RESULT(${ENABLE_STATICVM})
827 AM_CONDITIONAL([ENABLE_STATICVM], test x"${ENABLE_STATICVM}" = "xyes")
828 AC_SUBST(ENABLE_STATICVM)
829
830
831 dnl where is CACAO's vm.zip
832 AC_MSG_CHECKING(where CACAO's vm.zip is installed)
833 AC_ARG_WITH([vm-zip],
834             [AS_HELP_STRING(--with-vm-zip=<path>,path to CACAO's vm.zip (includes the name of the file and may be flat) [[default=/usr/local/cacao/share/cacao/vm.zip]])],
835             [CACAO_VM_ZIP=${withval}],
836             [CACAO_VM_ZIP=${CACAO_PREFIX}/share/cacao/vm.zip])
837 AC_MSG_RESULT(${CACAO_VM_ZIP})
838 AC_DEFINE_UNQUOTED([CACAO_VM_ZIP], "${CACAO_VM_ZIP}", [CACAO's vm.zip])
839 AC_SUBST(CACAO_VM_ZIP)
840
841
842 AC_CHECK_WITH_CLASSPATH
843 AC_CHECK_WITH_CLASSPATH_PREFIX
844 AC_CHECK_WITH_CLASSPATH_CLASSES
845 AC_CHECK_WITH_CLASSPATH_LIBDIR
846 AC_CHECK_WITH_CLASSPATH_INCLUDEDIR
847
848
849 dnl if we compile for a JRE-style directory layout
850 AC_MSG_CHECKING(if we compile for a JRE-style directory layout)
851 AC_ARG_WITH([jre-layout],
852             [AS_HELP_STRING(--with-jre-layout,compile for JRE-style directory layout [[default=no]])],
853             [case "${enableval}" in
854                 yes) WITH_JRE_LAYOUT=yes
855                      AC_DEFINE([WITH_JRE_LAYOUT], 1, [with JRE layout])
856                      ;;
857                 *) WITH_JRE_LAYOUT=no;;
858              esac],
859             [WITH_JRE_LAYOUT=no])
860 AC_MSG_RESULT(${WITH_JRE_LAYOUT})
861
862
863 dnl check if GNU Classpath should be linked statically into CACAO
864 AC_MSG_CHECKING(whether to link GNU Classpath native libraries statically into CACAO)
865 AC_ARG_WITH([static-classpath],
866             [AS_HELP_STRING(--with-static-classpath,link GNU classpath native libraries statically into CACAO [[default=no]])],
867             [case "${enableval}" in
868                 yes) WITH_STATIC_CLASSPATH=yes;;
869                 *) WITH_STATIC_CLASSPATH=no;;
870              esac],
871             [WITH_STATIC_CLASSPATH=no])
872 AC_MSG_RESULT(${WITH_STATIC_CLASSPATH})
873
874 if test x"${WITH_STATIC_CLASSPATH}" = "xyes"; then
875     AC_DEFINE([WITH_STATIC_CLASSPATH], 1, [link GNU classpath native libraries statically into CACAO])
876
877     dnl check for some classpath related stuff when we link statically
878     AM_ICONV_LINK
879 else
880     dnl we need this check for --enable-staticvm, otherwise ltdl can't find dlopen
881     if test x"${ENABLE_STATICVM}" = "xyes"; then
882         AC_CHECK_LIB(dl, dlopen,, [AC_MSG_ERROR(cannot find libdl)])
883     fi
884
885     AC_CHECK_HEADERS([ltdl.h],, [AC_MSG_ERROR(cannot find ltdl.h)])
886     AC_CHECK_LIB(ltdl, lt_dlopen,, [AC_MSG_ERROR(cannot find libltdl)])
887 fi
888 AM_CONDITIONAL([WITH_STATIC_CLASSPATH], test x"${WITH_STATIC_CLASSPATH}" = "xyes")
889 AC_SUBST(WITH_STATIC_CLASSPATH)
890
891
892 dnl check for some programs we need
893 AC_PROG_JAVAC
894 AC_PROG_JAR
895
896 AC_CHECK_HEADERS(
897         [regex.h], 
898         [
899                 dnl If debug build and regex.h available, enable debug filter
900                 if test x"${NDEBUG}" = "xno"; then
901                         AC_DEFINE(ENABLE_DEBUG_FILTER, 1, [debug filter])
902                 fi
903                 dnl If vmlog enambled and regex.h available, enable vmlogfilter
904                 AM_CONDITIONAL([ENABLE_VMLOGFILTER], [test x"${ENABLE_VMLOG}" = "xyes"])
905         ],
906         [
907                 AM_CONDITIONAL([ENABLE_VMLOGFILTER], [false])
908         ]
909 )
910
911 dnl finally pass CFLAGS to Makefiles via AM_CFLAGS
912 CFLAGS=$OPT_CFLAGS
913 AM_CFLAGS=$ARCH_CFLAGS
914 AC_SUBST(AM_CFLAGS)
915
916
917 AC_CONFIG_FILES([Makefile]
918                 [contrib/Makefile]
919                 [contrib/setenvinstalled]
920                 [contrib/setenvsource]
921                 [contrib/vmlog/Makefile]
922                 [contrib/vmlog/t/Makefile]
923                 [doc/Makefile]
924                 [doc/handbook/Makefile]
925                 [man/Makefile]
926                 [src/Makefile]
927                 [src/cacao/Makefile]
928                 [src/cacaoh/Makefile]
929                 [src/fdlibm/Makefile]
930                 [src/lib/Makefile]
931                 [src/mm/Makefile]
932                 [src/mm/cacao-gc/Makefile]
933                 [src/native/Makefile]
934                 [src/native/include/Makefile]
935                 [src/native/jvmti/Makefile]
936                 [src/native/tools/Makefile]
937                 [src/native/vm/Makefile]
938                 [src/native/vm/cldc1.1/Makefile]
939                 [src/native/vm/gnu/Makefile]
940                 [src/scripts/Makefile]
941                 [src/scripts/java]
942                 [src/threads/Makefile]
943                 [src/threads/native/Makefile]
944                 [src/threads/none/Makefile]
945                 [src/toolbox/Makefile]
946                 [src/vm/Makefile]
947                 [src/vm/jit/Makefile]
948                 [src/vm/jit/allocator/Makefile]
949                 [src/vm/jit/alpha/Makefile]
950                 [src/vm/jit/alpha/freebsd/Makefile]
951                 [src/vm/jit/alpha/linux/Makefile]
952                 [src/vm/jit/arm/Makefile]
953                 [src/vm/jit/arm/linux/Makefile]
954                 [src/vm/jit/i386/Makefile]
955                 [src/vm/jit/i386/cygwin/Makefile]
956                 [src/vm/jit/i386/darwin/Makefile]
957                 [src/vm/jit/i386/freebsd/Makefile]
958                 [src/vm/jit/i386/linux/Makefile]
959                 [src/vm/jit/intrp/Makefile]
960                 [src/vm/jit/inline/Makefile]
961                 [src/vm/jit/loop/Makefile]
962                 [src/vm/jit/m68k/Makefile]
963                 [src/vm/jit/m68k/linux/Makefile]
964                 [src/vm/jit/mips/Makefile]
965                 [src/vm/jit/mips/irix/Makefile]
966                 [src/vm/jit/mips/linux/Makefile]
967                 [src/vm/jit/mips/uclinux/Makefile]
968                 [src/vm/jit/optimizing/Makefile]
969                 [src/vm/jit/parisc/Makefile]
970                 [src/vm/jit/parisc/linux/Makefile]
971                 [src/vm/jit/powerpc/Makefile]
972                 [src/vm/jit/powerpc/darwin/Makefile]
973                 [src/vm/jit/powerpc/linux/Makefile]
974                 [src/vm/jit/powerpc/netbsd/Makefile]
975                 [src/vm/jit/powerpc64/Makefile]
976                 [src/vm/jit/powerpc64/linux/Makefile]
977                 [src/vm/jit/s390/Makefile]
978                 [src/vm/jit/schedule/Makefile]
979                 [src/vm/jit/sparc64/Makefile]
980                 [src/vm/jit/sparc64/linux/Makefile]
981                 [src/vm/jit/sparc64/solaris/Makefile]
982                 [src/vm/jit/tools/Makefile]
983                 [src/vm/jit/verify/Makefile]
984                 [src/vm/jit/x86_64/Makefile]
985                 [src/vm/jit/x86_64/freebsd/Makefile]
986                 [src/vm/jit/x86_64/linux/Makefile]
987                 [src/vmcore/Makefile]
988                 [tests/Makefile]
989                 [tests/regression/Makefile]
990                 [tests/regression/codepatching/Makefile]
991                 [tests/regression/jasmin/Makefile]
992                 [tests/regression/native/Makefile]
993                 [tests/regression/resolving/Makefile]
994                 [tests/regression/resolving/classes1/Makefile]
995                 [tests/regression/resolving/classes2/Makefile]
996                 [tests/regression/resolving/classes3/Makefile]
997                 )
998
999
1000 dnl now configure subpackages with OPT_CFLAGS and ARCH_CFLAGS
1001 export OPT_CFLAGS
1002 export ARCH_CFLAGS
1003 AC_CONFIG_SUBDIRS(src/mm/boehm-gc)
1004
1005
1006 AC_OUTPUT
1007
1008
1009 ## Local variables:
1010 ## mode: m4
1011 ## indent-tabs-mode: t
1012 ## c-basic-offset: 4
1013 ## tab-width: 8
1014 ## compile-command: "automake --add-missing"
1015 ## End: