summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore25
-rw-r--r--Makefile.am3
-rwxr-xr-xautogen.sh9
-rw-r--r--configure.ac45
-rw-r--r--m4/.gitignore5
-rw-r--r--src/.gitignore3
-rw-r--r--src/Makefile.am16
-rwxr-xr-x[-rw-r--r--]src/gen_message.sh2
8 files changed, 108 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..4db68c2
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,25 @@
+*.deps
+*.o
+*.pc
+*.so
+*.swp
+*~
+.libs
+/aclocal.m4
+/autom4te.cache
+/config.guess
+/config.h
+/config.h.in
+/config.log
+/config.mk
+/config.status
+/config.sub
+/configure
+/depcomp
+/install-sh
+/libtool
+/ltmain.sh
+/missing
+/stamp-h1
+Makefile
+Makefile.in
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..3a7ce7e
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,3 @@
+SUBDIRS = src
+
+ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 0000000..916169a
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,9 @@
+#! /bin/sh
+
+test -n "$srcdir" || srcdir=`dirname "$0"`
+test -n "$srcdir" || srcdir=.
+(
+ cd "$srcdir" &&
+ autoreconf --force -v --install
+) || exit
+test -n "$NOCONFIGURE" || "$srcdir/configure" "$@"
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..84ef3d6
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,45 @@
+AC_PREREQ([2.64])
+AC_INIT([cmumble],
+ [0.1],
+ [benjaminfranzke@googlemail.com],
+ [cmumble],
+ [https://gitorious.org/cmumble/])
+
+AC_CONFIG_HEADERS([config.h])
+AC_CONFIG_MACRO_DIR([m4])
+
+AM_INIT_AUTOMAKE([1.11 foreign dist-bzip2])
+
+AM_SILENT_RULES([yes])
+
+# Check for programs
+AC_PROG_CC
+
+# Initialize libtool
+LT_PREREQ([2.2])
+LT_INIT
+
+PKG_PROG_PKG_CONFIG()
+PKG_CHECK_MODULES(PROTOBUF, [libprotobuf-c],,[AC_MSG_ERROR([libprotobuf missing])])
+PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.28],,[AC_MSG_ERROR([glib-2.0 missing])])
+PKG_CHECK_MODULES(GIO, [gio-2.0],,[AC_MSG_ERROR([gio-2.0 missing])])
+PKG_CHECK_MODULES(GSTREAMER, [gstreamer-0.10 gstreamer-app-0.10],,
+ [AC_MSG_ERROR([gstreamer-0.10 or gstreamer-app-0.10 missing])])
+PKG_CHECK_MODULES(CELT, [celt],,[AC_MSG_ERROR([celt missing])])
+
+PROTOBUF_EXECUTABLE=`pkg-config --variable=exec_prefix libprotobuf-c`
+if test -n "$PROTOBUF_EXECUTABLE"; then
+ PROTOBUF_EXECUTABLE=protoc-c
+else
+ PROTOBUF_EXECUTABLE="${PROTBUF_EXECUTABLE}/bin/protoc-c"
+fi
+AC_SUBST([PROTOBUF_EXECUTABLE])
+
+if test "x$GCC" = "xyes"; then
+ GCC_CFLAGS="-Wall -g -Wstrict-prototypes -Wmissing-prototypes -fvisibility=hidden"
+fi
+AC_SUBST([GCC_CFLAGS])
+
+AC_CONFIG_FILES([Makefile
+ src/Makefile])
+AC_OUTPUT
diff --git a/m4/.gitignore b/m4/.gitignore
new file mode 100644
index 0000000..464ba5c
--- /dev/null
+++ b/m4/.gitignore
@@ -0,0 +1,5 @@
+libtool.m4
+lt~obsolete.m4
+ltoptions.m4
+ltsugar.m4
+ltversion.m4
diff --git a/src/.gitignore b/src/.gitignore
new file mode 100644
index 0000000..12ac542
--- /dev/null
+++ b/src/.gitignore
@@ -0,0 +1,3 @@
+messages.h
+mumble.pb-c.c
+mumble.pb-c.h
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 0000000..412d668
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,16 @@
+bin_PROGRAMS = cmumble
+
+noinst_HEADERS = messages.h mumble.pb-c.h varint.h
+cmumble_SOURCES = cmumble.c mumble.pb-c.c varint.c
+cmumble_LDADD = $(PROTOBUF_LIBS) $(GLIB_LIBS) $(GIO_LIBS) $(GSTREAMER_LIBS) $(CELT_LIBS)
+
+AM_CPPFLAGS = $(PROTOBUF_CFLAGS) $(GLIB_CFLAGS) $(GIO_CFLAGS) $(GSTREAMER_CFLAGS) $(CELT_CFLAGS)
+AM_CFLAGS = $(GCC_FLAGS)
+
+messages.h: messages.txt
+ ./gen_message.sh < $< > $@
+
+mumble.pb-c.c mumble.pb-c.h: mumble.proto
+ $(PROTOBUF_EXECUTABLE) --c_out=. $<
+
+CLEANFILES = mumble.pb-c.c mumble.pb-c.h messages.h
diff --git a/src/gen_message.sh b/src/gen_message.sh
index 4b0d1f8..2fbe75c 100644..100755
--- a/src/gen_message.sh
+++ b/src/gen_message.sh
@@ -1,3 +1,5 @@
+#!/bin/sh
+
echo "static const struct { const ProtobufCMessageDescriptor *descriptor; const char *name; } messages[] = {"
while read message
do