Skip to content

Instantly share code, notes, and snippets.

@hartwork
Created March 2, 2020 13:55
Show Gist options
  • Save hartwork/fa2bf3ebfbaed32f405e7f267c1a9e5b to your computer and use it in GitHub Desktop.
Save hartwork/fa2bf3ebfbaed32f405e7f267c1a9e5b to your computer and use it in GitHub Desktop.
Patch to get vanilla libxspf 1.2 to compile
diff --git a/Makefile.am b/Makefile.am
index 0d7257f..a3f948e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,5 @@
## Process this file with automake to produce Makefile.in
-AUTOMAKE_OPTIONS = 1.10.1 gnu dist-zip dist-bzip2 dist-lzma subdir-objects
+AUTOMAKE_OPTIONS = 1.10.1 foreign dist-zip dist-bzip2 subdir-objects
ACLOCAL_AMFLAGS = -I m4
@@ -39,7 +39,7 @@ if XSPF_TEST_ENABLED
endif
-libxspf_la_CFLAGS = @URIPARSER_CFLAGS@
+libxspf_la_CXXFLAGS = @URIPARSER_CFLAGS@
libxspf_la_LDFLAGS = @URIPARSER_LIBS@ -version-info 4:1:0
@@ -122,6 +122,7 @@ examples_check_xspf_check_SOURCES = \
examples/check/check.cpp
+examples_read_example_read_CXXFLAGS = @URIPARSER_CFLAGS@
examples_read_example_read_LDADD = libxspf.la
diff --git a/configure.ac b/configure.ac
index 773f844..0e3bbd1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,8 +1,10 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.61)
-AC_INIT(src/XspfReader.cpp)
+AC_INIT([libxspf], [1.2.0])
+AC_CONFIG_SRCDIR([src/XspfReader.cpp])
AC_CONFIG_AUX_DIR([build-aux])
-AM_INIT_AUTOMAKE(libxspf, 1.2.0)
+AC_CONFIG_MACRO_DIRS([m4])
+AM_INIT_AUTOMAKE
AC_PROG_LIBTOOL
AC_PROG_INSTALL
diff --git a/examples/read/read.cpp b/examples/read/read.cpp
index 411f892..8682037 100644
--- a/examples/read/read.cpp
+++ b/examples/read/read.cpp
@@ -43,6 +43,7 @@
#include <cstdio>
#include <cstdlib> // MAX_PATH
#include <climits> // PATH_MAX
+#include <unistd.h> // getcwd
#if defined(__WIN32__) || defined(WIN32)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment