ID:               38856
 User updated by:  maya dot negeta+php at gmail dot com
 Reported By:      maya dot negeta+php at gmail dot com
 Status:           Open
 Bug Type:         Documentation problem
 Operating System: FreeBSD 6.1
 PHP Version:      Irrelevant
 New Comment:

Thank you for your reply and patch.
FreeBSD has no GNU expr, and it doesn't have 'substr'.
http://www.freebsd.org/cgi/man.cgi?query=expr&apropos=0&sektion=0&manpath=FreeBSD+6.1-RELEASE&format=html

I changed your patch followings and it seems work.
Is it work on Linux and other OS?

Index: configure.in
===================================================================
RCS file: /repository/phpdoc/configure.in,v
retrieving revision 1.236
diff -u -r1.236 configure.in
--- configure.in        14 Sep 2006 14:58:35 -0000      1.236
+++ configure.in        20 Sep 2006 04:21:36 -0000
@@ -150,7 +150,7 @@
 if test $JADE = "no"; then
   AC_MSG_ERROR([can't find jade or openjade])
 fi
-if test ${JADE:0:15} = "../phpdoc-tools"; then
+if test `expr $JADE : ^../phpdoc-tools`; then
   WINJADE=1
 else
   WINJADE=0


Previous Comments:
------------------------------------------------------------------------

[2006-09-20 03:10:45] [EMAIL PROTECTED]

> I said 'bash' as '/bin/sh is a link of bash.'
OK, I got it.
I found that the pure Bourne Shell (not bash) can't recognize
${parameter:offset:length} style syntax.

I'm sorry to bother you again but could you please try this patch?

# I can't try it by myself because
#  % ls -l /bin/sh
#  lrwxrwxrwx  1 root root 4 Sep  1 09:59 /bin/sh -> bash
# :-(

Index: configure.in
===================================================================
RCS file: /repository/phpdoc/configure.in,v
retrieving revision 1.236
diff -u -r1.236 configure.in
--- configure.in        14 Sep 2006 14:58:35 -0000      1.236
+++ configure.in        20 Sep 2006 02:00:57 -0000
@@ -150,7 +150,7 @@
 if test $JADE = "no"; then
   AC_MSG_ERROR([can't find jade or openjade])
 fi
-if test ${JADE:0:15} = "../phpdoc-tools"; then
+if test `expr substr $JADE 1 15` = "../phpdoc-tools"; then
   WINJADE=1
 else
   WINJADE=0


------------------------------------------------------------------------

[2006-09-17 08:09:44] maya dot negeta+php at gmail dot com

Sorry, I said 'bash' as '/bin/sh is a link of bash.'

Thank you for your patch.
It solves ./configure problem.

------------------------------------------------------------------------

[2006-09-17 00:05:33] [EMAIL PROTECTED]

I tried it on bash, zsh, tcsh, csh, and ksh.
But it worked well every time.

% uname -sr
Linux 2.6.9-34.0.2.EL
% autoconf --version
autoconf (GNU Autoconf) 2.59

Could you please try the following patch?

Index: configure.in
===================================================================
RCS file: /repository/phpdoc/configure.in,v
retrieving revision 1.236
diff -u -r1.236 configure.in
--- configure.in        14 Sep 2006 14:58:35 -0000      1.236
+++ configure.in        16 Sep 2006 23:48:29 -0000
@@ -150,13 +150,7 @@
 if test $JADE = "no"; then
   AC_MSG_ERROR([can't find jade or openjade])
 fi
-if test ${JADE:0:15} = "../phpdoc-tools"; then
-  WINJADE=1
-else
-  WINJADE=0
-fi
 AC_SUBST(JADE)
-AC_SUBST(WINJADE)

 dnl }}}



------------------------------------------------------------------------

[2006-09-16 23:04:35] maya dot negeta+php at gmail dot com

Description:
------------
I checked out phpdoc-ja from cvs.php.net.
And I run ./configure to generate Makefile.
But it returns error.
Just maybe is it only work with bash?

Reproduce code:
---------------
% autoconf259
% ./configure --with-lang=ja
file versions
Makefile.in,v 1.172
configure.in,v 1.236
(snip)
checking for php... /usr/local/bin/php
checking php version... 5.1.6 cli
checking for php.ini path... ./scripts
checking for openjade... /usr/local/bin/openjade
./configure.lineno: 1606: Syntax error: Bad substitution



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=38856&edit=1

Reply via email to