<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE c:package [
  <!ENTITY % general-entities SYSTEM "../../general.ent">
  %general-entities;
]>

<c:package xmlns:c="http://schema.cross-lfs.org/book"
           xmlns:xi="http://www.w3.org/2001/XInclude"
           id="ch-temp-system-m4" c:multibuild="false">

  <c:title>M4</c:title>
  <c:version>&m4-version;</c:version>
  <c:variant>temporary system</c:variant>

  <xi:include href="../../final-system/common/m4.xml"
  xpointer="xmlns(co=http://schema.cross-lfs.org/book)
            xpointer(/co:package/co:description[1])" />

  <c:install>

    <c:para>Configure can not properly determine the results of the
    following tests:</c:para>

    <c:command>cat &gt; config.cache &lt;&lt; EOF
gl_cv_func_btowc_eof=yes
gl_cv_func_mbrtowc_incomplete_state=yes
gl_cv_func_mbrtowc_sanitycheck=yes
gl_cv_func_mbrtowc_null_arg1=yes
gl_cv_func_mbrtowc_null_arg2=yes
gl_cv_func_mbrtowc_retval=yes
gl_cv_func_mbrtowc_nul_retval=yes
gl_cv_func_wcrtomb_retval=yes
gl_cv_func_wctob_works=yes
EOF</c:command>

    <c:para>Prepare M4 for compilation:</c:para>

    <c:command c:multilib="false">./configure --prefix=/tools \
    --build=${CLFS_HOST} --host=${CLFS_TARGET} \
    --cache-file=config.cache</c:command>

    <c:command c:multilib="true">CC="${CC} ${BUILD64}" ./configure --prefix=/tools \
    --build=${CLFS_HOST} --host=${CLFS_TARGET} \
    --cache-file=config.cache</c:command>

    <c:para>Compile the package:</c:para>

    <c:command>make</c:command>

    <c:para>Install the package:</c:para>

    <c:command>make install</c:command>

  </c:install>

  <c:contents c:ref="ch-system-m4" />

</c:package>
