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')"