Make shared library file names and library build directories portable
authorReuben Thomas <rrt@sc3d.org>
Sat, 13 Jan 2018 16:42:47 +0000 (16:42 +0000)
committerReuben Thomas <rrt@sc3d.org>
Sun, 14 Jan 2018 20:45:31 +0000 (20:45 +0000)
configure.ac
tests/Makefile.am

index b639d2895ab9594095abc5758d5b6d86e149361a..eb864a9028a47424759c08bfb3ce58c98b4aab6b 100644 (file)
@@ -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
index 040379a9df409570f41b3a0e9be06bf1906142ed..745d00df96e081ec8a8e98ea961191357266ceec 100644 (file)
@@ -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