summaryrefslogtreecommitdiffstats
path: root/kooka/configure.in.in
blob: df590f5d34ba0ad29dfcb514b397a9696d54ff2b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
dnl AC_SEARCH_LIBS(pgm2asc,Pgm2asc)
dnl AC_CHECK_LIB(Pgm2asc,pgm2asc)
dnl should define HAVE_LIBPGM2ASC if available

AC_ARG_WITH([kadmos],
  [AC_HELP_STRING([--with-kadmos],
    [Enable the kadmos OCR engine @<:@default=check@:>@])],
  [], with_kadmos=check)

AC_ARG_WITH([kadmos-dir],
  AC_HELP_STRING([--with-kadmos-dir],
    [sets the path to the kadmos engine @<:@default=/usr/local@:>@]),
  [ac_kadmos_value=$withval], [ac_kadmos_value=/usr/local])

KADMOS_INC=
KADMOS_LIB=

if test "x$with_kadmos" != xno; then
	if test -r "$ac_kadmos_value/kadmos.h"; then
		KADMOS_INC="-I$ac_kadmos_value"
		KADMOS_LIB="$ac_kadmos_value/librep.a"
		AC_DEFINE_UNQUOTED(HAVE_KADMOS, 1, [Defines if your system has the kadmos libraries])
	else
		AC_MSG_WARN([couldn't find kadmos engine header file under $ac_kadmos_value/kadmos.h])
	fi

	if test "x$with_kadmos" != xcheck && test -z "$KADMOS_LIB"; then
		AC_MSG_ERROR([--with-kadmos was given, but test for kadmos failed])
	fi
fi

AC_SUBST(KADMOS_LIB)
AC_SUBST(KADMOS_INC)