$NetBSD: patch-libjava_configure,v 1.2 2014/04/22 20:46:41 ryoon Exp $

Detect gethostbyname_r properly.

Avoid a reference to the wrapped make in the pkgsrc work directory from
showing up in an installed file.
See: libjava/contrib/aotcompile.py.in

--- libjava/configure.orig	2013-06-20 13:12:44.000000000 +0000
+++ libjava/configure
@@ -22014,6 +22014,14 @@ do :
 if test "x$ac_cv_func_gethostbyname_r" = x""yes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_GETHOSTBYNAME_R 1
+#include <netdb.h>
+int
+main ()
+{
+gethostbyname_r("", 0, 0);
+;
+return 0;
+}
 _ACEOF
 
 
@@ -24867,7 +24875,7 @@ $as_echo "Python modules dir: ${python_m
 
 
 # needed for aot-compile-rpm
-MAKE=`which make`
+MAKE=${PKGSRC_MAKE}
 
 
 # Check whether --enable-aot-compile-rpm was given.
