GPROFNG_CFLAGS = @GPROFNG_CFLAGS@
GPROFNG_CPPFLAGS = @GPROFNG_CPPFLAGS@
GPROFNG_LIBDIR = @GPROFNG_LIBDIR@
+GPROFNG_BROKEN_JAVAC = @GPROFNG_BROKEN_JAVAC@
AM_MAKEFLAGS = \
jdk_inc="$(jdk_inc)" \
runtest=$(RUNTEST); \
if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
$$runtest --tool $(DEJATOOL) --srcdir $${srcroot}/testsuite \
+ GPROFNG_BROKEN_JAVAC="$(GPROFNG_BROKEN_JAVAC)" \
MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS) $(PTHREAD_CFLAGS)" \
LDFLAGS="$(LDFLAGS)" LIBS="$(PTHREAD_LIBS) $(LIBS)" \
BUILDDIR="$(abs_top_builddir)" $(RUNTESTFLAGS); \
# Setup the testing framework, if you have one
EXPECT = expect
FGREP = @FGREP@
+GPROFNG_BROKEN_JAVAC = @GPROFNG_BROKEN_JAVAC@
GPROFNG_CFLAGS = @GPROFNG_CFLAGS@
GPROFNG_CPPFLAGS = @GPROFNG_CPPFLAGS@
GPROFNG_LIBADD = @GPROFNG_LIBADD@
@TCL_TRY_TRUE@ runtest=$(RUNTEST); \
@TCL_TRY_TRUE@ if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
@TCL_TRY_TRUE@ $$runtest --tool $(DEJATOOL) --srcdir $${srcroot}/testsuite \
+@TCL_TRY_TRUE@ GPROFNG_BROKEN_JAVAC="$(GPROFNG_BROKEN_JAVAC)" \
@TCL_TRY_TRUE@ MAKE="$(MAKE)" CC="$(CC)" CFLAGS="$(CFLAGS) $(PTHREAD_CFLAGS)" \
@TCL_TRY_TRUE@ LDFLAGS="$(LDFLAGS)" LIBS="$(PTHREAD_LIBS) $(LIBS)" \
@TCL_TRY_TRUE@ BUILDDIR="$(abs_top_builddir)" $(RUNTESTFLAGS); \
TCL_TRY_TRUE
EXPECT
jdk_inc
+GPROFNG_BROKEN_JAVAC
JAVA
JAVAC
PTHREAD_CFLAGS
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 12138 "configure"
+#line 12139 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 12244 "configure"
+#line 12245 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
fi
+GPROFNG_BROKEN_JAVAC=no
if test "x$enable_gprofng_jp" = x; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find the JDK include directory.
gprofng will be build without support for profiling Java applications.
$as_echo "#define GPROFNG_JAVA_PROFILING 1" >>confdefs.h
+ if test "x$JAVAC" != x; then
+ cat > configtest.java << EOF
+class Simple{
+ public static void main(String args){
+ System.out.println("Hello Java");
+ }
+}
+EOF
+ if { ac_try='$JAVAC conftest.java &5 2>&1'
+ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ GPROFNG_BROKEN_JAVAC=no
+ else
+ GPROFNG_BROKEN_JAVAC=yes
+ fi
+ rm -f configtest.*
+ fi
fi
+
DEBUG=
# Check whether --enable-gprofng-debug was given.
if test "${enable_gprofng_debug+set}" = set; then :
if test "x$enable_gprofng_jp" = x; then
AC_CHECK_HEADER([jni.h], [ enable_gprofng_jp=yes ], [], [] )
fi
+GPROFNG_BROKEN_JAVAC=no
if test "x$enable_gprofng_jp" = x; then
AC_MSG_WARN([ Cannot find the JDK include directory.
gprofng will be build without support for profiling Java applications.
Use --with-jdk=PATH to specify directory for the installed JDK])
else
AC_DEFINE(GPROFNG_JAVA_PROFILING, 1, [Enable java profiling])
+ if test "x$JAVAC" != x; then
+ cat > configtest.java << EOF
+class Simple{
+ public static void main(String args[]){
+ System.out.println("Hello Java");
+ }
+}
+EOF
+ if AC_TRY_COMMAND($JAVAC conftest.java &AS_MESSAGE_LOG_FD 2>&1); then
+ GPROFNG_BROKEN_JAVAC=no
+ else
+ GPROFNG_BROKEN_JAVAC=yes
+ fi
+ rm -f configtest.*
+ fi
fi
+AC_SUBST(GPROFNG_BROKEN_JAVAC)
AC_SUBST(jdk_inc)
DEBUG=
}
}
+global GPROFNG_BROKEN_JAVAC
+
foreach line $table {
set dir [lindex $line 0]
set cflags [lindex $line 1]
verbose [file rootname $line]
verbose running display test $line
- run_display_test $dir $cflags $gprofflags
+ if { $GPROFNG_BROKEN_JAVAC == "yes" && $dir == "jsynprog" } {
+ unsupported $dir
+ } else {
+ run_display_test $dir $cflags $gprofflags
+ }
}