Preface: If you have the time to help thanks, if not I will keep fighting with it and should be able To get it sooner or latter and thanks anyway.
After the recent patch for cygwin I found the 2 changes I need to make to configure/configure.ac for a mingw host/target but I'm having trouble with the syntax of configure to get it to do what I need it to do. My current porting work has been based on some dirty hacks to configure that didn't Really fix the problem without breaking the checks for other platforms. Now I just need some help making These 2 changes.
Change #1. at line 5552 its checking for dlopen which I think is in dlfcn.h. Mingw doesn't have this and I don't think the mingw port needs this but configure returns.
else LIBEXT="a" fi
This of course causes configure to bomb because we need to build a dll/so. I cant get my syntax right To let it know not to set LIBEXT=a here if it's a mingw host.
Change #2 On line 9465 there is the $LIBEXT = so/$target_os *cygwin* check. If I make Change #1 via my dirty breaking of configure and I change the case $target_os to *mingw* then it generates My makefiles right. My problem is really stupid because if I copy the cygwin check and make a mingw check It bitches about unexepected EOF in the configure script where I'm just missing a if/fi or something.
Like I said, its really minor. Once this is done then you should at least be able to ./configure on msys just like cygwin if they fix the dlltool/wrap on msys.
Thanks Steven
"Every revolution was once a thought in one man's mind" - Ralph Waldo Emerson
"Steven Edwards" Steven_Ed4153@yahoo.com writes:
After the recent patch for cygwin I found the 2 changes I need to make to configure/configure.ac for a mingw host/target but I'm having trouble with the syntax of configure to get it to do what I need it to do. My current porting work has been based on some dirty hacks to configure that didn't Really fix the problem without breaking the checks for other platforms. Now I just need some help making These 2 changes.
I'd suggest something like that:
Index: configure.ac =================================================================== RCS file: /opt/cvs-commit/wine/configure.ac,v retrieving revision 1.33 diff -u -r1.33 configure.ac --- configure.ac 7 May 2002 18:33:47 -0000 1.33 +++ configure.ac 8 May 2002 19:53:09 -0000 @@ -95,18 +95,6 @@ dnl Check for -lmmap for OS/2 AC_CHECK_LIB(mmap,mmap)
-DLLIBS="" -AC_SUBST(DLLIBS) -AC_CHECK_HEADERS(dlfcn.h, - [AC_CHECK_FUNCS(dlopen,, - [AC_CHECK_LIB(dl,dlopen, - [AC_DEFINE(HAVE_DLOPEN,1,[Define if you have dlopen]) - DLLIBS="-ldl"], - LIBEXT="a")] - )], - LIBEXT="a" - ) - JPEGLIB="" AC_SUBST(JPEGLIB) AC_CHECK_HEADERS(jpeglib.h, @@ -710,19 +698,29 @@
LDSHARED="" LDDLLFLAGS="" -if test "$LIBEXT" = "so" -then - case $target_os in - *cygwin*) - AC_CHECK_PROG(DLLWRAP,dllwrap,dllwrap,false) - if test "$DLLWRAP" = "dllwrap"; then - dnl FIXME - check whether dllwrap works correctly... - LIBEXT="dll" - else - LIBEXT="a" - fi - ;; - *) +DLLIBS="" + +case $target_os in + *cygwin*|*mingw*) + AC_CHECK_PROG(DLLWRAP,dllwrap,dllwrap,false) + if test "$DLLWRAP" = "dllwrap"; then + dnl FIXME - check whether dllwrap works correctly... + LIBEXT="dll" + else + LIBEXT="a" + fi + ;; + *) + AC_CHECK_HEADERS(dlfcn.h, + [AC_CHECK_FUNCS(dlopen,, + [AC_CHECK_LIB(dl,dlopen, + [AC_DEFINE(HAVE_DLOPEN,1,[Define if you have dlopen]) + DLLIBS="-ldl"], + [LIBEXT="a"])])], + [LIBEXT="a"]) + + if test "$LIBEXT" = "so" + then AC_CACHE_CHECK([whether we can build a GNU style ELF dll],ac_cv_c_dll_gnuelf, [saved_cflags=$CFLAGS CFLAGS="$CFLAGS -fPIC -shared -Wl,-soname,conftest.so.1.0,-Bsymbolic" @@ -747,9 +745,9 @@ LDDLLFLAGS="-Wl,-B,symbolic" fi fi - ;; - esac -fi + fi + ;; +esac
if test "$LIBEXT" = "a"; then AC_MSG_ERROR( @@ -773,6 +771,7 @@ LDPATH="PATH="$(TOPOBJDIR)/library:$(TOPOBJDIR)/unicode:$$PATH"" fi
+AC_SUBST(DLLIBS) AC_SUBST(DLLFLAGS) AC_SUBST(DLLEXT) AC_SUBST(LDSHARED)
I'd suggest something like that:
Thanks a lot, your patch works perfect. With this command I can now properly configure. ./configure --host=mingw32 --target=mingw32 --build=mingw32 CFLAGS="-D__MINGW__ -D_WINDOWS -DWINE_NOWINSOCK" CC="gcc -mno-cygwin" CXX="gcc -mno-cygwin"
There are still a few minor makefile changes that are needed but the import lib changes you made will take a big load off. I will post a update to my mingw port TODO/HOWTO guide plus send a few more patches to wine-patches.
Thanks Again Steven
"Every revolution was once a thought in one man's mind" - Ralph Waldo Emerson