Re: Glib/cygwin minor changes
- From: "Huang." <hzhr 21cn com>
- To: Stefan Ondrejicka <ondrej idata sk>, gtk-devel-list gnome org
- Subject: Re: Glib/cygwin minor changes
- Date: Wed, 06 Nov 2002 19:45:42 +0800
Stefan Ondrejicka wrote:
Hello,
Here is patch which I made while building glib-2.0.7 on cygwin:
It's good.
I have built a DLL version of glib-2.0.6(and
gtk+-2.0.6,atk-1.0.3,pango-1.0.4) on cygwin too, just a little different
with you.
The key is use the development versions of libtools( autoconf-2.5x +
automake-1.6 + hacked libtool-20020202) but not the stable
versions(autoconf-2.13 + automake-1.4-p5 + libtool-1.4.2), because
libtool-20020202 can build share libs but libtool-1.4.2 can't on cygwin.
So, I cp
/usr/autotool/devel/share/libtool/(config.guess,install-sh,ltmain.sh,mkinstalldirs,config.sub,
missing)
to glib-2.0.6 root dir, replace old copies.
then modify:
* configure.in: use AC_TRY_LINK instead of AC_TRY_COMPILE when testing
nl_langinfo(CODESET) because cygwin contains langinfo.h with
nl_langinfo() declaration but the function doesn't exist in cygwin
runtime. Add /lib/w32api to library search path on cygwin.
same in configure.in:
# require autoconf 2.52
-AC_PREREQ(2.52)
+AC_PREREQ(2.53)
and some Makefile.am
-AUTOMAKE_OPTIONS = 1.4
+AUTOMAKE_OPTIONS = 1.6.2
then run:
aclocal -I /usr/local/share/aclocal
autoheader
libtoolize -c --automake
automake --add-missing --copy --include-deps
autoconf
to update configure, Makefile.in, etc.
Yes, some code files need to be fixed:
on cygwin : G_OS_UNIX & G_PLATFORM_WIN32
* glib/gutils.c (_glib_get_local_dir): on cygwin conditionaly returns
locale dir with win32 or unix path depend on glib instalation
* glib/gutils.h (G_WIN32_DLLMAIN_FOR_DLL_NAME): set posix path on
cygwin, don't define when compiling static glib
the DllMain is not needed
* glib/gthread.c:
* glib/gstrfuncs.c:
* glib/gmain.c: don't dllexport global variables when compiling static
glib library
i change some G_PLATFORM_WIN32 to G_OS_WIN32
* gmodule/gmodule-win32.c: on cygwin set "cyg" prefix for modules instead
of "lib" prefix used on mingw
yes.
i also change:
glib-2.0.6/glib/libcharset/config.charset
@@ -300,7 +300,7 @@
# BeOS has a single locale, and it has UTF-8 encoding.
echo "* UTF-8"
;;
- msdosdjgpp*)
+ msdosdjgpp*|cygwin*)
I hope, that someone with CVS write access will apply this patch. When
building DLLs on cygwin there is problem with libtool when there is
missing option -mdll or -shared when linking the DLL and gcc complains
about undefined reference to WinMain 16, but it is probably problem with
used particular libtool version.
try my way?
hope useful.
Best regards,
Stevo.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]