File: configure.in

package info (click to toggle)
mpich 1.1.0-3
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 22,116 kB
  • ctags: 27,349
  • sloc: ansic: 193,435; sh: 11,172; fortran: 6,545; makefile: 5,801; cpp: 5,020; tcl: 3,548; asm: 3,536; csh: 1,079; java: 614; perl: 183; awk: 168; sed: 70; f90: 62
file content (652 lines) | stat: -rw-r--r-- 20,713 bytes parent folder | download | duplicates (2)
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
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
dnl This is an autoconf script.
dnl To rebuild the `configure' script from this, execute the command
dnl 	autoconf
dnl in the directory containing this script.  You must have autoconf
dnl version 1.4 or later (but NOT version 2.0 or later)
dnl
dnl The following text appears in the resulting `configure' script,
dnl explaining how to rebuild it.
dnl
dnl TODO
dnl
dnl Check for MPI_Pcontrol (const ... )
[#!/bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated automatically using autoconf.
# Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

progname="`echo $0 | sed 's:^\./\./:\./:'`"
print_error() {
    echo "*# $*" 2>&1 ;
    }
print_usage() {
cat <<.
Usage: ${progname} -arch=ARCH_TYPE [-prefix=INSTALL_DIR]  
                   [-cc=C_COMPILER] [-fc=FORTRAN_COMPILER]
                   [-clinker=C_LINKER] [-flinker=FORTRAN_LINKER]
                   [-nof77] [-opt=OPTFLAGS] 
	           [-make=MAKEPGM]
                   [-cflags=CFLAGS] [-fflags=FFLAGS]
                   [-optcc=C_OPTFLAGS] [-optf77=F77_OPTFLAGS]
                   [-no_mpegraphics] 
                   [-x11_lib=X11LIB] [-x11_inc=X11INC]
                   [-cross]
                   [-fortnames=FORTRANNAMES]
                   [-ar_nolocal]
                   [-noranlib] 
where
   ARCH_TYPE    = the type of machine that MPI is to be configured for
   INSTALL_DIR  = directory where MPE will be installed (optional)
   OPTFLAGS     = optimization flags to give the compilers (e.g. -g)
   CFLAGS       = flags to give C compiler
   FFLAGS       = flags to give Fortran compiler
   MAKEPGM      = version of make to use
   FORTRANNAMES = Form of the Fortran names.  See below.
   X11LIB       = Full path name for libX11.a
   X11INC       = Full path name for X11.h

One and only one 'arch', and 'prefix' argument should be provided.

You can select a different C and Fortran compiler by using the '-cc' and 'fc'
switches.  The environment variables 'CC' and 'FC' can also provide values for
these but their settings may be overridden by the configure script.  Using
'-cc=\$CC -fc=\$FC' will force configure to use those compilers.
These should be the compilers that you use for MPI programs.

If '-cross' is given, configure assumes that you are cross-compiling.  If it
is not given, configure expects to be able to run programs.  Even if '-cross'
is not selected, configure will try to determine if you are cross-compiling;
this switch is needed only on systems where attempting to run a cross-compiled
program causes the configure script to hang.

If '-no_mpegraphics' is used, then the MPE routines that make use of
X11 graphics will NOT be built; this is appropriate for systems that either do
not have the X11 include files or that do not support X11 graphics (some
message-passing systems cannot interoperate with X11).  The options -x11_inc
and -x11_lib may be used to specify the locations of the X11 include files and
libraries in the event that configure cannot find them (they should both be
specified in that case).

The option '-nof77' prevents the compilation of routines that require a
Fortran compiler.  If this option is selected, you may not use the Fortran
interface to MPE.

The option '-opt' allows you to specify options for the compilers (both C and
Fortran).  For example, '-opt=-O' chooses optimized code generation on many
systems.  '-optcc' and '-optf77' allow you to specify options for just the C
or Fortran compilers

The option '-make' may be used to select an alternate make program.  For
example, on FreeBSD systems, -make=gnumake may be required because of bugs in
the system make.

The option '-fortnames=FORTRANNAMES' allows you to specify the form of the
Fortran names.  This is used primarily to generate names with and without
trailing underscores for those systems that support both.  Possible values are
    FORTRANNAMES value     if Fortran MPI_SEND looks like
    DOUBLEUNDERSCORE       mpi_send__
    UNDERSCORE             mpi_send_
    CAPS                   MPI_SEND
    NOUNDERSCORE           mpi_send 
This option should normally NOT be used; configure determines what the Fortran
compiler generates.  This can be used to override that choice.

The option '-ar_nolocal' prevents the library archive command from attempting
to use the local directory for temporary space.  This option should be used
when (a) there isn't much space (less than 5 MB) available in the partition
where MPE resides and (b) there is enough space in /tmp (or wherever ar
places temporary files by default).

The option '-noranlib' causes the 'ranlib' step (needed on some systems to
build an object library) to be skipped.  This is particularly useful on
systems where 'ranlib' is optional (allowed but not needed; because it is
allowed, configure chooses to use it just in case) but can fail (some
'ranlib's are implemented as scripts using 'ar'; if they don't use the local
directory, they can fail (destroying the library in the process) if the
temporary directory (usually '/tmp') does not have enough space.  This has
occured on some OSF systems.

Sample Configure Usage:

To make for an MPI with the MPICH compile commands in your path:

  ./configure -cc=mpicc -fc=mpif77
  make
.
}
#
ARCH=""
LIB_PATH=""
FLIB_PATH=""
OPTFLAGS=""
OPTFLAGSF=""
NOF77=0
AR_LOCAL=l
HAS_FORTRAN=1
CFLAGS=""
#
# By not setting FFLAGS, we get the values from the environment
MPE_GRAPHICS="-DMPE_GRAPHICS"
MAKE=make
PREFIX=""
DEVCFLAGS=""
CONFIGURE_ARGS="$*"
DEVICE_KIND=MPP
cross_compiling=0
#
# This next variable is a version without quotes.
# We could also consider `echo $a | sed -e 's/"/\\"/g'`
CONFIGURE_ARGS_CLEAN=`echo $* | tr '"' ' '`
if test -n "$CONFIGURE_ARGS" ; then 
    echo "Configuring with args $CONFIGURE_ARGS"
fi
#
for arg
do
  # Handle --exec-prefix with a space before the argument.
  if test x$next_exec_prefix = xyes; then exec_prefix=$arg; next_exec_prefix=
  # Handle --host with a space before the argument.
  elif test x$next_host = xyes; then next_host=
  # Handle --prefix with a space before the argument.
  elif test x$next_prefix = xyes; then prefix=$arg; next_prefix=
  # Handle --srcdir with a space before the argument.
  elif test x$next_srcdir = xyes; then srcdir=$arg; next_srcdir=
  else
    case $arg in
     # For backward compatibility, also recognize exact --exec_prefix.
     -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* | --exec=* | --exe=* | --ex=* | --e=*)
	exec_prefix=`echo $arg | sed 's/[-a-z_]*=//'` ;;
     -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- | --exec | --exe | --ex | --e)
	next_exec_prefix=yes ;;

     -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
	PREFIX=`echo $arg | sed 's/[-a-z_]*=//'` ;;
     -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
	next_prefix=yes ;;

     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=* | --s=*)
	srcdir=`echo $arg | sed 's/[-a-z_]*=//'` ;;
     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr | --s)
	next_srcdir=yes ;;

     -arch=* | --arch=*)
       package=`echo $arg|sed 's/-*arch=//'`
       # Delete all the valid chars; see if any are left.
       if test -n "`echo $package|sed 's/[-a-zA-Z0-9_]*//g'`"; then
         print_error "configure: $package: invalid architecture name"; exit 1
       fi
       ARCH=`echo $package|sed s/-/_/g`
       eval "arch_`echo $package|sed s/-/_/g`=1"
       ;;

     -comm=* | --comm=*)
       package=`echo $arg|sed 's/-*comm=//'`
       # Delete all the valid chars; see if any are left.
       if test -n "`echo $package|sed 's/[-a-zA-Z0-9_]*//g'`"; then
         print_error "configure: $package: invalid communications layer name";
	  exit 1
       fi
       COMM=`echo $package|sed s/-/_/g`	
       eval "comm_`echo $package|sed s/-/_/g`=1" 
       # Handle possible synonyms
       if test -n "$comm_ch_eui" ; then
           comm_ch_mpl=1
           COMM=ch_mpl
       fi
	;;

     -device=* | --device=*)
       package=`echo $arg|sed 's/-*device=//'`
       # Delete all the valid chars; see if any are left.
       if test -n "`echo $package|sed 's/[-a-zA-Z0-9_]*//g'`"; then
         print_error "configure: $package: invalid device name" ; exit 1
       fi
       DEVICE=$package    #|sed s/-/_/g`
       # Can't have - in variable names
       package=`echo $package | sed s/-/_/g`
       eval "device_$package=1" 
       # Handle possible synonyms
       if test -n "$device_ch_eui"; then
           device_ch_mpl=1
           DEVICE=ch_mpl
       fi
       ;;

     -ar_nolocal | --ar_nolocal)
	AR_LOCAL=''
	;;

     -noranlib | -no_ranlib)
        RANLIB=':'
	;;

     -cross)
	cross_compiling=1
	;;

     -f77idx)
	# Force POINTER_64_BITS definition
	F77IDX=1
	;;

     -cc=* | --cc=*)
	MPICC=`echo $arg|sed 's/-*cc=//'`
	CC="$MPICC"
	USERCC=1
	;;

     -fc=* | --fc=*)
	MPIF77=`echo $arg|sed 's/-*fc=//'`
	FC=$MPIF77
	USERF77=1
	;;

     -fortnames=*)
	# Valid values are
	# FORTRANDOUBLEUNDERSCORE
	# FORTRANUNDERSCORE
	# FORTRANCAPS
	# FORTRANNOUNDERSCORE
	FORTRANNAMES="FORTRAN`echo $arg|sed 's/-*fortnames=//'`"
	;;

     -clinker=* | --clinker=*)
	CLINKER=`echo $arg|sed 's/-*clinker=//'`
	USERCLINKER=1
	;;

     -flinker=* | --flinker=*)
	FLINKER=`echo $arg|sed 's/-*flinker=//'`
	USERFLINKER=1
	;;

     -opt=* | --opt=*)
       package="`echo $arg|sed 's/-*opt=//'`"
       OPTFLAGS="$package" ;;

     -optcc=* | --optcc=*)
       package="`echo $arg|sed 's/-*optcc=//'`"
       OPTFLAGSC="$package" ;;

     -optf77=* | --optf77=*)
       package="`echo $arg|sed 's/-*optf77=//'`"
       OPTFLAGSF="$package" ;;

     -cflags=* | --cflags=*)
       package="`echo $arg|sed 's/-*cflags=//'`"
       #USER_CFLAGS="$package"
       CFLAGS="$CFLAGS $package" ;;

     -fflags=* | --fflags=*)
       package="`echo $arg|sed 's/-*fflags=//'`"
       FFLAGS="$package" ;;

     -no_mpegraphics | --no_mpegraphics)
       MPE_GRAPHICS=""
       echo "Make will not build MPE graphics routines" ;;

     -x11_lib=* | --x11_lib=* )
       USERXLIB=1
       X11LIB="`echo $arg|sed 's/-*x11_lib=//'`"
       ;;

     -x11_inc=* | --x11_inc=* )
       USERXLIB=1
       X11INC="`echo $arg|sed 's/-*x11_inc=//'`"
       ;;

     -make=* | --make=*)
       package=`echo $arg|sed 's/-*make=//'`
       MAKE="$package"
	;;

     -nof77 | --nof77)
       echo "Don't build the Fortran interfaces"
       NOF77=1
       HAS_FORTRAN=0
       FC=true
       CFLAGS="-DMPID_NO_FORTRAN $CFLAGS"
       ;;
	
     -nobanner)
	nobanner=1
	;;

     -echo )
	set -x 
        configure_echo=1
	;;

     -u | -usage | --usage | --usag | --usa | --us | --u | -help | --help )
	print_usage >& 2
       exit 1 ;;

     -v | -verbose | --verbose | --verbos | --verbo | --verb | --ver | --ve | --v)
       verbose=yes ;;

     *) 
	print_error "Unrecognized configure option $arg" 
	;;
    esac
  fi
done]

dnl Finish the initalization
AC_PREPARE()
#
#
PAC_GETWD(MPIR_TRIAL,Makefile.in)
MPIR_HOME=$MPIR_TRIAL
#
F77="$FC"
MPEGRAPHICS_SOURCE=""
MPEGRAPHICS_OBJS=""
MPEGRAPHICS_FSOURCE=""
MPEGRAPHICS_FOBJS=""
X_INC=""
X_LIB=""
MPE_DIR="."
#
#
# Check that an ARCH was set
# If it wasn't set, try to guess using "util/tarch"
#
if test -z "$ARCH" -a -x tarch ; then
    echo "Trying to guess architecture ..."
    ARCH=`./tarch | sed s/-/_/g`
    if test -z "$ARCH" ; then
       print_error "Error: Couldn't guess target architecture."
    else
        eval "arch_$ARCH=1"
        echo "  configuring for \"$ARCH\" target architecture"
    fi
fi
if test -n "$arch_sgi" ; then
    arch_IRIX=1
    ARCH=IRIX
fi
if test -n "$arch_IRIX64" ; then
    arch_IRIX=1
fi
if test -n "$arch_IRIX32" ; then
    arch_IRIX=1
fi
if test -n "$arch_IRIXN32" ; then
    arch_IRIX=1
fi
#  Handle solaris on Intel platforms, needed to get heterogeneity right in p4
if test -n "$arch_solaris86" ; then
    arch_solaris=1
    ARCH=solaris86
fi
if test -n "$arch_sgi5" ; then
    arch_IRIX5=1
    ARCH=IRIX
fi
if test -n "$arch_cray" ; then
    arch_CRAY=1
    ARCH=CRAY
fi
# End of arch setup
# 
# Should eventually use a file like $file.run to see if the program should
# be run or just compiled.  And eventually, this should be run EARLY,
# before checking for things like functions and include files.
#
PAC_CHECK_COMPILER_OK(cc_works=1,cc_works=0)
if test $cc_works = 0 ; then
    print_error "Could not compile a simple file with $CC!"
    print_error "Check for license and path restrictions on $CC."
    exit 1
fi
if test $NOF77 = 0 ; then
    PAC_CHECK_F77_COMPILER_OK(,NOF77=1;HAS_FORTRAN=0;HAS_F77=0;
       CFLAGS="-DMPID_NO_FORTRAN $CFLAGS"
       F77="echo no Fortran compiler"
       FLINKER="$F77")
fi
if test -z "$CLINKER" ; then 
    CLINKER="$CC"
fi
if test -z "$FLINKER" ; then
    FLINKER="$F77"
fi
#
# Check for header files
# stdlib.h is used mostly for things like malloc and free, so it isn't
# so important that stdlib.h be exactly "right".
PAC_CHECK_HEADERS(stdlib.h)
#
#
AR="ar cr$AR_LOCAL"
#
# Using this autoconf macro for ranlib doesn't handle the problem 
# of 'helpful' ranlib's that issue error messages (!).  Once
# we've identified the proper compiler etc, we'll try this 
# ranlib below; if it fails, we'll replace it with ':'
#
if test -z "$RANLIB" ; then
    AC_PROG_RANLIB
fi
#
if test "$RANLIB" != ":" ; then
    PAC_RANLIB_WORKS
fi
#
# Some Sun SOLARIS systems don't have AR (at least, not in a typical user
# path)
# Remove any arguments from the string AR
ARTEST=`expr "$AR" : "\(.*\) "`
PAC_PROGRAM_CHECK(ARFOUND,$ARTEST,1,,ARLOC)
if test -z "$ARLOC" ; then 
    # Check for /usr/ccs/bin/ar ; Solaris likes to hide anything remotely
    # useful in this directory
    print_error "The library archiver $AR is not in your path"
    print_error "MPICH cannot be built without this program, which"
    print_error "should be part of ANY program development environment."
    if test -x /usr/ccs/bin/ar ; then 
        print_error "You need /usr/ccs/bin in your path."
    else
        print_error "Check your path; contact your system vendor if your"
        print_error "path appears to be ok."
    fi
    exit 1
fi
#
# CPRP is the version of cp that accepts -r and -p arguments.
# See CRAY below
CPRP="cp"
INCLUDE_PATH=""
USER_INCLUDE_PATH=""
USER_DEFS=""
LIB_LIST=""
MPE_LIBS=""

