apache2.2.22のmakeでエラー

2.2.21と同じconfigureを通してからmakeするとなにやら変数が見つからないとか言ってくる。

/usr/bin/ld: warning: libpq.so.3, needed by /usr/local/apr/lib/libaprutil-1.so, may conflict with libpq.so.5
modules/http/.libs/libmod_http.a(byterange_filter.o)(.text+0xfb8): In function `ap_byterange_filter':
/home/hogehoge/apache/httpd-2.2.22/modules/http/byterange_filter.c:509: undefined reference to `apr_array_clear'
collect2: ld returned 1 exit status
make[1]: *** [httpd] Error 1
make[1]: Leaving directory `/home/hogehoge/apache/httpd-2.2.22'
make: *** [all-recursive] Error 1

apr_array_clearってどこにあるのよ?と探してみると

$ find . -name '*.h' -exec fgrep apr_array_clear {} /dev/null \; 2> /dev/null 
./apr-httpd/include/apr-1/apr_tables.h:APR_DECLARE(void) apr_array_clear(apr_array_header_t *arr);
$

apr-httpd/include以下にあるみたい。

configureのヘルプを参照すると、なんかこれを指定すればinclude見てくれそうな感じがするのでやってみる。

  --with-included-apr     Use bundled copies of APR/APR-Util
$ ./configure --with-mpm=worker --enable-ssl --with-ssl=/usr/local/ssl --enable-auth-ldap --enable-rewrite --enable-proxy --enable-headers --enable-proxy-http --enable-proxy-balancer --enable-file-cache --enable-cache --enable-disk-cache --enable-mem-cache --enable-expires --enable-proxy_ajp --enable-status --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr --with-included-apr
# make

うん、うまく行ったみたいです。