Re: your mail

From: Date: Sun, 16 Apr 2000 21:15:40 +0000
Subject: Re: your mail
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-13613@lists.php.net to get a copy of this message
On Sun, Apr 16, 2000 at 12:17:43PM -0700, Rasmus Lerdorf wrote: > Sascha, could you explain exactly what this function is supposed to do? > > AC_DEFUN(IMAP_LIB_CHK,[ > str="$IMAP_DIR/$1/lib$lib." > if test "echo $str*" != $str'*'; then > IMAP_LIB_DIR=$IMAP_DIR/$1 > break 2 > fi > ]) > > It looks to me like if $lib is set to "c-client" and we call > IMAP_LIB_CHK(lib) it is going to do this test: > > if test "echo /usr/local/lib/libc-client.*" != > /usr/local/lib/libc-client.* > > First, are you sure you want an echo here? Sure, executing libraries does not make much sense. > Second, for some reason the > library that gets added on fbsd is -lc-client even though the actual file > in /usr/local/lib is libc-client4.a Try the attached patch. It makes the test better to understand. It's basically an extension-independent version of checking for lib$lib.(a|so) with added reliability (i.e. HPUX uses .sl as postfix). - Sascha

Index: config.m4 =================================================================== RCS file: /repository/php4/ext/imap/config.m4,v retrieving revision 1.16 diff -u -r1.16 config.m4 --- config.m4 2000/03/05 19:48:23 1.16 +++ config.m4 2000/04/16 21:10:14 @@ -1,12 +1,15 @@ dnl $Id: config.m4,v 1.16 2000/03/05 19:48:23 hholzgra Exp $ AC_DEFUN(IMAP_INC_CHK,[if test -r $i$1/rfc822.h; then IMAP_DIR=$i; IMAP_INC_DIR=$i$1]) + AC_DEFUN(IMAP_LIB_CHK,[ - str="$IMAP_DIR/$1/lib$lib." - if test "`echo $str*`" != $str'*'; then - IMAP_LIB_DIR=$IMAP_DIR/$1 - break 2 - fi + str="$IMAP_DIR/$1/lib$lib.*" + for i in `echo $str`; do + if test -r $i; then + IMAP_LIB_DIR=$IMAP_DIR/$1 + break 2 + fi + done ]) RESULT=no @@ -35,7 +38,7 @@ ln -s "$IMAP_DIR/c-client/c-client.a" "$IMAP_DIR/c-client/libc-client.a" >/dev/null 2>&1 fi - for lib in imap c-client c-client4; do + for lib in imap c-client4 c-client; do IMAP_LIB=$lib IMAP_LIB_CHK(lib) IMAP_LIB_CHK(c-client)
« previous php.version4 (#13613) next »