Skip to content

Commit 7c597e5

Browse files
Merge pull request #10881 from ggouaillardet/topic/ifort_osx
autogen.pl: patch generated configure file for ifort support on OS X
2 parents b500283 + a00530f commit 7c597e5

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

autogen.pl

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,6 +1065,30 @@ sub patch_autotools_output {
10651065
*)';
10661066
$c =~ s/$search_string/$replace_string/g;
10671067

1068+
# Fix ifort support on OSX
1069+
# see https://ntq1982.github.io/files/20200621.html
1070+
$search_string = 'case \$cc_basename in
1071+
nagfor\*\)
1072+
# NAG Fortran compiler
1073+
lt_prog_compiler_wl_FC=\'-Wl,-Wl,,\'
1074+
lt_prog_compiler_pic_FC=\'-PIC\'
1075+
lt_prog_compiler_static_FC=\'-Bstatic\'
1076+
;;';
1077+
$replace_string = "case \$cc_basename in
1078+
icc* | ifort*)
1079+
#Intel Fortran compiler
1080+
lt_prog_compiler_wl_FC='-Wl,'
1081+
lt_prog_compiler_pic_FC='-fno-common -PIC'
1082+
lt_prog_compiler_static_FC=''
1083+
;;
1084+
nagfor*)
1085+
# NAG Fortran compiler
1086+
lt_prog_compiler_wl_FC='-Wl,-Wl,,'
1087+
lt_prog_compiler_pic_FC='-PIC'
1088+
lt_prog_compiler_static_FC='-Bstatic'
1089+
;;";
1090+
$c =~ s/$search_string/$replace_string/g;
1091+
10681092
# Only write out verbose statements and a new configure if the
10691093
# configure content actually changed
10701094
return

0 commit comments

Comments
 (0)