-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
155 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#! /bin/sh | ||
# Guess values for system-dependent variables and create Makefiles. | ||
# Generated by GNU Autoconf 2.71 for vocr 0.2.3. | ||
# Generated by GNU Autoconf 2.71 for vocr 0.3.1. | ||
# | ||
# Report bugs to <[email protected]>. | ||
# | ||
|
@@ -610,8 +610,8 @@ MAKEFLAGS= | |
# Identity of this package. | ||
PACKAGE_NAME='vocr' | ||
PACKAGE_TARNAME='vocr' | ||
PACKAGE_VERSION='0.2.3' | ||
PACKAGE_STRING='vocr 0.2.3' | ||
PACKAGE_VERSION='0.3.1' | ||
PACKAGE_STRING='vocr 0.3.1' | ||
PACKAGE_BUGREPORT='[email protected]' | ||
PACKAGE_URL='' | ||
|
||
|
@@ -1228,7 +1228,7 @@ if test "$ac_init_help" = "long"; then | |
# Omit some internal or obsolete options to make the list less imposing. | ||
# This message is too long to be a string in the A/UX 3.1 sh. | ||
cat <<_ACEOF | ||
\`configure' configures vocr 0.2.3 to adapt to many kinds of systems. | ||
\`configure' configures vocr 0.3.1 to adapt to many kinds of systems. | ||
Usage: $0 [OPTION]... [VAR=VALUE]... | ||
|
@@ -1290,7 +1290,7 @@ fi | |
|
||
if test -n "$ac_init_help"; then | ||
case $ac_init_help in | ||
short | recursive ) echo "Configuration of vocr 0.2.3:";; | ||
short | recursive ) echo "Configuration of vocr 0.3.1:";; | ||
esac | ||
cat <<\_ACEOF | ||
|
@@ -1370,7 +1370,7 @@ fi | |
test -n "$ac_init_help" && exit $ac_status | ||
if $ac_init_version; then | ||
cat <<\_ACEOF | ||
vocr configure 0.2.3 | ||
vocr configure 0.3.1 | ||
generated by GNU Autoconf 2.71 | ||
Copyright (C) 2021 Free Software Foundation, Inc. | ||
|
@@ -1493,7 +1493,7 @@ cat >config.log <<_ACEOF | |
This file contains any messages produced by compilers while | ||
running configure, to aid debugging if configure makes a mistake. | ||
It was created by vocr $as_me 0.2.3, which was | ||
It was created by vocr $as_me 0.3.1, which was | ||
generated by GNU Autoconf 2.71. Invocation command line was | ||
$ $0$ac_configure_args_raw | ||
|
@@ -2740,6 +2740,43 @@ else | |
printf "%s\n" "yes" >&6; } | ||
fi | ||
# check for UTType | ||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for UTType" >&5 | ||
printf %s "checking for UTType... " >&6; } | ||
SAVE_LIBS="$LIBS" | ||
LIBS="$LIBS -framework UniformTypeIdentifiers" | ||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext | ||
/* end confdefs.h. */ | ||
#import <UniformTypeIdentifiers/UniformTypeIdentifiers.h> | ||
int | ||
main (void) | ||
{ | ||
[UTType typeWithIdentifier: @"public.image"]; | ||
; | ||
return 0; | ||
} | ||
_ACEOF | ||
if ac_fn_objc_try_link "$LINENO" | ||
then : | ||
has_framework=1 | ||
else $as_nop | ||
has_framework=0 | ||
fi | ||
rm -f core conftest.err conftest.$ac_objext conftest.beam \ | ||
conftest$ac_exeext conftest.$ac_ext | ||
if test $has_framework = 0; then | ||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 | ||
printf "%s\n" "no" >&6; } | ||
LIBS="$SAVE_LIBS" | ||
else | ||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | ||
printf "%s\n" "yes" >&6; } | ||
CFLAGS="$CFLAGS -DHAVE_UTT" | ||
fi | ||
# check for Vision | ||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Vison" >&5 | ||
|
@@ -6766,7 +6803,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
# report actual input values of CONFIG_FILES etc. instead of their | ||
# values after options handling. | ||
ac_log=" | ||
This file was extended by vocr $as_me 0.2.3, which was | ||
This file was extended by vocr $as_me 0.3.1, which was | ||
generated by GNU Autoconf 2.71. Invocation command line was | ||
CONFIG_FILES = $CONFIG_FILES | ||
|
@@ -6821,7 +6858,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ | |
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | ||
ac_cs_config='$ac_cs_config_escaped' | ||
ac_cs_version="\\ | ||
vocr config.status 0.2.3 | ||
vocr config.status 0.3.1 | ||
configured by $0, generated by GNU Autoconf 2.71, | ||
with options \\"\$ac_cs_config\\" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
dnl -*- Autoconf -*- | ||
dnl Process this file with autoconf to produce a configure script. | ||
|
||
AC_INIT([vocr],[0.2.3],[[email protected]]) | ||
AC_INIT([vocr],[0.3.1],[[email protected]]) | ||
|
||
# We want to turn on warnings if we are using gcc and the user did | ||
# We want to turn on warnings if we are using gcc and the user did | ||
# not specify CFLAGS. The autoconf check for the C compiler sets the | ||
# CFLAGS if gcc is used, so we will save it before we run that check. | ||
# | ||
|
@@ -60,6 +60,22 @@ else | |
AC_MSG_RESULT([yes]) | ||
fi | ||
|
||
# check for UTType | ||
|
||
AC_MSG_CHECKING([for UTType]) | ||
SAVE_LIBS="$LIBS" | ||
LIBS="$LIBS -framework UniformTypeIdentifiers" | ||
AC_LINK_IFELSE([AC_LANG_PROGRAM([#import <UniformTypeIdentifiers/UniformTypeIdentifiers.h>], [ | ||
[[UTType typeWithIdentifier: @"public.image"];]]) | ||
],[has_framework=1],[has_framework=0]) | ||
if test $has_framework = 0; then | ||
AC_MSG_RESULT([no]) | ||
LIBS="$SAVE_LIBS" | ||
else | ||
AC_MSG_RESULT([yes]) | ||
CFLAGS="$CFLAGS -DHAVE_UTT" | ||
fi | ||
|
||
# check for Vision | ||
|
||
AC_MSG_CHECKING([for Vison]) | ||
|
@@ -76,37 +92,37 @@ fi | |
dnl TEST_AND_SET_CFLAG(flag, [program]) | ||
dnl | ||
dnl This attempts to compile a program with a certain compiler flag. | ||
dnl If no program is given, then the minimal program is compiled, and | ||
dnl this tests just the validity of the compiler flag. | ||
dnl If no program is given, then the minimal program is compiled, and | ||
dnl this tests just the validity of the compiler flag. | ||
dnl | ||
dnl based on: https://github.com/edrosten/autoconf_tutorial | ||
|
||
define([TEST_AND_SET_CFLAG],[ | ||
AC_MSG_CHECKING([if compiler flag $1 works]) | ||
AC_MSG_CHECKING([if compiler flag $1 works]) | ||
dnl Store the current CXXFLAGS | ||
save_CFLAGS="$OBJCFLAGS" | ||
dnl Append the flag of interest | ||
OBJCFLAGS="$OBJCFLAGS $1" | ||
dnl Create an M4 macro, "prog", which expands to a C program. | ||
dnl This should either be a default one or the one specified. | ||
dnl Note that macros are not local, but there is a stack so push | ||
dnl the definition on to the stack to prevent clobbering a definition | ||
dnl that might already exist. | ||
m4_if([$2],[],[pushdef(prog, [int main(){}])], [pushdef(prog, [$2])]) | ||
flag_test=0 | ||
dnl See if the compiler runs | ||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([prog])], [flag_test=1],[flag_test=0]) | ||
dnl De-clobber the "prog" macro | ||
popdef([prog]) | ||
if test $flag_test = 1 | ||
|
@@ -127,9 +143,9 @@ define([TEST_AND_SET_CFLAG],[ | |
TEST_AND_SET_CFLAG(-W) | ||
TEST_AND_SET_CFLAG(-Wall) | ||
TEST_AND_SET_CFLAG(-Wextra) | ||
TEST_AND_SET_CFLAG(-Wpedantic) | ||
TEST_AND_SET_CFLAG(-Werror) | ||
#TEST_AND_SET_CFLAG(-Wformat=2) | ||
TEST_AND_SET_CFLAG(-Wpedantic) | ||
TEST_AND_SET_CFLAG(-Werror) | ||
#TEST_AND_SET_CFLAG(-Wformat=2) | ||
#TEST_AND_SET_CFLAG(-Wformat-nonliteral) | ||
TEST_AND_SET_CFLAG(-Wformat-overflow=2) | ||
TEST_AND_SET_CFLAG(-Wformat-truncation=2) | ||
|
@@ -139,7 +155,7 @@ TEST_AND_SET_CFLAG(-Wformat-signedness) | |
TEST_AND_SET_CFLAG(-Wtrampolines) | ||
TEST_AND_SET_CFLAG(-Walloca) | ||
TEST_AND_SET_CFLAG(-Wcast-qual) | ||
TEST_AND_SET_CFLAG(-Wconversion) | ||
TEST_AND_SET_CFLAG(-Wconversion) | ||
TEST_AND_SET_CFLAG(-Wtraditional-conversion) | ||
TEST_AND_SET_CFLAG(-Warith-conversion) | ||
TEST_AND_SET_CFLAG(-Wstack-protector) | ||
|
@@ -183,7 +199,7 @@ TEST_AND_SET_CFLAG(-Wduplicated-cond) | |
TEST_AND_SET_CFLAG(-Wduplicated-branches) | ||
TEST_AND_SET_CFLAG(-Wundef) | ||
TEST_AND_SET_CFLAG(-fstack-usage) | ||
TEST_AND_SET_CFLAG(-fstack-protector-all) | ||
TEST_AND_SET_CFLAG(-fstack-protector-all) | ||
TEST_AND_SET_CFLAG(-fstack-protector-strong) | ||
TEST_AND_SET_CFLAG(-fstack-protector-explicit) | ||
TEST_AND_SET_CFLAG(-mshstk) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
History: | ||
v. 0.1.0 (04/25/2022) - Initial version | ||
v. 0.2.0 (10/29/2022) - Updates for MacOSX 12 (Monterey) | ||
Copyright (c) 2022 Sriranga R. Veeraraghavan <[email protected]> | ||
|
@@ -54,12 +55,21 @@ static void listSupportedLangs(void) | |
|
||
/* fast, v1 */ | ||
|
||
#if (MAC_OS_X_VERSION_MIN_REQUIRED < 120000) | ||
langs = [VNRecognizeTextRequest | ||
supportedRecognitionLanguagesForTextRecognitionLevel: | ||
VNRequestTextRecognitionLevelFast | ||
revision: | ||
VNRecognizeTextRequestRevision1 | ||
error: nil]; | ||
#else | ||
VNRecognizeTextRequest *vnr = [[VNRecognizeTextRequest alloc] init]; | ||
[vnr setRecognitionLevel: VNRequestTextRecognitionLevelFast]; | ||
[vnr setRevision: VNRecognizeTextRequestRevision1]; | ||
langs = [vnr | ||
supportedRecognitionLanguagesAndReturnError: nil]; | ||
#endif | ||
|
||
if (langs != nil) | ||
{ | ||
fprintf(stderr,"Fast, v1: "); | ||
|
@@ -85,12 +95,19 @@ static void listSupportedLangs(void) | |
|
||
if (@available(macos 11, *)) | ||
{ | ||
#if (MAC_OS_X_VERSION_MIN_REQUIRED < 120000) | ||
langs = [VNRecognizeTextRequest | ||
supportedRecognitionLanguagesForTextRecognitionLevel: | ||
VNRequestTextRecognitionLevelFast | ||
revision: | ||
VNRecognizeTextRequestRevision2 | ||
error: nil]; | ||
#else | ||
[vnr setRecognitionLevel: VNRequestTextRecognitionLevelFast]; | ||
[vnr setRevision: VNRecognizeTextRequestRevision2]; | ||
langs = [vnr | ||
supportedRecognitionLanguagesAndReturnError: nil]; | ||
#endif | ||
if (langs != nil) | ||
{ | ||
fprintf(stderr,"Fast, v2: "); | ||
|
@@ -115,12 +132,20 @@ static void listSupportedLangs(void) | |
|
||
/* accurate, v1 */ | ||
|
||
#if (MAC_OS_X_VERSION_MIN_REQUIRED < 120000) | ||
langs = [VNRecognizeTextRequest | ||
supportedRecognitionLanguagesForTextRecognitionLevel: | ||
VNRequestTextRecognitionLevelAccurate | ||
revision: | ||
VNRecognizeTextRequestRevision1 | ||
error: nil]; | ||
#else | ||
[vnr setRecognitionLevel: VNRequestTextRecognitionLevelAccurate]; | ||
[vnr setRevision: VNRecognizeTextRequestRevision1]; | ||
langs = [vnr | ||
supportedRecognitionLanguagesAndReturnError: nil]; | ||
#endif | ||
|
||
if (langs != nil) | ||
{ | ||
fprintf(stderr,"Accurate, v1: "); | ||
|
@@ -146,12 +171,18 @@ static void listSupportedLangs(void) | |
|
||
if (@available(macos 11, *)) | ||
{ | ||
#if (MAC_OS_X_VERSION_MIN_REQUIRED < 120000) | ||
langs = [VNRecognizeTextRequest | ||
supportedRecognitionLanguagesForTextRecognitionLevel: | ||
VNRequestTextRecognitionLevelAccurate | ||
revision: | ||
VNRecognizeTextRequestRevision2 | ||
error: nil]; | ||
#else | ||
[vnr setRevision: VNRecognizeTextRequestRevision2]; | ||
langs = [vnr | ||
supportedRecognitionLanguagesAndReturnError: nil]; | ||
#endif | ||
if (langs != nil) | ||
{ | ||
fprintf(stderr,"Accurate, v2: "); | ||
|
@@ -173,6 +204,7 @@ static void listSupportedLangs(void) | |
fprintf(stderr, "\n"); | ||
} | ||
} | ||
|
||
} | ||
|
||
/* main */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,8 +42,7 @@ supported language options are: "de" (German), "en" (English), "fr" | |
Enables verbose mode \- vocr will print out informational and error | ||
messages. | ||
.SH PLATFORMS | ||
vorc has been tested on MacOSX 11.x (BigSur) on M1 and x86_64. It | ||
should also work on MacOSX 10.15 (Catalina) x86_64, and MacOSX 12.x | ||
(Monterey) x86_64 and M1/M2. | ||
vorc has been tested on MacOSX 11.x (BigSur) and 12.x (Monterey) on M1 | ||
and x86_64. It should also work on MacOSX 10.15 (Catalina) x86_64. | ||
.SH HISTORY | ||
vocr was written by Sriranga Veeraraghavan <[email protected]>. |
Oops, something went wrong.