OpenCores
URL https://opencores.org/ocsvn/or1k_old/or1k_old/trunk

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [insight/] [tix/] [unix/] [tk8.1/] [configure.in] - Blame information for rev 1765

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
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 to configure the
3
dnl     Makefile in this directory.
4
 
5
AC_INIT(../../generic/tixInit.c)
6
 
7
#--------------------------------------------------------------------
8
#       Remove the ./config.cache file and rerun configure if
9
#       the cache file belong to a different architecture
10
#
11
#       This doesn't seem to work in the Cygnus environment,
12
#       it causes an error message about having more than
13
#       one target, so I disabled it.   meissner@cygnus.com
14
#----------------------------------------------------------------------
15
#AC_CHECK_PROG(UNAME, uname -a, [uname -a], "")
16
#if test "$UNAME" = ""; then
17
#    AC_CHECK_PROG(UNAME, uname, [uname], "")
18
#fi
19
#
20
#if test "$UNAME" != ""; then
21
#    uname=`$UNAME`
22
#    AC_MSG_CHECKING([cached value of \$uname])
23
#    AC_CACHE_VAL(ac_cv_prog_uname, [nocached=1 ac_cv_prog_uname=`$UNAME`])
24
#    if test "$nocached" = "1"; then
25
#       AC_MSG_RESULT(no)
26
#    else
27
#       AC_MSG_RESULT(yes)
28
#    fi
29
#
30
#    if test "$uname" != "$ac_cv_prog_uname"; then
31
#        echo "Running on a different machine/architecture. Can't use cached values"
32
#       echo "Removing config.cache and running configure again ..."
33
#       rm -f config.cache
34
#        CMDLINE="$0 $*"
35
#       exec $CMDLINE
36
#    fi
37
#fi
38
 
39
#----------------------------------------------------------------------
40
# We don't want to use any relative path because we need to generate
41
# Makefile's in subdirectories
42
#----------------------------------------------------------------------
43
if test "$INSTALL" = "./install.sh"; then
44
    INSTALL=`pwd`/install.sh
45
fi
46
 
47
#--------------------------------------------------------------------
48
#       Version information about this TIX release.
49
#--------------------------------------------------------------------
50
 
51
TIX_VERSION=4.1
52
TIX_MAJOR_VERSION=4
53
TIX_MINOR_VERSION=1
54
 
55
BIN_VERSION=${TIX_VERSION}.8.1
56
 
57
 
58
VERSION=${BIN_VERSION}
59
 
60
#--------------------------------------------------------------------
61
#       See if user wants to use gcc to compile Tix. This option must
62
#       be used before any checking that uses the C compiler.
63
#--------------------------------------------------------------------
64
 
65
AC_ARG_ENABLE(gcc, [  --enable-gcc            allow use of gcc if available],
66
    [tix_ok=$enableval], [tix_ok=no])
67
if test "$tix_ok" = "yes"; then
68
    AC_PROG_CC
69
else
70
    CC=${CC-cc}
71
AC_SUBST(CC)
72
fi
73
 
74
AC_PROG_INSTALL
75
AC_PROG_RANLIB
76
AC_HAVE_HEADERS(unistd.h limits.h)
77
AC_PROG_MAKE_SET
78
 
79
#--------------------------------------------------------------------
80
#       unsigned char is not supported by some non-ANSI compilers.
81
#--------------------------------------------------------------------
82
 
83
AC_MSG_CHECKING([unsigned char])
84
AC_TRY_COMPILE([#include ],[
85
     unsigned char c = 'c';
86
], tcl_ok=supported, tcl_ok=notsupported)
87
 
88
AC_MSG_RESULT($tcl_ok)
89
if test $tcl_ok = supported; then
90
    AC_DEFINE(UCHAR_SUPPORTED)
91
fi
92
 
93
#--------------------------------------------------------------------
94
#       Check whether there is an strcasecmp function on this system.
95
#       This is a bit tricky because under SCO it's in -lsocket and
96
#       under Sequent Dynix it's in -linet.
97
#--------------------------------------------------------------------
98
 
99
AC_CHECK_FUNC(strcasecmp, tcl_ok=1, tcl_ok=0)
100
if test "$tcl_ok" = 0; then
101
    AC_CHECK_LIB(socket, strcasecmp, tcl_ok=1, tcl_ok=0)
102
fi
103
if test "$tcl_ok" = 0; then
104
    AC_CHECK_LIB(inet, strcasecmp, tcl_ok=1, tcl_ok=0)
105
fi
106
if test "$tcl_ok" = 0; then
107
    AC_DEFINE(NO_STRCASECMP)
108
fi
109
 
