1dnl * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 2dnl * This source file is part of SableVM. * 3dnl * * 4dnl * See the file "LICENSE" for the copyright information and for * 5dnl * the terms and conditions for copying, distribution and * 6dnl * modification of this source file. * 7dnl * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 8 9dnl *** IMPORTANT: Uncomment the apropriate line below. *** 10dnl a) uncomment for official releases. Please update version number. 11AC_INIT([sablevm], [1.13], [http://sablevm.org/]) 12dnl b) uncomment for development on the trunk 13dnl AC_INIT([sablevm], [trunk+]esyscmd([svn info | grep ^Revision: | awk '{print $2}' | head -n 1 | xargs echo -n]), [http://sablevm.org/]) 14dnl c) uncomment for development on branches. Please update branch name. 15dnl AC_INIT([sablevm], [branchname+]esyscmd([svn info | grep ^Revision: | awk '{print $2}' | head -n 1 | xargs echo -n]), [http://sablevm.org/]) 16dnl The following code makes sure that a branch version has been 17dnl selected above, when developing on a branch in a subversion working 18dnl copy. 19dnl 20dnl If one of the svn, grep or cut command is missing, the script assumes 21dnl that the version is OK. 22if test -d .svn ; then 23 SVN_URL=`svn info | grep ^URL\: | cut -c6- | grep -v '/sablevm/trunk$' | grep -v '/tags/'` 24 if test "x$SVN_URL" != "x" ; then 25 case $PACKAGE_VERSION in 26 trunk+*) echo "$PACKAGE_VERSION is not an appropriate branch version" 27 echo "Please uncomment appropatiate AC INIT macro in configure.ac" 28 exit 1 ;; 29 *+*) ;; 30 *) echo "$PACKAGE_VERSION is not an appropriate branch version" 31 echo "Please uncomment appropatiate AC INIT macro in configure.ac" 32 exit 1 ;; 33 esac 34 fi 35fi 36 37AC_CONFIG_AUX_DIR([.]) 38 39AM_INIT_AUTOMAKE 40 41AM_CONFIG_HEADER(src/include/config.h) 42AC_CONFIG_SRCDIR([src/sablevm/sablevm.c]) 43 44AC_SUBST(LIBRELEASE, ["]AC_PACKAGE_VERSION["]) 45AC_SUBST(RELEASE, AC_PACKAGE_VERSION) 46 47AC_DEFINE_UNQUOTED(_SABLEVM_PACKAGE_NAME, "AC_PACKAGE_TARNAME", package name) 48AC_DEFINE_UNQUOTED(_SABLEVM_PACKAGE_VERSION, "AC_PACKAGE_VERSION", package version) 49 50# TODO: will this parameter be useful? 51#DISTCHECK_CONFIGURE_FLAGS = --with-internal-libffi 52 53AC_DEFINE(_REENTRANT,1,link with reentrant library functions) 54AC_DEFINE(_POSIX_C_SOURCE,199506L,link with POSIX library functions) 55 56dnl should be defined on a finer grain. 57AC_DEFINE(_XOPEN_SOURCE,500,link with XOpen library functions) 58 59dnl *** uncomment to get verbose instructions with inlined engine *** 60dnl AC_DEFINE(_SABLEVM_VERBOSE_INSTRUCTIONS_INLINED,1,Verbose instructions with inlined engine) 61 62AC_DISABLE_STATIC 63AC_CANONICAL_HOST 64 65case $host in 66 sparc-sun-solaris*) AC_DEFINE(_XPG4_2,1,add common BSD extensions) ;; 67 *) ;; 68esac 69 70dnl magic 71AC_ARG_ENABLE(magic, 72 [ --enable-magic 73 put "SableVM" in every object instance header],, 74 [enable_magic=no]) 75 76case "$enable_magic" in 77 no) ;; 78 yes) AC_DEFINE(MAGIC,1,put "SableVM" in every object instance header) ;; 79 *) AC_MSG_ERROR(bad value \"${enable_magic}\" for --enable-magic) ;; 80esac 81 82dnl statistics 83AC_ARG_ENABLE(statistics, 84 [ --enable-statistics 85 print statistics on VM exit],, 86 [enable_statistics=no]) 87 88case "$enable_statistics" in 89 no) ;; 90 yes) AC_DEFINE(STATISTICS,1,print statistics on VM exit) ;; 91 *) AC_MSG_ERROR(bad value \"${enable_statistics}\" for --enable-statistics) ;; 92esac 93 94dnl "real life" brokenness options 95AC_ARG_ENABLE(real-life-brokenness, 96 [ --enable-real-life-brokenness 97 enable things we don't support well and/or we don't 98 want to support (because of their broken nature)], 99 [real_life_brokenness=$enableval], 100 [real_life_brokenness=yes]) 101 102case "$real_life_brokenness" in 103 yes) AC_DEFINE(_SABLEVM_REAL_LIFE_BROKENNESS,1,Enable things we don't support well or don't want to support) ;; 104 no) ;; 105 *) AC_MSG_ERROR("bad value \"${real_life_brokenness}\"for --enable-real-life-brokenness") ;; 106esac 107 108dnl inlinability testing (special mode - not for normal usage) 109AC_ARG_ENABLE(inlinability-testing, 110 [ --enable-inlinability-testing 111 special mode to catch non-inlinable instructions], 112 [enable_inlinability_testing=$enableval], 113 [enable_inlinability_testing=no]) 114 115case "$enable_inlinability_testing" in 116 yes) AC_SUBST(inlinability_testing,"-Dm4svm_inlinability_testing_mode=1") 117 AC_DEFINE(_SABLEVM_INLINABILITY_TESTING,1,turn on inlinability testing mode machinery) 118 ;; 119 no) AC_SUBST(inlinability_testing,"") ;; 120 *) AC_MSG_ERROR("bad value \"${enable_inlinability_testing}\"for --enable-inlinability-testing") ;; 121esac 122 123dnl debugging features 124AC_ARG_ENABLE(debugging-features, 125 [ --enable-debugging-features 126 add compiler and runtime checks],, 127 [enable_debugging_features=no]) 128 129case "$enable_debugging_features" in 130 no) AC_DEFINE(NDEBUG,1,turn off runtime assertions) ;; 131 yes) ;; 132 *) AC_MSG_ERROR("bad value \"${enable_debugging_features}\" for --enable-debugging-features") ;; 133esac 134 135dnl signals for exceptions 136AC_ARG_ENABLE(signals-for-exceptions, 137 [ --disable-signals-for-exceptions 138 do not use signals to detect some exceptions 139 (NullPointerException, ArithmeticException, etc.)],, 140 [if test "$enable_debugging_features" = no; then 141 case $host in 142 alpha*-gnu) enable_signals_for_exceptions=yes ;; 143 arm*-gnu) enable_signals_for_exceptions=yes ;; 144 hppa*-gnu) enable_signals_for_exceptions=no ;; 145 i*86-*-gnu) enable_signals_for_exceptions=yes ;; 146 i386-*-freebsd*)enable_signals_for_exceptions=yes ;; 147 ia64*) enable_signals_for_exceptions=yes ;; 148 m68k*-gnu) enable_signals_for_exceptions=yes ;; 149 powerpc-*-gnu) enable_signals_for_exceptions=yes ;; 150 powerpc-apple-darwin*) 151 enable_signals_for_exceptions=no ;; 152 sparc*-gnu) enable_signals_for_exceptions=yes ;; 153 s390*-gnu) enable_signals_for_exceptions=yes ;; 154 *) enable_signals_for_exceptions=no ;; 155 esac 156 else 157 enable_signals_for_exceptions=no 158 fi]) 159 160dnl garbage collection 161AC_ARG_WITH(gc, 162 [ --with-gc=TYPE use given garbage collector (none,copying,gencopy)],, 163 [with_gc=copying]) 164 165case "$with_gc" in 166 none) AC_DEFINE(_SABLEVM_NO_GC,1,no collector) ;; 167 copying) AC_DEFINE(_SABLEVM_COPY_GC,1,copying collector) ;; 168 gencopy) AC_DEFINE(_SABLEVM_GENCOPY_GC,1,generational copying collector) ;; 169 *) AC_MSG_ERROR(bad value \"${with_gc}\" for --with-gc) ;; 170esac 171 172dnl object layout 173AC_ARG_WITH(obj-layout, 174 [ --with-obj-layout=TYPE use given object layout (bidirectional,traditional)],, 175 [with_obj_layout=bidirectional]) 176 177case "$with_obj_layout" in 178 traditional) AC_DEFINE(_SABLEVM_TRADITIONAL_OBJECT_LAYOUT,1,traditional object layout) ;; 179 bidirectional) AC_DEFINE(_SABLEVM_BIDIRECTIONAL_OBJECT_LAYOUT,1,bidirectional object layout) ;; 180 *) AC_MSG_ERROR(bad value \"${with_obj_layout}\" for --with-obj-layout) ;; 181esac 182 183dnl threading flavor 184AC_ARG_WITH(threading, 185 [ --with-threading=TYPE use given interpreter threading flavor 186 (inlined,direct,switch)],, 187 [if test "$enable_debugging_features" = no; then 188 case $host in 189 alpha*-gnu) with_threading=direct ;; 190 arm*-gnu) with_threading=direct ;; 191 hppa*-gnu) with_threading=direct ;; 192 i*86-*-gnu) with_threading=inlined ;; 193 ia64*) with_threading=direct ;; 194 m68k*-gnu) with_threading=inlined ;; 195 powerpc-*) with_threading=inlined ;; 196 sparc*-gnu) with_threading=inlined ;; 197 s390*-gnu) with_threading=direct ;; 198 x86_64*-gnu) with_threading=direct ;; 199 *) with_threading=direct ;; 200 esac 201 else 202 with_threading=switch 203 fi 204 if test "$enable_inlinability_testing" = yes; then 205 with_threading=inlined 206 fi]) 207 208case "$with_threading" in 209 switch) AC_DEFINE(_SABLEVM_SWITCH_THREADED_INTERPRETER,1,switch threaded interpreter) ;; 210 direct) AC_DEFINE(_SABLEVM_DIRECT_THREADED_INTERPRETER,1,direct threaded interpreter) ;; 211 inlined) AC_DEFINE(_SABLEVM_INLINED_THREADED_INTERPRETER,1,inlined threaded interpreter) ;; 212 *) AC_MSG_ERROR(bad value \"${with_threading}\" for --with-threading) ;; 213esac 214 215dnl NO block reordering - disable (manually!) w/ gcc < 3.0, auto enable if inlined 216AC_ARG_ENABLE(no-reorder-blocks, 217 [ --disable-no-reorder-blocks 218 do not use -fno-reorder-blocks (useful with gcc 2.95)], 219 [enable_no_reorder_blocks=$enableval], 220 [if test "$with_threading" = inlined; then 221 enable_no_reorder_blocks=yes 222 fi]) 223 224dnl errors on warnings 225AC_ARG_ENABLE(errors-on-warnings, 226 [ --disable-errors-on-warnings 227 do not issue an error on warnings],, 228 [case $PACKAGE_VERSION in 229 *+*) enable_errors_on_warnings=yes ;; 230 *) enable_errors_on_warnings=no ;; 231 esac]) 232 233dnl profiling settings 234AC_ARG_WITH(profiling, 235 [ --with-profiling=TYPE enable profiling (nostatic,gprof)],, 236 [ with_profiling=no]) 237 238case "$with_profiling" in 239 no) AC_DEFINE(svm_static,static,[(do not) make internal functions static]) ;; 240 yes|nostatic) AC_DEFINE(svm_static,,[(do not) make internal functions static]) ;; 241 gprof) AC_DEFINE(svm_static,,[(do not) make internal functions static]) 242 CFLAGS="$CFLAGS -pg" ;; 243 *) AC_MSG_ERROR(bad value \"${with_profiling}\" for --with-profiling) ;; 244esac 245 246dnl which libffi to use 247AC_ARG_WITH(internal-libffi, 248 [ --with-internal-libffi use built-in libffi(auto,yes,no)],, 249 [dnl for Cygwin we prefer to use the internal libffi by default 250 case "$host" in 251 *-*-mingw*|*-*-cygwin*) with_internal_libffi=yes ;; 252 *) with_internal_libffi=auto ;; 253 esac 254 ]) 255 256case "$with_internal_libffi" in 257 yes|no|auto) ;; 258 *) AC_MSG_ERROR(bad value \"${with_internal_libffi}\" for --with-internal-libffi) ;; 259esac 260 261dnl which libpopt to use 262AC_ARG_WITH(internal-libpopt, 263 [ --with-internal-libpopt use built-in libpopt(auto,yes,no)],, 264 [ with_internal_libpopt=auto]) 265 266case "$with_internal_libpopt" in 267 yes|no|auto) ;; 268 *) AC_MSG_ERROR(bad value \"${with_internal_libpopt}\" for --with-internal-libpopt) ;; 269esac 270 271dnl which jikes to use in javac-sablevm 272AC_ARG_WITH(jikes, 273 [ --with-jikes=/path/to/jikes use specified jikes as javac],, 274 [ with_jikes=jikes]) 275AC_MSG_CHECKING(for jikes) 276case "$with_jikes" in 277 yes|no|jikes) 278 AC_PATH_PROG(JIKES, "jikes") 279 if test "X$JIKES" = "X"; then 280 JIKES=jikes 281 fi 282 ;; 283 /*|*\$*_prefix*) AC_MSG_RESULT(Will use $JIKES.); JIKES=$with_jikes ;; 284 *) AC_MSG_ERROR(bad value \"${with_jikes}\" for --with-jikes) ;; 285esac 286AC_SUBST(JIKES, $JIKES) 287 288dnl which fastjar to use in jar-sablevm 289AC_ARG_WITH(fastjar, 290 [ --with-fastjar=/path/to/fastjar use specified fastjar],, 291 [ with_fastjar=fastjar]) 292AC_MSG_CHECKING(for fastjar) 293case "$with_fastjar" in 294 yes|no|fastjar) 295 AC_PATH_PROG(FASTJAR, "fastjar") 296 if test "X$FASTJAR" = "X"; then 297 FASTJAR=fastjar 298 fi 299 ;; 300 /*|*\$*_prefix*) AC_MSG_RESULT(Will use $FASTJAR.); FASTJAR=$with_fastjar ;; 301 *) AC_MSG_ERROR(bad value \"${with_fastjar}\" for --with-fastjar) ;; 302esac 303AC_SUBST(FASTJAR, $FASTJAR) 304 305dnl Checks for programs. 306AC_PROG_AWK 307AC_PROG_CC 308AC_PROG_CPP 309AC_PROG_INSTALL 310AC_PROG_LN_S 311AC_PROG_MAKE_SET 312 313AC_LIBTOOL_DLOPEN 314AC_PROG_LIBTOOL 315 316dnl Checks for libraries. 317LIBSVMADD="-lm -lltdl -lz" 318AC_CHECK_LIB(ltdl,lt_dlinit,echo -n,echo ***ERROR: libltdl is missing; exit 1) 319AC_CHECK_LIB(m,fmod,echo -n,echo ***ERROR: libm is missing; exit 1) 320AC_CHECK_LIB(z,inflate,echo -n,echo ***ERROR: zlib/libz is missing; exit 1) 321 322dnl Check if -lrt is needed 323case $host in 324 *-sun-solaris*) 325 dnl we should call AC_CHECK_LIB here, but what symbol should we look up? 326 LIBSVMADD="$LIBSVMADD -lrt" 327 ;; 328 *) ;; 329esac 330 331dnl Check what is the right library for threads 332case $host in 333 *-freebsd*) 334 dnl No thread library to link 335 ;; 336 *) 337 AC_CHECK_LIB(pthread,pthread_self,echo -n,echo ***ERROR: libpthread is missing; exit 1) 338 LIBSVMADD="$LIBSVMADD -lpthread" 339 ;; 340esac 341 342dnl Check libffi availability and use internal if none found 343if test "$with_internal_libffi" = "auto"; then 344 AC_CHECK_LIB(ffi,ffi_prep_cif, 345 [with_internal_libffi=no2], 346 [echo "system-wide libffi is missing, use the built-in one" 347 with_internal_libffi=yes]) 348fi 349case "$with_internal_libffi" in 350 no) AC_CHECK_LIB(ffi,ffi_prep_cif,echo -n,echo ***ERROR: libffi is missing; exit 1) 351 LIBSVMADD="$LIBSVMADD -lffi";; 352 no2) LIBSVMADD="$LIBSVMADD -lffi";; dnl we already checked the lib above 353 yes) ac_configure_args="$ac_configure_args --enable-convenience-only-libffi" 354 LIBSVMADD="$LIBSVMADD ../libffi/libffi_convenience.la" 355 LIBSVMINCLUDE="-I../libffi -I../libffi/include" 356 AC_MSG_CHECKING(which libffi to use) 357 AC_MSG_RESULT(internal.) 358 ;; 359esac 360AC_MSG_CHECKING(which libffi to use) 361case "$with_internal_libffi" in 362 no*) AC_MSG_RESULT(system-wide.);; 363 yes) AC_MSG_RESULT(internal.);; 364esac 365 366dnl Check libpopt availability and use internal if none found 367if test "$with_internal_libpopt" = "auto"; then 368 AC_CHECK_LIB(popt,poptGetContext, 369 [with_internal_libpopt=no2], 370 [echo "system-wide libpopt is missing, use the built-in one" 371 with_internal_libpopt=yes]) 372fi 373case "$with_internal_libpopt" in 374 no) AC_CHECK_LIB(popt,poptGetContext,echo -n,echo ***ERROR: libpopt is missing; exit 1) 375 LIBSVMADD="$LIBSVMADD -lpopt";; 376 no2) LIBSVMADD="$LIBSVMADD -lpopt";;dnl we already checked the lib above 377 yes) ac_configure_args="$ac_configure_args --enable-convenience-only-libpopt" 378 SVMADD="$LIBSVMADD ../libpopt/libpopt_convenience.la" 379 SVMINCLUDE='-I../libpopt -I$(srcdir)/../libpopt' 380 ;; 381esac 382AC_MSG_CHECKING(which libpopt to use) 383case "$with_internal_libpopt" in 384 no*) AC_MSG_RESULT(system-wide.);; 385 yes) AC_MSG_RESULT(internal.);; 386esac 387 388dnl we *always* have to configure subdirs, for explanation see: 389dnl http://docs.biostat.wustl.edu/cgi-bin/info2html?(automake.info.gz)Conditional%2520Subdirectories 390dnl "Any directory listed in `DIST_SUBDIRS' and `SUBDIRS' must be configured." 391AC_CONFIG_SUBDIRS(src/libffi) 392AC_CONFIG_SUBDIRS(src/libpopt) 393 394AM_CONDITIONAL(CONV_LIBFFI, test "$with_internal_libffi" = "yes") 395AM_CONDITIONAL(CONV_LIBPOPT, test "$with_internal_libpopt" = "yes") 396 397AC_SUBST(LIBSVMADD, $LIBSVMADD) 398AC_SUBST(LIBSVMINCLUDE, $LIBSVMINCLUDE) 399AC_SUBST(SVMADD, $SVMADD) 400AC_SUBST(SVMINCLUDE, $SVMINCLUDE) 401 402 403dnl Check whether -no-undefined is required 404case "$host" in 405 *-*-mingw*|*-*-cygwin*) AC_SUBST(NO_UNDEFINED, -no-undefined) ;; 406 *) ;; 407esac 408 409dnl Check which m4 we should use 410if test "x$M4" = "x"; then 411 AC_PATH_PROG(M4, "gm4") 412 if test "x$M4" = "x"; then 413 AC_PATH_PROG(M4, "m4") 414 fi 415fi 416 417if test "x$M4" = "x"; then 418 AC_MSG_WARN('Unable to find operational m4 preprocessor. You might be unable to regenerate some source files.') 419 M4=m4 420else 421 echo -n | $M4 -P || \ 422 (AC_MSG_WARN('Unable to find operational GNU-compatible m4 preprocessor. You might be unable to regenerate some source files.') ) 423fi 424 425AC_SUBST(M4) 426 427 428dnl Checks for header files. 429AC_HEADER_STDC 430AC_CHECK_HEADERS([errno.h fcntl.h stdlib.h string.h sys/time.h unistd.h ctype.h], 431 echo -n,echo ***ERROR: missing header file; exit 1) 432 433dnl Checks for typedefs, structures, and compiler characteristics. 434AC_C_CONST 435AC_C_INLINE 436AC_TYPE_SIZE_T 437AC_HEADER_TIME 438AC_CHECK_TYPE(siginfo_t, 439 has_siginfo=yes; AC_DEFINE(_SABLEVM_HAS_SIGINFO, 1, siginfo_t is supported), 440 has_siginfo=no, 441 [ 442#include <signal.h> 443]) 444 445dnl Handle signals for exceptions based on the availability of siginfo_t. 446if test "$has_siginfo" = no; then 447 enable_signals_for_exceptions=no 448 AC_MSG_WARN([siginfo is not available; use of signals has been disabled]) 449fi 450 451case "$enable_signals_for_exceptions" in 452 no) ;; 453 yes) AC_DEFINE(_SABLEVM_SIGNALS_FOR_EXCEPTIONS,1,use signals to detect exceptions) ;; 454 *) AC_MSG_ERROR(bad value \"${enable_signals_for_exceptions}\" for --enable-signals-for-exceptions) ;; 455esac 456 457dnl Checks for library functions. 458if test x$cross_compiling = xno ; then 459 AC_FUNC_MALLOC 460fi 461AC_FUNC_MMAP 462AC_CHECK_FUNCS([getcwd gettimeofday memmove memset munmap strchr], 463 echo -n,echo ***ERROR: missing library function; exit 1) 464 465dnl GCC specific options 466if test "$GCC" = "yes"; then 467 CFLAGS="$CFLAGS -Wall -fno-gcse -fno-strict-aliasing" 468 469 if test "$enable_no_reorder_blocks" = "yes"; then 470 CFLAGS="$CFLAGS -fno-reorder-blocks -finline-limit=60000" 471 fi 472 473dnl -fverbose-asm -save-temps -fstack-check -funroll-loops 474 475dnl CFLAGS="$CFLAGS -fverbose-asm -save-temps" 476 477 if test "$with_threading" = "switch"; then 478 CFLAGS="$CFLAGS -std=iso9899:1990 -pedantic" 479 fi 480 481 if test "$enable_debugging_features" = "yes"; then 482 if test "$enable_errors_on_warnings" = "yes"; then 483 CFLAGS="$CFLAGS -Werror" 484 fi 485 CFLAGS="$CFLAGS -O0 -W \ 486 -fno-builtin -Wshadow \ 487 -Wpointer-arith -Wbad-function-cast \ 488 -Wundef -Wcast-align -Wwrite-strings \ 489 -Wsign-compare -Wstrict-prototypes \ 490 -Wmissing-prototypes \ 491 -Wmissing-declarations \ 492 -Wnested-externs -Wlong-long" 493 494 elif test "$enable_errors_on_warnings" = "yes"; then 495 enforce_errors_on_warnings=no 496 case $PACKAGE_VERSION in 497 *+*) 498 case $host in 499 i*86*-*-gnu) enforce_errors_on_warnings=yes ;; 500 powerpc-*-gnu) enforce_errors_on_warnings=yes ;; 501 esac 502 ;; 503 esac 504 if test "$enforce_errors_on_warnings" = "yes"; then 505 CFLAGS="$CFLAGS -Werror" 506 fi 507 fi 508 509 if test "$with_threading" = "inlined"; then 510 CFLAGS="$CFLAGS -O2" 511 fi 512 513 case $host in 514 powerpc-apple-darwin*) CFLAGS="$CFLAGS -no-cpp-precomp" 515 CPPFLAGS="$CPPFLAGS -D__powerpc__" 516 ;; 517 esac 518 519 case $host in 520 *-freebsd*) dnl SableVM in FreeBSD ports has all three: 521 dnl -D__XSI_VISIBLE -D__BSD_VISIBLE -D_P1003_1B_VISIBLE 522 dnl however -D__BSD_VISIBLE seems sufficient 523 CFLAGS="$CFLAGS -pthread -D__BSD_VISIBLE" 524 ;; 525 esac 526fi 527 528dnl check whether __func__ is available 529AC_MSG_CHECKING([for __func__ availability]) 530AC_COMPILE_IFELSE(AC_LANG_PROGRAM([ 531 #include <stdio.h> 532 void func() { printf("%s", __func__); }]), 533 [AC_MSG_RESULT([yes]) 534 AC_DEFINE(HAVE___func__, 1, Whether __func__ is available)], 535 [AC_MSG_RESULT([no])] 536) 537 538dnl Detect __clear_cache availability 539 540AC_MSG_CHECKING([for __clear_cache availability]) 541AC_LINK_IFELSE(AC_LANG_PROGRAM([ 542#include <unistd.h> 543extern void __clear_cache (char *beg, char *end); 544void func(void) { 545 char i = 0; 546 __clear_cache(&i, (&i)+sizeof(i)); 547}]), 548 [AC_MSG_RESULT([yes]) 549 AC_DEFINE(HAS_SYSTEM_CLEAR_CACHE,1,Whether __clear_cache is available)], 550 [AC_MSG_RESULT([no])] 551) 552 553dnl -Wid-clash-LEN -Wlarger-than-LEN -Wredundant-decls -Wconversion -Wcast-qual 554dnl -Wmissing-noreturn -Wtraditional -Waggregate-return -ansi -pedantic -Wunreachable-code 555 556AC_CONFIG_FILES([ 557 Makefile 558 doc/Makefile 559 doc/java-sablevm.1 560 doc/sablevm.1 561 src/Makefile 562 src/include/Makefile 563 src/libsablevm/Makefile 564 src/libsablevm/include/Makefile 565 src/libsablevm/inlinability/Makefile 566 src/sablevm/Makefile 567]) 568 569AC_OUTPUT 570