common/autoconf/basics.m4

Print this page

        

*** 21,38 **** # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA # or visit www.oracle.com if you need additional information or have any # questions. # AC_DEFUN([ADD_JVM_ARG_IF_OK], [ ! # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3) ! # If so, then append $1 to $2 ! FOUND_WARN=`$3 $1 -version 2>&1 | grep -i warn` ! FOUND_VERSION=`$3 $1 -version 2>&1 | grep " version \""` if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then $2="[$]$2 $1" fi ]) # This will make sure the given variable points to a full and proper # path. This means: --- 21,47 ---- # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA # or visit www.oracle.com if you need additional information or have any # questions. # + # Test if $1 is a valid argument to $3 (often is $JAVA passed as $3) + # If so, then append $1 to $2\ + # Also set JVM_ARG_OK to true/false depending on outcome. AC_DEFUN([ADD_JVM_ARG_IF_OK], [ ! $ECHO "Check if jvm arg is ok: $1" >&AS_MESSAGE_LOG_FD ! $ECHO "Command: $3 $1 -version" >&AS_MESSAGE_LOG_FD ! OUTPUT=`$3 $1 -version 2>&1` ! FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn` ! FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""` if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then $2="[$]$2 $1" + JVM_ARG_OK=true + else + $ECHO "Arg failed:" >&AS_MESSAGE_LOG_FD + $ECHO "$OUTPUT" >&AS_MESSAGE_LOG_FD + JVM_ARG_OK=false fi ]) # This will make sure the given variable points to a full and proper # path. This means: