X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb/blobdiff_plain/fb2149fc2dc1d5f4936b2af31be7c7bd02f83324..0bef29cbe2f62ebe6b69faffc29c0634a21b814e:/m4/mdw-define-paths.m4 diff --git a/m4/mdw-define-paths.m4 b/m4/mdw-define-paths.m4 index d3089e69..52537747 100644 --- a/m4/mdw-define-paths.m4 +++ b/m4/mdw-define-paths.m4 @@ -1,27 +1,64 @@ dnl -*-autoconf-*- -dnl --- *@-mdw_DEFINE_PATHS-@* -dnl -dnl Author: Mark Wooding -dnl -dnl Synopsis: mdw_DEFINE_PATHS(CODE) -dnl -dnl Arguments: CODE = shell script code to execute -dnl -dnl Use: Fixes up various variables so that pathname defines can be -dnl defined. Within CODE, you may use the following macros: -dnl -dnl mdw_PROG(NAME) Transformed program name -dnl -dnl mdw_PATH(PATH) Expanded path (may contain variables) -dnl -dnl mdw_DEFINE_PROG(SYMBOL, PROG) -dnl Define a symbol as a transformed -dnl program name. -dnl -dnl mdw_DEFINE_PATH(SYMBOL, NAME) -dnl Define a symbol as an expanded path +### SYNOPSIS +### +### mdw_DEFINE_PATHS(BODY) +### +### mdw_PROG(PROG) +### mdw_PATH(PATH) +### mdw_DEFINE_PROG(SYMBOL, PROG) +### mdw_DEFINE_PATH(SYMBOL, PATH) +### +### DESCRIPTION +### +### This collection of macros is useful for hardcoding pathname strings +### into binary programs. +### +### Within the BODY of `mdw_DEFINE_PATHS', a number of variables are `fixed +### up' so that they can be properly expanded. The other macros are only +### really useful within this body. +### +### `mdw_PROG' expands, in the shell, to the transformed name of the +### program PROG. +### +### `mdw_PATH' expands, in the shell, to the recursive expansion of PATH, +### which should be a string containing parameter expansions. +### +### `mdw_DEFINE_PROG' is a convenience macro which defines the preprocessor +### SYMBOL to the result of `mdw_PROG(PROG)'; similarly `mdw_DEFINE_PATH' +### defines SYMBOL to the result of `mdw_PATH(PATH)'. +### +### LICENSE +### +### Copyright (c) 2002 Mark Wooding +### +### This program is free software: you can redistribute it and/or modify it +### under the terms of the GNU General Public License as published by the +### Free Software Foundation, either version 2 of the License, or (at your +### option) any later version. +### +### This program is distributed in the hope that it will be useful, but +### WITHOUT ANY WARRANTY; without even the implied warranty of +### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +### General Public License for more details. +### +### You should have received a copy of the GNU General Public License along +### with this program. If not, see . +### +### As a special exception, the respective Autoconf Macro's copyright owner +### gives unlimited permission to copy, distribute and modify the configure +### scripts that are the output of Autoconf when processing the Macro. You +### need not follow the terms of the GNU General Public License when using +### or distributing such scripts, even though portions of the text of the +### Macro appear in them. The GNU General Public License (GPL) does govern +### all other use of the material that constitutes the Autoconf Macro. +### +### This special exception to the GPL applies to versions of the Autoconf +### Macro released by the Autoconf Archive. When you make and distribute a +### modified version of the Autoconf Macro, you may extend this special +### exception to the GPL to apply to your modified version as well. +# serial 1 AC_DEFUN([mdw_DEFINE_PATHS], [mdw_prefix=$prefix mdw_exec_prefix=$exec_prefix mdw_transform=`echo "$program_transform_name"|sed 's,\\\\\\\\,\\\\,g; s,\\$\\$,$,g'`