/[cvs]/eggdrop1.9/acconfig/tcl.m4
ViewVC logotype

Contents of /eggdrop1.9/acconfig/tcl.m4

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.5 - (show annotations) (download)
Mon Jun 14 14:45:53 2004 UTC (15 years, 4 months ago) by wingman
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +0 -0 lines
FILE REMOVED
Made module configure stuff dynamic.

1 #------------------------------------------------------------------------
2 # SC_PATH_TCLCONFIG --
3 #
4 # Locate the tclConfig.sh file and perform a sanity check on
5 # the Tcl compile flags
6 #
7 # Arguments:
8 # none
9 #
10 # Results:
11 #
12 # Adds the following arguments to configure:
13 # --with-tcl=...
14 #
15 # Defines the following vars:
16 # TCL_BIN_DIR Full path to the directory containing
17 # the tclConfig.sh file
18 #------------------------------------------------------------------------
19
20 AC_DEFUN([SC_PATH_TCLCONFIG], [
21 #
22 # Ok, lets find the tcl configuration
23 # First, look for one uninstalled.
24 # the alternative search directory is invoked by --with-tcl
25 #
26
27 if test x"${no_tcl}" = x ; then
28 # we reset no_tcl in case something fails here
29 no_tcl=true
30 AC_ARG_WITH(tcl, [ --with-tcl directory containing tcl configuration (tclConfig.sh)], with_tclconfig=${withval})
31 AC_MSG_CHECKING([for Tcl configuration])
32 AC_CACHE_VAL(ac_cv_c_tclconfig,[
33
34 # First check to see if --with-tcl was specified.
35 if test x"${with_tclconfig}" != x ; then
36 if test -f "${with_tclconfig}/tclConfig.sh" ; then
37 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
38 else
39 AC_MSG_ERROR([${with_tclconfig} directory doesn't contain tclConfig.sh])
40 fi
41 fi
42
43 # then check for a private Tcl installation
44 if test x"${ac_cv_c_tclconfig}" = x ; then
45 for i in \
46 ../tcl \
47 `ls -dr ../tcl[[8-9]].[[0-9]]* 2>/dev/null` \
48 ../../tcl \
49 `ls -dr ../../tcl[[8-9]].[[0-9]]* 2>/dev/null` \
50 ../../../tcl \
51 `ls -dr ../../../tcl[[8-9]].[[0-9]]* 2>/dev/null` ; do
52 if test -f "$i/unix/tclConfig.sh" ; then
53 ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
54 break
55 fi
56 done
57 fi
58
59 # check in a few common install locations
60 if test x"${ac_cv_c_tclconfig}" = x ; then
61 for i in `ls -d ${libdir} 2>/dev/null` \
62 `ls -d /usr/local/lib 2>/dev/null` \
63 `ls -dr /usr/local/lib/tcl?.? 2>/dev/null` \
64 `ls -d /usr/contrib/lib 2>/dev/null` \
65 `ls -d /usr/lib 2>/dev/null` \
66 ; do
67 if test -f "$i/tclConfig.sh" ; then
68 ac_cv_c_tclconfig=`(cd $i; pwd)`
69 break
70 fi
71 done
72 fi
73
74 # check in a few other private locations
75 if test x"${ac_cv_c_tclconfig}" = x ; then
76 for i in \
77 ${srcdir}/../tcl \
78 `ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]]* 2>/dev/null` ; do
79 if test -f "$i/unix/tclConfig.sh" ; then
80 ac_cv_c_tclconfig=`(cd $i/unix; pwd)`
81 break
82 fi
83 done
84 fi
85 ])
86
87 if test x"${ac_cv_c_tclconfig}" = x ; then
88 TCL_BIN_DIR="# no Tcl configs found"
89 AC_MSG_WARN(Can't find Tcl configuration definitions)
90 else
91 no_tcl=
92 TCL_BIN_DIR=${ac_cv_c_tclconfig}
93 AC_MSG_RESULT(found $TCL_BIN_DIR/tclConfig.sh)
94 fi
95 fi
96 ])
97
98 #------------------------------------------------------------------------
99 # SC_PATH_TKCONFIG --
100 #
101 # Locate the tkConfig.sh file
102 #
103 # Arguments:
104 # none
105 #
106 # Results:
107 #
108 # Adds the following arguments to configure:
109 # --with-tk=...
110 #
111 # Defines the following vars:
112 # TK_BIN_DIR Full path to the directory containing
113 # the tkConfig.sh file
114 #------------------------------------------------------------------------
115
116 AC_DEFUN([SC_PATH_TKCONFIG], [
117 #
118 # Ok, lets find the tk configuration
119 # First, look for one uninstalled.
120 # the alternative search directory is invoked by --with-tk
121 #
122
123 if test x"${no_tk}" = x ; then
124 # we reset no_tk in case something fails here
125 no_tk=true
126 AC_ARG_WITH(tk, [ --with-tk directory containing tk configuration (tkConfig.sh)], with_tkconfig=${withval})
127 AC_MSG_CHECKING([for Tk configuration])
128 AC_CACHE_VAL(ac_cv_c_tkconfig,[
129
130 # First check to see if --with-tkconfig was specified.
131 if test x"${with_tkconfig}" != x ; then
132 if test -f "${with_tkconfig}/tkConfig.sh" ; then
133 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
134 else
135 AC_MSG_ERROR([${with_tkconfig} directory doesn't contain tkConfig.sh])
136 fi
137 fi
138
139 # then check for a private Tk library
140 if test x"${ac_cv_c_tkconfig}" = x ; then
141 for i in \
142 ../tk \
143 `ls -dr ../tk[[8-9]].[[0-9]]* 2>/dev/null` \
144 ../../tk \
145 `ls -dr ../../tk[[8-9]].[[0-9]]* 2>/dev/null` \
146 ../../../tk \
147 `ls -dr ../../../tk[[8-9]].[[0-9]]* 2>/dev/null` ; do
148 if test -f "$i/unix/tkConfig.sh" ; then
149 ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
150 break
151 fi
152 done
153 fi
154 # check in a few common install locations
155 if test x"${ac_cv_c_tkconfig}" = x ; then
156 for i in `ls -d ${libdir} 2>/dev/null` \
157 `ls -d /usr/local/lib 2>/dev/null` \
158 `ls -d /usr/contrib/lib 2>/dev/null` \
159 `ls -d /usr/lib 2>/dev/null` \
160 ; do
161 if test -f "$i/tkConfig.sh" ; then
162 ac_cv_c_tkconfig=`(cd $i; pwd)`
163 break
164 fi
165 done
166 fi
167 # check in a few other private locations
168 if test x"${ac_cv_c_tkconfig}" = x ; then
169 for i in \
170 ${srcdir}/../tk \
171 `ls -dr ${srcdir}/../tk[[8-9]].[[0-9]]* 2>/dev/null` ; do
172 if test -f "$i/unix/tkConfig.sh" ; then
173 ac_cv_c_tkconfig=`(cd $i/unix; pwd)`
174 break
175 fi
176 done
177 fi
178 ])
179 if test x"${ac_cv_c_tkconfig}" = x ; then
180 TK_BIN_DIR="# no Tk configs found"
181 AC_MSG_WARN(Can't find Tk configuration definitions)
182 exit 0
183 else
184 no_tk=
185 TK_BIN_DIR=${ac_cv_c_tkconfig}
186 AC_MSG_RESULT(found $TK_BIN_DIR/tkConfig.sh)
187 fi
188 fi
189
190 ])
191
192 #------------------------------------------------------------------------
193 # SC_LOAD_TCLCONFIG --
194 #
195 # Load the tclConfig.sh file
196 #
197 # Arguments:
198 #
199 # Requires the following vars to be set:
200 # TCL_BIN_DIR
201 #
202 # Results:
203 #
204 # Subst the following vars:
205 # TCL_BIN_DIR
206 # TCL_SRC_DIR
207 # TCL_LIB_FILE
208 #
209 #------------------------------------------------------------------------
210
211 AC_DEFUN([SC_LOAD_TCLCONFIG], [
212 AC_MSG_CHECKING([for existence of $TCL_BIN_DIR/tclConfig.sh])
213
214 if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then
215 AC_MSG_RESULT([loading])
216 . $TCL_BIN_DIR/tclConfig.sh
217 else
218 AC_MSG_RESULT([file not found])
219 fi
220
221 #
222 # If the TCL_BIN_DIR is the build directory (not the install directory),
223 # then set the common variable name to the value of the build variables.
224 # For example, the variable TCL_LIB_SPEC will be set to the value
225 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
226 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
227 # installed and uninstalled version of Tcl.
228 #
229
230 if test -f $TCL_BIN_DIR/Makefile ; then
231 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
232 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
233 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
234 fi
235
236 #
237 # eval is required to do the TCL_DBGX substitution
238 #
239
240 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
241 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
242 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
243
244 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
245 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
246 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
247
248 AC_SUBST(TCL_VERSION)
249 AC_SUBST(TCL_BIN_DIR)
250 AC_SUBST(TCL_SRC_DIR)
251
252 AC_SUBST(TCL_LIB_FILE)
253 AC_SUBST(TCL_LIB_FLAG)
254 AC_SUBST(TCL_LIB_SPEC)
255
256 AC_SUBST(TCL_STUB_LIB_FILE)
257 AC_SUBST(TCL_STUB_LIB_FLAG)
258 AC_SUBST(TCL_STUB_LIB_SPEC)
259 ])
260
261 #------------------------------------------------------------------------
262 # SC_LOAD_TKCONFIG --
263 #
264 # Load the tkConfig.sh file
265 #
266 # Arguments:
267 #
268 # Requires the following vars to be set:
269 # TK_BIN_DIR
270 #
271 # Results:
272 #
273 # Sets the following vars that should be in tkConfig.sh:
274 # TK_BIN_DIR
275 #------------------------------------------------------------------------
276
277 AC_DEFUN([SC_LOAD_TKCONFIG], [
278 AC_MSG_CHECKING([for existence of $TK_BIN_DIR/tkConfig.sh])
279
280 if test -f "$TK_BIN_DIR/tkConfig.sh" ; then
281 AC_MSG_RESULT([loading])
282 . $TK_BIN_DIR/tkConfig.sh
283 else
284 AC_MSG_RESULT([could not find $TK_BIN_DIR/tkConfig.sh])
285 fi
286
287 AC_SUBST(TK_VERSION)
288 AC_SUBST(TK_BIN_DIR)
289 AC_SUBST(TK_SRC_DIR)
290 AC_SUBST(TK_LIB_FILE)
291 ])
292
293 #------------------------------------------------------------------------
294 # SC_ENABLE_SHARED --
295 #
296 # Allows the building of shared libraries
297 #
298 # Arguments:
299 # none
300 #
301 # Results:
302 #
303 # Adds the following arguments to configure:
304 # --enable-shared=yes|no
305 #
306 # Defines the following vars:
307 # STATIC_BUILD Used for building import/export libraries
308 # on Windows.
309 #
310 # Sets the following vars:
311 # SHARED_BUILD Value of 1 or 0
312 #------------------------------------------------------------------------
313
314 AC_DEFUN([SC_ENABLE_SHARED], [
315 AC_MSG_CHECKING([how to build libraries])
316 AC_ARG_ENABLE(shared,
317 [ --enable-shared build and link with shared libraries [--enable-shared]],
318 [tcl_ok=$enableval], [tcl_ok=yes])
319
320 if test "${enable_shared+set}" = set; then
321 enableval="$enable_shared"
322 tcl_ok=$enableval
323 else
324 tcl_ok=yes
325 fi
326
327 if test "$tcl_ok" = "yes" ; then
328 AC_MSG_RESULT([shared])
329 SHARED_BUILD=1
330 else
331 AC_MSG_RESULT([static])
332 SHARED_BUILD=0
333 AC_DEFINE(STATIC_BUILD)
334 fi
335 ])
336
337 #------------------------------------------------------------------------
338 # SC_ENABLE_FRAMEWORK --
339 #
340 # Allows the building of shared libraries into frameworks
341 #
342 # Arguments:
343 # none
344 #
345 # Results:
346 #
347 # Adds the following arguments to configure:
348 # --enable-framework=yes|no
349 #
350 # Sets the following vars:
351 # FRAMEWORK_BUILD Value of 1 or 0
352 #------------------------------------------------------------------------
353
354 AC_DEFUN([SC_ENABLE_FRAMEWORK], [
355 AC_MSG_CHECKING([how to package libraries])
356 AC_ARG_ENABLE(framework,
357 [ --enable-framework package shared libraries in frameworks [--disable-framework]],
358 [tcl_ok=$enableval], [tcl_ok=no])
359
360 if test "${enable_framework+set}" = set; then
361 enableval="$enable_framework"
362 tcl_ok=$enableval
363 else
364 tcl_ok=no
365 fi
366
367 if test "$tcl_ok" = "yes" ; then
368 AC_MSG_RESULT([framework])
369 FRAMEWORK_BUILD=1
370 if test "${SHARED_BUILD}" = "0" ; then
371 AC_MSG_WARN("Frameworks can only be built if --enable-shared is yes")
372 FRAMEWORK_BUILD=0
373 fi
374 else
375 AC_MSG_RESULT([standard shared library])
376 FRAMEWORK_BUILD=0
377 fi
378 ])
379
380 #------------------------------------------------------------------------
381 # SC_ENABLE_THREADS --
382 #
383 # Specify if thread support should be enabled
384 #
385 # Arguments:
386 # none
387 #
388 # Results:
389 #
390 # Adds the following arguments to configure:
391 # --enable-threads
392 #
393 # Sets the following vars:
394 # THREADS_LIBS Thread library(s)
395 #
396 # Defines the following vars:
397 # TCL_THREADS
398 # _REENTRANT
399 # _THREAD_SAFE
400 #
401 #------------------------------------------------------------------------
402
403 AC_DEFUN([SC_ENABLE_THREADS], [
404 AC_MSG_CHECKING(for building with threads)
405 AC_ARG_ENABLE(threads, [ --enable-threads build with threads],
406 [tcl_ok=$enableval], [tcl_ok=no])
407
408 if test "$tcl_ok" = "yes"; then
409 AC_MSG_RESULT(yes)
410 TCL_THREADS=1
411 AC_DEFINE(TCL_THREADS)
412 # USE_THREAD_ALLOC tells us to try the special thread-based
413 # allocator that significantly reduces lock contention
414 AC_DEFINE(USE_THREAD_ALLOC)
415 AC_DEFINE(_REENTRANT)
416 AC_DEFINE(_THREAD_SAFE)
417 AC_CHECK_LIB(pthread,pthread_mutex_init,tcl_ok=yes,tcl_ok=no)
418 if test "$tcl_ok" = "no"; then
419 # Check a little harder for __pthread_mutex_init in the same
420 # library, as some systems hide it there until pthread.h is
421 # defined. We could alternatively do an AC_TRY_COMPILE with
422 # pthread.h, but that will work with libpthread really doesn't
423 # exist, like AIX 4.2. [Bug: 4359]
424 AC_CHECK_LIB(pthread,__pthread_mutex_init,tcl_ok=yes,tcl_ok=no)
425 fi
426
427 if test "$tcl_ok" = "yes"; then
428 # The space is needed
429 THREADS_LIBS=" -lpthread"
430 else
431 AC_CHECK_LIB(pthreads,pthread_mutex_init,tcl_ok=yes,tcl_ok=no)
432 if test "$tcl_ok" = "yes"; then
433 # The space is needed
434 THREADS_LIBS=" -lpthreads"
435 else
436 AC_CHECK_LIB(c,pthread_mutex_init,tcl_ok=yes,tcl_ok=no)
437 if test "$tcl_ok" = "no"; then
438 AC_CHECK_LIB(c_r,pthread_mutex_init,tcl_ok=yes,tcl_ok=no)
439 if test "$tcl_ok" = "yes"; then
440 # The space is needed
441 THREADS_LIBS=" -pthread"
442 else
443 TCL_THREADS=0
444 AC_MSG_WARN("Don t know how to find pthread lib on your system - you must disable thread support or edit the LIBS in the Makefile...")
445 fi
446 fi
447 fi
448 fi
449
450 # Does the pthread-implementation provide
451 # 'pthread_attr_setstacksize' ?
452
453 ac_saved_libs=$LIBS
454 LIBS="$LIBS $THREADS_LIBS"
455 AC_CHECK_FUNCS(pthread_attr_setstacksize)
456 LIBS=$ac_saved_libs
457 AC_CHECK_FUNCS(readdir_r)
458 else
459 TCL_THREADS=0
460 AC_MSG_RESULT([no (default)])
461 fi
462 AC_SUBST(TCL_THREADS)
463 ])
464
465 #------------------------------------------------------------------------
466 # SC_ENABLE_SYMBOLS --
467 #
468 # Specify if debugging symbols should be used.
469 # Memory (TCL_MEM_DEBUG) and compile (TCL_COMPILE_DEBUG) debugging
470 # can also be enabled.
471 #
472 # Arguments:
473 # none
474 #
475 # Requires the following vars to be set in the Makefile:
476 # CFLAGS_DEBUG
477 # CFLAGS_OPTIMIZE
478 # LDFLAGS_DEBUG
479 # LDFLAGS_OPTIMIZE
480 #
481 # Results:
482 #
483 # Adds the following arguments to configure:
484 # --enable-symbols
485 #
486 # Defines the following vars:
487 # CFLAGS_DEFAULT Sets to $(CFLAGS_DEBUG) if true
488 # Sets to $(CFLAGS_OPTIMIZE) if false
489 # LDFLAGS_DEFAULT Sets to $(LDFLAGS_DEBUG) if true
490 # Sets to $(LDFLAGS_OPTIMIZE) if false
491 # DBGX Debug library extension
492 #
493 #------------------------------------------------------------------------
494
495 AC_DEFUN([SC_ENABLE_SYMBOLS], [
496 AC_MSG_CHECKING([for build with symbols])
497 AC_ARG_ENABLE(symbols, [ --enable-symbols build with debugging symbols [--disable-symbols]], [tcl_ok=$enableval], [tcl_ok=no])
498 # FIXME: Currently, LDFLAGS_DEFAULT is not used, it should work like CFLAGS_DEFAULT.
499 if test "$tcl_ok" = "no"; then
500 CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
501 LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
502 DBGX=""
503 AC_MSG_RESULT([no])
504 else
505 CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
506 LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
507 DBGX=g
508 if test "$tcl_ok" = "yes"; then
509 AC_MSG_RESULT([yes (standard debugging)])
510 fi
511 fi
512 AC_SUBST(CFLAGS_DEFAULT)
513 AC_SUBST(LDFLAGS_DEFAULT)
514
515 if test "$tcl_ok" = "mem" -o "$tcl_ok" = "all"; then
516 AC_DEFINE(TCL_MEM_DEBUG)
517 fi
518
519 if test "$tcl_ok" = "compile" -o "$tcl_ok" = "all"; then
520 AC_DEFINE(TCL_COMPILE_DEBUG)
521 AC_DEFINE(TCL_COMPILE_STATS)
522 fi
523
524 if test "$tcl_ok" != "yes" -a "$tcl_ok" != "no"; then
525 if test "$tcl_ok" = "all"; then
526 AC_MSG_RESULT([enabled symbols mem compile debugging])
527 else
528 AC_MSG_RESULT([enabled $tcl_ok debugging])
529 fi
530 fi
531 ])
532
533 #------------------------------------------------------------------------
534 # SC_ENABLE_LANGINFO --
535 #
536 # Allows use of modern nl_langinfo check for better l10n.
537 # This is only relevant for Unix.
538 #
539 # Arguments:
540 # none
541 #
542 # Results:
543 #
544 # Adds the following arguments to configure:
545 # --enable-langinfo=yes|no (default is yes)
546 #
547 # Defines the following vars:
548 # HAVE_LANGINFO Triggers use of nl_langinfo if defined.
549 #
550 #------------------------------------------------------------------------
551
552 AC_DEFUN([SC_ENABLE_LANGINFO], [
553 AC_ARG_ENABLE(langinfo,
554 [ --enable-langinfo use nl_langinfo if possible to determine
555 encoding at startup, otherwise use old heuristic],
556 [langinfo_ok=$enableval], [langinfo_ok=yes])
557
558 HAVE_LANGINFO=0
559 if test "$langinfo_ok" = "yes"; then
560 if test "$langinfo_ok" = "yes"; then
561 AC_CHECK_HEADER(langinfo.h,[langinfo_ok=yes],[langinfo_ok=no])
562 fi
563 fi
564 AC_MSG_CHECKING([whether to use nl_langinfo])
565 if test "$langinfo_ok" = "yes"; then
566 AC_TRY_COMPILE([#include <langinfo.h>],
567 [nl_langinfo(CODESET);],[langinfo_ok=yes],[langinfo_ok=no])
568 if test "$langinfo_ok" = "no"; then
569 langinfo_ok="no (could not compile with nl_langinfo)";
570 fi
571 if test "$langinfo_ok" = "yes"; then
572 AC_DEFINE(HAVE_LANGINFO)
573 fi
574 fi
575 AC_MSG_RESULT([$langinfo_ok])
576 ])
577
578 #--------------------------------------------------------------------
579 # SC_CONFIG_MANPAGES
580 #
581 # Decide whether to use symlinks for linking the manpages and
582 # whether to compress the manpages after installation.
583 #
584 # Arguments:
585 # none
586 #
587 # Results:
588 #
589 # Adds the following arguments to configure:
590 # --enable-man-symlinks
591 # --enable-man-compression=PROG
592 #
593 # Defines the following variable:
594 #
595 # MKLINKS_FLAGS - The apropriate flags for mkLinks
596 # according to the user's selection.
597 #
598 #--------------------------------------------------------------------
599 AC_DEFUN([SC_CONFIG_MANPAGES], [
600
601 AC_MSG_CHECKING([whether to use symlinks for manpages])
602 AC_ARG_ENABLE(man-symlinks,
603 [ --enable-man-symlinks use symlinks for the manpages],
604 test "$enableval" != "no" && MKLINKS_FLAGS="$MKLINKS_FLAGS --symlinks",
605 enableval="no")
606 AC_MSG_RESULT([$enableval])
607
608 AC_MSG_CHECKING([compression for manpages])
609 AC_ARG_ENABLE(man-compression,
610 [ --enable-man-compression=PROG
611 compress the manpages with PROG],
612 test "$enableval" = "yes" && echo && AC_MSG_ERROR([missing argument to --enable-man-compression])
613 test "$enableval" != "no" && MKLINKS_FLAGS="$MKLINKS_FLAGS --compress $enableval",
614 enableval="no")
615 AC_MSG_RESULT([$enableval])
616
617 AC_SUBST(MKLINKS_FLAGS)
618 ])
619
620 #--------------------------------------------------------------------
621 # SC_SERIAL_PORT
622 #
623 # Determine which interface to use to talk to the serial port.
624 # Note that #include lines must begin in leftmost column for
625 # some compilers to recognize them as preprocessor directives,
626 # and some build environments have stdin not pointing at a
627 # pseudo-terminal (usually /dev/null instead.)
628 #
629 # Arguments:
630 # none
631 #
632 # Results:
633 #
634 # Defines only one of the following vars:
635 # HAVE_SYS_MODEM_H
636 # USE_TERMIOS
637 # USE_TERMIO
638 # USE_SGTTY
639 #
640 #--------------------------------------------------------------------
641
642 AC_DEFUN([SC_SERIAL_PORT], [
643 AC_CHECK_HEADERS(sys/modem.h)
644 AC_MSG_CHECKING([termios vs. termio vs. sgtty])
645 AC_CACHE_VAL(tcl_cv_api_serial, [
646 AC_TRY_RUN([
647 #include <termios.h>
648
649 int main() {
650 struct termios t;
651 if (tcgetattr(0, &t) == 0) {
652 cfsetospeed(&t, 0);
653 t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB;
654 return 0;
655 }
656 return 1;
657 }], tcl_cv_api_serial=termios, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
658 if test $tcl_cv_api_serial = no ; then
659 AC_TRY_RUN([
660 #include <termio.h>
661
662 int main() {
663 struct termio t;
664 if (ioctl(0, TCGETA, &t) == 0) {
665 t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB;
666 return 0;
667 }
668 return 1;
669 }], tcl_cv_api_serial=termio, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
670 fi
671 if test $tcl_cv_api_serial = no ; then
672 AC_TRY_RUN([
673 #include <sgtty.h>
674
675 int main() {
676 struct sgttyb t;
677 if (ioctl(0, TIOCGETP, &t) == 0) {
678 t.sg_ospeed = 0;
679 t.sg_flags |= ODDP | EVENP | RAW;
680 return 0;
681 }
682 return 1;
683 }], tcl_cv_api_serial=sgtty, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
684 fi
685 if test $tcl_cv_api_serial = no ; then
686 AC_TRY_RUN([
687 #include <termios.h>
688 #include <errno.h>
689
690 int main() {
691 struct termios t;
692 if (tcgetattr(0, &t) == 0
693 || errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
694 cfsetospeed(&t, 0);
695 t.c_cflag |= PARENB | PARODD | CSIZE | CSTOPB;
696 return 0;
697 }
698 return 1;
699 }], tcl_cv_api_serial=termios, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
700 fi
701 if test $tcl_cv_api_serial = no; then
702 AC_TRY_RUN([
703 #include <termio.h>
704 #include <errno.h>
705
706 int main() {
707 struct termio t;
708 if (ioctl(0, TCGETA, &t) == 0
709 || errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
710 t.c_cflag |= CBAUD | PARENB | PARODD | CSIZE | CSTOPB;
711 return 0;
712 }
713 return 1;
714 }], tcl_cv_api_serial=termio, tcl_cv_api_serial=no, tcl_cv_api_serial=no)
715 fi
716 if test $tcl_cv_api_serial = no; then
717 AC_TRY_RUN([
718 #include <sgtty.h>
719 #include <errno.h>
720
721 int main() {
722 struct sgttyb t;
723 if (ioctl(0, TIOCGETP, &t) == 0
724 || errno == ENOTTY || errno == ENXIO || errno == EINVAL) {
725 t.sg_ospeed = 0;
726 t.sg_flags |= ODDP | EVENP | RAW;
727 return 0;
728 }
729 return 1;
730 }], tcl_cv_api_serial=sgtty, tcl_cv_api_serial=none, tcl_cv_api_serial=none)
731 fi])
732 case $tcl_cv_api_serial in
733 termios) AC_DEFINE(USE_TERMIOS);;
734 termio) AC_DEFINE(USE_TERMIO);;
735 sgtty) AC_DEFINE(USE_SGTTY);;
736 esac
737 AC_MSG_RESULT($tcl_cv_api_serial)
738 ])
739
740 #--------------------------------------------------------------------
741 # SC_MISSING_POSIX_HEADERS
742 #
743 # Supply substitutes for missing POSIX header files. Special
744 # notes:
745 # - stdlib.h doesn't define strtol, strtoul, or
746 # strtod insome versions of SunOS
747 # - some versions of string.h don't declare procedures such
748 # as strstr
749 #
750 # Arguments:
751 # none
752 #
753 # Results:
754 #
755 # Defines some of the following vars:
756 # NO_DIRENT_H
757 # NO_ERRNO_H
758 # NO_VALUES_H
759 # NO_LIMITS_H
760 # NO_STDLIB_H
761 # NO_STRING_H
762 # NO_SYS_WAIT_H
763 # NO_DLFCN_H
764 # HAVE_UNISTD_H
765 # HAVE_SYS_PARAM_H
766 #
767 # HAVE_STRING_H ?
768 #
769 #--------------------------------------------------------------------
770
771 AC_DEFUN([SC_MISSING_POSIX_HEADERS], [
772 AC_MSG_CHECKING(dirent.h)
773 AC_TRY_LINK([#include <sys/types.h>
774 #include <dirent.h>], [
775 #ifndef _POSIX_SOURCE
776 # ifdef __Lynx__
777 /*
778 * Generate compilation error to make the test fail: Lynx headers
779 * are only valid if really in the POSIX environment.
780 */
781
782 missing_procedure();
783 # endif
784 #endif
785 DIR *d;
786 struct dirent *entryPtr;
787 char *p;
788 d = opendir("foobar");
789 entryPtr = readdir(d);
790 p = entryPtr->d_name;
791 closedir(d);
792 ], tcl_ok=yes, tcl_ok=no)
793
794 if test $tcl_ok = no; then
795 AC_DEFINE(NO_DIRENT_H)
796 fi
797
798 AC_MSG_RESULT($tcl_ok)
799 AC_CHECK_HEADER(errno.h, , [AC_DEFINE(NO_ERRNO_H)])
800 AC_CHECK_HEADER(float.h, , [AC_DEFINE(NO_FLOAT_H)])
801 AC_CHECK_HEADER(values.h, , [AC_DEFINE(NO_VALUES_H)])
802 AC_CHECK_HEADER(limits.h, , [AC_DEFINE(NO_LIMITS_H)])
803 AC_CHECK_HEADER(stdlib.h, tcl_ok=1, tcl_ok=0)
804 AC_EGREP_HEADER(strtol, stdlib.h, , tcl_ok=0)
805 AC_EGREP_HEADER(strtoul, stdlib.h, , tcl_ok=0)
806 AC_EGREP_HEADER(strtod, stdlib.h, , tcl_ok=0)
807 if test $tcl_ok = 0; then
808 AC_DEFINE(NO_STDLIB_H)
809 fi
810 AC_CHECK_HEADER(string.h, tcl_ok=1, tcl_ok=0)
811 AC_EGREP_HEADER(strstr, string.h, , tcl_ok=0)
812 AC_EGREP_HEADER(strerror, string.h, , tcl_ok=0)
813
814 # See also memmove check below for a place where NO_STRING_H can be
815 # set and why.
816
817 if test $tcl_ok = 0; then
818 AC_DEFINE(NO_STRING_H)
819 fi
820
821 AC_CHECK_HEADER(sys/wait.h, , [AC_DEFINE(NO_SYS_WAIT_H)])
822 AC_CHECK_HEADER(dlfcn.h, , [AC_DEFINE(NO_DLFCN_H)])
823
824 # OS/390 lacks sys/param.h (and doesn't need it, by chance).
825
826 AC_HAVE_HEADERS(unistd.h sys/param.h)
827
828 ])
829
830 #--------------------------------------------------------------------
831 # SC_PATH_X
832 #
833 # Locate the X11 header files and the X11 library archive. Try
834 # the ac_path_x macro first, but if it doesn't find the X stuff
835 # (e.g. because there's no xmkmf program) then check through
836 # a list of possible directories. Under some conditions the
837 # autoconf macro will return an include directory that contains
838 # no include files, so double-check its result just to be safe.
839 #
840 # Arguments:
841 # none
842 #
843 # Results:
844 #
845 # Sets the the following vars:
846 # XINCLUDES
847 # XLIBSW
848 #
849 #--------------------------------------------------------------------
850
851 AC_DEFUN([SC_PATH_X], [
852 AC_PATH_X
853 not_really_there=""
854 if test "$no_x" = ""; then
855 if test "$x_includes" = ""; then
856 AC_TRY_CPP([#include <X11/XIntrinsic.h>], , not_really_there="yes")
857 else
858 if test ! -r $x_includes/X11/Intrinsic.h; then
859 not_really_there="yes"
860 fi
861 fi
862 fi
863 if test "$no_x" = "yes" -o "$not_really_there" = "yes"; then
864 AC_MSG_CHECKING(for X11 header files)
865 found_xincludes="no"
866 AC_TRY_CPP([#include <X11/Intrinsic.h>], found_xincludes="yes", found_xincludes="no")
867 if test "$found_xincludes" = "no"; then
868 dirs="/usr/unsupported/include /usr/local/include /usr/X386/include /usr/X11R6/include /usr/X11R5/include /usr/include/X11R5 /usr/include/X11R4 /usr/openwin/include /usr/X11/include /usr/sww/include"
869 for i in $dirs ; do
870 if test -r $i/X11/Intrinsic.h; then
871 AC_MSG_RESULT($i)
872 XINCLUDES=" -I$i"
873 found_xincludes="yes"
874 break
875 fi
876 done
877 fi
878 else
879 if test "$x_includes" != ""; then
880 XINCLUDES="-I$x_includes"
881 found_xincludes="yes"
882 fi
883 fi
884 if test found_xincludes = "no"; then
885 AC_MSG_RESULT(couldn't find any!)
886 fi
887
888 if test "$no_x" = yes; then
889 AC_MSG_CHECKING(for X11 libraries)
890 XLIBSW=nope
891 dirs="/usr/unsupported/lib /usr/local/lib /usr/X386/lib /usr/X11R6/lib /usr/X11R5/lib /usr/lib/X11R5 /usr/lib/X11R4 /usr/openwin/lib /usr/X11/lib /usr/sww/X11/lib"
892 for i in $dirs ; do
893 if test -r $i/libX11.a -o -r $i/libX11.so -o -r $i/libX11.sl; then
894 AC_MSG_RESULT($i)
895 XLIBSW="-L$i -lX11"
896 x_libraries="$i"
897 break
898 fi
899 done
900 else
901 if test "$x_libraries" = ""; then
902 XLIBSW=-lX11
903 else
904 XLIBSW="-L$x_libraries -lX11"
905 fi
906 fi
907 if test "$XLIBSW" = nope ; then
908 AC_CHECK_LIB(Xwindow, XCreateWindow, XLIBSW=-lXwindow)
909 fi
910 if test "$XLIBSW" = nope ; then
911 AC_MSG_RESULT(couldn't find any! Using -lX11.)
912 XLIBSW=-lX11
913 fi
914 ])
915 #--------------------------------------------------------------------
916 # SC_BLOCKING_STYLE
917 #
918 # The statements below check for systems where POSIX-style
919 # non-blocking I/O (O_NONBLOCK) doesn't work or is unimplemented.
920 # On these systems (mostly older ones), use the old BSD-style
921 # FIONBIO approach instead.
922 #
923 # Arguments:
924 # none
925 #
926 # Results:
927 #
928 # Defines some of the following vars:
929 # HAVE_SYS_IOCTL_H
930 # HAVE_SYS_FILIO_H
931 # USE_FIONBIO
932 # O_NONBLOCK
933 #
934 #--------------------------------------------------------------------
935
936 AC_DEFUN([SC_BLOCKING_STYLE], [
937 AC_CHECK_HEADERS(sys/ioctl.h)
938 AC_CHECK_HEADERS(sys/filio.h)
939 AC_MSG_CHECKING([FIONBIO vs. O_NONBLOCK for nonblocking I/O])
940 if test -f /usr/lib/NextStep/software_version; then
941 system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
942 else
943 system=`uname -s`-`uname -r`
944 if test "$?" -ne 0 ; then
945 system=unknown
946 else
947 # Special check for weird MP-RAS system (uname returns weird
948 # results, and the version is kept in special file).
949
950 if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
951 system=MP-RAS-`awk '{print $3}' /etc/.relid'`
952 fi
953 if test "`uname -s`" = "AIX" ; then
954 system=AIX-`uname -v`.`uname -r`
955 fi
956 fi
957 fi
958 case $system in
959 # There used to be code here to use FIONBIO under AIX. However, it
960 # was reported that FIONBIO doesn't work under AIX 3.2.5. Since
961 # using O_NONBLOCK seems fine under AIX 4.*, I removed the FIONBIO
962 # code (JO, 5/31/97).
963
964 OSF*)
965 AC_DEFINE(USE_FIONBIO)
966 AC_MSG_RESULT(FIONBIO)
967 ;;
968 SunOS-4*)
969 AC_DEFINE(USE_FIONBIO)
970 AC_MSG_RESULT(FIONBIO)
971 ;;
972 ULTRIX-4.*)
973 AC_DEFINE(USE_FIONBIO)
974 AC_MSG_RESULT(FIONBIO)
975 ;;
976 *)
977 AC_MSG_RESULT(O_NONBLOCK)
978 ;;
979 esac
980 ])
981
982 #--------------------------------------------------------------------
983 # SC_TIME_HANLDER
984 #
985 # Checks how the system deals with time.h, what time structures
986 # are used on the system, and what fields the structures have.
987 #
988 # Arguments:
989 # none
990 #
991 # Results:
992 #
993 # Defines some of the following vars:
994 # USE_DELTA_FOR_TZ
995 # HAVE_TM_GMTOFF
996 # HAVE_TM_TZADJ
997 # HAVE_TIMEZONE_VAR
998 #
999 #--------------------------------------------------------------------
1000
1001 AC_DEFUN([SC_TIME_HANDLER], [
1002 AC_CHECK_HEADERS(sys/time.h)
1003 AC_HEADER_TIME
1004 AC_STRUCT_TIMEZONE
1005
1006 AC_CHECK_FUNCS(gmtime_r localtime_r)
1007
1008 AC_MSG_CHECKING([tm_tzadj in struct tm])
1009 AC_CACHE_VAL(tcl_cv_member_tm_tzadj,
1010 AC_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_tzadj;],
1011 tcl_cv_member_tm_tzadj=yes, tcl_cv_member_tm_tzadj=no))
1012 AC_MSG_RESULT($tcl_cv_member_tm_tzadj)
1013 if test $tcl_cv_member_tm_tzadj = yes ; then
1014 AC_DEFINE(HAVE_TM_TZADJ)
1015 fi
1016
1017 AC_MSG_CHECKING([tm_gmtoff in struct tm])
1018 AC_CACHE_VAL(tcl_cv_member_tm_gmtoff,
1019 AC_TRY_COMPILE([#include <time.h>], [struct tm tm; tm.tm_gmtoff;],
1020 tcl_cv_member_tm_gmtoff=yes, tcl_cv_member_tm_gmtoff=no))
1021 AC_MSG_RESULT($tcl_cv_member_tm_gmtoff)
1022 if test $tcl_cv_member_tm_gmtoff = yes ; then
1023 AC_DEFINE(HAVE_TM_GMTOFF)
1024 fi
1025
1026 #
1027 # Its important to include time.h in this check, as some systems
1028 # (like convex) have timezone functions, etc.
1029 #
1030 AC_MSG_CHECKING([long timezone variable])
1031 AC_CACHE_VAL(tcl_cv_var_timezone,
1032 AC_TRY_COMPILE([#include <time.h>],
1033 [extern long timezone;
1034 timezone += 1;
1035 exit (0);],
1036 tcl_cv_timezone_long=yes, tcl_cv_timezone_long=no))
1037 AC_MSG_RESULT($tcl_cv_timezone_long)
1038 if test $tcl_cv_timezone_long = yes ; then
1039 AC_DEFINE(HAVE_TIMEZONE_VAR)
1040 else
1041 #
1042 # On some systems (eg IRIX 6.2), timezone is a time_t and not a long.
1043 #
1044 AC_MSG_CHECKING([time_t timezone variable])
1045 AC_CACHE_VAL(tcl_cv_timezone_time,
1046 AC_TRY_COMPILE([#include <time.h>],
1047 [extern time_t timezone;
1048 timezone += 1;
1049 exit (0);],
1050 tcl_cv_timezone_time=yes, tcl_cv_timezone_time=no))
1051 AC_MSG_RESULT($tcl_cv_timezone_time)
1052 if test $tcl_cv_timezone_time = yes ; then
1053 AC_DEFINE(HAVE_TIMEZONE_VAR)
1054 fi
1055 fi
1056 ])
1057
1058 #--------------------------------------------------------------------
1059 # SC_TCL_LINK_LIBS
1060 #
1061 # Search for the libraries needed to link the Tcl shell.
1062 # Things like the math library (-lm) and socket stuff (-lsocket vs.
1063 # -lnsl) are dealt with here.
1064 #
1065 # Arguments:
1066 # Requires the following vars to be set in the Makefile:
1067 # DL_LIBS
1068 # LIBS
1069 # MATH_LIBS
1070 #
1071 # Results:
1072 #
1073 # Subst's the following var:
1074 # TCL_LIBS
1075 # MATH_LIBS
1076 #
1077 # Might append to the following vars:
1078 # LIBS
1079 #
1080 # Might define the following vars:
1081 # HAVE_NET_ERRNO_H
1082 #
1083 #--------------------------------------------------------------------
1084
1085 AC_DEFUN([SC_TCL_LINK_LIBS], [
1086 #--------------------------------------------------------------------
1087 # On a few very rare systems, all of the libm.a stuff is
1088 # already in libc.a. Set compiler flags accordingly.
1089 # Also, Linux requires the "ieee" library for math to work
1090 # right (and it must appear before "-lm").
1091 #--------------------------------------------------------------------
1092
1093 AC_CHECK_FUNC(sin, MATH_LIBS="", MATH_LIBS="-lm")
1094 AC_CHECK_LIB(ieee, main, [MATH_LIBS="-lieee $MATH_LIBS"])
1095
1096 #--------------------------------------------------------------------
1097 # Interactive UNIX requires -linet instead of -lsocket, plus it
1098 # needs net/errno.h to define the socket-related error codes.
1099 #--------------------------------------------------------------------
1100
1101 AC_CHECK_LIB(inet, main, [LIBS="$LIBS -linet"])
1102 AC_CHECK_HEADER(net/errno.h, [AC_DEFINE(HAVE_NET_ERRNO_H)])
1103
1104 #--------------------------------------------------------------------
1105 # Check for the existence of the -lsocket and -lnsl libraries.
1106 # The order here is important, so that they end up in the right
1107 # order in the command line generated by make. Here are some
1108 # special considerations:
1109 # 1. Use "connect" and "accept" to check for -lsocket, and
1110 # "gethostbyname" to check for -lnsl.
1111 # 2. Use each function name only once: can't redo a check because
1112 # autoconf caches the results of the last check and won't redo it.
1113 # 3. Use -lnsl and -lsocket only if they supply procedures that
1114 # aren't already present in the normal libraries. This is because
1115 # IRIX 5.2 has libraries, but they aren't needed and they're
1116 # bogus: they goof up name resolution if used.
1117 # 4. On some SVR4 systems, can't use -lsocket without -lnsl too.
1118 # To get around this problem, check for both libraries together
1119 # if -lsocket doesn't work by itself.
1120 #--------------------------------------------------------------------
1121
1122 tcl_checkBoth=0
1123 AC_CHECK_FUNC(connect, tcl_checkSocket=0, tcl_checkSocket=1)
1124 if test "$tcl_checkSocket" = 1; then
1125 AC_CHECK_FUNC(setsockopt, , [AC_CHECK_LIB(socket, setsockopt,
1126 LIBS="$LIBS -lsocket", tcl_checkBoth=1)])
1127 fi
1128 if test "$tcl_checkBoth" = 1; then
1129 tk_oldLibs=$LIBS
1130 LIBS="$LIBS -lsocket -lnsl"
1131 AC_CHECK_FUNC(accept, tcl_checkNsl=0, [LIBS=$tk_oldLibs])
1132 fi
1133 AC_CHECK_FUNC(gethostbyname, , [AC_CHECK_LIB(nsl, gethostbyname,
1134 [LIBS="$LIBS -lnsl"])])
1135
1136 # Don't perform the eval of the libraries here because DL_LIBS
1137 # won't be set until we call SC_CONFIG_CFLAGS
1138
1139 TCL_LIBS='${DL_LIBS} ${LIBS} ${MATH_LIBS}'
1140 AC_SUBST(TCL_LIBS)
1141 AC_SUBST(MATH_LIBS)
1142 ])
1143
1144 #--------------------------------------------------------------------
1145 # SC_TCL_EARLY_FLAGS
1146 #
1147 # Check for what flags are needed to be passed so the correct OS
1148 # features are available.
1149 #
1150 # Arguments:
1151 # None
1152 #
1153 # Results:
1154 #
1155 # Might define the following vars:
1156 # _ISOC99_SOURCE
1157 # _LARGEFILE64_SOURCE
1158 #
1159 #--------------------------------------------------------------------
1160
1161 AC_DEFUN([SC_TCL_EARLY_FLAG],[
1162 AC_CACHE_VAL([tcl_cv_flag_]translit($1,[A-Z],[a-z]),
1163 AC_TRY_COMPILE([$2], $3, [tcl_cv_flag_]translit($1,[A-Z],[a-z])=no,
1164 AC_TRY_COMPILE([[#define ]$1[ 1
1165 ]$2], $3,
1166 [tcl_cv_flag_]translit($1,[A-Z],[a-z])=yes,
1167 [tcl_cv_flag_]translit($1,[A-Z],[a-z])=no)))
1168 if test ["x${tcl_cv_flag_]translit($1,[A-Z],[a-z])[}" = "xyes"] ; then
1169 AC_DEFINE($1)
1170 tcl_flags="$tcl_flags $1"
1171 fi])
1172
1173 AC_DEFUN([SC_TCL_EARLY_FLAGS],[
1174 AC_MSG_CHECKING([for required early compiler flags])
1175 tcl_flags=""
1176 SC_TCL_EARLY_FLAG(_ISOC99_SOURCE,[#include <stdlib.h>],
1177 [char *p = (char *)strtoll; char *q = (char *)strtoull;])
1178 SC_TCL_EARLY_FLAG(_LARGEFILE64_SOURCE,[#include <sys/stat.h>],
1179 [struct stat64 buf; int i = stat64("/", &buf);])
1180 if test "x${tcl_flags}" = "x" ; then
1181 AC_MSG_RESULT(none)
1182 else
1183 AC_MSG_RESULT(${tcl_flags})
1184 fi])
1185
1186 #--------------------------------------------------------------------
1187 # SC_TCL_64BIT_FLAGS
1188 #
1189 # Check for what is defined in the way of 64-bit features.
1190 #
1191 # Arguments:
1192 # None
1193 #
1194 # Results:
1195 #
1196 # Might define the following vars:
1197 # TCL_WIDE_INT_IS_LONG
1198 # TCL_WIDE_INT_TYPE
1199 # HAVE_STRUCT_DIRENT64
1200 # HAVE_STRUCT_STAT64
1201 # HAVE_TYPE_OFF64_T
1202 #
1203 #--------------------------------------------------------------------
1204
1205 AC_DEFUN([SC_TCL_64BIT_FLAGS], [
1206 AC_MSG_CHECKING([for 64-bit integer type])
1207 AC_CACHE_VAL(tcl_cv_type_64bit,[
1208 tcl_cv_type_64bit=none
1209 # See if the compiler knows natively about __int64
1210 AC_TRY_COMPILE(,[__int64 value = (__int64) 0;],
1211 tcl_type_64bit=__int64, tcl_type_64bit="long long")
1212 # See if we should use long anyway Note that we substitute in the
1213 # type that is our current guess for a 64-bit type inside this check
1214 # program, so it should be modified only carefully...
1215 AC_TRY_RUN([#include <unistd.h>
1216 int main() {exit(!(sizeof(]${tcl_type_64bit}[) > sizeof(long)));}
1217 ], tcl_cv_type_64bit=${tcl_type_64bit},:,:)])
1218 if test "${tcl_cv_type_64bit}" = none ; then
1219 AC_DEFINE(TCL_WIDE_INT_IS_LONG)
1220 AC_MSG_RESULT(using long)
1221 else
1222 AC_DEFINE_UNQUOTED(TCL_WIDE_INT_TYPE,${tcl_cv_type_64bit})
1223 AC_MSG_RESULT(${tcl_cv_type_64bit})
1224
1225 # Now check for auxiliary declarations
1226 AC_MSG_CHECKING([for struct dirent64])
1227 AC_CACHE_VAL(tcl_cv_struct_dirent64,[
1228 AC_TRY_COMPILE([#include <sys/types.h>
1229 #include <sys/dirent.h>],[struct dirent64 p;],
1230 tcl_cv_struct_dirent64=yes,tcl_cv_struct_dirent64=no)])
1231 if test "x${tcl_cv_struct_dirent64}" = "xyes" ; then
1232 AC_DEFINE(HAVE_STRUCT_DIRENT64)
1233 fi
1234 AC_MSG_RESULT(${tcl_cv_struct_dirent64})
1235
1236 AC_MSG_CHECKING([for struct stat64])
1237 AC_CACHE_VAL(tcl_cv_struct_stat64,[
1238 AC_TRY_COMPILE([#include <sys/stat.h>],[struct stat64 p;
1239 ],
1240 tcl_cv_struct_stat64=yes,tcl_cv_struct_stat64=no)])
1241 if test "x${tcl_cv_struct_stat64}" = "xyes" ; then
1242 AC_DEFINE(HAVE_STRUCT_STAT64)
1243 fi
1244 AC_MSG_RESULT(${tcl_cv_struct_stat64})
1245
1246 AC_MSG_CHECKING([for off64_t])
1247 AC_CACHE_VAL(tcl_cv_type_off64_t,[
1248 AC_TRY_COMPILE([#include <sys/types.h>],[off64_t offset;
1249 ],
1250 tcl_cv_type_off64_t=yes,tcl_cv_type_off64_t=no)])
1251 if test "x${tcl_cv_type_off64_t}" = "xyes" ; then
1252 AC_DEFINE(HAVE_TYPE_OFF64_T)
1253 fi
1254 AC_MSG_RESULT(${tcl_cv_type_off64_t})
1255 fi])

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23