From: Ben C. <bcl...@pe...> - 2005-01-21 14:10:36
|
Yves wrote: > Just like when mysql_config is missing :) OK, this is true. But I was trying to understand how the code works, before coping what could be rubbish when applied to PostgreSQL... You have to admit, although the code is perfect and well written, it looks horrible: PG_CONFIG_DIR= AC_ARG_WITH(pg_config_dir, [ --with-pg_config_dir=PATH pg_config full path (default=)],[ if test "$withval" != "no" -a "$withval" != "yes"; then PG_CONFIG_DIR=$withval fi ]) AC_PATH_PROG([PG_CONFIG], pg_config,[no], ${PG_CONFIG_DIR}:${PATH}) if test "x$PG_CONFIG" = "xno"; then AC_MSG_ERROR([Could not find pg_config]) fi My vision goes blurry just looking at it :) Also I found a difference last night when half way there. I got to this same as you: POSTGRESQL_CFLAGS=`${PG_CONFIG} --cflags` POSTGRESQL_LIBS=`${PG_CONFIG} --libs` But in fact needs to be: POSTGRESQL_CFLAGS="-I`${PG_CONFIG} --cflags`" POSTGRESQL_LIBS="-L`${PG_CONFIG} --libs` -lpg" Makes big difference :) Ben. -- Ben Clewett bcl...@pe... PerfParse http://www.perfparse.org PP FAQ http://wiki.perfparse.org/tiki-list_faqs.php |