$OpenBSD: patch-autoconf_ast_ext_lib_m4,v 1.1 2010/07/25 10:08:03 sthen Exp $
--- autoconf/ast_ext_lib.m4.orig	Sat Jul 24 10:37:59 2010
+++ autoconf/ast_ext_lib.m4	Sat Jul 24 10:38:00 2010
@@ -46,7 +46,7 @@ AC_ARG_WITH([$1], AC_HELP_STRING([--with-$1=PATH], [us
 		unset $2
 		;;
 	*)
-		if test "x${$2}" = "x"; then
+		if test "x${withval}" = "x"; then
 			m4_ifval($4, [$2="$4"], [:])
 		else
 			$2="${withval}"
