diff --git a/configure b/configure index 1f50a53c..c762ea33 100755 --- a/configure +++ b/configure @@ -55,6 +55,7 @@ case $targetos in Darwin) confvars="$confvars OSX" tcc_usrinclude="`xcrun --show-sdk-path`/usr/include" + cc="clang" DLLSUF=".dylib" ;; Windows_NT|MINGW*|MSYS*|CYGWIN*) diff --git a/conftest.c b/conftest.c index 14babf04..255ebb3f 100644 --- a/conftest.c +++ b/conftest.c @@ -66,12 +66,21 @@ int main(int argc, char *argv[]) break; } #ifdef __GNUC__ +#ifdef __clang__ + case 'm': + printf("%d\n", __clang_minor__); + break; + case 'v': + printf("%d\n", __clang_major__); + break; +#else case 'm': printf("%d\n", __GNUC_MINOR__); break; case 'v': printf("%d\n", __GNUC__); break; +#endif #elif defined __TINYC__ case 'v': puts("0");