debian: Ignore debhelper logs.
[cfd] / aclocal.glob
... / ...
CommitLineData
1dnl -*-autoconf-*- *@--GLOB-HEADER--@*
2dnl
3dnl Common library of autoconf macros
4dnl
5dnl (c) 1997 Mark Wooding, except for macros and documentation where noted.
6dnl
7
8dnl----- Licensing notice ---------------------------------------------------
9dnl
10dnl This file is part of the Common Files Distribution (`common')
11dnl
12dnl `Common' is free software; you can redistribute it and/or modify
13dnl it under the terms of the GNU General Public License as published by
14dnl the Free Software Foundation; either version 2 of the License, or
15dnl (at your option) any later version.
16dnl
17dnl `Common' is distributed in the hope that it will be useful,
18dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
19dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20dnl GNU General Public License for more details.
21dnl
22dnl You should have received a copy of the GNU General Public License
23dnl along with `common'; if not, write to the Free Software Foundation,
24dnl Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25
26dnl *@--NOTICE--@* Common File Distribution
27
28dnl --- *@-mdw_AUTO_VERSION-@* ---
29dnl
30dnl Author: Mark Wooding
31dnl
32dnl Synopsis: mdw_AUTO_VERSION
33dnl
34dnl Arguments: ---
35dnl
36dnl Use: Defines an m4 macro AUTO_VERSION which contains the current
37dnl version number, worked out in some clever way.
38
39AC_DEFUN([mdw_AUTO_VERSION], [nobody cares...])
40m4_define([mdw_AUTO_VERSION], [m4_define([AUTO_VERSION], m4_esyscmd([
41 ver=UNKNOWN
42 for pre in ./ config/; do
43 for post in "" .in; do
44 try=${pre}auto-version${post}
45 if test -x $try; then ver=$("$try"); break; fi
46 done
47 done
48 echo -n "$ver"
49]))])
50
51dnl --- *@-mdw_LIBTOOL_VERSION_INFO-@* ---
52dnl
53dnl Author: Mark Wooding
54dnl
55dnl Synopsis: mdw_LIBTOOL_VERSION
56dnl
57dnl Arguments: ---
58dnl
59dnl Use: Decodes the PACKAGE_VERSION variable as a libtool
60dnl version-info string. Strictly speaking, this is very
61dnl naughty.
62
63AC_DEFUN([mdw_LIBTOOL_VERSION_INFO], [
64 set -- $(echo $PACKAGE_VERSION |
65 sed 's:[^.*\([0-9][0-9]*\)\.\([0-9][0-9]*\)\.\([0-9][0-9]*\).*$]:\1 \2 \3:'
66 )
67 LIBTOOL_VERSION_INFO="$(expr $[]1 + $[]2):$[]3:$[]2"
68 AC_SUBST([LIBTOOL_VERSION_INFO])
69])
70
71dnl --- *@-mdw_DECL_ENVIRON-@* ---
72dnl
73dnl Author: Mark Wooding
74dnl
75dnl Synopsis: mdw_DECL_ENVIRON
76dnl
77dnl Arguments: ---
78dnl
79dnl Use: Searches for a declaration of the global `environ' variable.
80dnl If one is found in one of the `usual' places, DECL_ENVIRON
81dnl is defined as a preprocessor symbol.
82
83AC_DEFUN([mdw_DECL_ENVIRON],
84[AC_CACHE_CHECK([for declaration of \`environ'], mdw_cv_environ,
85[AC_EGREP_CPP([\<environ\>],
86[#include <sys/types.h>
87#if HAVE_UNISTD_H
88#include <unistd.h>
89#endif
90#if STDC_HEADERS
91#include <stdlib.h>
92#include <stddef.h>
93#endif], [mdw_cv_environ=yes], [mdw_cv_environ=no])])
94if test $mdw_cv_environ = yes; then
95 AC_DEFINE([DECL_ENVIRON], [1],
96 [Define if you have the `environ' vector of environment variables.])
97fi])
98
99dnl --- *@-mdw_DEFINE_PATHS-@*
100dnl
101dnl Author: Mark Wooding
102dnl
103dnl Synopsis: mdw_DEFINE_PATHS(CODE)
104dnl
105dnl Arguments: CODE = shell script code to execute
106dnl
107dnl Use: Fixes up various variables so that pathname defines can be
108dnl defined. Within CODE, you may use the following macros:
109dnl
110dnl mdw_PROG(NAME) Transformed program name
111dnl
112dnl mdw_PATH(PATH) Expanded path (may contain variables)
113dnl
114dnl mdw_DEFINE_PROG(SYMBOL, PROG)
115dnl Define a symbol as a transformed
116dnl program name.
117dnl
118dnl mdw_DEFINE_PATH(SYMBOL, NAME)
119dnl Define a symbol as an expanded path
120
121AC_DEFUN([mdw_DEFINE_PATHS],
122[mdw_prefix=$prefix mdw_exec_prefix=$exec_prefix
123mdw_transform=`echo "$program_transform_name"|sed 's,\\\\\\\\,\\\\,g; s,\\$\\$,$,g'`
124test "$prefix" = "NONE" && prefix=$ac_default_prefix
125test "$exec_prefix" = "NONE" && exec_prefix=$prefix
126$1
127prefix=$mdw_prefix exec_prefix=$mdw_exec_prefix])
128
129AC_DEFUN([mdw_PROG], [`echo "$1"|sed "$mdw_transform"`])
130AC_DEFUN([mdw_PATH], [dnl
131`t="$1"; dnl
132while :; do dnl
133case "$t" in dnl
134*\\$[]*) t=\`eval echo "$t"\`;; dnl
135*) break;; dnl
136esac; done; dnl
137echo "$t"`])
138AC_DEFUN([mdw_DEFINE_PROG],
139 [AC_DEFINE_UNQUOTED([$1], ["mdw_PROG([$2])"],
140 [Program name for $2.])])
141AC_DEFUN([mdw_DEFINE_PATH], [AC_DEFINE_UNQUOTED([$1], ["mdw_PATH([$2])"],
142 [Pathname for $2.])])
143
144dnl --- *@-mdw_MANEXT-@* ---
145dnl
146dnl Author: Mark Wooding
147dnl
148dnl Synopsis: mdw_MANEXT
149dnl
150dnl Arguments: ---
151dnl
152dnl Use: Sets the substitution `manext' for man page extensions.
153
154AC_DEFUN([mdw_MANEXT], [
155AC_ARG_WITH([man-ext],
156[ --with-man-ext=EXT give manpages the EXT extension (e.g., foo.3EXT)],
157[manext=$withval], [manext=mLib])
158AC_SUBST(manext)])
159
160dnl----- That's all, folks --------------------------------- *@--GLOB-END--@*