| 1 | From 45705ece5ec5d7d6b9ab3e7a68194796a398e855 Mon Sep 17 00:00:00 2001
|
| 2 | From: Hugh McMaster <[email protected]>
|
| 3 | Date: Wed, 26 Feb 2020 23:44:23 +1100
|
| 4 | Subject: [PATCH] Use PKG_CHECK_MODULES to detect the libxml2 library
|
| 5 |
|
| 6 | ---
|
| 7 | configure.ac | 8 +++-----
|
| 8 | src/Makefile.am | 8 ++++----
|
| 9 | 2 files changed, 7 insertions(+), 9 deletions(-)
|
| 10 |
|
| 11 | diff --git a/configure.ac b/configure.ac
|
| 12 | index f4b270f..f4e1715 100644
|
| 13 | |
| 14 | |
| 15 | @@ -8,6 +8,8 @@ LT_INIT
|
| 16 |
|
| 17 | AC_PROG_INSTALL
|
| 18 |
|
| 19 | +PKG_PROG_PKG_CONFIG
|
| 20 | +
|
| 21 | AC_SYS_LARGEFILE
|
| 22 |
|
| 23 | AC_HEADER_STDBOOL
|
| 24 | @@ -100,6 +102,7 @@ else
|
| 25 | AC_MSG_ERROR([freetype not found])
|
| 26 | fi
|
| 27 |
|
| 28 | +PKG_CHECK_MODULES([XML2], [libxml-2.0 >= 2.6.0])
|
| 29 |
|
| 30 | AC_ARG_ENABLE([default-video-format],
|
| 31 | 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]),
|
| 32 | @@ -135,11 +138,6 @@ dnl AM_LANGINFO_CODESET
|
| 33 |
|
| 34 | AM_ICONV
|
| 35 |
|
| 36 | -ifdef([AM_PATH_XML2],
|
| 37 | - [AM_PATH_XML2(2.6.0, , AC_MSG_ERROR([You must have libxml2 >= 2.6.0 installed]))],
|
| 38 | - [errprint([You must have libxml2 (>= 2.6.0) installed
|
| 39 | -])m4_exit(1)AC_MSG_ERROR([You must have libxml2 (>= 2.6.0) installed])])
|
| 40 | -
|
| 41 | AC_CHECK_DECLS(O_BINARY, , , [ #include <fcntl.h> ] )
|
| 42 |
|
| 43 | AC_OUTPUT(Makefile doc/Makefile src/Makefile)
|
| 44 | diff --git a/src/Makefile.am b/src/Makefile.am
|
| 45 | index c7f89a9..37b3fd1 100644
|
| 46 | |
| 47 | |
| 48 | @@ -8,7 +8,7 @@ endif
|
| 49 | nodist_bin_SCRIPTS = dvddirdel
|
| 50 |
|
| 51 | AM_CPPFLAGS = -DSYSCONFDIR="\"$(sysconfdir)\"" \
|
| 52 | - @XML_CPPFLAGS@ @MAGICK_CPPFLAGS@ @FREETYPE_CPPFLAGS@ @FRIBIDI_CFLAGS@ @FONTCONFIG_CFLAGS@
|
| 53 | + @XML2_CFLAGS@ @MAGICK_CPPFLAGS@ @FREETYPE_CPPFLAGS@ @FRIBIDI_CFLAGS@ @FONTCONFIG_CFLAGS@
|
| 54 | AM_CFLAGS = -Wall
|
| 55 |
|
| 56 | dvdauthor_SOURCES = dvdauthor.c common.h dvdauthor.h da-internal.h \
|
| 57 | @@ -16,17 +16,17 @@ dvdauthor_SOURCES = dvdauthor.c common.h dvdauthor.h da-internal.h \
|
| 58 | dvdifo.c dvdvob.c dvdpgc.c \
|
| 59 | dvdcli.c readxml.c readxml.h \
|
| 60 | conffile.c conffile.h compat.c compat.h rgb.h
|
| 61 | -dvdauthor_LDADD = $(LIBICONV) $(XML_LIBS)
|
| 62 | +dvdauthor_LDADD = $(LIBICONV) $(XML2_LIBS)
|
| 63 |
|
| 64 | dvdunauthor_SOURCES = dvdunauthor.c dvduncompile.c common.h dvduncompile.h compat.c compat.h
|
| 65 | -dvdunauthor_LDADD = $(XML_LIBS) $(LIBICONV) -ldvdread
|
| 66 | +dvdunauthor_LDADD = $(XML2_LIBS) $(LIBICONV) -ldvdread
|
| 67 |
|
| 68 | spumux_SOURCES = subgen.c subgen.h rgb.h \
|
| 69 | subgen-parse-xml.c readxml.c readxml.h \
|
| 70 | subgen-encode.c subgen-image.c subglobals.h \
|
| 71 | conffile.c conffile.h compat.c compat.h common.h \
|
| 72 | subrender.c subrender.h subreader.c subreader.h subfont.c subfont.h
|
| 73 | -spumux_LDADD = $(XML_LIBS) $(MAGICK_LIBS) $(FREETYPE_LIBS) \
|
| 74 | +spumux_LDADD = $(XML2_LIBS) $(MAGICK_LIBS) $(FREETYPE_LIBS) \
|
| 75 | $(FRIBIDI_LIBS) $(FONTCONFIG_LIBS) $(LIBICONV) -lm
|
| 76 |
|
| 77 | spuunmux_SOURCES = spuunmux.c rgb.h compat.c compat.h common.h conffile.h conffile.c
|