diff options
author | Jim Kingdon <jkingdon@engr.sgi.com> | 2000-02-13 01:06:58 +0000 |
---|---|---|
committer | Jim Kingdon <jkingdon@engr.sgi.com> | 2000-02-13 01:06:58 +0000 |
commit | d6e9fb0513bda136112dbed6a19d39b41e70ed47 (patch) | |
tree | e4434b156e0eb80d788d439d36d4fe79db44573a /gdb/gdbserver/configure.in | |
parent | 41c8e0096baad3729ace2e98acccb93af4cee668 (diff) | |
download | gdb-d6e9fb0513bda136112dbed6a19d39b41e70ed47.zip gdb-d6e9fb0513bda136112dbed6a19d39b41e70ed47.tar.gz gdb-d6e9fb0513bda136112dbed6a19d39b41e70ed47.tar.bz2 |
2000-02-10 J.T. Conklin <jtc@redback.com>
* config/i386/nbsd.mt (GDBSERVER_DEPFILES): Add low-nbsd.o
* configure.tgt (i[3456]86-*-netbsd*): add gdbserver to
configdirs.
* gdbserver/low-nbsd.c: New file.
* gdbserver/Makefile.in: convert to autoconf.
* gdbserver/configure.in: likewise.
* gdbserver/configure: generate.
Diffstat (limited to 'gdb/gdbserver/configure.in')
-rw-r--r-- | gdb/gdbserver/configure.in | 123 |
1 files changed, 59 insertions, 64 deletions
diff --git a/gdb/gdbserver/configure.in b/gdb/gdbserver/configure.in index 1bbb73c..856ae62 100644 --- a/gdb/gdbserver/configure.in +++ b/gdb/gdbserver/configure.in @@ -1,46 +1,65 @@ -srcname="Remote GDB server" -srctrigger=server.c -gdb_serial_driver=../ser-unix.c - -# per-host: +dnl Autoconf configure script for GDB server. +dnl Copyright 2000 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 +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_INIT(server.c) + +AC_CANONICAL_SYSTEM +AC_PROG_INSTALL . ${srcdir}/../configure.host -echo "gdbserver/configure.in: host is $host, target is $target" - -if [ ! -f ${srcdir}/../config/${gdb_host_cpu}/${gdb_host}.mh ]; then - echo '***' "GDB remote does not support host ${host}" 1>&2 - exit 1 -fi - -# We really shouldn't depend on there being a space after XM_FILE= ... -hostfile=`awk '$1 == "XM_FILE=" { print $2 }' <${srcdir}/../config/${gdb_host_cpu}/${gdb_host}.mh` - -# per-target: - . ${srcdir}/../configure.tgt -echo "gdbserver/configure.in: host_cpu is $host_cpu, target_cpu is $target_cpu" - -if [ ! -f ${srcdir}/../config/${gdb_target_cpu}/${gdb_target}.mt ]; then - echo '***' "GDB remote does not support target ${target}" 1>&2 - exit 1 +frags= +host_makefile_frag=${srcdir}/../config/${gdb_host_cpu}/${gdb_host}.mh +if test ! -f ${host_makefile_frag}; then + AC_MSG_ERROR("*** GDB remote does not support host ${host}") fi +frags="$frags $host_makefile_frag" -if [ -z "${removing}" ] ; then - cat ${srcdir}/../config/${gdb_host_cpu}/${gdb_host}.mh ${srcdir}/../config/${gdb_target_cpu}/${gdb_target}.mt | awk '$1 == "#msg" { - print substr($0,6)}' +target_makefile_frag=${srcdir}/../config/${gdb_target_cpu}/${gdb_target}.mt +if test ! -f ${target_makefile_frag}; then + AC_MSG_ERROR("*** GDB remote does not support target ${target}") fi +frags="$frags $target_makefile_frag" -# We really shouldn't depend on there being a space after TM_FILE= ... -targetfile=`awk '$1 == "TM_FILE=" { print $2 }' <${srcdir}/../config/${gdb_target_cpu}/${gdb_target}.mt` +AC_SUBST_FILE(host_makefile_frag) +AC_SUBST_FILE(target_makefile_frag) +AC_SUBST(frags) -if [ "${target}" = "${host}" ] ; then - nativefile=`awk '$1 == "NAT_FILE=" { print $2 }' <${srcdir}/../config/${gdb_host_cpu}/${gdb_host}.mh` -fi +changequote(,)dnl +hostfile=`sed -n ' +s/XM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p +' ${host_makefile_frag}` -host_makefile_frag=../config/${gdb_host_cpu}/${gdb_host}.mh -target_makefile_frag=../config/${gdb_target_cpu}/${gdb_target}.mt +targetfile=`sed -n ' +s/TM_FILE[ ]*=[ ]*\([^ ]*\)/\1/p +' ${target_makefile_frag}` + +if test "${target}" = "${host}"; then +nativefile=`sed -n ' +s/NAT_FILE[ ]*=[ ]*\([^ ]*\)/\1/p +' ${host_makefile_frag}` +fi +changequote([,])dnl # If hostfile (XM_FILE) and/or targetfile (TM_FILE) and/or nativefile # (NAT_FILE) is not set in the ?config/* file, we don't make the @@ -52,33 +71,18 @@ files= links= rm -f xm.h rm -f ser-hardwire.c -if [ "${hostfile}" != "" ]; then - if [ -f ${srcdir}/../config/${hostfile} ]; then - files="${files} ../config/${hostfile}" - else - files="${files} ../config/${gdb_host_cpu}/${hostfile}" - fi +if test "${hostfile}" != ""; then + files="${files} ../config/${gdb_host_cpu}/${hostfile}" links="${links} xm.h" - -# files="${files} ${gdb_serial_driver}" -# links="${links} ser-hardwire.c" fi rm -f tm.h -if [ "${targetfile}" != "" ]; then - if [ -f ${srcdir}/../config/${targetfile} ]; then - files="${files} ../config/${targetfile}" - else - files="${files} ../config/${gdb_target_cpu}/${targetfile}" - fi +if test "${targetfile}" != ""; then + files="${files} ../config/${gdb_target_cpu}/${targetfile}" links="${links} tm.h" fi rm -f nm.h -if [ "${nativefile}" != "" ]; then - if [ -f ${srcdir}/../config/${nativefile} ]; then - files="${files} ../config/${nativefile}" - else - files="${files} ../config/${gdb_host_cpu}/${nativefile}" - fi +if test "${nativefile}" != ""; then + files="${files} ../config/${gdb_host_cpu}/${nativefile}" links="${links} nm.h" # temporary scaffolding until all hosts have the host/target/native # split in place. @@ -86,15 +90,6 @@ else files="${files} ../config/nm-empty.h" links="${links} nm.h" fi +AC_LINK_FILES($files, $links) -if [ ${target_cpu} = "sparclite" ]; then - configdirs="${configdirs} sparclite" -fi - -# post-target: - -if [ "${nativefile}" = "" ] ; then - sed -e '/^NATDEPFILES= /s//# NATDEPFILES= /' \ - < Makefile > Makefile.tem - mv -f Makefile.tem Makefile -fi +AC_OUTPUT(Makefile) |