old-cross-binutils/gdb/configure.in

485 lines
12 KiB
Text
Raw Normal View History

dnl Autoconf configure script for GDB, the GNU debugger.
dnl Copyright 1995, 1996 Free Software Foundation, Inc.
dnl
dnl This file is part of GDB.
dnl
dnl This program is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2 of the License, or
dnl (at your option) any later version.
dnl
dnl This program is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with this program; if not, write to the Free Software
1996-02-21 17:38:36 +00:00
dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
dnl Process this file with autoconf to produce a configure script.
AC_PREREQ(2.5)dnl
AC_INIT(main.c)
AC_CONFIG_HEADER(config.h:config.in)
AC_PROG_CC
AC_AIX
AC_MINIX
AC_ISC_POSIX
AC_CANONICAL_SYSTEM
AC_PROG_INSTALL
AC_CHECK_TOOL(AR, ar)
AC_CHECK_TOOL(RANLIB, ranlib, :)
1995-10-10 20:19:37 +00:00
AC_PROG_YACC
AC_PROG_AWK
AC_CONFIG_AUX_DIR(`cd $srcdir;pwd`/..)
AC_ARG_PROGRAM
* configure.in: Check for working mmap, ansi headers, string.h, strings.h, and memory.h. * configure: Regenerated. * gdb_stat.h: New file, "portable" <sys/stat.h>. * gdb_string.h: New file, "portable" <string.h>. * altos-xdep.c, arm-tdep.c, arm-xdep.c, convex-tdep.c, convex-xdep.c, coredep.c, cxux-nat.c, dbxread.c, exec.c, gould-xdep.c, hppa-tdep.c, i386aix-nat.c, i386b-nat.c, i386mach-nat.c, i386v-nat.c, infptrace.c, m88k-nat.c, main.c, mdebugread.c, objfiles.c, os9kread.c, procfs.c, pyr-xdep.c, rs6000-nat.c, source.c, standalone.c, stuff.c, sun386-nat.c, symfile.c, symm-nat.c, symm-tdep.c, symtab.c, top.c, ultra3-nat.c, ultra3-xdep.c, umax-xdep.c, xcoffread.c: Include "gdb_stat.h" instead of <sys/stat.h>. * alpha-tdep.c, breakpoint.c, buildsym.c, c-typeprint.c, ch-typeprint.c, coffread.c, command.c, core-sol2.c, core-svr4.c, core.c, corelow.c, cp-valprint.c, dbxread.c, dcache.c, demangle.c, dpx2-nat.c, dstread.c, dwarfread.c, elfread.c, environ.c, eval.c, exec.c, f-lang.c, f-typeprint.c, f-valprint.c, findvar.c, fork-child.c, gdbtypes.c, hpread.c, i386-tdep.c, infcmd.c, inflow.c, infptrace.c, infrun.c, irix5-nat.c, language.c, m2-typeprint.c, main.c, mdebugread.c, minsyms.c, mipsread.c, monitor.c, nlmread.c, objfiles.c, os9kread.c, osfsolib.c, parse.c, printcmd.c, procfs.c, regex.c, remote-adapt.c, remote-arc.c, remote-array.c, remote-bug.c, remote-e7000.c, remote-eb.c, remote-es.c, remote-hms.c, remote-mm.c, remote-os9k.c, remote-pa.c, remote-sim.c, remote-st.c, remote-udi.c, remote-utils.c, remote-vx.c, remote-vx29k.c, remote-vx68.c, remote-vx960.c, remote-vxmips.c, remote-vxsparc.c, remote.c, solib.c, somread.c, source.c, stabsread.c, stack.c, symfile.c, symmisc.c, symtab.c, target.c, top.c, typeprint.c, utils.c, valarith.c, valops.c, valprint.c, values.c, xcoffread.c: Include "gdb_string.h" instead of <string.h>. * gdbtk.c: Likewise. * config/xm-sysv4.h, i386/xm-ptx.h, m68k/xm-sun3os4.h, sparc/xm-sun4os4.h (HAVE_MMAP): Removed. * config/xm-lynx.h, config/i386/xm-ptx.h, config/m68k/nm-apollo68b.h, config/m68k/xm-hp300hpux.h, config/mips/xm-irix3.h, config/mips/xm-mips.h, config/mips/xm-news-mips.h, config/mips/xm-riscos.h, config/pa/hppah.h, config/rs6000/xm-rs6000.h, config/sparc/xm-sun4os4.h, config/sparc/xm-sun4sol2.h, config/vax/xm-vaxbsd.h, config/vax/xm-vaxult.h, config/vax/xm-vaxult2.h (MEM_FNS_DECLARED): Removed. * config/mips/xm-irix3.h, config/mips/xm-mips.h, config/pa/xm-hppah.h (memcpy, memset): Removed declarations.
1995-08-01 20:14:27 +00:00
AC_HEADER_STDC
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)
* configure.in: Check for working mmap, ansi headers, string.h, strings.h, and memory.h. * configure: Regenerated. * gdb_stat.h: New file, "portable" <sys/stat.h>. * gdb_string.h: New file, "portable" <string.h>. * altos-xdep.c, arm-tdep.c, arm-xdep.c, convex-tdep.c, convex-xdep.c, coredep.c, cxux-nat.c, dbxread.c, exec.c, gould-xdep.c, hppa-tdep.c, i386aix-nat.c, i386b-nat.c, i386mach-nat.c, i386v-nat.c, infptrace.c, m88k-nat.c, main.c, mdebugread.c, objfiles.c, os9kread.c, procfs.c, pyr-xdep.c, rs6000-nat.c, source.c, standalone.c, stuff.c, sun386-nat.c, symfile.c, symm-nat.c, symm-tdep.c, symtab.c, top.c, ultra3-nat.c, ultra3-xdep.c, umax-xdep.c, xcoffread.c: Include "gdb_stat.h" instead of <sys/stat.h>. * alpha-tdep.c, breakpoint.c, buildsym.c, c-typeprint.c, ch-typeprint.c, coffread.c, command.c, core-sol2.c, core-svr4.c, core.c, corelow.c, cp-valprint.c, dbxread.c, dcache.c, demangle.c, dpx2-nat.c, dstread.c, dwarfread.c, elfread.c, environ.c, eval.c, exec.c, f-lang.c, f-typeprint.c, f-valprint.c, findvar.c, fork-child.c, gdbtypes.c, hpread.c, i386-tdep.c, infcmd.c, inflow.c, infptrace.c, infrun.c, irix5-nat.c, language.c, m2-typeprint.c, main.c, mdebugread.c, minsyms.c, mipsread.c, monitor.c, nlmread.c, objfiles.c, os9kread.c, osfsolib.c, parse.c, printcmd.c, procfs.c, regex.c, remote-adapt.c, remote-arc.c, remote-array.c, remote-bug.c, remote-e7000.c, remote-eb.c, remote-es.c, remote-hms.c, remote-mm.c, remote-os9k.c, remote-pa.c, remote-sim.c, remote-st.c, remote-udi.c, remote-utils.c, remote-vx.c, remote-vx29k.c, remote-vx68.c, remote-vx960.c, remote-vxmips.c, remote-vxsparc.c, remote.c, solib.c, somread.c, source.c, stabsread.c, stack.c, symfile.c, symmisc.c, symtab.c, target.c, top.c, typeprint.c, utils.c, valarith.c, valops.c, valprint.c, values.c, xcoffread.c: Include "gdb_string.h" instead of <string.h>. * gdbtk.c: Likewise. * config/xm-sysv4.h, i386/xm-ptx.h, m68k/xm-sun3os4.h, sparc/xm-sun4os4.h (HAVE_MMAP): Removed. * config/xm-lynx.h, config/i386/xm-ptx.h, config/m68k/nm-apollo68b.h, config/m68k/xm-hp300hpux.h, config/mips/xm-irix3.h, config/mips/xm-mips.h, config/mips/xm-news-mips.h, config/mips/xm-riscos.h, config/pa/hppah.h, config/rs6000/xm-rs6000.h, config/sparc/xm-sun4os4.h, config/sparc/xm-sun4sol2.h, config/vax/xm-vaxbsd.h, config/vax/xm-vaxult.h, config/vax/xm-vaxult2.h (MEM_FNS_DECLARED): Removed. * config/mips/xm-irix3.h, config/mips/xm-mips.h, config/pa/xm-hppah.h (memcpy, memset): Removed declarations.
1995-08-01 20:14:27 +00:00
AC_HEADER_STAT
* defs.h: Define CONST_PTR as blank if compiling with Microsoft C, else it's `const'. * c-lang.c c-lang.h ch-lang.c f-lang.c language.c m2-lang.c scm-lang.c: Microsoft C can't hack const pointers. Use CONST_PTR macro instead. * configure configure.in defs.h: Use AC_C_CONST to figure out if the compiler supports const. Gets rid of some cruft in defs.h. * dwarf2read.c: <string.h> -> "gdb_string.h" * remote-sim.c: Add prototypes. Fix call to gdbsim_kill. * sparcl-tdep.c (download): Add prototypes to write_routine and start_routine args. * mswin/gdbwin.c: Don't include both varargs.h AND stdarg.h. Get rid of varargs.h Include string.h. * (gdbwin_update gdbwin_fputs regs_changed_f bpt_changed_f update): Fix prototypes, fix calls. * (update): Return value for catch_errors. * (run_execute_command togdb_command_from_tty togdb_command): Cleanup catching of errors from calls to execute_command. Also, dup command string to avoid modifying const strings. * (togdb_breakinfo_i_init togdb_breakinfo_i_next): Use 0 instead of NULL when see if b->address isn't set. * (bi_disable_bpt bi_enable_bpt bi_delete_all bi_delete_breakpoint): Add arg to calls to update. * (gui_command): Add prototype. * (mswin_query): Fix prototype. * (_initialize_gdbwin): Dup string to avoid modifying const. * (info_path togdb_get_info_path): Remove const from decls cuz this can't be const (it points at malloc'ed memory). * (togdb_searchpath): Remove const from path. Dup string to avoid modifying const strings. * rindex -> strrchr. * (gdbwin_list_symbols): Regexp param is const. * Fix lots of refs to psymtabs to deref correct pointers. * (togdb_set_breakpoint_sal): Call set_breakpoint_sal with sal, not &sal. * mswin/gdbwin.h (togdb_searchpath togdb_get_info_path toget_set_info_path): Fix prototypes to match reality. * mswin/gui.cpp: Define _beginthreadex and _endthreadex routines with proper prototypes. * mswin/iface.cpp (gdbwin_fputs): Define with correct number of args. * mswin/ser-win32s.c: Fix defs of min and max. * mswin/serdll32.c (OpenComm16): Make cbInQueue and cbOutQueue be USHORT. * (WriteComm16): Change lpBug from LPVOID to LPCSTR. * mswin/serdll32.h: Fix prototypes for OpenComm16 and WriteComm16.
1996-08-13 00:01:37 +00:00
AC_C_CONST
* Makefile.in: Add rule for hpux-thread.o (needs special header files). * (SUBDIRS): Remove mswin. * Change procedure for creating init.c. Speeds things up quite a bit. * config.in configure configure.in: Check for select, poll. * Check for OSF header files before including hpux-thread.o. * Don't configure doc or testsuite when building under MSVC. * findvar.c value.h (read_register_pid write_register_pid): Make global. Needed for hppa-tdep.c. * (supply_register): Don't set pid to inferior_pid when supplying registers. * hppa-tdep.c (saved_pc_after_call): frame_saved_pc -> FRAME_SAVED_PC. * (frame_saved_pc): Change name to hppa_frame_saved_pc. * (hppa_pop_frame): Don't use a pid of 0 with target_write_pc. Use write_pc instead, which uses the correct pid. * (target_read_pc target_write_pc): Use read/write_register_pid instead of read/write_register to preserve the pid passed in. * inftarg.c (child_can_run): Add flag child_suppress_run to allow hpux-threads.c to override this as a runnable target. * config/pa/nm-hppah.h: Define target_new_objfile and target_pid_to_str. * config/pa/tm-hppa.h (FRAME_SAVED_PC): Use hppa_frame_saved_pc instead of frame_saved_pc. * config/m68k/tm-m68k.h: Define TARGET_M68K for Wingdb. * config/m68k/tm-monitor.h: Use FRAME_CHAIN_VALID_ALTERNATE, since we can't easily determine the start file bounds with ELF. * config/mips/tm-mips.h: Define TARGET_MIPS for Wingdb. * hpux-thread.c: New file for HPUX/OSF thread support. * osf-share/{README AT386/cma_thread_io.h HP800/cma_thread_io.h RIOS/cma_thread_io.h cma_attr.h cma_deb_core.h cma_debug_client.h cma_errors.h cma_handle.h cma_init.h cma_list.h cma_mutex.h cma_sched.h cma_semaphore_defs.h cma_sequence.h cma_stack.h cma_stack_int.h cma_tcb_defs.h cma_util.h}: New files for OSF thread support.
1996-10-08 17:06:17 +00:00
AC_CHECK_FUNCS(setpgid sbrk select poll)
# If we are configured native on Linux, work around problems with sys/procfs.h
if test "${target}" = "${host}"; then
case "${host}" in
i[3456]86-*-linux*)
AC_DEFINE(START_INFERIOR_TRAPS_EXPECTED,"2")
AC_DEFINE(sys_quotactl)
;;
esac
fi
AC_MSG_CHECKING([for gregset_t type])
AC_CACHE_VAL(gdb_cv_have_gregset_t,
[AC_TRY_LINK([#include <sys/procfs.h>],[gregset_t *gregsetp = 0],
gdb_cv_have_gregset_t=yes, gdb_cv_have_gregset_t=no)])
AC_MSG_RESULT($gdb_cv_have_gregset_t)
if test $gdb_cv_have_gregset_t = yes; then
AC_DEFINE(HAVE_GREGSET_T)
fi
AC_MSG_CHECKING([for fpregset_t type])
AC_CACHE_VAL(gdb_cv_have_fpregset_t,
[AC_TRY_LINK([#include <sys/procfs.h>],[fpregset_t *fpregsetp = 0],
gdb_cv_have_fpregset_t=yes, gdb_cv_have_fpregset_t=no)])
AC_MSG_RESULT($gdb_cv_have_fpregset_t)
if test $gdb_cv_have_fpregset_t = yes; then
AC_DEFINE(HAVE_FPREGSET_T)
fi
* configure.in: Add test for "long long" support. * configure: Regenerate with autoconf. * acconfig.h: Add CC_HAS_LONG_LONG * config.in: Regenerate with autoheader. * config/mips/tm-mips64.h (FORCE_LONG_LONG): Remove * config/sparc/tm-sp64.h (CC_HAS_LONG_LONG): Remove. * config/mips/tm-vr4300el.h (CC_HAS_LONG_LONG): Remove. * config/mips/tm-vr4300.h (CC_HAS_LONG_LONG): Remove. * config/mips/xm-irix5.h (CC_HAS_LONG_LONG): Remove (PRINTF_HAS_LONG_LONG): Remove. (FORCE_LONG_LONG): Remove. * config/powerpc/xm-aix.h (UINT_MAX): Undef and use gdb's version. * config/convex/xm-convex.h (CC_HAS_LONG_LONG): Remove (PRINTF_HAS_LONG_LONG): Remove. * config/xm-nbsd.h (CC_HAS_LONG_LONG): Remove. (PRINTF_HAS_LONG_LONG): Remove. * config/pa/tm-hppa.h (GET_FIELD): Put parens around subtraction inside shift. Put parens around subtraction in operand of bitwise and. (struct frame_info): Forward declare if __STDC__ defined. (frame_saved_regs): Ditto. (struct value): Ditto. (struct type): Ditto. (struct inferior_status): Ditto. (init_extra_frame_info): Add prototype. (skip_prologue): Ditto. (frameless_function_invocation): Ditto. (frame_chain): Ditto. (frame_chain_valid): Ditto. (saved_pc_after_call): Ditto. (hppa_fix_call_dummy): Ditto. (hppa_push_arguments): Ditto. (pa_do_registers_info): Ditto. (in_solib_call_trampoline): Ditto. (in_solib_return_trampoline): Ditto. (push_dummy_frame): Ditto. * convex-tdep.c (decout): Use print_longest rather than fprintf_filtered. * defs.h: Remove use of FORCE_LONG_LONG and __GNUC__ to set CC_HAS_LONG_LONG. (INT_MIN): Fix so it works correctly when assigned to a long long. * valprint.c (longest_to_int): Rewrite to remove dependence on INT_MIN and INT_MAX. (print_longest): Rewrite the code that falls back to synthesized hex output when LONGEST value is not representable as in a long and printf doesn't support printing long longs. * ch-valprint.c (chill_val_print): Cast 2nd arg of chill_print_type_scalar to LONGEST. chill_print_type_scalar): Make static and add prototype. * hppa-tdep.c (get_field): Ifdef out unused function. (set_field): Ditto. (extract_3): Ditto. (extract_5_store): Ditto. (extract_11): Ditto. (extract_12): Ditto. (deposit_17): Ditto. (extract_14): Convert to static and add prototype. (deposit_14): Ditto. (extract_21): Ditto. (deposit_21): Ditto. (extract_17): Ditto. (extract_5r_store): Ditto. (extract_5R_store): Ditto. (extract_5_load): Ditto. (find_proc_framesize): Ditto. (find_dummy_frame_regs): Ditto. (sign_extend): Ditto. (find_unwind_entry): Add prototype. (find_return_regnum): Ditto. (unwind_command): Ditto. (find_dummy_frame_regs): Add parens around subtraction in operand of bitwise-and. (skip_prologue): Add parens around operands of logical-and inside operand of logical-or. (sign_extend): Add parens around operands of subtraction inside operand of shift. (low_sign_extend): Ditto. * top.c (filename_completer): Convert old style decl of filename_completion_function into prototype. * f-lang.c (patch_common_entries): Ifdef out unused function. * stabsread.c (read_cfront_baseclasses): Remove unused local variable "msg_noterm". (resolve_cfront_continuation): Remove unused local variable "fip". (read_type): Remove unused variable xtypenums. (read_cfront_static_fields): Remove unused variable "i". (read_cfront_static_fields): Remove unused variable "nfields". (read_cfront_member_functions): Add missing comment terminator. (read_cfront_static_fields): Return 1 rather than random value. (read_cfront_baseclasses): Ditto. (read_cfront_baseclasses): Ditto. (read_cfront_baseclasses): Ditto. * somsolib.c (som_solib_create_inferior_hook): Remove unused variable "u". (som_solib_create_inferior_hook): Remove unused variable shadow_contents. (language.h): Add for needed prototypes. (som_solib_sharedlibrary_command): Add prototype. * hpread.c: (hpread_read_array_type): Add prototype. * somread.c (hpread_build_pysmtabs): Add prototype. (hpread_symfile_finish): Ditto. (hpread_symfile_init): Ditto. * hppah-nat.c (fetch_register): Convert old style decl to prototype. (gdbcore.h): Include for needed prototypes. (fetch_register): Remove unused variable "mess". * remote-pa.c (get_offsets): Ifdef out unused function. (remote_start_remote): Remove unused variable "timeout". (boot_board): Add prototype. (reaad_frame): Add prototype. (getpkt): Remove unused variable "bp". (remote_kill): Add prototype. (remote_mourn): Add prototype. (remote_insert_breakpoint): Add prototype. (remote_remove_breakpoint): Add prototype. * valops.c (value_push): Only use if PUSH_ARGUMENTS is not defined. * infcmd.c (do_registers_info): Only need prototype if DO_REGISTERS_INFO is not defined. (breakpoint_auto_delete_contents): Only need if CALL_DUMMY_BREAKPOINT_OFFSET is defined.
1996-07-28 06:32:48 +00:00
dnl See if compiler supports "long long" type.
AC_MSG_CHECKING(for long long support in compiler)
AC_CACHE_VAL(gdb_cv_c_long_long,
[AC_TRY_COMPILE(, [
extern long long foo;
switch (foo & 2) { case 0: return 1; }
],
* configure.in: Add test for "long long" support. * configure: Regenerate with autoconf. * acconfig.h: Add CC_HAS_LONG_LONG * config.in: Regenerate with autoheader. * config/mips/tm-mips64.h (FORCE_LONG_LONG): Remove * config/sparc/tm-sp64.h (CC_HAS_LONG_LONG): Remove. * config/mips/tm-vr4300el.h (CC_HAS_LONG_LONG): Remove. * config/mips/tm-vr4300.h (CC_HAS_LONG_LONG): Remove. * config/mips/xm-irix5.h (CC_HAS_LONG_LONG): Remove (PRINTF_HAS_LONG_LONG): Remove. (FORCE_LONG_LONG): Remove. * config/powerpc/xm-aix.h (UINT_MAX): Undef and use gdb's version. * config/convex/xm-convex.h (CC_HAS_LONG_LONG): Remove (PRINTF_HAS_LONG_LONG): Remove. * config/xm-nbsd.h (CC_HAS_LONG_LONG): Remove. (PRINTF_HAS_LONG_LONG): Remove. * config/pa/tm-hppa.h (GET_FIELD): Put parens around subtraction inside shift. Put parens around subtraction in operand of bitwise and. (struct frame_info): Forward declare if __STDC__ defined. (frame_saved_regs): Ditto. (struct value): Ditto. (struct type): Ditto. (struct inferior_status): Ditto. (init_extra_frame_info): Add prototype. (skip_prologue): Ditto. (frameless_function_invocation): Ditto. (frame_chain): Ditto. (frame_chain_valid): Ditto. (saved_pc_after_call): Ditto. (hppa_fix_call_dummy): Ditto. (hppa_push_arguments): Ditto. (pa_do_registers_info): Ditto. (in_solib_call_trampoline): Ditto. (in_solib_return_trampoline): Ditto. (push_dummy_frame): Ditto. * convex-tdep.c (decout): Use print_longest rather than fprintf_filtered. * defs.h: Remove use of FORCE_LONG_LONG and __GNUC__ to set CC_HAS_LONG_LONG. (INT_MIN): Fix so it works correctly when assigned to a long long. * valprint.c (longest_to_int): Rewrite to remove dependence on INT_MIN and INT_MAX. (print_longest): Rewrite the code that falls back to synthesized hex output when LONGEST value is not representable as in a long and printf doesn't support printing long longs. * ch-valprint.c (chill_val_print): Cast 2nd arg of chill_print_type_scalar to LONGEST. chill_print_type_scalar): Make static and add prototype. * hppa-tdep.c (get_field): Ifdef out unused function. (set_field): Ditto. (extract_3): Ditto. (extract_5_store): Ditto. (extract_11): Ditto. (extract_12): Ditto. (deposit_17): Ditto. (extract_14): Convert to static and add prototype. (deposit_14): Ditto. (extract_21): Ditto. (deposit_21): Ditto. (extract_17): Ditto. (extract_5r_store): Ditto. (extract_5R_store): Ditto. (extract_5_load): Ditto. (find_proc_framesize): Ditto. (find_dummy_frame_regs): Ditto. (sign_extend): Ditto. (find_unwind_entry): Add prototype. (find_return_regnum): Ditto. (unwind_command): Ditto. (find_dummy_frame_regs): Add parens around subtraction in operand of bitwise-and. (skip_prologue): Add parens around operands of logical-and inside operand of logical-or. (sign_extend): Add parens around operands of subtraction inside operand of shift. (low_sign_extend): Ditto. * top.c (filename_completer): Convert old style decl of filename_completion_function into prototype. * f-lang.c (patch_common_entries): Ifdef out unused function. * stabsread.c (read_cfront_baseclasses): Remove unused local variable "msg_noterm". (resolve_cfront_continuation): Remove unused local variable "fip". (read_type): Remove unused variable xtypenums. (read_cfront_static_fields): Remove unused variable "i". (read_cfront_static_fields): Remove unused variable "nfields". (read_cfront_member_functions): Add missing comment terminator. (read_cfront_static_fields): Return 1 rather than random value. (read_cfront_baseclasses): Ditto. (read_cfront_baseclasses): Ditto. (read_cfront_baseclasses): Ditto. * somsolib.c (som_solib_create_inferior_hook): Remove unused variable "u". (som_solib_create_inferior_hook): Remove unused variable shadow_contents. (language.h): Add for needed prototypes. (som_solib_sharedlibrary_command): Add prototype. * hpread.c: (hpread_read_array_type): Add prototype. * somread.c (hpread_build_pysmtabs): Add prototype. (hpread_symfile_finish): Ditto. (hpread_symfile_init): Ditto. * hppah-nat.c (fetch_register): Convert old style decl to prototype. (gdbcore.h): Include for needed prototypes. (fetch_register): Remove unused variable "mess". * remote-pa.c (get_offsets): Ifdef out unused function. (remote_start_remote): Remove unused variable "timeout". (boot_board): Add prototype. (reaad_frame): Add prototype. (getpkt): Remove unused variable "bp". (remote_kill): Add prototype. (remote_mourn): Add prototype. (remote_insert_breakpoint): Add prototype. (remote_remove_breakpoint): Add prototype. * valops.c (value_push): Only use if PUSH_ARGUMENTS is not defined. * infcmd.c (do_registers_info): Only need prototype if DO_REGISTERS_INFO is not defined. (breakpoint_auto_delete_contents): Only need if CALL_DUMMY_BREAKPOINT_OFFSET is defined.
1996-07-28 06:32:48 +00:00
gdb_cv_c_long_long=yes, gdb_cv_c_long_long=no)])
AC_MSG_RESULT($gdb_cv_c_long_long)
if test $gdb_cv_c_long_long = yes; then
AC_DEFINE(CC_HAS_LONG_LONG)
fi
dnl See if the compiler and runtime support printing long long
AC_MSG_CHECKING(for long long support in printf)
AC_CACHE_VAL(gdb_cv_printf_has_long_long,
[AC_TRY_RUN([
int main () {
char buf[16];
long long l = 0x12345;
sprintf (buf, "%llx", l);
return (strcmp ("12345", buf));
}],
gdb_cv_printf_has_long_long=yes,
gdb_cv_printf_has_long_long=no,
gdb_cv_printf_has_long_long=no)])
if test $gdb_cv_printf_has_long_long = yes; then
AC_DEFINE(PRINTF_HAS_LONG_LONG)
fi
AC_MSG_RESULT($gdb_cv_printf_has_long_long)
* Add native support for long double data type. * c-exp.y (%union): Change dval to typed_val_float. Use DOUBLEST to store actual data. Change types of INT and FLOAT tokens to typed_val_int and typed_val_float respectively. Create new token DOUBLE_KEYWORD to specify the string `double'. Make production for FLOAT use type determined by parse_number. Add production for "long double" data type. * (parse_number): Use sscanf to parse numbers as float, double or long double depending upon the type of typed_val_float.dval. Also allow user to specify `f' or `l' suffix to explicitly specify float or long double constants. Change typed_val to typed_val_int. * (yylex): Change typed_val to typed_val_int. Also, scan for "double" keyword. * coffread.c (decode_base_type): Add support for T_LNGDBL basic type. * configure, configure.in: Add check for long double support in the host compiler. * defs.h: Define DOUBLEST appropriatly depending on whether HAVE_LONG_DOUBLE (from autoconf) is defined. Also, fix prototypes for functions that handle this type. * expression.h (union exp_element): doubleconst is now type DOUBLEST. * m2-exp.y f-exp.y (%union): dval becomes type DOUBLEST. * findvar.c (extract_floating): Make return value be DOUBLEST. Also, add support for numbers with size of long double. * (store_floating): Arg `val' is now type DOUBLEST. Handle all floating types. * parser-defs.h parse.c (write_exp_elt_dblcst): Arg expelt is now DOUBLEST. * valarith.c (value_binop): Change temp variables v1, v2 and v to type DOUBLEST. Coerce type of result to long double if either op was of that type. * valops.c (value_arg_coerce): If argument type is bigger than double, coerce to long double. * (call_function_by_hand): If REG_STRUCT_HAS_ADDR is defined, and arg type is float and > 8 bytes, then use pointer-to-object calling conventions. * valprint.c (print_floating): Arg doub is now type DOUBLEST. Use appropriate format and precision to print out floating point values. * value.h: Fixup prototypes for value_as_double, value_from_double, and unpack_double to use DOUBLEST. * values.c (record_latest_value): Remove check for invalid floats. Allow history to store them so that people may examine them in hex if they want. * (value_as_double unpack_double): Change return value to DOUBLEST. * (value_from_double): Arg `num' is now DOUBLEST. * (using_struct_return): Use RETURN_VALUE_ON_STACK macro (target specific) to expect certain types to always be returned on the stack.
1996-02-17 00:07:35 +00:00
dnl See if compiler supports "long double" type. Can't use AC_C_LONG_DOUBLE
dnl because autoconf complains about cross-compilation issues. However, this
dnl code uses the same variables as the macro for compatibility.
AC_MSG_CHECKING(for long double support in compiler)
* Add native support for long double data type. * c-exp.y (%union): Change dval to typed_val_float. Use DOUBLEST to store actual data. Change types of INT and FLOAT tokens to typed_val_int and typed_val_float respectively. Create new token DOUBLE_KEYWORD to specify the string `double'. Make production for FLOAT use type determined by parse_number. Add production for "long double" data type. * (parse_number): Use sscanf to parse numbers as float, double or long double depending upon the type of typed_val_float.dval. Also allow user to specify `f' or `l' suffix to explicitly specify float or long double constants. Change typed_val to typed_val_int. * (yylex): Change typed_val to typed_val_int. Also, scan for "double" keyword. * coffread.c (decode_base_type): Add support for T_LNGDBL basic type. * configure, configure.in: Add check for long double support in the host compiler. * defs.h: Define DOUBLEST appropriatly depending on whether HAVE_LONG_DOUBLE (from autoconf) is defined. Also, fix prototypes for functions that handle this type. * expression.h (union exp_element): doubleconst is now type DOUBLEST. * m2-exp.y f-exp.y (%union): dval becomes type DOUBLEST. * findvar.c (extract_floating): Make return value be DOUBLEST. Also, add support for numbers with size of long double. * (store_floating): Arg `val' is now type DOUBLEST. Handle all floating types. * parser-defs.h parse.c (write_exp_elt_dblcst): Arg expelt is now DOUBLEST. * valarith.c (value_binop): Change temp variables v1, v2 and v to type DOUBLEST. Coerce type of result to long double if either op was of that type. * valops.c (value_arg_coerce): If argument type is bigger than double, coerce to long double. * (call_function_by_hand): If REG_STRUCT_HAS_ADDR is defined, and arg type is float and > 8 bytes, then use pointer-to-object calling conventions. * valprint.c (print_floating): Arg doub is now type DOUBLEST. Use appropriate format and precision to print out floating point values. * value.h: Fixup prototypes for value_as_double, value_from_double, and unpack_double to use DOUBLEST. * values.c (record_latest_value): Remove check for invalid floats. Allow history to store them so that people may examine them in hex if they want. * (value_as_double unpack_double): Change return value to DOUBLEST. * (value_from_double): Arg `num' is now DOUBLEST. * (using_struct_return): Use RETURN_VALUE_ON_STACK macro (target specific) to expect certain types to always be returned on the stack.
1996-02-17 00:07:35 +00:00
AC_CACHE_VAL(ac_cv_c_long_double,
[AC_TRY_COMPILE(, [long double foo;],
ac_cv_c_long_double=yes, ac_cv_c_long_double=no)])
AC_MSG_RESULT($ac_cv_c_long_double)
if test $ac_cv_c_long_double = yes; then
AC_DEFINE(HAVE_LONG_DOUBLE)
fi
dnl See if the compiler and runtime support printing long doubles
AC_MSG_CHECKING(for long double support in printf)
AC_CACHE_VAL(gdb_cv_printf_has_long_double,
[AC_TRY_RUN([
int main () {
char buf[16];
long double f = 3.141592653;
sprintf (buf, "%Lg", f);
return (strncmp ("3.14159", buf, 7));
}],
gdb_cv_printf_has_long_double=yes,
gdb_cv_printf_has_long_double=no,
gdb_cv_printf_has_long_double=no)])
if test $gdb_cv_printf_has_long_double = yes; then
AC_DEFINE(PRINTF_HAS_LONG_DOUBLE)
fi
AC_MSG_RESULT($gdb_cv_printf_has_long_double)
* configure.in: Check for working mmap, ansi headers, string.h, strings.h, and memory.h. * configure: Regenerated. * gdb_stat.h: New file, "portable" <sys/stat.h>. * gdb_string.h: New file, "portable" <string.h>. * altos-xdep.c, arm-tdep.c, arm-xdep.c, convex-tdep.c, convex-xdep.c, coredep.c, cxux-nat.c, dbxread.c, exec.c, gould-xdep.c, hppa-tdep.c, i386aix-nat.c, i386b-nat.c, i386mach-nat.c, i386v-nat.c, infptrace.c, m88k-nat.c, main.c, mdebugread.c, objfiles.c, os9kread.c, procfs.c, pyr-xdep.c, rs6000-nat.c, source.c, standalone.c, stuff.c, sun386-nat.c, symfile.c, symm-nat.c, symm-tdep.c, symtab.c, top.c, ultra3-nat.c, ultra3-xdep.c, umax-xdep.c, xcoffread.c: Include "gdb_stat.h" instead of <sys/stat.h>. * alpha-tdep.c, breakpoint.c, buildsym.c, c-typeprint.c, ch-typeprint.c, coffread.c, command.c, core-sol2.c, core-svr4.c, core.c, corelow.c, cp-valprint.c, dbxread.c, dcache.c, demangle.c, dpx2-nat.c, dstread.c, dwarfread.c, elfread.c, environ.c, eval.c, exec.c, f-lang.c, f-typeprint.c, f-valprint.c, findvar.c, fork-child.c, gdbtypes.c, hpread.c, i386-tdep.c, infcmd.c, inflow.c, infptrace.c, infrun.c, irix5-nat.c, language.c, m2-typeprint.c, main.c, mdebugread.c, minsyms.c, mipsread.c, monitor.c, nlmread.c, objfiles.c, os9kread.c, osfsolib.c, parse.c, printcmd.c, procfs.c, regex.c, remote-adapt.c, remote-arc.c, remote-array.c, remote-bug.c, remote-e7000.c, remote-eb.c, remote-es.c, remote-hms.c, remote-mm.c, remote-os9k.c, remote-pa.c, remote-sim.c, remote-st.c, remote-udi.c, remote-utils.c, remote-vx.c, remote-vx29k.c, remote-vx68.c, remote-vx960.c, remote-vxmips.c, remote-vxsparc.c, remote.c, solib.c, somread.c, source.c, stabsread.c, stack.c, symfile.c, symmisc.c, symtab.c, target.c, top.c, typeprint.c, utils.c, valarith.c, valops.c, valprint.c, values.c, xcoffread.c: Include "gdb_string.h" instead of <string.h>. * gdbtk.c: Likewise. * config/xm-sysv4.h, i386/xm-ptx.h, m68k/xm-sun3os4.h, sparc/xm-sun4os4.h (HAVE_MMAP): Removed. * config/xm-lynx.h, config/i386/xm-ptx.h, config/m68k/nm-apollo68b.h, config/m68k/xm-hp300hpux.h, config/mips/xm-irix3.h, config/mips/xm-mips.h, config/mips/xm-news-mips.h, config/mips/xm-riscos.h, config/pa/hppah.h, config/rs6000/xm-rs6000.h, config/sparc/xm-sun4os4.h, config/sparc/xm-sun4sol2.h, config/vax/xm-vaxbsd.h, config/vax/xm-vaxult.h, config/vax/xm-vaxult2.h (MEM_FNS_DECLARED): Removed. * config/mips/xm-irix3.h, config/mips/xm-mips.h, config/pa/xm-hppah.h (memcpy, memset): Removed declarations.
1995-08-01 20:14:27 +00:00
AC_FUNC_MMAP
BFD_NEED_DECLARATION(malloc)
BFD_NEED_DECLARATION(realloc)
BFD_NEED_DECLARATION(free)
dnl See if thread_db library is around for Solaris thread debugging. Note that
dnl we must explicitly test for version 1 of the library because version 0
dnl (present on Solaris 2.4 or earlier) doesn't have the same API.
dnl Note that we only want this if we are both native (host == target), and
dnl not doing a canadian cross build (build == host).
if test ${build} = ${host} -a ${host} = ${target} ; then
AC_MSG_CHECKING(for Solaris thread debugging library)
if test -f /usr/lib/libthread_db.so.1 ; then
AC_MSG_RESULT(yes)
THREAD_DB_OBS=sol-thread.o
AC_DEFINE(HAVE_THREAD_DB_LIB)
CONFIG_LDFLAGS="${CONFIG_LDFLAGS} -Xlinker -export-dynamic"
else
AC_MSG_RESULT(no)
fi
* Makefile.in: Add rule for hpux-thread.o (needs special header files). * (SUBDIRS): Remove mswin. * Change procedure for creating init.c. Speeds things up quite a bit. * config.in configure configure.in: Check for select, poll. * Check for OSF header files before including hpux-thread.o. * Don't configure doc or testsuite when building under MSVC. * findvar.c value.h (read_register_pid write_register_pid): Make global. Needed for hppa-tdep.c. * (supply_register): Don't set pid to inferior_pid when supplying registers. * hppa-tdep.c (saved_pc_after_call): frame_saved_pc -> FRAME_SAVED_PC. * (frame_saved_pc): Change name to hppa_frame_saved_pc. * (hppa_pop_frame): Don't use a pid of 0 with target_write_pc. Use write_pc instead, which uses the correct pid. * (target_read_pc target_write_pc): Use read/write_register_pid instead of read/write_register to preserve the pid passed in. * inftarg.c (child_can_run): Add flag child_suppress_run to allow hpux-threads.c to override this as a runnable target. * config/pa/nm-hppah.h: Define target_new_objfile and target_pid_to_str. * config/pa/tm-hppa.h (FRAME_SAVED_PC): Use hppa_frame_saved_pc instead of frame_saved_pc. * config/m68k/tm-m68k.h: Define TARGET_M68K for Wingdb. * config/m68k/tm-monitor.h: Use FRAME_CHAIN_VALID_ALTERNATE, since we can't easily determine the start file bounds with ELF. * config/mips/tm-mips.h: Define TARGET_MIPS for Wingdb. * hpux-thread.c: New file for HPUX/OSF thread support. * osf-share/{README AT386/cma_thread_io.h HP800/cma_thread_io.h RIOS/cma_thread_io.h cma_attr.h cma_deb_core.h cma_debug_client.h cma_errors.h cma_handle.h cma_init.h cma_list.h cma_mutex.h cma_sched.h cma_semaphore_defs.h cma_sequence.h cma_stack.h cma_stack_int.h cma_tcb_defs.h cma_util.h}: New files for OSF thread support.
1996-10-08 17:06:17 +00:00
case ${host_os} in
hpux*)
AC_MSG_CHECKING(for HPUX/OSF thread support)
if test -f /usr/include/dce/cma_config.h ; then
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_HPUX_THREAD_SUPPORT)
THREAD_DB_OBS=hpux-thread.o
else
AC_MSG_RESULT(no)
fi
;;
esac
AC_SUBST(THREAD_DB_OBS)
AC_SUBST(CONFIG_LDFLAGS)
fi
dnl Handle optional features that can be enabled.
ENABLE_CFLAGS=
ENABLE_CLIBS=
ENABLE_OBS=
AC_ARG_ENABLE(netrom,
[ --enable-netrom ],
[case "${enableval}" in
yes) enable_netrom=yes ;;
no) enable_netrom=no ;;
*) AC_MSG_ERROR(bad value ${enableval} given for netrom option) ;;
esac])
if test "${enable_netrom}" = "yes"; then
ENABLE_OBS="${ENABLE_OBS} remote-nrom.o"
fi
* Makefile.in (INTERNAL_CFLAGS): Add ENABLE_CFLAGS. * fork-child.c (fork_inferior): Add call to TARGET_CREATE_INFERIOR_HOOK to allow target specific code to get control just before the new process executes it's first instruction. * remote-mips.c (mips_initialize): Cleanup a bit. Don't try to receive a packet at first. This speeds up initialization a lot. Use TARGET_MONITOR_PROMPT instead of "<IDT>". (common_breakpoint): Use rresponse instead of rerrflg to inspect error code. * symfile.c (syms_from_objfile reread_symbols): Call TARGET_SYMFILE_POSTREAD to allow target specific code to get control after reading new symbols. * target.h: New macros TARGET_SYMFILE_POSTREAD, and TARGET_CREATE_INFERIOR_HOOK. See above for descriptions. * config/mips/{irix5.mh nm-irix5.h}: Delete nm-irix5.h. Make NAT_FILE point directly at ../nm-sysv4.h. * config/mips/{mipsm3.mh nm-m3.h}: Delete nm-m3.h. Make NAT_FILE point directly at ../nm-m3.h. * config/mips/{mipsv4.mh nm-sysv4.h}: Delete nm-sysv4.h. Make NAT_FILE point directly at ../nm-sysv4.h. * config/mips/nm-mips.h: Improve comment at top of file. * config/mips/tm-mips.h (TARGET_MONITOR_PROMPT): Change definition into a proper string. start-sanitize-gm * configure configure.in: Add support for --enable-gm. (mips*-*-magic*): Change target from magic to idt. * eval.c expprint.c expression.h parse.c remote-mips.c utils.c: Change GENERAL_MAGIC_HACKS to GENERAL_MAGIC. * magic.c magic.h: Update files from GM. * config/mips/magic.mt: Delete. No longer necessary now that we use --enable mechanism. * config/mips/tm-idt.h: Add GM stuff needed for remote GM box. * config/mips/tm-irix5.h: Add GM stuff needed for native Irix box. * config/mips/tm-magic.h: Move up to config/tm-magic.h. Move all platform specific stuff into tm-irix.h and tm-idt.h. Add defs for TARGET_SYMFILE_POSTREAD and TARGET_CREATE_INFERIOR_HOOK. end-sanitize-gm
1995-11-04 19:02:42 +00:00
# start-sanitize-gm
ENABLE_GM=
AC_ARG_ENABLE(gm,
[ --enable-gm ],
[case "${enableval}" in
yes) ENABLE_OBS="${ENABLE_OBS} gmagic.o"
* Makefile.in (INTERNAL_CFLAGS): Add ENABLE_CFLAGS. * fork-child.c (fork_inferior): Add call to TARGET_CREATE_INFERIOR_HOOK to allow target specific code to get control just before the new process executes it's first instruction. * remote-mips.c (mips_initialize): Cleanup a bit. Don't try to receive a packet at first. This speeds up initialization a lot. Use TARGET_MONITOR_PROMPT instead of "<IDT>". (common_breakpoint): Use rresponse instead of rerrflg to inspect error code. * symfile.c (syms_from_objfile reread_symbols): Call TARGET_SYMFILE_POSTREAD to allow target specific code to get control after reading new symbols. * target.h: New macros TARGET_SYMFILE_POSTREAD, and TARGET_CREATE_INFERIOR_HOOK. See above for descriptions. * config/mips/{irix5.mh nm-irix5.h}: Delete nm-irix5.h. Make NAT_FILE point directly at ../nm-sysv4.h. * config/mips/{mipsm3.mh nm-m3.h}: Delete nm-m3.h. Make NAT_FILE point directly at ../nm-m3.h. * config/mips/{mipsv4.mh nm-sysv4.h}: Delete nm-sysv4.h. Make NAT_FILE point directly at ../nm-sysv4.h. * config/mips/nm-mips.h: Improve comment at top of file. * config/mips/tm-mips.h (TARGET_MONITOR_PROMPT): Change definition into a proper string. start-sanitize-gm * configure configure.in: Add support for --enable-gm. (mips*-*-magic*): Change target from magic to idt. * eval.c expprint.c expression.h parse.c remote-mips.c utils.c: Change GENERAL_MAGIC_HACKS to GENERAL_MAGIC. * magic.c magic.h: Update files from GM. * config/mips/magic.mt: Delete. No longer necessary now that we use --enable mechanism. * config/mips/tm-idt.h: Add GM stuff needed for remote GM box. * config/mips/tm-irix5.h: Add GM stuff needed for native Irix box. * config/mips/tm-magic.h: Move up to config/tm-magic.h. Move all platform specific stuff into tm-irix.h and tm-idt.h. Add defs for TARGET_SYMFILE_POSTREAD and TARGET_CREATE_INFERIOR_HOOK. end-sanitize-gm
1995-11-04 19:02:42 +00:00
ENABLE_CFLAGS=-DGENERAL_MAGIC
;;
no) ;;
*) AC_MSG_ERROR(bad value ${enableval} given for gm option) ;;
esac])
# end-sanitize-gm
AC_ARG_ENABLE(sim-powerpc,
[ --enable-sim-powerpc ],
[case "${enableval}" in
yes) powerpc_sim=yes ;;
no) powerpc_sim=no ;;
*) AC_MSG_ERROR(bad value ${enableval} given for sim-powerpc option) ;;
esac],[if test x"$GCC" != x""; then powerpc_sim=yes; else powerpc_sim=no; fi])
# start-sanitize-gdbtk
ENABLE_GDBTK=
AC_ARG_ENABLE(gdbtk,
[ --enable-gdbtk ],
[case "${enableval}" in
yes)
case "$host" in
*go32*)
AC_MSG_WARN([GDB does not support GDBtk on host ${host}. GDBtk will be disabled.])
enable_gdbtk=no ;;
* Makefile.in: Add mswin to SUBDIRS. Add rules for mswin/libwingdb.a and remote-wiggler.o. * breakpoint.c (breakpoint_here_p): Clean up bp enabled test. * (breakpoint_inserted_here_p): New func, just like breakpoint_here_p, except it's honest. Honestly. * breakpoint.h: Proto for above. start-sanitize-gdbtk * configure configure.in: Add host *windows* to list of hosts that don't support GDBtk. end-sanitize-gdbtk * configure configure.in: Add mswin to configdirs if host is i[3456]86-*-windows. * core-aout.c (fetch_core_registers register_addr) gdbcore.h: Change all vars that can contain addresses to type CORE_ADDR. * findvar.c (supply_register): Allow val to be NULL. This means that regno is unsupported. * (read_pc read_pc_pid write_pc write_pc_pid): Make non-pid forms just call pid forms with inferior_pid so that there's only once place to hack PC's and such. * infrun.c (proceed): Don't skip breakpoints if user changed PC. * remote-wiggler.c: New file. Support for BDM interface from Macraigor Systems. * serial.c: Enhance serial logging capability. Add hex and octal output modes (set remotelogbase {hex|octal|ascii}. Also log breaks, timeouts, errors, and eofs. * serial.h: Redefine SERIAL_SEND_BREAK to go through a wrapper function so that we can log breaks. Don't export serial_logfile or serial_logfp. * top.c (execute_command): Don't test for serial_logfp here. Just call serial_log_comand, and let serial.c sort it out. * valops.c (value_of_variable): Don't attempt to establish frames for static and global variables. This makes things work a bit better if the stack or frame pointer is trashed. * config/m68k/monitor.mt (TDEPFILES): Add remote-wiggler.o. * config/m68k/tm-m68k.h: Define STACK_ALIGN. CPU32 can't hack misaligned stacks during function calls.
1996-09-05 01:01:05 +00:00
*cygwin32* | *windows*)
AC_MSG_WARN([GDB does not support GDBtk on host ${host}. GDBtk will be disabled.])
enable_gdbtk=no ;;
*)
enable_gdbtk=yes ;;
esac ;;
no)
enable_gdbtk=no ;;
*)
AC_MSG_ERROR(bad value ${enableval} given for gdbtk option) ;;
esac],
[
# Default is on for everything but go32 and cygwin32
case "$host" in
* Makefile.in: Add mswin to SUBDIRS. Add rules for mswin/libwingdb.a and remote-wiggler.o. * breakpoint.c (breakpoint_here_p): Clean up bp enabled test. * (breakpoint_inserted_here_p): New func, just like breakpoint_here_p, except it's honest. Honestly. * breakpoint.h: Proto for above. start-sanitize-gdbtk * configure configure.in: Add host *windows* to list of hosts that don't support GDBtk. end-sanitize-gdbtk * configure configure.in: Add mswin to configdirs if host is i[3456]86-*-windows. * core-aout.c (fetch_core_registers register_addr) gdbcore.h: Change all vars that can contain addresses to type CORE_ADDR. * findvar.c (supply_register): Allow val to be NULL. This means that regno is unsupported. * (read_pc read_pc_pid write_pc write_pc_pid): Make non-pid forms just call pid forms with inferior_pid so that there's only once place to hack PC's and such. * infrun.c (proceed): Don't skip breakpoints if user changed PC. * remote-wiggler.c: New file. Support for BDM interface from Macraigor Systems. * serial.c: Enhance serial logging capability. Add hex and octal output modes (set remotelogbase {hex|octal|ascii}. Also log breaks, timeouts, errors, and eofs. * serial.h: Redefine SERIAL_SEND_BREAK to go through a wrapper function so that we can log breaks. Don't export serial_logfile or serial_logfp. * top.c (execute_command): Don't test for serial_logfp here. Just call serial_log_comand, and let serial.c sort it out. * valops.c (value_of_variable): Don't attempt to establish frames for static and global variables. This makes things work a bit better if the stack or frame pointer is trashed. * config/m68k/monitor.mt (TDEPFILES): Add remote-wiggler.o. * config/m68k/tm-m68k.h: Define STACK_ALIGN. CPU32 can't hack misaligned stacks during function calls.
1996-09-05 01:01:05 +00:00
*go32* | *cygwin32* | *windows*)
;;
*)
enable_gdbtk=yes ;;
esac
])
if test "${enable_gdbtk}" = "yes"; then
CY_AC_PATH_TCLCONFIG
if test -z "${no_tcl}"; then
CY_AC_LOAD_TCLCONFIG
CY_AC_PATH_TKCONFIG
# If $no_tk is nonempty, then we can't do Tk, and there is no
# point to doing Tcl.
if test -z "${no_tk}"; then
CY_AC_LOAD_TKCONFIG
CY_AC_PATH_TCLH
CY_AC_PATH_TKH
# Include some libraries that Tcl and Tk want.
LIBS="$LIBS $TK_LIBS"
ENABLE_GDBTK=1
TCL_LIBS='$(TCL) $(TK) $(X11_LDFLAGS) $(X11_LIBS)'
ENABLE_CLIBS="${ENABLE_CLIBS} ${TCL_LIBS}"
ENABLE_OBS="${ENABLE_OBS} gdbtk.o"
fi
fi
fi
AC_SUBST(ENABLE_GDBTK)
AC_SUBST(X_CFLAGS)
AC_SUBST(X_LDFLAGS)
AC_SUBST(X_LIBS)
# end-sanitize-gdbtk
AC_SUBST(ENABLE_CFLAGS)
AC_SUBST(ENABLE_CLIBS)
AC_SUBST(ENABLE_OBS)
# Begin stuff to support --enable-shared
AC_ARG_ENABLE(shared,
[ --enable-shared use shared libraries],
[case "${enableval}" in
yes) shared=true ;;
no) shared=false ;;
*) shared=true ;;
esac])dnl
HLDFLAGS=
HLDENV=
# If we have shared libraries, try to set rpath reasonably.
if test "${shared}" = "true"; then
case "${host}" in
*-*-hpux*)
HLDFLAGS='-Wl,+s,+b,$(libdir)'
;;
*-*-irix5* | *-*-irix6*)
HLDFLAGS='-Wl,-rpath,$(libdir)'
;;
*-*-linux*aout*)
;;
*-*-linux*)
HLDFLAGS='-Wl,-rpath,$(libdir)'
;;
*-*-solaris*)
HLDFLAGS='-R $(libdir)'
;;
*-*-sysv4*)
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;'
;;
esac
fi
# On SunOS, if the linker supports the -rpath option, use it to
# prevent ../bfd and ../opcodes from being included in the run time
# search path.
case "${host}" in
*-*-sunos*)
echo 'main () { }' > conftest.c
${CC} -o conftest -Wl,-rpath= conftest.c >/dev/null 2>conftest.t
if grep 'unrecognized' conftest.t >/dev/null 2>&1; then
:
elif grep 'No such file' conftest.t >/dev/null 2>&1; then
:
elif grep 'do not mix' conftest.t >/dev/null 2>&1; then
:
elif test "${shared}" = "true"; then
HLDFLAGS='-Wl,-rpath=$(libdir)'
else
HLDFLAGS='-Wl,-rpath='
fi
rm -f conftest.t conftest.c conftest
;;
esac
AC_SUBST(HLDFLAGS)
AC_SUBST(HLDENV)
# End stuff to support --enable-shared
# target_subdir is used by the testsuite to find the target libraries.
target_subdir=
if test "${host}" != "${target}"; then
target_subdir="${target_alias}/"
fi
AC_SUBST(target_subdir)
configdirs="doc testsuite"
dnl
changequote(,)dnl
. ${srcdir}/configure.host
* config/{a29k, arm, convex, gould, h8300, i386, i860, i960, m68k, m88k, mips, none, ns32k, pa, pyr, romp, rs6000, sparc, tahoe, vax, z8k}: New directories to hold cpu specific configuration files. Naming follows gcc convention. * config/{*.mt, *.mh}: All target and host makefile fragment config files moved to an appropriate config/<cpu> subdirectory. * nm-*, xm-*, tm-*: All native, host, and target files, which get linked to nm.h, xm.h, and tm.h respectively by configure, moved to appropriate config/<cpu> subdirectory. * nm-sysv4.h, xm-sysv4.h, tm-sysv4.h, tm-sunos.h, nm-trash.h: Native, host, and target files that are common across more than one cpu architecture and included by one of the configured native, host, or target files, get moved to config directory. * Makefile.in (INCLUDE_CFLAGS): Add -I${srcdir}/config to pick up native, host, or target include files moved to one of the config subdirectories, and that are included by other files. * Makefile.in (alldeps.mak): Modify to account for new config directory structure. * alldeps.mak, depend: Update for new config directory structure. * config/*/[ntx]m-*.h: Modify all files that include other [ntx]m-*.h files to use path relative to gdb/config. I.E. "a29k/tm-ultra3.h" includes "a29k/tm-29k.h" rather than just "tm-29k.h". * remote-eb.c (tm-29k.h): Include a29k/tm-29k.h. * mipsread.c (tm-mips.h): Include mips/tm-mips.h. * i860-pinsn.c (tm-i860.h): Include i860/tm-i860.h. * configure.in: Default gdb_host_cpu to host_cpu, and remap the ones where the default is not unique or different than the config subdirectory name. Similarly, handle gdb_target_cpu. Modify configure.in as appropriate to make use of gdb_host_cpu and gdb_target_cpu to find makefile fragments and make links.
1993-03-23 01:01:49 +00:00
. ${srcdir}/configure.tgt
1991-08-22 07:07:58 +00:00
dnl
changequote([,])dnl
frags=
host_makefile_frag=${srcdir}/config/${gdb_host_cpu}/${gdb_host}.mh
if test ! -f ${host_makefile_frag}; then
AC_MSG_ERROR("*** Gdb does not support host ${host}")
1991-05-19 00:16:46 +00:00
fi
frags="$frags $host_makefile_frag"
1991-05-19 00:16:46 +00:00
target_makefile_frag=${srcdir}/config/${gdb_target_cpu}/${gdb_target}.mt
if test ! -f ${target_makefile_frag}; then
AC_MSG_ERROR("*** Gdb does not support target ${target}")
1991-05-19 00:16:46 +00:00
fi
frags="$frags $target_makefile_frag"
1991-05-19 00:16:46 +00:00
AC_SUBST_FILE(host_makefile_frag)
AC_SUBST_FILE(target_makefile_frag)
AC_SUBST(frags)
changequote(,)dnl
hostfile=`sed -n '
s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
' ${host_makefile_frag}`
targetfile=`sed -n '
s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
' ${target_makefile_frag}`
# these really aren't orthogonal true/false values of the same condition,
# but shells are slow enough that I like to reuse the test conditions
# whenever possible
if test "${target}" = "${host}"; then
nativefile=`sed -n '
s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p
' ${host_makefile_frag}`
else
# GDBserver is only useful in a "native" enviroment
configdirs=`echo $configdirs | sed 's/gdbserver//'`
fi
changequote([,])
# If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile
# (NAT_FILE) is not set in config/*/*.m[ht] files, we don't make the
# corresponding links. But we have to remove the xm.h files and tm.h
# files anyway, e.g. when switching from "configure host" to
# "configure none".
files=
links=
1991-07-31 00:34:07 +00:00
rm -f xm.h
if test "${hostfile}" != ""; then
files="${files} config/${gdb_host_cpu}/${hostfile}"
links="${links} xm.h"
fi
1991-07-31 00:34:07 +00:00
rm -f tm.h
if test "${targetfile}" != ""; then
files="${files} config/${gdb_target_cpu}/${targetfile}"
links="${links} tm.h"
fi
* config/{a29k, arm, convex, gould, h8300, i386, i860, i960, m68k, m88k, mips, none, ns32k, pa, pyr, romp, rs6000, sparc, tahoe, vax, z8k}: New directories to hold cpu specific configuration files. Naming follows gcc convention. * config/{*.mt, *.mh}: All target and host makefile fragment config files moved to an appropriate config/<cpu> subdirectory. * nm-*, xm-*, tm-*: All native, host, and target files, which get linked to nm.h, xm.h, and tm.h respectively by configure, moved to appropriate config/<cpu> subdirectory. * nm-sysv4.h, xm-sysv4.h, tm-sysv4.h, tm-sunos.h, nm-trash.h: Native, host, and target files that are common across more than one cpu architecture and included by one of the configured native, host, or target files, get moved to config directory. * Makefile.in (INCLUDE_CFLAGS): Add -I${srcdir}/config to pick up native, host, or target include files moved to one of the config subdirectories, and that are included by other files. * Makefile.in (alldeps.mak): Modify to account for new config directory structure. * alldeps.mak, depend: Update for new config directory structure. * config/*/[ntx]m-*.h: Modify all files that include other [ntx]m-*.h files to use path relative to gdb/config. I.E. "a29k/tm-ultra3.h" includes "a29k/tm-29k.h" rather than just "tm-29k.h". * remote-eb.c (tm-29k.h): Include a29k/tm-29k.h. * mipsread.c (tm-mips.h): Include mips/tm-mips.h. * i860-pinsn.c (tm-i860.h): Include i860/tm-i860.h. * configure.in: Default gdb_host_cpu to host_cpu, and remap the ones where the default is not unique or different than the config subdirectory name. Similarly, handle gdb_target_cpu. Modify configure.in as appropriate to make use of gdb_host_cpu and gdb_target_cpu to find makefile fragments and make links.
1993-03-23 01:01:49 +00:00
rm -f nm.h
if test "${nativefile}" != ""; then
files="${files} config/${gdb_host_cpu}/${nativefile}"
links="${links} nm.h"
else
# A cross-only configuration.
files="${files} config/nm-empty.h"
links="${links} nm.h"
fi
# start-sanitize-gdbtk
1991-05-19 00:16:46 +00:00
# Make it possible to use the GUI without doing a full install
if test "${enable_gdbtk}" = "yes" -a ! -f gdbtk.tcl ; then
files="${files} gdbtk.tcl"
links="${links} gdbtk.tcl"
fi
# end-sanitize-gdbtk
AC_LINK_FILES($files, $links)
AC_CONFIG_SUBDIRS($configdirs)
AC_OUTPUT(Makefile,
[
dnl Autoconf doesn't provide a mechanism for modifying definitions
dnl provided by makefile fragments.
dnl
if test "${nativefile}" = ""; then
sed -e '/^NATDEPFILES[[ ]]*=[[ ]]*/s//# NATDEPFILES=/' \
< Makefile > Makefile.tem
mv -f Makefile.tem Makefile
fi
changequote(,)dnl
sed -e '/^TM_FILE[ ]*=/s,^TM_FILE[ ]*=[ ]*,&config/'"${gdb_target_cpu}"'/,
/^XM_FILE[ ]*=/s,^XM_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,
/^NAT_FILE[ ]*=/s,^NAT_FILE[ ]*=[ ]*,&config/'"${gdb_host_cpu}"'/,' <Makefile >Makefile.tmp
mv -f Makefile.tmp Makefile
changequote([,])dnl
case ${srcdir} in
.)
;;
*)
grep "source ${srcdir}/.gdbinit" .gdbinit >/dev/null 2>/dev/null || \
echo "source ${srcdir}/.gdbinit" >> .gdbinit
esac
case x$CONFIG_HEADERS in
xconfig.h:config.in)
echo > stamp-h ;;
esac
],
[
gdb_host_cpu=$gdb_host_cpu
gdb_target_cpu=$gdb_target_cpu
nativefile=$nativefile
])
exit 0