Skip to content

Instantly share code, notes, and snippets.

@rkitover
Created November 16, 2017 21:47
Show Gist options
  • Save rkitover/b18f19eafda3775a9652cc9cdf3ec914 to your computer and use it in GitHub Desktop.
Save rkitover/b18f19eafda3775a9652cc9cdf3ec914 to your computer and use it in GitHub Desktop.
Patch to compile Python 3.6.3 with a static libintl and libiconv
diff -ruN Python-3.6.3.orig/configure.ac Python-3.6.3.new/configure.ac
--- Python-3.6.3.orig/configure.ac 2017-10-02 22:52:02.000000000 -0700
+++ Python-3.6.3.new/configure.ac 2017-11-16 13:42:07.000000000 -0800
@@ -2703,6 +2703,18 @@
# pthread (first!) on Linux
fi
+# Check iconv
+#
+# This is from: https://bugs.python.org/issue17226
+AC_CHECK_LIB([iconv], [iconv_open], ,[ac_found_iconf=no])
+
+if test "x$ac_found_iconf" = "xno"; then
+ AC_CHECK_LIB([iconv], [libiconv_open], , [ac_found_iconf=no])
+fi
+if test "x$ac_found_iconf" = "xyes"; then
+ LIBS="-liconv $LIBS"
+fi
+
# check if we need libintl for locale functions
AC_CHECK_LIB(intl, textdomain,
[AC_DEFINE(WITH_LIBINTL, 1,
@rkitover
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment