Fix hash table usage for XLC
[charm.git] / src / scripts / configure
blob543ea1e1577ad2442038e4694072e32561a3dc70
1 #! /bin/sh
2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69.
6 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
11 ## -------------------- ##
12 ## M4sh Initialization. ##
13 ## -------------------- ##
15 # Be more Bourne compatible
16 DUALCASE=1; export DUALCASE # for MKS sh
17 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
18 emulate sh
19 NULLCMD=:
20 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21 # is contrary to our usage. Disable this feature.
22 alias -g '${1+"$@"}'='"$@"'
23 setopt NO_GLOB_SUBST
24 else
25 case `(set -o) 2>/dev/null` in #(
26 *posix*) :
27 set -o posix ;; #(
28 *) :
30 esac
34 as_nl='
36 export as_nl
37 # Printing a long string crashes Solaris 7 /usr/bin/printf.
38 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41 # Prefer a ksh shell builtin over an external printf program on Solaris,
42 # but without wasting forks for bash or zsh.
43 if test -z "$BASH_VERSION$ZSH_VERSION" \
44 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
45 as_echo='print -r --'
46 as_echo_n='print -rn --'
47 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='printf %s\n'
49 as_echo_n='printf %s'
50 else
51 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
53 as_echo_n='/usr/ucb/echo -n'
54 else
55 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
56 as_echo_n_body='eval
57 arg=$1;
58 case $arg in #(
59 *"$as_nl"*)
60 expr "X$arg" : "X\\(.*\\)$as_nl";
61 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
62 esac;
63 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
65 export as_echo_n_body
66 as_echo_n='sh -c $as_echo_n_body as_echo'
68 export as_echo_body
69 as_echo='sh -c $as_echo_body as_echo'
72 # The user is always right.
73 if test "${PATH_SEPARATOR+set}" != set; then
74 PATH_SEPARATOR=:
75 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
77 PATH_SEPARATOR=';'
82 # IFS
83 # We need space, tab and new line, in precisely that order. Quoting is
84 # there to prevent editors from complaining about space-tab.
85 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
86 # splitting by setting IFS to empty value.)
87 IFS=" "" $as_nl"
89 # Find who we are. Look in the path if we contain no directory separator.
90 as_myself=
91 case $0 in #((
92 *[\\/]* ) as_myself=$0 ;;
93 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
94 for as_dir in $PATH
96 IFS=$as_save_IFS
97 test -z "$as_dir" && as_dir=.
98 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
99 done
100 IFS=$as_save_IFS
103 esac
104 # We did not find ourselves, most probably we were run as `sh COMMAND'
105 # in which case we are not to be found in the path.
106 if test "x$as_myself" = x; then
107 as_myself=$0
109 if test ! -f "$as_myself"; then
110 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
111 exit 1
114 # Unset variables that we do not need and which cause bugs (e.g. in
115 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
116 # suppresses any "Segmentation fault" message there. '((' could
117 # trigger a bug in pdksh 5.2.14.
118 for as_var in BASH_ENV ENV MAIL MAILPATH
119 do eval test x\${$as_var+set} = xset \
120 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
121 done
122 PS1='$ '
123 PS2='> '
124 PS4='+ '
126 # NLS nuisances.
127 LC_ALL=C
128 export LC_ALL
129 LANGUAGE=C
130 export LANGUAGE
132 # CDPATH.
133 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
135 # Use a proper internal environment variable to ensure we don't fall
136 # into an infinite loop, continuously re-executing ourselves.
137 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
138 _as_can_reexec=no; export _as_can_reexec;
139 # We cannot yet assume a decent shell, so we have to provide a
140 # neutralization value for shells without unset; and this also
141 # works around shells that cannot unset nonexistent variables.
142 # Preserve -v and -x to the replacement shell.
143 BASH_ENV=/dev/null
144 ENV=/dev/null
145 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
146 case $- in # ((((
147 *v*x* | *x*v* ) as_opts=-vx ;;
148 *v* ) as_opts=-v ;;
149 *x* ) as_opts=-x ;;
150 * ) as_opts= ;;
151 esac
152 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
153 # Admittedly, this is quite paranoid, since all the known shells bail
154 # out after a failed `exec'.
155 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
156 as_fn_exit 255
158 # We don't want this to propagate to other subprocesses.
159 { _as_can_reexec=; unset _as_can_reexec;}
160 if test "x$CONFIG_SHELL" = x; then
161 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
162 emulate sh
163 NULLCMD=:
164 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
165 # is contrary to our usage. Disable this feature.
166 alias -g '\${1+\"\$@\"}'='\"\$@\"'
167 setopt NO_GLOB_SUBST
168 else
169 case \`(set -o) 2>/dev/null\` in #(
170 *posix*) :
171 set -o posix ;; #(
172 *) :
174 esac
177 as_required="as_fn_return () { (exit \$1); }
178 as_fn_success () { as_fn_return 0; }
179 as_fn_failure () { as_fn_return 1; }
180 as_fn_ret_success () { return 0; }
181 as_fn_ret_failure () { return 1; }
183 exitcode=0
184 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
185 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
186 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
187 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
188 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
190 else
191 exitcode=1; echo positional parameters were not saved.
193 test x\$exitcode = x0 || exit 1
194 test -x / || exit 1"
195 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
196 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
197 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
198 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1"
199 if (eval "$as_required") 2>/dev/null; then :
200 as_have_required=yes
201 else
202 as_have_required=no
204 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
206 else
207 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
208 as_found=false
209 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
211 IFS=$as_save_IFS
212 test -z "$as_dir" && as_dir=.
213 as_found=:
214 case $as_dir in #(
216 for as_base in sh bash ksh sh5; do
217 # Try only shells that exist, to save several forks.
218 as_shell=$as_dir/$as_base
219 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
220 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
221 CONFIG_SHELL=$as_shell as_have_required=yes
222 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
223 break 2
226 done;;
227 esac
228 as_found=false
229 done
230 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
231 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
232 CONFIG_SHELL=$SHELL as_have_required=yes
233 fi; }
234 IFS=$as_save_IFS
237 if test "x$CONFIG_SHELL" != x; then :
238 export CONFIG_SHELL
239 # We cannot yet assume a decent shell, so we have to provide a
240 # neutralization value for shells without unset; and this also
241 # works around shells that cannot unset nonexistent variables.
242 # Preserve -v and -x to the replacement shell.
243 BASH_ENV=/dev/null
244 ENV=/dev/null
245 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
246 case $- in # ((((
247 *v*x* | *x*v* ) as_opts=-vx ;;
248 *v* ) as_opts=-v ;;
249 *x* ) as_opts=-x ;;
250 * ) as_opts= ;;
251 esac
252 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
253 # Admittedly, this is quite paranoid, since all the known shells bail
254 # out after a failed `exec'.
255 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
256 exit 255
259 if test x$as_have_required = xno; then :
260 $as_echo "$0: This script requires a shell more modern than all"
261 $as_echo "$0: the shells that I found on your system."
262 if test x${ZSH_VERSION+set} = xset ; then
263 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
264 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
265 else
266 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
267 $0: including any error possibly output before this
268 $0: message. Then install a modern shell, or manually run
269 $0: the script under such a shell if you do have one."
271 exit 1
275 SHELL=${CONFIG_SHELL-/bin/sh}
276 export SHELL
277 # Unset more variables known to interfere with behavior of common tools.
278 CLICOLOR_FORCE= GREP_OPTIONS=
279 unset CLICOLOR_FORCE GREP_OPTIONS
281 ## --------------------- ##
282 ## M4sh Shell Functions. ##
283 ## --------------------- ##
284 # as_fn_unset VAR
285 # ---------------
286 # Portably unset VAR.
287 as_fn_unset ()
289 { eval $1=; unset $1;}
291 as_unset=as_fn_unset
293 # as_fn_set_status STATUS
294 # -----------------------
295 # Set $? to STATUS, without forking.
296 as_fn_set_status ()
298 return $1
299 } # as_fn_set_status
301 # as_fn_exit STATUS
302 # -----------------
303 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
304 as_fn_exit ()
306 set +e
307 as_fn_set_status $1
308 exit $1
309 } # as_fn_exit
311 # as_fn_mkdir_p
312 # -------------
313 # Create "$as_dir" as a directory, including parents if necessary.
314 as_fn_mkdir_p ()
317 case $as_dir in #(
318 -*) as_dir=./$as_dir;;
319 esac
320 test -d "$as_dir" || eval $as_mkdir_p || {
321 as_dirs=
322 while :; do
323 case $as_dir in #(
324 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
325 *) as_qdir=$as_dir;;
326 esac
327 as_dirs="'$as_qdir' $as_dirs"
328 as_dir=`$as_dirname -- "$as_dir" ||
329 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
330 X"$as_dir" : 'X\(//\)[^/]' \| \
331 X"$as_dir" : 'X\(//\)$' \| \
332 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
333 $as_echo X"$as_dir" |
334 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
335 s//\1/
338 /^X\(\/\/\)[^/].*/{
339 s//\1/
342 /^X\(\/\/\)$/{
343 s//\1/
346 /^X\(\/\).*/{
347 s//\1/
350 s/.*/./; q'`
351 test -d "$as_dir" && break
352 done
353 test -z "$as_dirs" || eval "mkdir $as_dirs"
354 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
357 } # as_fn_mkdir_p
359 # as_fn_executable_p FILE
360 # -----------------------
361 # Test if FILE is an executable regular file.
362 as_fn_executable_p ()
364 test -f "$1" && test -x "$1"
365 } # as_fn_executable_p
366 # as_fn_append VAR VALUE
367 # ----------------------
368 # Append the text in VALUE to the end of the definition contained in VAR. Take
369 # advantage of any shell optimizations that allow amortized linear growth over
370 # repeated appends, instead of the typical quadratic growth present in naive
371 # implementations.
372 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
373 eval 'as_fn_append ()
375 eval $1+=\$2
377 else
378 as_fn_append ()
380 eval $1=\$$1\$2
382 fi # as_fn_append
384 # as_fn_arith ARG...
385 # ------------------
386 # Perform arithmetic evaluation on the ARGs, and store the result in the
387 # global $as_val. Take advantage of shells that can avoid forks. The arguments
388 # must be portable across $(()) and expr.
389 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
390 eval 'as_fn_arith ()
392 as_val=$(( $* ))
394 else
395 as_fn_arith ()
397 as_val=`expr "$@" || test $? -eq 1`
399 fi # as_fn_arith
402 # as_fn_error STATUS ERROR [LINENO LOG_FD]
403 # ----------------------------------------
404 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
405 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
406 # script with STATUS, using 1 if that was 0.
407 as_fn_error ()
409 as_status=$1; test $as_status -eq 0 && as_status=1
410 if test "$4"; then
411 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
412 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
414 $as_echo "$as_me: error: $2" >&2
415 as_fn_exit $as_status
416 } # as_fn_error
418 if expr a : '\(a\)' >/dev/null 2>&1 &&
419 test "X`expr 00001 : '.*\(...\)'`" = X001; then
420 as_expr=expr
421 else
422 as_expr=false
425 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
426 as_basename=basename
427 else
428 as_basename=false
431 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
432 as_dirname=dirname
433 else
434 as_dirname=false
437 as_me=`$as_basename -- "$0" ||
438 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
439 X"$0" : 'X\(//\)$' \| \
440 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
441 $as_echo X/"$0" |
442 sed '/^.*\/\([^/][^/]*\)\/*$/{
443 s//\1/
446 /^X\/\(\/\/\)$/{
447 s//\1/
450 /^X\/\(\/\).*/{
451 s//\1/
454 s/.*/./; q'`
456 # Avoid depending upon Character Ranges.
457 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
458 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
459 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
460 as_cr_digits='0123456789'
461 as_cr_alnum=$as_cr_Letters$as_cr_digits
464 as_lineno_1=$LINENO as_lineno_1a=$LINENO
465 as_lineno_2=$LINENO as_lineno_2a=$LINENO
466 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
467 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
468 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
469 sed -n '
471 /[$]LINENO/=
472 ' <$as_myself |
473 sed '
474 s/[$]LINENO.*/&-/
475 t lineno
477 :lineno
479 :loop
480 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
481 t loop
482 s/-\n.*//
483 ' >$as_me.lineno &&
484 chmod +x "$as_me.lineno" ||
485 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
487 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
488 # already done that, so ensure we don't try to do so again and fall
489 # in an infinite loop. This has already happened in practice.
490 _as_can_reexec=no; export _as_can_reexec
491 # Don't try to exec as it changes $[0], causing all sort of problems
492 # (the dirname of $[0] is not the place where we might find the
493 # original and so on. Autoconf is especially sensitive to this).
494 . "./$as_me.lineno"
495 # Exit status is that of the last command.
496 exit
499 ECHO_C= ECHO_N= ECHO_T=
500 case `echo -n x` in #(((((
501 -n*)
502 case `echo 'xy\c'` in
503 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
504 xy) ECHO_C='\c';;
505 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
506 ECHO_T=' ';;
507 esac;;
509 ECHO_N='-n';;
510 esac
512 rm -f conf$$ conf$$.exe conf$$.file
513 if test -d conf$$.dir; then
514 rm -f conf$$.dir/conf$$.file
515 else
516 rm -f conf$$.dir
517 mkdir conf$$.dir 2>/dev/null
519 if (echo >conf$$.file) 2>/dev/null; then
520 if ln -s conf$$.file conf$$ 2>/dev/null; then
521 as_ln_s='ln -s'
522 # ... but there are two gotchas:
523 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
524 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
525 # In both cases, we have to default to `cp -pR'.
526 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
527 as_ln_s='cp -pR'
528 elif ln conf$$.file conf$$ 2>/dev/null; then
529 as_ln_s=ln
530 else
531 as_ln_s='cp -pR'
533 else
534 as_ln_s='cp -pR'
536 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
537 rmdir conf$$.dir 2>/dev/null
539 if mkdir -p . 2>/dev/null; then
540 as_mkdir_p='mkdir -p "$as_dir"'
541 else
542 test -d ./-p && rmdir ./-p
543 as_mkdir_p=false
546 as_test_x='test -x'
547 as_executable_p=as_fn_executable_p
549 # Sed expression to map a string onto a valid CPP name.
550 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
552 # Sed expression to map a string onto a valid variable name.
553 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
556 test -n "$DJDIR" || exec 7<&0 </dev/null
557 exec 6>&1
559 # Name of the host.
560 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
561 # so uname gets run too.
562 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
565 # Initializations.
567 ac_default_prefix=/usr/local
568 ac_clean_files=
569 ac_config_libobj_dir=.
570 LIBOBJS=
571 cross_compiling=no
572 subdirs=
573 MFLAGS=
574 MAKEFLAGS=
576 # Identity of this package.
577 PACKAGE_NAME=
578 PACKAGE_TARNAME=
579 PACKAGE_VERSION=
580 PACKAGE_STRING=
581 PACKAGE_BUGREPORT=
582 PACKAGE_URL=
584 ac_unique_file="./Makefile"
585 ac_subst_vars='LTLIBOBJS
586 LIBOBJS
587 SYNC
588 base_version
589 target_alias
590 host_alias
591 build_alias
592 LIBS
593 ECHO_T
594 ECHO_N
595 ECHO_C
596 DEFS
597 mandir
598 localedir
599 libdir
600 psdir
601 pdfdir
602 dvidir
603 htmldir
604 infodir
605 docdir
606 oldincludedir
607 includedir
608 localstatedir
609 sharedstatedir
610 sysconfdir
611 datadir
612 datarootdir
613 libexecdir
614 sbindir
615 bindir
616 program_transform_name
617 prefix
618 exec_prefix
619 PACKAGE_URL
620 PACKAGE_BUGREPORT
621 PACKAGE_STRING
622 PACKAGE_VERSION
623 PACKAGE_TARNAME
624 PACKAGE_NAME
625 PATH_SEPARATOR
626 SHELL'
627 ac_subst_files=''
628 ac_user_opts='
629 enable_option_checking
630 enable_error_checking
631 enable_ampi_error_checking
632 enable_stats
633 enable_tracing
634 enable_tracing_commthread
635 enable_charmdebug
636 enable_replay
637 enable_ccs
638 enable_controlpoint
639 enable_lbuserdata
640 enable_shrinkexpand
641 with_numa
642 with_lbtime_type
643 with_qlogic
644 with_refnum_type
645 with_prio_type
646 enable_randomized_msgq
647 with_metis
649 ac_precious_vars='build_alias
650 host_alias
651 target_alias'
654 # Initialize some variables set by options.
655 ac_init_help=
656 ac_init_version=false
657 ac_unrecognized_opts=
658 ac_unrecognized_sep=
659 # The variables have the same names as the options, with
660 # dashes changed to underlines.
661 cache_file=/dev/null
662 exec_prefix=NONE
663 no_create=
664 no_recursion=
665 prefix=NONE
666 program_prefix=NONE
667 program_suffix=NONE
668 program_transform_name=s,x,x,
669 silent=
670 site=
671 srcdir=
672 verbose=
673 x_includes=NONE
674 x_libraries=NONE
676 # Installation directory options.
677 # These are left unexpanded so users can "make install exec_prefix=/foo"
678 # and all the variables that are supposed to be based on exec_prefix
679 # by default will actually change.
680 # Use braces instead of parens because sh, perl, etc. also accept them.
681 # (The list follows the same order as the GNU Coding Standards.)
682 bindir='${exec_prefix}/bin'
683 sbindir='${exec_prefix}/sbin'
684 libexecdir='${exec_prefix}/libexec'
685 datarootdir='${prefix}/share'
686 datadir='${datarootdir}'
687 sysconfdir='${prefix}/etc'
688 sharedstatedir='${prefix}/com'
689 localstatedir='${prefix}/var'
690 includedir='${prefix}/include'
691 oldincludedir='/usr/include'
692 docdir='${datarootdir}/doc/${PACKAGE}'
693 infodir='${datarootdir}/info'
694 htmldir='${docdir}'
695 dvidir='${docdir}'
696 pdfdir='${docdir}'
697 psdir='${docdir}'
698 libdir='${exec_prefix}/lib'
699 localedir='${datarootdir}/locale'
700 mandir='${datarootdir}/man'
702 ac_prev=
703 ac_dashdash=
704 for ac_option
706 # If the previous option needs an argument, assign it.
707 if test -n "$ac_prev"; then
708 eval $ac_prev=\$ac_option
709 ac_prev=
710 continue
713 case $ac_option in
714 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
715 *=) ac_optarg= ;;
716 *) ac_optarg=yes ;;
717 esac
719 # Accept the important Cygnus configure options, so we can diagnose typos.
721 case $ac_dashdash$ac_option in
723 ac_dashdash=yes ;;
725 -bindir | --bindir | --bindi | --bind | --bin | --bi)
726 ac_prev=bindir ;;
727 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
728 bindir=$ac_optarg ;;
730 -build | --build | --buil | --bui | --bu)
731 ac_prev=build_alias ;;
732 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
733 build_alias=$ac_optarg ;;
735 -cache-file | --cache-file | --cache-fil | --cache-fi \
736 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
737 ac_prev=cache_file ;;
738 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
739 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
740 cache_file=$ac_optarg ;;
742 --config-cache | -C)
743 cache_file=config.cache ;;
745 -datadir | --datadir | --datadi | --datad)
746 ac_prev=datadir ;;
747 -datadir=* | --datadir=* | --datadi=* | --datad=*)
748 datadir=$ac_optarg ;;
750 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
751 | --dataroo | --dataro | --datar)
752 ac_prev=datarootdir ;;
753 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
754 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
755 datarootdir=$ac_optarg ;;
757 -disable-* | --disable-*)
758 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
759 # Reject names that are not valid shell variable names.
760 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
761 as_fn_error $? "invalid feature name: $ac_useropt"
762 ac_useropt_orig=$ac_useropt
763 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
764 case $ac_user_opts in
766 "enable_$ac_useropt"
767 "*) ;;
768 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
769 ac_unrecognized_sep=', ';;
770 esac
771 eval enable_$ac_useropt=no ;;
773 -docdir | --docdir | --docdi | --doc | --do)
774 ac_prev=docdir ;;
775 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
776 docdir=$ac_optarg ;;
778 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
779 ac_prev=dvidir ;;
780 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
781 dvidir=$ac_optarg ;;
783 -enable-* | --enable-*)
784 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
785 # Reject names that are not valid shell variable names.
786 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
787 as_fn_error $? "invalid feature name: $ac_useropt"
788 ac_useropt_orig=$ac_useropt
789 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
790 case $ac_user_opts in
792 "enable_$ac_useropt"
793 "*) ;;
794 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
795 ac_unrecognized_sep=', ';;
796 esac
797 eval enable_$ac_useropt=\$ac_optarg ;;
799 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
800 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
801 | --exec | --exe | --ex)
802 ac_prev=exec_prefix ;;
803 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
804 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
805 | --exec=* | --exe=* | --ex=*)
806 exec_prefix=$ac_optarg ;;
808 -gas | --gas | --ga | --g)
809 # Obsolete; use --with-gas.
810 with_gas=yes ;;
812 -help | --help | --hel | --he | -h)
813 ac_init_help=long ;;
814 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
815 ac_init_help=recursive ;;
816 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
817 ac_init_help=short ;;
819 -host | --host | --hos | --ho)
820 ac_prev=host_alias ;;
821 -host=* | --host=* | --hos=* | --ho=*)
822 host_alias=$ac_optarg ;;
824 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
825 ac_prev=htmldir ;;
826 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
827 | --ht=*)
828 htmldir=$ac_optarg ;;
830 -includedir | --includedir | --includedi | --included | --include \
831 | --includ | --inclu | --incl | --inc)
832 ac_prev=includedir ;;
833 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
834 | --includ=* | --inclu=* | --incl=* | --inc=*)
835 includedir=$ac_optarg ;;
837 -infodir | --infodir | --infodi | --infod | --info | --inf)
838 ac_prev=infodir ;;
839 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
840 infodir=$ac_optarg ;;
842 -libdir | --libdir | --libdi | --libd)
843 ac_prev=libdir ;;
844 -libdir=* | --libdir=* | --libdi=* | --libd=*)
845 libdir=$ac_optarg ;;
847 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
848 | --libexe | --libex | --libe)
849 ac_prev=libexecdir ;;
850 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
851 | --libexe=* | --libex=* | --libe=*)
852 libexecdir=$ac_optarg ;;
854 -localedir | --localedir | --localedi | --localed | --locale)
855 ac_prev=localedir ;;
856 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
857 localedir=$ac_optarg ;;
859 -localstatedir | --localstatedir | --localstatedi | --localstated \
860 | --localstate | --localstat | --localsta | --localst | --locals)
861 ac_prev=localstatedir ;;
862 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
863 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
864 localstatedir=$ac_optarg ;;
866 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
867 ac_prev=mandir ;;
868 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
869 mandir=$ac_optarg ;;
871 -nfp | --nfp | --nf)
872 # Obsolete; use --without-fp.
873 with_fp=no ;;
875 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
876 | --no-cr | --no-c | -n)
877 no_create=yes ;;
879 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
880 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
881 no_recursion=yes ;;
883 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
884 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
885 | --oldin | --oldi | --old | --ol | --o)
886 ac_prev=oldincludedir ;;
887 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
888 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
889 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
890 oldincludedir=$ac_optarg ;;
892 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
893 ac_prev=prefix ;;
894 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
895 prefix=$ac_optarg ;;
897 -program-prefix | --program-prefix | --program-prefi | --program-pref \
898 | --program-pre | --program-pr | --program-p)
899 ac_prev=program_prefix ;;
900 -program-prefix=* | --program-prefix=* | --program-prefi=* \
901 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
902 program_prefix=$ac_optarg ;;
904 -program-suffix | --program-suffix | --program-suffi | --program-suff \
905 | --program-suf | --program-su | --program-s)
906 ac_prev=program_suffix ;;
907 -program-suffix=* | --program-suffix=* | --program-suffi=* \
908 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
909 program_suffix=$ac_optarg ;;
911 -program-transform-name | --program-transform-name \
912 | --program-transform-nam | --program-transform-na \
913 | --program-transform-n | --program-transform- \
914 | --program-transform | --program-transfor \
915 | --program-transfo | --program-transf \
916 | --program-trans | --program-tran \
917 | --progr-tra | --program-tr | --program-t)
918 ac_prev=program_transform_name ;;
919 -program-transform-name=* | --program-transform-name=* \
920 | --program-transform-nam=* | --program-transform-na=* \
921 | --program-transform-n=* | --program-transform-=* \
922 | --program-transform=* | --program-transfor=* \
923 | --program-transfo=* | --program-transf=* \
924 | --program-trans=* | --program-tran=* \
925 | --progr-tra=* | --program-tr=* | --program-t=*)
926 program_transform_name=$ac_optarg ;;
928 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
929 ac_prev=pdfdir ;;
930 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
931 pdfdir=$ac_optarg ;;
933 -psdir | --psdir | --psdi | --psd | --ps)
934 ac_prev=psdir ;;
935 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
936 psdir=$ac_optarg ;;
938 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
939 | -silent | --silent | --silen | --sile | --sil)
940 silent=yes ;;
942 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
943 ac_prev=sbindir ;;
944 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
945 | --sbi=* | --sb=*)
946 sbindir=$ac_optarg ;;
948 -sharedstatedir | --sharedstatedir | --sharedstatedi \
949 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
950 | --sharedst | --shareds | --shared | --share | --shar \
951 | --sha | --sh)
952 ac_prev=sharedstatedir ;;
953 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
954 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
955 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
956 | --sha=* | --sh=*)
957 sharedstatedir=$ac_optarg ;;
959 -site | --site | --sit)
960 ac_prev=site ;;
961 -site=* | --site=* | --sit=*)
962 site=$ac_optarg ;;
964 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
965 ac_prev=srcdir ;;
966 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
967 srcdir=$ac_optarg ;;
969 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
970 | --syscon | --sysco | --sysc | --sys | --sy)
971 ac_prev=sysconfdir ;;
972 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
973 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
974 sysconfdir=$ac_optarg ;;
976 -target | --target | --targe | --targ | --tar | --ta | --t)
977 ac_prev=target_alias ;;
978 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
979 target_alias=$ac_optarg ;;
981 -v | -verbose | --verbose | --verbos | --verbo | --verb)
982 verbose=yes ;;
984 -version | --version | --versio | --versi | --vers | -V)
985 ac_init_version=: ;;
987 -with-* | --with-*)
988 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
989 # Reject names that are not valid shell variable names.
990 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
991 as_fn_error $? "invalid package name: $ac_useropt"
992 ac_useropt_orig=$ac_useropt
993 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
994 case $ac_user_opts in
996 "with_$ac_useropt"
997 "*) ;;
998 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
999 ac_unrecognized_sep=', ';;
1000 esac
1001 eval with_$ac_useropt=\$ac_optarg ;;
1003 -without-* | --without-*)
1004 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1005 # Reject names that are not valid shell variable names.
1006 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1007 as_fn_error $? "invalid package name: $ac_useropt"
1008 ac_useropt_orig=$ac_useropt
1009 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1010 case $ac_user_opts in
1012 "with_$ac_useropt"
1013 "*) ;;
1014 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1015 ac_unrecognized_sep=', ';;
1016 esac
1017 eval with_$ac_useropt=no ;;
1019 --x)
1020 # Obsolete; use --with-x.
1021 with_x=yes ;;
1023 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1024 | --x-incl | --x-inc | --x-in | --x-i)
1025 ac_prev=x_includes ;;
1026 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1027 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1028 x_includes=$ac_optarg ;;
1030 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1031 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1032 ac_prev=x_libraries ;;
1033 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1034 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1035 x_libraries=$ac_optarg ;;
1037 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1038 Try \`$0 --help' for more information"
1041 *=*)
1042 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1043 # Reject names that are not valid shell variable names.
1044 case $ac_envvar in #(
1045 '' | [0-9]* | *[!_$as_cr_alnum]* )
1046 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1047 esac
1048 eval $ac_envvar=\$ac_optarg
1049 export $ac_envvar ;;
1052 # FIXME: should be removed in autoconf 3.0.
1053 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1054 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1055 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1056 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1059 esac
1060 done
1062 if test -n "$ac_prev"; then
1063 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1064 as_fn_error $? "missing argument to $ac_option"
1067 if test -n "$ac_unrecognized_opts"; then
1068 case $enable_option_checking in
1069 no) ;;
1070 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1071 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1072 esac
1075 # Check all directory arguments for consistency.
1076 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1077 datadir sysconfdir sharedstatedir localstatedir includedir \
1078 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1079 libdir localedir mandir
1081 eval ac_val=\$$ac_var
1082 # Remove trailing slashes.
1083 case $ac_val in
1084 */ )
1085 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1086 eval $ac_var=\$ac_val;;
1087 esac
1088 # Be sure to have absolute directory names.
1089 case $ac_val in
1090 [\\/$]* | ?:[\\/]* ) continue;;
1091 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1092 esac
1093 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1094 done
1096 # There might be people who depend on the old broken behavior: `$host'
1097 # used to hold the argument of --host etc.
1098 # FIXME: To remove some day.
1099 build=$build_alias
1100 host=$host_alias
1101 target=$target_alias
1103 # FIXME: To remove some day.
1104 if test "x$host_alias" != x; then
1105 if test "x$build_alias" = x; then
1106 cross_compiling=maybe
1107 elif test "x$build_alias" != "x$host_alias"; then
1108 cross_compiling=yes
1112 ac_tool_prefix=
1113 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1115 test "$silent" = yes && exec 6>/dev/null
1118 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1119 ac_ls_di=`ls -di .` &&
1120 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1121 as_fn_error $? "working directory cannot be determined"
1122 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1123 as_fn_error $? "pwd does not report name of working directory"
1126 # Find the source files, if location was not specified.
1127 if test -z "$srcdir"; then
1128 ac_srcdir_defaulted=yes
1129 # Try the directory containing this script, then the parent directory.
1130 ac_confdir=`$as_dirname -- "$as_myself" ||
1131 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1132 X"$as_myself" : 'X\(//\)[^/]' \| \
1133 X"$as_myself" : 'X\(//\)$' \| \
1134 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1135 $as_echo X"$as_myself" |
1136 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1137 s//\1/
1140 /^X\(\/\/\)[^/].*/{
1141 s//\1/
1144 /^X\(\/\/\)$/{
1145 s//\1/
1148 /^X\(\/\).*/{
1149 s//\1/
1152 s/.*/./; q'`
1153 srcdir=$ac_confdir
1154 if test ! -r "$srcdir/$ac_unique_file"; then
1155 srcdir=..
1157 else
1158 ac_srcdir_defaulted=no
1160 if test ! -r "$srcdir/$ac_unique_file"; then
1161 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1162 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1164 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1165 ac_abs_confdir=`(
1166 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1167 pwd)`
1168 # When building in place, set srcdir=.
1169 if test "$ac_abs_confdir" = "$ac_pwd"; then
1170 srcdir=.
1172 # Remove unnecessary trailing slashes from srcdir.
1173 # Double slashes in file names in object file debugging info
1174 # mess up M-x gdb in Emacs.
1175 case $srcdir in
1176 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1177 esac
1178 for ac_var in $ac_precious_vars; do
1179 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1180 eval ac_env_${ac_var}_value=\$${ac_var}
1181 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1182 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1183 done
1186 # Report the --help message.
1188 if test "$ac_init_help" = "long"; then
1189 # Omit some internal or obsolete options to make the list less imposing.
1190 # This message is too long to be a string in the A/UX 3.1 sh.
1191 cat <<_ACEOF
1192 \`configure' configures this package to adapt to many kinds of systems.
1194 Usage: $0 [OPTION]... [VAR=VALUE]...
1196 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1197 VAR=VALUE. See below for descriptions of some of the useful variables.
1199 Defaults for the options are specified in brackets.
1201 Configuration:
1202 -h, --help display this help and exit
1203 --help=short display options specific to this package
1204 --help=recursive display the short help of all the included packages
1205 -V, --version display version information and exit
1206 -q, --quiet, --silent do not print \`checking ...' messages
1207 --cache-file=FILE cache test results in FILE [disabled]
1208 -C, --config-cache alias for \`--cache-file=config.cache'
1209 -n, --no-create do not create output files
1210 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1212 Installation directories:
1213 --prefix=PREFIX install architecture-independent files in PREFIX
1214 [$ac_default_prefix]
1215 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1216 [PREFIX]
1218 By default, \`make install' will install all the files in
1219 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1220 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1221 for instance \`--prefix=\$HOME'.
1223 For better control, use the options below.
1225 Fine tuning of the installation directories:
1226 --bindir=DIR user executables [EPREFIX/bin]
1227 --sbindir=DIR system admin executables [EPREFIX/sbin]
1228 --libexecdir=DIR program executables [EPREFIX/libexec]
1229 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1230 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1231 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1232 --libdir=DIR object code libraries [EPREFIX/lib]
1233 --includedir=DIR C header files [PREFIX/include]
1234 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1235 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1236 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1237 --infodir=DIR info documentation [DATAROOTDIR/info]
1238 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1239 --mandir=DIR man documentation [DATAROOTDIR/man]
1240 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1241 --htmldir=DIR html documentation [DOCDIR]
1242 --dvidir=DIR dvi documentation [DOCDIR]
1243 --pdfdir=DIR pdf documentation [DOCDIR]
1244 --psdir=DIR ps documentation [DOCDIR]
1245 _ACEOF
1247 cat <<\_ACEOF
1248 _ACEOF
1251 if test -n "$ac_init_help"; then
1253 cat <<\_ACEOF
1255 Optional Features:
1256 --disable-option-checking ignore unrecognized --enable/--with options
1257 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1258 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1259 --enable-error-checking enable error checking
1260 --enable-ampi-error-checking
1261 enable AMPI error checking
1262 --enable-stats enable statistics collection
1263 --enable-tracing enable tracing modules
1264 --enable-tracing-commthread
1265 enable tracing communication thread
1266 --enable-charmdebug enable charmDebug
1267 --enable-replay enable record/replay
1268 --enable-ccs enable CCS
1269 --enable-controlpoint enable control point
1270 --enable-lbuserdata enable LB user data
1271 --enable-shrinkexpand enable malleable jobs / shrink expand
1272 --enable-randomized-msgq
1273 enable a randomized msg queue (for debugging etc)
1275 Optional Packages:
1276 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1277 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1278 --with-numa support memory affinity with NUMA
1279 --with-lbtime-type=type load balancing timer type
1280 --with-qlogic QLogic based Infiniband
1281 --with-refnum-type=type size of the envelope refnum field
1282 --with-prio-type=type size of expected message priorities
1283 --with-metis support the METIS graph partitioner and associated
1284 load balancer
1286 Report bugs to the package provider.
1287 _ACEOF
1288 ac_status=$?
1291 if test "$ac_init_help" = "recursive"; then
1292 # If there are subdirs, report their specific --help.
1293 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1294 test -d "$ac_dir" ||
1295 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1296 continue
1297 ac_builddir=.
1299 case "$ac_dir" in
1300 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1302 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1303 # A ".." for each directory in $ac_dir_suffix.
1304 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1305 case $ac_top_builddir_sub in
1306 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1307 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1308 esac ;;
1309 esac
1310 ac_abs_top_builddir=$ac_pwd
1311 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1312 # for backward compatibility:
1313 ac_top_builddir=$ac_top_build_prefix
1315 case $srcdir in
1316 .) # We are building in place.
1317 ac_srcdir=.
1318 ac_top_srcdir=$ac_top_builddir_sub
1319 ac_abs_top_srcdir=$ac_pwd ;;
1320 [\\/]* | ?:[\\/]* ) # Absolute name.
1321 ac_srcdir=$srcdir$ac_dir_suffix;
1322 ac_top_srcdir=$srcdir
1323 ac_abs_top_srcdir=$srcdir ;;
1324 *) # Relative name.
1325 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1326 ac_top_srcdir=$ac_top_build_prefix$srcdir
1327 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1328 esac
1329 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1331 cd "$ac_dir" || { ac_status=$?; continue; }
1332 # Check for guested configure.
1333 if test -f "$ac_srcdir/configure.gnu"; then
1334 echo &&
1335 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1336 elif test -f "$ac_srcdir/configure"; then
1337 echo &&
1338 $SHELL "$ac_srcdir/configure" --help=recursive
1339 else
1340 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1341 fi || ac_status=$?
1342 cd "$ac_pwd" || { ac_status=$?; break; }
1343 done
1346 test -n "$ac_init_help" && exit $ac_status
1347 if $ac_init_version; then
1348 cat <<\_ACEOF
1349 configure
1350 generated by GNU Autoconf 2.69
1352 Copyright (C) 2012 Free Software Foundation, Inc.
1353 This configure script is free software; the Free Software Foundation
1354 gives unlimited permission to copy, distribute and modify it.
1355 _ACEOF
1356 exit
1359 ## ------------------------ ##
1360 ## Autoconf initialization. ##
1361 ## ------------------------ ##
1362 cat >config.log <<_ACEOF
1363 This file contains any messages produced by compilers while
1364 running configure, to aid debugging if configure makes a mistake.
1366 It was created by $as_me, which was
1367 generated by GNU Autoconf 2.69. Invocation command line was
1369 $ $0 $@
1371 _ACEOF
1372 exec 5>>config.log
1374 cat <<_ASUNAME
1375 ## --------- ##
1376 ## Platform. ##
1377 ## --------- ##
1379 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1380 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1381 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1382 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1383 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1385 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1386 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1388 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1389 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1390 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1391 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
1392 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1393 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1394 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1396 _ASUNAME
1398 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1399 for as_dir in $PATH
1401 IFS=$as_save_IFS
1402 test -z "$as_dir" && as_dir=.
1403 $as_echo "PATH: $as_dir"
1404 done
1405 IFS=$as_save_IFS
1407 } >&5
1409 cat >&5 <<_ACEOF
1412 ## ----------- ##
1413 ## Core tests. ##
1414 ## ----------- ##
1416 _ACEOF
1419 # Keep a trace of the command line.
1420 # Strip out --no-create and --no-recursion so they do not pile up.
1421 # Strip out --silent because we don't want to record it for future runs.
1422 # Also quote any args containing shell meta-characters.
1423 # Make two passes to allow for proper duplicate-argument suppression.
1424 ac_configure_args=
1425 ac_configure_args0=
1426 ac_configure_args1=
1427 ac_must_keep_next=false
1428 for ac_pass in 1 2
1430 for ac_arg
1432 case $ac_arg in
1433 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1434 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1435 | -silent | --silent | --silen | --sile | --sil)
1436 continue ;;
1437 *\'*)
1438 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1439 esac
1440 case $ac_pass in
1441 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
1443 as_fn_append ac_configure_args1 " '$ac_arg'"
1444 if test $ac_must_keep_next = true; then
1445 ac_must_keep_next=false # Got value, back to normal.
1446 else
1447 case $ac_arg in
1448 *=* | --config-cache | -C | -disable-* | --disable-* \
1449 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1450 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1451 | -with-* | --with-* | -without-* | --without-* | --x)
1452 case "$ac_configure_args0 " in
1453 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1454 esac
1456 -* ) ac_must_keep_next=true ;;
1457 esac
1459 as_fn_append ac_configure_args " '$ac_arg'"
1461 esac
1462 done
1463 done
1464 { ac_configure_args0=; unset ac_configure_args0;}
1465 { ac_configure_args1=; unset ac_configure_args1;}
1467 # When interrupted or exit'd, cleanup temporary files, and complete
1468 # config.log. We remove comments because anyway the quotes in there
1469 # would cause problems or look ugly.
1470 # WARNING: Use '\'' to represent an apostrophe within the trap.
1471 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1472 trap 'exit_status=$?
1473 # Save into config.log some information that might help in debugging.
1475 echo
1477 $as_echo "## ---------------- ##
1478 ## Cache variables. ##
1479 ## ---------------- ##"
1480 echo
1481 # The following way of writing the cache mishandles newlines in values,
1483 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1484 eval ac_val=\$$ac_var
1485 case $ac_val in #(
1486 *${as_nl}*)
1487 case $ac_var in #(
1488 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
1489 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
1490 esac
1491 case $ac_var in #(
1492 _ | IFS | as_nl) ;; #(
1493 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
1494 *) { eval $ac_var=; unset $ac_var;} ;;
1495 esac ;;
1496 esac
1497 done
1498 (set) 2>&1 |
1499 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1500 *${as_nl}ac_space=\ *)
1501 sed -n \
1502 "s/'\''/'\''\\\\'\'''\''/g;
1503 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1504 ;; #(
1506 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
1508 esac |
1509 sort
1511 echo
1513 $as_echo "## ----------------- ##
1514 ## Output variables. ##
1515 ## ----------------- ##"
1516 echo
1517 for ac_var in $ac_subst_vars
1519 eval ac_val=\$$ac_var
1520 case $ac_val in
1521 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1522 esac
1523 $as_echo "$ac_var='\''$ac_val'\''"
1524 done | sort
1525 echo
1527 if test -n "$ac_subst_files"; then
1528 $as_echo "## ------------------- ##
1529 ## File substitutions. ##
1530 ## ------------------- ##"
1531 echo
1532 for ac_var in $ac_subst_files
1534 eval ac_val=\$$ac_var
1535 case $ac_val in
1536 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1537 esac
1538 $as_echo "$ac_var='\''$ac_val'\''"
1539 done | sort
1540 echo
1543 if test -s confdefs.h; then
1544 $as_echo "## ----------- ##
1545 ## confdefs.h. ##
1546 ## ----------- ##"
1547 echo
1548 cat confdefs.h
1549 echo
1551 test "$ac_signal" != 0 &&
1552 $as_echo "$as_me: caught signal $ac_signal"
1553 $as_echo "$as_me: exit $exit_status"
1554 } >&5
1555 rm -f core *.core core.conftest.* &&
1556 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
1557 exit $exit_status
1559 for ac_signal in 1 2 13 15; do
1560 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
1561 done
1562 ac_signal=0
1564 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1565 rm -f -r conftest* confdefs.h
1567 $as_echo "/* confdefs.h */" > confdefs.h
1569 # Predefined preprocessor variables.
1571 cat >>confdefs.h <<_ACEOF
1572 #define PACKAGE_NAME "$PACKAGE_NAME"
1573 _ACEOF
1575 cat >>confdefs.h <<_ACEOF
1576 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1577 _ACEOF
1579 cat >>confdefs.h <<_ACEOF
1580 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1581 _ACEOF
1583 cat >>confdefs.h <<_ACEOF
1584 #define PACKAGE_STRING "$PACKAGE_STRING"
1585 _ACEOF
1587 cat >>confdefs.h <<_ACEOF
1588 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1589 _ACEOF
1591 cat >>confdefs.h <<_ACEOF
1592 #define PACKAGE_URL "$PACKAGE_URL"
1593 _ACEOF
1596 # Let the site file select an alternate cache file if it wants to.
1597 # Prefer an explicitly selected file to automatically selected ones.
1598 ac_site_file1=NONE
1599 ac_site_file2=NONE
1600 if test -n "$CONFIG_SITE"; then
1601 # We do not want a PATH search for config.site.
1602 case $CONFIG_SITE in #((
1603 -*) ac_site_file1=./$CONFIG_SITE;;
1604 */*) ac_site_file1=$CONFIG_SITE;;
1605 *) ac_site_file1=./$CONFIG_SITE;;
1606 esac
1607 elif test "x$prefix" != xNONE; then
1608 ac_site_file1=$prefix/share/config.site
1609 ac_site_file2=$prefix/etc/config.site
1610 else
1611 ac_site_file1=$ac_default_prefix/share/config.site
1612 ac_site_file2=$ac_default_prefix/etc/config.site
1614 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
1616 test "x$ac_site_file" = xNONE && continue
1617 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
1618 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
1619 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
1620 sed 's/^/| /' "$ac_site_file" >&5
1621 . "$ac_site_file" \
1622 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
1623 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1624 as_fn_error $? "failed to load site script $ac_site_file
1625 See \`config.log' for more details" "$LINENO" 5; }
1627 done
1629 if test -r "$cache_file"; then
1630 # Some versions of bash will fail to source /dev/null (special files
1631 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
1632 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
1633 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
1634 $as_echo "$as_me: loading cache $cache_file" >&6;}
1635 case $cache_file in
1636 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1637 *) . "./$cache_file";;
1638 esac
1640 else
1641 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
1642 $as_echo "$as_me: creating cache $cache_file" >&6;}
1643 >$cache_file
1646 # Check that the precious variables saved in the cache have kept the same
1647 # value.
1648 ac_cache_corrupted=false
1649 for ac_var in $ac_precious_vars; do
1650 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1651 eval ac_new_set=\$ac_env_${ac_var}_set
1652 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1653 eval ac_new_val=\$ac_env_${ac_var}_value
1654 case $ac_old_set,$ac_new_set in
1655 set,)
1656 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1657 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1658 ac_cache_corrupted=: ;;
1659 ,set)
1660 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
1661 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1662 ac_cache_corrupted=: ;;
1663 ,);;
1665 if test "x$ac_old_val" != "x$ac_new_val"; then
1666 # differences in whitespace do not lead to failure.
1667 ac_old_val_w=`echo x $ac_old_val`
1668 ac_new_val_w=`echo x $ac_new_val`
1669 if test "$ac_old_val_w" != "$ac_new_val_w"; then
1670 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
1671 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1672 ac_cache_corrupted=:
1673 else
1674 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
1675 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
1676 eval $ac_var=\$ac_old_val
1678 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
1679 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
1680 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
1681 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
1682 fi;;
1683 esac
1684 # Pass precious variables to config.status.
1685 if test "$ac_new_set" = set; then
1686 case $ac_new_val in
1687 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1688 *) ac_arg=$ac_var=$ac_new_val ;;
1689 esac
1690 case " $ac_configure_args " in
1691 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1692 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
1693 esac
1695 done
1696 if $ac_cache_corrupted; then
1697 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
1698 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1699 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
1700 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1701 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
1703 ## -------------------- ##
1704 ## Main body of script. ##
1705 ## -------------------- ##
1707 ac_ext=c
1708 ac_cpp='$CPP $CPPFLAGS'
1709 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1710 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1711 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1715 ac_config_headers="$ac_config_headers conv-autoconfig.h"
1718 ac_config_commands="$ac_config_commands config-cleanup"
1721 #clean up conv-mach-opt.sh
1722 sed -e '/Option added by configure/d' ../include/conv-mach-opt.sh | sed -e '/^$/d' > conv-mach-opt.sh.clean
1723 cp -f conv-mach-opt.sh.clean ../include/conv-mach-opt.sh
1724 rm -f conv-mach-opt.sh.clean
1726 CHARMINC="."
1727 CHARMBIN="../bin"
1728 test -r ./conv-config.sh && . ./conv-config.sh
1730 # Decimal representation of Charm++ release line and API revision
1731 # Increment the last 2 digits when making an API change
1732 # Increase the first three after branching for a release
1733 VERSION=60800
1734 echo $VERSION > ../include/VERSION
1736 cat >>confdefs.h <<_ACEOF
1737 #define CHARM_VERSION $VERSION
1738 _ACEOF
1741 charmout="charmconfig.out"
1742 /bin/rm -rf $charmout
1743 MAKEFILE_EXT=Make.extlib
1745 Echo() {
1746 echo $*
1747 echo $* >> $charmout
1750 # add into conv-mach-opt.sh
1751 # add_flag $1 $2
1752 # $2 is description
1753 add_flag() {
1754 key=`echo $1 | cut -d'=' -f1`
1755 last=`grep "$key=" ../include/conv-mach-opt.sh 2>/dev/null | tail -1 | sed -e 's/ *#.*$//'`
1756 skip=0
1757 if test -n "$last" -a "$last" = "$1"
1758 then
1759 skip=1
1761 if test $skip = 0
1762 then
1763 cat >> ../include/conv-mach-opt.sh << EOT
1765 $1 # Option added by configure script's $2 section
1770 # remove_flag $1
1771 remove_flag() {
1772 sed -e '/^'"$1"'=/d' ../include/conv-mach-opt.sh > tmp.$$
1773 cp tmp.$$ ../include/conv-mach-opt.sh
1774 /bin/rm -f tmp.$$
1777 # enable/disable error checking
1778 # Check whether --enable-error-checking was given.
1779 if test "${enable_error_checking+set}" = set; then :
1780 enableval=$enable_error_checking;
1781 else
1782 enable_error_checking=yes
1786 if test "$enable_error_checking" = "no"
1787 then
1788 Echo "Error checking is disabled"
1790 cat >>confdefs.h <<_ACEOF
1791 #define CMK_ERROR_CHECKING 0
1792 _ACEOF
1794 add_flag 'OPTS_CC="$OPTS_CC -U_FORTIFY_SOURCE"' 'error checking'
1795 add_flag 'OPTS_CXX="$OPTS_CXX -U_FORTIFY_SOURCE"' 'error checking'
1796 else
1797 Echo "Error checking is enabled"
1799 cat >>confdefs.h <<_ACEOF
1800 #define CMK_ERROR_CHECKING 1
1801 _ACEOF
1805 # enable/disable AMPI error checking
1806 # Check whether --enable-ampi-error-checking was given.
1807 if test "${enable_ampi_error_checking+set}" = set; then :
1808 enableval=$enable_ampi_error_checking;
1809 else
1810 enable_ampi_error_checking=yes
1814 if test "$enable_ampi_error_checking" = "no"
1815 then
1816 Echo "AMPI error checking is disabled"
1818 cat >>confdefs.h <<_ACEOF
1819 #define AMPI_ERROR_CHECKING 0
1820 _ACEOF
1822 else
1823 Echo "AMPI error checking is enabled"
1825 cat >>confdefs.h <<_ACEOF
1826 #define AMPI_ERROR_CHECKING 1
1827 _ACEOF
1831 # enable/disable statistics collection
1832 # Check whether --enable-stats was given.
1833 if test "${enable_stats+set}" = set; then :
1834 enableval=$enable_stats;
1835 else
1836 enable_stats=yes
1840 if test "$enable_stats" = "no"
1841 then
1842 Echo "Statistics collection is disabled"
1844 cat >>confdefs.h <<_ACEOF
1845 #define CMK_WITH_STATS 0
1846 _ACEOF
1848 else
1849 Echo "Statistics collection is enabled"
1851 cat >>confdefs.h <<_ACEOF
1852 #define CMK_WITH_STATS 1
1853 _ACEOF
1857 # check enable/disable
1858 # Check whether --enable-tracing was given.
1859 if test "${enable_tracing+set}" = set; then :
1860 enableval=$enable_tracing;
1861 else
1862 enable_tracing=yes
1866 if test "$enable_tracing" = "no"
1867 then
1868 Echo "Charm tracing is disabled"
1870 cat >>confdefs.h <<_ACEOF
1871 #define CMK_TRACE_ENABLED 0
1872 _ACEOF
1874 add_flag CMK_TRACE_ENABLED=0
1875 else
1876 Echo "Charm tracing is enabled"
1878 cat >>confdefs.h <<_ACEOF
1879 #define CMK_TRACE_ENABLED 1
1880 _ACEOF
1882 add_flag CMK_TRACE_ENABLED=1
1885 # Check whether --enable-tracing-commthread was given.
1886 if test "${enable_tracing_commthread+set}" = set; then :
1887 enableval=$enable_tracing_commthread;
1888 else
1889 enable_tracing_commthread=no
1893 if test "$enable_tracing_commthread" = "yes"
1894 then
1895 Echo "Charm tracing communication thread is enabled"
1897 cat >>confdefs.h <<_ACEOF
1898 #define CMK_SMP_TRACE_COMMTHREAD 1
1899 _ACEOF
1901 else
1902 Echo "Charm tracing communication thread is disabled"
1904 cat >>confdefs.h <<_ACEOF
1905 #define CMK_SMP_TRACE_COMMTHREAD 0
1906 _ACEOF
1911 # Check whether --enable-charmdebug was given.
1912 if test "${enable_charmdebug+set}" = set; then :
1913 enableval=$enable_charmdebug;
1914 else
1915 enable_charmdebug=yes
1919 if test "$enable_charmdebug" = "no"
1920 then
1921 Echo "CharmDebug is disabled"
1923 cat >>confdefs.h <<_ACEOF
1924 #define CMK_CHARMDEBUG 0
1925 _ACEOF
1927 add_flag CMK_CHARMDEBUG=0
1928 else
1929 Echo "CharmDebug is enabled"
1931 cat >>confdefs.h <<_ACEOF
1932 #define CMK_CHARMDEBUG 1
1933 _ACEOF
1935 add_flag CMK_CHARMDEBUG=1
1938 # Check whether --enable-replay was given.
1939 if test "${enable_replay+set}" = set; then :
1940 enableval=$enable_replay; enable_replay=$enableval
1941 else
1942 enable_replay=yes
1946 if test "$enable_replay" = "no"
1947 then
1948 Echo "Charm record/replay is disabled"
1950 cat >>confdefs.h <<_ACEOF
1951 #define CMK_REPLAYSYSTEM 0
1952 _ACEOF
1954 else
1955 Echo "Charm record/replay is enabled"
1958 # Check whether --enable-ccs was given.
1959 if test "${enable_ccs+set}" = set; then :
1960 enableval=$enable_ccs;
1961 else
1962 enable_ccs=yes
1966 if test "$enable_ccs" = "no"
1967 then
1968 Echo "CCS is disabled"
1970 cat >>confdefs.h <<_ACEOF
1971 #define CMK_CCS_AVAILABLE 0
1972 _ACEOF
1974 else
1975 Echo "CCS is enabled"
1977 cat >>confdefs.h <<_ACEOF
1978 #define CMK_CCS_AVAILABLE 1
1979 _ACEOF
1983 # Check whether --enable-controlpoint was given.
1984 if test "${enable_controlpoint+set}" = set; then :
1985 enableval=$enable_controlpoint; enable_controlpoint=$enableval
1986 else
1987 enable_controlpoint=yes
1991 if test "$enable_controlpoint" = "yes"
1992 then
1993 Echo "Charm control point is enabled"
1995 cat >>confdefs.h <<_ACEOF
1996 #define CMK_WITH_CONTROLPOINT 1
1997 _ACEOF
1999 else
2000 Echo "Charm control point is disabled"
2002 cat >>confdefs.h <<_ACEOF
2003 #define CMK_WITH_CONTROLPOINT 0
2004 _ACEOF
2008 # Check whether --enable-lbuserdata was given.
2009 if test "${enable_lbuserdata+set}" = set; then :
2010 enableval=$enable_lbuserdata; enable_lbuserdata=$enableval
2011 else
2012 enable_lbuserdata=no
2016 if test "$enable_lbuserdata" = "yes"
2017 then
2018 Echo "Charm LB user data is enabled"
2020 cat >>confdefs.h <<_ACEOF
2021 #define CMK_LB_USER_DATA 1
2022 _ACEOF
2024 else
2025 Echo "Charm LB user data is disabled"
2027 cat >>confdefs.h <<_ACEOF
2028 #define CMK_LB_USER_DATA 0
2029 _ACEOF
2033 # Check whether --enable-shrinkexpand was given.
2034 if test "${enable_shrinkexpand+set}" = set; then :
2035 enableval=$enable_shrinkexpand; enable_shrinkexpand=$enableval
2036 else
2037 enable_shrinkexpand=no
2041 if test "$enable_shrinkexpand" = "yes"
2042 then
2043 if test "$enable_ccs" = "no"
2044 then
2045 Echo "CCS cannot be disabled when enabling shrink-expand"
2046 test_finish 1
2047 else
2048 Echo "Charm shrink expand is enabled - Controlpoint is disabled."
2050 cat >>confdefs.h <<_ACEOF
2051 #define CMK_SHRINK_EXPAND 1
2052 _ACEOF
2055 cat >>confdefs.h <<_ACEOF
2056 #define CMK_WITH_CONTROLPOINT 0
2057 _ACEOF
2060 else
2061 Echo "Charm shrink expand is disabled"
2063 cat >>confdefs.h <<_ACEOF
2064 #define CMK_SHRINK_EXPAND 0
2065 _ACEOF
2070 # Check whether --with-numa was given.
2071 if test "${with_numa+set}" = set; then :
2072 withval=$with_numa;
2073 else
2074 with_numa=no
2078 WITH_NUMA=no
2079 if test "$with_numa" = "yes"
2080 then
2081 Echo "Charm NUMA support is builtin"
2082 WITH_NUMA=yes
2086 # Check whether --with-lbtime-type was given.
2087 if test "${with_lbtime_type+set}" = set; then :
2088 withval=$with_lbtime_type;
2089 else
2090 with_lbtime_type=double
2094 if test "$with_lbtime_type" = "float" -o "$with_lbtime_type" = "double"
2095 then
2096 Echo "Setting load balancing timer type as '$with_lbtime_type'"
2098 cat >>confdefs.h <<_ACEOF
2099 #define CMK_LBTIME_TYPE $with_lbtime_type
2100 _ACEOF
2102 else
2103 Echo "Invalid type specified for load balancing timer type"
2104 test_finish 1
2108 # Check whether --with-qlogic was given.
2109 if test "${with_qlogic+set}" = set; then :
2110 withval=$with_qlogic; with_qlogic=yes
2111 else
2112 with_qlogic=no
2116 if test "$with_qlogic" = "no"
2117 then
2119 cat >>confdefs.h <<_ACEOF
2120 #define QLOGIC 0
2121 _ACEOF
2123 else
2124 Echo "QLogic based Infiniband"
2126 cat >>confdefs.h <<_ACEOF
2127 #define QLOGIC 1
2128 _ACEOF
2133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking machine name" >&5
2134 $as_echo_n "checking machine name... " >&6; }
2135 version=`pwd | awk -F/ '{print $(NF-1)}'`
2136 base_version=`cat .vdir`
2138 cat >>confdefs.h <<_ACEOF
2139 #define CMK_MACHINE_NAME "$version"
2140 _ACEOF
2142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $version" >&5
2143 $as_echo "$version" >&6; }
2146 t="test.cpp"
2147 tc="test.c"
2149 # test result passed in $1
2150 # If the test suceeded, print $3 and set "pass"/clear "fail"
2151 # If the test failed, print $2 and clear "pass"/set "fail"
2152 test_result() {
2153 if test $1 -eq 0
2154 then
2155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$3\"" >&5
2156 $as_echo "\"$3\"" >&6; }
2157 pass="1"
2158 fail="0"
2159 else
2160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$4\"" >&5
2161 $as_echo "\"$4\"" >&6; }
2162 pass="0"
2163 fail="1"
2164 # For debugging the configure script, just "export autoconf_debug=1"
2165 # to get this verbose data on any failed tests:
2166 if test ! -z "$autoconf_debug"
2167 then
2168 echo "------- test script for $2 failed:"
2169 cat out
2170 echo "------- the test program was:"
2171 cat $t
2172 echo "-------"
2177 # Test: tries to compile C file $t (described by $1).
2178 # If successful, prints $2 and sets $pass/clears $fail
2179 # If failure, prints $3 and sets $pass/clears $fail
2180 # additional arguments to c++ compiler are passed as $4
2181 test_cc() {
2182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking \"$1\"" >&5
2183 $as_echo_n "checking \"$1\"... " >&6; }
2184 echo "### $1" >> $charmout
2185 cat $tc >> $charmout
2186 echo $CMK_CC -I../include -I. $CMK_LIBDIR $CMK_INCDIR $CMK_SYSINC $OPTS_CC $OPTS_LD -c $tc -o test.o $4 >> $charmout
2187 $CMK_CC -I../include -I. $CMK_LIBDIR $CMK_INCDIR $CMK_SYSINC $OPTS_CC $OPTS_LD -c $tc -o test.o $4 > out 2>&1
2188 test_result $? "$1" "$2" "$3"
2189 strictpass=$pass
2190 strictfail=$fail
2191 if test $pass -eq 1
2192 then
2193 if grep -i "warn" out > /dev/null 2>&1 || grep -i "(W)" out > /dev/null 2>&1
2194 then
2195 strictpass="0" && strictfail="1"
2198 cat out >> $charmout
2199 /bin/rm -f out
2202 # Test: tries to compile C++ file $t (described by $1).
2203 # If successful, prints $2 and sets $pass/clears $fail
2204 # If failure, prints $3 and sets $pass/clears $fail
2205 # additional arguments to c++ compiler are passed as $4
2206 test_cxx() {
2207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking \"$1\"" >&5
2208 $as_echo_n "checking \"$1\"... " >&6; }
2209 echo "### $1" >> $charmout
2210 cat $t >> $charmout
2211 echo $CMK_CXX -I../include -I. $CMK_LIBDIR $CMK_INCDIR $CMK_SYSINC $OPTS_CXX $OPTS_LD -c $t -o test.o $4 >> $charmout
2212 $CMK_CXX -I../include -I. $CMK_LIBDIR $CMK_INCDIR $CMK_SYSINC $OPTS_CXX $OPTS_LD -c $t -o test.o $4 > out 2>&1
2213 test_result $? "$1" "$2" "$3"
2214 strictpass=$pass
2215 strictfail=$fail
2216 if test $pass -eq 1
2217 then
2218 if grep -i "warn" out > /dev/null 2>&1 || grep -i "(W)" out > /dev/null 2>&1
2219 then
2220 strictpass="0" && strictfail="1"
2223 cat out >> $charmout
2224 /bin/rm -f out
2227 # Testlink: tries to compile and link a C++ file $t (described by $1).
2228 # If successful, prints $2 and sets $pass/clears $fail
2229 # If failure, prints $3 and sets $pass/clears $fail
2230 # additional arguments to c++ compiler are passed as $4
2231 test_link() {
2232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking \"$1\"" >&5
2233 $as_echo_n "checking \"$1\"... " >&6; }
2234 echo "### $1" >> $charmout
2235 cat $t >> $charmout
2236 echo $CMK_CXX -I../include -I. $CMK_INCDIR $CMK_SYSINC $OPTS_CXX -c $t -o test.o $4 >> $charmout
2237 $CMK_CXX -I../include -I. $CMK_INCDIR $CMK_SYSINC $OPTS_CXX -c $t -o test.o $4 > out 2>&1
2238 if test $? -ne 0
2239 then
2240 test_result 1 "$1" "$2" "$3"
2241 else
2242 echo $CMK_LDXX -o testlink test.o $CMK_LIBDIR $OPTS_LD $CMK_SYSLIBS $4 >> $charmout
2243 $CMK_LDXX -o testlink test.o $CMK_LIBDIR $OPTS_LD $CMK_SYSLIBS $4 >> out 2>&1
2244 ret=$?
2245 test ! -x testlink && ret=1
2246 test_result $ret "$1" "$2" "$3"
2248 strictpass=$pass
2249 strictfail=$fail
2250 if test $pass -eq 1
2251 then
2252 if cat out | grep -i "warn" > /dev/null 2>&1
2253 then
2254 strictpass="0" && strictfail="1"
2257 cat out >> $charmout
2258 /bin/rm -f out
2261 # Testlinkc: tries to compile and link a C file $t (described by $1).
2262 # If successful, prints $2 and sets $pass/clears $fail
2263 # If failure, prints $3 and sets $pass/clears $fail
2264 # additional arguments to c++ compiler are passed as $4
2265 test_linkc() {
2266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking \"$1\"" >&5
2267 $as_echo_n "checking \"$1\"... " >&6; }
2268 echo "### $1" >> $charmout
2269 cat $tc >> $charmout
2270 echo $CMK_CC -I../include -I. $CMK_INCDIR $CMK_SYSINC $OPTS_CC -c $tc -o test.o $4 >> $charmout
2271 $CMK_CC -I../include -I. $CMK_INCDIR $CMK_SYSINC $OPTS_CC -c $tc -o test.o $4 > out 2>&1
2272 if test $? -ne 0
2273 then
2274 test_result 1 "$1" "$2" "$3"
2275 else
2276 echo $CMK_LD -o testlink test.o $CMK_LIBDIR $OPTS_LD $CMK_SYSLIBS $4 >> $charmout
2277 $CMK_LD -o testlink test.o $CMK_LIBDIR $OPTS_LD $CMK_SYSLIBS $4 >> out 2>&1
2278 test_result $? "$1" "$2" "$3"
2280 strictpass=$pass
2281 strictfail=$fail
2282 if test $pass -eq 1
2283 then
2284 if cat out | grep -i "warn" > /dev/null 2>&1
2285 then
2286 strictpass="0" && strictfail="1"
2289 cat out >> $charmout
2290 /bin/rm -f out
2293 # test_linkso $1 $2 $3 $4, where
2294 # $1: debug msg
2295 # $2: yes msg
2296 # $3: no msg
2297 # $4: extra link option
2298 test_linkso() {
2299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking \"$1\"" >&5
2300 $as_echo_n "checking \"$1\"... " >&6; }
2301 echo $1 >> $charmout
2302 cat $t >> $charmout
2303 echo $CMK_CXX -I../include -I. $CMK_INCDIR $CMK_SYSINC $OPTS_CXX $CMK_PIC -c $t -o test.o $4 >> $charmout
2304 $CMK_CXX -I../include -I. $CMK_INCDIR $CMK_SYSINC $OPTS_CXX -c $CMK_PIC $t -o test.o $4 > out 2>&1
2305 if test $? = 1
2306 then
2307 test_result 1 "$1" "$2" "$3"
2308 else
2309 echo $CMK_LD -I../include -I. $CMK_LIBDIR $OPTS_LD $CMK_LD_SHARED $CMK_SYSLIBS test.o -o testlink.$CMK_SHARED_SUF $4 >> $charmout
2310 $CMK_LD -I../include -I. $CMK_LIBDIR $OPTS_LD $CMK_LD_SHARED $CMK_SYSLIBS test.o -o testlink.$CMK_SHARED_SUF $4 > out 2>&1
2311 test_result $? "$1" "$2" "$3"
2313 cat out >> $charmout
2314 /bin/rm -f out testlink.$CMK_SHARED_SUF
2317 test_finish() {
2318 rm -f $t $tc testlink test.o > /dev/null 2>&1
2319 /bin/rm -f out
2320 test $1 -eq 1 && echo "*** Please find detailed output in charmconfig.out ***"
2321 exit $1
2324 # detect certain architectures
2325 if cat /proc/cpuinfo 2>/dev/null | grep 'POWER7' > /dev/null
2326 then
2328 cat >>confdefs.h <<_ACEOF
2329 #define CMK_POWER7 1
2330 _ACEOF
2334 # detect OS
2335 OSNAME=`uname -s`
2336 if test $OSNAME = "Linux"
2337 then
2339 cat >>confdefs.h <<_ACEOF
2340 #define CMK_OS_IS_LINUX 1
2341 _ACEOF
2343 else
2345 cat >>confdefs.h <<_ACEOF
2346 #define CMK_OS_IS_LINUX 0
2347 _ACEOF
2351 # test cp -p
2352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking \"cp command as\"" >&5
2353 $as_echo_n "checking \"cp command as\"... " >&6; }
2354 CP="cp -p"
2355 touch test_file
2356 if ! $CP test_file test_file.cp 2>err
2357 then
2358 CP="cp"
2360 rm -f test_file test_file.cp
2361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
2362 $as_echo "$CP" >&6; }
2363 add_flag CP=\""$CP"\" "cp command"
2366 cat > $t <<EOT
2367 #include <stdio.h>
2368 void foo(void) {
2369 printf("Hello, world!\n");
2373 if test "$CMK_BUILD_CRAY" = "1"
2374 then
2375 #echo "Test for known incompatible compiler versions"
2377 if test "$CRAY_CC_VERSION" = "8.1.4"
2378 then
2379 echo "CCE 8.1.4 produces incorrect Charm++ code"
2380 echo "Please use a newer version of the CCE compiler"
2381 echo "e.g. module load cce/8.1.7"
2382 test_finish 1
2386 #echo "set C++ compiler as: $CMK_CXX $OPTS_CXX $OPTS"
2387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking \"C++ compiler as\"" >&5
2388 $as_echo_n "checking \"C++ compiler as\"... " >&6; }
2389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$CMK_CXX $OPTS_CXX\"" >&5
2390 $as_echo "\"$CMK_CXX $OPTS_CXX\"" >&6; }
2391 test_cxx "whether C++ compiler works" "ok" "no" ""
2392 if test $fail -eq 1
2393 then
2394 echo "Cannot compile C++ programs with $CMK_CXX"
2395 echo " (check your charm++ version)"
2396 test_finish 1
2399 cat > $t <<EOT
2400 #include <stdio.h>
2401 int main() {
2402 printf("Hello, world!\n");
2403 return 0;
2406 #echo "set C++ linker as: $CMK_LDXX $OPTS_LDXX"
2407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking \"C++ linker as\"" >&5
2408 $as_echo_n "checking \"C++ linker as\"... " >&6; }
2409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$CMK_LDXX $OPTS_LDXX\"" >&5
2410 $as_echo "\"$CMK_LDXX $OPTS_LDXX\"" >&6; }
2411 test_link "whether linker works" "ok" "no" ""
2412 if test $fail -eq 1
2413 then
2414 echo "Cannot link C++ programs with $CMK_LDXX"
2415 echo " (check your charm++ version)"
2416 test_finish 1
2419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking \"Native C++ compiler as\"" >&5
2420 $as_echo_n "checking \"Native C++ compiler as\"... " >&6; }
2421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$CMK_NATIVE_CXX\"" >&5
2422 $as_echo "\"$CMK_NATIVE_CXX\"" >&6; }
2423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking \"Sequential C++ compiler as\"" >&5
2424 $as_echo_n "checking \"Sequential C++ compiler as\"... " >&6; }
2425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$CMK_SEQ_CXX\"" >&5
2426 $as_echo "\"$CMK_SEQ_CXX\"" >&6; }
2428 if test "$base_version" = "net-linux"
2429 then
2430 test_link "whether linker accept --allow-multiple-definition" "ok" "no" "-Wl,--allow-multiple-definition"
2431 if test $pass -eq 1
2432 then
2433 remove_flag CMK_LDXX
2434 add_flag CMK_LDXX='"$CMK_LDXX -Wl,--allow-multiple-definition"' "net-linux linker"
2438 if echo "$CMK_CC" | grep -E "gcc|clang|icc" > /dev/null 2> /dev/null
2439 then
2440 test_link "whether compiler accept -fno-stack-protector" "ok" "no" "-fno-stack-protector"
2441 if test $strictpass -eq 1
2442 then
2443 add_flag OPTS_CC='"$OPTS_CC -fno-stack-protector"' "stack-protection disabling"
2444 add_flag OPTS_CXX='"$OPTS_CXX -fno-stack-protector"' "stack-protection disabling"
2448 #### check if C++ compiler will accept C++11 features without warning ####
2449 # C++11 features in use:
2450 # early variadic templates
2451 # R-value and move semantics
2452 # auto
2453 cat > $t <<EOT
2454 class CkMigrateMessage;
2456 struct base {
2457 base(void) { }
2458 base(CkMigrateMessage *) { }
2461 template <class Parent>
2462 struct CBaseT1 : Parent {
2464 CBaseT1(void) :Parent() { }
2465 CBaseT1(CkMigrateMessage *m) :Parent(m) { }
2466 CBaseT1(CBaseT1&& rhs) :Parent() { }
2468 template <typename... Args>
2469 CBaseT1(Args... args) : Parent(args...) { }
2472 template struct CBaseT1<base>;
2474 got_cpp11=""
2475 test_cxx "whether C++ compiler supports C++11 without flags" "yes" "no" ""
2476 if test $strictpass -eq 1
2477 then
2478 got_cpp11="true"
2479 else
2480 # Flags for g++/clang++/icc(icpc), xlC++, pgCC, and CrayCC respectively
2481 for i in "-std=c++0x" "-qlanglvl=extended0x" "--c++11" "-h std=c++11"; do
2482 test_cxx "whether C++ compiler supports C++11 with '$i'" "yes" "no" "$i"
2483 if test $strictpass -eq 1
2484 then
2485 add_flag "$(echo OPTS_CXX=\"\$OPTS_CXX $i\")" "Enable C++11 support"
2486 OPTS_CXX="$OPTS_CXX $i"
2487 got_cpp11="true"
2488 break
2490 done
2493 if test -z $got_cpp11
2494 then
2495 echo "Charm++ requires some C++11 support, but doesn't know the flag to enable it"
2496 test_finish 1
2499 # Workaround for bug #1045 appearing in GCC >6.x
2500 test_cxx "whether C++ compiler accepts -fno-lifetime-dse" "yes" "no" "-fno-lifetime-dse"
2501 if test $strictpass -eq 1
2502 then
2503 add_flag "$(echo OPTS_CXX=\"\$OPTS_CXX -fno-lifetime-dse\")" "Disable 'Lifetime DSE' optimization to work around bug #1045 in GCC >6.x"
2504 OPTS_CXX="$OPTS_CXX -fno-lifetime-dse"
2507 # Figure out if the user has asked to enable the latest language standards
2508 USER_ASKED_FOR_NEW_STD=`echo "$BUILDOPTS" | grep "-use-new-std" | wc -l`
2510 # If the user has asked for the newer standards, check if the compilers know about them
2511 if test $USER_ASKED_FOR_NEW_STD -ge 1
2512 then
2514 #### check if c compiler supports c11 compilation flags ####
2515 cat > $tc <<EOT
2516 #include <stdio.h>
2518 int foo()
2520 return 0;
2523 test_cc "whether c compiler knows of the c11 standard" "ok" "no" "$CMK_ENABLE_C11"
2525 cat >>confdefs.h <<_ACEOF
2526 #define CMK_COMPILER_KNOWS_C11 $pass
2527 _ACEOF
2529 if test $pass -eq 1
2530 then
2531 # Record results for charmc's future use
2532 add_flag 'CMK_COMPILER_KNOWS_C11="1"' "c11"
2533 # For the rest of configure, append this to compilation flags
2534 OPTS_CC="$CMK_ENABLE_C11 $OPTS_CC"
2537 #### check if C++ compiler supports cpp11 compilation flags ####
2538 cat > $t <<EOT
2539 #include <iostream>
2541 int foo()
2543 return 0;
2546 test_cxx "whether c++ compiler knows of the cpp11 standard" "ok" "no" "$CMK_ENABLE_CPP11"
2548 cat >>confdefs.h <<_ACEOF
2549 #define CMK_COMPILER_KNOWS_CPP11 $pass
2550 _ACEOF
2552 if test $pass -eq 1
2553 then
2554 # Record results for charmc's future use
2555 add_flag 'CMK_COMPILER_KNOWS_CPP11="1"' "cpp11"
2556 # For the rest of configure, append this to compilation flags
2557 OPTS_CXX="$CMK_ENABLE_CPP11 $OPTS_CXX"
2560 fi # endif USER_ASKED_FOR_NEW_STD
2563 # Perform the tests
2566 # Check whether --with-refnum-type was given.
2567 if test "${with_refnum_type+set}" = set; then :
2568 withval=$with_refnum_type;
2569 else
2570 with_refnum_type=no
2574 if test "$with_refnum_type" = "no" -o "$with_refnum_type" = "short"
2575 then
2576 Echo "Setting charm++ envelope refnum field to unsigned short"
2578 cat >>confdefs.h <<_ACEOF
2579 #define CMK_REFNUM_TYPE unsigned short
2580 _ACEOF
2582 elif test "$with_refnum_type" = "int"
2583 then
2584 Echo "Setting charm++ envelope refnum field to unsigned int"
2586 cat >>confdefs.h <<_ACEOF
2587 #define CMK_REFNUM_TYPE unsigned int
2588 _ACEOF
2590 else
2591 Echo "Invalid size specified for refnum field"
2592 test_finish 1
2597 # Check whether --with-prio-type was given.
2598 if test "${with_prio_type+set}" = set; then :
2599 withval=$with_prio_type;
2600 else
2601 with_prio_type=bitvec
2605 if test "$with_prio_type" = "char" -o "$with_prio_type" = "short" -o "$with_prio_type" = "int" -o "$with_prio_type" = "long" -o "$with_prio_type" = "float" -o "$with_prio_type" = "double"
2606 then
2607 Echo "Configuring support for message priorities of sizeof type $with_prio_type"
2609 cat >>confdefs.h <<_ACEOF
2610 #define CMK_USE_STL_MSGQ 1
2611 _ACEOF
2614 cat >>confdefs.h <<_ACEOF
2615 #define CMK_MSG_PRIO_TYPE $with_prio_type
2616 _ACEOF
2618 elif test "$with_prio_type" = "bitvec"
2619 then
2620 Echo "Configuring support for message priorities of arbitrary size (bitvectors)"
2622 cat >>confdefs.h <<_ACEOF
2623 #define CMK_USE_STL_MSGQ 0
2624 _ACEOF
2627 cat >>confdefs.h <<_ACEOF
2628 #define CMK_MSG_PRIO_TYPE $with_prio_type
2629 _ACEOF
2631 else
2632 Echo "Invalid size ($with_prio_type) specified for message priorities. Can only accept char, short, int, long, float, double and bitvec"
2633 test_finish 1
2636 # enable/disable randomized scheduler queue
2637 # Check whether --enable-randomized-msgq was given.
2638 if test "${enable_randomized_msgq+set}" = set; then :
2639 enableval=$enable_randomized_msgq;
2640 else
2641 enable_randomized_msgq=no
2645 if test "$enable_randomized_msgq" = "yes" -a "$with_prio_type" != "bitvec"
2646 then
2647 Echo "The charm message queue will be randomized (and will not respect priorities)"
2649 cat >>confdefs.h <<_ACEOF
2650 #define CMK_RANDOMIZED_MSGQ 1
2651 _ACEOF
2653 else
2655 cat >>confdefs.h <<_ACEOF
2656 #define CMK_RANDOMIZED_MSGQ 0
2657 _ACEOF
2659 if test "$enable_randomized_msgq" = "yes"
2660 then
2661 Echo 'A randomized message queue is only available when --with-prio-type != bitvec.'
2662 Echo "Specify prio-type to be a data type long enough to hold the message priorities in your application"
2663 Echo "for example: --with-prio-type=int (or short / long etc)."
2664 test_finish 1
2668 #### Check if compiler if 64 bit ####
2669 cat > $t <<EOT
2670 #include <stdio.h>
2672 int foo()
2674 int x[(int)(sizeof(void *) - 7)]={0};
2675 return x[0];
2678 test_cxx "whether compiler generates code for 64-bit" "yes" "no" ""
2680 cat >>confdefs.h <<_ACEOF
2681 #define CMK_SIZET_64BIT $strictpass
2682 _ACEOF
2684 in64bit=$strictpass
2687 ### Check if compiler supports std::alignment_of<> ###
2688 cat > $t <<EOT
2689 #include <type_traits>
2691 int foo()
2693 return std::alignment_of<int>::value;
2696 test_cxx "whether compiler supports std::alignment_of" "yes" "no" ""
2698 cat >>confdefs.h <<_ACEOF
2699 #define CMK_HAS_ALIGNMENT_OF $strictpass
2700 _ACEOF
2704 #### test if has values.h ####
2705 cat > $t <<EOT
2706 #include <values.h>
2707 int main() {
2708 double d = MAXDOUBLE;
2709 return 0;
2712 test_cxx "whether has values.h " "yes" "no" ""
2714 cat >>confdefs.h <<_ACEOF
2715 #define CMK_HAS_VALUES_H $pass
2716 _ACEOF
2719 #### test if has stdint.h ####
2720 cat > $t <<EOT
2721 #include <stdint.h>
2722 int main() {
2723 return 0;
2726 test_cxx "whether has stdint.h " "yes" "no" ""
2728 cat >>confdefs.h <<_ACEOF
2729 #define CMK_HAS_STDINT_H $pass
2730 _ACEOF
2733 #### test if has malloc.h ####
2734 cat > $t <<EOT
2735 #include <malloc.h>
2736 int main() {
2737 return 0;
2740 test_cxx "whether has malloc.h " "yes" "no" ""
2742 cat >>confdefs.h <<_ACEOF
2743 #define CMK_HAS_MALLOC_H $pass
2744 _ACEOF
2747 #### test if has alloca.h ####
2748 cat > $t <<EOT
2749 #include <alloca.h>
2750 int main() {
2751 double *s=(double *)alloca(sizeof(double));
2752 *s=1.0;
2753 return 0;
2756 test_cxx "whether has alloca.h " "yes" "no" ""
2758 cat >>confdefs.h <<_ACEOF
2759 #define CMK_HAS_ALLOCA_H $pass
2760 _ACEOF
2763 #### test if has regex.h ####
2764 cat > $t <<EOT
2765 #include <regex.h>
2766 int main() {
2767 regex_t re;
2768 regcomp(&re, ".*MOD.*", REG_EXTENDED|REG_NOSUB);
2769 return 0;
2772 test_cxx "whether has regex.h " "yes" "no" ""
2774 cat >>confdefs.h <<_ACEOF
2775 #define CMK_HAS_REGEX_H $pass
2776 _ACEOF
2779 #### Check long long ####
2780 cat > $t <<EOT
2781 #include <stdlib.h>
2782 long long foo(void) { return 17; }
2784 test_cxx "whether long long works" "yes" "no" ""
2786 cat >>confdefs.h <<_ACEOF
2787 #define CMK_LONG_LONG_DEFINED $pass
2788 _ACEOF
2791 #### Check __int64 ####
2792 cat > $t <<EOT
2793 #include <stdlib.h>
2794 __int64 foo(void) { return 17; }
2796 test_cxx "whether __int64 works" "yes" "no" ""
2798 cat >>confdefs.h <<_ACEOF
2799 #define CMK___int64_DEFINED $pass
2800 _ACEOF
2803 #### Check __int128 ####
2804 cat > $t <<EOT
2805 #include <stdlib.h>
2806 int foo(void) {
2807 __int128 a;
2808 int x[(int)(sizeof(__int128) - 15)]={0};
2809 return x[0];
2812 test_cxx "whether __int128 (128-bit integer) works" "yes" "no" ""
2814 cat >>confdefs.h <<_ACEOF
2815 #define CMK___int128_DEFINED $pass
2816 _ACEOF
2818 if test $pass -eq 1
2819 then
2820 add_flag CMK_HAS_INT16=1
2823 #### Check __int128_t ####
2824 cat > $t <<EOT
2825 #include <stdlib.h>
2826 int foo(void) {
2827 __int128_t a;
2828 __uint128_t b;
2829 a = a + a;
2830 int x[(int)(sizeof(__int128_t) - 15)]={0};
2831 return x[0];
2834 test_cxx "whether __int128_t (128-bit integer) works" "yes" "no" ""
2836 cat >>confdefs.h <<_ACEOF
2837 #define CMK___int128_t_DEFINED $pass
2838 _ACEOF
2840 if test $pass -eq 1
2841 then
2842 add_flag CMK_HAS_INT16=1
2845 ### Check if we have C++11 <atomic> ###
2846 cat > $t <<EOT
2847 #include <atomic>
2848 int main(int argc, char** argv) {
2849 return 0;
2852 test_cxx "whether C++ library has <atomic> " "yes" "no" ""
2854 cat >>confdefs.h <<_ACEOF
2855 #define CMK_HAS_CXX11_ATOMIC $pass
2856 _ACEOF
2859 if test $pass -ne 1
2860 then
2861 ### Check if we have pre-C++11 <cstdatomic> ###
2862 cat > $t <<EOT
2863 #include <cstdatomic>
2864 int main(int argc, char** argv) {
2865 return 0;
2868 test_cxx "whether C++ library has <cstdatomic> " "yes" "no" ""
2870 cat >>confdefs.h <<_ACEOF
2871 #define CMK_HAS_CXX0X_CSTDATOMIC $pass
2872 _ACEOF
2876 if test $pass -ne 1 -a -z "$CMK_USING_BGXLC"
2877 then
2878 echo "Charm++ requires C++11 atomic support"
2879 test_finish 1
2882 #### Check long double ####
2883 cat > $t <<EOT
2884 #include <stdlib.h>
2885 long double foo(void) { return 17.0; }
2887 test_cxx "whether long double works" "yes" "no" ""
2889 cat >>confdefs.h <<_ACEOF
2890 #define CMK_LONG_DOUBLE_DEFINED $strictpass
2891 _ACEOF
2894 #### Check ucontext and FPU pointer ####
2895 cat > $t <<EOT
2896 #include <ucontext.h>
2897 struct _libc_fpstate fpstate;
2898 fpregset_t *fp;
2900 test_cxx "whether ucontext has FPU pointer" "yes" "no" ""
2902 cat >>confdefs.h <<_ACEOF
2903 #define CMK_CONTEXT_FPU_POINTER $pass
2904 _ACEOF
2907 if test $pass -eq 1
2908 then
2909 cat > $t <<EOT
2910 #include <ucontext.h>
2912 int main()
2914 ucontext_t context;
2915 context.uc_mcontext.uc_regs = 0;
2918 test_cxx "whether ucontext uses uc_regs" "yes" "no" ""
2920 cat >>confdefs.h <<_ACEOF
2921 #define CMK_CONTEXT_FPU_POINTER_UCREGS $pass
2922 _ACEOF
2926 cat > $t <<EOT
2927 #include <ucontext.h>
2928 vrregset_t *v_regs;
2929 ucontext_t uc;
2931 void foo()
2933 vrregset_t *ptr = uc.uc_mcontext.v_regs;
2936 test_cxx "whether ucontext has pointer (v_regs) of vector type" "yes" "no" ""
2938 cat >>confdefs.h <<_ACEOF
2939 #define CMK_CONTEXT_V_REGS $pass
2940 _ACEOF
2943 #### Check ucontext and FPU pointer ####
2944 cat > $t <<EOT
2945 #include <infiniband/verbs.h>
2946 void test()
2948 struct ibv_context *context;
2949 int ibPort;
2950 struct ibv_port_attr attr;
2951 if (ibv_query_port(context, ibPort, &attr) != 0) return;
2952 if (attr.link_layer == IBV_LINK_LAYER_INFINIBAND) return;
2955 test_cxx "whether ibverbs ibv_port_attr has link_layer field" "yes" "no" ""
2957 cat >>confdefs.h <<_ACEOF
2958 #define CMK_IBV_PORT_ATTR_HAS_LINK_LAYER $pass
2959 _ACEOF
2963 ###################### C++ Compiler Features #####################
2965 #### check C inline ####
2966 cat > $tc <<EOT
2967 inline static int foo()
2969 return 1;
2972 test_cc "whether inline works in C" "yes" "no" ""
2974 cat >>confdefs.h <<_ACEOF
2975 #define CMK_C_INLINE $strictpass
2976 _ACEOF
2979 #### check if signed char is same as char ####
2980 cat > $t <<EOT
2981 #include <stdlib.h>
2982 class er {
2983 protected:
2984 void operator()(char &v,const char *desc=NULL) {};
2985 void operator()(signed char &v,const char *desc=NULL) {};
2988 test_cxx "whether C++ signed char and char differ" "yes" "no" ""
2990 cat >>confdefs.h <<_ACEOF
2991 #define CMK_SIGNEDCHAR_DIFF_CHAR $pass
2992 _ACEOF
2995 ### check if varsize array on stack ####
2996 cat > $t <<EOT
2997 #include <stdio.h>
2998 void foo()
3000 int size=10;
3001 char arrsize;
3005 test_cxx "whether C++ allows declaration of varsize array" "yes" "no" ""
3007 cat >>confdefs.h <<_ACEOF
3008 #define CMK_DECLARE_VARSIZE_ARRAY $pass
3009 _ACEOF
3012 #### check if typeinfo exists and works #####
3013 cat > $t <<EOT
3014 #include <typeinfo>
3015 const char *foo(void) {
3016 int x;
3017 return typeid(x).name();
3020 test_cxx "whether typeinfo/typeid works" "ok" "no" ""
3022 cat >>confdefs.h <<_ACEOF
3023 #define CMK_HAS_TYPEINFO $pass
3024 _ACEOF
3027 #### check if iterator_traits is defined #####
3028 cat > $t <<EOT
3029 #include <iterator>
3031 template <typename T> // T models Input Iterator
3032 typename std::iterator_traits<T>::value_type accumulate(T first, T last)
3034 typename std::iterator_traits<T>::value_type result = 0;
3035 while(first != last)
3036 result += *first++;
3037 return result;
3040 test_cxx "whether std::iterator_traits is defined" "ok" "no" ""
3042 cat >>confdefs.h <<_ACEOF
3043 #define CMK_HAS_ITERATOR_TRAITS $pass
3044 _ACEOF
3047 #### check if std::distance is defined #####
3048 cat > $t <<EOT
3049 #include <vector>
3050 #include <iterator>
3052 int foo()
3054 std::vector<int> tree;
3055 return std::distance(tree.begin(), tree.end());
3058 test_cxx "whether std::distance is defined" "ok" "no" ""
3060 cat >>confdefs.h <<_ACEOF
3061 #define CMK_HAS_STD_DISTANCE $pass
3062 _ACEOF
3065 #### check if std::inserter is defined #####
3066 cat > $t <<EOT
3067 #include <list>
3068 #include <iterator>
3070 void foo()
3072 using namespace std;
3073 list<int> L;
3074 inserter ( L, L.end ( ) ) = 500;
3077 test_cxx "whether std::inserter is defined" "ok" "no" ""
3079 cat >>confdefs.h <<_ACEOF
3080 #define CMK_HAS_STD_INSERTER $pass
3081 _ACEOF
3085 ####### Check support for features added by the new C11 and CPP11 standards ########
3087 #### check if std::unordered_map is defined #####
3088 cat > $t <<EOT
3089 #include <unordered_map>
3091 int foo()
3093 std::unordered_map<int,int> myhashtbl;
3094 myhashtbl[0] = 42;
3095 myhashtbl[1234] = 0;
3096 return myhashtbl[1234];
3099 test_cxx "whether std::unordered_map is defined" "ok" "no" ""
3101 cat >>confdefs.h <<_ACEOF
3102 #define CMK_HAS_STD_UNORDERED_MAP $pass
3103 _ACEOF
3107 #### check if anon structs are permitted #####
3108 cat > $t <<EOT
3109 #include <iostream>
3110 using std::cout;
3112 struct idx
3114 const static int dims = 3;
3115 union
3117 int data[dims];
3118 struct { int x, y, z; };
3121 idx(const int i=0, const int j=0, const int k=0): x(i), y(j), z(k) {}
3124 int main()
3126 cout<<"Hello World!\n";
3127 idx myidx(1, 2, 3);
3128 cout<< "idx = ("
3129 << myidx.data[0] << ","
3130 << myidx.data[1] << ","
3131 << myidx.z << ")\n";
3132 return (myidx.data[0] == 1 && myidx.y == 2 && myidx.data[2] == 3);
3135 test_cxx "whether anon structs are permitted" "yes" "no" ""
3137 cat >>confdefs.h <<_ACEOF
3138 #define CMK_HAS_ANON_STRUCTS $pass
3139 _ACEOF
3143 #### test if we can have multiple delete like this ####
3144 cat > $t <<EOT
3145 class foo {
3146 public:
3147 void operator delete(void*p){};
3148 void operator delete(void*p,int*){};
3151 test_cxx "whether operator delete can be overloaded in same class" "ok" "no" ""
3153 cat >>confdefs.h <<_ACEOF
3154 #define CMK_MULTIPLE_DELETE $strictpass
3155 _ACEOF
3158 #### test if offsetof exists ####
3159 cat > $t <<EOT
3160 #include <stddef.h>
3162 struct FooType {
3163 int f1;
3164 int f2;
3165 double f3;
3168 void foo()
3170 int off = offsetof(FooType, f2);
3173 test_cxx "whether offsetof is defined" "yes" "no" ""
3175 cat >>confdefs.h <<_ACEOF
3176 #define CMK_HAS_OFFSETOF $pass
3177 _ACEOF
3180 #### test if we can use gcc x86 assembly like this ####
3181 cat > $t <<EOT
3182 double foo(void)
3184 unsigned long long int v=0;
3185 int *lo=0+(int *)&v;
3186 int *hi=1+(int *)&v;
3187 __asm__ __volatile__(
3188 "rdtsc; movl %%edx,%0; movl %%eax,%1"
3189 : /* output */ "=m" (*hi), "=m" (*lo)
3190 : /* input */
3191 : /* trashes */ "%edx", "%eax"
3193 return v;
3196 test_cxx "whether GCC x86 assembly works" "yes" "no" ""
3198 cat >>confdefs.h <<_ACEOF
3199 #define CMK_GCC_X86_ASM $strictpass
3200 _ACEOF
3203 #### test if we can use gcc x86 assembly like this ####
3204 if test $strictpass = 1
3205 then
3206 cat > $t <<EOT
3207 int foo(void)
3209 int x;
3210 asm("lock incl %0" :: "m" (x));
3211 asm("lock decl %0" :: "m" (x));
3212 return x;
3215 test_cxx "whether GCC x86 assembly for atomic increment works" "yes" "no" ""
3217 cat >>confdefs.h <<_ACEOF
3218 #define CMK_GCC_X86_ASM_ATOMICINCREMENT $strictpass
3219 _ACEOF
3223 #### test if we can use asm eieio assembly like this ####
3224 cat > $t <<EOT
3225 double foo(void)
3227 unsigned long long int x;
3228 asm volatile("eieio" ::: "memory");
3229 return x;
3232 test_cxx "whether asm eieio assembly works" "yes" "no" ""
3234 cat >>confdefs.h <<_ACEOF
3235 #define CMK_PPC_ASM $strictpass
3236 _ACEOF
3241 #### test if we can use __thread ####
3242 cat > $t <<EOT
3243 __thread unsigned long long int x;
3244 static __thread int y;
3245 void foo(void)
3247 x = 1;
3248 y = 1;
3251 test_cxx "whether __thread (Thread Local Storage) is supported" "yes" "no" ""
3253 cat >>confdefs.h <<_ACEOF
3254 #define CMK_HAS_TLS_VARIABLES $strictpass
3255 _ACEOF
3258 #### check __sync_add_and_fetch ####
3259 cat > $tc <<EOT
3260 #include <stdio.h>
3261 int main()
3263 int t=1;
3264 __sync_add_and_fetch(&t, 1);
3265 return 1;
3268 test_linkc "whether synchronization primitives (__sync_add_and_fetch) works in C" "yes" "no" ""
3270 cat >>confdefs.h <<_ACEOF
3271 #define CMK_C_SYNC_ADD_AND_FETCH_PRIMITIVE $pass
3272 _ACEOF
3275 #### check __sync_synchronize ####
3276 cat > $tc <<EOT
3277 #include <stdio.h>
3278 int main()
3280 __sync_synchronize();
3284 test_linkc "whether synchronization primitives (__sync_synchronize) works in C" "yes" "no" ""
3287 cat >>confdefs.h <<_ACEOF
3288 #define CMK_C_SYNC_SYNCHRONIZE_PRIMITIVE $pass
3289 _ACEOF
3293 ### test if switching TLS register ###
3294 if test $in64bit = 1
3295 then
3296 cat > $t <<EOT
3297 #include <elf.h>
3298 #include <stdlib.h>
3299 #include <malloc.h>
3301 void switchTLS() {
3302 Elf64_Addr m1, m2;
3303 asm volatile ("movq %%fs:0x0, %0\n\t"
3304 "movq %1, %%fs:0x0\n\t"
3305 : "=r"(m1)
3306 : "r"(m2));
3309 test_cxx "whether switching TLS register (64-bit) is supported" "yes" "no" ""
3311 cat >>confdefs.h <<_ACEOF
3312 #define CMK_TLS_SWITCHING64 $strictpass
3313 _ACEOF
3315 else
3316 cat > $t <<EOT
3317 #include <elf.h>
3318 #include <stdlib.h>
3319 #include <malloc.h>
3321 void switchTLS() {
3322 Elf32_Addr m1, m2;
3323 asm volatile ("movl %%gs:0x0, %0\n\t"
3324 "movl %1, %%gs:0x0\n\t"
3325 : "=r"(m1)
3326 : "r"(m2));
3329 test_cxx "whether switching TLS register (32-bit) is supported" "yes" "no" ""
3331 cat >>confdefs.h <<_ACEOF
3332 #define CMK_TLS_SWITCHING32 $strictpass
3333 _ACEOF
3337 #### test if we can build MPI ####
3338 if test "$CMK_BUILD_MPI" = 1
3339 then
3341 cat > $tc <<EOT
3342 #include "mpi.h"
3343 int main(int argc, char **argv)
3345 MPI_Init(&argc, &argv);
3346 return 0;
3349 mv -f ../include/mpi.h ../include/mpi.h.bak 2>/dev/null
3350 test_cc "whether build on MPI" "yes" "no" ""
3352 cat >>confdefs.h <<_ACEOF
3353 #define CMK_BUILD_ON_MPI $strictpass
3354 _ACEOF
3356 BUILD_MPI=$strictpass
3358 if test $BUILD_MPI -eq 0
3359 then
3360 echo "Error: Can not compile a MPI program"
3361 test_finish 1
3364 if test $BUILD_MPI -eq 1 -a -z "$BGP_FLOOR"
3365 then
3366 test_linkc "whether need to specify MPI library" "no" "yes" ""
3367 if test $pass -ne 1
3368 then
3369 if test -z "$CMK_MPI_LIB"
3370 then
3371 test_linkc "whether -lmpich" "ok" "no" "-lmpich"
3372 if test $pass -eq 1
3373 then
3374 add_flag CMK_SYSLIBS='"$CMK_SYSLIBS -lmpich"' "mpi lib"
3375 else
3376 test_linkc "whether -lmpi" "ok" "no" "-lmpi"
3377 if test $pass -eq 1
3378 then
3379 add_flag CMK_SYSLIBS='"$CMK_SYSLIBS -lmpi"' "mpi lib"
3380 else
3381 echo "Error: can not find mpi library"
3382 test_finish 1
3385 else
3386 add_flag CMK_SYSLIBS='"$CMK_SYSLIBS $CMK_MPI_LIB"' "mpi lib"
3391 if test "$BUILD_MPI" = "1"
3392 then
3393 cat > $t <<EOT
3394 #include "mpi.h"
3395 int main(int argc, char **argv)
3397 int thread_level, provided;
3398 thread_level = MPI_THREAD_FUNNELED;
3399 MPI_Init_thread(&argc, &argv, thread_level, &provided);
3402 test_cxx "whether MPI_Init_thread is supported" "yes" "no" ""
3404 cat >>confdefs.h <<_ACEOF
3405 #define CMK_MPI_INIT_THREAD $strictpass
3406 _ACEOF
3409 mv -f ../include/mpi.h.bak ../include/mpi.h 2>/dev/null
3413 if test "$BUILD_MPI" = "1"
3414 then
3416 cat > $t <<EOT
3417 #include <stdio.h>
3418 #include <mpi.h>
3420 int main (int argc, char** argv) {
3421 return 0;
3424 test_cxx "whether macro conflicts occurs due to C++ MPI bindings" "no" "yes" ""
3426 cat >>confdefs.h <<_ACEOF
3427 #define CMK_CXX_MPI_BINDINGS $strictpass
3428 _ACEOF
3433 ################### Syscalls and Libraries ###################
3435 #### test for getrusage with RUSAGE_THREAD ###
3436 cat > $tc <<EOT
3437 #include <sys/time.h>
3438 #define __USE_GNU 1
3439 #include <sys/resource.h>
3440 int main() {
3441 struct rusage usage;
3442 getrusage(RUSAGE_THREAD, &usage);
3443 return 0;
3446 test_linkc "whether getrusage accepts RUSAGE_THREAD" "yes" "no" ""
3448 cat >>confdefs.h <<_ACEOF
3449 #define CMK_HAS_RUSAGE_THREAD $pass
3450 _ACEOF
3453 #### test for asctime ###
3455 cat > $tc <<EOT
3456 #include <time.h>
3457 int main() {
3458 struct tm *local;
3459 time_t t;
3460 t = time(NULL);
3461 local = localtime(&t);
3462 asctime(local);
3463 return 0;
3466 test_linkc "whether has asctime" "yes" "no" ""
3468 cat >>confdefs.h <<_ACEOF
3469 #define CMK_HAS_ASCTIME $pass
3470 _ACEOF
3473 #### test for log2 ###
3474 cat > $t <<EOT
3475 #include <math.h>
3476 int main() {
3477 int i = log2(10);
3478 return 0;
3481 test_link "whether has log2" "yes" "no" ""
3483 cat >>confdefs.h <<_ACEOF
3484 #define CMK_HAS_LOG2 $pass
3485 _ACEOF
3488 #### test for sqrtf ###
3489 cat > $t <<EOT
3490 #include <math.h>
3491 int main() {
3492 float i = sqrtf((float)10.0);
3493 return 0;
3496 test_link "whether has sqrtf" "yes" "no" ""
3498 cat >>confdefs.h <<_ACEOF
3499 #define CMK_HAS_SQRTF $pass
3500 _ACEOF
3503 #### test for fabsf ###
3504 cat > $t <<EOT
3505 #include <math.h>
3506 int main() {
3507 float i = fabsf((float)10.0);
3508 return 0;
3511 test_link "whether has fabsf" "yes" "no" ""
3513 cat >>confdefs.h <<_ACEOF
3514 #define CMK_HAS_FABSF $pass
3515 _ACEOF
3518 #### test for mkstemp ###
3519 cat > $t <<EOT
3520 #include <stdlib.h>
3521 #include <string.h>
3522 int main() {
3523 char fname[128];
3524 strcpy(fname, "/tmp/fdXXX.XXX");
3525 mkstemp(fname);
3526 return 0;
3529 test_link "whether has mkstemp" "yes" "no" ""
3531 cat >>confdefs.h <<_ACEOF
3532 #define CMK_USE_MKSTEMP $pass
3533 _ACEOF
3536 #### test for system ###
3537 cat > $t <<EOT
3538 #include <stdlib.h>
3539 int main() {
3540 system("/bin/ls");
3541 return 0;
3544 test_link "whether has system" "yes" "no" ""
3546 cat >>confdefs.h <<_ACEOF
3547 #define CMK_HAS_SYSTEM $pass
3548 _ACEOF
3551 #### test for sync() ###
3552 cat > $t <<EOT
3553 #include <unistd.h>
3554 int main() {
3555 sync();
3556 return 0;
3559 test_link "whether has sync()" "yes" "no" ""
3561 cat >>confdefs.h <<_ACEOF
3562 #define CMK_HAS_SYNC_FUNC $pass
3563 _ACEOF
3566 #### test for fsync() ###
3567 cat > $t <<EOT
3568 #include <unistd.h>
3569 int main() {
3570 fsync(0);
3571 return 0;
3574 test_link "whether has fsync()" "yes" "no" ""
3576 cat >>confdefs.h <<_ACEOF
3577 #define CMK_HAS_FSYNC_FUNC $pass
3578 _ACEOF
3581 #### test for fdatasync() ###
3582 cat > $t <<EOT
3583 #include <unistd.h>
3584 int main() {
3585 fdatasync(0);
3586 return 0;
3589 test_link "whether has fdatasync()" "yes" "no" ""
3591 cat >>confdefs.h <<_ACEOF
3592 #define CMK_HAS_FDATASYNC_FUNC $pass
3593 _ACEOF
3596 #### test for sbrk ###
3597 cat > $t <<EOT
3598 #include <unistd.h>
3599 int main() {
3600 void *ptr = sbrk(0);
3603 test_link "whether has sbrk" "yes" "no" ""
3605 cat >>confdefs.h <<_ACEOF
3606 #define CMK_HAS_SBRK $pass
3607 _ACEOF
3610 #### test for _setjmp/_longjmp ###
3611 cat > $t <<EOT
3612 #include <setjmp.h>
3613 int main() {
3614 jmp_buf buf;
3615 _setjmp(buf);
3616 _longjmp(buf, 0);
3619 test_link "whether has _setjmp/_longjmp" "yes" "no" ""
3621 cat >>confdefs.h <<_ACEOF
3622 #define CMK_HAS_UNDERSCORE_SETJMP $pass
3623 _ACEOF
3626 #### test for mstats ###
3627 cat > $t <<EOT
3628 #include <malloc.h>
3629 int main() {
3630 struct mstats ms = mstats();
3633 test_link "whether has mstats" "yes" "no" ""
3635 cat >>confdefs.h <<_ACEOF
3636 #define CMK_HAS_MSTATS $pass
3637 _ACEOF
3640 #### test for mallinfo ###
3641 cat > $t <<EOT
3642 #include <malloc.h>
3643 int main() {
3644 struct mallinfo mi = mallinfo();
3647 test_link "whether has mallinfo" "yes" "no" ""
3649 cat >>confdefs.h <<_ACEOF
3650 #define CMK_HAS_MALLINFO $pass
3651 _ACEOF
3654 #### test for popen ###
3655 cat > $t <<EOT
3656 #include <stdio.h>
3657 int main() {
3658 FILE *p = popen("/bin/ps", "r");
3659 pclose(p);
3662 test_link "whether has popen" "yes" "no" ""
3664 cat >>confdefs.h <<_ACEOF
3665 #define CMK_HAS_POPEN $pass
3666 _ACEOF
3669 #### test for poll ###
3670 cat > $t <<EOT
3671 #include <poll.h>
3672 void foo(void) {
3673 struct pollfd pos[3];
3674 poll(pos, 1, 1);
3677 test_cxx "whether has poll" "yes" "no" ""
3679 cat >>confdefs.h <<_ACEOF
3680 #define CMK_USE_POLL $pass
3681 _ACEOF
3684 #### check if getpagesize exists ####
3685 cat > $tc <<EOT
3686 #include <unistd.h>
3688 int main(int argc, char **argv) {
3689 int s = getpagesize();
3692 test_linkc "whether has getpagesize" "yes" "no" ""
3694 cat >>confdefs.h <<_ACEOF
3695 #define CMK_HAS_GETPAGESIZE $pass
3696 _ACEOF
3699 #### check if getpid exists ####
3700 cat > $tc <<EOT
3701 #include <sys/types.h>
3702 #include <unistd.h>
3704 int main(int argc, char **argv) {
3705 pid_t pid = getpid();
3708 test_linkc "whether has getpid" "yes" "no" ""
3710 cat >>confdefs.h <<_ACEOF
3711 #define CMK_HAS_GETPID $pass
3712 _ACEOF
3715 #### check if kill exists ####
3716 cat > $tc <<EOT
3717 #include <sys/types.h>
3718 #include <unistd.h>
3719 #include <signal.h>
3721 int main(int argc, char**argv)
3723 pid_t pid = getpid();
3724 kill(pid, 9);
3727 test_linkc "whether has kill" "yes" "no" ""
3729 cat >>confdefs.h <<_ACEOF
3730 #define CMK_HAS_KILL $pass
3731 _ACEOF
3734 #### test for setpriority ###
3735 cat > $t <<EOT
3736 #include <sys/time.h>
3737 #include <sys/resource.h>
3738 void foo(void) {
3739 setpriority(PRIO_PROCESS, 0, 0);
3742 test_cxx "whether has setpriority" "yes" "no" ""
3744 cat >>confdefs.h <<_ACEOF
3745 #define CMK_HAS_SETPRIORITY $pass
3746 _ACEOF
3749 #### test for system ###
3750 cat > $t <<EOT
3751 #include "ckdll_system.C"
3753 test_cxx "whether to use signal-safe system() " "yes" "no" ""
3755 cat >>confdefs.h <<_ACEOF
3756 #define CMK_SIGSAFE_SYSTEM $pass
3757 _ACEOF
3760 ### test sched_setaffinity ####
3761 cat > $tc <<EOT
3762 #define _GNU_SOURCE
3763 #include <sched.h>
3765 int main()
3767 cpu_set_t cpuset;
3768 CPU_ZERO(&cpuset);
3769 CPU_SET(0, &cpuset);
3770 if (sched_setaffinity(0, sizeof(cpuset), &cpuset) < 0) {
3771 return -1;
3773 return 0;
3776 test_linkc "whether sched_setaffinity call exists" "yes" "no" ""
3778 cat >>confdefs.h <<_ACEOF
3779 #define CMK_HAS_SETAFFINITY $pass
3780 _ACEOF
3783 ### test pthread_setaffinity_np ####
3784 cat > $tc <<EOT
3785 #include <stdlib.h>
3786 #include <stdio.h>
3787 #include <unistd.h>
3788 #include <pthread.h>
3790 int main()
3792 unsigned long mask = 0xffffffff;
3793 unsigned int len = sizeof(mask);
3795 if (pthread_setaffinity_np(pthread_self(), len, &mask) < 0) {
3796 return -1;
3798 return 0;
3801 test_linkc "whether pthread_setaffinity_np call exists" "yes" "no" "-lpthread"
3803 cat >>confdefs.h <<_ACEOF
3804 #define CMK_HAS_PTHREAD_SETAFFINITY $pass
3805 _ACEOF
3808 ### test pthread_spin_lock ####
3809 cat > $tc <<EOT
3810 #include <stdlib.h>
3811 #include <stdio.h>
3812 #include <unistd.h>
3813 #include <pthread.h>
3815 int main()
3817 pthread_spinlock_t lock;
3819 pthread_spin_init(&lock, 0);
3821 pthread_spin_lock(&lock);
3823 return 0;
3826 test_linkc "whether pthread_spin_lock exists" "yes" "no" "-lpthread"
3828 cat >>confdefs.h <<_ACEOF
3829 #define CMK_HAS_SPINLOCK $pass
3830 _ACEOF
3833 ### check libnuma on Linux ####
3834 if test "$WITH_NUMA" = "yes"
3835 then
3836 cat > $tc <<EOT
3837 #include <stdlib.h>
3838 #include <stdio.h>
3839 #include <linux/mempolicy.h>
3840 #include <numaif.h>
3841 #include <numa.h>
3843 int main()
3845 if (get_mempolicy(NULL, NULL, 0, 0, 0) == 0) return 0;
3846 return -1;
3849 test_linkc "whether libnuma exists" "yes" "no" "-lnuma"
3851 cat >>confdefs.h <<_ACEOF
3852 #define CMK_HAS_NUMACTRL $pass
3853 _ACEOF
3855 if test $pass -eq 1
3856 then
3857 add_flag 'CMK_SYSLIBS="$CMK_SYSLIBS -lnuma"' "libnuma"
3861 #### check bindprocessors on AIX ####
3862 cat > $tc <<EOT
3863 #include <stdlib.h>
3864 #include <stdio.h>
3865 #include <unistd.h>
3867 #include <sys/processor.h>
3869 int main()
3871 int retValue = 0;
3872 int pid;
3873 pid = getpid();
3874 if (bindprocessor(BINDPROCESS, pid, 0) == -1) return -1;
3875 return 0;
3878 test_linkc "whether bindprocessor call exists" "yes" "no" ""
3880 cat >>confdefs.h <<_ACEOF
3881 #define CMK_HAS_BINDPROCESSOR $pass
3882 _ACEOF
3886 #### check if dlopen works ####
3887 skip_dl=0
3888 # for bproc, ignore -ldl
3889 test -n "$CMK_BPROC" && skip_dl=1
3890 test -n "$CMK_NO_DL" && skip_dl=1
3891 dl_opt='-ldl'
3892 #workaround for pgcc 4.0, -ldl crash linking, so use -Wl,-ldl to skip the prelinker.
3893 case "$CMK_CXX" in
3894 pgCC*) dl_opt='-Wl,-ldl' ;;
3895 esac
3897 if test $skip_dl -eq 0
3898 then
3900 cat > $t <<EOT
3901 #include "ckdll_dlopen.C"
3902 int main() {
3903 CkDll dll("foo.so");
3904 return 0;
3907 test_link "whether dlopen links without $dl_opt" "yes" "no" ""
3908 noldl=$pass
3909 test_link "whether dlopen links with $dl_opt" "yes" "no" "$dl_opt"
3910 if test $pass -eq 1
3911 then
3912 #dlopen requires -ldl: add it to our link line
3913 add_flag CMK_LIBS='"$CMK_LIBS '$dl_opt'"' "dlopen"
3916 if test $pass -eq 1 -o $noldl -eq 1
3917 then
3918 # One version or another of dlopen worked: compile it in
3920 cat >>confdefs.h <<_ACEOF
3921 #define CMK_DLL_USE_DLOPEN 1
3922 _ACEOF
3926 ### test gethostname ####
3927 cat > $tc <<EOT
3928 #ifdef WIN32
3929 #include <Winsock2.h>
3930 #else
3931 #include <stdlib.h>
3932 #include <stdio.h>
3933 #include <unistd.h>
3934 #endif
3936 int main()
3938 char hostname[1000];
3939 gethostname(hostname, 999);
3940 return 0;
3943 test_linkc "whether gethostname call exists" "yes" "no" ""
3945 cat >>confdefs.h <<_ACEOF
3946 #define CMK_HAS_GETHOSTNAME $pass
3947 _ACEOF
3950 #### check if getProcAddress works ####
3951 cat > $t <<EOT
3952 #include "ckdll_win32.C"
3954 test_cxx "whether getProcAddress works" "yes" "no" ""
3956 cat >>confdefs.h <<_ACEOF
3957 #define CMK_DLL_USE_WIN32 $pass
3958 _ACEOF
3961 fi # end of skip_dl
3963 #### check if socklen_t exists ####
3964 cat > $t <<EOT
3965 #include <sys/types.h>
3966 #include <sys/socket.h>
3968 void foo(void) {
3969 int i;
3970 socklen_t s=sizeof(i);
3973 test_cxx "whether has socklen_t" "yes" "no" ""
3975 cat >>confdefs.h <<_ACEOF
3976 #define CMK_HAS_SOCKLEN $pass
3977 _ACEOF
3980 ### test getifaddrs ####
3981 cat > $tc <<EOT
3982 #include <netinet/in.h> /* for sockaddr_in */
3983 #include <ifaddrs.h> /* for getifaddrs */
3984 #include <net/if.h> /* for IFF_RUNNING */
3986 int main()
3988 struct ifaddrs *interfaces=0;
3989 if( getifaddrs(&interfaces) == 0 ) {
3990 struct ifaddrs *interface;
3991 for( interface=interfaces; interface; interface=interface->ifa_next ) {
3992 if( (interface->ifa_flags & IFF_UP) && ! (interface->ifa_flags & IFF_LOOPBACK) ) {
3993 const struct sockaddr_in *addr = (const struct sockaddr_in*)interface->ifa_addr;
3994 if( addr && addr->sin_family==AF_INET ) {
3995 break;
3999 freeifaddrs(interfaces);
4003 test_linkc "whether getifaddrs call exists" "yes" "no" ""
4005 cat >>confdefs.h <<_ACEOF
4006 #define CMK_HAS_GETIFADDRS $pass
4007 _ACEOF
4010 #### check if mmap exists ####
4011 cat > $t <<EOT
4012 #include <sys/types.h>
4013 #include <sys/mman.h>
4015 void *foo(void *a,int l,int fd) {
4016 return mmap((caddr_t)a,l,PROT_READ+PROT_WRITE,
4017 MAP_FIXED+MAP_PRIVATE,fd,0);
4020 test_cxx "whether the mmap() syscall exists" "yes" "no" ""
4022 cat >>confdefs.h <<_ACEOF
4023 #define CMK_HAS_MMAP $pass
4024 _ACEOF
4027 #### check if mmap accepts MAP_ANON ####
4028 cat > $t <<EOT
4029 #include <sys/types.h>
4030 #include <sys/mman.h>
4032 void *foo(void *a,int l) {
4033 return mmap((caddr_t)a,l,PROT_READ+PROT_WRITE,
4034 MAP_FIXED+MAP_PRIVATE+MAP_ANON,-1,0);
4037 test_cxx "whether mmap() accepts MAP_ANON" "yes" "no" ""
4039 cat >>confdefs.h <<_ACEOF
4040 #define CMK_HAS_MMAP_ANON $pass
4041 _ACEOF
4044 #### check if mmap accepts MAP_NORESERVE ####
4045 cat > $t <<EOT
4046 #include <sys/types.h>
4047 #include <sys/mman.h>
4049 void *foo(void *a,int l) {
4050 return mmap((caddr_t)a,l,PROT_READ+PROT_WRITE,
4051 MAP_FIXED+MAP_PRIVATE+MAP_NORESERVE,-1,0);
4054 test_cxx "whether mmap() accepts MAP_NORESERVE" "yes" "no" ""
4056 cat >>confdefs.h <<_ACEOF
4057 #define CMK_HAS_MMAP_NORESERVE $pass
4058 _ACEOF
4061 #### check if get_myaddress exists ####
4062 cat > $t <<EOT
4063 #include <rpc/rpc.h>
4065 void foo(void *a) {
4066 get_myaddress((struct sockaddr_in*)a);
4069 test_cxx "whether has get_myaddress" "yes" "no" ""
4071 cat >>confdefs.h <<_ACEOF
4072 #define CMK_HAS_GET_MYADDRESS $pass
4073 _ACEOF
4076 #### check if mprotect exists ####
4077 cat > $t <<EOT
4078 #include <stdio.h>
4079 #include <sys/mman.h>
4081 void foo(void *a,int l,int fd) {
4082 void *pg = NULL;
4083 size_t pagesize = 4096;
4084 mprotect(pg, pagesize, PROT_READ | PROT_WRITE);
4087 test_cxx "whether has mprotect" "yes" "no" ""
4089 cat >>confdefs.h <<_ACEOF
4090 #define CMK_HAS_MPROTECT $pass
4091 _ACEOF
4094 #### check if glibc backtrace exists ####
4095 cat > $t <<EOT
4096 #include "cmibacktrace.c"
4098 int main() {
4099 int nLevels=1;
4100 void *stack;
4101 CmiBacktraceRecord(&stack,0,&nLevels);
4102 return 0;
4105 TRACE_LINK_FLAG="-rdynamic"
4106 test_link "whether glibc backtrace works" "yes" "no" "-DCMK_USE_BACKTRACE=1 $TRACE_LINK_FLAG"
4108 cat >>confdefs.h <<_ACEOF
4109 #define CMK_USE_BACKTRACE $pass
4110 _ACEOF
4113 if test $strictpass -eq 1
4114 then
4115 add_flag 'CMK_LD="$CMK_LD '$TRACE_LINK_FLAG'"' "backtrace"
4116 add_flag 'CMK_LDXX="$CMK_LDXX '$TRACE_LINK_FLAG'"' "backtrace"
4119 #### test sleep ####
4120 cat > $t <<EOT
4121 #include <unistd.h>
4122 int main() {
4123 sleep(1);
4124 return 0;
4127 test_cxx "whether has sleep " "yes" "no" ""
4129 cat >>confdefs.h <<_ACEOF
4130 #define CMK_HAS_SLEEP $pass
4131 _ACEOF
4134 #### test usleep ####
4135 cat > $t <<EOT
4136 #include <unistd.h>
4137 int main() {
4138 usleep(100);
4139 return 0;
4142 test_cxx "whether has usleep " "yes" "no" ""
4144 cat >>confdefs.h <<_ACEOF
4145 #define CMK_HAS_USLEEP $pass
4146 _ACEOF
4149 #### test personality() and ADDR_NO_RANDOMIZE ####
4150 # Only works on modern Linux systems
4151 cat > $t <<EOT
4152 #include <sys/personality.h>
4153 int main() {
4154 int orig_persona = personality(0xffffffff);
4155 personality(orig_persona | ADDR_NO_RANDOMIZE);
4156 return 0;
4159 test_cxx "whether personality() and ADDR_NO_RANDOMIZE exist" "yes" "no" ""
4161 cat >>confdefs.h <<_ACEOF
4162 #define CMK_HAS_ADDR_NO_RANDOMIZE $pass
4163 _ACEOF
4167 #### test if has zlib ####
4168 # bproc doesnot like -lz in any case
4169 if test -z "$CMK_BPROC"
4170 then
4172 cat > $t <<EOT
4173 #include <zlib.h>
4174 int main() {
4175 gzFile f = gzopen("/tmp/x","r");
4176 gzprintf(f, "test...\n");
4177 gzclose(f);
4178 return 0;
4181 test_link "whether has zlib" "yes" "no" "-lz"
4183 cat >>confdefs.h <<_ACEOF
4184 #define CMK_PROJECTIONS_USE_ZLIB $pass
4185 _ACEOF
4187 if test $pass -eq 1
4188 then
4189 add_flag 'CMK_LIBZ="-lz"' "zlib"
4194 #### test if has elf.h ####
4195 cat > $t <<EOT
4196 #include <elf.h>
4197 typedef Elf32_Addr ELF_TYPE_Addr;
4198 int main() {
4201 test_cxx "whether has elf.h " "yes" "no" ""
4203 cat >>confdefs.h <<_ACEOF
4204 #define CMK_HAS_ELF_H $pass
4205 _ACEOF
4208 #### test if has Multiprocessing.h for apple ####
4209 cat > $t <<EOT
4210 #include <Carbon/Carbon.h>
4211 #include <Multiprocessing.h>
4212 int main() {
4213 int a = MPProcessorsScheduled();
4216 test_cxx "whether has Multiprocessing.h for Apple " "yes" "no" ""
4218 cat >>confdefs.h <<_ACEOF
4219 #define CMK_HAS_MULTIPROCESSING_H $pass
4220 _ACEOF
4223 #### test if "ntohl" is available ####
4224 cat > $t <<EOT
4225 #if defined(_WIN32) || defined(__MINGW_H)
4226 #include <winsock.h>
4227 #else
4228 #include <stdint.h>
4229 #include <arpa/inet.h>
4230 #include <netinet/in.h>
4231 #endif
4233 int main() {
4234 int i = 100;
4235 i = ntohl(i);
4236 return 0;
4239 test_link "whether ntohl is available" "yes" "no" ""
4241 cat >>confdefs.h <<_ACEOF
4242 #define CMK_HAS_NTOHL $pass
4243 _ACEOF
4246 ### test for libjpeg ####
4247 cat > $t <<EOT
4248 #include <stdio.h>
4249 #include <stdlib.h>
4250 #include "jpeglib.h"
4252 int main()
4254 struct jpeg_compress_struct cinfo;
4255 jpeg_create_compress(&cinfo);
4256 return 0;
4259 test_link "whether has libjpeg" "yes" "no" "-ljpeg"
4261 cat >>confdefs.h <<_ACEOF
4262 #define CMK_USE_LIBJPEG $pass
4263 _ACEOF
4265 if test $pass -eq 1
4266 then
4267 add_flag 'CMK_LIBJPEG="-ljpeg"' "libjpeg"
4270 #### check if PAPI exists ####
4271 if test -n "$CMK_USE_PAPI"
4272 then
4273 cat > $t <<EOT
4274 #include <stdio.h>
4275 #include <papi.h>
4277 int main() {
4278 if (PAPI_library_init(PAPI_VER_CURRENT) != PAPI_VER_CURRENT) return 1;
4279 return 0;
4282 test_link "whether PAPI exists" "yes" "no" "-lpapi"
4284 cat >>confdefs.h <<_ACEOF
4285 #define CMK_HAS_COUNTER_PAPI $pass
4286 _ACEOF
4288 if test $pass -eq 1
4289 then
4290 add_flag 'CMK_LIBS="$CMK_LIBS -lpapi"' "papi"
4294 #### test if Python headers are installed ####
4295 PYTHON_VERSION=`python -V 2>&1 | awk {'print $2'} | awk -F. {'print $1"."$2'}`
4296 cat > $t <<EOT
4297 #include "python${PYTHON_VERSION}/Python.h"
4298 #include "python${PYTHON_VERSION}/compile.h"
4299 #include "python${PYTHON_VERSION}/eval.h"
4300 #include "python${PYTHON_VERSION}/node.h"
4302 int main() {
4303 Py_Initialize();
4304 PyEval_InitThreads();
4305 struct _node* programNode = PyParser_SimpleParseString("return 1\n",Py_file_input);
4306 PyCodeObject *program = PyNode_Compile(programNode, "");
4309 test_link "whether Python is installed" "yes" "no" "-lpython$PYTHON_VERSION -lpthread -lutil -ldl"
4311 cat >>confdefs.h <<_ACEOF
4312 #define CMK_HAS_PYTHON $pass
4313 _ACEOF
4316 cat >>confdefs.h <<_ACEOF
4317 #define CMK_PYTHON_VERSION ${PYTHON_VERSION}
4318 _ACEOF
4320 if test $pass -eq 1
4321 then
4322 add_flag "CMK_BUILD_PYTHON=$PYTHON_VERSION" "python"
4325 #### Pick up METIS if the user asks for it ####
4328 # Check whether --with-metis was given.
4329 if test "${with_metis+set}" = set; then :
4330 withval=$with_metis;
4331 else
4332 with_metis=no
4336 WITH_METIS=no
4337 if test "$with_metis" != "no"
4338 then
4339 Echo "Compiling Charm with support for METIS"
4340 WITH_METIS=yes
4341 echo 'charm++: $(L)/libmoduleMetisLB.a $(L)/libmoduleTeamLB.a' >> $MAKEFILE_EXT
4342 add_flag 'CMK_LIBS="$CMK_LIBS -lmetis"' "libmetis"
4343 if test "$with_metis" != "yes"
4344 then
4345 add_flag "CMK_METIS=$with_metis" "Where to find METIS"
4346 add_flag 'CMK_LIBDIR="$CMK_LIBDIR -L$CMK_METIS"' "Library path for METIS"
4347 if test -r $with_metis/Lib/metis.h
4348 then
4349 add_flag 'CMK_INCDIR="$CMK_INCDIR -I$CMK_METIS/Lib"' "Include path for METIS 4"
4350 elif test -r $with_metis/../include/metis.h
4351 then
4352 add_flag 'CMK_INCDIR="$CMK_INCDIR -I$CMK_METIS/../include"' "Include path for METIS 5"
4353 else
4354 echo "I can't find metis.h, since the path you specified (which should point to the directory containing libmetis.a) is not laid out as I expect for version 4 or 5."
4355 test_finish 1
4360 ## Cray specific test
4361 if test "$CMK_BUILD_CRAY" = "1"
4362 then
4363 #echo "Test for known incompatible compiler versions"
4365 if test "$CRAY_CC_VERSION" = "8.1.4"
4366 then
4367 echo "CCE 8.1.4 produces incorrect Charm++ code"
4368 echo "Please use a newer version of the CCE compiler"
4369 echo "e.g. module load cce/8.1.7"
4370 test_finish 1
4373 #### test if Cray node topology will work ####
4374 cat > $tc <<EOT
4375 #include <pmi.h>
4377 int main() {
4378 int nid;
4379 PMI_Get_nid(0, &nid);
4381 return 0;
4384 test_linkc "whether PMI_Get_nid exists" "yes" "no" ""
4386 cat >>confdefs.h <<_ACEOF
4387 #define CMK_HAS_PMI_GET_NID $pass
4388 _ACEOF
4391 #### test if Cray mesh topology will work ####
4392 cat > $tc <<EOT
4393 #include <rca_lib.h>
4395 int main() {
4396 rca_mesh_coord_t xyz;
4397 rca_get_meshcoord(0, &xyz);
4399 return 0;
4402 test_linkc "whether Cray rca library is available" "yes" "no" "$CRAY_RCA_POST_LINK_OPTS -lrca"
4404 cat >>confdefs.h <<_ACEOF
4405 #define CMK_HAS_RCALIB $pass
4406 _ACEOF
4409 #### test if Cray mesh dimension query function will work ####
4410 cat > $tc <<EOT
4411 #include <rca_lib.h>
4413 int main() {
4414 rca_mesh_coord_t xyz;
4415 rca_get_max_dimension(&xyz);
4417 return 0;
4420 test_linkc "whether Cray rca_has get_max_dimension" "yes" "no" "$CRAY_RCA_POST_LINK_OPTS -lrca"
4422 cat >>confdefs.h <<_ACEOF
4423 #define CMK_HAS_RCA_MAX_DIMENSION $pass
4424 _ACEOF
4427 #### query Cray machine max NID if get_max_dimension not exist ####
4429 if test $pass -eq 0
4430 then
4431 cmd=`which xtprocadmin 2>/dev/null`
4432 if test -n "$cmd"
4433 then
4434 #maxnid=`xtprocadmin | tail -1 | awk '{print $1}'`
4435 # workaround for hopper
4436 (export SHELL=/bin/csh; xtprocadmin >& t.$$)
4437 maxnid=`cat t.$$ | tail -1 | awk '{print $1}'`
4438 /bin/rm -f t.$$
4439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Cray machine maxnid" >&5
4440 $as_echo_n "checking Cray machine maxnid... " >&6; }
4441 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$maxnid\"" >&5
4442 $as_echo "\"$maxnid\"" >&6; }
4443 if test -n "$maxnid"
4444 then
4446 cat >>confdefs.h <<_ACEOF
4447 #define CMK_CRAY_MAXNID $maxnid
4448 _ACEOF
4457 #### query Cray machine supports BANDWIDTH_INJECTION controls####
4459 if test "$CMK_BUILD_MPI" = "1"
4460 then
4461 echo "BALANCED_INJECTION test disabled on MPI"
4462 elif test "$GNI_CRAYXC" = "1"
4463 then
4464 echo "BALANCED_INJECTION test disabled on Aries network"
4465 else
4466 cat > $tc <<EOT
4467 #include <stdint.h>
4468 #include <gni_pub.h>
4470 int main() {
4471 gni_bi_desc_t gni_bi_desc;
4472 uint32_t gni_device_id = 0;
4473 gni_return_t gni_rc = GNI_GetBIConfig(gni_device_id, &gni_bi_desc);
4474 if (gni_rc == GNI_RC_SUCCESS) {
4476 return 0;
4479 test_linkc "whether GNI_GetBIConfig exists" "yes" "no" ""
4481 cat >>confdefs.h <<_ACEOF
4482 #define CMK_BALANCED_INJECTION_API $pass
4483 _ACEOF
4485 fi # end of BIConfig test
4488 fi # end of Cray specific test
4490 #### test if it can build shared library ####
4491 cat > $t <<EOT
4492 #include "stdlib.h"
4493 extern int foo();
4494 int foo1() {
4495 void * t= malloc(2);
4496 foo();
4497 return 0;
4500 test_linkso "whether can build shared library" "yes" "no" ""
4501 if test $pass -eq 0
4502 then
4503 add_flag 'CMK_NO_BUILD_SHARED="true"' "build-shared"
4504 else
4505 BUILD_SHARED=1
4506 if test "$BUILD_MPI" = "1"
4507 then
4508 cat > $t <<EOT
4509 #include "stdlib.h"
4510 #include "mpi.h"
4511 extern int foo();
4512 int foo(int argc, char ** argv) {
4513 void * t= malloc(2);
4514 foo();
4515 MPI_Init(&argc, &argv);
4516 return 0;
4519 test_linkso "whether can build shared library with MPI" "yes" "no" ""
4520 BUILD_SHARED=$pass
4522 if test $BUILD_SHARED -eq 0
4523 then
4524 add_flag 'CMK_NO_BUILD_SHARED="true"' "build-shared"
4528 #### test the version number of bproc ####
4529 if test -n "$CMK_BPROC"
4530 then
4531 cat > $t <<EOT
4532 #include <stdio.h>
4533 #include <sys/bproc.h>
4534 int main()
4536 struct bproc_version_t vers;
4537 bproc_version(&vers);
4538 printf("%s\n", vers.version_string);
4541 test_link "whether bproc compiles" "yes" "no" "-lbproc"
4542 if test $pass -eq 1
4543 then
4544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking \"bproc version\"" >&5
4545 $as_echo_n "checking \"bproc version\"... " >&6; }
4546 bproc_ver=`./testlink`
4547 if test x$bproc_ver = x
4548 then
4549 test_result 0 "bproc version" "ERROR" ""
4550 test_finish 1
4551 else
4552 test_result 0 "bproc version" "$bproc_ver" ""
4554 bproc_ver=`echo $bproc_ver | cut -d'.' -f1`
4556 cat >>confdefs.h <<_ACEOF
4557 #define CMK_BPROC_VERSION $bproc_ver
4558 _ACEOF
4563 #### test the if command sync exists ####
4564 # Extract the first word of "sync", so it can be a program name with args.
4565 set dummy sync; ac_word=$2
4566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4567 $as_echo_n "checking for $ac_word... " >&6; }
4568 if ${ac_cv_prog_SYNC+:} false; then :
4569 $as_echo_n "(cached) " >&6
4570 else
4571 if test -n "$SYNC"; then
4572 ac_cv_prog_SYNC="$SYNC" # Let the user override the test.
4573 else
4574 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4575 for as_dir in $PATH
4577 IFS=$as_save_IFS
4578 test -z "$as_dir" && as_dir=.
4579 for ac_exec_ext in '' $ac_executable_extensions; do
4580 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4581 ac_cv_prog_SYNC="sync "
4582 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4583 break 2
4585 done
4586 done
4587 IFS=$as_save_IFS
4591 SYNC=$ac_cv_prog_SYNC
4592 if test -n "$SYNC"; then
4593 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYNC" >&5
4594 $as_echo "$SYNC" >&6; }
4595 else
4596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4597 $as_echo "no" >&6; }
4601 if test -n "$SYNC"
4602 then
4604 cat >>confdefs.h <<_ACEOF
4605 #define CMK_HAS_SYNC 1
4606 _ACEOF
4610 ################## Fortran #########################
4612 #echo "set F77 compiler as: $CMK_CF77"
4613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking \"F77 compiler as\"" >&5
4614 $as_echo_n "checking \"F77 compiler as\"... " >&6; }
4615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$CMK_CF77\"" >&5
4616 $as_echo "\"$CMK_CF77\"" >&6; }
4618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking \"whether Fortran 77 compiler works\"" >&5
4619 $as_echo_n "checking \"whether Fortran 77 compiler works\"... " >&6; }
4620 ### test fortran 77 compiler ###
4621 cat > conftest.f <<EOF
4622 SUBROUTINE FOO_foo
4625 $CMK_CF77 -c conftest.f > /dev/null 2> /dev/null
4626 if test ! -r conftest.o
4627 then
4628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"no\"" >&5
4629 $as_echo "\"no\"" >&6; }
4630 else
4631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"yes\"" >&5
4632 $as_echo "\"yes\"" >&6; }
4635 ### test fortran 90 compiler ###
4636 #echo "set F90 compiler as: $CMK_CF90"
4637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking \"F90 compiler as\"" >&5
4638 $as_echo_n "checking \"F90 compiler as\"... " >&6; }
4639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$CMK_CF90\"" >&5
4640 $as_echo "\"$CMK_CF90\"" >&6; }
4642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking \"whether Fortran 90 compiler works\"" >&5
4643 $as_echo_n "checking \"whether Fortran 90 compiler works\"... " >&6; }
4644 cat > conftest2.f90 <<EOF
4645 SUBROUTINE FOO_foo
4648 $CMK_CF90 -c conftest2.f90 > /dev/null 2> /dev/null
4649 if test ! -r conftest2.o
4650 then
4651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"no\"" >&5
4652 $as_echo "\"no\"" >&6; }
4653 else
4654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"yes\"" >&5
4655 $as_echo "\"yes\"" >&6; }
4656 mv -f conftest2.o conftest.o
4657 USE_FORTRAN90=1
4660 ### check fortran name mangling
4661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking subroutine name used by Fortran 90 compiler" >&5
4662 $as_echo_n "checking subroutine name used by Fortran 90 compiler... " >&6; }
4664 if test -r conftest.o
4665 then
4666 if ${_cv_fortran_postfix+:} false; then :
4667 $as_echo_n "(cached) " >&6
4668 else
4669 NAME=`$CMK_NM conftest.o | grep "foo_foo__"`
4670 if test "$NAME" != ""
4671 then
4672 _cv_fortran_postfix=TWOSCORE
4674 cat >>confdefs.h <<_ACEOF
4675 #define CMK_FORTRAN_USES_TWOSCORE 1
4676 _ACEOF
4678 else
4679 NAME=`$CMK_NM conftest.o | grep "foo_foo_"`
4680 if test "$NAME" != ""
4681 then
4682 _cv_fortran_postfix=ONESCORE
4684 cat >>confdefs.h <<_ACEOF
4685 #define CMK_FORTRAN_USES_ONESCORE 1
4686 _ACEOF
4688 else
4689 NAME=`$CMK_NM conftest.o | grep "foo_foo"`
4690 if test "$NAME" != ""
4691 then
4692 _cv_fortran_postfix=NOSCORE
4694 cat >>confdefs.h <<_ACEOF
4695 #define CMK_FORTRAN_USES_NOSCORE 1
4696 _ACEOF
4698 else
4699 NAME=`$CMK_NM conftest.o | grep "FOO_FOO"`
4700 if test "$NAME" != ""
4701 then
4702 _cv_fortran_postfix=ALLCAPS
4704 cat >>confdefs.h <<_ACEOF
4705 #define CMK_FORTRAN_USES_ALLCAPS 1
4706 _ACEOF
4708 else
4709 echo "#################################################"
4710 echo "FORTRAN compiler generated name not supported yet"
4711 echo "#################################################"
4716 rm -f conftest.f conftest.o
4720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_cv_fortran_postfix" >&5
4721 $as_echo "$_cv_fortran_postfix" >&6; }
4722 else
4723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"Fortran compiler not working\"" >&5
4724 $as_echo "\"Fortran compiler not working\"" >&6; }
4727 ### check module name ###
4729 if test "$USE_FORTRAN90" = 1
4730 then
4731 cat > conftest.f90 <<EOF
4732 MODULE testmod
4733 interface
4734 function fpup_issizing(p)
4735 INTEGER :: p
4736 logical fpup_issizing
4737 end function
4738 end interface
4739 END MODULE
4741 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Fortran 90 mod name is capital" >&5
4742 $as_echo_n "checking Fortran 90 mod name is capital... " >&6; }
4743 $CMK_CF90 -c conftest.f90 > /dev/null 2> /dev/null
4744 name=`ls TESTMOD.* 2>/dev/null`
4745 if test -n "$name"
4746 then
4747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"yes\"" >&5
4748 $as_echo "\"yes\"" >&6; }
4749 add_flag 'CMK_MOD_NAME_ALLCAPS=1' "mod name capital"
4750 else
4751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"no\"" >&5
4752 $as_echo "\"no\"" >&6; }
4753 name=`ls testmod.* 2>/dev/null`
4755 if test -n "$name"
4756 then
4757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Fortran 90 mod name extension" >&5
4758 $as_echo_n "checking Fortran 90 mod name extension... " >&6; }
4759 ext=`echo $name | sed -e 's/^[^.]*\.//'`
4760 add_flag 'CMK_MOD_EXT="'$ext'"' "mod name extension"
4761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$ext\"" >&5
4762 $as_echo "\"$ext\"" >&6; }
4763 /bin/rm -f $name
4765 /bin/rm -f conftest.f90
4768 ac_config_files="$ac_config_files libs/ck-libs/ampi/ampiCC"
4770 ac_config_commands="$ac_config_commands default"
4772 cat >confcache <<\_ACEOF
4773 # This file is a shell script that caches the results of configure
4774 # tests run on this system so they can be shared between configure
4775 # scripts and configure runs, see configure's option --config-cache.
4776 # It is not useful on other systems. If it contains results you don't
4777 # want to keep, you may remove or edit it.
4779 # config.status only pays attention to the cache file if you give it
4780 # the --recheck option to rerun configure.
4782 # `ac_cv_env_foo' variables (set or unset) will be overridden when
4783 # loading this file, other *unset* `ac_cv_foo' will be assigned the
4784 # following values.
4786 _ACEOF
4788 # The following way of writing the cache mishandles newlines in values,
4789 # but we know of no workaround that is simple, portable, and efficient.
4790 # So, we kill variables containing newlines.
4791 # Ultrix sh set writes to stderr and can't be redirected directly,
4792 # and sets the high bit in the cache file unless we assign to the vars.
4794 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
4795 eval ac_val=\$$ac_var
4796 case $ac_val in #(
4797 *${as_nl}*)
4798 case $ac_var in #(
4799 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
4800 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
4801 esac
4802 case $ac_var in #(
4803 _ | IFS | as_nl) ;; #(
4804 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
4805 *) { eval $ac_var=; unset $ac_var;} ;;
4806 esac ;;
4807 esac
4808 done
4810 (set) 2>&1 |
4811 case $as_nl`(ac_space=' '; set) 2>&1` in #(
4812 *${as_nl}ac_space=\ *)
4813 # `set' does not quote correctly, so add quotes: double-quote
4814 # substitution turns \\\\ into \\, and sed turns \\ into \.
4815 sed -n \
4816 "s/'/'\\\\''/g;
4817 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
4818 ;; #(
4820 # `set' quotes correctly as required by POSIX, so do not add quotes.
4821 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
4823 esac |
4824 sort
4826 sed '
4827 /^ac_cv_env_/b end
4828 t clear
4829 :clear
4830 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
4831 t end
4832 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
4833 :end' >>confcache
4834 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
4835 if test -w "$cache_file"; then
4836 if test "x$cache_file" != "x/dev/null"; then
4837 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
4838 $as_echo "$as_me: updating cache $cache_file" >&6;}
4839 if test ! -f "$cache_file" || test -h "$cache_file"; then
4840 cat confcache >"$cache_file"
4841 else
4842 case $cache_file in #(
4843 */* | ?:*)
4844 mv -f confcache "$cache_file"$$ &&
4845 mv -f "$cache_file"$$ "$cache_file" ;; #(
4847 mv -f confcache "$cache_file" ;;
4848 esac
4851 else
4852 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
4853 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
4856 rm -f confcache
4858 test "x$prefix" = xNONE && prefix=$ac_default_prefix
4859 # Let make expand exec_prefix.
4860 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4862 DEFS=-DHAVE_CONFIG_H
4864 ac_libobjs=
4865 ac_ltlibobjs=
4867 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
4868 # 1. Remove the extension, and $U if already installed.
4869 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
4870 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
4871 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
4872 # will be set to the directory where LIBOBJS objects are built.
4873 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
4874 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
4875 done
4876 LIBOBJS=$ac_libobjs
4878 LTLIBOBJS=$ac_ltlibobjs
4882 : "${CONFIG_STATUS=./config.status}"
4883 ac_write_fail=0
4884 ac_clean_files_save=$ac_clean_files
4885 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
4886 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
4887 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
4888 as_write_fail=0
4889 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
4890 #! $SHELL
4891 # Generated by $as_me.
4892 # Run this file to recreate the current configuration.
4893 # Compiler output produced by configure, useful for debugging
4894 # configure, is in config.log if it exists.
4896 debug=false
4897 ac_cs_recheck=false
4898 ac_cs_silent=false
4900 SHELL=\${CONFIG_SHELL-$SHELL}
4901 export SHELL
4902 _ASEOF
4903 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
4904 ## -------------------- ##
4905 ## M4sh Initialization. ##
4906 ## -------------------- ##
4908 # Be more Bourne compatible
4909 DUALCASE=1; export DUALCASE # for MKS sh
4910 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
4911 emulate sh
4912 NULLCMD=:
4913 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
4914 # is contrary to our usage. Disable this feature.
4915 alias -g '${1+"$@"}'='"$@"'
4916 setopt NO_GLOB_SUBST
4917 else
4918 case `(set -o) 2>/dev/null` in #(
4919 *posix*) :
4920 set -o posix ;; #(
4921 *) :
4923 esac
4927 as_nl='
4929 export as_nl
4930 # Printing a long string crashes Solaris 7 /usr/bin/printf.
4931 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
4932 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
4933 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
4934 # Prefer a ksh shell builtin over an external printf program on Solaris,
4935 # but without wasting forks for bash or zsh.
4936 if test -z "$BASH_VERSION$ZSH_VERSION" \
4937 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
4938 as_echo='print -r --'
4939 as_echo_n='print -rn --'
4940 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
4941 as_echo='printf %s\n'
4942 as_echo_n='printf %s'
4943 else
4944 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
4945 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
4946 as_echo_n='/usr/ucb/echo -n'
4947 else
4948 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
4949 as_echo_n_body='eval
4950 arg=$1;
4951 case $arg in #(
4952 *"$as_nl"*)
4953 expr "X$arg" : "X\\(.*\\)$as_nl";
4954 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
4955 esac;
4956 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
4958 export as_echo_n_body
4959 as_echo_n='sh -c $as_echo_n_body as_echo'
4961 export as_echo_body
4962 as_echo='sh -c $as_echo_body as_echo'
4965 # The user is always right.
4966 if test "${PATH_SEPARATOR+set}" != set; then
4967 PATH_SEPARATOR=:
4968 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
4969 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
4970 PATH_SEPARATOR=';'
4975 # IFS
4976 # We need space, tab and new line, in precisely that order. Quoting is
4977 # there to prevent editors from complaining about space-tab.
4978 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
4979 # splitting by setting IFS to empty value.)
4980 IFS=" "" $as_nl"
4982 # Find who we are. Look in the path if we contain no directory separator.
4983 as_myself=
4984 case $0 in #((
4985 *[\\/]* ) as_myself=$0 ;;
4986 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4987 for as_dir in $PATH
4989 IFS=$as_save_IFS
4990 test -z "$as_dir" && as_dir=.
4991 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
4992 done
4993 IFS=$as_save_IFS
4996 esac
4997 # We did not find ourselves, most probably we were run as `sh COMMAND'
4998 # in which case we are not to be found in the path.
4999 if test "x$as_myself" = x; then
5000 as_myself=$0
5002 if test ! -f "$as_myself"; then
5003 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
5004 exit 1
5007 # Unset variables that we do not need and which cause bugs (e.g. in
5008 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
5009 # suppresses any "Segmentation fault" message there. '((' could
5010 # trigger a bug in pdksh 5.2.14.
5011 for as_var in BASH_ENV ENV MAIL MAILPATH
5012 do eval test x\${$as_var+set} = xset \
5013 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
5014 done
5015 PS1='$ '
5016 PS2='> '
5017 PS4='+ '
5019 # NLS nuisances.
5020 LC_ALL=C
5021 export LC_ALL
5022 LANGUAGE=C
5023 export LANGUAGE
5025 # CDPATH.
5026 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
5029 # as_fn_error STATUS ERROR [LINENO LOG_FD]
5030 # ----------------------------------------
5031 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
5032 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
5033 # script with STATUS, using 1 if that was 0.
5034 as_fn_error ()
5036 as_status=$1; test $as_status -eq 0 && as_status=1
5037 if test "$4"; then
5038 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
5039 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
5041 $as_echo "$as_me: error: $2" >&2
5042 as_fn_exit $as_status
5043 } # as_fn_error
5046 # as_fn_set_status STATUS
5047 # -----------------------
5048 # Set $? to STATUS, without forking.
5049 as_fn_set_status ()
5051 return $1
5052 } # as_fn_set_status
5054 # as_fn_exit STATUS
5055 # -----------------
5056 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
5057 as_fn_exit ()
5059 set +e
5060 as_fn_set_status $1
5061 exit $1
5062 } # as_fn_exit
5064 # as_fn_unset VAR
5065 # ---------------
5066 # Portably unset VAR.
5067 as_fn_unset ()
5069 { eval $1=; unset $1;}
5071 as_unset=as_fn_unset
5072 # as_fn_append VAR VALUE
5073 # ----------------------
5074 # Append the text in VALUE to the end of the definition contained in VAR. Take
5075 # advantage of any shell optimizations that allow amortized linear growth over
5076 # repeated appends, instead of the typical quadratic growth present in naive
5077 # implementations.
5078 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
5079 eval 'as_fn_append ()
5081 eval $1+=\$2
5083 else
5084 as_fn_append ()
5086 eval $1=\$$1\$2
5088 fi # as_fn_append
5090 # as_fn_arith ARG...
5091 # ------------------
5092 # Perform arithmetic evaluation on the ARGs, and store the result in the
5093 # global $as_val. Take advantage of shells that can avoid forks. The arguments
5094 # must be portable across $(()) and expr.
5095 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
5096 eval 'as_fn_arith ()
5098 as_val=$(( $* ))
5100 else
5101 as_fn_arith ()
5103 as_val=`expr "$@" || test $? -eq 1`
5105 fi # as_fn_arith
5108 if expr a : '\(a\)' >/dev/null 2>&1 &&
5109 test "X`expr 00001 : '.*\(...\)'`" = X001; then
5110 as_expr=expr
5111 else
5112 as_expr=false
5115 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
5116 as_basename=basename
5117 else
5118 as_basename=false
5121 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
5122 as_dirname=dirname
5123 else
5124 as_dirname=false
5127 as_me=`$as_basename -- "$0" ||
5128 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
5129 X"$0" : 'X\(//\)$' \| \
5130 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
5131 $as_echo X/"$0" |
5132 sed '/^.*\/\([^/][^/]*\)\/*$/{
5133 s//\1/
5136 /^X\/\(\/\/\)$/{
5137 s//\1/
5140 /^X\/\(\/\).*/{
5141 s//\1/
5144 s/.*/./; q'`
5146 # Avoid depending upon Character Ranges.
5147 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
5148 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
5149 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
5150 as_cr_digits='0123456789'
5151 as_cr_alnum=$as_cr_Letters$as_cr_digits
5153 ECHO_C= ECHO_N= ECHO_T=
5154 case `echo -n x` in #(((((
5155 -n*)
5156 case `echo 'xy\c'` in
5157 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
5158 xy) ECHO_C='\c';;
5159 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
5160 ECHO_T=' ';;
5161 esac;;
5163 ECHO_N='-n';;
5164 esac
5166 rm -f conf$$ conf$$.exe conf$$.file
5167 if test -d conf$$.dir; then
5168 rm -f conf$$.dir/conf$$.file
5169 else
5170 rm -f conf$$.dir
5171 mkdir conf$$.dir 2>/dev/null
5173 if (echo >conf$$.file) 2>/dev/null; then
5174 if ln -s conf$$.file conf$$ 2>/dev/null; then
5175 as_ln_s='ln -s'
5176 # ... but there are two gotchas:
5177 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
5178 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
5179 # In both cases, we have to default to `cp -pR'.
5180 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
5181 as_ln_s='cp -pR'
5182 elif ln conf$$.file conf$$ 2>/dev/null; then
5183 as_ln_s=ln
5184 else
5185 as_ln_s='cp -pR'
5187 else
5188 as_ln_s='cp -pR'
5190 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
5191 rmdir conf$$.dir 2>/dev/null
5194 # as_fn_mkdir_p
5195 # -------------
5196 # Create "$as_dir" as a directory, including parents if necessary.
5197 as_fn_mkdir_p ()
5200 case $as_dir in #(
5201 -*) as_dir=./$as_dir;;
5202 esac
5203 test -d "$as_dir" || eval $as_mkdir_p || {
5204 as_dirs=
5205 while :; do
5206 case $as_dir in #(
5207 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
5208 *) as_qdir=$as_dir;;
5209 esac
5210 as_dirs="'$as_qdir' $as_dirs"
5211 as_dir=`$as_dirname -- "$as_dir" ||
5212 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
5213 X"$as_dir" : 'X\(//\)[^/]' \| \
5214 X"$as_dir" : 'X\(//\)$' \| \
5215 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
5216 $as_echo X"$as_dir" |
5217 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
5218 s//\1/
5221 /^X\(\/\/\)[^/].*/{
5222 s//\1/
5225 /^X\(\/\/\)$/{
5226 s//\1/
5229 /^X\(\/\).*/{
5230 s//\1/
5233 s/.*/./; q'`
5234 test -d "$as_dir" && break
5235 done
5236 test -z "$as_dirs" || eval "mkdir $as_dirs"
5237 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
5240 } # as_fn_mkdir_p
5241 if mkdir -p . 2>/dev/null; then
5242 as_mkdir_p='mkdir -p "$as_dir"'
5243 else
5244 test -d ./-p && rmdir ./-p
5245 as_mkdir_p=false
5249 # as_fn_executable_p FILE
5250 # -----------------------
5251 # Test if FILE is an executable regular file.
5252 as_fn_executable_p ()
5254 test -f "$1" && test -x "$1"
5255 } # as_fn_executable_p
5256 as_test_x='test -x'
5257 as_executable_p=as_fn_executable_p
5259 # Sed expression to map a string onto a valid CPP name.
5260 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
5262 # Sed expression to map a string onto a valid variable name.
5263 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
5266 exec 6>&1
5267 ## ----------------------------------- ##
5268 ## Main body of $CONFIG_STATUS script. ##
5269 ## ----------------------------------- ##
5270 _ASEOF
5271 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
5273 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
5274 # Save the log message, to keep $0 and so on meaningful, and to
5275 # report actual input values of CONFIG_FILES etc. instead of their
5276 # values after options handling.
5277 ac_log="
5278 This file was extended by $as_me, which was
5279 generated by GNU Autoconf 2.69. Invocation command line was
5281 CONFIG_FILES = $CONFIG_FILES
5282 CONFIG_HEADERS = $CONFIG_HEADERS
5283 CONFIG_LINKS = $CONFIG_LINKS
5284 CONFIG_COMMANDS = $CONFIG_COMMANDS
5285 $ $0 $@
5287 on `(hostname || uname -n) 2>/dev/null | sed 1q`
5290 _ACEOF
5292 case $ac_config_files in *"
5293 "*) set x $ac_config_files; shift; ac_config_files=$*;;
5294 esac
5296 case $ac_config_headers in *"
5297 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
5298 esac
5301 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
5302 # Files that config.status was made for.
5303 config_files="$ac_config_files"
5304 config_headers="$ac_config_headers"
5305 config_commands="$ac_config_commands"
5307 _ACEOF
5309 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
5310 ac_cs_usage="\
5311 \`$as_me' instantiates files and other configuration actions
5312 from templates according to the current configuration. Unless the files
5313 and actions are specified as TAGs, all are instantiated by default.
5315 Usage: $0 [OPTION]... [TAG]...
5317 -h, --help print this help, then exit
5318 -V, --version print version number and configuration settings, then exit
5319 --config print configuration, then exit
5320 -q, --quiet, --silent
5321 do not print progress messages
5322 -d, --debug don't remove temporary files
5323 --recheck update $as_me by reconfiguring in the same conditions
5324 --file=FILE[:TEMPLATE]
5325 instantiate the configuration file FILE
5326 --header=FILE[:TEMPLATE]
5327 instantiate the configuration header FILE
5329 Configuration files:
5330 $config_files
5332 Configuration headers:
5333 $config_headers
5335 Configuration commands:
5336 $config_commands
5338 Report bugs to the package provider."
5340 _ACEOF
5341 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
5342 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
5343 ac_cs_version="\\
5344 config.status
5345 configured by $0, generated by GNU Autoconf 2.69,
5346 with options \\"\$ac_cs_config\\"
5348 Copyright (C) 2012 Free Software Foundation, Inc.
5349 This config.status script is free software; the Free Software Foundation
5350 gives unlimited permission to copy, distribute and modify it."
5352 ac_pwd='$ac_pwd'
5353 srcdir='$srcdir'
5354 test -n "\$AWK" || AWK=awk
5355 _ACEOF
5357 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
5358 # The default lists apply if the user does not specify any file.
5359 ac_need_defaults=:
5360 while test $# != 0
5362 case $1 in
5363 --*=?*)
5364 ac_option=`expr "X$1" : 'X\([^=]*\)='`
5365 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
5366 ac_shift=:
5368 --*=)
5369 ac_option=`expr "X$1" : 'X\([^=]*\)='`
5370 ac_optarg=
5371 ac_shift=:
5374 ac_option=$1
5375 ac_optarg=$2
5376 ac_shift=shift
5378 esac
5380 case $ac_option in
5381 # Handling of the options.
5382 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
5383 ac_cs_recheck=: ;;
5384 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
5385 $as_echo "$ac_cs_version"; exit ;;
5386 --config | --confi | --conf | --con | --co | --c )
5387 $as_echo "$ac_cs_config"; exit ;;
5388 --debug | --debu | --deb | --de | --d | -d )
5389 debug=: ;;
5390 --file | --fil | --fi | --f )
5391 $ac_shift
5392 case $ac_optarg in
5393 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
5394 '') as_fn_error $? "missing file argument" ;;
5395 esac
5396 as_fn_append CONFIG_FILES " '$ac_optarg'"
5397 ac_need_defaults=false;;
5398 --header | --heade | --head | --hea )
5399 $ac_shift
5400 case $ac_optarg in
5401 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
5402 esac
5403 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
5404 ac_need_defaults=false;;
5405 --he | --h)
5406 # Conflict between --help and --header
5407 as_fn_error $? "ambiguous option: \`$1'
5408 Try \`$0 --help' for more information.";;
5409 --help | --hel | -h )
5410 $as_echo "$ac_cs_usage"; exit ;;
5411 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
5412 | -silent | --silent | --silen | --sile | --sil | --si | --s)
5413 ac_cs_silent=: ;;
5415 # This is an error.
5416 -*) as_fn_error $? "unrecognized option: \`$1'
5417 Try \`$0 --help' for more information." ;;
5419 *) as_fn_append ac_config_targets " $1"
5420 ac_need_defaults=false ;;
5422 esac
5423 shift
5424 done
5426 ac_configure_extra_args=
5428 if $ac_cs_silent; then
5429 exec 6>/dev/null
5430 ac_configure_extra_args="$ac_configure_extra_args --silent"
5433 _ACEOF
5434 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
5435 if \$ac_cs_recheck; then
5436 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
5437 shift
5438 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
5439 CONFIG_SHELL='$SHELL'
5440 export CONFIG_SHELL
5441 exec "\$@"
5444 _ACEOF
5445 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
5446 exec 5>>config.log
5448 echo
5449 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
5450 ## Running $as_me. ##
5451 _ASBOX
5452 $as_echo "$ac_log"
5453 } >&5
5455 _ACEOF
5456 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
5457 _ACEOF
5459 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
5461 # Handling of arguments.
5462 for ac_config_target in $ac_config_targets
5464 case $ac_config_target in
5465 "conv-autoconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS conv-autoconfig.h" ;;
5466 "config-cleanup") CONFIG_COMMANDS="$CONFIG_COMMANDS config-cleanup" ;;
5467 "libs/ck-libs/ampi/ampiCC") CONFIG_FILES="$CONFIG_FILES libs/ck-libs/ampi/ampiCC" ;;
5468 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
5470 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
5471 esac
5472 done
5475 # If the user did not use the arguments to specify the items to instantiate,
5476 # then the envvar interface is used. Set only those that are not.
5477 # We use the long form for the default assignment because of an extremely
5478 # bizarre bug on SunOS 4.1.3.
5479 if $ac_need_defaults; then
5480 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
5481 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
5482 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
5485 # Have a temporary directory for convenience. Make it in the build tree
5486 # simply because there is no reason against having it here, and in addition,
5487 # creating and moving files from /tmp can sometimes cause problems.
5488 # Hook for its removal unless debugging.
5489 # Note that there is a small window in which the directory will not be cleaned:
5490 # after its creation but before its name has been assigned to `$tmp'.
5491 $debug ||
5493 tmp= ac_tmp=
5494 trap 'exit_status=$?
5495 : "${ac_tmp:=$tmp}"
5496 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
5498 trap 'as_fn_exit 1' 1 2 13 15
5500 # Create a (secure) tmp directory for tmp files.
5503 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
5504 test -d "$tmp"
5505 } ||
5507 tmp=./conf$$-$RANDOM
5508 (umask 077 && mkdir "$tmp")
5509 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
5510 ac_tmp=$tmp
5512 # Set up the scripts for CONFIG_FILES section.
5513 # No need to generate them if there are no CONFIG_FILES.
5514 # This happens for instance with `./config.status config.h'.
5515 if test -n "$CONFIG_FILES"; then
5518 ac_cr=`echo X | tr X '\015'`
5519 # On cygwin, bash can eat \r inside `` if the user requested igncr.
5520 # But we know of no other shell where ac_cr would be empty at this
5521 # point, so we can use a bashism as a fallback.
5522 if test "x$ac_cr" = x; then
5523 eval ac_cr=\$\'\\r\'
5525 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
5526 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
5527 ac_cs_awk_cr='\\r'
5528 else
5529 ac_cs_awk_cr=$ac_cr
5532 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
5533 _ACEOF
5537 echo "cat >conf$$subs.awk <<_ACEOF" &&
5538 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
5539 echo "_ACEOF"
5540 } >conf$$subs.sh ||
5541 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
5542 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
5543 ac_delim='%!_!# '
5544 for ac_last_try in false false false false false :; do
5545 . ./conf$$subs.sh ||
5546 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
5548 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
5549 if test $ac_delim_n = $ac_delim_num; then
5550 break
5551 elif $ac_last_try; then
5552 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
5553 else
5554 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
5556 done
5557 rm -f conf$$subs.sh
5559 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
5560 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
5561 _ACEOF
5562 sed -n '
5564 s/^/S["/; s/!.*/"]=/
5567 s/^[^!]*!//
5568 :repl
5569 t repl
5570 s/'"$ac_delim"'$//
5571 t delim
5574 s/\(.\{148\}\)..*/\1/
5575 t more1
5576 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
5579 b repl
5580 :more1
5581 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
5584 s/.\{148\}//
5585 t nl
5586 :delim
5588 s/\(.\{148\}\)..*/\1/
5589 t more2
5590 s/["\\]/\\&/g; s/^/"/; s/$/"/
5593 :more2
5594 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
5597 s/.\{148\}//
5598 t delim
5599 ' <conf$$subs.awk | sed '
5600 /^[^""]/{
5602 s/\n//
5604 ' >>$CONFIG_STATUS || ac_write_fail=1
5605 rm -f conf$$subs.awk
5606 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
5607 _ACAWK
5608 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
5609 for (key in S) S_is_set[key] = 1
5610 FS = "\a"
5614 line = $ 0
5615 nfields = split(line, field, "@")
5616 substed = 0
5617 len = length(field[1])
5618 for (i = 2; i < nfields; i++) {
5619 key = field[i]
5620 keylen = length(key)
5621 if (S_is_set[key]) {
5622 value = S[key]
5623 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
5624 len += length(value) + length(field[++i])
5625 substed = 1
5626 } else
5627 len += 1 + keylen
5630 print line
5633 _ACAWK
5634 _ACEOF
5635 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
5636 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
5637 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
5638 else
5640 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
5641 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
5642 _ACEOF
5644 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
5645 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
5646 # trailing colons and then remove the whole line if VPATH becomes empty
5647 # (actually we leave an empty line to preserve line numbers).
5648 if test "x$srcdir" = x.; then
5649 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
5651 s///
5652 s/^/:/
5653 s/[ ]*$/:/
5654 s/:\$(srcdir):/:/g
5655 s/:\${srcdir}:/:/g
5656 s/:@srcdir@:/:/g
5657 s/^:*//
5658 s/:*$//
5660 s/\(=[ ]*\).*/\1/
5662 s/\n//
5663 s/^[^=]*=[ ]*$//
5667 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
5668 fi # test -n "$CONFIG_FILES"
5670 # Set up the scripts for CONFIG_HEADERS section.
5671 # No need to generate them if there are no CONFIG_HEADERS.
5672 # This happens for instance with `./config.status Makefile'.
5673 if test -n "$CONFIG_HEADERS"; then
5674 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
5675 BEGIN {
5676 _ACEOF
5678 # Transform confdefs.h into an awk script `defines.awk', embedded as
5679 # here-document in config.status, that substitutes the proper values into
5680 # config.h.in to produce config.h.
5682 # Create a delimiter string that does not exist in confdefs.h, to ease
5683 # handling of long lines.
5684 ac_delim='%!_!# '
5685 for ac_last_try in false false :; do
5686 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
5687 if test -z "$ac_tt"; then
5688 break
5689 elif $ac_last_try; then
5690 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
5691 else
5692 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
5694 done
5696 # For the awk script, D is an array of macro values keyed by name,
5697 # likewise P contains macro parameters if any. Preserve backslash
5698 # newline sequences.
5700 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
5701 sed -n '
5702 s/.\{148\}/&'"$ac_delim"'/g
5703 t rset
5704 :rset
5705 s/^[ ]*#[ ]*define[ ][ ]*/ /
5706 t def
5708 :def
5709 s/\\$//
5710 t bsnl
5711 s/["\\]/\\&/g
5712 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
5713 D["\1"]=" \3"/p
5714 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
5716 :bsnl
5717 s/["\\]/\\&/g
5718 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
5719 D["\1"]=" \3\\\\\\n"\\/p
5720 t cont
5721 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
5722 t cont
5724 :cont
5726 s/.\{148\}/&'"$ac_delim"'/g
5727 t clear
5728 :clear
5729 s/\\$//
5730 t bsnlc
5731 s/["\\]/\\&/g; s/^/"/; s/$/"/p
5733 :bsnlc
5734 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
5735 b cont
5736 ' <confdefs.h | sed '
5737 s/'"$ac_delim"'/"\\\
5738 "/g' >>$CONFIG_STATUS || ac_write_fail=1
5740 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
5741 for (key in D) D_is_set[key] = 1
5742 FS = "\a"
5744 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
5745 line = \$ 0
5746 split(line, arg, " ")
5747 if (arg[1] == "#") {
5748 defundef = arg[2]
5749 mac1 = arg[3]
5750 } else {
5751 defundef = substr(arg[1], 2)
5752 mac1 = arg[2]
5754 split(mac1, mac2, "(") #)
5755 macro = mac2[1]
5756 prefix = substr(line, 1, index(line, defundef) - 1)
5757 if (D_is_set[macro]) {
5758 # Preserve the white space surrounding the "#".
5759 print prefix "define", macro P[macro] D[macro]
5760 next
5761 } else {
5762 # Replace #undef with comments. This is necessary, for example,
5763 # in the case of _POSIX_SOURCE, which is predefined and required
5764 # on some systems where configure will not decide to define it.
5765 if (defundef == "undef") {
5766 print "/*", prefix defundef, macro, "*/"
5767 next
5771 { print }
5772 _ACAWK
5773 _ACEOF
5774 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
5775 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
5776 fi # test -n "$CONFIG_HEADERS"
5779 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
5780 shift
5781 for ac_tag
5783 case $ac_tag in
5784 :[FHLC]) ac_mode=$ac_tag; continue;;
5785 esac
5786 case $ac_mode$ac_tag in
5787 :[FHL]*:*);;
5788 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
5789 :[FH]-) ac_tag=-:-;;
5790 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
5791 esac
5792 ac_save_IFS=$IFS
5793 IFS=:
5794 set x $ac_tag
5795 IFS=$ac_save_IFS
5796 shift
5797 ac_file=$1
5798 shift
5800 case $ac_mode in
5801 :L) ac_source=$1;;
5802 :[FH])
5803 ac_file_inputs=
5804 for ac_f
5806 case $ac_f in
5807 -) ac_f="$ac_tmp/stdin";;
5808 *) # Look for the file first in the build tree, then in the source tree
5809 # (if the path is not absolute). The absolute path cannot be DOS-style,
5810 # because $ac_f cannot contain `:'.
5811 test -f "$ac_f" ||
5812 case $ac_f in
5813 [\\/$]*) false;;
5814 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
5815 esac ||
5816 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
5817 esac
5818 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
5819 as_fn_append ac_file_inputs " '$ac_f'"
5820 done
5822 # Let's still pretend it is `configure' which instantiates (i.e., don't
5823 # use $as_me), people would be surprised to read:
5824 # /* config.h. Generated by config.status. */
5825 configure_input='Generated from '`
5826 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
5827 `' by configure.'
5828 if test x"$ac_file" != x-; then
5829 configure_input="$ac_file. $configure_input"
5830 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
5831 $as_echo "$as_me: creating $ac_file" >&6;}
5833 # Neutralize special characters interpreted by sed in replacement strings.
5834 case $configure_input in #(
5835 *\&* | *\|* | *\\* )
5836 ac_sed_conf_input=`$as_echo "$configure_input" |
5837 sed 's/[\\\\&|]/\\\\&/g'`;; #(
5838 *) ac_sed_conf_input=$configure_input;;
5839 esac
5841 case $ac_tag in
5842 *:-:* | *:-) cat >"$ac_tmp/stdin" \
5843 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
5844 esac
5846 esac
5848 ac_dir=`$as_dirname -- "$ac_file" ||
5849 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
5850 X"$ac_file" : 'X\(//\)[^/]' \| \
5851 X"$ac_file" : 'X\(//\)$' \| \
5852 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
5853 $as_echo X"$ac_file" |
5854 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
5855 s//\1/
5858 /^X\(\/\/\)[^/].*/{
5859 s//\1/
5862 /^X\(\/\/\)$/{
5863 s//\1/
5866 /^X\(\/\).*/{
5867 s//\1/
5870 s/.*/./; q'`
5871 as_dir="$ac_dir"; as_fn_mkdir_p
5872 ac_builddir=.
5874 case "$ac_dir" in
5875 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
5877 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
5878 # A ".." for each directory in $ac_dir_suffix.
5879 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
5880 case $ac_top_builddir_sub in
5881 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
5882 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
5883 esac ;;
5884 esac
5885 ac_abs_top_builddir=$ac_pwd
5886 ac_abs_builddir=$ac_pwd$ac_dir_suffix
5887 # for backward compatibility:
5888 ac_top_builddir=$ac_top_build_prefix
5890 case $srcdir in
5891 .) # We are building in place.
5892 ac_srcdir=.
5893 ac_top_srcdir=$ac_top_builddir_sub
5894 ac_abs_top_srcdir=$ac_pwd ;;
5895 [\\/]* | ?:[\\/]* ) # Absolute name.
5896 ac_srcdir=$srcdir$ac_dir_suffix;
5897 ac_top_srcdir=$srcdir
5898 ac_abs_top_srcdir=$srcdir ;;
5899 *) # Relative name.
5900 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
5901 ac_top_srcdir=$ac_top_build_prefix$srcdir
5902 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
5903 esac
5904 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
5907 case $ac_mode in
5910 # CONFIG_FILE
5913 _ACEOF
5915 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
5916 # If the template does not know about datarootdir, expand it.
5917 # FIXME: This hack should be removed a few years after 2.60.
5918 ac_datarootdir_hack=; ac_datarootdir_seen=
5919 ac_sed_dataroot='
5920 /datarootdir/ {
5924 /@datadir@/p
5925 /@docdir@/p
5926 /@infodir@/p
5927 /@localedir@/p
5928 /@mandir@/p'
5929 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
5930 *datarootdir*) ac_datarootdir_seen=yes;;
5931 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
5932 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
5933 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
5934 _ACEOF
5935 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
5936 ac_datarootdir_hack='
5937 s&@datadir@&$datadir&g
5938 s&@docdir@&$docdir&g
5939 s&@infodir@&$infodir&g
5940 s&@localedir@&$localedir&g
5941 s&@mandir@&$mandir&g
5942 s&\\\${datarootdir}&$datarootdir&g' ;;
5943 esac
5944 _ACEOF
5946 # Neutralize VPATH when `$srcdir' = `.'.
5947 # Shell code in configure.ac might set extrasub.
5948 # FIXME: do we really want to maintain this feature?
5949 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
5950 ac_sed_extra="$ac_vpsub
5951 $extrasub
5952 _ACEOF
5953 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
5955 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
5956 s|@configure_input@|$ac_sed_conf_input|;t t
5957 s&@top_builddir@&$ac_top_builddir_sub&;t t
5958 s&@top_build_prefix@&$ac_top_build_prefix&;t t
5959 s&@srcdir@&$ac_srcdir&;t t
5960 s&@abs_srcdir@&$ac_abs_srcdir&;t t
5961 s&@top_srcdir@&$ac_top_srcdir&;t t
5962 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
5963 s&@builddir@&$ac_builddir&;t t
5964 s&@abs_builddir@&$ac_abs_builddir&;t t
5965 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
5966 $ac_datarootdir_hack
5968 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
5969 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
5971 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
5972 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
5973 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
5974 "$ac_tmp/out"`; test -z "$ac_out"; } &&
5975 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
5976 which seems to be undefined. Please make sure it is defined" >&5
5977 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
5978 which seems to be undefined. Please make sure it is defined" >&2;}
5980 rm -f "$ac_tmp/stdin"
5981 case $ac_file in
5982 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
5983 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
5984 esac \
5985 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
5989 # CONFIG_HEADER
5991 if test x"$ac_file" != x-; then
5993 $as_echo "/* $configure_input */" \
5994 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
5995 } >"$ac_tmp/config.h" \
5996 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
5997 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
5998 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
5999 $as_echo "$as_me: $ac_file is unchanged" >&6;}
6000 else
6001 rm -f "$ac_file"
6002 mv "$ac_tmp/config.h" "$ac_file" \
6003 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
6005 else
6006 $as_echo "/* $configure_input */" \
6007 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
6008 || as_fn_error $? "could not create -" "$LINENO" 5
6012 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
6013 $as_echo "$as_me: executing $ac_file commands" >&6;}
6015 esac
6018 case $ac_file$ac_mode in
6019 "config-cleanup":C) sed -i -e 's:^#define\s\+PACKAGE://&:' conv-autoconfig.h ;;
6020 "default":C) chmod +x libs/ck-libs/ampi/ampiCC
6023 esac
6024 done # for ac_tag
6027 as_fn_exit 0
6028 _ACEOF
6029 ac_clean_files=$ac_clean_files_save
6031 test $ac_write_fail = 0 ||
6032 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
6035 # configure is writing to config.log, and then calls config.status.
6036 # config.status does its own redirection, appending to config.log.
6037 # Unfortunately, on DOS this fails, as config.log is still kept open
6038 # by configure, so config.status won't be able to write to it; its
6039 # output is simply discarded. So we exec the FD to /dev/null,
6040 # effectively closing config.log, so it can be properly (re)opened and
6041 # appended to by config.status. When coming back to configure, we
6042 # need to make the FD available again.
6043 if test "$no_create" != yes; then
6044 ac_cs_success=:
6045 ac_config_status_args=
6046 test "$silent" = yes &&
6047 ac_config_status_args="$ac_config_status_args --quiet"
6048 exec 5>/dev/null
6049 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
6050 exec 5>>config.log
6051 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
6052 # would make configure fail if this is the last instruction.
6053 $ac_cs_success || as_fn_exit 1
6055 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
6056 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
6057 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}