Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Only build shcodecs support if shcodecs is present

This reverts part of commit ad98307

shcodecs support was optional in version 1.1.0, allowing sighttpd to be used
on systems other than SH-Mobile. When the method of shcodecs support was changed
to run shcodecs-record separately and access data via a named pipe, rather than
direct VPU control, the calls to initialize and run shcodecs support threads
were made non-optional.
  • Loading branch information...
commit 69c250af831f9b344d62606d6de20b69fe8a7499 1 parent bad6a72
@kfish authored
Showing with 21 additions and 11 deletions.
  1. +11 −0 configure.ac
  2. +2 −11 src/Makefile.am
  3. +8 −0 src/main.c
View
11 configure.ac
@@ -81,6 +81,17 @@ else
fi
AM_CONDITIONAL(HAVE_OGGZ, [test "x$HAVE_OGGZ" = "xyes"])
+dnl
+dnl Check for libshcodecs
+dnl
+PKG_CHECK_MODULES(SHCODECS, shcodecs >= 1.1.0, HAVE_SHCODECS="yes", HAVE_SHCODECS="no")
+if test "x$HAVE_SHCODECS" = "xyes" ; then
+ AC_DEFINE(HAVE_SHCODECS, [], [Define if have libshcodecs])
+ AC_SUBST(SHCODECS_CFLAGS)
+ AC_SUBST(SHCODECS_LIBS)
+fi
+AM_CONDITIONAL(HAVE_SHCODECS, [test "x$HAVE_SHCODECS" = "xyes"])
+
# Checks for header files.
AC_HEADER_RESOLV
AC_HEADER_STDC
View
13 src/Makefile.am
@@ -60,25 +60,16 @@ oggstdin_libs = $(OGGZ_LIBS)
endif
# SHRecord
+if HAVE_SHCODECS
shrecord_headers = \
shrecord.h
-# avcbencsmp.h \
-# capture.h \
-# display.h \
-# framerate.h \
-# thrqueue.h \
-# ControlFileUtil.h
shrecord_sources = \
shrecord.c
-# capture.c \
-# display.c \
-# framerate.c \
-# thrqueue.c \
-# ControlFileUtil.c
shrecord_cflags = # $(SHCODECS_CFLAGS) $(SHVEU_CFLAGS) $(UIOMUX_CFLAGS)
shrecord_libs = # $(SHCODECS_LIBS) $(SHVEU_LIBS) $(UIOMUX_LIBS)
+endif
# Main
noinst_HEADERS = \
View
8 src/main.c
@@ -24,7 +24,9 @@
#include "ogg-stdin.h"
#endif
+#ifdef HAVE_SHCODECS
#include "shrecord.h"
+#endif
/* #define DEBUG */
@@ -68,7 +70,9 @@ void sig_handler(int sig)
oggstdin_sighandler ();
#endif
+#ifdef HAVE_SHCODECS
shrecord_sighandler ();
+#endif
#ifdef DEBUG
fprintf (stderr, "Got signal %d\n", sig);
@@ -92,7 +96,9 @@ int main(int argc, char *argv[])
progname = argv[0];
+#ifdef HAVE_SHCODECS
shrecord_init();
+#endif
while (1) {
#ifdef HAVE_GETOPT_LONG
@@ -162,7 +168,9 @@ int main(int argc, char *argv[])
oggstdin_run();
#endif
+#ifdef HAVE_SHCODECS
shrecord_run();
+#endif
signal (SIGINT, sig_handler);
signal (SIGKILL, sig_handler);
Please sign in to comment.
Something went wrong with that request. Please try again.