From: Adam Dickmeiss Date: Wed, 21 Jun 1995 15:16:43 +0000 (+0000) Subject: More work on configuration. X-Git-Tag: IRTCL.1.4~253 X-Git-Url: http://lists.indexdata.com/cgi-bin?a=commitdiff_plain;h=e4fb6658f65e7986025fdba5137d291b22b8fe71;p=ir-tcl-moved-to-github.git More work on configuration. --- diff --git a/Makefile.in b/Makefile.in index b4651cc..a3f5360 100644 --- a/Makefile.in +++ b/Makefile.in @@ -2,7 +2,7 @@ # (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@ @@ -27,8 +27,8 @@ YAZLIB=$(YAZDIR)/lib/libyaz.a $(MOSILIB) $(YAZDIR)/lib/libutil.a 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@ diff --git a/configure.in b/configure.in index ea86d56..8556f11 100644 --- a/configure.in +++ b/configure.in @@ -1,16 +1,40 @@ 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) diff --git a/tclmain.c b/tclmain.c index 92f240d..e17cd1e 100644 --- a/tclmain.c +++ b/tclmain.c @@ -5,7 +5,10 @@ * 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. @@ -24,7 +27,7 @@ #include #include #include -#if HAVE_SYS_SELECT_H +#ifdef _AIX #include #endif #include