Skip to content

Commit

Permalink
Use PKG_CHECK_MODULES to detect the libxml2 library
Browse files Browse the repository at this point in the history
  • Loading branch information
hughmcmaster authored and Lawrence D'Oliveiro committed Nov 5, 2021
1 parent f93eb78 commit 45705ec
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
8 changes: 3 additions & 5 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ LT_INIT

AC_PROG_INSTALL

PKG_PROG_PKG_CONFIG

AC_SYS_LARGEFILE

AC_HEADER_STDBOOL
Expand Down Expand Up @@ -94,6 +96,7 @@ PKG_CHECK_MODULES(FREETYPE, [freetype2],[
AC_MSG_ERROR([freetype not found])
)

PKG_CHECK_MODULES([XML2], [libxml-2.0 >= 2.6.0])

AC_ARG_ENABLE([default-video-format],
AS_HELP_STRING([--enable-default-video-format=format], [specify a default video format, either NTSC or PAL, to be used if no configuration or input setting is given]),
Expand Down Expand Up @@ -129,11 +132,6 @@ dnl AM_LANGINFO_CODESET

AM_ICONV

ifdef([AM_PATH_XML2],
[AM_PATH_XML2(2.6.0, , AC_MSG_ERROR([You must have libxml2 >= 2.6.0 installed]))],
[errprint([You must have libxml2 (>= 2.6.0) installed
])m4_exit(1)AC_MSG_ERROR([You must have libxml2 (>= 2.6.0) installed])])

AC_CHECK_DECLS(O_BINARY, , , [ #include <fcntl.h> ] )

AC_OUTPUT(Makefile doc/Makefile src/Makefile)
8 changes: 4 additions & 4 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,25 @@ endif
nodist_bin_SCRIPTS = dvddirdel

AM_CPPFLAGS = -DSYSCONFDIR="\"$(sysconfdir)\"" \
@XML_CPPFLAGS@ @MAGICK_CFLAGS@ @FREETYPE_CPPFLAGS@ @FRIBIDI_CFLAGS@ @FONTCONFIG_CFLAGS@
@XML2_CFLAGS@ @MAGICK_CFLAGS@ @FREETYPE_CPPFLAGS@ @FRIBIDI_CFLAGS@ @FONTCONFIG_CFLAGS@
AM_CFLAGS = -Wall

dvdauthor_SOURCES = dvdauthor.c common.h dvdauthor.h da-internal.h \
dvdcompile.c dvdvm.h dvdvml.c dvdvmy.c dvdvmy.h \
dvdifo.c dvdvob.c dvdpgc.c \
dvdcli.c readxml.c readxml.h \
conffile.c conffile.h compat.c compat.h rgb.h
dvdauthor_LDADD = $(LIBICONV) $(XML_LIBS)
dvdauthor_LDADD = $(LIBICONV) $(XML2_LIBS)

dvdunauthor_SOURCES = dvdunauthor.c dvduncompile.c common.h dvduncompile.h compat.c compat.h
dvdunauthor_LDADD = $(XML_LIBS) $(LIBICONV) -ldvdread
dvdunauthor_LDADD = $(XML2_LIBS) $(LIBICONV) -ldvdread

spumux_SOURCES = subgen.c subgen.h rgb.h \
subgen-parse-xml.c readxml.c readxml.h \
subgen-encode.c subgen-image.c subglobals.h \
conffile.c conffile.h compat.c compat.h common.h \
subrender.c subrender.h subreader.c subreader.h subfont.c subfont.h
spumux_LDADD = $(XML_LIBS) $(MAGICK_LIBS) $(FREETYPE_LIBS) \
spumux_LDADD = $(XML2_LIBS) $(MAGICK_LIBS) $(FREETYPE_LIBS) \
$(FRIBIDI_LIBS) $(FONTCONFIG_LIBS) $(LIBICONV) -lm

spuunmux_SOURCES = spuunmux.c rgb.h compat.c compat.h common.h conffile.h conffile.c
Expand Down

0 comments on commit 45705ec

Please sign in to comment.