110
# Check for Tcl and Tk.
111
CYG_AC_PATH_TCLCONFIG
112
CYG_AC_LOAD_TCLCONFIG
113
CYG_AC_PATH_TKCONFIG
114
CYG_AC_LOAD_TKCONFIG
115
CYG_AC_PATH_TCLH
116
# FIXME: consider only doing this if --with-x given.
117
CYG_AC_PATH_TKH
118
 
119
#--------------------------------------------------------------------
120
#       Find out the top level source directory of the Tix package.
121
#--------------------------------------------------------------------
122
TIX_SRC_DIR=`cd ${srcdir}/../..; pwd`
123
 
124
#--------------------------------------------------------------------
125
#       See if we should compile SAM
126
#--------------------------------------------------------------------
127
 
128
AC_ARG_ENABLE(sam,
129
    [  --enable-sam            build stand-alone modules],
130
    [ok=$enableval], [ok=no])
131
 
132
if test "$ok" = "yes"; then
133
    TIX_BUILD_SAM="yes"
134
    TIX_SAM_TARGETS='$(SAM_TARGETS)'
135
else
136
    TIX_BUILD_SAM="no"
137
fi
138
 
139
            TIX_SAM_INSTALL=_install_sam_lib_
140
 
141
IS_ITCL=0
142
ITCL_BUILD_LIB_SPEC=""
143
ITK_BUILD_LIB_SPEC=""
144
TIX_EXE_FILE=tixwish
145
TCL_SAMEXE_FILE=satclsh
146
TK_SAMEXE_FILE=sawish
147
TIX_SAMEXE_FILE=satixwish
148
 
149
#--------------------------------------------------------------------
150
#       Read in configuration information generated by Tcl for shared
151
#       libraries, and arrange for it to be substituted into our
152
#       Makefile.
153
#--------------------------------------------------------------------
154
 
155
CC=$TCL_CC
156
SHLIB_CFLAGS=$TCL_SHLIB_CFLAGS
157
SHLIB_LD=$TCL_SHLIB_LD
158
SHLIB_LD_LIBS=$TCL_SHLIB_LD_LIBS
159
SHLIB_SUFFIX=$TCL_SHLIB_SUFFIX
160
SHLIB_VERSION=$TCL_SHLIB_VERSION
161
 
162
DL_LIBS=$TCL_DL_LIBS
163
LD_FLAGS=$TCL_LD_FLAGS
164
TIX_LD_SEARCH_FLAGS=$TCL_LD_SEARCH_FLAGS
165
 
166
#--------------------------------------------------------------------
167
#       Read in configuration information generated by Tk and arrange
168
#       for it to be substituted into our Makefile.
169
#--------------------------------------------------------------------
170
 
171
TIX_DEFS="$TK_DEFS $TCL_DEFS"
172
 
173
# Note:  in the following variable, it's important to use the absolute
174
# path name of the Tcl directory rather than "..":  this is because
175
# AIX remembers this path and will attempt to use it at run-time to look
176
# up the Tcl library.
177
 
178
TIX_BUILD_LOCATION="`pwd`"
179
if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
180
    TIX_BUILD_LIB_SPEC="-L`pwd` -ltix${VERSION}"
181
    TIX_BUILD_SAM_SPEC="-L`pwd` -ltixsam${VERSION}"
182
    TCL_BUILD_SAM_SPEC="-L`pwd` -ltclsam${TCL_VERSION}"
183
    TK_BUILD_SAM_SPEC="-L`pwd` -ltksam${TK_VERSION}"
184
    TIX_LIB_SPEC="-L${exec_prefix}/lib -ltix${VERSION}"
185
else
186
    TIX_BUILD_LIB_SPEC="-L`pwd` -ltix`echo ${VERSION} | tr -d .`"
187
    TIX_BUILD_SAM_SPEC="-L`pwd` -ltixsam`echo ${VERSION} | tr -d .`"
188
    TCL_BUILD_SAM_SPEC="-L`pwd` -ltclsam`echo ${TCL_VERSION} | tr -d .`"
189
    TK_BUILD_SAM_SPEC="-L`pwd` -ltksam`echo ${TK_VERSION} | tr -d .`"
190
    TIX_LIB_SPEC="-L${exec_prefix}/lib -ltix`echo ${VERSION} | tr -d .`"
191
fi
192
 
193
#--------------------------------------------------------------------
194
#       See if we should compile shared library.
195
#--------------------------------------------------------------------
196
 
197
AC_ARG_ENABLE(shared,
198
    [  --enable-shared         build libtix as a shared library],
199
    [ok=$enableval], [ok=no])
200
 
201
if test "$ok" = "yes" -a "${SHLIB_SUFFIX}" != ""; then
202
    TIX_SHLIB_CFLAGS="${SHLIB_CFLAGS}"
203
    TIX_RANLIB=":"
