2002-12-10 20:24:10 +08:00
|
|
|
AC_INIT(src/zm.h)
|
2003-01-13 18:51:00 +08:00
|
|
|
AM_INIT_AUTOMAKE(zm,0.9.8)
|
2002-12-10 20:24:10 +08:00
|
|
|
AM_CONFIG_HEADER(config.h)
|
2002-09-17 01:10:34 +08:00
|
|
|
|
|
|
|
AC_ARG_WITH(mysql,
|
|
|
|
[ --with-mysql=<path> prefix of MySQL installation. e.g. /usr/local or /usr],
|
|
|
|
[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)
|
|
|
|
MYSQL_LIBS="-L${MYSQL_PREFIX}/lib/mysql -lmysqlclient"
|
|
|
|
MYSQL_CFLAGS="-I${MYSQL_PREFIX}/include"
|
|
|
|
AC_SUBST(MYSQL_LIBS)
|
|
|
|
AC_SUBST(MYSQL_CFLAGS)
|
|
|
|
|
2002-12-11 07:02:35 +08:00
|
|
|
# Ask user for path to web stuff:.
|
|
|
|
AC_ARG_WITH(webdir,
|
|
|
|
[ --with-webdir=<path> prefix of web directory. e.g. /var/www/html or /www/vhtdocs/<site>],
|
|
|
|
[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,
|
|
|
|
[ --with-cgidir=<path> prefix of cgi directory. e.g. /var/www/cgi-bin or /www/vhtdocs/<site>/cgi-bin],
|
|
|
|
[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,
|
|
|
|
[ --with-webuser=<user> username of web user. e.g. apache or web],
|
|
|
|
[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,
|
|
|
|
[ --with-webgroup=<group> groupname of web group. e.g. apache or web],
|
|
|
|
[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
|
|
|
|
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))
|
|
|
|
#AC_CHECK_LIB(mysqlclient,mysql_init,,AC_MSG_ERROR(zm requires libmysqlclient.a))
|
|
|
|
|
|
|
|
AC_SUBST(bindir)
|
|
|
|
|
2003-01-14 19:49:25 +08:00
|
|
|
AC_OUTPUT(Makefile src/Makefile src/zmcfg.h web/Makefile web/zmconfig.php scripts/Makefile db/Makefile scripts/zmdc.pl scripts/zmx10.pl scripts/zmaudit.pl scripts/zmfilter.pl scripts/zmwatch.pl scripts/zmpkg.pl scripts/zm)
|
2002-09-17 01:10:34 +08:00
|
|
|
|