if test -n "$MPE_DIR"; then
  MPE_DIR="$MPIR_HOME/$MPE_DIR"
  if test -n "$MPE_GRAPHICS"; then
   # FIND_X doesn't always work correctly when cross compiling, so we
   # try to be more careful and conservative
   PAC_FIND_X11
  fi
  if test -n "$MPE_GRAPHICS" -a -z "$no_x" ; then
    MPE_LIBS="-L$MPE_DIR -lmpe -lX11 -lm"
    MPEGRAPHICS_SOURCE="mpe_graphics.c xcolor.c xframe.c xinit.c xwmap.c xmouse.c"
    MPEGRAPHICS_OBJS="mpe_graphics.o xcolor.o xframe.o xinit.o xwmap.o xmouse.o"
    MPEGRAPHICS_FSOURCE="mpe_graphicsf.c"
    MPEGRAPHICS_FOBJS="mpe_graphicsf.o"
    if test -z "$x_includes" ; then
      X_INC=""
    else
      X_INC="-I$x_includes"
    fi
    if test -z "$x_libraries" ; then
      X_LIB=""
    else
      X_LIB="-L$x_libraries"
      MPE_LIBS="$X_LIB -L$MPE_DIR -lmpe -lX11 -lm"
    fi
    # On the Meiko CS2, you have to add additional libraries to satisfy
    # the externals needed by -X11.
    if test -n "$arch_meiko" ; then
        MPE_LIBS="$MPE_LIBS -lsocket -lnsl"
    fi
  else
    MPE_GRAPHICS=""
    MPE_LIBS="-L$MPE_DIR -lmpe"
  fi
else
  MPE_GRAPHICS=""
fi
#
# Check for the functions that may be needed by the ADI to implement
# Processor_name.  Save these defines in a special place.
SAVEDEFS="$DEFS"
DEFS=""
AC_FUNC_CHECK(uname,AC_DEFINE(HAVE_UNAME)haveuname=1)
AC_FUNC_CHECK(gethostbyname,AC_DEFINE(HAVE_GETHOSTBYNAME)havegethostbyname=1)
dnl AC_HAVE_FUNCS(uname gethostbyname)
# If we have uname and gethostbyname, we can skip getdomainname ...
if test "$haveuname" != 1 -o "$havegethostbyname" != 1 ; then
    AC_HAVE_FUNCS(gethostname sysinfo)
    #
    # systeminfo is needed for sysinfo 
    PAC_CHECK_HEADERS(sys/systeminfo.h)
    #
    # getdomainname is special BECAUSE IT MAY BE USELESS (!Network computing 
    # indeed - stuff like this is why Windows95/NT WILL WIN). 
    AC_CHECK_FUNC(getdomainname,has_getdomainname=1,has_getdomainname=0)
    if test $has_getdomainname = 1 -a $cross_compiling = 0 ; then
        PAC_PROGRAM_CHECK(has_domainname,domainname,1,0,d_domainname)
        PAC_PROGRAM_CHECK(has_hostname,hostname,1,0,d_hostname)
        PAC_PROGRAM_CHECK(has_rup,rup,1,0,d_rup)
        # Form hostname.domainname, do rup to it
        # rup may not be enabled, but short of running a program to lookup the
        # local host, there does not seem to be a better alternative.
        #
        if test $has_domainname = 1 -a $has_hostname = 1 -a $has_rup = 1 ; then
changequote(,)
            fullhost=`$d_hostname | sed -e 's/^\([^\.]*\)\..*/\1/'`
changequote([,])
#	    echo $fullhost
            fullhost="${fullhost}.`$d_domainname`"
            response=`($d_rup $fullhost 2>&1) | grep 'Unknown host'`
#	    echo $fullhost
            if test -n "$response" ; then
   print_error "The getdomainname system routine has been rendered USELESS"
   print_error "on your system.  This is not a bug and will not affect"
   print_error "MPICH.  Some MPE routines (particularly those that"
   print_error "interact with X Windows) may not work."
            else
                AC_DEFINE(HAVE_GETDOMAINNAME)
	    fi
        fi
    fi
fi
GETNAME_DEFS="$DEFS"
DEFS="$SAVEDEFS"
#
# Generate the name for the MPI-C, MPI-CC, and MPI-F77 compilers (for use
# in Makefiles that should not be MPICH dependent
# MPICC etc should be set on the configure line
if test -z "$MPICC" ; then
    MPICC=$MPIR_HOME/lib/$ARCH/$COMM/mpicc
