I'm a total n00b when it comes to autoconf and automake. And I decided to try to make an Apache2 module that occasionaly writes to a PostgreSQL database. My code compiles fine, make install puts the module in the correct directory, I attempt to start Apache and get:

apache2: Syntax error on line 154 of /etc/apache2/httpd.conf: Syntax error on line 7 of /etc/apache2/modules.d/10_mod_test.conf: Cannot load /usr/lib64/apache2/modules/mod_test.so into server: /usr/lib64/apache2/modules/mod_test.so: undefined symbol: PQsetdbLogin
How do I properly set it up properly so that Apache is PostgreSQL aware?

Makefile.in:

Code:
APXS=@APXS@
APXS_OPTS=-Wc,-Wall -Wc,-DDST_CLASS=@DST_CLASS@
SRC=src/mod_test.c
OBJ=src/.libs/mod_test.so
INCLUDES=/usr/include/postgres

$(OBJ): $(SRC)
    @echo
    $(APXS) $(APXS_OPTS) -I${INCLUDES} -c $(SRC)
    @echo
    @echo write '"make install"' to install module
    @echo

install: $(OBJ)
    $(APXS) $(APXS_OPTS) -I${INCLUDES} -i -a -n mod_test src/mod_test.la

clean:
    rm -f src/.libs/*
    rm -f src/*.o
    rm -f src/*.lo
    rm -f src/*.la
    rm -f src/*.slo
    rmdir src/.libs
Any ideas?