I have recently been trying to build this source code here. I am building the original port with SDL infused, not the linuxdoom port and I’m having some issues.

What I have tried first:

  • I've installed Mingw
  • I've make installed SDL v1.0.1
  • I've set the enviroment variables to the path of the SDL-Config file

But when I load up the windows command prompt and go to the source directory and use .\configure the script outputs the following error:

loading cache ./config.cache
checking for a BSD compatible install… /usr/bin/install -c
checking whether build environment is sane… yes
checking whether make sets ${MAKE}… yes
checking for working aclocal… found
checking for working autoconf… found
checking for working automake… found
checking for working autoheader… found
checking for working makeinfo… found
checking whether make sets ${MAKE}… (cached) yes
checking for gcc… gcc
checking whether the C compiler (gcc ) works… yes
checking whether the C compiler (gcc ) is a cross-compiler… no
checking whether we are using GNU C… yes
checking whether gcc accepts -g… yes
checking for a BSD compatible install… /usr/bin/install -c
checking for sdl-config… /c/Program Files (x86)/SDL_MINGW32/SDL-1.0.1/bin/sdl-config
checking for SDL - version >= 1.0.1… configure: line 1181: /c/Program: No such file or directory
configure: line 1182: /c/Program: No such file or directory
configure: line 1185: /c/Program: No such file or directory
configure: line 1187: /c/Program: No such file or directory
configure: line 1189: /c/Program: No such file or directory
*** Could not run SDL test program, checking why…
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means SDL was incorrectly installed
*** or that you have moved SDL since it was installed. In the latter case, you
*** may want to edit the sdl-config script: /c/Program Files (x86)/SDL_MINGW32/SDL-1.0.1/bin/sdl-config
configure: error: *** SDL version 1.0.1 not found!

Here is my config-log file that it generates to give more info on what the issue is…

This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake.

configure:563: checking for a BSD compatible install
configure:616: checking whether build environment is sane
configure:673: checking whether make sets ${MAKE}
configure:719: checking for working aclocal
configure:732: checking for working autoconf
configure:745: checking for working automake
configure:758: checking for working autoheader
configure:771: checking for working makeinfo
configure:787: checking whether make sets ${MAKE}
configure:816: checking for gcc
configure:929: checking whether the C compiler (gcc ) works
configure:945: gcc -o conftest conftest.c 1>&5
configure:942:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
configure:971: checking whether the C compiler (gcc ) is a cross-compiler
configure:976: checking whether we are using GNU C
configure:985: gcc -E conftest.c
configure:1004: checking whether gcc accepts -g
configure:1047: checking for a BSD compatible install
configure:1142: checking for sdl-config
configure:1177: checking for SDL - version >= 1.0.1
configure:1259: gcc -o conftest -g -O2 conftest.c 1>&5
configure:1206:21: fatal error: SDL/SDL.h: No such file or directory
compilation terminated.
configure: failed program was:
#line 1201 “configure”
#include “confdefs.h”

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <SDL/SDL.h>

my_strdup (char *str)
char *new_str;

if (str)
new_str = malloc ((strlen (str) + 1) * sizeof(char));
strcpy (new_str, str);
new_str = NULL;

return new_str;

int main ()
int major, minor, micro;
char *tmp_version;

system (“touch conf.sdltest”);

