History

Add --enable-cygwin option to build on windows with cygwin+mingw32

Henry Kroll III committed 15 years ago

Commit 94e72b11 parent c5d3ce61 file · +11 −1Browse files

Unified · Split

configure+11−1
@@ -36,6 +36,7 @@ cc="gcc" · 35 unmodified lines
3636 host_cc="gcc"
3737 ar="ar"
3838 strip="strip"
39+cygwin="no"
3940 cpu=`uname -m`
4041 case "$cpu" in
4142 i386|i486|i586|i686|i86pc|BePC|i686-AT386)
@@ -133,6 +134,8 @@ for opt do · 91 unmodified lines
133134 ;;
134135 --enable-mingw32) mingw32="yes" ; cross_prefix="i686-pc-mingw32-" ; cpu=x86
135136 ;;
137+ --enable-cygwin) mingw32="yes" ; cygwin="yes" ; cross_prefix="mingw32-" ; cpu=x86
138+ ;;
136139 --enable-cross) build_cross="yes"
137140 ;;
138141 --disable-static) disable_static="yes"
@@ -243,7 +246,8 @@ echo " --sysroot=PREFIX prepend PREFIX to library/include paths []" · 104 unmodified lines
243246 echo " --cc=CC use C compiler CC [$cc]"
244247 echo " --disable-static make libtcc.so instead of libtcc.a"
245248 echo " --with-libgcc use /lib/libgcc_s.so.1 instead of libtcc.a"
246−echo " --enable-mingw32 build windows version with mingw32"
249+echo " --enable-cygwin build windows version on windows with mingw32"
250+echo " --enable-mingw32 build windows version on linux with mingw32"
247251 echo " --extra-cflags= extra compiler flags"
248252 echo " --extra-ldflags= extra linker options"
249253 echo " --with-selinux use mmap instead of exec mem"
@@ -367,6 +371,12 @@ if test "$mingw32" = "yes" ; then · 117 unmodified lines
367371 echo "CONFIG_WIN32=yes" >> config.mak
368372 echo "#define CONFIG_WIN32 1" >> $TMPH
369373 fi
374+if test "$cygwin" = "yes" ; then
375+ echo "#ifndef _WIN32" >> $TMPH
376+ echo "#define _WIN32" >> $TMPH
377+ echo "#endif" >> $TMPH
378+ echo "AR=ar" >> config.mak
379+fi
370380 if test "$bigendian" = "yes" ; then
371381 echo "WORDS_BIGENDIAN=yes" >> config.mak
372382 echo "#define WORDS_BIGENDIAN 1" >> $TMPH

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t