Date: Sun, 3 Nov 1996 10:33:41 +0200 (IST) From: Eli Zaretskii To: Jamie Mazer Cc: djgpp AT delorie DOT com Subject: Re: ./configure workarounds? In-Reply-To: Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On 31 Oct 1996, Jamie Mazer wrote: > In practice, just about everything (non-X) that I use or have written > for linux compiles successfully under djgpp/dos, but the hardest part > is always hacking the makefiles. Usually I can run the configure > script under linux and then copy the resulting makefiles to DOS > and tweak them to get things going, but this always seems like a > kludge. Has anyone come up with anything better?? There are 2 parts to this puzzle: the config.h header which describes the features that are and aren't supported by the compiler/library/OS; and the Makefiles which frequently include command lines that only Unix-like shell can grok. (There is also the third part, namely, making the program work on MSDOS after it compiles, due to all kinds of assumptions about filenames and such in Unix-born programs, but that's another story.) The first part should be mostly taken care of by the header which comes with DJGPP. Usually, creating a local `config.h' which only says "#include " is all you need. Sometimes, you will need to add a couple of lines specific to that package. The second part depends on your tools and the degree of hackery that you are prepared to bear. If you only do this for yourself, you can get a port of Unix shell and use the Makefile as is (you will have to run a simple Sed script on Makefile.in to convert all the @bindir@ and such to whatever is appropriate to your system, but that's all). OTOH, if you want to make your port available to others, who might not have a Unix-like shell, then you will have to tweak Makefile.in into a Makefile which only uses DOS commands and tools that come with DJGPP. AFAIK, there is no automated way to accomplish this, but you might consider downloading some of the source distributions from the v2gnu subdirectory of the DJGPP archive sites and look there for some examples of innovative ways to pretend you are on Unix ;-). Since FSF Makefiles have fairly standard structure, chances are that you can take some of the Sed scripts used in already ported packages to create DOS Makefile and use them with minimal changes for a package you are trying to port. Another way is to run the ./configure script with a DOS port of a Unix shell, but it won't run unaltered and AFAIK nobody has yet succeeded in doing this even semi-automatically. Bottom line: tough. But then, again, that's why it is considered to be fun (by some).