]>
Commit | Line | Data |
---|---|---|
c906108c SS |
1 | dnl Autoconf configure script for GDB, the GNU debugger. |
2 | dnl Copyright 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. | |
3 | dnl | |
4 | dnl This file is part of GDB. | |
5 | dnl | |
6 | dnl This program is free software; you can redistribute it and/or modify | |
7 | dnl it under the terms of the GNU General Public License as published by | |
8 | dnl the Free Software Foundation; either version 2 of the License, or | |
9 | dnl (at your option) any later version. | |
10 | dnl | |
11 | dnl This program is distributed in the hope that it will be useful, | |
12 | dnl but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | dnl GNU General Public License for more details. | |
15 | dnl | |
16 | dnl You should have received a copy of the GNU General Public License | |
17 | dnl along with this program; if not, write to the Free Software | |
18 | dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
19 | ||
20 | dnl Process this file with autoconf to produce a configure script. | |
21 | ||
22 | AC_PREREQ(2.13)dnl | |
23 | AC_INIT(main.c) | |
24 | AC_CONFIG_HEADER(config.h:config.in) | |
25 | ||
26 | AC_PROG_CC | |
27 | AC_AIX | |
28 | AC_ISC_POSIX | |
29 | AM_PROG_CC_STDC | |
30 | ||
31 | AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/..) | |
32 | AC_CANONICAL_SYSTEM | |
33 | ||
34 | dnl gdb doesn't use gettext, but bfd does. We call this to ensure we | |
35 | dnl link with the correct libraries. | |
36 | ALL_LINGUAS= | |
37 | CY_GNU_GETTEXT | |
38 | ||
39 | dnl List of object files added by configure. | |
40 | ||
41 | CONFIG_OBS= | |
42 | CONFIG_DEPS= | |
43 | CONFIG_SRCS= | |
fb40c209 AC |
44 | CONFIG_INITS= |
45 | ENABLE_CFLAGS= | |
e56ac5c3 AC |
46 | CONFIG_INSTALL= |
47 | CONFIG_UNINSTALL= | |
c906108c SS |
48 | |
49 | configdirs="doc testsuite" | |
50 | ||
96baa820 JM |
51 | AC_ARG_ENABLE(multi-ice, |
52 | [ --enable-multi-ice Build the multi-ice-gdb-server], | |
53 | [case "${enableval}" in | |
54 | yes ) enable_multi_ice="yes" ;; | |
55 | no) enable_multi_ice="no" ;; | |
56 | *) AC_MSG_ERROR(Bad value for --enable-multi-ice: ${enableval}) ;; | |
57 | esac | |
58 | ]) | |
59 | ||
60 | if test "${enable_multi_ice}" = "yes"; then | |
61 | configdirs="${configdirs} multi-ice" | |
62 | fi | |
63 | ||
c906108c SS |
64 | dnl |
65 | changequote(,)dnl | |
66 | ||
67 | . ${srcdir}/configure.host | |
68 | ||
69 | . ${srcdir}/configure.tgt | |
70 | ||
71 | dnl | |
72 | changequote([,])dnl | |
73 | ||
7a292a7a | 74 | AC_PROG_AWK |
c906108c SS |
75 | AC_PROG_INSTALL |
76 | AC_CHECK_TOOL(AR, ar) | |
77 | AC_CHECK_TOOL(RANLIB, ranlib, :) | |
78 | AC_PROG_YACC | |
79 | ||
75c6e08a MK |
80 | dnl MiG is needed for the Hurd. |
81 | AC_CHECK_TOOL(MIG, mig) | |
82 | ||
c906108c SS |
83 | AC_ARG_PROGRAM |
84 | ||
85 | AC_TYPE_SIGNAL | |
86 | ||
87 | AC_HEADER_STDC | |
88 | ||
ed9a39eb | 89 | AC_CHECK_HEADERS(ctype.h curses.h endian.h link.h thread_db.h proc_service.h \ |
c906108c | 90 | memory.h objlist.h ptrace.h sgtty.h stddef.h stdlib.h \ |
ed9a39eb | 91 | string.h sys/procfs.h sys/ptrace.h sys/reg.h stdint.h \ |
c906108c | 92 | term.h termio.h termios.h unistd.h wait.h sys/wait.h \ |
104c1213 | 93 | wchar.h wctype.h asm/debugreg.h sys/debugreg.h sys/select.h \ |
c2d11a7d | 94 | time.h sys/ioctl.h) |
c906108c SS |
95 | AC_HEADER_STAT |
96 | ||
97 | AC_C_CONST | |
98 | ||
2acceee2 | 99 | AC_CHECK_FUNCS(setpgid sbrk sigaction isascii bzero bcopy btowc poll sigprocmask) |
c906108c SS |
100 | AC_FUNC_ALLOCA |
101 | ||
5c44784c JM |
102 | dnl See if ptrace.h provides the PTRACE_GETXFPREGS request. |
103 | dnl PTRACE_GETXFPREGS is a Cygnus invention, since we wrote our own | |
104 | dnl Linux kernel patch for SSE support. That patch may or may not | |
105 | dnl actually make it into the official distribution. If you find that | |
106 | dnl years have gone by since this configure test was added, and Linux | |
107 | dnl isn't using PTRACE_GETXFPREGS, that means that our patch didn't | |
108 | dnl make it, and you can delete this code. | |
109 | AC_MSG_CHECKING(for PTRACE_GETXFPREGS) | |
110 | AC_CACHE_VAL(gdb_cv_have_ptrace_getxfpregs, | |
111 | [AC_TRY_COMPILE([#include <sys/ptrace.h>], | |
112 | [PTRACE_GETXFPREGS;], | |
113 | [gdb_cv_have_ptrace_getxfpregs=yes], | |
114 | [gdb_cv_have_ptrace_getxfpregs=no])]) | |
115 | AC_MSG_RESULT($gdb_cv_have_ptrace_getxfpregs) | |
116 | if test $gdb_cv_have_ptrace_getxfpregs = yes; then | |
117 | AC_DEFINE(HAVE_PTRACE_GETXFPREGS) | |
118 | fi | |
119 | ||
7be570e7 JM |
120 | AC_CHECK_LIB(socket, socketpair) |
121 | AC_CHECK_FUNCS(socketpair) | |
122 | ||
123 | ||
c906108c SS |
124 | BFD_NEED_DECLARATION(malloc) |
125 | BFD_NEED_DECLARATION(realloc) | |
126 | BFD_NEED_DECLARATION(free) | |
127 | BFD_NEED_DECLARATION(strerror) | |
128 | BFD_NEED_DECLARATION(strdup) | |
b83266a0 | 129 | BFD_NEED_DECLARATION(strstr) |
c906108c SS |
130 | |
131 | ||
132 | # The following save_state_t checkery is only necessary for HPUX | |
133 | # versions earlier than 10.20. When those fade from memory, this | |
134 | # could be expunged. --jsm 1999-03-22 | |
135 | ||
136 | AC_MSG_CHECKING(for HPUX save_state structure) | |
137 | AC_EGREP_HEADER(save_state_t, machine/save_state.h, | |
138 | gdb_cv_hpux_savestate=yes, gdb_cv_hpux_savestate=no) | |
139 | AC_EGREP_HEADER(ss_wide, machine/save_state.h, gdb_cv_hpux_sswide=yes, | |
140 | gdb_cv_hpux_sswide=no) | |
141 | if test $gdb_cv_hpux_savestate = yes | |
142 | then | |
143 | AC_DEFINE(HAVE_STRUCT_SAVE_STATE_T, 1) | |
144 | fi | |
145 | if test $gdb_cv_hpux_sswide = yes | |
146 | then | |
147 | AC_DEFINE(HAVE_STRUCT_MEMBER_SS_WIDE, 1) | |
148 | fi | |
149 | AC_MSG_RESULT($gdb_cv_hpux_sswide) | |
150 | ||
151 | ||
152 | # If we are configured native on GNU/Linux, work around problems with | |
153 | # sys/procfs.h | |
c3f6f71d | 154 | # Also detect which type of /proc is in use, such as for Unixware or Solaris. |
c906108c SS |
155 | |
156 | if test "${target}" = "${host}"; then | |
157 | case "${host}" in | |
158 | i[[3456]]86-*-linux*) | |
159 | AC_DEFINE(START_INFERIOR_TRAPS_EXPECTED,2) | |
160 | AC_DEFINE(sys_quotactl) | |
161 | ;; | |
c5394b80 | 162 | *-*-unixware* | *-*-sysv4.2* | *-*-sysv5*) |
c3f6f71d JM |
163 | AC_DEFINE(NEW_PROC_API) |
164 | ;; | |
165 | # FIXME: we would like to define NEW_PROC_API for all versions of | |
166 | # Solaris from 2.6 on... but it isn't quite working yet. Seems | |
167 | # to work on sparc 2.6, so let's try it out there. | |
168 | sparc-sun-solaris2.6) | |
169 | AC_DEFINE(NEW_PROC_API) | |
170 | ;; | |
c906108c | 171 | esac |
c906108c SS |
172 | fi |
173 | ||
174 | if test "$ac_cv_header_sys_procfs_h" = yes; then | |
175 | BFD_HAVE_SYS_PROCFS_TYPE(pstatus_t) | |
176 | BFD_HAVE_SYS_PROCFS_TYPE(prrun_t) | |
177 | BFD_HAVE_SYS_PROCFS_TYPE(gregset_t) | |
178 | BFD_HAVE_SYS_PROCFS_TYPE(fpregset_t) | |
83d37ec8 MK |
179 | BFD_HAVE_SYS_PROCFS_TYPE(prgregset_t) |
180 | BFD_HAVE_SYS_PROCFS_TYPE(prfpregset_t) | |
181 | BFD_HAVE_SYS_PROCFS_TYPE(lwpid_t) | |
182 | BFD_HAVE_SYS_PROCFS_TYPE(psaddr_t) | |
c906108c SS |
183 | |
184 | dnl Check for PIOCSET ioctl entry | |
185 | ||
186 | AC_MSG_CHECKING(for PIOCSET ioctl entry in sys/procfs.h) | |
187 | AC_CACHE_VAL(gdb_cv_have_procfs_piocset, | |
188 | [AC_TRY_COMPILE([#include <unistd.h> | |
189 | #include <sys/types.h> | |
190 | #include <sys/procfs.h> | |
191 | ], [ | |
192 | int dummy;; | |
193 | dummy = ioctl(0, PIOCSET, &dummy); | |
194 | ], | |
195 | gdb_cv_have_procfs_piocset=yes, gdb_cv_have_procfs_piocset=no)]) | |
196 | AC_MSG_RESULT($gdb_cv_have_procfs_piocset) | |
197 | if test $gdb_cv_have_procfs_piocset = yes; then | |
198 | AC_DEFINE(HAVE_PROCFS_PIOCSET) | |
199 | fi | |
200 | fi | |
201 | ||
202 | dnl See if host has libm. This is usually needed by simulators. | |
203 | AC_CHECK_LIB(m, main) | |
204 | ||
205 | dnl Solaris puts wctype in /usr/lib/libw.a before Solaris 2.6. | |
206 | dnl | |
207 | dnl A bug in GNU ld 2.9.1 causes a problem if we link in -lw | |
208 | dnl under Solaris 2.6 because it is some funky empty library. | |
209 | dnl So only link in libw if we have to. | |
210 | AC_CHECK_LIB(c, wctype,: ,AC_CHECK_LIB(w, wctype)) | |
211 | ||
212 | dnl See if compiler supports "long long" type. | |
213 | ||
214 | AC_MSG_CHECKING(for long long support in compiler) | |
215 | AC_CACHE_VAL(gdb_cv_c_long_long, | |
216 | [AC_TRY_COMPILE(, [ | |
217 | extern long long foo; | |
218 | switch (foo & 2) { case 0: return 1; } | |
219 | ], | |
220 | gdb_cv_c_long_long=yes, gdb_cv_c_long_long=no)]) | |
221 | AC_MSG_RESULT($gdb_cv_c_long_long) | |
222 | if test $gdb_cv_c_long_long = yes; then | |
223 | AC_DEFINE(CC_HAS_LONG_LONG) | |
224 | fi | |
225 | ||
226 | dnl See if the compiler and runtime support printing long long | |
227 | ||
228 | AC_MSG_CHECKING(for long long support in printf) | |
229 | AC_CACHE_VAL(gdb_cv_printf_has_long_long, | |
230 | [AC_TRY_RUN([ | |
231 | int main () { | |
232 | char buf[32]; | |
233 | long long l = 0; | |
234 | l = (l << 16) + 0x0123; | |
235 | l = (l << 16) + 0x4567; | |
236 | l = (l << 16) + 0x89ab; | |
237 | l = (l << 16) + 0xcdef; | |
238 | sprintf (buf, "0x%016llx", l); | |
239 | return (strcmp ("0x0123456789abcdef", buf)); | |
240 | }], | |
241 | gdb_cv_printf_has_long_long=yes, | |
242 | gdb_cv_printf_has_long_long=no, | |
243 | gdb_cv_printf_has_long_long=no)]) | |
244 | if test $gdb_cv_printf_has_long_long = yes; then | |
245 | AC_DEFINE(PRINTF_HAS_LONG_LONG) | |
246 | fi | |
247 | AC_MSG_RESULT($gdb_cv_printf_has_long_long) | |
248 | ||
249 | dnl See if compiler supports "long double" type. Can't use AC_C_LONG_DOUBLE | |
250 | dnl because autoconf complains about cross-compilation issues. However, this | |
251 | dnl code uses the same variables as the macro for compatibility. | |
252 | ||
253 | AC_MSG_CHECKING(for long double support in compiler) | |
254 | AC_CACHE_VAL(ac_cv_c_long_double, | |
255 | [AC_TRY_COMPILE(, [long double foo;], | |
256 | ac_cv_c_long_double=yes, ac_cv_c_long_double=no)]) | |
257 | AC_MSG_RESULT($ac_cv_c_long_double) | |
258 | if test $ac_cv_c_long_double = yes; then | |
259 | AC_DEFINE(HAVE_LONG_DOUBLE) | |
260 | fi | |
261 | ||
262 | dnl See if the compiler and runtime support printing long doubles | |
263 | ||
264 | AC_MSG_CHECKING(for long double support in printf) | |
265 | AC_CACHE_VAL(gdb_cv_printf_has_long_double, | |
266 | [AC_TRY_RUN([ | |
267 | int main () { | |
268 | char buf[16]; | |
269 | long double f = 3.141592653; | |
270 | sprintf (buf, "%Lg", f); | |
271 | return (strncmp ("3.14159", buf, 7)); | |
272 | }], | |
273 | gdb_cv_printf_has_long_double=yes, | |
274 | gdb_cv_printf_has_long_double=no, | |
275 | gdb_cv_printf_has_long_double=no)]) | |
276 | if test $gdb_cv_printf_has_long_double = yes; then | |
277 | AC_DEFINE(PRINTF_HAS_LONG_DOUBLE) | |
278 | fi | |
279 | AC_MSG_RESULT($gdb_cv_printf_has_long_double) | |
280 | ||
281 | dnl See if the compiler and runtime support scanning long doubles | |
282 | ||
283 | AC_MSG_CHECKING(for long double support in scanf) | |
284 | AC_CACHE_VAL(gdb_cv_scanf_has_long_double, | |
285 | [AC_TRY_RUN([ | |
286 | int main () { | |
287 | char *buf = "3.141592653"; | |
288 | long double f = 0; | |
289 | sscanf (buf, "%Lg", &f); | |
290 | return !(f > 3.14159 && f < 3.14160); | |
291 | }], | |
292 | gdb_cv_scanf_has_long_double=yes, | |
293 | gdb_cv_scanf_has_long_double=no, | |
294 | gdb_cv_scanf_has_long_double=no)]) | |
295 | if test $gdb_cv_scanf_has_long_double = yes; then | |
296 | AC_DEFINE(SCANF_HAS_LONG_DOUBLE) | |
297 | fi | |
298 | AC_MSG_RESULT($gdb_cv_scanf_has_long_double) | |
299 | ||
300 | AC_FUNC_MMAP | |
301 | ||
302 | dnl See if thread_db library is around for Solaris thread debugging. Note that | |
303 | dnl we must explicitly test for version 1 of the library because version 0 | |
304 | dnl (present on Solaris 2.4 or earlier) doesn't have the same API. | |
305 | ||
306 | dnl Note that we only want this if we are both native (host == target), and | |
307 | dnl not doing a canadian cross build (build == host). | |
308 | ||
309 | if test ${build} = ${host} -a ${host} = ${target} ; then | |
310 | case ${host_os} in | |
311 | hpux*) | |
312 | AC_MSG_CHECKING(for HPUX/OSF thread support) | |
313 | if test -f /usr/include/dce/cma_config.h ; then | |
314 | if test "$GCC" = "yes" ; then | |
315 | AC_MSG_RESULT(yes) | |
316 | AC_DEFINE(HAVE_HPUX_THREAD_SUPPORT) | |
317 | CONFIG_OBS="${CONFIG_OJS} hpux-thread.o" | |
318 | CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c" | |
dfcd3bfb | 319 | CONFIG_INITS="${CONFIG_INITS} hpux-thread.c" |
c906108c SS |
320 | else |
321 | AC_MSG_RESULT(no (suppressed because you are not using GCC)) | |
322 | fi | |
323 | else | |
324 | AC_MSG_RESULT(no) | |
325 | fi | |
326 | ;; | |
327 | solaris*) | |
328 | AC_MSG_CHECKING(for Solaris thread debugging library) | |
329 | if test -f /usr/lib/libthread_db.so.1 ; then | |
330 | AC_MSG_RESULT(yes) | |
331 | AC_DEFINE(HAVE_THREAD_DB_LIB) | |
332 | CONFIG_OBS="${CONFIG_OBS} sol-thread.o" | |
333 | CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c" | |
334 | AC_CHECK_LIB(dl, dlopen) | |
335 | if test "$GCC" = "yes" ; then | |
336 | # The GNU linker requires the -export-dynamic option to make | |
337 | # all symbols visible in the dynamic symbol table. | |
338 | hold_ldflags=$LDFLAGS | |
339 | AC_MSG_CHECKING(for the ld -export-dynamic flag) | |
340 | LDFLAGS="${LDFLAGS} -Wl,-export-dynamic" | |
341 | AC_TRY_LINK(, [int i;], found=yes, found=no) | |
342 | LDFLAGS=$hold_ldflags | |
343 | AC_MSG_RESULT($found) | |
344 | if test $found = yes; then | |
345 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic" | |
346 | fi | |
347 | fi | |
348 | # Sun randomly tweaked the prototypes in <proc_service.h> | |
349 | # at one point. | |
350 | AC_MSG_CHECKING(if <proc_service.h> is old) | |
351 | AC_CACHE_VAL(gdb_cv_proc_service_is_old,[ | |
352 | AC_TRY_COMPILE([ | |
353 | #include <proc_service.h> | |
354 | ps_err_e ps_pdwrite | |
355 | (struct ps_prochandle*, psaddr_t, const void*, size_t); | |
356 | ],, gdb_cv_proc_service_is_old=no, | |
357 | gdb_cv_proc_service_is_old=yes) | |
358 | ]) | |
359 | AC_MSG_RESULT($gdb_cv_proc_service_is_old) | |
360 | if test $gdb_cv_proc_service_is_old = yes; then | |
361 | AC_DEFINE(PROC_SERVICE_IS_OLD) | |
362 | fi | |
363 | else | |
364 | AC_MSG_RESULT(no) | |
365 | fi | |
366 | ;; | |
367 | esac | |
368 | AC_SUBST(CONFIG_LDFLAGS) | |
369 | fi | |
370 | ||
371 | dnl Handle optional features that can be enabled. | |
fb40c209 AC |
372 | |
373 | dnl Handle MI sub-directory configury. | |
374 | AC_ARG_ENABLE(gdbmi, | |
375 | [ --enable-gdbmi Enable GDB-MI interface], | |
376 | [ | |
377 | case "${enable_gdbmi}" in | |
378 | yes | no) ;; | |
379 | "") enable_gdbmi=yes ;; | |
380 | *) | |
381 | AC_MSG_ERROR(Bad value for --enable-gdbmi: ${enableval}) | |
382 | ;; | |
383 | esac | |
384 | ]) | |
385 | case ${enable_gdbmi} in | |
386 | "yes" ) | |
387 | if test -d "${srcdir}/mi" ; then | |
388 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_MI_OBS)" | |
389 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_MI_DEPS)" | |
390 | CONFIG_SRCS="${CONFIG_SRS} \$(SUBDIR_MI_SRCS)" | |
391 | CONFIG_INITS="${CONFIG_INITS} \$(SUBDIR_MI_INITS)" | |
b0b1b869 | 392 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_MI_CFLAGS)" |
e56ac5c3 AC |
393 | CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_MI_INSTALL)" |
394 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_MI_UNINSTALL)" | |
fb40c209 AC |
395 | fi |
396 | ;; | |
397 | esac | |
c906108c SS |
398 | |
399 | AC_ARG_ENABLE(tui, | |
400 | [ --enable-tui Enable full-screen terminal user interface], | |
401 | [ | |
402 | case "${enable_tui}" in | |
403 | yes | no) ;; | |
404 | "") enable_tui=yes ;; | |
405 | *) | |
406 | AC_MSG_ERROR(Bad value for --enable-tui: ${enableval}) | |
407 | ;; | |
408 | esac | |
409 | ]) | |
410 | case ${enable_tui} in | |
411 | "yes" ) | |
412 | AC_DEFINE(TUI) | |
413 | BUILD_TUI=all-tui | |
414 | TUI_LIBRARY=tui/libtui.a | |
415 | ;; | |
416 | * ) | |
417 | BUILD_TUI= | |
418 | TUI_LIBRARY= | |
419 | ;; | |
420 | esac | |
421 | AC_SUBST(BUILD_TUI) | |
422 | AC_SUBST(TUI_LIBRARY) | |
423 | ||
424 | AC_ARG_ENABLE(netrom, | |
425 | [ --enable-netrom Enable NetROM support], | |
426 | [case "${enableval}" in | |
427 | yes) enable_netrom=yes ;; | |
428 | no) enable_netrom=no ;; | |
429 | *) AC_MSG_ERROR(bad value ${enableval} given for netrom option) ;; | |
430 | esac]) | |
431 | ||
432 | if test "${enable_netrom}" = "yes"; then | |
433 | CONFIG_OBS="${CONFIG_OBS} remote-nrom.o" | |
434 | CONFIG_SRCS="${CONFIG_SRCS} remote-nrom.c" | |
dfcd3bfb | 435 | CONFIG_INITS="${CONFIG_INITS} remote-nrom.c" |
c906108c SS |
436 | fi |
437 | ||
438 | AC_ARG_ENABLE(build-warnings, | |
439 | [ --enable-build-warnings Enable build-time compiler warnings if gcc is used], | |
fb40c209 AC |
440 | [ |
441 | # not yet: -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations | |
442 | build_warnings="-Wimplicit -Wreturn-type -Wcomment -Wtrigraphs -Wformat -Wparentheses -Wpointer-arith" | |
c906108c SS |
443 | case "${enableval}" in |
444 | yes) ;; | |
445 | no) build_warnings="-w";; | |
446 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
447 | build_warnings="${build_warnings} ${t}";; | |
448 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` | |
449 | build_warnings="${t} ${build_warnings}";; | |
450 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; | |
d4f3574e SS |
451 | esac |
452 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then | |
453 | echo "Setting warning flags = $build_warnings" 6>&1 | |
454 | fi | |
104c1213 JM |
455 | WARN_CFLAGS="" |
456 | WERROR_CFLAGS="" | |
c906108c SS |
457 | if test "x${build_warnings}" != x -a "x$GCC" = xyes |
458 | then | |
104c1213 JM |
459 | # Separate out the -Werror flag as some files just cannot be |
460 | # compiled with it enabled. | |
461 | for w in ${build_warnings}; do | |
462 | case $w in | |
463 | -Werr*) WERROR_CFLAGS=-Werror ;; | |
464 | *) WARN_CFLAGS="${WARN_CFLAGS} $w" | |
465 | esac | |
466 | done | |
d4f3574e SS |
467 | fi],[build_warnings=""])dnl |
468 | ||
c906108c | 469 | AC_SUBST(WARN_CFLAGS) |
104c1213 | 470 | AC_SUBST(WERROR_CFLAGS) |
c906108c SS |
471 | |
472 | MMALLOC_CFLAGS= | |
473 | MMALLOC= | |
474 | AC_SUBST(MMALLOC_CFLAGS) | |
475 | AC_SUBST(MMALLOC) | |
476 | ||
477 | AC_ARG_WITH(mmalloc, | |
478 | [ --with-mmalloc Use memory mapped malloc package], | |
479 | [case "${withval}" in | |
480 | yes) want_mmalloc=true ;; | |
481 | no) want_mmalloc=false;; | |
482 | *) AC_MSG_ERROR(bad value ${withval} for GDB with-mmalloc option) ;; | |
483 | esac],[want_mmalloc=false])dnl | |
484 | ||
485 | if test x$want_mmalloc = xtrue; then | |
486 | AC_DEFINE(USE_MMALLOC) | |
487 | AC_DEFINE(MMCHECK_FORCE) | |
488 | MMALLOC_CFLAGS="-I$srcdir/../mmalloc" | |
489 | MMALLOC='../mmalloc/libmmalloc.a' | |
490 | fi | |
491 | ||
7a292a7a SS |
492 | |
493 | # In the Cygwin environment, we need some additional flags. | |
494 | AC_CACHE_CHECK([for cygwin], gdb_cv_os_cygwin, | |
495 | [AC_EGREP_CPP(lose, [ | |
496 | #if defined (__CYGWIN__) || defined (__CYGWIN32__) | |
497 | lose | |
498 | #endif],[gdb_cv_os_cygwin=yes],[gdb_cv_os_cygwin=no])]) | |
499 | ||
500 | DLLTOOL=${DLLTOOL-dlltool} | |
501 | WINDRES=${WINDRES-windres} | |
502 | AC_SUBST(DLLTOOL) | |
503 | AC_SUBST(WINDRES) | |
504 | ||
c906108c | 505 | dnl Figure out which term library to use. |
b83266a0 SS |
506 | if test x$gdb_host = xgo32; then |
507 | TERM_LIB= | |
508 | else | |
c906108c SS |
509 | if test x$gdb_cv_os_cygwin = xyes; then |
510 | TERM_LIB='`if test -r ../libtermcap/libtermcap.a; then echo ../libtermcap/libtermcap.a; else echo -ltermcap; fi`' | |
511 | else | |
512 | TERM_LIB= | |
513 | AC_CHECK_LIB(ncurses, tgetent, TERM_LIB=-lncurses, | |
514 | AC_CHECK_LIB(Hcurses, tgetent, TERM_LIB=-lHcurses, | |
515 | AC_CHECK_LIB(termlib, tgetent, TERM_LIB=-ltermlib, | |
516 | AC_CHECK_LIB(termcap, tgetent, TERM_LIB=-ltermcap, | |
517 | AC_CHECK_LIB(curses, tgetent, TERM_LIB=-lcurses, | |
518 | AC_CHECK_LIB(terminfo, tgetent, TERM_LIB=-lterminfo)))))) | |
519 | ||
520 | if test "x$TERM_LIB" = x | |
521 | then | |
522 | AC_MSG_ERROR(Could not find a term library, e.g. termcap or termlib!) | |
523 | fi | |
524 | fi | |
b83266a0 | 525 | fi |
c906108c SS |
526 | AC_SUBST(TERM_LIB) |
527 | ||
cd0fc7c3 SS |
528 | # libreadline needs libuser32.a in a cygwin environment |
529 | WIN32LIBS= | |
530 | if test x$gdb_cv_os_cygwin = xyes; then | |
c5394b80 JM |
531 | WIN32LIBS="-luser32" |
532 | case "${target}" in | |
533 | *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp" | |
534 | ;; | |
535 | esac | |
cd0fc7c3 SS |
536 | fi |
537 | AC_SUBST(WIN32LIBS) | |
7a292a7a | 538 | |
3fc11d3e JM |
539 | LIBGUI="../libgui/src/libgui.a" |
540 | GUI_CFLAGS_X="-I${srcdir}/../libgui/src" | |
541 | AC_SUBST(LIBGUI) | |
542 | AC_SUBST(GUI_CFLAGS_X) | |
7a292a7a | 543 | |
8b93c638 JM |
544 | AC_ARG_WITH(cpu, |
545 | [ --with-cpu=CPU Set the default CPU variant to debug], | |
546 | [case "${target}" in | |
547 | powerpc-* | powerpcle-* ) | |
548 | ## It would be nice to keep this table in sync with the one in | |
549 | ## gcc/configure. | |
550 | case "${with_cpu}" in | |
551 | ppc-uisa | rs6000 | 403 | 403GC | 505 | 860 | 601 | 602 | 603 \ | |
552 | | 604 | 750 ) | |
553 | ## Those are all handled in variants in rs6000-tdep.c, so they're fine. | |
554 | ;; | |
555 | common | power | power2 | rios | rios1 | rios2 | rsc | rsc1 ) | |
556 | ## These are all RS6000 variants, as far as GDB is concerned. | |
557 | with_cpu=rs6000 | |
558 | ;; | |
559 | 603e | ec603e ) | |
560 | with_cpu=603 | |
561 | ;; | |
562 | 604e ) | |
563 | with_cpu=604 | |
564 | ;; | |
565 | * ) | |
566 | AC_MSG_WARN(GDB: unknown --with-cpu value: \`${with_cpu}'; using \`ppc-uisa'.) | |
567 | with_cpu=ppc-uisa | |
568 | ;; | |
569 | esac | |
570 | ;; | |
571 | * ) | |
572 | AC_MSG_WARN(GDB may ignore the --with-cpu flag for ${target} targets) | |
573 | ;; | |
574 | esac | |
575 | AC_DEFINE_UNQUOTED(TARGET_CPU_DEFAULT, "${with_cpu}") | |
576 | ],) | |
577 | ||
578 | ||
3fc11d3e JM |
579 | ENABLE_GDBTK= |
580 | ||
581 | AC_ARG_ENABLE(gdbtk, | |
582 | [ --enable-gdbtk Enable GDBTK GUI front end], | |
583 | [case "${enableval}" in | |
584 | yes) | |
585 | case "$host" in | |
586 | *go32*) | |
587 | AC_MSG_WARN([GDB does not support GDBtk on host ${host}. GDBtk will be disabled.]) | |
588 | enable_gdbtk=no ;; | |
589 | *windows*) | |
590 | AC_MSG_WARN([GDB does not support GDBtk on host ${host}. GDBtk will be disabled.]) | |
591 | enable_gdbtk=no ;; | |
592 | *) | |
593 | enable_gdbtk=yes ;; | |
594 | esac ;; | |
595 | no) | |
596 | enable_gdbtk=no ;; | |
597 | *) | |
598 | AC_MSG_ERROR(bad value ${enableval} given for gdbtk option) ;; | |
599 | esac], | |
600 | [ | |
601 | # Default is on for everything but go32 and Cygwin | |
602 | case "$host" in | |
603 | *go32* | *windows*) | |
604 | ;; | |
605 | *) | |
606 | enable_gdbtk=yes ;; | |
607 | esac | |
608 | ]) | |
609 | ||
610 | WIN32LDAPP= | |
611 | AC_SUBST(WIN32LIBS) | |
612 | AC_SUBST(WIN32LDAPP) | |
613 | ||
614 | configdir="unix" | |
615 | ||
616 | GDBTKLIBS= | |
617 | if test "${enable_gdbtk}" = "yes"; then | |
618 | ||
619 | CY_AC_PATH_TCLCONFIG | |
620 | if test -z "${no_tcl}"; then | |
621 | CY_AC_LOAD_TCLCONFIG | |
622 | CY_AC_PATH_TKCONFIG | |
623 | ||
624 | # If $no_tk is nonempty, then we can't do Tk, and there is no | |
625 | # point to doing Tcl. | |
626 | if test -z "${no_tk}"; then | |
627 | CY_AC_LOAD_TKCONFIG | |
628 | CY_AC_PATH_TCLH | |
629 | CY_AC_PATH_TKH | |
630 | CY_AC_PATH_ITCLH | |
631 | CY_AC_PATH_ITKH | |
632 | CY_AC_PATH_TIXH | |
633 | ||
634 | # now look for Itcl library stuff | |
635 | ||
636 | CY_AC_PATH_ITCLCONFIG | |
637 | if test -z "${no_itcl}"; then | |
638 | CY_AC_LOAD_ITCLCONFIG | |
639 | case "${host}" in | |
640 | *-*-cygwin*) | |
641 | itcldir=../itcl/itcl/win/ | |
642 | ;; | |
643 | *) | |
644 | itcldir=../itcl/itcl/unix/ | |
645 | ;; | |
646 | esac | |
647 | ||
648 | ||
649 | ITCLLIB="${ITCL_BUILD_LIB_SPEC}" | |
650 | ITCL_DEPS="${itcldir}${ITCL_LIB_FILE}" | |
651 | fi | |
652 | ||
653 | ||
654 | # now look for Itk library stuff | |
655 | CY_AC_PATH_ITKCONFIG | |
656 | if test -z "${no_itcl}"; then | |
657 | CY_AC_LOAD_ITKCONFIG | |
658 | ||
659 | case "${host}" in | |
660 | *-*-cygwin*) | |
661 | itkdir=../itcl/itk/win/ | |
662 | ;; | |
663 | *) | |
664 | itkdir=../itcl/itk/unix/ | |
665 | ;; | |
666 | esac | |
667 | ||
668 | ITKLIB="${ITK_BUILD_LIB_SPEC}" | |
669 | ITK_DEPS="${itkdir}${ITK_LIB_FILE}" | |
670 | fi | |
671 | ||
672 | # now look for Tix library stuff | |
673 | CY_AC_PATH_TIXCONFIG | |
674 | if test -z "${no_tix}"; then | |
675 | CY_AC_LOAD_TIXCONFIG | |
676 | TIXLIB="${TIX_BUILD_LIB_SPEC}" | |
677 | TIX_DEPS="${TIX_BUILD_LOCATION}/${TIX_LIB_FILE}" | |
678 | fi | |
679 | ||
680 | ENABLE_GDBTK=1 | |
681 | ENABLE_CFLAGS="$ENABLE_CFLAGS -DGDBTK" | |
682 | # Tcl/Tk 8.1 require -fwritable strings. I don't | |
683 | # know whether 8.2 will or not, but I bet it will. | |
684 | # I don't have to worry about 7.x since we don't support it. | |
685 | GDBTK_CFLAGS="" | |
686 | if test "$GCC" = "yes"; then | |
687 | if test "$TCL_VERSION" != "8.0" ; then | |
688 | GDBTK_CFLAGS="-fwritable-strings" | |
689 | fi | |
690 | fi | |
691 | ||
692 | # Include some libraries that Tcl and Tk want. | |
693 | TCL_LIBS='$(LIBGUI) $(ITCL) $(ITK) $(TIX) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' | |
694 | CONFIG_DEPS='$(LIBGUI) $(ITCL_DEPS) $(ITK_DEPS) $(TIX_DEPS) $(TK_DEPS) $(TCL_DEPS)' | |
695 | # Yes, the ordering seems wrong here. But it isn't. | |
696 | # TK_LIBS is the list of libraries that need to be linked | |
697 | # after Tcl/Tk. Note that this isn't put into LIBS. If it | |
698 | # were in LIBS then any link tests after this point would | |
699 | # try to include things like `$(LIBGUI)', which wouldn't work. | |
700 | GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}" | |
d45b9300 FN |
701 | CONFIG_SRCS="${CONFIG_SRCS} gdbtk/generic/gdbtk.c gdbtk/generic/gdbtk-cmds.c gdbtk/generic/gdbtk-hooks.c gdbtk/generic/gdbtk-varobj.c gdbtk/generic/gdbtk-wrapper.c" |
702 | CONFIG_OBS="${CONFIG_OBS} gdbtk.o gdbtk-cmds.o gdbtk-hooks.o gdbtk-varobj.o gdbtk-wrapper.o" | |
703 | CONFIG_INITS="${CONFIG_INITS} gdbtk/generic/gdbtk.c gdbtk/generic/gdbtk-cmds.c gdbtk/generic/gdbtk-hooks.c gdbtk/generic/gdbtk-varobj.c gdbtk/generic/gdbtk-wrapper.c" | |
e56ac5c3 AC |
704 | CONFIG_INSTALL="${CONFIG_INSTALL} \$(SUBDIR_GDBTK_INSTALL)" |
705 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} \$(SUBDIR_GDBTK_UNINSTALL)" | |
3fc11d3e JM |
706 | |
707 | if test x$gdb_cv_os_cygwin = xyes; then | |
708 | WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32" | |
709 | WIN32LDAPP="-Wl,--subsystem,console" | |
710 | CONFIG_OBS="${CONFIG_OBS} gdbres.o" | |
711 | fi | |
712 | fi | |
713 | fi | |
714 | fi | |
715 | ||
716 | AC_SUBST(ENABLE_GDBTK) | |
717 | AC_SUBST(X_CFLAGS) | |
718 | AC_SUBST(X_LDFLAGS) | |
719 | AC_SUBST(X_LIBS) | |
720 | AC_SUBST(ITCLLIB) | |
721 | AC_SUBST(ITCL_DEPS) | |
722 | AC_SUBST(ITKLIB) | |
723 | AC_SUBST(ITK_DEPS) | |
724 | AC_SUBST(TIXLIB) | |
725 | AC_SUBST(TIX_DEPS) | |
726 | AC_SUBST(GDBTKLIBS) | |
727 | AC_SUBST(GDBTK_CFLAGS) | |
8b93c638 | 728 | |
c906108c SS |
729 | AC_PATH_X |
730 | ||
7a292a7a SS |
731 | |
732 | # Unlike the sim directory, whether a simulator is linked is controlled by | |
733 | # presence of a SIM= and a SIM_OBS= definition in the target '.mt' file. | |
734 | # This code just checks for a few cases where we'd like to ignore those | |
735 | # definitions, even when they're present in the '.mt' file. These cases | |
736 | # are when --disable-sim is specified, or if the simulator directory is | |
737 | # not part of the soruce tree. | |
738 | # | |
739 | AC_ARG_ENABLE(sim, | |
740 | [ --enable-sim Link gdb with simulator], | |
741 | [echo "enable_sim = $enable_sim"; | |
742 | echo "enableval = ${enableval}"; | |
743 | case "${enableval}" in | |
744 | yes) ignore_sim=false ;; | |
745 | no) ignore_sim=true ;; | |
746 | *) ignore_sim=false ;; | |
747 | esac], | |
748 | [ignore_sim=false]) | |
749 | ||
750 | if test ! -d "${srcdir}/../sim"; then | |
751 | ignore_sim=true | |
752 | fi | |
753 | ||
754 | if test "${ignore_sim}" = "true"; then | |
755 | IGNORE_SIM="SIM=" | |
756 | IGNORE_SIM_OBS="SIM_OBS=" | |
757 | else | |
758 | IGNORE_SIM="" | |
759 | IGNORE_SIM_OBS="" | |
760 | AC_DEFINE(WITH_SIM) | |
761 | fi | |
762 | AC_SUBST(IGNORE_SIM) | |
763 | AC_SUBST(IGNORE_SIM_OBS) | |
764 | ||
c906108c SS |
765 | AC_SUBST(ENABLE_CFLAGS) |
766 | ||
767 | AC_SUBST(CONFIG_OBS) | |
768 | AC_SUBST(CONFIG_DEPS) | |
769 | AC_SUBST(CONFIG_SRCS) | |
dfcd3bfb | 770 | AC_SUBST(CONFIG_INITS) |
e56ac5c3 AC |
771 | AC_SUBST(CONFIG_INSTALL) |
772 | AC_SUBST(CONFIG_UNINSTALL) | |
c906108c SS |
773 | |
774 | # Begin stuff to support --enable-shared | |
775 | AC_ARG_ENABLE(shared, | |
776 | [ --enable-shared Use shared libraries], | |
777 | [case "${enableval}" in | |
778 | yes) shared=true ;; | |
779 | no) shared=false ;; | |
780 | *) shared=true ;; | |
781 | esac])dnl | |
782 | ||
783 | HLDFLAGS= | |
784 | HLDENV= | |
785 | # If we have shared libraries, try to set rpath reasonably. | |
786 | if test "${shared}" = "true"; then | |
787 | case "${host}" in | |
788 | *-*-hpux*) | |
789 | HLDFLAGS='-Wl,+s,+b,$(libdir)' | |
790 | ;; | |
791 | *-*-irix5* | *-*-irix6*) | |
792 | HLDFLAGS='-Wl,-rpath,$(libdir)' | |
793 | ;; | |
794 | *-*-linux*aout*) | |
795 | ;; | |
796 | *-*-linux* | *-pc-linux-gnu) | |
797 | HLDFLAGS='-Wl,-rpath,$(libdir)' | |
798 | ;; | |
799 | *-*-solaris*) | |
800 | HLDFLAGS='-R $(libdir)' | |
801 | ;; | |
802 | *-*-sysv4*) | |
803 | HLDENV='if test -z "$${LD_RUN_PATH}"; then LD_RUN_PATH=$(libdir); else LD_RUN_PATH=$${LD_RUN_PATH}:$(libdir); fi; export LD_RUN_PATH;' | |
804 | ;; | |
805 | esac | |
806 | fi | |
807 | ||
808 | # On SunOS, if the linker supports the -rpath option, use it to | |
809 | # prevent ../bfd and ../opcodes from being included in the run time | |
810 | # search path. | |
811 | case "${host}" in | |
812 | *-*-sunos*) | |
813 | echo 'main () { }' > conftest.c | |
814 | ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t | |
815 | if grep 'unrecognized' conftest.t >/dev/null 2>&1; then | |
816 | : | |
817 | elif grep 'No such file' conftest.t >/dev/null 2>&1; then | |
818 | : | |
819 | elif grep 'do not mix' conftest.t >/dev/null 2>&1; then | |
820 | : | |
821 | elif grep 'some text already loaded' conftest.t >/dev/null 2>&1; then | |
822 | : | |
823 | elif test "${shared}" = "true"; then | |
824 | HLDFLAGS='-Wl,-rpath=$(libdir)' | |
825 | else | |
826 | HLDFLAGS='-Wl,-rpath=' | |
827 | fi | |
828 | rm -f conftest.t conftest.c conftest | |
829 | ;; | |
830 | esac | |
831 | AC_SUBST(HLDFLAGS) | |
832 | AC_SUBST(HLDENV) | |
833 | # End stuff to support --enable-shared | |
834 | ||
835 | # target_subdir is used by the testsuite to find the target libraries. | |
836 | target_subdir= | |
837 | if test "${host}" != "${target}"; then | |
838 | target_subdir="${target_alias}/" | |
839 | fi | |
840 | AC_SUBST(target_subdir) | |
841 | ||
842 | frags= | |
843 | host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh | |
844 | if test ! -f ${host_makefile_frag}; then | |
845 | AC_MSG_ERROR("*** Gdb does not support host ${host}") | |
846 | fi | |
847 | frags="$frags $host_makefile_frag" | |
848 | ||
849 | target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt | |
850 | if test ! -f ${target_makefile_frag}; then | |
851 | AC_MSG_ERROR("*** Gdb does not support target ${target}") | |
852 | fi | |
853 | frags="$frags $target_makefile_frag" | |
854 | ||
855 | AC_SUBST_FILE(host_makefile_frag) | |
856 | AC_SUBST_FILE(target_makefile_frag) | |
857 | AC_SUBST(frags) | |
858 | ||
859 | changequote(,)dnl | |
860 | hostfile=`sed -n ' | |
861 | s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
862 | ' ${host_makefile_frag}` | |
863 | ||
864 | targetfile=`sed -n ' | |
865 | s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
866 | ' ${target_makefile_frag}` | |
867 | ||
868 | # these really aren't orthogonal true/false values of the same condition, | |
869 | # but shells are slow enough that I like to reuse the test conditions | |
870 | # whenever possible | |
871 | if test "${target}" = "${host}"; then | |
872 | nativefile=`sed -n ' | |
873 | s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p | |
874 | ' ${host_makefile_frag}` | |
875 | # else | |
876 | # GDBserver is only useful in a "native" enviroment | |
877 | # configdirs=`echo $configdirs | sed 's/gdbserver//'` | |
878 | fi | |
879 | changequote([,]) | |
880 | ||
96baa820 JM |
881 | SUBDIRS="doc testsuite nlm" |
882 | if test "${enable_multi_ice}" = "yes"; then | |
883 | SUBDIRS="${SUBDIRS} multi-ice" | |
884 | fi | |
885 | ||
886 | AC_SUBST(SUBDIRS) | |
887 | ||
c906108c SS |
888 | # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile |
889 | # (NAT_FILE) is not set in config/*/*.m[ht] files, we don't make the | |
890 | # corresponding links. But we have to remove the xm.h files and tm.h | |
891 | # files anyway, e.g. when switching from "configure host" to | |
892 | # "configure none". | |
893 | ||
894 | files= | |
895 | links= | |
896 | rm -f xm.h | |
897 | if test "${hostfile}" != ""; then | |
898 | files="${files} config/${gdb_host_cpu}/${hostfile}" | |
899 | links="${links} xm.h" | |
900 | fi | |
901 | rm -f tm.h | |
902 | if test "${targetfile}" != ""; then | |
903 | files="${files} config/${gdb_target_cpu}/${targetfile}" | |
904 | links="${links} tm.h" | |
905 | fi | |
906 | rm -f nm.h | |
907 | if test "${nativefile}" != ""; then | |
908 | files="${files} config/${gdb_host_cpu}/${nativefile}" | |
909 | links="${links} nm.h" | |
910 | else | |
911 | # A cross-only configuration. | |
912 | files="${files} config/nm-empty.h" | |
913 | links="${links} nm.h" | |
914 | fi | |
3fc11d3e JM |
915 | AC_PROG_LN_S |
916 | # Make it possible to use the GUI without doing a full install | |
917 | if test "${enable_gdbtk}" = "yes" ; then | |
918 | if test "$LN_S" = "ln -s" -a ! -f gdbtcl ; then | |
919 | echo linking $srcdir/gdbtk/library to gdbtcl | |
920 | $LN_S $srcdir/gdbtk/library gdbtcl | |
921 | else | |
922 | echo Warning: Unable to link $srcdir/gdbtk/library to gdbtcl. You will need to do a | |
923 | echo " " make install before you are able to run the GUI. | |
924 | fi | |
925 | fi | |
c906108c SS |
926 | |
927 | AC_LINK_FILES($files, $links) | |
928 | ||
929 | dnl Check for exe extension set on certain hosts (e.g. Win32) | |
930 | AC_EXEEXT | |
931 | ||
932 | AC_CONFIG_SUBDIRS($configdirs) | |
933 | AC_OUTPUT(Makefile tui/Makefile .gdbinit:gdbinit.in, | |
934 | [ | |
935 | dnl Autoconf doesn't provide a mechanism for modifying definitions | |
936 | dnl provided by makefile fragments. | |
937 | dnl | |
938 | if test "${nativefile}" = ""; then | |
939 | sed -e '/^NATDEPFILES[[ ]]*=[[ ]]*/s//# NATDEPFILES=/' \ | |
940 | < Makefile > Makefile.tem | |
941 | mv -f Makefile.tem Makefile | |
942 | fi | |
943 | ||
944 | changequote(,)dnl | |
945 | sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/, | |
946 | /^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/, | |
947 | /^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp | |
948 | mv -f Makefile.tmp Makefile | |
949 | changequote([,])dnl | |
950 | ||
2acceee2 | 951 | |
c906108c SS |
952 | case x$CONFIG_HEADERS in |
953 | xconfig.h:config.in) | |
954 | echo > stamp-h ;; | |
955 | esac | |
956 | ], | |
957 | [ | |
958 | gdb_host_cpu=$gdb_host_cpu | |
959 | gdb_target_cpu=$gdb_target_cpu | |
960 | nativefile=$nativefile | |
961 | ]) | |
962 | ||
963 | exit 0 |