fi
if test -z "$MPIF77" ; then
    if test $NOF77 = 1 ; then
	MPIF77=:
    else
        MPIF77=$MPIR_HOME/lib/$ARCH/$COMM/mpif77
    fi
fi
if test -z "$LIB_DIR" ; then
    LIB_DIR=$MPE_DIR
fi
#
# hpux's Fortran compiler f77 (but not the POSIX version fort77) does
# not accept -L <dir> for library search path.
FLIB_PATH_LEADER="-L"
if test -n "$arch_hpux" -a "$F77" = "f77" ; then
   FLIB_PATH=`echo $LIB_PATH | sed -e 's/-L/-Wl,-L,/g'`
   FLIB_PATH_LEADER="-Wl,-L,"
else
   FLIB_PATH="$LIB_PATH"
fi
#
# Check whether MPI_Pcontrol needs (const int, ... ) prototype
AC_MSG_CHECKING(for MPI_Pcontrol declaration)
AC_COMPILE_CHECK(,[#include "mpi.h"],int MPI_Pcontrol( level );int level,int_ok=1,int_ok=0)
if test $int_ok = 1 ; then 
    AC_MSG_RESULT(int level)
else
    AC_MSG_RESULT([const int level, ...])
    AC_DEFINE(PCONTROL_NEEDS_CONST)
fi
#
# Check to see if the compiler accepts prototypes
PAC_CHECK_CC_PROTOTYPES(AC_DEFINE(HAVE_PROTOTYPES))
#
# Check to see if it accepts const
PAC_CHECK_CC_CONST(,AC_DEFINE(HAVE_NO_C_CONST))
#
#
MPE_CFLAGS="$MPE_CFLAGS $DEFS"
# Substitute variables
# Variables used in scripts only
# FINC contains an @MPIR_HOME@, so it needs to come first
AC_SUBST(FINC)dnl
# Variables used by Makefile.in's:
AC_SUBST(AR)dnl
AC_SUBST(ARCH)dnl
AC_SUBST(CC)dnl
AC_SUBST(CFLAGS)dnl
AC_SUBST(CLINKER)dnl
AC_SUBST(COMM)dnl
AC_SUBST(CPRP)dnl
AC_SUBST(DEVICE)dnl
AC_SUBST(F77)dnl
AC_SUBST(FFLAGS)dnl
AC_SUBST(FLIB_PATH)dnl
AC_SUBST(FLIB_PATH_LEADER)dnl
AC_SUBST(FLINKER)dnl
AC_SUBST(GETNAME_DEFS)dnl
AC_SUBST(HAS_FORTRAN)dnl
AC_SUBST(INCLUDE_PATH)dnl
AC_SUBST(LIB_LIST)dnl
AC_SUBST(LIB_PATH)dnl
AC_SUBST(LIB_DIR)dnl
AC_SUBST(MAKE)dnl
AC_SUBST(MPEGRAPHICS_FOBJS)dnl
AC_SUBST(MPEGRAPHICS_FSOURCE)dnl
AC_SUBST(MPEGRAPHICS_OBJS)dnl
AC_SUBST(MPEGRAPHICS_SOURCE)dnl
AC_SUBST(MPE_CFLAGS)dnl
AC_SUBST(MPE_DIR)dnl
AC_SUBST(MPE_GRAPHICS)dnl
AC_SUBST(MPE_LIBS)dnl
AC_SUBST(MPIR_HOME)dnl
AC_SUBST(MPICC)dnl
AC_SUBST(MPIF77)dnl
AC_SUBST(OPTFLAGS)dnl
AC_SUBST(OPTFLAGSC)dnl
AC_SUBST(OPTFLAGSF)dnl
AC_SUBST(PREFIX)dnl
AC_SUBST(RANLIB)dnl
AC_SUBST(USER_CFLAGS)dnl
AC_SUBST(X_INC)dnl
AC_SUBST(X_LIB)dnl
# End configuration file
AC_OUTPUT(Makefile Makefile_nompi contrib/mandel/Makefile contrib/mastermind/Makefile contrib/life/Makefile test/Makefile)