#!/bin/sh
#-*-sh-*-

#
# SPDX-License-Identifier: BSD-3-Clause
# Copyright © 2012-2021 Inria.  All rights reserved.
# See COPYING in top-level directory.
#

HWLOC_top_builddir="@HWLOC_top_builddir@"
HWLOC_top_srcdir="@HWLOC_top_srcdir@"
xmlbuffer=xmlbuffer@EXEEXT@

HWLOC_TOP_SRCDIR=${HWLOC_top_srcdir}
export HWLOC_TOP_SRCDIR

HWLOC_PLUGINS_PATH=${HWLOC_top_builddir}/hwloc/.libs
export HWLOC_PLUGINS_PATH

HWLOC_DEBUG_CHECK=1
export HWLOC_DEBUG_CHECK

HWLOC_LIBXML_CLEANUP=1
export HWLOC_LIBXML_CLEANUP

# enable the GL backend if not explicitly disabled
if test x$HWLOC_GL = x; then
    HWLOC_GL=1
    export HWLOC_GL
fi

if test "`basename $1`" = "$xmlbuffer"; then
    "$@" 1 1
    "$@" 0 1
    "$@" 1 0
    "$@" 0 0
else
    "$@"
fi
