using automake/autoconf to build extension module?
David M. Cooke
cookedm+news at physics.mcmaster.ca
Tue Apr 23 19:34:59 EDT 2002
At some point, Skip Montanaro <skip at pobox.com> wrote:
> Can someone explain what automake incantations are necessary to build a
> Python extension module? I'd prefer not to use distutils if possible, since
> the rest of the project is using automake/autoconf/libtool for build
> configuration.
>
> I tried the following:
>
> lib_LTLIBRARIES = alfmodule.la
> alfmodule_la_LDFLAGS = -module -avoid-version -export-symbols-regex initalf
> alfmodule_la_SOURCES = alf.h alfmodule.c
> alfmodule_CFLAGS = -I$(prefix)/include/python$(PYTHON_VERSION)
>
> but it blows up during the compile because it has no -I flag referencing the
> include directory. (Obviously the last line above is incorrect in some
> respect. It never gets into the cc command.)
Have a look at gnome-python. It uses autoconf/automake. There's an m4
macro included that does a better job than the one included in the
current automake for detecting python and getting the stuff you need.
--
|>|\/|<
/--------------------------------------------------------------------------\
|David M. Cooke
|cookedm(at)physics(dot)mcmaster(dot)ca
More information about the Python-list
mailing list