Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- os=$(uname -s | cut -d'-' -f1 | cut -d'_' -f1 | tr '[:upper:]' '[:lower:]')
- [[ $os = cygwin ]] && {
- # Cygwin does no longer supports the -mno-cygwin option
- sed -i 's/-mno-cygwin//g' configure
- sed -i 's/-mno-cygwin//g' configure.in
- # Cygwin does no longer supports linking with mingw32
- sed -i 's/-lmingw32 //g' configure
- sed -i 's/-lmingw32 //g' configure.in
- }
- # Do not configure with SDL_main to prevent WinMain dependencies
- sed -i 's/ -Dmain=SDL_main//g' configure
- sed -i 's/ -Dmain=SDL_main//g' configure.in
- ./configure --disable-threads
- [[ $os = cygwin ]] && {
- # Cygwin does not have this MSVCRT library and it's not actually used either
- sed -i 's/# include <direct.h>/\/* # include <direct.h> *\//g' src/main/win32/SDL_win32_main.c
- # Check if configured twice
- sed -i 's/\/\* \/\* # include <direct.h> \*\/ \*\//\/* # include <direct.h> *\//g' src/main/win32/SDL_win32_main.c
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement