# DJGPP specific configuration file.
# Sed script for additional DJGPP specific editing
# of the configure script generated by autoconf 2.69.














# Additional editing of Makefiles
/^eval sed.*ac_file_inputs.*tmp\/subs.awk.*\\$/ {
:loop
n
/^$/!b loop
a\
cat > "$ac_tmp/subs-djgpp.sed" << eof_djgpp\
# DJGPP specific Makefile changes.\
s,\\.deps,_deps,g\
s,\\.libs,_libs,g\
s,\\.new\\.,_new.,g\
s,\\.old\\.,_old.,g\
s,\\.tab\\.,_tab.,g\
s,config\\.h\\.in,config.h-in,g\
s,Makefile\\.am\\.in,Makefile.am-in,g\
s,Makefile\\.in\\.in,Makefile.in-in,g\
/^install-info-am:/,/^$/ {\
  /@list=.\\\$(INFO_DEPS)\[^ \]/s,DEPS),& marst.i,\
  s,\\(\\\$\\\$d/\\\$\\\$file-\\[0-9\\]\\[0-9\\]\\)\\(\[^ \]\\),\\1 \\$\\$d/\\$\\$file[0-9] \\$\\$d/\\$\\$file[0-9][0-9]\\2,\
  s,\\( \\\$\\\$file-\\[0-9\\]\\[0-9\\]\\)\\(\[^ \]\\),\\1 \\$\\$file[0-9] \\$\\$file[0-9][0-9]\\2,\
}\
/^uninstall-info-am:/,/^$/ {\
  /@list=.\\\$(INFO_DEPS)\[^ \]/s,DEPS),& marst.i,\
  s,\\(file-\\[0-9\\]\\[0-9\\]\\)\\(\[^ \]\\),\\1 \\$\\$file[0-9] \\$\\$file[0-9][0-9]\\2,\
}\
/^\\([a-z]*\\.[1-9][ 	]*\\)*: Makefile\\.am/,/^$/ {\
  /\\.so[ 	]*man/ s/man/cat/\
}\
s,c++defs\\.h,cxxdefs.h,g\
/^TESTS_ENVIRONMENT[ 	]*=/ a\\\\\
  PATH_SEPARATOR=:; export PATH_SEPARATOR; \\\\\\\\\
/^check:/,/^$/ {\
  s,examples,\\$(srcdir)/&,g\
  s,-I.,-I\\$(srcdir),\
}\
eof_djgpp\
sed -f "\$ac_tmp/subs-djgpp.sed" \$ac_tmp/out > \$ac_tmp/out.djgpp\
mv -f \$ac_tmp/out.djgpp \$ac_tmp/out
}


# autocong.h.in and config.h.in are renamed to autocong.h-in and config.h-in.
/ac_config_headers=/,/^$/ {
  /config\.h:/! {
    s| \([A-Za-z0-9_/-]*\)config\.h|&:\1config.h-in|
    s| config\.h|&:config.h-in|
  }
  /autoconf\.h:/! {
    s| \([A-Za-z0-9_/-]*\)autoconf\.h|&:\1autoconf.h-in|
    s| autoconf\.h|&:autoconf.h-in|
  }
}
/CONFIG_HEADERS=/ {
  /config\.h:/! {
    s| \([A-Za-z0-9_/-]*\)config\.h|&:\1config.h-in|
    s| config\.h|&:config.h-in|
  }
  /autoconf\.h:/! {
    s| \([A-Za-z0-9_/-]*\)autoconf\.h|&:\1autoconf.h-in|
    s| autoconf\.h|&:autoconf.h-in|
  }
}

# Makefile.in.in is renamed to Makefile.in-in.
/ac_config_files=/,/_ACEOF/ {
  s|po/Makefile\.in|&:po/Makefile.in-in|
}
/CONFIG_FILES=/ s|po/Makefile\.in|&:po/Makefile.in-in|2


# We always use _deps and _libs instead of .deps and .libs, because
# the latter is an invalid name on 8+3 MS-DOS filesystem.  This makes
# the generated Makefiles good for every DJGPP installation, not only
# the one where the package was configured (which could happen to be
# a Windows box, where leading dots in file names are allowed).
s,\.deps,_deps,g
s,\.libs,_libs,g
/^rmdir[ 	]*\.tst/ i\
am__leading_dot=_

# Autoconf 2.63b produces if clauses that are enclosed in `
# so we cannot use ` to replace parenthesized commands.
# This case must be treated before the parenthesized commands
# are replaced by `.
/.*`if[ 	](/ {
  s/(/"/
  s/)/"/
}

# Replace (command) > /dev/null with `command > /dev/null`, since
# parenthesized commands always return zero status in the ported Bash,
# even if the named command doesn't exist
/if ([^|;`]*null/{
  s,(,`,
  s,\([^ 	)]\)),\1,
  /null[ 	]*2>&1/ s,2>&1,&`,
  /null.*null/ s,null.*null,&`,
  /null.*null/ !{
    /null[ 	]*2>&1/ !s,null,&`,
  }
}

# DOS-style absolute file names should be supported as well
/\*) top_srcdir=/s,/\*,[\\\\/]* | ?:[\\\\/]*,

# The following two items are changes needed for configuring
# and compiling across partitions.
# 1) The given srcdir value is always translated from the
#    "x:" syntax into "/dev/x" syntax while we run configure.
/^[ 	]*-srcdir=\*.*$/ a\
    ac_optarg=`echo "$ac_optarg" | sed "s,^\\([A-Za-z]\\):,/dev/\\1,"`
/set X `ls -Lt \$srcdir/ i\
   if `echo $srcdir | grep "^/dev/" - > /dev/null`; then\
     srcdir=`echo "$srcdir" | sed -e "s%^/dev/%%" -e "s%/%:/%"`\
   fi

# Autoconf 2.52e generated configure scripts
# write absolute paths into Makefiles making
# them useless for DJGPP installations for which
# the package has not been configured for.
/MISSING=/,/^$/ {
  /^fi$/ a\
am_missing_run=`echo "$am_missing_run" | sed 's%/dev.*/marst[-_0-9]\\{1,1\\}[-.0-9A-z+]*%${top_srcdir}%;s%.:.*/marst[-_0-9]\\{1,1\\}[-.0-9A-z+]*%${top_srcdir}%'`
}
/install_sh=/,/^$/ {
  /^fi$/ a\
install_sh=`echo "$install_sh" | sed 's%/dev.*/marst[-_0-9]\\{1,1\\}[-.0-9A-z+]*%${top_srcdir}%;s%.:.*/marst[-_0-9]\\{1,1\\}[-.0-9A-z+]*%${top_srcdir}%'`
}

# This will only work if the assumption that the
# testsuite is ran from the following path:
#   ${top_srcdir}/tests/testsuite.dir
# holds. The explicit names are of no importance.
#   ../../. == ${top_srcdir}
#/^esac$/,/^ac_abs_srcdir=/ {
/^ac_abs_srcdir=/ i\
abs_port_path=$(pwd)\
is_relative=$(echo "${srcdir}" | sed "\
s,^$/,n,\
t end\
s,^/dev/[A-z]/.*$/,n,\
t end\
s,^[A-z]:.*$/,n,\
t end\
s,^.*$,y,\
:end\
")\
echo abs_port_path=$abs_port_path  is_relative=$is_relative  srdir=$srcdir\
if [ "${is_relative}" = y ]; then\
  ac_abs_aux_dir=`echo "$ac_abs_aux_dir" | sed "s%${abs_port_path}%${srcdir}/.%"`\
  ac_abs_builddir=`echo "$ac_abs_builddir" | sed "s%${abs_port_path}%${srcdir}/.%"`\
  ac_abs_top_builddir=`echo "$ac_abs_top_builddir" | sed "s%${abs_port_path}%${srcdir}/..%"`\
  ac_abs_top_srcdir=`echo "$ac_abs_top_srcdir" | sed "s%${abs_port_path}%${srcdir}/..%"`\
fi\
\
# ac_abs_aux_dir=`echo "$ac_abs_aux_dir" | sed "s%/dev/.*/marst[-_0-9]\\{1,1\\}[-.0-9A-Za-z+]*%../../.%;s%.:.*/marst[-_0-9]\\{1,1\\}[-.0-9A-Za-z+]*%../../.%"`\
# ac_abs_builddir=`echo "$ac_abs_builddir" | sed "s%/dev/.*/marst[-_0-9]\\{1,1\\}[-.0-9A-Za-z+]*%../../.%;s%.:.*/marst[-_0-9]\\{1,1\\}[-.0-9A-Za-z+]*%../../.%"`\
# ac_abs_top_builddir=`echo "$ac_abs_top_builddir" | sed "s%/dev/.*/marst[-_0-9]\\{1,1\\}[-.0-9A-Za-z+]*%../../..%;s%.:.*/marst[-_0-9]\\{1,1\\}[-.0-9A-Za-z+]*%../../..%"`\
# ac_abs_top_srcdir=`echo "$ac_abs_top_srcdir" | sed "s%/dev/.*/marst[-_0-9]\\{1,1\\}[-.0-9A-Za-z+]*%../../..%;s%.:.*/marst[-_0-9]\\{1,1\\}[-.0-9A-Za-z+]*%../../..%"`\
\
#ac_abs_srcdir=`echo "$ac_abs_srcdir" | sed "s%/dev/.*/marst[-_0-9]\\{1,1\\}[-.0-9A-Za-z+]*%../../.%;s%.:.*/marst[-_0-9]\\{1,1\\}[-.0-9A-Za-z+]*%../../.%"`
/^ac_abs_srcdir=/ a\
for dj_dir in $ac_abs_builddir $ac_abs_top_builddir $ac_abs_top_srcdir $ac_abs_srcdir\
do\
  ac_abs_aux_dir=`echo "$ac_abs_aux_dir" | sed "s%//%/%g"`\
  ac_abs_builddir=`echo "$ac_abs_builddir" | sed "s%//%/%g"`\
  ac_abs_top_builddir=`echo "$ac_abs_top_builddir" | sed "s%//%/%g"`\
  ac_abs_top_srcdir=`echo "$ac_abs_top_srcdir" | sed "s%//%/%g"`\
  ac_abs_srcdir=`echo "$ac_abs_srcdir" | sed "s%//%/%g"`\
done

# Add DJGPP version information.
/^#define VERSION/ s/\$VERSION/&  (DJGPP port (r1))/

# We need makeinfo to make the html formated docs.
/\$am_missing_run[ 	]*makeinfo/ s,\$am_missing_run,,

# The path to the FORTRAN compiler and libraries
# shall contain no absolute path reference so it
# will be good for all djgpp installations.
/^FLIBS="\$ac_cv_flibs"/ i\
ac_djgpp_path=`echo "$DJDIR" | sed 's%\\\\\\%/%g' | tr $as_cr_LETTERS $as_cr_letters`\
ac_cv_flibs=`echo "$ac_cv_flibs" | sed "s%-L$ac_djgpp_path%-L/dev/env/DJDIR%g"`

# Do not split info output.
/^MAKEINFO=.*$/s:=.*$:&" --no-split":

# The CR test for awk does not work for DJGPP.
/^ac_cs_awk_cr=/,/^$/ {
  /^fi$/ a\
ac_cs_awk_cr=$ac_cr
}

# AWK program above erroneously prepends '/' to C:/dos/paths
/# AWK program above erroneously prepends/,/esac/ {
  s/mingw/*djgpp* | mingw/
}

# Force the test for 'ln -s' to report 'cp -pf'.
/as_ln_s='ln -s'/ s/ln -s/cp -pf/
