2000-03-19 11:53:24 +00:00
|
|
|
#!/bin/sh
|
* config/djgpp/djconfig.sh: Add copyright notice.
* ser-go32.c (rawclock): Remove prototype; include time.h instead.
(ISR, dos_hookirq, isr_t): Convert K&R definition to ANSI C.
(top level) <string.h>: Include gdb_string.h instead.
(dos_noop, dos_raw, dos_noflush_set_tty_state)
(dos_print_tty_state, dos_info): Remove ATTRIBUTE_UNUSED.
* go32-nat.c (go32_create_inferior): Move the declaration of
`environ' to here from the top level.
(top level) <_initialize_go32_nat>: Remove redundant prototype.
<gdb_string.h>: Include it instead of string.h.
(store_register): Call register_buffer instead of accessing
registers[] directly.
(redir_cmdline_delete, redir_cmdline_parse, redir_to_debugger)
(redir_to_debugger, redir_debug_init) [__DJGPP_MINOR__ < 3]: Put
the function names at the start of the line.
(go32_set_dr): Throw internal_error if the argument is not a valid
debug register number.
(go32_open, go32_close, go32_attach, go32_detach, go32_resume)
(go32_wait, go32_xfer_memory, go32_files_info)
(go32_terminal_info): Remove ATTRIBUTE_UNUSED.
2001-03-26 11:26:45 +00:00
|
|
|
#
|
2000-03-19 11:53:24 +00:00
|
|
|
# This shell script is a wrapper to the main configure script when
|
|
|
|
# configuring GDB for DJGPP. 99% of it can also be used when
|
|
|
|
# configuring other GNU programs for DJGPP.
|
|
|
|
#
|
* config/djgpp/djconfig.sh: Add copyright notice.
* ser-go32.c (rawclock): Remove prototype; include time.h instead.
(ISR, dos_hookirq, isr_t): Convert K&R definition to ANSI C.
(top level) <string.h>: Include gdb_string.h instead.
(dos_noop, dos_raw, dos_noflush_set_tty_state)
(dos_print_tty_state, dos_info): Remove ATTRIBUTE_UNUSED.
* go32-nat.c (go32_create_inferior): Move the declaration of
`environ' to here from the top level.
(top level) <_initialize_go32_nat>: Remove redundant prototype.
<gdb_string.h>: Include it instead of string.h.
(store_register): Call register_buffer instead of accessing
registers[] directly.
(redir_cmdline_delete, redir_cmdline_parse, redir_to_debugger)
(redir_to_debugger, redir_debug_init) [__DJGPP_MINOR__ < 3]: Put
the function names at the start of the line.
(go32_set_dr): Throw internal_error if the argument is not a valid
debug register number.
(go32_open, go32_close, go32_attach, go32_detach, go32_resume)
(go32_wait, go32_xfer_memory, go32_files_info)
(go32_terminal_info): Remove ATTRIBUTE_UNUSED.
2001-03-26 11:26:45 +00:00
|
|
|
#=====================================================================
|
2005-05-12 08:42:12 +00:00
|
|
|
# Copyright 1997,1999,2000,2001,2002,2003,2005 Free Software Foundation, Inc.
|
* config/djgpp/djconfig.sh: Add copyright notice.
* ser-go32.c (rawclock): Remove prototype; include time.h instead.
(ISR, dos_hookirq, isr_t): Convert K&R definition to ANSI C.
(top level) <string.h>: Include gdb_string.h instead.
(dos_noop, dos_raw, dos_noflush_set_tty_state)
(dos_print_tty_state, dos_info): Remove ATTRIBUTE_UNUSED.
* go32-nat.c (go32_create_inferior): Move the declaration of
`environ' to here from the top level.
(top level) <_initialize_go32_nat>: Remove redundant prototype.
<gdb_string.h>: Include it instead of string.h.
(store_register): Call register_buffer instead of accessing
registers[] directly.
(redir_cmdline_delete, redir_cmdline_parse, redir_to_debugger)
(redir_to_debugger, redir_debug_init) [__DJGPP_MINOR__ < 3]: Put
the function names at the start of the line.
(go32_set_dr): Throw internal_error if the argument is not a valid
debug register number.
(go32_open, go32_close, go32_attach, go32_detach, go32_resume)
(go32_wait, go32_xfer_memory, go32_files_info)
(go32_terminal_info): Remove ATTRIBUTE_UNUSED.
2001-03-26 11:26:45 +00:00
|
|
|
#
|
2000-03-19 11:53:24 +00:00
|
|
|
# Originally written by Robert Hoehne, revised by Eli Zaretskii.
|
* config/djgpp/djconfig.sh: Add copyright notice.
* ser-go32.c (rawclock): Remove prototype; include time.h instead.
(ISR, dos_hookirq, isr_t): Convert K&R definition to ANSI C.
(top level) <string.h>: Include gdb_string.h instead.
(dos_noop, dos_raw, dos_noflush_set_tty_state)
(dos_print_tty_state, dos_info): Remove ATTRIBUTE_UNUSED.
* go32-nat.c (go32_create_inferior): Move the declaration of
`environ' to here from the top level.
(top level) <_initialize_go32_nat>: Remove redundant prototype.
<gdb_string.h>: Include it instead of string.h.
(store_register): Call register_buffer instead of accessing
registers[] directly.
(redir_cmdline_delete, redir_cmdline_parse, redir_to_debugger)
(redir_to_debugger, redir_debug_init) [__DJGPP_MINOR__ < 3]: Put
the function names at the start of the line.
(go32_set_dr): Throw internal_error if the argument is not a valid
debug register number.
(go32_open, go32_close, go32_attach, go32_detach, go32_resume)
(go32_wait, go32_xfer_memory, go32_files_info)
(go32_terminal_info): Remove ATTRIBUTE_UNUSED.
2001-03-26 11:26:45 +00:00
|
|
|
# This file is part of GDB.
|
|
|
|
#
|
|
|
|
# This program is free software; you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation; either version 2 of the License, or
|
|
|
|
# (at your option) any later version.
|
2000-03-19 11:53:24 +00:00
|
|
|
#
|
* config/djgpp/djconfig.sh: Add copyright notice.
* ser-go32.c (rawclock): Remove prototype; include time.h instead.
(ISR, dos_hookirq, isr_t): Convert K&R definition to ANSI C.
(top level) <string.h>: Include gdb_string.h instead.
(dos_noop, dos_raw, dos_noflush_set_tty_state)
(dos_print_tty_state, dos_info): Remove ATTRIBUTE_UNUSED.
* go32-nat.c (go32_create_inferior): Move the declaration of
`environ' to here from the top level.
(top level) <_initialize_go32_nat>: Remove redundant prototype.
<gdb_string.h>: Include it instead of string.h.
(store_register): Call register_buffer instead of accessing
registers[] directly.
(redir_cmdline_delete, redir_cmdline_parse, redir_to_debugger)
(redir_to_debugger, redir_debug_init) [__DJGPP_MINOR__ < 3]: Put
the function names at the start of the line.
(go32_set_dr): Throw internal_error if the argument is not a valid
debug register number.
(go32_open, go32_close, go32_attach, go32_detach, go32_resume)
(go32_wait, go32_xfer_memory, go32_files_info)
(go32_terminal_info): Remove ATTRIBUTE_UNUSED.
2001-03-26 11:26:45 +00:00
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program; if not, write to the Free Software
|
|
|
|
# Foundation, Inc., 59 Temple Place - Suite 330,
|
|
|
|
# Boston, MA 02111-1307, USA. */
|
|
|
|
#=====================================================================
|
|
|
|
#
|
|
|
|
# Call this script like the main configure script with one exception. If you
|
2000-03-19 11:53:24 +00:00
|
|
|
# want to pass parameters to configure, you have to pass as the first
|
|
|
|
# argument the srcdir, even when it is `.' !!!!!
|
* config/djgpp/djconfig.sh: Add copyright notice.
* ser-go32.c (rawclock): Remove prototype; include time.h instead.
(ISR, dos_hookirq, isr_t): Convert K&R definition to ANSI C.
(top level) <string.h>: Include gdb_string.h instead.
(dos_noop, dos_raw, dos_noflush_set_tty_state)
(dos_print_tty_state, dos_info): Remove ATTRIBUTE_UNUSED.
* go32-nat.c (go32_create_inferior): Move the declaration of
`environ' to here from the top level.
(top level) <_initialize_go32_nat>: Remove redundant prototype.
<gdb_string.h>: Include it instead of string.h.
(store_register): Call register_buffer instead of accessing
registers[] directly.
(redir_cmdline_delete, redir_cmdline_parse, redir_to_debugger)
(redir_to_debugger, redir_debug_init) [__DJGPP_MINOR__ < 3]: Put
the function names at the start of the line.
(go32_set_dr): Throw internal_error if the argument is not a valid
debug register number.
(go32_open, go32_close, go32_attach, go32_detach, go32_resume)
(go32_wait, go32_xfer_memory, go32_files_info)
(go32_terminal_info): Remove ATTRIBUTE_UNUSED.
2001-03-26 11:26:45 +00:00
|
|
|
#
|
2001-07-29 10:12:49 +00:00
|
|
|
# First, undo any CDPATH settings; they will get in our way when we
|
|
|
|
# chdir to directories.
|
|
|
|
unset CDPATH
|
|
|
|
|
2000-03-19 11:53:24 +00:00
|
|
|
# Where are the sources? If you are used to having the sources
|
|
|
|
# in a separate directory and the objects in another, then set
|
|
|
|
# here the full path to the source directory and run this script
|
|
|
|
# in the directory where you want to build gdb!!
|
|
|
|
# You might give the source directory on commandline, but use
|
|
|
|
# then only forward slashes (/) in the directories. It should be
|
|
|
|
# an absolute path.
|
|
|
|
|
|
|
|
if [ x$1 = x ]; then
|
|
|
|
srcdir=`pwd`
|
|
|
|
else
|
|
|
|
srcdir=`cd $1 && pwd`
|
|
|
|
shift
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Make sure they don't have some file names mangled by untarring.
|
|
|
|
echo -n "Checking the unpacked distribution..."
|
2004-11-13 13:36:53 +00:00
|
|
|
if ( ! test -f ${srcdir}/bfd/ChangeLog.0203 || \
|
|
|
|
! test -f ${srcdir}/gdb/ChangeLog.002 || \
|
|
|
|
! test -f ${srcdir}/opcodes/ChangeLog.0203 || \
|
2000-03-19 11:53:24 +00:00
|
|
|
! test -f ${srcdir}/readline/config.h-in ) ; then
|
2004-11-13 13:36:53 +00:00
|
|
|
if ( ! test -f ${srcdir}/bfd/ChangeLog.0203 ) ; then
|
|
|
|
notfound=${srcdir}/bfd/ChangeLog.0203
|
2003-12-29 07:35:35 +00:00
|
|
|
else
|
2004-11-13 13:36:53 +00:00
|
|
|
if ( ! test -f ${srcdir}/gdb/ChangeLog.002) ; then
|
2003-12-29 07:35:35 +00:00
|
|
|
notfound=${srcdir}/gdb/ChangeLog.002
|
|
|
|
else
|
|
|
|
if ( ! test -f ${srcdir}/readline/config.h-in ) ; then
|
|
|
|
notfound=${srcdir}/readline/config.h-in
|
2004-11-13 13:36:53 +00:00
|
|
|
else
|
|
|
|
if ( ! test -f ${srcdir}/opcodes/ChangeLog.0203 ) ; then
|
|
|
|
notfound=${srcdir}/opcodes/ChangeLog.0203
|
|
|
|
fi
|
2003-12-29 07:35:35 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
fi
|
2000-03-19 11:53:24 +00:00
|
|
|
echo " FAILED."
|
2003-12-29 07:35:35 +00:00
|
|
|
echo "(File $notfound was not found.)"
|
2000-03-19 11:53:24 +00:00
|
|
|
echo ""
|
|
|
|
echo "You MUST unpack the sources with the DJTAR command, like this:"
|
|
|
|
echo ""
|
|
|
|
echo " djtar -x -n fnchange.lst gdb-X.YZ.tar.gz"
|
|
|
|
echo ""
|
|
|
|
echo "where X.YZ is the GDB version, and fnchange.lst can be found"
|
|
|
|
echo "in the gdb/config/djgpp/ directory in the GDB distribution."
|
2003-12-29 07:35:35 +00:00
|
|
|
echo ""
|
2000-03-19 11:53:24 +00:00
|
|
|
echo "configure FAILED!"
|
|
|
|
exit 1
|
|
|
|
else
|
|
|
|
echo " ok."
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Where is the directory with DJGPP-specific scripts?
|
|
|
|
DJGPPDIR=${srcdir}/gdb/config/djgpp
|
|
|
|
|
|
|
|
echo "Editing configure scripts for DJGPP..."
|
|
|
|
TMPFILE="${TMPDIR-.}/cfg.tmp"
|
|
|
|
|
|
|
|
# We need to skip the build directory if it is a subdirectory of $srcdir,
|
|
|
|
# otherwise we will have an infinite recursion on our hands...
|
|
|
|
if test "`pwd`" == "${srcdir}" ; then
|
|
|
|
SKIPDIR=""
|
|
|
|
SKIPFILES=""
|
|
|
|
else
|
|
|
|
SKIPDIR=`pwd | sed -e "s|${srcdir}|.|"`
|
|
|
|
SKIPFILES="${SKIPDIR}/*"
|
|
|
|
fi
|
2001-02-04 07:52:33 +00:00
|
|
|
|
|
|
|
# We use explicit /dev/env/DJDIR/bin/find to avoid catching
|
|
|
|
# an incompatible DOS/Windows version that might be on their PATH.
|
2000-03-19 11:53:24 +00:00
|
|
|
for fix_dir in \
|
2001-02-04 07:52:33 +00:00
|
|
|
`cd $srcdir && /dev/env/DJDIR/bin/find . -type d ! -ipath "${SKIPDIR}" ! -ipath "${SKIPFILES}"`
|
2000-03-19 11:53:24 +00:00
|
|
|
do
|
|
|
|
if test ! -f ${fix_dir}/configure.orig ; then
|
|
|
|
if test -f ${srcdir}/${fix_dir}/configure ; then
|
|
|
|
mkdir -p ${fix_dir}
|
|
|
|
cp -p ${srcdir}/${fix_dir}/configure ${fix_dir}/configure.orig
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
if test -f ${fix_dir}/configure.orig ; then
|
|
|
|
sed -f ${DJGPPDIR}/config.sed ${fix_dir}/configure.orig > $TMPFILE
|
|
|
|
update $TMPFILE ${fix_dir}/configure
|
|
|
|
touch ./${fix_dir}/configure -r ${fix_dir}/configure.orig
|
|
|
|
rm -f $TMPFILE
|
|
|
|
fi
|
|
|
|
if test -f ${fix_dir}/INSTALL ; then
|
|
|
|
mv ${fix_dir}/INSTALL ${fix_dir}/INSTALL.txt
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
# Now set the config shell. It is really needed, that the shell
|
|
|
|
# points to a shell with full path and also it must conatain the
|
|
|
|
# .exe suffix. I assume here, that bash is installed. If not,
|
|
|
|
# install it. Additionally, the pathname must not contain a
|
|
|
|
# drive letter, so use the /dev/x/foo format supported by versions
|
|
|
|
# of Bash 2.03 and later, and by all DJGPP programs compiled with
|
|
|
|
# v2.03 (or later) library.
|
|
|
|
export CONFIG_SHELL=/dev/env/DJDIR/bin/sh.exe
|
|
|
|
|
|
|
|
# force to have the ltmain.sh script to be in DOS text format,
|
|
|
|
# otherwise the resulting ltconfig script will have mixed
|
|
|
|
# (UNIX/DOS) format and is unusable with Bash ports before v2.03.
|
|
|
|
utod $srcdir/ltmain.sh
|
|
|
|
|
|
|
|
# Give the configure script some hints:
|
|
|
|
export LD=ld
|
2002-02-25 16:09:46 +00:00
|
|
|
export NM=nm
|
2000-03-19 11:53:24 +00:00
|
|
|
export CC=gcc
|
2002-02-25 16:09:46 +00:00
|
|
|
export CFLAGS="-O2 -g"
|
2000-03-19 11:53:24 +00:00
|
|
|
export RANLIB=ranlib
|
|
|
|
export DEFAULT_YACC="bison -y"
|
|
|
|
export YACC="bison -y"
|
|
|
|
export DEFAULT_LEX=flex
|
|
|
|
# Define explicitly the .exe extension because on W95 with LFN=y
|
|
|
|
# the check might fail
|
|
|
|
export am_cv_exeext=.exe
|
2001-06-04 07:29:00 +00:00
|
|
|
# ltconfig wants to compute the maximum command-line length, but
|
|
|
|
# Bash 2.04 doesn't like that (it doesn't have any limit ;-), and
|
|
|
|
# reboots the system. We know our limit in advance, so we don't
|
|
|
|
# need all that crap. Assuming that the environment size is less
|
|
|
|
# than 4KB, we can afford 12KB of command-line arguments.
|
|
|
|
export lt_cv_sys_max_cmd_len=12288
|
2000-03-19 11:53:24 +00:00
|
|
|
|
|
|
|
# The configure script needs to see the `install-sh' script, otherwise
|
|
|
|
# it decides the source installation is broken. But "make install" will
|
|
|
|
# fail on 8+3 filesystems if it finds a file `install-', since there
|
|
|
|
# are numerous "install-foo" targets in Makefile's. So we rename the
|
|
|
|
# offending file after the configure step is done.
|
|
|
|
if test ! -f ${srcdir}/install-sh ; then
|
|
|
|
if test -f ${srcdir}/install-.sh ; then
|
|
|
|
mv ${srcdir}/install-.sh ${srcdir}/install-sh
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Now run the configure script while disabling some things like the NLS
|
|
|
|
# support, which is nearly impossible to be supported in the current way,
|
|
|
|
# since it relies on file names which will never work on DOS.
|
|
|
|
echo "Running the configure script..."
|
|
|
|
$srcdir/configure --srcdir="$srcdir" --prefix='${DJDIR}' \
|
2000-05-08 15:06:27 +00:00
|
|
|
--disable-shared --disable-nls --verbose --enable-build-warnings=\
|
2005-05-12 08:42:12 +00:00
|
|
|
-Wimplicit,-Wcomment,-Wformat,-Wparentheses,-Wpointer-arith,-Wuninitialized $*
|
2000-03-19 11:53:24 +00:00
|
|
|
|
|
|
|
if test -f ${srcdir}/install- ; then
|
|
|
|
mv ${srcdir}/install- ${srcdir}/install-.sh
|
|
|
|
fi
|