204
 
205
    # The main Tix library
206
    #
207
    eval "TIX_LIB_FILE=libtix${TCL_SHARED_LIB_SUFFIX}"
208
    TIX_MAKE_LIB="\${SHLIB_LD} -o ${TIX_LIB_FILE} \${OBJS} ${SHLIB_LD_LIBS}"
209
 
210
    # The Tcl SAM library
211
    #
212
    VERSION=8.1
213
    eval "TCL_SAM_FILE=libtclsam${TCL_SHARED_LIB_SUFFIX}"
214
    TCL_MAKE_SAM="\${SHLIB_LD} -o ${TCL_SAM_FILE} \${TCL_SAM_OBJS} ${SHLIB_LD_LIBS}"
215
 
216
    # The Tk SAM library
217
    #
218
    VERSION=8.1
219
    eval "TK_SAM_FILE=libtksam${TCL_SHARED_LIB_SUFFIX}"
220
    TK_MAKE_SAM="\${SHLIB_LD} -o ${TK_SAM_FILE} \${TK_SAM_OBJS} ${SHLIB_LD_LIBS}"
221
 
222
    # The Tix SAM library
223
    #
224
    VERSION=${BIN_VERSION}
225
    eval "TIX_SAM_FILE=libtixsam${TCL_SHARED_LIB_SUFFIX}"
226
    TIX_MAKE_SAM="\${SHLIB_LD} -o ${TIX_SAM_FILE} \${TIX_SAM_OBJS} ${SHLIB_LD_LIBS}"
227
 
228
else
229
    TIX_SHLIB_CFLAGS=""
230
    TIX_RANLIB='$(RANLIB)'
231
 
232
    # The main Tix library
233
    #
234
    eval "TIX_LIB_FILE=libtix${TCL_UNSHARED_LIB_SUFFIX}"
235
    TIX_MAKE_LIB="ar cr ${TIX_LIB_FILE} \${OBJS}"
236
 
237
    # The Tcl SAM library
238
 
239
    VERSION=8.1
240
    eval "TCL_SAM_FILE=libtclsam${TCL_UNSHARED_LIB_SUFFIX}"
241
    TCL_MAKE_SAM="ar cr ${TCL_SAM_FILE} \${TCL_SAM_OBJS}"
242
 
243
    # The Tk SAM library
244
    #
245
    VERSION=8.1
246
    eval "TK_SAM_FILE=libtksam${TCL_UNSHARED_LIB_SUFFIX}"
247
    TK_MAKE_SAM="ar cr ${TK_SAM_FILE} \${TK_SAM_OBJS}"
248
 
249
    # The Tix SAM library
250
    #
251
    VERSION=${BIN_VERSION}
252
    eval "TIX_SAM_FILE=libtixsam${TCL_UNSHARED_LIB_SUFFIX}"
253
    TIX_MAKE_SAM="ar cr ${TIX_SAM_FILE} \${TIX_SAM_OBJS}"
254
fi
255
 
256
TIX_LIB_FULL_PATH="`pwd`/${TIX_LIB_FILE}"
257
 
258
#--------------------------------------------------------------------
259
#       Check for the existence of the -lsocket and -lnsl libraries.
260
#       The order here is important, so that they end up in the right
261
#       order in the command line generated by make.  Here are some
262
#       special considerations:
263
#       1. Use "connect" and "accept" to check for -lsocket, and
264
#          "gethostbyname" to check for -lnsl.
265
#       2. Use each function name only once:  can't redo a check because
266
#          autoconf caches the results of the last check and won't redo it.
267
#       3. Use -lnsl and -lsocket only if they supply procedures that
268
#          aren't already present in the normal libraries.  This is because
269
#          IRIX 5.2 has libraries, but they aren't needed and they're
270
#          bogus:  they goof up name resolution if used.
271
#       4. On some SVR4 systems, can't use -lsocket without -lnsl too.
272
#          To get around this problem, check for both libraries together
273
#          if -lsocket doesn't work by itself.
274
#--------------------------------------------------------------------
275
 
276
checked=0
277
for i in $TK_LIBS; do
278
    if test "$i" = "-lsocket"; then
279
        checked=1
280
    fi
281
done
282
 
283
if test "$checked" = "0"; then
284
    tcl_checkBoth=0
285
    AC_CHECK_FUNC(connect, tcl_checkSocket=0, tcl_checkSocket=1)
286
    if test "$tcl_checkSocket" = 1; then
287
        AC_CHECK_LIB(socket, main, TK_LIBS="$TK_LIBS -lsocket",
288
            tcl_checkBoth=1)
289
    fi
290
    if test "$tcl_checkBoth" = 1; then
291
        tk_oldLibs=$TK_LIBS
