Building charsets library on Windows
John Brown <[email protected]> Thu, 10 Jan 2013 08:37:14 -0800 (PST)
| Newsgroups | gmane.comp.internationalization.fribidi |
|---|---|
| Message-ID | <[email protected]> |
Hello All, I am using the git version. These are my observations. 1) Currently, ./charset/Makefile is executed before ./lib/Makefile. On Windows this will not work because the linker will complain about undefined symbols (functions from libfribidi). 2) I am able to reverse this order by editing ./Makefile: - change SUBDIRS = gen.tab charset lib bin doc test to SUBDIRS = gen.tab lib charset bin doc test, and - comment out am__append_4 and am__append_5 in ./lib/Makefile # am__append_4 = $(top_builddir)/charset/libfribidi-char-sets.la # am__append_5 = $(top_builddir)/charset/libfribidi-char-sets.la 3) I also noticed that in ./charset/Makefile libfribidi_char_sets_la_LDFLAGS = $(am__append_2) where am__append_2 = -static, which I changed to -no-undefined 4) Finally, in ./charset/Makefile, I changed libfribidi_char_sets_la_LIBADD = $(GLIB_LIBS) to libfribidi_char_sets_la_LIBADD = ../lib/.libs/libfribidi.la $(GLIB_LIBS) because the charsets library depends on libfribidi. 5) I even #defined FRIBIDI_ENTRY when running configure: $ CFLAGS='-DFRIBIDI_ENTRY=__declspec\(dllexport\)' ./configure \ --enable-static --enable-shared --with-glib=no 6) By the way, even though I specified --with-glib=no, ./configure initially failed because it did not recognise PKG_CHECK_MODULES, which is in pkg.m4, which is not in the default location on my system. The relevant section of configure.ac seems to be: # --with[out]-glib AC_ARG_WITH(glib, AC_HELP_STRING([--with-glib=@<:@no/auto/yes@:>@], [use Glib @<:@default=auto@:>@])) GLIB_PACKAGE=glib-2.0 GLIB_MINVERSION=2.4 GLIB_LIBS= GLIB_CFLAGS= if test x$with_glib = xyes; then PKG_CHECK_MODULES(GLIB,$GLIB_PACKAGE >= $GLIB_MINVERSION) FRIBIDI_USE_GLIB=1 else if test x$with_glib = xno; then FRIBIDI_USE_GLIB=0 else PKG_CHECK_MODULES(GLIB,$GLIB_PACKAGE >= $GLIB_MINVERSION, FRIBIDI_USE_GLIB=1, FRIBIDI_USE_GLIB=0) fi fi In my opinion, --with-glib=no should have caused the check for Glib to be skipped. Despite all of the above, libtool still refuses to build the shared library. Can you say why? Regards, John Brown.