From owner-freebsd-questions@FreeBSD.ORG Tue May 13 16:25:35 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7042B1065677 for ; Tue, 13 May 2008 16:25:35 +0000 (UTC) (envelope-from developer@grinz.com) Received: from mail.boomhaus.com (emerson.grinz.com [64.219.233.251]) by mx1.freebsd.org (Postfix) with ESMTP id 1DC818FC1F for ; Tue, 13 May 2008 16:25:34 +0000 (UTC) (envelope-from developer@grinz.com) Received: from localhost (localhost.grinz.com [127.0.0.1]) by localhost.boomhaus.com (Postfix) with ESMTP id DAF931BF for ; Tue, 13 May 2008 11:24:54 -0500 (CDT) X-Virus-Scanned: amavisd-new at emerson.grinz.com Received: from mail.boomhaus.com ([127.0.0.1]) by localhost (emerson.grinz.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 1UOHOFhJUJby for ; Tue, 13 May 2008 11:24:54 -0500 (CDT) Received: from grinzport.grinz.com (localhost.grinz.com [127.0.0.1]) by mail.boomhaus.com (Postfix) with ESMTP id 49F2C196 for ; Tue, 13 May 2008 11:24:54 -0500 (CDT) Received: from 74.170.92.99 (SquirrelMail authenticated user ross.emerson.grinz.com) by grinzport.grinz.com with HTTP; Tue, 13 May 2008 11:24:54 -0500 (CDT) Message-ID: <50465.74.170.92.99.1210695894.squirrel@grinzport.grinz.com> Date: Tue, 13 May 2008 11:24:54 -0500 (CDT) From: "Ross Gohlke" To: freebsd-questions@freebsd.org User-Agent: SquirrelMail/1.4.8 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal References: <50602.74.170.92.99.1210629669.squirrel@grinzport.grinz.com> <7daacbbe0805130526j15277b4dp225d5906cc845b91@mail.gmail.com> In-Reply-To: <7daacbbe0805130526j15277b4dp225d5906cc845b91@mail.gmail.com> Subject: Re: Help compiling source code X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: developer@grinz.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 May 2008 16:25:35 -0000 > Give a try with > % ./configure --help > > It should print the configuration available. > > Hope this helps. A ha! That definitely helps, thanks. I will have to play with it a bit, but that is the answer I was looking for. Ross Gohlke > Hi, > > On Tue, May 13, 2008 at 12:01 AM, Ross Gohlke wrote: >> I am a longtime FreeBSD user accustomed to ports. I have never been >> comfortable compiling source code except under the most vanilla of circumstances (ie, when nothing goes wrong). >> QUESTION: How can I change pam-pgsql's configure script to find pgsql's >> libraries? >> The machine in question is a Powerbook G4 (PowerPC) running Mac OS >> 10.4.11. >> I am using MacPorts (equivalent of ports). One small piece of software (available in FreeBSD ports) is a lynchpin of my entire operation - pam-pgsql. >> Pam-pgsql gives me virtual email users which are easily shared between Postfix and Cyrus IMAP while letting me use my SQL backend of >> preference - >> PostgreSQL. >> There is no macport available for pam-pgsql, so I must compile the >> source >> myself. It is not working. My hunch is that the fix is simple - >> something >> with paths, because macports installs PostgreSQL at weird paths and the >> pam-pgsql configure script expects a standard location. >> ## /opt/local/src/pam-pgsql/configure.in >> dnl Configure template for pam_pgsql >> AC_INIT(pam_get_pass.c) >> AC_CONFIG_HEADER(config.h) >> dnl Checks for libraries. >> AC_CHECK_LIB(pam, pam_get_user) >> dnl Checks for header files. >> AC_CANONICAL_HOST >> AC_HEADER_STDC >> AC_CHECK_HEADERS(syslog.h) >> AC_CHECK_HEADERS(netdb.h) >> AC_MSG_CHECKING(for PostgreSQL headers) >> for d in /usr /usr/local /usr/local/pgsql; do >> test -f $d/include/libpq-fe.h && { >> AC_SUBST(PGSQL_INC) >> PGSQL_INC="-I$d/include" >> PG_DIR="$d" >> AC_MSG_RESULT($d/include) >> } >> test -f $d/include/postgresql/libpq-fe.h && { >> AC_SUBST(PGSQL_INC) >> PGSQL_INC="-I$d/include/postgresql" >> PG_DIR="$d" >> AC_MSG_RESULT($d/include/postgresql) >> } >> test -f $d/include/postgresql/8.0/libpq-fe.h && { >> AC_SUBST(PGSQL_INC) >> PGSQL_INC="-I$d/include/postgresql/8.0" >> PG_DIR="$d" >> AC_MSG_RESULT($d/include/postgresql/8.0) >> } >> test -f $d/include/pgsql/libpq-fe.h && { >> AC_SUBST(PGSQL_INC) >> PGSQL_INC="-I$d/include/pgsql" >> PG_DIR="$d" >> AC_MSG_RESULT($d/include/pgsql) >> } >> done >> old_LDFLAGS="$LDFLAGS" >> LDFLAGS="$LDFLAGS -L$PG_DIR/lib" >> AC_CHECK_LIB(pq, PQexecParams, >> [AC_SUBST(PGSQL_LIB) >> PGSQL_LIB="-L$PG_DIR/lib"], >> [AC_MSG_ERROR(could not determine PostgreSQL library location)]) >> LDFLAGS="$old_LDFLAGS" >> ...... >> ## /opt/local/include/postgresql83/ >> -rw-r--r-- 2 root admin 600 May 12 12:25 ecpg_config.h >> -rw-r--r-- 2 root admin 2776 May 12 12:25 ecpg_informix.h -rw-r--r-- 2 root admin 2600 May 12 12:25 ecpgerrno.h >> -rw-r--r-- 2 root admin 2440 May 12 12:25 ecpglib.h >> -rw-r--r-- 2 root admin 2560 May 12 12:25 ecpgtype.h >> drwxr-xr-x 3 root admin 102 May 12 12:26 informix >> drwxr-xr-x 8 root admin 272 May 12 12:26 internal >> drwxr-xr-x 3 root admin 102 May 12 12:26 libpq >> -rw-r--r-- 2 root admin 18410 May 12 12:25 libpq-fe.h >> -rw-r--r-- 2 root admin 21700 May 12 12:25 pg_config.h >> -rw-r--r-- 2 root admin 8954 May 12 12:25 pg_config_manual.h -rw-r--r-- 2 root admin 217 May 12 12:25 pg_config_os.h -rw-r--r-- 2 root admin 814 May 12 12:25 pgtypes_date.h -rw-r--r-- 2 root admin 588 May 12 12:25 pgtypes_error.h -rw-r--r-- 2 root admin 1485 May 12 12:25 pgtypes_interval.h -rw-r--r-- 2 root admin 2306 May 12 12:25 pgtypes_numeric.h -rw-r--r-- 2 root admin 1057 May 12 12:25 pgtypes_timestamp.h -rw-r--r-- 2 root admin 1837 May 12 12:25 postgres_ext.h drwxr-xr-x 40 root admin 1360 May 12 12:26 server >> -rw-r--r-- 2 root admin 834 May 12 12:25 sql3types.h >> -rw-r--r-- 2 root admin 1267 May 12 12:25 sqlca.h >> ## /opt/local/lib/postgresql83/ >> -rwxr-xr-x 2 root admin 106392 May 12 12:25 adminpack.so -rwxr-xr-x 2 root admin 100444 May 12 12:25 ascii_and_mic.so drwxr-xr-x 25 root admin 850 May 12 12:26 bin >> -rwxr-xr-x 2 root admin 106700 May 12 12:25 cyrillic_and_mic.so -rwxr-xr-x 2 root admin 130720 May 12 12:25 dblink.so >> -rwxr-xr-x 2 root admin 425208 May 12 12:25 dict_snowball.so -rwxr-xr-x 2 root admin 100448 May 12 12:25 euc_cn_and_mic.so -rwxr-xr-x 2 root admin 100540 May 12 12:25 >> euc_jis_2004_and_shift_jis_2004.so >> -rwxr-xr-x 2 root admin 104952 May 12 12:25 euc_jp_and_sjis.so -rwxr-xr-x 2 root admin 100476 May 12 12:25 euc_kr_and_mic.so -rwxr-xr-x 2 root admin 105384 May 12 12:25 euc_tw_and_big5.so -rwxr-xr-x 2 root admin 118224 May 12 12:25 fuzzystrmatch.so -rwxr-xr-x 2 root admin 101164 May 12 12:25 latin2_and_win1250.so >> -rwxr-xr-x 2 root admin 100808 May 12 12:25 latin_and_mic.so -rwxr-xr-x 2 root admin 69544 May 12 12:25 libecpg.6.0.dylib lrwxr-xr-x 1 root admin 17 May 12 12:26 libecpg.6.dylib -> libecpg.6.0.dylib >> -rw-r--r-- 2 root admin 110192 May 12 12:25 libecpg.a >> lrwxr-xr-x 1 root admin 17 May 12 12:26 libecpg.dylib -> libecpg.6.0.dylib >> -rwxr-xr-x 2 root admin 21380 May 12 12:25 >> libecpg_compat.3.0.dylib >> lrwxr-xr-x 1 root admin 24 May 12 12:26 >> libecpg_compat.3.dylib >> -> libecpg_compat.3.0.dylib >> -rw-r--r-- 2 root admin 16832 May 12 12:25 libecpg_compat.a lrwxr-xr-x 1 root admin 24 May 12 12:26 libecpg_compat.dylib >> -> >> libecpg_compat.3.0.dylib >> -rw-r--r-- 2 root admin 44848 May 12 12:25 libpgport.a >> -rwxr-xr-x 2 root admin 69040 May 12 12:25 libpgtypes.3.0.dylib lrwxr-xr-x 1 root admin 20 May 12 12:26 libpgtypes.3.dylib -> >> libpgtypes.3.0.dylib >> -rw-r--r-- 2 root admin 90096 May 12 12:25 libpgtypes.a lrwxr-xr-x 1 root admin 20 May 12 12:26 libpgtypes.dylib -> libpgtypes.3.0.dylib >> -rwxr-xr-x 2 root admin 131804 May 12 12:25 libpq.5.1.dylib lrwxr-xr-x 1 root admin 15 May 12 12:26 libpq.5.dylib -> libpq.5.1.dylib >> -rw-r--r-- 2 root admin 196192 May 12 12:25 libpq.a >> lrwxr-xr-x 1 root admin 15 May 12 12:26 libpq.dylib -> libpq.5.1.dylib >> -rwxr-xr-x 2 root admin 100584 May 12 12:25 lo.so >> -rwxr-xr-x 2 root admin 100704 May 12 12:25 pg_buffercache.so -rwxr-xr-x 2 root admin 110600 May 12 12:25 pg_trgm.so >> -rwxr-xr-x 2 root admin 116700 May 12 12:25 pgxml.so >> drwxr-xr-x 4 root admin 136 May 12 12:26 pgxs >> -rwxr-xr-x 2 root admin 220872 May 12 12:25 plpgsql.so >> -rwxr-xr-x 2 root admin 114112 May 12 12:25 tsearch2.so >> -rwxr-xr-x 2 root admin 100448 May 12 12:25 utf8_and_ascii.so -rwxr-xr-x 2 root admin 317580 May 12 12:25 utf8_and_big5.so -rwxr-xr-x 2 root admin 100496 May 12 12:25 utf8_and_cyrillic.so -rwxr-xr-x 2 root admin 219288 May 12 12:25 utf8_and_euc_cn.so -rwxr-xr-x 2 root admin 280844 May 12 12:25 >> utf8_and_euc_jis_2004.so >> -rwxr-xr-x 2 root admin 309400 May 12 12:25 utf8_and_euc_jp.so -rwxr-xr-x 2 root admin 231576 May 12 12:25 utf8_and_euc_kr.so -rwxr-xr-x 2 root admin 428184 May 12 12:25 utf8_and_euc_tw.so -rwxr-xr-x 2 root admin 1112220 May 12 12:25 utf8_and_gb18030.so -rwxr-xr-x 2 root admin 448644 May 12 12:25 utf8_and_gbk.so -rwxr-xr-x 2 root admin 126164 May 12 12:25 utf8_and_iso8859.so -rwxr-xr-x 2 root admin 100520 May 12 12:25 utf8_and_iso8859_1.so >> -rwxr-xr-x 2 root admin 370832 May 12 12:25 utf8_and_johab.so -rwxr-xr-x 2 root admin 280860 May 12 12:25 >> utf8_and_shift_jis_2004.so >> -rwxr-xr-x 2 root admin 219276 May 12 12:25 utf8_and_sjis.so -rwxr-xr-x 2 root admin 370820 May 12 12:25 utf8_and_uhc.so -rwxr-xr-x 2 root admin 121848 May 12 12:25 utf8_and_win.so -rwxr-xr-x 2 root admin 101860 May 12 12:25 uuid-ossp.so % /opt/local/src/pam-pgsql/configure >> checking for gcc... gcc >> checking for C compiler default output file name... a.out >> checking whether the C compiler works... yes >> checking whether we are cross compiling... no >> checking for suffix of executables... >> checking for suffix of object files... o >> checking whether we are using the GNU C compiler... yes >> checking whether gcc accepts -g... yes >> checking for gcc option to accept ANSI C... none needed >> checking for pam_get_user in -lpam... yes >> checking build system type... powerpc-apple-darwin8.11.0 >> checking host system type... powerpc-apple-darwin8.11.0 >> checking how to run the C preprocessor... gcc -E >> checking for egrep... grep -E >> checking for ANSI C header files... yes >> checking for sys/types.h... yes >> checking for sys/stat.h... yes >> checking for stdlib.h... yes >> checking for string.h... yes >> checking for memory.h... yes >> checking for strings.h... yes >> checking for inttypes.h... yes >> checking for stdint.h... yes >> checking for unistd.h... yes >> checking syslog.h usability... yes >> checking syslog.h presence... yes >> checking for syslog.h... yes >> checking netdb.h usability... yes >> checking netdb.h presence... yes >> checking for netdb.h... yes >> checking for PostgreSQL headers... checking for PQexecParams in -lpq... >> no >> configure: error: could not determine PostgreSQL library location I already tried changing /usr to /opt in configure.in, that didn't >> work. >> Any help would be greatly appreciated. > > Give a try with > % ./configure --help > > It should print the configuration available. > > Hope this helps. > >> Ross Gohlke >> _______________________________________________ >> freebsd-questions@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-questions >> To unsubscribe, send any mail to >> "freebsd-questions-unsubscribe@freebsd.org" > > Regards. > > -- > There's this old saying: "Give a man a fish, feed him for a day. Teach a man to fish, feed him for life." > --