Skip to content

Commit 973a8ee

Browse files
committed
completion/test: only enable if bash is available
Refs #675 Signed-off-by: Brice Goglin <[email protected]> (cherry picked from commit 705a036)
1 parent bd7baf3 commit 973a8ee

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

config/hwloc.m4

+1-2
Original file line numberDiff line numberDiff line change
@@ -856,8 +856,6 @@ return 0;
856856
AC_DEFINE_UNQUOTED(hwloc_thread_t, $hwloc_thread_t, [Define this to the thread ID type])
857857
fi
858858
859-
AC_PATH_PROG([BASH], [bash])
860-
861859
AC_CHECK_FUNCS([ffs], [
862860
_HWLOC_CHECK_DECL([ffs],[
863861
AC_DEFINE([HWLOC_HAVE_DECL_FFS], [1], [Define to 1 if function `ffs' is declared by system headers])
@@ -1871,6 +1869,7 @@ AC_DEFUN([HWLOC_DO_AM_CONDITIONALS],[
18711869
AM_CONDITIONAL([HWLOC_GL_BUILD_STATIC], [test "x$hwloc_gl_component" = "xstatic"])
18721870
AM_CONDITIONAL([HWLOC_XML_LIBXML_BUILD_STATIC], [test "x$hwloc_xml_libxml_component" = "xstatic"])
18731871
1872+
AM_CONDITIONAL([HWLOC_HAVE_BASH], [test "x$BASH" != "x"])
18741873
AM_CONDITIONAL([HWLOC_HAVE_CXX], [test "x$hwloc_have_cxx" = "xyes"])
18751874
AM_CONDITIONAL([HWLOC_CROSS_COMPILING], [test "x$cross_compiling" = "xyes"])
18761875
])

config/hwloc_internal.m4

+2
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,8 @@ EOF
462462
])
463463
])
464464
465+
AC_PATH_PROG([BASH], [bash])
466+
465467
AC_CHECK_PROGS(XMLLINT, [xmllint])
466468
467469
AC_CHECK_PROGS(BUNZIPP, bunzip2, false)

contrib/completion/Makefile.am

+3
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)