#! /bin/sh
#
# build-radpaths-h
#		Script to generate radpaths.h file. This is needed to
#		work around the weird way "autoconf" substitutes things
#		that are generated in anyway from a command line
#		argument having to do with a path (--prefix etc)
#
# Version:	$Id: 506a21be67f420b7f4461657550eb57955b06630 $
#

# Location of files.
prefix=/usr
exec_prefix=${prefix}
sysconfdir=${prefix}/etc
localstatedir=/var
libdir=/usr/lib64/freeradius
bindir=${exec_prefix}/bin
sbindir=${exec_prefix}/sbin
mandir=${datarootdir}/man
logdir=/var/log/radius
raddbdir=/etc/raddb
dictdir=${datarootdir}/freeradius
radacctdir=/var/log/radius/radacct
datarootdir=${prefix}/share

cat <<EOF > radpaths.h
/* Automatically generated by "build-radpaths-h" */
#define LOGDIR		"/var/log/radius"
#define LIBDIR		"/usr/lib64/freeradius"
#define RADDBDIR	"/etc/raddb"
#define RUNDIR		"/var/run"
#define SBINDIR		"${exec_prefix}/sbin"
#define RADIR		"/var/log/radius/radacct"
#define DICTDIR		"${datarootdir}/freeradius"
EOF

