dnl Process this file with autoconf to produce a configure script. AC_INIT AC_CONFIG_SRCDIR([acconfig.h]) AC_PREFIX_DEFAULT(/usr/local/harvest) dnl Checks for programs. AC_PROG_CC AC_C_BIGENDIAN AC_PROG_INSTALL dnl Disable TCL code. enable_wordview=no if test "$enable_wordview" != "no" ;then AC_ARG_WITH(wish,[ --with-wish=fullpath allows to specify full path for Tk interpreter to avoid checking, which requires X], WISH=$withval,[ AC_PATH_PROGS(WISH,wish wish8.0 wish4.2 wish8.1) if test -n "$WISH"; then AC_CACHE_CHECK(checking if wish version is 7.6 or above ,GOOD_WISH, changequote(<<,>>)dnl <>)dnl>> <=7.6} { puts -nonewline "yes" } else { puts -nonewline "no" } exit'>tmp$$.tcl GOOD_WISH=`$WISH tmp$$.tcl` rm tmp$$.tcl >> <> changequote([, ])dnl ) if test "$GOOD_WISH" != yes; then enable_wordview=no fi fi ]) fi AC_ARG_WITH(install-root,[ --with-install-root=path allows to install catdoc into other directory than compilied-in path points to],installroot=$withval,) replsuffix=.replchars specsuffix=.specchars targetcharset=koi8-r sourcecharset=cp1251 AC_ARG_WITH(input,[ --with-input=charset set default charset to expect in 8-bit word files],sourcecharset=$withval,sourcecharset=cp1251) AC_ARG_WITH(output,[ --with-output=charset set default charset to output],targetcharset=$withval,targetcharset=koi8-r) if test "$targetcharset" = "utf-8"; then charsetcheck="$sourcecharset.txt" else charsetcheck="$sourcecharset.txt $targetcharset.txt" fi AC_ARG_ENABLE(charset-check,[ --disable-charset-check allow make in charsets directory to succeed even if files for default charsets are not found],[if test "$enable_charset_check" = no; then charsetcheck="" fi]) test -z "$manext" && manext=.1 test -z "$man1dir" && man1dir=\${prefix}/man/man1 installtargets="install-catdoc" buildtargets="catdoc xls2csv" if test -n "$WISH"; then AC_ARG_ENABLE(wordview,[ --disable-wordview Do not install tcl-tk wrapper],[ if test "$enable_wordview" = no; then installtargets=install-catdoc buildtargets="catdoc xls2csv" fi ],) fi dnl Checks for libraries. dnl Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS(unistd.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST dnl Checks for library functions. AC_FUNC_SETVBUF_REVERSED AC_CHECK_FUNCS(strdup strtol) AC_SUBST(specsuffix) AC_SUBST(replsuffix) AC_SUBST(buildtargets) AC_SUBST(installtargets) AC_SUBST(targetcharset) AC_SUBST(sourcecharset) AC_SUBST(man1dir) AC_SUBST(manext) AC_SUBST(charsetcheck) AC_SUBST(installroot) AC_SUBST(WORDS_BIGENDIAN) AC_CONFIG_FILES([doc/Makefile charsets/Makefile src/Makefile Makefile]) AC_OUTPUT