#  This script only works in the ./djgpp directory.

export HOME=.
export ac_cv_func_fork=no
export ac_cv_func_mkfifo=no
export ac_cv_func_mknod=no
export ac_cv_func_mmap=no
export ac_cv_func_pipe=no
export ac_cv_func_vfork=no

cat > script.sed << EOF
# We have an emulation of nl_langinfo in go32-nat.c that supports CODESET.
/^for ac_var in \\\$ac_precious_vars; do/i\\
am_cv_langinfo_codeset=yes\\
bash_cv_langinfo_codeset=yes\\
ac_cv_header_nl_types_h=yes
EOF

if test ! -f ../gdb/configure.orig; then
  cp -vf ../gdb/configure ../gdb/configure.orig
  touch ../gdb/configure.orig -r ../gdb/configure
fi
sed -f ./script.sed ../gdb/configure.orig > ./configure
update ./configure ../gdb/configure
touch ../gdb/configure -r ../gdb/configure.orig
rm -f ./configure ./script.sed

# configuring the TUI support version.
 ../configure  --disable-dependency-tracking --disable-nls --with-mpc --with-mpfr --with-gmp --with-curses --enable-tui

# configuring without TUI support.
# ../configure  --disable-dependency-tracking --disable-nls --with-mpc --with-mpfr --with-gmp --without-curses --disable-tui

make
