mirror of
git://sourceware.org/git/lvm2.git
synced 2025-12-09 12:23:50 +03:00
configure: Use portable string comparison
= and == are equivalent in Bash for strings, but = is the only portable operator for compatibility with other shells. Before this change, running ./configure with Dash as /bin/sh resulted in: ./configure: 14558: test: yes: unexpected operator and the test did not work (i.e. --enable-cmdlib --disable-shared allowed a failed build to continue). Now, the test works in Bash and Dash.
This commit is contained in:
committed by
Marian Csontos
parent
e3871db279
commit
6ccc8f801e
2
configure
vendored
2
configure
vendored
@@ -14564,7 +14564,7 @@ printf %s "checking whether to compile liblvm2cmd.so... " >&6; }
|
|||||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CMDLIB" >&5
|
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CMDLIB" >&5
|
||||||
printf "%s\n" "$CMDLIB" >&6; }
|
printf "%s\n" "$CMDLIB" >&6; }
|
||||||
|
|
||||||
if test "$CMDLIB" == "yes" && test "$SHARED_LINK" = "no"
|
if test "$CMDLIB" = "yes" && test "$SHARED_LINK" = "no"
|
||||||
then :
|
then :
|
||||||
as_fn_error $? "--enable-cmdlib requires dynamic linking." "$LINENO" 5
|
as_fn_error $? "--enable-cmdlib requires dynamic linking." "$LINENO" 5
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -1395,7 +1395,7 @@ AS_IF([test "$CMDLIB" != "yes"], [CMDLIB="no" LVM2CMD_LIB=], [LVM2CMD_LIB="-llvm
|
|||||||
AC_MSG_CHECKING([whether to compile liblvm2cmd.so])
|
AC_MSG_CHECKING([whether to compile liblvm2cmd.so])
|
||||||
AC_MSG_RESULT([$CMDLIB])
|
AC_MSG_RESULT([$CMDLIB])
|
||||||
|
|
||||||
AS_IF([test "$CMDLIB" == "yes" && test "$SHARED_LINK" = "no"],
|
AS_IF([test "$CMDLIB" = "yes" && test "$SHARED_LINK" = "no"],
|
||||||
[AC_MSG_ERROR([--enable-cmdlib requires dynamic linking.])])
|
[AC_MSG_ERROR([--enable-cmdlib requires dynamic linking.])])
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user