Advertisement
Guest User

Untitled

a guest
Jan 5th, 2016
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.94 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. os=$(uname -s | cut -d'-' -f1 | cut -d'_' -f1 | tr '[:upper:]' '[:lower:]')
  4.  
  5. [[ $os = cygwin ]] && {
  6.    # Cygwin does no longer supports the -mno-cygwin option
  7.    sed -i 's/-mno-cygwin//g' configure
  8.    sed -i 's/-mno-cygwin//g' configure.in
  9.    
  10.    # Cygwin does no longer supports linking with mingw32
  11.    sed -i 's/-lmingw32 //g' configure
  12.    sed -i 's/-lmingw32 //g' configure.in
  13. }
  14.  
  15. # Do not configure with SDL_main to prevent WinMain dependencies
  16. sed -i 's/ -Dmain=SDL_main//g' configure
  17. sed -i 's/ -Dmain=SDL_main//g' configure.in
  18.  
  19. ./configure --disable-threads
  20.  
  21. [[ $os = cygwin ]] && {
  22.    # Cygwin does not have this MSVCRT library and it's not actually used either
  23.    sed -i 's/# include <direct.h>/\/* # include <direct.h> *\//g' src/main/win32/SDL_win32_main.c
  24.    # Check if configured twice
  25.    sed -i 's/\/\* \/\* # include <direct.h> \*\/ \*\//\/* # include <direct.h> *\//g' src/main/win32/SDL_win32_main.c
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement