Skip to content

Commit

Permalink
Remove not used variable and added better detection of ffmpeg libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
sackmotion committed Feb 24, 2014
1 parent aa2d317 commit 32f1e88
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 16 deletions.
24 changes: 15 additions & 9 deletions configure
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for motion Git-0fb31d66c9bb5032403f831c7f3b6ae241938bcb.
# Generated by GNU Autoconf 2.69 for motion Git-aa2d317a553ea96300c56aac2f9f92af0014c925.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Expand Down Expand Up @@ -577,8 +577,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='motion'
PACKAGE_TARNAME='motion'
PACKAGE_VERSION='Git-0fb31d66c9bb5032403f831c7f3b6ae241938bcb'
PACKAGE_STRING='motion Git-0fb31d66c9bb5032403f831c7f3b6ae241938bcb'
PACKAGE_VERSION='Git-aa2d317a553ea96300c56aac2f9f92af0014c925'
PACKAGE_STRING='motion Git-aa2d317a553ea96300c56aac2f9f92af0014c925'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''

Expand Down Expand Up @@ -1244,7 +1244,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures motion Git-0fb31d66c9bb5032403f831c7f3b6ae241938bcb to adapt to many kinds of systems.
\`configure' configures motion Git-aa2d317a553ea96300c56aac2f9f92af0014c925 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
Expand Down Expand Up @@ -1305,7 +1305,7 @@ fi

if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of motion Git-0fb31d66c9bb5032403f831c7f3b6ae241938bcb:";;
short | recursive ) echo "Configuration of motion Git-aa2d317a553ea96300c56aac2f9f92af0014c925:";;
esac
cat <<\_ACEOF
Expand Down Expand Up @@ -1453,7 +1453,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
motion configure Git-0fb31d66c9bb5032403f831c7f3b6ae241938bcb
motion configure Git-aa2d317a553ea96300c56aac2f9f92af0014c925
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
Expand Down Expand Up @@ -2055,7 +2055,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by motion $as_me Git-0fb31d66c9bb5032403f831c7f3b6ae241938bcb, which was
It was created by motion $as_me Git-aa2d317a553ea96300c56aac2f9f92af0014c925, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
Expand Down Expand Up @@ -4333,6 +4333,12 @@ $as_echo "found in /usr/local/lib" >&6; }
FFMPEG_OK="found"
FFMPEG_LIB="/usr/local/lib"
FFMPEG_DIR="/usr/local"
elif test -f /usr/lib/x86_64-linux-gnu/libavcodec.a -o -f /usr/lib/x86_64-linux-gnu/libavcodec.so && test /usr/lib/x86_64-linux-gnu/libavcodec.a -o -f /usr/lib/x86_64-linux-gnu/libavcodec.so ; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found in /usr/lib/x86_64-linux-gnu" >&5
$as_echo "found in /usr/lib/x86_64-linux-gnu" >&6; }
FFMPEG_OK="found"
FFMPEG_LIB="/usr/lib/x86_64-linux-gnu"
FFMPEG_DIR="/usr"
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
$as_echo "not found" >&6; }
Expand Down Expand Up @@ -6587,7 +6593,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by motion $as_me Git-0fb31d66c9bb5032403f831c7f3b6ae241938bcb, which was
This file was extended by motion $as_me Git-aa2d317a553ea96300c56aac2f9f92af0014c925, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
Expand Down Expand Up @@ -6649,7 +6655,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
motion config.status Git-0fb31d66c9bb5032403f831c7f3b6ae241938bcb
motion config.status Git-aa2d317a553ea96300c56aac2f9f92af0014c925
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
Expand Down
5 changes: 5 additions & 0 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,11 @@ else if test "${FFMPEG_DIR}" = "yes"; then
FFMPEG_OK="found"
FFMPEG_LIB="/usr/local/lib"
FFMPEG_DIR="/usr/local"
elif test -f /usr/lib/x86_64-linux-gnu/libavcodec.a -o -f /usr/lib/x86_64-linux-gnu/libavcodec.so && test /usr/lib/x86_64-linux-gnu/libavcodec.a -o -f /usr/lib/x86_64-linux-gnu/libavcodec.so ; then
AC_MSG_RESULT(found in /usr/lib/x86_64-linux-gnu)
FFMPEG_OK="found"
FFMPEG_LIB="/usr/lib/x86_64-linux-gnu"
FFMPEG_DIR="/usr"
else
AC_MSG_RESULT(not found)
echo ""
Expand Down
1 change: 0 additions & 1 deletion netcam.c
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,6 @@ static int netcam_read_first_header(netcam_context_ptr netcam)

MOTION_LOG(INF, TYPE_NETCAM, NO_ERRNO, "%s: Boundary string [%s]",
netcam->boundary);

}
break;
case 3: /* MJPG-Block style streaming. */
Expand Down
10 changes: 4 additions & 6 deletions stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@ static void* handle_basic_auth(void* param)
char buffer[1024] = {'\0'};
ssize_t length = 1023;
char *auth, *h, *authentication;
int ret;
static const char *request_auth_response_template=
"HTTP/1.0 401 Authorization Required\r\n"
"Server: Motion/"VERSION"\r\n"
Expand Down Expand Up @@ -243,7 +242,7 @@ static void* handle_basic_auth(void* param)
pthread_exit(NULL);

Error:
ret = write(p->sock, request_auth_response_template, strlen (request_auth_response_template));
write(p->sock, request_auth_response_template, strlen (request_auth_response_template));

Invalid_Request:
close(p->sock);
Expand Down Expand Up @@ -396,7 +395,6 @@ static void* handle_md5_digest(void* param)
#define SERVER_URI_LEN 512
char server_uri[SERVER_URI_LEN];
char* server_user = NULL, *server_pass = NULL;
int ret;
unsigned int rand1,rand2;
HASHHEX HA1;
HASHHEX HA2 = "";
Expand Down Expand Up @@ -571,8 +569,8 @@ static void* handle_md5_digest(void* param)
"Content-Length: %Zu\r\n\r\n",
request_auth_response_template, server_nonce,
KEEP_ALIVE_TIMEOUT, strlen(auth_failed_html_template));
ret = write(p->sock, buffer, strlen(buffer));
ret = write(p->sock, auth_failed_html_template, strlen(auth_failed_html_template));
write(p->sock, buffer, strlen(buffer));
write(p->sock, auth_failed_html_template, strlen(auth_failed_html_template));
}

// OK - Access
Expand Down Expand Up @@ -609,7 +607,7 @@ static void* handle_md5_digest(void* param)
if(server_pass)
free(server_pass);

ret = write(p->sock, internal_error_template, strlen(internal_error_template));
write(p->sock, internal_error_template, strlen(internal_error_template));

Invalid_Request:
close(p->sock);
Expand Down

0 comments on commit 32f1e88

Please sign in to comment.