Use pkg-config for modpython.

python3-config fails when python is installed not system-wide.
It doesn't return -L/path/to/libs.
pkg-config resurns it.

Note that this changes meaning of optional argument to ./configure --enable-python=...
This commit is contained in:
Alexey Sokolov
2011-03-31 20:01:00 +07:00
parent 64b89a7f49
commit ba915eb9c4
3 changed files with 28 additions and 19 deletions

View File

@@ -1,7 +1,7 @@
# vim: filetype=make
ifneq "$(PYCFG)" ""
PYTHONCOMMON := $(shell $(PYCFG) --includes) $(shell $(PYCFG) --ldflags)
ifeq "$(PYTHON_ON)" "yes"
PYTHONCOMMON := $(PY_CFLAGS) $(PY_LDFLAGS)
PYTHONCOMMON += -DSWIG_TYPE_TABLE=znc
PYTHONCOMMON += -Wno-missing-field-initializers -Wno-unused -Wno-shadow
PYTHONCOMMON += -Wno-missing-declarations -Wno-uninitialized
@@ -28,7 +28,7 @@ install: $(PYTHONHOOK)
$(E) Compiling $@...
$(Q)$^ $@
ifneq "$(PYCFG)" ""
ifeq "$(PYTHON_ON)" "yes"
all: modpython_all
endif
modpython_all: modpython/_znc_core.so modpython/swigpyrun.h modpython/znc.pyc modpython/znc_core.pyc