From 91cd148a05e2c492a02eb77b12a2581b87bc9822 Mon Sep 17 00:00:00 2001 From: Andrei Warkentin Date: Tue, 28 Mar 2017 01:58:42 -0400 Subject: tcc: early OSX native support - build scripts - working '-run' mode, e.g.: ./tcc -B. -I./include -I. -I.. -D_ANSI_SOURCE -run examples/ex1.c Note: we don't bother parsing Mach-O/Fat images yet. We blindly dlopen the image. Signed-off-by: Andrei Warkentin --- configure | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'configure') diff --git a/configure b/configure index 4072082..2a019d8 100755 --- a/configure +++ b/configure @@ -37,6 +37,7 @@ cygwin="no" gprof="no" bigendian="no" mingw32="no" +osx="no" LIBSUF=".a" EXESUF="" DLLSUF=".so" @@ -52,6 +53,7 @@ cpu= # OS specific targetos=`uname` case $targetos in + Darwin) osx=yes;; MINGW*) mingw32=yes;; MSYS*) mingw32=yes;; CYGWIN*) mingw32=yes; cygwin=yes; cross_prefix="mingw32-";; @@ -256,6 +258,9 @@ else if test x"$tccdir" = x""; then tccdir="${libdir}/tcc" fi + if test "$osx" = "yes" ; then + DLLSUF=".dylib" + fi fi # mingw32 if test x"$includedir" = x""; then @@ -486,6 +491,9 @@ fi if test "$mingw32" = "yes" ; then echo "CONFIG_WIN32=yes" >> config.mak fi +if test "$osx" = "yes" ; then + echo "CONFIG_OSX=yes" >> config.mak +fi if test "$bigendian" = "yes" ; then echo "WORDS_BIGENDIAN=yes" >> config.mak echo "#define WORDS_BIGENDIAN 1" >> $TMPH -- cgit v1.3.1