$OpenBSD: patch-configure,v 1.1.1.1 2011/05/14 15:02:50 sthen Exp $
--- configure.orig	Fri Jan 28 22:37:25 2011
+++ configure	Thu May  5 22:19:13 2011
@@ -179,7 +179,7 @@ if ($opt eq ".opt") {
 pr2 "";
 
 $error += check_config(
-  "make -v 2>&1 |grep Make|",
+  "${MAKE_PROGRAM} -v 2>&1 |grep Make|",
   "GNU Make [^0-9]*3\.[0-9]+.*", #version 3.79.1, 3.81
   "make (gnu version) is present.",
   "The program gnu make is missing or is not a good version.
@@ -198,7 +198,7 @@ We need  3.XX",
 my $PY_VERSION;
 if($python) {
     if(check_config(
-	"python --version 2>&1 |",
+	"${MODPY_BIN} --version 2>&1 |",
 	'^Python 2\.([4567]|[4567]\.\S*)$',
 	"python is present",
 	"python is missing or is not a good version."
@@ -207,8 +207,8 @@ if($python) {
 	$python=0;
     }
     if($python) {
-	my $PY_PREFIX = `python pycaml/getprefix.py | tr -d '\n'`;
-	$PY_VERSION = `python pycaml/getversion.py | tr -d '\n'`;
+	my $PY_PREFIX = `${MODPY_BIN} pycaml/getprefix.py | tr -d '\n'`;
+	$PY_VERSION = `${MODPY_BIN} pycaml/getversion.py | tr -d '\n'`;
 	my $python_hdr = "$PY_PREFIX/include/python$PY_VERSION/Python.h";
 	if(check_config(
 	    "ls $python_hdr 2> /dev/null | ",
@@ -377,11 +377,11 @@ OPTBIN=$opt
 my $pythonprefix = $python ? "yes" : "no";
 pr2 "Support for python scripting: $pythonprefix";
 `cd python; ln -sf ${pythonprefix}_pycocci.ml pycocci.ml; `;
-`cd python; make depend`;
+`cd python; ${MAKE_PROGRAM} depend`;
 
 pr2 "Support for ocaml scripting: $ocamlprefix";
 `cd ocaml; ln -sf ${ocamlprefix}_prepare_ocamlcocci.ml prepare_ocamlcocci.ml;`;
-`cd ocaml; make depend`;
+`cd ocaml; ${MAKE_PROGRAM} depend`;
 
 pr2 "Modifying globals/config.ml";
 my $command = "perl -p -e 's#Not_found.\*#Not_found->\\\"$src\\\"#' globals/config.ml.in > globals/config.ml";
