Results 1 to 2 of 2

Thread: autoconf, automake, Apache, Postgres, Oh my!

  1. #1

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256

    autoconf, automake, Apache, Postgres, Oh my!

    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?
    My evil laugh has a squeak in it.

    kristopherwilson.com

  2. #2

    Thread Starter
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256

    Re: autoconf, automake, Apache, Postgres, Oh my!

    Bah! Apparently I was just missing the libraries:

    Code:
    LIB=/usr/lib64/postgresql-8.3/lib64
    Of course I don't know how to make the Makefile cross platform as not everyone will have it installed at that location.
    My evil laugh has a squeak in it.

    kristopherwilson.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width