diff -ruN recode-3.7-orig/lib/hash.h recode-3.7/lib/hash.h --- recode-3.7-orig/lib/hash.h 2018-01-14 17:00:06.000000000 -0500 +++ recode-3.7/lib/hash.h 2018-02-05 02:07:57.000000000 -0500 @@ -21,6 +21,11 @@ /* Make sure USE_OBSTACK is defined to 1 if you want the allocator to use obstacks instead of malloc, and recompile 'hash.c' with same setting. */ +#define hash_lookup recode_hash_lookup +#define hash_delete recode_hash_delete +#define hash_free recode_hash_free +#define hash_insert recode_hash_insert + #ifndef HASH_H_ # define HASH_H_ diff -ruN recode-3.7-orig/src/Makefile.in recode-3.7/src/Makefile.in --- recode-3.7-orig/src/Makefile.in 2018-01-30 15:56:08.000000000 -0500 +++ recode-3.7/src/Makefile.in 2018-02-05 02:54:18.000000000 -0500 @@ -1446,7 +1446,7 @@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = gnits lib_LTLIBRARIES = librecode.la -noinst_LTLIBRARIES = libmerged.la +noinst_LTLIBRARIES = libmerged.la librecode-static.la man_MANS = recode.1 include_HEADERS = recode.h recodext.h H_STEPS = common.h decsteps.h inisteps.h tersteps.h \ @@ -1475,7 +1475,7 @@ names.c outer.c recode.c request.c strip-pool.c task.c $(ALL_STEPS) \ $(include_HEADERS) $(noinst_HEADERS) $(H_STEPS) -librecode_la_LDFLAGS = -version-info 0:0:0 +librecode_la_LDFLAGS = -version-info 0:0:0 -no-undefined librecode_la_LIBADD = ../lib/libgnu.la libmerged.la libmerged_la_SOURCES = merged.c libmerged_la_CPPFLAGS = $(NON_WARN_CFLAGS) @@ -1577,6 +1577,8 @@ librecode.la: $(librecode_la_OBJECTS) $(librecode_la_DEPENDENCIES) $(EXTRA_librecode_la_DEPENDENCIES) $(AM_V_CCLD)$(librecode_la_LINK) -rpath $(libdir) $(librecode_la_OBJECTS) $(librecode_la_LIBADD) $(LIBS) +librecode-static.la: $(librecode_la_OBJECTS) $(librecode_la_DEPENDENCIES) $(EXTRA_librecode_la_DEPENDENCIES) + $(AM_V_CCLD)$(librecode_la_LINK) -rpath $(libdir) $(librecode_la_OBJECTS) $(librecode_la_LIBADD) $(LIBS) -static install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ diff -ruN recode-3.7-orig/tests/setup.py.in recode-3.7/tests/setup.py.in --- recode-3.7-orig/tests/setup.py.in 2018-01-30 09:58:01.000000000 -0500 +++ recode-3.7/tests/setup.py.in 2018-02-05 02:52:02.000000000 -0500 @@ -13,6 +13,8 @@ extra_libs = [] extra_libs.extend(libintl.split()) extra_libs.extend(libiconv.split()) +extra_libs.append(os.path.join(top_builddir, 'src', '.libs', 'librecode-static.a')) +extra_libs.append(os.path.join(top_builddir, 'lib', '.libs', 'libgnu.a')) # FIXME: On Mingw, Cython seems to call gcc in such a way that it doesn't understand UNIX paths if os.name == 'nt': @@ -30,9 +32,6 @@ Extension('Recode', ['Recode.c'], include_dirs=[top_builddir, os.path.join(top_srcdir, 'src'), os.path.join(top_srcdir, 'lib')], - library_dirs=[os.path.join(top_builddir, 'src', '.libs'), - os.path.join(top_builddir, 'lib', '.libs')], - libraries=['recode', 'gnu'], extra_link_args=extra_libs) ])