<commit_before><?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" 
               "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="libsoup-build-howto">
<refmeta>
<refentrytitle>Compiling with libsoup</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBSOUP Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>Compiling with libsoup</refname><refpurpose>Notes on compiling</refpurpose>
</refnamediv>

<refsect2>
<title>Using pkg-config</title>

<para>
Like other GNOME libraries, <application>libsoup</application> uses
<application>pkg-config</application> to provide compiler options. The
package name is "<literal>libsoup-2.4</literal>". So in your
<literal>configure</literal> script, you might specify something like:
</para>

<informalexample><programlisting>
PKG_CHECK_MODULES(LIBSOUP, [libsoup-2.4 >= 2.26])
AC_SUBST(LIBSOUP_CFLAGS)
AC_SUBST(LIBSOUP_LIBS)
</programlisting></informalexample>

<para>
The "<literal>2.4</literal>" in the package name is the "API version"
(indicating "the version of the <application>libsoup</application> API
that first appeared in version 2.4") and is essentially just part of
the package name.
</para>

<para>
If you are using any of the GNOME-specific features of
<application>libsoup</application> (such as automatic proxy
configuration), you must require
"<literal>libsoup-gnome-2.4</literal>" instead:
</para>

<informalexample><programlisting>
PKG_CHECK_MODULES(LIBSOUP, [libsoup-gnome-2.4 >= 2.26])
AC_SUBST(LIBSOUP_CFLAGS)
AC_SUBST(LIBSOUP_LIBS)
</programlisting></informalexample>

<para>
You can also make <application>libsoup-gnome</application> an optional
dependency:
</para>

<informalexample><programlisting>
PKG_CHECK_MODULES(LIBSOUP_GNOME,
		  [libsoup-gnome-2.4 >= 2.26],
		  [LIBSOUP_CFLAGS="$LIBSOUP_GNOME_CFLAGS"
		   LIBSOUP_LIBS="$LIBSOUP_GNOME_LIBS"
		   AC_DEFINE(HAVE_LIBSOUP_GNOME, 1, [Have libsoup-gnome])],
		  [PKG_CHECK_MODULES(LIBSOUP, [libsoup-2.4 >= 2.26])])
AC_SUBST(LIBSOUP_CFLAGS)
AC_SUBST(LIBSOUP_LIBS)
</programlisting></informalexample>

<para>
This will allow the application to be built with either plain
<application>libsoup</application> or with
<application>libsoup-gnome</application>, and it will define the C
preprocessor symbol <literal>HAVE_LIBSOUP_GNOME</literal> if
<application>libsoup-gnome</application> features are available.
</para>

</refsect2>

<refsect2>
<title>Headers</title>

<para>
Code using <application>libsoup</application> should do:
</para>

<informalexample><programlisting>
#include &lt;libsoup/libsoup.h&gt;
</programlisting></informalexample>

<para>
or, for <application>libsoup-gnome</application>:
</para>

<informalexample><programlisting>
#include &lt;libsoup/libsoup-gnome.h&gt;
</programlisting></informalexample>

<para>
Including individual headers besides the two main header files is not
recommended. You may include both <literal>libsoup.h</literal> and
<literal>libsoup-gnome.h</literal> (though this is not required; the
latter automatically includes the former).
</para>

</refsect2>

</refentry>
<commit_msg>Fix header names in build-howto.xml<commit_after><?xml version="1.0"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" 
               "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<refentry id="libsoup-build-howto">
<refmeta>
<refentrytitle>Compiling with libsoup</refentrytitle>
<manvolnum>3</manvolnum>
<refmiscinfo>LIBSOUP Library</refmiscinfo>
</refmeta>

<refnamediv>
<refname>Compiling with libsoup</refname><refpurpose>Notes on compiling</refpurpose>
</refnamediv>

<refsect2>
<title>Using pkg-config</title>

<para>
Like other GNOME libraries, <application>libsoup</application> uses
<application>pkg-config</application> to provide compiler options. The
package name is "<literal>libsoup-2.4</literal>". So in your
<literal>configure</literal> script, you might specify something like:
</para>

<informalexample><programlisting>
PKG_CHECK_MODULES(LIBSOUP, [libsoup-2.4 >= 2.26])
AC_SUBST(LIBSOUP_CFLAGS)
AC_SUBST(LIBSOUP_LIBS)
</programlisting></informalexample>

<para>
The "<literal>2.4</literal>" in the package name is the "API version"
(indicating "the version of the <application>libsoup</application> API
that first appeared in version 2.4") and is essentially just part of
the package name.
</para>

<para>
If you are using any of the GNOME-specific features of
<application>libsoup</application> (such as automatic proxy
configuration), you must require
"<literal>libsoup-gnome-2.4</literal>" instead:
</para>

<informalexample><programlisting>
PKG_CHECK_MODULES(LIBSOUP, [libsoup-gnome-2.4 >= 2.26])
AC_SUBST(LIBSOUP_CFLAGS)
AC_SUBST(LIBSOUP_LIBS)
</programlisting></informalexample>

<para>
You can also make <application>libsoup-gnome</application> an optional
dependency:
</para>

<informalexample><programlisting>
PKG_CHECK_MODULES(LIBSOUP_GNOME,
		  [libsoup-gnome-2.4 >= 2.26],
		  [LIBSOUP_CFLAGS="$LIBSOUP_GNOME_CFLAGS"
		   LIBSOUP_LIBS="$LIBSOUP_GNOME_LIBS"
		   AC_DEFINE(HAVE_LIBSOUP_GNOME, 1, [Have libsoup-gnome])],
		  [PKG_CHECK_MODULES(LIBSOUP, [libsoup-2.4 >= 2.26])])
AC_SUBST(LIBSOUP_CFLAGS)
AC_SUBST(LIBSOUP_LIBS)
</programlisting></informalexample>

<para>
This will allow the application to be built with either plain
<application>libsoup</application> or with
<application>libsoup-gnome</application>, and it will define the C
preprocessor symbol <literal>HAVE_LIBSOUP_GNOME</literal> if
<application>libsoup-gnome</application> features are available.
</para>

</refsect2>

<refsect2>
<title>Headers</title>

<para>
Code using <application>libsoup</application> should do:
</para>

<informalexample><programlisting>
#include &lt;libsoup/soup.h&gt;
</programlisting></informalexample>

<para>
or, for <application>libsoup-gnome</application>:
</para>

<informalexample><programlisting>
#include &lt;libsoup/soup-gnome.h&gt;
</programlisting></informalexample>

<para>
Including individual headers besides the two main header files is not
recommended. You may include both <literal>soup.h</literal> and
<literal>soup-gnome.h</literal> (though this is not required; the
latter automatically includes the former).
</para>

</refsect2>

</refentry>

{'fraction_non_alphanumeric': 0.13515248796147672, 'fraction_numerical': 0.01348314606741573, 'mean_word_length': 6.391459074733096, 'pattern_counts': {'":': 0, '<': 195, '<?xml version=': 2, '>': 203, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 5}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6486957', 'n_tokens_mistral': 2308, 'n_tokens_neox': 2119, 'n_words': 490}