1 dnl IR toolkit for tcl/tk
2 dnl (c) Index Data 1995
3 dnl See the file LICENSE for details.
4 dnl $Id: configure.in,v 1.7 1995-07-28 10:28:37 adam Exp $
11 AC_CHECK_FUNC(connect, tk_checkSocket=0, tk_checkSocket=1)
12 if test "$tk_checkSocket" = 1; then
13 AC_CHECK_LIB(socket, main, LIBS="$LIBS -lsocket", checkBoth=1)
15 if test "$checkBoth" = 1; then
17 LIBS="$LIBS -lsocket -lnsl"
18 AC_CHECK_FUNC(accept, , [LIBS=$tk_oldLibs])
20 AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, main, [LIBS="$LIBS -lnsl"]))
23 AC_CHECK_LIB(tcl, Tcl_Eval, tclFound=1, tclFound=0, -lm)
24 if test "$tclFound" = 1; then
27 TCLLIB=/usr/local/lib/libtcl.a
33 AC_MSG_CHECKING(for YAZ directory)
34 AC_ARG_WITH(yazdir,[ --with-yazdir Yaz directory], [YAZDIR=$withval])
35 if test "$YAZDIR" = "yes"; then
37 elif test "$YAZDIR" = ""; then
39 for i in ../yaz-1.0b ../yaz-1.0b2 ../yaz-1.0b3 ../yaz-1.0b4 ../yaz-1.0 ../yaz; do
45 AC_MSG_RESULT($YAZDIR)
46 if test ! -d $YAZDIR; then
47 AC_MSG_WARN(YAZ directory doesnt exist)
49 AC_MSG_CHECKING(for MOSI)
50 AC_ARG_WITH(mosidir, [ --with-mosidir MOSI directory], [MOSIDIR=$withval])
51 if test "$MOSIDIR" = "yes"; then
52 MOSIDIR="../xtimosi/src"
53 elif test "$MOSIDIR" = ""; then
54 MOSIDIR="../xtimosi/src"
56 if test -r ${YAZDIR}/lib/librfc.a; then
59 MOSILIB='$(MOSIDIR)/libmosi.a $(YAZDIR)/lib/librfc.a'
67 AC_MSG_RESULT($MOSITELL)
70 if test "$no_x" = ""; then
71 if test "$x_includes" = ""; then
72 AC_TRY_CPP([#include <X11/XIntrinsic.h>], , not_really_there="yes")
74 if test ! -r $x_includes/X11/Intrinsic.h; then
75 not_really_there="yes"
79 if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then
80 echo checking for X11 header files
81 XINCLUDES="# no special path needed"
82 AC_TRY_CPP([#include <X11/Intrinsic.h>], , XINCLUDES="nope")
83 if test "$XINCLUDES" = nope; then
84 dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/include/X11R4 /usr/X11R5/include /usr/include/X11R5 /usr/openwin/include /usr/X11/include /usr/sww/include"
86 if test -r $i/X11/Intrinsic.h; then
92 if test "$x_includes" != ""; then
93 XINCLUDES=-I$x_includes
95 XINCLUDES="# no special path needed"
98 if test "$XINCLUDES" = nope; then
99 echo "Warning: couldn't find any X11 include files."
100 XINCLUDES="# no include files found"
103 if test "$no_x" = yes; then
105 if test "$XLIBSW" = nope; then
106 dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/lib/X11R4 /usr/X11R5/lib /usr/lib/X11R5 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib"
108 if test -r $i/libX11.a; then
114 if test "$x_libraries" = ""; then
117 XLIBSW="-L$x_libraries -lX11"
120 if test "$XLIBSW" = nope ; then
121 AC_CHECK_LIB(Xwindow, XCreateWindow, XLIBSW=-lXwindow)
123 if test "$XLIBSW" = nope ; then
124 echo "Warning: couldn't find the X11 library archive. Using -lX11."
129 AC_CHECK_LIB(tk, main, tkFound=1, tkFound=0, $TCLLIB $XLIBSW -lm)
130 if test "$tkFound" = 1; then
133 TKLIB=/usr/local/lib/libtk.a