]> granicus.if.org Git - libmatroska/commitdiff
build system: add autoconf/automake-based system
authorMoritz Bunkus <moritz@bunkus.org>
Sun, 21 Dec 2014 09:22:49 +0000 (10:22 +0100)
committerMoritz Bunkus <moritz@bunkus.org>
Sun, 21 Dec 2014 09:28:07 +0000 (10:28 +0100)
.gitignore
Makefile.am [new file with mode: 0644]
autogen.sh [new file with mode: 0755]
configure.ac [new file with mode: 0644]
libmatroska.pc.in [new file with mode: 0644]
m4/.gitignore [new file with mode: 0644]

index b3ef86c1d107879e314f9e08b3aa342de02cbb04..0a6232451d42f0ad0b4a097bdc581fb3018c9153 100644 (file)
@@ -1 +1,18 @@
-*.[ao]
+.deps/
+.libs/
+*.a
+*.la
+*.lo
+*.o
+*.pc
+Makefile
+Makefile.in
+.dirstamp
+
+/aclocal.m4
+/autom4te.cache/
+/build-aux/
+/config.*
+/configure
+/libtool
+/stamp-h1
diff --git a/Makefile.am b/Makefile.am
new file mode 100644 (file)
index 0000000..f3b881d
--- /dev/null
@@ -0,0 +1,65 @@
+# -*- Makefile -*-
+
+ACLOCAL_AMFLAGS = -I m4
+
+AM_CPPFLAGS = -I${top_srcdir}
+AM_CXXFLAGS = -Wall -Wextra -Wno-unknown-pragmas -Wshadow $(EBML_CFLAGS)
+if ENABLE_DEBUG
+AM_CPPFLAGS += -DDEBUG
+AM_CXXFLAGS += -g
+endif
+
+lib_LTLIBRARIES = libmatroska.la
+libmatroska_la_SOURCES = \
+       src/FileKax.cpp \
+       src/KaxAttached.cpp \
+       src/KaxAttachments.cpp \
+       src/KaxBlock.cpp \
+       src/KaxBlockData.cpp \
+       src/KaxCluster.cpp \
+       src/KaxContexts.cpp \
+       src/KaxCues.cpp \
+       src/KaxCuesData.cpp \
+       src/KaxInfoData.cpp \
+       src/KaxSeekHead.cpp \
+       src/KaxSegment.cpp \
+       src/KaxSemantic.cpp \
+       src/KaxTracks.cpp \
+       src/KaxVersion.cpp
+libmatroska_la_LDFLAGS = -version-info 6:0:0 -no-undefined
+
+nobase_include_HEADERS = \
+       matroska/c/libmatroska.h \
+       matroska/c/libmatroska_t.h \
+       matroska/FileKax.h \
+       matroska/KaxAttached.h \
+       matroska/KaxAttachments.h \
+       matroska/KaxBlockData.h \
+       matroska/KaxBlock.h \
+       matroska/KaxChapters.h \
+       matroska/KaxClusterData.h \
+       matroska/KaxCluster.h \
+       matroska/KaxConfig.h \
+       matroska/KaxContentEncoding.h \
+       matroska/KaxContexts.h \
+       matroska/KaxCuesData.h \
+       matroska/KaxCues.h \
+       matroska/KaxDefines.h \
+       matroska/KaxInfoData.h \
+       matroska/KaxInfo.h \
+       matroska/KaxSeekHead.h \
+       matroska/KaxSegment.h \
+       matroska/KaxSemantic.h \
+       matroska/KaxTag.h \
+       matroska/KaxTags.h \
+       matroska/KaxTrackAudio.h \
+       matroska/KaxTrackEntryData.h \
+       matroska/KaxTracks.h \
+       matroska/KaxTrackVideo.h \
+       matroska/KaxTypes.h \
+       matroska/KaxVersion.h
+
+pkgconfigdir = ${libdir}/pkgconfig
+pkgconfig_DATA = libmatroska.pc
+
+${pkgconfig_DATA}: config.status
diff --git a/autogen.sh b/autogen.sh
new file mode 100755 (executable)
index 0000000..9ad2906
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+set -e
+
+aclocal
+autoheader
+libtoolize --copy
+automake --add-missing --copy
+autoconf
diff --git a/configure.ac b/configure.ac
new file mode 100644 (file)
index 0000000..fa2fef1
--- /dev/null
@@ -0,0 +1,14 @@
+AC_INIT([libmatroska], [1.4.2])
+AC_CONFIG_AUX_DIR([build-aux])
+AC_CONFIG_HEADERS([config.h])
+AC_CONFIG_MACRO_DIR([m4])
+AM_INIT_AUTOMAKE([foreign subdir-objects tar-pax])
+AC_PROG_CXX
+LT_INIT
+AC_ARG_ENABLE([debug],
+       AS_HELP_STRING([--enable-debug], [Add -g -DDEBUG to compile flags]),
+       [enable_debug="$withval"], [enable_debug=no])
+AM_CONDITIONAL([ENABLE_DEBUG], [test "$enable_debug" = yes])
+PKG_CHECK_MODULES([EBML],[libebml >= 1.3.1])
+AC_CONFIG_FILES([Makefile libmatroska.pc])
+AC_OUTPUT
diff --git a/libmatroska.pc.in b/libmatroska.pc.in
new file mode 100644 (file)
index 0000000..4e9b9d4
--- /dev/null
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name:             libmatroska
+Description:      Library for parsing EBML data structures
+Version:          @PACKAGE_VERSION@
+Requires.private: libebml
+Libs:             -L${libdir} -lmatroska
+Cflags:           -I${includedir}
diff --git a/m4/.gitignore b/m4/.gitignore
new file mode 100644 (file)
index 0000000..64d9bbc
--- /dev/null
@@ -0,0 +1,2 @@
+/libtool.m4
+/lt*.m4