summaryrefslogtreecommitdiff
path: root/itcl/iwidgets3.0.0/unix/configure.in
blob: 43b8476eb437d9f9b8e140078caea6e742b6d59c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
dnl	This file is an input file used by the GNU "autoconf" program to
dnl	generate the file "configure", which is run during [incr Tcl]
dnl installation to configure the system for the local environment.

AC_INIT(iwidgets.tcl.in)
# RCS: $Id$

ITCL_VERSION=3.0
IWIDGETS_VERSION=0
VERSION=${ITCL_VERSION}.${IWIDGETS_VERSION}

AC_CONFIG_AUX_DIR(../../config)
AC_PREREQ(2.0)

# -----------------------------------------------------------------------
#   Set up a new default --prefix.  If a previous installation of
#   [incr Tcl] can be found searching $PATH use that directory.
# -----------------------------------------------------------------------

AC_PREFIX_DEFAULT(/usr/local)
AC_PREFIX_PROGRAM(tclsh)

if test "${prefix}" = "NONE"; then
    prefix=/usr/local
fi
if test "${exec_prefix}" = "NONE"; then
    exec_prefix=$prefix
fi

AC_PROG_INSTALL
AC_PROG_RANLIB

# -----------------------------------------------------------------------
BUILD_DIR=`pwd`
IWIDGETS_SRC_DIR=`cd $srcdir/..; pwd`
cd ${BUILD_DIR}

#--------------------------------------------------------------------
#   See if there was a command-line option for where Tcl is;  if
#   not, search for Tcl.
#   CYGNUS LOCAL: Actually, we call tcl & tk directories "tcl" & "tk", no 8.0
#--------------------------------------------------------------------

AC_ARG_WITH(tcl, [  --with-tcl=DIR          use Tcl 8.0 binaries from DIR],
        itcl_search=$withval, itcl_search=`cd ../../..; ls -d \`pwd\`/tcl*/unix`)

TCL_LIB_DIR=""
for dir in $exec_prefix/lib $itcl_search ; do
    if test -r $dir/tclConfig.sh; then
        TCL_LIB_DIR=$dir
        break
    fi
done

if test -z "$TCL_LIB_DIR"; then
    AC_MSG_ERROR(Can't find Tcl libraries.  Use --with-tcl to specify the directory containing tclConfig.sh on your system.)
fi
. $TCL_LIB_DIR/tclConfig.sh

#--------------------------------------------------------------------
#   See if there was a command-line option for where Tk is;  if
#   not, search for Tk.
#   CYGNUS LOCAL: Actually, we call tcl & tk directories "tcl" & "tk", no 8.0
#--------------------------------------------------------------------

AC_ARG_WITH(tk, [  --with-tk=DIR           use Tk 8.0 binaries from DIR],
        itcl_search=$withval, itcl_search=`cd ../../..; ls -d \`pwd\`/tk*/unix`)

TK_LIB_DIR=""
for dir in $exec_prefix/lib $TCL_LIB_DIR $itcl_search ; do
    if test -r $dir/tkConfig.sh; then
        TK_LIB_DIR=$dir
        break
    fi
done

if test -z "$TK_LIB_DIR"; then
    AC_MSG_ERROR(Can't find Tk libraries.  Use --with-tk to specify the directory containing tkConfig.sh on your system.)
fi
. $TK_LIB_DIR/tkConfig.sh

#--------------------------------------------------------------------
#   See if there was a command-line option for where Itcl is;  if
#   not, search for Itcl.
#--------------------------------------------------------------------

AC_ARG_WITH(itcl, [  --with-itcl=DIR         use Itcl 3.0 binaries from DIR],
        itcl_search=$withval, itcl_search=`cd ${BUILD_DIR}/../../itcl; pwd`)

ITCL_LIB_DIR=""
for dir in $exec_prefix/lib $TCL_LIB_DIR $itcl_search ; do
    if test -r $dir/itclConfig.sh; then
        ITCL_LIB_DIR=$dir
        break
    fi
done

if test -z "$ITCL_LIB_DIR"; then
    AC_MSG_ERROR(Can't find Itcl libraries.  Use --with-itcl to specify the directory containing itclConfig.sh on your system.)
fi
. $ITCL_LIB_DIR/itclConfig.sh

#--------------------------------------------------------------------
#   See if there was a command-line option for where Itk is;  if
#   not, search for Itk.
#--------------------------------------------------------------------

AC_ARG_WITH(itk, [  --with-itk=DIR          use Itk 3.0 binaries from DIR],
        itcl_search=$withval, itcl_search=`cd ${BUILD_DIR}/../../itk; pwd`)

ITK_LIB_DIR=""
for dir in $exec_prefix/lib $TCL_LIB_DIR $itcl_search ; do
    if test -r $dir/itkConfig.sh; then
        ITK_LIB_DIR=$dir
        break
    fi
done

if test -z "$ITK_LIB_DIR"; then
    AC_MSG_ERROR(Can't find Itk libraries.  Use --with-itk to specify the directory containing itkConfig.sh on your system.)
fi
. $ITK_LIB_DIR/itkConfig.sh

#--------------------------------------------------------------------
#   Fill in template files with the proper info.
#--------------------------------------------------------------------
AC_SUBST(BUILD_DIR)
AC_SUBST(TCL_LIB_DIR)
AC_SUBST(TCL_SRC_DIR)
AC_SUBST(TK_LIB_DIR)
AC_SUBST(TK_SRC_DIR)
AC_SUBST(ITCL_LIB_DIR)
AC_SUBST(ITCL_SRC_DIR)
AC_SUBST(ITK_LIB_DIR)
AC_SUBST(ITK_SRC_DIR)

AC_SUBST(ITCL_VERSION)
AC_SUBST(IWIDGETS_VERSION)
AC_SUBST(IWIDGETS_LIBRARY)
AC_SUBST(IWIDGETS_SRC_DIR)

AC_OUTPUT(Makefile)