# (c) Index Data 1995
# See the file LICENSE for details.
# Sebastian Hammer, Adam Dickmeiss
-# $Id: Makefile.in,v 1.1 1995-06-21 11:04:44 adam Exp $
+# $Id: Makefile.in,v 1.2 1995-06-21 15:16:43 adam Exp $
SHELL=/bin/sh
prefix = @prefix@
INCLUDE=-I$(YAZDIR)/include $(XINCLUDE) -I$(MOSIDIR) -I/usr/local/include
DEFS=-DCCL2RPN=0 @DEFS@ -DMOSI=@MOSI@ -DIRTCLDIR=\"$(IRTCLDIR)\" $(INCLUDE)
-TCLLIB=-ltcl
-TKLIB=-ltk
+TCLLIB=@TCLLIB@
+TKLIB=-@TKLIB@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
dnl IR toolkit for tcl/tk
dnl (c) Index Data 1995
dnl See the file LICENSE for details.
-dnl $Id: configure.in,v 1.1 1995-06-21 11:04:53 adam Exp $
+dnl $Id: configure.in,v 1.2 1995-06-21 15:16:43 adam Exp $
AC_INIT(README)
AC_PROG_CC
AC_PROG_RANLIB
AC_PROG_INSTALL
-AC_CHECK_LIB(nsl, ,[LIBS="$LIBS -lnsl"])
-AC_CHECK_LIB(socket, ,[LIBS="$LIBS -lsocket"])
-AC_CHECK_LIB(net, , [LIBS="$LIBS -lnet"])
+checkBoth=0
+AC_CHECK_FUNC(connect, tk_checkSocket=0, tk_checkSocket=1)
+if test "$tk_checkSocket" = 1; then
+ AC_CHECK_LIB(socket, main, LIBS="$LIBS -lsocket", checkBoth=1)
+fi
+if test "$checkBoth" = 1; then
+ tk_oldLibs=$LIBS
+ LIBS="$LIBS -lsocket -lnsl"
+ AC_CHECK_FUNC(accept, tk_checkNsl=0, [LIBS=$tk_oldLibs])
+fi
+AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, main, [LIBS="$LIBS -lnsl"]))
AC_STDC_HEADERS
-AC_HAVE_HEADERS(sys/select.h)
+AC_SUBST(TCLLIB)
+AC_CHECK_LIB(m, sin)
+tclFound=0
+AC_CHECK_LIB(tcl, Tcl_Eval, tclFound=1)
+if test "$tclFound" = 1; then
+ TCLLIB=-ltcl
+else
+ TCLLIB=/usr/local/lib/libtcl.a
+fi
+AC_SUBST(TKLIB)
+tkFound=0
+AC_CHECK_LIB(tk, Tk_MainLoop, tkFound=1,, -ltcl)
+if test "$tkFound" = 1; then
+ TKLIB=-ltk
+else
+ TKLIB=/usr/local/lib/libtk.a
+fi
AC_SUBST(YAZDIR)
AC_SUBST(MOSI)
AC_SUBST(MOSILIB)
* Sebastian Hammer, Adam Dickmeiss
*
* $Log: tclmain.c,v $
- * Revision 1.7 1995-06-21 11:04:54 adam
+ * Revision 1.8 1995-06-21 15:16:44 adam
+ * More work on configuration.
+ *
+ * Revision 1.7 1995/06/21 11:04:54 adam
* Uses GNU autoconf 2.3.
* Install procedure implemented.
* boook bitmaps moved to sub directory bitmaps.
#include <unistd.h>
#include <sys/time.h>
#include <sys/types.h>
-#if HAVE_SYS_SELECT_H
+#ifdef _AIX
#include <sys/select.h>
#endif
#include <assert.h>