1dnl	This file is an input file used by the GNU "autoconf" program to
2dnl	generate the file "configure", which is run during [incr Tcl]
3dnl installation to configure the system for the local environment.
4
5# RCS: $Id: configure.in,v 1.13 2005/04/11 20:34:09 hobbs Exp $
6
7AC_INIT([iwidgets], [4.0.2])
8
9TEA_INIT([3.9])
10
11AC_CONFIG_AUX_DIR(tclconfig)
12
13AC_CONFIG_SRCDIR([generic/buttonbox.itk])
14
15ITCL_VERSION=3.2
16AC_SUBST(ITCL_VERSION)
17
18#--------------------------------------------------------------------
19#   See if there was a command-line option for where Tcl or Tk is;  if
20#   not, search for Tcl and/or Tk.
21#--------------------------------------------------------------------
22
23TEA_PATH_TCLCONFIG
24TEA_LOAD_TCLCONFIG
25
26TEA_PATH_TKCONFIG
27TEA_LOAD_TKCONFIG
28
29AC_PROG_INSTALL
30
31#--------------------------------------------------------------------
32# See if --with-itcl was specified to give the [incr Tcl] and [incr Tk]
33# source code location.  If not, then we'll assume that the Iwidgets
34# package is being installed directly beneath the toplevel Itcl directory.
35#--------------------------------------------------------------------
36
37AC_ARG_WITH(itcl, [  --with-itcl=DIR         use Itcl 3.0 binaries from DIR],
38        itcl_search=$withval, itcl_search=`cd ${srcdir}/..; pwd`)
39
40ITCL_LIB_DIR=""
41if test -r $itcl_search/itcl/library/itcl.tcl \
42	-a -r $itcl_search/itk/library/itk.tcl; then
43    ITCL_LIB_DIR=$itcl_search/itcl/library
44    ITCL_SRC_DIR=$itcl_search/itcl
45    ITK_LIB_DIR=$itcl_search/itk/library
46    ITK_SRC_DIR=$itcl_search/itk
47fi
48
49if test -z "$ITCL_LIB_DIR"; then
50    AC_MSG_ERROR([Can't find Itcl source.  Use --with-itcl to specify the the toplevel [incr Tcl] directory on your system.  This directory should contain itcl/library/itcl.tcl, itk/library/itk.tcl.])
51fi
52
53#--------------------------------------------------------------------
54# Handle the --prefix=... option by defaulting to what Tcl gave.
55# Must be called after TEA_LOAD_TCLCONFIG and before $prefix is used.
56#--------------------------------------------------------------------
57
58TEA_PREFIX
59
60#--------------------------------------------------------------------
61#   Needed for running the test suite
62#--------------------------------------------------------------------
63
64TEA_PROG_TCLSH
65TEA_PROG_WISH
66
67#--------------------------------------------------------------------
68#   Fill in template files with the proper info.
69#--------------------------------------------------------------------
70AC_SUBST(TCL_SRC_DIR)
71AC_SUBST(TK_SRC_DIR)
72AC_SUBST(ITCL_LIB_DIR)
73AC_SUBST(ITCL_SRC_DIR)
74AC_SUBST(ITK_LIB_DIR)
75AC_SUBST(ITK_SRC_DIR)
76AC_SUBST(IWIDGETS_SRC_DIR)
77
78AC_OUTPUT([Makefile iwidgets.tcl pkgIndex.tcl])
79