summaryrefslogtreecommitdiff
blob: d5720cc7ad09d9e5e3974168f749597f3d1444c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
--- scilab-4.0/configure	2006-02-01 15:47:53.000000000 -0500
+++ scilab-4.0-new/configure	2006-09-16 11:13:29.000000000 -0400
@@ -4878,7 +4878,7 @@
 ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_f77_compiler_gnu
 if test -n "$ac_tool_prefix"; then
-  for ac_prog in g77 f77 xlf frt pgf77 fl32 af77 fort77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 lf95 g95
+  for ac_prog in g77 f77 xlf frt pgf77 fl32 af77 fort77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 lf95 g95 gfortran
   do
     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
@@ -4920,7 +4920,7 @@
 fi
 if test -z "$F77"; then
   ac_ct_F77=$F77
-  for ac_prog in g77 f77 xlf frt pgf77 fl32 af77 fort77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 lf95 g95
+  for ac_prog in g77 f77 xlf frt pgf77 fl32 af77 fort77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 lf95 g95 gfortran
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2
@@ -20127,10 +20127,11 @@
     DLD_SUBDIR=dld
     MAKEFILE_TARGET=Makefile.linux
    ;;
-# Linux gnu: x86_64 distributions added by cdh 2004-09-29
-  x86_64-*-linux-gnu)
-    LIEEELIB=
-    echo "$as_me:$LINENO: checking for main in -lieee" >&5
+
+# Linux gnu: x86_64 distributions added by cdh 2004-09-29 ( modified 2006-06-01 to find gfortran if needed )
+x86_64-*-linux-gnu)
+	LIEEELIB=
+	echo "$as_me:$LINENO: checking for main in -lieee" >&5
 echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6
 if test "${ac_cv_lib_ieee_main+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -20138,7 +20139,6 @@
   ac_check_lib_save_LIBS=$LIBS
 LIBS="-lieee  $LIBS"
 cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -20156,11 +20156,21 @@
 _ACEOF
 rm -f conftest.$ac_objext conftest$ac_exeext
 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
+  (eval $ac_link) 2>conftest.er1
   ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
+	 { ac_try='test -z "$ac_c_werror_flag"
+			 || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
   (eval $ac_try) 2>&5
   ac_status=$?
@@ -20173,7 +20183,8 @@
 
 ac_cv_lib_ieee_main=no
 fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
 LIBS=$ac_check_lib_save_LIBS
 fi
 echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5
@@ -20182,40 +20193,67 @@
   LIEEELIB=-lieee
 fi
 
-    MALLOC=malloc.o
-    if test "$with_intelcompilers" = yes; then
-       GCC=no
-       CC=$ICC
-       FC=$IFC
-       CC_OPTIONS='-O -DNDEBUG -Dlinux -DNARROWPROTO -mp'
-       CC_PICFLAGS="-fPIC"
-# -cm remove comments displays, -w90  -w95 remove warnings abort f90 f95 non standard
-       FC_OPTIONS="-O -cm -w90 -w95 -mp "
-       FC_OPTIONS_O0="-cm  -w90 -w95 -mp "
-       if test "$enable_debug" = yes; then
-         CC_OPTIONS='-g -Wall -Dlinux  -DNARROWPROTO  -mp '
-         FC_OPTIONS="-g -cm  -w90 -w95 -mp "
-       fi
-       CC_LDFLAGS="$LIEEELIB  -Wl,-relax"
-       FC_LDFLAGS="$LIEEELIB -ldl  -lPEPCF90 -Wl,-relax "
-       LD=xild
-       LD_LDFLAGS="$LIEEELIB -lPEPCF90 -Wl,-relax "
-    else
-       GCC=yes
-       CC=gcc
-       # CC_PLAT_OPTIONS is optional, and is used to add CPU specific code generation tuning for Athlon64 presumably Opteron could benefit too but these are not optimized for the Opteron
-       CC_PLAT_OPTIONS='-march=athlon64 -mfpmath=sse -msse2 -m3dnow -m64 '
-       CC_OPTIONS="-O2 -DNDEBUG -Dlinux  -DNARROWPROTO $CC_PLAT_OPTIONS"
-       CC_LDFLAGS=$LIEEELIB
-       CC_PICFLAGS=-fPIC
-       # find Fortran compiler
-       # g77 already asked and found: good
-       if test "$WITH_G77" = yes; then
-         FC=g77
-         FC_PICFLAGS=-fPIC
-       # option with-f2c
-       elif test "$with_f2c" = yes; then
-         # Extract the first word of "f2c", so it can be a program name with args.
+	MALLOC=malloc.o
+	if test "$with_intelcompilers" = yes; then
+		GCC=no
+		CC=$ICC
+		FC=$IFC
+		CC_OPTIONS='-O -DNDEBUG -Dlinux -DNARROWPROTO -mp'
+		CC_PICFLAGS="-fPIC"
+		# -cm remove comments displays, -w90  -w95 remove warnings abort f90 f95 non standard
+		FC_OPTIONS="-O -cm -w90 -w95 -mp "
+		FC_OPTIONS_O0="-cm  -w90 -w95 -mp "
+		if test "$enable_debug" = yes; then
+			CC_OPTIONS='-g -Wall -Dlinux  -DNARROWPROTO  -mp '
+			FC_OPTIONS="-g -cm  -w90 -w95 -mp "
+		fi
+		CC_LDFLAGS="$LIEEELIB  -Wl,-relax"
+		FC_LDFLAGS="$LIEEELIB -ldl  -lPEPCF90 -Wl,-relax "
+		LD=xild
+		LD_LDFLAGS="$LIEEELIB -lPEPCF90 -Wl,-relax "
+	else
+		GCC=yes
+		CC=gcc
+		# CC_PLAT_OPTIONS is optional, and is used to add CPU specific code generation tuning for Athlon64 presumably Opteron could benefit too but these are not optimized for the Opteron
+		CC_PLAT_OPTIONS='-march=athlon64 -mfpmath=sse -msse2 -m3dnow -m64'
+
+		CC_PICFLAGS='-fPIC'
+		FC_PICFLAGS='-fPIC'
+
+		CC_OPTIONS="-O2 -DNDEBUG -Dlinux  -DNARROWPROTO $CC_PLAT_OPTIONS $CC_PICFLAGS "
+		CC_LDFLAGS=$LIEEELIB
+
+		if test "$enable_debug" = yes; then
+			CC_OPTIONS="-g -Wall -Dlinux -DNARROWPROTO $CC_PLAT_OPTIONS $CC_PICFLAGS "
+		fi
+		# find Fortran compiler
+		# g77 already asked and found: good
+		if test "$WITH_G77" = yes; then
+			FC=g77
+			FC_PICFLAGS=-fPIC
+			if test "$enable_debug" = yes; then
+				FC_OPTIONS="-g $CC_PLAT_OPTIONS $FC_PICFLAGS"
+				FC_OPTIONS_O0="$CC_PLAT_OPTIONS $FC_PICFLAGS"
+			else
+				FC_OPTIONS="-O $CC_PLAT_OPTIONS $FC_PICFLAGS"
+				FC_OPTIONS_O0="$CC_PLAT_OPTIONS $FC_PICFLAGS"
+			fi
+		elif test "$WITH_GFORTRAN" = yes;then
+			FC=gfortran
+			if test "$enable_debug" = yes; then
+				FC_OPTIONS="-g -ff2c $CC_PLAT_OPTIONS $FC_PICFLAGS"
+				FC_OPTIONS_O0="-ff2c $CC_PLAT_OPTIONS $FC_PICFLAGS"
+			else
+				FC_OPTIONS="-O -ff2c $CC_PLAT_OPTIONS $FC_PICFLAGS"
+				FC_OPTIONS_O0="-ff2c $CC_PLAT_OPTIONS $FC_PICFLAGS"
+			fi
+			cat >>confdefs.h <<\_ACEOF
+#define G95_FORTRAN 1
+_ACEOF
+
+		# option with-f2c
+		elif test "$with_f2c" = yes; then
+			# Extract the first word of "f2c", so it can be a program name with args.
 set dummy f2c; ac_word=$2
 echo "$as_me:$LINENO: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
@@ -20251,16 +20289,23 @@
 echo "${ECHO_T}no" >&6
 fi
 
-         if test "$F2C" = no; then
-           { { echo "$as_me:$LINENO: error: Unable to configure: f2c compiler not found" >&5
+			if test "$F2C" = no; then
+				{ { echo "$as_me:$LINENO: error: Unable to configure: f2c compiler not found" >&5
 echo "$as_me: error: Unable to configure: f2c compiler not found" >&2;}
    { (exit 1); exit 1; }; }
-         fi
-         # script shell f77 have bugs, get ours
-         FC='${SCIDIR}/bin/f77-linux'
-       else
-         # first find g77
-         # Extract the first word of "g77", so it can be a program name with args.
+			fi
+			# script shell f77 have bugs, get ours
+			FC='${SCIDIR}/bin/f77-linux'
+			if test "$enable_debug" = yes; then
+				FC_OPTIONS="-g $CC_PLAT_OPTIONS $FC_PICFLAGS"
+				FC_OPTIONS_O0="$CC_PLAT_OPTIONS $FC_PICFLAGS"
+			else
+				FC_OPTIONS="-O $CC_PLAT_OPTIONS $FC_PICFLAGS"
+				FC_OPTIONS_O0="$CC_PLAT_OPTIONS $FC_PICFLAGS"
+			fi
+		else
+			# first find g77
+			# Extract the first word of "g77", so it can be a program name with args.
 set dummy g77; ac_word=$2
 echo "$as_me:$LINENO: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
@@ -20296,12 +20341,121 @@
 echo "${ECHO_T}no" >&6
 fi
 
-         if test "$WITH_G77" = yes; then
-           FC=g77
-           FC_PICFLAGS=-fPIC
-         else
-         # otherwise find f2c
-           # Extract the first word of "f2c", so it can be a program name with args.
+			if test "$WITH_G77" = yes; then
+				FC=g77
+				FC_PICFLAGS=-fPIC
+				if test "$enable_debug" = yes; then
+					FC_OPTIONS="-g $CC_PLAT_OPTIONS"
+					FC_OPTIONS_O0="$CC_PLAT_OPTIONS $FC_PICFLAGS"
+				else
+					FC_OPTIONS="-O $CC_PLAT_OPTIONS"
+					FC_OPTIONS_O0="$CC_PLAT_OPTIONS $FC_PICFLAGS"
+				fi
+			else
+				# Extract the first word of "gfortran", so it can be a program name with args.
+set dummy gfortran; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_WITH_GFORTRAN+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$WITH_GFORTRAN"; then
+  ac_cv_prog_WITH_GFORTRAN="$WITH_GFORTRAN" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_WITH_GFORTRAN="yes"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_prog_WITH_GFORTRAN" && ac_cv_prog_WITH_GFORTRAN="no"
+fi
+fi
+WITH_GFORTRAN=$ac_cv_prog_WITH_GFORTRAN
+if test -n "$WITH_GFORTRAN"; then
+  echo "$as_me:$LINENO: result: $WITH_GFORTRAN" >&5
+echo "${ECHO_T}$WITH_GFORTRAN" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+				if test "$WITH_GFORTRAN" = yes; then
+					FC=gfortran
+					FC_PICFLAGS=-fPIC
+					cat >>confdefs.h <<\_ACEOF
+#define G95_FORTRAN 1
+_ACEOF
+
+					if test "$enable_debug" = yes; then
+						FC_OPTIONS="-g -ff2c $CC_PLAT_OPTIONS $FC_PICFLAGS"
+						FC_OPTIONS_O0="-ff2c $CC_PLAT_OPTIONS $FC_PICFLAGS"
+					else
+						FC_OPTIONS="-O -ff2c $CC_PLAT_OPTIONS $FC_PICFLAGS"
+						FC_OPTIONS_O0="-ff2c $CC_PLAT_OPTIONS $FC_PICFLAGS"
+					fi
+				else
+					# Extract the first word of "f95", so it can be a program name with args.
+set dummy f95; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_WITH_F95+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$WITH_F95"; then
+  ac_cv_prog_WITH_F95="$WITH_F95" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_WITH_F95="yes"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_prog_WITH_F95" && ac_cv_prog_WITH_F95="no"
+fi
+fi
+WITH_F95=$ac_cv_prog_WITH_F95
+if test -n "$WITH_F95"; then
+  echo "$as_me:$LINENO: result: $WITH_F95" >&5
+echo "${ECHO_T}$WITH_F95" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+					if test "$WITH_F95" = yes; then
+						FC=f95
+						FC_PICFLAGS=-fPIC
+						cat >>confdefs.h <<\_ACEOF
+#define F95_FORTRAN 1
+_ACEOF
+
+						if test "$enable_debug" = yes; then
+							FC_OPTIONS="-g $CC_PLAT_OPTIONS $FC_PICFLAGS"
+							FC_OPTIONS_O0="$CC_PLAT_OPTIONS $FC_PICFLAGS"
+						else
+							FC_OPTIONS="-O $CC_PLAT_OPTIONS $FC_PICFLAGS"
+							FC_OPTIONS_O0="$CC_PLAT_OPTIONS $FC_PICFLAGS "
+						fi
+					else
+						# otherwise find f2c
+						# Extract the first word of "f2c", so it can be a program name with args.
 set dummy f2c; ac_word=$2
 echo "$as_me:$LINENO: checking for $ac_word" >&5
 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
@@ -20337,30 +20491,32 @@
 echo "${ECHO_T}no" >&6
 fi
 
-           if test "$F2C" = yes; then
-             # script shell f77 have bugs, get ours
-             FC='${SCIDIR}/bin/f77-linux'
-           else
-             { { echo "$as_me:$LINENO: error: Unable to configure: no Fortran compiler found" >&5
+						if test "$F2C" = yes; then
+							# script shell f77 have bugs, get ours
+							FC='${SCIDIR}/bin/f77-linux'
+							if test "$enable_debug" = yes; then
+								FC_OPTIONS="-g $CC_PLAT_OPTIONS $FC_PICFLAGS"
+								FC_OPTIONS_O0="$CC_PLAT_OPTIONS $FC_PICFLAGS"
+							else
+								FC_OPTIONS="-O $CC_PLAT_OPTIONS $FC_PICFLAGS"
+								FC_OPTIONS_O0="$CC_PLAT_OPTIONS $FC_PICFLAGS"
+							fi
+						else
+							{ { echo "$as_me:$LINENO: error: Unable to configure: no Fortran compiler found" >&5
 echo "$as_me: error: Unable to configure: no Fortran compiler found" >&2;}
    { (exit 1); exit 1; }; }
-           fi
-         fi
-       fi
-       FC_OPTIONS="-O $CC_PLAT_OPTIONS"
-       FC_OPTIONS_O0=
-       FC_LDFLAGS="$LIEEELIB -ldl -rdynamic -Wl,-relax "
-       LD=ld
-       LD_LDFLAGS="$LIEEELIB  -Wl,-relax "
-       if test "$enable_debug" = yes; then
-        # CC_PLAT_OPTIONS is optional, and is used to add CPU specific code generation tuning for Athlon64 presumably Opteron could benefit too but these are not optimized for the Opteron
-         CC_PLAT_OPTIONS='-march=athlon64 -mfpmath=sse -msse2 -m3dnow -m64 '
-         CC_OPTIONS="-g -Wall -Dlinux -DNARROWPROTO $CC_PLAT_OPTIONS"
-         FC_OPTIONS="-g $CC_PLAT_OPTIONS"
-       fi
-    fi
-    MAKEFILE_TARGET=Makefile.linux
-   ;;
+						fi
+					fi
+				fi
+			fi
+		fi
+		FC_LDFLAGS="$LIEEELIB -ldl -rdynamic -Wl,-relax "
+		LD=ld
+		LD_LDFLAGS="$LIEEELIB -Wl,-relax "
+	fi
+	MAKEFILE_TARGET=Makefile.linux
+	;;
+
 # Linux ELF: all standard distributions
    i*86-*-linux-gnu | *-pc-linux-gnu )
    LIEEELIB=
@@ -22909,7 +23065,7 @@
 ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
 ac_compiler_gnu=$ac_cv_f77_compiler_gnu
 if test -n "$ac_tool_prefix"; then
-  for ac_prog in g77 f77 xlf frt pgf77 fl32 af77 fort77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 lf95 g95
+  for ac_prog in g77 f77 xlf frt pgf77 fl32 af77 fort77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 lf95 g95 gfortran
   do
     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
@@ -22951,7 +23107,7 @@
 fi
 if test -z "$F77"; then
   ac_ct_F77=$F77
-  for ac_prog in g77 f77 xlf frt pgf77 fl32 af77 fort77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 lf95 g95
+  for ac_prog in g77 f77 xlf frt pgf77 fl32 af77 fort77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 lf95 g95 gfortran
 do
   # Extract the first word of "$ac_prog", so it can be a program name with args.
 set dummy $ac_prog; ac_word=$2