* monitor.c: Include gnu-regex.h rather than system regex.h.
[deliverable/binutils-gdb.git] / gdb / aclocal.m4
CommitLineData
5436fc65
C
1AC_DEFUN(CYGNUS_PATH_TK, [
2#
3# Ok, lets find the tk source trees so we can use the headers
4# If the directory (presumably symlink) named "tk" exists, use that one
5# in preference to any others. Same logic is used when choosing library
6# and again with Tcl.
7#
8AC_CHECKING(for Tk source directory)
9TKHDIR=""
10for i in `ls -d ${srcdir}/../tk* 2>/dev/null` ${srcdir}/../tk ; do
11 if test -f $i/tk.h ; then
12 TKHDIR="-I$i"
13 fi
14done
15# if we can't find it, see if one is installed
16if test x"$TKHDIR" = x ; then
17 installed=0
18 if test -f $prefix/include/tk.h; then
19 installed=1 TKHDIR="-I$prefix/include"
20 else
21 AC_HEADER_CHECK(tk.h, installed=1)
22 fi
23 if test $installed -eq 0 ; then
24 TKHDIR="# no Tk directory found"
25 AC_MSG_WARN(Can't find Tk directory)
26 fi
27fi
28if test x"$TKHDIR" != x ; then
29 AC_MSG_RESULT(Setting TKHDIR to be $i)
30fi
31
32#
33# Ok, lets find the tk library
34# First, look for one uninstalled.
35#
36TKLIB=""
37AC_CHECKING(for Tk library)
38for i in `ls -d ../tk* 2>/dev/null` ../tk ; do
39 if test -f "$i/Makefile" ; then
40 TKLIB=$i/libtk.a
41 fi
42done
43# If not found, look for installed version
44if test x"$TKLIB" = x ; then
45dnl This doesn't work because of unresolved symbols.
46dnl AC_HAVE_LIBRARY(libtk.a, installed=1, installed=0)
47 if test -f $prefix/lib/libtk.a; then
48 installed=1
49 else
50 installed=0
51 fi
52 if test $installed -eq 1 ; then
53 TKLIB="-ltk"
54 fi
55fi
56
57# If still not found, assume Tk simply hasn't been built yet
58if test x"$TKLIB" = x ; then
59 for i in `ls -d ../tk* 2>/dev/null` ../tk ; do
60 if test -f "$i/tk.h" ; then
61 TKLIB=$i/libtk.a
62 fi
63 done
64fi
65
66if test x"$TKLIB" = x ; then
67 TKLIB="# no Tk library found"
68 AC_MSG_WARN(Can't find Tk library)
69else
70 AC_MSG_RESULT(setting TKLIB to be $TKLIB)
71 no_tk=
72fi
73
74AC_SUBST(TKHDIR)
75AC_SUBST(TKLIB)
76])
77
78
79AC_DEFUN(CYGNUS_PATH_TCL, [
80#
81# Ok, lets find the tcl source trees so we can use the headers
82#
83# Warning: transition of version 9 to 10 will break this algorithm
84# because 10 sorts before 9.
85#
86AC_CHECKING(for Tcl source directory)
87TCLHDIR=""
88for i in `ls -d ${srcdir}/../tcl* 2>/dev/null` ${srcdir}/../tcl ; do
89 if test -f $i/tclInt.h ; then
90 TCLHDIR="-I$i"
91 fi
92done
93# if we can't find it, see if one is installed
94if test x"$TCLHDIR" = x ; then
95 installed=0
96 if test -f $prefix/include/tclInt.h; then
97 installed=1 TCLHDIR="-I$prefix/include"
98 else
99 AC_HEADER_CHECK(tclInt.h, installed=1)
100 fi
101 if test $installed -eq 0 ; then
102 TCLHDIR="# no Tcl directory found"
103 AC_MSG_WARN(Can't find Tcl directory)
104 fi
105else
106 AC_MSG_RESULT(setting TCLHDIR to be $i)
107fi
108
109#
110# Ok, lets find the tcl library
111# First, look for the latest uninstalled
112#
113TCLLIB=""
114AC_CHECKING(for Tcl library)
115for i in `ls -d ../tcl* 2>/dev/null` ../tcl ; do
116 if test -f "$i/Makefile" ; then
117 TCLLIB=$i/libtcl.a
118 fi
119done
120# If not found, look for installed version
121if test x"$TCLLIB" = x ; then
122dnl Don't use this, since we can't use it for libtk.a.
123dnl AC_HAVE_LIBRARY(libtcl.a, installed=1, installed=0)
124 if test -f $prefix/lib/libtcl.a; then installed=1; else installed=0; fi
125 if test $installed -eq 1 ; then
126 TCLLIB="-ltcl"
127 fi
128fi
129# If still not found, assume Tcl simply hasn't been built yet
130if test x"$TCLLIB" = x ; then
131 for i in `ls -d ../tcl* 2>/dev/null` ../tcl ; do
132 if test -f "$i/tcl.h" ; then
133 TCLLIB=$i/libtcl.a
134 fi
135 done
136fi
137
138if test x"$TCLLIB" = x ; then
139 TCLLIB="# no Tcl library found"
140 AC_MSG_WARN(Can't find Tcl library)
141else
142 AC_MSG_RESULT(setting TCLLIB to be $TCLLIB)
143fi
144
145AC_SUBST(TCLHDIR)
146AC_SUBST(TCLLIB)
147])
This page took 0.05057 seconds and 4 git commands to generate.