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
















# Additional editing of Makefiles
/^test.*ac_datarootdir_hack.ac_datarootdir_seen.*$/ {
i\
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,autoconf\\.h\\.in,autoconf.h-in,g\
s,Makefile\\.am\\.in,Makefile.am-in,g\
s,Makefile\\.in\\.in,Makefile.in-in,g\
s,c++defs\\.h,cxxdefs.h,g\
s,csharpcomp\\.sh\\.in,csharpcomp.sh-in,g\
s,csharpexec\\.sh\\.in,csharpexec.sh-in,g\
s,javacomp\\.sh\\.in,javacomp.sh-in,g\
s,javaexec\\.sh\\.in,javaexec.sh-in,g\
s,relocatable\\.sh\\.in,relocatable.sh-in,g\
s,xsltconfig\\.h\\.in,xsltconfig.h-in,g\
s,exsltconfig\\.h\\.in,exsltconfig.h-in,g\
s,\\.memdump,_memdump,g\
/^install-info-am:/,/^$/ {\
  /@list=.\\\$(INFO_DEPS)\[^ \]/s,DEPS),& libxslt.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),& libxslt.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/\
}\
#/^libxml2_la_LIBADD[	 ]*=/ a\\\\\
#ifeq (\\\$(WITH_FTP), 1)\\\\\
#DJGPP_LIBADD = \\\$(libxml2_la_LIBADD) -lwatt\\\\\
#libxml2_la_LIBADD = \\\$(DJGPP_LIBADD)\\\\\
#else ifeq (\\\$(WITH_HTTP), 1)\\\\\
#DJGPP_LIBADD = \\\$(libxml2_la_LIBADD)\\\\\
#libxml2_la_LIBADD = \\\$(DJGPP_LIBADD) -lwatt\\\\\
#endif\
#/^LDADDS[	 ]*=/ a\\\\\
#ifeq (\\\$(WITH_FTP), 1)\\\\\
#DJGPP_LIBADD = \\\$(LDADDS) -lwatt\\\\\
#LDADDS = \\\$(DJGPP_LIBADD)\\\\\
#else ifeq (\\\$(WITH_HTTP), 1)\\\\\
#DJGPP_LIBADD = \\\$(LDADDS)\\\\\
#LDADDS = \\\$(DJGPP_LIBADD) -lwatt\\\\\
#endif\
#/^libxml2.la[	 ]*:/,/^$/s/\\\$(libxml2_la_LIBADD)/-lwatt &/\
# Fix test specific targets in xsltproc/Makefile.in\
/^tests[	 ]*:[	 ]*testThreads/,/^$/ {\
  /^tests[	 ]*:[	 ]*testThreads/ s/testThreads/&\\\$(EXEEXT)/\
  /(CHECKER)/ s/testThreads/&\\\$(EXEEXT)/\
}\
/^xsltproc\\.dv[	 ]*:[	 ]*xsltproc\\.o/,/^$/ {\
  /(CC)/ {\
    s/xsltproc/&\\\$(EXEEXT)/\
    s/^/#/\
    a\\\\\
	touch xsltproc\\\$(EXEEXT)\
  }\
}\
# Fix test specific targets in tests/*/Makefile.in\
/(top_builddir)\\/xsltproc\\/xsltproc[	 ]*:/,/^$/ {\
  s|(top_builddir)/xsltproc/xsltproc|&\\\$(EXEEXT)|\
  /(MAKE)/ s/xsltproc)$/xsltproc\\\$(EXEEXT))/\
}\
/^test[	 ]*tests[	 ]*:[	 ]*.*xsltproc/,/^$/ {\
  s|(top_builddir)/xsltproc/xsltproc|&\\\$(EXEEXT)|\
  /(CHECKER).*xsltproc.*/,/>[ 	]*result\\\([A-z0-9._\\$-]*\\\)[ 	]*;/ s/>[ 	]*result\\\([A-z0-9._\\$-]*\\\)[ 	]*;[ 	]*\\\\\\/> result\\\1 ; \\\\\\\\\\\\n	dtou *\\\1 ; \\\\\\/\
  /(CHECKER).*xsltproc.*/,/>[ 	]*\\\([A-z0-9._\\$-]*\\\)\\\.bad[ 	]*;/ s/>[ 	]*\\\([A-z0-9._\\$-]*\\\)\\\.bad[ 	]*;[ 	]*\\\\\\/> \\\1.bad ; \\\\\\\\\\\\n	dtou \\\1.res ; \\\\\\/\
  /(CHECKER).*xsltproc.*/,/>[ 	]*\\\([A-z0-9._\\$-]*\\\)\\\.out[ 	]*;/ s/>[ 	]*\\\([A-z0-9._\\$-]*\\\)\\\.out[ 	]*;[ 	]*\\\\\\/> \\\1.out ; \\\\\\\\\\\\n	dtou \\\1.res ; \\\\\\/\
  /(CHECKER).*xsltproc.*/,/>[ 	]*\\\([A-z0-9._\\$-]*\\\)res[ 	]*;/ s/>[ 	]*\\\([A-z0-9._\\$-]*\\\)res[ 	]*;[ 	]*\\\\\\/> \\\1res ; \\\\\\\\\\\\n	dtou \\\1res ; \\\\\\/\
}\
# Fix missing gif install target in doc/makefile.in\
/^install-data-local[	 ]*:$/,/^$/ {\
  /(INSTALL).*\\\.gif.*(HTML_DIR)$/ {\
    h\
    s/\\\.gif/.png/\
    G\
  }\
}\
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\
# Keep for debuging purposes.\
#cp -f "\$ac_tmp/subs-djgpp.sed" ./subs-djgpp.sed
}


