solanum/aclocal.m4
Nathan Phillip Brink c74836dc4a Add explicit support for being installed into a system triggered with --enable-fhs-paths.
Add two mechanism for avoiding name-collisions in a system-wide
installation of charybdis. The ssld and bandb daemons, intended to be
directly used by ircd and not the user, install into libexec when
--enable-fhs-paths is set. For binaries which are meant to be in PATH
(bindir), such as ircd and viconf, there is now an option
--with-program-prefix=progprefix inspired by automake. If the user
specifies --with-program-prefix=charybdis, the ircd binary is named
charybdisircd when installed.

Add support for saving the pidfile to a rundir and storing the ban
database in localstatedir instead of in sysconfdir. This is, again,
conditional on --enable-fhs-paths.

Fix(?) genssl.sh to always write created SSL key/certificate/dh
parameters to the sysconfdir specified during ./configure. The
previous behavior was to assume that the user ran genssl.sh after
ensuring that his current working directory was either sysconfdir or a
sibling directory of sysconfdir.
2012-03-01 02:41:09 +00:00

55 lines
1.5 KiB
Plaintext

# $Id: aclocal.m4 3321 2007-03-30 23:32:43Z jilles $ - aclocal.m4 - Autoconf fun...
AC_DEFUN([AC_DEFINE_DIR], [
test "x$prefix" = xNONE && prefix="$ac_default_prefix"
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
last_ac_define_dir=`eval echo [$]$2`
ac_define_dir=`eval echo [$]last_ac_define_dir`
while test "x[$]last_ac_define_dir" != "x[$]ac_define_dir"; do
last_ac_define_dir="[$]ac_define_dir"
ac_define_dir=`eval echo [$]last_ac_define_dir`
done
$1="$ac_define_dir"
AC_SUBST($1)
ifelse($3, ,
AC_DEFINE_UNQUOTED($1, "$ac_define_dir"),
AC_DEFINE_UNQUOTED($1, "$ac_define_dir", $3))
])
AC_DEFUN([AC_SUBST_DIR], [
ifelse($2,,,$1="[$]$2")
$1=`(
test "x$prefix" = xNONE && prefix="$ac_default_prefix"
test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
eval echo \""[$]$1"\"
)`
AC_SUBST($1)
])
dnl CHARYBDIS_C_GCC_TRY_FLAGS(<warnings>,<cachevar>)
AC_DEFUN([CHARYBDIS_C_GCC_TRY_FLAGS],[
AC_MSG_CHECKING([GCC flag(s) $1])
if test "${GCC-no}" = yes
then
AC_CACHE_VAL($2,[
oldcflags="${CFLAGS-}"
CFLAGS="${CFLAGS-} ${CWARNS} $1 -Werror"
AC_TRY_COMPILE([
#include <string.h>
#include <stdio.h>
int main(void);
],[
(void)strcmp("a","b"); fprintf(stdout,"test ok\n");
], [$2=yes], [$2=no])
CFLAGS="${oldcflags}"])
if test "x$$2" = xyes; then
CWARNS="${CWARNS}$1 "
AC_MSG_RESULT(ok)
else
$2=''
AC_MSG_RESULT(no)
fi
else
AC_MSG_RESULT(no, not using GCC)
fi
])