[Asterisk-Dev] Postgres and Asterisk

John Todd jtodd at loligo.com
Sat Oct 11 11:00:52 MST 2003


>At 12:44 10-10-2003 +0300, you wrote:
>>Hi Guys
>>
>>here is a quick schema I whipped up for Asterisk and Postgresql as 
>>I could not
>>find one in the source and no-one onf #asterisk had one either. Also attached
>>is a sample cdr_pgsql.conf
>>
>>I herby grant Digium the authority to use this code commercially, and
>>relinquish any copyright I may have over the code. It can also be used to
>>beat your mother with if anyone feels the need.
>
>In addition to this: The tests in cdr/Makefile are not sufficient to 
>work on Debian Woody boxes;
>
>#
># PostgreSQL stuff...  Autoconf anyone??
>#
>MODS+=$(shell if [ -d /usr/local/pgsql/include ] || [ -d 
>/usr/include/pgsql ] || [ -d /usr/local/include/pgsql ] || [ -d 
>/opt/pgsql/include ]
>  || [ -f /usr/include/libpq-fe.h ] || [ -d /usr/include/postgresql ] 
>; then echo "cdr_pgsql.so"; fi)
>CFLAGS+=$(shell if [ -d /usr/local/pgsql/include ]; then echo 
>"-I/usr/local/pgsql/include"; fi)
>CFLAGS+=$(shell if [ -d /usr/include/pgsql ]; then echo 
>"-I/usr/include/pgsql"; fi)
>CFLAGS+=$(shell if [ -d /usr/local/include/pgsql ]; then echo 
>"-I/usr/local/include/pgsql"; fi)
>CFLAGS+=$(shell if [ -d /opt/pgsql/include ]; then echo 
>"-I/opt/pgsql/include"; fi)
>CFLAGS+=$(shell if [ -f /usr/include/libpq-fe.h ]; then echo 
>"-I/usr/include"; fi)
>CFLAGS+=$(shell if [ -d /usr/include/postgresql ]; then echo 
>"-I/usr/include/postgresql"; fi)
>MLFLAGS=
>MLFLAGS+=$(shell if [ -d /usr/lib/pgsql ]; then echo "-L/usr/lib/pgsql"; fi)
>MLFLAGS+=$(shell if [ -d /usr/local/pgsql/lib ]; then echo 
>"-L/usr/local/pgsql/lib"; fi)
>MLFLAGS+=$(shell if [ -d /usr/local/lib/pgsql ]; then echo 
>"-L/usr/local/lib/pgsql"; fi)
>MLFLAGS+=$(shell if [ -d /opt/pgsql/lib ]; then echo "-L/opt/pgsql/lib"; fi)
>MLFLAGS+=$(shell if [ -f /usr/lib/libpq.so ]; then echo "-L/usr/lib"; fi)
>MLFLAGS+=$(shell if [ -d /usr/lib/postgresql ]; then echo 
>"-L/usr/lib/postgresql/lib"; fi)
>
>As you can see I added directory paths for /usr/include/postgresql 
>and /usr/lib/postgresql/lib
>These are locations that are used when using apt-get to install 
>Debian Woody PostgreSQL and libs.
>
>Florian
>


As usual, if this and the previous data are not put in the bugtracker 
and the proper disclaimers signed and sent in to Digium in paper form 
(email doesn't cut it) then the chances of seeing these useful 
additions added to CVS is slim to none.

JT



More information about the asterisk-dev mailing list