1 |
578 |
markom |
dnl This file is an input file used by the GNU "autoconf" program to
|
2 |
|
|
dnl generate the file "configure", which is run during [incr Tcl]
|
3 |
|
|
dnl installation to configure the system for the local environment.
|
4 |
|
|
|
5 |
|
|
AC_INIT(iwidgets.tcl.in)
|
6 |
|
|
# RCS: $Id: configure.in,v 1.1.1.1 2002-01-16 10:24:51 markom Exp $
|
7 |
|
|
|
8 |
|
|
ITCL_VERSION=3.0
|
9 |
|
|
IWIDGETS_VERSION=0
|
10 |
|
|
VERSION=${ITCL_VERSION}.${IWIDGETS_VERSION}
|
11 |
|
|
|
12 |
|
|
AC_CONFIG_AUX_DIR(../../config)
|
13 |
|
|
AC_PREREQ(2.0)
|
14 |
|
|
|
15 |
|
|
# -----------------------------------------------------------------------
|
16 |
|
|
# Set up a new default --prefix. If a previous installation of
|
17 |
|
|
# [incr Tcl] can be found searching $PATH use that directory.
|
18 |
|
|
# -----------------------------------------------------------------------
|
19 |
|
|
|
20 |
|
|
AC_PREFIX_DEFAULT(/usr/local)
|
21 |
|
|
AC_PREFIX_PROGRAM(tclsh)
|
22 |
|
|
|
23 |
|
|
if test "${prefix}" = "NONE"; then
|
24 |
|
|
prefix=/usr/local
|
25 |
|
|
fi
|
26 |
|
|
if test "${exec_prefix}" = "NONE"; then
|
27 |
|
|
exec_prefix=$prefix
|
28 |
|
|
fi
|
29 |
|
|
|
30 |
|
|
AC_PROG_INSTALL
|
31 |
|
|
AC_PROG_RANLIB
|
32 |
|
|
|
33 |
|
|
# -----------------------------------------------------------------------
|
34 |
|
|
BUILD_DIR=`pwd`
|
35 |
|
|
IWIDGETS_SRC_DIR=`cd $srcdir/..; pwd`
|
36 |
|
|
cd ${BUILD_DIR}
|
37 |
|
|
|
38 |
|
|
#--------------------------------------------------------------------
|
39 |
|
|
# See if there was a command-line option for where Tcl is; if
|
40 |
|
|
# not, search for Tcl.
|
41 |
|
|
# CYGNUS LOCAL: Actually, we call tcl & tk directories "tcl" & "tk", no 8.0
|
42 |
|
|
#--------------------------------------------------------------------
|
43 |
|
|
|
44 |
|
|
AC_ARG_WITH(tcl, [ --with-tcl=DIR use Tcl 8.0 binaries from DIR],
|
45 |
|
|
itcl_search=$withval, itcl_search=`cd ../../..; ls -d \`pwd\`/tcl*/unix`)
|
46 |
|
|
|
47 |
|
|
TCL_LIB_DIR=""
|
48 |
|
|
for dir in $itcl_search $exec_prefix/lib ; do
|
49 |
|
|
if test -r $dir/tclConfig.sh; then
|
50 |
|
|
TCL_LIB_DIR=$dir
|
51 |
|
|
break
|
52 |
|
|
fi
|
53 |
|
|
done
|
54 |
|
|
|
55 |
|
|
if test -z "$TCL_LIB_DIR"; then
|
56 |
|
|
AC_MSG_ERROR(Can't find Tcl libraries. Use --with-tcl to specify the directory containing tclConfig.sh on your system.)
|
57 |
|
|
fi
|
58 |
|
|
. $TCL_LIB_DIR/tclConfig.sh
|
59 |
|
|
|
60 |
|
|
#--------------------------------------------------------------------
|
61 |
|
|
# See if there was a command-line option for where Tk is; if
|
62 |
|
|
# not, search for Tk.
|
63 |
|
|
# CYGNUS LOCAL: Actually, we call tcl & tk directories "tcl" & "tk", no 8.0
|
64 |
|
|
#--------------------------------------------------------------------
|
65 |
|
|
|
66 |
|
|
AC_ARG_WITH(tk, [ --with-tk=DIR use Tk 8.0 binaries from DIR],
|
67 |
|
|
itcl_search=$withval, itcl_search=`cd ../../..; ls -d \`pwd\`/tk*/unix`)
|
68 |
|
|
|
69 |
|
|
TK_LIB_DIR=""
|
70 |
|
|
for dir in $itcl_search $TCL_LIB_DIR $exec_prefix/lib ; do
|
71 |
|
|
if test -r $dir/tkConfig.sh; then
|
72 |
|
|
TK_LIB_DIR=$dir
|
73 |
|
|
break
|
74 |
|
|
fi
|
75 |
|
|
done
|
76 |
|
|
|
77 |
|
|
if test -z "$TK_LIB_DIR"; then
|
78 |
|
|
AC_MSG_ERROR(Can't find Tk libraries. Use --with-tk to specify the directory containing tkConfig.sh on your system.)
|
79 |
|
|
fi
|
80 |
|
|
. $TK_LIB_DIR/tkConfig.sh
|
81 |
|
|
|
82 |
|
|
#--------------------------------------------------------------------
|
83 |
|
|
# See if there was a command-line option for where Itcl is; if
|
84 |
|
|
# not, search for Itcl.
|
85 |
|
|
#--------------------------------------------------------------------
|
86 |
|
|
|
87 |
|
|
AC_ARG_WITH(itcl, [ --with-itcl=DIR use Itcl 3.0 binaries from DIR],
|
88 |
|
|
itcl_search=$withval, itcl_search=`cd ${BUILD_DIR}/../../itcl; pwd`)
|
89 |
|
|
|
90 |
|
|
ITCL_LIB_DIR=""
|
91 |
|
|
for dir in $itcl_search $TCL_LIB_DIR $exec_prefix/lib ; do
|
92 |
|
|
if test -r $dir/itclConfig.sh; then
|
93 |
|
|
ITCL_LIB_DIR=$dir
|
94 |
|
|
break
|
95 |
|
|
fi
|
96 |
|
|
done
|
97 |
|
|
|
98 |
|
|
if test -z "$ITCL_LIB_DIR"; then
|
99 |
|
|
AC_MSG_ERROR(Can't find Itcl libraries. Use --with-itcl to specify the directory containing itclConfig.sh on your system.)
|
100 |
|
|
fi
|
101 |
|
|
. $ITCL_LIB_DIR/itclConfig.sh
|
102 |
|
|
|
103 |
|
|
#--------------------------------------------------------------------
|
104 |
|
|
# See if there was a command-line option for where Itk is; if
|
105 |
|
|
# not, search for Itk.
|
106 |
|
|
#--------------------------------------------------------------------
|
107 |
|
|
|
108 |
|
|
AC_ARG_WITH(itk, [ --with-itk=DIR use Itk 3.0 binaries from DIR],
|
109 |
|
|
itcl_search=$withval, itcl_search=`cd ${BUILD_DIR}/../../itk; pwd`)
|
110 |
|
|
|
111 |
|
|
ITK_LIB_DIR=""
|
112 |
|
|
for dir in $itcl_search $TCL_LIB_DIR $exec_prefix/lib ; do
|
113 |
|
|
if test -r $dir/itkConfig.sh; then
|
114 |
|
|
ITK_LIB_DIR=$dir
|
115 |
|
|
break
|
116 |
|
|
fi
|
117 |
|
|
done
|
118 |
|
|
|
119 |
|
|
if test -z "$ITK_LIB_DIR"; then
|
120 |
|
|
AC_MSG_ERROR(Can't find Itk libraries. Use --with-itk to specify the directory containing itkConfig.sh on your system.)
|
121 |
|
|
fi
|
122 |
|
|
. $ITK_LIB_DIR/itkConfig.sh
|
123 |
|
|
|
124 |
|
|
#--------------------------------------------------------------------
|
125 |
|
|
# Fill in template files with the proper info.
|
126 |
|
|
#--------------------------------------------------------------------
|
127 |
|
|
AC_SUBST(BUILD_DIR)
|
128 |
|
|
AC_SUBST(TCL_LIB_DIR)
|
129 |
|
|
AC_SUBST(TCL_SRC_DIR)
|
130 |
|
|
AC_SUBST(TK_LIB_DIR)
|
131 |
|
|
AC_SUBST(TK_SRC_DIR)
|
132 |
|
|
AC_SUBST(ITCL_LIB_DIR)
|
133 |
|
|
AC_SUBST(ITCL_SRC_DIR)
|
134 |
|
|
AC_SUBST(ITK_LIB_DIR)
|
135 |
|
|
AC_SUBST(ITK_SRC_DIR)
|
136 |
|
|
|
137 |
|
|
AC_SUBST(ITCL_VERSION)
|
138 |
|
|
AC_SUBST(IWIDGETS_VERSION)
|
139 |
|
|
AC_SUBST(IWIDGETS_LIBRARY)
|
140 |
|
|
AC_SUBST(IWIDGETS_SRC_DIR)
|
141 |
|
|
|
142 |
|
|
AC_OUTPUT(Makefile)
|