dnl Process this file with autoconf to produce a configure script. AC_INIT(dirlist2.cgi, 2.9, slawrance@yahoo.com, dirlist2) AM_INIT_AUTOMAKE(dirlist2.cgi, 2.9) AM_CONFIG_HEADER(config.h) AC_PROG_CC AM_PROG_CC_STDC AC_PROG_RANLIB AC_PROG_CC_C_O dnl Program version information AC_DEFINE(DIRLIST_VERSION_MAJOR, 2, Major version number) AC_DEFINE(DIRLIST_VERSION_MINOR, 9, Minor version number) AC_DEFINE(DIRLIST_VERSION_FILELOWEST, 2, Lowest minor version number that this version can load an index from) dnl Checks for header files. AC_HEADER_DIRENT AC_HEADER_STDC AC_CHECK_HEADERS(fcntl.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_SIZE_T AC_C_BIGENDIAN AC_CHECK_SIZEOF(char *) AC_C_INLINE AC_C_CONST dnl Checks for library functions. AC_FUNC_MEMCMP AC_FUNC_VPRINTF AC_CHECK_FUNCS(strdup strstr strtoul strcasecmp getpwnam vsnprintf snprintf) dnl Checks parameters AC_MSG_CHECKING(whether to include Packet Mangler weak encryption) AC_ARG_WITH(packetmangler, [--with-packetmangler Include Packet Mangler weak encryption. (default=yes)], [ if test "$withval" = "no"; then AC_MSG_RESULT(no) else AC_DEFINE(DIRLIST_USE_PACKETMANGLER, 1, Use PacketMangler) AC_MSG_RESULT(yes) fi ],[ AC_DEFINE(DIRLIST_USE_PACKETMANGLER, 1, Use PacketMangler) AC_MSG_RESULT(yes) ]) AC_MSG_CHECKING(the e-mail address domain to use) AC_ARG_WITH(emaildomain, [--with-emaildomain Default e-mail address domain to add to usernames if no default domain is set (default=localhost)], [ AC_DEFINE_UNQUOTED(DIRLIST_EMAILDOMAIN, "$withval", E-Mail domain) AC_MSG_RESULT("$withval") ],[ DOMAINNAME=localhost AC_DEFINE_UNQUOTED(DIRLIST_EMAILDOMAIN, "$DOMAINNAME", E-Mail domain) AC_MSG_RESULT("$DOMAINNAME") ]) AC_MSG_CHECKING(the name of user HTML subdirectories) AC_ARG_WITH(user-publichtml, [--with-user-publichtml The default name of user HTML subdirectories if the value is not set (default=public_html)], [ AC_DEFINE_UNQUOTED(DIRLIST_WEBDOCS, "$withval", WebDocs Folder) AC_MSG_RESULT("$withval") ],[ AC_DEFINE_UNQUOTED(DIRLIST_WEBDOCS, "public_html", WebDocs Folder) AC_MSG_RESULT("public_html") ]) AC_PATH_PROG(PROG_SENDMAIL, sendmail, /usr/lib/sendmail, $PATH /usr/bin /usr/sbin /usr/etc /etc /usr/ucblib) AC_MSG_CHECKING(to see if auditing will be compiled in (requires sendmail)) if test -n "$PROG_SENDMAIL"; then AC_DEFINE_UNQUOTED(HAVE_SENDMAIL, "$PROG_SENDMAIL", Path to sendmail) AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) fi AC_OUTPUT(Makefile src/Makefile)