|
Packit Service |
c5cf8c |
# -*- Mode: Autoconf; -*-
|
|
Packit Service |
c5cf8c |
#
|
|
Packit Service |
c5cf8c |
# See COPYRIGHT in top-level directory.
|
|
Packit Service |
c5cf8c |
#
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
AC_PREREQ(2.63)
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
m4_include([maint/version.m4])
|
|
Packit Service |
c5cf8c |
AC_INIT([izem],ZM_VERSION_m4)
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
ZM_VERSION=ZM_VERSION_m4
|
|
Packit Service |
c5cf8c |
AC_SUBST([ZM_VERSION])
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
libzm_so_version="libzm_so_version_m4"
|
|
Packit Service |
c5cf8c |
AC_SUBST([libzm_so_version])
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# Produce a numeric version assuming the following format:
|
|
Packit Service |
c5cf8c |
# Version: [MAJ].[MIN].[REV][EXT][EXT_NUMBER]
|
|
Packit Service |
c5cf8c |
# Example: 1.0.7rc1 has
|
|
Packit Service |
c5cf8c |
# MAJ = 1
|
|
Packit Service |
c5cf8c |
# MIN = 0
|
|
Packit Service |
c5cf8c |
# REV = 7
|
|
Packit Service |
c5cf8c |
# EXT = rc
|
|
Packit Service |
c5cf8c |
# EXT_NUMBER = 1
|
|
Packit Service |
c5cf8c |
#
|
|
Packit Service |
c5cf8c |
# Converting to numeric version will convert EXT to a format number:
|
|
Packit Service |
c5cf8c |
# ALPHA (a) = 0
|
|
Packit Service |
c5cf8c |
# BETA (b) = 1
|
|
Packit Service |
c5cf8c |
# RC (rc) = 2
|
|
Packit Service |
c5cf8c |
# PATCH (p) = 3
|
|
Packit Service |
c5cf8c |
# Regular releases are treated as patch 0
|
|
Packit Service |
c5cf8c |
#
|
|
Packit Service |
c5cf8c |
# Numeric version will have 1 digit for MAJ, 2 digits for MIN,
|
|
Packit Service |
c5cf8c |
# 2 digits for REV, 1 digit for EXT and 2 digits for EXT_NUMBER.
|
|
Packit Service |
c5cf8c |
changequote(<<,>>)
|
|
Packit Service |
c5cf8c |
V1=`expr $ZM_VERSION : '\([0-9]*\)\.[0-9]*\.*[0-9]*[a-zA-Z]*[0-9]*'`
|
|
Packit Service |
c5cf8c |
V2=`expr $ZM_VERSION : '[0-9]*\.\([0-9]*\)\.*[0-9]*[a-zA-Z]*[0-9]*'`
|
|
Packit Service |
c5cf8c |
V3=`expr $ZM_VERSION : '[0-9]*\.[0-9]*\.*\([0-9]*\)[a-zA-Z]*[0-9]*'`
|
|
Packit Service |
c5cf8c |
V4=`expr $ZM_VERSION : '[0-9]*\.[0-9]*\.*[0-9]*\([a-zA-Z]*\)[0-9]*'`
|
|
Packit Service |
c5cf8c |
V5=`expr $ZM_VERSION : '[0-9]*\.[0-9]*\.*[0-9]*[a-zA-Z]*\([0-9]*\)'`
|
|
Packit Service |
c5cf8c |
changequote([,])
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
if test "$V2" -le 9 ; then V2="0$V2" ; fi
|
|
Packit Service |
c5cf8c |
if test "$V3" = "" ; then V3="0"; fi
|
|
Packit Service |
c5cf8c |
if test "$V3" -le 9 ; then V3="0$V3" ; fi
|
|
Packit Service |
c5cf8c |
if test "$V4" = "a" ; then
|
|
Packit Service |
c5cf8c |
V4=0
|
|
Packit Service |
c5cf8c |
elif test "$V4" = "b" ; then
|
|
Packit Service |
c5cf8c |
V4=1
|
|
Packit Service |
c5cf8c |
elif test "$V4" = "rc" ; then
|
|
Packit Service |
c5cf8c |
V4=2
|
|
Packit Service |
c5cf8c |
elif test "$V4" = "" ; then
|
|
Packit Service |
c5cf8c |
V4=3
|
|
Packit Service |
c5cf8c |
V5=0
|
|
Packit Service |
c5cf8c |
elif test "$V4" = "p" ; then
|
|
Packit Service |
c5cf8c |
V4=3
|
|
Packit Service |
c5cf8c |
fi
|
|
Packit Service |
c5cf8c |
if test "$V5" -le 9 ; then V5="0$V5" ; fi
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
ZM_NUMVERSION=`expr $V1$V2$V3$V4$V5 + 0`
|
|
Packit Service |
c5cf8c |
AC_SUBST(ZM_NUMVERSION)
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
AC_CONFIG_AUX_DIR(m4)
|
|
Packit Service |
c5cf8c |
AC_CONFIG_MACRO_DIR(m4)
|
|
Packit Service |
c5cf8c |
AC_PROG_CC
|
|
Packit Service |
c5cf8c |
AC_PROG_CXX
|
|
Packit Service |
c5cf8c |
AC_HEADER_STDC
|
|
Packit Service |
c5cf8c |
AC_PROG_CC_C99
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
if test "x$ac_cv_prog_cc_c99" = "xno"; then
|
|
Packit Service |
c5cf8c |
AC_MSG_ERROR([C99 or an earlier C standard required])
|
|
Packit Service |
c5cf8c |
fi
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
dnl ----------------------------------------------------------------------------
|
|
Packit Service |
c5cf8c |
dnl check the environment and the function availability
|
|
Packit Service |
c5cf8c |
dnl ----------------------------------------------------------------------------
|
|
Packit Service |
c5cf8c |
# compute canonical system types
|
|
Packit Service |
c5cf8c |
AC_CANONICAL_HOST
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
dnl ----------------------------------------------------------------------------
|
|
Packit Service |
c5cf8c |
dnl user option/feature selection
|
|
Packit Service |
c5cf8c |
dnl ----------------------------------------------------------------------------
|
|
Packit Service |
c5cf8c |
# embedding option
|
|
Packit Service |
c5cf8c |
AC_ARG_ENABLE(embedded,
|
|
Packit Service |
c5cf8c |
AC_HELP_STRING([--enable-embedded], [Build Izem in embedded mode (default is no)]),
|
|
Packit Service |
c5cf8c |
[embedded=yes],
|
|
Packit Service |
c5cf8c |
[embedded=no])
|
|
Packit Service |
c5cf8c |
AM_CONDITIONAL([ZM_EMBEDDED_MODE],[test "x${embedded}" = "xyes"])
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# debug options
|
|
Packit Service |
c5cf8c |
AC_ARG_ENABLE([debug],
|
|
Packit Service |
c5cf8c |
[ --enable-debug@<:@=OPTS@:>@ control the level of debugging. "OPTS" is a list of
|
|
Packit Service |
c5cf8c |
comma separated names below. Default is "none".
|
|
Packit Service |
c5cf8c |
none - no debugging
|
|
Packit Service |
c5cf8c |
yes - add compiler flags, -g -O0 -Wall
|
|
Packit Service |
c5cf8c |
log - enable debug event logging
|
|
Packit Service |
c5cf8c |
all - all of the above choices],,
|
|
Packit Service |
c5cf8c |
[enable_debug=none])
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# strip off multiple options, separated by commas
|
|
Packit Service |
c5cf8c |
save_IFS="$IFS"
|
|
Packit Service |
c5cf8c |
IFS=","
|
|
Packit Service |
c5cf8c |
for option in $enable_debug ; do
|
|
Packit Service |
c5cf8c |
case "$option" in
|
|
Packit Service |
c5cf8c |
no|none)
|
|
Packit Service |
c5cf8c |
;;
|
|
Packit Service |
c5cf8c |
yes)
|
|
Packit Service |
c5cf8c |
debug_flags=yes
|
|
Packit Service |
c5cf8c |
;;
|
|
Packit Service |
c5cf8c |
log)
|
|
Packit Service |
c5cf8c |
debug_log=yes
|
|
Packit Service |
c5cf8c |
;;
|
|
Packit Service |
c5cf8c |
all)
|
|
Packit Service |
c5cf8c |
debug_flags=yes
|
|
Packit Service |
c5cf8c |
debug_log=yes
|
|
Packit Service |
c5cf8c |
;;
|
|
Packit Service |
c5cf8c |
*)
|
|
Packit Service |
c5cf8c |
IFS=$save_IFS
|
|
Packit Service |
c5cf8c |
AC_MSG_WARN([Unknown value $option for enable-debug])
|
|
Packit Service |
c5cf8c |
IFS=","
|
|
Packit Service |
c5cf8c |
;;
|
|
Packit Service |
c5cf8c |
esac
|
|
Packit Service |
c5cf8c |
done
|
|
Packit Service |
c5cf8c |
IFS="$save_IFS"
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
AS_IF([test "x$debug_flags" = "xyes"], [CFLAGS="$CFLAGS -g -O0 -Wall"])
|
|
Packit Service |
c5cf8c |
AS_IF([test "x$debug_log" = "xyes"],
|
|
Packit Service |
c5cf8c |
[AC_DEFINE(ZM_CONFIG_USE_DEBUG_LOG, 1, [Define to enable debug logging])])
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# Testing for atomic
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
AC_MSG_CHECKING([for gcc __atomic builtins (memory model aware)])
|
|
Packit Service |
c5cf8c |
have_gcc_atomic_mem_aware_builtins=no
|
|
Packit Service |
c5cf8c |
AC_TRY_LINK(
|
|
Packit Service |
c5cf8c |
[], [char l; unsigned long v; __atomic_test_and_set(&l, __ATOMIC_RELAXED); __atomic_store_n(&v, 1, __ATOMIC_RELEASE); __atomic_load_n(&v, __ATOMIC_ACQUIRE);],
|
|
Packit Service |
c5cf8c |
[have_gcc_atomic_mem_aware_builtins=yes],
|
|
Packit Service |
c5cf8c |
)
|
|
Packit Service |
c5cf8c |
if test "x$have_gcc_atomic_mem_aware_builtins" = "xyes"; then
|
|
Packit Service |
c5cf8c |
AC_DEFINE([HAVE_GCC_MEM_AWARE_ATOMIC_BUILTINS], [1], [Define if the gcc __atomic builtins (memory model aware) are available])
|
|
Packit Service |
c5cf8c |
fi
|
|
Packit Service |
c5cf8c |
AC_MSG_RESULT([$have_gcc_atomic_mem_aware_builtins])
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
AC_MSG_CHECKING([for C11 atomics])
|
|
Packit Service |
c5cf8c |
have_c11_atomics=no
|
|
Packit Service |
c5cf8c |
AC_TRY_LINK(
|
|
Packit Service |
c5cf8c |
[], [#include <stdatomic.h>
|
|
Packit Service |
c5cf8c |
atomic_char l;
|
|
Packit Service |
c5cf8c |
atomic_long v;
|
|
Packit Service |
c5cf8c |
atomic_intptr_t p;
|
|
Packit Service |
c5cf8c |
atomic_flag_test_and_set_explicit(&l, memory_order_relaxed);
|
|
Packit Service |
c5cf8c |
atomic_store_explicit(&v, 1, memory_order_release);
|
|
Packit Service |
c5cf8c |
atomic_load_explicit(&v, memory_order_acquire);
|
|
Packit Service |
c5cf8c |
atomic_store_explicit(&p, NULL, memory_order_release);
|
|
Packit Service |
c5cf8c |
intptr_t q = NULL;
|
|
Packit Service |
c5cf8c |
atomic_compare_exchange_strong_explicit(&p, &q, &l, memory_order_acq_rel, memory_order_acquire);
|
|
Packit Service |
c5cf8c |
atomic_compare_exchange_weak_explicit(&p, &q, &l, memory_order_acq_rel, memory_order_acquire);
|
|
Packit Service |
c5cf8c |
],
|
|
Packit Service |
c5cf8c |
[have_c11_atomics=yes],
|
|
Packit Service |
c5cf8c |
)
|
|
Packit Service |
c5cf8c |
if test "x$have_c11_atomics" = "xyes"; then
|
|
Packit Service |
c5cf8c |
AC_DEFINE([HAVE_C11_ATOMICS], [1], [Define if the C11 atomics are available])
|
|
Packit Service |
c5cf8c |
fi
|
|
Packit Service |
c5cf8c |
AC_MSG_RESULT([$have_c11_atomics])
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
AC_MSG_CHECKING([for gcc __sync atomics])
|
|
Packit Service |
c5cf8c |
have_sync_atomics=no
|
|
Packit Service |
c5cf8c |
AC_TRY_LINK(
|
|
Packit Service |
c5cf8c |
[], [char l = 'm'; unsigned long v; __sync_bool_compare_and_swap(&l, 'm', 'l'); __sync_synchronize (); __sync_fetch_and_add(&v, 1);],
|
|
Packit Service |
c5cf8c |
[have_sync_atomics=yes],
|
|
Packit Service |
c5cf8c |
)
|
|
Packit Service |
c5cf8c |
if test "x$have_sync_atomics" = "xyes"; then
|
|
Packit Service |
c5cf8c |
AC_DEFINE([HAVE_SYNC_ATOMICS], [1], [Define if the sync atomics are available])
|
|
Packit Service |
c5cf8c |
fi
|
|
Packit Service |
c5cf8c |
AC_MSG_RESULT([$have_sync_atomics])
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
if test "x$have_c11_atomics" = "xyes"; then
|
|
Packit Service |
c5cf8c |
memory_model="C11"
|
|
Packit Service |
c5cf8c |
elif test "x$have_gcc_atomic_mem_aware_builtins" = "xyes"; then
|
|
Packit Service |
c5cf8c |
memory_model="GCC_ATOM"
|
|
Packit Service |
c5cf8c |
elif test "x$have_sync_atomics" = "xyes"; then
|
|
Packit Service |
c5cf8c |
memory_model="GCC_SYNC"
|
|
Packit Service |
c5cf8c |
else
|
|
Packit Service |
c5cf8c |
AC_MSG_ERROR([No atomic/memory model found with this compiler])
|
|
Packit Service |
c5cf8c |
fi
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
ZM_MEMORY_MODEL=ZM_MEMORY_MODEL_$memory_model
|
|
Packit Service |
c5cf8c |
AC_SUBST(ZM_MEMORY_MODEL)
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# Default lock interface
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
AC_ARG_WITH([lock_if],
|
|
Packit Service |
c5cf8c |
[ --with-lock-if@<:@=LOCK_IF@:>@ define the default lock interface being
|
|
Packit Service |
c5cf8c |
exposed by Izem (i.e., zm_lock_t and associated
|
|
Packit Service |
c5cf8c |
routines. LOCK_IF represents the name of the
|
|
Packit Service |
c5cf8c |
underlying lock to be used. Possible values are:
|
|
Packit Service |
c5cf8c |
tkt - Ticket
|
|
Packit Service |
c5cf8c |
mcs - MCS
|
|
Packit Service |
c5cf8c |
mmcs - Memorizing MCS. It memorizes the local
|
|
Packit Service |
c5cf8c |
context of the lock holder. It allows
|
|
Packit Service |
c5cf8c |
reacquiring and releasing the lock without
|
|
Packit Service |
c5cf8c |
bringing a local context. It is useful for
|
|
Packit Service |
c5cf8c |
lock passing in nested scopes (e.g., MPICH)
|
|
Packit Service |
c5cf8c |
hmcs - Multilevel Hierarchical MCS (HMCS)
|
|
Packit Service |
c5cf8c |
tlp - Generic Two-Level Priority
|
|
Packit Service |
c5cf8c |
mcsp - Two-Level MCS lock
|
|
Packit Service |
c5cf8c |
],,
|
|
Packit Service |
c5cf8c |
[with_lock_if=tkt])
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
case "$with_lock_if" in
|
|
Packit Service |
c5cf8c |
tkt)
|
|
Packit Service |
c5cf8c |
ZM_LOCK_IF=ZM_TICKET_IF
|
|
Packit Service |
c5cf8c |
;;
|
|
Packit Service |
c5cf8c |
mcs)
|
|
Packit Service |
c5cf8c |
ZM_LOCK_IF=ZM_MCS_IF
|
|
Packit Service |
c5cf8c |
;;
|
|
Packit Service |
c5cf8c |
mmcs)
|
|
Packit Service |
c5cf8c |
ZM_LOCK_IF=ZM_MMCS_IF
|
|
Packit Service |
c5cf8c |
;;
|
|
Packit Service |
c5cf8c |
hmcs)
|
|
Packit Service |
c5cf8c |
ZM_LOCK_IF=ZM_HMCS_IF
|
|
Packit Service |
c5cf8c |
;;
|
|
Packit Service |
c5cf8c |
tlp)
|
|
Packit Service |
c5cf8c |
ZM_LOCK_IF=ZM_TLP_IF
|
|
Packit Service |
c5cf8c |
;;
|
|
Packit Service |
c5cf8c |
mcsp)
|
|
Packit Service |
c5cf8c |
ZM_LOCK_IF=ZM_MCSP_IF
|
|
Packit Service |
c5cf8c |
;;
|
|
Packit Service |
c5cf8c |
*)
|
|
Packit Service |
c5cf8c |
AC_MSG_WARN([Unknown value $with_lock_if for with-lock-if])
|
|
Packit Service |
c5cf8c |
;;
|
|
Packit Service |
c5cf8c |
esac
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
AC_SUBST(ZM_LOCK_IF)
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# TLP lock components
|
|
Packit Service |
c5cf8c |
AC_ARG_WITH([tlp_locks],
|
|
Packit Service |
c5cf8c |
[ --with-tlp-locks@<:@=HIGH-LOW@:>@ define the high and low priority locks
|
|
Packit Service |
c5cf8c |
in the TLP lock. HIGH and LOW represent the locks
|
|
Packit Service |
c5cf8c |
used by the high priority and low priority threads,
|
|
Packit Service |
c5cf8c |
repspectively,
|
|
Packit Service |
c5cf8c |
tkt-tkt - both are ticket locks (default)
|
|
Packit Service |
c5cf8c |
mcs-mcs - both are mcs locks
|
|
Packit Service |
c5cf8c |
tkt-mcs - HIGH is ticket LOW is MCS
|
|
Packit Service |
c5cf8c |
mcs-tkt - HIGH is MCS LOW is ticket
|
|
Packit Service |
c5cf8c |
hmcs-hmcs - both are HMCS locks
|
|
Packit Service |
c5cf8c |
hmcs-mcs - HIGH is HMCS and LOW is MCS
|
|
Packit Service |
c5cf8c |
],,
|
|
Packit Service |
c5cf8c |
[with_tlp_locks=tkt-tkt])
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
case "$with_tlp_locks" in
|
|
Packit Service |
c5cf8c |
tkt-tkt)
|
|
Packit Service |
c5cf8c |
ZM_TLP_HIGH_P=ZM_TICKET
|
|
Packit Service |
c5cf8c |
ZM_TLP_LOW_P=ZM_TICKET
|
|
Packit Service |
c5cf8c |
;;
|
|
Packit Service |
c5cf8c |
mcs-mcs)
|
|
Packit Service |
c5cf8c |
ZM_TLP_HIGH_P=ZM_MCS
|
|
Packit Service |
c5cf8c |
ZM_TLP_LOW_P=ZM_MCS
|
|
Packit Service |
c5cf8c |
;;
|
|
Packit Service |
c5cf8c |
tkt-mcs)
|
|
Packit Service |
c5cf8c |
ZM_TLP_HIGH_P=ZM_TICKET
|
|
Packit Service |
c5cf8c |
ZM_TLP_LOW_P=ZM_MCS
|
|
Packit Service |
c5cf8c |
;;
|
|
Packit Service |
c5cf8c |
mcs-tkt)
|
|
Packit Service |
c5cf8c |
ZM_TLP_HIGH_P=ZM_MCS
|
|
Packit Service |
c5cf8c |
ZM_TLP_LOW_P=ZM_TICKET
|
|
Packit Service |
c5cf8c |
;;
|
|
Packit Service |
c5cf8c |
hmcs-hmcs)
|
|
Packit Service |
c5cf8c |
ZM_TLP_HIGH_P=ZM_HMCS
|
|
Packit Service |
c5cf8c |
ZM_TLP_LOW_P=ZM_HMCS
|
|
Packit Service |
c5cf8c |
;;
|
|
Packit Service |
c5cf8c |
hmcs-mcs)
|
|
Packit Service |
c5cf8c |
ZM_TLP_HIGH_P=ZM_HMCS
|
|
Packit Service |
c5cf8c |
ZM_TLP_LOW_P=ZM_MCS
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
;;
|
|
Packit Service |
c5cf8c |
*)
|
|
Packit Service |
c5cf8c |
AC_MSG_WARN([Unknown value $with_tlp_locks for with-tlp-locks])
|
|
Packit Service |
c5cf8c |
;;
|
|
Packit Service |
c5cf8c |
esac
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
AC_SUBST(ZM_TLP_HIGH_P)
|
|
Packit Service |
c5cf8c |
AC_SUBST(ZM_TLP_LOW_P)
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# Default cond var interface
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
AC_ARG_WITH([cond_if],
|
|
Packit Service |
c5cf8c |
[ --with-cond-if@<:@=COND_IF@:>@ define the default condition variable
|
|
Packit Service |
c5cf8c |
interface being exposed by Izem (i.e., zm_cond_t
|
|
Packit Service |
c5cf8c |
and associated routines. COND_IF represents the
|
|
Packit Service |
c5cf8c |
name of the underlying condition variable to be
|
|
Packit Service |
c5cf8c |
used. Possible values are:
|
|
Packit Service |
c5cf8c |
ccond - CAS-based spinning
|
|
Packit Service |
c5cf8c |
],,
|
|
Packit Service |
c5cf8c |
[with_cond_if=ccond])
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
case "$with_cond_if" in
|
|
Packit Service |
c5cf8c |
ccond)
|
|
Packit Service |
c5cf8c |
ZM_COND_IF=ZM_CCOND_IF
|
|
Packit Service |
c5cf8c |
;;
|
|
Packit Service |
c5cf8c |
*)
|
|
Packit Service |
c5cf8c |
AC_MSG_WARN([Unknown value $with_cond_if for with-cond-if])
|
|
Packit Service |
c5cf8c |
;;
|
|
Packit Service |
c5cf8c |
esac
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
AC_SUBST(ZM_COND_IF)
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
# Default queue interface
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
AC_ARG_WITH([queue_if],
|
|
Packit Service |
c5cf8c |
[ --with-queue-if@<:@=QUEUE_IF@:>@ define the default queue interface being
|
|
Packit Service |
c5cf8c |
exposed by Izem (i.e., zm_queue_t and associated
|
|
Packit Service |
c5cf8c |
routines. QUEUE_IF represents the name of the
|
|
Packit Service |
c5cf8c |
underlying queue to be used. Possible values are:
|
|
Packit Service |
c5cf8c |
gl - Global lock (both enq and deq compete for the same lock)
|
|
Packit Service |
c5cf8c |
ms - Michael and Scott''s nonblocking queue (PODC''96)
|
|
Packit Service |
c5cf8c |
swp - SWAP-based MPSC queue inspired by the MCS lock
|
|
Packit Service |
c5cf8c |
fa - FAA-based MPSC queue derived from WF (Yang, PPoPP''16)
|
|
Packit Service |
c5cf8c |
runtime - Runtime selection through ZM_QUEUE_IF environment variable
|
|
Packit Service |
c5cf8c |
],,
|
|
Packit Service |
c5cf8c |
[with_queue_if=swp])
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
case "$with_queue_if" in
|
|
Packit Service |
c5cf8c |
gl)
|
|
Packit Service |
c5cf8c |
ZM_QUEUE_CONF=ZM_GLQUEUE_IF
|
|
Packit Service |
c5cf8c |
;;
|
|
Packit Service |
c5cf8c |
ms)
|
|
Packit Service |
c5cf8c |
ZM_QUEUE_CONF=ZM_MSQUEUE_IF
|
|
Packit Service |
c5cf8c |
;;
|
|
Packit Service |
c5cf8c |
swp)
|
|
Packit Service |
c5cf8c |
ZM_QUEUE_CONF=ZM_SWPQUEUE_IF
|
|
Packit Service |
c5cf8c |
;;
|
|
Packit Service |
c5cf8c |
fa)
|
|
Packit Service |
c5cf8c |
ZM_QUEUE_CONF=ZM_FAQUEUE_IF
|
|
Packit Service |
c5cf8c |
;;
|
|
Packit Service |
c5cf8c |
# mbpqueue has a different function signature, so won't be supported here
|
|
Packit Service |
c5cf8c |
runtime)
|
|
Packit Service |
c5cf8c |
ZM_QUEUE_CONF=ZM_RUNTIMEQUEUE_IF
|
|
Packit Service |
c5cf8c |
;;
|
|
Packit Service |
c5cf8c |
*)
|
|
Packit Service |
c5cf8c |
AC_MSG_ERROR([Unknown value $with_queue_if for with-queue-if])
|
|
Packit Service |
c5cf8c |
;;
|
|
Packit Service |
c5cf8c |
esac
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
AC_SUBST(ZM_QUEUE_CONF)
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
AC_ARG_WITH([hwloc],
|
|
Packit Service |
c5cf8c |
[AS_HELP_STRING([--with-hwloc], [Set path to hwloc. Default: auto detect.])],
|
|
Packit Service |
c5cf8c |
[LIBS="$LIBS -L$with_hwloc/lib"
|
|
Packit Service |
c5cf8c |
CFLAGS="$CFLAGS -I$with_hwloc/include"],
|
|
Packit Service |
c5cf8c |
[])
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
AC_CHECK_LIB(hwloc,
|
|
Packit Service |
c5cf8c |
hwloc_topology_init,
|
|
Packit Service |
c5cf8c |
[],
|
|
Packit Service |
c5cf8c |
AC_MSG_WARN([Could not find hwloc. Set the path to hwloc using --with-hwloc]),
|
|
Packit Service |
c5cf8c |
[])
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
AM_CONDITIONAL([ZM_HAVE_HWLOC],[test "${with_hwloc+set}" = set])
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
AM_INIT_AUTOMAKE([-Wall -Wno-portability-recursive -Werror foreign 1.11.3 subdir-objects])
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
AM_SILENT_RULES([yes])
|
|
Packit Service |
c5cf8c |
AM_PROG_AS
|
|
Packit Service |
c5cf8c |
AM_PROG_AR
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
LT_INIT
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
AC_PROG_INSTALL
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
dnl ----------------------------------------------------------------------------
|
|
Packit Service |
c5cf8c |
dnl config headers
|
|
Packit Service |
c5cf8c |
dnl ----------------------------------------------------------------------------
|
|
Packit Service |
c5cf8c |
AC_CONFIG_HEADERS([src/include/zm_config.h])
|
|
Packit Service |
c5cf8c |
AH_TOP([
|
|
Packit Service |
c5cf8c |
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
|
|
Packit Service |
c5cf8c |
/*
|
|
Packit Service |
c5cf8c |
* See COPYRIGHT in top-level directory.
|
|
Packit Service |
c5cf8c |
*/
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#ifndef ZM_CONFIG_H_INCLUDED
|
|
Packit Service |
c5cf8c |
#define ZM_CONFIG_H_INCLUDED
|
|
Packit Service |
c5cf8c |
])
|
|
Packit Service |
c5cf8c |
AH_BOTTOM([
|
|
Packit Service |
c5cf8c |
#endif /* ZM_CONFIG_H_INCLUDED */
|
|
Packit Service |
c5cf8c |
])
|
|
Packit Service |
c5cf8c |
dnl ----------------------------------------------------------------------------
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
AC_CONFIG_FILES([Makefile
|
|
Packit Service |
c5cf8c |
Doxyfile
|
|
Packit Service |
c5cf8c |
maint/izem.pc
|
|
Packit Service |
c5cf8c |
src/Makefile
|
|
Packit Service |
c5cf8c |
src/include/common/zm_common.h
|
|
Packit Service |
c5cf8c |
src/include/queue/zm_queue.h
|
|
Packit Service |
c5cf8c |
test/Makefile
|
|
Packit Service |
c5cf8c |
test/regres/Makefile
|
|
Packit Service |
c5cf8c |
test/regres/list/Makefile
|
|
Packit Service |
c5cf8c |
test/regres/queue/Makefile
|
|
Packit Service |
c5cf8c |
test/perf/Makefile
|
|
Packit Service |
c5cf8c |
test/perf/queue/Makefile
|
|
Packit Service |
c5cf8c |
])
|
|
Packit Service |
c5cf8c |
if test "${with_hwloc+set}" = set; then
|
|
Packit Service |
c5cf8c |
AC_CONFIG_FILES([src/include/lock/zm_lock.h
|
|
Packit Service |
c5cf8c |
src/include/lock/zm_lock_types.h
|
|
Packit Service |
c5cf8c |
src/include/cond/zm_cond.h
|
|
Packit Service |
c5cf8c |
test/regres/lock/Makefile
|
|
Packit Service |
c5cf8c |
test/regres/cond/Makefile
|
|
Packit Service |
c5cf8c |
test/perf/lock/Makefile
|
|
Packit Service |
c5cf8c |
])
|
|
Packit Service |
c5cf8c |
fi
|
|
Packit Service |
c5cf8c |
AC_OUTPUT
|