Subject: pkg/22920: devel/flex - bmake substitution failure on Solaris
To: None <gnats-bugs@gnats.netbsd.org>
From: None <mlh@goathill.org>
List: netbsd-bugs
Date: 09/23/2003 13:06:45
>Number:         22920
>Category:       pkg
>Synopsis:       devel/flex -  bmake substitution failure on Solaris
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Sep 23 18:07:03 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     MLH
>Release:        SunOS franklin 5.8 Generic_108528-13 sun4u sparc SUNW,Ultra-5_10
>Organization:
None
	
>Environment:
bootstrap-pkgsrc (current)
>Description:
devel/flex  on solaris :
...
checking whether /usr/pkg/bin/bmake sets $MAKE... ./configure: bad substitution
*** Error code 1

The problem is with:
if eval "test \"`echo '${'ac_cv_prog_make_${ac_make}_set'+set}'`\"
  = set"; then

where ${ac_make} on a solaris box evaluates to /usr/pkg/bin/bmake instead of
just 'make' or 'bmake', resulting in attempting to evaluate the following
variable:
 ${ac_cv_prog_make_/usr/pkg/bin/bmake_set+set}

>How-To-Repeat:
attempt to build devel/flex on Solaris under bootstrap-pkgsrc using 
the lang/gcc compiler
	
>Fix:
(See pkg/22918: devel/m4 - bmake substitution failure on Solaris)

--- configure.orig	2003-09-23 12:49:42.000000000 -0500
+++ configure	2003-09-23 12:50:16.000000000 -0500
@@ -624,7 +624,7 @@
 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
 
 echo $ac_n "checking whether ${MAKE-make} sets \$MAKE""... $ac_c" 1>&4
-set dummy ${MAKE-make}; ac_make=$2
+set dummy `basename ${MAKE-make}`; ac_make=$2
 if eval "test \"`echo '${'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&4
 else
>Release-Note:
>Audit-Trail:
>Unformatted: