1 | #!/bin/sh |
---|
2 | # This file is configure. |
---|
3 | # |
---|
4 | # Make all changes to configure.in, if at all possible. After changing, |
---|
5 | # run "autoconf". If autoconf is not installed, then make changes to |
---|
6 | # configure. |
---|
7 | # |
---|
8 | # Documentation on the autoconf program exists in GNU info file format. |
---|
9 | # To read this, run emacs and type C-h i. Then press the down arrow |
---|
10 | # until you come to the line beginning "* Autoconf:". Pressing enter on |
---|
11 | # this line will bring up the documentaition. |
---|
12 | # |
---|
13 | # Type "configure" (i.e., no arguments) or read below for usage information. |
---|
14 | # |
---|
15 | print_error() { |
---|
16 | echo "$*" 2>&1 ; |
---|
17 | } |
---|
18 | |
---|
19 | print_usage() |
---|
20 | { |
---|
21 | cat <<. |
---|
22 | Usage: configure -arch ARCH_TYPE [-cc CC] [-f77 FC] [-debug] [-help] |
---|
23 | [-cflags CFLAGS] [-fflags FFLAGS] |
---|
24 | [-mpiinc MPI_INC_DIR -mpilib MPI_LIB] |
---|
25 | where |
---|
26 | ARCH_TYPE = the type of machine that PGAPack is to be configured for |
---|
27 | CC = the name of the ANSI C compiler |
---|
28 | FC = the name of the FORTRAN 77 compiler |
---|
29 | CFLAGS = C compiler flags |
---|
30 | FFLAGS = FORTRAN compiler flags |
---|
31 | MPI_INC_DIR = the MPI include directory |
---|
32 | MPI_LIB = the full path to the MPI library |
---|
33 | |
---|
34 | |
---|
35 | Known architectures are: |
---|
36 | |
---|
37 | Workstations |
---|
38 | sun4 (SUN OS 4.x) |
---|
39 | hpux (HP UX) |
---|
40 | irix (Silicon Graphics IRIX) |
---|
41 | alpha (DEC Alpha) |
---|
42 | rs6000 (AIX for IBM RS6000) |
---|
43 | next (NeXT 680x0) |
---|
44 | freebsd (PC clones running FreeBSD) |
---|
45 | linux (PC clones running LINUX) |
---|
46 | generic (Generic 32-bit UNIX-like machine) |
---|
47 | |
---|
48 | MPP's |
---|
49 | powerchallenge (Silicon Graphics PowerChallenge) |
---|
50 | challenge (Silicon Graphics Challenge) |
---|
51 | t3d (Cray-T3D) |
---|
52 | sp2 (IBM SP2) |
---|
53 | paragon (Intel Paragon) |
---|
54 | exemplar (Convex Exemplar) |
---|
55 | |
---|
56 | |
---|
57 | In the absence of the -f77 or -cc options, configure assumes the name of |
---|
58 | a FORTRAN 77 or ANSI C compiler based on the architecture type. |
---|
59 | |
---|
60 | If the -debug flag is set, then PGAPack will be built for debugging. This |
---|
61 | enables the extensive debugging options and datatype checks. |
---|
62 | |
---|
63 | If both -mpiinc and -mpilib are missing, PGAPack is built using a non-parallel |
---|
64 | "stub" library for all MPI calls. |
---|
65 | |
---|
66 | The -help flag causes this usage guide to be printed. |
---|
67 | |
---|
68 | Example 1: |
---|
69 | ---------- |
---|
70 | Configure and build for parallel operation on the sun4 architectue. MPI is |
---|
71 | in /usr/local/mpi; the MPI library is /usr/local/mpi/lib/sun4/ch_p4/libmpi.a. |
---|
72 | |
---|
73 | configure -arch sun4 -mpilib /usr/local/mpi/lib/sun4/ch_p4/libmpi.a \ |
---|
74 | -mpiinc /usr/local/mpi/include |
---|
75 | make install |
---|
76 | |
---|
77 | Example 2: |
---|
78 | ---------- |
---|
79 | Configure and build a debug sequential library on the rs6000 architecture. |
---|
80 | |
---|
81 | configure -arch rs6000 -debug |
---|
82 | make install |
---|
83 | . |
---|
84 | } |
---|
85 | |
---|
86 | ############################################################################### |
---|
87 | # This section initializes the variables that will be used throughout |
---|
88 | # the script. |
---|
89 | ############################################################################### |
---|
90 | AC_INIT(source/pga.c) |
---|
91 | ARCH="" # architecture type |
---|
92 | PARALLEL=0 # parallel libray, or use stub routines? |
---|
93 | OPTIMIZE=1 # optimized? |
---|
94 | CPPFLAGS="" # flags to send to the C preprocessor |
---|
95 | LDFLAGS="" # link flags |
---|
96 | CFLAGS="" # flags to send to the C compiler |
---|
97 | FFLAGS="" # flags to send to the FORTRAN compiler |
---|
98 | PGA_DIR="`pwd`" # the root of the pgapack tree |
---|
99 | PGA_DIR=`echo $PGA_DIR | sed "s=tmp_mnt/=="` # get rid of 'tmp_mnt/' |
---|
100 | HEADERS="$PGA_DIR/include/pgapack.h" # headers upon which pgapack depends |
---|
101 | INCLUDES="-I$PGA_DIR/include" # directories where to search for include files |
---|
102 | LIB_DIRS="" # directories where to search for libraries |
---|
103 | LIBS="" # libraries with which to link |
---|
104 | MPI_INC_DIR="" |
---|
105 | MPI_LIB="" |
---|
106 | SHELL="/usr/bin/sh" |
---|
107 | RM="/bin/rm -f" # command to force removal of files |
---|
108 | |
---|
109 | OBJS='$(PGA_LIB_DIR)/binary.o \\\ |
---|
110 | $(PGA_LIB_DIR)/char.o \\\ |
---|
111 | $(PGA_LIB_DIR)/cmdline.o \\\ |
---|
112 | $(PGA_LIB_DIR)/create.o \\\ |
---|
113 | $(PGA_LIB_DIR)/cross.o \\\ |
---|
114 | $(PGA_LIB_DIR)/debug.o \\\ |
---|
115 | $(PGA_LIB_DIR)/duplcate.o \\\ |
---|
116 | $(PGA_LIB_DIR)/evaluate.o \\\ |
---|
117 | $(PGA_LIB_DIR)/fitness.o \\\ |
---|
118 | $(PGA_LIB_DIR)/hamming.o \\\ |
---|
119 | $(PGA_LIB_DIR)/heap.o \\\ |
---|
120 | $(PGA_LIB_DIR)/integer.o \\\ |
---|
121 | $(PGA_LIB_DIR)/mutation.o \\\ |
---|
122 | $(PGA_LIB_DIR)/parallel.o \\\ |
---|
123 | $(PGA_LIB_DIR)/pga.o \\\ |
---|
124 | $(PGA_LIB_DIR)/pop.o \\\ |
---|
125 | $(PGA_LIB_DIR)/random.o \\\ |
---|
126 | $(PGA_LIB_DIR)/real.o \\\ |
---|
127 | $(PGA_LIB_DIR)/report.o \\\ |
---|
128 | $(PGA_LIB_DIR)/restart.o \\\ |
---|
129 | $(PGA_LIB_DIR)/select.o \\\ |
---|
130 | $(PGA_LIB_DIR)/stop.o \\\ |
---|
131 | $(PGA_LIB_DIR)/system.o \\\ |
---|
132 | $(PGA_LIB_DIR)/user.o \\\ |
---|
133 | $(PGA_LIB_DIR)/utility.o' # these are pgapack's object files |
---|
134 | |
---|
135 | ############################################################################### |
---|
136 | # This section parse the command line options. There a two types of options: |
---|
137 | # those that take arguments and those that don't. Parsing the case where an |
---|
138 | # option takes an argument is a little tricky. This is how it works. Suppose |
---|
139 | # that the program comes upon "-cc". Then we know that the next argument |
---|
140 | # will be the name of the C compiler. Hence, we set the flag next_cc to be |
---|
141 | # equal to "yes". The next time through the loop, it will be the case that |
---|
142 | # x$next_cc equal "xyes" because $next_cc expands to "yes". Thus, we know that |
---|
143 | # this argument is the name of the compiler and we assign it to USR_CC. Then |
---|
144 | # we set next_cc back to a null string. This way on the next time through |
---|
145 | # the loop x$next_cc will equal just "x". Since the shell initializes |
---|
146 | # variables to null strings, we do not have to initialize the "next_" family |
---|
147 | # of variables by hand. |
---|
148 | ############################################################################### |
---|
149 | for arg |
---|
150 | do |
---|
151 | if test x$next_arch = xyes |
---|
152 | then |
---|
153 | ARCH=$arg |
---|
154 | next_arch= |
---|
155 | elif test x$next_mpiinc = xyes |
---|
156 | then |
---|
157 | MPI_INC_DIR=$arg |
---|
158 | next_mpiinc= |
---|
159 | elif test x$next_mpilib = xyes |
---|
160 | then |
---|
161 | MPI_LIB=$arg |
---|
162 | next_mpilib= |
---|
163 | elif test x$next_f77 = xyes |
---|
164 | then |
---|
165 | USR_FC=$arg |
---|
166 | next_f77= |
---|
167 | elif test x$next_cc = xyes |
---|
168 | then |
---|
169 | USR_CC=$arg |
---|
170 | next_cc= |
---|
171 | elif test x$next_cflags = xyes |
---|
172 | then |
---|
173 | CFLAGS="$arg $CFLAGS" |
---|
174 | next_cflags= |
---|
175 | elif test x$next_fflags = xyes |
---|
176 | then |
---|
177 | FFLAGS="$arg $FFLAGS" |
---|
178 | next_fflags= |
---|
179 | else |
---|
180 | case $arg in |
---|
181 | -arch) |
---|
182 | next_arch=yes |
---|
183 | ;; |
---|
184 | -f77) |
---|
185 | next_f77=yes |
---|
186 | ;; |
---|
187 | -cc) |
---|
188 | next_cc=yes |
---|
189 | ;; |
---|
190 | -mpiinc) |
---|
191 | next_mpiinc=yes |
---|
192 | PARALLEL=1 |
---|
193 | ;; |
---|
194 | -mpilib) |
---|
195 | next_mpilib=yes |
---|
196 | PARALLEL=1 |
---|
197 | ;; |
---|
198 | -debug) |
---|
199 | OPTIMIZE=0 |
---|
200 | ;; |
---|
201 | -cflags) |
---|
202 | next_cflags=yes |
---|
203 | ;; |
---|
204 | -fflags) |
---|
205 | next_fflags=yes |
---|
206 | ;; |
---|
207 | -help) |
---|
208 | print_usage >& 2 |
---|
209 | exit 1 |
---|
210 | ;; |
---|
211 | *) |
---|
212 | ;; |
---|
213 | esac |
---|
214 | fi |
---|
215 | done |
---|
216 | |
---|
217 | if test "$MPI_LIB" -a "$MPI_INC_DIR" ; then |
---|
218 | if test ! -d "$MPI_INC_DIR" ; then |
---|
219 | print_error "MPI_INC_DIR == $MPI_INC_DIR is not a valid directory!" |
---|
220 | exit 1 |
---|
221 | fi |
---|
222 | if test ! -f "$MPI_INC_DIR/mpi.h" ; then |
---|
223 | print_error "Couldn't find $MPI_INC_DIR/mpi.h!" |
---|
224 | exit 1 |
---|
225 | fi |
---|
226 | |
---|
227 | if test ! -f "$MPI_LIB" ; then |
---|
228 | print_error "MPI_LIB == $MPI_LIB is not a file!" |
---|
229 | exit 1 |
---|
230 | fi |
---|
231 | |
---|
232 | PARALLEL=1 |
---|
233 | else |
---|
234 | PARALLEL=0 |
---|
235 | CPPFLAGS="-DFAKE_MPI $CPPFLAGS" |
---|
236 | fi |
---|
237 | |
---|
238 | if test $OPTIMIZE -eq 1 ; then |
---|
239 | CPPFLAGS="-DOPTIMIZE $CPPFLAGS" |
---|
240 | CFLAGS="-O $CFLAGS" |
---|
241 | FFLAGS="-O $FFLAGS" |
---|
242 | PGA_LIB="pgaO" |
---|
243 | else |
---|
244 | CFLAGS="-g $CFLAGS" |
---|
245 | FFLAGS="-g $FFLAGS" |
---|
246 | PGA_LIB="pgag" |
---|
247 | fi |
---|
248 | |
---|
249 | |
---|
250 | ############################################################################### |
---|
251 | # This section sets the default values of certain variables based upon the |
---|
252 | # architecture type specified. If no architecture was specified, the script |
---|
253 | # issues an error and aborts. |
---|
254 | ############################################################################### |
---|
255 | if test -z "$ARCH" |
---|
256 | then |
---|
257 | print_error "You must specify the architecture with -arch <value>" |
---|
258 | print_error "Valid architectures are the following:" |
---|
259 | print_error " Workstations MPP's" |
---|
260 | print_error " sun4 powerchallenge" |
---|
261 | print_error " next challenge" |
---|
262 | print_error " rs6000 t3d" |
---|
263 | print_error " freebsd sp2" |
---|
264 | print_error " irix paragon" |
---|
265 | print_error " linux exemplar" |
---|
266 | print_error " hpux" |
---|
267 | print_error " alpha" |
---|
268 | print_error " generic" |
---|
269 | print_error "" |
---|
270 | print_error "For more information type configure -help." |
---|
271 | exit 1 |
---|
272 | fi |
---|
273 | |
---|
274 | case $ARCH in |
---|
275 | sun4) |
---|
276 | CC=cc |
---|
277 | FC=f77 |
---|
278 | CPPFLAGS="-DWL=32 -DFORTRANUNDERSCORE $CPPFLAGS" |
---|
279 | ;; |
---|
280 | next) |
---|
281 | CC=cc |
---|
282 | FC= |
---|
283 | CPPFLAGS="-DWL=32 -DFORTRANUNDERSCORE $CPPFLAGS" |
---|
284 | ;; |
---|
285 | rs6000) |
---|
286 | CC=cc |
---|
287 | FC=f77 |
---|
288 | CPPFLAGS="-DWL=32 $CPPFLAGS" |
---|
289 | ;; |
---|
290 | freebsd) |
---|
291 | CC=cc |
---|
292 | FC=f77 |
---|
293 | FFLAGS="-w" |
---|
294 | CPPFLAGS="-DWL=32 -DFORTRANUNDERSCORE $CPPFLAGS" |
---|
295 | ;; |
---|
296 | irix) |
---|
297 | CC=cc |
---|
298 | FC=f77 |
---|
299 | CPPFLAGS="-DWL=32 -DFORTRANUNDERSCORE $CPPFLAGS" |
---|
300 | ;; |
---|
301 | alpha) |
---|
302 | CC=cc |
---|
303 | FC=f77 |
---|
304 | CPPFLAGS="-DWL=64 -DFORTRANUNDERSCORE $CPPFLAGS" |
---|
305 | ;; |
---|
306 | hpux) |
---|
307 | CC=cc |
---|
308 | FC=f77 |
---|
309 | CPPFLAGS="-DWL=32 $CPPFLAGS" |
---|
310 | SHELL=/bin/sh |
---|
311 | ;; |
---|
312 | linux) |
---|
313 | SHELL="/bin/sh" |
---|
314 | CC=cc |
---|
315 | FC=f77 |
---|
316 | FFLAGS="-w" |
---|
317 | LDFLAGS="-s $LDFLAGS" |
---|
318 | CPPFLAGS="-DWL=32 -DFORTRANUNDERSCORE $CPPFLAGS" |
---|
319 | ;; |
---|
320 | t3d) |
---|
321 | CC=/mpp/bin/cc |
---|
322 | FC=/mpp/bin/cf77 |
---|
323 | CFLAGS="-T cray-t3d" |
---|
324 | FFLAGS="-C cray-t3d -dp" |
---|
325 | CPPFLAGS="-DWL=64 -DFORTRANCAP $CPPFLAGS" |
---|
326 | SHELL=/bin/sh |
---|
327 | ;; |
---|
328 | powerchallenge) |
---|
329 | CC=cc |
---|
330 | FC=f77 |
---|
331 | CFLAGS="-mips4 -fullwarn -64" |
---|
332 | CPPFLAGS="-DWL=64 -DFORTRANUNDERSCORE $CPPFLAGS" |
---|
333 | ;; |
---|
334 | challenge) |
---|
335 | CC=cc |
---|
336 | FC=f77 |
---|
337 | CFLAGS="-mips2 -fullwarn -32" |
---|
338 | CPPFLAGS="-DWL=32 -DFORTRANUNDERSCORE $CPPFLAGS" |
---|
339 | ;; |
---|
340 | paragon) |
---|
341 | CC=cc |
---|
342 | FC=f77 |
---|
343 | CFLAGS="-nx $CFLAGS" |
---|
344 | FFLAGS="-nx $FFLAGS" |
---|
345 | CPPFLAGS="-DWL=32 -DFORTRANUNDERSCORE $CPPFLAGS" |
---|
346 | ;; |
---|
347 | sp2) |
---|
348 | CC=cc |
---|
349 | FC=f77 |
---|
350 | CPPFLAGS="-DWL=32 $CPPFLAGS" |
---|
351 | ;; |
---|
352 | exemplar) |
---|
353 | CC=cc |
---|
354 | FC=fort77 |
---|
355 | FFLAGS="-L/usr/lib -lU77 $FFLAGS" |
---|
356 | CPPFLAGS="-DWL=32 $CPPFLAGS" |
---|
357 | SHELL=/bin/sh |
---|
358 | ;; |
---|
359 | *) |
---|
360 | CC=cc |
---|
361 | FC=f77 |
---|
362 | CPPFLAGS="-DWL=32 $CPPFLAGS" |
---|
363 | print_error "WARNING: Configuring for untested architecture. Using" |
---|
364 | print_error " word size of 32 bits, cc and f77 as compilers." |
---|
365 | print_error " You might have trouble with Fortran programs" |
---|
366 | print_error " not linking correctly. Check the manual on" |
---|
367 | print_error " the FORTRANUNDERSCORE #define." |
---|
368 | ;; |
---|
369 | esac |
---|
370 | |
---|
371 | ############################################################################### |
---|
372 | # This section sets the variables that do not relate to parallel code. |
---|
373 | ############################################################################### |
---|
374 | CPPFLAGS="-D$ARCH $CPPFLAGS" |
---|
375 | PGA_LIB_DIR="../lib/$ARCH" |
---|
376 | LIB_DIRS="-L$PGA_DIR/lib/$ARCH $LIB_DIRS" |
---|
377 | LIBS="-l$PGA_LIB $LIBS" |
---|
378 | |
---|
379 | # Set output variable `RANLIB' to `ranlib' if `ranlib' is found, |
---|
380 | # otherwise to `:' (do nothing). |
---|
381 | AC_PROG_RANLIB() |
---|
382 | |
---|
383 | # "Determine a C compiler to use. If `CC' is not already set in the |
---|
384 | # environment, check for `gcc', and use `cc' if it's not found. Set |
---|
385 | # output variable `CC' to the name of the compiler found. |
---|
386 | # |
---|
387 | # "If using the GNU C compiler, set shell variable `GCC' to `yes', |
---|
388 | # empty otherwise. If output variable `CFLAGS' was not already set, |
---|
389 | # set it to `-g -O' for the GNU C compiler (`-O' on systems where |
---|
390 | # GCC does not accept `-g'), or `-g' for other compilers." |
---|
391 | if test -n "$USR_CC" |
---|
392 | then |
---|
393 | CC=$USR_CC |
---|
394 | else |
---|
395 | AC_PROG_CC() |
---|
396 | fi |
---|
397 | |
---|
398 | # Check for each program in the whitespace-separated list |
---|
399 | # PROGS-TO-CHECK-FOR exists in `PATH'. If it is found, set VARIABLE |
---|
400 | # to the name of that program. Otherwise, continue checking the |
---|
401 | # next program in the list. If none of the programs in the list are |
---|
402 | # found, set VARIABLE to VALUE-IF-NOT-FOUND; if VALUE-IF-NOT-FOUND |
---|
403 | # is not specified, the value of VARIABLE is not changed. |
---|
404 | if test -n "$USR_FC" |
---|
405 | then |
---|
406 | FC=$USR_FC |
---|
407 | else |
---|
408 | AC_PROGRAMS_CHECK(FC, f77 fortran xlf gf77 mpxlf if77) |
---|
409 | fi |
---|
410 | |
---|
411 | # Originally had |
---|
412 | # OBJS="$OBJS $(PGA_LIB_DIR)/f2c.o" |
---|
413 | # However, freebsd bourne shell equates $(var) and `var`. Hence, I had |
---|
414 | # to break the assignment up into two parts. $FORTWRAP is a Makefile |
---|
415 | # dependency line defining how to compile f2c.c |
---|
416 | if test -n "$FC" |
---|
417 | then |
---|
418 | TEMP='$(PGA_LIB_DIR)/f2c.o' |
---|
419 | OBJS="$OBJS $TEMP" |
---|
420 | FORTWRAP='$(PGA_LIB_DIR)/f2c.o: f2c.c $(HEADERS)\ |
---|
421 | $(COMPILE.c) f2c.c' |
---|
422 | fi |
---|
423 | |
---|
424 | if test ! -d lib |
---|
425 | then |
---|
426 | mkdir lib |
---|
427 | fi |
---|
428 | |
---|
429 | if test ! -d lib/$ARCH |
---|
430 | then |
---|
431 | mkdir lib/$ARCH |
---|
432 | fi |
---|
433 | |
---|
434 | # Set up symlinks for pgapackf.h to any directories with Fortran source |
---|
435 | rm -f ./examples/fortran/pgapackf.h ./examples/mgh/pgapackf.h ./test/pgapackf.h |
---|
436 | ln -s ../../include/pgapackf.h ./examples/fortran/pgapackf.h |
---|
437 | ln -s ../../include/pgapackf.h ./examples/mgh/pgapackf.h |
---|
438 | ln -s ../include/pgapackf.h ./test/pgapackf.h |
---|
439 | |
---|
440 | # Use the stub library. |
---|
441 | if test $PARALLEL -eq 0 |
---|
442 | then |
---|
443 | rm -f ./include/mpi.h ./include/mpif.h ./examples/fortran/mpif.h ./examples/mgh/mpif.h ./test/mpif.h |
---|
444 | ln -s fakempi_h include/mpi.h |
---|
445 | ln -s fakempif_h include/mpif.h |
---|
446 | ln -s ../../include/mpif.h ./examples/fortran/mpif.h |
---|
447 | ln -s ../../include/mpif.h ./examples/mgh/mpif.h |
---|
448 | ln -s ../include/mpif.h ./test/mpif.h |
---|
449 | TEMP='$(PGA_LIB_DIR)/mpi_stub.o' |
---|
450 | OBJS="$OBJS $TEMP" |
---|
451 | MPICOMP='$(PGA_LIB_DIR)/mpi_stub.o: mpi_stub.c $(HEADERS)\ |
---|
452 | $(COMPILE.c) mpi_stub.c' |
---|
453 | # The tab above is IMPORTANT! Needed for make! |
---|
454 | else |
---|
455 | rm -f ./include/mpi.h ./include/mpif.h ./examples/fortran/mpif.h ./examples/mgh/mpif.h ./test/mpif.h |
---|
456 | ln -s $MPI_INC_DIR/mpif.h ./examples/fortran/mpif.h |
---|
457 | ln -s $MPI_INC_DIR/mpif.h ./examples/mgh/mpif.h |
---|
458 | ln -s $MPI_INC_DIR/mpif.h ./test/mpif.h |
---|
459 | LIBS="$LIBS $MPI_LIB" |
---|
460 | INCLUDES="$INCLUDES -I$MPI_INC_DIR" |
---|
461 | fi |
---|
462 | |
---|
463 | LIBS="$LIBS -lm" |
---|
464 | CPPFLAGS="$INCLUDES $CPPFLAGS" |
---|
465 | LDFLAGS="$LDFLAGS $LIB_DIRS $LIBS" |
---|
466 | ############################################################################### |
---|
467 | # This section exports the variables that have previously been set. |
---|
468 | # Configure creates the Makefiles listed on the last line from the |
---|
469 | # Makefile.in in each directory. It does this by substituting the value |
---|
470 | # of $VAR for every occurent of @VAR@ in the Makefile.in. For |
---|
471 | # example, if the characters @CC@ occur any place in a Makefile.in, they |
---|
472 | # will be replaced with the value that $CC has when ac_subst(CC) is |
---|
473 | # called. |
---|
474 | ############################################################################### |
---|
475 | AC_SUBST(CC) |
---|
476 | AC_SUBST(CFLAGS) |
---|
477 | AC_SUBST(FFLAGS) |
---|
478 | AC_SUBST(CPPFLAGS) |
---|
479 | AC_SUBST(FC) |
---|
480 | AC_SUBST(FORTWRAP) |
---|
481 | AC_SUBST(HEADERS) |
---|
482 | AC_SUBST(LDFLAGS) |
---|
483 | AC_SUBST(PARALLEL) |
---|
484 | AC_SUBST(PGA_LIB_DIR) |
---|
485 | AC_SUBST(PGA_LIB) |
---|
486 | AC_SUBST(OBJS) |
---|
487 | AC_SUBST(MPICOMP) |
---|
488 | AC_SUBST(RM) |
---|
489 | AC_SUBST(RANLIB) |
---|
490 | AC_SUBST(SHELL) |
---|
491 | AC_OUTPUT(Makefile source/Makefile test/Makefile test/Makefile \ |
---|
492 | examples/Makefile examples/c/Makefile examples/fortran/Makefile \ |
---|
493 | examples/mgh/Makefile) |
---|
494 | |
---|
495 | if test ! -f ".pgapack" ; then |
---|
496 | if test $PARALLEL -eq 1 ; then |
---|
497 | OPERATION="parallel" |
---|
498 | ECHO_LIBS="$MPI_LIB" |
---|
499 | else |
---|
500 | OPERATION="sequential" |
---|
501 | ECHO_LIBS="stub routines in mpi_stub.c" |
---|
502 | fi |
---|
503 | if test $OPTIMIZE -eq 1 ; then |
---|
504 | OPERATION="optimized $OPERATION" |
---|
505 | else |
---|
506 | OPERATION="debug $OPERATION" |
---|
507 | fi |
---|
508 | echo " " |
---|
509 | echo "PGAPack has been configured for $OPERATION operation on" |
---|
510 | echo "the $ARCH architecture, using $ECHO_LIBS." |
---|
511 | echo " " |
---|
512 | echo "**********************************************************************" |
---|
513 | echo "* Please register your copy of PGAPack by sending a mail message *" |
---|
514 | echo "* to pgapack@mcs.anl.gov. This will allow us to notify you of bug *" |
---|
515 | echo "* fixes, enhancements, and new releases. The PGAPack homepage is at *" |
---|
516 | echo "* http://www.mcs.anl.gov/pgapack.html. *" |
---|
517 | echo "**********************************************************************" |
---|
518 | echo " " |
---|
519 | echo "Type \"make install\" to install PGAPack." |
---|
520 | echo " " |
---|
521 | fi |
---|
522 | |
---|
523 | |
---|