diff --git a/Configure b/Configure index 81b263fa19..e374a69dca 100755 --- a/Configure +++ b/Configure @@ -1647,10 +1647,11 @@ if ($shlib_version_number =~ /(^[0-9]*)\.([0-9\.]*)/) $shlib_minor=$2; } +my $ecc = $cc; +$ecc = "clang" if `$cc --version 2>&1` =~ /clang/; + if ($strict_warnings) { - my $ecc = $cc; - $ecc = "clang" if `$cc --version 2>&1` =~ /clang/; my $wopt; die "ERROR --strict-warnings requires gcc or clang" unless ($ecc =~ /gcc$/ or $ecc =~ /clang$/); foreach $wopt (split /\s+/, $gcc_devteam_warn) @@ -1714,6 +1715,7 @@ while () s/^AR=\s*ar/AR= $ar/; s/^RANLIB=.*/RANLIB= $ranlib/; s/^MAKEDEPPROG=.*$/MAKEDEPPROG= $cc/ if $cc eq "gcc"; + s/^MAKEDEPPROG=.*$/MAKEDEPPROG= $cc/ if $ecc eq "gcc" || $ecc eq "clang"; } s/^CFLAG=.*$/CFLAG= $cflags/; s/^DEPFLAG=.*$/DEPFLAG=$depflags/; diff --git a/util/domd b/util/domd index bab48cb7a2..6a628c7f96 100755 --- a/util/domd +++ b/util/domd @@ -14,7 +14,8 @@ if [ "$MAKEDEPEND" = "" ]; then MAKEDEPEND=makedepend; fi cp Makefile Makefile.save # fake the presence of Kerberos touch $TOP/krb5.h -if expr "$MAKEDEPEND" : '.*gcc$' > /dev/null; then +if ${MAKEDEPEND} --version 2>&1 | grep -q "clang" || + echo $MAKEDEPEND | grep -q "gcc"; then args="" while [ $# -gt 0 ]; do if [ "$1" != "--" ]; then args="$args $1"; fi