diff --git a/.gitignore b/.gitignore index fa95497..b7d90ba 100644 --- a/.gitignore +++ b/.gitignore @@ -22,6 +22,8 @@ TAGS radsecproxy radsecproxy-conf radsecproxy-hash +radsecproxy.1 +radsecproxy.conf.5 build-aux/* tests/t_fticks tests/t_rewrite diff --git a/README b/README index 5576b5e..9ce2df2 100644 --- a/README +++ b/README @@ -13,9 +13,9 @@ support. Without any special options to configure, all transports supported by the system will be enabled. See the output from "./configure --help" for how to change this. -To use radsecproxy you need to create a config file which is normally -found in /usr/local/etc/radsecproxy.conf. You can also specify the -location with the "-c" command line option (see below). For further +To use radsecproxy you need to create a config file which is normally found in +/etc/radsecproxy.conf or /usr/local/etc/radsecproxy.conf. You can also specify +the location with the "-c" command line option (see below). For further instructions, please see the enclosed example file and the manpages radsecproxy(1) and radsecproxy.conf(5) diff --git a/configure.ac b/configure.ac index 55d0921..4d53e89 100644 --- a/configure.ac +++ b/configure.ac @@ -92,6 +92,16 @@ if test "x$dtls" = "xyes" ; then TARGET_CFLAGS="$TARGET_CFLAGS -DRADPROT_DTLS" fi +dnl Substitute variables such as sysconfdir +AC_CONFIG_FILES([radsecproxy.1 radsecproxy.conf.5]) + +dnl Expand sysconfdir early to avoid two layers of substitution +test "x$prefix" = xNONE && prefix=$ac_default_prefix +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' +SYSCONFDIR=`eval echo $sysconfdir` +SYSCONFDIR=`eval echo $SYSCONFDIR` +AC_SUBST(SYSCONFDIR) + AC_SUBST(TARGET_CFLAGS) AC_SUBST(TARGET_LDFLAGS) AX_CHECK_SSL diff --git a/radsecproxy.1 b/radsecproxy.1.in similarity index 98% rename from radsecproxy.1 rename to radsecproxy.1.in index b556ba7..5a5c9e0 100644 --- a/radsecproxy.1 +++ b/radsecproxy.1.in @@ -84,7 +84,7 @@ This signal is ignored. .SH "FILES" .TP -.B /usr/local/etc/radsecproxy.conf +.B @SYSCONFDIR@/radsecproxy.conf .sp The default configuration file. diff --git a/radsecproxy.conf-example b/radsecproxy.conf-example index c9347ee..1730e55 100644 --- a/radsecproxy.conf-example +++ b/radsecproxy.conf-example @@ -1,5 +1,4 @@ -# Master config file, must be in /usr/local/etc/radsecproxy or specified with -c option -# All possible config options are listed below +# Master config file, all possible config options are listed below # First you may define any global options, these are: # diff --git a/radsecproxy.conf.5 b/radsecproxy.conf.5.in similarity index 99% rename from radsecproxy.conf.5 rename to radsecproxy.conf.5.in index 5a30425..5b79e82 100644 --- a/radsecproxy.conf.5 +++ b/radsecproxy.conf.5.in @@ -6,7 +6,7 @@ radsecproxy.conf \- Radsec proxy configuration file .SH DESCRIPTION When the proxy server starts, it will first check the command line arguments, and then read the configuration file. Normally radsecproxy will read the -configuration file \fI/usr/local/etc/radsecproxy.conf\fR. The command line +configuration file \fI@SYSCONFDIR@/radsecproxy.conf\fR. The command line \fB\-c\fR option can be used to instead read an alternate file (see \fBradsecproxy\fR(1) for details). @@ -79,7 +79,7 @@ be included. The value can be a single file, or it can use normal shell globbing to specify multiple files, e.g.: .RS -include /usr/local/etc/radsecproxy.conf.d/*.conf +include @SYSCONFDIR@/radsecproxy.conf.d/*.conf .RE The files are sorted alphabetically. Included files are read in the order they