diff options
Diffstat (limited to 'libgfortran/configure')
| -rwxr-xr-x | libgfortran/configure | 129 | 
1 files changed, 64 insertions, 65 deletions
diff --git a/libgfortran/configure b/libgfortran/configure index c6b00a9..5cf3bf6 100755 --- a/libgfortran/configure +++ b/libgfortran/configure @@ -7815,15 +7815,7 @@ rm -f conftest*  fi  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $clang_cv_is_clang" >&5  $as_echo "$clang_cv_is_clang" >&6; } -  plugin_file= -  if test $clang_cv_is_clang = yes; then -    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang plugin file" >&5 -$as_echo_n "checking for clang plugin file... " >&6; } -    plugin_names="LLVMgold.so" -    for plugin in $plugin_names; do -      plugin_file=`${CC} ${CFLAGS} --print-file-name $plugin` -      if test x$plugin_file = x$plugin; then -	if test -n "$ac_tool_prefix"; then +  if test -n "$ac_tool_prefix"; then    # Extract the first word of "${ac_tool_prefix}llvm-config", so it can be a program name with args.  set dummy ${ac_tool_prefix}llvm-config; ac_word=$2  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -7915,22 +7907,31 @@ else    LLVM_CONFIG="$ac_cv_prog_LLVM_CONFIG"  fi -	if test "$?" != 0; then -	  as_fn_error $? "Required tool 'llvm-config' not found on PATH." "$LINENO" 5 -	fi -	clang_lib_dir=`$LLVM_CONFIG --libdir` -	if test -f $clang_lib_dir/$plugin; then -	  plugin_file=$clang_lib_dir/$plugin -	fi -	if test x$plugin_file != x$plugin; then +  plugin_file= +  if test $clang_cv_is_clang = yes; then +    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clang plugin file" >&5 +$as_echo_n "checking for clang plugin file... " >&6; } +    plugin_names="LLVMgold.so" +    for plugin in $plugin_names; do +      plugin_file=`${CC} ${CFLAGS} --print-file-name $plugin` +      if test "$plugin_file" != "$plugin"; then +	break; +      fi +      if test -n "${LLVM_CONFIG}"; then +	plugin_file=`${LLVM_CONFIG} --libdir`/$plugin +	if test -f "$plugin_file"; then  	  break;  	fi        fi +      plugin_file=      done -    if test -z $plugin_file; then -      as_fn_error $? "Couldn't find clang plugin file for $CC." "$LINENO" 5 -    fi -        if test -n "$ac_tool_prefix"; then +    if test -z "$plugin_file"; then +      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +    else +      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_file" >&5 +$as_echo "$plugin_file" >&6; } +            if test -n "$ac_tool_prefix"; then    # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.  set dummy ${ac_tool_prefix}ar; ac_word=$2  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -8022,42 +8023,26 @@ else    AR="$ac_cv_prog_AR"  fi -    if test "${AR}" = "" ; then -      as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5 -    fi -    plugin_option="--plugin $plugin_file" -    touch conftest.c -    ${AR} $plugin_option rc conftest.a conftest.c -    if test "$?" != 0; then -      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 +      if test -z "${AR}"; then +	as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5 +      fi +      plugin_option="--plugin $plugin_file" +      touch conftest.c +      ${AR} $plugin_option rc conftest.a conftest.c +      if test "$?" != 0; then +	{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5  $as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} -      plugin_file= +	plugin_file= +      fi +      rm -f conftest.*      fi -    rm -f conftest.* -    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_file" >&5 -$as_echo "$plugin_file" >&6; }    fi    plugin_file="$plugin_file"  if test -n "$plugin_file"; then    plugin_option="--plugin $plugin_file"  else -  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -plugin option" >&5 -$as_echo_n "checking for -plugin option... " >&6; } - -plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" -plugin_option= -for plugin in $plugin_names; do -  plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin` -  if test x$plugin_so = x$plugin; then -    plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin` -  fi -  if test x$plugin_so != x$plugin; then -    plugin_option="--plugin $plugin_so" -    break -  fi -done -if test -n "$ac_tool_prefix"; then +  if test -n "$ac_tool_prefix"; then    # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.  set dummy ${ac_tool_prefix}ar; ac_word=$2  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -8149,25 +8134,39 @@ else    AR="$ac_cv_prog_AR"  fi -if test "${AR}" = "" ; then +if test -z "${AR}"; then    as_fn_error $? "Required archive tool 'ar' not found on PATH." "$LINENO" 5  fi -touch conftest.c -${AR} $plugin_option rc conftest.a conftest.c -if test "$?" != 0; then -  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 -$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} -  plugin_option= -fi -rm -f conftest.* -if test -n "$plugin_option"; then -  plugin_option="$plugin_option" -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_option" >&5 -$as_echo "$plugin_option" >&6; } -else +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -plugin option" >&5 +$as_echo_n "checking for -plugin option... " >&6; } +plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll" +plugin_option= +for plugin in $plugin_names; do +  plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin` +  if test x$plugin_so = x$plugin; then +    plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin` +  fi +  if test x$plugin_so != x$plugin; then +    plugin_option="--plugin $plugin_so" +    break +  fi +done +if test -z "$plugin_option"; then    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5  $as_echo "no" >&6; } +else +  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $plugin_option" >&5 +$as_echo "$plugin_option" >&6; } +    touch conftest.c +  ${AR} $plugin_option rc conftest.a conftest.c +  if test "$?" != 0; then +    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed: $AR $plugin_option rc" >&5 +$as_echo "$as_me: WARNING: Failed: $AR $plugin_option rc" >&2;} +    plugin_option= +  fi +  rm -f conftest.*  fi +plugin_option="$plugin_option"  fi  if test -n "$ac_tool_prefix"; then @@ -13222,7 +13221,7 @@ else    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2    lt_status=$lt_dlunknown    cat > conftest.$ac_ext <<_LT_EOF -#line 13225 "configure" +#line 13224 "configure"  #include "confdefs.h"  #if HAVE_DLFCN_H @@ -13328,7 +13327,7 @@ else    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2    lt_status=$lt_dlunknown    cat > conftest.$ac_ext <<_LT_EOF -#line 13331 "configure" +#line 13330 "configure"  #include "confdefs.h"  #if HAVE_DLFCN_H  | 
