1dnl --*- sh -*-- 2##xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx## 3## This file is part of ANTLR. See LICENSE.txt for licence ## 4## details. Written by W. Haefelinger ## 5## ## 6## ...............Copyright (C) Wolfgang Haefelinger, 2004 ## 7## ## 8##xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx## 9 10## Process this file with autoconf to produce a configure 11## script. 12AC_INIT(antlr, 2.7.7) 13AC_CONFIG_SRCDIR([LICENSE.txt]) 14AC_CONFIG_AUX_DIR(scripts) 15 16## This shall be the very first config file. Do not change 17## this. 18AC_CONFIG_FILES([scripts/config.vars]) 19AC_CONFIG_FILES([scripts/config.deps]) 20AC_CONFIG_FILES([scripts/config.make]) 21 22AC_CONFIG_FILES([antlr/Version.java]) 23 24AC_SUBST_FILE([stdvars]) 25AC_SUBST_FILE([stddeps]) 26AC_SUBST_FILE([stdmake]) 27 28## ANTLR's core libraries for each supporte language. The variable 29## in uppercase letters denotes the absolute name of the library. 30## When in lower cases letters - see below - the variable just 31## holds the basename. 32AC_SUBST([ANTLR_JAR]) 33AC_SUBST([ANTLR_LIB]) 34AC_SUBST([ANTLR_NET]) 35AC_SUBST([ANTLR_PY]) 36AC_SUBST([ASTFRAME_NET]) 37 38AC_SUBST([antlr_jar]) 39AC_SUBST([antlr_lib]) 40AC_SUBST([antlr_net]) 41AC_SUBST([antlr_py]) 42AC_SUBST([astframe_net]) 43 44AC_SUBST([ANTLRFLAGS]) 45AC_SUBST([ANTLR]) 46AC_SUBST([ANTLR_ACTION_FILES]) 47AC_SUBST([ANTLR_ANTLR_FILES]) 48AC_SUBST([ANTLR_COMPILE_CMD]) 49AC_SUBST([ANTLR_CYGWIN]) 50AC_SUBST([ANTLR_MINGW]) 51AC_SUBST([ANTLR_TOKDEF_FILES]) 52AC_SUBST([ANTLR_WIN32]) 53AC_SUBST([ANTLR_WITH_ANTLR_CMD]) 54AC_SUBST([ANTLR_WITH_ANTLR_JAR]) 55AC_SUBST([ARFLAGS]) 56AC_SUBST([AR]) 57AC_SUBST([AS]) 58AC_SUBST([BOOTCLASSPATH]) 59AC_SUBST([CSHARPCFLAGS]) 60AC_SUBST([CSHARPC]) 61AC_SUBST([CSHARP_COMPILE_CMD]) 62AC_SUBST([CLR]) 63AC_SUBST([CXX_COMPILE_CMD]) 64AC_SUBST([CXX_LIB_CMD]) 65AC_SUBST([CXX_LINK_CMD]) 66AC_SUBST([CYGPATH]) 67AC_SUBST([C_COMPILE_CMD]) 68AC_SUBST([DEBUG]) 69AC_SUBST([EXEEXT]) 70AC_SUBST([JARFLAGS]) 71AC_SUBST([JAR]) 72AC_SUBST([JAR_CMD]) 73AC_SUBST([JAVACFLAGS]) 74AC_SUBST([JAVAC]) 75AC_SUBST([JAVAFLAGS]) 76AC_SUBST([JAVA]) 77AC_SUBST([JAVA_CMD]) 78AC_SUBST([JAVA_COMPILE_CMD]) 79AC_SUBST([LIBEXT]) 80AC_SUBST([MAKE]) 81AC_SUBST([OBJEXT]) 82AC_SUBST([PATCHLEVEL]) 83AC_SUBST([PYTHONFLAGS]) 84AC_SUBST([PYTHON]) 85AC_SUBST([SUBVERSION]) 86AC_SUBST([TIMESTAMP]) 87AC_SUBST([TOUCH]) 88AC_SUBST([VERBOSE]) 89AC_SUBST([VERSION]) 90AC_SUBST([WITH_EXAMPLES]) 91AC_SUBST([abs_this_builddir]) 92AC_SUBST([cxx]) 93AC_SUBST([jar]) 94AC_SUBST([java]) 95AC_SUBST([javac]) 96AC_SUBST([TAR]) 97AC_SUBST([RMF]) 98AC_SUBST([CP]) 99AC_SUBST([ECHO]) 100AC_SUBST([FIND]) 101# create strong named assemblies [true|false(*)] 102AC_SUBST([STRONGNAME]) 103# file containing public/private key pair for creating strong named 104# assemblies (no default value) 105AC_SUBST([KEYFILE]) 106# Allow partially trusted callers (C#) 107AC_SUBST([APTC]) 108 109 110## introduce package information as autoconf vars. 111VERSION=`echo $PACKAGE_VERSION | cut -d . -f 1` 112SUBVERSION=`echo $PACKAGE_VERSION | cut -d . -f 2` 113PATCHLEVEL=`echo $PACKAGE_VERSION | cut -d . -f 3` 114TIMESTAMP=`date +%Y%m%d` 115 116## @abs_this_builddir@ - absolute path to top of build directory. 117## According to GNU autoconf we can rely on that there's a proper 118## pwd around. 119abs_this_builddir=`pwd` 120 121## This is how we compile Java files .. 122JAVA_COMPILE_CMD="/bin/sh $abs_this_builddir/scripts/javac.sh" 123 124## This is how we run Java .. 125JAVA_CMD="/bin/sh $abs_this_builddir/scripts/java.sh" 126 127## This is how we pack Java (class) files .. 128JAR_CMD="/bin/sh $abs_this_builddir/scripts/jar.sh" 129 130## And this is how we are going to compile ANTLR grammar files .. 131ANTLR_COMPILE_CMD="/bin/sh $abs_this_builddir/scripts/antlr.sh" 132 133## This is how we compile CSHARP files .. 134CSHARP_COMPILE_CMD="/bin/sh $abs_this_builddir/scripts/csc.sh" 135 136## This is how we compile C++ files and how we are going to create 137## libantlr.a or antlr.lib etc. .. 138 139CXX_COMPILE_CMD="/bin/sh $abs_this_builddir/scripts/cxx.sh" 140CXX_LIB_CMD="/bin/sh $abs_this_builddir/scripts/lib.sh" 141CXX_LINK_CMD="/bin/sh $abs_this_builddir/scripts/link.sh" 142 143C_COMPILE_CMD="/bin/sh $abs_this_builddir/scripts/c.sh" 144 145ANTLR_JAR="$abs_this_builddir/antlr/antlr.jar" 146ANTLR_NET="$abs_this_builddir/lib/antlr.runtime.dll" 147ASTFRAME_NET="$abs_this_builddir/lib/antlr.astframe.dll" 148ANTLR_PY="$abs_this_builddir/lib/python/antlr/python.py" 149 150## Note: values might be overriden in C++ section. 151OBJEXT=".o" 152LIBEXT=".a" 153ANTLR_LIB="$abs_this_builddir/lib/cpp/src/libantlr.a" 154 155stdvars="scripts/config.vars" 156stddeps="scripts/config.deps" 157stdmake="scripts/config.make" 158 159## 160## option --enable-java 161## 162AX_ARG_ENABLE( 163 [java], 164 [LANG_JAVA], 165 [enable or disable ANTLR for Java (enabled)], 166 [1], 167) 168 169## 170## option --enable-cxx 171## 172AX_ARG_ENABLE( 173 [cxx], 174 [LANG_CXX], 175 [enable or disable ANTLR for C++ (enabled)], 176 [1], 177) 178 179## 180## option --enable-python 181## 182AX_ARG_ENABLE( 183 [python], 184 [LANG_PY], 185 [enable or disable ANTLR for Python (enabled).], 186 [1], 187) 188 189## 190## option --enable-csharp 191## 192AX_ARG_ENABLE( 193 [csharp], 194 [LANG_CS], 195 [enable or disable ANTLR for C# (enabled)], 196 [1], 197) 198 199## 200## option --enable-verbose=<level> 201## 202AX_ARG_ENABLE( 203 [verbose], 204 [VERBOSE], 205 [turn on verbosity when building package.], 206 [0], 207) 208 209## 210## option --enable-debug=<level> 211## 212AX_ARG_ENABLE( 213 [debug], 214 [DEBUG], 215 [set debug level - any value greater zero enables a debug version], 216 [0], 217) 218 219## 220## option --enable-examples 221## 222 223WITH_EXAMPLES=1 224 225AX_ARG_ENABLE( 226 [examples], 227 [WITH_EXAMPLES], 228 [include examples into this configuration (enabled)], 229 [1], 230) 231 232## 233## option --enable-allow-partially-trusted-callers 234## 235 236APTC=1 237 238AX_ARG_ENABLE( 239 [allow-partially-trusted-callers], 240 [APTC], 241 [allow partially trusted callers (C#)], 242 [1], 243) 244 245case $APTC in 246 0) APTC=false ;; 247 *) APTC=true ;; 248esac 249 250 251## 252## option --with-antlr-jar 253## 254ANTLR_WITH_ANTLR_JAR="" 255 256AC_ARG_WITH( 257 [antlr-jar], 258 [AC_HELP_STRING( 259 [--with-antlr-jar=ARG], 260 [use given file (antlr.jar) to bootstrap]) 261 ],[ 262 if test -n "${ANTLR_WITH_ANTLR_CMD}" ; then 263 opts="--with-antlr-jar,--with-antlr-cmd" 264 AC_MSG_ERROR( 265 [this configuration options mutually exclusive: $opts]) 266 fi 267 ANTLR_WITH_ANTLR_JAR="${withval}"] 268) 269 270## 271## option --with-antlr-cmd 272## 273ANTLR_WITH_ANTLR_CMD="" 274 275AC_ARG_WITH( 276 [antlr-cmd], 277 [AC_HELP_STRING( 278 [--with-antlr-cmd=ARG], 279 [use given command to compile ANTLR grammar files while bootstrapping..]) 280 ],[ 281 if test -n "${ANTLR_WITH_ANTLR_JAR}" ; then 282 opts="--with-antlr-jar,--with-antlr-cmd" 283 AC_MSG_ERROR( 284 [this configuration options mutually exclusive: $opts]) 285 fi 286 ANTLR_WITH_ANTLR_CMD="${withval}" 287 ] 288) 289 290## 291## option --with-strong-assemblies 292## 293STRONGNAME=false 294KEYFILE= 295 296AC_ARG_WITH( 297 [strong-assemblies], 298 [AC_HELP_STRING( 299 [--with-strong-assemblies=ARG], 300 [enable strong named assemblies by passing a keyfile holding a public/private key pair (only useful when building C#)]) 301 ],[ 302 STRONGNAME=true 303 KEYFILE="${withval}" 304 ] 305) 306 307AC_ARG_WITH( 308 [bootclasspath], 309 [AC_HELP_STRING( 310 [--with-bootclasspath=ARG], 311 [use this option to set bootclasspath when using jikes. ARG is a white 312 space seperated list of absolute file or directory names, typically 313 /opt/jdk1.3/jre/lib/rt.jar. In most cases this option is not requird 314 as configure tries to detect rt.jar itself. If configure fails or 315 detects the wrong boot library you may use this option. Note that 316 this option is only used when using jikes. 317 ]) 318 ],[ 319 BOOTCLASSPATH="${withval}" 320 ] 321) 322 323AX_ARG_WITH( 324 [cxx], 325 [CXX], 326) 327 328AX_ARG_WITH( 329 [make], 330 [MAKE], 331) 332 333AX_ARG_WITH( 334 [java], 335 [JAVA], 336) 337 338AX_ARG_WITH( 339 [javac], 340 [JAVAC], 341) 342 343AX_ARG_WITH( 344 [jar], 345 [JAR], 346) 347 348AX_ARG_WITH( 349 [python], 350 [PYTHON], 351) 352 353AX_ARG_WITH( 354 [csharpc], 355 [CSHARPC], 356) 357 358#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx# 359# S T A R T T E S T S # 360#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx# 361 362# get host_os set 363AC_CANONICAL_HOST 364 365# Detect cygwin or mingw 366ANTLR_CYGWIN=no 367ANTLR_MINGW=no 368 369AC_MSG_CHECKING(whether this is Cygwin) 370case $host_os in 371 *cygwin* ) 372 ANTLR_CYGWIN=yes 373 ;; 374 *) 375 AC_MSG_RESULT(no) 376 ;; 377esac 378 379AC_MSG_CHECKING(whether this is MinGW) 380case $host_os in 381 *mingw* ) 382 ANTLR_MINGW=yes 383 ;; 384 *) 385 AC_MSG_RESULT(no) 386 ;; 387esac 388 389## Set common file extensions depending on OS we are running on. 390## File extensions depend on C++/C compiler in use. This values 391## are just guesses and redefined further below. 392 393case "${host_os}" in 394 *mingw*|*cygwin*) 395 OBJEXT=".o" 396 LIBEXT=".a" 397 EXEEXT=".exe" 398 ;; 399 *) 400 OBJEXT=".o" 401 LIBEXT=".a" 402 EXEEXT="" 403 ;; 404esac 405 406## Test whether we have cygpath 407test -z "$CYGPATH" && AC_PATH_PROGS(CYGPATH, cygpath$EXEEXT ) 408 409AC_SUBST([CYGPATH_M]) 410AC_SUBST([CYGPATH_W]) 411 412if test -n "$CYGPATH" ; then 413 CYGPATH_M="${CYGPATH} -m" 414 CYGPATH_W="${CYGPATH} -w" 415else 416 CYGPATH_M="echo" 417 CYGPATH_W="echo" 418fi 419 420AC_ARG_VAR( 421 [ANTLRFLAGS], 422 [Use environment variable ANTLRFLAGS to pass some extra flags to antlr 423 when compiling grammar (*.g) files. 424 ] 425) 426 427AX_PATH_PROGS([CP], [/bin/cp /usr/bin/cp cp]) 428AX_PATH_PROGS([ECHO],[/bin/echo /usr/bin/echo echo]) 429AX_PATH_PROGS([FIND],[/bin/find /usr/bin/find find]) 430 431AX_VAR_HEAD([CP]) 432AX_VAR_HEAD([ECHO]) 433AX_VAR_HEAD([FIND]) 434 435#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx# 436# MAKE # 437#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx# 438## Check whether there's a make program around. We search for a 439## couple of well know names within $PATH. A user may skip this 440## search by providing variable $MAKE. 441AC_ARG_VAR( 442 [MAKE], 443 [By default we search for "make", "gmake" and "gnumake" in your PATH 444 as well as "/bin/make" and "/usr/bin/make". You may override this 445 search by using enviromnent variable $MAKE. Note that a GNU make 446 is required to build this package. However, when providing your 447 own candidate a check for GNU make is skipped and all bets are on. 448 ] 449) 450 451## @MAKE@ shall contain absolut path name of make program found. 452 453## Search for well known make programs - take user given MAKE 454## into account. The result will be a list of valid make prog- 455## grams found and will be stored in variable MAKE. 456user_make="${MAKE}" 457AX_PATH_PROGS( 458 [MAKE], 459 [make gmake gnumake /bin/make /usr/bin/make] 460) 461 462## right now we need to have a GNU make around, other makes are 463## not supported and likely to fail. 464if test "x${user_make}" == "x" ; then 465 AX_GNU_MAKE( 466 [MAKE], 467 [AC_MSG_ERROR( [package requires GNU make])] 468 ) 469fi 470 471## we lookup 'make' in PATH. If the one found is not the same 472## as the configured one we issue a warning message. 473AC_PATH_PROGS([just_make],[make],[%]) 474 475case "${just_make}" in 476 ${MAKE}) 477 ;; 478 *) 479 AC_CONFIG_COMMANDS([notice],[ 480 AC_MSG_NOTICE([ 481 --------------------------------------------------------- 482 * WARNING * 483 484 This package has been configured to be build by using 485 486 $MAKE 487 488 It is very likely that just running "make" from the 489 command line will fail. Please remember therefore to 490 use the configured version. 491 ========================================================= 492 ]) 493 ],[ 494 MAKE="${MAKE}" 495 ] 496 ) 497 ;; 498esac 499 500#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx# 501# JAVA # 502#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx# 503## @JAVAC@ shall contain absolut path name of javac program and 504## similar to CXXFLAGS, @JAVACFLAGS@ shall contain all options 505## required to compile JAVA source files. 506 507AC_ARG_VAR( 508 [JAVAC], 509 [By default we search for "jikes", "javac" and "gcj" in your $PATH 510 on how to comile Java source files. You may override this search 511 by using enviromnent variable $JAVAC. JAVAC may contain a list of 512 candidates, either as absolute path names or as a relative one. 513 In case a relative name is given, a search in $PATH will take 514 place, otherwise the absolute name is tried. 515 ] 516) 517AC_ARG_VAR( 518 [JAVACFLAGS], 519 [Environment variable JAVACFLAGS can be used to change or override 520 all flags required to compile Java source files. Note that 521 JAVACFLAGS understands the following: 522 "+ flag1 flag2 .." append "flag1 flag2 .." to precomputed list 523 "- flag1 flag2 .." prepend "flag1 flag2 .." to precomputed list 524 "= flag1 flag2 .. override with flag1 flag2 ..". If there is 525 a need to hardwire additional flags then edit scripts/javac.sh.in 526 and run "CONFIG_FILES=scripts/javac.sh ./config.status" again. 527 ] 528) 529## @JAVA@ shall contain absolut path name of java program and 530## similar to CXXFLAGS, @JAVAFLAGS@ shall contain all options 531## required to run JAVA class files. 532 533AC_ARG_VAR( 534 [JAVA], 535 [By default we search for "java" and "gij" in your PATH on how 536 to run Java class files. You may override this search by 537 using enviromnent variable $JAVA. JAVA may contain a list of 538 candidates, either as absolute path name or as a relative one. 539 In case of a relative name, a search in $PATH will take place. 540 Otherwise the absolute name will be accepted if existing. 541 ] 542) 543AC_ARG_VAR( 544 [JAVAFLAGS], 545 [Shall contain all flags required to run Java class files. 546 You may override by using environment variable JAVAFLAGS. 547 ] 548) 549 550AX_JAVA_PROGS( 551 [JAVA], 552 [java gij], 553 [AX_VAR_HEAD([JAVA])] 554) 555AX_JAVA_PROGS( 556 [JAVAC], 557 [jikes javac gcj], 558 [AX_VAR_HEAD([JAVAC])] 559) 560AX_JAVA_PROGS( 561 [JAR], 562 [fastjar jar], 563 [ 564 AX_VAR_HEAD([JAR]) 565 ] 566) 567 568case $LANG_JAVA in 569 1) 570 jar="`basename $JAR`" 571 jar="`echo ${jar}|sed 's,\..*$,,'`" 572 573 ## This macro tries to determine which javac compiler is 574 ## being used. Well known compilers are gcj, jikes and 575 ## javac. A unknown compiler is treated as if javac has 576 ## been given in the very, very naive hope that all 577 ## javac compiler have at least the same options as the 578 ## original, ie. javac. 579 ## If your compiler is not in the list and does not be- 580 ## have like javac, then you need to extend this macro 581 ## by writing a specialized test. 582 AX_WHICH_JAVAC([javac]) 583 ## Jikes cannot live without having a Java around. Have 584 ## therefore a look into Java installations found for 585 ## a 'rt.jar'. 586 test -n "${BOOTCLASSPATH}" && { 587 for f in ${BOOTCLASSPATH} ; do 588 AC_MSG_CHECKING([bootclasspath \"$f\"]) 589 test -f "${f}" -o -d "${f}" || { 590 AC_MSG_RESULT([does not exist]) 591 AC_MSG_ERROR( 592 [ 593=================================================================== 594Please check arguments given to 595 --with-bootclasspath 596 or 597 \${BOOTCLASSPATH} 598Each argument must be a valid file or directory. Use whitespace to 599seperate your args. 600=================================================================== 601 ]) 602 } 603 AC_MSG_RESULT([good]) 604 done 605 } 606 test -z "${BOOTCLASSPATH}" && { 607 case "${javac}" in 608 jikes) 609 BOOTCLASSPATH="" 610 set x ${JAVA} 611 while test $# -gt 1 ; do 612 x="$2" ; shift 613 d=`dirname $x` 614 test -d "$d" || continue 615 d=`(cd $d && cd .. && pwd)` 616 test -d "$d" || continue 617 test -f "$d/jre/lib/rt.jar" && { 618 BOOTCLASSPATH="$d/jre/lib/rt.jar" 619 ## we need to try whether jikes accept .. (tbd) 620 break 621 } 622 test -f "$d/lib/rt.jar" && { 623 BOOTCLASSPATH="$d/lib/rt.jar" 624 ## we need to try whether jikes accept .. (tbd) 625 break 626 } 627 done 628 ## go for some unusual locations (MacOS) 629 test -z "${BOOTCLASSPATH}" && { 630 fwdir=/System/Library/Frameworks/JavaVM.framework/Versions 631 for x in 1.4.1 1.3.1 ; do 632 if test -f "$fwdir/$x/Classes/classes.jar" ; then 633 BOOTCLASSPATH="$fwdir/$x/Classes/classes.jar" 634 break 635 fi 636 done 637 } 638 ## give up in case we can't set. 639 test -z "${BOOTCLASSPATH}" && { 640 AC_MSG_ERROR( 641 [Unable to set BOOTCLASSPATH - there is no rt.jar around.]) 642 } 643 ;; 644 *) 645 BOOTCLASSPATH="" 646 ;; 647 esac 648 } 649 test -n "${BOOTCLASSPATH}" && { 650 ## Finalize BOOTCLASSPATH. Depending on platform join arguments using 651 ## a different seperator. 652 case $build_os in 653 cygwin) 654 sep=";" 655 ;; 656 *) 657 sep=":" 658 ;; 659 esac 660 set x $BOOTCLASSPATH ; shift 661 BOOTCLASSPATH="$1" 662 shift 663 while test $# -gt 0 ; do 664 BOOTCLASSPATH="${BOOTCLASSPATH}${sep}${1}" 665 shift 666 done 667 } 668 ## Use Java first in list. 669 AX_VAR_HEAD([JAVA]) 670 671 ;; 672esac 673 674#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx# 675# C++ # 676#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx# 677 678case $LANG_CXX in 679 1) 680 AX_PATH_PROGS( 681 [AR], 682 [tlib lib ar /usr/bin/ar] 683 ) 684 ## Try to figure out what C++ compiler shall be used. Note that CC 685 ## clashes on cygwin. While CC is usually SUN's C++ compiler name, 686 ## CC is also present on Cygwin - it's just an alias for gcc. The 687 ## real alias is actually 'cc' but names are searched in non- 688 ## sensitive manner. To solve this problem we use kind of hack 689 ## here and list compilers availabe to known operating systems. 690 case $build_os in 691 cygwin*|mingw*) 692 ## On Cygwin/Microsoft we are aware of Borland C++, Microsoft 693 ## C++ and GNU. 694 cxx_compiler_list="bcc32 cl g++" 695 # FIXME: for bcc32 696 c_compiler_list="cl gcc" 697 ;; 698 *) 699 ## On other platforms we now HP C++ (aCC), IBM C++ (xlC*) and 700 ## of course GNU. If there's a GNU compiler around we prefer 701 ## GNU. This avoids also a problem with vendors having CC 702 ## a symbolic link to "gcc" instead of "g++". 703 cxx_compiler_list="g++ aCC CC xlC xlC_r cxx c++" 704 # FIXME: for other unix flavours 705 c_compiler_list="cc gcc xlc_r acc" 706 ;; 707 esac 708 709 ## Find a compiler for me. If compiler is not in list you can al- 710 ## ways override by using environment varialbe CXX. 711 AC_PROG_CXX([${cxx_compiler_list}]) 712 AC_PROG_CC([${c_compiler_list}]) 713 714 ## just overrule what autoconf figured out - we never asked for 715 ## this anyway. Our handling of compiler options is done below 716 ## in the fine tuning section. 717 CXXFLAGS="" 718 719 ## 'cxx' shall be the canonical compiler name. For example, gcc 720 ## cl, bcc, CC, etc. Note that this is in general not equal to CXX. 721 ## For example, CYGWIN appears to have c++ as name for g++ and cc 722 ## as alias for gcc. 723 ## CXX is used to call the compiler, 'cxx' shall be used for 724 ## decisions based on compiler in use. 725 cxx="" 726 727 if test "x$GXX" = xyes; then 728 cxx="gcc" 729 else 730 cxx=`basename $CXX` 731 cxx=`echo ${cxx}|sed 's,\.@<:@^.@:>@*$,,'` 732 fi 733 734 case ${cxx} in 735 gcc*) 736 cxx='gcc' 737 ;; 738 cl*|CL*) 739 cxx='cl' 740 ## check whether this is Microsoft C++ (tbd) 741 ;; 742 bcc32*|BCC32*) 743 cxx='bcc32' 744 ## check whether this is Borland C++ (tbd) 745 ;; 746 CC*) 747 ## check whether this is SUN C++ (tbd) 748 cxx="CC" 749 ;; 750 xlC*|xlC_r*) 751 cxx="xlC" 752 ## check whether this is IBM C++ (tbd) 753 ;; 754 aCC*) 755 cxx='aCC' 756 ## check whether this is HP C++ (tbd) 757 ;; 758 cxx*) 759 cxx='cxx' 760 ## check for Digital UNIX cxx (Tru64)?? 761 ;; 762 *) 763 ## unknown compiler - good luck. 764 AX_MSG_UNKOWN_CXX 765 ;; 766 esac 767 768 ##xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx## 769 ## COMPILER TUNING SECTION ## 770 ##==============================================================## 771 772 ## compiler tuning has basically removed from this configure 773 ## script as it appears not to be handy and practical. All 774 ## compiler flags are set in cxx.sh.in. If there is any 775 ## change required, go there and change. 776 ## Note that flags given in this file may overrule settings 777 ## given in cxx.sh.in. Therefore, if you "add" flags here, 778 ## put a "+" in front of variable CXXFLAGS. For example, let's 779 ## say you want to add "-g". Then do this: 780 ## 781 ## CXXFLAGS="-g" 782 ## .. 783 ## CXXFLAGS="+ ${CXXFLAGS}" 784 ## 785 ## The addition of "+" CXXFLAGS should be the last action for 786 ## that variable. The net effect is that "-g" will be added to 787 ## flags set in cxx.sh.in. So the result may look like 788 ## gcc -Wall -c -g .. 789 ## 790 ## Similar, put a "-" in front to get "gcc -g -Wall -c .." and 791 ## put nothing or a "=" in front to get "gcc -g ..". 792 ## 793 ## Similar to CXXFLAGS are LDFLAGS and ARFLAGS for linking 794 ## and making a static library. 795 796 case "${cxx}" in 797 cl|bcc32) 798 OBJEXT=".obj" 799 LIBEXT=".lib" 800 EXEEXT=".exe" 801 ANTLR_LIB="$abs_this_builddir/lib/cpp/src/antlr.lib" 802 CPP="${cxx}" 803 CPPFLAGS="-EP" 804 ;; 805 *) 806 OBJEXT=".o" 807 ;; 808 esac 809 810 LDFLAGS= 811 AX_VAR_HEAD([AR]) 812 813 ##xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx## 814 ## END COMPILER TUNING SECTION ## 815 ##==============================================================## 816 817 # Checks for header files. 818 AC_HEADER_STDC 819 AC_CHECK_HEADERS([stdlib.h unistd.h]) 820 821 # Checks for typedefs, structures, and compiler characteristics. 822 AC_C_CONST 823 AC_C_INLINE 824 825 # Checks for library functions. 826 AC_FUNC_MALLOC 827 AC_CHECK_FUNCS([strcasecmp]) 828 829 ## Some further specific test required as are using std C++. 830 ## (tbd) 831 ;; 832esac 833 834## 835test -z "$DOXYGEN" && AC_PATH_PROG(DOXYGEN, doxygen, doxygen, ) 836 837# This seems to convince configure to use an absolute path to the backup 838# install-sh script. 839ac_install_sh="$PWD/scripts/install-sh" 840AC_PROG_INSTALL 841AC_PROG_RANLIB 842 843test -z "$MKDIR" && AC_PATH_PROG(MKDIR, mkdir$EXEEXT, mkdir$EXEEXT ) 844test -z "$RM" && AC_PATH_PROG(RM, rm$EXEEXT, rm$EXEEXT ) 845 846AX_PATH_PROGS( 847 [TAR], 848 [gnutar tar], 849 [AX_VAR_HEAD([TAR])] 850) 851 852AX_PATH_PROGS( 853 [TOUCH], 854 [/bin/touch /usr/bin/touch touch], 855 [AX_VAR_HEAD([TOUCH])] 856) 857 858test -z "$CHMOD" && AC_PATH_PROG(CHMOD, chmod$EXEEXT, chmod$EXEEXT ) 859test -z "$SED" && AC_PATH_PROG(SED, sed$EXEEXT, sed$EXEEXT ) 860test -z "$CAT" && AC_PATH_PROG(CAT, cat$EXEEXT, cat$EXEEXT ) 861test -z "$GREP" && AC_PATH_PROG(GREP, grep$EXEEXT, grep$EXEEXT ) 862 863#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx# 864# PYTHON # 865#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx# 866 867AC_ARG_VAR([PYTHON], 868 [By default we search for "python" in $PATH to execute Python files. 869 Override this by providing a list of candidates in environment 870 variable $PYTHON and use whitespace as spereration character. A 871 candidate can be either a relative or absolute path name. In 872 the former case a lookup in $PATH takes place, in the latter, the 873 absolute path name must exist.]) 874 875AC_ARG_VAR([PYTHONFLAGS],[ 876 Shall contain all flags required to run Python. Override the 877 default by using environment variable $PYTHONFLAGS. 878]) 879 880AX_PYTHON_PROGS( 881 [PYTHON], 882 [python], 883 [AX_VAR_HEAD([PYTHON])] 884) 885 886case $LANG_PY in 887 1) 888 # We need a script that wrap Python calls in order to make Python 889 # ANTLR aware. This script needs to be executable. 890 AC_CONFIG_FILES( 891 [scripts/python.sh], 892 [${CHMOD} a+x scripts/python.sh], 893 [CHMOD=${CHMOD}] 894 ) 895 896 AC_CONFIG_FILES( 897 [scripts/pyantlr.sh:scripts/pyinst.sh.in], 898 [${CHMOD} a+x scripts/pyantlr.sh], 899 [CHMOD=${CHMOD}] 900 ) 901 902 AC_CONFIG_FILES( 903 [lib/python/Makefile] 904 ) 905 906 # We have a Makefile that loops through all python examples. 907 case $WITH_EXAMPLES in 908 1 ) 909 AC_CONFIG_FILES( 910 [examples/python/Makefile] 911 ) 912 AC_CONFIG_FILES([ 913 examples/python/asn1/Makefile \ 914 examples/python/ASTsupport/Makefile \ 915 examples/python/calc/Makefile \ 916 examples/python/columns/Makefile \ 917 examples/python/exprAST/Makefile \ 918 examples/python/filter/Makefile \ 919 examples/python/filterWithRule/Makefile \ 920 examples/python/heteroAST/Makefile \ 921 examples/python/HTML/Makefile \ 922 examples/python/IDL/Makefile \ 923 examples/python/imagNodeAST/Makefile \ 924 examples/python/includeFile/Makefile \ 925 examples/python/inherit.tinyc/Makefile \ 926 examples/python/java/Makefile \ 927 examples/python/lexerTester/Makefile \ 928 examples/python/lexRewrite/Makefile \ 929 examples/python/linkChecker/Makefile \ 930 examples/python/multiLexer/Makefile \ 931 examples/python/multiParser/Makefile \ 932 examples/python/parseBinary/Makefile \ 933 examples/python/pascal/Makefile \ 934 examples/python/cpp/Makefile \ 935 examples/python/preserveWhiteSpace/Makefile \ 936 examples/python/tinybasic/Makefile \ 937 examples/python/tinyc/Makefile \ 938 examples/python/transform/Makefile \ 939 examples/python/treewalk/Makefile \ 940 examples/python/unicode/Makefile \ 941 examples/python/unicode.IDENTs/Makefile \ 942 examples/python/xml/Makefile 943 ]) 944 ;; 945 esac 946 ;; 947esac 948 949#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx# 950# CSHARP # 951#xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx# 952 953AC_ARG_VAR([CSHARPC], 954 [By default we search for "cscc", "msc" and "csc" in $PATH to compile C# files. 955 Override this by providing a list of candidates in environment 956 variable $CSHARP and use whitespace as spereration character. A 957 candidate can be either a relative or absolute path name. In 958 the former case a lookup in $PATH takes place, in the latter, the 959 absolute path name must exist.]) 960 961AC_ARG_VAR([CSHARPCFLAGS],[ 962 Shall contain all flags required to compile a #C file. Override the 963 default by using environment variable $CSHARPCFLAGS. 964]) 965 966AX_CSHARP_PROGS( 967 [CSHARPC], 968 [cscc mcs csc /usr/local/bin/cscc /usr/local/bin/mcs /opt/bin/cscc /opt/bin/mcs], 969 [AX_VAR_HEAD([CSHARPC])] 970) 971 972## get the basename of C# compiler. Depending on basename we try to 973## decide about the CLR. 974test -n "${CSHARPC}" && { 975 csharpc=`basename ${CSHARPC}` 976 csharpc_d=`dirname ${CSHARPC}` 977} 978 979case $csharpc in 980 cscc*) 981 AX_CSHARP_PROGS( 982 [CLR], 983 [${csharpc_d}/ilrun ilrun /usr/local/bin/ilrun /opt/bin/ilrun], 984 [AX_VAR_HEAD([CLR])] 985 ) 986 ;; 987 mcs*) 988 AX_CSHARP_PROGS( 989 [CLR], 990 [${csharpc_d}/mono mono /usr/local/bin/mono /opt/bin/mono], 991 [AX_VAR_HEAD([CLR])] 992 ) 993 ;; 994esac 995 996case $LANG_CS in 997 1) 998 AC_CONFIG_FILES( 999 [scripts/csc.sh], 1000 [${CHMOD} a+x scripts/csc.sh], 1001 [CHMOD=${CHMOD}] 1002 ) 1003 1004 AC_CONFIG_FILES([lib/csharp/Makefile]) 1005 AC_CONFIG_FILES([lib/csharp/antlr.runtime/Makefile]) 1006 AC_CONFIG_FILES([lib/csharp/antlr.astframe/Makefile]) 1007 1008 # We have a Makefile that loops through all python examples. 1009 case $WITH_EXAMPLES in 1010 1) 1011 AC_CONFIG_FILES([examples/csharp/ASTsupport/Makefile]) 1012 AC_CONFIG_FILES([examples/csharp/HTML/Makefile]) 1013 AC_CONFIG_FILES([examples/csharp/IDL/Makefile]) 1014 AC_CONFIG_FILES([examples/csharp/ParseTreeDebug/Makefile]) 1015 AC_CONFIG_FILES([examples/csharp/TokenStreamRewrite/Makefile]) 1016 AC_CONFIG_FILES([examples/csharp/calc/Makefile]) 1017 AC_CONFIG_FILES([examples/csharp/columns/Makefile]) 1018 AC_CONFIG_FILES([examples/csharp/exprAST/Makefile]) 1019 AC_CONFIG_FILES([examples/csharp/filter/Makefile]) 1020 AC_CONFIG_FILES([examples/csharp/filterWithRule/Makefile]) 1021 AC_CONFIG_FILES([examples/csharp/heteroAST/Makefile]) 1022 AC_CONFIG_FILES([examples/csharp/java/Makefile]) 1023 AC_CONFIG_FILES([examples/csharp/multiLexer/Makefile]) 1024 AC_CONFIG_FILES([examples/csharp/parseBinary/Makefile]) 1025 AC_CONFIG_FILES([examples/csharp/preserveWhiteSpace/Makefile]) 1026 AC_CONFIG_FILES([examples/csharp/tinyc/Makefile]) 1027 AC_CONFIG_FILES([examples/csharp/unicode/Makefile]) 1028 AC_CONFIG_FILES([examples/csharp/Makefile]) 1029 ;; 1030 esac 1031 ;; 1032esac 1033 1034# We need a script that wrap java calls in order to make Java 1035# ANTLR aware. This script needs to be executable. 1036AC_CONFIG_FILES( 1037 [scripts/java.sh], 1038 [${CHMOD} a+x scripts/java.sh]) 1039 1040# We need a script that wrap jar calls in order to make Java 1041# ANTLR aware. This script needs to be executable. 1042AC_CONFIG_FILES( 1043 [scripts/jar.sh], 1044 [${CHMOD} a+x scripts/jar.sh]) 1045 1046# We need a script that wrap javac calls in order to make Javac 1047# ANTLR aware. This script needs to be executable. 1048AC_CONFIG_FILES( 1049 [scripts/javac.sh], 1050 [${CHMOD} a+x scripts/javac.sh]) 1051 1052# We need a script that wraps antlr calls 1053AC_CONFIG_FILES( 1054 [scripts/antlr.sh], 1055 [${CHMOD} a+x scripts/antlr.sh]) 1056 1057case $LANG_CXX in 1058 1) 1059 # We need a script that wraps how we compile C++ 1060 AC_CONFIG_FILES([scripts/cxx.sh],[${CHMOD} a+x scripts/cxx.sh]) 1061 1062 # # We need a script that wraps how we link C++ 1063 AC_CONFIG_FILES([scripts/link.sh],[${CHMOD} a+x scripts/link.sh]) 1064 1065 # There's a few C files around so make sure we can compile those as well 1066 AC_CONFIG_FILES([scripts/c.sh],[${CHMOD} a+x scripts/c.sh]) 1067 1068 # We need a script that wraps how we build a (static?) library 1069 AC_CONFIG_FILES([scripts/lib.sh],[${CHMOD} a+x scripts/lib.sh]) 1070 1071 # We need a script that wraps how we run the preprocessor 1072 AC_CONFIG_FILES([scripts/cpp.sh],[${CHMOD} a+x scripts/cpp.sh]) 1073 1074 # C++ library 1075 AC_CONFIG_FILES([lib/cpp/Makefile]) 1076 AC_CONFIG_FILES([lib/cpp/antlr/Makefile]) 1077 AC_CONFIG_FILES([lib/cpp/src/Makefile]) 1078 1079 # C++ examples 1080 case $WITH_EXAMPLES in 1081 1) 1082 AC_CONFIG_FILES([examples/cpp/Makefile]) 1083 AC_CONFIG_FILES([examples/cpp/ASTsupport/Makefile]) 1084 AC_CONFIG_FILES([examples/cpp/calc/Makefile]) 1085 AC_CONFIG_FILES([examples/cpp/exprAST/Makefile]) 1086 AC_CONFIG_FILES([examples/cpp/filter/Makefile]) 1087 AC_CONFIG_FILES([examples/cpp/filterWithRule/Makefile]) 1088 AC_CONFIG_FILES([examples/cpp/flexLexer/Makefile]) 1089 AC_CONFIG_FILES([examples/cpp/HTML/Makefile]) 1090 AC_CONFIG_FILES([examples/cpp/heteroAST/Makefile]) 1091 AC_CONFIG_FILES([examples/cpp/IDL/Makefile]) 1092 AC_CONFIG_FILES([examples/cpp/imagNodeAST/Makefile]) 1093 AC_CONFIG_FILES([examples/cpp/includeFile/Makefile]) 1094 AC_CONFIG_FILES([examples/cpp/inherit.tinyc/Makefile]) 1095 AC_CONFIG_FILES([examples/cpp/java/Makefile]) 1096 AC_CONFIG_FILES([examples/cpp/lexRewrite/Makefile]) 1097 AC_CONFIG_FILES([examples/cpp/multiLexer/Makefile]) 1098 AC_CONFIG_FILES([examples/cpp/multiParser/Makefile]) 1099 AC_CONFIG_FILES([examples/cpp/parseBinary/Makefile]) 1100 AC_CONFIG_FILES([examples/cpp/preserveWhiteSpace/Makefile]) 1101 AC_CONFIG_FILES([examples/cpp/tinyc/Makefile]) 1102 AC_CONFIG_FILES([examples/cpp/tokenStreamRewrite/Makefile]) 1103 AC_CONFIG_FILES([examples/cpp/transform/Makefile]) 1104 AC_CONFIG_FILES([examples/cpp/treewalk/Makefile]) 1105 AC_CONFIG_FILES([examples/cpp/unicode/Makefile]) 1106 ;; 1107 esac 1108 ;; 1109esac 1110 1111# Makefile to build supplementary libraries .. 1112AC_CONFIG_FILES([lib/Makefile]) 1113case $WITH_EXAMPLES in 1114 1) 1115 AC_CONFIG_FILES([examples/Makefile]) 1116 ;; 1117esac 1118 1119AC_CONFIG_FILES([doc/Makefile]) 1120AC_CONFIG_FILES([Makefile]) 1121AC_CONFIG_FILES([scripts/antlr-config scripts/run-antlr scripts/antlr.spec]) 1122 1123case $LANG_JAVA in 1124 1) 1125 AC_CONFIG_FILES([antlr/Makefile]) 1126 case $WITH_EXAMPLES in 1127 1) 1128 AC_CONFIG_FILES([examples/java/ASTsupport/Makefile]) 1129 AC_CONFIG_FILES([examples/java/HTML/Makefile]) 1130 AC_CONFIG_FILES([examples/java/IDL/Makefile]) 1131 AC_CONFIG_FILES([examples/java/calc/Makefile]) 1132 AC_CONFIG_FILES([examples/java/columns/Makefile]) 1133 AC_CONFIG_FILES([examples/java/exprAST/Makefile]) 1134 AC_CONFIG_FILES([examples/java/filter/Makefile]) 1135 AC_CONFIG_FILES([examples/java/filterWithRule/Makefile]) 1136 AC_CONFIG_FILES([examples/java/heteroAST/Makefile]) 1137 AC_CONFIG_FILES([examples/java/imagNodeAST/Makefile]) 1138 AC_CONFIG_FILES([examples/java/includeFile/Makefile]) 1139 AC_CONFIG_FILES([examples/java/inherit.tinyc/Makefile]) 1140 AC_CONFIG_FILES([examples/java/java/Makefile]) 1141 AC_CONFIG_FILES([examples/java/lexRewrite/Makefile]) 1142 AC_CONFIG_FILES([examples/java/linkChecker/Makefile]) 1143 AC_CONFIG_FILES([examples/java/multiLexer/Makefile]) 1144 AC_CONFIG_FILES([examples/java/parseBinary/Makefile]) 1145 AC_CONFIG_FILES([examples/java/pascal/Makefile]) 1146 AC_CONFIG_FILES([examples/java/preserveWhiteSpace/Makefile]) 1147 AC_CONFIG_FILES([examples/java/tinybasic/Makefile]) 1148 AC_CONFIG_FILES([examples/java/tinyc/Makefile]) 1149 AC_CONFIG_FILES([examples/java/transform/Makefile]) 1150 AC_CONFIG_FILES([examples/java/treewalk/Makefile]) 1151 AC_CONFIG_FILES([examples/java/unicode.IDENTs/Makefile]) 1152 AC_CONFIG_FILES([examples/java/unicode/Makefile]) 1153 AC_CONFIG_FILES([examples/java/xml/Makefile]) 1154 AC_CONFIG_FILES([examples/java/Makefile]) 1155 AC_CONFIG_FILES([examples/java/cpp/Makefile]) 1156 ;; 1157 esac 1158 1159 ANTLR_ACTION_FILES="" 1160 ANTLR_ACTION_FILES="${ANTLR_ACTION_FILES} actions/cpp/ActionLexer.java" 1161 ANTLR_ACTION_FILES="${ANTLR_ACTION_FILES} actions/cpp/ActionLexerTokenTypes.java" 1162 ANTLR_ACTION_FILES="${ANTLR_ACTION_FILES} actions/csharp/ActionLexer.java" 1163 ANTLR_ACTION_FILES="${ANTLR_ACTION_FILES} actions/csharp/ActionLexerTokenTypes.java" 1164 ANTLR_ACTION_FILES="${ANTLR_ACTION_FILES} actions/java/ActionLexer.java" 1165 ANTLR_ACTION_FILES="${ANTLR_ACTION_FILES} actions/java/ActionLexerTokenTypes.java" 1166 ANTLR_ACTION_FILES="${ANTLR_ACTION_FILES} actions/python/ActionLexer.java" 1167 ANTLR_ACTION_FILES="${ANTLR_ACTION_FILES} actions/python/ActionLexerTokenTypes.java" 1168 ANTLR_ACTION_FILES="${ANTLR_ACTION_FILES} actions/python/CodeLexer.java" 1169 ANTLR_ACTION_FILES="${ANTLR_ACTION_FILES} actions/python/CodeLexerTokenTypes.java" 1170 1171 ANTLR_ANTLR_FILES="" 1172 ANTLR_ANTLR_FILES="${ANTLR_ANTLR_FILES} ANTLRParser.java" 1173 ANTLR_ANTLR_FILES="${ANTLR_ANTLR_FILES} ANTLRTokenTypes.java" 1174 ANTLR_ANTLR_FILES="${ANTLR_ANTLR_FILES} ANTLRLexer.java" 1175 1176 ANTLR_TOKDEF_FILES="" 1177 ANTLR_TOKDEF_FILES="${ANTLR_TOKDEF_FILES} ANTLRTokdefParser.java" 1178 ANTLR_TOKDEF_FILES="${ANTLR_TOKDEF_FILES} ANTLRTokdefLexer.java" 1179 ANTLR_TOKDEF_FILES="${ANTLR_TOKDEF_FILES} ANTLRTokdefParserTokenTypes.java" 1180 1181 ## This variables can be used in antlr/Makefile 1182 1183 file_list="${ANTLR_ACTION_FILES} ${ANTLR_ANTLR_FILES} ${ANTLR_TOKDEF_FILES}" 1184 if test "x${file_list}" == "x" ; then 1185 : 1186 else 1187 ANTLR_CONFIG_FILES="" 1188 ANTLR_FILE_LIST="" 1189 1190 ## iterate over my file list. If a file exists then don't copy 1191 ## this file - autoconf's behaviour is to delete existing files. 1192 for x in ${file_list} ; do 1193 f="antlr/${x}" 1194 if test -f "${f}" ; then 1195 : 1196 else 1197 f="${f}:${f}" 1198 ANTLR_CONFIG_FILES="${ANTLR_CONFIG_FILES} ${f}" 1199 ANTLR_FILE_LIST="${ANTLR_FILE_LIST} antlr/${x}" 1200 fi 1201 done 1202 1203 ## copy files into build directory and make them writeable (in 1204 ## case we copy them from our depot. The actions necessary here 1205 ## to execute a command (chmod) on a list of files is bit 1206 ## hackish - it may depend on autoconf version in use (works 1207 ## fine for autoconf 2.59). 1208 ## The problem is that autoconf takes the file list literally, 1209 ## ie. we end up in config.status by something like 1210 ## 1211 ## case $ac_file in 1212 ## .. 1213 ## $ANTLR_CONFIG_FILES) chmod a+w .. ;; 1214 ## esac 1215 ## 1216 ## To make this work I'm introducing ANTLR_CONFIG_FILES as kind 1217 ## of 'catch-all' variable. The side effect is that every 1218 ## file with no explicit action will get a "chmod a+w ..." But 1219 ## that should be ok for Makefiles etc. 1220 1221 AC_CONFIG_FILES([ 1222 ${ANTLR_CONFIG_FILES} ],[ 1223 ### echo "config.status: chmod a+w ${ac_file} .." 1224 ${CHMOD} a+w "${ac_file}" ],[ 1225 ANTLR_CONFIG_FILES='*' 1226 ANTLR_FILE_LIST="${ANTLR_FILE_LIST}" 1227 CHMOD="${CHMOD}" 1228 ] 1229 ) 1230 fi 1231 ;; 1232esac 1233 1234## compute basename of core libraries 1235antlr_jar=`basename ${ANTLR_JAR}` 1236antlr_net=`basename ${ANTLR_NET}` 1237antlr_lib=`basename ${ANTLR_LIB}` 1238antlr_py=`basename ${ANTLR_PY}` 1239astframe_net=`basename ${ASTFRAME_NET}` 1240 1241test -z "${JAVA}" && { 1242 JAVA=java 1243} 1244 1245### cygwin has no (supported) Java - users are requested to have java 1246### in their PATH in order to execute "bin/antlr.sh". To support this 1247### I'm making sure that just the basename is used. 1248case $host_os in 1249 *cygwin* |*mingw*|*msys*) 1250 AX_BASENAME([JAVA]) 1251 ;; 1252esac 1253 1254# we assume that we have standard rm arround. This should be checked. 1255RMF="$RM -r -f" 1256 1257AC_OUTPUT 1258