/* HP/UX 9 (%@#!) writes to sscanf strings */
tmp_version = my_strdup(“1.0.1”);
if (sscanf(tmp_version, “%d.%d.%d”, &major, &minor, &micro) != 3) {
printf("%s, bad version string\n", “1.0.1”);

if (( > major) ||
(( == major) && ( > minor)) ||
(( == major) && ( == minor) && ( >= micro)))
return 0;
printf("\n*** ‘sdl-config --version’ returned %d.%d.%d, but the minimum version\n", , , );
printf("*** of SDL required is %d.%d.%d. If sdl-config is correct, then it is\n", major, minor, micro);
printf("*** best to upgrade to the required version.\n");
printf("*** If sdl-config was wrong, set the environment variable SDL_CONFIG\n");
printf("*** to point to the correct copy of sdl-config, and remove the file\n");
printf("*** config.cache before re-running configure\n");
return 1;

configure:1303: gcc -o conftest -g -O2 conftest.c 1>&5
configure:1296:21: fatal error: SDL/SDL.h: No such file or directory
compilation terminated.
configure: failed program was:
#line 1293 “configure”
#include “confdefs.h”

#include <stdio.h>
#include <SDL/SDL.h>

int main() {
return 0;
; return 0; }

So, whats the issue that I am missing here?

  • 1
    \$\begingroup\$ The line checking for sdl-config… /c/Program Files (x86)/SDL_MINGW32/SDL-1.0.1/bin/sdl-config fails because there are spaces in the installation path \$\endgroup\$ – John H. K. Feb 3 '18 at 14:24
  • \$\begingroup\$ Okay i will try to fix this can you post a example on how i should write this out sorry kinda new to SDL a little \$\endgroup\$ – King Noger Feb 3 '18 at 15:38
  • \$\begingroup\$ You Know whats so freakin stupid i just figured it out and it had nothing to do with your alls answers no effence This line of code i had to change this line in the configure file to sdl test from yes to no and it found the sdl v 1.0.1 and the sdl-config very weird in deed that was ticked on for people do be able to not configure this code wow # Check whether --enable-sdltest or --disable-sdltest was given. if test "${enable_sdltest+set}" = set; then enableval="$enable_sdltest" : else enable_sdltest=no // THIS WAS THE ISSUE I SET THIS FROM YES TO NO AND IT CONFIGURED WOW fi \$\endgroup\$ – King Noger Feb 4 '18 at 3:55
  • \$\begingroup\$ Weird i ran into this error now what is this and how do i fix this any advice... \$\endgroup\$ – King Noger Feb 4 '18 at 4:15
  • \$\begingroup\$ pastebin.com/q3vSU14t here is my makefile error that i get from the command line any advice on how to fix this \$\endgroup\$ – King Noger Feb 4 '18 at 4:18

Steps to bring sdldoom to compile and run on Windows/MingW with gcc-6.3.0



  • MingW: Install packages mingw32-base, msys-base, mingw32-gcc-g++


  • doom1.wad.zip
  • sdldoom-1.10.tar.gz


  • SDL-1.0.1.zip


  1. Unzip SDL-1.0.1.zip and run ´./configure; make; make install` in the new SDL-1.0.1 directory
  2. Untar sdldoom-1.10.tar.gz to a new folder named sdldoom
  3. Running ./configure will fail because the test in the configure script apparently uses the 'wrong' main function, which does not match the prototype defined in SDL_main.h. Just change the line 1224 from int main () to int main (int argc, char * argv[])
  4. ./configure should now run without errors
  5. When running make, it will fail with a complaint about conflicting types: typedef enum {false, true} boolean; is the statement which defines the boolean type in the sdldoom-source. To fix that, we can find and replace all Occurences of "boolean" in the sdldoom-source: Run find . -name *.[ch] -print0 | xargs -0 sed -i '' -e 's/boolean/Boolean/g' inside the sdldoom folder to replace all boolean with Boolean.
  6. Next, make will complain about an undeclared IPPORT_USERRESERVED. Just copy a #define IPPORT_USERRESERVED 5000 at the beginning of the file i_net.c
  7. Now it should compile, but the linker will throw an error about undefined references. In the Makefile add the library ws2_32 to the LIBS variable: LIBS = -L/usr/local/lib -lmingw32 -lSDLmain -lSDL -luser32 -lgdi32 -lwinmm -mwindows -lws2_32
  8. Run the linker with make again, and the doom.exe will be created. Now extract the DOOM1.WAD to the sdldoom folder, and the game is ready to run.

The installation in this way is certainly a little bit hacky, but then again the source is nearly 20 years old.

  • \$\begingroup\$ Hey I have got to this issue now you have helped me so far but when i run this command i get this issue what command should i use C:\Users\John\Desktop\sdldoom>find . -name *.[ch] -print0 | xargs -0 sed -i '' -e 's/boolean/Boolean/g' File not found - *.[ch] sed.exe: can't read : Invalid argument // ANY HELP ON WHAT I AM DOING \$\endgroup\$ – King Noger Feb 4 '18 at 23:47
  • \$\begingroup\$ Also How can I change the exe name from sdldoom.exe to something else that the makefile spits out any advice on this also... \$\endgroup\$ – King Noger Feb 4 '18 at 23:50
  • \$\begingroup\$ Regarding the find&replace operation - What is the ouput of find . -name *.[ch] -print0? Try the command sed --help and xargs --help to make sure they're there. Regarding the name, you can just rename it after make finished? Not sure what you want. \$\endgroup\$ – John H. K. Feb 5 '18 at 9:30
  • \$\begingroup\$ This is the xargs --help mabe you can see what i need to put Usage: xargs [-0prtx] [--interactive] [--null] [-d|--delimiter=delim] [-E eof-str] [-e[eof-str]] [--eof[=eof-str]] [-L max-lines] [-l[max-lines]] [--max-lines[=max-lines]] [-I replace-str] [-i[replace-str]] [--replace[=replace-str]] [-n max-args] [--max-args=max-args] [-s max-chars] [--max-chars=max-chars] [-P max-procs] [--max-procs=max-procs] [--show-limits] [--verbose] [--exit] [--no-run-if-empty] [--arg-file=file] [--version] [--help] [command [initial-arguments]] \$\endgroup\$ – King Noger Feb 5 '18 at 9:38
  • \$\begingroup\$ And here is the Help Command line info with the help command pastebin.com/3rQV30k0 \$\endgroup\$ – King Noger Feb 5 '18 at 9:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.