-AC_CHECK_LIB(tcl, Tcl_Eval, tclFound=1, tclFound=0, -lm)
-if test "$tclFound" = 1; then
- TCLLIB=-ltcl
-elif test -r /usr/local/lib/libtcl7.4.a; then
- TCLLIB=/usr/local/lib/libtcl7.4.a
-else
- TCLLIB=/usr/local/lib/libtcl.a
-fi
-AC_SUBST(YAZDIR)
-AC_SUBST(MOSI)
-AC_SUBST(MOSILIB)
-AC_SUBST(MOSIDIR)
-AC_MSG_CHECKING(for YAZ directory)
-AC_ARG_WITH(yazdir,[ --with-yazdir Yaz directory], [YAZDIR=$withval])
-if test "$YAZDIR" = "yes"; then
- YAZDIR="../yaz-1.0b3"
-elif test "$YAZDIR" = ""; then
- YAZDIR="../yaz"
- for i in ../yaz-1.0b3 ../yaz-1.0b4 ../yaz-1.0 ../yaz; do
- if test -d $i; then
- YAZDIR=$i
- fi
- done
-fi
-AC_MSG_RESULT($YAZDIR)
-if test ! -d $YAZDIR; then
- AC_MSG_WARN(YAZ directory doesnt exist)
-fi
-AC_MSG_CHECKING(for MOSI)
-AC_ARG_WITH(mosidir, [ --with-mosidir MOSI directory], [MOSIDIR=$withval])
-if test "$MOSIDIR" = "yes"; then
- MOSIDIR="../xtimosi/src"
-elif test "$MOSIDIR" = ""; then
- MOSIDIR="../xtimosi/src"
-fi
-if test -r ${YAZDIR}/lib/librfc.a; then
- MOSI=1
- MOSIDIR=$MOSIDIR
- MOSILIB='$(MOSIDIR)/libmosi.a $(YAZDIR)/lib/librfc.a'
- MOSITELL=yes
-else
- MOSI=0
- MOSIDIR=$MOSIDIR
- MOSILIB=''
- MOSITELL=no
-fi
-AC_MSG_RESULT($MOSITELL)
-AC_PATH_X
-not_really_there=""
-if test "$no_x" = ""; then
- if test "$x_includes" = ""; then
- AC_TRY_CPP([#include <X11/XIntrinsic.h>], , not_really_there="yes")
- else
- if test ! -r $x_includes/X11/Intrinsic.h; then
- not_really_there="yes"
+AC_SUBST(TKLIB)
+AC_SUBST(TCLINC)
+AC_SUBST(TKINC)
+AC_SUBST(SHLIB_CFLAGS)
+AC_SUBST(SHLIB_LD)
+AC_SUBST(SHLIB_SUFFIX)
+AC_SUBST(SHLIB_VERSION)
+AC_SUBST(SHLIB_IRTCL)
+AC_SUBST(ALL_SPEC)
+AC_SUBST(IRCLIENT_SHELL)
+AC_SUBST(RANLIB)
+dnl
+dnl ------ Preliminary settings
+AC_PROG_INSTALL
+dnl
+dnl ------ YAZ
+YAZ_INIT
+dnl
+dnl ------ look for Tcl
+tclconfig=NONE
+AC_ARG_WITH(tclconfig, [ --with-tclconfig=DIR tclConfig.sh in DIR (example /usr/lib)], [tclconfig=$withval])
+if test "x$tclconfig" = xNONE; then
+ saveprefix=${prefix}
+ AC_PREFIX_PROGRAM(tclsh)
+ if test "x$prefix" = xNONE; then
+ AC_PREFIX_PROGRAM(tclsh8.3)