$OpenBSD: patch-configure,v 1.1 2012/03/04 16:57:19 dcoppa Exp $
--- configure.orig	Fri Mar  2 11:50:55 2012
+++ configure	Fri Mar  2 11:50:28 2012
@@ -6805,14 +6805,14 @@ fi
 
 
 
-as_ac_Lib=`$as_echo "ac_cv_lib_$(expr substr $CURSES_LIB 3 99)''_getmouse" | $as_tr_sh`
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getmouse in -l$(expr substr $CURSES_LIB 3 99)" >&5
-$as_echo_n "checking for getmouse in -l$(expr substr $CURSES_LIB 3 99)... " >&6; }
+as_ac_Lib=`$as_echo "ac_cv_lib_$(echo ${CURSES_LIB#??})''_getmouse" | $as_tr_sh`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for getmouse in -l$(echo ${CURSES_LIB#??})" >&5
+$as_echo_n "checking for getmouse in -l$(echo ${CURSES_LIB#??})... " >&6; }
 if eval \${$as_ac_Lib+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-l$(expr substr $CURSES_LIB 3 99)  $LIBS"
+LIBS="-l$(echo ${CURSES_LIB#??}) $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