292
        TK_LIBS="$TK_LIBS -lsocket -lnsl"
293
        AC_CHECK_FUNC(accept, tcl_checkNsl=0, [TK_LIBS=$tk_oldLibs])
294
    fi
295
    AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, main,
296
        [TK_LIBS="$TK_LIBS -lnsl"]))
297
fi
298
 
299
#----------------------------------------------------------------------
300
#       Substitution strings exported by TIX
301
#----------------------------------------------------------------------
302
AC_SUBST(CC)
303
AC_SUBST(RANLIB)
304
AC_SUBST(TIX_RANLIB)
305
AC_SUBST(SHLIB_CFLAGS)
306
AC_SUBST(SHLIB_LD)
307
AC_SUBST(SHLIB_LD_LIBS)
308
AC_SUBST(SHLIB_SUFFIX)
309
AC_SUBST(SHLIB_VERSION)
310
AC_SUBST(DL_LIBS)
311
AC_SUBST(LD_FLAGS)
312
AC_SUBST(TCL_BUILD_LIB_SPEC)
313
AC_SUBST(TCL_LIBS)
314
AC_SUBST(TCL_VERSION)
315
AC_SUBST(TCL_SRC_DIR)
316
AC_SUBST(TCL_BIN_DIR)
317
AC_SUBST(TCL_LIB_FULL_PATH)
318
AC_SUBST(TK_BUILD_LIB_SPEC)
319
AC_SUBST(TK_LIBS)
320
AC_SUBST(TK_VERSION)
321
AC_SUBST(TK_SRC_DIR)
322
AC_SUBST(TK_BIN_DIR)
323
AC_SUBST(TK_XINCLUDES)
324
AC_SUBST(TK_LIB_FULL_PATH)
325
AC_SUBST(TIX_LD_SEARCH_FLAGS)
326
AC_SUBST(TIX_MAJOR_VERSION)
327
AC_SUBST(TIX_MINOR_VERSION)
328
AC_SUBST(TIX_VERSION)
329
AC_SUBST(TIX_SRC_DIR)
330
AC_SUBST(TIX_SHLIB_CFLAGS)
331
AC_SUBST(TIX_MAKE_LIB)
332
AC_SUBST(TIX_LIB_FILE)
333
AC_SUBST(TIX_BUILD_LIB_SPEC)
334
AC_SUBST(TIX_LIB_SPEC)
335
AC_SUBST(TIX_EXE_FILE)
336
AC_SUBST(TIX_SAM_TARGETS)
337
AC_SUBST(TIX_SAM_INSTALL)
338
AC_SUBST(TIX_LIB_FULL_PATH)
339
AC_SUBST(TCL_SAM_FILE)
340
AC_SUBST(TCL_MAKE_SAM)
341
AC_SUBST(TK_SAM_FILE)
342
AC_SUBST(TK_MAKE_SAM)
343
AC_SUBST(TIX_SAM_FILE)
344
AC_SUBST(TIX_MAKE_SAM)
345
AC_SUBST(TIX_DEFS)
346
AC_SUBST(ITCL_BUILD_LIB_SPEC)
347
AC_SUBST(ITCL_LIB_FULL_PATH)
348
AC_SUBST(ITK_BUILD_LIB_SPEC)
349
AC_SUBST(TCL_SAMEXE_FILE)
350
AC_SUBST(TK_SAMEXE_FILE)
351
AC_SUBST(TIX_SAMEXE_FILE)
352
AC_SUBST(TCL_BUILD_SAM_SPEC)
353
AC_SUBST(TK_BUILD_SAM_SPEC)
354
AC_SUBST(TIX_BUILD_SAM_SPEC)
355
AC_SUBST(TIX_BUILD_LOCATION)
356
 
357
# The "binary version" of Tix (see docs/Pkg.txt)
358
TIX_VERSION_PKG=${BIN_VERSION}
359
AC_SUBST(TIX_VERSION_PKG)
360
 
361
TIXSAM_PKG_FILE="[[file join [file dirname \$dir] ${TIX_SAM_FILE}]]"
362
if test "$TIX_BUILD_SAM" = "yes"; then
363
    TIX_SAM_PACKAGE_IFNEEDED="package ifneeded Tixsam ${TIX_VERSION_PKG} [[list load \"${TIXSAM_PKG_FILE}\" Tixsam]]"
364
fi
365
 
366
# The package file, usually a shared library
367
TIX_PKG_FILE="[[file join [file dirname \$dir] ${TIX_LIB_FILE}]]"
368
AC_SUBST(TIX_PKG_FILE)
369
AC_SUBST(TIX_SAM_PACKAGE_IFNEEDED)
370
 
371
AC_OUTPUT(Makefile pkgIndex.tcl ../../tixConfig.sh)
372
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.