1065 fi
1066 fi
1067 fi
1068
1069 AC_MSG_CHECKING([for jtreg test harness])
1070 if test "x$JT_HOME" != x; then
1071 AC_MSG_RESULT([$JT_HOME])
1072 else
1073 AC_MSG_RESULT([no, not found])
1074
1075 if test "x$with_jtreg" = xyes; then
1076 AC_MSG_ERROR([--with-jtreg was specified, but no jtreg found.])
1077 fi
1078 fi
1079 fi
1080
1081 UTIL_FIXUP_PATH(JT_HOME)
1082 AC_SUBST(JT_HOME)
1083 ])
1084
1085 # Setup the JIB dependency resolver
1086 AC_DEFUN_ONCE([TOOLCHAIN_SETUP_JIB],
1087 [
1088 AC_ARG_WITH(jib, [AS_HELP_STRING([--with-jib],
1089 [Jib dependency management tool @<:@not used@:>@])])
1090
1091 if test "x$with_jib" = xno || test "x$with_jib" = x; then
1092 # jib disabled
1093 AC_MSG_CHECKING([for jib])
1094 AC_MSG_RESULT(no)
1095 elif test "x$with_jib" = xyes; then
1096 AC_MSG_ERROR([Must supply a value to --with-jib])
1097 else
1098 JIB_HOME="${with_jib}"
1099 AC_MSG_CHECKING([for jib])
1100 AC_MSG_RESULT(${JIB_HOME})
1101 if test ! -d "${JIB_HOME}"; then
1102 AC_MSG_ERROR([--with-jib must be a directory])
1103 fi
1104 JIB_JAR=$(ls ${JIB_HOME}/lib/jib-*.jar)
|
1065 fi
1066 fi
1067 fi
1068
1069 AC_MSG_CHECKING([for jtreg test harness])
1070 if test "x$JT_HOME" != x; then
1071 AC_MSG_RESULT([$JT_HOME])
1072 else
1073 AC_MSG_RESULT([no, not found])
1074
1075 if test "x$with_jtreg" = xyes; then
1076 AC_MSG_ERROR([--with-jtreg was specified, but no jtreg found.])
1077 fi
1078 fi
1079 fi
1080
1081 UTIL_FIXUP_PATH(JT_HOME)
1082 AC_SUBST(JT_HOME)
1083 ])
1084
1085 # Setup the JTReg Regression Test Harness.
1086 AC_DEFUN_ONCE([TOOLCHAIN_SETUP_JTREG_MW],
1087 [
1088 AC_ARG_WITH(jtregMW, [AS_HELP_STRING([--with-jtregMW],
1089 [Regression Test Harness @<:@probed@:>@])])
1090
1091 if test "x$with_jtregMW" = xno; then
1092 # jtreg disabled
1093 AC_MSG_CHECKING([for jtreg test harness])
1094 AC_MSG_RESULT([no, disabled])
1095 elif test "x$with_jtregMW" != xyes && test "x$with_jtregMW" != x; then
1096 # An explicit path is specified, use it.
1097 JT_HOME_MW="$with_jtregMW"
1098 UTIL_FIXUP_PATH([JT_HOME_MW])
1099 if test ! -d "$JT_HOME_MW"; then
1100 AC_MSG_ERROR([jtreg home directory from --with-jtregMW=$with_jtregMW does not exist])
1101 fi
1102
1103 if test ! -e "$JT_HOME_MW/lib/jtreg.jar"; then
1104 AC_MSG_ERROR([jtreg home directory from --with-jtregMW=$with_jtregMW is not a valid jtreg home])
1105 fi
1106
1107 JTREGEXE_MW="$JT_HOME_MW/bin/jtreg"
1108 if test ! -x "$JTREGEXE_MW"; then
1109 AC_MSG_ERROR([jtreg home directory from --with-jtregMW=$with_jtregMW does not contain valid jtreg executable])
1110 fi
1111
1112 AC_MSG_CHECKING([for jtreg test harness])
1113 AC_MSG_RESULT([$JT_HOME_MW])
1114 else
1115 # Try to locate jtreg
1116 if test "x$JT_HOME_MW" != x; then
1117 # JT_HOME_MW set in environment, use it
1118 if test ! -d "$JT_HOME_MW"; then
1119 AC_MSG_WARN([Ignoring JT_HOME_MW pointing to invalid directory: $JT_HOME_MW])
1120 JT_HOME_MW=
1121 else
1122 if test ! -e "$JT_HOME_MW/lib/jtreg.jar"; then
1123 AC_MSG_WARN([Ignoring JT_HOME_MW which is not a valid jtreg home: $JT_HOME_MW])
1124 JT_HOME_MW=
1125 elif test ! -x "$JT_HOME_MW/bin/jtreg"; then
1126 AC_MSG_WARN([Ignoring JT_HOME_MW which does not contain valid jtreg executable: $JT_HOME_MW])
1127 JT_HOME_MW=
1128 else
1129 JTREGEXE_MW="$JT_HOME_MW/bin/jtreg"
1130 AC_MSG_NOTICE([Located jtreg using JT_HOME_MW from environment])
1131 fi
1132 fi
1133 fi
1134
1135 if test "x$JT_HOME_MW" = x; then
1136 # JT_HOME_MW is not set in environment, or was deemed invalid.
1137 # Try to find jtreg on path
1138 UTIL_LOOKUP_PROGS(JTREGEXE_MW, jtreg)
1139 if test "x$JTREGEXE_MW" != x; then
1140 # That's good, now try to derive JT_HOME_MW
1141 JT_HOME_MW=`(cd $($DIRNAME $JTREGEXE_MW)/.. && pwd)`
1142 if test ! -e "$JT_HOME_MW/lib/jtreg.jar"; then
1143 AC_MSG_WARN([Ignoring jtreg from path since a valid jtreg home cannot be found])
1144 JT_HOME_MW=
1145 JTREGEXE_MW=
1146 else
1147 AC_MSG_NOTICE([Located jtreg using jtreg executable in path])
1148 fi
1149 fi
1150 fi
1151
1152 AC_MSG_CHECKING([for jtreg test harness])
1153 if test "x$JT_HOME_MW" != x; then
1154 AC_MSG_RESULT([$JT_HOME_MW])
1155 else
1156 AC_MSG_RESULT([no, not found])
1157
1158 if test "x$with_jtregMW" = xyes; then
1159 AC_MSG_ERROR([--with-jtregMW was specified, but no jtreg found.])
1160 fi
1161 fi
1162 fi
1163
1164 UTIL_FIXUP_EXECUTABLE(JTREGEXE_MW)
1165 UTIL_FIXUP_PATH(JT_HOME_MW)
1166 AC_SUBST(JT_HOME_MW)
1167 AC_SUBST(JTREGEXE_MW)
1168 ])
1169
1170
1171
1172 # Setup the JIB dependency resolver
1173 AC_DEFUN_ONCE([TOOLCHAIN_SETUP_JIB],
1174 [
1175 AC_ARG_WITH(jib, [AS_HELP_STRING([--with-jib],
1176 [Jib dependency management tool @<:@not used@:>@])])
1177
1178 if test "x$with_jib" = xno || test "x$with_jib" = x; then
1179 # jib disabled
1180 AC_MSG_CHECKING([for jib])
1181 AC_MSG_RESULT(no)
1182 elif test "x$with_jib" = xyes; then
1183 AC_MSG_ERROR([Must supply a value to --with-jib])
1184 else
1185 JIB_HOME="${with_jib}"
1186 AC_MSG_CHECKING([for jib])
1187 AC_MSG_RESULT(${JIB_HOME})
1188 if test ! -d "${JIB_HOME}"; then
1189 AC_MSG_ERROR([--with-jib must be a directory])
1190 fi
1191 JIB_JAR=$(ls ${JIB_HOME}/lib/jib-*.jar)
|