#11 Use PKG_CHECK_MODULES for python2
Closed 2 years ago by cathay4t. Opened 2 years ago by cathay4t.
cathay4t/volume_key master  into  master

file modified
+4 -4

@@ -20,7 +20,6 @@ 

  AM_CPPFLAGS = $(blkid_CFLAGS) $(glib_CFLAGS) $(GPGME_CFLAGS) \

  	$(libcryptsetup_CFLAGS) $(nss_CFLAGS)

  LOCALEDIR_CPPFLAGS = -DLOCALEDIR='"$(localedir)"'

- PYTHON_CPPFLAGS = -I/usr/include/python$(PYTHON_VERSION)

  

  ## Targets

  SUBDIRS = po

@@ -63,9 +62,10 @@ 

  	$(LTLIBINTL) $(libcryptsetup_LIBS) $(nss_LIBS)

  

  python__volume_key_la_SOURCES = python/volume_key_wrap.c

- python__volume_key_la_CPPFLAGS = $(AM_CPPFLAGS) $(PYTHON_CPPFLAGS)

- python__volume_key_la_LDFLAGS = -module -avoid-version $(glib_LIBS)

- python__volume_key_la_LIBADD = lib/libvolume_key.la -lpython$(PYTHON_VERSION) \

+ python__volume_key_la_CPPFLAGS = $(AM_CPPFLAGS) $(PYTHON_CFLAGS)

+ python__volume_key_la_LDFLAGS = -module -avoid-version $(glib_LIBS) \

+ 	$(PYTHON_LIBS)

+ python__volume_key_la_LIBADD = lib/libvolume_key.la \

  	$(glib_LIBS) $(nss_LIBS)

  

  src_volume_key_SOURCES = src/volume_key.c

file modified
+1

@@ -42,6 +42,7 @@ 

  	  [Stay away from deprecated glib functionality.])

  PKG_CHECK_MODULES(libcryptsetup, [libcryptsetup])

  PKG_CHECK_MODULES(nss, [nss])

+ PKG_CHECK_MODULES([PYTHON], [python2])

  

  AM_PATH_GPGME

  

The hardcoded python CFLAGS and CLIBS are not working on Archlinux where
default python is python3.

Changed to use PKG_CHECK_MODULES to detect CFLAGS and LDFLAGS of python.

Signed-off-by: Gris Ge cnfourt@gmail.com

This patch still does not works on Archlinux. It might have something to do with swig. Closing.

Pull-Request has been closed by cathay4t

2 years ago
Metadata