3 # SPDX-FileCopyrightText: 2020 Michael Jeanson <mjeanson@efficios.com>
4 # SPDX-License-Identifier: GPL-2.0-or-later
8 COLOR_BLUE
='\033[0;34m'
9 COLOR_NONE
='\033[0m' # No Color
12 echo -e "${COLOR_BLUE}$1${COLOR_NONE}"
18 print_blue
"Operating System Details"
20 if [ -f "/etc/os-release" ]; then
21 (.
"/etc/os-release"; echo "Version: $NAME $VERSION")
22 elif [ -f "/etc/release" ]; then
23 echo "Version: $(head -n1 /etc/release)"
24 elif command -v sw_vers
>/dev
/null
2>&1; then
26 echo "Version: $(sw_vers -productName) $(sw_vers -productVersion)"
35 print_pkgconfig_mod
() {
37 if pkg-config
--exists "${mod}"; then
38 print_blue
"$mod version"
39 pkg-config
--modversion "${mod}"
46 print_blue
"Selected CC version"
47 ${CC:-cc} --version |
head -n1
49 print_blue
"Selected CXX version"
50 ${CXX:-c++} --version |
head -n1
52 print_blue
"Default gcc version"
53 gcc
--version |
head -n1
56 print_blue
"Default g++ version"
57 g
++ --version |
head -n1
60 if command -v clang
>/dev
/null
2>&1; then
61 print_blue
"Default clang version"
65 if command -v clang
++ >/dev
/null
2>&1; then
66 print_blue
"Default clang++ version"
70 print_blue
"git version"
73 print_blue
"bash version"
74 bash
--version |
head -n1
76 print_blue
"make version"
77 ${MAKE:-make} --version |
head -n1
79 if command -v cmake
>/dev
/null
2>&1; then
80 print_blue
"cmake version"
84 print_blue
"automake version"
85 automake
--version |
head -n1
87 print_blue
"autoconf version"
88 autoconf
--version |
head -n1
90 print_blue
"libtool version"
91 if libtool
--version >/dev
/null
2>&1; then
92 libtool
--version |
head -n1
98 print_blue
"bison version"
99 ${BISON:-bison} --version |
head -n1
101 print_blue
"flex version"
102 ${FLEX:-flex} --version
104 print_blue
"swig version"
105 swig
-version |
${GREP:-grep} SWIG
107 print_blue
"tar version"
108 ${TAR:-tar} --version |
head -n1
110 print_blue
"Selected python version"
111 ${PYTHON:-python} --version
113 if command -v "${PYTHON2:-python2}" >/dev
/null
2>&1; then
114 print_blue
"python2 version"
115 ${PYTHON2:-python2} --version
118 if command -v "${PYTHON3:-python3}" >/dev
/null
2>&1; then
119 print_blue
"python3 version"
120 ${PYTHON3:-python3} --version
123 print_blue
"java version"
126 print_blue
"javac version"
129 if command -v asciidoc
>/dev
/null
2>&1; then
130 print_blue
"asciidoc version"
134 if command -v xmlto
>/dev
/null
2>&1; then
135 print_blue
"xmlto version"
139 if command -v openssl
>/dev
/null
2>&1; then
140 print_blue
"openssl version"
144 if command -v pkg-config
>/dev
/null
2>&1; then
145 print_blue
"pkg-config version"
148 #print_blue "pkg-config modules installed"
149 #pkg-config --list-all
151 print_pkgconfig_mod glib-2.0
152 print_pkgconfig_mod libdw
153 print_pkgconfig_mod libelf
154 print_pkgconfig_mod libxml-2.0
155 print_pkgconfig_mod msgpack
156 print_pkgconfig_mod popt
157 print_pkgconfig_mod uuid
158 print_pkgconfig_mod zlib