Hello,
        Something seems to have broken in pear that in-turn broke a php module I 
created.

        I developed a drop in module for php4 that worked great for PHP-4.0 to 
PHP-4.0.4.  As of 
PHP-4.0.5 it broke and would no longer build properly.  At link time it is failing to 
link to the proper libraries.

Here's a snippet of the make message.

        /bin/sh /root/tclink-3.2.2-php/php/libtool --mode=link gcc  -I. 
-I/root/tclink-3.2.2-php/php/ -I/root/tclink-3.2.2-php/php/main 
-I/root/tclink-3.2.2-php/php -I/usr/local/include/php -I/usr/local/include/php/main 
-I/usr/local/include/php/Zend -I/usr/local/include/php/TSRM  -DHAVE_CONFIG_H -g -O2   
-o tclink.la -avoid-version -module -rpath /root/tclink-3.2.2-php/php/modules  
tclink.lo  -L/usr/lib -Wl,lcrypto -Wl,lssl
        mkdir .libs
        (cd . && ln -s tclink.lo tclink.o)
        gcc -shared  tclink.lo  -L/usr/lib -lc  -Wl,-soname -Wl,tclink.so -o 
.libs/tclink.so

There -- that last line should have a "-lssl -lcrypto -ltclink" but it does not and 
ends up not linking to the proper libraries.

My config.m4 file worked fine for all the other versions of PHP so I am assuming that 
something in pear broke.  I found a fix on Usenet that worked for 4.0.5 but NOT 4.0.6. 
 The fix was to change this step in the install 

./configure --with-tclink=../C --with-ssl=/usr/lib

to this ...

CFLAGS="$CFLAGS -DHAVE_TCLINK=1 -DCOMPILE_DL_TCLINK=1" ./configure --with-tclink=../C 
--with-ssl=/usr/lib

For anyone who wants to look at my package and try to help me find a workaround the 
package can be found here

http://www.trustcommerce.com/tclink-3.2.2-php.tar.gz

Also, here is my config.m4 file.  I have a feeling it can be a LOT simpler but just 
dont understand the tool well enough to know where to go.

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

dnl $Id: config.m4,v 1.1 2001/03/26 23:26:19 adam Exp $
dnl config.m4 for extension tclink
dnl don't forget to call PHP_EXTENSION(tclink)

PHP_ARG_WITH(ssl, for TCLink (SSL) support,
[  --with-ssl[=DIR]        Include TCLink (SSL) support. DIR is the OpenSSL base
                          directory.], no)

if test "$PHP_SSL" != "no"; then
  AC_MSG_CHECKING(for TCLink (SSL) libraries)

  for i in $PHP_SSL; do
    if test -r $i/libssl.a; then
      TCLINK_SSL_LIB_DIR=$i;
    fi
  done

  if test -z "$TCLINK_SSL_LIB_DIR"; then
    AC_MSG_ERROR(Cannot find SSL library files under $PHP_SSL)
  fi

  AC_MSG_RESULT($TCLINK_SSL_LIB_DIR)

  AC_ADD_LIBRARY_WITH_PATH(crypto, $TCLINK_SSL_LIB_DIR)
  AC_ADD_LIBRARY_WITH_PATH(ssl, $TCLINK_SSL_LIB_DIR)
fi


PHP_ARG_WITH(tclink, for TCLink support,
[  --with-tclink[=DIR]     Include TCLink support. DIR is the TCLink base
                          directory.], no)

if test "$PHP_TCLINK" != "no"; then

  if test "$PHP_SSL" = "no"; then
    AC_MSG_ERROR(Cannot enable support for TCLink without OpenSSL libraries)
  fi

  AC_MSG_CHECKING(for TCLink library)

  for i in $PHP_TCLINK; do
    if test -r $i/tclink.h; then
      TCLINK_INC_DIR=$i
    fi
    if test -r $i/libtclink.a; then
      TCLINK_LIB_DIR=$i
    fi
    if test -r $i/libtclink.so; then
      TCLINK_LIB_DIR=$i
    fi
  done

  if test -z "$TCLINK_INC_DIR"; then
    AC_MSG_ERROR(Cannot find header files under $PHP_TCLINK)
  fi

  if test -z "$TCLINK_LIB_DIR"; then
    AC_MSG_ERROR(Cannot find library files under $PHP_TCLINK)
  fi

  AC_MSG_RESULT($TCLINK_LIB_DIR)

  AC_ADD_LIBRARY_WITH_PATH(tclink, $TCLINK_LIB_DIR, TCLINK_SHARED_LIBADD)
  if test "$ext_shared" = "yes"; then
    TCLINK_SHARED_LIBADD="$TCLINK_SHARED_LIBADD -L$TCLINK_SSL_LIB_DIR -Wl,lcrypto 
-Wl,lssl"
  fi

  AC_ADD_INCLUDE($TCLINK_INC_DIR)

  AC_DEFINE(HAVE_TCLINK, 1, [Whether you have TCLink])
  PHP_EXTENSION(tclink, $ext_shared)
  PHP_SUBST(TCLINK_SHARED_LIBADD)
fi

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

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to