From 79aaf8659390850d570a96a764d8b7f29557ce6a Mon Sep 17 00:00:00 2001 From: Prateek Sunal Date: Mon, 23 Oct 2023 19:54:48 +0530 Subject: [PATCH] [FIX] #1549 Configure Script (#1574) * fix: #1549 backticks * fix: use single equal to --- linux/configure.ac | 18 +++++++++--------- mac/configure.ac | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/linux/configure.ac b/linux/configure.ac index d6080cd13..2bc47a34e 100644 --- a/linux/configure.ac +++ b/linux/configure.ac @@ -15,7 +15,7 @@ AC_PROG_MAKE_SET #Checks for "pkg-config" utility AC_MSG_CHECKING([pkg-config m4 macros]) -if test m4_ifdef([PKG_CHECK_MODULES], [yes], [no]) == yes; then +if test m4_ifdef([PKG_CHECK_MODULES], [yes], [no]) = yes; then AC_MSG_RESULT([yes]); else AC_MSG_RESULT([no]); @@ -140,21 +140,21 @@ AS_IF([ test x$hardsubx = xtrue && test $HAS_AVUTIL -gt 0 ], [AC_MSG_NOTICE(avut AS_IF([ test x$hardsubx = xtrue && test ! $HAS_AVUTIL -gt 0 ], [AC_MSG_ERROR(avutil library not found. Please install the avutil library before proceeding)]) AS_IF([ test x$hardsubx = xtrue && test $HAS_SWSCALE -gt 0 ], [AC_MSG_NOTICE(swscale library found)]) AS_IF([ test x$hardsubx = xtrue && test ! $HAS_SWSCALE -gt 0 ], [AC_MSG_ERROR(swscale library not found. Please install the swscale library before proceeding)]) -AS_IF([ (test x$ocr = xtrue || test x$hardsubx = xtrue) && test $HAS_TESSERACT -gt 0 ], [TESS_VERSION=`tesseract --version 2>&1 | grep tesseract` && AC_MSG_NOTICE(tesseract library found... $TESS_VERSION)]) +AS_IF([ (test x$ocr = xtrue || test x$hardsubx = xtrue) && test $HAS_TESSERACT -gt 0 ], [TESS_VERSION=$(tesseract --version 2>&1 | grep tesseract) && AC_MSG_NOTICE(tesseract library found... $TESS_VERSION)]) AS_IF([ (test x$ocr = xtrue || test x$hardsubx = xtrue) && test ! $HAS_TESSERACT -gt 0 ], [AC_MSG_ERROR(tesserect library not found. Please install the tesseract library before proceeding)]) -AS_IF([ (test x$ocr = xtrue || test x$hardsubx = xtrue) && test $HAS_LEPT -gt 0 ], [LEPT_VERSION=`tesseract --version 2>&1 | grep leptonica` && AC_MSG_NOTICE(leptonica library found... $LEPT_VERSION)]) +AS_IF([ (test x$ocr = xtrue || test x$hardsubx = xtrue) && test $HAS_LEPT -gt 0 ], [LEPT_VERSION=$(tesseract --version 2>&1 | grep leptonica) && AC_MSG_NOTICE(leptonica library found... $LEPT_VERSION)]) AS_IF([ (test x$ocr = xtrue || test x$hardsubx = xtrue) && test ! $HAS_LEPT -gt 0 ], [AC_MSG_ERROR(leptonica library not found. Please install the leptonica library before proceeding)]) #AM_CONDITIONAL(s) for setting values to enable/disable flags in Makefile.am AM_CONDITIONAL(HARDSUBX_IS_ENABLED, [ test x$hardsubx = xtrue ]) AM_CONDITIONAL(OCR_IS_ENABLED, [ test x$ocr = xtrue || test x$hardsubx = xtrue ]) AM_CONDITIONAL(FFMPEG_IS_ENABLED, [ test x$ffmpeg = xtrue ]) -AM_CONDITIONAL(TESSERACT_PRESENT, [ test ! -z `pkg-config --libs-only-l --silence-errors tesseract` ]) -AM_CONDITIONAL(TESSERACT_PRESENT_RPI, [ test -d "/usr/include/tesseract" && test `ls -A /usr/include/tesseract | wc -l` -gt 0 ]) -AM_CONDITIONAL(SYS_IS_LINUX, [ test `uname -s` = "Linux"]) -AM_CONDITIONAL(SYS_IS_MAC, [ test `uname -s` = "Darwin"]) -AM_CONDITIONAL(SYS_IS_APPLE_SILICON, [ test `uname -a | awk '{print $NF}'` = "arm64" ]) -AM_CONDITIONAL(SYS_IS_64_BIT,[test `getconf LONG_BIT` = "64"]) +AM_CONDITIONAL(TESSERACT_PRESENT, [ test ! -z $(pkg-config --libs-only-l --silence-errors tesseract) ]) +AM_CONDITIONAL(TESSERACT_PRESENT_RPI, [ test -d "/usr/include/tesseract" && test $(ls -A /usr/include/tesseract | wc -l) -gt 0 ]) +AM_CONDITIONAL(SYS_IS_LINUX, [ test $(uname -s) = "Linux"]) +AM_CONDITIONAL(SYS_IS_MAC, [ test $(uname -s) = "Darwin"]) +AM_CONDITIONAL(SYS_IS_APPLE_SILICON, [ test $(uname -a | awk '{print $NF}') = "arm64" ]) +AM_CONDITIONAL(SYS_IS_64_BIT,[test $(getconf LONG_BIT) = "64"]) AC_CONFIG_FILES([Makefile]) AC_OUTPUT diff --git a/mac/configure.ac b/mac/configure.ac index 53b841d90..2ddf6dd6d 100644 --- a/mac/configure.ac +++ b/mac/configure.ac @@ -15,7 +15,7 @@ AC_PROG_MAKE_SET #Checks for "pkg-config" utility AC_MSG_CHECKING([pkg-config m4 macros]) -if test m4_ifdef([PKG_CHECK_MODULES], [yes], [no]) == yes; then +if test m4_ifdef([PKG_CHECK_MODULES], [yes], [no]) = yes; then AC_MSG_RESULT([yes]); else AC_MSG_RESULT([no]); @@ -139,21 +139,21 @@ AS_IF([ test x$hardsubx = xtrue && test $HAS_AVUTIL -gt 0 ], [AC_MSG_NOTICE(avut AS_IF([ test x$hardsubx = xtrue && test ! $HAS_AVUTIL -gt 0 ], [AC_MSG_ERROR(avutil library not found. Please install the avutil library before proceeding)]) AS_IF([ test x$hardsubx = xtrue && test $HAS_SWSCALE -gt 0 ], [AC_MSG_NOTICE(swscale library found)]) AS_IF([ test x$hardsubx = xtrue && test ! $HAS_SWSCALE -gt 0 ], [AC_MSG_ERROR(swscale library not found. Please install the swscale library before proceeding)]) -AS_IF([ (test x$ocr = xtrue || test x$hardsubx = xtrue) && test $HAS_TESSERACT -gt 0 ], [TESS_VERSION=`tesseract --version 2>&1 | grep tesseract` && AC_MSG_NOTICE(tesseract library found... $TESS_VERSION)]) +AS_IF([ (test x$ocr = xtrue || test x$hardsubx = xtrue) && test $HAS_TESSERACT -gt 0 ], [TESS_VERSION=$(tesseract --version 2>&1 | grep tesseract) && AC_MSG_NOTICE(tesseract library found... $TESS_VERSION)]) AS_IF([ (test x$ocr = xtrue || test x$hardsubx = xtrue) && test ! $HAS_TESSERACT -gt 0 ], [AC_MSG_ERROR(tesserect library not found. Please install the tesseract library before proceeding)]) -AS_IF([ (test x$ocr = xtrue || test x$hardsubx = xtrue) && test $HAS_LEPT -gt 0 ], [LEPT_VERSION=`tesseract --version 2>&1 | grep leptonica` && AC_MSG_NOTICE(leptonica library found... $LEPT_VERSION)]) +AS_IF([ (test x$ocr = xtrue || test x$hardsubx = xtrue) && test $HAS_LEPT -gt 0 ], [LEPT_VERSION=$(tesseract --version 2>&1 | grep leptonica) && AC_MSG_NOTICE(leptonica library found... $LEPT_VERSION)]) AS_IF([ (test x$ocr = xtrue || test x$hardsubx = xtrue) && test ! $HAS_LEPT -gt 0 ], [AC_MSG_ERROR(leptonica library not found. Please install the leptonica library before proceeding)]) #AM_CONDITIONAL(s) for setting values to enable/disable flags in Makefile.am AM_CONDITIONAL(HARDSUBX_IS_ENABLED, [ test x$hardsubx = xtrue ]) AM_CONDITIONAL(OCR_IS_ENABLED, [ test x$ocr = xtrue || test x$hardsubx = xtrue ]) AM_CONDITIONAL(FFMPEG_IS_ENABLED, [ test x$ffmpeg = xtrue ]) -AM_CONDITIONAL(TESSERACT_PRESENT, [ test ! -z `pkg-config --libs-only-l --silence-errors tesseract` ]) -AM_CONDITIONAL(TESSERACT_PRESENT_RPI, [ test -d "/usr/include/tesseract" && test `ls -A /usr/include/tesseract | wc -l` -gt 0 ]) -AM_CONDITIONAL(SYS_IS_LINUX, [ test `uname -s` = "Linux"]) -AM_CONDITIONAL(SYS_IS_MAC, [ test `uname -s` = "Darwin"]) -AM_CONDITIONAL(SYS_IS_APPLE_SILICON, [ test `uname -a | awk '{print $NF}'` = "arm64" ]) -AM_CONDITIONAL(SYS_IS_64_BIT,[test `getconf LONG_BIT` = "64"]) +AM_CONDITIONAL(TESSERACT_PRESENT, [ test ! -z $(pkg-config --libs-only-l --silence-errors tesseract) ]) +AM_CONDITIONAL(TESSERACT_PRESENT_RPI, [ test -d "/usr/include/tesseract" && test $(ls -A /usr/include/tesseract | wc -l) -gt 0 ]) +AM_CONDITIONAL(SYS_IS_LINUX, [ test $(uname -s) = "Linux"]) +AM_CONDITIONAL(SYS_IS_MAC, [ test $(uname -s) = "Darwin"]) +AM_CONDITIONAL(SYS_IS_APPLE_SILICON, [ test $(uname -a | awk '{print $NF}') = "arm64" ]) +AM_CONDITIONAL(SYS_IS_64_BIT,[test $(getconf LONG_BIT) = "64"]) AC_CONFIG_FILES([Makefile]) AC_OUTPUT