Skip to content

Commit

Permalink
Fix directfbrc location in the manual page.
Browse files Browse the repository at this point in the history
Document the actual directfbrc location in the manual page. This requires
expansion of $sysconfdir so borrow the AS_AC_EXPAND m4 macro from GStreamer.
  • Loading branch information
syrjala committed Aug 28, 2007
1 parent 4a88acc commit 1bce6d2
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 4 deletions.
2 changes: 2 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## Makefile.am for DirectFB

ACLOCAL_AMFLAGS = -I m4

if HAVE_LINUX
LINUXONLY_DIRS = inputdrivers gfxdrivers
endif
Expand Down
2 changes: 1 addition & 1 deletion autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ esac
echo
echo
echo Running aclocal ...
aclocal $ACLOCAL_FLAGS
aclocal -I m4 $ACLOCAL_FLAGS

echo Running libtoolize ...
libtoolize --automake
Expand Down
1 change: 1 addition & 0 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -1410,6 +1410,7 @@ AC_SUBST(MODULEDIR)
AC_SUBST(MODULEDIRNAME)
AC_SUBST(INCLUDEDIR)
AC_SUBST(INTERNALINCLUDEDIR)
AS_AC_EXPAND(SYSCONFDIR, $sysconfdir)

CFLAGS="$CFLAGS -Werror-implicit-function-declaration"

Expand Down
6 changes: 3 additions & 3 deletions docs/directfbrc.5.in
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ The
.B directfbrc
file is a configuration file read by all DirectFB applications on startup.
There are two of these: a system-wide one stored in
.I /etc/directfbrc
.I @SYSCONFDIR@/directfbrc
and a per-user
.I
\fB$HOME\fP/.directfbrc
which may override system settings.

Further customization is available per executable (basename of argv[0]):
.I /etc/directfbrc.$0
.I @SYSCONFDIR@/directfbrc.$0
and a per-user
.I
\fB$HOME\fP/.directfbrc.$0
Expand Down Expand Up @@ -546,7 +546,7 @@ version of the DirectFB library as well as a number of applications.
.SH FILES

.TP
.I /etc/directfbrc
.I @SYSCONFDIR@/directfbrc
system-wide DirectFB configuration file
.TP
.I $HOME/.directfbrc
Expand Down
43 changes: 43 additions & 0 deletions m4/as-ac-expand.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
dnl as-ac-expand.m4 0.2.0
dnl autostars m4 macro for expanding directories using configure's prefix
dnl [email protected]

dnl AS_AC_EXPAND(VAR, CONFIGURE_VAR)
dnl example
dnl AS_AC_EXPAND(SYSCONFDIR, $sysconfdir)
dnl will set SYSCONFDIR to /usr/local/etc if prefix=/usr/local

AC_DEFUN([AS_AC_EXPAND],
[
EXP_VAR=[$1]
FROM_VAR=[$2]
dnl first expand prefix and exec_prefix if necessary
prefix_save=$prefix
exec_prefix_save=$exec_prefix
dnl if no prefix given, then use /usr/local, the default prefix
if test "x$prefix" = "xNONE"; then
prefix="$ac_default_prefix"
fi
dnl if no exec_prefix given, then use prefix
if test "x$exec_prefix" = "xNONE"; then
exec_prefix=$prefix
fi
full_var="$FROM_VAR"
dnl loop until it doesn't change anymore
while true; do
new_full_var="`eval echo $full_var`"
if test "x$new_full_var" = "x$full_var"; then break; fi
full_var=$new_full_var
done
dnl clean up
full_var=$new_full_var
AC_SUBST([$1], "$full_var")
dnl restore prefix and exec_prefix
prefix=$prefix_save
exec_prefix=$exec_prefix_save
])

0 comments on commit 1bce6d2

Please sign in to comment.