1 |
1181 |
sfurman |
dnl written by Rob Savoye <rob@cygnus.com> for Cygnus Support
|
2 |
|
|
dnl major rewriting for Tcl 7.5 by Don Libes <libes@nist.gov>
|
3 |
|
|
|
4 |
|
|
dnl gdb/configure.in uses BFD_NEED_DECLARATION, so get its definition.
|
5 |
|
|
sinclude(../bfd/acinclude.m4)
|
6 |
|
|
|
7 |
|
|
dnl This gets the standard macros, like the TCL, TK, etc ones.
|
8 |
|
|
sinclude(../config/acinclude.m4)
|
9 |
|
|
|
10 |
|
|
dnl CYGNUS LOCAL: This gets the right posix flag for gcc
|
11 |
|
|
AC_DEFUN(CY_AC_TCL_LYNX_POSIX,
|
12 |
|
|
[AC_REQUIRE([AC_PROG_CC])AC_REQUIRE([AC_PROG_CPP])
|
13 |
|
|
AC_MSG_CHECKING([if running LynxOS])
|
14 |
|
|
AC_CACHE_VAL(ac_cv_os_lynx,
|
15 |
|
|
[AC_EGREP_CPP(yes,
|
16 |
|
|
[/*
|
17 |
|
|
* The old Lynx "cc" only defines "Lynx", but the newer one uses "__Lynx__"
|
18 |
|
|
*/
|
19 |
|
|
#if defined(__Lynx__) || defined(Lynx)
|
20 |
|
|
yes
|
21 |
|
|
#endif
|
22 |
|
|
], ac_cv_os_lynx=yes, ac_cv_os_lynx=no)])
|
23 |
|
|
#
|
24 |
|
|
if test "$ac_cv_os_lynx" = "yes" ; then
|
25 |
|
|
AC_MSG_RESULT(yes)
|
26 |
|
|
AC_DEFINE(LYNX)
|
27 |
|
|
AC_MSG_CHECKING([whether -mposix or -X is available])
|
28 |
|
|
AC_CACHE_VAL(ac_cv_c_posix_flag,
|
29 |
|
|
[AC_TRY_COMPILE(,[
|
30 |
|
|
/*
|
31 |
|
|
* This flag varies depending on how old the compiler is.
|
32 |
|
|
* -X is for the old "cc" and "gcc" (based on 1.42).
|
33 |
|
|
* -mposix is for the new gcc (at least 2.5.8).
|
34 |
|
|
*/
|
35 |
|
|
#if defined(__GNUC__) && __GNUC__ >= 2
|
36 |
|
|
choke me
|
37 |
|
|
#endif
|
38 |
|
|
], ac_cv_c_posix_flag=" -mposix", ac_cv_c_posix_flag=" -X")])
|
39 |
|
|
CC="$CC $ac_cv_c_posix_flag"
|
40 |
|
|
AC_MSG_RESULT($ac_cv_c_posix_flag)
|
41 |
|
|
else
|
42 |
|
|
AC_MSG_RESULT(no)
|
43 |
|
|
fi
|
44 |
|
|
])
|
45 |
|
|
|
46 |
|
|
#
|
47 |
|
|
# Sometimes the native compiler is a bogus stub for gcc or /usr/ucb/cc. This
|
48 |
|
|
# makes configure think it's cross compiling. If --target wasn't used, then
|
49 |
|
|
# we can't configure, so something is wrong. We don't use the cache
|
50 |
|
|
# here cause if somebody fixes their compiler install, we want this to work.
|
51 |
|
|
AC_DEFUN(CY_AC_C_WORKS,
|
52 |
|
|
[# If we cannot compile and link a trivial program, we can't expect anything to work
|
53 |
|
|
AC_MSG_CHECKING(whether the compiler ($CC) actually works)
|
54 |
|
|
AC_TRY_COMPILE(, [/* don't need anything here */],
|
55 |
|
|
c_compiles=yes, c_compiles=no)
|
56 |
|
|
|
57 |
|
|
AC_TRY_LINK(, [/* don't need anything here */],
|
58 |
|
|
c_links=yes, c_links=no)
|
59 |
|
|
|
60 |
|
|
if test x"${c_compiles}" = x"no" ; then
|
61 |
|
|
AC_MSG_ERROR(the native compiler is broken and won't compile.)
|
62 |
|
|
fi
|
63 |
|
|
|
64 |
|
|
if test x"${c_links}" = x"no" ; then
|
65 |
|
|
AC_MSG_ERROR(the native compiler is broken and won't link.)
|
66 |
|
|
fi
|
67 |
|
|
AC_MSG_RESULT(yes)
|
68 |
|
|
])
|
69 |
|
|
|
70 |
|
|
AC_DEFUN(CY_AC_PATH_TCLH, [
|
71 |
|
|
#
|
72 |
|
|
# Ok, lets find the tcl source trees so we can use the headers
|
73 |
|
|
# Warning: transition of version 9 to 10 will break this algorithm
|
74 |
|
|
# because 10 sorts before 9. We also look for just tcl. We have to
|
75 |
|
|
# be careful that we don't match stuff like tclX by accident.
|
76 |
|
|
# the alternative search directory is involked by --with-tclinclude
|
77 |
|
|
#
|
78 |
|
|
|
79 |
|
|
no_tcl=true
|
80 |
|
|
AC_MSG_CHECKING(for Tcl private headers. dir=${configdir})
|
81 |
|
|
AC_ARG_WITH(tclinclude, [ --with-tclinclude=DIR Directory where tcl private headers are], with_tclinclude=${withval})
|
82 |
|
|
AC_CACHE_VAL(ac_cv_c_tclh,[
|
83 |
|
|
# first check to see if --with-tclinclude was specified
|
84 |
|
|
if test x"${with_tclinclude}" != x ; then
|
85 |
|
|
if test -f ${with_tclinclude}/tclInt.h ; then
|
86 |
|
|
ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
|
87 |
|
|
elif test -f ${with_tclinclude}/generic/tclInt.h ; then
|
88 |
|
|
ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)`
|
89 |
|
|
else
|
90 |
|
|
AC_MSG_ERROR([${with_tclinclude} directory doesn't contain private headers])
|
91 |
|
|
fi
|
92 |
|
|
fi
|
93 |
|
|
|
94 |
|
|
# next check if it came with Tcl configuration file
|
95 |
|
|
if test x"${ac_cv_c_tclconfig}" = x ; then
|
96 |
|
|
if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then
|
97 |
|
|
ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)`
|
98 |
|
|
fi
|
99 |
|
|
fi
|
100 |
|
|
|
101 |
|
|
# next check in private source directory
|
102 |
|
|
#
|
103 |
|
|
# since ls returns lowest version numbers first, reverse its output
|
104 |
|
|
if test x"${ac_cv_c_tclh}" = x ; then
|
105 |
|
|
for i in \
|
106 |
|
|
${srcdir}/../tcl \
|
107 |
|
|
`ls -dr ${srcdir}/../tcl[[7-9]]* 2>/dev/null` \
|
108 |
|
|
${srcdir}/../../tcl \
|
109 |
|
|
`ls -dr ${srcdir}/../../tcl[[7-9]]* 2>/dev/null` \
|
110 |
|
|
${srcdir}/../../../tcl \
|
111 |
|
|
`ls -dr ${srcdir}/../../../tcl[[7-9]]* 2>/dev/null ` ; do
|
112 |
|
|
if test -f $i/generic/tclInt.h ; then
|
113 |
|
|
ac_cv_c_tclh=`(cd $i/generic; pwd)`
|
114 |
|
|
break
|
115 |
|
|
fi
|
116 |
|
|
done
|
117 |
|
|
fi
|
118 |
|
|
# finally check in a few common install locations
|
119 |
|
|
#
|
120 |
|
|
# since ls returns lowest version numbers first, reverse its output
|
121 |
|
|
if test x"${ac_cv_c_tclh}" = x ; then
|
122 |
|
|
for i in \
|
123 |
|
|
`ls -dr /usr/local/src/tcl[[7-9]]* 2>/dev/null` \
|
124 |
|
|
`ls -dr /usr/local/lib/tcl[[7-9]]* 2>/dev/null` \
|
125 |
|
|
/usr/local/src/tcl \
|
126 |
|
|
/usr/local/lib/tcl \
|
127 |
|
|
${prefix}/include ; do
|
128 |
|
|
if test -f $i/generic/tclInt.h ; then
|
129 |
|
|
ac_cv_c_tclh=`(cd $i/generic; pwd)`
|
130 |
|
|
break
|
131 |
|
|
fi
|
132 |
|
|
done
|
133 |
|
|
fi
|
134 |
|
|
# see if one is installed
|
135 |
|
|
if test x"${ac_cv_c_tclh}" = x ; then
|
136 |
|
|
AC_HEADER_CHECK(tclInt.h, ac_cv_c_tclh=installed, ac_cv_c_tclh="")
|
137 |
|
|
fi
|
138 |
|
|
])
|
139 |
|
|
if test x"${ac_cv_c_tclh}" = x ; then
|
140 |
|
|
TCLHDIR="# no Tcl private headers found"
|
141 |
|
|
AC_MSG_ERROR([Can't find Tcl private headers])
|
142 |
|
|
fi
|
143 |
|
|
if test x"${ac_cv_c_tclh}" != x ; then
|
144 |
|
|
no_tcl=""
|
145 |
|
|
if test x"${ac_cv_c_tclh}" = x"installed" ; then
|
146 |
|
|
AC_MSG_RESULT([is installed])
|
147 |
|
|
TCLHDIR=""
|
148 |
|
|
else
|
149 |
|
|
AC_MSG_RESULT([found in ${ac_cv_c_tclh}])
|
150 |
|
|
# this hack is cause the TCLHDIR won't print if there is a "-I" in it.
|
151 |
|
|
TCLHDIR="-I${ac_cv_c_tclh}"
|
152 |
|
|
fi
|
153 |
|
|
fi
|
154 |
|
|
|
155 |
|
|
AC_SUBST(TCLHDIR)
|
156 |
|
|
])
|
157 |
|
|
|
158 |
|
|
|
159 |
|
|
AC_DEFUN(CY_AC_PATH_TCLCONFIG, [
|
160 |
|
|
#
|
161 |
|
|
# Ok, lets find the tcl configuration
|
162 |
|
|
# First, look for one uninstalled.
|
163 |
|
|
# the alternative search directory is invoked by --with-tclconfig
|
164 |
|
|
#
|
165 |
|
|
|
166 |
|
|
if test x"${no_tcl}" = x ; then
|
167 |
|
|
# we reset no_tcl in case something fails here
|
168 |
|
|
no_tcl=true
|
169 |
|
|
AC_ARG_WITH(tclconfig, [ --with-tclconfig=DIR Directory containing tcl configuration (tclConfig.sh)],
|
170 |
|
|
with_tclconfig=${withval})
|
171 |
|
|
AC_MSG_CHECKING([for Tcl configuration])
|
172 |
|
|
AC_CACHE_VAL(ac_cv_c_tclconfig,[
|
173 |
|
|
|
174 |
|
|
# First check to see if --with-tclconfig was specified.
|
175 |
|
|
if test x"${with_tclconfig}" != x ; then
|
176 |
|
|
if test -f "${with_tclconfig}/tclConfig.sh" ; then
|
177 |
|
|
ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
|
178 |
|
|
else
|
179 |
|
|
AC_MSG_ERROR([${with_tclconfig} directory doesn't contain tclConfig.sh])
|
180 |
|
|
fi
|
181 |
|
|
fi
|
182 |
|
|
|
183 |
|
|
# then check for a private Tcl installation
|
184 |
|
|
if test x"${ac_cv_c_tclconfig}" = x ; then
|
185 |
|
|
for i in \
|
186 |
|
|
../tcl \
|
187 |
|
|
`ls -dr ../tcl[[7-9]]* 2>/dev/null` \
|
188 |
|
|
../../tcl \
|
189 |
|
|
`ls -dr ../../tcl[[7-9]]* 2>/dev/null` \
|
190 |
|
|
../../../tcl \
|
191 |
|
|
`ls -dr ../../../tcl[[7-9]]* 2>/dev/null` ; do
|
192 |
|
|
if test -f "$i/${configdir}/tclConfig.sh" ; then
|
193 |
|
|
ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
|
194 |
|
|
break
|
195 |
|
|
fi
|
196 |
|
|
done
|
197 |
|
|
fi
|
198 |
|
|
# check in a few common install locations
|
199 |
|
|
if test x"${ac_cv_c_tclconfig}" = x ; then
|
200 |
|
|
for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
|
201 |
|
|
if test -f "$i/tclConfig.sh" ; then
|
202 |
|
|
ac_cv_c_tclconfig=`(cd $i; pwd)`
|
203 |
|
|
break
|
204 |
|
|
fi
|
205 |
|
|
done
|
206 |
|
|
fi
|
207 |
|
|
# check in a few other private locations
|
208 |
|
|
if test x"${ac_cv_c_tclconfig}" = x ; then
|
209 |
|
|
for i in \
|
210 |
|
|
${srcdir}/../tcl \
|
211 |
|
|
`ls -dr ${srcdir}/../tcl[[7-9]]* 2>/dev/null` ; do
|
212 |
|
|
if test -f "$i/${configdir}/tclConfig.sh" ; then
|
213 |
|
|
ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
|
214 |
|
|
break
|
215 |
|
|
fi
|
216 |
|
|
done
|
217 |
|
|
fi
|
218 |
|
|
])
|
219 |
|
|
if test x"${ac_cv_c_tclconfig}" = x ; then
|
220 |
|
|
TCLCONFIG="# no Tcl configs found"
|
221 |
|
|
AC_MSG_WARN(Can't find Tcl configuration definitions)
|
222 |
|
|
else
|
223 |
|
|
no_tcl=
|
224 |
|
|
TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh
|
225 |
|
|
AC_MSG_RESULT(found $TCLCONFIG)
|
226 |
|
|
fi
|
227 |
|
|
fi
|
228 |
|
|
])
|
229 |
|
|
|
230 |
|
|
# Defined as a separate macro so we don't have to cache the values
|
231 |
|
|
# from PATH_TCLCONFIG (because this can also be cached).
|
232 |
|
|
AC_DEFUN(CY_AC_LOAD_TCLCONFIG, [
|
233 |
|
|
. $TCLCONFIG
|
234 |
|
|
|
235 |
|
|
AC_SUBST(TCL_VERSION)
|
236 |
|
|
AC_SUBST(TCL_MAJOR_VERSION)
|
237 |
|
|
AC_SUBST(TCL_MINOR_VERSION)
|
238 |
|
|
AC_SUBST(TCL_CC)
|
239 |
|
|
AC_SUBST(TCL_DEFS)
|
240 |
|
|
|
241 |
|
|
dnl not used, don't export to save symbols
|
242 |
|
|
dnl AC_SUBST(TCL_LIB_FILE)
|
243 |
|
|
|
244 |
|
|
dnl don't export, not used outside of configure
|
245 |
|
|
dnl AC_SUBST(TCL_LIBS)
|
246 |
|
|
dnl not used, don't export to save symbols
|
247 |
|
|
dnl AC_SUBST(TCL_PREFIX)
|
248 |
|
|
|
249 |
|
|
dnl not used, don't export to save symbols
|
250 |
|
|
dnl AC_SUBST(TCL_EXEC_PREFIX)
|
251 |
|
|
|
252 |
|
|
AC_SUBST(TCL_SHLIB_CFLAGS)
|
253 |
|
|
AC_SUBST(TCL_SHLIB_LD)
|
254 |
|
|
dnl don't export, not used outside of configure
|
255 |
|
|
AC_SUBST(TCL_SHLIB_LD_LIBS)
|
256 |
|
|
AC_SUBST(TCL_SHLIB_SUFFIX)
|
257 |
|
|
dnl not used, don't export to save symbols
|
258 |
|
|
AC_SUBST(TCL_DL_LIBS)
|
259 |
|
|
AC_SUBST(TCL_LD_FLAGS)
|
260 |
|
|
dnl don't export, not used outside of configure
|
261 |
|
|
AC_SUBST(TCL_LD_SEARCH_FLAGS)
|
262 |
|
|
AC_SUBST(TCL_COMPAT_OBJS)
|
263 |
|
|
AC_SUBST(TCL_RANLIB)
|
264 |
|
|
AC_SUBST(TCL_BUILD_LIB_SPEC)
|
265 |
|
|
AC_SUBST(TCL_LIB_SPEC)
|
266 |
|
|
AC_SUBST(TCL_LIB_VERSIONS_OK)
|
267 |
|
|
|
268 |
|
|
dnl not used, don't export to save symbols
|
269 |
|
|
dnl AC_SUBST(TCL_SHARED_LIB_SUFFIX)
|
270 |
|
|
|
271 |
|
|
dnl not used, don't export to save symbols
|
272 |
|
|
dnl AC_SUBST(TCL_UNSHARED_LIB_SUFFIX)
|
273 |
|
|
])
|
274 |
|
|
|
275 |
|
|
# Warning: Tk definitions are very similar to Tcl definitions but
|
276 |
|
|
# are not precisely the same. There are a couple of differences,
|
277 |
|
|
# so don't do changes to Tcl thinking you can cut and paste it do
|
278 |
|
|
# the Tk differences and later simply substitute "Tk" for "Tcl".
|
279 |
|
|
# Known differences:
|
280 |
|
|
# - Acceptable Tcl major version #s is 7-9 while Tk is 4-9
|
281 |
|
|
# - Searching for Tcl includes looking for tclInt.h, Tk looks for tk.h
|
282 |
|
|
# - Computing major/minor versions is different because Tk depends on
|
283 |
|
|
# headers to Tcl, Tk, and X.
|
284 |
|
|
# - Symbols in tkConfig.sh are different than tclConfig.sh
|
285 |
|
|
# - Acceptable for Tk to be missing but not Tcl.
|
286 |
|
|
|
287 |
|
|
AC_DEFUN(CY_AC_PATH_TKH, [
|
288 |
|
|
#
|
289 |
|
|
# Ok, lets find the tk source trees so we can use the headers
|
290 |
|
|
# If the directory (presumably symlink) named "tk" exists, use that one
|
291 |
|
|
# in preference to any others. Same logic is used when choosing library
|
292 |
|
|
# and again with Tcl. The search order is the best place to look first, then in
|
293 |
|
|
# decreasing significance. The loop breaks if the trigger file is found.
|
294 |
|
|
# Note the gross little conversion here of srcdir by cd'ing to the found
|
295 |
|
|
# directory. This converts the path from a relative to an absolute, so
|
296 |
|
|
# recursive cache variables for the path will work right. We check all
|
297 |
|
|
# the possible paths in one loop rather than many seperate loops to speed
|
298 |
|
|
# things up.
|
299 |
|
|
# the alternative search directory is involked by --with-tkinclude
|
300 |
|
|
#
|
301 |
|
|
no_tk=true
|
302 |
|
|
AC_MSG_CHECKING(for Tk private headers)
|
303 |
|
|
AC_ARG_WITH(tkinclude, [ --with-tkinclude=DIR Directory where tk private headers are], with_tkinclude=${withval})
|
304 |
|
|
AC_CACHE_VAL(ac_cv_c_tkh,[
|
305 |
|
|
# first check to see if --with-tkinclude was specified
|
306 |
|
|
if test x"${with_tkinclude}" != x ; then
|
307 |
|
|
if test -f ${with_tkinclude}/tk.h ; then
|
308 |
|
|
ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
|
309 |
|
|
elif test -f ${with_tkinclude}/generic/tk.h ; then
|
310 |
|
|
ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)`
|
311 |
|
|
else
|
312 |
|
|
AC_MSG_ERROR([${with_tkinclude} directory doesn't contain private headers])
|
313 |
|
|
fi
|
314 |
|
|
fi
|
315 |
|
|
|
316 |
|
|
# next check if it came with Tk configuration file
|
317 |
|
|
if test x"${ac_cv_c_tkconfig}" = x ; then
|
318 |
|
|
if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then
|
319 |
|
|
ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)`
|
320 |
|
|
fi
|
321 |
|
|
fi
|
322 |
|
|
|
323 |
|
|
# next check in private source directory
|
324 |
|
|
#
|
325 |
|
|
# since ls returns lowest version numbers first, reverse its output
|
326 |
|
|
if test x"${ac_cv_c_tkh}" = x ; then
|
327 |
|
|
for i in \
|
328 |
|
|
${srcdir}/../tk \
|
329 |
|
|
`ls -dr ${srcdir}/../tk[[4-9]]* 2>/dev/null` \
|
330 |
|
|
${srcdir}/../../tk \
|
331 |
|
|
`ls -dr ${srcdir}/../../tk[[4-9]]* 2>/dev/null` \
|
332 |
|
|
${srcdir}/../../../tk \
|
333 |
|
|
`ls -dr ${srcdir}/../../../tk[[4-9]]* 2>/dev/null ` ; do
|
334 |
|
|
if test -f $i/generic/tk.h ; then
|
335 |
|
|
ac_cv_c_tkh=`(cd $i/generic; pwd)`
|
336 |
|
|
break
|
337 |
|
|
fi
|
338 |
|
|
done
|
339 |
|
|
fi
|
340 |
|
|
# finally check in a few common install locations
|
341 |
|
|
#
|
342 |
|
|
# since ls returns lowest version numbers first, reverse its output
|
343 |
|
|
if test x"${ac_cv_c_tkh}" = x ; then
|
344 |
|
|
for i in \
|
345 |
|
|
`ls -dr /usr/local/src/tk[[4-9]]* 2>/dev/null` \
|
346 |
|
|
`ls -dr /usr/local/lib/tk[[4-9]]* 2>/dev/null` \
|
347 |
|
|
/usr/local/src/tk \
|
348 |
|
|
/usr/local/lib/tk \
|
349 |
|
|
${prefix}/include ; do
|
350 |
|
|
if test -f $i/generic/tk.h ; then
|
351 |
|
|
ac_cv_c_tkh=`(cd $i/generic; pwd)`
|
352 |
|
|
break
|
353 |
|
|
fi
|
354 |
|
|
done
|
355 |
|
|
fi
|
356 |
|
|
# see if one is installed
|
357 |
|
|
if test x"${ac_cv_c_tkh}" = x ; then
|
358 |
|
|
AC_HEADER_CHECK(tk.h, ac_cv_c_tkh=installed, ac_cv_c_tkh="")
|
359 |
|
|
fi
|
360 |
|
|
])
|
361 |
|
|
if test x"${ac_cv_c_tkh}" != x ; then
|
362 |
|
|
no_tk=""
|
363 |
|
|
if test x"${ac_cv_c_tkh}" = x"installed" ; then
|
364 |
|
|
AC_MSG_RESULT([is installed])
|
365 |
|
|
TKHDIR=""
|
366 |
|
|
else
|
367 |
|
|
AC_MSG_RESULT([found in ${ac_cv_c_tkh}])
|
368 |
|
|
# this hack is cause the TKHDIR won't print if there is a "-I" in it.
|
369 |
|
|
TKHDIR="-I${ac_cv_c_tkh}"
|
370 |
|
|
fi
|
371 |
|
|
else
|
372 |
|
|
TKHDIR="# no Tk directory found"
|
373 |
|
|
AC_MSG_WARN([Can't find Tk private headers])
|
374 |
|
|
no_tk=true
|
375 |
|
|
fi
|
376 |
|
|
|
377 |
|
|
AC_SUBST(TKHDIR)
|
378 |
|
|
])
|
379 |
|
|
|
380 |
|
|
|
381 |
|
|
AC_DEFUN(CY_AC_PATH_TKCONFIG, [
|
382 |
|
|
#
|
383 |
|
|
# Ok, lets find the tk configuration
|
384 |
|
|
# First, look for one uninstalled.
|
385 |
|
|
# the alternative search directory is invoked by --with-tkconfig
|
386 |
|
|
#
|
387 |
|
|
|
388 |
|
|
if test x"${no_tk}" = x ; then
|
389 |
|
|
# we reset no_tk in case something fails here
|
390 |
|
|
no_tk=true
|
391 |
|
|
AC_ARG_WITH(tkconfig, [ --with-tkconfig=DIR Directory containing tk configuration (tkConfig.sh)],
|
392 |
|
|
with_tkconfig=${withval})
|
393 |
|
|
AC_MSG_CHECKING([for Tk configuration])
|
394 |
|
|
AC_CACHE_VAL(ac_cv_c_tkconfig,[
|
395 |
|
|
|
396 |
|
|
# First check to see if --with-tkconfig was specified.
|
397 |
|
|
if test x"${with_tkconfig}" != x ; then
|
398 |
|
|
if test -f "${with_tkconfig}/tkConfig.sh" ; then
|
399 |
|
|
ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
|
400 |
|
|
else
|
401 |
|
|
AC_MSG_ERROR([${with_tkconfig} directory doesn't contain tkConfig.sh])
|
402 |
|
|
fi
|
403 |
|
|
fi
|
404 |
|
|
|
405 |
|
|
# then check for a private Tk library
|
406 |
|
|
if test x"${ac_cv_c_tkconfig}" = x ; then
|
407 |
|
|
for i in \
|
408 |
|
|
../tk \
|
409 |
|
|
`ls -dr ../tk[[4-9]]* 2>/dev/null` \
|
410 |
|
|
../../tk \
|
411 |
|
|
`ls -dr ../../tk[[4-9]]* 2>/dev/null` \
|
412 |
|
|
../../../tk \
|
413 |
|
|
`ls -dr ../../../tk[[4-9]]* 2>/dev/null` ; do
|
414 |
|
|
if test -f "$i/${configdir}/tkConfig.sh" ; then
|
415 |
|
|
ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
|
416 |
|
|
break
|
417 |
|
|
fi
|
418 |
|
|
done
|
419 |
|
|
fi
|
420 |
|
|
# check in a few common install locations
|
421 |
|
|
if test x"${ac_cv_c_tkconfig}" = x ; then
|
422 |
|
|
for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
|
423 |
|
|
if test -f "$i/tkConfig.sh" ; then
|
424 |
|
|
ac_cv_c_tkconfig=`(cd $i; pwd)`
|
425 |
|
|
break
|
426 |
|
|
fi
|
427 |
|
|
done
|
428 |
|
|
fi
|
429 |
|
|
# check in a few other private locations
|
430 |
|
|
if test x"${ac_cv_c_tkconfig}" = x ; then
|
431 |
|
|
for i in \
|
432 |
|
|
${srcdir}/../tk \
|
433 |
|
|
`ls -dr ${srcdir}/../tk[[4-9]]* 2>/dev/null` ; do
|
434 |
|
|
if test -f "$i/${configdir}/tkConfig.sh" ; then
|
435 |
|
|
ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
|
436 |
|
|
break
|
437 |
|
|
fi
|
438 |
|
|
done
|
439 |
|
|
fi
|
440 |
|
|
])
|
441 |
|
|
if test x"${ac_cv_c_tkconfig}" = x ; then
|
442 |
|
|
TKCONFIG="# no Tk configs found"
|
443 |
|
|
AC_MSG_WARN(Can't find Tk configuration definitions)
|
444 |
|
|
else
|
445 |
|
|
no_tk=
|
446 |
|
|
TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh
|
447 |
|
|
AC_MSG_RESULT(found $TKCONFIG)
|
448 |
|
|
fi
|
449 |
|
|
fi
|
450 |
|
|
|
451 |
|
|
])
|
452 |
|
|
|
453 |
|
|
# Defined as a separate macro so we don't have to cache the values
|
454 |
|
|
# from PATH_TKCONFIG (because this can also be cached).
|
455 |
|
|
AC_DEFUN(CY_AC_LOAD_TKCONFIG, [
|
456 |
|
|
if test -f "$TKCONFIG" ; then
|
457 |
|
|
. $TKCONFIG
|
458 |
|
|
fi
|
459 |
|
|
|
460 |
|
|
AC_SUBST(TK_VERSION)
|
461 |
|
|
dnl not actually used, don't export to save symbols
|
462 |
|
|
dnl AC_SUBST(TK_MAJOR_VERSION)
|
463 |
|
|
dnl AC_SUBST(TK_MINOR_VERSION)
|
464 |
|
|
AC_SUBST(TK_DEFS)
|
465 |
|
|
|
466 |
|
|
dnl not used, don't export to save symbols
|
467 |
|
|
dnl AC_SUBST(TK_LIB_FILE)
|
468 |
|
|
|
469 |
|
|
dnl not used outside of configure
|
470 |
|
|
dnl AC_SUBST(TK_LIBS)
|
471 |
|
|
dnl not used, don't export to save symbols
|
472 |
|
|
dnl AC_SUBST(TK_PREFIX)
|
473 |
|
|
|
474 |
|
|
dnl not used, don't export to save symbols
|
475 |
|
|
dnl AC_SUBST(TK_EXEC_PREFIX)
|
476 |
|
|
|
477 |
|
|
AC_SUBST(TK_BUILD_INCLUDES)
|
478 |
|
|
AC_SUBST(TK_XINCLUDES)
|
479 |
|
|
AC_SUBST(TK_XLIBSW)
|
480 |
|
|
AC_SUBST(TK_BUILD_LIB_SPEC)
|
481 |
|
|
AC_SUBST(TK_LIB_SPEC)
|
482 |
|
|
])
|
483 |
|
|
|
484 |
|
|
# check for Itcl headers.
|
485 |
|
|
|
486 |
|
|
AC_DEFUN(CY_AC_PATH_ITCLCONFIG, [
|
487 |
|
|
#
|
488 |
|
|
# Ok, lets find the itcl configuration
|
489 |
|
|
# First, look for one uninstalled.
|
490 |
|
|
# the alternative search directory is invoked by --with-itclconfig
|
491 |
|
|
#
|
492 |
|
|
|
493 |
|
|
if test x"${no_itcl}" = x ; then
|
494 |
|
|
# we reset no_itcl in case something fails here
|
495 |
|
|
no_itcl=true
|
496 |
|
|
AC_ARG_WITH(itclconfig, [ --with-itclconfig Directory containing itcl configuration (itclConfig.sh)],
|
497 |
|
|
with_itclconfig=${withval})
|
498 |
|
|
AC_MSG_CHECKING([for Itcl configuration])
|
499 |
|
|
AC_CACHE_VAL(ac_cv_c_itclconfig,[
|
500 |
|
|
|
501 |
|
|
# First check to see if --with-itclconfig was specified.
|
502 |
|
|
if test x"${with_itclconfig}" != x ; then
|
503 |
|
|
if test -f "${with_itclconfig}/itclConfig.sh" ; then
|
504 |
|
|
ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)`
|
505 |
|
|
else
|
506 |
|
|
AC_MSG_ERROR([${with_itclconfig} directory doesn't contain itclConfig.sh])
|
507 |
|
|
fi
|
508 |
|
|
fi
|
509 |
|
|
|
510 |
|
|
# then check for a private Itcl library
|
511 |
|
|
if test x"${ac_cv_c_itclconfig}" = x ; then
|
512 |
|
|
for i in \
|
513 |
|
|
../itcl/itcl \
|
514 |
|
|
`ls -dr ../itcl[[4-9]]*/itcl 2>/dev/null` \
|
515 |
|
|
../../itcl \
|
516 |
|
|
`ls -dr ../../itcl[[4-9]]*/itcl 2>/dev/null` \
|
517 |
|
|
../../../itcl \
|
518 |
|
|
`ls -dr ../../../itcl[[4-9]]*/itcl 2>/dev/null` ; do
|
519 |
|
|
if test -f "$i/itclConfig.sh" ; then
|
520 |
|
|
ac_cv_c_itclconfig=`(cd $i; pwd)`
|
521 |
|
|
break
|
522 |
|
|
fi
|
523 |
|
|
done
|
524 |
|
|
fi
|
525 |
|
|
# check in a few common install locations
|
526 |
|
|
if test x"${ac_cv_c_itclconfig}" = x ; then
|
527 |
|
|
for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
|
528 |
|
|
if test -f "$i/itclConfig.sh" ; then
|
529 |
|
|
ac_cv_c_itclconfig=`(cd $i; pwd)`
|
530 |
|
|
break
|
531 |
|
|
fi
|
532 |
|
|
done
|
533 |
|
|
fi
|
534 |
|
|
# check in a few other private locations
|
535 |
|
|
if test x"${ac_cv_c_itclconfig}" = x ; then
|
536 |
|
|
for i in \
|
537 |
|
|
${srcdir}/../itcl/itcl \
|
538 |
|
|
`ls -dr ${srcdir}/../itcl[[4-9]]*/itcl 2>/dev/null` ; do
|
539 |
|
|
if test -f "$i/itclConfig.sh" ; then
|
540 |
|
|
ac_cv_c_itclconfig=`(cd $i; pwd)`
|
541 |
|
|
break
|
542 |
|
|
fi
|
543 |
|
|
done
|
544 |
|
|
fi
|
545 |
|
|
])
|
546 |
|
|
if test x"${ac_cv_c_itclconfig}" = x ; then
|
547 |
|
|
ITCLCONFIG="# no Itcl configs found"
|
548 |
|
|
AC_MSG_WARN(Can't find Itcl configuration definitions)
|
549 |
|
|
else
|
550 |
|
|
no_itcl=
|
551 |
|
|
ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh
|
552 |
|
|
AC_MSG_RESULT(found $ITCLCONFIG)
|
553 |
|
|
fi
|
554 |
|
|
fi
|
555 |
|
|
])
|
556 |
|
|
|
557 |
|
|
# Defined as a separate macro so we don't have to cache the values
|
558 |
|
|
# from PATH_ITCLCONFIG (because this can also be cached).
|
559 |
|
|
AC_DEFUN(CY_AC_LOAD_ITCLCONFIG, [
|
560 |
|
|
if test -f "$ITCLCONFIG" ; then
|
561 |
|
|
. $ITCLCONFIG
|
562 |
|
|
fi
|
563 |
|
|
|
564 |
|
|
AC_SUBST(ITCL_VERSION)
|
565 |
|
|
dnl not actually used, don't export to save symbols
|
566 |
|
|
dnl AC_SUBST(ITCL_MAJOR_VERSION)
|
567 |
|
|
dnl AC_SUBST(ITCL_MINOR_VERSION)
|
568 |
|
|
AC_SUBST(ITCL_DEFS)
|
569 |
|
|
|
570 |
|
|
dnl not used, don't export to save symbols
|
571 |
|
|
dnl AC_SUBST(ITCL_LIB_FILE)
|
572 |
|
|
|
573 |
|
|
dnl not used outside of configure
|
574 |
|
|
dnl AC_SUBST(ITCL_LIBS)
|
575 |
|
|
dnl not used, don't export to save symbols
|
576 |
|
|
dnl AC_SUBST(ITCL_PREFIX)
|
577 |
|
|
|
578 |
|
|
dnl not used, don't export to save symbols
|
579 |
|
|
dnl AC_SUBST(ITCL_EXEC_PREFIX)
|
580 |
|
|
|
581 |
|
|
AC_SUBST(ITCL_BUILD_INCLUDES)
|
582 |
|
|
AC_SUBST(ITCL_BUILD_LIB_SPEC)
|
583 |
|
|
AC_SUBST(ITCL_LIB_SPEC)
|
584 |
|
|
])
|
585 |
|
|
|
586 |
|
|
# check for Itcl headers.
|
587 |
|
|
|
588 |
|
|
AC_DEFUN(CY_AC_PATH_ITCLH, [
|
589 |
|
|
AC_MSG_CHECKING(for Itcl private headers. srcdir=${srcdir})
|
590 |
|
|
if test x"${ac_cv_c_itclh}" = x ; then
|
591 |
|
|
for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do
|
592 |
|
|
if test -f $i/generic/itcl.h ; then
|
593 |
|
|
ac_cv_c_itclh=`(cd $i/generic; pwd)`
|
594 |
|
|
break
|
595 |
|
|
fi
|
596 |
|
|
done
|
597 |
|
|
fi
|
598 |
|
|
if test x"${ac_cv_c_itclh}" = x ; then
|
599 |
|
|
ITCLHDIR="# no Itcl private headers found"
|
600 |
|
|
AC_MSG_ERROR([Can't find Itcl private headers])
|
601 |
|
|
fi
|
602 |
|
|
if test x"${ac_cv_c_itclh}" != x ; then
|
603 |
|
|
ITCLHDIR="-I${ac_cv_c_itclh}"
|
604 |
|
|
fi
|
605 |
|
|
# should always be here
|
606 |
|
|
# ITCLLIB="../itcl/itcl/unix/libitcl.a"
|
607 |
|
|
AC_SUBST(ITCLHDIR)
|
608 |
|
|
#AC_SUBST(ITCLLIB)
|
609 |
|
|
])
|
610 |
|
|
|
611 |
|
|
|
612 |
|
|
AC_DEFUN(CY_AC_PATH_ITKCONFIG, [
|
613 |
|
|
#
|
614 |
|
|
# Ok, lets find the itk configuration
|
615 |
|
|
# First, look for one uninstalled.
|
616 |
|
|
# the alternative search directory is invoked by --with-itkconfig
|
617 |
|
|
#
|
618 |
|
|
|
619 |
|
|
if test x"${no_itk}" = x ; then
|
620 |
|
|
# we reset no_itk in case something fails here
|
621 |
|
|
no_itk=true
|
622 |
|
|
AC_ARG_WITH(itkconfig, [ --with-itkconfig Directory containing itk configuration (itkConfig.sh)],
|
623 |
|
|
with_itkconfig=${withval})
|
624 |
|
|
AC_MSG_CHECKING([for Itk configuration])
|
625 |
|
|
AC_CACHE_VAL(ac_cv_c_itkconfig,[
|
626 |
|
|
|
627 |
|
|
# First check to see if --with-itkconfig was specified.
|
628 |
|
|
if test x"${with_itkconfig}" != x ; then
|
629 |
|
|
if test -f "${with_itkconfig}/itkConfig.sh" ; then
|
630 |
|
|
ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)`
|
631 |
|
|
else
|
632 |
|
|
AC_MSG_ERROR([${with_itkconfig} directory doesn't contain itkConfig.sh])
|
633 |
|
|
fi
|
634 |
|
|
fi
|
635 |
|
|
|
636 |
|
|
# then check for a private Itk library
|
637 |
|
|
if test x"${ac_cv_c_itkconfig}" = x ; then
|
638 |
|
|
for i in \
|
639 |
|
|
../itcl/itk \
|
640 |
|
|
`ls -dr ../itcl[[4-9]]*/itk 2>/dev/null` \
|
641 |
|
|
../../itk \
|
642 |
|
|
`ls -dr ../../itcl[[4-9]]*/itk 2>/dev/null` \
|
643 |
|
|
../../../itk \
|
644 |
|
|
`ls -dr ../../../itcl[[4-9]]*/itk 2>/dev/null` ; do
|
645 |
|
|
if test -f "$i/itkConfig.sh" ; then
|
646 |
|
|
ac_cv_c_itkconfig=`(cd $i; pwd)`
|
647 |
|
|
break
|
648 |
|
|
fi
|
649 |
|
|
done
|
650 |
|
|
fi
|
651 |
|
|
# check in a few common install locations
|
652 |
|
|
if test x"${ac_cv_c_itkconfig}" = x ; then
|
653 |
|
|
for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
|
654 |
|
|
if test -f "$i/itkConfig.sh" ; then
|
655 |
|
|
ac_cv_c_itkconfig=`(cd $i; pwd)`
|
656 |
|
|
break
|
657 |
|
|
fi
|
658 |
|
|
done
|
659 |
|
|
fi
|
660 |
|
|
# check in a few other private locations
|
661 |
|
|
if test x"${ac_cv_c_itkconfig}" = x ; then
|
662 |
|
|
for i in \
|
663 |
|
|
${srcdir}/../itcl/itk \
|
664 |
|
|
`ls -dr ${srcdir}/../itcl[[4-9]]*/itk 2>/dev/null` ; do
|
665 |
|
|
if test -f "$i/itkConfig.sh" ; then
|
666 |
|
|
ac_cv_c_itkconfig=`(cd $i; pwd)`
|
667 |
|
|
break
|
668 |
|
|
fi
|
669 |
|
|
done
|
670 |
|
|
fi
|
671 |
|
|
])
|
672 |
|
|
if test x"${ac_cv_c_itkconfig}" = x ; then
|
673 |
|
|
ITKCONFIG="# no Itk configs found"
|
674 |
|
|
AC_MSG_WARN(Can't find Itk configuration definitions)
|
675 |
|
|
else
|
676 |
|
|
no_itk=
|
677 |
|
|
ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh
|
678 |
|
|
AC_MSG_RESULT(found $ITKCONFIG)
|
679 |
|
|
fi
|
680 |
|
|
fi
|
681 |
|
|
|
682 |
|
|
])
|
683 |
|
|
|
684 |
|
|
# Defined as a separate macro so we don't have to cache the values
|
685 |
|
|
# from PATH_ITKCONFIG (because this can also be cached).
|
686 |
|
|
AC_DEFUN(CY_AC_LOAD_ITKCONFIG, [
|
687 |
|
|
if test -f "$ITKCONFIG" ; then
|
688 |
|
|
. $ITKCONFIG
|
689 |
|
|
fi
|
690 |
|
|
|
691 |
|
|
AC_SUBST(ITK_VERSION)
|
692 |
|
|
dnl not actually used, don't export to save symbols
|
693 |
|
|
dnl AC_SUBST(ITK_MAJOR_VERSION)
|
694 |
|
|
dnl AC_SUBST(ITK_MINOR_VERSION)
|
695 |
|
|
AC_SUBST(ITK_DEFS)
|
696 |
|
|
|
697 |
|
|
dnl not used, don't export to save symbols
|
698 |
|
|
dnl AC_SUBST(ITK_LIB_FILE)
|
699 |
|
|
|
700 |
|
|
dnl not used outside of configure
|
701 |
|
|
dnl AC_SUBST(ITK_LIBS)
|
702 |
|
|
dnl not used, don't export to save symbols
|
703 |
|
|
dnl AC_SUBST(ITK_PREFIX)
|
704 |
|
|
|
705 |
|
|
dnl not used, don't export to save symbols
|
706 |
|
|
dnl AC_SUBST(ITK_EXEC_PREFIX)
|
707 |
|
|
|
708 |
|
|
AC_SUBST(ITK_BUILD_INCLUDES)
|
709 |
|
|
AC_SUBST(ITK_BUILD_LIB_SPEC)
|
710 |
|
|
AC_SUBST(ITK_LIB_SPEC)
|
711 |
|
|
])
|
712 |
|
|
|
713 |
|
|
AC_DEFUN(CY_AC_PATH_ITKH, [
|
714 |
|
|
AC_MSG_CHECKING(for Itk private headers. srcdir=${srcdir})
|
715 |
|
|
if test x"${ac_cv_c_itkh}" = x ; then
|
716 |
|
|
for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do
|
717 |
|
|
if test -f $i/generic/itk.h ; then
|
718 |
|
|
ac_cv_c_itkh=`(cd $i/generic; pwd)`
|
719 |
|
|
break
|
720 |
|
|
fi
|
721 |
|
|
done
|
722 |
|
|
fi
|
723 |
|
|
if test x"${ac_cv_c_itkh}" = x ; then
|
724 |
|
|
ITKHDIR="# no Itk private headers found"
|
725 |
|
|
AC_MSG_ERROR([Can't find Itk private headers])
|
726 |
|
|
fi
|
727 |
|
|
if test x"${ac_cv_c_itkh}" != x ; then
|
728 |
|
|
ITKHDIR="-I${ac_cv_c_itkh}"
|
729 |
|
|
fi
|
730 |
|
|
# should always be here
|
731 |
|
|
# ITKLIB="../itcl/itk/unix/libitk.a"
|
732 |
|
|
AC_SUBST(ITKHDIR)
|
733 |
|
|
#AC_SUBST(ITKLIB)
|
734 |
|
|
])
|
735 |
|
|
|
736 |
|
|
# check for Tix headers.
|
737 |
|
|
|
738 |
|
|
AC_DEFUN(CY_AC_PATH_TIXH, [
|
739 |
|
|
AC_MSG_CHECKING(for Tix private headers. srcdir=${srcdir})
|
740 |
|
|
if test x"${ac_cv_c_tixh}" = x ; then
|
741 |
|
|
for i in ${srcdir}/../tix ${srcdir}/../../tix ${srcdir}/../../../tix ; do
|
742 |
|
|
if test -f $i/generic/tix.h ; then
|
743 |
|
|
ac_cv_c_tixh=`(cd $i/generic; pwd)`
|
744 |
|
|
break
|
745 |
|
|
fi
|
746 |
|
|
done
|
747 |
|
|
fi
|
748 |
|
|
if test x"${ac_cv_c_tixh}" = x ; then
|
749 |
|
|
TIXHDIR="# no Tix private headers found"
|
750 |
|
|
AC_MSG_ERROR([Can't find Tix private headers])
|
751 |
|
|
fi
|
752 |
|
|
if test x"${ac_cv_c_tixh}" != x ; then
|
753 |
|
|
TIXHDIR="-I${ac_cv_c_tixh}"
|
754 |
|
|
fi
|
755 |
|
|
AC_SUBST(TIXHDIR)
|
756 |
|
|
])
|
757 |
|
|
|
758 |
|
|
AC_DEFUN(CY_AC_PATH_TIXCONFIG, [
|
759 |
|
|
#
|
760 |
|
|
# Ok, lets find the tix configuration
|
761 |
|
|
# First, look for one uninstalled.
|
762 |
|
|
# the alternative search directory is invoked by --with-itkconfig
|
763 |
|
|
#
|
764 |
|
|
|
765 |
|
|
if test x"${no_tix}" = x ; then
|
766 |
|
|
# we reset no_tix in case something fails here
|
767 |
|
|
no_tix=true
|
768 |
|
|
AC_ARG_WITH(tixconfig, [ --with-tixconfig Directory containing tix configuration (tixConfig.sh)],
|
769 |
|
|
with_tixconfig=${withval})
|
770 |
|
|
AC_MSG_CHECKING([for Tix configuration])
|
771 |
|
|
AC_CACHE_VAL(ac_cv_c_tixconfig,[
|
772 |
|
|
|
773 |
|
|
# First check to see if --with-tixconfig was specified.
|
774 |
|
|
if test x"${with_tixconfig}" != x ; then
|
775 |
|
|
if test -f "${with_tixconfig}/tixConfig.sh" ; then
|
776 |
|
|
ac_cv_c_tixconfig=`(cd ${with_tixconfig}; pwd)`
|
777 |
|
|
else
|
778 |
|
|
AC_MSG_ERROR([${with_tixconfig} directory doesn't contain tixConfig.sh])
|
779 |
|
|
fi
|
780 |
|
|
fi
|
781 |
|
|
|
782 |
|
|
# then check for a private Tix library
|
783 |
|
|
if test x"${ac_cv_c_tixconfig}" = x ; then
|
784 |
|
|
for i in \
|
785 |
|
|
../tix \
|
786 |
|
|
`ls -dr ../tix 2>/dev/null` \
|
787 |
|
|
../../tix \
|
788 |
|
|
`ls -dr ../../tix 2>/dev/null` \
|
789 |
|
|
../../../tix \
|
790 |
|
|
`ls -dr ../../../tix 2>/dev/null` ; do
|
791 |
|
|
echo "**** Looking at $i - with ${configdir}"
|
792 |
|
|
if test -f "$i/tixConfig.sh" ; then
|
793 |
|
|
ac_cv_c_tixconfig=`(cd $i; pwd)`
|
794 |
|
|
break
|
795 |
|
|
fi
|
796 |
|
|
done
|
797 |
|
|
fi
|
798 |
|
|
# check in a few common install locations
|
799 |
|
|
if test x"${ac_cv_c_tixconfig}" = x ; then
|
800 |
|
|
for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
|
801 |
|
|
echo "**** Looking at $i"
|
802 |
|
|
if test -f "$i/tixConfig.sh" ; then
|
803 |
|
|
ac_cv_c_tixconfig=`(cd $i; pwd)`
|
804 |
|
|
break
|
805 |
|
|
fi
|
806 |
|
|
done
|
807 |
|
|
fi
|
808 |
|
|
# check in a few other private locations
|
809 |
|
|
echo "**** Other private locations"
|
810 |
|
|
if test x"${ac_cv_c_tixconfig}" = x ; then
|
811 |
|
|
for i in \
|
812 |
|
|
${srcdir}/../tix \
|
813 |
|
|
`ls -dr ${srcdir}/../tix 2>/dev/null` ; do
|
814 |
|
|
echo "**** Looking at $i - with ${configdir}"
|
815 |
|
|
if test -f "$i/${configdir}/tixConfig.sh" ; then
|
816 |
|
|
ac_cv_c_tixconfig=`(cd $i/${configdir}; pwd)`
|
817 |
|
|
break
|
818 |
|
|
fi
|
819 |
|
|
done
|
820 |
|
|
fi
|
821 |
|
|
])
|
822 |
|
|
if test x"${ac_cv_c_tixconfig}" = x ; then
|
823 |
|
|
TIXCONFIG="# no Tix configs found"
|
824 |
|
|
AC_MSG_WARN(Can't find Tix configuration definitions)
|
825 |
|
|
else
|
826 |
|
|
no_tix=
|
827 |
|
|
TIXCONFIG=${ac_cv_c_tixconfig}/tixConfig.sh
|
828 |
|
|
AC_MSG_RESULT(found $TIXCONFIG)
|
829 |
|
|
fi
|
830 |
|
|
fi
|
831 |
|
|
|
832 |
|
|
])
|
833 |
|
|
|
834 |
|
|
# Defined as a separate macro so we don't have to cache the values
|
835 |
|
|
# from PATH_TIXCONFIG (because this can also be cached).
|
836 |
|
|
AC_DEFUN(CY_AC_LOAD_TIXCONFIG, [
|
837 |
|
|
if test -f "$TIXCONFIG" ; then
|
838 |
|
|
. $TIXCONFIG
|
839 |
|
|
fi
|
840 |
|
|
|
841 |
|
|
AC_SUBST(TIX_VERSION)
|
842 |
|
|
dnl not actually used, don't export to save symbols
|
843 |
|
|
dnl AC_SUBST(TIX_MAJOR_VERSION)
|
844 |
|
|
dnl AC_SUBST(TIX_MINOR_VERSION)
|
845 |
|
|
dnl AC_SUBST(TIX_DEFS)
|
846 |
|
|
|
847 |
|
|
dnl not used, don't export to save symbols
|
848 |
|
|
dnl dnl AC_SUBST(TIX_LIB_FILE)
|
849 |
|
|
|
850 |
|
|
dnl not used outside of configure
|
851 |
|
|
dnl AC_SUBST(TIX_LIBS)
|
852 |
|
|
dnl not used, don't export to save symbols
|
853 |
|
|
dnl AC_SUBST(TIX_PREFIX)
|
854 |
|
|
|
855 |
|
|
dnl not used, don't export to save symbols
|
856 |
|
|
dnl AC_SUBST(TIX_EXEC_PREFIX)
|
857 |
|
|
|
858 |
|
|
dnl AC_SUBST(TIX_BUILD_INCLUDES)
|
859 |
|
|
AC_SUBST(TIX_BUILD_LIB_SPEC)
|
860 |
|
|
dnl AC_SUBST(TIX_LIB_SPEC)
|
861 |
|
|
])
|
862 |
|
|
|
863 |
|
|
dnl sinclude(../gettext.m4) already included by bfd/acinclude.m4
|
864 |
|
|
dnl The lines below arrange for aclocal not to bring gettext.m4's
|
865 |
|
|
dnl CY_GNU_GETTEXT into aclocal.m4.
|
866 |
|
|
ifelse(yes,no,[
|
867 |
|
|
AC_DEFUN([CY_GNU_GETTEXT],)
|
868 |
|
|
])
|
869 |
|
|
|
870 |
|
|
## ----------------------------------------- ##
|
871 |
|
|
## ANSIfy the C compiler whenever possible. ##
|
872 |
|
|
## From Franc,ois Pinard ##
|
873 |
|
|
## ----------------------------------------- ##
|
874 |
|
|
|
875 |
|
|
# Copyright 1996, 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
|
876 |
|
|
|
877 |
|
|
# This program is free software; you can redistribute it and/or modify
|
878 |
|
|
# it under the terms of the GNU General Public License as published by
|
879 |
|
|
# the Free Software Foundation; either version 2, or (at your option)
|
880 |
|
|
# any later version.
|
881 |
|
|
|
882 |
|
|
# This program is distributed in the hope that it will be useful,
|
883 |
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
884 |
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
885 |
|
|
# GNU General Public License for more details.
|
886 |
|
|
|
887 |
|
|
# You should have received a copy of the GNU General Public License
|
888 |
|
|
# along with this program; if not, write to the Free Software
|
889 |
|
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
890 |
|
|
# 02111-1307, USA.
|
891 |
|
|
|
892 |
|
|
# serial 1
|
893 |
|
|
|
894 |
|
|
# @defmac AC_PROG_CC_STDC
|
895 |
|
|
# @maindex PROG_CC_STDC
|
896 |
|
|
# @ovindex CC
|
897 |
|
|
# If the C compiler in not in ANSI C mode by default, try to add an option
|
898 |
|
|
# to output variable @code{CC} to make it so. This macro tries various
|
899 |
|
|
# options that select ANSI C on some system or another. It considers the
|
900 |
|
|
# compiler to be in ANSI C mode if it handles function prototypes correctly.
|
901 |
|
|
#
|
902 |
|
|
# If you use this macro, you should check after calling it whether the C
|
903 |
|
|
# compiler has been set to accept ANSI C; if not, the shell variable
|
904 |
|
|
# @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source
|
905 |
|
|
# code in ANSI C, you can make an un-ANSIfied copy of it by using the
|
906 |
|
|
# program @code{ansi2knr}, which comes with Ghostscript.
|
907 |
|
|
# @end defmac
|
908 |
|
|
|
909 |
|
|
AC_DEFUN([AM_PROG_CC_STDC],
|
910 |
|
|
[AC_REQUIRE([AC_PROG_CC])
|
911 |
|
|
AC_BEFORE([$0], [AC_C_INLINE])
|
912 |
|
|
AC_BEFORE([$0], [AC_C_CONST])
|
913 |
|
|
dnl Force this before AC_PROG_CPP. Some cpp's, eg on HPUX, require
|
914 |
|
|
dnl a magic option to avoid problems with ANSI preprocessor commands
|
915 |
|
|
dnl like #elif.
|
916 |
|
|
dnl FIXME: can't do this because then AC_AIX won't work due to a
|
917 |
|
|
dnl circular dependency.
|
918 |
|
|
dnl AC_BEFORE([$0], [AC_PROG_CPP])
|
919 |
|
|
AC_MSG_CHECKING([for ${CC-cc} option to accept ANSI C])
|
920 |
|
|
AC_CACHE_VAL(am_cv_prog_cc_stdc,
|
921 |
|
|
[am_cv_prog_cc_stdc=no
|
922 |
|
|
ac_save_CC="$CC"
|
923 |
|
|
# Don't try gcc -ansi; that turns off useful extensions and
|
924 |
|
|
# breaks some systems' header files.
|
925 |
|
|
# AIX -qlanglvl=ansi
|
926 |
|
|
# Ultrix and OSF/1 -std1
|
927 |
|
|
# HP-UX 10.20 and later -Ae
|
928 |
|
|
# HP-UX older versions -Aa -D_HPUX_SOURCE
|
929 |
|
|
# SVR4 -Xc -D__EXTENSIONS__
|
930 |
|
|
for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
|
931 |
|
|
do
|
932 |
|
|
CC="$ac_save_CC $ac_arg"
|
933 |
|
|
AC_TRY_COMPILE(
|
934 |
|
|
[#include <stdarg.h>
|
935 |
|
|
#include <stdio.h>
|
936 |
|
|
#include <sys/types.h>
|
937 |
|
|
#include <sys/stat.h>
|
938 |
|
|
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
|
939 |
|
|
struct buf { int x; };
|
940 |
|
|
FILE * (*rcsopen) (struct buf *, struct stat *, int);
|
941 |
|
|
static char *e (p, i)
|
942 |
|
|
char **p;
|
943 |
|
|
int i;
|
944 |
|
|
{
|
945 |
|
|
return p[i];
|
946 |
|
|
}
|
947 |
|
|
static char *f (char * (*g) (char **, int), char **p, ...)
|
948 |
|
|
{
|
949 |
|
|
char *s;
|
950 |
|
|
va_list v;
|
951 |
|
|
va_start (v,p);
|
952 |
|
|
s = g (p, va_arg (v,int));
|
953 |
|
|
va_end (v);
|
954 |
|
|
return s;
|
955 |
|
|
}
|
956 |
|
|
int test (int i, double x);
|
957 |
|
|
struct s1 {int (*f) (int a);};
|
958 |
|
|
struct s2 {int (*f) (double a);};
|
959 |
|
|
int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
|
960 |
|
|
int argc;
|
961 |
|
|
char **argv;
|
962 |
|
|
], [
|
963 |
|
|
return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
|
964 |
|
|
],
|
965 |
|
|
[am_cv_prog_cc_stdc="$ac_arg"; break])
|
966 |
|
|
done
|
967 |
|
|
CC="$ac_save_CC"
|
968 |
|
|
])
|
969 |
|
|
if test -z "$am_cv_prog_cc_stdc"; then
|
970 |
|
|
AC_MSG_RESULT([none needed])
|
971 |
|
|
else
|
972 |
|
|
AC_MSG_RESULT([$am_cv_prog_cc_stdc])
|
973 |
|
|
fi
|
974 |
|
|
case "x$am_cv_prog_cc_stdc" in
|
975 |
|
|
x|xno) ;;
|
976 |
|
|
*) CC="$CC $am_cv_prog_cc_stdc" ;;
|
977 |
|
|
esac
|
978 |
|
|
])
|