Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Rob Latham
MPICH-BlueGene
Commits
3dbca7ba
Commit
3dbca7ba
authored
Dec 05, 2013
by
Pavan Balaji
Browse files
Upgrade to hwloc-1.8
Signed-off-by:
Ken Raffenetti
<
raffenet@mcs.anl.gov
>
parent
8d2e0662
Changes
130
Expand all
Hide whitespace changes
Inline
Side-by-side
src/pm/hydra/tools/topo/hwloc/hwloc/.gitignore
View file @
3dbca7ba
Makefile.in
Makefile
.deps
.libs
test-suite.log
*~
/config/ar-lib
/config/argz.m4
/config/compile
/config/config.guess
/config/config.sub
/config/depcomp
/config/install-sh
/config/libtool.m4
/config/ltdl.m4
/config/ltmain.sh
/config/ltoptions.m4
/config/ltsugar.m4
/config/ltversion.m4
/config/lt~obsolete.m4
/config/missing
/config/test-driver
/config.log
/config.status
/configure
/build-aux
/autom4te.cache
/aclocal.m4
/tags
/libtool
/hwloc.pc
/include/hwloc/config.h
/include/hwloc/stamp-h2
/include/private/config.h.in
/include/private/config.h
/include/private/stamp-h1
/utils/lstopo
/utils/lstopo.1
/utils/hwloc-bind
/utils/hwloc-bind.1
/utils/hwloc-calc
/utils/hwloc-calc.1
/utils/hwloc-distrib
/utils/hwloc-distrib.1
/utils/test-hwloc-distrib.sh
/libtool
/include/hwloc/autogen/config.h
/include/hwloc/autogen/stamp-h2
/include/private/autogen/config.h
/include/private/autogen/config.h.in
/include/private/autogen/stamp-h1
/doc/doxygen-config.cfg
/doc/doxygen-doc/
/doc/images/diagram.eps
/doc/images/diagram.png
/doc/hwloc-hello
/doc/hwloc-hello-cpp
/doc/hwloc-hello-cpp.cpp
/doc/*.o
/doc/*.log
/doc/*.trs
/doc/doc.out
/doc/readme.out
/src/static-components.h
/src/*.lo
/src/libhwloc.la
/src/libltdl/
/tests/wrapper.sh
/tests/hwloc_list_components
/tests/hwloc_bitmap
/tests/hwloc_bitmap_string
/tests/hwloc_get_closest_objs
/tests/hwloc_get_obj_covering_cpuset
/tests/hwloc_get_shared_cache_covering_obj
/tests/hwloc_type_depth
/tests/hwloc_synthetic
/tests/hwloc_get_largest_objs_inside_cpuset
/tests/hwloc_get_cache_covering_cpuset
/tests/hwloc_get_obj_inside_cpuset
/tests/hwloc_get_closest_objs
/tests/hwloc_cpuset_string
/tests/hwloc_object_userdata
/tests/hwloc_cpuset_first_last_weight
/tests/hwloc_get_largest_objs_inside_cpuset
/tests/hwloc_get_next_obj_covering_cpuset
/tests/hwloc_cpuset_singlify
/tests/hwloc_get_obj_inside_cpuset
/tests/hwloc_get_shared_cache_covering_obj
/tests/hwloc_get_obj_below_array_by_type
/tests/hwloc_bitmap_first_last_weight
/tests/hwloc_bitmap_singlify
/tests/hwloc_type_depth
/tests/hwloc_bind
/tests/hwloc_get_last_cpu_location
/tests/hwloc_object_userdata
/tests/hwloc_synthetic
/tests/hwloc_custom
/tests/hwloc_backends
/tests/hwloc_pci_backend
/tests/hwloc_is_thissystem
/tests/hwloc_distances
/tests/hwloc_groups
/tests/hwloc_groups2
/tests/hwloc_insert_misc
/tests/hwloc_topology_restrict
/tests/hwloc_obj_infos
/tests/hwloc_iodevs
/tests/xmlbuffer
/tests/gl
/tests/intel-mic
/tests/linux-libnuma
/tests/glibc-sched
/tests/lstopo_xml.sh
/tests/linux/test-topology.sh
/tests/openfabrics-verbs
/tests/myriexpress
/tests/opencl
/tests/cuda
/tests/cudart
/tests/nvml
/tests/*.o
/tests/*.log
/tests/*.trs
/tests/linux/hwloc-gather-topology
/doc/doxygen.cfg
/doc/doxygen-doc
/doc/hwloc-hello
/doc/images/diagram.png
/doc/images/diagram.eps
/m4/libtool.m4
/m4/ltoptions.m4
/m4/ltsugar.m4
/m4/ltversion.m4
/m4/lt~obsolete.m4
/tests/linux/test-topology.sh
/tests/linux/*.log
/tests/linux/*.trs
/tests/linux/gather/test-gather-topology.sh
/tests/linux/gather/*.log
/tests/linux/gather/*.trs
/tests/ports/*.c
/tests/ports/*.la
/tests/ports/*.lo
/tests/xml/test-topology.sh
/tests/xml/*.log
/tests/xml/*.trs
/utils/*.o
/utils/hwloc-annotate
/utils/hwloc-annotate.1
/utils/hwloc-assembler
/utils/hwloc-assembler-remote
/utils/hwloc-assembler-remote.1
/utils/hwloc-assembler.1
/utils/hwloc-bind
/utils/hwloc-bind.1
/utils/hwloc-calc
/utils/hwloc-calc.1
/utils/hwloc-compress-dir
/utils/hwloc-compress-dir.1
/utils/hwloc-diff
/utils/hwloc-diff.1
/utils/hwloc-distances
/utils/hwloc-distances.1
/utils/hwloc-distrib
/utils/hwloc-distrib.1
/utils/hwloc-gather-topology.1
/utils/hwloc-info
/utils/hwloc-info.1
/utils/hwloc-patch
/utils/hwloc-patch.1
/utils/hwloc-ps
/utils/hwloc-ps.1
/utils/hwloc.7
/utils/lstopo
/utils/lstopo-no-graphics
/utils/lstopo.1
/utils/test-fake-plugin.sh
/utils/test-hwloc-annotate.sh
/utils/test-hwloc-assembler.sh
/utils/test-hwloc-calc.sh
/utils/test-hwloc-compress-dir.sh
/utils/test-hwloc-diffpatch.sh
/utils/test-hwloc-distances.sh
/utils/test-hwloc-distrib.sh
/utils/test-hwloc-info.sh
/utils/test-hwloc-ls.sh
/utils/test-*.sh.log
/utils/test-*.sh.trs
src/pm/hydra/tools/topo/hwloc/hwloc/Makefile.am
View file @
3dbca7ba
...
...
@@ -9,10 +9,10 @@ ACLOCAL_AMFLAGS = -I ./config
SUBDIRS
=
src include
if
HWLOC_BUILD_STANDALONE
#
SUBDIRS += utils tests
SUBDIRS
+=
utils tests
# We need doc/ if HWLOC_BUILD_DOXYGEN, or during make install if HWLOC_INSTALL_DOXYGEN.
# There's no INSTALL_SUBDIRS, so always enter doc/ and check HWLOC_BUILD/INSTALL_DOXYGEN there
#
SUBDIRS += doc
SUBDIRS
+=
doc
endif
# Do not let automake automatically add the non-standalone dirs to the
...
...
@@ -62,7 +62,7 @@ if !HWLOC_BUILD_README
dist-hook
:
cannot-dist
else
dist-hook
:
csh
"
$(top_srcdir)
/config/distscript.csh"
"
$(top_srcdir)
"
"
$(distdir)
"
"
$(HWLOC_VERSION)
"
"
$(HWLOC_SVN_R)
"
csh
"
$(top_srcdir)
/config/distscript.csh"
"
$(top_srcdir)
"
"
$(distdir)
"
"
$(HWLOC_VERSION)
"
endif
HWLOC_BUILD_README
endif
HWLOC_BUILD_DOXYGEN
endif
HWLOC_BUILD_STANDALONE
...
...
src/pm/hydra/tools/topo/hwloc/hwloc/NEWS
View file @
3dbca7ba
...
...
@@ -17,6 +17,60 @@ bug fixes (and other actions) for each version of hwloc since version
in v0.9.1).
Version 1.8.0
-------------
* New components
+ Add the "linuxpci" component that always works on Linux even when
libpciaccess and libpci aren't available (and even with a modified
file-system root). By default the old "pci" component runs first
because "linuxpci" lacks device names (obj->name is always NULL).
* API
+ Add the topology difference API in hwloc/diff.h for manipulating
many similar topologies.
+ Add hwloc_topology_dup() for duplicating an entire topology.
+ hwloc.h and hwloc/helper.h have been reorganized to clarify the
documentation sections. The actual inline code has moved out of hwloc.h
into the new hwloc/inlines.h.
+ Deprecated functions are now in hwloc/deprecated.h, and not in the
official documentation anymore.
* Tools
+ Add hwloc-diff and hwloc-patch tools together with the new diff API.
+ Add hwloc-compress-dir to (de)compress an entire directory of XML files
using hwloc-diff and hwloc-patch.
+ Object colors in the graphical output of lstopo may be changed by adding
a "lstopoStyle" info attribute. See CUSTOM COLORS in the lstopo(1) manpage
for details. Thanks to Jirka Hladky for discussing the idea.
+ hwloc-gather-topology may now gather I/O-related files on Linux when
--io is given. Only the linuxpci component supports discovering I/O
objects from these extended tarballs.
+ hwloc-annotate now supports --ri to remove/replace info attributes with
a given name.
+ hwloc-info supports "root" and "all" special locations for dumping
information about the root object.
+ lstopo now supports --append-legend to append custom lines of text
to the legend in the graphical output. Thanks to Jirka Hladky for
discussing the idea.
+ hwloc-calc and friends have a more robust parsing of locations given
on the command-line and they report useful error messages about it.
+ Add --whole-system to hwloc-bind, hwloc-calc, hwloc-distances and
hwloc-distrib, and add --restrict to hwloc-bind for uniformity among
tools.
* Misc
+ Calling hwloc_topology_load() or hwloc_topology_set_*() on an already
loaded topology now returns an error (deprecated since release 1.6.1).
+ Fix the initialisation of cpusets and nodesets in Group objects added
when inserting PCI hostbridges.
+ Never merge Group objects that were added explicitly by the user with
hwloc_custom_insert_group_object_by_parent().
+ Add a sanity check during dynamic plugin loading to prevent some
crashes when hwloc is dynamically loaded by another plugin mechanisms.
+ Add --with-hwloc-plugins-path to specify the install/load directories
of plugins.
+ Add the MICSerialNumber info attribute to the root object when running
hwloc inside a Xeon Phi to match the same attribute in the MIC OS device
when running in the host.
Version 1.7.2
-------------
* Do not create invalid block OS devices on very old Linux kernel such
...
...
src/pm/hydra/tools/topo/hwloc/hwloc/README
View file @
3dbca7ba
...
...
@@ -87,8 +87,8 @@ It just happens to be hosted as part of the overall Open MPI project.
Nightly development snapshots are available on the web site. Additionally, the
code can be directly checked out of Subversion:
shell$
svn checkout
http://
svn.open-mpi.org/svn/hwloc/trunk hwloc-trunk
shell$ cd hwloc
-trunk
shell$
git clone
http
s
://
github.com/open-mpi/hwloc.git
shell$ cd hwloc
shell$ ./autogen.sh
Note that GNU Autoconf >=2.63, Automake >=1.10 and Libtool >=2.2.6 are required
...
...
@@ -110,13 +110,16 @@ The hwloc core may also benefit from the following development packages:
* libnuma for memory binding and migration support on Linux (numactl-devel or
libnuma-dev package).
* hwloc can use one of two different libraries for I/O device discovery:
* hwloc can use one of two different libraries for
full
I/O device discovery:
1. libpciaccess (BSD). The relevant development package is usually
libpciaccess-devel or libpciaccess-dev.
2. libpci, from the pciutils package (GPL). The relevant development
package is usually pciutils-devel or libpci-dev.
On Linux, PCI discovery may still be performed even if none of the above
libraries can be used.
* the AMD OpenCL implementation for OpenCL device discovery.
* the NVIDIA CUDA Toolkit for CUDA device discovery.
* the NVIDIA Tesla Development Kit for NVML device discovery.
...
...
@@ -126,6 +129,8 @@ The hwloc core may also benefit from the following development packages:
exported by the same hwloc release). See Importing and exporting topologies
from/to XML files for details. The relevant development package is usually
libxml2-devel or libxml2-dev.
* libtool'
s
ltdl
library
for
dynamic
plugin
loading
.
The
relevant
development
package
is
usually
libtool
-
ltdl
-
devel
or
libltdl
-
dev
.
PCI
and
XML
support
may
be
statically
built
inside
the
main
hwloc
library
,
or
as
separate
dynamically
-
loaded
plugins
(
see
the
Components
and
plugins
...
...
@@ -351,12 +356,12 @@ And the same output in XML (line breaks added, only PU #0 shown):
Programming
Interface
The basic interface is available in hwloc.h.
It essentially offers low-level
routines for advanced programmers that want
to manually manipulate objects
and
follow links between them. Documentation for
everything in hwloc.h are provided
later in
this document. Developers
should als
o look at hwloc/
helper.h (and also
in th
is document, whic
h
p
ro
vides good higher-level topology traversal
examples
)
.
The
basic
interface
is
available
in
hwloc
.
h
.
Some
higher
-
level
functions
are
available
in
hwloc
/
helper
.
h
to
reduce
the
need
to
manually
manipulate
objects
and
follow
links
between
them
.
Documentation
for
all
these
is
provided
later
in
this
document
.
Developers
may
also
want
t
o
look
at
hwloc
/
inlines
.
h
which
conta
in
s
th
e
actual
inline
code
of
some
hwloc
.
h
ro
utines
,
and
at
this
document
,
which
provides
good
higher
-
level
topology
traversal
examples
.
To
precisely
define
the
vocabulary
used
by
hwloc
,
a
Terms
and
Definitions
section
is
available
and
should
probably
be
read
first
.
...
...
@@ -660,7 +665,7 @@ Questions and Bugs
Questions
should
be
sent
to
the
devel
mailing
list
(
http
://
www
.
open
-
mpi
.
org
/
community
/
lists
/
hwloc
.
php
).
Bug
reports
should
be
reported
in
the
tracker
(
https://
svn
.open-mpi.org/trac/hwloc/).
https
://
git
.
open
-
mpi
.
org
/
trac
/
hwloc
/).
If
hwloc
discovers
an
incorrect
topology
for
your
machine
,
the
very
first
thing
you
should
check
is
to
ensure
that
you
have
the
most
recent
updates
installed
...
...
@@ -714,5 +719,5 @@ Make sure to have had a look at those too!
-------------------------------------------------------------------------------
Generated on T
hu Mar 7
2013
08
:08:
07
for Hardware Locality (hwloc) by
doxygen
1.8.
3.1
Generated
on
T
ue
Sep
10
2013
16
:
08
:
12
for
Hardware
Locality
(
hwloc
)
by
doxygen
1.8.
4
src/pm/hydra/tools/topo/hwloc/hwloc/VERSION
View file @
3dbca7ba
...
...
@@ -2,12 +2,18 @@
# of hwloc in this distribution. The various components of the version
# number below are combined to form a single version number string.
# If snapshot=1, then use the value from snapshot_version as the
# entire hwloc version (i.e., ignore major, minor, release, and
# greek). This is only set to 1 when making snapshot tarballs.
snapshot=1
snapshot_version=gitclone
# major, minor, and release are generally combined in the form
# <major>.<minor>.<release>. If release is zero, then it is omitted.
major=1
minor=
7
release=
2
minor=
8
release=
0
# greek is used for alpha or beta release tags. If it is non-empty,
# it will be appended to the version number. It does not have to be
...
...
@@ -18,31 +24,6 @@ release=2
greek=rc2
# If want_repo_rev=1, then the SVN r number will be included in the overall
# hwloc version number in some form.
want_repo_rev=1
# If repo_rev=-1, then the repository version number will be obtained
# dynamically at run time, either:
#
# 1) via the "svnversion" command (if this is a Subversion checkout)
# in the form "r<svn_r>", or
# 2) via the "hg -v -R tip" command (if this is a Mercurial clone)
# in the form of "hg<hash>", using the hash tag at the tip
# 3) via the "git log -1" command (if this is a Git clone) in the form
# of "git<hash>", using the hash tag at the HEAD
# 4) with the date (if none of the above work) in the form of
# "date<date>".
#
# Alternatively, if repo_rev is not -1, the value of repo_rev_r will
# be directly appended to the version string. This happens during
# "make dist", for example: if the distribution tarball is being made
# from an SVN checkout, if repo_rev=-1, then its value is replaced
# with the output of "svnversion".
repo_rev=-1
# The date when this release was created
date="Unreleased developer copy"
...
...
@@ -52,10 +33,10 @@ date="Unreleased developer copy"
# chapter from the GNU Libtool documentation. Notes:
# 1. Since version numbers are associated with *releases*, the version
# number maintained on the hwloc
SVN trunk
(and developer branches)
is
# always 0:0:0.
# number maintained on the hwloc
git master
(and developer branches)
#
is
always 0:0:0.
# 2. Version numbers are described in the Libtool current:revision:age
# format.
libhwloc_so_version=
8:2:3
libhwloc_so_version=
9:0:4
src/pm/hydra/tools/topo/hwloc/hwloc/autogen.sh
View file @
3dbca7ba
#!/bin/sh
if
[
-n
"
$MPICH_AUTOTOOLS_DIR
"
]
;
then
autoreconf
=
${
MPICH_AUTOTOOLS_DIR
}
/autoreconf
else
autoreconf
=
${
AUTORECONF
:-
autoreconf
}
fi
$autoreconf
${
autoreconf_args
:-
"-ivf"
}
:
autoreconf
${
autoreconf_args
:-
"-ivf"
}
src/pm/hydra/tools/topo/hwloc/hwloc/config/distscript.csh
View file @
3dbca7ba
...
...
@@ -11,7 +11,7 @@
# Copyright (c) 2004-2005 The Regents of the University of California.
# All rights reserved.
# Copyright © 2010 inria. All rights reserved.
# Copyright © 2009-201
1
Cisco Systems, Inc. All rights reserved.
# Copyright © 2009-201
3
Cisco Systems, Inc. All rights reserved.
# $COPYRIGHT$
#
# Additional copyrights may follow
...
...
@@ -28,7 +28,6 @@ cd "$builddir"
set distdir="$builddir/$2"
set HWLOC_VERSION="$3"
set HWLOC_REPO_REV="$4"
if ("$distdir" == "") then
echo "Must supply relative distdir as argv[2] -- aborting"
...
...
@@ -48,15 +47,6 @@ else
set vpath_msg=no
endif
# We can catch some hard (but possible) to do mistakes by looking at
# our tree's revision number, but only if we are in the source tree.
# Otherwise, use what configure told us, at the cost of allowing one
# or two corner cases in (but otherwise VPATH builds won't work).
set repo_rev=$HWLOC_REPO_REV
if (-d .svn) then
set repo_rev="r`svnversion .`"
endif
set start=`date`
cat <<EOF
...
...
@@ -78,24 +68,6 @@ if (! -d "$distdir") then
exit 1
endif
#
# See if we need to update the version file with the current repo
# revision number. Do this *before* entering the distribution tree to
# solve a whole host of problems with VPATH (since srcdir may be
# relative or absolute)
#
set cur_repo_rev="`grep '^repo_rev' ${distdir}/VERSION | cut -d= -f2`"
if ("$cur_repo_rev" == "-1") then
sed -e 's/^repo_rev=.*/repo_rev='$repo_rev'/' "${distdir}/VERSION" > "${distdir}/version.new"
cp "${distdir}/version.new" "${distdir}/VERSION"
rm -f "${distdir}/version.new"
# need to reset the timestamp to not annoy AM dependencies
touch -r "${srcdir}/VERSION" "${distdir}/VERSION"
echo "*** Updated VERSION file with repo rev number: $repo_rev"
else
echo "*** Did NOT update VERSION file with repo rev number"
endif
#
# VPATH builds only work if the srcdir has valid docs already built.
# If we're VPATH and the srcdir doesn't have valid docs, then fail.
...
...
@@ -169,63 +141,6 @@ echo "*** Now in distdir: $distdir"
echo "*** Removing latex source from dist tree"
rm -rf doc/doxygen-doc/latex
#
# Get the latest config.guess and config.sub from ftp.gnu.org
#
echo "*** Downloading latest config.sub/config.guess from ftp.gnu.org..."
cd config
set configdir="`pwd`"
mkdir tmp.$$
cd tmp.$$
# Official HTTP git mirrors for config.guess / config.sub
wget -t 1 -T 10 -O config.guess 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=master'
wget -t 1 -T 10 -O config.sub 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=master'
chmod +x config.guess config.sub
# Recently, ftp.gnu.org has had zero-legnth config.guess / config.sub
# files, which causes the automated nightly SVN snapshot tarball to
# fail to be made correctly. This is a primitive attempt to fix that.
# If we got zero-length files from wget, use a config.guess /
# config.sub from a known location that is more recent than what ships
# in the current generation of auto* tools. Also check to ensure that
# the resulting scripts are runnable (Jan 2009: there are un-runnable
# scripts available right now because of some git vulnerability).
# Before you complain about this too loudly, remember that we're using
# unreleased software...
set happy=0
if (! -f config.guess || ! -s config.guess) then
echo " - WARNING: Got bad config.guess from ftp.gnu.org (non-existent or empty)"
else
./config.guess >& /dev/null
if ($status != 0) then
echo " - WARNING: Got bad config.guess from ftp.gnu.org (not executable)"
else
if (! -f config.sub || ! -s config.sub) then
echo " - WARNING: Got bad config.sub from ftp.gnu.org (non-existent or empty)"
else
./config.sub `./config.guess` >& /dev/null
if ($status != 0) then
echo " - WARNING: Got bad config.sub from ftp.gnu.org (not executable)"
else
echo " - Got good config.guess and config.sub from ftp.gnu.org"
chmod +w ../config.sub ../config.guess
cp config.sub config.guess ..
set happy=1
endif
endif
endif
endif
if ("$happy" == "0") then
echo " - WARNING: using included versions for both config.sub and config.guess"
endif
cd ..
rm -rf tmp.$$
cd ..
#
# All done
#
...
...
src/pm/hydra/tools/topo/hwloc/hwloc/config/hwloc.m4
View file @
3dbca7ba
...
...
@@ -184,6 +184,11 @@ EOF])
hwloc_linux=yes
AC_MSG_RESULT([Linux])
hwloc_components="$hwloc_components linux"
if test x$enable_pci != xno; then
hwloc_components="$hwloc_components linuxpci"
AC_DEFINE(HWLOC_HAVE_LINUXPCI, 1, [Define to 1 if building the Linux PCI component])
hwloc_linuxpci_happy=yes
fi
;;
*-*-irix*)
AC_DEFINE(HWLOC_IRIX_SYS, 1, [Define to 1 on Irix])
...
...
@@ -439,6 +444,7 @@ EOF])
#include <sys/param.h>
#endif
])
AC_CHECK_DECLS([strtoull], [], [], [AC_INCLUDES_DEFAULT])
# Do a full link test instead of just using AC_CHECK_FUNCS, which
...
...
@@ -449,15 +455,17 @@ EOF])
# "sysctlbyname" might still be available in libc (which autoconf
# checks for), they might not be actually usable.
AC_TRY_LINK([
#include <stdio.h>
#include <sys/sysctl.h>
],
#include <stdio.h>
#include <sys/types.h>
#include <sys/sysctl.h>
],
[return sysctl(NULL,0,NULL,NULL,NULL,0);],
AC_DEFINE([HAVE_SYSCTL],[1],[Define to '1' if sysctl is present and usable]))
AC_TRY_LINK([
#include <stdio.h>
#include <sys/sysctl.h>
],
#include <stdio.h>
#include <sys/types.h>
#include <sys/sysctl.h>
],
[return sysctlbyname(NULL,NULL,NULL,NULL,0);],
AC_DEFINE([HAVE_SYSCTLBYNAME],[1],[Define to '1' if sysctlbyname is present and usable]))
...
...
@@ -906,15 +914,39 @@ EOF])
fi
# don't add LIBS/CFLAGS/REQUIRES yet, depends on plugins
# X11 support
AC_PATH_XTRA
CPPFLAGS_save=$CPPFLAGS
LIBS_save=$LIBS
CPPFLAGS="$CPPFLAGS $X_CFLAGS"
LIBS="$LIBS $X_PRE_LIBS $X_LIBS $X_EXTRA_LIBS"
AC_CHECK_HEADERS([X11/Xlib.h],
[AC_CHECK_LIB([X11], [XOpenDisplay],
[
# the GL backend just needs XOpenDisplay
hwloc_enable_X11=yes
# lstopo needs more
AC_CHECK_HEADERS([X11/Xutil.h],
[AC_CHECK_HEADERS([X11/keysym.h],
[AC_DEFINE([HWLOC_HAVE_X11_KEYSYM], [1], [Define to 1 if X11 headers including Xutil.h and keysym.h are available.])])
AC_SUBST([HWLOC_X11_LIBS], ["-lX11"])
])
])
])
CPPFLAGS=$CPPFLAGS_save
LIBS=$LIBS_save