🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.programmer
Article #3738

GNU Autoconf & MS-Windows

#3738
From: Tristan Miller
Date: Tue, 09 Dec 2003 14:32
41 lines
3218 bytes
Greetings.

SHORT STORY:  In addition to the standard Unix configure script, I want
Autoconf/Automake to produce separate ready-to-use Makefiles and
config.h files for use with popular Windows compilers, and then include
these alternatives in my distribution.  Is this possible, and if so,
how should I do it?

LONG STORY:  I've written some software packages for which I am now
producing distributions with GNU Autoconf and Automake.  The packages
are console applications written in more or less standard C and C++,
and before I moved to Autotools there had been reports of successful
compiles on Windows with Microsoft's Visual C++ compiler.  If possible,
I'd like to ensure that the autoconfiscated distribution continues to
compile under Windows without requiring the user to install additional
software, such as Cygwin.  However, now that I am using Autotools, I
have rewritten some of my code to use some basic preprocessor macros
#defined by configure (PACKAGE, VERSION, PACKAGE_STRING, etc.).

Is it possible to use Autoconf and Automake to produce a config.h and
Makefile for use with MSVC++ and its NMAKE utility?  How about for
other popular Windows C and C++ compilers, like Borland?  That way
maybe I can include in the distribution a default config.h for use with
Windows (which I presume will be overwritten by Unix users running
configure) and an alternative Makefile, (say, Makefile.w32).  Then I
could revise the installation instructions so that they essentially
say, "Unix users, do the standard ./configure;make;make install. 
Windows users, import the Makefile.w32 file using whatever mechanism
your IDE provides."

Is this dream realizable?  If so, how do I go about doing it, and are
there any gotchas I should be aware of?

Regards,
Tristan

-- 
   _
  _V.-o  Tristan Miller [en,(fr,de,ia)]  ><  Space is limited
 / |`-'  -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=  <>  In a haiku, so it's hard
(7_\\    http://www.nothingisreal.com/   ><  To finish what you
Technical Details
Message-ID: <1123221.qYdsJqJpgY@ID-187157.news.dfncis.de>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!news-out.visi.com!petbe.visi.com!news.tele.dk!news.tele.dk!small.news.tele.dk!irazu.switch.ch!switch.ch!news.belwue.de!news.uni-kl.de!port-3106.kl.dfki.de!news

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 109f73,4ddc229e2cd08f77,start
X-Google-Attributes: gid109f73,public
X-Google-Thread: fc89c,4ddc229e2cd08f77,start
X-Google-Attributes: gidfc89c,public
X-Google-ArrivalTime: 2003-12-09 06:45:08 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!news-out.visi.com!petbe.visi.com!news.tele.dk!news.tele.dk!small.news.tele.dk!irazu.switch.ch!switch.ch!news.belwue.de!news.uni-kl.de!port-3106.kl.dfki.de!news
From: Tristan Miller <psychonaut@nothingisreal.com>
Newsgroups: comp.unix.programmer,gnu.utils.help
Subject: GNU Autoconf & MS-Windows
Date: Tue, 09 Dec 2003 15:32:03 +0100
Organization: http://www.nothingisreal.com/
Lines: 41
Message-ID: <1123221.qYdsJqJpgY@ID-187157.news.dfncis.de>
NNTP-Posting-Host: dfki-2001.dfki.uni-kl.de
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7Bit
X-Trace: news.uni-kl.de 1070980921 28538 131.246.241.2 (9 Dec 2003 14:42:01 GMT)
X-Complaints-To: usenet@news.uni-kl.de
NNTP-Posting-Date: Tue, 9 Dec 2003 14:42:01 +0000 (UTC)
User-Agent: KNode/0.7.2
X-Accept-Language: en-ca, en-us, en-gb, en, fr, de, ia