diff options
| author | Henry Kroll III <henry@comptune.com> | 2010-12-02 20:16:32 -0800 |
|---|---|---|
| committer | Henry Kroll III <henry@comptune.com> | 2010-12-02 20:16:32 -0800 |
| commit | 94e72b16e7d15a2943d9420e86765d6dca71a2f2 (patch) | |
| tree | 3cd5f3e2058db59fed1fb46fd14846300b0d11c2 /configure | |
| parent | c5d3ce684a4d1e3b59e9e3a65ca8c5bc68491dc9 (diff) | |
| download | tinycc-94e72b16e7d15a2943d9420e86765d6dca71a2f2.tar.gz tinycc-94e72b16e7d15a2943d9420e86765d6dca71a2f2.tar.bz2 | |
Add --enable-cygwin option to build on windows with cygwin+mingw32
Diffstat (limited to 'configure')
| -rwxr-xr-x | configure | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -36,6 +36,7 @@ cc="gcc" host_cc="gcc" ar="ar" strip="strip" +cygwin="no" cpu=`uname -m` case "$cpu" in i386|i486|i586|i686|i86pc|BePC|i686-AT386) @@ -133,6 +134,8 @@ for opt do ;; --enable-mingw32) mingw32="yes" ; cross_prefix="i686-pc-mingw32-" ; cpu=x86 ;; + --enable-cygwin) mingw32="yes" ; cygwin="yes" ; cross_prefix="mingw32-" ; cpu=x86 + ;; --enable-cross) build_cross="yes" ;; --disable-static) disable_static="yes" @@ -243,7 +246,8 @@ echo " --sysroot=PREFIX prepend PREFIX to library/include paths []" echo " --cc=CC use C compiler CC [$cc]" echo " --disable-static make libtcc.so instead of libtcc.a" echo " --with-libgcc use /lib/libgcc_s.so.1 instead of libtcc.a" -echo " --enable-mingw32 build windows version with mingw32" +echo " --enable-cygwin build windows version on windows with mingw32" +echo " --enable-mingw32 build windows version on linux with mingw32" echo " --extra-cflags= extra compiler flags" echo " --extra-ldflags= extra linker options" echo " --with-selinux use mmap instead of exec mem" @@ -367,6 +371,12 @@ if test "$mingw32" = "yes" ; then echo "CONFIG_WIN32=yes" >> config.mak echo "#define CONFIG_WIN32 1" >> $TMPH fi +if test "$cygwin" = "yes" ; then + echo "#ifndef _WIN32" >> $TMPH + echo "#define _WIN32" >> $TMPH + echo "#endif" >> $TMPH + echo "AR=ar" >> config.mak +fi if test "$bigendian" = "yes" ; then echo "WORDS_BIGENDIAN=yes" >> config.mak echo "#define WORDS_BIGENDIAN 1" >> $TMPH |
