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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [expect/] [aclocal.m4] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
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 CY_AC_PATH_TCLCONFIG and CY_AC_LOAD_TCLCONFIG should be invoked
5
dnl (in that order) before any other TCL macros.  Similarly for TK.
6
 
7
dnl CYGNUS LOCAL: This gets the right posix flag for gcc
8
AC_DEFUN(CY_AC_TCL_LYNX_POSIX,
9
[AC_REQUIRE([AC_PROG_CC])AC_REQUIRE([AC_PROG_CPP])
10
AC_MSG_CHECKING([if running LynxOS])
11
AC_CACHE_VAL(ac_cv_os_lynx,
12
[AC_EGREP_CPP(yes,
13
[/*
14
 * The old Lynx "cc" only defines "Lynx", but the newer one uses "__Lynx__"
15
 */
16
#if defined(__Lynx__) || defined(Lynx)
17
yes
18
#endif
19
], ac_cv_os_lynx=yes, ac_cv_os_lynx=no)])
20
#
21
if test "$ac_cv_os_lynx" = "yes" ; then
22
  AC_MSG_RESULT(yes)
23
  AC_DEFINE(LYNX)
24
  AC_MSG_CHECKING([whether -mposix or -X is available])
25
  AC_CACHE_VAL(ac_cv_c_posix_flag,
26
  [AC_TRY_COMPILE(,[
27
  /*
28
   * This flag varies depending on how old the compiler is.
29
   * -X is for the old "cc" and "gcc" (based on 1.42).
30
   * -mposix is for the new gcc (at least 2.5.8).
31
   */
32
  #if defined(__GNUC__) && __GNUC__ >= 2
33
  choke me
34
  #endif
35
  ], ac_cv_c_posix_flag=" -mposix", ac_cv_c_posix_flag=" -X")])
36
  CC="$CC $ac_cv_c_posix_flag"
37
  AC_MSG_RESULT($ac_cv_c_posix_flag)
38
  else
39
  AC_MSG_RESULT(no)
40
fi
41
])
42
 
