diff --git a/r/configure b/r/configure index f6c1013b4747e..2da2b9f0178d9 100755 --- a/r/configure +++ b/r/configure @@ -77,7 +77,7 @@ elif [ "$INCLUDE_DIR" ] && [ "$LIB_DIR" ]; then else # Use pkg-config if available and allowed pkg-config --version >/dev/null 2>&1 - if [ "$ARROW_USE_PKG_CONFIG" != "false" ] && [ $? -eq 0 ]; then + if [ $? -eq 0 ] && [ "$ARROW_USE_PKG_CONFIG" != "false" ]; then PKGCONFIG_CFLAGS=`pkg-config --cflags --silence-errors ${PKG_CONFIG_NAME}` PKGCONFIG_LIBS=`pkg-config --libs-only-l --silence-errors ${PKG_CONFIG_NAME}` PKGCONFIG_DIRS=`pkg-config --libs-only-L --silence-errors ${PKG_CONFIG_NAME}`