Commit d5c646e8 authored by Jonathan Blandford's avatar Jonathan Blandford Committed by Jonathan Blandford

added libpng to Makefile.am

2000-03-03  Jonathan Blandford  <jrb@redhat.com>

	* libnautilus/Makefile.am (libnautilus_la_LDFLAGS): added libpng
	to Makefile.am

	* configure.in: added autoconf check for png.
parent 174e12ec
2000-03-03 Jonathan Blandford <jrb@redhat.com>
* libnautilus/Makefile.am (libnautilus_la_LDFLAGS): added libpng
to Makefile.am
* configure.in: added autoconf check for png.
2000-03-03 John Sullivan <sullivan@eazel.com>
* configure.in: Turned -Werror back on. It had been turned
......
......@@ -17,73 +17,74 @@ typedef enum ElementIndex {
SECT5,
PARA,
FORMALPARA,
ARTHEADER, /* 10 */
BOOKINFO, /* 10 */
ARTHEADER,
AUTHORGROUP,
AUTHOR,
FIRSTNAME,
OTHERNAME,
SURNAME, /* 15 */
OTHERNAME, /* 15 */
SURNAME,
AFFILIATION,
EMAIL,
ORGNAME,
ADDRESS,
COPYRIGHT, /* 20 */
ADDRESS, /* 20 */
COPYRIGHT,
YEAR,
HOLDER,
TITLE,
SUBTITLE,
ULINK, /* 25 */
SUBTITLE, /* 25 */
ULINK,
XREF,
FOOTNOTE,
FIGURE,
GRAPHIC,
CITETITLE, /* 30 */
GRAPHIC, /* 30 */
CITETITLE,
APPLICATION,
FILENAME,
ITEMIZEDLIST,
ORDEREDLIST,
VARIABLELIST, /* 35 */
ORDEREDLIST, /* 35 */
VARIABLELIST,
LISTITEM,
PROGRAMLISTING,
SGMLTAG,
EMPHASIS,
TIP, /* 40 */
EMPHASIS, /* 40 */
TIP,
WARNING,
IMPORTANT,
NOTE,
CDATA,
SCREEN, /* 45 */
CDATA, /* 45 */
SCREEN,
SCREENSHOT,
SCREENINFO,
COMMAND,
REPLACEABLE,
FUNCTION, /* 50 */
REPLACEABLE, /* 50 */
FUNCTION,
GUIBUTTON,
GUIICON,
GUILABEL,
GUIMENU,
GUIMENUITEM, /* 55 */
GUIMENU, /* 55 */
GUIMENUITEM,
HARDWARE,
KEYCAP,
KEYCODE,
KEYSYM,
LITERAL, /* 60 */
KEYSYM, /* 60 */
LITERAL,
PARAMETER,
PROMPT,
SYMBOL,
USERINPUT,
CAUTION, /* 65 */
USERINPUT, /* 65 */
CAUTION,
LEGALPARA,
FIRSTTERM,
STRUCTNAME,
STRUCTFIELD,
FUNCSYNOPSIS, /* 70 */
STRUCTFIELD, /* 70 */
FUNCSYNOPSIS,
FUNCPROTOTYPE,
FUNCDEF,
FUNCPARAMS,
PARAMDEF,
VOID, /* 75 */
UNDEFINED /* 76 */
PARAMDEF, /* 75 */
VOID,
UNDEFINED /* 77 */
} ElementIndex;
typedef struct _ElementInfo ElementInfo;
......
......@@ -14,6 +14,7 @@ ElementInfo sect_elements[] = {
{ SECT5, "sect5", (startElementSAXFunc) sect_sect_start_element, (endElementSAXFunc) sect_sect_end_element, NULL},
{ PARA, "para", (startElementSAXFunc) sect_para_start_element, (endElementSAXFunc) sect_para_end_element, (charactersSAXFunc) sect_write_characters},
{ FORMALPARA, "formalpara", (startElementSAXFunc) sect_formalpara_start_element, (endElementSAXFunc) sect_formalpara_end_element, NULL },
{ BOOKINFO, "bookinfo", NULL, NULL, NULL},
{ ARTHEADER, "artheader", NULL, NULL, NULL}, //(startElementSAXFunc) artheader_start_element, (endElementSAXFunc) sect_artheader_end_element, NULL},
{ AUTHORGROUP, "authorgroup", NULL, NULL, NULL},
{ AUTHOR, "author", (startElementSAXFunc) sect_author_start_element, NULL, NULL},
......
......@@ -17,6 +17,7 @@ ElementInfo sect_preparse[] = {
{ SECT5, "sect5", (startElementSAXFunc) sect_preparse_sect_start_element, NULL, NULL},
{ PARA, "para", NULL, NULL, NULL},
{ FORMALPARA, "formalpara", NULL, NULL, NULL},
{ BOOKINFO, "bookinfo", NULL, NULL, NULL},
{ ARTHEADER, "artheader", NULL, NULL, NULL},
{ AUTHORGROUP, "authorgroup", NULL, NULL, NULL},
{ AUTHOR, "author", NULL, NULL, NULL},
......
......@@ -20,7 +20,7 @@ static void toc_title_characters (Context *context, const gchar *chars, int len)
ElementInfo toc_elements[] = {
{ ARTICLE, "article", (startElementSAXFunc) article_start_element, NULL, NULL},
{ BOOK, "book", NULL, NULL, NULL},
{ BOOK, "book", (startElementSAXFunc) article_start_element, NULL, NULL},
{ SECTION, "section", (startElementSAXFunc) toc_sect_start_element, (endElementSAXFunc) toc_sect_end_element, NULL},
{ SECT1, "sect1", (startElementSAXFunc) toc_sect_start_element, (endElementSAXFunc) toc_sect_end_element, NULL},
{ SECT2, "sect2", (startElementSAXFunc) toc_sect_start_element, (endElementSAXFunc) toc_sect_end_element, NULL},
......@@ -29,6 +29,7 @@ ElementInfo toc_elements[] = {
{ SECT5, "sect5", (startElementSAXFunc) toc_sect_start_element, (endElementSAXFunc) toc_sect_end_element, NULL},
{ PARA, "para", NULL, NULL, NULL},
{ FORMALPARA, "formalpara", NULL, NULL, NULL},
{ BOOKINFO, "bookinfo", (startElementSAXFunc) artheader_start_element, (endElementSAXFunc) toc_artheader_end_element, NULL},
{ ARTHEADER, "artheader", (startElementSAXFunc) artheader_start_element, (endElementSAXFunc) toc_artheader_end_element, NULL},
{ AUTHORGROUP, "authorgroup", NULL, NULL, NULL},
{ AUTHOR, "author", (startElementSAXFunc) toc_author_start_element, NULL, NULL},
......@@ -235,11 +236,13 @@ toc_author_start_element (Context *context,
ElementIndex index;
element_list = g_slist_prepend (element_list, GINT_TO_POINTER (ARTHEADER));
element_list = g_slist_prepend (element_list, GINT_TO_POINTER (BOOKINFO));
index = find_first_parent (context, element_list);
g_slist_free (element_list);
switch (index) {
case ARTHEADER:
case BOOKINFO:
break;
default:
return;
......@@ -257,11 +260,13 @@ toc_author_characters (Context *context, const gchar *chars, int len)
char *temp;
element_list = g_slist_prepend (element_list, GINT_TO_POINTER (ARTHEADER));
element_list = g_slist_prepend (element_list, GINT_TO_POINTER (BOOKINFO));
index = find_first_parent (context, element_list);
g_slist_free (element_list);
switch (index) {
case ARTHEADER:
case BOOKINFO:
break;
default:
return;
......@@ -431,6 +436,7 @@ toc_title_characters (Context *context, const gchar *chars, int len)
element_list = g_slist_prepend (element_list, GINT_TO_POINTER (SECT5));
element_list = g_slist_prepend (element_list, GINT_TO_POINTER (SECTION));
element_list = g_slist_prepend (element_list, GINT_TO_POINTER (ARTHEADER));
element_list = g_slist_prepend (element_list, GINT_TO_POINTER (BOOKINFO));
element_list = g_slist_prepend (element_list, GINT_TO_POINTER (FIGURE));
element_list = g_slist_prepend (element_list, GINT_TO_POINTER (FORMALPARA));
element_list = g_slist_prepend (element_list, GINT_TO_POINTER (NOTE));
......@@ -454,6 +460,7 @@ toc_title_characters (Context *context, const gchar *chars, int len)
g_free (temp);
break;
case ARTHEADER:
case BOOKINFO:
if (((StackElement *)context->stack->data)->info->index == TITLE)
((TocContext *) context->data)->header->title = temp;
else if (((StackElement *)context->stack->data)->info->index == SUBTITLE)
......
......@@ -15,6 +15,7 @@ AM_PROG_LIBTOOL
AM_SANITY_CHECK
AC_PROG_CC
AC_PROG_CPP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
......@@ -93,6 +94,32 @@ fi
AC_SUBST(GTKHTML_LIBS)
AC_SUBST(GTKHTML_CFLAGS)
dnl Test for libpng
if test -z "$LIBPNG"; then
AC_CHECK_LIB(png, png_read_info,
AC_CHECK_HEADER(png.h,
png_ok=yes,
png_ok=no),
AC_MSG_ERROR(*** (PNG library not found) ***), -lz -lm)
if test "$png_ok" = yes; then
AC_MSG_CHECKING([for png_structp in png.h])
AC_TRY_COMPILE([#include <png.h>],
[png_structp pp; png_infop info; png_colorp cmap; png_create_read_struct;],
png_ok=yes,
png_ok=no)
AC_MSG_RESULT($png_ok)
if test "$png_ok" = yes; then
PNG='png'; LIBPNG='-lpng -lz'
else
AC_MSG_WARN(*** PNG loader will not be built (PNG library is too old) ***)
fi
else
AC_MSG_WARN(*** PNG loader will not be built (PNG header file not found) ***)
fi
fi
AC_SUBST(LIBPNG)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
......
......@@ -16,7 +16,8 @@ libnautilus_la_LDFLAGS=\
$(BONOBO_LIBS) \
$(GNOMECANVASPIXBUF_LIBS) \
$(VFS_LIBS) \
$(XML_LIBS)
$(XML_LIBS) \
$(LIBPNG)
nautilus_idl_sources=nautilus-stubs.c nautilus-skels.c nautilus.h nautilus-common.c
fsextension_idl_sources=fsextension-stubs.c fsextension-skels.c fsextension-common.c fsextension.h
......
......@@ -16,7 +16,8 @@ libnautilus_la_LDFLAGS=\
$(BONOBO_LIBS) \
$(GNOMECANVASPIXBUF_LIBS) \
$(VFS_LIBS) \
$(XML_LIBS)
$(XML_LIBS) \
$(LIBPNG)
nautilus_idl_sources=nautilus-stubs.c nautilus-skels.c nautilus.h nautilus-common.c
fsextension_idl_sources=fsextension-stubs.c fsextension-skels.c fsextension-common.c fsextension.h
......
......@@ -16,7 +16,8 @@ libnautilus_la_LDFLAGS=\
$(BONOBO_LIBS) \
$(GNOMECANVASPIXBUF_LIBS) \
$(VFS_LIBS) \
$(XML_LIBS)
$(XML_LIBS) \
$(LIBPNG)
nautilus_idl_sources=nautilus-stubs.c nautilus-skels.c nautilus.h nautilus-common.c
fsextension_idl_sources=fsextension-stubs.c fsextension-skels.c fsextension-common.c fsextension.h
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment