summaryrefslogtreecommitdiff
path: root/aclocal.m4
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2000-05-08 20:49:37 +1000
committerDamien Miller <djm@mindrot.org>2000-05-08 20:49:37 +1000
commit61e50f10c276009bf9472fdd797bf6be60fc2a83 (patch)
tree1ae3e2eacd6fba48e06e38cdf0570d97cb8a04bf /aclocal.m4
parent6d48871fafed89fe878f44744a1abc0f5a47afb4 (diff)
- Configure caching and cleanup patch from Andre Lucas'
<andre.lucas@dial.pipex.com>
Diffstat (limited to 'aclocal.m4')
-rw-r--r--aclocal.m440
1 files changed, 35 insertions, 5 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index 65783346b..16345e122 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,15 +1,45 @@
1dnl $Id: aclocal.m4,v 1.1 2000/05/01 23:57:51 damien Exp $ 1dnl $Id: aclocal.m4,v 1.2 2000/05/08 10:49:37 damien Exp $
2dnl 2dnl
3dnl OpenSSH-specific autoconf macros 3dnl OpenSSH-specific autoconf macros
4dnl 4dnl
5 5
6dnl AC_PATH_ENTROPY_PROG(variablename, command): 6
7dnl OSSH_CHECK_HEADER_FOR_FIELD(field, header, symbol)
8dnl Does AC_EGREP_HEADER on 'header' for the string 'field'
9dnl If found, set 'symbol' to be defined. Cache the result.
10dnl TODO: This is not foolproof, better to compile and read from there
11AC_DEFUN(OSSH_CHECK_HEADER_FOR_FIELD, [
12# look for field '$1' in header '$2'
13 dnl This strips characters illegal to m4 from the header filename
14 ossh_safe=`echo "$2" | sed 'y%./+-%__p_%'`
15 dnl
16 ossh_varname="ossh_cv_$ossh_safe""_has_"$1
17 AC_MSG_CHECKING(for $1 field in $2)
18 AC_CACHE_VAL($ossh_varname, [
19 AC_EGREP_HEADER($1, $2, [ dnl
20 eval "$ossh_varname=yes" dnl
21 ], [ dnl
22 eval "$ossh_varname=no" dnl
23 ]) dnl
24 ])
25 ossh_result=`eval "echo "$"$ossh_varname"`
26 if test -n "`echo $ossh_varname`"; then
27 AC_MSG_RESULT($ossh_result)
28 if test "x$ossh_result" = "xyes"; then
29 AC_DEFINE($3)
30 fi
31 else
32 AC_MSG_RESULT(no)
33 fi
34])
35
36dnl OSSH_PATH_ENTROPY_PROG(variablename, command):
7dnl Tidiness function, sets 'undef' if not found, and does the AC_SUBST 37dnl Tidiness function, sets 'undef' if not found, and does the AC_SUBST
8AC_DEFUN(AC_PATH_ENTROPY_PROG, [ 38AC_DEFUN(OSSH_PATH_ENTROPY_PROG, [
9 AC_PATH_PROG([$1], [$2]) 39 AC_PATH_PROG($1, $2)
10 if test -z "[$]$1" ; then 40 if test -z "[$]$1" ; then
11 $1="undef" 41 $1="undef"
12 fi 42 fi
13 AC_SUBST([$1]) 43 AC_SUBST($1)
14]) 44])
15 45