Skip to content

Commit 705a036

Browse files
committed
completion/test: only enable if bash is available
Refs #675 Signed-off-by: Brice Goglin <[email protected]>
1 parent a3b64d5 commit 705a036

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

config/hwloc.m4

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -850,8 +850,6 @@ return 0;
850850
AC_DEFINE_UNQUOTED(hwloc_thread_t, $hwloc_thread_t, [Define this to the thread ID type])
851851
fi
852852
853-
AC_PATH_PROG([BASH], [bash])
854-
855853
AC_CHECK_FUNCS([ffs], [
856854
_HWLOC_CHECK_DECL([ffs],[
857855
AC_DEFINE([HWLOC_HAVE_DECL_FFS], [1], [Define to 1 if function `ffs' is declared by system headers])
@@ -1857,6 +1855,7 @@ AC_DEFUN([HWLOC_DO_AM_CONDITIONALS],[
18571855
AM_CONDITIONAL([HWLOC_GL_BUILD_STATIC], [test "x$hwloc_gl_component" = "xstatic"])
18581856
AM_CONDITIONAL([HWLOC_XML_LIBXML_BUILD_STATIC], [test "x$hwloc_xml_libxml_component" = "xstatic"])
18591857
1858+
AM_CONDITIONAL([HWLOC_HAVE_BASH], [test "x$BASH" != "x"])
18601859
AM_CONDITIONAL([HWLOC_HAVE_CXX], [test "x$hwloc_have_cxx" = "xyes"])
18611860
AM_CONDITIONAL([HWLOC_CROSS_COMPILING], [test "x$cross_compiling" = "xyes"])
18621861
])

config/hwloc_internal.m4

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,8 @@ EOF
458458
])
459459
])
460460
461+
AC_PATH_PROG([BASH], [bash])
462+
461463
AC_CHECK_PROGS(XMLLINT, [xmllint])
462464
463465
AC_CHECK_PROGS(BUNZIPP, bunzip2, false)

contrib/completion/Makefile.am

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
bashcompletionsdir = $(datadir)/bash-completion/completions
88
dist_bashcompletions_DATA = bash/hwloc
99

10+
if HWLOC_HAVE_BASH
11+
# no need to test everywhere, Linux is enough
1012
if HWLOC_HAVE_LINUX
1113
TESTS = test-bash-completion.sh
1214
endif
15+
endif

0 commit comments

Comments
 (0)