Re: pg_config/share_dir - Mailing list pgsql-hackers

From Darcy Buskermolen
Subject Re: pg_config/share_dir
Date
Msg-id 200509071706.41713.darcy@wavefire.com
Whole thread Raw
In response to Re: pg_config/share_dir  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: pg_config/share_dir
Re: pg_config/share_dir
List pgsql-hackers
On Wednesday 07 September 2005 15:52, Andrew Dunstan wrote:
> Peter Eisentraut wrote:
> >Andrew Dunstan wrote:
> >>pg_config doesn't currently seem to have an option to report the
> >>share_dir. Should it?
> >
> >Is there a case where a user would need anything from there?

the way wo do this in slony is with the following macro:

AC_MSG_CHECKING(for postgresql.conf.sample)
PGSHARE_POSSIBLE_LOCATIONS="${with_pgsharedir} /usr/local/pgsql/share /usr/local/share/postgresql /usr/share/postgresql
/usr/local/share/pgsql/usr/share/pgsql /opt/local/pgsql/share /opt/pgsql/share 
 
${PG_BINDIR}/../share
for i in $PGSHARE_POSSIBLE_LOCATIONS; do   if test -s "$i/postgresql.conf.sample" ; then       PG_SHAREDIR=$i/
break;  fi
 
done

if test -n "$PG_SHAREDIR" ; then   AC_MSG_RESULT(${PG_SHAREDIR}postgresql.conf.sample)
AC_DEFINE(PG_SHAREDIR_VERIFIED,1,[PostgreSQLsharedir])
 
else   AC_MSG_RESULT(not found)   AC_MSG_ERROR(       postgresql.conf.sample not found! Please specify the sharedir
 with --with-pgsharedir=<dir>       )
 
fi


(where ${PG_BINDIR} is the result of: pg_config --bindir )

>
> Why would they need pkglibdir either? I was asked about this by an
> author who wanted to use it to find where to put module config/setup
> scripts.
>
> cheers
>
> andrew
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: Have you checked our extensive FAQ?
>
>                http://www.postgresql.org/docs/faq

-- 
Darcy Buskermolen
Wavefire Technologies Corp.

http://www.wavefire.com
ph: 250.717.0200
fx: 250.763.1759


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Attention PL authors: want to be listed in template table?
Next
From: Peter Eisentraut
Date:
Subject: Re: initdb profiles