110d565efSmrg# Process this file with autoconf to produce a configure script, like so:
210d565efSmrg# aclocal -I ../config && autoconf && autoheader && automake
310d565efSmrg
410d565efSmrgAC_INIT([GNU Offloading and Multi Processing Runtime Library], 1.0,,[libgomp])
510d565efSmrgAC_CONFIG_HEADER(config.h)
610d565efSmrg
710d565efSmrg# -------
810d565efSmrg# Options
910d565efSmrg# -------
1010d565efSmrg
1110d565efSmrgAC_MSG_CHECKING([for --enable-version-specific-runtime-libs])
1210d565efSmrgLIBGOMP_ENABLE(version-specific-runtime-libs, no, ,
1310d565efSmrg   [Specify that runtime libraries should be installed in a compiler-specific directory],
1410d565efSmrg   permit yes|no)
1510d565efSmrgAC_MSG_RESULT($enable_version_specific_runtime_libs)
1610d565efSmrg
1710d565efSmrg# We would like our source tree to be readonly. However when releases or
1810d565efSmrg# pre-releases are generated, the flex/bison generated files as well as the
1910d565efSmrg# various formats of manuals need to be included along with the rest of the
2010d565efSmrg# sources.  Therefore we have --enable-generated-files-in-srcdir to do
2110d565efSmrg# just that.
2210d565efSmrgAC_MSG_CHECKING([for --enable-generated-files-in-srcdir])
2310d565efSmrgLIBGOMP_ENABLE(generated-files-in-srcdir, no, ,
2410d565efSmrg   [put copies of generated files in source dir intended for creating source
2510d565efSmrg    tarballs for users without texinfo bison or flex.],
2610d565efSmrg   permit yes|no)
2710d565efSmrgAC_MSG_RESULT($enable_generated_files_in_srcdir)
2810d565efSmrgAM_CONDITIONAL(GENINSRC, test "$enable_generated_files_in_srcdir" = yes)
2910d565efSmrg
3010d565efSmrg
3110d565efSmrg# -------
3210d565efSmrg# -------
3310d565efSmrg
3410d565efSmrg# Gets build, host, target, *_vendor, *_cpu, *_os, etc.
3510d565efSmrg#
3610d565efSmrg# You will slowly go insane if you do not grok the following fact:  when
3710d565efSmrg# building this library, the top-level /target/ becomes the library's /host/.
3810d565efSmrg#
3910d565efSmrg# configure then causes --target to default to --host, exactly like any
4010d565efSmrg# other package using autoconf.  Therefore, 'target' and 'host' will
4110d565efSmrg# always be the same.  This makes sense both for native and cross compilers
4210d565efSmrg# just think about it for a little while.  :-)
4310d565efSmrg#
4410d565efSmrg# Also, if this library is being configured as part of a cross compiler, the
4510d565efSmrg# top-level configure script will pass the "real" host as $with_cross_host.
4610d565efSmrg#
4710d565efSmrg# Do not delete or change the following two lines.  For why, see
4810d565efSmrg# http://gcc.gnu.org/ml/libstdc++/2003-07/msg00451.html
4910d565efSmrgAC_CANONICAL_SYSTEM
5010d565efSmrgtarget_alias=${target_alias-$host_alias}
5110d565efSmrg
5210d565efSmrg# Sets up automake.  Must come after AC_CANONICAL_SYSTEM.  Each of the
5310d565efSmrg# following is magically included in AUTOMAKE_OPTIONS in each Makefile.am.
5410d565efSmrg#  1.9.0:  minimum required version
5510d565efSmrg#  no-define:  PACKAGE and VERSION will not be #define'd in config.h (a bunch
5610d565efSmrg#              of other PACKAGE_* variables will, however, and there's nothing
5710d565efSmrg#              we can do about that; they come from AC_INIT).
5810d565efSmrg#  foreign:  we don't follow the normal rules for GNU packages (no COPYING
5910d565efSmrg#            file in the top srcdir, etc, etc), so stop complaining.
6010d565efSmrg#  no-dist:  we don't want 'dist' and related rules.
6110d565efSmrg#  -Wall:  turns on all automake warnings...
6210d565efSmrg#  -Wno-portability:  ...except this one, since GNU make is required.
6310d565efSmrg#  -Wno-override: ... and this one, since we do want this in testsuite.
6410d565efSmrgAM_INIT_AUTOMAKE([1.9.0 foreign no-dist -Wall -Wno-portability -Wno-override])
6510d565efSmrgAM_ENABLE_MULTILIB(, ..)
6610d565efSmrg
67*ec02198aSmrgGCC_WITH_TOOLEXECLIBDIR
68*ec02198aSmrg
6910d565efSmrg# Calculate toolexeclibdir
7010d565efSmrg# Also toolexecdir, though it's only used in toolexeclibdir
7110d565efSmrgcase ${enable_version_specific_runtime_libs} in
7210d565efSmrg  yes)
7310d565efSmrg    # Need the gcc compiler version to know where to install libraries
7410d565efSmrg    # and header files if --enable-version-specific-runtime-libs option
7510d565efSmrg    # is selected.
7610d565efSmrg    toolexecdir='$(libdir)/gcc/$(target_alias)'
7710d565efSmrg    toolexeclibdir='$(toolexecdir)/$(gcc_version)$(MULTISUBDIR)'
7810d565efSmrg    ;;
7910d565efSmrg  no)
8010d565efSmrg    if test -n "$with_cross_host" &&
8110d565efSmrg       test x"$with_cross_host" != x"no"; then
8210d565efSmrg      # Install a library built with a cross compiler in tooldir, not libdir.
8310d565efSmrg      toolexecdir='$(exec_prefix)/$(target_alias)'
84*ec02198aSmrg      case ${with_toolexeclibdir} in
85*ec02198aSmrg	no)
8610d565efSmrg	  toolexeclibdir='$(toolexecdir)/lib'
87*ec02198aSmrg	  ;;
88*ec02198aSmrg	*)
89*ec02198aSmrg	  toolexeclibdir=${with_toolexeclibdir}
90*ec02198aSmrg	  ;;
91*ec02198aSmrg      esac
9210d565efSmrg    else
9310d565efSmrg      toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
9410d565efSmrg      toolexeclibdir='$(libdir)'
9510d565efSmrg    fi
9610d565efSmrg    multi_os_directory=`$CC -print-multi-os-directory`
9710d565efSmrg    case $multi_os_directory in
9810d565efSmrg      .) ;; # Avoid trailing /.
9910d565efSmrg      *) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;;
10010d565efSmrg    esac
10110d565efSmrg    ;;
10210d565efSmrgesac
10310d565efSmrgAC_SUBST(toolexecdir)
10410d565efSmrgAC_SUBST(toolexeclibdir)
10510d565efSmrg
10610d565efSmrg# Check the compiler.
10710d565efSmrg# The same as in boehm-gc and libstdc++. Have to borrow it from there.
10810d565efSmrg# We must force CC to /not/ be precious variables; otherwise
10910d565efSmrg# the wrong, non-multilib-adjusted value will be used in multilibs.
11010d565efSmrg# As a side effect, we have to subst CFLAGS ourselves.
11110d565efSmrg
11210d565efSmrgm4_rename([_AC_ARG_VAR_PRECIOUS],[real_PRECIOUS])
11310d565efSmrgm4_define([_AC_ARG_VAR_PRECIOUS],[])
11410d565efSmrgAC_PROG_CC
11510d565efSmrgm4_rename_force([real_PRECIOUS],[_AC_ARG_VAR_PRECIOUS])
11610d565efSmrg
11710d565efSmrgAC_SUBST(CFLAGS)
11810d565efSmrg
11910d565efSmrg# In order to override CFLAGS_FOR_TARGET, all of our special flags go
12010d565efSmrg# in XCFLAGS.  But we need them in CFLAGS during configury.  So put them
12110d565efSmrg# in both places for now and restore CFLAGS at the end of config.
12210d565efSmrgsave_CFLAGS="$CFLAGS"
12310d565efSmrg
12410d565efSmrg# Add -Wall -Werror if we are using GCC.
12510d565efSmrgif test "x$GCC" = "xyes"; then
12610d565efSmrg  XCFLAGS="$XCFLAGS -Wall -Werror"
12710d565efSmrgfi
12810d565efSmrg
12910d565efSmrg# Find other programs we need.
13010d565efSmrgAC_CHECK_TOOL(AR, ar)
13110d565efSmrgAC_CHECK_TOOL(RANLIB, ranlib, ranlib-not-found-in-path-error)
13210d565efSmrgAC_PATH_PROG(PERL, perl, perl-not-found-in-path-error)
13310d565efSmrgAC_PROG_MAKE_SET
13410d565efSmrgAC_PROG_INSTALL
13510d565efSmrg
13610d565efSmrg# See if makeinfo has been installed and is modern enough
13710d565efSmrg# that we can use it.
13810d565efSmrgACX_CHECK_PROG_VER([MAKEINFO], [makeinfo], [--version],
13910d565efSmrg                   [GNU texinfo.* \([0-9][0-9.]*\)],
14010d565efSmrg                   [4.[4-9]*|4.[1-9][0-9]*|[5-9]*|[1-9][0-9]*])
14110d565efSmrgAM_CONDITIONAL(BUILD_INFO, test $gcc_cv_prog_makeinfo_modern = "yes")
14210d565efSmrg
14310d565efSmrg
14410d565efSmrg# Configure libtool
14510d565efSmrgAM_PROG_LIBTOOL
14610d565efSmrgACX_LT_HOST_FLAGS
14710d565efSmrgAC_SUBST(enable_shared)
14810d565efSmrgAC_SUBST(enable_static)
14910d565efSmrg
15010d565efSmrgAM_MAINTAINER_MODE
15110d565efSmrg
15210d565efSmrg# Create a spec file, so that compile/link tests don't fail
15310d565efSmrgtest -f libgfortran.spec || touch libgfortran.spec
15410d565efSmrgFCFLAGS="$FCFLAGS -L."
15510d565efSmrg
15610d565efSmrg# We need gfortran to compile parts of the library
15710d565efSmrg# We can't use AC_PROG_FC because it expects a fully working gfortran.
15810d565efSmrg#AC_PROG_FC(gfortran)
15910d565efSmrgcase `echo $GFORTRAN` in
16010d565efSmrg  -* | no* )
16110d565efSmrg    FC=no ;;
16210d565efSmrg  *)
16310d565efSmrg    set dummy $GFORTRAN; ac_word=$2
16410d565efSmrg    if test -x "$ac_word"; then
16510d565efSmrg      FC="$GFORTRAN"
16610d565efSmrg    else
16710d565efSmrg      FC=no
16810d565efSmrg    fi ;;
16910d565efSmrgesac
17010d565efSmrgAC_PROG_FC(gfortran)
17110d565efSmrgFCFLAGS="$FCFLAGS -Wall -L../libgfortran"
17210d565efSmrg
17310d565efSmrg# For libtool versioning info, format is CURRENT:REVISION:AGE
17410d565efSmrglibtool_VERSION=1:0:0
17510d565efSmrgAC_SUBST(libtool_VERSION)
17610d565efSmrg
17710d565efSmrg# Check header files.
17810d565efSmrgAC_STDC_HEADERS
17910d565efSmrgAC_HEADER_TIME
18010d565efSmrgACX_HEADER_STRING
18110d565efSmrgAC_CHECK_HEADERS(pthread.h unistd.h semaphore.h sys/loadavg.h sys/sysctl.h sys/time.h)
18210d565efSmrg
18310d565efSmrgXPCFLAGS=""
18410d565efSmrgcase "$host" in
18510d565efSmrg  *-*-rtems*)
18610d565efSmrg    # RTEMS supports Pthreads, but the library is not available at GCC build time.
18710d565efSmrg    ;;
188*ec02198aSmrg  nvptx*-*-* | amdgcn*-*-*)
18910d565efSmrg    # NVPTX does not support Pthreads, has its own code replacement.
19010d565efSmrg    libgomp_use_pthreads=no
19110d565efSmrg    # NVPTX is an accelerator-only target
19210d565efSmrg    libgomp_offloaded_only=yes
19310d565efSmrg    ;;
19410d565efSmrg  *)
19510d565efSmrg    # Check to see if -pthread or -lpthread is needed.  Prefer the former.
19610d565efSmrg    # In case the pthread.h system header is not found, this test will fail.
19710d565efSmrg    CFLAGS="$CFLAGS -pthread"
19810d565efSmrg    AC_LINK_IFELSE(
19910d565efSmrg     [AC_LANG_PROGRAM(
20010d565efSmrg      [#include <pthread.h>
20110d565efSmrg       void *g(void *d) { return NULL; }],
20210d565efSmrg      [pthread_t t; pthread_create(&t,NULL,g,NULL);])],
20310d565efSmrg     [XPCFLAGS=" -Wc,-pthread"],
20410d565efSmrg     [CFLAGS="$save_CFLAGS" LIBS="-lpthread $LIBS"
20510d565efSmrg      AC_LINK_IFELSE(
20610d565efSmrg       [AC_LANG_PROGRAM(
20710d565efSmrg        [#include <pthread.h>
20810d565efSmrg         void *g(void *d) { return NULL; }],
20910d565efSmrg        [pthread_t t; pthread_create(&t,NULL,g,NULL);])],
21010d565efSmrg       [],
21110d565efSmrg       [AC_MSG_ERROR([Pthreads are required to build libgomp])])])
21210d565efSmrgesac
21310d565efSmrg
21410d565efSmrgif test x$libgomp_use_pthreads != xno; then
21510d565efSmrg  AC_DEFINE(LIBGOMP_USE_PTHREADS, 1,
21610d565efSmrg            [Define to 1 if libgomp should use POSIX threads.])
21710d565efSmrgfi
21810d565efSmrg
21910d565efSmrgif test x$libgomp_offloaded_only = xyes; then
22010d565efSmrg  AC_DEFINE(LIBGOMP_OFFLOADED_ONLY, 1,
22110d565efSmrg            [Define to 1 if building libgomp for an accelerator-only target.])
22210d565efSmrgfi
22310d565efSmrg
22410d565efSmrgm4_include([plugin/configfrag.ac])
22510d565efSmrg
22610d565efSmrg# Check for functions needed.
22710d565efSmrgAC_CHECK_FUNCS(getloadavg clock_gettime strtoull)
2280fc04c29SmrgAC_CHECK_FUNCS(aligned_alloc posix_memalign memalign _aligned_malloc)
22910d565efSmrg
23010d565efSmrg# Check for broken semaphore implementation on darwin.
23110d565efSmrg# sem_init returns: sem_init error: Function not implemented.
23210d565efSmrgcase "$host" in
23310d565efSmrg  *-darwin*)
23410d565efSmrg    AC_DEFINE(HAVE_BROKEN_POSIX_SEMAPHORES, 1,
23510d565efSmrg	Define if the POSIX Semaphores do not work on your system.)
23610d565efSmrg    ;;
23710d565efSmrgesac
23810d565efSmrg
23910d565efSmrg# RTEMS specific checks
24010d565efSmrgcase "$host" in
24110d565efSmrg  *-*-rtems*)
24210d565efSmrg    AC_CHECK_TYPES([struct _Mutex_Control],[],[],[#include <sys/lock.h>])
24310d565efSmrg    ;;
24410d565efSmrgesac
24510d565efSmrg
24610d565efSmrgGCC_LINUX_FUTEX(:)
24710d565efSmrg
24810d565efSmrg# Check for pthread_{,attr_}[sg]etaffinity_np.
24910d565efSmrgAC_LINK_IFELSE(
25010d565efSmrg [AC_LANG_PROGRAM(
25110d565efSmrg  [#define _GNU_SOURCE
25210d565efSmrg   #include <pthread.h>],
25310d565efSmrg  [cpu_set_t cpuset;
25410d565efSmrg   pthread_attr_t attr;
25510d565efSmrg   pthread_getaffinity_np (pthread_self (), sizeof (cpu_set_t), &cpuset);
25610d565efSmrg   if (CPU_ISSET (0, &cpuset))
25710d565efSmrg     CPU_SET (1, &cpuset);
25810d565efSmrg   else
25910d565efSmrg     CPU_ZERO (&cpuset);
26010d565efSmrg   pthread_setaffinity_np (pthread_self (), sizeof (cpu_set_t), &cpuset);
26110d565efSmrg   pthread_attr_init (&attr);
26210d565efSmrg   pthread_attr_getaffinity_np (&attr, sizeof (cpu_set_t), &cpuset);
26310d565efSmrg   pthread_attr_setaffinity_np (&attr, sizeof (cpu_set_t), &cpuset);])],
26410d565efSmrg  AC_DEFINE(HAVE_PTHREAD_AFFINITY_NP, 1,
26510d565efSmrg[	Define if pthread_{,attr_}{g,s}etaffinity_np is supported.]))
26610d565efSmrg
26710d565efSmrg# At least for glibc, clock_gettime is in librt.  But don't pull that
26810d565efSmrg# in if it still doesn't give us the function we want.
26910d565efSmrgif test $ac_cv_func_clock_gettime = no; then
27010d565efSmrg  AC_CHECK_LIB(rt, clock_gettime,
27110d565efSmrg    [LIBS="-lrt $LIBS"
27210d565efSmrg     AC_DEFINE(HAVE_CLOCK_GETTIME, 1,
27310d565efSmrg	       [Define to 1 if you have the `clock_gettime' function.])])
27410d565efSmrgfi
27510d565efSmrg
2760fc04c29Smrg# Check for uname.
2770fc04c29SmrgAC_COMPILE_IFELSE(
2780fc04c29Smrg [AC_LANG_PROGRAM(
2790fc04c29Smrg  [#include <string.h>
2800fc04c29Smrg   #include <stdlib.h>
2810fc04c29Smrg   #include <sys/utsname.h>],
2820fc04c29Smrg  [struct utsname buf;
2830fc04c29Smrg   volatile size_t len = 0;
2840fc04c29Smrg   if (!uname (buf))
2850fc04c29Smrg     len = strlen (buf.nodename);])],
2860fc04c29Smrg  AC_DEFINE(HAVE_UNAME, 1,
2870fc04c29Smrg[	Define if uname is supported and struct utsname has nodename field.]))
2880fc04c29Smrg
2890fc04c29Smrg# Check for gethostname.
2900fc04c29SmrgAC_COMPILE_IFELSE(
2910fc04c29Smrg [AC_LANG_PROGRAM(
2920fc04c29Smrg  [#include <unistd.h>],
2930fc04c29Smrg  [
2940fc04c29Smrgchangequote(,)dnl
2950fc04c29Smrg   char buf[256];
2960fc04c29Smrg   if (gethostname (buf, sizeof (buf) - 1) == 0)
2970fc04c29Smrg     buf[255] = '\0';
2980fc04c29Smrgchangequote([,])dnl
2990fc04c29Smrg  ])],
3000fc04c29Smrg  AC_DEFINE(HAVE_GETHOSTNAME, 1,
3010fc04c29Smrg[	Define if gethostname is supported.]))
3020fc04c29Smrg
3030fc04c29Smrg# Check for getpid.
3040fc04c29SmrgAC_COMPILE_IFELSE(
3050fc04c29Smrg [AC_LANG_PROGRAM(
3060fc04c29Smrg  [#include <unistd.h>],
3070fc04c29Smrg  [int pid = getpid ();])],
3080fc04c29Smrg  AC_DEFINE(HAVE_GETPID, 1,
3090fc04c29Smrg[	Define if getpid is supported.]))
3100fc04c29Smrg
31110d565efSmrg# See if we support thread-local storage.
31210d565efSmrgGCC_CHECK_TLS
31310d565efSmrg
31410d565efSmrg# See if we have emulated thread-local storage.
31510d565efSmrgGCC_CHECK_EMUTLS
31610d565efSmrg
31710d565efSmrg# See what sort of export controls are available.
31810d565efSmrgLIBGOMP_CHECK_ATTRIBUTE_VISIBILITY
31910d565efSmrgLIBGOMP_CHECK_ATTRIBUTE_DLLEXPORT
32010d565efSmrgLIBGOMP_CHECK_ATTRIBUTE_ALIAS
32110d565efSmrgLIBGOMP_ENABLE_SYMVERS
32210d565efSmrg
32310d565efSmrgif test $enable_symvers = gnu; then
32410d565efSmrg  AC_DEFINE(LIBGOMP_GNU_SYMBOL_VERSIONING, 1,
32510d565efSmrg	    [Define to 1 if GNU symbol versioning is used for libgomp.])
32610d565efSmrgfi
32710d565efSmrg
328*ec02198aSmrg# Determine cpu count to limit testsuite parallelism.
329*ec02198aSmrgAX_COUNT_CPUS
330*ec02198aSmrgAC_SUBST(CPU_COUNT)
331*ec02198aSmrg
33210d565efSmrg# Get target configury.
33310d565efSmrg. ${srcdir}/configure.tgt
33410d565efSmrgCFLAGS="$save_CFLAGS $XCFLAGS"
33510d565efSmrg
33610d565efSmrg# Check for __sync_val_compare_and_swap, but only after the target has
33710d565efSmrg# had a chance to set XCFLAGS.
33810d565efSmrgLIBGOMP_CHECK_SYNC_BUILTINS
33910d565efSmrg
34010d565efSmrgXCFLAGS="$XCFLAGS$XPCFLAGS"
34110d565efSmrg
342c7a68eb7Smrg# Add CET specific flags if CET is enabled
343c7a68eb7SmrgGCC_CET_FLAGS(CET_FLAGS)
344c7a68eb7SmrgXCFLAGS="$XCFLAGS $CET_FLAGS"
345c7a68eb7SmrgFCFLAGS="$FCFLAGS $CET_FLAGS"
346c7a68eb7Smrg
34710d565efSmrgAC_SUBST(config_path)
34810d565efSmrgAC_SUBST(XCFLAGS)
34910d565efSmrgAC_SUBST(XLDFLAGS)
35010d565efSmrg
35110d565efSmrg# Cleanup and exit.
35210d565efSmrgCFLAGS="$save_CFLAGS"
35310d565efSmrgAC_CACHE_SAVE
35410d565efSmrg
35510d565efSmrgif test ${multilib} = yes; then
35610d565efSmrg  multilib_arg="--enable-multilib"
35710d565efSmrgelse
35810d565efSmrg  multilib_arg=
35910d565efSmrgfi
36010d565efSmrg
36110d565efSmrg# Set up the set of libraries that we need to link against for libgomp.
36210d565efSmrg# Note that the GOMP_SELF_SPEC in gcc.c may force -pthread,
36310d565efSmrg# which will force linkage against -lpthread (or equivalent for the system).
36410d565efSmrg# That's not 100% ideal, but about the best we can do easily.
36510d565efSmrgif test $enable_shared = yes; then
36610d565efSmrg  link_gomp="-lgomp %{static: $LIBS}"
36710d565efSmrgelse
36810d565efSmrg  link_gomp="-lgomp $LIBS"
36910d565efSmrgfi
37010d565efSmrgAC_SUBST(link_gomp)
37110d565efSmrg
37210d565efSmrgAM_CONDITIONAL([USE_FORTRAN], [test "$ac_cv_fc_compiler_gnu" = yes])
37310d565efSmrg
37410d565efSmrg# ??? 2006-01-24: Paulo committed to asking autoconf folk to document
37510d565efSmrg# and export AC_COMPUTE_INT.  If that happens, then we'll need to remove
37610d565efSmrg# the underscore here and update the PREREQ.  If it doesn't, then we'll
37710d565efSmrg# need to copy this macro to our acinclude.m4.
37810d565efSmrgsave_CFLAGS="$CFLAGS"
37910d565efSmrgfor i in $config_path; do
38010d565efSmrg  if test -f $srcdir/config/$i/omp-lock.h; then
38110d565efSmrg    CFLAGS="$CFLAGS -include confdefs.h -include $srcdir/config/$i/omp-lock.h"
38210d565efSmrg    break
38310d565efSmrg  fi
38410d565efSmrgdone
38510d565efSmrg
38610d565efSmrg_AC_COMPUTE_INT([sizeof (omp_lock_t)], [OMP_LOCK_SIZE],,
38710d565efSmrg  [AC_MSG_ERROR([unsupported system, cannot find sizeof (omp_lock_t)])])
38810d565efSmrg_AC_COMPUTE_INT([__alignof (omp_lock_t)], [OMP_LOCK_ALIGN])
38910d565efSmrg_AC_COMPUTE_INT([sizeof (omp_nest_lock_t)], [OMP_NEST_LOCK_SIZE])
39010d565efSmrg_AC_COMPUTE_INT([__alignof (omp_nest_lock_t)], [OMP_NEST_LOCK_ALIGN])
39110d565efSmrg_AC_COMPUTE_INT([sizeof (omp_lock_25_t)], [OMP_LOCK_25_SIZE],,
39210d565efSmrg  [AC_MSG_ERROR([unsupported system, cannot find sizeof (omp_lock_25_t)])])
39310d565efSmrg_AC_COMPUTE_INT([__alignof (omp_lock_25_t)], [OMP_LOCK_25_ALIGN])
39410d565efSmrg_AC_COMPUTE_INT([sizeof (omp_nest_lock_25_t)], [OMP_NEST_LOCK_25_SIZE])
39510d565efSmrg_AC_COMPUTE_INT([__alignof (omp_nest_lock_25_t)], [OMP_NEST_LOCK_25_ALIGN])
39610d565efSmrg
39710d565efSmrg# If the lock fits in an integer, then arrange for Fortran to use that
39810d565efSmrg# integer.  If it doesn't, then arrange for Fortran to use a pointer.
39910d565efSmrg# Except that we don't have a way at present to multi-lib the installed
40010d565efSmrg# Fortran modules, so we assume 8 bytes for pointers, regardless of the
40110d565efSmrg# actual target.
40210d565efSmrgOMP_LOCK_KIND=$OMP_LOCK_SIZE
40310d565efSmrgOMP_NEST_LOCK_KIND=$OMP_NEST_LOCK_SIZE
40410d565efSmrgif test $OMP_LOCK_SIZE -gt 8 || test $OMP_LOCK_ALIGN -gt $OMP_LOCK_SIZE; then
40510d565efSmrg  OMP_LOCK_KIND=8
40610d565efSmrgfi
40710d565efSmrgif test $OMP_NEST_LOCK_SIZE -gt 8 || test $OMP_NEST_LOCK_ALIGN -gt $OMP_NEST_LOCK_SIZE; then
40810d565efSmrg  OMP_NEST_LOCK_KIND=8
40910d565efSmrgfi
41010d565efSmrgOMP_LOCK_25_KIND=$OMP_LOCK_25_SIZE
41110d565efSmrgOMP_NEST_LOCK_25_KIND=$OMP_NEST_LOCK_25_SIZE
41210d565efSmrgif test $OMP_LOCK_25_SIZE -gt 8 || test $OMP_LOCK_25_ALIGN -gt $OMP_LOCK_25_SIZE; then
41310d565efSmrg  OMP_LOCK_25_KIND=8
41410d565efSmrgfi
41510d565efSmrgif test $OMP_NEST_LOCK_25_SIZE -gt 8 || test $OMP_NEST_LOCK_25_ALIGN -gt $OMP_NEST_LOCK_25_SIZE; then
41610d565efSmrg  OMP_NEST_LOCK_25_KIND=8
41710d565efSmrgfi
41810d565efSmrg
41910d565efSmrgAC_SUBST(OMP_LOCK_SIZE)
42010d565efSmrgAC_SUBST(OMP_LOCK_ALIGN)
42110d565efSmrgAC_SUBST(OMP_NEST_LOCK_SIZE)
42210d565efSmrgAC_SUBST(OMP_NEST_LOCK_ALIGN)
42310d565efSmrgAC_SUBST(OMP_LOCK_KIND)
42410d565efSmrgAC_SUBST(OMP_NEST_LOCK_KIND)
42510d565efSmrgAC_SUBST(OMP_LOCK_25_SIZE)
42610d565efSmrgAC_SUBST(OMP_LOCK_25_ALIGN)
42710d565efSmrgAC_SUBST(OMP_NEST_LOCK_25_SIZE)
42810d565efSmrgAC_SUBST(OMP_NEST_LOCK_25_ALIGN)
42910d565efSmrgAC_SUBST(OMP_LOCK_25_KIND)
43010d565efSmrgAC_SUBST(OMP_NEST_LOCK_25_KIND)
43110d565efSmrgCFLAGS="$save_CFLAGS"
43210d565efSmrg
43310d565efSmrg# Determine what GCC version number to use in filesystem paths.
43410d565efSmrgGCC_BASE_VER
43510d565efSmrg
43610d565efSmrgAC_CONFIG_FILES(omp.h omp_lib.h omp_lib.f90 libgomp_f.h)
43710d565efSmrgAC_CONFIG_FILES(Makefile libgomp.spec)
43810d565efSmrgAC_OUTPUT
439