summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-07-26 10:08:15 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-07-26 11:28:15 -0400
commita6c0b31d509f76023d8efbcd5e912863c8fb254c (patch)
treecc41ec41fc8eb865ccb35d4037f9b25aeba66f9f /Makefile.am
parentb59f043c3d0c84b578cf170b255bb6ac5670beeb (diff)
build-sys: use pkg-config for python compilation flags
Python 2.7, and 3.2 and higher support querying compilation flags through pkg-config. This makes python support follow rules similar to various other optional compilation-time libraries. New flags are called PYTHON_DEVEL_CFLAGS and PYTHON_DEVEL_LIBS, because PYTHON (without _DEVEL), is already used for the python binary name, and things would be confusing if the same prefix was used for two things. configure has --disable-python-devel to disable python modules. One advantage is that CFLAGS for modules gets smaller: - -I/usr/include/python3.3m -I/usr/include/python3.3m -Wno-unused-result -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv + -I/usr/include/python3.3m as does LIBS: - -lpthread -ldl -lutil -lm -lpython3.3m + -lpython3.3m Support for Python 2.6 is removed, but can be easily restored by using PYTHON_DEVEL_CFLAGS="$(python2.6-config --cflags)", etc., as ./configure parameters. https://bugs.freedesktop.org/show_bug.cgi?id=57800
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am20
1 files changed, 10 insertions, 10 deletions
diff --git a/Makefile.am b/Makefile.am
index 8ac1d8d0f3..7b4753d300 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3905,7 +3905,7 @@ _journal_la_SOURCES = \
_journal_la_CFLAGS = \
$(AM_CFLAGS) \
-fvisibility=default \
- $(PYTHON_CFLAGS)
+ $(PYTHON_DEVEL_CFLAGS)
_journal_la_LDFLAGS = \
$(AM_LDFLAGS) \
@@ -3914,7 +3914,7 @@ _journal_la_LDFLAGS = \
-avoid-version
_journal_la_LIBADD = \
- $(PYTHON_LIBS) \
+ $(PYTHON_DEVEL_LIBS) \
libsystemd-journal.la
id128_la_SOURCES = \
@@ -3926,7 +3926,7 @@ id128_la_SOURCES = \
id128_la_CFLAGS = \
$(AM_CFLAGS) \
-fvisibility=default \
- $(PYTHON_CFLAGS) \
+ $(PYTHON_DEVEL_CFLAGS) \
-I$(top_builddir)/src/python-systemd
id128_la_LDFLAGS = \
@@ -3936,7 +3936,7 @@ id128_la_LDFLAGS = \
-avoid-version
id128_la_LIBADD = \
- $(PYTHON_LIBS) \
+ $(PYTHON_DEVEL_LIBS) \
libsystemd-id128.la
_daemon_la_SOURCES = \
@@ -3947,7 +3947,7 @@ _daemon_la_SOURCES = \
_daemon_la_CFLAGS = \
$(AM_CFLAGS) \
-fvisibility=default \
- $(PYTHON_CFLAGS) \
+ $(PYTHON_DEVEL_CFLAGS) \
-I$(top_builddir)/src/python-systemd
_daemon_la_LDFLAGS = \
@@ -3957,7 +3957,7 @@ _daemon_la_LDFLAGS = \
-avoid-version
_daemon_la_LIBADD = \
- $(PYTHON_LIBS) \
+ $(PYTHON_DEVEL_LIBS) \
libsystemd-daemon.la
_reader_la_SOURCES = \
@@ -3968,7 +3968,7 @@ _reader_la_SOURCES = \
_reader_la_CFLAGS = \
$(AM_CFLAGS) \
-fvisibility=default \
- $(PYTHON_CFLAGS)
+ $(PYTHON_DEVEL_CFLAGS)
_reader_la_LDFLAGS = \
$(AM_LDFLAGS) \
@@ -3977,7 +3977,7 @@ _reader_la_LDFLAGS = \
-avoid-version
_reader_la_LIBADD = \
- $(PYTHON_LIBS) \
+ $(PYTHON_DEVEL_LIBS) \
libsystemd-journal.la \
libsystemd-id128.la \
libsystemd-shared.la \
@@ -3991,7 +3991,7 @@ login_la_SOURCES = \
login_la_CFLAGS = \
$(AM_CFLAGS) \
-fvisibility=default \
- $(PYTHON_CFLAGS)
+ $(PYTHON_DEVEL_CFLAGS)
login_la_LDFLAGS = \
$(AM_LDFLAGS) \
@@ -4000,7 +4000,7 @@ login_la_LDFLAGS = \
-avoid-version
login_la_LIBADD = \
- $(PYTHON_LIBS) \
+ $(PYTHON_DEVEL_LIBS) \
libsystemd-journal.la \
libsystemd-login.la \
libsystemd-shared.la \