--- configure 2005-10-25 00:55:00.000000000 +0200 +++ configure.new 2005-10-25 00:15:01.000000000 +0200 @@ -16504,6 +16504,40 @@ lisp_LISP='$(LISPSRC)' fi +anubis_save_prefix="$prefix" +anubis_save_exec_prefix="$exec_prefix" +test "x$prefix" = xNONE && prefix=$ac_default_prefix +test "x$exec_prefix" = xNONE && exec_prefix=$prefix + +packagesrcdir=`cd $srcdir && pwd` +systemdatadir=`eval echo ${datadir}` +systemconfdir=`eval echo ${sysconfdir}` +packagedatadir=`eval echo ${datadir}/${PACKAGE}` +packagedocdir=`eval echo ${datadir}/doc/${PACKAGE}` + +prefix="$anubis_save_prefix" +exec_prefix="$anubis_save_exec_prefix" + + +cat >>confdefs.h <<_ACEOF +#define SYSTEM_DATA_DIR "${systemdatadir}" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define SYSTEM_CONF_DIR "${systemconfdir}" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_DATA_DIR "${packagedatadir}" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_DOC_DIR "${packagedocdir}" +_ACEOF + ac_config_files="$ac_config_files Makefile build/Makefile build/guile-1.6/Makefile contrib/Makefile doc/Makefile elisp/Makefile examples/Makefile examples/pam/Makefile guile/Makefile intl/Makefile lib/Makefile po/Makefile.in scripts/Makefile src/Makefile testsuite/Makefile testsuite/data/Makefile testsuite/etc/Makefile" --- config.h.in 2004-12-18 12:20:42.000000000 +0100 +++ config.h.in.new 2005-10-25 00:15:01.000000000 +0200 @@ -416,6 +416,18 @@ /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS +/* System config directory */ +#undef SYSTEM_DATA_DIR + +/* System config directory */ +#undef SYSTEM_CONF_DIR + +/* Package data directory */ +#undef PACKAGE_DATA_DIR + +/* Package doc directory */ +#undef PACKAGE_DOC_DIR + /* Define to 1 if USE_GNUTLS is requested. */ #undef USE_GNUTLS --- src/headers.h 2004-12-17 17:51:59.000000000 +0100 +++ src/headers.h.new 2005-10-25 00:20:43.000000000 +0200 @@ -175,7 +175,11 @@ #define MAXCLIENTS 50 #define LINEBUFFER 512 #define DATABUFFER 4096 -#define DEFAULT_GLOBAL_RCFILE "/etc/anubisrc" + +#ifndef SYSTEM_CONF_DIR +# define DEFAULT_GLOBAL_RCFILE "/etc/anubisrc" +#endif + #define DEFAULT_LOCAL_RCFILE ".anubisrc" #define DEFAULT_SSL_PEM "anubis.pem" #define DEFAULT_SIGFILE ".signature" --- src/rcfile.c 2004-12-17 17:52:40.000000000 +0100 +++ src/rcfile.c.new 2005-10-25 00:48:46.000000000 +0200 @@ -156,6 +156,9 @@ { char homedir[MAXPATHLEN + 1]; char *rcfile = 0; +#ifdef SYSTEM_CONF_DIR + char tmprcfile[256]; +#endif RC_SECTION *sec; switch (method) { @@ -166,7 +169,16 @@ rcfile = strdup (options.altrc); } else if (check_superuser ()) + { +#ifndef SYSTEM_CONF_DIR rcfile = strdup (DEFAULT_GLOBAL_RCFILE); +#else + strcpy(tmprcfile, SYSTEM_CONF_DIR); + strcat(tmprcfile, "/anubisrc"); + + rcfile = strdup (tmprcfile); +#endif + } else { get_homedir (session.supervisor, homedir, sizeof (homedir));