Thread: Python interface with CFLAGS

Python interface with CFLAGS

From
Alexander Klimov
Date:
Hi.

uname -a
SunOS iridium 5.6 Generic_105181-20 sun4u sparc SUNW,Ultra-5_10

python
Python 2.0b1 (#5, Sep 12 2000, 13:36:09)
[GCC 2.95.2 19991024 (release)] on sunos5

I use cvs version, after update I tried:
make distclean; configure --with-tcl --with-perl --with-python
--with-openssl --with-CXX && make CFLAGS='-O2' CXXFLAGS='-O2'

And I got:
...
make[4]: Entering directory
`/export/home/ask/build/postgresql-cvs/src/interfaces/python'
gcc   -I../../../src/interfaces/libpq -I../../../src/include -O2 -c
./pgmodule.c
./pgmodule.c:29: Python.h: No such file or directory
make[4]: *** [pgmodule.o] Error 1
make[4]: Leaving directory
`/export/home/ask/build/postgresql-cvs/src/interfaces/python'

If I do just make it compiles OK.

From inspection of Makefile it is clear, that I should specify $OPT
variable to specify optimisation, from the other hand the rest of
postgress has something like COPT and CUSTOM_COPT. It is looks like
something is inconsistent here (or at least something about it should be
said in documentation).

Regards,
ASK

Re: Python interface with CFLAGS

From
Peter Eisentraut
Date:
Alexander Klimov writes:

> make distclean; configure --with-tcl --with-perl --with-python
> --with-openssl --with-CXX && make CFLAGS='-O2' CXXFLAGS='-O2'

make distclean
CFLAGS='-O2' CXXFLAGS='-O2' configure --with-tcl --with-perl --with-python --with-openssl --with-CXX
make all

(-O2 should be the default anyway.)

--
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/