[opus] [libopusfile PATCH] build: implement autotools build system for libopusfile.

Diego Elio Pettenò flameeyes at flameeyes.eu
Mon Sep 24 20:04:43 PDT 2012


---

This includes the check target that Tim requested.

Signed-off-by: Diego Elio Pettenò <flameeyes at flameeyes.eu>
---
 .gitignore   | 24 ++++++++++++++++++++++++
 Makefile.am  | 22 ++++++++++++++++++++++
 configure.ac | 14 ++++++++++++++
 3 file modificati, 60 inserzioni(+)
 create mode 100644 .gitignore
 create mode 100644 Makefile.am
 create mode 100644 configure.ac

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..d75d9ef
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,24 @@
+*.la
+*.lo
+*.o
+*~
+.deps
+.dirstamp
+.libs
+/Makefile
+Makefile.in
+aclocal.m4
+autom4te.cache/
+config.guess
+config.log
+config.status
+config.sub
+configure
+depcomp
+examples/opusfile_example
+examples/seeking_example
+install-sh
+libopusfile-*.tar.*
+libtool
+ltmain.sh
+missing
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..098a63d
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,22 @@
+AM_CFLAGS = -I$(top_srcdir)/include $(DEPS_CFLAGS)
+
+dist_doc_DATA = COPYING AUTHORS README.txt
+
+include_HEADERS = include/opusfile.h
+
+lib_LTLIBRARIES = libopusfile.la
+libopusfile_la_SOURCES = \
+	src/http.c src/info.c \
+	src/internal.c src/internal.h \
+	src/opusfile.c src/stream.c
+libopusfile_la_LIBADD = $(DEPS_LIBS)
+
+EXTRA_PROGRAMS = examples/opusfile_example examples/seeking_example
+
+examples_opusfile_example_LDADD = libopusfile.la
+examples_seeking_example_LDADD = libopusfile.la
+
+example: $(EXTRA_PROGRAMS)
+
+debug:
+	$(MAKE) CFLAGS="$(CFLAGS) -ggdb -O0" all example
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..6113ee6
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,14 @@
+AC_INIT([libopusfile], [0.0])
+
+AM_INIT_AUTOMAKE([1.11 foreign dist-bzip2])
+
+LT_INIT
+
+AC_ARG_ENABLE([http], AS_HELP_STRING([--disable-http], [Disable HTTP support]))
+
+AS_IF([test "x$enable_http" != "xno"], [openssl="openssl"])
+PKG_CHECK_MODULES([DEPS], [ogg opus ]${openssl})
+
+AC_SEARCH_LIBS([lrintf], [m])
+
+AC_OUTPUT([Makefile])
-- 
1.7.12



More information about the opus mailing list