# autocong.h.in and config.h.in are renamed to autocong.h-in and config.h-in.
/ac_config_\(files\)\|\(headers\)=/,/^$/ {
  /config\.h:/! {
    s| \([A-Za-z0-9_/-]*\)config\.h|&:\1config.h-in|g
#    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
  /config\.h:/! {
    s| \([A-Za-z0-9_/-]*\)config\.h|&:\1config.h-in|
  }
}


# 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.
/am_missing_run=/,/^$/ {
  /^fi$/ a\
am_missing_run=`echo "$am_missing_run" | sed 's%/dev.*/libxslt[-_0-9]\\{1,1\\}[-.0-9A-z+]*%${top_srcdir}%;s%.:.*/libxslt[-_0-9]\\{1,1\\}[-.0-9A-z+]*%${top_srcdir}%'`
}
/^[	 ]*install_sh=/,/^$/ {
  /^fi$/ a\
install_sh=`echo "$install_sh" | sed 's%/dev.*/libxslt[-_0-9]\\{1,1\\}[-.0-9A-z+]*%${top_srcdir}%;s%.:.*/libxslt[-_0-9]\\{1,1\\}[-.0-9A-z+]*%${top_srcdir}%'`
}

# Only if both builddir and srcdir are on the same
# partition the absolute paths are converted to
# relative paths so that the produced makefiles are
# good for all installations but not only for the one
# where it was configured.
/^# If the template does not know about datarootdir, expand it.$/ i\
# DJGPP specific.\
# Autoconf generated configure scripts write\
# absolute paths into Makefiles making them\
# useless for DJGPP installations for which\
# the package has not been configured for.\
djgpp_ac_abs_top_builddir_drive=\$(echo ${ac_abs_top_builddir} | sed -e 's%:[/\\\\]*.*$%%;s%^/dev/\\([A-z]\\)/.*$%\\1%')\
djgpp_ac_abs_top_srcdir_drive=\$(echo ${ac_abs_top_srcdir} | sed -e 's%:[/\\\\]*.*$%%;s%^/dev/\\([A-z]\\)/.*$%\\1%')\
if [ "x\${ac_abs_top_srcdir}" == "x\${ac_top_srcdir}" ]; then\
  paths_are_absolute=yes\
else\
  paths_are_absolute=no\
fi\
\
if [ "x\${djgpp_ac_abs_top_builddir_drive}" == "x\${djgpp_ac_abs_top_srcdir_drive}" ]; then\
  # builddir and srcdir are on the same partition.\
\
  # Convert absolute buildir paths to relative ones.\
  paths_to_be_adjusted="ac_abs_builddir ac_abs_top_builddir"\
  for path in \${paths_to_be_adjusted}; do\
    eval _path=\\\${$path}\
    eval djgpp_\${path}=$(echo \${_path} | sed -e "s%\${ac_abs_top_builddir}%\${ac_builddir}%")\
  done\
\
  if [ "x\${paths_are_absolute}" == "xyes" ]; then\
    # Convert absolute srcdir paths to relative ones.\
    djgpp_relative_prefix=$(echo \${ac_abs_builddir} | sed -e 's%^[A-z]:%%;s%^/dev/[A-z]%%;s%^%.%;s%[/\\\\][A-z0-9._+-]\\+%/..%g;s%[/\\\\]$%%')\
    paths_to_be_adjusted="ac_srcdir ac_abs_srcdir ac_top_srcdir ac_abs_top_srcdir"\
    for path in \${paths_to_be_adjusted}; do\
      eval _path=\\\${$path}\
      eval djgpp_\${path}=$(echo \${_path} | sed -e "s%^[A-z]:%%;s%^/dev/[A-z]%%;s%^%\${djgpp_relative_prefix}%")\
    done\
  else\
    djgpp_ac_srcdir="\${ac_srcdir}"\
    djgpp_ac_abs_srcdir="\${ac_srcdir}"\
    djgpp_ac_top_srcdir="\${ac_top_srcdir}"\
    djgpp_ac_abs_top_srcdir="\${ac_top_srcdir}"\
  fi\
else\
  # builddir and srcdir are on different partitions.\
\
  paths_to_be_adjusted="ac_abs_builddir ac_abs_top_builddir"\
  for path in \${paths_to_be_adjusted}; do\
    eval djgpp_\${path}=\\\${$path}\
  done\
\
  paths_to_be_adjusted="ac_srcdir ac_abs_srcdir ac_top_srcdir ac_abs_top_srcdir"\
  for path in \${paths_to_be_adjusted}; do\
    eval djgpp_\${path}=\\\${$path}\
  done\
fi\


/^s|@configure_input@|\$ac_sed_conf_input|;t t$/,/^\$ac_datarootdir_hack$/ {
  s/\$ac_srcdir/\$djgpp_ac_srcdir/
  s/\$ac_abs_srcdir/\$djgpp_ac_abs_srcdir/
  s/\$ac_top_srcdir/\$djgpp_ac_top_srcdir/
  s/\$ac_abs_top_srcdir/\$djgpp_ac_abs_top_srcdir/
  s/\$ac_abs_builddir/\$djgpp_ac_abs_builddir/
  s/\$ac_abs_top_builddir/\$djgpp_ac_abs_top_builddir/
}

# 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 --force":

# 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/

##LIBTOOL="${CONFIG_SHELL-$SHELL} "'$(top_builddir)/libtool'
# Set the right shell for libtool
/^LIBTOOL=.*libtool'$/ s/".*"/'$(SHELL) '/

# Adjust the config.site path for the case
# of recursive called configure scripts
/^if test "$no_recursion" != yes; then/ a\
  djgpp_config_site=$CONFIG_SITE
/case $srcdir in/,/esac/ {
  / # Relative name.$/ a\
export CONFIG_SITE=$ac_top_build_prefix$djgpp_config_site
}

# DJGPP specific adjustments of the compile-time system search path for libraries.
/^[ 	]*lt_search_path_spec=.*-print-search-dirs/ s,`$, -e \"s%[A-z]:[\\\\/]djgpp-[0-9].[0-9][0-9][\\\\/]%/dev/env/DJDIR/%g\"&,

# Fix realpath check.  DJGPP always prepends a drive letter.
/checking whether realpath works/,/^_ACEOF$/ {
  /name && \*name == '\/'/ s/\*name/name[2]/
}

# This works around a bug in DJGPP port of Bash 2.0x.
s|return $ac_retval|(&)|g

# DJGPP port of Bash 2.04 doesn't like this redirection of stdin
/exec 7</s|7<&0 </dev/null||

# Remove LINGUAS from dependecy list in ./po/Makefile
/POMAKEFILEDEPS=/ s/POMAKEFILEDEPS LINGUAS/POMAKEFILEDEPS #LINGUAS/

# The dup2 check of autoconf will fail with SIGABRT due to implementations issues in DJGPP's version of dup2.
# To avoid this, it will not be allowed to use file descriptors greather than 255.
# This will be removed as soon as a fixed versions of DJGPP is released.
/checking whether dup2 works/,/^_ACEOF$/ {
  /dup2.*256);/d
}

# Convert am_aux_dir and abs_aux_dir into relative paths.
/^# Expand $ac_aux_dir to an absolute path./ {
n
a\
am_aux_dir=${ac_aux_dir}
}

/abs_aux_dir=/ a\
abs_aux_dir=${ac_aux_dir}

# Do not make symlink of files.
/# Try a relative symlink, then a hard link, then a copy.$/,/fi$/ {
  /[ 	]*ln[ 	]\+/ d
}

# Add WATT-32 to the list of libraries needed to be
# linked if FTP and/or HTTP support has been enabled.
/^WIN32_EXTRA_LIBADD$/ a\
DJGPP_EXTRA_LIBADD
/^WIN32_EXTRA_LIBADD=$/,/^esac$/ {
  /^WIN32_EXTRA_LIBADD=$/ i\
DJGPP_EXTRA_LIBADD=
  /^esac$/ i\
 *-*-msdosdjgpp*)\
 if test "$with_ftp" = "yes" -o "$with_http" = "yes"\
 then\
   DJGPP_EXTRA_LIBADD="-lwatt"\
 fi\
 ;;
}
