1 dnl aclocal.m4 generated automatically by aclocal 1.4
3 dnl Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000
4 dnl Free Software Foundation, Inc.
5 dnl This file is free software; the Free Software Foundation
6 dnl gives unlimited permission to copy and/or distribute it,
7 dnl with or without modifications, as long as this notice is preserved.
9 dnl This program is distributed in the hope that it will be useful,
10 dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 dnl PARTICULAR PURPOSE.
17 dnl gdb/configure.in uses BFD_NEED_DECLARATION, so get its definition.
18 sinclude(../bfd/acinclude.m4)
20 dnl This gets the standard macros, like the TCL, TK, etc ones.
21 sinclude(../config/acinclude.m4)
23 dnl CYGNUS LOCAL: This gets the right posix flag for gcc
24 AC_DEFUN(CY_AC_TCL_LYNX_POSIX,
25 [AC_REQUIRE([AC_PROG_CC])AC_REQUIRE([AC_PROG_CPP])
26 AC_MSG_CHECKING([if running LynxOS])
27 AC_CACHE_VAL(ac_cv_os_lynx,
30 * The old Lynx "cc" only defines "Lynx", but the newer one uses "__Lynx__"
32 #if defined(__Lynx__) || defined(Lynx)
35 ], ac_cv_os_lynx=yes, ac_cv_os_lynx=no)])
37 if test "$ac_cv_os_lynx" = "yes" ; then
40 AC_MSG_CHECKING([whether -mposix or -X is available])
41 AC_CACHE_VAL(ac_cv_c_posix_flag,
44 * This flag varies depending on how old the compiler is.
45 * -X is for the old "cc" and "gcc" (based on 1.42).
46 * -mposix is for the new gcc (at least 2.5.8).
48 #if defined(__GNUC__) && __GNUC__ >= 2
51 ], ac_cv_c_posix_flag=" -mposix", ac_cv_c_posix_flag=" -X")])
52 CC="$CC $ac_cv_c_posix_flag"
53 AC_MSG_RESULT($ac_cv_c_posix_flag)
60 # Sometimes the native compiler is a bogus stub for gcc or /usr/ucb/cc. This
61 # makes configure think it's cross compiling. If --target wasn't used, then
62 # we can't configure, so something is wrong. We don't use the cache
63 # here cause if somebody fixes their compiler install, we want this to work.
64 AC_DEFUN(CY_AC_C_WORKS,
65 [# If we cannot compile and link a trivial program, we can't expect anything to work
66 AC_MSG_CHECKING(whether the compiler ($CC) actually works)
67 AC_TRY_COMPILE(, [/* don't need anything here */],
68 c_compiles=yes, c_compiles=no)
70 AC_TRY_LINK(, [/* don't need anything here */],
71 c_links=yes, c_links=no)
73 if test x"${c_compiles}" = x"no" ; then
74 AC_MSG_ERROR(the native compiler is broken and won't compile.)
77 if test x"${c_links}" = x"no" ; then
78 AC_MSG_ERROR(the native compiler is broken and won't link.)
83 AC_DEFUN(CY_AC_PATH_TCLH, [
85 # Ok, lets find the tcl source trees so we can use the headers
86 # Warning: transition of version 9 to 10 will break this algorithm
87 # because 10 sorts before 9. We also look for just tcl. We have to
88 # be careful that we don't match stuff like tclX by accident.
89 # the alternative search directory is involked by --with-tclinclude
93 AC_MSG_CHECKING(for Tcl private headers. dir=${configdir})
94 AC_ARG_WITH(tclinclude, [ --with-tclinclude=DIR Directory where tcl private headers are], with_tclinclude=${withval})
95 AC_CACHE_VAL(ac_cv_c_tclh,[
96 # first check to see if --with-tclinclude was specified
97 if test x"${with_tclinclude}" != x ; then
98 if test -f ${with_tclinclude}/tclInt.h ; then
99 ac_cv_c_tclh=`(cd ${with_tclinclude}; pwd)`
100 elif test -f ${with_tclinclude}/generic/tclInt.h ; then
101 ac_cv_c_tclh=`(cd ${with_tclinclude}/generic; pwd)`
103 AC_MSG_ERROR([${with_tclinclude} directory doesn't contain private headers])
107 # next check if it came with Tcl configuration file
108 if test x"${ac_cv_c_tclconfig}" = x ; then
109 if test -f $ac_cv_c_tclconfig/../generic/tclInt.h ; then
110 ac_cv_c_tclh=`(cd $ac_cv_c_tclconfig/..; pwd)`
114 # next check in private source directory
116 # since ls returns lowest version numbers first, reverse its output
117 if test x"${ac_cv_c_tclh}" = x ; then
120 `ls -dr ${srcdir}/../tcl[[7-9]]* 2>/dev/null` \
121 ${srcdir}/../../tcl \
122 `ls -dr ${srcdir}/../../tcl[[7-9]]* 2>/dev/null` \
123 ${srcdir}/../../../tcl \
124 `ls -dr ${srcdir}/../../../tcl[[7-9]]* 2>/dev/null ` ; do
125 if test -f $i/generic/tclInt.h ; then
126 ac_cv_c_tclh=`(cd $i/generic; pwd)`
131 # finally check in a few common install locations
133 # since ls returns lowest version numbers first, reverse its output
134 if test x"${ac_cv_c_tclh}" = x ; then
136 `ls -dr /usr/local/src/tcl[[7-9]]* 2>/dev/null` \
137 `ls -dr /usr/local/lib/tcl[[7-9]]* 2>/dev/null` \
140 ${prefix}/include ; do
141 if test -f $i/generic/tclInt.h ; then
142 ac_cv_c_tclh=`(cd $i/generic; pwd)`
147 # see if one is installed
148 if test x"${ac_cv_c_tclh}" = x ; then
149 AC_HEADER_CHECK(tclInt.h, ac_cv_c_tclh=installed, ac_cv_c_tclh="")
152 if test x"${ac_cv_c_tclh}" = x ; then
153 TCLHDIR="# no Tcl private headers found"
154 AC_MSG_ERROR([Can't find Tcl private headers])
156 if test x"${ac_cv_c_tclh}" != x ; then
158 if test x"${ac_cv_c_tclh}" = x"installed" ; then
159 AC_MSG_RESULT([is installed])
162 AC_MSG_RESULT([found in ${ac_cv_c_tclh}])
163 # this hack is cause the TCLHDIR won't print if there is a "-I" in it.
164 TCLHDIR="-I${ac_cv_c_tclh}"
172 AC_DEFUN(CY_AC_PATH_TCLCONFIG, [
174 # Ok, lets find the tcl configuration
175 # First, look for one uninstalled.
176 # the alternative search directory is invoked by --with-tclconfig
179 if test x"${no_tcl}" = x ; then
180 # we reset no_tcl in case something fails here
182 AC_ARG_WITH(tclconfig, [ --with-tclconfig=DIR Directory containing tcl configuration (tclConfig.sh)],
183 with_tclconfig=${withval})
184 AC_MSG_CHECKING([for Tcl configuration])
185 AC_CACHE_VAL(ac_cv_c_tclconfig,[
187 # First check to see if --with-tclconfig was specified.
188 if test x"${with_tclconfig}" != x ; then
189 if test -f "${with_tclconfig}/tclConfig.sh" ; then
190 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
192 AC_MSG_ERROR([${with_tclconfig} directory doesn't contain tclConfig.sh])
196 # then check for a private Tcl installation
197 if test x"${ac_cv_c_tclconfig}" = x ; then
200 `ls -dr ../tcl[[7-9]]* 2>/dev/null` \
202 `ls -dr ../../tcl[[7-9]]* 2>/dev/null` \
204 `ls -dr ../../../tcl[[7-9]]* 2>/dev/null` ; do
205 if test -f "$i/${configdir}/tclConfig.sh" ; then
206 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
211 # check in a few common install locations
212 if test x"${ac_cv_c_tclconfig}" = x ; then
213 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
214 if test -f "$i/tclConfig.sh" ; then
215 ac_cv_c_tclconfig=`(cd $i; pwd)`
220 # check in a few other private locations
221 if test x"${ac_cv_c_tclconfig}" = x ; then
224 `ls -dr ${srcdir}/../tcl[[7-9]]* 2>/dev/null` ; do
225 if test -f "$i/${configdir}/tclConfig.sh" ; then
226 ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)`
232 if test x"${ac_cv_c_tclconfig}" = x ; then
233 TCLCONFIG="# no Tcl configs found"
234 AC_MSG_WARN(Can't find Tcl configuration definitions)
237 TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh
238 AC_MSG_RESULT(found $TCLCONFIG)
243 # Defined as a separate macro so we don't have to cache the values
244 # from PATH_TCLCONFIG (because this can also be cached).
245 AC_DEFUN(CY_AC_LOAD_TCLCONFIG, [
248 AC_SUBST(TCL_VERSION)
249 AC_SUBST(TCL_MAJOR_VERSION)
250 AC_SUBST(TCL_MINOR_VERSION)
254 dnl not used, don't export to save symbols
255 dnl AC_SUBST(TCL_LIB_FILE)
257 dnl don't export, not used outside of configure
258 dnl AC_SUBST(TCL_LIBS)
259 dnl not used, don't export to save symbols
260 dnl AC_SUBST(TCL_PREFIX)
262 dnl not used, don't export to save symbols
263 dnl AC_SUBST(TCL_EXEC_PREFIX)
265 AC_SUBST(TCL_SHLIB_CFLAGS)
266 AC_SUBST(TCL_SHLIB_LD)
267 dnl don't export, not used outside of configure
268 AC_SUBST(TCL_SHLIB_LD_LIBS)
269 AC_SUBST(TCL_SHLIB_SUFFIX)
270 dnl not used, don't export to save symbols
271 AC_SUBST(TCL_DL_LIBS)
272 AC_SUBST(TCL_LD_FLAGS)
273 dnl don't export, not used outside of configure
274 AC_SUBST(TCL_LD_SEARCH_FLAGS)
275 AC_SUBST(TCL_COMPAT_OBJS)
277 AC_SUBST(TCL_BUILD_LIB_SPEC)
278 AC_SUBST(TCL_LIB_SPEC)
279 AC_SUBST(TCL_LIB_VERSIONS_OK)
281 dnl not used, don't export to save symbols
282 dnl AC_SUBST(TCL_SHARED_LIB_SUFFIX)
284 dnl not used, don't export to save symbols
285 dnl AC_SUBST(TCL_UNSHARED_LIB_SUFFIX)
288 # Warning: Tk definitions are very similar to Tcl definitions but
289 # are not precisely the same. There are a couple of differences,
290 # so don't do changes to Tcl thinking you can cut and paste it do
291 # the Tk differences and later simply substitute "Tk" for "Tcl".
293 # - Acceptable Tcl major version #s is 7-9 while Tk is 4-9
294 # - Searching for Tcl includes looking for tclInt.h, Tk looks for tk.h
295 # - Computing major/minor versions is different because Tk depends on
296 # headers to Tcl, Tk, and X.
297 # - Symbols in tkConfig.sh are different than tclConfig.sh
298 # - Acceptable for Tk to be missing but not Tcl.
300 AC_DEFUN(CY_AC_PATH_TKH, [
302 # Ok, lets find the tk source trees so we can use the headers
303 # If the directory (presumably symlink) named "tk" exists, use that one
304 # in preference to any others. Same logic is used when choosing library
305 # and again with Tcl. The search order is the best place to look first, then in
306 # decreasing significance. The loop breaks if the trigger file is found.
307 # Note the gross little conversion here of srcdir by cd'ing to the found
308 # directory. This converts the path from a relative to an absolute, so
309 # recursive cache variables for the path will work right. We check all
310 # the possible paths in one loop rather than many seperate loops to speed
312 # the alternative search directory is involked by --with-tkinclude
315 AC_MSG_CHECKING(for Tk private headers)
316 AC_ARG_WITH(tkinclude, [ --with-tkinclude=DIR Directory where tk private headers are], with_tkinclude=${withval})
317 AC_CACHE_VAL(ac_cv_c_tkh,[
318 # first check to see if --with-tkinclude was specified
319 if test x"${with_tkinclude}" != x ; then
320 if test -f ${with_tkinclude}/tk.h ; then
321 ac_cv_c_tkh=`(cd ${with_tkinclude}; pwd)`
322 elif test -f ${with_tkinclude}/generic/tk.h ; then
323 ac_cv_c_tkh=`(cd ${with_tkinclude}/generic; pwd)`
325 AC_MSG_ERROR([${with_tkinclude} directory doesn't contain private headers])
329 # next check if it came with Tk configuration file
330 if test x"${ac_cv_c_tkconfig}" = x ; then
331 if test -f $ac_cv_c_tkconfig/../generic/tk.h ; then
332 ac_cv_c_tkh=`(cd $ac_cv_c_tkconfig/..; pwd)`
336 # next check in private source directory
338 # since ls returns lowest version numbers first, reverse its output
339 if test x"${ac_cv_c_tkh}" = x ; then
342 `ls -dr ${srcdir}/../tk[[4-9]]* 2>/dev/null` \
344 `ls -dr ${srcdir}/../../tk[[4-9]]* 2>/dev/null` \
345 ${srcdir}/../../../tk \
346 `ls -dr ${srcdir}/../../../tk[[4-9]]* 2>/dev/null ` ; do
347 if test -f $i/generic/tk.h ; then
348 ac_cv_c_tkh=`(cd $i/generic; pwd)`
353 # finally check in a few common install locations
355 # since ls returns lowest version numbers first, reverse its output
356 if test x"${ac_cv_c_tkh}" = x ; then
358 `ls -dr /usr/local/src/tk[[4-9]]* 2>/dev/null` \
359 `ls -dr /usr/local/lib/tk[[4-9]]* 2>/dev/null` \
362 ${prefix}/include ; do
363 if test -f $i/generic/tk.h ; then
364 ac_cv_c_tkh=`(cd $i/generic; pwd)`
369 # see if one is installed
370 if test x"${ac_cv_c_tkh}" = x ; then
371 AC_HEADER_CHECK(tk.h, ac_cv_c_tkh=installed, ac_cv_c_tkh="")
374 if test x"${ac_cv_c_tkh}" != x ; then
376 if test x"${ac_cv_c_tkh}" = x"installed" ; then
377 AC_MSG_RESULT([is installed])
380 AC_MSG_RESULT([found in ${ac_cv_c_tkh}])
381 # this hack is cause the TKHDIR won't print if there is a "-I" in it.
382 TKHDIR="-I${ac_cv_c_tkh}"
385 TKHDIR="# no Tk directory found"
386 AC_MSG_WARN([Can't find Tk private headers])
394 AC_DEFUN(CY_AC_PATH_TKCONFIG, [
396 # Ok, lets find the tk configuration
397 # First, look for one uninstalled.
398 # the alternative search directory is invoked by --with-tkconfig
401 if test x"${no_tk}" = x ; then
402 # we reset no_tk in case something fails here
404 AC_ARG_WITH(tkconfig, [ --with-tkconfig=DIR Directory containing tk configuration (tkConfig.sh)],
405 with_tkconfig=${withval})
406 AC_MSG_CHECKING([for Tk configuration])
407 AC_CACHE_VAL(ac_cv_c_tkconfig,[
409 # First check to see if --with-tkconfig was specified.
410 if test x"${with_tkconfig}" != x ; then
411 if test -f "${with_tkconfig}/tkConfig.sh" ; then
412 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
414 AC_MSG_ERROR([${with_tkconfig} directory doesn't contain tkConfig.sh])
418 # then check for a private Tk library
419 if test x"${ac_cv_c_tkconfig}" = x ; then
422 `ls -dr ../tk[[4-9]]* 2>/dev/null` \
424 `ls -dr ../../tk[[4-9]]* 2>/dev/null` \
426 `ls -dr ../../../tk[[4-9]]* 2>/dev/null` ; do
427 if test -f "$i/${configdir}/tkConfig.sh" ; then
428 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
433 # check in a few common install locations
434 if test x"${ac_cv_c_tkconfig}" = x ; then
435 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
436 if test -f "$i/tkConfig.sh" ; then
437 ac_cv_c_tkconfig=`(cd $i; pwd)`
442 # check in a few other private locations
443 if test x"${ac_cv_c_tkconfig}" = x ; then
446 `ls -dr ${srcdir}/../tk[[4-9]]* 2>/dev/null` ; do
447 if test -f "$i/${configdir}/tkConfig.sh" ; then
448 ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)`
454 if test x"${ac_cv_c_tkconfig}" = x ; then
455 TKCONFIG="# no Tk configs found"
456 AC_MSG_WARN(Can't find Tk configuration definitions)
459 TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh
460 AC_MSG_RESULT(found $TKCONFIG)
466 # Defined as a separate macro so we don't have to cache the values
467 # from PATH_TKCONFIG (because this can also be cached).
468 AC_DEFUN(CY_AC_LOAD_TKCONFIG, [
469 if test -f "$TKCONFIG" ; then
474 dnl not actually used, don't export to save symbols
475 dnl AC_SUBST(TK_MAJOR_VERSION)
476 dnl AC_SUBST(TK_MINOR_VERSION)
479 dnl not used, don't export to save symbols
480 dnl AC_SUBST(TK_LIB_FILE)
482 dnl not used outside of configure
483 dnl AC_SUBST(TK_LIBS)
484 dnl not used, don't export to save symbols
485 dnl AC_SUBST(TK_PREFIX)
487 dnl not used, don't export to save symbols
488 dnl AC_SUBST(TK_EXEC_PREFIX)
490 AC_SUBST(TK_BUILD_INCLUDES)
491 AC_SUBST(TK_XINCLUDES)
493 AC_SUBST(TK_BUILD_LIB_SPEC)
494 AC_SUBST(TK_LIB_SPEC)
497 # check for Itcl headers.
499 AC_DEFUN(CY_AC_PATH_ITCLCONFIG, [
501 # Ok, lets find the itcl configuration
502 # First, look for one uninstalled.
503 # the alternative search directory is invoked by --with-itclconfig
506 if test x"${no_itcl}" = x ; then
507 # we reset no_itcl in case something fails here
509 AC_ARG_WITH(itclconfig, [ --with-itclconfig Directory containing itcl configuration (itclConfig.sh)],
510 with_itclconfig=${withval})
511 AC_MSG_CHECKING([for Itcl configuration])
512 AC_CACHE_VAL(ac_cv_c_itclconfig,[
514 # First check to see if --with-itclconfig was specified.
515 if test x"${with_itclconfig}" != x ; then
516 if test -f "${with_itclconfig}/itclConfig.sh" ; then
517 ac_cv_c_itclconfig=`(cd ${with_itclconfig}; pwd)`
519 AC_MSG_ERROR([${with_itclconfig} directory doesn't contain itclConfig.sh])
523 # then check for a private Itcl library
524 if test x"${ac_cv_c_itclconfig}" = x ; then
527 `ls -dr ../itcl[[4-9]]*/itcl 2>/dev/null` \
529 `ls -dr ../../itcl[[4-9]]*/itcl 2>/dev/null` \
531 `ls -dr ../../../itcl[[4-9]]*/itcl 2>/dev/null` ; do
532 if test -f "$i/itclConfig.sh" ; then
533 ac_cv_c_itclconfig=`(cd $i; pwd)`
538 # check in a few common install locations
539 if test x"${ac_cv_c_itclconfig}" = x ; then
540 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
541 if test -f "$i/itclConfig.sh" ; then
542 ac_cv_c_itclconfig=`(cd $i; pwd)`
547 # check in a few other private locations
548 if test x"${ac_cv_c_itclconfig}" = x ; then
550 ${srcdir}/../itcl/itcl \
551 `ls -dr ${srcdir}/../itcl[[4-9]]*/itcl 2>/dev/null` ; do
552 if test -f "$i/itclConfig.sh" ; then
553 ac_cv_c_itclconfig=`(cd $i; pwd)`
559 if test x"${ac_cv_c_itclconfig}" = x ; then
560 ITCLCONFIG="# no Itcl configs found"
561 AC_MSG_WARN(Can't find Itcl configuration definitions)
564 ITCLCONFIG=${ac_cv_c_itclconfig}/itclConfig.sh
565 AC_MSG_RESULT(found $ITCLCONFIG)
570 # Defined as a separate macro so we don't have to cache the values
571 # from PATH_ITCLCONFIG (because this can also be cached).
572 AC_DEFUN(CY_AC_LOAD_ITCLCONFIG, [
573 if test -f "$ITCLCONFIG" ; then
577 AC_SUBST(ITCL_VERSION)
578 dnl not actually used, don't export to save symbols
579 dnl AC_SUBST(ITCL_MAJOR_VERSION)
580 dnl AC_SUBST(ITCL_MINOR_VERSION)
583 dnl not used, don't export to save symbols
584 dnl AC_SUBST(ITCL_LIB_FILE)
586 dnl not used outside of configure
587 dnl AC_SUBST(ITCL_LIBS)
588 dnl not used, don't export to save symbols
589 dnl AC_SUBST(ITCL_PREFIX)
591 dnl not used, don't export to save symbols
592 dnl AC_SUBST(ITCL_EXEC_PREFIX)
594 AC_SUBST(ITCL_BUILD_INCLUDES)
595 AC_SUBST(ITCL_BUILD_LIB_SPEC)
596 AC_SUBST(ITCL_LIB_SPEC)
599 # check for Itcl headers.
601 AC_DEFUN(CY_AC_PATH_ITCLH, [
602 AC_MSG_CHECKING(for Itcl private headers. srcdir=${srcdir})
603 if test x"${ac_cv_c_itclh}" = x ; then
604 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itcl; do
605 if test -f $i/generic/itcl.h ; then
606 ac_cv_c_itclh=`(cd $i/generic; pwd)`
611 if test x"${ac_cv_c_itclh}" = x ; then
612 ITCLHDIR="# no Itcl private headers found"
613 AC_MSG_ERROR([Can't find Itcl private headers])
615 if test x"${ac_cv_c_itclh}" != x ; then
616 ITCLHDIR="-I${ac_cv_c_itclh}"
618 # should always be here
619 # ITCLLIB="../itcl/itcl/unix/libitcl.a"
625 AC_DEFUN(CY_AC_PATH_ITKCONFIG, [
627 # Ok, lets find the itk configuration
628 # First, look for one uninstalled.
629 # the alternative search directory is invoked by --with-itkconfig
632 if test x"${no_itk}" = x ; then
633 # we reset no_itk in case something fails here
635 AC_ARG_WITH(itkconfig, [ --with-itkconfig Directory containing itk configuration (itkConfig.sh)],
636 with_itkconfig=${withval})
637 AC_MSG_CHECKING([for Itk configuration])
638 AC_CACHE_VAL(ac_cv_c_itkconfig,[
640 # First check to see if --with-itkconfig was specified.
641 if test x"${with_itkconfig}" != x ; then
642 if test -f "${with_itkconfig}/itkConfig.sh" ; then
643 ac_cv_c_itkconfig=`(cd ${with_itkconfig}; pwd)`
645 AC_MSG_ERROR([${with_itkconfig} directory doesn't contain itkConfig.sh])
649 # then check for a private Itk library
650 if test x"${ac_cv_c_itkconfig}" = x ; then
653 `ls -dr ../itcl[[4-9]]*/itk 2>/dev/null` \
655 `ls -dr ../../itcl[[4-9]]*/itk 2>/dev/null` \
657 `ls -dr ../../../itcl[[4-9]]*/itk 2>/dev/null` ; do
658 if test -f "$i/itkConfig.sh" ; then
659 ac_cv_c_itkconfig=`(cd $i; pwd)`
664 # check in a few common install locations
665 if test x"${ac_cv_c_itkconfig}" = x ; then
666 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
667 if test -f "$i/itkConfig.sh" ; then
668 ac_cv_c_itkconfig=`(cd $i; pwd)`
673 # check in a few other private locations
674 if test x"${ac_cv_c_itkconfig}" = x ; then
676 ${srcdir}/../itcl/itk \
677 `ls -dr ${srcdir}/../itcl[[4-9]]*/itk 2>/dev/null` ; do
678 if test -f "$i/itkConfig.sh" ; then
679 ac_cv_c_itkconfig=`(cd $i; pwd)`
685 if test x"${ac_cv_c_itkconfig}" = x ; then
686 ITKCONFIG="# no Itk configs found"
687 AC_MSG_WARN(Can't find Itk configuration definitions)
690 ITKCONFIG=${ac_cv_c_itkconfig}/itkConfig.sh
691 AC_MSG_RESULT(found $ITKCONFIG)
697 # Defined as a separate macro so we don't have to cache the values
698 # from PATH_ITKCONFIG (because this can also be cached).
699 AC_DEFUN(CY_AC_LOAD_ITKCONFIG, [
700 if test -f "$ITKCONFIG" ; then
704 AC_SUBST(ITK_VERSION)
705 dnl not actually used, don't export to save symbols
706 dnl AC_SUBST(ITK_MAJOR_VERSION)
707 dnl AC_SUBST(ITK_MINOR_VERSION)
710 dnl not used, don't export to save symbols
711 dnl AC_SUBST(ITK_LIB_FILE)
713 dnl not used outside of configure
714 dnl AC_SUBST(ITK_LIBS)
715 dnl not used, don't export to save symbols
716 dnl AC_SUBST(ITK_PREFIX)
718 dnl not used, don't export to save symbols
719 dnl AC_SUBST(ITK_EXEC_PREFIX)
721 AC_SUBST(ITK_BUILD_INCLUDES)
722 AC_SUBST(ITK_BUILD_LIB_SPEC)
723 AC_SUBST(ITK_LIB_SPEC)
726 AC_DEFUN(CY_AC_PATH_ITKH, [
727 AC_MSG_CHECKING(for Itk private headers. srcdir=${srcdir})
728 if test x"${ac_cv_c_itkh}" = x ; then
729 for i in ${srcdir}/../itcl ${srcdir}/../../itcl ${srcdir}/../../../itcl ${srcdir}/../itcl/itk; do
730 if test -f $i/generic/itk.h ; then
731 ac_cv_c_itkh=`(cd $i/generic; pwd)`
736 if test x"${ac_cv_c_itkh}" = x ; then
737 ITKHDIR="# no Itk private headers found"
738 AC_MSG_ERROR([Can't find Itk private headers])
740 if test x"${ac_cv_c_itkh}" != x ; then
741 ITKHDIR="-I${ac_cv_c_itkh}"
743 # should always be here
744 # ITKLIB="../itcl/itk/unix/libitk.a"
749 # check for Tix headers.
751 AC_DEFUN(CY_AC_PATH_TIXH, [
752 AC_MSG_CHECKING(for Tix private headers. srcdir=${srcdir})
753 if test x"${ac_cv_c_tixh}" = x ; then
754 for i in ${srcdir}/../tix ${srcdir}/../../tix ${srcdir}/../../../tix ; do
755 if test -f $i/generic/tix.h ; then
756 ac_cv_c_tixh=`(cd $i/generic; pwd)`
761 if test x"${ac_cv_c_tixh}" = x ; then
762 TIXHDIR="# no Tix private headers found"
763 AC_MSG_ERROR([Can't find Tix private headers])
765 if test x"${ac_cv_c_tixh}" != x ; then
766 TIXHDIR="-I${ac_cv_c_tixh}"
771 AC_DEFUN(CY_AC_PATH_TIXCONFIG, [
773 # Ok, lets find the tix configuration
774 # First, look for one uninstalled.
775 # the alternative search directory is invoked by --with-itkconfig
778 if test x"${no_tix}" = x ; then
779 # we reset no_tix in case something fails here
781 AC_ARG_WITH(tixconfig, [ --with-tixconfig Directory containing tix configuration (tixConfig.sh)],
782 with_tixconfig=${withval})
783 AC_MSG_CHECKING([for Tix configuration])
784 AC_CACHE_VAL(ac_cv_c_tixconfig,[
786 # First check to see if --with-tixconfig was specified.
787 if test x"${with_tixconfig}" != x ; then
788 if test -f "${with_tixconfig}/tixConfig.sh" ; then
789 ac_cv_c_tixconfig=`(cd ${with_tixconfig}; pwd)`
791 AC_MSG_ERROR([${with_tixconfig} directory doesn't contain tixConfig.sh])
795 # then check for a private Tix library
796 if test x"${ac_cv_c_tixconfig}" = x ; then
799 `ls -dr ../tix 2>/dev/null` \
801 `ls -dr ../../tix 2>/dev/null` \
803 `ls -dr ../../../tix 2>/dev/null` ; do
804 echo "**** Looking at $i - with ${configdir}"
805 if test -f "$i/tixConfig.sh" ; then
806 ac_cv_c_tixconfig=`(cd $i; pwd)`
811 # check in a few common install locations
812 if test x"${ac_cv_c_tixconfig}" = x ; then
813 for i in `ls -d ${prefix}/lib /usr/local/lib 2>/dev/null` ; do
814 echo "**** Looking at $i"
815 if test -f "$i/tixConfig.sh" ; then
816 ac_cv_c_tixconfig=`(cd $i; pwd)`
821 # check in a few other private locations
822 echo "**** Other private locations"
823 if test x"${ac_cv_c_tixconfig}" = x ; then
826 `ls -dr ${srcdir}/../tix 2>/dev/null` ; do
827 echo "**** Looking at $i - with ${configdir}"
828 if test -f "$i/${configdir}/tixConfig.sh" ; then
829 ac_cv_c_tixconfig=`(cd $i/${configdir}; pwd)`
835 if test x"${ac_cv_c_tixconfig}" = x ; then
836 TIXCONFIG="# no Tix configs found"
837 AC_MSG_WARN(Can't find Tix configuration definitions)
840 TIXCONFIG=${ac_cv_c_tixconfig}/tixConfig.sh
841 AC_MSG_RESULT(found $TIXCONFIG)
847 # Defined as a separate macro so we don't have to cache the values
848 # from PATH_TIXCONFIG (because this can also be cached).
849 AC_DEFUN(CY_AC_LOAD_TIXCONFIG, [
850 if test -f "$TIXCONFIG" ; then
854 AC_SUBST(TIX_VERSION)
855 dnl not actually used, don't export to save symbols
856 dnl AC_SUBST(TIX_MAJOR_VERSION)
857 dnl AC_SUBST(TIX_MINOR_VERSION)
858 dnl AC_SUBST(TIX_DEFS)
860 dnl not used, don't export to save symbols
861 dnl dnl AC_SUBST(TIX_LIB_FILE)
863 dnl not used outside of configure
864 dnl AC_SUBST(TIX_LIBS)
865 dnl not used, don't export to save symbols
866 dnl AC_SUBST(TIX_PREFIX)
868 dnl not used, don't export to save symbols
869 dnl AC_SUBST(TIX_EXEC_PREFIX)
871 dnl AC_SUBST(TIX_BUILD_INCLUDES)
872 AC_SUBST(TIX_BUILD_LIB_SPEC)
873 dnl AC_SUBST(TIX_LIB_SPEC)
876 dnl sinclude(../gettext.m4) already included by bfd/acinclude.m4
877 dnl The lines below arrange for aclocal not to bring gettext.m4's
878 dnl CY_GNU_GETTEXT into aclocal.m4.
880 AC_DEFUN([CY_GNU_GETTEXT],)
883 # Add --enable-maintainer-mode option to configure.
888 AC_DEFUN(AM_MAINTAINER_MODE,
889 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
890 dnl maintainer-mode is disabled by default
891 AC_ARG_ENABLE(maintainer-mode,
892 [ --enable-maintainer-mode enable make rules and dependencies not useful
893 (and sometimes confusing) to the casual installer],
894 USE_MAINTAINER_MODE=$enableval,
895 USE_MAINTAINER_MODE=no)
896 AC_MSG_RESULT($USE_MAINTAINER_MODE)
897 AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
898 MAINT=$MAINTAINER_MODE_TRUE
903 # Define a conditional.
905 AC_DEFUN(AM_CONDITIONAL,
919 # @defmac AC_PROG_CC_STDC
920 # @maindex PROG_CC_STDC
922 # If the C compiler in not in ANSI C mode by default, try to add an option
923 # to output variable @code{CC} to make it so. This macro tries various
924 # options that select ANSI C on some system or another. It considers the
925 # compiler to be in ANSI C mode if it handles function prototypes correctly.
927 # If you use this macro, you should check after calling it whether the C
928 # compiler has been set to accept ANSI C; if not, the shell variable
929 # @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source
930 # code in ANSI C, you can make an un-ANSIfied copy of it by using the
931 # program @code{ansi2knr}, which comes with Ghostscript.
934 AC_DEFUN(AM_PROG_CC_STDC,
935 [AC_REQUIRE([AC_PROG_CC])
936 AC_BEFORE([$0], [AC_C_INLINE])
937 AC_BEFORE([$0], [AC_C_CONST])
938 dnl Force this before AC_PROG_CPP. Some cpp's, eg on HPUX, require
939 dnl a magic option to avoid problems with ANSI preprocessor commands
941 dnl FIXME: can't do this because then AC_AIX won't work due to a
942 dnl circular dependency.
943 dnl AC_BEFORE([$0], [AC_PROG_CPP])
944 AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C)
945 AC_CACHE_VAL(am_cv_prog_cc_stdc,
946 [am_cv_prog_cc_stdc=no
948 # Don't try gcc -ansi; that turns off useful extensions and
949 # breaks some systems' header files.
951 # Ultrix and OSF/1 -std1
952 # HP-UX -Aa -D_HPUX_SOURCE
953 # SVR4 -Xc -D__EXTENSIONS__
954 for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
956 CC="$ac_save_CC $ac_arg"
960 #include <sys/types.h>
961 #include <sys/stat.h>
962 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
963 struct buf { int x; };
964 FILE * (*rcsopen) (struct buf *, struct stat *, int);
965 static char *e (p, i)
971 static char *f (char * (*g) (char **, int), char **p, ...)
976 s = g (p, va_arg (v,int));
980 int test (int i, double x);
981 struct s1 {int (*f) (int a);};
982 struct s2 {int (*f) (double a);};
983 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
987 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
989 [am_cv_prog_cc_stdc="$ac_arg"; break])
993 if test -z "$am_cv_prog_cc_stdc"; then
994 AC_MSG_RESULT([none needed])
996 AC_MSG_RESULT($am_cv_prog_cc_stdc)
998 case "x$am_cv_prog_cc_stdc" in
1000 *) CC="$CC $am_cv_prog_cc_stdc" ;;