Compiling on Windows/Mingw:
   
    The approach used here is to install so much GNU on a Windows machine that ./configure and make will actually work.  MingW - Minimalist GNU for Windows - is a sort of real-operating-system layer on top of Windows which provides things no same system should be without (like a compiler, for example).  
    Instructions here are fairy detailed, because I had a hard time getting it to work the first time round and I thought
    I'd try to make this less painful for other people.

    Windows/Mingw stage 1:  You'll have to install MingW first!
    
        Go to http://www.mingw.org/download.shtml.  Get the following:
        MSYS-?.?.?.exe
        gcc-core-?.?.?-DATE.tar.gz
        gcc-g++?.?.?-DATE.tar.gz
        binutils-?.?.?-DATE.tar.gz
        w32api-?.?.tar.gz
        mingw-runtime-3.9.tar.gz
        
        install MSYS-?.?.?.exe
        run MSYS
        In the MSYS shell, 
          Copy the tar.gz files to /mingw:
            cd (wherever you put them)
            cp *.tar.gz /mingw
          extract them all:
            cd /mingw
            gunzip *.gz
            tar -xf <file>.tar (for each file)
          
        Mingw should be installed.  It might be a good idea at this point to see if you can compile and run a hello world program.  (compile it with: gcc hello.c -o hello.exe)    
        If not, then your setup is screwed in some way, and it's not my fault.
    
    Windows/Mingw stage 2:  Install flyhard dependencies.
      libpng       (http://www.libpng.org)
      libSDL       (http://www.libsdl.org)
      libSDL_Mixer (http://www.libsdl.org/projects/SDL_mixer)
      zlib         (http://www.zlib.net/, only needed as a dependency for libpng)
      
      Get the sources for each of these.  Also, get the windows binary for libSDL *as well as* the source.
      Copy the source archives somewhere sensible (I put them in /usr/src), extract them, and build them.
      It's probably best to get the latest stable version of each of these, which may not be the same as the versions used here.  (Although the numbers used here do provide one set of versions which is known to work, on at least 1 computer)
      
      Building zlib:
        gunzip zlib-1.2.3.tar.gz
        tar -xf zlib-1.2.3.tar
        cd zlib-1.2.3
        ./configure
        make test
        make install
      (it built with no problems for me)
        
      Building libpng:
      Problem 1: zlib just installed itself into directories that gcc doesn't look in.  Fix this by adding the missing directories to the environment variables which tell gcc where to look:
      
        export LIBRARY_PATH=$LIBRARY_PATH:/usr/local/lib
        export C_INCLUDE_PATH=$C_INCLUDE_PATH:/usr/local/include
        export CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:/usr/local/include
        
      It should then build with no problems:
        
        bunzip2 libpng-1.2.12.tar.bz2
        tar -xf libpng-1.2.12.tar
        cd libpng-1.2.12
        ./configure
        make
        make install
        
      Problem 2: OK, one more problem - make install fails after installing libraries, but before copying the headers.
      This is dirty, but we can get away with copying the headers manually:
        cp png.h /usr/local/include
        cp pngconf.h /usr/local/include
        
      Building libSDL:
        gunzip SDL-1.2.11.tar.gz
        tar -xf SDL-1.2.11.tar
        cd SDL-1.2.11.tar
        ./configure --disable-stdio-redirect
        make
        make install
      (built with no problems for me)

      The --disable-stdio-redirect disables whe wonderful feature which redirects stdout into a text file called stdout.txt.
      We really want e.g. flyhard --help to output text rather than create a file.  (We could document this odd behaviour in the help text, but...)
         
      Building libSDL_mixer:
        gunzip SDLL_mixer-1.2.7.tar.gz
        tar -xf SDLL_mixer-1.2.7.tar
        cd SDL_mixer-1.2.7.tar
        ./configure
        make
        make install
      (built with no problems for me)

   Windows/Mingw stage 3:  Compile flyhard!.    
    
      The same as the canonical compilation instructions.

      Unzip and untar the file, and cd to its root directory.  Then do:
      ./configure
      make
      make install

      or

      ./configure --enable-local-data-files
      make
      
      It is probably best to use the --enable-local-data-files, as this avoids looking in for data files in directories
      that don't really exist, such as /usr/share/local.  The downloadable windows version is built with this option,
      as this makes it possible to have a zip file which is "installed" just by unzipping it.
      

      Flyhard should now run from the mingw shell, but you'll probably have an annoying problem with delayed sound.
      To make it run on its own, copy the missing dlls: SDL.dll, libpng-3.dll and SDL_mixer.dll into the src directory.
      To fix the sound, DON'T COPY THE SDL.DLL FILE YOU BUILT!  Use the binary from SDL-?.?.?-win32.zip instead.  The reason for this is that the binary was linked with directsound libraries, but the one you just built probably wasn't - if it can't find directx then it falls back to the nasty waveout sound library.  If you absolutely must build everything from source then you'll have to get directx-devel from http://www.libsdl.org/extras/win32/common/ and the Microsoft DirectX SDK - which weighs in at a hefty 500MB!  (That's about 20 times the size of everything else put together.)  You'll also probably have to "agree" to an obnoxious and evil EULA - and I'd have to consider this to be a bug in flyhard because I wanted it to be free. (sigh...)
      

      
   Windows/Mingw epilogue:
   
      MSYS-1.0.10.exe                          2.7MB
      binutils-2.15.91-20040904-1.tar.gz       5.9MB
      gcc-g++-3.4.2-20040916-1.tar.gz          4.6MB
      gcc-core-3.4.2-20040916-1.tar.gz         3.4MB
      w32api-3.6.tar.gz                        1.5MB
      mingw-runtime-3.9.tar.gz                 0.3MB

      SDL-1.2.11.tar.gz                        2.7MB
      SDL_mixer-1.2.7.tar.gz                   1.9MB
      libpng-1.2.12.tar.bz2                    0.6MB
      zlib-1.2.3.tar.gz                        0.5MB
      SDL-1.2.11-win32.zip                     0.1MB
      
      oh, and let's not forget-
      flyhard-0.2.tar.gz                       0.3MB
                                              ------
      Total:                                  24.5MB
                                              ------
      This may look like a lot, but you do get a compiler and a 
      minimalist operating system layer as well as a nifty game.

      And for the masochists:
      directx-devel.tar.gz                     0.06MB
      Microsoft directx SDK                  509.7MB 
                                             --------
      Masochistic total:                     534.26MB
                                             --------


    Hacks executed:
      libpng manual copy hack (Ugh!  I really should find out what the problem is and fix it properly one of these days)
      SDL.dll bait-and-switch (This *could* be avoided if you're prepared to download half a gig of M$ bloatware)
      --disable-stdio-redirect (Luckily, this doesn't interfere with the bait-and-switch hack because the redirect stuff ends up statically linked.)
      
