|
From: Peter J. F. I. <pjf...@ea...> - 2013-11-21 05:27:06
|
I'm not entirely a newbie to using a GNU configure/make process under linux, and I *thought* I understood how to go about it using MinGW/msys, but I am failing completely and I do not completely understand why. Please help cure my obviously considerable ignorance. I have read a lot of the startup pages on the wiki and the HOWTO pages, but I found nothing there which speaks to using GNU configure successfully or what facilities are actually available in MinGW and which are not. My goal is to be able to take a GNU project -- e.g. gawk 4.1 -- and figure out how to run the configure step to create the Makefile(s) and then use mingw32-make to build a MinGW executable, not an msys executable. After downloading and unpacking a GNU tarball or doing a git clone of the stable branch of a project, I fired up msys bash to run the configure step (from an original CMD.EXE prompt), but configure does not find things I think I see as supported in MinGW/msys, like "dlfcn.h" for the dynamic linking facility. Well, at least I think "dlfcn.h" is supported. I saw that the MinGW/msys version of "dlfcn.h" exists only in the msys include directory, not in the MinGW include directory. Does that mean that "dlopen" functions are only supported for msys-based executables? I tried exporting CFLAGS and LDFLAGS definitions containing both the MinGW include and msys include directories before running the configure script, but "dlfcn.h" was still not found. I guess I am just not quite getting what GNU facilities are available for pure MinGW compiles. Is it only what is contained in the MinGW include directory? So, for instance, "stdarg.h" is not available for MinGW compiles, only for msys compiles, since "stdarg.h" lives only in msys include? I see in zip files pulled from ezwinports that the entire GNU configure process is bypassed and Eli's hand-crafted Makefile's are substituted instead (e.g., for gawk 4.x). Is this the only way to build MinGW versions of GNU projects? Bypass configure entirely and hand-craft a Makefile? Shouldn't the configure process be able to be modified to (1) determine that it is a MinGW environment and (2) arrange to do all the things that Eli did to manually create the Makefiles he supplies? For instance, since libltdl is provided in MinGW and "ltdl.h" is provided in MinGW include, couldn't a "dlfcn.h" substitute be provided that translated "dlopen" calls to the appropriate "lt_dlopen" call, along with the needed initialization and setup calls? Or is that a wrong path? I am obviously missing either multiple concepts or multiple setup steps, so let me ask the basic questions: Should I be able to run a GNU configure under msys bash and then use mingw32-make to build a GNU project as a MinGW executable? If so, is there anywhere you can point me to where I can learn *exactly* how to do this, step-by-step? I do understand that at least some (perhaps many?) POSIX facilities are intentionally not available in MinGW and never will be, which would prevent at least some GNU projects from being build or executed without some (perhaps a lot of) coding work to replace those facilities with Windows equivalents or other changes to the project. I am more than willing to try to do such work, but I need to understand how the process should work *if* all needed facilities are in fact supported by MinGW. And also how to determine what GNU facilities are supported and which are not. TIA for any and all information, advice and RTFM's you can provide. Regards, Peter -- |