bug-gnu-libiconv
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-gnu-libiconv] patch - build for mingw host


From: Roumen Petrov
Subject: [bug-gnu-libiconv] patch - build for mingw host
Date: Thu, 12 Jul 2007 00:41:01 +0300
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.10) Gecko/20070306 SeaMonkey/1.0.8

I would like to propose some modification that improve mingw host build (cross compilation).
Please see attached file "libiconv-1.11.patch" .

First change is to use libtool flag -avoid-version. With this flag libtool will create shared library with name "libiconv.dll". If the flag is omitted the name is in format "libiconv[-VERSUFFIX].dll", where VERSUFFIX is computed from version info. Since version-info is not specified result is zero, i.e. libiconv-0.dll. Same for libcharset.

Next change in ./configure.ac is to set docdir and htmldir. This is for autoconf before 2.60. Note the current requirement is for autoconf version 2.52.

Roumen
--- ./configure.ac.ORIG 2006-07-04 16:32:59.000000000 +0300
+++ ./configure.ac      2007-07-04 21:41:13.000000000 +0300
@@ -166,7 +166,8 @@
 dnl    exported variables _also_ in the static library.
 if test "$enable_shared" = yes; then
   case "$host_os" in
-    mingw* | cygwin*) is_woe32dll=yes ;;
+    mingw* ) is_woe32dll=yes; LDFLAGS="$LDFLAGS -avoid-version" ;;
+    cygwin*) is_woe32dll=yes ;;
     *) is_woe32dll=no ;;
   esac
 else
@@ -190,6 +191,15 @@
 #endif
 ])
 
+if test -z "$docdir"; then
+  docdir="$datadir/doc"
+  AC_SUBST([docdir])
+fi
+if test -z "$htmldir"; then
+  htmldir="$docdir"
+  AC_SUBST([htmldir])
+fi
+
 AC_CONFIG_SUBDIRS(libcharset)
 AC_CONFIG_FILES([Makefile])
 AC_CONFIG_FILES([lib/Makefile])
--- ./libcharset/configure.ac.ORIG      2006-06-27 15:48:39.000000000 +0300
+++ ./libcharset/configure.ac   2007-07-03 23:02:13.000000000 +0300
@@ -69,6 +69,12 @@
 AC_CHECK_HEADERS(stddef.h stdlib.h string.h)
 AC_CHECK_FUNCS(setlocale)
 
+if test "$enable_shared" = yes; then
+  case "$host_os" in
+    mingw* ) LDFLAGS="$LDFLAGS -avoid-version" ;;
+  esac
+fi
+
 AC_CONFIG_FILES([Makefile])
 AC_CONFIG_FILES([lib/Makefile])
 AC_CONFIG_FILES([include/localcharset.h:include/localcharset.h.build.in])

reply via email to

[Prev in Thread] Current Thread [Next in Thread]