From 91dbdd937dad9c8eb22d6d8debd39f7b51442e4b Mon Sep 17 00:00:00 2001 From: Reuben Thomas Date: Sat, 13 Jan 2018 16:42:47 +0000 Subject: [PATCH] Make shared library file names and library build directories portable --- configure.ac | 4 ++++ tests/Makefile.am | 10 +++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index b639d28..eb864a9 100644 --- a/configure.ac +++ b/configure.ac @@ -16,6 +16,10 @@ LT_INIT AC_PROG_LEX gl_INIT +AC_SUBST([objdir]) +LT_SYS_MODULE_EXT +AC_SUBST([shlibext], [$libltdl_cv_shlibext]) + AC_CONFIG_HEADERS([config.h]) AC_HEADER_STDC AM_ICONV diff --git a/tests/Makefile.am b/tests/Makefile.am index 040379a..745d00d 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -28,17 +28,17 @@ t30_dumps.py t30_quoted.py t40_african.py t40_combine.py t40_testdump.py \ t40_utf7.py t40_utf8.py t50_methods.py t90_bigauto.py EXTRA_DIST = NOTES Recode.c Recode.pyx pytest common.py $(SUITE) -CLEANFILES = Recode.so +CLEANFILES = Recode@shlibext@ PYTHON = python -check-local: Recode.so - export LD_LIBRARY_PATH=$(top_srcdir)/src/.libs && \ +check-local: Recode@shlibext@ + export LD_LIBRARY_PATH=$(top_srcdir)/src/@objdir@ && \ RECODE=$(top_builddir)/src/recode PYTHONPATH=.:$(srcdir) \ $(PYTHON) $(srcdir)/pytest $(LIMIT) $(srcdir)/t*.py -Recode.so: Recode.c setup.py - rm -f *.so +Recode@shlibext@: Recode.c setup.py + rm -f *@shlibext@ $(PYTHON) setup.py build_ext --inplace rm -fr build -- 2.50.1