]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/configure.in
* Makefile.in (SFILES): add tracepoint.c.
[thirdparty/binutils-gdb.git] / gdb / configure.in
1 dnl Autoconf configure script for GDB, the GNU debugger.
2 dnl Copyright 1995, 1996 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.5)dnl
23 AC_INIT(main.c)
24 AC_CONFIG_HEADER(config.h:config.in)
25
26 AC_PROG_CC
27 AC_AIX
28 AC_MINIX
29 AC_ISC_POSIX
30
31 DLLTOOL=${DLLTOOL-dlltool}
32 AC_SUBST(DLLTOOL)
33
34 AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/..)
35 AC_CANONICAL_SYSTEM
36
37 dnl List of object files added by configure.
38
39 CONFIG_OBS=
40 CONFIG_DEPS=
41 CONFIG_SRCS=
42
43 configdirs="doc testsuite"
44
45 dnl
46 changequote(,)dnl
47
48 . ${srcdir}/configure.host
49
50 . ${srcdir}/configure.tgt
51
52 dnl
53 changequote([,])dnl
54
55 AC_PROG_INSTALL
56 AC_CHECK_TOOL(AR, ar)
57 AC_CHECK_TOOL(RANLIB, ranlib, :)
58 AC_PROG_YACC
59 AC_PROG_AWK
60
61 AC_ARG_PROGRAM
62
63 AC_TYPE_SIGNAL
64
65 AC_HEADER_STDC
66 AC_CHECK_HEADERS(limits.h memory.h string.h strings.h unistd.h termios.h termio.h sgtty.h stddef.h stdlib.h sys/procfs.h link.h endian.h objlist.h)
67 AC_HEADER_STAT
68
69 AC_C_CONST
70
71 AC_CHECK_FUNCS(setpgid sbrk select poll sigaction)
72
73 # If we are configured native on Linux, work around problems with sys/procfs.h
74 if test "${target}" = "${host}"; then
75 case "${host}" in
76 i[[3456]]86-*-linux*)
77 AC_DEFINE(START_INFERIOR_TRAPS_EXPECTED,2)
78 AC_DEFINE(sys_quotactl)
79 ;;
80 esac
81 fi
82
83 AC_MSG_CHECKING([for gregset_t type])
84 AC_CACHE_VAL(gdb_cv_have_gregset_t,
85 [AC_TRY_LINK([#include <sys/procfs.h>],[gregset_t *gregsetp = 0],
86 gdb_cv_have_gregset_t=yes, gdb_cv_have_gregset_t=no)])
87 AC_MSG_RESULT($gdb_cv_have_gregset_t)
88 if test $gdb_cv_have_gregset_t = yes; then
89 AC_DEFINE(HAVE_GREGSET_T)
90 fi
91
92 AC_MSG_CHECKING([for fpregset_t type])
93 AC_CACHE_VAL(gdb_cv_have_fpregset_t,
94 [AC_TRY_LINK([#include <sys/procfs.h>],[fpregset_t *fpregsetp = 0],
95 gdb_cv_have_fpregset_t=yes, gdb_cv_have_fpregset_t=no)])
96 AC_MSG_RESULT($gdb_cv_have_fpregset_t)
97 if test $gdb_cv_have_fpregset_t = yes; then
98 AC_DEFINE(HAVE_FPREGSET_T)
99 fi
100
101 dnl See if host has libm. This is usually needed by simulators.
102 AC_CHECK_LIB(m, main)
103
104 dnl See if compiler supports "long long" type.
105
106 AC_MSG_CHECKING(for long long support in compiler)
107 AC_CACHE_VAL(gdb_cv_c_long_long,
108 [AC_TRY_COMPILE(, [
109 extern long long foo;
110 switch (foo & 2) { case 0: return 1; }
111 ],
112 gdb_cv_c_long_long=yes, gdb_cv_c_long_long=no)])
113 AC_MSG_RESULT($gdb_cv_c_long_long)
114 if test $gdb_cv_c_long_long = yes; then
115 AC_DEFINE(CC_HAS_LONG_LONG)
116 fi
117
118 dnl See if the compiler and runtime support printing long long
119
120 AC_MSG_CHECKING(for long long support in printf)
121 AC_CACHE_VAL(gdb_cv_printf_has_long_long,
122 [AC_TRY_RUN([
123 int main () {
124 char buf[32];
125 long long l = 0;
126 l = (l << 16) + 0x0123;
127 l = (l << 16) + 0x4567;
128 l = (l << 16) + 0x89ab;
129 l = (l << 16) + 0xcdef;
130 sprintf (buf, "0x%016llx", l);
131 return (strcmp ("0x0123456789abcdef", buf));
132 }],
133 gdb_cv_printf_has_long_long=yes,
134 gdb_cv_printf_has_long_long=no,
135 gdb_cv_printf_has_long_long=no)])
136 if test $gdb_cv_printf_has_long_long = yes; then
137 AC_DEFINE(PRINTF_HAS_LONG_LONG)
138 fi
139 AC_MSG_RESULT($gdb_cv_printf_has_long_long)
140
141 dnl See if compiler supports "long double" type. Can't use AC_C_LONG_DOUBLE
142 dnl because autoconf complains about cross-compilation issues. However, this
143 dnl code uses the same variables as the macro for compatibility.
144
145 AC_MSG_CHECKING(for long double support in compiler)
146 AC_CACHE_VAL(ac_cv_c_long_double,
147 [AC_TRY_COMPILE(, [long double foo;],
148 ac_cv_c_long_double=yes, ac_cv_c_long_double=no)])
149 AC_MSG_RESULT($ac_cv_c_long_double)
150 if test $ac_cv_c_long_double = yes; then
151 AC_DEFINE(HAVE_LONG_DOUBLE)
152 fi
153
154 dnl See if the compiler and runtime support printing long doubles
155
156 AC_MSG_CHECKING(for long double support in printf)
157 AC_CACHE_VAL(gdb_cv_printf_has_long_double,
158 [AC_TRY_RUN([
159 int main () {
160 char buf[16];
161 long double f = 3.141592653;
162 sprintf (buf, "%Lg", f);
163 return (strncmp ("3.14159", buf, 7));
164 }],
165 gdb_cv_printf_has_long_double=yes,
166 gdb_cv_printf_has_long_double=no,
167 gdb_cv_printf_has_long_double=no)])
168 if test $gdb_cv_printf_has_long_double = yes; then
169 AC_DEFINE(PRINTF_HAS_LONG_DOUBLE)
170 fi
171 AC_MSG_RESULT($gdb_cv_printf_has_long_double)
172
173 dnl See if the compiler and runtime support scanning long doubles
174
175 AC_MSG_CHECKING(for long double support in scanf)
176 AC_CACHE_VAL(gdb_cv_scanf_has_long_double,
177 [AC_TRY_RUN([
178 int main () {
179 char *buf = "3.141592653";
180 long double f = 0;
181 sscanf (buf, "%Lg", &f);
182 return !(f > 3.14159 && f < 3.14160);
183 }],
184 gdb_cv_scanf_has_long_double=yes,
185 gdb_cv_scanf_has_long_double=no,
186 gdb_cv_scanf_has_long_double=no)])
187 if test $gdb_cv_scanf_has_long_double = yes; then
188 AC_DEFINE(SCANF_HAS_LONG_DOUBLE)
189 fi
190 AC_MSG_RESULT($gdb_cv_scanf_has_long_double)
191
192 AC_FUNC_MMAP
193
194 BFD_NEED_DECLARATION(malloc)
195 BFD_NEED_DECLARATION(realloc)
196 BFD_NEED_DECLARATION(free)
197
198 dnl See if thread_db library is around for Solaris thread debugging. Note that
199 dnl we must explicitly test for version 1 of the library because version 0
200 dnl (present on Solaris 2.4 or earlier) doesn't have the same API.
201
202 dnl Note that we only want this if we are both native (host == target), and
203 dnl not doing a canadian cross build (build == host).
204
205 if test ${build} = ${host} -a ${host} = ${target} ; then
206 case ${host_os} in
207 hpux*)
208 AC_MSG_CHECKING(for HPUX/OSF thread support)
209 if test -f /usr/include/dce/cma_config.h ; then
210 if test "$GCC" = "yes" ; then
211 AC_MSG_RESULT(yes)
212 AC_DEFINE(HAVE_HPUX_THREAD_SUPPORT)
213 CONFIG_OBS="${CONFIG_OJS} hpux-thread.o"
214 CONFIG_SRCS="${CONFIG_SRCS} hpux-thread.c"
215 else
216 AC_MSG_RESULT(no (suppressed because you are not using GCC))
217 fi
218 else
219 AC_MSG_RESULT(no)
220 fi
221 ;;
222 solaris*)
223 AC_MSG_CHECKING(for Solaris thread debugging library)
224 if test -f /usr/lib/libthread_db.so.1 ; then
225 AC_MSG_RESULT(yes)
226 AC_DEFINE(HAVE_THREAD_DB_LIB)
227 CONFIG_OBS="${CONFIG_OBS} sol-thread.o"
228 CONFIG_SRCS="${CONFIG_SRCS} sol-thread.c"
229 AC_CHECK_LIB(dl, dlopen)
230 if test "$GCC" = "yes" ; then
231 # The GNU linker requires the -export-dynamic option to make
232 # all symbols visible in the dynamic symbol table.
233 hold_ldflags=$LDFLAGS
234 AC_MSG_CHECKING(for the ld -export-dynamic flag)
235 LDFLAGS="${LDFLAGS} -Wl,-export-dynamic"
236 AC_TRY_LINK(, [int i;], found=yes, found=no)
237 LDFLAGS=$hold_ldflags
238 AC_MSG_RESULT($found)
239 if test $found = yes; then
240 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Wl,-export-dynamic"
241 fi
242 fi
243 else
244 AC_MSG_RESULT(no)
245 fi
246 ;;
247 esac
248 AC_SUBST(CONFIG_LDFLAGS)
249 fi
250
251 dnl Handle optional features that can be enabled.
252 ENABLE_CFLAGS=
253
254 AC_ARG_ENABLE(netrom,
255 [ --enable-netrom ],
256 [case "${enableval}" in
257 yes) enable_netrom=yes ;;
258 no) enable_netrom=no ;;
259 *) AC_MSG_ERROR(bad value ${enableval} given for netrom option) ;;
260 esac])
261
262 if test "${enable_netrom}" = "yes"; then
263 CONFIG_OBS="${CONFIG_OBS} remote-nrom.o"
264 CONFIG_SRCS="${CONFIG_SRCS} remote-nrom.c"
265 fi
266
267 MMALLOC_CFLAGS=
268 MMALLOC=
269 AC_SUBST(MMALLOC_CFLAGS)
270 AC_SUBST(MMALLOC)
271
272 AC_ARG_WITH(mmalloc,
273 [ --with-mmalloc use memory mapped malloc package],
274 [case "${withval}" in
275 yes) want_mmalloc=true ;;
276 no) want_mmalloc=false;;
277 *) AC_MSG_ERROR(bad value ${withval} for GDB with-mmalloc option) ;;
278 esac],[want_mmalloc=false])dnl
279
280 if test x$want_mmalloc = xtrue; then
281 AC_DEFINE(USE_MMALLOC)
282 AC_DEFINE(FORCE_MMCHECK)
283 MMALLOC_CFLAGS="-I$srcdir/../mmalloc"
284 MMALLOC='../mmalloc/libmmalloc.a'
285 fi
286
287 # start-sanitize-gdbtk
288 ENABLE_IDE=
289 AC_ARG_ENABLE(ide, [ --enable-ide Enable IDE support])
290 if test "$enable_ide" = yes; then
291 enable_ide=yes
292 ENABLE_IDE=1
293 else
294 enable_ide=no
295 fi
296 AC_SUBST(ENABLE_IDE)
297
298 ENABLE_GDBTK=
299
300 AC_ARG_ENABLE(gdbtk,
301 [ --enable-gdbtk ],
302 [case "${enableval}" in
303 yes)
304 case "$host" in
305 *go32*)
306 AC_MSG_WARN([GDB does not support GDBtk on host ${host}. GDBtk will be disabled.])
307 enable_gdbtk=no ;;
308 *windows*)
309 AC_MSG_WARN([GDB does not support GDBtk on host ${host}. GDBtk will be disabled.])
310 enable_gdbtk=no ;;
311 *)
312 enable_gdbtk=yes ;;
313 esac ;;
314 no)
315 enable_gdbtk=no ;;
316 *)
317 AC_MSG_ERROR(bad value ${enableval} given for gdbtk option) ;;
318 esac],
319 [
320 # Default is on for everything but go32 and cygwin32
321 case "$host" in
322 *go32* | *windows*)
323 ;;
324 *)
325 enable_gdbtk=yes ;;
326 esac
327 ])
328
329 # In the cygwin32 environment, we need some additional flags.
330 AC_CACHE_CHECK([for cygwin32], gdb_cv_os_cygwin32,
331 [AC_EGREP_CPP(lose, [
332 #ifdef __CYGWIN32__
333 lose
334 #endif],[gdb_cv_os_cygwin32=yes],[gdb_cv_os_cygwin32=no])])
335
336 WIN32LIBS=
337 WIN32LDAPP=
338 AC_SUBST(WIN32LIBS)
339 AC_SUBST(WIN32LDAPP)
340
341 if test x$gdb_cv_os_cygwin32 = xyes; then
342 if test x$enable_ide = xyes; then
343 WIN32LIBS="-ladvapi32"
344 fi
345 fi
346
347 configdir="unix"
348
349 if test "${enable_gdbtk}" = "yes"; then
350
351 CY_AC_PATH_TCLCONFIG
352 if test -z "${no_tcl}"; then
353 CY_AC_LOAD_TCLCONFIG
354 CY_AC_PATH_TKCONFIG
355
356 # If $no_tk is nonempty, then we can't do Tk, and there is no
357 # point to doing Tcl.
358 if test -z "${no_tk}"; then
359 CY_AC_LOAD_TKCONFIG
360 CY_AC_PATH_TCLH
361 CY_AC_PATH_TKH
362 CY_AC_PATH_ITCLH
363 CY_AC_PATH_TIX
364
365 # now look for tix library stuff
366 TIXVERSION=4.1.8.0
367 . ${ac_cv_c_tclconfig}/tclConfig.sh
368 case "${host}" in
369 *-*-cygwin32*)
370 tixdir=../tix/win/tcl8.0
371 ;;
372 *)
373 tixdir=../tix/unix/tk8.0
374 ;;
375 esac
376 if test "${TCL_SHARED_BUILD}" = "1"; then
377 TIX_LIB_EXT="${TCL_SHLIB_SUFFIX}"
378
379 # Can't win them all: SunOS 4 (others?) appends a version
380 # number after the ".so"
381 case "${host}" in
382 *-*-sunos4*)
383 TIX_LIB_EXT="${TIX_LIB_EXT}.1.0" ;;
384 esac
385
386 else
387 TIX_LIB_EXT=".a"
388 fi
389
390 if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
391 TIXLIB="-L${tixdir} -ltix${TIXVERSION}"
392 TIX_DEPS="${tixdir}/libtix${TIXVERSION}${TIX_LIB_EXT}"
393 else
394 TIXLIB="-L${tixdir} -ltix`echo ${TIXVERSION} | tr -d .`"
395 TIX_DEPS="${tixdir}/libtix`echo ${TIXVERSION} | tr -d .`${TIX_LIB_EXT}"
396 fi
397
398 ENABLE_GDBTK=1
399
400 # Include some libraries that Tcl and Tk want.
401 if test "${enable_ide}" = "yes"; then
402 TCL_LIBS='$(LIBIDE) $(LIBGUI) $(IDE) $(ITCL) $(TIX) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
403 CONFIG_DEPS='$(LIBIDE) $(LIBGUI) $(IDE_DEPS) $(ITCL_DEPS) $(TIX_DEPS) $(TK_DEPS) $(TCL_DEPS)'
404 else
405 TCL_LIBS='$(LIBGUI) $(ITCL) $(TIX) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
406 CONFIG_DEPS='$(LIBGUI) $(ITCL_DEPS) $(TIX_DEPS) $(TK_DEPS) $(TCL_DEPS)'
407 fi
408 # Yes, the ordering seems wrong here. But it isn't.
409 # TK_LIBS is the list of libraries that need to be linked
410 # after Tcl/Tk.
411 LIBS="${LIBS} ${TCL_LIBS} ${TK_LIBS}"
412 CONFIG_OBS="${CONFIG_OBS} gdbtk.o"
413
414 if test x$gdb_cv_os_cygwin32 = xyes; then
415 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32 -luser32"
416 WIN32LDAPP="-Wl,--subsystem,windows"
417 fi
418 fi
419 fi
420 fi
421
422 AC_SUBST(ENABLE_GDBTK)
423 AC_SUBST(X_CFLAGS)
424 AC_SUBST(X_LDFLAGS)
425 AC_SUBST(X_LIBS)
426 AC_SUBST(TIXLIB)
427 AC_SUBST(TIX_DEPS)
428 # end-sanitize-gdbtk
429
430 AC_SUBST(ENABLE_CFLAGS)
431
432 AC_SUBST(CONFIG_OBS)
433 AC_SUBST(CONFIG_DEPS)
434 AC_SUBST(CONFIG_SRCS)
435
436 # Begin stuff to support --enable-shared
437 AC_ARG_ENABLE(shared,
438 [ --enable-shared use shared libraries],
439 [case "${enableval}" in
440 yes) shared=true ;;
441 no) shared=false ;;
442 *) shared=true ;;
443 esac])dnl
444
445 HLDFLAGS=
446 HLDENV=
447 # If we have shared libraries, try to set rpath reasonably.
448 if test "${shared}" = "true"; then
449 case "${host}" in
450 *-*-hpux*)
451 HLDFLAGS='-Wl,+s,+b,$(libdir)'
452 ;;
453 *-*-irix5* | *-*-irix6*)
454 HLDFLAGS='-Wl,-rpath,$(libdir)'
455 ;;
456 *-*-linux*aout*)
457 ;;
458 *-*-linux* | *-pc-linux-gnu)
459 HLDFLAGS='-Wl,-rpath,$(libdir)'
460 ;;
461 *-*-solaris*)
462 HLDFLAGS='-R $(libdir)'
463 ;;
464 *-*-sysv4*)
465 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;'
466 ;;
467 esac
468 fi
469
470 # On SunOS, if the linker supports the -rpath option, use it to
471 # prevent ../bfd and ../opcodes from being included in the run time
472 # search path.
473 case "${host}" in
474 *-*-sunos*)
475 echo 'main () { }' > conftest.c
476 ${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t
477 if grep 'unrecognized' conftest.t >/dev/null 2>&1; then
478 :
479 elif grep 'No such file' conftest.t >/dev/null 2>&1; then
480 :
481 elif grep 'do not mix' conftest.t >/dev/null 2>&1; then
482 :
483 elif grep 'some text already loaded' conftest.t >/dev/null 2>&1; then
484 :
485 elif test "${shared}" = "true"; then
486 HLDFLAGS='-Wl,-rpath=$(libdir)'
487 else
488 HLDFLAGS='-Wl,-rpath='
489 fi
490 rm -f conftest.t conftest.c conftest
491 ;;
492 esac
493 AC_SUBST(HLDFLAGS)
494 AC_SUBST(HLDENV)
495 # End stuff to support --enable-shared
496
497 # target_subdir is used by the testsuite to find the target libraries.
498 target_subdir=
499 if test "${host}" != "${target}"; then
500 target_subdir="${target_alias}/"
501 fi
502 AC_SUBST(target_subdir)
503
504 frags=
505 host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
506 if test ! -f ${host_makefile_frag}; then
507 AC_MSG_ERROR("*** Gdb does not support host ${host}")
508 fi
509 frags="$frags $host_makefile_frag"
510
511 target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
512 if test ! -f ${target_makefile_frag}; then
513 AC_MSG_ERROR("*** Gdb does not support target ${target}")
514 fi
515 frags="$frags $target_makefile_frag"
516
517 AC_SUBST_FILE(host_makefile_frag)
518 AC_SUBST_FILE(target_makefile_frag)
519 AC_SUBST(frags)
520
521 changequote(,)dnl
522 hostfile=`sed -n '
523 s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
524 ' ${host_makefile_frag}`
525
526 targetfile=`sed -n '
527 s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
528 ' ${target_makefile_frag}`
529
530 # these really aren't orthogonal true/false values of the same condition,
531 # but shells are slow enough that I like to reuse the test conditions
532 # whenever possible
533 if test "${target}" = "${host}"; then
534 nativefile=`sed -n '
535 s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
536 ' ${host_makefile_frag}`
537 # else
538 # GDBserver is only useful in a "native" enviroment
539 # configdirs=`echo $configdirs | sed 's/gdbserver//'`
540 fi
541 changequote([,])
542
543 # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
544 # (NAT_FILE) is not set in config/*/*.m[ht] files, we don't make the
545 # corresponding links. But we have to remove the xm.h files and tm.h
546 # files anyway, e.g. when switching from "configure host" to
547 # "configure none".
548
549 files=
550 links=
551 rm -f xm.h
552 if test "${hostfile}" != ""; then
553 files="${files} config/${gdb_host_cpu}/${hostfile}"
554 links="${links} xm.h"
555 fi
556 rm -f tm.h
557 if test "${targetfile}" != ""; then
558 files="${files} config/${gdb_target_cpu}/${targetfile}"
559 links="${links} tm.h"
560 fi
561 rm -f nm.h
562 if test "${nativefile}" != ""; then
563 files="${files} config/${gdb_host_cpu}/${nativefile}"
564 links="${links} nm.h"
565 else
566 # A cross-only configuration.
567 files="${files} config/nm-empty.h"
568 links="${links} nm.h"
569 fi
570 # start-sanitize-gdbtk
571 AC_PROG_LN_S
572 # Make it possible to use the GUI without doing a full install
573 if test "${enable_gdbtk}" = "yes" -a ! -d gdbtcl ; then
574 if test "$LN_S" = "ln -s" -a ! -f gdbtcl ; then
575 echo linking $srcdir/gdbtcl to gdbtcl
576 $LN_S $srcdir/gdbtcl gdbtcl
577 else
578 echo Warning: Unable to link $srcdir/gdbtcl to gdbtcl. You will need to do a
579 echo " " make install before you are able to run the GUI.
580 fi
581 fi
582 # end-sanitize-gdbtk
583
584 AC_LINK_FILES($files, $links)
585
586 dnl Check for exe extension set on certain hosts (e.g. Win32)
587 AM_EXEEXT
588
589 AC_CONFIG_SUBDIRS($configdirs)
590 AC_OUTPUT(Makefile .gdbinit:gdbinit.in,
591 [
592 dnl Autoconf doesn't provide a mechanism for modifying definitions
593 dnl provided by makefile fragments.
594 dnl
595 if test "${nativefile}" = ""; then
596 sed -e '/^NATDEPFILES[[ ]]*=[[ ]]*/s//# NATDEPFILES=/' \
597 < Makefile > Makefile.tem
598 mv -f Makefile.tem Makefile
599 fi
600
601 changequote(,)dnl
602 sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
603 /^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
604 /^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
605 mv -f Makefile.tmp Makefile
606 changequote([,])dnl
607
608 case x$CONFIG_HEADERS in
609 xconfig.h:config.in)
610 echo > stamp-h ;;
611 esac
612 ],
613 [
614 gdb_host_cpu=$gdb_host_cpu
615 gdb_target_cpu=$gdb_target_cpu
616 nativefile=$nativefile
617 ])
618
619 exit 0
620