configure.ac (c4e9543b) | configure.ac (11e97782) |
---|---|
1dnl * ************************************************************* 2dnl * 3dnl * Licensed to the Apache Software Foundation (ASF) under one 4dnl * or more contributor license agreements. See the NOTICE file 5dnl * distributed with this work for additional information 6dnl * regarding copyright ownership. The ASF licenses this file 7dnl * to you under the Apache License, Version 2.0 (the 8dnl * "License"); you may not use this file except in compliance --- 667 unchanged lines hidden (view full) --- 676 relevant in the --without-java case. 677 678 Usage: --with-junit=<absolute path to JUnit 4 jar> 679],,with_junit=yes) 680AC_ARG_WITH(hamcrest-core, 681[ --with-hamcrest-core Specifies the hamcrest-core jar file to use for 682 JUnit-based tests. --without-junit disables those 683 tests. Not relevant in the --without-java or | 1dnl * ************************************************************* 2dnl * 3dnl * Licensed to the Apache Software Foundation (ASF) under one 4dnl * or more contributor license agreements. See the NOTICE file 5dnl * distributed with this work for additional information 6dnl * regarding copyright ownership. The ASF licenses this file 7dnl * to you under the Apache License, Version 2.0 (the 8dnl * "License"); you may not use this file except in compliance --- 667 unchanged lines hidden (view full) --- 676 relevant in the --without-java case. 677 678 Usage: --with-junit=<absolute path to JUnit 4 jar> 679],,with_junit=yes) 680AC_ARG_WITH(hamcrest-core, 681[ --with-hamcrest-core Specifies the hamcrest-core jar file to use for 682 JUnit-based tests. --without-junit disables those 683 tests. Not relevant in the --without-java or |
684 --without-junit cases, and only needed for recent 685 versions of JUnit. (Default: disabled.) 686],,with_hamcrest_core=no) | 684 --without-junit cases, and only needed for JUnit 685 >= 4.11. 686],,with_hamcrest_core=yes) |
687AC_ARG_WITH(perl-home, 688[ --with-perl-home If you have installed the Perl 5 Distribution, on your 689 system, please supply the path here. 690 Note that this is not the location of the Perl binary 691 but the location of the entire distribution. 692 693 Usage: --with-perl-home=<absolute path to Perl 5 home> 694],,) --- 6470 unchanged lines hidden (view full) --- 7165 cat conftest.xml >&5 7166 rm -rf confdir 7167 AC_MSG_ERROR([no. Did you install ant-apache-regexp?]) 7168 fi 7169fi 7170rm -f conftest* core core.* *.core 7171 7172OOO_JUNIT_JAR= | 687AC_ARG_WITH(perl-home, 688[ --with-perl-home If you have installed the Perl 5 Distribution, on your 689 system, please supply the path here. 690 Note that this is not the location of the Perl binary 691 but the location of the entire distribution. 692 693 Usage: --with-perl-home=<absolute path to Perl 5 home> 694],,) --- 6470 unchanged lines hidden (view full) --- 7165 cat conftest.xml >&5 7166 rm -rf confdir 7167 AC_MSG_ERROR([no. Did you install ant-apache-regexp?]) 7168 fi 7169fi 7170rm -f conftest* core core.* *.core 7171 7172OOO_JUNIT_JAR= |
7173JUNIT_NEEDS_HAMCREST= |
|
7173if test "$SOLAR_JAVA" != "" && test "$with_junit" != "no"; then | 7174if test "$SOLAR_JAVA" != "" && test "$with_junit" != "no"; then |
7174 AC_MSG_CHECKING([for JUnit 4]) | 7175 AC_MSG_CHECKING([for JUnit]) |
7175 if test "$with_junit" = "yes"; then 7176 if test -e /usr/share/java/junit4.jar; then | 7176 if test "$with_junit" = "yes"; then 7177 if test -e /usr/share/java/junit4.jar; then |
7177 OOO_JUNIT_JAR=/usr/share/java/junit4.jar | 7178 OOO_JUNIT_JAR=/usr/share/java/junit4.jar |
7178 else | 7179 else |
7179 if test -e /usr/share/lib/java/junit.jar; then 7180 OOO_JUNIT_JAR=/usr/share/lib/java/junit.jar | 7180 if test -e /usr/local/share/java/classes/junit4.jar; then 7181 OOO_JUNIT_JAR=/usr/local/share/java/classes/junit4.jar |
7181 else | 7182 else |
7182 OOO_JUNIT_JAR=/usr/share/java/junit.jar | 7183 if test -e /usr/share/lib/java/junit.jar; then 7184 OOO_JUNIT_JAR=/usr/share/lib/java/junit.jar 7185 else 7186 if test -e /usr/share/local/lib/java/junit.jar; then 7187 OOO_JUNIT_JAR=/usr/share/local/lib/java/junit.jar 7188 else 7189 if test -e /usr/share/java/junit.jar; then 7190 OOO_JUNIT_JAR=/usr/share/java/junit.jar 7191 else 7192 if test -e /usr/local/share/java/classes/junit.jar; then 7193 OOO_JUNIT_JAR=/usr/local/share/java/classes/junit.jar 7194 fi 7195 fi 7196 fi 7197 fi |
7183 fi 7184 fi 7185 else 7186 OOO_JUNIT_JAR=$with_junit 7187 fi | 7198 fi 7199 fi 7200 else 7201 OOO_JUNIT_JAR=$with_junit 7202 fi |
7203 if test -e "$OOO_JUNIT_JAR"; then 7204 AC_MSG_RESULT([yes]) 7205 else 7206 AC_MSG_ERROR([cannot find JUnit 4 jar; please install one in the default 7207locations (/usr/share/java or /usr/local/share/java/classes), specify its pathname via 7208--with-junit=..., or disable it via --without-junit.]) 7209 fi |
|
7188 if test "$_os" = "WINNT"; then 7189 OOO_JUNIT_JAR=`cygpath -m "$OOO_JUNIT_JAR"` 7190 fi | 7210 if test "$_os" = "WINNT"; then 7211 OOO_JUNIT_JAR=`cygpath -m "$OOO_JUNIT_JAR"` 7212 fi |
7191 "$JAVA_HOME/bin/jar" tf "$OOO_JUNIT_JAR" 2>&5 | \ 7192 $GREP org/junit/Before.class > /dev/null 2>&5 7193 if test $? -eq 0; then 7194 AC_MSG_RESULT([$OOO_JUNIT_JAR]) | 7213 AC_MSG_CHECKING([whether JUnit is version 4.x]) 7214 export OOO_JUNIT_JAR 7215 if $PERL -e 'use Archive::Zip; 7216 my $file = "$ENV{'OOO_JUNIT_JAR'}"; 7217 my $zip = Archive::Zip->new( $file ); 7218 my $mf = $zip->contents ( "META-INF/MANIFEST.MF" ); 7219 if ( $mf =~ m/Implementation-Version: 4.12*/ ) { 7220 exit 0; 7221 } elsif ( $mf =~ m/Implementation-Version: 4.11*/ ) { 7222 exit 0; 7223 } else { 7224 exit 1; 7225 }'; then 7226 AC_MSG_RESULT([yes, but Hamcrest Core is mandatory with this JUnit version (>= 4.11)]) 7227 JUNIT_NEEDS_HAMCREST=yes 7228 elif $PERL -e 'use Archive::Zip; 7229 my $file = "$ENV{'OOO_JUNIT_JAR'}"; 7230 my $zip = Archive::Zip->new( $file ); 7231 my $mf = $zip->contents ( "META-INF/MANIFEST.MF" ); 7232 if ( $mf =~ m/Implementation-Version: 4.*/ ) { 7233 exit 0; 7234 } else { 7235 exit 1; 7236 }'; then 7237 AC_MSG_RESULT([yes]) |
7195 else | 7238 else |
7196 AC_MSG_RESULT([no]) 7197 AC_MSG_ERROR([cannot find JUnit 4 jar; please install one in the default 7198location (/usr/share/java), specify its pathname via 7199--with-junit=..., or disable it via --without-junit]) | 7239 AC_MSG_ERROR([no, your JUnit version is too old, you need JUnit 4.x]) |
7200 fi 7201fi 7202AC_SUBST(OOO_JUNIT_JAR) 7203 7204HAMCREST_CORE_JAR= | 7240 fi 7241fi 7242AC_SUBST(OOO_JUNIT_JAR) 7243 7244HAMCREST_CORE_JAR= |
7205if test "$SOLAR_JAVA" != "" && test "$with_junit" != "no" && test "$with_hamcrest_core" != "no"; then | 7245if test "$SOLAR_JAVA" != "" && test "$with_hamcrest_core" != "no"; then |
7206 AC_MSG_CHECKING([for hamcrest-core]) 7207 if test "$with_hamcrest_core" = "yes"; then | 7246 AC_MSG_CHECKING([for hamcrest-core]) 7247 if test "$with_hamcrest_core" = "yes"; then |
7208 if test -e /usr/share/java/hamcrest-core-1.3.jar; then | 7248 if test "$HAMCREST_CORE_JAR" = "" && test -e /usr/share/java/hamcrest-core-1.3.jar; then |
7209 HAMCREST_CORE_JAR=/usr/share/java/hamcrest-core-1.3.jar | 7249 HAMCREST_CORE_JAR=/usr/share/java/hamcrest-core-1.3.jar |
7210 else 7211 if test -e /usr/share/lib/java/hamcrest-core.jar; then 7212 HAMCREST_CORE_JAR=/usr/share/lib/java/hamcrest-core.jar 7213 else 7214 HAMCREST_CORE_JAR=/usr/share/java/hamcrest-core.jar 7215 fi | |
7216 fi | 7250 fi |
7251 if test "$HAMCREST_CORE_JAR" = "" && test -e /usr/local/share/java/classes/hamcrest-core-1.3.jar; then 7252 HAMCREST_CORE_JAR=/usr/local/share/java/classes/hamcrest-core-1.3.jar 7253 fi 7254 if test "$HAMCREST_CORE_JAR" = "" && test -e /usr/share/lib/java/hamcrest-core.jar; then 7255 HAMCREST_CORE_JAR=/usr/share/lib/java/hamcrest-core.jar 7256 fi 7257 if test "$HAMCREST_CORE_JAR" = "" && test -e /usr/local/share/lib/java/hamcrest-core.jar; then 7258 HAMCREST_CORE_JAR=/usr/local/share/lib/java/hamcrest-core.jar 7259 fi 7260 if test "$HAMCREST_CORE_JAR" = "" && test -e /usr/share/java/hamcrest-core.jar; then 7261 HAMCREST_CORE_JAR=/usr/share/java/hamcrest-core.jar 7262 fi 7263 if test "$HAMCREST_CORE_JAR" = "" && test -e /usr/local/share/java/classes/hamcrest-core.jar; then 7264 HAMCREST_CORE_JAR=/usr/local/share/java/classes/hamcrest-core.jar 7265 fi 7266 # Sometimes the "-core-" part is missing... 7267 if test "$HAMCREST_CORE_JAR" = "" && test -e /usr/share/java/hamcrest1.3.jar; then 7268 HAMCREST_CORE_JAR=/usr/share/java/hamcrest1.3.jar 7269 fi 7270 if test "$HAMCREST_CORE_JAR" = "" && test -e /usr/local/share/java/classes/hamcrest1.3.jar; then 7271 HAMCREST_CORE_JAR=/usr/local/share/java/classes/hamcrest1.3.jar 7272 fi 7273 if test "$HAMCREST_CORE_JAR" = "" && test -e /usr/share/lib/java/hamcrest.jar; then 7274 HAMCREST_CORE_JAR=/usr/share/lib/java/hamcrest.jar 7275 fi 7276 if test "$HAMCREST_CORE_JAR" = "" && test -e /usr/local/share/lib/java/hamcrest.jar; then 7277 HAMCREST_CORE_JAR=/usr/local/share/lib/java/hamcrest.jar 7278 fi 7279 if test "$HAMCREST_CORE_JAR" = "" && test -e /usr/share/java/hamcrest.jar; then 7280 HAMCREST_CORE_JAR=/usr/share/java/hamcrest.jar 7281 fi 7282 if test "$HAMCREST_CORE_JAR" = "" && test -e /usr/local/share/java/classes/hamcrest.jar; then 7283 HAMCREST_CORE_JAR=/usr/local/share/java/classes/hamcrest.jar 7284 fi |
|
7217 else 7218 HAMCREST_CORE_JAR=$with_hamcrest_core 7219 fi | 7285 else 7286 HAMCREST_CORE_JAR=$with_hamcrest_core 7287 fi |
7220 if test "$_os" = "WINNT"; then 7221 HAMCREST_CORE_JAR=`cygpath -m "$HAMCREST_CORE_JAR"` 7222 fi 7223 export HAMCREST_CORE_JAR 7224 "$JAVA_HOME/bin/jar" tf "$HAMCREST_CORE_JAR" 2>&5 | \ 7225 $GREP org/hamcrest/core/AllOf.class > /dev/null 2>&5 7226 if test $? -eq 0; then 7227 AC_MSG_RESULT([$HAMCREST_CORE_JAR]) | 7288 if test -e "$HAMCREST_CORE_JAR"; then 7289 AC_MSG_RESULT([yes]) 7290 if test "$_os" = "WINNT"; then 7291 HAMCREST_CORE_JAR=`cygpath -m "$HAMCREST_CORE_JAR"` 7292 fi |
7228 else | 7293 else |
7229 AC_MSG_ERROR([cannot find hamcrest-core jar; please install one in the 7230default location (/usr/share/java), specify its | 7294 if test "$JUNIT_NEEDS_HAMCREST" = "yes"; then 7295 AC_MSG_ERROR([cannot find hamcrest-core jar; please install one in the 7296default locations (/usr/share/java or /usr/local/share/java/classes), specify its |
7231pathname via --with-hamcrest-core=..., or disable | 7297pathname via --with-hamcrest-core=..., or disable |
7232it via --without-hamcrest-core]) | 7298it via --without-hamcrest-core or --without-junit]) 7299 else 7300 AC_MSG_RESULT([no, skipping]) 7301 fi |
7233 fi | 7302 fi |
7303else 7304 if test "$JUNIT_NEEDS_HAMCREST" = "yes"; then 7305 AC_MSG_ERROR([JUnit needs Hamcrest but Hamcrest disabled.]) 7306 fi |
|
7234fi 7235AC_SUBST(HAMCREST_CORE_JAR) 7236 7237AC_MSG_CHECKING([which languages to be built]) 7238WITH_LANG="$with_lang" 7239if test -z "$WITH_LANG"; then 7240 AC_MSG_RESULT([en-US]) 7241else --- 194 unchanged lines hidden --- | 7307fi 7308AC_SUBST(HAMCREST_CORE_JAR) 7309 7310AC_MSG_CHECKING([which languages to be built]) 7311WITH_LANG="$with_lang" 7312if test -z "$WITH_LANG"; then 7313 AC_MSG_RESULT([en-US]) 7314else --- 194 unchanged lines hidden --- |