diff --git a/Makefile.am b/Makefile.am index d10d7e3aabead87230cd46942f061b8e0535429b..c5fcecb3e760ff768b9d8b07f138c2d4eadcca16 100644 --- a/Makefile.am +++ b/Makefile.am @@ -7,7 +7,7 @@ dist_doc_DATA = COPYING AUTHORS README.txt opusincludedir = ${includedir}/opus opusinclude_HEADERS = include/opusfile.h -lib_LTLIBRARIES = libopusfile.la +lib_LTLIBRARIES = libopusfile.la libopusurl.la libopusfile_la_SOURCES = \ src/info.c \ src/internal.c src/internal.h \ @@ -16,33 +16,26 @@ libopusfile_la_LIBADD = $(DEPS_LIBS) libopusfile_la_LDFLAGS = -no-undefined \ -version-info @OP_LT_CURRENT@:@OP_LT_REVISION@:@OP_LT_AGE@ -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = opusfile.pc - -if OP_ENABLE_HTTP -lib_LTLIBRARIES += libopusurl.la -libopusurl_la_SOURCES = src/http.c +libopusurl_la_SOURCES = src/http.c src/internal.c src/internal.h libopusurl_la_LIBADD = libopusfile.la $(URL_DEPS_LIBS) libopusurl_la_LDFLAGS = -no-undefined \ -version-info @OP_LT_CURRENT@:@OP_LT_REVISION@:@OP_LT_AGE@ -pkgconfig_DATA += opusurl.pc - -examples_opusfile_example_LDADD = libopusurl.la libopusfile.la -examples_seeking_example_LDADD = libopusurl.la libopusfile.la - +if OP_ENABLE_HTTP if OP_WIN32 libopusurl_la_SOURCES += src/wincerts.c libopusurl_la_LIBADD += -lws2_32 -lcrypt32 endif - -else -examples_opusfile_example_LDADD = libopusfile.la -examples_seeking_example_LDADD = libopusfile.la endif noinst_PROGRAMS = examples/opusfile_example examples/seeking_example +examples_opusfile_example_LDADD = libopusurl.la libopusfile.la +examples_seeking_example_LDADD = libopusurl.la libopusfile.la + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = opusfile.pc opusurl.pc + debug: $(MAKE) CFLAGS="${CFLAGS} -O0 -ggdb -DOP_ENABLE_ASSERTIONS" all diff --git a/configure.ac b/configure.ac index b7bf983a30461d75a3a0c09bfbef0bc0045a53fc..e3a7ad31511fc0efe3d6328f4aca4ebcbc301ac8 100644 --- a/configure.ac +++ b/configure.ac @@ -76,10 +76,12 @@ AM_COND_IF(OP_WIN32, ) AS_IF([test "x$enable_http" != "xno"], [ + openssl="openssl" AC_DEFINE([OP_ENABLE_HTTP], [1], [Enable HTTP support]) PKG_CHECK_MODULES([URL_DEPS], [openssl]) ]) AM_CONDITIONAL(OP_ENABLE_HTTP, [test "x$enable_http" != "xno"]) +AC_SUBST([openssl]) PKG_CHECK_MODULES([DEPS], [ogg >= 1.3 opus >= 1.0.1]) diff --git a/opusurl-uninstalled.pc.in b/opusurl-uninstalled.pc.in index 7f76103de35af1695caea1ffd2fe69e4058ac80c..f3af6a1f1d3c784409c3a505f4074a66f5038a4b 100644 --- a/opusurl-uninstalled.pc.in +++ b/opusurl-uninstalled.pc.in @@ -6,9 +6,9 @@ libdir=${pcfiledir}/.libs includedir=${pcfiledir}/@top_srcdir@/include Name: opusfile uninstalled -Description: High-level Opus decoding library, HTTP support (not installed) +Description: High-level Opus decoding library, URL support (not installed) Version: @VERSION@ Requires: opusfile +Requires.private: @openssl@ Conflicts: Libs: ${libdir}/libopusurl.la -Cflags: -I${includedir} diff --git a/opusurl.pc.in b/opusurl.pc.in index cc54eb35f8fff1bc67aa1f43e615820f09794485..27bd7882b640bc86fc61142d74d218c1224d2aff 100644 --- a/opusurl.pc.in +++ b/opusurl.pc.in @@ -6,9 +6,9 @@ libdir=@libdir@ includedir=@includedir@ Name: opusurl -Description: High-level Opus decoding library, HTTP support +Description: High-level Opus decoding library, URL support Version: @VERSION@ Requires: opusfile -Requires.private: openssl +Requires.private: @openssl@ Conflicts: Libs: -L${libdir} -lopusurl