summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2011-09-06 15:18:26 +0200
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2011-09-07 15:35:56 +0200
commit32da405cbd0ad3b9964c72d07d8fe921f815fb32 (patch)
tree1c29a12bdb766e5413263ae84c414abc988e562f /configure.ac
parent03da3083dc111e005da4d57c499966983d3fa7c8 (diff)
downloadcmumble-32da405cbd0ad3b9964c72d07d8fe921f815fb32.tar.gz
cmumble-32da405cbd0ad3b9964c72d07d8fe921f815fb32.tar.bz2
cmumble-32da405cbd0ad3b9964c72d07d8fe921f815fb32.zip
Use AC_PATH_PROG for protoc-c
Also move PROTOC_C substution directly into src/protoc-c.sh.in instead of src/Makefile.am
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac12
1 files changed, 4 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac
index 6aa8568..34d399e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -13,9 +13,12 @@ AM_INIT_AUTOMAKE([foreign dist-bzip2])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+AC_ARG_VAR([PROTOC_C], [path to protoc-c utility])
+
# Check for programs
AC_PROG_CC
AC_PROG_SED
+AC_PATH_PROG([PROTOC_C], [protoc-c], [false])
PKG_PROG_PKG_CONFIG()
PKG_CHECK_MODULES(PROTOBUF, [libprotobuf-c],[], [
@@ -36,14 +39,6 @@ do
AC_MSG_ERROR([gstreamer element $element not found]))
done
-PROTOBUF_EXECUTABLE=`pkg-config --variable=exec_prefix libprotobuf-c`
-if test "x$PROTOBUF_EXECUTABLE" == "x"; then
- PROTOBUF_EXECUTABLE=protoc-c
-else
- PROTOBUF_EXECUTABLE="${PROTOBUF_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
@@ -51,4 +46,5 @@ AC_SUBST([GCC_CFLAGS])
AC_CONFIG_FILES([Makefile
src/Makefile])
+AC_CONFIG_FILES([src/protoc-c.sh], [chmod +x src/protoc-c.sh])
AC_OUTPUT