3044
3044
: ${FFLAGS:="-nologo -Z7 -MDd"}
3045
3045
: ${FCFLAGS:="-nologo -Z7 -MDd"}
3046
3046
: ${CFLAGS:="-nologo -Z7 -MDd"}
3047
- : ${CXXFLAGS:="-nologo -EHsc -Z7 -MDd"}
3047
+ : ${CXXFLAGS:="-nologo -EHs -Z7 -MDd"}
3048
3048
: ${AR:="lib"}
3049
3049
: ${AR_FLAGS:="-nologo -out:"}
3050
3050
else
3058
3058
: ${FFLAGS:="-nologo -O2 -MD"}
3059
3059
: ${FCFLAGS:="-nologo -O2 -MD"}
3060
3060
: ${CFLAGS:="-nologo -DNDEBUG -O2 -MD"}
3061
- : ${CXXFLAGS:="-nologo -EHsc -DNDEBUG -O2 -MD"}
3061
+ : ${CXXFLAGS:="-nologo -EHs -DNDEBUG -O2 -MD"}
3062
3062
: ${AR:="lib"}
3063
3063
: ${AR_FLAGS:="-nologo -out:"}
3064
3064
else
@@ -3944,28 +3944,75 @@ fi
3944
3944
3945
3945
3946
3946
3947
- # Setting up libtool with LT_INIT will AC_REQUIRE AC_PROG_CC, but we want
3948
- # to invoke it from this macro first so that we can supply a parameter.
3947
+ # Setting up libtool with LT_INIT will AC_REQUIRE AC_PROG_CC, but we want
3948
+ # to invoke it from this macro first so that we can supply a parameter.
3949
3949
3950
3950
3951
+ # If enable-msvc, then test for Intel (on Windows) and MS C compiler
3952
+ # explicitly and add compile-wrapper before AC_PROG_CC, because
3953
+ # the compile-wrapper work around issues when having the wrong link.exe
3954
+ # in the PATH first, which would upset tests in AC_PROG_CC.
3955
+ # Further, if CC unset and not set by user, then stop with error.
3956
+ if test $enable_msvc = yes ; then
3957
+ for ac_prog in icl cl
3958
+ do
3959
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
3960
+ set dummy $ac_prog; ac_word=$2
3961
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3962
+ $as_echo_n "checking for $ac_word... " >&6; }
3963
+ if ${ac_cv_prog_CC+:} false; then :
3964
+ $as_echo_n "(cached) " >&6
3965
+ else
3966
+ if test -n "$CC"; then
3967
+ ac_cv_prog_CC="$CC" # Let the user override the test.
3968
+ else
3969
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3970
+ for as_dir in $PATH
3971
+ do
3972
+ IFS=$as_save_IFS
3973
+ test -z "$as_dir" && as_dir=.
3974
+ for ac_exec_ext in '' $ac_executable_extensions; do
3975
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3976
+ ac_cv_prog_CC="$ac_prog"
3977
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3978
+ break 2
3979
+ fi
3980
+ done
3981
+ done
3982
+ IFS=$as_save_IFS
3951
3983
3952
- # If enable-msvc, then test only for MS and Intel (on Windows) C compiler
3953
- # otherwise, test a long list of C compilers that comes into our mind
3984
+ fi
3985
+ fi
3986
+ CC=$ac_cv_prog_CC
3987
+ if test -n "$CC"; then
3988
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3989
+ $as_echo "$CC" >&6; }
3990
+ else
3991
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3992
+ $as_echo "no" >&6; }
3993
+ fi
3954
3994
3955
- if test $enable_msvc = yes ; then
3956
- comps="icl cl"
3957
- else
3958
- # TODO old buildtools was doing some $build specific logic here, do we
3959
- # still need this?
3960
- comps="gcc clang cc icc icl cl cc xlc xlc_r pgcc"
3995
+
3996
+ test -n "$CC" && break
3997
+ done
3998
+
3999
+ if test -n "$CC" ; then
4000
+ CC="$am_aux_dir/compile $CC"
4001
+ else
4002
+ as_fn_error $? "Neither MS nor Intel C compiler found in PATH and CC is unset." "$LINENO" 5
4003
+ fi
3961
4004
fi
4005
+
4006
+ # look for some C compiler and check whether it works
4007
+ # if user has set CC or we found icl/cl above, this shouldn't overwrite CC
4008
+ # other than CXX of F77, this macro also takes care of adding the compile-wrapper
3962
4009
ac_ext=c
3963
4010
ac_cpp='$CPP $CPPFLAGS'
3964
4011
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3965
4012
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3966
4013
ac_compiler_gnu=$ac_cv_c_compiler_gnu
3967
4014
if test -n "$ac_tool_prefix"; then
3968
- for ac_prog in $comps
4015
+ for ac_prog in gcc clang cc icc icl cl cc xlc xlc_r pgcc
3969
4016
do
3970
4017
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3971
4018
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4009
4056
fi
4010
4057
if test -z "$CC"; then
4011
4058
ac_ct_CC=$CC
4012
- for ac_prog in $comps
4059
+ for ac_prog in gcc clang cc icc icl cl cc xlc xlc_r pgcc
4013
4060
do
4014
4061
# Extract the first word of "$ac_prog", so it can be a program name with args.
4015
4062
set dummy $ac_prog; ac_word=$2
@@ -4748,16 +4795,63 @@ fi
4748
4795
4749
4796
4750
4797
4751
- # If enable-msvc, then test only for MS and Intel (on Windows) C++ compiler
4752
- # otherwise, test a long list of C++ compilers that comes into our mind
4753
-
4798
+ # If enable-msvc, then test for Intel (on Windows) and MS C++ compiler
4799
+ # explicitly and add compile-wrapper before AC_PROG_CXX, because
4800
+ # the compile-wrapper work around issues when having the wrong link.exe
4801
+ # in the PATH first, which would upset tests in AC_PROG_CXX.
4802
+ # Further, if CXX unset and not set by user, then stop with error.
4754
4803
if test $enable_msvc = yes ; then
4755
- comps="icl cl"
4756
- else
4757
- # TODO old buildtools was doing some $build specific logic here, do we
4758
- # still need this?
4759
- comps="g++ clang++ c++ pgCC icpc gpp cxx cc++ icl cl FCC KCC RCC xlC_r aCC CC"
4804
+ for ac_prog in icl cl
4805
+ do
4806
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
4807
+ set dummy $ac_prog; ac_word=$2
4808
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4809
+ $as_echo_n "checking for $ac_word... " >&6; }
4810
+ if ${ac_cv_prog_CXX+:} false; then :
4811
+ $as_echo_n "(cached) " >&6
4812
+ else
4813
+ if test -n "$CXX"; then
4814
+ ac_cv_prog_CXX="$CXX" # Let the user override the test.
4815
+ else
4816
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4817
+ for as_dir in $PATH
4818
+ do
4819
+ IFS=$as_save_IFS
4820
+ test -z "$as_dir" && as_dir=.
4821
+ for ac_exec_ext in '' $ac_executable_extensions; do
4822
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4823
+ ac_cv_prog_CXX="$ac_prog"
4824
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4825
+ break 2
4760
4826
fi
4827
+ done
4828
+ done
4829
+ IFS=$as_save_IFS
4830
+
4831
+ fi
4832
+ fi
4833
+ CXX=$ac_cv_prog_CXX
4834
+ if test -n "$CXX"; then
4835
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
4836
+ $as_echo "$CXX" >&6; }
4837
+ else
4838
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4839
+ $as_echo "no" >&6; }
4840
+ fi
4841
+
4842
+
4843
+ test -n "$CXX" && break
4844
+ done
4845
+
4846
+ if test -n "$CXX" ; then
4847
+ CXX="$am_aux_dir/compile $CXX"
4848
+ else
4849
+ as_fn_error $? "Neither MS nor Intel C++ compiler found in PATH and CXX is unset." "$LINENO" 5
4850
+ fi
4851
+ fi
4852
+
4853
+ # look for some C++ compiler and check whether it works
4854
+ # if user has set CXX or we found icl/cl above, this shouldn't overwrite CXX
4761
4855
ac_ext=cpp
4762
4856
ac_cpp='$CXXCPP $CPPFLAGS'
4763
4857
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -4768,7 +4862,7 @@ if test -z "$CXX"; then
4768
4862
CXX=$CCC
4769
4863
else
4770
4864
if test -n "$ac_tool_prefix"; then
4771
- for ac_prog in $comps
4865
+ for ac_prog in g++ clang++ c++ pgCC icpc gpp cxx cc++ icl cl FCC KCC RCC xlC_r aCC CC
4772
4866
do
4773
4867
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4774
4868
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4812
4906
fi
4813
4907
if test -z "$CXX"; then
4814
4908
ac_ct_CXX=$CXX
4815
- for ac_prog in $comps
4909
+ for ac_prog in g++ clang++ c++ pgCC icpc gpp cxx cc++ icl cl FCC KCC RCC xlC_r aCC CC
4816
4910
do
4817
4911
# Extract the first word of "$ac_prog", so it can be a program name with args.
4818
4912
set dummy $ac_prog; ac_word=$2
5144
5238
5145
5239
5146
5240
5147
- # If the compiler does not support -c -o, then wrap the compile script around
5148
- # it.
5149
-
5241
+ # If the compiler does not support -c -o, then wrap the compile script around it.
5150
5242
ac_ext=cpp
5151
5243
ac_cpp='$CXXCPP $CPPFLAGS'
5152
5244
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -5232,20 +5324,67 @@ fi
5232
5324
# make sure F77 is not set
5233
5325
unset F77
5234
5326
else
5235
- # if enable-msvc, then test only for Intel (on Windows) Fortran compiler
5327
+ # If enable-msvc, then test for Intel Fortran compiler for Windows
5328
+ # explicitly and add compile-wrapper before AC_PROG_F77, because
5329
+ # the compile-wrapper work around issues when having the wrong link.exe
5330
+ # in the PATH first, which could upset tests in AC_PROG_F77.
5236
5331
if test $enable_msvc = yes ; then
5237
- comps="ifort"
5238
- else
5239
- # TODO old buildtools was doing some $build specific logic here, do we still
5240
- # need this?
5241
- comps="gfortran ifort g95 fort77 f77 f95 f90 g77 pgf90 pgf77 ifc frt af77 xlf_r fl32"
5332
+ for ac_prog in ifort
5333
+ do
5334
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
5335
+ set dummy $ac_prog; ac_word=$2
5336
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5337
+ $as_echo_n "checking for $ac_word... " >&6; }
5338
+ if ${ac_cv_prog_F77+:} false; then :
5339
+ $as_echo_n "(cached) " >&6
5340
+ else
5341
+ if test -n "$F77"; then
5342
+ ac_cv_prog_F77="$F77" # Let the user override the test.
5343
+ else
5344
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5345
+ for as_dir in $PATH
5346
+ do
5347
+ IFS=$as_save_IFS
5348
+ test -z "$as_dir" && as_dir=.
5349
+ for ac_exec_ext in '' $ac_executable_extensions; do
5350
+ if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5351
+ ac_cv_prog_F77="$ac_prog"
5352
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5353
+ break 2
5354
+ fi
5355
+ done
5356
+ done
5357
+ IFS=$as_save_IFS
5358
+
5359
+ fi
5360
+ fi
5361
+ F77=$ac_cv_prog_F77
5362
+ if test -n "$F77"; then
5363
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $F77" >&5
5364
+ $as_echo "$F77" >&6; }
5365
+ else
5366
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5367
+ $as_echo "no" >&6; }
5368
+ fi
5369
+
5370
+
5371
+ test -n "$F77" && break
5372
+ done
5373
+
5374
+ if test -n "$F77" ; then
5375
+ F77="$am_aux_dir/compile $F77"
5376
+ fi
5242
5377
fi
5243
- ac_ext=f
5378
+
5379
+ # if not msvc-enabled, then look for some Fortran compiler and check whether it works
5380
+ # if F77 is set, then this only checks whether it works
5381
+ if test $enable_msvc = no || test -n "$F77" ; then
5382
+ ac_ext=f
5244
5383
ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
5245
5384
ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5246
5385
ac_compiler_gnu=$ac_cv_f77_compiler_gnu
5247
5386
if test -n "$ac_tool_prefix"; then
5248
- for ac_prog in $comps
5387
+ for ac_prog in gfortran ifort g95 fort77 f77 f95 f90 g77 pgf90 pgf77 ifc frt af77 xlf_r fl32
5249
5388
do
5250
5389
# Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5251
5390
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5289
5428
fi
5290
5429
if test -z "$F77"; then
5291
5430
ac_ct_F77=$F77
5292
- for ac_prog in $comps
5431
+ for ac_prog in gfortran ifort g95 fort77 f77 f95 f90 g77 pgf90 pgf77 ifc frt af77 xlf_r fl32
5293
5432
do
5294
5433
# Extract the first word of "$ac_prog", so it can be a program name with args.
5295
5434
set dummy $ac_prog; ac_word=$2
@@ -5451,10 +5590,10 @@ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5451
5590
ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5452
5591
ac_compiler_gnu=$ac_cv_c_compiler_gnu
5453
5592
5593
+ fi
5454
5594
fi
5455
5595
5456
- # Allow for the possibility that there is no Fortran compiler on the system.
5457
-
5596
+ # Allow for the possibility that there is no Fortran compiler on the system.
5458
5597
if test -z "$F77" ; then
5459
5598
{ $as_echo "$as_me:${as_lineno-$LINENO}: No Fortran 77 compiler available." >&5
5460
5599
$as_echo "$as_me: No Fortran 77 compiler available." >&6;}
@@ -24727,7 +24866,7 @@ else
24727
24866
JAVA_TEST=Test.java
24728
24867
CLASS_TEST=Test.class
24729
24868
cat << \EOF > $JAVA_TEST
24730
- /* #line 24730 "configure" */
24869
+ /* #line 24869 "configure" */
24731
24870
public class Test {
24732
24871
}
24733
24872
EOF
@@ -25195,7 +25334,7 @@ else
25195
25334
JAVA_TEST=Test.java
25196
25335
CLASS_TEST=Test.class
25197
25336
cat << \EOF > $JAVA_TEST
25198
- /* #line 25198 "configure" */
25337
+ /* #line 25337 "configure" */
25199
25338
public class Test {
25200
25339
}
25201
25340
EOF
@@ -25229,7 +25368,7 @@ JAVA_TEST=Test.java
25229
25368
CLASS_TEST=Test.class
25230
25369
TEST=Test
25231
25370
cat << \EOF > $JAVA_TEST
25232
- /* [#]line 25232 "configure" */
25371
+ /* [#]line 25371 "configure" */
25233
25372
public class Test {
25234
25373
public static void main (String args[]) {
25235
25374
System.exit (0);
0 commit comments