$NetBSD$

Make sure we pass the right location for Python.
Remove stray m4 macro brackets.
--- configure.orig	2013-04-08 06:26:46.000000000 +0000
+++ configure	2013-08-09 09:12:03.643497987 +0000
@@ -16732,19 +16732,15 @@
     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-       [
 #include <sys/types.h>
 #include <netinet/in.h>
 #if HAVE_INTTYPES_H
 # include <inttypes.h>
 #endif
-       ]
 int
 main ()
 {
-[
           return htonll(0);
-       ]
   ;
   return 0;
 }
@@ -19757,21 +19753,17 @@
 
         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-[
                             #include <stdio.h>
                             #include <sys/types.h>
                             #include <asm/types.h>
                             #include <sys/socket.h>
                             #include <linux/netlink.h>
                             #include <linux/rtnetlink.h>
-                            ]
 int
 main ()
 {
-[
                                 int retval = TCA_STATS2;
                                 return (retval);
-                                ]
 
   ;
   return 0;
@@ -19786,22 +19778,21 @@
 
 	cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-[#include <stdio.h>
+#include <stdio.h>
 #include <sys/types.h>
 #include <asm/types.h>
 #include <sys/socket.h>
 #include <linux/netlink.h>
 #include <linux/rtnetlink.h>
-]
+
 int
 main ()
 {
-[
 int main (void)
 {
 	int retval = TCA_STATS;
 	return (retval);
-}]
+}
   ;
   return 0;
 }
@@ -21384,11 +21375,16 @@
 
 PATH="$with_python_path"
 
+if test "x$PYTHON" = "x"
+then
+	PYTHON=python
+fi
+
 if test "x$with_python" = "xyes" && test "x$with_python_prog" = "x"
 then
 	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
 $as_echo_n "checking for python... " >&6; }
-	with_python_prog="`which python 2>/dev/null`"
+	with_python_prog="`which $PYTHON 2>/dev/null`"
 	if test "x$with_python_prog" = "x"
 	then
 		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
@@ -30865,6 +30861,8 @@
   case $ac_option in
   # Handling of the options.
   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+	: Avoid regenerating within pkgsrc
+	exit 0
     ac_cs_recheck=: ;;
   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
     $as_echo "$ac_cs_version"; exit ;;
