2002-12-10 20:24:10 +08:00
|
|
|
AC_INIT(src/zm.h)
|
2005-03-04 20:32:56 +08:00
|
|
|
AM_INIT_AUTOMAKE(zm,1.21.0)
|
2002-12-10 20:24:10 +08:00
|
|
|
AM_CONFIG_HEADER(config.h)
|
2002-09-17 01:10:34 +08:00
|
|
|
|
2004-09-07 16:39:18 +08:00
|
|
|
PATH_BUILD=`pwd`
|
|
|
|
AC_SUBST(PATH_BUILD)
|
|
|
|
|
2002-09-17 01:10:34 +08:00
|
|
|
AC_ARG_WITH(mysql,
|
2004-03-17 00:40:29 +08:00
|
|
|
[ --with-mysql=<path> prefix of MySQL installation. e.g. /usr/local or /usr],
|
2002-09-17 01:10:34 +08:00
|
|
|
[MYSQL_PREFIX=$with_mysql],
|
|
|
|
AC_MSG_ERROR([You must call configure with the --with-mysql option.
|
|
|
|
This tells configure where to find the MySql C library and headers.
|
|
|
|
e.g. --with-mysql=/usr/local or --with-mysql=/usr])
|
|
|
|
)
|
|
|
|
AC_SUBST(MYSQL_PREFIX)
|
2003-05-23 00:31:54 +08:00
|
|
|
MYSQL_LIBS="-L${MYSQL_PREFIX}/lib/mysql"
|
2002-09-17 01:10:34 +08:00
|
|
|
MYSQL_CFLAGS="-I${MYSQL_PREFIX}/include"
|
|
|
|
AC_SUBST(MYSQL_LIBS)
|
|
|
|
AC_SUBST(MYSQL_CFLAGS)
|
|
|
|
|
2003-05-23 00:31:54 +08:00
|
|
|
LDFLAGS="${MYSQL_LIBS} $LDFLAGS"
|
|
|
|
|
2004-03-17 00:40:29 +08:00
|
|
|
FFMPEG_PREFIX=
|
2004-03-22 18:33:22 +08:00
|
|
|
# Ask for ffmpeg path:.
|
2004-03-17 00:40:29 +08:00
|
|
|
AC_ARG_WITH(ffmpeg,
|
|
|
|
[ --with-ffmpeg=<path> prefix of ffmpeg build directory for libavcodec etc],
|
|
|
|
[FFMPEG_PREFIX=$with_ffmpeg],
|
|
|
|
AC_MSG_WARN([You can call configure with the --with-ffmpeg option.
|
|
|
|
This tells configure where to find the ffmpeg build directory within which are the libavcodec
|
|
|
|
and libavformat files that can be used to build true MPEG streaming into ZoneMinder. A normal
|
|
|
|
install of ffmpeg only installs the applications and not the libraries or headers necessary
|
|
|
|
to link to so this will probably be a local or temporary directory.
|
2004-03-22 18:33:22 +08:00
|
|
|
e.g. --with-ffmpeg=/usr/local])
|
2004-03-17 00:40:29 +08:00
|
|
|
)
|
|
|
|
AC_SUBST(FFMPEG_PREFIX)
|
2004-03-19 05:24:05 +08:00
|
|
|
FFMPEG_LIBS="-L${FFMPEG_PREFIX}/lib"
|
|
|
|
FFMPEG_CFLAGS="-I${FFMPEG_PREFIX}/include"
|
2004-03-17 00:40:29 +08:00
|
|
|
AC_SUBST(FFMPEG_LIBS)
|
|
|
|
AC_SUBST(FFMPEG_CFLAGS)
|
|
|
|
|
|
|
|
LDFLAGS="${FFMPEG_LIBS} $LDFLAGS"
|
|
|
|
|
|
|
|
LAME_PREFIX=
|
2004-03-22 18:33:22 +08:00
|
|
|
# Ask for lame path:.
|
2004-03-17 00:40:29 +08:00
|
|
|
AC_ARG_WITH(lame,
|
|
|
|
[ --with-lame=<path> prefix of lame library directory for libmp3lame],
|
|
|
|
[LAME_PREFIX=$with_lame],
|
|
|
|
AC_MSG_WARN([You can call configure with the --with-lame option.
|
|
|
|
This tells configure where to find the Lame library which can be used by the ffmpeg libraries
|
|
|
|
to generate IE compatible MPEG audio streams. This option is only necessary if you have built
|
|
|
|
the ffmpeg package itself with the --enable-mp3lame option and if the normal link cannot
|
|
|
|
find the library. Using mp3lame is not necessary or of any benefit to ZoneMinder per se.
|
|
|
|
e.g. --with-lame=/use/local/lib])
|
|
|
|
)
|
|
|
|
AC_SUBST(LAME_PREFIX)
|
|
|
|
LAME_LIBS="-L${LAME_PREFIX}"
|
|
|
|
#LAME_CFLAGS="-I${LAME_PREFIX}/libavcodec -I${LAME_PREFIX}/libavformat"
|
|
|
|
AC_SUBST(LAME_LIBS)
|
|
|
|
#AC_SUBST(LAME_CFLAGS)
|
|
|
|
|
|
|
|
LDFLAGS="${LAME_LIBS} $LDFLAGS"
|
|
|
|
|
2002-12-11 07:02:35 +08:00
|
|
|
# Ask user for path to web stuff:.
|
|
|
|
AC_ARG_WITH(webdir,
|
2004-03-17 00:40:29 +08:00
|
|
|
[ --with-webdir=<path> prefix of web directory. e.g. /var/www/html or /www/vhtdocs/<site>],
|
2002-12-11 07:02:35 +08:00
|
|
|
[WEB_PREFIX=$with_webdir],
|
|
|
|
AC_MSG_ERROR([You must call configure with the --with-webdir option.
|
|
|
|
This tells configure where to install PHP and web files and scripts.
|
|
|
|
e.g. --with-webdir=/var/www/html or --with-mysql=/www/vhtdocs/<site>])
|
|
|
|
)
|
|
|
|
AC_SUBST(WEB_PREFIX)
|
|
|
|
|
|
|
|
# Ask user for path to cgi stuff:.
|
|
|
|
AC_ARG_WITH(cgidir,
|
2004-03-17 00:40:29 +08:00
|
|
|
[ --with-cgidir=<path> prefix of cgi directory. e.g. /var/www/cgi-bin or /www/vhtdocs/<site>/cgi-bin],
|
2002-12-11 07:02:35 +08:00
|
|
|
[CGI_PREFIX=$with_cgidir],
|
|
|
|
AC_MSG_ERROR([You must call configure with the --with-cgidir option.
|
|
|
|
This tells configure where to install cgi files and scripts.
|
|
|
|
e.g. --with-cgidir=/var/www/cgi-bin or --with-mysql=/www/vhtdocs/<site>/cgi-bin])
|
|
|
|
)
|
|
|
|
AC_SUBST(CGI_PREFIX)
|
|
|
|
|
|
|
|
WEB_USER=apache
|
|
|
|
# Ask user for web user name:.
|
|
|
|
AC_ARG_WITH(webuser,
|
2004-03-17 00:40:29 +08:00
|
|
|
[ --with-webuser=<user> username of web user. e.g. apache or web],
|
2002-12-11 07:02:35 +08:00
|
|
|
[WEB_USER=$with_webuser],
|
|
|
|
AC_MSG_WARN([You can call configure with the --with-webuser option.
|
|
|
|
This tells configure what the user name of the web user is if it is not the default of 'apache'.
|
|
|
|
e.g. --with-webuser=apache or --with-webuser=web])
|
|
|
|
)
|
|
|
|
AC_SUBST(WEB_USER)
|
|
|
|
|
|
|
|
WEB_GROUP=apache
|
|
|
|
# Ask group for web group name:.
|
|
|
|
AC_ARG_WITH(webgroup,
|
2004-03-17 00:40:29 +08:00
|
|
|
[ --with-webgroup=<group> groupname of web group. e.g. apache or web],
|
2002-12-11 07:02:35 +08:00
|
|
|
[WEB_GROUP=$with_webgroup],
|
|
|
|
AC_MSG_WARN([You can call configure with the --with-webgroup option.
|
|
|
|
This tells configure what the group name of the web group is if it is not the default of 'apache'.
|
|
|
|
e.g. --with-webgroup=apache or --with-webgroup=web])
|
|
|
|
)
|
|
|
|
AC_SUBST(WEB_GROUP)
|
|
|
|
|
2002-12-10 20:24:10 +08:00
|
|
|
AC_PROG_CC
|
|
|
|
AC_PROG_CXX
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
AC_PROG_MAKE_SET
|
2002-09-17 01:10:34 +08:00
|
|
|
|
|
|
|
AC_HEADER_STDC
|
|
|
|
|
2002-12-10 20:24:10 +08:00
|
|
|
AC_LANG_CPLUSPLUS
|
2002-09-17 01:10:34 +08:00
|
|
|
|
2004-03-04 23:05:54 +08:00
|
|
|
XLIBS=""
|
|
|
|
|
2004-03-19 05:47:09 +08:00
|
|
|
AC_CHECK_HEADERS(pcre/pcre.h,,,)
|
|
|
|
AC_CHECK_HEADERS(pcre.h,,,)
|
2003-03-28 01:18:41 +08:00
|
|
|
AC_CHECK_DECLS(round,,,[#include <math.h>])
|
2004-01-28 01:21:56 +08:00
|
|
|
AC_CHECK_DECLS(strsignal,,,[#include <string.h>])
|
2004-12-30 02:03:13 +08:00
|
|
|
AC_CHECK_DECLS(MD5,,,[#include <openssl/md5.h>])
|
2002-12-10 20:24:10 +08:00
|
|
|
AC_CHECK_LIB(jpeg,jpeg_start_compress,,AC_MSG_ERROR(zm requires libjpeg.a))
|
|
|
|
AC_CHECK_LIB(z,compress,,AC_MSG_ERROR(zm requires libz.a))
|
|
|
|
AC_CHECK_LIB(dl,dlsym,,AC_MSG_ERROR(zm requires libdl.a))
|
2003-05-23 00:31:54 +08:00
|
|
|
AC_CHECK_LIB(mysqlclient,mysql_init,,AC_MSG_ERROR(zm requires libmysqlclient.a))
|
2004-12-30 02:03:13 +08:00
|
|
|
AC_CHECK_LIB(crypto,MD5,,AC_MSG_WARN(libcrypto.a is required for authenticated streaming))
|
2004-03-13 22:09:00 +08:00
|
|
|
AC_CHECK_LIB(pcre,pcre_compile,,AC_MSG_WARN(libpcre.a is required for remote/network camera support))
|
2004-03-04 23:05:54 +08:00
|
|
|
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)
|
2004-03-22 18:33:22 +08:00
|
|
|
AC_CHECK_LIB(mp3lame,lame_init,,AC_MSG_WARN(libmp3lame.a may be required if ffmpeg was built with it))
|
2004-03-04 23:05:54 +08:00
|
|
|
|
|
|
|
AC_SUBST(XLIBS)
|
2002-12-10 20:24:10 +08:00
|
|
|
|
|
|
|
AC_SUBST(bindir)
|
|
|
|
|
2005-02-24 18:43:29 +08:00
|
|
|
AC_OUTPUT(Makefile src/Makefile web/Makefile web/graphics/Makefile scripts/Makefile db/Makefile zmconfig.pl)
|
2003-01-25 00:24:13 +08:00
|
|
|
|
|
|
|
AC_CHECK_FILE(zmconfig.txt,,AC_MSG_WARN([Now run 'perl zmconfig.pl' to create your ZoneMinder configuration]))
|