Feature #975: Add new OFI LRTS machine.
[charm.git] / src / scripts / configure
blobb2bf4c53d9ef4544478a1548bb0a6641948cc85c
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
648 ac_precious_vars='build_alias
649 host_alias
650 target_alias'
653 # Initialize some variables set by options.
654 ac_init_help=
655 ac_init_version=false
656 ac_unrecognized_opts=
657 ac_unrecognized_sep=
658 # The variables have the same names as the options, with
659 # dashes changed to underlines.
660 cache_file=/dev/null
661 exec_prefix=NONE
662 no_create=
663 no_recursion=
664 prefix=NONE
665 program_prefix=NONE
666 program_suffix=NONE
667 program_transform_name=s,x,x,
668 silent=
669 site=
670 srcdir=
671 verbose=
672 x_includes=NONE
673 x_libraries=NONE
675 # Installation directory options.
676 # These are left unexpanded so users can "make install exec_prefix=/foo"
677 # and all the variables that are supposed to be based on exec_prefix
678 # by default will actually change.
679 # Use braces instead of parens because sh, perl, etc. also accept them.
680 # (The list follows the same order as the GNU Coding Standards.)
681 bindir='${exec_prefix}/bin'
682 sbindir='${exec_prefix}/sbin'
683 libexecdir='${exec_prefix}/libexec'
684 datarootdir='${prefix}/share'
685 datadir='${datarootdir}'
686 sysconfdir='${prefix}/etc'
687 sharedstatedir='${prefix}/com'
688 localstatedir='${prefix}/var'
689 includedir='${prefix}/include'
690 oldincludedir='/usr/include'
691 docdir='${datarootdir}/doc/${PACKAGE}'
692 infodir='${datarootdir}/info'
693 htmldir='${docdir}'
694 dvidir='${docdir}'
695 pdfdir='${docdir}'
696 psdir='${docdir}'
697 libdir='${exec_prefix}/lib'
698 localedir='${datarootdir}/locale'
699 mandir='${datarootdir}/man'
701 ac_prev=
702 ac_dashdash=
703 for ac_option
705 # If the previous option needs an argument, assign it.
706 if test -n "$ac_prev"; then
707 eval $ac_prev=\$ac_option
708 ac_prev=
709 continue
712 case $ac_option in
713 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
714 *=) ac_optarg= ;;
715 *) ac_optarg=yes ;;
716 esac
718 # Accept the important Cygnus configure options, so we can diagnose typos.
720 case $ac_dashdash$ac_option in
722 ac_dashdash=yes ;;
724 -bindir | --bindir | --bindi | --bind | --bin | --bi)
725 ac_prev=bindir ;;
726 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
727 bindir=$ac_optarg ;;
729 -build | --build | --buil | --bui | --bu)
730 ac_prev=build_alias ;;
731 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
732 build_alias=$ac_optarg ;;
734 -cache-file | --cache-file | --cache-fil | --cache-fi \
735 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
736 ac_prev=cache_file ;;
737 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
738 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
739 cache_file=$ac_optarg ;;
741 --config-cache | -C)
742 cache_file=config.cache ;;
744 -datadir | --datadir | --datadi | --datad)
745 ac_prev=datadir ;;
746 -datadir=* | --datadir=* | --datadi=* | --datad=*)
747 datadir=$ac_optarg ;;
749 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
750 | --dataroo | --dataro | --datar)
751 ac_prev=datarootdir ;;
752 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
753 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
754 datarootdir=$ac_optarg ;;
756 -disable-* | --disable-*)
757 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
758 # Reject names that are not valid shell variable names.
759 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
760 as_fn_error $? "invalid feature name: $ac_useropt"
761 ac_useropt_orig=$ac_useropt
762 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
763 case $ac_user_opts in
765 "enable_$ac_useropt"
766 "*) ;;
767 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
768 ac_unrecognized_sep=', ';;
769 esac
770 eval enable_$ac_useropt=no ;;
772 -docdir | --docdir | --docdi | --doc | --do)
773 ac_prev=docdir ;;
774 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
775 docdir=$ac_optarg ;;
777 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
778 ac_prev=dvidir ;;
779 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
780 dvidir=$ac_optarg ;;
782 -enable-* | --enable-*)
783 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
784 # Reject names that are not valid shell variable names.
785 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
786 as_fn_error $? "invalid feature name: $ac_useropt"
787 ac_useropt_orig=$ac_useropt
788 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
789 case $ac_user_opts in
791 "enable_$ac_useropt"
792 "*) ;;
793 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
794 ac_unrecognized_sep=', ';;
795 esac
796 eval enable_$ac_useropt=\$ac_optarg ;;
798 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
799 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
800 | --exec | --exe | --ex)
801 ac_prev=exec_prefix ;;
802 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
803 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
804 | --exec=* | --exe=* | --ex=*)
805 exec_prefix=$ac_optarg ;;
807 -gas | --gas | --ga | --g)
808 # Obsolete; use --with-gas.
809 with_gas=yes ;;
811 -help | --help | --hel | --he | -h)
812 ac_init_help=long ;;
813 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
814 ac_init_help=recursive ;;
815 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
816 ac_init_help=short ;;
818 -host | --host | --hos | --ho)
819 ac_prev=host_alias ;;
820 -host=* | --host=* | --hos=* | --ho=*)
821 host_alias=$ac_optarg ;;
823 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
824 ac_prev=htmldir ;;
825 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
826 | --ht=*)
827 htmldir=$ac_optarg ;;
829 -includedir | --includedir | --includedi | --included | --include \
830 | --includ | --inclu | --incl | --inc)
831 ac_prev=includedir ;;
832 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
833 | --includ=* | --inclu=* | --incl=* | --inc=*)
834 includedir=$ac_optarg ;;
836 -infodir | --infodir | --infodi | --infod | --info | --inf)
837 ac_prev=infodir ;;
838 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
839 infodir=$ac_optarg ;;
841 -libdir | --libdir | --libdi | --libd)
842 ac_prev=libdir ;;
843 -libdir=* | --libdir=* | --libdi=* | --libd=*)
844 libdir=$ac_optarg ;;
846 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
847 | --libexe | --libex | --libe)
848 ac_prev=libexecdir ;;
849 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
850 | --libexe=* | --libex=* | --libe=*)
851 libexecdir=$ac_optarg ;;
853 -localedir | --localedir | --localedi | --localed | --locale)
854 ac_prev=localedir ;;
855 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
856 localedir=$ac_optarg ;;
858 -localstatedir | --localstatedir | --localstatedi | --localstated \
859 | --localstate | --localstat | --localsta | --localst | --locals)
860 ac_prev=localstatedir ;;
861 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
862 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
863 localstatedir=$ac_optarg ;;
865 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
866 ac_prev=mandir ;;
867 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
868 mandir=$ac_optarg ;;
870 -nfp | --nfp | --nf)
871 # Obsolete; use --without-fp.
872 with_fp=no ;;
874 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
875 | --no-cr | --no-c | -n)
876 no_create=yes ;;
878 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
879 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
880 no_recursion=yes ;;
882 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
883 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
884 | --oldin | --oldi | --old | --ol | --o)
885 ac_prev=oldincludedir ;;
886 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
887 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
888 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
889 oldincludedir=$ac_optarg ;;
891 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
892 ac_prev=prefix ;;
893 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
894 prefix=$ac_optarg ;;
896 -program-prefix | --program-prefix | --program-prefi | --program-pref \
897 | --program-pre | --program-pr | --program-p)
898 ac_prev=program_prefix ;;
899 -program-prefix=* | --program-prefix=* | --program-prefi=* \
900 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
901 program_prefix=$ac_optarg ;;
903 -program-suffix | --program-suffix | --program-suffi | --program-suff \
904 | --program-suf | --program-su | --program-s)
905 ac_prev=program_suffix ;;
906 -program-suffix=* | --program-suffix=* | --program-suffi=* \
907 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
908 program_suffix=$ac_optarg ;;
910 -program-transform-name | --program-transform-name \
911 | --program-transform-nam | --program-transform-na \
912 | --program-transform-n | --program-transform- \
913 | --program-transform | --program-transfor \
914 | --program-transfo | --program-transf \
915 | --program-trans | --program-tran \
916 | --progr-tra | --program-tr | --program-t)
917 ac_prev=program_transform_name ;;
918 -program-transform-name=* | --program-transform-name=* \
919 | --program-transform-nam=* | --program-transform-na=* \
920 | --program-transform-n=* | --program-transform-=* \
921 | --program-transform=* | --program-transfor=* \
922 | --program-transfo=* | --program-transf=* \
923 | --program-trans=* | --program-tran=* \
924 | --progr-tra=* | --program-tr=* | --program-t=*)
925 program_transform_name=$ac_optarg ;;
927 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
928 ac_prev=pdfdir ;;
929 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
930 pdfdir=$ac_optarg ;;
932 -psdir | --psdir | --psdi | --psd | --ps)
933 ac_prev=psdir ;;
934 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
935 psdir=$ac_optarg ;;
937 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
938 | -silent | --silent | --silen | --sile | --sil)
939 silent=yes ;;
941 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
942 ac_prev=sbindir ;;
943 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
944 | --sbi=* | --sb=*)
945 sbindir=$ac_optarg ;;
947 -sharedstatedir | --sharedstatedir | --sharedstatedi \
948 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
949 | --sharedst | --shareds | --shared | --share | --shar \
950 | --sha | --sh)
951 ac_prev=sharedstatedir ;;
952 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
953 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
954 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
955 | --sha=* | --sh=*)
956 sharedstatedir=$ac_optarg ;;
958 -site | --site | --sit)
959 ac_prev=site ;;
960 -site=* | --site=* | --sit=*)
961 site=$ac_optarg ;;
963 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
964 ac_prev=srcdir ;;
965 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
966 srcdir=$ac_optarg ;;
968 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
969 | --syscon | --sysco | --sysc | --sys | --sy)
970 ac_prev=sysconfdir ;;
971 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
972 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
973 sysconfdir=$ac_optarg ;;
975 -target | --target | --targe | --targ | --tar | --ta | --t)
976 ac_prev=target_alias ;;
977 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
978 target_alias=$ac_optarg ;;
980 -v | -verbose | --verbose | --verbos | --verbo | --verb)
981 verbose=yes ;;
983 -version | --version | --versio | --versi | --vers | -V)
984 ac_init_version=: ;;
986 -with-* | --with-*)
987 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
988 # Reject names that are not valid shell variable names.
989 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
990 as_fn_error $? "invalid package name: $ac_useropt"
991 ac_useropt_orig=$ac_useropt
992 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
993 case $ac_user_opts in
995 "with_$ac_useropt"
996 "*) ;;
997 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
998 ac_unrecognized_sep=', ';;
999 esac
1000 eval with_$ac_useropt=\$ac_optarg ;;
1002 -without-* | --without-*)
1003 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1004 # Reject names that are not valid shell variable names.
1005 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1006 as_fn_error $? "invalid package name: $ac_useropt"
1007 ac_useropt_orig=$ac_useropt
1008 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1009 case $ac_user_opts in
1011 "with_$ac_useropt"
1012 "*) ;;
1013 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1014 ac_unrecognized_sep=', ';;
1015 esac
1016 eval with_$ac_useropt=no ;;
1018 --x)
1019 # Obsolete; use --with-x.
1020 with_x=yes ;;
1022 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1023 | --x-incl | --x-inc | --x-in | --x-i)
1024 ac_prev=x_includes ;;
1025 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1026 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1027 x_includes=$ac_optarg ;;
1029 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1030 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1031 ac_prev=x_libraries ;;
1032 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1033 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1034 x_libraries=$ac_optarg ;;
1036 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1037 Try \`$0 --help' for more information"
1040 *=*)
1041 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1042 # Reject names that are not valid shell variable names.
1043 case $ac_envvar in #(
1044 '' | [0-9]* | *[!_$as_cr_alnum]* )
1045 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1046 esac
1047 eval $ac_envvar=\$ac_optarg
1048 export $ac_envvar ;;
1051 # FIXME: should be removed in autoconf 3.0.
1052 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1053 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1054 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1055 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1058 esac
1059 done
1061 if test -n "$ac_prev"; then
1062 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1063 as_fn_error $? "missing argument to $ac_option"
1066 if test -n "$ac_unrecognized_opts"; then
1067 case $enable_option_checking in
1068 no) ;;
1069 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1070 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1071 esac
1074 # Check all directory arguments for consistency.
1075 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1076 datadir sysconfdir sharedstatedir localstatedir includedir \
1077 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1078 libdir localedir mandir
1080 eval ac_val=\$$ac_var
1081 # Remove trailing slashes.
1082 case $ac_val in
1083 */ )
1084 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1085 eval $ac_var=\$ac_val;;
1086 esac
1087 # Be sure to have absolute directory names.
1088 case $ac_val in
1089 [\\/$]* | ?:[\\/]* ) continue;;
1090 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1091 esac
1092 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1093 done
1095 # There might be people who depend on the old broken behavior: `$host'
1096 # used to hold the argument of --host etc.
1097 # FIXME: To remove some day.
1098 build=$build_alias
1099 host=$host_alias
1100 target=$target_alias
1102 # FIXME: To remove some day.
1103 if test "x$host_alias" != x; then
1104 if test "x$build_alias" = x; then
1105 cross_compiling=maybe
1106 elif test "x$build_alias" != "x$host_alias"; then
1107 cross_compiling=yes
1111 ac_tool_prefix=
1112 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1114 test "$silent" = yes && exec 6>/dev/null
1117 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1118 ac_ls_di=`ls -di .` &&
1119 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1120 as_fn_error $? "working directory cannot be determined"
1121 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1122 as_fn_error $? "pwd does not report name of working directory"
1125 # Find the source files, if location was not specified.
1126 if test -z "$srcdir"; then
1127 ac_srcdir_defaulted=yes
1128 # Try the directory containing this script, then the parent directory.
1129 ac_confdir=`$as_dirname -- "$as_myself" ||
1130 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1131 X"$as_myself" : 'X\(//\)[^/]' \| \
1132 X"$as_myself" : 'X\(//\)$' \| \
1133 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1134 $as_echo X"$as_myself" |
1135 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1136 s//\1/
1139 /^X\(\/\/\)[^/].*/{
1140 s//\1/
1143 /^X\(\/\/\)$/{
1144 s//\1/
1147 /^X\(\/\).*/{
1148 s//\1/
1151 s/.*/./; q'`
1152 srcdir=$ac_confdir
1153 if test ! -r "$srcdir/$ac_unique_file"; then
1154 srcdir=..
1156 else
1157 ac_srcdir_defaulted=no
1159 if test ! -r "$srcdir/$ac_unique_file"; then
1160 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1161 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1163 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1164 ac_abs_confdir=`(
1165 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1166 pwd)`
1167 # When building in place, set srcdir=.
1168 if test "$ac_abs_confdir" = "$ac_pwd"; then
1169 srcdir=.
1171 # Remove unnecessary trailing slashes from srcdir.
1172 # Double slashes in file names in object file debugging info
1173 # mess up M-x gdb in Emacs.
1174 case $srcdir in
1175 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1176 esac
1177 for ac_var in $ac_precious_vars; do
1178 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1179 eval ac_env_${ac_var}_value=\$${ac_var}
1180 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1181 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1182 done
1185 # Report the --help message.
1187 if test "$ac_init_help" = "long"; then
1188 # Omit some internal or obsolete options to make the list less imposing.
1189 # This message is too long to be a string in the A/UX 3.1 sh.
1190 cat <<_ACEOF
1191 \`configure' configures this package to adapt to many kinds of systems.
1193 Usage: $0 [OPTION]... [VAR=VALUE]...
1195 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1196 VAR=VALUE. See below for descriptions of some of the useful variables.
1198 Defaults for the options are specified in brackets.
1200 Configuration:
1201 -h, --help display this help and exit
1202 --help=short display options specific to this package
1203 --help=recursive display the short help of all the included packages
1204 -V, --version display version information and exit
1205 -q, --quiet, --silent do not print \`checking ...' messages
1206 --cache-file=FILE cache test results in FILE [disabled]
1207 -C, --config-cache alias for \`--cache-file=config.cache'
1208 -n, --no-create do not create output files
1209 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1211 Installation directories:
1212 --prefix=PREFIX install architecture-independent files in PREFIX
1213 [$ac_default_prefix]
1214 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1215 [PREFIX]
1217 By default, \`make install' will install all the files in
1218 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1219 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1220 for instance \`--prefix=\$HOME'.
1222 For better control, use the options below.
1224 Fine tuning of the installation directories:
1225 --bindir=DIR user executables [EPREFIX/bin]
1226 --sbindir=DIR system admin executables [EPREFIX/sbin]
1227 --libexecdir=DIR program executables [EPREFIX/libexec]
1228 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1229 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1230 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1231 --libdir=DIR object code libraries [EPREFIX/lib]
1232 --includedir=DIR C header files [PREFIX/include]
1233 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1234 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1235 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1236 --infodir=DIR info documentation [DATAROOTDIR/info]
1237 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1238 --mandir=DIR man documentation [DATAROOTDIR/man]
1239 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1240 --htmldir=DIR html documentation [DOCDIR]
1241 --dvidir=DIR dvi documentation [DOCDIR]
1242 --pdfdir=DIR pdf documentation [DOCDIR]
1243 --psdir=DIR ps documentation [DOCDIR]
1244 _ACEOF
1246 cat <<\_ACEOF
1247 _ACEOF
1250 if test -n "$ac_init_help"; then
1252 cat <<\_ACEOF
1254 Optional Features:
1255 --disable-option-checking ignore unrecognized --enable/--with options
1256 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1257 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1258 --enable-error-checking enable error checking
1259 --enable-ampi-error-checking
1260 enable AMPI error checking
1261 --enable-stats enable statistics collection
1262 --enable-tracing enable tracing modules
1263 --enable-tracing-commthread
1264 enable tracing communication thread
1265 --enable-charmdebug enable charmDebug
1266 --enable-replay enable record/replay
1267 --enable-ccs enable CCS
1268 --enable-controlpoint enable control point
1269 --enable-lbuserdata enable LB user data
1270 --enable-shrinkexpand enable malleable jobs / shrink expand
1271 --enable-randomized-msgq
1272 enable a randomized msg queue (for debugging etc)
1274 Optional Packages:
1275 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1276 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1277 --with-numa support memory affinity with NUMA
1278 --with-lbtime-type=type load balancing timer type
1279 --with-qlogic QLogic based Infiniband
1280 --with-refnum-type=type size of the envelope refnum field
1281 --with-prio-type=type size of expected message priorities
1283 Report bugs to the package provider.
1284 _ACEOF
1285 ac_status=$?
1288 if test "$ac_init_help" = "recursive"; then
1289 # If there are subdirs, report their specific --help.
1290 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1291 test -d "$ac_dir" ||
1292 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1293 continue
1294 ac_builddir=.
1296 case "$ac_dir" in
1297 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1299 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1300 # A ".." for each directory in $ac_dir_suffix.
1301 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1302 case $ac_top_builddir_sub in
1303 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1304 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1305 esac ;;
1306 esac
1307 ac_abs_top_builddir=$ac_pwd
1308 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1309 # for backward compatibility:
1310 ac_top_builddir=$ac_top_build_prefix
1312 case $srcdir in
1313 .) # We are building in place.
1314 ac_srcdir=.
1315 ac_top_srcdir=$ac_top_builddir_sub
1316 ac_abs_top_srcdir=$ac_pwd ;;
1317 [\\/]* | ?:[\\/]* ) # Absolute name.
1318 ac_srcdir=$srcdir$ac_dir_suffix;
1319 ac_top_srcdir=$srcdir
1320 ac_abs_top_srcdir=$srcdir ;;
1321 *) # Relative name.
1322 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1323 ac_top_srcdir=$ac_top_build_prefix$srcdir
1324 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1325 esac
1326 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1328 cd "$ac_dir" || { ac_status=$?; continue; }
1329 # Check for guested configure.
1330 if test -f "$ac_srcdir/configure.gnu"; then
1331 echo &&
1332 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1333 elif test -f "$ac_srcdir/configure"; then
1334 echo &&
1335 $SHELL "$ac_srcdir/configure" --help=recursive
1336 else
1337 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1338 fi || ac_status=$?
1339 cd "$ac_pwd" || { ac_status=$?; break; }
1340 done
1343 test -n "$ac_init_help" && exit $ac_status
1344 if $ac_init_version; then
1345 cat <<\_ACEOF
1346 configure
1347 generated by GNU Autoconf 2.69
1349 Copyright (C) 2012 Free Software Foundation, Inc.
1350 This configure script is free software; the Free Software Foundation
1351 gives unlimited permission to copy, distribute and modify it.
1352 _ACEOF
1353 exit
1356 ## ------------------------ ##
1357 ## Autoconf initialization. ##
1358 ## ------------------------ ##
1359 cat >config.log <<_ACEOF
1360 This file contains any messages produced by compilers while
1361 running configure, to aid debugging if configure makes a mistake.
1363 It was created by $as_me, which was
1364 generated by GNU Autoconf 2.69. Invocation command line was
1366 $ $0 $@
1368 _ACEOF
1369 exec 5>>config.log
1371 cat <<_ASUNAME
1372 ## --------- ##
1373 ## Platform. ##
1374 ## --------- ##
1376 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1377 uname -m = `(uname -m) 2>/dev/null || echo unknown`
1378 uname -r = `(uname -r) 2>/dev/null || echo unknown`
1379 uname -s = `(uname -s) 2>/dev/null || echo unknown`
1380 uname -v = `(uname -v) 2>/dev/null || echo unknown`
1382 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1383 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1385 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1386 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1387 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
1388 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
1389 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1390 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1391 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1393 _ASUNAME
1395 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1396 for as_dir in $PATH
1398 IFS=$as_save_IFS
1399 test -z "$as_dir" && as_dir=.
1400 $as_echo "PATH: $as_dir"
1401 done
1402 IFS=$as_save_IFS
1404 } >&5
1406 cat >&5 <<_ACEOF
1409 ## ----------- ##
1410 ## Core tests. ##
1411 ## ----------- ##
1413 _ACEOF
1416 # Keep a trace of the command line.
1417 # Strip out --no-create and --no-recursion so they do not pile up.
1418 # Strip out --silent because we don't want to record it for future runs.
1419 # Also quote any args containing shell meta-characters.
1420 # Make two passes to allow for proper duplicate-argument suppression.
1421 ac_configure_args=
1422 ac_configure_args0=
1423 ac_configure_args1=
1424 ac_must_keep_next=false
1425 for ac_pass in 1 2
1427 for ac_arg
1429 case $ac_arg in
1430 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1431 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1432 | -silent | --silent | --silen | --sile | --sil)
1433 continue ;;
1434 *\'*)
1435 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1436 esac
1437 case $ac_pass in
1438 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
1440 as_fn_append ac_configure_args1 " '$ac_arg'"
1441 if test $ac_must_keep_next = true; then
1442 ac_must_keep_next=false # Got value, back to normal.
1443 else
1444 case $ac_arg in
1445 *=* | --config-cache | -C | -disable-* | --disable-* \
1446 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1447 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1448 | -with-* | --with-* | -without-* | --without-* | --x)
1449 case "$ac_configure_args0 " in
1450 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1451 esac
1453 -* ) ac_must_keep_next=true ;;
1454 esac
1456 as_fn_append ac_configure_args " '$ac_arg'"
1458 esac
1459 done
1460 done
1461 { ac_configure_args0=; unset ac_configure_args0;}
1462 { ac_configure_args1=; unset ac_configure_args1;}
1464 # When interrupted or exit'd, cleanup temporary files, and complete
1465 # config.log. We remove comments because anyway the quotes in there
1466 # would cause problems or look ugly.
1467 # WARNING: Use '\'' to represent an apostrophe within the trap.
1468 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
1469 trap 'exit_status=$?
1470 # Save into config.log some information that might help in debugging.
1472 echo
1474 $as_echo "## ---------------- ##
1475 ## Cache variables. ##
1476 ## ---------------- ##"
1477 echo
1478 # The following way of writing the cache mishandles newlines in values,
1480 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1481 eval ac_val=\$$ac_var
1482 case $ac_val in #(
1483 *${as_nl}*)
1484 case $ac_var in #(
1485 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
1486 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
1487 esac
1488 case $ac_var in #(
1489 _ | IFS | as_nl) ;; #(
1490 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
1491 *) { eval $ac_var=; unset $ac_var;} ;;
1492 esac ;;
1493 esac
1494 done
1495 (set) 2>&1 |
1496 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1497 *${as_nl}ac_space=\ *)
1498 sed -n \
1499 "s/'\''/'\''\\\\'\'''\''/g;
1500 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1501 ;; #(
1503 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
1505 esac |
1506 sort
1508 echo
1510 $as_echo "## ----------------- ##
1511 ## Output variables. ##
1512 ## ----------------- ##"
1513 echo
1514 for ac_var in $ac_subst_vars
1516 eval ac_val=\$$ac_var
1517 case $ac_val in
1518 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1519 esac
1520 $as_echo "$ac_var='\''$ac_val'\''"
1521 done | sort
1522 echo
1524 if test -n "$ac_subst_files"; then
1525 $as_echo "## ------------------- ##
1526 ## File substitutions. ##
1527 ## ------------------- ##"
1528 echo
1529 for ac_var in $ac_subst_files
1531 eval ac_val=\$$ac_var
1532 case $ac_val in
1533 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1534 esac
1535 $as_echo "$ac_var='\''$ac_val'\''"
1536 done | sort
1537 echo
1540 if test -s confdefs.h; then
1541 $as_echo "## ----------- ##
1542 ## confdefs.h. ##
1543 ## ----------- ##"
1544 echo
1545 cat confdefs.h
1546 echo
1548 test "$ac_signal" != 0 &&
1549 $as_echo "$as_me: caught signal $ac_signal"
1550 $as_echo "$as_me: exit $exit_status"
1551 } >&5
1552 rm -f core *.core core.conftest.* &&
1553 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
1554 exit $exit_status
1556 for ac_signal in 1 2 13 15; do
1557 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
1558 done
1559 ac_signal=0
1561 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1562 rm -f -r conftest* confdefs.h
1564 $as_echo "/* confdefs.h */" > confdefs.h
1566 # Predefined preprocessor variables.
1568 cat >>confdefs.h <<_ACEOF
1569 #define PACKAGE_NAME "$PACKAGE_NAME"
1570 _ACEOF
1572 cat >>confdefs.h <<_ACEOF
1573 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1574 _ACEOF
1576 cat >>confdefs.h <<_ACEOF
1577 #define PACKAGE_VERSION "$PACKAGE_VERSION"
1578 _ACEOF
1580 cat >>confdefs.h <<_ACEOF
1581 #define PACKAGE_STRING "$PACKAGE_STRING"
1582 _ACEOF
1584 cat >>confdefs.h <<_ACEOF
1585 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1586 _ACEOF
1588 cat >>confdefs.h <<_ACEOF
1589 #define PACKAGE_URL "$PACKAGE_URL"
1590 _ACEOF
1593 # Let the site file select an alternate cache file if it wants to.
1594 # Prefer an explicitly selected file to automatically selected ones.
1595 ac_site_file1=NONE
1596 ac_site_file2=NONE
1597 if test -n "$CONFIG_SITE"; then
1598 # We do not want a PATH search for config.site.
1599 case $CONFIG_SITE in #((
1600 -*) ac_site_file1=./$CONFIG_SITE;;
1601 */*) ac_site_file1=$CONFIG_SITE;;
1602 *) ac_site_file1=./$CONFIG_SITE;;
1603 esac
1604 elif test "x$prefix" != xNONE; then
1605 ac_site_file1=$prefix/share/config.site
1606 ac_site_file2=$prefix/etc/config.site
1607 else
1608 ac_site_file1=$ac_default_prefix/share/config.site
1609 ac_site_file2=$ac_default_prefix/etc/config.site
1611 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
1613 test "x$ac_site_file" = xNONE && continue
1614 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
1615 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
1616 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
1617 sed 's/^/| /' "$ac_site_file" >&5
1618 . "$ac_site_file" \
1619 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
1620 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1621 as_fn_error $? "failed to load site script $ac_site_file
1622 See \`config.log' for more details" "$LINENO" 5; }
1624 done
1626 if test -r "$cache_file"; then
1627 # Some versions of bash will fail to source /dev/null (special files
1628 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
1629 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
1630 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
1631 $as_echo "$as_me: loading cache $cache_file" >&6;}
1632 case $cache_file in
1633 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1634 *) . "./$cache_file";;
1635 esac
1637 else
1638 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
1639 $as_echo "$as_me: creating cache $cache_file" >&6;}
1640 >$cache_file
1643 # Check that the precious variables saved in the cache have kept the same
1644 # value.
1645 ac_cache_corrupted=false
1646 for ac_var in $ac_precious_vars; do
1647 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1648 eval ac_new_set=\$ac_env_${ac_var}_set
1649 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1650 eval ac_new_val=\$ac_env_${ac_var}_value
1651 case $ac_old_set,$ac_new_set in
1652 set,)
1653 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1654 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1655 ac_cache_corrupted=: ;;
1656 ,set)
1657 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
1658 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1659 ac_cache_corrupted=: ;;
1660 ,);;
1662 if test "x$ac_old_val" != "x$ac_new_val"; then
1663 # differences in whitespace do not lead to failure.
1664 ac_old_val_w=`echo x $ac_old_val`
1665 ac_new_val_w=`echo x $ac_new_val`
1666 if test "$ac_old_val_w" != "$ac_new_val_w"; then
1667 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
1668 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1669 ac_cache_corrupted=:
1670 else
1671 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
1672 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
1673 eval $ac_var=\$ac_old_val
1675 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
1676 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
1677 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
1678 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
1679 fi;;
1680 esac
1681 # Pass precious variables to config.status.
1682 if test "$ac_new_set" = set; then
1683 case $ac_new_val in
1684 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1685 *) ac_arg=$ac_var=$ac_new_val ;;
1686 esac
1687 case " $ac_configure_args " in
1688 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1689 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
1690 esac
1692 done
1693 if $ac_cache_corrupted; then
1694 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
1695 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1696 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
1697 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1698 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
1700 ## -------------------- ##
1701 ## Main body of script. ##
1702 ## -------------------- ##
1704 ac_ext=c
1705 ac_cpp='$CPP $CPPFLAGS'
1706 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1707 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1708 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1712 ac_config_headers="$ac_config_headers conv-autoconfig.h"
1715 ac_config_commands="$ac_config_commands config-cleanup"
1718 #clean up conv-mach-opt.sh
1719 sed -e '/Option added by configure/d' ../include/conv-mach-opt.sh | sed -e '/^$/d' > conv-mach-opt.sh.clean
1720 cp -f conv-mach-opt.sh.clean ../include/conv-mach-opt.sh
1721 rm -f conv-mach-opt.sh.clean
1723 CHARMINC="."
1724 CHARMBIN="../bin"
1725 test -r ./conv-config.sh && . ./conv-config.sh
1727 # Decimal representation of Charm++ release line and API revision
1728 # Increment the last 2 digits when making an API change
1729 # Increase the first three after branching for a release
1730 VERSION=60800
1731 echo $VERSION > ../include/VERSION
1733 cat >>confdefs.h <<_ACEOF
1734 #define CHARM_VERSION $VERSION
1735 _ACEOF
1738 charmout="charmconfig.out"
1739 /bin/rm -rf $charmout
1740 MAKEFILE_EXT=Make.extlib
1742 Echo() {
1743 echo $*
1744 echo $* >> $charmout
1747 # add into conv-mach-opt.sh
1748 # add_flag $1 $2
1749 # $2 is description
1750 add_flag() {
1751 key=`echo $1 | cut -d'=' -f1`
1752 last=`grep "$key=" ../include/conv-mach-opt.sh 2>/dev/null | tail -1 | sed -e 's/ *#.*$//'`
1753 skip=0
1754 if test -n "$last" -a "$last" = "$1"
1755 then
1756 skip=1
1758 if test $skip = 0
1759 then
1760 cat >> ../include/conv-mach-opt.sh << EOT
1762 $1 # Option added by configure script's $2 section
1767 # remove_flag $1
1768 remove_flag() {
1769 sed -e '/^'"$1"'=/d' ../include/conv-mach-opt.sh > tmp.$$
1770 cp tmp.$$ ../include/conv-mach-opt.sh
1771 /bin/rm -f tmp.$$
1774 add_flag "OPTS_CC='$OPTS_CC'" 'Pass through user-provided C compiler options'
1775 add_flag "OPTS_CXX='$OPTS_CXX'" 'Pass through user-provided C++ compiler options'
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 // Check for Intel compiler incompatibility with the active g++/libstdc++ by
2455 // including an arbitrary standard library header (cf bug #1560)
2456 #include <map>
2458 // Check for an excessively old g++/libstdc++ that can't handle features we use
2459 #if !CMK_USING_XLC
2460 #include <memory>
2461 std::unique_ptr<int> i;
2462 #endif
2464 class CkMigrateMessage;
2466 struct base {
2467 base(void) { }
2468 base(CkMigrateMessage *) { }
2471 template <class Parent>
2472 struct CBaseT1 : Parent {
2474 CBaseT1(void) :Parent() { }
2475 CBaseT1(CkMigrateMessage *m) :Parent(m) { }
2476 CBaseT1(CBaseT1&& rhs) :Parent() { }
2478 template <typename... Args>
2479 CBaseT1(Args... args) : Parent(args...) { }
2482 template struct CBaseT1<base>;
2484 got_cpp11=""
2485 test_cxx "whether C++ compiler supports C++11 without flags" "yes" "no" ""
2486 if test $strictpass -eq 1
2487 then
2488 got_cpp11="true"
2489 else
2490 # Flags for g++/clang++/icc(icpc), xlC++, pgCC, and CrayCC respectively
2491 for i in "-std=c++0x" "-qlanglvl=extended0x" "--c++11" "-h std=c++11"; do
2492 test_cxx "whether C++ compiler supports C++11 with '$i'" "yes" "no" "$i"
2493 if test $strictpass -eq 1
2494 then
2495 add_flag "$(echo OPTS_CXX=\"\$OPTS_CXX $i\")" "Enable C++11 support"
2496 OPTS_CXX="$OPTS_CXX $i"
2497 got_cpp11="true"
2498 break
2500 done
2503 if test -z $got_cpp11
2504 then
2505 echo "Charm++ requires some C++11 support, but doesn't know the flag to enable it"
2506 echo
2507 echo "For Intel's compiler please see"
2508 echo "https://charm.cs.illinois.edu/redmine/issues/1560"
2509 echo "about making a suitable version of gcc/g++/libstdc++ available"
2510 test_finish 1
2513 # Workaround for bug #1045 appearing in GCC >6.x
2514 test_cxx "whether C++ compiler accepts -fno-lifetime-dse" "yes" "no" "-fno-lifetime-dse"
2515 if test $strictpass -eq 1
2516 then
2517 add_flag "$(echo OPTS_CXX=\"\$OPTS_CXX -fno-lifetime-dse\")" "Disable 'Lifetime DSE' optimization to work around bug #1045 in GCC >6.x"
2518 OPTS_CXX="$OPTS_CXX -fno-lifetime-dse"
2521 # Figure out if the user has asked to enable the latest language standards
2522 USER_ASKED_FOR_NEW_STD=`echo "$BUILDOPTS" | grep "-use-new-std" | wc -l`
2524 # If the user has asked for the newer standards, check if the compilers know about them
2525 if test $USER_ASKED_FOR_NEW_STD -ge 1
2526 then
2528 #### check if c compiler supports c11 compilation flags ####
2529 cat > $tc <<EOT
2530 #include <stdio.h>
2532 int foo()
2534 return 0;
2537 test_cc "whether c compiler knows of the c11 standard" "ok" "no" "$CMK_ENABLE_C11"
2539 cat >>confdefs.h <<_ACEOF
2540 #define CMK_COMPILER_KNOWS_C11 $pass
2541 _ACEOF
2543 if test $pass -eq 1
2544 then
2545 # Record results for charmc's future use
2546 add_flag 'CMK_COMPILER_KNOWS_C11="1"' "c11"
2547 # For the rest of configure, append this to compilation flags
2548 OPTS_CC="$CMK_ENABLE_C11 $OPTS_CC"
2551 #### check if C++ compiler supports cpp11 compilation flags ####
2552 cat > $t <<EOT
2553 #include <iostream>
2555 int foo()
2557 return 0;
2560 test_cxx "whether c++ compiler knows of the cpp11 standard" "ok" "no" "$CMK_ENABLE_CPP11"
2562 cat >>confdefs.h <<_ACEOF
2563 #define CMK_COMPILER_KNOWS_CPP11 $pass
2564 _ACEOF
2566 if test $pass -eq 1
2567 then
2568 # Record results for charmc's future use
2569 add_flag 'CMK_COMPILER_KNOWS_CPP11="1"' "cpp11"
2570 # For the rest of configure, append this to compilation flags
2571 OPTS_CXX="$CMK_ENABLE_CPP11 $OPTS_CXX"
2574 fi # endif USER_ASKED_FOR_NEW_STD
2577 # Perform the tests
2580 # Check whether --with-refnum-type was given.
2581 if test "${with_refnum_type+set}" = set; then :
2582 withval=$with_refnum_type;
2583 else
2584 with_refnum_type=no
2588 if test "$with_refnum_type" = "no" -o "$with_refnum_type" = "short"
2589 then
2590 Echo "Setting charm++ envelope refnum field to unsigned short"
2592 cat >>confdefs.h <<_ACEOF
2593 #define CMK_REFNUM_TYPE unsigned short
2594 _ACEOF
2596 elif test "$with_refnum_type" = "int"
2597 then
2598 Echo "Setting charm++ envelope refnum field to unsigned int"
2600 cat >>confdefs.h <<_ACEOF
2601 #define CMK_REFNUM_TYPE unsigned int
2602 _ACEOF
2604 else
2605 Echo "Invalid size specified for refnum field"
2606 test_finish 1
2611 # Check whether --with-prio-type was given.
2612 if test "${with_prio_type+set}" = set; then :
2613 withval=$with_prio_type;
2614 else
2615 with_prio_type=bitvec
2619 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"
2620 then
2621 Echo "Configuring support for message priorities of sizeof type $with_prio_type"
2623 cat >>confdefs.h <<_ACEOF
2624 #define CMK_USE_STL_MSGQ 1
2625 _ACEOF
2628 cat >>confdefs.h <<_ACEOF
2629 #define CMK_MSG_PRIO_TYPE $with_prio_type
2630 _ACEOF
2632 elif test "$with_prio_type" = "bitvec"
2633 then
2634 Echo "Configuring support for message priorities of arbitrary size (bitvectors)"
2636 cat >>confdefs.h <<_ACEOF
2637 #define CMK_USE_STL_MSGQ 0
2638 _ACEOF
2641 cat >>confdefs.h <<_ACEOF
2642 #define CMK_MSG_PRIO_TYPE $with_prio_type
2643 _ACEOF
2645 else
2646 Echo "Invalid size ($with_prio_type) specified for message priorities. Can only accept char, short, int, long, float, double and bitvec"
2647 test_finish 1
2650 # enable/disable randomized scheduler queue
2651 # Check whether --enable-randomized-msgq was given.
2652 if test "${enable_randomized_msgq+set}" = set; then :
2653 enableval=$enable_randomized_msgq;
2654 else
2655 enable_randomized_msgq=no
2659 if test "$enable_randomized_msgq" = "yes" -a "$with_prio_type" != "bitvec"
2660 then
2661 Echo "The charm message queue will be randomized (and will not respect priorities)"
2663 cat >>confdefs.h <<_ACEOF
2664 #define CMK_RANDOMIZED_MSGQ 1
2665 _ACEOF
2667 else
2669 cat >>confdefs.h <<_ACEOF
2670 #define CMK_RANDOMIZED_MSGQ 0
2671 _ACEOF
2673 if test "$enable_randomized_msgq" = "yes"
2674 then
2675 Echo 'A randomized message queue is only available when --with-prio-type != bitvec.'
2676 Echo "Specify prio-type to be a data type long enough to hold the message priorities in your application"
2677 Echo "for example: --with-prio-type=int (or short / long etc)."
2678 test_finish 1
2682 #### Check if compiler if 64 bit ####
2683 cat > $t <<EOT
2684 #include <stdio.h>
2686 int foo()
2688 int x[(int)(sizeof(void *) - 7)]={0};
2689 return x[0];
2692 test_cxx "whether compiler generates code for 64-bit" "yes" "no" ""
2694 cat >>confdefs.h <<_ACEOF
2695 #define CMK_SIZET_64BIT $strictpass
2696 _ACEOF
2698 in64bit=$strictpass
2700 ### Check if compiler supports std::is_constructible<> ###
2701 cat > $t <<EOT
2702 #include <type_traits>
2704 struct s {
2705 s(int a) { }
2708 bool foo()
2710 return std::is_constructible<s, int>::value;
2713 test_cxx "whether compiler supports std::is_constructible" "yes" "no" ""
2715 cat >>confdefs.h <<_ACEOF
2716 #define CMK_HAS_IS_CONSTRUCTIBLE $strictpass
2717 _ACEOF
2720 ### Check if compiler supports std::alignment_of<> ###
2721 cat > $t <<EOT
2722 #include <type_traits>
2724 int foo()
2726 return std::alignment_of<int>::value;
2729 test_cxx "whether compiler supports std::alignment_of" "yes" "no" ""
2731 cat >>confdefs.h <<_ACEOF
2732 #define CMK_HAS_ALIGNMENT_OF $strictpass
2733 _ACEOF
2737 #### test if has values.h ####
2738 cat > $t <<EOT
2739 #include <values.h>
2740 int main() {
2741 double d = MAXDOUBLE;
2742 return 0;
2745 test_cxx "whether has values.h " "yes" "no" ""
2747 cat >>confdefs.h <<_ACEOF
2748 #define CMK_HAS_VALUES_H $pass
2749 _ACEOF
2752 #### test if has stdint.h ####
2753 cat > $t <<EOT
2754 #include <stdint.h>
2755 int main() {
2756 return 0;
2759 test_cxx "whether has stdint.h " "yes" "no" ""
2761 cat >>confdefs.h <<_ACEOF
2762 #define CMK_HAS_STDINT_H $pass
2763 _ACEOF
2766 #### test if has malloc.h ####
2767 cat > $t <<EOT
2768 #include <malloc.h>
2769 int main() {
2770 return 0;
2773 test_cxx "whether has malloc.h " "yes" "no" ""
2775 cat >>confdefs.h <<_ACEOF
2776 #define CMK_HAS_MALLOC_H $pass
2777 _ACEOF
2780 #### test if has alloca.h ####
2781 cat > $t <<EOT
2782 #include <alloca.h>
2783 int main() {
2784 double *s=(double *)alloca(sizeof(double));
2785 *s=1.0;
2786 return 0;
2789 test_cxx "whether has alloca.h " "yes" "no" ""
2791 cat >>confdefs.h <<_ACEOF
2792 #define CMK_HAS_ALLOCA_H $pass
2793 _ACEOF
2796 #### test if has regex.h ####
2797 cat > $t <<EOT
2798 #include <regex.h>
2799 int main() {
2800 regex_t re;
2801 regcomp(&re, ".*MOD.*", REG_EXTENDED|REG_NOSUB);
2802 return 0;
2805 test_cxx "whether has regex.h " "yes" "no" ""
2807 cat >>confdefs.h <<_ACEOF
2808 #define CMK_HAS_REGEX_H $pass
2809 _ACEOF
2812 #### Check long long ####
2813 cat > $t <<EOT
2814 #include <stdlib.h>
2815 long long foo(void) { return 17; }
2817 test_cxx "whether long long works" "yes" "no" ""
2819 cat >>confdefs.h <<_ACEOF
2820 #define CMK_LONG_LONG_DEFINED $pass
2821 _ACEOF
2824 #### Check __int64 ####
2825 cat > $t <<EOT
2826 #include <stdlib.h>
2827 __int64 foo(void) { return 17; }
2829 test_cxx "whether __int64 works" "yes" "no" ""
2831 cat >>confdefs.h <<_ACEOF
2832 #define CMK___int64_DEFINED $pass
2833 _ACEOF
2836 #### Check __int128 ####
2837 cat > $t <<EOT
2838 #include <stdlib.h>
2839 int foo(void) {
2840 __int128 a;
2841 int x[(int)(sizeof(__int128) - 15)]={0};
2842 return x[0];
2845 test_cxx "whether __int128 (128-bit integer) works" "yes" "no" ""
2847 cat >>confdefs.h <<_ACEOF
2848 #define CMK___int128_DEFINED $pass
2849 _ACEOF
2851 if test $pass -eq 1
2852 then
2853 add_flag CMK_HAS_INT16=1
2856 #### Check __int128_t ####
2857 cat > $t <<EOT
2858 #include <stdlib.h>
2859 int foo(void) {
2860 __int128_t a;
2861 __uint128_t b;
2862 a = a + a;
2863 int x[(int)(sizeof(__int128_t) - 15)]={0};
2864 return x[0];
2867 test_cxx "whether __int128_t (128-bit integer) works" "yes" "no" ""
2869 cat >>confdefs.h <<_ACEOF
2870 #define CMK___int128_t_DEFINED $pass
2871 _ACEOF
2873 if test $pass -eq 1
2874 then
2875 add_flag CMK_HAS_INT16=1
2878 ### Check if we have C++11 <atomic> ###
2879 cat > $t <<EOT
2880 #include <atomic>
2881 int main(int argc, char** argv) {
2882 return 0;
2885 test_cxx "whether C++ library has <atomic> " "yes" "no" ""
2887 cat >>confdefs.h <<_ACEOF
2888 #define CMK_HAS_CXX11_ATOMIC $pass
2889 _ACEOF
2892 if test $pass -ne 1
2893 then
2894 ### Check if we have pre-C++11 <cstdatomic> ###
2895 cat > $t <<EOT
2896 #include <cstdatomic>
2897 int main(int argc, char** argv) {
2898 return 0;
2901 test_cxx "whether C++ library has <cstdatomic> " "yes" "no" ""
2903 cat >>confdefs.h <<_ACEOF
2904 #define CMK_HAS_CXX0X_CSTDATOMIC $pass
2905 _ACEOF
2909 if test $pass -ne 1 -a -z "$CMK_USING_BGXLC"
2910 then
2911 echo "Charm++ requires C++11 atomic support"
2912 test_finish 1
2915 #### Check long double ####
2916 cat > $t <<EOT
2917 #include <stdlib.h>
2918 long double foo(void) { return 17.0; }
2920 test_cxx "whether long double works" "yes" "no" ""
2922 cat >>confdefs.h <<_ACEOF
2923 #define CMK_LONG_DOUBLE_DEFINED $strictpass
2924 _ACEOF
2927 #### Check ucontext and FPU pointer ####
2928 cat > $t <<EOT
2929 #include <ucontext.h>
2930 struct _libc_fpstate fpstate;
2931 fpregset_t *fp;
2933 test_cxx "whether ucontext has FPU pointer" "yes" "no" ""
2935 cat >>confdefs.h <<_ACEOF
2936 #define CMK_CONTEXT_FPU_POINTER $pass
2937 _ACEOF
2940 if test $pass -eq 1
2941 then
2942 cat > $t <<EOT
2943 #include <ucontext.h>
2945 int main()
2947 ucontext_t context;
2948 context.uc_mcontext.uc_regs = 0;
2951 test_cxx "whether ucontext uses uc_regs" "yes" "no" ""
2953 cat >>confdefs.h <<_ACEOF
2954 #define CMK_CONTEXT_FPU_POINTER_UCREGS $pass
2955 _ACEOF
2959 cat > $t <<EOT
2960 #include <ucontext.h>
2961 vrregset_t *v_regs;
2962 ucontext_t uc;
2964 void foo()
2966 vrregset_t *ptr = uc.uc_mcontext.v_regs;
2969 test_cxx "whether ucontext has pointer (v_regs) of vector type" "yes" "no" ""
2971 cat >>confdefs.h <<_ACEOF
2972 #define CMK_CONTEXT_V_REGS $pass
2973 _ACEOF
2976 #### Check ucontext and FPU pointer ####
2977 cat > $t <<EOT
2978 #include <infiniband/verbs.h>
2979 void test()
2981 struct ibv_context *context;
2982 int ibPort;
2983 struct ibv_port_attr attr;
2984 if (ibv_query_port(context, ibPort, &attr) != 0) return;
2985 if (attr.link_layer == IBV_LINK_LAYER_INFINIBAND) return;
2988 test_cxx "whether ibverbs ibv_port_attr has link_layer field" "yes" "no" ""
2990 cat >>confdefs.h <<_ACEOF
2991 #define CMK_IBV_PORT_ATTR_HAS_LINK_LAYER $pass
2992 _ACEOF
2996 ###################### C++ Compiler Features #####################
2998 #### check C inline ####
2999 cat > $tc <<EOT
3000 inline static int foo()
3002 return 1;
3005 test_cc "whether inline works in C" "yes" "no" ""
3007 cat >>confdefs.h <<_ACEOF
3008 #define CMK_C_INLINE $strictpass
3009 _ACEOF
3012 #### check if signed char is same as char ####
3013 cat > $t <<EOT
3014 #include <stdlib.h>
3015 class er {
3016 protected:
3017 void operator()(char &v,const char *desc=NULL) {};
3018 void operator()(signed char &v,const char *desc=NULL) {};
3021 test_cxx "whether C++ signed char and char differ" "yes" "no" ""
3023 cat >>confdefs.h <<_ACEOF
3024 #define CMK_SIGNEDCHAR_DIFF_CHAR $pass
3025 _ACEOF
3028 ### check if varsize array on stack ####
3029 cat > $t <<EOT
3030 #include <stdio.h>
3031 void foo()
3033 int size=10;
3034 char arrsize;
3038 test_cxx "whether C++ allows declaration of varsize array" "yes" "no" ""
3040 cat >>confdefs.h <<_ACEOF
3041 #define CMK_DECLARE_VARSIZE_ARRAY $pass
3042 _ACEOF
3045 #### check if typeinfo exists and works #####
3046 cat > $t <<EOT
3047 #include <typeinfo>
3048 const char *foo(void) {
3049 int x;
3050 return typeid(x).name();
3053 test_cxx "whether typeinfo/typeid works" "ok" "no" ""
3055 cat >>confdefs.h <<_ACEOF
3056 #define CMK_HAS_TYPEINFO $pass
3057 _ACEOF
3060 #### check if iterator_traits is defined #####
3061 cat > $t <<EOT
3062 #include <iterator>
3064 template <typename T> // T models Input Iterator
3065 typename std::iterator_traits<T>::value_type accumulate(T first, T last)
3067 typename std::iterator_traits<T>::value_type result = 0;
3068 while(first != last)
3069 result += *first++;
3070 return result;
3073 test_cxx "whether std::iterator_traits is defined" "ok" "no" ""
3075 cat >>confdefs.h <<_ACEOF
3076 #define CMK_HAS_ITERATOR_TRAITS $pass
3077 _ACEOF
3080 #### check if std::distance is defined #####
3081 cat > $t <<EOT
3082 #include <vector>
3083 #include <iterator>
3085 int foo()
3087 std::vector<int> tree;
3088 return std::distance(tree.begin(), tree.end());
3091 test_cxx "whether std::distance is defined" "ok" "no" ""
3093 cat >>confdefs.h <<_ACEOF
3094 #define CMK_HAS_STD_DISTANCE $pass
3095 _ACEOF
3098 #### check if std::inserter is defined #####
3099 cat > $t <<EOT
3100 #include <list>
3101 #include <iterator>
3103 void foo()
3105 using namespace std;
3106 list<int> L;
3107 inserter ( L, L.end ( ) ) = 500;
3110 test_cxx "whether std::inserter is defined" "ok" "no" ""
3112 cat >>confdefs.h <<_ACEOF
3113 #define CMK_HAS_STD_INSERTER $pass
3114 _ACEOF
3118 ####### Check support for features added by the new C11 and CPP11 standards ########
3120 #### check if std::unordered_map is defined #####
3121 cat > $t <<EOT
3122 #include <unordered_map>
3124 int foo()
3126 std::unordered_map<int,int> myhashtbl;
3127 myhashtbl[0] = 42;
3128 myhashtbl[1234] = 0;
3129 return myhashtbl[1234];
3132 test_cxx "whether std::unordered_map is defined" "ok" "no" ""
3134 cat >>confdefs.h <<_ACEOF
3135 #define CMK_HAS_STD_UNORDERED_MAP $pass
3136 _ACEOF
3140 #### check if anon structs are permitted #####
3141 cat > $t <<EOT
3142 #include <iostream>
3143 using std::cout;
3145 struct idx
3147 const static int dims = 3;
3148 union
3150 int data[dims];
3151 struct { int x, y, z; };
3154 idx(const int i=0, const int j=0, const int k=0): x(i), y(j), z(k) {}
3157 int main()
3159 cout<<"Hello World!\n";
3160 idx myidx(1, 2, 3);
3161 cout<< "idx = ("
3162 << myidx.data[0] << ","
3163 << myidx.data[1] << ","
3164 << myidx.z << ")\n";
3165 return (myidx.data[0] == 1 && myidx.y == 2 && myidx.data[2] == 3);
3168 test_cxx "whether anon structs are permitted" "yes" "no" ""
3170 cat >>confdefs.h <<_ACEOF
3171 #define CMK_HAS_ANON_STRUCTS $pass
3172 _ACEOF
3176 #### test if we can have multiple delete like this ####
3177 cat > $t <<EOT
3178 class foo {
3179 public:
3180 void operator delete(void*p){};
3181 void operator delete(void*p,int*){};
3184 test_cxx "whether operator delete can be overloaded in same class" "ok" "no" ""
3186 cat >>confdefs.h <<_ACEOF
3187 #define CMK_MULTIPLE_DELETE $strictpass
3188 _ACEOF
3191 #### test if offsetof exists ####
3192 cat > $t <<EOT
3193 #include <stddef.h>
3195 struct FooType {
3196 int f1;
3197 int f2;
3198 double f3;
3201 void foo()
3203 int off = offsetof(FooType, f2);
3206 test_cxx "whether offsetof is defined" "yes" "no" ""
3208 cat >>confdefs.h <<_ACEOF
3209 #define CMK_HAS_OFFSETOF $pass
3210 _ACEOF
3213 #### test if we can use gcc x86 assembly like this ####
3214 cat > $t <<EOT
3215 double foo(void)
3217 unsigned long long int v=0;
3218 int *lo=0+(int *)&v;
3219 int *hi=1+(int *)&v;
3220 __asm__ __volatile__(
3221 "rdtsc; movl %%edx,%0; movl %%eax,%1"
3222 : /* output */ "=m" (*hi), "=m" (*lo)
3223 : /* input */
3224 : /* trashes */ "%edx", "%eax"
3226 return v;
3229 test_cxx "whether GCC x86 assembly works" "yes" "no" ""
3231 cat >>confdefs.h <<_ACEOF
3232 #define CMK_GCC_X86_ASM $strictpass
3233 _ACEOF
3236 #### test if we can use gcc x86 assembly like this ####
3237 if test $strictpass = 1
3238 then
3239 cat > $t <<EOT
3240 int foo(void)
3242 int x;
3243 asm("lock incl %0" :: "m" (x));
3244 asm("lock decl %0" :: "m" (x));
3245 return x;
3248 test_cxx "whether GCC x86 assembly for atomic increment works" "yes" "no" ""
3250 cat >>confdefs.h <<_ACEOF
3251 #define CMK_GCC_X86_ASM_ATOMICINCREMENT $strictpass
3252 _ACEOF
3256 #### test if we can use asm eieio assembly like this ####
3257 cat > $t <<EOT
3258 double foo(void)
3260 unsigned long long int x;
3261 asm volatile("eieio" ::: "memory");
3262 return x;
3265 test_cxx "whether asm eieio assembly works" "yes" "no" ""
3267 cat >>confdefs.h <<_ACEOF
3268 #define CMK_PPC_ASM $strictpass
3269 _ACEOF
3274 #### test if we can use __thread ####
3275 cat > $t <<EOT
3276 __thread unsigned long long int x;
3277 static __thread int y;
3278 void foo(void)
3280 x = 1;
3281 y = 1;
3284 test_cxx "whether __thread (Thread Local Storage) is supported" "yes" "no" ""
3286 cat >>confdefs.h <<_ACEOF
3287 #define CMK_HAS_TLS_VARIABLES $strictpass
3288 _ACEOF
3291 #### check __sync_add_and_fetch ####
3292 cat > $tc <<EOT
3293 #include <stdio.h>
3294 int main()
3296 int t=1;
3297 __sync_add_and_fetch(&t, 1);
3298 return 1;
3301 test_linkc "whether synchronization primitives (__sync_add_and_fetch) works in C" "yes" "no" ""
3303 cat >>confdefs.h <<_ACEOF
3304 #define CMK_C_SYNC_ADD_AND_FETCH_PRIMITIVE $pass
3305 _ACEOF
3308 #### check __sync_synchronize ####
3309 cat > $tc <<EOT
3310 #include <stdio.h>
3311 int main()
3313 __sync_synchronize();
3317 test_linkc "whether synchronization primitives (__sync_synchronize) works in C" "yes" "no" ""
3320 cat >>confdefs.h <<_ACEOF
3321 #define CMK_C_SYNC_SYNCHRONIZE_PRIMITIVE $pass
3322 _ACEOF
3326 ### test if switching TLS register ###
3327 if test $in64bit = 1
3328 then
3329 cat > $t <<EOT
3330 #include <elf.h>
3331 #include <stdlib.h>
3332 #include <malloc.h>
3334 void switchTLS() {
3335 Elf64_Addr m1, m2;
3336 asm volatile ("movq %%fs:0x0, %0\n\t"
3337 "movq %1, %%fs:0x0\n\t"
3338 : "=r"(m1)
3339 : "r"(m2));
3342 test_cxx "whether switching TLS register (64-bit) is supported" "yes" "no" ""
3344 cat >>confdefs.h <<_ACEOF
3345 #define CMK_TLS_SWITCHING64 $strictpass
3346 _ACEOF
3348 else
3349 cat > $t <<EOT
3350 #include <elf.h>
3351 #include <stdlib.h>
3352 #include <malloc.h>
3354 void switchTLS() {
3355 Elf32_Addr m1, m2;
3356 asm volatile ("movl %%gs:0x0, %0\n\t"
3357 "movl %1, %%gs:0x0\n\t"
3358 : "=r"(m1)
3359 : "r"(m2));
3362 test_cxx "whether switching TLS register (32-bit) is supported" "yes" "no" ""
3364 cat >>confdefs.h <<_ACEOF
3365 #define CMK_TLS_SWITCHING32 $strictpass
3366 _ACEOF
3370 #### test if we can build OFI ####
3371 if test "$CMK_BUILD_OFI" = 1
3372 then
3373 cat > $tc <<EOT
3374 #include <rdma/fabric.h>
3375 int main(int argc, char **argv)
3377 struct fi_info *providers;
3378 int ret = fi_getinfo(FI_VERSION(1,0), NULL, NULL, 0ULL, NULL, &providers);
3379 return 0;
3382 test_cc "whether build on OFI" "yes" "no" "-lfabric"
3384 cat >>confdefs.h <<_ACEOF
3385 #define CMK_BUILD_ON_OFI $strictpass
3386 _ACEOF
3388 BUILD_OFI=$strictpass
3390 if test $BUILD_OFI -eq 0
3391 then
3392 echo "Error: Unable to compile OFI"
3393 test_finish 1
3394 else
3395 test_linkc "whether -lfabric" "ok" "no" "-lfabric"
3396 if test $pass -eq 0
3397 then
3398 #test for psm incompatibility
3399 PSM_COMPAT_DIR=/usr/lib64/psm2-compat
3400 if test -d $PSM_COMPAT_DIR
3401 then
3402 add_flag CMK_LIBDIR='"$CMK_LIBDIR -Wl,-rpath=/usr/lib64/psm2-compat"' "psm2-compat lib"
3403 CMK_LIBDIR="$CMK_LIBDIR -Wl,-rpath=/usr/lib64/psm2-compat"
3404 test_linkc "whether -lfabric after adding psm2-compatible library" "ok" "no" "-lfabric"
3405 if test $pass -eq 0
3406 then
3407 echo "Error: -lfabric not found or not working. Pass '--basedir=/path/to/dir/' if -lfabric is located in a different directory"
3408 test_finish 1
3410 else
3411 echo "Error: -lfabric not working, $PSM_COMPAT_DIR not found"
3412 echo "Pass '--basedir=/path/to/dir/' if -lfabric is located in a different directory"
3413 test_finish 1
3420 #### test if we can build MPI ####
3421 if test "$CMK_BUILD_MPI" = 1
3422 then
3424 cat > $tc <<EOT
3425 #include "mpi.h"
3426 int main(int argc, char **argv)
3428 MPI_Init(&argc, &argv);
3429 return 0;
3432 mv -f ../include/mpi.h ../include/mpi.h.bak 2>/dev/null
3433 test_cc "whether build on MPI" "yes" "no" ""
3435 cat >>confdefs.h <<_ACEOF
3436 #define CMK_BUILD_ON_MPI $strictpass
3437 _ACEOF
3439 BUILD_MPI=$strictpass
3441 if test $BUILD_MPI -eq 0
3442 then
3443 echo "Error: Can not compile a MPI program"
3444 test_finish 1
3447 if test $BUILD_MPI -eq 1 -a -z "$BGP_FLOOR"
3448 then
3449 test_linkc "whether need to specify MPI library" "no" "yes" ""
3450 if test $pass -ne 1
3451 then
3452 if test -z "$CMK_MPI_LIB"
3453 then
3454 test_linkc "whether -lmpich" "ok" "no" "-lmpich"
3455 if test $pass -eq 1
3456 then
3457 add_flag CMK_SYSLIBS='"$CMK_SYSLIBS -lmpich"' "mpi lib"
3458 else
3459 test_linkc "whether -lmpi" "ok" "no" "-lmpi"
3460 if test $pass -eq 1
3461 then
3462 add_flag CMK_SYSLIBS='"$CMK_SYSLIBS -lmpi"' "mpi lib"
3463 else
3464 echo "Error: can not find mpi library"
3465 test_finish 1
3468 else
3469 add_flag CMK_SYSLIBS='"$CMK_SYSLIBS $CMK_MPI_LIB"' "mpi lib"
3474 if test "$BUILD_MPI" = "1"
3475 then
3476 cat > $t <<EOT
3477 #include "mpi.h"
3478 int main(int argc, char **argv)
3480 int thread_level, provided;
3481 thread_level = MPI_THREAD_FUNNELED;
3482 MPI_Init_thread(&argc, &argv, thread_level, &provided);
3485 test_cxx "whether MPI_Init_thread is supported" "yes" "no" ""
3487 cat >>confdefs.h <<_ACEOF
3488 #define CMK_MPI_INIT_THREAD $strictpass
3489 _ACEOF
3492 mv -f ../include/mpi.h.bak ../include/mpi.h 2>/dev/null
3496 if test "$BUILD_MPI" = "1"
3497 then
3499 cat > $t <<EOT
3500 #include <stdio.h>
3501 #include <mpi.h>
3503 int main (int argc, char** argv) {
3504 return 0;
3507 test_cxx "whether macro conflicts occurs due to C++ MPI bindings" "no" "yes" ""
3509 cat >>confdefs.h <<_ACEOF
3510 #define CMK_CXX_MPI_BINDINGS $strictpass
3511 _ACEOF
3516 ################### Syscalls and Libraries ###################
3518 #### test for getrusage with RUSAGE_THREAD ###
3519 cat > $tc <<EOT
3520 #include <sys/time.h>
3521 #define __USE_GNU 1
3522 #include <sys/resource.h>
3523 int main() {
3524 struct rusage usage;
3525 getrusage(RUSAGE_THREAD, &usage);
3526 return 0;
3529 test_linkc "whether getrusage accepts RUSAGE_THREAD" "yes" "no" ""
3531 cat >>confdefs.h <<_ACEOF
3532 #define CMK_HAS_RUSAGE_THREAD $pass
3533 _ACEOF
3536 #### test for asctime ###
3538 cat > $tc <<EOT
3539 #include <time.h>
3540 int main() {
3541 struct tm *local;
3542 time_t t;
3543 t = time(NULL);
3544 local = localtime(&t);
3545 asctime(local);
3546 return 0;
3549 test_linkc "whether has asctime" "yes" "no" ""
3551 cat >>confdefs.h <<_ACEOF
3552 #define CMK_HAS_ASCTIME $pass
3553 _ACEOF
3556 #### test for log2 ###
3557 cat > $t <<EOT
3558 #include <math.h>
3559 int main() {
3560 int i = log2(10);
3561 return 0;
3564 test_link "whether has log2" "yes" "no" ""
3566 cat >>confdefs.h <<_ACEOF
3567 #define CMK_HAS_LOG2 $pass
3568 _ACEOF
3571 #### test for sqrtf ###
3572 cat > $t <<EOT
3573 #include <math.h>
3574 int main() {
3575 float i = sqrtf((float)10.0);
3576 return 0;
3579 test_link "whether has sqrtf" "yes" "no" ""
3581 cat >>confdefs.h <<_ACEOF
3582 #define CMK_HAS_SQRTF $pass
3583 _ACEOF
3586 #### test for fabsf ###
3587 cat > $t <<EOT
3588 #include <math.h>
3589 int main() {
3590 float i = fabsf((float)10.0);
3591 return 0;
3594 test_link "whether has fabsf" "yes" "no" ""
3596 cat >>confdefs.h <<_ACEOF
3597 #define CMK_HAS_FABSF $pass
3598 _ACEOF
3601 #### test for mkstemp ###
3602 cat > $t <<EOT
3603 #include <stdlib.h>
3604 #include <string.h>
3605 int main() {
3606 char fname[128];
3607 strcpy(fname, "/tmp/fdXXX.XXX");
3608 mkstemp(fname);
3609 return 0;
3612 test_link "whether has mkstemp" "yes" "no" ""
3614 cat >>confdefs.h <<_ACEOF
3615 #define CMK_USE_MKSTEMP $pass
3616 _ACEOF
3619 #### test for system ###
3620 cat > $t <<EOT
3621 #include <stdlib.h>
3622 int main() {
3623 system("/bin/ls");
3624 return 0;
3627 test_link "whether has system" "yes" "no" ""
3629 cat >>confdefs.h <<_ACEOF
3630 #define CMK_HAS_SYSTEM $pass
3631 _ACEOF
3634 #### test for sync() ###
3635 cat > $t <<EOT
3636 #include <unistd.h>
3637 int main() {
3638 sync();
3639 return 0;
3642 test_link "whether has sync()" "yes" "no" ""
3644 cat >>confdefs.h <<_ACEOF
3645 #define CMK_HAS_SYNC_FUNC $pass
3646 _ACEOF
3649 #### test for fsync() ###
3650 cat > $t <<EOT
3651 #include <unistd.h>
3652 int main() {
3653 fsync(0);
3654 return 0;
3657 test_link "whether has fsync()" "yes" "no" ""
3659 cat >>confdefs.h <<_ACEOF
3660 #define CMK_HAS_FSYNC_FUNC $pass
3661 _ACEOF
3664 #### test for fdatasync() ###
3665 cat > $t <<EOT
3666 #include <unistd.h>
3667 int main() {
3668 fdatasync(0);
3669 return 0;
3672 test_link "whether has fdatasync()" "yes" "no" ""
3674 cat >>confdefs.h <<_ACEOF
3675 #define CMK_HAS_FDATASYNC_FUNC $pass
3676 _ACEOF
3679 #### test for sbrk ###
3680 cat > $t <<EOT
3681 #include <unistd.h>
3682 int main() {
3683 void *ptr = sbrk(0);
3686 test_link "whether has sbrk" "yes" "no" ""
3688 cat >>confdefs.h <<_ACEOF
3689 #define CMK_HAS_SBRK $pass
3690 _ACEOF
3693 #### test for _setjmp/_longjmp ###
3694 cat > $t <<EOT
3695 #include <setjmp.h>
3696 int main() {
3697 jmp_buf buf;
3698 _setjmp(buf);
3699 _longjmp(buf, 0);
3702 test_link "whether has _setjmp/_longjmp" "yes" "no" ""
3704 cat >>confdefs.h <<_ACEOF
3705 #define CMK_HAS_UNDERSCORE_SETJMP $pass
3706 _ACEOF
3709 #### test for mstats ###
3710 cat > $t <<EOT
3711 #include <malloc.h>
3712 int main() {
3713 struct mstats ms = mstats();
3716 test_link "whether has mstats" "yes" "no" ""
3718 cat >>confdefs.h <<_ACEOF
3719 #define CMK_HAS_MSTATS $pass
3720 _ACEOF
3723 #### test for mallinfo ###
3724 cat > $t <<EOT
3725 #include <malloc.h>
3726 int main() {
3727 struct mallinfo mi = mallinfo();
3730 test_link "whether has mallinfo" "yes" "no" ""
3732 cat >>confdefs.h <<_ACEOF
3733 #define CMK_HAS_MALLINFO $pass
3734 _ACEOF
3737 #### test for popen ###
3738 cat > $t <<EOT
3739 #include <stdio.h>
3740 int main() {
3741 FILE *p = popen("/bin/ps", "r");
3742 pclose(p);
3745 test_link "whether has popen" "yes" "no" ""
3747 cat >>confdefs.h <<_ACEOF
3748 #define CMK_HAS_POPEN $pass
3749 _ACEOF
3752 #### test for poll ###
3753 cat > $t <<EOT
3754 #include <poll.h>
3755 void foo(void) {
3756 struct pollfd pos[3];
3757 poll(pos, 1, 1);
3760 test_cxx "whether has poll" "yes" "no" ""
3762 cat >>confdefs.h <<_ACEOF
3763 #define CMK_USE_POLL $pass
3764 _ACEOF
3767 #### check if getpagesize exists ####
3768 cat > $tc <<EOT
3769 #include <unistd.h>
3771 int main(int argc, char **argv) {
3772 int s = getpagesize();
3775 test_linkc "whether has getpagesize" "yes" "no" ""
3777 cat >>confdefs.h <<_ACEOF
3778 #define CMK_HAS_GETPAGESIZE $pass
3779 _ACEOF
3782 #### check if getpid exists ####
3783 cat > $tc <<EOT
3784 #include <sys/types.h>
3785 #include <unistd.h>
3787 int main(int argc, char **argv) {
3788 pid_t pid = getpid();
3791 test_linkc "whether has getpid" "yes" "no" ""
3793 cat >>confdefs.h <<_ACEOF
3794 #define CMK_HAS_GETPID $pass
3795 _ACEOF
3798 #### check if kill exists ####
3799 cat > $tc <<EOT
3800 #include <sys/types.h>
3801 #include <unistd.h>
3802 #include <signal.h>
3804 int main(int argc, char**argv)
3806 pid_t pid = getpid();
3807 kill(pid, 9);
3810 test_linkc "whether has kill" "yes" "no" ""
3812 cat >>confdefs.h <<_ACEOF
3813 #define CMK_HAS_KILL $pass
3814 _ACEOF
3817 #### test for setpriority ###
3818 cat > $t <<EOT
3819 #include <sys/time.h>
3820 #include <sys/resource.h>
3821 void foo(void) {
3822 setpriority(PRIO_PROCESS, 0, 0);
3825 test_cxx "whether has setpriority" "yes" "no" ""
3827 cat >>confdefs.h <<_ACEOF
3828 #define CMK_HAS_SETPRIORITY $pass
3829 _ACEOF
3832 #### test for system ###
3833 cat > $t <<EOT
3834 #include "ckdll_system.C"
3836 test_cxx "whether to use signal-safe system() " "yes" "no" ""
3838 cat >>confdefs.h <<_ACEOF
3839 #define CMK_SIGSAFE_SYSTEM $pass
3840 _ACEOF
3843 ### test sched_setaffinity ####
3844 cat > $tc <<EOT
3845 #define _GNU_SOURCE
3846 #include <sched.h>
3848 int main()
3850 cpu_set_t cpuset;
3851 CPU_ZERO(&cpuset);
3852 CPU_SET(0, &cpuset);
3853 if (sched_setaffinity(0, sizeof(cpuset), &cpuset) < 0) {
3854 return -1;
3856 return 0;
3859 test_linkc "whether sched_setaffinity call exists" "yes" "no" ""
3861 cat >>confdefs.h <<_ACEOF
3862 #define CMK_HAS_SETAFFINITY $pass
3863 _ACEOF
3866 ### test pthread_setaffinity_np ####
3867 cat > $tc <<EOT
3868 #include <stdlib.h>
3869 #include <stdio.h>
3870 #include <unistd.h>
3871 #include <pthread.h>
3873 int main()
3875 unsigned long mask = 0xffffffff;
3876 unsigned int len = sizeof(mask);
3878 if (pthread_setaffinity_np(pthread_self(), len, &mask) < 0) {
3879 return -1;
3881 return 0;
3884 test_linkc "whether pthread_setaffinity_np call exists" "yes" "no" "-lpthread"
3886 cat >>confdefs.h <<_ACEOF
3887 #define CMK_HAS_PTHREAD_SETAFFINITY $pass
3888 _ACEOF
3891 ### test pthread_spin_lock ####
3892 cat > $tc <<EOT
3893 #include <stdlib.h>
3894 #include <stdio.h>
3895 #include <unistd.h>
3896 #include <pthread.h>
3898 int main()
3900 pthread_spinlock_t lock;
3902 pthread_spin_init(&lock, 0);
3904 pthread_spin_lock(&lock);
3906 return 0;
3909 test_linkc "whether pthread_spin_lock exists" "yes" "no" "-lpthread"
3911 cat >>confdefs.h <<_ACEOF
3912 #define CMK_HAS_SPINLOCK $pass
3913 _ACEOF
3916 ### check libnuma on Linux ####
3917 if test "$WITH_NUMA" = "yes"
3918 then
3919 cat > $tc <<EOT
3920 #include <stdlib.h>
3921 #include <stdio.h>
3922 #include <linux/mempolicy.h>
3923 #include <numaif.h>
3924 #include <numa.h>
3926 int main()
3928 if (get_mempolicy(NULL, NULL, 0, 0, 0) == 0) return 0;
3929 return -1;
3932 test_linkc "whether libnuma exists" "yes" "no" "-lnuma"
3934 cat >>confdefs.h <<_ACEOF
3935 #define CMK_HAS_NUMACTRL $pass
3936 _ACEOF
3938 if test $pass -eq 1
3939 then
3940 add_flag 'CMK_SYSLIBS="$CMK_SYSLIBS -lnuma"' "libnuma"
3944 #### check bindprocessors on AIX ####
3945 cat > $tc <<EOT
3946 #include <stdlib.h>
3947 #include <stdio.h>
3948 #include <unistd.h>
3950 #include <sys/processor.h>
3952 int main()
3954 int retValue = 0;
3955 int pid;
3956 pid = getpid();
3957 if (bindprocessor(BINDPROCESS, pid, 0) == -1) return -1;
3958 return 0;
3961 test_linkc "whether bindprocessor call exists" "yes" "no" ""
3963 cat >>confdefs.h <<_ACEOF
3964 #define CMK_HAS_BINDPROCESSOR $pass
3965 _ACEOF
3969 #### check if dlopen works ####
3970 skip_dl=0
3971 # for bproc, ignore -ldl
3972 test -n "$CMK_BPROC" && skip_dl=1
3973 test -n "$CMK_NO_DL" && skip_dl=1
3974 dl_opt='-ldl'
3975 #workaround for pgcc 4.0, -ldl crash linking, so use -Wl,-ldl to skip the prelinker.
3976 case "$CMK_CXX" in
3977 pgCC*) dl_opt='-Wl,-ldl' ;;
3978 esac
3980 if test $skip_dl -eq 0
3981 then
3983 cat > $t <<EOT
3984 #include "ckdll_dlopen.C"
3985 int main() {
3986 CkDll dll("foo.so");
3987 return 0;
3990 test_link "whether dlopen links without $dl_opt" "yes" "no" ""
3991 noldl=$pass
3992 test_link "whether dlopen links with $dl_opt" "yes" "no" "$dl_opt"
3993 if test $pass -eq 1
3994 then
3995 #dlopen requires -ldl: add it to our link line
3996 add_flag CMK_LIBS='"$CMK_LIBS '$dl_opt'"' "dlopen"
3999 if test $pass -eq 1 -o $noldl -eq 1
4000 then
4001 # One version or another of dlopen worked: compile it in
4003 cat >>confdefs.h <<_ACEOF
4004 #define CMK_DLL_USE_DLOPEN 1
4005 _ACEOF
4009 ### test gethostname ####
4010 cat > $tc <<EOT
4011 #ifdef WIN32
4012 #include <Winsock2.h>
4013 #else
4014 #include <stdlib.h>
4015 #include <stdio.h>
4016 #include <unistd.h>
4017 #endif
4019 int main()
4021 char hostname[1000];
4022 gethostname(hostname, 999);
4023 return 0;
4026 test_linkc "whether gethostname call exists" "yes" "no" ""
4028 cat >>confdefs.h <<_ACEOF
4029 #define CMK_HAS_GETHOSTNAME $pass
4030 _ACEOF
4033 #### check if getProcAddress works ####
4034 cat > $t <<EOT
4035 #include "ckdll_win32.C"
4037 test_cxx "whether getProcAddress works" "yes" "no" ""
4039 cat >>confdefs.h <<_ACEOF
4040 #define CMK_DLL_USE_WIN32 $pass
4041 _ACEOF
4044 fi # end of skip_dl
4046 #### check if socklen_t exists ####
4047 cat > $t <<EOT
4048 #include <sys/types.h>
4049 #include <sys/socket.h>
4051 void foo(void) {
4052 int i;
4053 socklen_t s=sizeof(i);
4056 test_cxx "whether has socklen_t" "yes" "no" ""
4058 cat >>confdefs.h <<_ACEOF
4059 #define CMK_HAS_SOCKLEN $pass
4060 _ACEOF
4063 ### test getifaddrs ####
4064 cat > $tc <<EOT
4065 #include <netinet/in.h> /* for sockaddr_in */
4066 #include <ifaddrs.h> /* for getifaddrs */
4067 #include <net/if.h> /* for IFF_RUNNING */
4069 int main()
4071 struct ifaddrs *interfaces=0;
4072 if( getifaddrs(&interfaces) == 0 ) {
4073 struct ifaddrs *interface;
4074 for( interface=interfaces; interface; interface=interface->ifa_next ) {
4075 if( (interface->ifa_flags & IFF_UP) && ! (interface->ifa_flags & IFF_LOOPBACK) ) {
4076 const struct sockaddr_in *addr = (const struct sockaddr_in*)interface->ifa_addr;
4077 if( addr && addr->sin_family==AF_INET ) {
4078 break;
4082 freeifaddrs(interfaces);
4086 test_linkc "whether getifaddrs call exists" "yes" "no" ""
4088 cat >>confdefs.h <<_ACEOF
4089 #define CMK_HAS_GETIFADDRS $pass
4090 _ACEOF
4093 #### check if mmap exists ####
4094 cat > $t <<EOT
4095 #include <sys/types.h>
4096 #include <sys/mman.h>
4098 void *foo(void *a,int l,int fd) {
4099 return mmap((caddr_t)a,l,PROT_READ+PROT_WRITE,
4100 MAP_FIXED+MAP_PRIVATE,fd,0);
4103 test_cxx "whether the mmap() syscall exists" "yes" "no" ""
4105 cat >>confdefs.h <<_ACEOF
4106 #define CMK_HAS_MMAP $pass
4107 _ACEOF
4110 #### check if mmap accepts MAP_ANON ####
4111 cat > $t <<EOT
4112 #include <sys/types.h>
4113 #include <sys/mman.h>
4115 void *foo(void *a,int l) {
4116 return mmap((caddr_t)a,l,PROT_READ+PROT_WRITE,
4117 MAP_FIXED+MAP_PRIVATE+MAP_ANON,-1,0);
4120 test_cxx "whether mmap() accepts MAP_ANON" "yes" "no" ""
4122 cat >>confdefs.h <<_ACEOF
4123 #define CMK_HAS_MMAP_ANON $pass
4124 _ACEOF
4127 #### check if mmap accepts MAP_NORESERVE ####
4128 cat > $t <<EOT
4129 #include <sys/types.h>
4130 #include <sys/mman.h>
4132 void *foo(void *a,int l) {
4133 return mmap((caddr_t)a,l,PROT_READ+PROT_WRITE,
4134 MAP_FIXED+MAP_PRIVATE+MAP_NORESERVE,-1,0);
4137 test_cxx "whether mmap() accepts MAP_NORESERVE" "yes" "no" ""
4139 cat >>confdefs.h <<_ACEOF
4140 #define CMK_HAS_MMAP_NORESERVE $pass
4141 _ACEOF
4144 #### check if get_myaddress exists ####
4145 cat > $t <<EOT
4146 #include <rpc/rpc.h>
4148 void foo(void *a) {
4149 get_myaddress((struct sockaddr_in*)a);
4152 test_cxx "whether has get_myaddress" "yes" "no" ""
4154 cat >>confdefs.h <<_ACEOF
4155 #define CMK_HAS_GET_MYADDRESS $pass
4156 _ACEOF
4159 #### check if mprotect exists ####
4160 cat > $t <<EOT
4161 #include <stdio.h>
4162 #include <sys/mman.h>
4164 void foo(void *a,int l,int fd) {
4165 void *pg = NULL;
4166 size_t pagesize = 4096;
4167 mprotect(pg, pagesize, PROT_READ | PROT_WRITE);
4170 test_cxx "whether has mprotect" "yes" "no" ""
4172 cat >>confdefs.h <<_ACEOF
4173 #define CMK_HAS_MPROTECT $pass
4174 _ACEOF
4177 #### check if glibc backtrace exists ####
4178 cat > $t <<EOT
4179 #include "cmibacktrace.c"
4181 int main() {
4182 int nLevels=1;
4183 void *stack;
4184 CmiBacktraceRecord(&stack,0,&nLevels);
4185 return 0;
4188 TRACE_LINK_FLAG="-rdynamic"
4189 test_link "whether glibc backtrace works" "yes" "no" "-DCMK_USE_BACKTRACE=1 $TRACE_LINK_FLAG"
4191 cat >>confdefs.h <<_ACEOF
4192 #define CMK_USE_BACKTRACE $pass
4193 _ACEOF
4196 if test $strictpass -eq 1
4197 then
4198 add_flag 'CMK_LD="$CMK_LD '$TRACE_LINK_FLAG'"' "backtrace"
4199 add_flag 'CMK_LDXX="$CMK_LDXX '$TRACE_LINK_FLAG'"' "backtrace"
4202 #### test sleep ####
4203 cat > $t <<EOT
4204 #include <unistd.h>
4205 int main() {
4206 sleep(1);
4207 return 0;
4210 test_cxx "whether has sleep " "yes" "no" ""
4212 cat >>confdefs.h <<_ACEOF
4213 #define CMK_HAS_SLEEP $pass
4214 _ACEOF
4217 #### test usleep ####
4218 cat > $t <<EOT
4219 #include <unistd.h>
4220 int main() {
4221 usleep(100);
4222 return 0;
4225 test_cxx "whether has usleep " "yes" "no" ""
4227 cat >>confdefs.h <<_ACEOF
4228 #define CMK_HAS_USLEEP $pass
4229 _ACEOF
4232 #### test personality() and ADDR_NO_RANDOMIZE ####
4233 # Only works on modern Linux systems
4234 cat > $t <<EOT
4235 #include <sys/personality.h>
4236 int main() {
4237 int orig_persona = personality(0xffffffff);
4238 personality(orig_persona | ADDR_NO_RANDOMIZE);
4239 return 0;
4242 test_cxx "whether personality() and ADDR_NO_RANDOMIZE exist" "yes" "no" ""
4244 cat >>confdefs.h <<_ACEOF
4245 #define CMK_HAS_ADDR_NO_RANDOMIZE $pass
4246 _ACEOF
4250 #### test if has zlib ####
4251 # bproc doesnot like -lz in any case
4252 if test -z "$CMK_BPROC"
4253 then
4255 cat > $t <<EOT
4256 #include <zlib.h>
4257 int main() {
4258 gzFile f = gzopen("/tmp/x","r");
4259 gzprintf(f, "test...\n");
4260 gzclose(f);
4261 return 0;
4264 test_link "whether has zlib" "yes" "no" "-lz"
4266 cat >>confdefs.h <<_ACEOF
4267 #define CMK_PROJECTIONS_USE_ZLIB $pass
4268 _ACEOF
4270 if test $pass -eq 1
4271 then
4272 add_flag 'CMK_LIBZ="-lz"' "zlib"
4277 #### test if has elf.h ####
4278 cat > $t <<EOT
4279 #include <elf.h>
4280 typedef Elf32_Addr ELF_TYPE_Addr;
4281 int main() {
4284 test_cxx "whether has elf.h " "yes" "no" ""
4286 cat >>confdefs.h <<_ACEOF
4287 #define CMK_HAS_ELF_H $pass
4288 _ACEOF
4291 #### test if has Multiprocessing.h for apple ####
4292 cat > $t <<EOT
4293 #include <Carbon/Carbon.h>
4294 #include <Multiprocessing.h>
4295 int main() {
4296 int a = MPProcessorsScheduled();
4299 test_cxx "whether has Multiprocessing.h for Apple " "yes" "no" ""
4301 cat >>confdefs.h <<_ACEOF
4302 #define CMK_HAS_MULTIPROCESSING_H $pass
4303 _ACEOF
4306 #### test if "ntohl" is available ####
4307 cat > $t <<EOT
4308 #if defined(_WIN32) || defined(__MINGW_H)
4309 #include <winsock.h>
4310 #else
4311 #include <stdint.h>
4312 #include <arpa/inet.h>
4313 #include <netinet/in.h>
4314 #endif
4316 int main() {
4317 int i = 100;
4318 i = ntohl(i);
4319 return 0;
4322 test_link "whether ntohl is available" "yes" "no" ""
4324 cat >>confdefs.h <<_ACEOF
4325 #define CMK_HAS_NTOHL $pass
4326 _ACEOF
4329 ### test for libjpeg ####
4330 cat > $t <<EOT
4331 #include <stdio.h>
4332 #include <stdlib.h>
4333 #include "jpeglib.h"
4335 int main()
4337 struct jpeg_compress_struct cinfo;
4338 jpeg_create_compress(&cinfo);
4339 return 0;
4342 test_link "whether has libjpeg" "yes" "no" "-ljpeg"
4344 cat >>confdefs.h <<_ACEOF
4345 #define CMK_USE_LIBJPEG $pass
4346 _ACEOF
4348 if test $pass -eq 1
4349 then
4350 add_flag 'CMK_LIBJPEG="-ljpeg"' "libjpeg"
4353 #### check if PAPI exists ####
4354 if test -n "$CMK_USE_PAPI"
4355 then
4356 cat > $t <<EOT
4357 #include <stdio.h>
4358 #include <papi.h>
4360 int main() {
4361 if (PAPI_library_init(PAPI_VER_CURRENT) != PAPI_VER_CURRENT) return 1;
4362 return 0;
4365 test_link "whether PAPI exists" "yes" "no" "-lpapi"
4367 cat >>confdefs.h <<_ACEOF
4368 #define CMK_HAS_COUNTER_PAPI $pass
4369 _ACEOF
4371 if test $pass -eq 1
4372 then
4373 add_flag 'CMK_LIBS="$CMK_LIBS -lpapi"' "papi"
4377 #### test if Python headers are installed ####
4378 PYTHON_VERSION=`python -V 2>&1 | awk {'print $2'} | awk -F. {'print $1"."$2'}`
4379 cat > $t <<EOT
4380 #include "python${PYTHON_VERSION}/Python.h"
4381 #include "python${PYTHON_VERSION}/compile.h"
4382 #include "python${PYTHON_VERSION}/eval.h"
4383 #include "python${PYTHON_VERSION}/node.h"
4385 int main() {
4386 Py_Initialize();
4387 PyEval_InitThreads();
4388 struct _node* programNode = PyParser_SimpleParseString("return 1\n",Py_file_input);
4389 PyCodeObject *program = PyNode_Compile(programNode, "");
4392 test_link "whether Python is installed" "yes" "no" "-lpython$PYTHON_VERSION -lpthread -lutil -ldl"
4394 cat >>confdefs.h <<_ACEOF
4395 #define CMK_HAS_PYTHON $pass
4396 _ACEOF
4399 cat >>confdefs.h <<_ACEOF
4400 #define CMK_PYTHON_VERSION ${PYTHON_VERSION}
4401 _ACEOF
4403 if test $pass -eq 1
4404 then
4405 add_flag "CMK_BUILD_PYTHON=$PYTHON_VERSION" "python"
4408 ## Cray specific test
4409 if test "$CMK_BUILD_CRAY" = "1"
4410 then
4411 #echo "Test for known incompatible compiler versions"
4413 if test "$CRAY_CC_VERSION" = "8.1.4"
4414 then
4415 echo "CCE 8.1.4 produces incorrect Charm++ code"
4416 echo "Please use a newer version of the CCE compiler"
4417 echo "e.g. module load cce/8.1.7"
4418 test_finish 1
4421 #### test if Cray node topology will work ####
4422 cat > $tc <<EOT
4423 #include <pmi.h>
4425 int main() {
4426 int nid;
4427 PMI_Get_nid(0, &nid);
4429 return 0;
4432 test_linkc "whether PMI_Get_nid exists" "yes" "no" ""
4434 cat >>confdefs.h <<_ACEOF
4435 #define CMK_HAS_PMI_GET_NID $pass
4436 _ACEOF
4439 #### test if Cray mesh topology will work ####
4440 cat > $tc <<EOT
4441 #include <rca_lib.h>
4443 int main() {
4444 rca_mesh_coord_t xyz;
4445 rca_get_meshcoord(0, &xyz);
4447 return 0;
4450 test_linkc "whether Cray rca library is available" "yes" "no" "$CRAY_RCA_POST_LINK_OPTS -lrca"
4452 cat >>confdefs.h <<_ACEOF
4453 #define CMK_HAS_RCALIB $pass
4454 _ACEOF
4457 #### test if Cray mesh dimension query function will work ####
4458 cat > $tc <<EOT
4459 #include <rca_lib.h>
4461 int main() {
4462 rca_mesh_coord_t xyz;
4463 rca_get_max_dimension(&xyz);
4465 return 0;
4468 test_linkc "whether Cray rca_has get_max_dimension" "yes" "no" "$CRAY_RCA_POST_LINK_OPTS -lrca"
4470 cat >>confdefs.h <<_ACEOF
4471 #define CMK_HAS_RCA_MAX_DIMENSION $pass
4472 _ACEOF
4475 #### query Cray machine max NID if get_max_dimension not exist ####
4477 if test $pass -eq 0
4478 then
4479 cmd=`which xtprocadmin 2>/dev/null`
4480 if test -n "$cmd"
4481 then
4482 #maxnid=`xtprocadmin | tail -1 | awk '{print $1}'`
4483 # workaround for hopper
4484 (export SHELL=/bin/csh; xtprocadmin >& t.$$)
4485 maxnid=`cat t.$$ | tail -1 | awk '{print $1}'`
4486 /bin/rm -f t.$$
4487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Cray machine maxnid" >&5
4488 $as_echo_n "checking Cray machine maxnid... " >&6; }
4489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$maxnid\"" >&5
4490 $as_echo "\"$maxnid\"" >&6; }
4491 if test -n "$maxnid"
4492 then
4494 cat >>confdefs.h <<_ACEOF
4495 #define CMK_CRAY_MAXNID $maxnid
4496 _ACEOF
4505 #### query Cray machine supports BANDWIDTH_INJECTION controls####
4507 if test "$CMK_BUILD_MPI" = "1"
4508 then
4509 echo "BALANCED_INJECTION test disabled on MPI"
4510 elif test "$GNI_CRAYXC" = "1"
4511 then
4512 echo "BALANCED_INJECTION test disabled on Aries network"
4513 else
4514 cat > $tc <<EOT
4515 #include <stdint.h>
4516 #include <gni_pub.h>
4518 int main() {
4519 gni_bi_desc_t gni_bi_desc;
4520 uint32_t gni_device_id = 0;
4521 gni_return_t gni_rc = GNI_GetBIConfig(gni_device_id, &gni_bi_desc);
4522 if (gni_rc == GNI_RC_SUCCESS) {
4524 return 0;
4527 test_linkc "whether GNI_GetBIConfig exists" "yes" "no" ""
4529 cat >>confdefs.h <<_ACEOF
4530 #define CMK_BALANCED_INJECTION_API $pass
4531 _ACEOF
4533 fi # end of BIConfig test
4536 fi # end of Cray specific test
4538 #### test if it can build shared library ####
4539 cat > $t <<EOT
4540 #include "stdlib.h"
4541 extern int foo();
4542 int foo1() {
4543 void * t= malloc(2);
4544 foo();
4545 return 0;
4548 test_linkso "whether can build shared library" "yes" "no" ""
4549 if test $pass -eq 0
4550 then
4551 add_flag 'CMK_NO_BUILD_SHARED="true"' "build-shared"
4552 else
4553 BUILD_SHARED=1
4554 if test "$BUILD_MPI" = "1"
4555 then
4556 cat > $t <<EOT
4557 #include "stdlib.h"
4558 #include "mpi.h"
4559 extern int foo();
4560 int foo(int argc, char ** argv) {
4561 void * t= malloc(2);
4562 foo();
4563 MPI_Init(&argc, &argv);
4564 return 0;
4567 test_linkso "whether can build shared library with MPI" "yes" "no" ""
4568 BUILD_SHARED=$pass
4570 if test $BUILD_SHARED -eq 0
4571 then
4572 add_flag 'CMK_NO_BUILD_SHARED="true"' "build-shared"
4576 #### test the version number of bproc ####
4577 if test -n "$CMK_BPROC"
4578 then
4579 cat > $t <<EOT
4580 #include <stdio.h>
4581 #include <sys/bproc.h>
4582 int main()
4584 struct bproc_version_t vers;
4585 bproc_version(&vers);
4586 printf("%s\n", vers.version_string);
4589 test_link "whether bproc compiles" "yes" "no" "-lbproc"
4590 if test $pass -eq 1
4591 then
4592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking \"bproc version\"" >&5
4593 $as_echo_n "checking \"bproc version\"... " >&6; }
4594 bproc_ver=`./testlink`
4595 if test x$bproc_ver = x
4596 then
4597 test_result 0 "bproc version" "ERROR" ""
4598 test_finish 1
4599 else
4600 test_result 0 "bproc version" "$bproc_ver" ""
4602 bproc_ver=`echo $bproc_ver | cut -d'.' -f1`
4604 cat >>confdefs.h <<_ACEOF
4605 #define CMK_BPROC_VERSION $bproc_ver
4606 _ACEOF
4611 #### test the if command sync exists ####
4612 # Extract the first word of "sync", so it can be a program name with args.
4613 set dummy sync; ac_word=$2
4614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4615 $as_echo_n "checking for $ac_word... " >&6; }
4616 if ${ac_cv_prog_SYNC+:} false; then :
4617 $as_echo_n "(cached) " >&6
4618 else
4619 if test -n "$SYNC"; then
4620 ac_cv_prog_SYNC="$SYNC" # Let the user override the test.
4621 else
4622 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4623 for as_dir in $PATH
4625 IFS=$as_save_IFS
4626 test -z "$as_dir" && as_dir=.
4627 for ac_exec_ext in '' $ac_executable_extensions; do
4628 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4629 ac_cv_prog_SYNC="sync "
4630 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4631 break 2
4633 done
4634 done
4635 IFS=$as_save_IFS
4639 SYNC=$ac_cv_prog_SYNC
4640 if test -n "$SYNC"; then
4641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYNC" >&5
4642 $as_echo "$SYNC" >&6; }
4643 else
4644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4645 $as_echo "no" >&6; }
4649 if test -n "$SYNC"
4650 then
4652 cat >>confdefs.h <<_ACEOF
4653 #define CMK_HAS_SYNC 1
4654 _ACEOF
4658 ################## Fortran #########################
4660 #echo "set F77 compiler as: $CMK_CF77"
4661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking \"F77 compiler as\"" >&5
4662 $as_echo_n "checking \"F77 compiler as\"... " >&6; }
4663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$CMK_CF77\"" >&5
4664 $as_echo "\"$CMK_CF77\"" >&6; }
4666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking \"whether Fortran 77 compiler works\"" >&5
4667 $as_echo_n "checking \"whether Fortran 77 compiler works\"... " >&6; }
4668 ### test fortran 77 compiler ###
4669 cat > conftest.f <<EOF
4670 SUBROUTINE FOO_foo
4673 $CMK_CF77 -c conftest.f > /dev/null 2> /dev/null
4674 if test ! -r conftest.o
4675 then
4676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"no\"" >&5
4677 $as_echo "\"no\"" >&6; }
4678 else
4679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"yes\"" >&5
4680 $as_echo "\"yes\"" >&6; }
4683 ### test fortran 90 compiler ###
4684 #echo "set F90 compiler as: $CMK_CF90"
4685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking \"F90 compiler as\"" >&5
4686 $as_echo_n "checking \"F90 compiler as\"... " >&6; }
4687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$CMK_CF90\"" >&5
4688 $as_echo "\"$CMK_CF90\"" >&6; }
4690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking \"whether Fortran 90 compiler works\"" >&5
4691 $as_echo_n "checking \"whether Fortran 90 compiler works\"... " >&6; }
4692 cat > conftest2.f90 <<EOF
4693 SUBROUTINE FOO_foo
4696 $CMK_CF90 -c conftest2.f90 > /dev/null 2> /dev/null
4697 if test ! -r conftest2.o
4698 then
4699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"no\"" >&5
4700 $as_echo "\"no\"" >&6; }
4701 else
4702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"yes\"" >&5
4703 $as_echo "\"yes\"" >&6; }
4704 mv -f conftest2.o conftest.o
4705 USE_FORTRAN90=1
4708 ### check fortran name mangling
4709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking subroutine name used by Fortran 90 compiler" >&5
4710 $as_echo_n "checking subroutine name used by Fortran 90 compiler... " >&6; }
4712 if test -r conftest.o
4713 then
4714 if ${_cv_fortran_postfix+:} false; then :
4715 $as_echo_n "(cached) " >&6
4716 else
4717 NAME=`$CMK_NM conftest.o | grep "foo_foo__"`
4718 if test "$NAME" != ""
4719 then
4720 _cv_fortran_postfix=TWOSCORE
4722 cat >>confdefs.h <<_ACEOF
4723 #define CMK_FORTRAN_USES_TWOSCORE 1
4724 _ACEOF
4726 else
4727 NAME=`$CMK_NM conftest.o | grep "foo_foo_"`
4728 if test "$NAME" != ""
4729 then
4730 _cv_fortran_postfix=ONESCORE
4732 cat >>confdefs.h <<_ACEOF
4733 #define CMK_FORTRAN_USES_ONESCORE 1
4734 _ACEOF
4736 else
4737 NAME=`$CMK_NM conftest.o | grep "foo_foo"`
4738 if test "$NAME" != ""
4739 then
4740 _cv_fortran_postfix=NOSCORE
4742 cat >>confdefs.h <<_ACEOF
4743 #define CMK_FORTRAN_USES_NOSCORE 1
4744 _ACEOF
4746 else
4747 NAME=`$CMK_NM conftest.o | grep "FOO_FOO"`
4748 if test "$NAME" != ""
4749 then
4750 _cv_fortran_postfix=ALLCAPS
4752 cat >>confdefs.h <<_ACEOF
4753 #define CMK_FORTRAN_USES_ALLCAPS 1
4754 _ACEOF
4756 else
4757 echo "#################################################"
4758 echo "FORTRAN compiler generated name not supported yet"
4759 echo "#################################################"
4764 rm -f conftest.f conftest.o
4768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_cv_fortran_postfix" >&5
4769 $as_echo "$_cv_fortran_postfix" >&6; }
4770 else
4771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"Fortran compiler not working\"" >&5
4772 $as_echo "\"Fortran compiler not working\"" >&6; }
4775 ### check module name ###
4777 if test "$USE_FORTRAN90" = 1
4778 then
4779 cat > conftest.f90 <<EOF
4780 MODULE testmod
4781 interface
4782 function fpup_issizing(p)
4783 INTEGER :: p
4784 logical fpup_issizing
4785 end function
4786 end interface
4787 END MODULE
4789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Fortran 90 mod name is capital" >&5
4790 $as_echo_n "checking Fortran 90 mod name is capital... " >&6; }
4791 $CMK_CF90 -c conftest.f90 > /dev/null 2> /dev/null
4792 name=`ls TESTMOD.* 2>/dev/null`
4793 if test -n "$name"
4794 then
4795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"yes\"" >&5
4796 $as_echo "\"yes\"" >&6; }
4797 add_flag 'CMK_MOD_NAME_ALLCAPS=1' "mod name capital"
4798 else
4799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"no\"" >&5
4800 $as_echo "\"no\"" >&6; }
4801 name=`ls testmod.* 2>/dev/null`
4803 if test -n "$name"
4804 then
4805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Fortran 90 mod name extension" >&5
4806 $as_echo_n "checking Fortran 90 mod name extension... " >&6; }
4807 ext=`echo $name | sed -e 's/^[^.]*\.//'`
4808 add_flag 'CMK_MOD_EXT="'$ext'"' "mod name extension"
4809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$ext\"" >&5
4810 $as_echo "\"$ext\"" >&6; }
4811 /bin/rm -f $name
4813 /bin/rm -f conftest.f90
4816 ac_config_files="$ac_config_files libs/ck-libs/ampi/ampiCC"
4818 ac_config_commands="$ac_config_commands default"
4820 cat >confcache <<\_ACEOF
4821 # This file is a shell script that caches the results of configure
4822 # tests run on this system so they can be shared between configure
4823 # scripts and configure runs, see configure's option --config-cache.
4824 # It is not useful on other systems. If it contains results you don't
4825 # want to keep, you may remove or edit it.
4827 # config.status only pays attention to the cache file if you give it
4828 # the --recheck option to rerun configure.
4830 # `ac_cv_env_foo' variables (set or unset) will be overridden when
4831 # loading this file, other *unset* `ac_cv_foo' will be assigned the
4832 # following values.
4834 _ACEOF
4836 # The following way of writing the cache mishandles newlines in values,
4837 # but we know of no workaround that is simple, portable, and efficient.
4838 # So, we kill variables containing newlines.
4839 # Ultrix sh set writes to stderr and can't be redirected directly,
4840 # and sets the high bit in the cache file unless we assign to the vars.
4842 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
4843 eval ac_val=\$$ac_var
4844 case $ac_val in #(
4845 *${as_nl}*)
4846 case $ac_var in #(
4847 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
4848 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
4849 esac
4850 case $ac_var in #(
4851 _ | IFS | as_nl) ;; #(
4852 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
4853 *) { eval $ac_var=; unset $ac_var;} ;;
4854 esac ;;
4855 esac
4856 done
4858 (set) 2>&1 |
4859 case $as_nl`(ac_space=' '; set) 2>&1` in #(
4860 *${as_nl}ac_space=\ *)
4861 # `set' does not quote correctly, so add quotes: double-quote
4862 # substitution turns \\\\ into \\, and sed turns \\ into \.
4863 sed -n \
4864 "s/'/'\\\\''/g;
4865 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
4866 ;; #(
4868 # `set' quotes correctly as required by POSIX, so do not add quotes.
4869 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
4871 esac |
4872 sort
4874 sed '
4875 /^ac_cv_env_/b end
4876 t clear
4877 :clear
4878 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
4879 t end
4880 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
4881 :end' >>confcache
4882 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
4883 if test -w "$cache_file"; then
4884 if test "x$cache_file" != "x/dev/null"; then
4885 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
4886 $as_echo "$as_me: updating cache $cache_file" >&6;}
4887 if test ! -f "$cache_file" || test -h "$cache_file"; then
4888 cat confcache >"$cache_file"
4889 else
4890 case $cache_file in #(
4891 */* | ?:*)
4892 mv -f confcache "$cache_file"$$ &&
4893 mv -f "$cache_file"$$ "$cache_file" ;; #(
4895 mv -f confcache "$cache_file" ;;
4896 esac
4899 else
4900 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
4901 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
4904 rm -f confcache
4906 test "x$prefix" = xNONE && prefix=$ac_default_prefix
4907 # Let make expand exec_prefix.
4908 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
4910 DEFS=-DHAVE_CONFIG_H
4912 ac_libobjs=
4913 ac_ltlibobjs=
4915 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
4916 # 1. Remove the extension, and $U if already installed.
4917 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
4918 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
4919 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
4920 # will be set to the directory where LIBOBJS objects are built.
4921 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
4922 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
4923 done
4924 LIBOBJS=$ac_libobjs
4926 LTLIBOBJS=$ac_ltlibobjs
4930 : "${CONFIG_STATUS=./config.status}"
4931 ac_write_fail=0
4932 ac_clean_files_save=$ac_clean_files
4933 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
4934 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
4935 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
4936 as_write_fail=0
4937 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
4938 #! $SHELL
4939 # Generated by $as_me.
4940 # Run this file to recreate the current configuration.
4941 # Compiler output produced by configure, useful for debugging
4942 # configure, is in config.log if it exists.
4944 debug=false
4945 ac_cs_recheck=false
4946 ac_cs_silent=false
4948 SHELL=\${CONFIG_SHELL-$SHELL}
4949 export SHELL
4950 _ASEOF
4951 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
4952 ## -------------------- ##
4953 ## M4sh Initialization. ##
4954 ## -------------------- ##
4956 # Be more Bourne compatible
4957 DUALCASE=1; export DUALCASE # for MKS sh
4958 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
4959 emulate sh
4960 NULLCMD=:
4961 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
4962 # is contrary to our usage. Disable this feature.
4963 alias -g '${1+"$@"}'='"$@"'
4964 setopt NO_GLOB_SUBST
4965 else
4966 case `(set -o) 2>/dev/null` in #(
4967 *posix*) :
4968 set -o posix ;; #(
4969 *) :
4971 esac
4975 as_nl='
4977 export as_nl
4978 # Printing a long string crashes Solaris 7 /usr/bin/printf.
4979 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
4980 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
4981 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
4982 # Prefer a ksh shell builtin over an external printf program on Solaris,
4983 # but without wasting forks for bash or zsh.
4984 if test -z "$BASH_VERSION$ZSH_VERSION" \
4985 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
4986 as_echo='print -r --'
4987 as_echo_n='print -rn --'
4988 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
4989 as_echo='printf %s\n'
4990 as_echo_n='printf %s'
4991 else
4992 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
4993 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
4994 as_echo_n='/usr/ucb/echo -n'
4995 else
4996 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
4997 as_echo_n_body='eval
4998 arg=$1;
4999 case $arg in #(
5000 *"$as_nl"*)
5001 expr "X$arg" : "X\\(.*\\)$as_nl";
5002 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
5003 esac;
5004 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
5006 export as_echo_n_body
5007 as_echo_n='sh -c $as_echo_n_body as_echo'
5009 export as_echo_body
5010 as_echo='sh -c $as_echo_body as_echo'
5013 # The user is always right.
5014 if test "${PATH_SEPARATOR+set}" != set; then
5015 PATH_SEPARATOR=:
5016 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
5017 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
5018 PATH_SEPARATOR=';'
5023 # IFS
5024 # We need space, tab and new line, in precisely that order. Quoting is
5025 # there to prevent editors from complaining about space-tab.
5026 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
5027 # splitting by setting IFS to empty value.)
5028 IFS=" "" $as_nl"
5030 # Find who we are. Look in the path if we contain no directory separator.
5031 as_myself=
5032 case $0 in #((
5033 *[\\/]* ) as_myself=$0 ;;
5034 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5035 for as_dir in $PATH
5037 IFS=$as_save_IFS
5038 test -z "$as_dir" && as_dir=.
5039 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
5040 done
5041 IFS=$as_save_IFS
5044 esac
5045 # We did not find ourselves, most probably we were run as `sh COMMAND'
5046 # in which case we are not to be found in the path.
5047 if test "x$as_myself" = x; then
5048 as_myself=$0
5050 if test ! -f "$as_myself"; then
5051 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
5052 exit 1
5055 # Unset variables that we do not need and which cause bugs (e.g. in
5056 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
5057 # suppresses any "Segmentation fault" message there. '((' could
5058 # trigger a bug in pdksh 5.2.14.
5059 for as_var in BASH_ENV ENV MAIL MAILPATH
5060 do eval test x\${$as_var+set} = xset \
5061 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
5062 done
5063 PS1='$ '
5064 PS2='> '
5065 PS4='+ '
5067 # NLS nuisances.
5068 LC_ALL=C
5069 export LC_ALL
5070 LANGUAGE=C
5071 export LANGUAGE
5073 # CDPATH.
5074 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
5077 # as_fn_error STATUS ERROR [LINENO LOG_FD]
5078 # ----------------------------------------
5079 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
5080 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
5081 # script with STATUS, using 1 if that was 0.
5082 as_fn_error ()
5084 as_status=$1; test $as_status -eq 0 && as_status=1
5085 if test "$4"; then
5086 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
5087 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
5089 $as_echo "$as_me: error: $2" >&2
5090 as_fn_exit $as_status
5091 } # as_fn_error
5094 # as_fn_set_status STATUS
5095 # -----------------------
5096 # Set $? to STATUS, without forking.
5097 as_fn_set_status ()
5099 return $1
5100 } # as_fn_set_status
5102 # as_fn_exit STATUS
5103 # -----------------
5104 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
5105 as_fn_exit ()
5107 set +e
5108 as_fn_set_status $1
5109 exit $1
5110 } # as_fn_exit
5112 # as_fn_unset VAR
5113 # ---------------
5114 # Portably unset VAR.
5115 as_fn_unset ()
5117 { eval $1=; unset $1;}
5119 as_unset=as_fn_unset
5120 # as_fn_append VAR VALUE
5121 # ----------------------
5122 # Append the text in VALUE to the end of the definition contained in VAR. Take
5123 # advantage of any shell optimizations that allow amortized linear growth over
5124 # repeated appends, instead of the typical quadratic growth present in naive
5125 # implementations.
5126 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
5127 eval 'as_fn_append ()
5129 eval $1+=\$2
5131 else
5132 as_fn_append ()
5134 eval $1=\$$1\$2
5136 fi # as_fn_append
5138 # as_fn_arith ARG...
5139 # ------------------
5140 # Perform arithmetic evaluation on the ARGs, and store the result in the
5141 # global $as_val. Take advantage of shells that can avoid forks. The arguments
5142 # must be portable across $(()) and expr.
5143 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
5144 eval 'as_fn_arith ()
5146 as_val=$(( $* ))
5148 else
5149 as_fn_arith ()
5151 as_val=`expr "$@" || test $? -eq 1`
5153 fi # as_fn_arith
5156 if expr a : '\(a\)' >/dev/null 2>&1 &&
5157 test "X`expr 00001 : '.*\(...\)'`" = X001; then
5158 as_expr=expr
5159 else
5160 as_expr=false
5163 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
5164 as_basename=basename
5165 else
5166 as_basename=false
5169 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
5170 as_dirname=dirname
5171 else
5172 as_dirname=false
5175 as_me=`$as_basename -- "$0" ||
5176 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
5177 X"$0" : 'X\(//\)$' \| \
5178 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
5179 $as_echo X/"$0" |
5180 sed '/^.*\/\([^/][^/]*\)\/*$/{
5181 s//\1/
5184 /^X\/\(\/\/\)$/{
5185 s//\1/
5188 /^X\/\(\/\).*/{
5189 s//\1/
5192 s/.*/./; q'`
5194 # Avoid depending upon Character Ranges.
5195 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
5196 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
5197 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
5198 as_cr_digits='0123456789'
5199 as_cr_alnum=$as_cr_Letters$as_cr_digits
5201 ECHO_C= ECHO_N= ECHO_T=
5202 case `echo -n x` in #(((((
5203 -n*)
5204 case `echo 'xy\c'` in
5205 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
5206 xy) ECHO_C='\c';;
5207 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
5208 ECHO_T=' ';;
5209 esac;;
5211 ECHO_N='-n';;
5212 esac
5214 rm -f conf$$ conf$$.exe conf$$.file
5215 if test -d conf$$.dir; then
5216 rm -f conf$$.dir/conf$$.file
5217 else
5218 rm -f conf$$.dir
5219 mkdir conf$$.dir 2>/dev/null
5221 if (echo >conf$$.file) 2>/dev/null; then
5222 if ln -s conf$$.file conf$$ 2>/dev/null; then
5223 as_ln_s='ln -s'
5224 # ... but there are two gotchas:
5225 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
5226 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
5227 # In both cases, we have to default to `cp -pR'.
5228 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
5229 as_ln_s='cp -pR'
5230 elif ln conf$$.file conf$$ 2>/dev/null; then
5231 as_ln_s=ln
5232 else
5233 as_ln_s='cp -pR'
5235 else
5236 as_ln_s='cp -pR'
5238 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
5239 rmdir conf$$.dir 2>/dev/null
5242 # as_fn_mkdir_p
5243 # -------------
5244 # Create "$as_dir" as a directory, including parents if necessary.
5245 as_fn_mkdir_p ()
5248 case $as_dir in #(
5249 -*) as_dir=./$as_dir;;
5250 esac
5251 test -d "$as_dir" || eval $as_mkdir_p || {
5252 as_dirs=
5253 while :; do
5254 case $as_dir in #(
5255 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
5256 *) as_qdir=$as_dir;;
5257 esac
5258 as_dirs="'$as_qdir' $as_dirs"
5259 as_dir=`$as_dirname -- "$as_dir" ||
5260 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
5261 X"$as_dir" : 'X\(//\)[^/]' \| \
5262 X"$as_dir" : 'X\(//\)$' \| \
5263 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
5264 $as_echo X"$as_dir" |
5265 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
5266 s//\1/
5269 /^X\(\/\/\)[^/].*/{
5270 s//\1/
5273 /^X\(\/\/\)$/{
5274 s//\1/
5277 /^X\(\/\).*/{
5278 s//\1/
5281 s/.*/./; q'`
5282 test -d "$as_dir" && break
5283 done
5284 test -z "$as_dirs" || eval "mkdir $as_dirs"
5285 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
5288 } # as_fn_mkdir_p
5289 if mkdir -p . 2>/dev/null; then
5290 as_mkdir_p='mkdir -p "$as_dir"'
5291 else
5292 test -d ./-p && rmdir ./-p
5293 as_mkdir_p=false
5297 # as_fn_executable_p FILE
5298 # -----------------------
5299 # Test if FILE is an executable regular file.
5300 as_fn_executable_p ()
5302 test -f "$1" && test -x "$1"
5303 } # as_fn_executable_p
5304 as_test_x='test -x'
5305 as_executable_p=as_fn_executable_p
5307 # Sed expression to map a string onto a valid CPP name.
5308 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
5310 # Sed expression to map a string onto a valid variable name.
5311 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
5314 exec 6>&1
5315 ## ----------------------------------- ##
5316 ## Main body of $CONFIG_STATUS script. ##
5317 ## ----------------------------------- ##
5318 _ASEOF
5319 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
5321 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
5322 # Save the log message, to keep $0 and so on meaningful, and to
5323 # report actual input values of CONFIG_FILES etc. instead of their
5324 # values after options handling.
5325 ac_log="
5326 This file was extended by $as_me, which was
5327 generated by GNU Autoconf 2.69. Invocation command line was
5329 CONFIG_FILES = $CONFIG_FILES
5330 CONFIG_HEADERS = $CONFIG_HEADERS
5331 CONFIG_LINKS = $CONFIG_LINKS
5332 CONFIG_COMMANDS = $CONFIG_COMMANDS
5333 $ $0 $@
5335 on `(hostname || uname -n) 2>/dev/null | sed 1q`
5338 _ACEOF
5340 case $ac_config_files in *"
5341 "*) set x $ac_config_files; shift; ac_config_files=$*;;
5342 esac
5344 case $ac_config_headers in *"
5345 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
5346 esac
5349 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
5350 # Files that config.status was made for.
5351 config_files="$ac_config_files"
5352 config_headers="$ac_config_headers"
5353 config_commands="$ac_config_commands"
5355 _ACEOF
5357 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
5358 ac_cs_usage="\
5359 \`$as_me' instantiates files and other configuration actions
5360 from templates according to the current configuration. Unless the files
5361 and actions are specified as TAGs, all are instantiated by default.
5363 Usage: $0 [OPTION]... [TAG]...
5365 -h, --help print this help, then exit
5366 -V, --version print version number and configuration settings, then exit
5367 --config print configuration, then exit
5368 -q, --quiet, --silent
5369 do not print progress messages
5370 -d, --debug don't remove temporary files
5371 --recheck update $as_me by reconfiguring in the same conditions
5372 --file=FILE[:TEMPLATE]
5373 instantiate the configuration file FILE
5374 --header=FILE[:TEMPLATE]
5375 instantiate the configuration header FILE
5377 Configuration files:
5378 $config_files
5380 Configuration headers:
5381 $config_headers
5383 Configuration commands:
5384 $config_commands
5386 Report bugs to the package provider."
5388 _ACEOF
5389 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
5390 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
5391 ac_cs_version="\\
5392 config.status
5393 configured by $0, generated by GNU Autoconf 2.69,
5394 with options \\"\$ac_cs_config\\"
5396 Copyright (C) 2012 Free Software Foundation, Inc.
5397 This config.status script is free software; the Free Software Foundation
5398 gives unlimited permission to copy, distribute and modify it."
5400 ac_pwd='$ac_pwd'
5401 srcdir='$srcdir'
5402 test -n "\$AWK" || AWK=awk
5403 _ACEOF
5405 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
5406 # The default lists apply if the user does not specify any file.
5407 ac_need_defaults=:
5408 while test $# != 0
5410 case $1 in
5411 --*=?*)
5412 ac_option=`expr "X$1" : 'X\([^=]*\)='`
5413 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
5414 ac_shift=:
5416 --*=)
5417 ac_option=`expr "X$1" : 'X\([^=]*\)='`
5418 ac_optarg=
5419 ac_shift=:
5422 ac_option=$1
5423 ac_optarg=$2
5424 ac_shift=shift
5426 esac
5428 case $ac_option in
5429 # Handling of the options.
5430 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
5431 ac_cs_recheck=: ;;
5432 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
5433 $as_echo "$ac_cs_version"; exit ;;
5434 --config | --confi | --conf | --con | --co | --c )
5435 $as_echo "$ac_cs_config"; exit ;;
5436 --debug | --debu | --deb | --de | --d | -d )
5437 debug=: ;;
5438 --file | --fil | --fi | --f )
5439 $ac_shift
5440 case $ac_optarg in
5441 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
5442 '') as_fn_error $? "missing file argument" ;;
5443 esac
5444 as_fn_append CONFIG_FILES " '$ac_optarg'"
5445 ac_need_defaults=false;;
5446 --header | --heade | --head | --hea )
5447 $ac_shift
5448 case $ac_optarg in
5449 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
5450 esac
5451 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
5452 ac_need_defaults=false;;
5453 --he | --h)
5454 # Conflict between --help and --header
5455 as_fn_error $? "ambiguous option: \`$1'
5456 Try \`$0 --help' for more information.";;
5457 --help | --hel | -h )
5458 $as_echo "$ac_cs_usage"; exit ;;
5459 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
5460 | -silent | --silent | --silen | --sile | --sil | --si | --s)
5461 ac_cs_silent=: ;;
5463 # This is an error.
5464 -*) as_fn_error $? "unrecognized option: \`$1'
5465 Try \`$0 --help' for more information." ;;
5467 *) as_fn_append ac_config_targets " $1"
5468 ac_need_defaults=false ;;
5470 esac
5471 shift
5472 done
5474 ac_configure_extra_args=
5476 if $ac_cs_silent; then
5477 exec 6>/dev/null
5478 ac_configure_extra_args="$ac_configure_extra_args --silent"
5481 _ACEOF
5482 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
5483 if \$ac_cs_recheck; then
5484 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
5485 shift
5486 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
5487 CONFIG_SHELL='$SHELL'
5488 export CONFIG_SHELL
5489 exec "\$@"
5492 _ACEOF
5493 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
5494 exec 5>>config.log
5496 echo
5497 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
5498 ## Running $as_me. ##
5499 _ASBOX
5500 $as_echo "$ac_log"
5501 } >&5
5503 _ACEOF
5504 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
5505 _ACEOF
5507 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
5509 # Handling of arguments.
5510 for ac_config_target in $ac_config_targets
5512 case $ac_config_target in
5513 "conv-autoconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS conv-autoconfig.h" ;;
5514 "config-cleanup") CONFIG_COMMANDS="$CONFIG_COMMANDS config-cleanup" ;;
5515 "libs/ck-libs/ampi/ampiCC") CONFIG_FILES="$CONFIG_FILES libs/ck-libs/ampi/ampiCC" ;;
5516 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
5518 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
5519 esac
5520 done
5523 # If the user did not use the arguments to specify the items to instantiate,
5524 # then the envvar interface is used. Set only those that are not.
5525 # We use the long form for the default assignment because of an extremely
5526 # bizarre bug on SunOS 4.1.3.
5527 if $ac_need_defaults; then
5528 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
5529 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
5530 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
5533 # Have a temporary directory for convenience. Make it in the build tree
5534 # simply because there is no reason against having it here, and in addition,
5535 # creating and moving files from /tmp can sometimes cause problems.
5536 # Hook for its removal unless debugging.
5537 # Note that there is a small window in which the directory will not be cleaned:
5538 # after its creation but before its name has been assigned to `$tmp'.
5539 $debug ||
5541 tmp= ac_tmp=
5542 trap 'exit_status=$?
5543 : "${ac_tmp:=$tmp}"
5544 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
5546 trap 'as_fn_exit 1' 1 2 13 15
5548 # Create a (secure) tmp directory for tmp files.
5551 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
5552 test -d "$tmp"
5553 } ||
5555 tmp=./conf$$-$RANDOM
5556 (umask 077 && mkdir "$tmp")
5557 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
5558 ac_tmp=$tmp
5560 # Set up the scripts for CONFIG_FILES section.
5561 # No need to generate them if there are no CONFIG_FILES.
5562 # This happens for instance with `./config.status config.h'.
5563 if test -n "$CONFIG_FILES"; then
5566 ac_cr=`echo X | tr X '\015'`
5567 # On cygwin, bash can eat \r inside `` if the user requested igncr.
5568 # But we know of no other shell where ac_cr would be empty at this
5569 # point, so we can use a bashism as a fallback.
5570 if test "x$ac_cr" = x; then
5571 eval ac_cr=\$\'\\r\'
5573 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
5574 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
5575 ac_cs_awk_cr='\\r'
5576 else
5577 ac_cs_awk_cr=$ac_cr
5580 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
5581 _ACEOF
5585 echo "cat >conf$$subs.awk <<_ACEOF" &&
5586 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
5587 echo "_ACEOF"
5588 } >conf$$subs.sh ||
5589 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
5590 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
5591 ac_delim='%!_!# '
5592 for ac_last_try in false false false false false :; do
5593 . ./conf$$subs.sh ||
5594 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
5596 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
5597 if test $ac_delim_n = $ac_delim_num; then
5598 break
5599 elif $ac_last_try; then
5600 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
5601 else
5602 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
5604 done
5605 rm -f conf$$subs.sh
5607 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
5608 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
5609 _ACEOF
5610 sed -n '
5612 s/^/S["/; s/!.*/"]=/
5615 s/^[^!]*!//
5616 :repl
5617 t repl
5618 s/'"$ac_delim"'$//
5619 t delim
5622 s/\(.\{148\}\)..*/\1/
5623 t more1
5624 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
5627 b repl
5628 :more1
5629 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
5632 s/.\{148\}//
5633 t nl
5634 :delim
5636 s/\(.\{148\}\)..*/\1/
5637 t more2
5638 s/["\\]/\\&/g; s/^/"/; s/$/"/
5641 :more2
5642 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
5645 s/.\{148\}//
5646 t delim
5647 ' <conf$$subs.awk | sed '
5648 /^[^""]/{
5650 s/\n//
5652 ' >>$CONFIG_STATUS || ac_write_fail=1
5653 rm -f conf$$subs.awk
5654 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
5655 _ACAWK
5656 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
5657 for (key in S) S_is_set[key] = 1
5658 FS = "\a"
5662 line = $ 0
5663 nfields = split(line, field, "@")
5664 substed = 0
5665 len = length(field[1])
5666 for (i = 2; i < nfields; i++) {
5667 key = field[i]
5668 keylen = length(key)
5669 if (S_is_set[key]) {
5670 value = S[key]
5671 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
5672 len += length(value) + length(field[++i])
5673 substed = 1
5674 } else
5675 len += 1 + keylen
5678 print line
5681 _ACAWK
5682 _ACEOF
5683 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
5684 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
5685 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
5686 else
5688 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
5689 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
5690 _ACEOF
5692 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
5693 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
5694 # trailing colons and then remove the whole line if VPATH becomes empty
5695 # (actually we leave an empty line to preserve line numbers).
5696 if test "x$srcdir" = x.; then
5697 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
5699 s///
5700 s/^/:/
5701 s/[ ]*$/:/
5702 s/:\$(srcdir):/:/g
5703 s/:\${srcdir}:/:/g
5704 s/:@srcdir@:/:/g
5705 s/^:*//
5706 s/:*$//
5708 s/\(=[ ]*\).*/\1/
5710 s/\n//
5711 s/^[^=]*=[ ]*$//
5715 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
5716 fi # test -n "$CONFIG_FILES"
5718 # Set up the scripts for CONFIG_HEADERS section.
5719 # No need to generate them if there are no CONFIG_HEADERS.
5720 # This happens for instance with `./config.status Makefile'.
5721 if test -n "$CONFIG_HEADERS"; then
5722 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
5723 BEGIN {
5724 _ACEOF
5726 # Transform confdefs.h into an awk script `defines.awk', embedded as
5727 # here-document in config.status, that substitutes the proper values into
5728 # config.h.in to produce config.h.
5730 # Create a delimiter string that does not exist in confdefs.h, to ease
5731 # handling of long lines.
5732 ac_delim='%!_!# '
5733 for ac_last_try in false false :; do
5734 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
5735 if test -z "$ac_tt"; then
5736 break
5737 elif $ac_last_try; then
5738 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
5739 else
5740 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
5742 done
5744 # For the awk script, D is an array of macro values keyed by name,
5745 # likewise P contains macro parameters if any. Preserve backslash
5746 # newline sequences.
5748 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
5749 sed -n '
5750 s/.\{148\}/&'"$ac_delim"'/g
5751 t rset
5752 :rset
5753 s/^[ ]*#[ ]*define[ ][ ]*/ /
5754 t def
5756 :def
5757 s/\\$//
5758 t bsnl
5759 s/["\\]/\\&/g
5760 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
5761 D["\1"]=" \3"/p
5762 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
5764 :bsnl
5765 s/["\\]/\\&/g
5766 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
5767 D["\1"]=" \3\\\\\\n"\\/p
5768 t cont
5769 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
5770 t cont
5772 :cont
5774 s/.\{148\}/&'"$ac_delim"'/g
5775 t clear
5776 :clear
5777 s/\\$//
5778 t bsnlc
5779 s/["\\]/\\&/g; s/^/"/; s/$/"/p
5781 :bsnlc
5782 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
5783 b cont
5784 ' <confdefs.h | sed '
5785 s/'"$ac_delim"'/"\\\
5786 "/g' >>$CONFIG_STATUS || ac_write_fail=1
5788 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
5789 for (key in D) D_is_set[key] = 1
5790 FS = "\a"
5792 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
5793 line = \$ 0
5794 split(line, arg, " ")
5795 if (arg[1] == "#") {
5796 defundef = arg[2]
5797 mac1 = arg[3]
5798 } else {
5799 defundef = substr(arg[1], 2)
5800 mac1 = arg[2]
5802 split(mac1, mac2, "(") #)
5803 macro = mac2[1]
5804 prefix = substr(line, 1, index(line, defundef) - 1)
5805 if (D_is_set[macro]) {
5806 # Preserve the white space surrounding the "#".
5807 print prefix "define", macro P[macro] D[macro]
5808 next
5809 } else {
5810 # Replace #undef with comments. This is necessary, for example,
5811 # in the case of _POSIX_SOURCE, which is predefined and required
5812 # on some systems where configure will not decide to define it.
5813 if (defundef == "undef") {
5814 print "/*", prefix defundef, macro, "*/"
5815 next
5819 { print }
5820 _ACAWK
5821 _ACEOF
5822 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
5823 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
5824 fi # test -n "$CONFIG_HEADERS"
5827 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
5828 shift
5829 for ac_tag
5831 case $ac_tag in
5832 :[FHLC]) ac_mode=$ac_tag; continue;;
5833 esac
5834 case $ac_mode$ac_tag in
5835 :[FHL]*:*);;
5836 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
5837 :[FH]-) ac_tag=-:-;;
5838 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
5839 esac
5840 ac_save_IFS=$IFS
5841 IFS=:
5842 set x $ac_tag
5843 IFS=$ac_save_IFS
5844 shift
5845 ac_file=$1
5846 shift
5848 case $ac_mode in
5849 :L) ac_source=$1;;
5850 :[FH])
5851 ac_file_inputs=
5852 for ac_f
5854 case $ac_f in
5855 -) ac_f="$ac_tmp/stdin";;
5856 *) # Look for the file first in the build tree, then in the source tree
5857 # (if the path is not absolute). The absolute path cannot be DOS-style,
5858 # because $ac_f cannot contain `:'.
5859 test -f "$ac_f" ||
5860 case $ac_f in
5861 [\\/$]*) false;;
5862 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
5863 esac ||
5864 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
5865 esac
5866 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
5867 as_fn_append ac_file_inputs " '$ac_f'"
5868 done
5870 # Let's still pretend it is `configure' which instantiates (i.e., don't
5871 # use $as_me), people would be surprised to read:
5872 # /* config.h. Generated by config.status. */
5873 configure_input='Generated from '`
5874 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
5875 `' by configure.'
5876 if test x"$ac_file" != x-; then
5877 configure_input="$ac_file. $configure_input"
5878 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
5879 $as_echo "$as_me: creating $ac_file" >&6;}
5881 # Neutralize special characters interpreted by sed in replacement strings.
5882 case $configure_input in #(
5883 *\&* | *\|* | *\\* )
5884 ac_sed_conf_input=`$as_echo "$configure_input" |
5885 sed 's/[\\\\&|]/\\\\&/g'`;; #(
5886 *) ac_sed_conf_input=$configure_input;;
5887 esac
5889 case $ac_tag in
5890 *:-:* | *:-) cat >"$ac_tmp/stdin" \
5891 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
5892 esac
5894 esac
5896 ac_dir=`$as_dirname -- "$ac_file" ||
5897 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
5898 X"$ac_file" : 'X\(//\)[^/]' \| \
5899 X"$ac_file" : 'X\(//\)$' \| \
5900 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
5901 $as_echo X"$ac_file" |
5902 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
5903 s//\1/
5906 /^X\(\/\/\)[^/].*/{
5907 s//\1/
5910 /^X\(\/\/\)$/{
5911 s//\1/
5914 /^X\(\/\).*/{
5915 s//\1/
5918 s/.*/./; q'`
5919 as_dir="$ac_dir"; as_fn_mkdir_p
5920 ac_builddir=.
5922 case "$ac_dir" in
5923 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
5925 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
5926 # A ".." for each directory in $ac_dir_suffix.
5927 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
5928 case $ac_top_builddir_sub in
5929 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
5930 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
5931 esac ;;
5932 esac
5933 ac_abs_top_builddir=$ac_pwd
5934 ac_abs_builddir=$ac_pwd$ac_dir_suffix
5935 # for backward compatibility:
5936 ac_top_builddir=$ac_top_build_prefix
5938 case $srcdir in
5939 .) # We are building in place.
5940 ac_srcdir=.
5941 ac_top_srcdir=$ac_top_builddir_sub
5942 ac_abs_top_srcdir=$ac_pwd ;;
5943 [\\/]* | ?:[\\/]* ) # Absolute name.
5944 ac_srcdir=$srcdir$ac_dir_suffix;
5945 ac_top_srcdir=$srcdir
5946 ac_abs_top_srcdir=$srcdir ;;
5947 *) # Relative name.
5948 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
5949 ac_top_srcdir=$ac_top_build_prefix$srcdir
5950 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
5951 esac
5952 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
5955 case $ac_mode in
5958 # CONFIG_FILE
5961 _ACEOF
5963 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
5964 # If the template does not know about datarootdir, expand it.
5965 # FIXME: This hack should be removed a few years after 2.60.
5966 ac_datarootdir_hack=; ac_datarootdir_seen=
5967 ac_sed_dataroot='
5968 /datarootdir/ {
5972 /@datadir@/p
5973 /@docdir@/p
5974 /@infodir@/p
5975 /@localedir@/p
5976 /@mandir@/p'
5977 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
5978 *datarootdir*) ac_datarootdir_seen=yes;;
5979 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
5980 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
5981 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
5982 _ACEOF
5983 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
5984 ac_datarootdir_hack='
5985 s&@datadir@&$datadir&g
5986 s&@docdir@&$docdir&g
5987 s&@infodir@&$infodir&g
5988 s&@localedir@&$localedir&g
5989 s&@mandir@&$mandir&g
5990 s&\\\${datarootdir}&$datarootdir&g' ;;
5991 esac
5992 _ACEOF
5994 # Neutralize VPATH when `$srcdir' = `.'.
5995 # Shell code in configure.ac might set extrasub.
5996 # FIXME: do we really want to maintain this feature?
5997 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
5998 ac_sed_extra="$ac_vpsub
5999 $extrasub
6000 _ACEOF
6001 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
6003 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
6004 s|@configure_input@|$ac_sed_conf_input|;t t
6005 s&@top_builddir@&$ac_top_builddir_sub&;t t
6006 s&@top_build_prefix@&$ac_top_build_prefix&;t t
6007 s&@srcdir@&$ac_srcdir&;t t
6008 s&@abs_srcdir@&$ac_abs_srcdir&;t t
6009 s&@top_srcdir@&$ac_top_srcdir&;t t
6010 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
6011 s&@builddir@&$ac_builddir&;t t
6012 s&@abs_builddir@&$ac_abs_builddir&;t t
6013 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
6014 $ac_datarootdir_hack
6016 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
6017 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
6019 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
6020 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
6021 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
6022 "$ac_tmp/out"`; test -z "$ac_out"; } &&
6023 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
6024 which seems to be undefined. Please make sure it is defined" >&5
6025 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
6026 which seems to be undefined. Please make sure it is defined" >&2;}
6028 rm -f "$ac_tmp/stdin"
6029 case $ac_file in
6030 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
6031 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
6032 esac \
6033 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
6037 # CONFIG_HEADER
6039 if test x"$ac_file" != x-; then
6041 $as_echo "/* $configure_input */" \
6042 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
6043 } >"$ac_tmp/config.h" \
6044 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
6045 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
6046 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
6047 $as_echo "$as_me: $ac_file is unchanged" >&6;}
6048 else
6049 rm -f "$ac_file"
6050 mv "$ac_tmp/config.h" "$ac_file" \
6051 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
6053 else
6054 $as_echo "/* $configure_input */" \
6055 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
6056 || as_fn_error $? "could not create -" "$LINENO" 5
6060 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
6061 $as_echo "$as_me: executing $ac_file commands" >&6;}
6063 esac
6066 case $ac_file$ac_mode in
6067 "config-cleanup":C) sed -i -e 's:^#define\s\+PACKAGE://&:' conv-autoconfig.h ;;
6068 "default":C) chmod +x libs/ck-libs/ampi/ampiCC
6071 esac
6072 done # for ac_tag
6075 as_fn_exit 0
6076 _ACEOF
6077 ac_clean_files=$ac_clean_files_save
6079 test $ac_write_fail = 0 ||
6080 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
6083 # configure is writing to config.log, and then calls config.status.
6084 # config.status does its own redirection, appending to config.log.
6085 # Unfortunately, on DOS this fails, as config.log is still kept open
6086 # by configure, so config.status won't be able to write to it; its
6087 # output is simply discarded. So we exec the FD to /dev/null,
6088 # effectively closing config.log, so it can be properly (re)opened and
6089 # appended to by config.status. When coming back to configure, we
6090 # need to make the FD available again.
6091 if test "$no_create" != yes; then
6092 ac_cs_success=:
6093 ac_config_status_args=
6094 test "$silent" = yes &&
6095 ac_config_status_args="$ac_config_status_args --quiet"
6096 exec 5>/dev/null
6097 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
6098 exec 5>>config.log
6099 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
6100 # would make configure fail if this is the last instruction.
6101 $ac_cs_success || as_fn_exit 1
6103 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
6104 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
6105 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}