Skip to content

Commit cb5219f

Browse files
rbgargatohojo
authored andcommitted
configure: improve portability
BSD grep has no -P parameter, replace it by a sed pattern that works both on GNU and BSDs. Signed-off-by: Renato Botelho do Couto <[email protected]>
1 parent 5ddccf5 commit cb5219f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ check_toolchain()
8282

8383
ARCH_NAME=$($CC -print-multiarch 2>/dev/null)
8484

85-
clang_version=$($CLANG --version | grep -Po '(?<=clang version )[[:digit:]]+')
85+
clang_version=$($CLANG --version | sed -nE 's/.*clang version ([[:digit:]]+).*/\1/p')
8686
if [ "$?" -ne "0" ]; then
8787
echo "*** ERROR: Couldn't execute '$CLANG --version'"
8888
exit 1

0 commit comments

Comments
 (0)