Added check for libpcre.

git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@948 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
stan 2004-03-13 14:09:00 +00:00
parent f36d356c4e
commit 0905aff70b
3 changed files with 71 additions and 0 deletions

View File

@ -26,6 +26,9 @@
/* Define to 1 if you have the `mysqlclient' library (-lmysqlclient). */
#undef HAVE_LIBMYSQLCLIENT
/* Define to 1 if you have the `pcre' library (-lpcre). */
#undef HAVE_LIBPCRE
/* Define to 1 if you have the `z' library (-lz). */
#undef HAVE_LIBZ

67
configure vendored
View File

@ -4113,6 +4113,73 @@ fi
#AC_CHECK_LIB(avcodec,avcodec_init,XLIBS="$XLIBS -lavcodec",AC_MSG_WARN(libavcodec.a is required for MPEG streaming))
#AC_CHECK_LIB(avformat,av_new_stream,XLIBS="$XLIBS -lavformat",AC_MSG_WARN(libavformat.a is required for MPEG streaming),-lavcodec)
echo "$as_me:$LINENO: checking for pcre_compile in -lpcre" >&5
echo $ECHO_N "checking for pcre_compile in -lpcre... $ECHO_C" >&6
if test "${ac_cv_lib_pcre_pcre_compile+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
ac_check_lib_save_LIBS=$LIBS
LIBS="-lpcre $LIBS"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
extern "C"
#endif
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char pcre_compile ();
int
main ()
{
pcre_compile ();
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext conftest$ac_exeext
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
(eval $ac_link) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest$ac_exeext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
ac_cv_lib_pcre_pcre_compile=yes
else
echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
ac_cv_lib_pcre_pcre_compile=no
fi
rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
LIBS=$ac_check_lib_save_LIBS
fi
echo "$as_me:$LINENO: result: $ac_cv_lib_pcre_pcre_compile" >&5
echo "${ECHO_T}$ac_cv_lib_pcre_pcre_compile" >&6
if test $ac_cv_lib_pcre_pcre_compile = yes; then
cat >>confdefs.h <<_ACEOF
#define HAVE_LIBPCRE 1
_ACEOF
LIBS="-lpcre $LIBS"
else
{ echo "$as_me:$LINENO: WARNING: libpcre.a is required for remote/network camera support" >&5
echo "$as_me: WARNING: libpcre.a is required for remote/network camera support" >&2;}
fi
echo "$as_me:$LINENO: checking for avcodec_init in -lavcodec" >&5
echo $ECHO_N "checking for avcodec_init in -lavcodec... $ECHO_C" >&6
if test "${ac_cv_lib_avcodec_avcodec_init+set}" = set; then

View File

@ -115,6 +115,7 @@ AC_CHECK_LIB(dl,dlsym,,AC_MSG_ERROR(zm requires libdl.a))
AC_CHECK_LIB(mysqlclient,mysql_init,,AC_MSG_ERROR(zm requires libmysqlclient.a))
#AC_CHECK_LIB(avcodec,avcodec_init,XLIBS="$XLIBS -lavcodec",AC_MSG_WARN(libavcodec.a is required for MPEG streaming))
#AC_CHECK_LIB(avformat,av_new_stream,XLIBS="$XLIBS -lavformat",AC_MSG_WARN(libavformat.a is required for MPEG streaming),-lavcodec)
AC_CHECK_LIB(pcre,pcre_compile,,AC_MSG_WARN(libpcre.a is required for remote/network camera support))
AC_CHECK_LIB(avcodec,avcodec_init,,AC_MSG_WARN(libavcodec.a is required for MPEG streaming))
AC_CHECK_LIB(avformat,av_new_stream,,AC_MSG_WARN(libavformat.a is required for MPEG streaming),-lavcodec)
AC_CHECK_LIB(mp3lame,lame_init,,AC_MSG_WARN(libmp3lame.a may be required for IE compatible MPEG streaming))