$OpenBSD: patch-configure,v 1.2 2013/09/19 16:34:15 dcoppa Exp $
--- configure.orig	Thu Apr 11 10:29:07 2013
+++ configure	Thu Sep 19 17:45:24 2013
@@ -6957,14 +6957,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.  */
 
