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