From 3189fc915ed02dd6209ba236f0bfb5f37edd0716 Mon Sep 17 00:00:00 2001 From: T1duS Date: Mon, 29 Oct 2018 16:14:16 +0530 Subject: [PATCH 1/2] Fixed some warnings --- linux/build | 7 ++++++- linux/build_hardsubx | 5 +++++ linux/builddebug | 5 +++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/linux/build b/linux/build index 3c64cd81..4c932a4f 100755 --- a/linux/build +++ b/linux/build @@ -1,5 +1,10 @@ #!/bin/bash BLD_FLAGS="-std=gnu99 -Wno-write-strings -DGPAC_CONFIG_LINUX -D_FILE_OFFSET_BITS=64 -DVERSION_FILE_PRESENT -DENABLE_OCR -DFT2_BUILD_LIBRARY -DGPAC_DISABLE_VTT -DGPAC_DISABLE_OD_DUMP" +bit_os=$(getconf LONG_BIT) +if [ "$bit_os"=="64" ] +then + BLD_FLAGS="$BLD_FLAGS -DGPAC_64_BITS" +fi BLD_INCLUDE="-I../src -I /usr/include/leptonica/ -I /usr/include/tesseract/ -I../src/lib_ccx/ -I../src/gpacmp4/ -I../src/libpng/ -I../src/zlib/ -I../src/zvbi -I../src/lib_hash -I../src/protobuf-c -I../src/utf8proc -I../src/freetype/include" SRC_LIBPNG="$(find ../src/libpng/ -name '*.c')" SRC_ZLIB="$(find ../src/zlib/ -name '*.c')" @@ -91,4 +96,4 @@ if [[ "$out" != "" ]] ; then echo "Compilation successful, compiler message shown in previous lines" else echo "Compilation successful, no compiler messages." - fi +fi diff --git a/linux/build_hardsubx b/linux/build_hardsubx index 9e723f83..e9cc9ad0 100755 --- a/linux/build_hardsubx +++ b/linux/build_hardsubx @@ -1,5 +1,10 @@ #!/bin/bash BLD_FLAGS="-g -std=gnu99 -Wno-write-strings -DGPAC_CONFIG_LINUX -D_FILE_OFFSET_BITS=64 -DVERSION_FILE_PRESENT -DENABLE_OCR -DENABLE_HARDSUBX -DFT2_BUILD_LIBRARY -DGPAC_DISABLE_VTT -DGPAC_DISABLE_OD_DUMP" +bit_os=$(getconf LONG_BIT) +if [ "$bit_os"=="64" ] +then + BLD_FLAGS="$BLD_FLAGS -DGPAC_64_BITS" +fi BLD_INCLUDE="-I../src -I /usr/local/include -I /usr/include/leptonica/ -I /usr/include/tesseract/ -I../src/lib_ccx/ -I../src/gpacmp4/ -I../src/libpng/ -I../src/zlib/ -I../src/zvbi -I../src/lib_hash -I../src/protobuf-c -I../src/freetype/include" SRC_LIBPNG="$(find ../src/libpng/ -name '*.c')" SRC_ZLIB="$(find ../src/zlib/ -name '*.c')" diff --git a/linux/builddebug b/linux/builddebug index 19f6b6e1..fcdc32e1 100755 --- a/linux/builddebug +++ b/linux/builddebug @@ -1,5 +1,10 @@ #!/bin/bash BLD_FLAGS="-g -std=gnu99 -Wno-write-strings -Wno-unused-result -DGPAC_CONFIG_LINUX -D_FILE_OFFSET_BITS=64 -DVERSION_FILE_PRESENT -DENABLE_OCR -DFT2_BUILD_LIBRARY -DGPAC_DISABLE_VTT -DGPAC_DISABLE_OD_DUMP" +bit_os=$(getconf LONG_BIT) +if [ "$bit_os"=="64" ] +then + BLD_FLAGS="$BLD_FLAGS -DGPAC_64_BITS" +fi BLD_INCLUDE="-I../src -I /usr/local/include/leptonica/ -I /usr/local/include/tesseract/ -I /usr/include/leptonica/ -I /usr/include/tesseract/ -I../src/lib_ccx/ -I../src/gpacmp4/ -I../src/libpng/ -I../src/zlib/ -I../src/zvbi -I../src/lib_hash -I../src/protobuf-c -I../src/utf8proc -I../src/freetype/include" SRC_LIBPNG="$(find ../src/libpng/ -name '*.c')" SRC_ZLIB="$(find ../src/zlib/ -name '*.c')" From 03b1f5bfd265081dbe432c9078fa40f691b54882 Mon Sep 17 00:00:00 2001 From: T1duS Date: Wed, 31 Oct 2018 22:23:23 +0530 Subject: [PATCH 2/2] Removed compile warnings caused by autotools --- linux/Makefile.am | 4 ++++ linux/configure.ac | 1 + 2 files changed, 5 insertions(+) diff --git a/linux/Makefile.am b/linux/Makefile.am index 0318abef..f35c3d83 100644 --- a/linux/Makefile.am +++ b/linux/Makefile.am @@ -326,6 +326,10 @@ ccextractor_CFLAGS += -DPAC_CONFIG_DARWIN -Dfopen64=fopen -Dopen64=open -Dlseek6 ccextractor_LDADD += -liconv -lz endif +if SYS_IS_64_BIT +ccextractor_CFLAGS += -DGPAC_64_BITS +endif + if HARDSUBX_IS_ENABLED ccextractor_CFLAGS += -DENABLE_HARDSUBX ccextractor_CPPFLAGS+= ${libavcodec_CFLAGS} diff --git a/linux/configure.ac b/linux/configure.ac index 4bcee875..4e68793f 100644 --- a/linux/configure.ac +++ b/linux/configure.ac @@ -115,6 +115,7 @@ AM_CONDITIONAL(TESSERACT_PRESENT_RPI, [ test -d "/usr/include/tesseract" && test AM_CONDITIONAL(SYS_IS_LINUX, [ test `uname -s` = "Linux"]) AM_CONDITIONAL(SYS_IS_MAC, [ test `uname -s` = "Darwin"]) AM_CONDITIONAL(BUILD_WITH_GUI, [test "x$with_gui" = "xyes"]) +AM_CONDITIONAL(SYS_IS_64_BIT,[test `getconf LONG_BIT` = "64"]) AC_CONFIG_FILES([Makefile]) AC_OUTPUT