1 # Process this file with autoconf to produce a configure script, like so:
2 # aclocal -I . -I .. -I ../config && autoconf && autoheader && automake
4 # Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
6 # Free Software Foundation, Inc.
7 # Contributed by Gary Funck <gary@intrepid.com>
8 # Derived from libgomp/configure.ac
10 #This file is part of GNU UPC.
12 #GNU UPC is free software; you can redistribute it and/or modify
13 #it under the terms of the GNU General Public License as published by
14 #the Free Software Foundation; either version 2, or (at your option)
17 #GNU UPC is distributed in the hope that it will be useful,
18 #but WITHOUT ANY WARRANTY; without even the implied warranty of
19 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 #GNU General Public License for more details.
22 #You should have received a copy of the GNU General Public License
23 #along with GNU UPC; see the file COPYING. If not, write to
24 #the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
28 AC_INIT([GNU UPC Runtime Library], 1.0,,[libgupc])
29 AC_CONFIG_SRCDIR([include/upc.h])
30 AC_CONFIG_HEADERS([config.h])
36 AC_MSG_CHECKING([for --enable-version-specific-runtime-libs])
37 LIBGUPC_ENABLE(version-specific-runtime-libs, no, ,
38 [specify that runtime libraries should be installed
39 in a compiler-specific directory],
41 AC_MSG_RESULT($enable_version_specific_runtime_libs)
43 # We would like our source tree to be readonly. However when releases or
44 # pre-releases are generated, the flex/bison generated files as well as the
45 # various formats of manuals need to be included along with the rest of the
46 # sources. Therefore we have --enable-generated-files-in-srcdir to do
48 AC_MSG_CHECKING([for --enable-generated-files-in-srcdir])
49 LIBGUPC_ENABLE(generated-files-in-srcdir, no, ,
50 [put copies of generated files in source dir intended for creating source
51 tarballs for users without texinfo bison or flex],
53 AC_MSG_RESULT($enable_generated_files_in_srcdir)
54 AM_CONDITIONAL(GENINSRC, test "$enable_generated_files_in_srcdir" = yes)
58 # Get build environment
61 # Gets build, host, target, *_vendor, *_cpu, *_os, etc.
63 # You will slowly go insane if you do not grok the following fact: when
64 # building this library, the top-level /target/ becomes the library's /host/.
66 # configure then causes --target to default to --host, exactly like any
67 # other package using autoconf. Therefore, 'target' and 'host' will
68 # always be the same. This makes sense both for native and cross compilers
69 # just think about it for a little while. :-)
71 # Also, if this library is being configured as part of a cross compiler, the
72 # top-level configure script will pass the "real" host as $with_cross_host.
74 # Do not delete or change the following two lines. For why, see
75 # http://gcc.gnu.org/ml/libstdc++/2003-07/msg00451.html
77 target_alias=${target_alias-$host_alias}
79 # Sets up automake. Must come after AC_CANONICAL_SYSTEM. Each of the
80 # following is magically included in AUTOMAKE_OPTIONS in each Makefile.am.
81 # 1.11.1: minimum required version
82 # no-define: PACKAGE and VERSION will not be #define'd in config.h (a bunch
83 # of other PACKAGE_* variables will, however, and there's nothing
84 # we can do about that; they come from AC_INIT).
85 # foreign: we don't follow the normal rules for GNU packages (no COPYING
86 # file in the top srcdir, etc, etc), so stop complaining.
87 # -Wall: turns on all automake warnings...
88 # -Wno-portability: ...except this one, since GNU make is required.
89 # -Wno-override: ... and this one, since we do want this in testsuite.
90 AM_INIT_AUTOMAKE([1.11.1 foreign -Wall -Wno-portability -Wno-override])
92 # UPC disables multilib for portals4 runtime
93 if echo "${with_upc_runtime}" | grep -v -i '^portals4$' 2>&1 >/dev/null; then
94 AM_ENABLE_MULTILIB(, ..)
97 # Calculate toolexeclibdir
98 # Also toolexecdir, though it's only used in toolexeclibdir
99 case ${enable_version_specific_runtime_libs} in
101 # Need the gcc compiler version to know where to install libraries
102 # and header files if --enable-version-specific-runtime-libs option
104 toolexecdir='$(libdir)/gcc/$(target_alias)'
105 toolexeclibdir='$(toolexecdir)/$(gcc_version)$(MULTISUBDIR)'
108 if test -n "$with_cross_host" &&
109 test x"$with_cross_host" != x"no"; then
110 # Install a library built with a cross compiler in tooldir, not libdir.
111 toolexecdir='$(exec_prefix)/$(target_alias)'
112 toolexeclibdir='$(toolexecdir)/lib'
114 toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
115 toolexeclibdir='$(libdir)'
117 multi_os_directory=`$CC -print-multi-os-directory`
118 case $multi_os_directory in
119 .) ;; # Avoid trailing /.
120 *) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;;
124 AC_MSG_ERROR(['$enable_version_specific_runtime_libs' is not set])
127 AC_SUBST(toolexecdir)
128 AC_SUBST(toolexeclibdir)
130 # If the language specific compiler does not exist, but the "gcc" directory
131 # does, we do not build anything. Note, $r is set by the top-level Makefile.
132 # Note that when we look for the compiler, we search both with and without
133 # extension to handle cross and canadian cross builds.
136 AC_MSG_CHECKING(if compiler $compiler_name has been built)
137 AC_CACHE_VAL(upc_cv_compiler_exists,
139 upc_cv_compiler_exists=yes
140 if test -n "$r"; then
141 if test -d "$r"/gcc; then
142 if test -f "$r"/gcc/$compiler_name \
143 -o -f "$r"/gcc/$compiler_name.exe; then
146 upc_cv_compiler_exists=no
151 AC_MSG_RESULT($upc_cv_compiler_exists)
152 AC_MSG_CHECKING([if UPC driver 'gupc' has been built])
153 AC_CACHE_VAL(upc_cv_driver_exists,
155 upc_cv_driver_exists=yes
156 if test -n "$r"; then
157 if test -d "$r"/gcc; then
158 if (test -f "$r"/gcc/gupc && test -f "$r"/gcc/gupc); then
161 upc_cv_driver_exists=no
166 AC_MSG_RESULT($upc_cv_driver_exists)
167 if test x$upc_cv_compiler_exists = xno \
168 -o x$upc_cv_driver_exists = xno
170 echo "rm -f config.cache config.log multilib.out" > skip-this-dir
171 rm -f Makefile conftest* confdefs* core
175 # Check the compiler.
176 # The same as in boehm-gc and libstdc++. Have to borrow it from there.
177 # We must force CC to /not/ be precious variables; otherwise
178 # the wrong, non-multilib-adjusted value will be used in multilibs.
179 # As a side effect, we have to subst CFLAGS ourselves.
181 m4_rename([_AC_ARG_VAR_PRECIOUS],[real_PRECIOUS])
182 m4_define([_AC_ARG_VAR_PRECIOUS],[])
184 m4_rename_force([real_PRECIOUS],[_AC_ARG_VAR_PRECIOUS])
189 # If UPCFLAGS hasn't been set explicitly then default to "$CFLAGS".
191 if test x"$UPCFLAGS" = "x"; then
197 # In order to override CFLAGS_FOR_TARGET, all of our special flags go
198 # in XCFLAGS. But we need them in CFLAGS during configury. So put them
199 # in both places for now and restore CFLAGS at the end of config.
200 save_CFLAGS="$CFLAGS"
202 # Add -Wall -Werror if we are using GCC.
203 if test "x$GCC" = "xyes"; then
204 XCFLAGS="$XCFLAGS -Wall -Werror"
207 dnl The UPC compiler is used to compile some parts of the runtime
208 dnl This hack makes sure that we pick up the multiflags that
209 dnl may have been tacked onto the $CC command.
210 if echo "$CC" | grep '/xgcc ' >/dev/null 2>&1; then
211 UPC=`echo "$CC" | sed -e 's=/xgcc =/gupc ='`
213 AC_MSG_ERROR([cannot create UPC from CC because it does not contain the
214 string '/xgcc '; the value of CC is: "$CC"])
216 # The just built UPC compiler is not fully functional as it is
217 # unable to auto pre-include "gcc-upc.h" and "gcc-upc-lib.h".
218 # Make sure that "upc-pre-include" feature is disabled for any of the
219 # UPC program checks (e.g. checking for dependency options).
221 UPC="$UPC -fno-upc-pre-include"
225 # Find other programs we need.
226 AC_CHECK_TOOL(AR, ar)
227 AC_CHECK_TOOL(RANLIB, ranlib, ranlib-not-found-in-path-error)
228 AC_PATH_PROG(PERL, perl, perl-not-found-in-path-error)
229 AC_PATH_PROG(ADDR2LINE, addr2line, addr2line-not-found-in-path-error)
233 # See if makeinfo has been installed and is modern enough
234 # that we can use it.
235 ACX_CHECK_PROG_VER([MAKEINFO], [makeinfo], [--version],
236 [GNU texinfo.* \([0-9][0-9.]*\)],
237 [4.[4-9]*|4.[1-9][0-9]*|[5-9]*|[1-9][0-9]*])
238 AM_CONDITIONAL(BUILD_INFO, test $gcc_cv_prog_makeinfo_modern = "yes")
241 # libgupc cannot be built as shared library
249 # For libtool versioning info, format is CURRENT:REVISION:AGE
250 libtool_VERSION=1:0:0
251 AC_SUBST(libtool_VERSION)
253 # Check header files.
256 GCC_HEADER_STDINT(gstdint.h)
260 AC_CHECK_HEADERS([execinfo.h fcntl.h limits.h netdb.h netinet/in.h])
261 AC_CHECK_HEADERS([sched.h semaphore.h stddef.h stdlib.h sys/loadavg.h])
262 AC_CHECK_HEADERS([sys/socket.h unistd.h])
264 # Checks for typedefs, structures, and compiler characteristics.
271 AC_CHECK_DECLS([sys_siglist])
273 AC_CHECK_TYPES([ptrdiff_t])
275 # Check to see if -pthread or -lpthread is needed. Prefer the former.
276 # In case the pthread.h system header is not found, this test will fail.
278 CFLAGS="$CFLAGS -pthread"
281 [#include <pthread.h>
282 void *g(void *d) { return NULL; }],
283 [pthread_t t; pthread_create(&t,NULL,g,NULL);])],
284 [XPCFLAGS=" -Wc,-pthread"],
285 [CFLAGS="$save_CFLAGS" LIBS="-lpthread $LIBS"
288 [#include <pthread.h>
289 void *g(void *d) { return NULL; }],
290 [pthread_t t; pthread_create(&t,NULL,g,NULL);])],
292 [AC_MSG_NOTICE([Pthreads are not supported in this libgupc build])])])
294 # Check for functions needed.
299 AC_CHECK_FUNCS([clock_gettime ftruncate getcwd gethostbyname gethostname])
300 AC_CHECK_FUNCS([getloadavg memset mkdir munmap socket])
301 AC_CHECK_FUNCS([strcasecmp strdup strerror strtol strtoull])
302 AC_CHECK_FUNCS([backtrace backtrace_symbols backtrace_symbols_fd])
305 # Check for broken semaphore implementation on darwin.
306 # sem_init returns: sem_init error: Function not implemented.
309 AC_DEFINE(HAVE_BROKEN_POSIX_SEMAPHORES, 1,
310 Define if the POSIX Semaphores do not work on your system.)
316 # Check for pthread_{,attr_}[sg]etaffinity_np.
320 #include <pthread.h>],
323 pthread_getaffinity_np (pthread_self (), sizeof (cpu_set_t), &cpuset);
324 if (CPU_ISSET (0, &cpuset))
325 CPU_SET (1, &cpuset);
328 pthread_setaffinity_np (pthread_self (), sizeof (cpu_set_t), &cpuset);
329 pthread_attr_init (&attr);
330 pthread_attr_getaffinity_np (&attr, sizeof (cpu_set_t), &cpuset);
331 pthread_attr_setaffinity_np (&attr, sizeof (cpu_set_t), &cpuset);])],
332 AC_DEFINE(HAVE_PTHREAD_AFFINITY_NP, 1,
333 [Define to 1 if pthread_{,attr_}{g,s}etaffinity_np is supported.]))
335 # At least for glibc, clock_gettime is in librt. But don't pull that
336 # in if it still doesn't give us the function we want.
337 if test $ac_cv_func_clock_gettime = no; then
338 AC_CHECK_LIB(rt, clock_gettime,[ac_cv_func_clock_gettime="yes"])
339 if test $ac_cv_func_clock_gettime = yes; then
341 AC_DEFINE(HAVE_CLOCK_GETTIME, 1,
342 [Define to 1 if you have the `clock_gettime' function.])
346 # See if we support thread-local storage.
349 # See what sort of export controls are availible.
350 LIBGUPC_CHECK_ATTRIBUTE_VISIBILITY
351 LIBGUPC_CHECK_ATTRIBUTE_DLLEXPORT
352 LIBGUPC_CHECK_ATTRIBUTE_ALIAS
353 LIBGUPC_ENABLE_SYMVERS
355 if test $enable_symvers = gnu; then
356 AC_DEFINE(LIBGUPC_GNU_SYMBOL_VERSIONING, 1,
357 [Define to 1 if GNU symbol versioning is used for libgupc.])
360 CFLAGS="$save_CFLAGS $XCFLAGS"
362 # Check for __sync_val_compare_and_swap, but only after the target has
363 # had a chance to set XCFLAGS.
364 LIBGUPC_CHECK_SYNC_BUILTINS
366 # Check for __sync_fetch_and_add
367 AC_CACHE_CHECK([for __sync_fetch_and_add_4],
368 [upc_cv_sync_fetch_and_add_4],
370 typedef unsigned int uint32 __attribute__ ((mode (SI)));
372 int main() { return __sync_fetch_and_add (&i, 1); }
374 [upc_cv_sync_fetch_and_add_4=yes],
375 [upc_cv_sync_fetch_and_add_4=no])])
376 if test "$upc_cv_sync_fetch_and_add_4" = "yes"; then
377 AC_DEFINE(HAVE_SYNC_FETCH_AND_ADD_4, 1,
378 [Define to 1 if the compiler provides the
379 __sync_fetch_and_add function for uint32])
382 AC_CACHE_CHECK([for __sync_fetch_and_add_8],
383 [upc_cv_sync_fetch_and_add_8],
385 typedef unsigned int uint64 __attribute__ ((mode (DI)));
387 int main() { return __sync_fetch_and_add (&i, 1); }
389 [upc_cv_sync_fetch_and_add_8=yes],
390 [upc_cv_sync_fetch_and_add_8=no])])
391 if test "$upc_cv_sync_fetch_and_add_8" = "yes"; then
392 AC_DEFINE(HAVE_SYNC_FETCH_AND_ADD_8, 1,
393 [Define to 1 if the compiler provides the
394 __sync_fetch_and_add function for uint64])
401 CFLAGS="$save_CFLAGS"
404 if test "x${multilib}" = xyes; then
405 multilib_arg="--enable-multilib"
410 AC_MSG_CHECKING([for thread model used by GCC])
411 target_thread_file=`$CC -v 2>&1 | sed -n 's/^Thread model: //p'`
412 AC_MSG_RESULT([$target_thread_file])
414 if test $target_thread_file != single; then
415 AC_DEFINE(HAVE_GTHR_DEFAULT, 1,
416 [Define if the compiler has a thread header that is non single.])
419 AC_MSG_CHECKING([UPC shared pointer representation])
420 cat > conftest.upc << _ACEOF
422 #define _STR(S) _XSTR(S)
423 #ifdef __UPC_VADDR_FIRST__
424 GUPCR_PTS_VADDR_FIRST=1
426 GUPCR_PTS_VADDR_FIRST=0
428 GUPCR_PTS_VADDR_SIZE=_STR(__UPC_VADDR_SIZE__)
429 GUPCR_PTS_PHASE_SIZE=_STR(__UPC_PHASE_SIZE__)
430 GUPCR_PTS_THREAD_SIZE=_STR(__UPC_THREAD_SIZE__)
431 #if __UPC_PTS_STRUCT_REP__
432 GUPCR_PTS_REP="struct"
433 GUPCR_PTS_STRUCT_REP=1
434 GUPCR_PTS_VADDR_TYPE=_STR(__UPC_VADDR_TYPE__)
435 GUPCR_PTS_PHASE_TYPE=_STR(__UPC_PHASE_TYPE__)
436 GUPCR_PTS_THREAD_TYPE=_STR(__UPC_THREAD_TYPE__)
437 #if __UPC_PTS_ALIGN__
438 GUPCR_PTS_ALIGN=_STR(__UPC_PTS_ALIGN__)
441 GUPCR_PTS_REP="packed"
442 GUPCR_PTS_PACKED_REP=1
445 eval `$UPC -fno-upc-pre-include -DNO_GCC_UPC_LIB=1 -E conftest.upc | \
446 grep '^ *GUPCR_[[A-Z0-9_]]*='`
448 AC_MSG_RESULT($GUPCR_PTS_REP)
449 if test -z "$GUPCR_PTS_REP"; then
450 AC_MSG_ERROR([can't determine UPC sptr representation])
453 GUPCR_PTS_PACKED_REP \
454 GUPCR_PTS_PHASE_SIZE \
455 GUPCR_PTS_PHASE_TYPE \
457 GUPCR_PTS_STRUCT_REP \
459 GUPCR_PTS_THREAD_SIZE \
460 GUPCR_PTS_THREAD_TYPE \
461 GUPCR_PTS_VADDR_FIRST \
462 GUPCR_PTS_VADDR_SIZE \
463 GUPCR_PTS_VADDR_TYPE ; do
465 if test -n "$cval"; then
466 AC_MSG_CHECKING([value of $cfg])
470 if test "$with_upc_pts" -a "$with_upc_pts" != "$GUPCR_PTS_REP" ; then
471 AC_MSG_ERROR([--with-upc-pts=$with_upc_pts is incompatible with the
472 UPC compiler's supported pointer-to-shared representation ($GUPCR_PTS_REP)])
474 AC_DEFINE_UNQUOTED(GUPCR_PTS_VADDR_SIZE,[$GUPCR_PTS_VADDR_SIZE],
475 [Size of shared pointer's vaddr field (in bits)])
476 AC_DEFINE_UNQUOTED(GUPCR_PTS_THREAD_SIZE,[$GUPCR_PTS_THREAD_SIZE],
477 [Size of shared pointer's thread field (in bits)])
478 AC_DEFINE_UNQUOTED(GUPCR_PTS_PHASE_SIZE,[$GUPCR_PTS_PHASE_SIZE],
479 [Size of shared pointer's phase field (in bits)])
480 if test "$GUPCR_PTS_REP" = "struct"; then
481 AC_DEFINE(GUPCR_PTS_STRUCT_REP,[1],
482 [Whether UPC shared pointers use the 'struct' representation])
483 AC_DEFINE_UNQUOTED(GUPCR_PTS_VADDR_TYPE,[$GUPCR_PTS_VADDR_TYPE],
484 [The data type of the 'vaddr' field in a UPC shared pointer])
485 AC_DEFINE_UNQUOTED(GUPCR_PTS_THREAD_TYPE,[$GUPCR_PTS_THREAD_TYPE],
486 [The data type of the 'thread' field in a UPC shared pointer])
487 AC_DEFINE_UNQUOTED(GUPCR_PTS_PHASE_TYPE,[$GUPCR_PTS_PHASE_TYPE],
488 [The data type of the 'phase' field in a UPC shared pointer])
489 if test -n "$GUPCR_PTS_ALIGN"; then
490 AC_DEFINE_UNQUOTED(GUPCR_PTS_ALIGN,[$GUPCR_PTS_ALIGN],
491 [The required alignment for the UPC struct shared pointer
495 AC_DEFINE(GUPCR_PTS_PACKED_REP,[1],
496 [Whether UPC pointers-to-shared use the 'packed' representation])
498 if test "$GUPCR_PTS_VADDR_FIRST" -eq 1; then
499 AC_DEFINE(GUPCR_PTS_VADDR_FIRST,[1],
500 [Whether the 'vaddr' field comes first (ie, [[vaddr,thread,phase]])])
503 dnl Select target specific runtime implementation.
505 AC_MSG_CHECKING([for UPC runtime model])
506 AC_ARG_WITH(upc-runtime,
507 [AS_HELP_STRING([--with-upc-runtime=MODEL],
508 [specify the runtime implementation model for UPC,
509 where MODEL may be: 'SMP' (Symmetric Multiprocessing)
510 or 'Portals4'. [default='SMP']])],
515 upc_runtime_model=smp
517 [Pp][Oo][Rr][Tt][Aa][Ll][Ss]4)
518 upc_runtime_model=portals4
522 AC_MSG_ERROR([$withval is an invalid runtime model for
528 upc_runtime_model=smp
530 AC_MSG_RESULT([$upc_runtime_model])
532 AC_MSG_CHECKING([for UPC runtime checking support])
533 AC_ARG_ENABLE(upc-runtime-checks,
534 [AS_HELP_STRING([--enable-upc-runtime-checks],
535 [enable internal UPC runtime checks that validate
536 arguments, and check for inconsistent runtime state.
542 AC_MSG_ERROR([--enable-upc-runtime-checks accepts only yes or no.])
546 enable_upc_runtime_checks=no
548 AC_MSG_RESULT($enable_upc_runtime_checks)
549 if test "$enable_upc_runtime_checks" = "yes"; then
550 AC_DEFINE(GUPCR_HAVE_CHECKS, 1,
551 [Define to 1 if UPC runtime checks are supported.])
554 AC_MSG_CHECKING([for UPC runtime statistics support])
555 AC_ARG_ENABLE(upc-runtime-stats,
556 [AS_HELP_STRING([--enable-upc-runtime-stats],
557 [enable internal UPC runtime statistics collection support;
558 these statistics count the number of various significant
559 internal operations, and dump those counts into a
560 per-process statistics file.
566 AC_MSG_ERROR([--enable-upc-runtime-stats accepts only yes or no.])
570 enable_upc_runtime_stats=no
572 AC_MSG_RESULT($enable_upc_runtime_stats)
573 if test "$enable_upc_runtime_stats" = "yes"; then
574 AC_DEFINE(GUPCR_HAVE_STATS, 1,
575 [Define to 1 if UPC runtime statistics collection is supported.])
578 AC_MSG_CHECKING([for UPC runtime trace support])
579 AC_ARG_ENABLE(upc-runtime-trace,
580 [AS_HELP_STRING([--enable-upc-runtime-trace],
581 [enable internal UPC runtime trace collection support;
582 a runtime trace is a time stamped log that records
583 various significant internal events; this trace
584 is written to a per-process log file.
590 AC_MSG_ERROR([--enable-upc-runtime-trace accepts only yes or no.])
594 enable_upc_runtime_trace=no
596 AC_MSG_RESULT($enable_upc_runtime_trace)
597 if test "$enable_upc_runtime_trace" = "yes"; then
598 AC_DEFINE(GUPCR_HAVE_TRACE, 1,
599 [Define to 1 if UPC runtime tracing is supported.])
602 AC_MSG_CHECKING([for UPC runtime debug configuration])
603 AC_ARG_ENABLE(upc-runtime-debug,
604 [AS_HELP_STRING([--enable-upc-runtime-debug],
605 [enable UPC runtime debugging mode,
606 where more expensive internal checks are implemented,
607 and conservative algorithms are used that
608 reduce the degree of parallelism, and that
609 exercise less complex/sophisticated operations
610 provided by the operating system and/or the
611 network communication packages called by the UPC runtime.
612 In addition, conservative compilation options will
613 be used to build the runtime, and debugging symbols
620 AC_MSG_ERROR([--enable-upc-runtime-debug accepts only yes or no.])
624 enable_upc_runtime_debug=no
626 AC_MSG_RESULT($enable_upc_runtime_debug)
627 if test "$enable_upc_runtime_debug" = "yes"; then
628 AC_DEFINE(GUPCR_HAVE_DEBUG, 1,
629 [Define to 1 if UPC runtime debugging mode is enabled.])
631 AC_SUBST(enable_upc_runtime_debug)
634 AC_MSG_CHECKING([for UPC link script support])
635 AC_ARG_ENABLE(upc-link-script,
636 [AS_HELP_STRING([--enable-upc-link-script],
637 [enable UPC's use of a custom linker script;
638 this will define the UPC shared section as a
639 no load section on targets where this feature
640 is supported (requires GNU LD)])],
645 AC_MSG_ERROR([--enable-upc-link-script accepts only yes or no])
649 enable_upc_link_script=no
651 if test "$enable_upc_link_script" = yes; then
652 if test "$with_gnu_ld" = yes; then
653 gen_ld_script=${srcdir}/${targ_runtime}/gen-upc-ld-script.pl
654 if ! ${LD} --verbose | ${PERL} $gen_ld_script 1>/dev/null ; then
655 # if gen-upc-ld-script did not accept the output of the linker
656 # then disable UPC link script support.
657 AC_MSG_ERROR([selected linker does not support linker scripts])
661 AC_MSG_RESULT($enable_upc_link_script)
662 if test "$enable_upc_link_script" = yes; then
663 AC_DEFINE(HAVE_UPC_LINK_SCRIPT, 1,
664 [Define to 1 if UPC link script is supported.])
667 AC_MSG_CHECKING([for UPC runtime tree fanout])
668 AC_ARG_WITH(upc-runtime-tree-fanout,
669 [AS_HELP_STRING([--with-upc-runtime-tree-fanout=WIDTH],
670 [specify the maximum number of children in each
671 sub-tree used to implement UPC collectives operations
675 # $withval must be a decimal integer
676 if ! echo "$withval" | grep '^[[0-9]][[0-9]]*$' >/dev/null 2>&1; then
677 AC_MSG_ERROR([$withval is an invalid option to
678 --with-upc-runtime-tree-fanout])
680 upc_runtime_tree_fanout="$withval"
683 upc_runtime_tree_fanout=4
685 AC_MSG_RESULT([$upc_runtime_tree_fanout])
686 AC_DEFINE_UNQUOTED(GUPCR_TREE_FANOUT, [$upc_runtime_tree_fanout],
687 [Maximum number of children at each level of a collective operation tree.])
689 if test "$upc_runtime_model" = "smp"; then
690 targ_runtime_pthreads=
691 LIBGUPC_GCC_TLS_SUPPORTED
692 if test "$upc_cv_gcc_tls_supported"x = "yes"x ; then
693 targ_runtime_pthreads=yes
695 AC_MSG_CHECKING(for Linux scheduling affinity)
697 changequote(<<,>>)dnl
698 <<#define _GNU_SOURCE
703 unsigned int len = sizeof(mask);
704 if (sched_getaffinity(0, len, &mask) < 0) {
715 if test "x$enable_upc_affinity" = "xyes" &&
716 test "x$upc_affinity" = "xno"; then
717 AC_MSG_ERROR([scheduling affinity enabled but not supported
718 - use --disable-upc-affinity])
720 if test "x$enable_upc_affinity" = "xno"; then
723 AC_MSG_RESULT([$upc_affinity])
724 dnl Check if NUMA available
725 AC_MSG_CHECKING(if NUMA available)
729 changequote(<<,>>)dnl
734 if (numa_available() < 0) return 1;
744 if test "x$enable_upc_numa" = "xyes" &&
745 test "x$upc_numa" = "xno"; then
746 AC_MSG_ERROR([NUMA enabled but not supported - use --disable-upc-numa])
748 if test "x$enable_upc_numa" = "xno" \
749 -o "x$enable_upc_affinity" = "xno"; then
752 AC_MSG_RESULT([$upc_numa])
753 AC_MSG_CHECKING([for UPC GUM debugging support])
754 AC_ARG_ENABLE(upc-gum-debug,
755 [AS_HELP_STRING([--enable-upc-gum-debug],
756 [enable UPC's source level debugging with GDB and GUM
757 support (requires UPC aware GDB)])],
762 AC_MSG_ERROR([--enable-upc-gum-debug accepts only yes or no])
764 upc_gum_debug=$enableval
769 AC_MSG_RESULT([$upc_gum_debug])
770 if test "x${upc_gum_debug}" = "xyes"; then
771 AC_DEFINE_UNQUOTED(GUPCR_HAVE_GUM_DEBUG,[1],
772 [Define if UPC GUM debug server is supported.])
774 # Use the generic (reference implementation)
775 use_generic_collectives="yes"
777 DX_DOXYGEN_FEATURE(OFF)
778 DX_INIT_DOXYGEN(${PACKAGE}, doxygen.cfg, doc)
780 AC_MSG_CHECKING([for UPC backtrace support])
781 AC_ARG_ENABLE(upc-backtrace,
782 [AS_HELP_STRING([--enable-upc-backtrace],
783 [enable UPC backtrace;
784 enable stack frame backtrace report
785 when UPC run-time fatal errors occur
786 or by user request (via signal)])],
791 AC_MSG_ERROR([--enable-upc-backtrace accepts only yes or no])
795 enable_upc_backtrace=yes
797 AC_MSG_RESULT($enable_upc_backtrace)
798 if test "$enable_upc_backtrace" = yes; then
799 AC_DEFINE(HAVE_UPC_BACKTRACE, 1,
800 [Define to 1 if UPC backtrace is enabled.])
803 AC_MSG_CHECKING([for UPC backtrace GDB support])
804 AC_ARG_ENABLE(upc-backtrace-gdb,
805 [AS_HELP_STRING([--enable-upc-backtrace-gdb],
806 [enable the use of GDB for UPC stack backtrace
812 AC_MSG_ERROR([--enable-upc-backtrace-gdb accepts only yes or no])
816 enable_upc_backtrace_gdb=yes
818 AC_MSG_RESULT([$enable_upc_backtrace_gdb])
819 if test "$enable_upc_backtrace_gdb" = yes; then
820 AC_DEFINE(HAVE_UPC_BACKTRACE_GDB, 1,
821 [Define to 1 if UPC backtrace with GDB is enabled.])
823 # Check for user specified GDB
824 AC_MSG_CHECKING([for UPC backtrace GDB to use])
825 AC_ARG_WITH(upc-backtrace-gdb,
826 [AS_HELP_STRING([--with-upc-backtrace-gdb=GDB],
827 [specify which GDB to use for UPC backtrace support
830 upc_backtrace_gdb=$withval
833 upc_backtrace_gdb=gdb
835 AC_PATH_PROGS(PATH_TO_GDB, $GDB $upc_backtrace_gdb, , /usr/bin:${PATH})
836 if test -n "$PATH_TO_GDB"; then
837 AC_DEFINE_UNQUOTED(GUPCR_BACKTRACE_GDB, "$PATH_TO_GDB",
838 [Define path to preferred GDB for backtrace])
841 [cannot find gdb. Try the correct --with-upc-backtrace-gdb
842 option or disable GDB for backtrace with
843 --disable-upc-backtrace option)])
845 AC_MSG_RESULT([$PATH_TO_GDB])
848 AC_MSG_CHECKING([for UPC backtrace signal support])
849 AC_ARG_ENABLE(upc-backtrace-signal,
850 [AS_HELP_STRING([--enable-upc-backtrace-signal],
851 [enable signal support for UPC stack backtrace
857 AC_MSG_ERROR([--enable-upc-backtrace-signal accepts only yes or no])
861 enable_upc_backtrace_signal=yes
863 AC_MSG_RESULT([$enable_upc_backtrace_signal])
864 if test "$enable_upc_backtrace_signal" = yes; then
865 AC_DEFINE(HAVE_UPC_BACKTRACE_SIGNAL, 1,
866 [Define to 1 if UPC backtrace signal is enabled.])
868 # Check for user specified signal name/number
869 AC_MSG_CHECKING([for UPC backtrace signal name/number])
870 AC_ARG_WITH(upc-backtrace-signal,
871 [AS_HELP_STRING([--with-upc-backtrace-signal=SIGNAL],
872 [specify the signal to be used for UPC stack backtrace
873 [default='SIGUSR1']])],
875 upc_backtrace_signal=$withval
878 upc_backtrace_signal=SIGUSR1
880 AC_DEFINE_UNQUOTED(GUPCR_BACKTRACE_SIGNAL, $upc_backtrace_signal,
881 [Define to preferred signal for UPC backtrace.])
882 AC_MSG_RESULT([$upc_backtrace_signal])
885 # UPC source file/line backtrace requires BFD library
886 if test "$enable_upc_backtrace" = yes; then
887 # Specify a location for BFD lib
889 [AS_HELP_STRING([--with-bfd=PATH],
890 [specify prefix directory for the installed BFD library
891 needed to provide extended UPC backtrace information
892 (source file name and line numbers); equivalent to
893 --with-bfd-include=PATH/include
894 plus --with-bfd-lib=PATH/lib])])
895 AC_ARG_WITH(bfd-include,
896 [AS_HELP_STRING([--with-bfd-include=PATH],
897 [specify directory for installed BFD include files])])
899 [AS_HELP_STRING([--with-bfd-lib=PATH],
900 [specify directory for the installed BFD library])])
902 if test "x$with_bfd" != x; then
903 bfdlibs="-L$with_bfd/lib $bfdlibs"
904 bfdinc="-I$with_bfd/include $bfdinc"
906 if test "x$with_bfd_include" != x; then
907 bfdinc="-I$with_bfd_include $bfdinc"
909 if test "x$with_bfd_lib" != x; then
910 bfdlibs="-L$with_bfd_lib $bfdlibs"
914 saved_CFLAGS="$CFLAGS"
916 CFLAGS="$CFLAGS $bfdinc"
917 LIBS="$LIBS -lbfd -ldl"
918 AC_MSG_CHECKING([for the libbfd])
921 bfd_error_type error;
922 void foo () { error = bfd_get_error (); }
924 [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); have_bfd=no ])
925 CFLAGS="$saved_CFLAGS"
928 if test "$have_bfd" = "yes"; then
929 AC_DEFINE(HAVE_LIBBFD, 1,
930 [Use BFD library for improved backtrace.])
933 # Check for "-rdynamic" for UPC backtrace
936 if test x$build = x$host; then
937 export_sym_check="nm${exeext} -g"
938 elif test x$host = x$target; then
939 export_sym_check="$gcc_cv_nm -g"
945 if test x$build = x$host; then
946 export_sym_check="objdump${exeext} -T"
947 elif test x$host = x$target; then
948 export_sym_check="$gcc_cv_objdump -T"
954 AC_MSG_CHECKING([for -rdynamic])
955 if test "x$export_sym_check" != x; then
956 echo "int main() {return 0;} int foobar() {return 0;}" > conftest.c
957 ${CC} ${CFLAGS} ${LDFLAGS} -rdynamic conftest.c \
958 -o conftest > /dev/null 2>&1
959 if $export_sym_check conftest | grep foobar > /dev/null; then
963 AC_MSG_RESULT([$have_rdynamic])
966 AC_MSG_CHECKING([for UPC runtime maximum number of locks held per thread])
967 AC_ARG_WITH(upc-runtime-max-locks,
968 [AS_HELP_STRING([--with-upc-runtime-max-locks=MAX_LOCKS],
969 [specify the maximum number of locks that can be held by
970 a single UPC thread [default=1024]])],
972 # $withval must be a decimal integer
973 if ! echo "$withval" | grep '^[[0-9]][[0-9]]*$' >/dev/null 2>&1; then
974 AC_MSG_ERROR([$withval is an invalid option to
975 --with-upc-runtime-max-locks])
977 upc_runtime_max_locks="$withval"
980 upc_runtime_max_locks=1024
982 AC_MSG_RESULT([$upc_runtime_max_locks])
983 AC_DEFINE_UNQUOTED(GUPCR_MAX_LOCKS,[$upc_runtime_max_locks],
984 [Maximum number of locks held per thread])
986 fi #### End: SMP runtime configuration
988 if test "$upc_runtime_model" = "portals4"; then
990 #### Portals4 runtime library configuration ####
992 # Use the generic (reference implementation)
993 use_generic_collectives="no"
995 # Check for Portals4 libs
996 portals4libs="-lportals"
999 AC_ARG_WITH(portals4,
1000 [AS_HELP_STRING([--with-portals4=PATH],
1001 [specify prefix directory for installed portals4 package.
1002 Equivalent to --with-portals4-include=PATH/include
1003 plus --with-portals4-lib=PATH/lib])])
1004 AC_ARG_WITH(portals4-include,
1005 [AS_HELP_STRING([--with-portals4-include=PATH],
1006 [specify directory for installed portals4 include files])])
1007 AC_ARG_WITH(portals4-lib,
1008 [AS_HELP_STRING([--with-portals4-lib=PATH],
1009 [specify directory for the installed portals4 library])])
1011 if test "x$with_portals4" != x; then
1012 portals4libs="-L$with_portals4/lib $portals4libs"
1013 portals4inc="-I$with_portals4/include $portals4inc"
1015 if test "x$with_portals4_include" != x; then
1016 portals4inc="-I$with_portals4_include $portals4inc"
1018 if test "x$with_portals4_lib" != x; then
1019 portals4libs="-L$with_portals4_lib $portals4libs"
1021 if test "x$with_portals4$with_portals4_include$with_portals4_lib" = x \
1022 && test -d ${srcdir}/portals4; then
1023 portals4libs='-L$$r/$(HOST_SUBDIR)/portals4/ '"$lt_cv_objdir $portals4libs"
1024 portals4inc='-I$$r/$(HOST_SUBDIR)/portals4 -I$$s/portals4 '"$portals4inc"
1025 # Do not test the portals4 version. Assume that it is sufficient, since
1026 # it is in the source tree, and the library has not been built yet
1027 # but it would be included on the link line in the version check below
1028 # hence making the test fail.
1031 AC_SUBST(portals4libs)
1032 AC_SUBST(portals4inc)
1034 AC_MSG_CHECKING([for UPC runtime Portals4 PTE base index])
1035 AC_ARG_WITH(upc-runtime-pte-base,
1036 [AS_HELP_STRING([--with-upc-runtime-pte-base=BASE],
1037 [specify the base index of the first Portals4 PTE used
1038 by the UPC runtime [default=16]])],
1040 # $withval must be a decimal integer
1041 if ! echo "$withval" | grep '^[[0-9]][[0-9]]*$' >/dev/null 2>&1; then
1042 AC_MSG_ERROR([$withval is an invalid option to --with-upc-runtime-pte-base])
1044 upc_runtime_pte_base="$withval"
1047 upc_runtime_pte_base=16
1049 AC_MSG_RESULT([$upc_runtime_pte_base])
1050 AC_DEFINE_UNQUOTED(GUPCR_PTE_BASE,[$upc_runtime_pte_base],
1051 [Portals4 PTE base index.])
1053 AC_MSG_CHECKING([for UPC runtime maximum number of locks held per thread])
1054 AC_ARG_WITH(upc-runtime-max-locks,
1055 [AS_HELP_STRING([--with-upc-runtime-max-locks=MAX_LOCKS],
1056 [specify the maximum number of locks that can be held by
1057 a single UPC thread [default=1024]])],
1059 # $withval must be a decimal integer
1060 if ! echo "$withval" | grep '^[[0-9]][[0-9]]*$' >/dev/null 2>&1; then
1061 AC_MSG_ERROR([$withval is an invalid option to
1062 --with-upc-runtime-max-locks])
1064 upc_runtime_max_locks="$withval"
1067 upc_runtime_max_locks=1024
1069 AC_MSG_RESULT([$upc_runtime_max_locks])
1070 AC_DEFINE_UNQUOTED(GUPCR_MAX_LOCKS,[$upc_runtime_max_locks],
1071 [Maximum number of locks held per thread])
1073 AC_MSG_CHECKING([for UPC runtime bounce buffer size])
1074 AC_ARG_WITH(upc-runtime-bounce-buffer-size,
1075 [AS_HELP_STRING([--with-upc-runtime-bounce-buffer-size=SIZE],
1076 [specify the size (in bytes) of the bounce buffer
1077 that is used by the UPC runtime to buffer
1078 network data [default=256K]])],
1080 # $withval must be a decimal integer
1081 if ! echo "$withval" | egrep -i '^[[0-9]]+[[kmg]]?$' >/dev/null 2>&1; then
1082 AC_MSG_ERROR([$withval is an invalid option to
1083 --with-upc-runtime-bounce-buffer-size])
1090 bb_size_expr=`echo "$bb_size" | \
1091 sed -e 's/[[gG]]$/*1024M/;s/[[mM]]$/*1024K/;s/[[kK]]$/*1024/;s/\\*/ \\\\* /g'`
1092 upc_runtime_bounce_buffer_size=`eval expr $bb_size_expr`
1093 AC_MSG_RESULT([$upc_runtime_bounce_buffer_size])
1094 AC_DEFINE_UNQUOTED(GUPCR_BOUNCE_BUFFER_SIZE,[$upc_runtime_bounce_buffer_size],
1095 [Size of get/put bounce buffer])
1097 AC_MSG_CHECKING([for UPC maximum number of outstanding remote puts])
1098 AC_ARG_WITH(upc-max-outstanding-puts,
1099 [AS_HELP_STRING([--with-upc-max-outstanding-puts=SIZE],
1100 [specify the maximum number of outstanding
1101 remote put requests. [default=256]])],
1103 # $withval must be a decimal integer
1104 if ! echo "$withval" | grep '^[[0-9]]*$' >/dev/null 2>&1; then
1105 AC_MSG_ERROR([$withval is an invalid option to
1106 --with-upc-max-outstanding-puts])
1108 upc_max_puts_count="$withval"
1111 upc_max_puts_count="256"
1113 AC_MSG_RESULT([$upc_max_puts_count])
1114 AC_DEFINE_UNQUOTED(GUPCR_MAX_OUTSTANDING_PUTS,[$upc_max_puts_count],
1115 [Maximum number of outstanding remote puts])
1117 AC_MSG_CHECKING([for UPC runtime collectives tree fanout])
1118 AC_ARG_WITH(upc-runtime-tree-fanout,
1119 [AS_HELP_STRING([--with-upc-runtime-tree-fanout=WIDTH],
1120 [specify the maximum number of children in each
1121 sub-tree used to implement UPC collective operations
1122 (e. g., upc_barrier and upc_global_alloc).
1125 # $withval must be a decimal integer
1126 if ! echo "$withval" | grep '^[[0-9]][[0-9]]*$' >/dev/null 2>&1; then
1127 AC_MSG_ERROR([$withval is an invalid option to
1128 --with-upc-runtime-tree-fanout])
1130 upc_runtime_tree_fanout="$withval"
1133 upc_runtime_tree_fanout=4
1135 AC_MSG_RESULT([$upc_runtime_tree_fanout])
1136 AC_DEFINE_UNQUOTED(GUPCR_TREE_FANOUT, [$upc_runtime_tree_fanout],
1137 [Maximum number of children at each level of a collective operation tree.])
1139 AC_MSG_CHECKING([for UPC runtime Portals4 triggered operation support])
1140 AC_ARG_ENABLE(upc-runtime-triggered-ops,
1141 [AS_HELP_STRING([--enable-upc-runtime-triggered-ops],
1142 [enable UPC runtime support for Portals4 triggered
1143 operations. [default=yes]])],
1148 AC_MSG_ERROR([--enable-upc-runtime-triggered-ops accepts only yes or no.])
1152 enable_upc_runtime_triggered_ops=yes
1154 AC_MSG_RESULT($enable_upc_runtime_triggered_ops)
1155 if test "$enable_upc_runtime_triggered_ops" = "yes"; then
1156 AC_DEFINE(GUPCR_USE_PORTALS4_TRIGGERED_OPS, 1,
1157 [Define to 1 if UPC runtime will use Portals4 triggered operations.])
1160 # Portals4 node local memory optimization
1162 AC_MSG_CHECKING([for UPC runtime node local memory access])
1163 AC_ARG_ENABLE(upc-node-local-mem,
1164 [AS_HELP_STRING([--enable-upc-node-local-mem],
1165 [enable UPC runtime support for accessing shared
1166 memory of the node local threads. [default=yes]])],
1171 AC_MSG_ERROR([--enable-upc-node-local-mem accepts only yes or no.])
1175 enable_upc_node_local_mem=yes
1177 AC_MSG_RESULT($enable_upc_node_local_mem)
1178 if test "$enable_upc_node_local_mem" = "yes"; then
1179 AC_DEFINE(GUPCR_NODE_LOCAL_MEM, 1,
1180 [Define to 1 if UPC runtime will use node local memory accesses.])
1183 if test "$enable_upc_node_local_mem" = "yes"; then
1184 # START - check for shared memory type
1185 # Check for Posix based shm
1186 AC_MSG_CHECKING([for UPC node local memory type])
1187 AC_ARG_WITH(upc-node-local-mem,
1188 [AS_HELP_STRING([--with-upc-node-local-mem=SHMEM],
1189 [specify type of shared memory used for node local
1190 memory accesses (posix or mmap).
1195 upc_node_local=$withval
1198 AC_MSG_ERROR([--with-upc-node-local-mem accepts only posix or mmap.])
1202 upc_node_local=posix
1204 AC_MSG_RESULT($upc_node_local);
1206 # Check if POSIX shm is available
1207 if test "$upc_node_local" = "posix"; then
1208 # Check if it is part of librt
1210 AC_CHECK_LIB(rt, shm_open,
1213 AC_DEFINE(HAVE_SHM_OPEN, 1,
1214 [Define to 1 if you have the 'shm_open' function.])])
1215 if test "$have_shm_open" = "no"; then
1216 # Must probe for Posix shmem
1217 AC_MSG_CHECKING([for the shm_open])
1219 #include <sys/types.h>
1220 #include <sys/stat.h>
1221 #include <sys/mman.h>
1229 fd = shm_open("shm-config-test", O_CREAT|O_RDWR, S_IRUSR|S_IWUSR);
1230 (void)shm_unlink("shm-config-test");
1231 if (fd < 0) return 1;
1232 if (ftruncate(fd, size) < 0) return 1;
1233 addr = mmap(NULL, size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
1235 if (!addr || (addr == MAP_FAILED)) return 1;
1236 (void)munmap(addr, size);
1238 ],[AC_MSG_RESULT(yes); have_shm_open=yes ],
1239 [AC_MSG_RESULT(no); have_shm_open=no ])
1242 if test "$have_shm_open" = "yes"; then
1243 AC_DEFINE(GUPCR_NODE_LOCAL_MEM_POSIX, 1,
1244 [Define to 1 if UPC node local access uses Posix shared memory.])
1246 AC_MSG_ERROR([Posix shared memory is not available])
1249 # mmap is always available
1250 AC_DEFINE(GUPCR_NODE_LOCAL_MEM_MMAP, 1,
1251 [Define to 1 if UPC node local access uses mmap-ed file.])
1253 # END - check for shared memory type
1256 # Check for portals job launcher
1257 AC_CHECK_HEADER([slurm/slurm.h],[have_slurm=yes],[have_slurm=no])
1258 AC_MSG_CHECKING([for UPC runtime Portals4 job launcher])
1259 AC_ARG_WITH(upc-job-launcher,
1260 [AS_HELP_STRING([--with-upc-job-launcher],
1261 [Select UPC Portals4 job launcher.
1266 upc_job_launcher=$withval
1269 AC_MSG_ERROR([--with-upc-job-launcher accepts only slurm or yod.])
1273 if test "$have_slurm" = "yes"; then
1274 upc_job_launcher=slurm
1276 upc_job_launcher=yod
1279 AC_MSG_RESULT($upc_job_launcher)
1281 if test "$upc_job_launcher" = "slurm"; then
1282 if test "$have_slurm" = "yes"; then
1283 AC_DEFINE(GUPCR_JOB_LAUNCHER_SLURM, 1,
1284 [Use SLURM for UPC Portals4 job launcher])
1285 portals4libs="$portals4libs -lpmi"
1287 AC_MSG_ERROR([--with-upc-job-launcher specified slurm,
1288 but slurm is not available.])
1291 AC_DEFINE(GUPCR_JOB_LAUNCHER_YOD, 1,
1292 [Use YOD for UPC Portals4 job launcher])
1293 portals4libs="$portals4libs -lportals_runtime"
1296 # Check for target memory page size
1297 AC_MSG_CHECKING([for memory page size])
1298 AC_ARG_WITH(upc-memory-page-size,
1299 [AS_HELP_STRING([--with-upc-memory-page-size],
1300 [Select target memory page size.
1303 # $withval must be a decimal integer
1304 if ! echo "$withval" | grep '^[[0-9]][[0-9]]*$' >/dev/null 2>&1; then
1305 AC_MSG_ERROR([$withval is an invalid option to --with-upc-memory-page-size])
1307 memory_page_size="$withval"
1310 memory_page_size="4096"
1312 AC_MSG_RESULT($memory_page_size)
1313 AC_DEFINE_UNQUOTED(GUPCR_MEMORY_PAGE_SIZE, [$memory_page_size],
1314 [Target system memory page size.])
1316 AC_DEFINE(GUPCR_GLOBAL_EXIT_TIMEOUT, [2],
1317 [upc_global_exit() timeout in seconds.])
1319 DX_DOXYGEN_FEATURE(ON)
1324 DX_INIT_DOXYGEN(${PACKAGE}, doxygen.cfg, doc)
1325 AC_CONFIG_FILES([header.tex doxygen.sty])
1326 AC_CONFIG_FILES([doxygen.cfg:portals4/doxygen.cfg.in])
1328 fi #### End: Portals4 runtime configuration
1330 # Get target configury.
1331 . ${srcdir}/configure.tgt
1333 # configure.tgt sets these substitution variables.
1334 # It also sets 'upc_crtstuff=yes' if upc-crtstuff needs
1336 AC_SUBST(config_path)
1340 AC_SUBST(link_upc_spec)
1341 AC_SUBST(upc_crtstuff_cflags)
1342 AC_SUBST(upc_crtbegin_spec)
1343 AC_SUBST(upc_crtend_spec)
1344 AC_SUBST(upc_crtstuff_mak)
1345 AC_SUBST(upc_crtstuff_objs)
1347 dnl Define ARG_UNUSED macro
1350 # define ARG_UNUSED(NAME) NAME __attribute__ ((__unused__))
1354 dnl Build the runtime, based upon the --with-upc-runtime setting.
1355 AM_CONDITIONAL(LIBGUPC_SMP_RUNTIME, [test "$upc_runtime_model" = "smp"])
1356 AM_CONDITIONAL(LIBGUPC_PORTALS4_RUNTIME, [test "$upc_runtime_model" = "portals4"])
1357 AM_CONDITIONAL(LIBGUPC_RUNTIME_DEBUG, [test "$enable_upc_runtime_debug" = "yes"])
1359 AM_CONDITIONAL(LIBGUPC_CRTSTUFF, [test "$upc_crtstuff" = "yes"])
1360 AM_CONDITIONAL(LIBGUPC_LINK_SCRIPT, [test "$enable_upc_link_script" = "yes"])
1361 AM_CONDITIONAL(LIBGUPC_GENERIC_COLLECTIVES,
1362 [test "$use_generic_collectives" = "yes"])
1364 dnl 'smp' runtime specific settings
1365 AM_CONDITIONAL(LIBGUPC_PTHREADS, [test "$targ_runtime_pthreads" = "yes"])
1366 AM_CONDITIONAL(LIBGUPC_AFFINITY, [test "$upc_affinity" = "yes"])
1367 AM_CONDITIONAL(LIBGUPC_NUMA, [test "$upc_numa" = "yes"])
1368 AM_CONDITIONAL(LIBGUPC_GUM, [test "$upc_gum_debug" = "yes"])
1369 AM_CONDITIONAL(LIBGUPC_BACKTRACE, [test "$enable_upc_backtrace" = "yes"])
1370 AM_CONDITIONAL(LIBGUPC_BACKTRACE_SUP, [test "$have_bfd" = "yes"])
1371 AM_CONDITIONAL(LIBGUPC_NODE_LOCAL_MEM_POSIX, [test "$upc_node_local" = "posix"])
1372 AM_CONDITIONAL(LIBGUPC_NODE_LOCAL_MEM_MMAP, [test "$upc_node_local" = "mmap"])
1375 [/* Copyright (C) 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
1376 This file is part of the UPC runtime Library.
1377 Written by Gary Funck <gary@intrepid.com>
1378 and Nenad Vukicevic <nenad@intrepid.com>
1380 This library is free software; you can redistribute it and/or
1381 modify it under the terms of the GNU General Public License as
1382 published by the Free Software Foundation; either version 2, or (at
1383 your option) any later version.
1385 This library is distributed in the hope that it will be useful, but
1386 WITHOUT ANY WARRANTY; without even the implied warranty of
1387 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1388 General Public License for more details.
1390 You should have received a copy of the GNU General Public License
1391 along with this library; see the file COPYING. If not, write to
1392 the Free Software Foundation, 59 Temple Place - Suite 330, Boston,
1395 As a special exception, if you link this library with files
1396 compiled with a GNU compiler to produce an executable, this does
1397 not cause the resulting executable to be covered by the GNU General
1398 Public License. This exception does not however invalidate any
1399 other reasons why the executable file might be covered by the GNU
1400 General Public License. */
1401 #ifndef __CONFIG_H__
1402 #define __CONFIG_H__ 1
1404 AH_VERBATIM(GUPCR_AAA_BEGIN_CFG,[//begin gupcr_config_h])
1405 AH_VERBATIM(GUPCR_ZZZ_END_CFG,[//end gupcr_config_h])
1408 #endif /* __CONFIG_H__ */
1411 AC_CONFIG_FILES([Makefile testsuite/Makefile])
1412 AC_CONFIG_FILES([upc-crtbegin.spec libgupc.spec upc-crtend.spec])