43
#
44
# Sometimes the native compiler is a bogus stub for gcc or /usr/ucb/cc. This
45
# makes configure think it's cross compiling. If --target wasn't used, then
46
# we can't configure, so something is wrong. We don't use the cache
47
# here cause if somebody fixes their compiler install, we want this to work.
48
AC_DEFUN(CY_AC_C_WORKS,
49
[# If we cannot compile and link a trivial program, we can't expect anything to work
50
AC_MSG_CHECKING(whether the compiler ($CC) actually works)
51
AC_TRY_COMPILE(, [/* don't need anything here */],
52
        c_compiles=yes, c_compiles=no)
53
 
54
AC_TRY_LINK(, [/* don't need anything here */],
55
        c_links=yes, c_links=no)
56
 
57
if test x"${c_compiles}" = x"no" ; then
58
  AC_MSG_ERROR(the native compiler is broken and won't compile.)
59
fi
60
 
61
if test x"${c_links}" = x"no" ; then
62
  AC_MSG_ERROR(the native compiler is broken and won't link.)
63
fi
64
AC_MSG_RESULT(yes)
65
])
66
 
67
AC_DEFUN(CY_AC_PATH_TCLH, [
68
#
69
# Ok, lets find the tcl source trees so we can use the headers
70
# Warning: transition of version 9 to 10 will break this algorithm
71
# because 10 sorts before 9. We also look for just tcl. We have to
72
# be careful that we don't match stuff like tclX by accident.
73
# the alternative search directory is involked by --with-tclinclude
74
#
75
no_tcl=true
76
AC_MSG_CHECKING(for Tcl private headers)
77
AC_ARG_WITH(tclinclude, [  --with-tclinclude       directory where tcl private headers are], with_tclinclude=${withval})
78
AC_CACHE_VAL(ac_cv_c_tclh,[
79
# first check to see if --with-tclinclude was specified
80
if test x"${with_tclinclude}" != x ; then
81
  if test -f ${with_tclinclude}/tclInt.h ; then
82
    ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
83
  elif test -f ${with_tclinclude}/generic/tclInt.h ; then
84
    ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)`
85
  else
86
    AC_MSG_ERROR([${with_tclinclude} directory doesn't contain private headers])
87
  fi
88
fi
89
 
90
# next check if it came with Tcl configuration file
91
if test x"${ac_cv_c_tclconfig}" != x ; then
92
  if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then
93
    ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/../generic; pwd)`
94
  fi
95
fi
96
 
97
# next check in private source directory
98
#
99
# since ls returns lowest version numbers first, reverse its output
100
changequote(,)
101
if test x"${ac_cv_c_tclh}" = x ; then
102
  for i in \
103
                ${srcdir}/../tcl \
104
                `ls -dr ${srcdir}/../tcl[7-9].[0-9] 2>/dev/null` \
105
                ${srcdir}/../../tcl \
106
                `ls -dr ${srcdir}/../../tcl[7-9].[0-9] 2>/dev/null` \
107
                ${srcdir}/../../../tcl \
108
                `ls -dr ${srcdir}/../../../tcl[7-9].[0-9] 2>/dev/null ` ; do
109
    if test -f $i/generic/tclInt.h ; then
110
      ac_cv_c_tclh=`(cd $i/generic; pwd)`
111
      break
112
    fi
113
  done
114
fi
115
changequote([,])
116
# finally check in a few common install locations
117
#
118
# since ls returns lowest version numbers first, reverse its output
119
changequote(,)
120
if test x"${ac_cv_c_tclh}" = x ; then
121
  for i in \
122
                `ls -dr /usr/local/src/tcl[7-9].[0-9] 2>/dev/null` \
123
                `ls -dr /usr/local/lib/tcl[7-9].[0-9] 2>/dev/null` \
124
                /usr/local/src/tcl \
125
                /usr/local/lib/tcl \
126
                ${prefix}/include ; do
127
    if test -f $i/generic/tclInt.h ; then
128
      ac_cv_c_tclh=`(cd $i/generic; pwd)`
129
      break
130
    fi
131
  done
132
fi
133
changequote([,])
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
  TCLHDIRDASHI="# no Tcl private headers found"
142
  AC_MSG_ERROR([Can't find Tcl private headers])
143
fi
144
if test x"${ac_cv_c_tclh}" != x ; then
145
  no_tcl=""
146
  if test x"${ac_cv_c_tclh}" = x"installed" ; then
147
    AC_MSG_RESULT([is installed])
148
    TCLHDIR=""
149
    TCLHDIRDASHI=""
150
    TCL_LIBRARY=""
151
  else
152
    AC_MSG_RESULT([found in ${ac_cv_c_tclh}])
153
    # this hack is cause the TCLHDIR won't print if there is a "-I" in it.
154
    TCLHDIR="${ac_cv_c_tclh}"
155
    TCLHDIRDASHI="-I${ac_cv_c_tclh}"
156
    TCL_LIBRARY=`echo $TCLHDIR | sed -e 's/generic//'`library
157
  fi
158
fi
159
 
160
AC_SUBST(TCLHDIR)
161
AC_SUBST(TCLHDIRDASHI)
162
AC_SUBST(TCL_LIBRARY)
163
])
164
 
165
 
166
AC_DEFUN(CY_AC_PATH_TCLCONFIG, [
167
#
168
# Ok, lets find the tcl configuration
169
# First, look for one uninstalled.
170
# the alternative search directory is invoked by --with-tclconfig
171
#
172
 
173
if test x"${no_tcl}" = x ; then
174
  # we reset no_tcl in case something fails here
175
  no_tcl=true
176
  AC_ARG_WITH(tclconfig, [  --with-tclconfig           directory containing tcl configuration (tclConfig.sh)],
177
         with_tclconfig=${withval})
178
  AC_MSG_CHECKING([for Tcl configuration])
179
  AC_CACHE_VAL(ac_cv_c_tclconfig,[
180
 
181
  # First check to see if --with-tclconfig was specified.
182
  if test x"${with_tclconfig}" != x ; then
183
    if test -f "${with_tclconfig}/tclConfig.sh" ; then
184
      ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
185
    else
186
      AC_MSG_ERROR([${with_tclconfig} directory doesn't contain tclConfig.sh])
187
    fi
188
  fi
189
 
190
  # then check for a private Tcl installation
191
changequote(,)
192
  if test x"${ac_cv_c_tclconfig}" = x ; then
193
    for i in \
194
                ../tcl \
195
                `ls -dr ../tcl[7-9].[0-9] 2>/dev/null` \
196
                ../../tcl \
197
                `ls -dr ../../tcl[7-9].[0-9] 2>/dev/null` \
198
                ../../../tcl \
199
                `ls -dr ../../../tcl[7-9].[0-9] 2>/dev/null` ; do
200
      if test -f "$i/unix/tclConfig.sh" ; then
201
        ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
202
        break
203
      fi
204
    done
205
  fi
206
changequote([,])
207
  # check in a few common install locations
208
  if test x"${ac_cv_c_tclconfig}" = x ; then
209
    for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
210
      if test -f "$i/tclConfig.sh" ; then
211
        ac_cv_c_tclconfig=`(cd $i; pwd)`
212
        break
213
      fi
214
    done
215
  fi
216
  # check in a few other private locations
217
changequote(,)
218
  if test x"${ac_cv_c_tclconfig}" = x ; then
219
    for i in \
220
                ${srcdir}/../tcl \
221
                `ls -dr ${srcdir}/../tcl[7-9].[0-9] 2>/dev/null` ; do
222
      if test -f "$i/unix/tclConfig.sh" ; then
223
        ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
224
        break
225
      fi
226
    done
227
  fi
228
changequote([,])
229
  ])
230
  if test x"${ac_cv_c_tclconfig}" = x ; then
231
    TCLCONFIG="# no Tcl configs found"
232
    AC_MSG_WARN(Can't find Tcl configuration definitions)
233
  else
234
    no_tcl=
235
    TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh
236
    AC_MSG_RESULT(found $TCLCONFIG)
237
  fi
238
fi
239
])
240
 
241
# Defined as a separate macro so we don't have to cache the values
242
# from PATH_TCLCONFIG (because this can also be cached).
243
AC_DEFUN(CY_AC_LOAD_TCLCONFIG, [
244
    . $TCLCONFIG
245
 
246
dnl AC_SUBST(TCL_VERSION)
247
dnl AC_SUBST(TCL_MAJOR_VERSION)
248
dnl AC_SUBST(TCL_MINOR_VERSION)
249
dnl AC_SUBST(TCL_CC)
250
    AC_SUBST(TCL_DEFS)
251
 
252
dnl not used, don't export to save symbols
253
dnl    AC_SUBST(TCL_LIB_FILE)
254
 
255
dnl don't export, not used outside of configure
256
dnl     AC_SUBST(TCL_LIBS)
257
dnl not used, don't export to save symbols
258
dnl    AC_SUBST(TCL_PREFIX)
259
 
260
dnl not used, don't export to save symbols
261
dnl    AC_SUBST(TCL_EXEC_PREFIX)
262
 
263
dnl not used, don't export to save symbols
264
dnl AC_SUBST(TCL_SHLIB_CFLAGS)
265
    AC_SUBST(TCL_SHLIB_LD)
266
dnl don't export, not used outside of configure
267
dnl AC_SUBST(TCL_SHLIB_LD_LIBS)
268
dnl AC_SUBST(TCL_SHLIB_SUFFIX)
269
 
270
# Tcl defines TCL_SHLIB_SUFFIX but TCL_SHARED_LIB_SUFFIX then looks for it
271
# as just SHLIB_SUFFIX.  How bizarre.
272
    SHLIB_SUFFIX=$TCL_SHLIB_SUFFIX
273
    AC_SUBST(SHLIB_SUFFIX)
274
 
275
dnl not used, don't export to save symbols
276
dnl AC_SUBST(TCL_DL_LIBS)
277
    AC_SUBST(TCL_LD_FLAGS)
278
dnl don't export, not used outside of configure
279
dnl AC_SUBST(TCL_LD_SEARCH_FLAGS)
280
dnl AC_SUBST(TCL_COMPAT_OBJS)
281
AC_SUBST(TCL_RANLIB)
282
 
283
dnl CYGNUS LOCAL:
284
dnl Anyone that tries to build expect without Tcl, deserves what happens
285
dnl to them.
286
dnl
287
dnl # if Tcl's build directory has been removed, TCL_LIB_SPEC should
288
dnl # be used instead of TCL_BUILD_LIB_SPEC
289
dnl SAVELIBS=$LIBS
290
dnl LIBS="$TCL_BUILD_LIB_SPEC $TCL_LIBS"
291
dnl AC_CHECK_FUNC(Tcl_CreateCommand,[
292
dnl         AC_MSG_CHECKING([if Tcl library build specification is valid])
293
dnl         AC_MSG_RESULT(yes)
294
dnl ],[
295
dnl        TCL_BUILD_LIB_SPEC=$TCL_LIB_SPEC
296
dnl        # Can't pull the following CHECKING call out since it will be
297
dnl        # broken up by the CHECK_FUNC just above.
298
dnl         AC_MSG_CHECKING([if Tcl library build specification is valid])
299
dnl        AC_MSG_RESULT(no)
300
dnl])
301
dnl LIBS=$SAVELIBS
302
 
303
    AC_SUBST(TCL_BUILD_LIB_SPEC)
304
    AC_SUBST(TCL_LIB_SPEC)
305
dnl AC_SUBST(TCL_LIB_VERSIONS_OK)
306
 
307
dnl not used, don't export to save symbols
308
    AC_SUBST(TCL_SHARED_LIB_SUFFIX)
309
 
310
dnl not used, don't export to save symbols
311
dnl    AC_SUBST(TCL_UNSHARED_LIB_SUFFIX)
312
])
313
 
314
# Warning: Tk definitions are very similar to Tcl definitions but
315
# are not precisely the same.  There are a couple of differences,
316
# so don't do changes to Tcl thinking you can cut and paste it do
317
# the Tk differences and later simply substitute "Tk" for "Tcl".
318
# Known differences:
319
#  - Acceptable Tcl major version #s is 7-9 while Tk is 4-9
320
#  - Searching for Tcl includes looking for tclInt.h, Tk looks for tk.h
321
#  - Computing major/minor versions is different because Tk depends on
322
#    headers to Tcl, Tk, and X.
323
#  - Symbols in tkConfig.sh are different than tclConfig.sh
324
#  - Acceptable for Tk to be missing but not Tcl.
325
 
326
AC_DEFUN(CY_AC_PATH_TKH, [
327
#
328
# Ok, lets find the tk source trees so we can use the headers
329
# If the directory (presumably symlink) named "tk" exists, use that one
330
# in preference to any others.  Same logic is used when choosing library
331
# and again with Tcl. The search order is the best place to look first, then in
332
# decreasing significance. The loop breaks if the trigger file is found.
333
# Note the gross little conversion here of srcdir by cd'ing to the found
334
# directory. This converts the path from a relative to an absolute, so
335
# recursive cache variables for the path will work right. We check all
336
# the possible paths in one loop rather than many seperate loops to speed
337
# things up.
338
# the alternative search directory is involked by --with-tkinclude
339
#
340
#no_tk=true
341
AC_MSG_CHECKING(for Tk private headers)
342
AC_ARG_WITH(tkinclude, [  --with-tkinclude       directory where tk private headers are], with_tkinclude=${withval})
343
AC_CACHE_VAL(ac_cv_c_tkh,[
344
# first check to see if --with-tkinclude was specified
345
if test x"${with_tkinclude}" != x ; then
346
  if test -f ${with_tkinclude}/tk.h ; then
347
    ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
348
  elif test -f ${with_tkinclude}/generic/tk.h ; then
349
    ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)`
350
  else
351
    AC_MSG_ERROR([${with_tkinclude} directory doesn't contain private headers])
352
  fi
353
fi
354
 
355
# next check if it came with Tk configuration file
356
if test x"${ac_cv_c_tkconfig}" != x ; then
357
  if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then
358
    ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/../generic; pwd)`
359
  fi
360
fi
361
 
362
# next check in private source directory
363
#
364
# since ls returns lowest version numbers first, reverse its output
365
changequote(,)
366
if test x"${ac_cv_c_tkh}" = x ; then
367
  for i in \
368
                ${srcdir}/../tk \
369
                `ls -dr ${srcdir}/../tk[4-9].[0-9] 2>/dev/null` \
370
                ${srcdir}/../../tk \
371
                `ls -dr ${srcdir}/../../tk[4-9].[0-9] 2>/dev/null` \
372
                ${srcdir}/../../../tk \
373
                `ls -dr ${srcdir}/../../../tk[4-9].[0-9] 2>/dev/null ` ; do
374
    if test -f $i/generic/tk.h ; then
375
      ac_cv_c_tkh=`(cd $i/generic; pwd)`
376
      break
377
    fi
378
  done
379
fi
380
changequote([,])
381
# finally check in a few common install locations
382
#
383
# since ls returns lowest version numbers first, reverse its output
384
changequote(,)
385
if test x"${ac_cv_c_tkh}" = x ; then
386
  for i in \
387
                `ls -dr /usr/local/src/tk[4-9].[0-9] 2>/dev/null` \
388
                `ls -dr /usr/local/lib/tk[4-9].[0-9] 2>/dev/null` \
389
                /usr/local/src/tk \
390
                /usr/local/lib/tk \
391
                ${prefix}/include ; do
392
    if test -f $i/generic/tk.h ; then
393
      ac_cv_c_tkh=`(cd $i/generic; pwd)`
394
      break
395
    fi
396
  done
397
fi
398
changequote([,])
399
# see if one is installed
400
if test x"${ac_cv_c_tkh}" = x ; then
401
   AC_HEADER_CHECK(tk.h, ac_cv_c_tkh=installed, ac_cv_c_tkh="")
402
fi
403
])
404
if test x"${ac_cv_c_tkh}" != x ; then
405
#  no_tk=""
406
  if test x"${ac_cv_c_tkh}" = x"installed" ; then
407
    AC_MSG_RESULT([is installed])
408
    TKHDIRDASHI=""
409
  else
410
    AC_MSG_RESULT([found in ${ac_cv_c_tkh}])
411
    # this hack is cause the TKHDIRDASHI won't print if there is a "-I" in it.
412
    TKHDIRDASHI="-I${ac_cv_c_tkh}"
413
  fi
414
else
415
  TKHDIRDASHI="# no Tk directory found"
416
  AC_MSG_WARN([Can't find Tk private headers])
417
  no_tk=true
418
fi
419
 
420
AC_SUBST(TKHDIRDASHI)
421
])
422
 
423
 
424
AC_DEFUN(CY_AC_PATH_TKCONFIG, [
425
#
426
# Ok, lets find the tk configuration
427
# First, look for one uninstalled.
428
# the alternative search directory is invoked by --with-tkconfig
429
#
430
 
431
if test x"${no_tk}" = x ; then
432
  # we reset no_tk in case something fails here
433
  no_tk=true
434
  AC_ARG_WITH(tkconfig, [  --with-tkconfig           directory containing tk configuration (tkConfig.sh)],
435
         with_tkconfig=${withval})
436
  AC_MSG_CHECKING([for Tk configuration])
437
  AC_CACHE_VAL(ac_cv_c_tkconfig,[
438
 
439
  # First check to see if --with-tkconfig was specified.
440
  if test x"${with_tkconfig}" != x ; then
441
    if test -f "${with_tkconfig}/tkConfig.sh" ; then
442
      ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
443
    else
444
      AC_MSG_ERROR([${with_tkconfig} directory doesn't contain tkConfig.sh])
445
    fi
446
  fi
447
 
448
  # then check for a private Tk library
449
changequote(,)
450
  if test x"${ac_cv_c_tkconfig}" = x ; then
451
    for i in \
452
                ../tk \
453
                `ls -dr ../tk[4-9].[0-9] 2>/dev/null` \
454
                ../../tk \
455
                `ls -dr ../../tk[4-9].[0-9] 2>/dev/null` \
456
                ../../../tk \
457
                `ls -dr ../../../tk[4-9].[0-9] 2>/dev/null` ; do
458
      if test -f "$i/unix/tkConfig.sh" ; then
459
        ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
460
        break
461
      fi
462
    done
463
  fi
464
changequote([,])
465
  # check in a few common install locations
466
  if test x"${ac_cv_c_tkconfig}" = x ; then
467
    for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
468
      if test -f "$i/tkConfig.sh" ; then
469
        ac_cv_c_tkconfig=`(cd $i; pwd)`
470
        break
471
      fi
472
    done
473
  fi
474
  # check in a few other private locations
475
changequote(,)
476
  if test x"${ac_cv_c_tkconfig}" = x ; then
477
    for i in \
478
                ${srcdir}/../tk \
479
                `ls -dr ${srcdir}/../tk[4-9].[0-9] 2>/dev/null` ; do
480
      if test -f "$i/unix/tkConfig.sh" ; then
481
        ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
482
        break
483
      fi
484
    done
485
  fi
486
changequote([,])
487
  ])
488
  if test x"${ac_cv_c_tkconfig}" = x ; then
489
    TKCONFIG="# no Tk configs found"
490
    AC_MSG_WARN(Can't find Tk configuration definitions)
491
  else
492
    no_tk=
493
    TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh
494
    AC_MSG_RESULT(found $TKCONFIG)
495
  fi
496
fi
497
 
498
])
499
 
500
# Defined as a separate macro so we don't have to cache the values
501
# from PATH_TKCONFIG (because this can also be cached).
502
AC_DEFUN(CY_AC_LOAD_TKCONFIG, [
503
    if test -f "$TKCONFIG" ; then
504
      . $TKCONFIG
505
    fi
506
 
507
    AC_SUBST(TK_VERSION)
508
dnl not actually used, don't export to save symbols
509
dnl    AC_SUBST(TK_MAJOR_VERSION)
510
dnl    AC_SUBST(TK_MINOR_VERSION)
511
    AC_SUBST(TK_DEFS)
512
 
513
dnl not used, don't export to save symbols
514
    dnl AC_SUBST(TK_LIB_FILE)
515
 
516
dnl not used outside of configure
517
dnl    AC_SUBST(TK_LIBS)
518
dnl not used, don't export to save symbols
519
dnl    AC_SUBST(TK_PREFIX)
520
 
521
dnl not used, don't export to save symbols
522
dnl    AC_SUBST(TK_EXEC_PREFIX)
523
 
524
    AC_SUBST(TK_XINCLUDES)
525
    AC_SUBST(TK_XLIBSW)
526
    AC_SUBST(TK_BUILD_LIB_SPEC)
527
    AC_SUBST(TK_LIB_SPEC)
528
])
529
 
530
# check for Itcl headers.
531
 
532
AC_DEFUN(CY_AC_PATH_ITCLH, [
533
AC_MSG_CHECKING(for Itcl private headers. srcdir=${srcdir})
534
if test x"${ac_cv_c_itclh}" = x ; then
535
  for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ; do
536
    if test -f $i/src/itcl.h ; then
537
      ac_cv_c_itclh=`(cd $i/src; pwd)`
538
      break
539
    fi
540
  done
541
fi
542
if test x"${ac_cv_c_itclh}" = x ; then
543
  ITCLHDIR="# no Itcl private headers found"
544
  ITCLLIB="# no Itcl private headers found"
545
  AC_MSG_WARN([Can't find Itcl private headers])
546
  no_itcl=true
547
else
548
  ITCLHDIR="-I${ac_cv_c_itclh}"
549
# should always be here
550
  ITCLLIB="../itcl/src/libitcl.a"
551
fi
552
 
553
AC_SUBST(ITCLHDIR)
554
AC_SUBST(ITCLLIB)
555
])
556
 
557
# Check to see if we're running under Cygwin32, without using
558
# AC_CANONICAL_*.  If so, set output variable CYGWIN32 to "yes".
559
# Otherwise set it to "no".
560
 
561
dnl AM_CYGWIN32()
562
dnl You might think we can do this by checking for a cygwin32-specific
563
dnl cpp define.
564
AC_DEFUN(CY_AC_CYGWIN32,
565
[AC_CACHE_CHECK(for Cygwin32 environment, ac_cv_cygwin32,
566
[AC_TRY_COMPILE(,[int main () { return __CYGWIN32__; }],
567
ac_cv_cygwin32=yes, ac_cv_cygwin32=no)
568
rm -f conftest*])
569
CYGWIN32=
570
test "$ac_cv_cygwin32" = yes && CYGWIN32=yes])
571
 
572
# Check to see if we're running under Win32, without using
573
# AC_CANONICAL_*.  If so, set output variable EXEEXT to ".exe".
574
# Otherwise set it to "".
575
 
576
dnl AM_EXEEXT()
577
dnl This knows we add .exe if we're building in the Cygwin32
578
dnl environment. But if we're not, then it compiles a test program
579
dnl to see if there is a suffix for executables.
580
AC_DEFUN(CY_AC_EXEEXT,
581
dnl AC_REQUIRE([AC_PROG_CC])AC_REQUIRE([AM_CYGWIN32])
582
AC_MSG_CHECKING([for executable suffix])
583
[AC_CACHE_VAL(ac_cv_exeext,
584
[if test "$CYGWIN32" = yes; then
585
ac_cv_exeext=.exe
586
else
587
cat > ac_c_test.c << 'EOF'
588
int main() {
589
/* Nothing needed here */
590
}
591
EOF
592
${CC-cc} -o ac_c_test $CFLAGS $CPPFLAGS $LDFLAGS ac_c_test.c $LIBS 1>&5
593
ac_cv_exeext=`ls ac_c_test.* | grep -v ac_c_test.c | sed -e s/ac_c_test//`
594
rm -f ac_c_test*])
595
test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
596
fi
597
EXEEXT=""
598
test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
599
AC_MSG_RESULT(${ac_cv_exeext})
600
AC_SUBST(EXEEXT)])
601
 
602
# Check for inttypes.h. On some older systems there is a
603
# conflict with the definitions of int8_t, int16_t, int32_t
604
# that are in sys/types.h. So we have to compile the test
605
# program with both, to make sure we want inttypes to be
606
# included.
607
AC_DEFUN(CY_AC_INTTYPES_H,
608
[AC_MSG_CHECKING(for inttypes.h)
609
AC_CACHE_VAL(ac_cv_inttypes_h,
610
  [AC_TRY_COMPILE([
611
  #include <sys/types.h>
612
  #include <inttypes.h>],
613
  [
614
  int16_t x = 0;
615
  ], ac_cv_inttypes_h="yes", ac_cv_inttypes_h="no")])
616
AC_MSG_RESULT($ac_cv_inttypes_h)
617
if test x"${ac_cv_inttypes_h}" = x"yes"; then
618
  AC_DEFINE(HAVE_INTTYPES_H)
619
fi
620
])
621
 

powered by: WebSVN 2.1.0

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