$NetBSD: patch-ao,v 1.2 2002/08/02 20:33:23 jdolecek Exp $ --- configure.in.orig Mon Nov 12 22:45:53 2001 +++ configure.in Fri Aug 2 21:14:58 2002 @@ -204,12 +204,14 @@ dnl ****************************************** dnl Check whether the gnu gcc compiler is used. if test -z "$with_gcc_home"; then - if test "$CC" = "gcc"; then - AC_PATH_PROG(GCC, gcc) - COMPATH=`echo $GCC | $SED -n "s/\/gcc//p"` + dnl NetBSD pkgsrc is guaranteed to have gcc. + dnl if test "$CC" = "gcc"; then + GCC=$CC + COMPATH=`echo $GCC | $AWK '{print $1}' | xargs dirname ` + CCFLAGS=$LDFLAGS; export CCFLAGS; _gcc_include_start=/usr/lib/gcc-lib _gxx_include_start=/usr/include - fi + dnl fi else dnl Compiler has been installed to its own directory and it's home is arg with_gcc_home _gcc_path="$with_gcc_home/bin/gcc" @@ -256,6 +258,9 @@ dnl find include paths now AC_MSG_CHECKING([the GNU gcc include paths]) _gcc_include_path=`find $_gcc_include_start -name $_gcc_version -print 2> /dev/null` + if test "$_os" = "NetBSD" -a -z "$_gcc_include_path"; then + _gcc_include_path="/usr" + fi if test "$_gcc_include_path"; then _multiple=`echo $_gcc_include_path | $AWK '{ if ($2) print "true"; else print "false" }'` if test "$_multiple" = "false"; then @@ -305,7 +310,7 @@ _gcc_include_path="NO_GCC_INCLUDE" fi else - if test "$_os" = "FreeBSD" -o "$_os" = "NetBSD" ; then + if test "$_os" = "FreeBSD" ; then _gcc_include_path="/usr/include/g++" else AC_MSG_WARN([could not find 2.95.2/include directory of the gcc compiler]) @@ -740,6 +745,12 @@ fi if test "$_os" = "FreeBSD" -o "$_os" = "NetBSD"; then _jdk_middle=`echo $_jdk | $AWK -F. '{ if ($2 != 2) print "false"; else print "true" }'` + _jdk_middle3=`echo $_jdk | $AWK -F. '{ if ($2 != 3) print "false"; else print "true" }'` + _jdk_middle4=`echo $_jdk | $AWK -F. '{ if ($2 != 4) print "false"; else print "true" }'` + + if test "$_jdk_middle" = "false" -a \( "$_jdk_middle3" = "true" -o "$_jdk_middle4" = "true" \); then + _jdk_minor="true" + fi fi if test "$_os" = "Linux" -a "$_machine_type" = "sparc"; then _jdk_middle=`echo $_jdk | $AWK -F. '{ if ($2 != 2) print "false"; else print "true" }'` @@ -982,7 +993,7 @@ HAVE_GPC_C="yes" fi -if test "$HAVE_GPC_H" == "yes" -a "$HAVE_GPC_C" == "yes"; then +if test "$HAVE_GPC_H" = "yes" -a "$HAVE_GPC_C" = "yes"; then AC_MSG_RESULT([GPC files found]) else AC_MSG_ERROR([GPC files not found])