Need help with config.m4 percularities
| From: | Kevin Shallow | Date: | Tue, 06 Jun 2000 15:35:03 +0000 |
| Subject: | Need help with config.m4 percularities | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-20338@lists.php.net to get a copy of this message | ||
Hello. I apoligize in advance if I have directed this
to the wrong list. If so, please point me in the right
direction.
I have written a php extension that encapuslates some
functionality of an old legacy system we use here in
the office. Unfortuantly I am having a bit of trouble
getting the PHP-4.0.0 configuration process to accept
it. I am operating under the assumption that
extensions are added into PHP4 as follows:
1) run the ext_skel script with the extension name
2) modify the ext/[extension]/config.m4 script to do
what it needs to do.
3) run the buildconf script
4) hack away at the new module
5) configure
6) compile
The only problem is that when I run the configure
script, it fails to link against the library I
explicity add in the config.m4 script and produces the
following debug.log file:
- debug.log ----------------------------------
CONFIGURE: './configure' '--with-codebase=yes'
'--enable-track-vars'
'--with-config-file-path=/etc/httpd/'
'--with-apache=../apache_1.3.11'
CC: gcc
CFLAGS: -g -O2
CPPFLAGS:
CXX:
CXXFLAGS:
INCLUDES: -I/tmp/php/apache_1.3.11/src/include
-I/tmp/php/apache_1.3.11/src/os/unix
-I$(top_builddir)/Zend -I$(top_srcdir)
-I/usr/local/codebase/include
-I/tmp/php/php-4.0.0/ext/mysql/libmysql
LDFLAGS:
LIBS: -lttf -lgd -lcb -lresolv -lm -ldl -lcrypt
-lnsl -lresolv
DLIBS:
SAPI: apache
PHP_RPATHS: /usr/local/codebase/lib
uname -a: Linux kevin 2.2.12-20 #1 Mon Sep 27
10:40:35 EDT 1999 i686 unknown
gcc -o conftest -g -O2 conftest.c -lttf -lgd -lcb
-lresolv -lm -ldl -lcrypt -lnsl -lresolv 1>&5
/usr/bin/ld: cannot open -lcb: No such file or
directory
collect2: ld returned 1 exit status
---------------------------------------
I don't see why this is an issue since I tell the
configure script where to find the library in my
config.m4 script.
- config.m4
-------------------------------------------
dnl $Id: config.m4,v 1.6 2000/05/02 04:27:02 sas Exp $
PHP_ARG_WITH(codebase, Codebase support,
[ --with-codebase[=DIR] Include Codebase support.
Visit http://www.sequitter.com for
information on the Codebase
library. DIR is the Codebase home
directory, defaults to
/usr/local/codebase.])
if test "$PHP_CODEBASE" != "no"; then
if test "$PHP_CODEBASE" = "yes"; then
CODEBASE_INCDIR=/usr/local/codebase/include
CODEBASE_LIBDIR=/usr/local/codebase/lib
else
CODEBASE_INCDIR=$PHP_CODEBASE/include
CODEBASE_LIBDIR=$PHP_CODEBASE/lib
fi
AC_ADD_INCLUDE($CODEBASE_INCDIR)
AC_ADD_LIBRARY_WITH_PATH(cb, $CODEBASE_LIBDIR,
$CODEBASE_SHARED_LIBADD)
PHP_EXTENSION(codebase, $ext_shared)
AC_DEFINE(HAVE_CODEBASE,1,[ ])
fi
---------------------------------------------------
Any help would be appreciated.
_Kevin Shallow
__________________________________________________
Do You Yahoo!?
Yahoo! Photos -- now, 100 FREE prints!
http://photos.yahoo.com