From: Todd Short Date: Thu, 3 May 2018 15:17:49 +0000 (-0400) Subject: Configure: fix Mac OS X builds that still require makedepend X-Git-Tag: OpenSSL_1_1_0i~127 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=29627a364be80f8c30fe7824bc3642d43d7e2c0a;p=openssl Configure: fix Mac OS X builds that still require makedepend Earlier Apple Xcode compilers, e.g. one targeting Mac OS X 10.7, don't support dependency generation and one still has to use makedepend. It's unclear when it was fixed, but all clang-based Apple compilers seem to support -M options. Reviewed-by: Rich Salz Reviewed-by: Andy Polyakov (Merged from https://github.com/openssl/openssl/pull/6167) --- diff --git a/Configure b/Configure index c0033643c6..7f073b6294 100755 --- a/Configure +++ b/Configure @@ -1215,8 +1215,10 @@ if ($^O ne "VMS") { if (!$disabled{makedepend}) { # We know that GNU C version 3 and up as well as all clang - # versions support dependency generation - if ($predefined{__GNUC__} >= 3) { + # versions support dependency generation, but Xcode did not + # handle $cc -M before clang support (but claims __GNUC__ = 3) + if (($predefined{__GNUC__} // -1) >= 3 + && !($predefined{__APPLE_CC__} && !$predefined{__clang__})) { $config{makedepprog} = $cc; } else { $config{makedepprog} = which('makedepend');