Subject: compiling php outside of pkgsrc
To: NetBSD users <netbsd-users@netbsd.org>
From: Sam Carleton <scarleton@miltonstreet.com>
List: netbsd-users
Date: 07/13/2004 09:49:17
I am following some instructions that have me building php 4.3.7
outside of pkgsrc and I am running into install problems.  It is a
problem with the library:

iranlib /usr/local/apache2/modules/libphp4.a
chmod 644 /usr/local/apache2/modules/libphp4.a
libtool: install: warning: remember to run `libtool --finish /export/home/sam/src/php-4.3.7/libs'
Warning!  dlname not found in /usr/local/apache2/modules/libphp4.la.
Assuming installing a .so rather than a libtool archive.
chmod 755 /usr/local/apache2/modules/libphp4.so
chmod: /usr/local/apache2/modules/libphp4.so: No such file or
directory
apxs:Error: Command failed with rc=65536

I have been around UNIX long enough to know that .so's are
libraries, but if I am not mistaken different flavors of UNIX have
different extenstions for libraries.  I have these files in
usr/local/apache2/modules :

httpd.exp       libphp4.a       libphp4.la      mod_rewrite.so

Here are the options I used to compile php:

CC=gcc
CFLAGS="-I/usr/local/imap-2004 -I/usr/pkg/include"
LDFLAGS="-L/usr/pkg/lib -R/usr/pkg/lib"

export CC
export CFLAGS
export LDFLAGS

./configure \
    --with-apxs2=/usr/local/apache2/bin/apxs \
    --with-mysql=/usr/pkg \
    --enable-track-vars \
    --with-openssl=/usr/local/ssl \
    --with-imap=/usr/local/imap-2004 \
    --with-gd \
    --enable-ftp \
    --enable-sysvsem \
    --enable-sysvshm \
    --enable-sockets \
    --with-gettext \
    --with-jpeg-dir=/usr/pkg \
    --with-zlib-dir=/usr/local \
    --enable-exif \
    --enable-xslt \
    --with-png-dir=/usr/pkg \
    --with-expat-dir=/usr/pkg \
    --with-iconv=/usr/pkg \
    --with-xslt-sablot=/usr/pkg