Why force cross-compiling mode every time? Let see how things go without it ...

git-svn-id: http://qeforge.qe-forge.org/svn/q-e/trunk/espresso@12927 c92efa57-630b-4861-b058-cf58834340f0
This commit is contained in:
spigafi 2016-09-08 09:18:36 +00:00
parent 9fbfde5865
commit 80c9a93100
2 changed files with 74 additions and 38 deletions

107
install/configure vendored
View File

@ -2037,7 +2037,10 @@ $as_echo_n "checking ARCH... " >&6; }
# (only on NEC SX8 actually)
if test "$host" != "" ; then ranlib=echo; fi
cross_compiling=yes
# cross compiling? Why?
#cross_compiling=yes
if test "$host" = "" ; then host=$build; fi
# identify host architecture
@ -10759,17 +10762,47 @@ fi
if test "$have_fft" == "1"
then
try_dflags="$try_dflags -D__DFTI"
try_incdir="$MKL_INCLUDE $MKLROOT/include $CPATH $FPATH"
try_incdir="$MKLROOT/include $MKL_INCLUDE $CPATH $FPATH"
for inc in $try_incdir
do
#we need to add the fft include path to IFLAGS
if test "$cross_compiling" == "no"
then
# when cross-compilation is disabled I can check file paths...
as_ac_File=`$as_echo "ac_cv_file_$inc/mkl_dfti.f90" | $as_tr_sh`
{ $as_echo "$as_me:$LINENO: checking for $inc/mkl_dfti.f90" >&5
$as_echo_n "checking for $inc/mkl_dfti.f90... " >&6; }
if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
$as_echo_n "(cached) " >&6
else
test "$cross_compiling" = yes &&
{ { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
{ (exit 1); exit 1; }; }
if test -r "$inc/mkl_dfti.f90"; then
eval "$as_ac_File=yes"
else
eval "$as_ac_File=no"
fi
fi
ac_res=`eval 'as_val=${'$as_ac_File'}
$as_echo "$as_val"'`
{ $as_echo "$as_me:$LINENO: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
as_val=`eval 'as_val=${'$as_ac_File'}
$as_echo "$as_val"'`
if test "x$as_val" = x""yes; then
have_fft_include=1
else
have_fft_include=0
fi
for ac_header in $inc/mkl_dfti.f90
do
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
else
# when cross-compilation is enabled I need to rely on header
# checking (bit it complains...
as_ac_Header=`$as_echo "ac_cv_header_$inc/mkl_dfti.f90" | $as_tr_sh`
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
$as_echo_n "checking for $ac_header... " >&6; }
{ $as_echo "$as_me:$LINENO: checking for $inc/mkl_dfti.f90" >&5
$as_echo_n "checking for $inc/mkl_dfti.f90... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
$as_echo_n "(cached) " >&6
fi
@ -10779,8 +10812,8 @@ ac_res=`eval 'as_val=${'$as_ac_Header'}
$as_echo "$ac_res" >&6; }
else
# Is the header compilable?
{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
$as_echo_n "checking $ac_header usability... " >&6; }
{ $as_echo "$as_me:$LINENO: checking $inc/mkl_dfti.f90 usability" >&5
$as_echo_n "checking $inc/mkl_dfti.f90 usability... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
@ -10788,7 +10821,7 @@ cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
#include <$ac_header>
#include <$inc/mkl_dfti.f90>
_ACEOF
rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
@ -10821,15 +10854,15 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
$as_echo "$ac_header_compiler" >&6; }
# Is the header present?
{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
$as_echo_n "checking $ac_header presence... " >&6; }
{ $as_echo "$as_me:$LINENO: checking $inc/mkl_dfti.f90 presence" >&5
$as_echo_n "checking $inc/mkl_dfti.f90 presence... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <$ac_header>
#include <$inc/mkl_dfti.f90>
_ACEOF
if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
@ -10863,30 +10896,30 @@ $as_echo "$ac_header_preproc" >&6; }
# So? What about this header?
case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
yes:no: )
{ $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
{ $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
{ $as_echo "$as_me:$LINENO: WARNING: $inc/mkl_dfti.f90: accepted by the compiler, rejected by the preprocessor!" >&5
$as_echo "$as_me: WARNING: $inc/mkl_dfti.f90: accepted by the compiler, rejected by the preprocessor!" >&2;}
{ $as_echo "$as_me:$LINENO: WARNING: $inc/mkl_dfti.f90: proceeding with the compiler's result" >&5
$as_echo "$as_me: WARNING: $inc/mkl_dfti.f90: proceeding with the compiler's result" >&2;}
ac_header_preproc=yes
;;
no:yes:* )
{ $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
{ $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
{ $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
{ $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
{ $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
{ $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
{ $as_echo "$as_me:$LINENO: WARNING: $inc/mkl_dfti.f90: present but cannot be compiled" >&5
$as_echo "$as_me: WARNING: $inc/mkl_dfti.f90: present but cannot be compiled" >&2;}
{ $as_echo "$as_me:$LINENO: WARNING: $inc/mkl_dfti.f90: check for missing prerequisite headers?" >&5
$as_echo "$as_me: WARNING: $inc/mkl_dfti.f90: check for missing prerequisite headers?" >&2;}
{ $as_echo "$as_me:$LINENO: WARNING: $inc/mkl_dfti.f90: see the Autoconf documentation" >&5
$as_echo "$as_me: WARNING: $inc/mkl_dfti.f90: see the Autoconf documentation" >&2;}
{ $as_echo "$as_me:$LINENO: WARNING: $inc/mkl_dfti.f90: section \"Present But Cannot Be Compiled\"" >&5
$as_echo "$as_me: WARNING: $inc/mkl_dfti.f90: section \"Present But Cannot Be Compiled\"" >&2;}
{ $as_echo "$as_me:$LINENO: WARNING: $inc/mkl_dfti.f90: proceeding with the preprocessor's result" >&5
$as_echo "$as_me: WARNING: $inc/mkl_dfti.f90: proceeding with the preprocessor's result" >&2;}
{ $as_echo "$as_me:$LINENO: WARNING: $inc/mkl_dfti.f90: in the future, the compiler will take precedence" >&5
$as_echo "$as_me: WARNING: $inc/mkl_dfti.f90: in the future, the compiler will take precedence" >&2;}
;;
esac
{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
$as_echo_n "checking for $ac_header... " >&6; }
{ $as_echo "$as_me:$LINENO: checking for $inc/mkl_dfti.f90" >&5
$as_echo_n "checking for $inc/mkl_dfti.f90... " >&6; }
if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
$as_echo_n "(cached) " >&6
else
@ -10901,13 +10934,13 @@ fi
as_val=`eval 'as_val=${'$as_ac_Header'}
$as_echo "$as_val"'`
if test "x$as_val" = x""yes; then
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
_ACEOF
have_fft_include=1
have_fft_include=1
else
have_fft_include-0
fi
done
fi
if test "$have_fft_include=1"
then

View File

@ -14,7 +14,10 @@ AC_DEFUN([X_AC_QE_ARCH], [
# (only on NEC SX8 actually)
if test "$host" != "" ; then ranlib=echo; fi
cross_compiling=yes
# cross compiling? Why?
#cross_compiling=yes
if test "$host" = "" ; then host=$build; fi
# identify host architecture