Mercurial > dropbear
annotate configure.ac @ 1873:2c9d635a1c04
Avoid unused argument warning when reexec is unused
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Thu, 03 Feb 2022 22:12:11 +0800 |
parents | 2b3a8026a6ce |
children |
rev | line source |
---|---|
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
1 # -*- Autoconf -*- |
28
45ee5ffd6ea0
Mention that autoheader should also be run
Matt Johnston <matt@ucc.asn.au>
parents:
4
diff
changeset
|
2 # Process this file with autoconf and autoheader to produce a configure script. |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
3 |
67 | 4 # This Autoconf file was cobbled from various locations. In particular, a bunch |
5 # of the platform checks have been taken straight from OpenSSH's configure.ac | |
6 # Huge thanks to them for dealing with the horrible platform-specifics :) | |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
7 |
1811
7dc92355a986
Remove some obselete autoconf bits.
Matt Johnston <matt@ucc.asn.au>
parents:
1798
diff
changeset
|
8 AC_PREREQ([2.59]) |
856
f56c41030c15
Replace some deprecated macros with other ones, from Daniel Richard G.
Matt Johnston <matt@ucc.asn.au>
parents:
835
diff
changeset
|
9 AC_INIT |
f56c41030c15
Replace some deprecated macros with other ones, from Daniel Richard G.
Matt Johnston <matt@ucc.asn.au>
parents:
835
diff
changeset
|
10 AC_CONFIG_SRCDIR(buffer.c) |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
11 |
1530 | 12 # Record which revision is being built |
1564
86e4995bbedf
more portable for `which hg` test
Matt Johnston <matt@ucc.asn.au>
parents:
1559
diff
changeset
|
13 if test -s "`which hg`" && test -d "$srcdir/.hg"; then |
1530 | 14 hgrev=`hg id -i -R "$srcdir"` |
1558
2f64cb3d3007
- #if not #ifdef for DROPBEAR_FUZZ
Matt Johnston <matt@ucc.asn.au>
parents:
1557
diff
changeset
|
15 AC_MSG_NOTICE([Source directory Mercurial base revision $hgrev]) |
1530 | 16 fi |
17 | |
1573 | 18 ORIGCFLAGS="$CFLAGS" |
1849
d34f50b7b9fd
Add configure --enable-werror argument
Matt Johnston <matt@ucc.asn.au>
parents:
1837
diff
changeset
|
19 LATE_CFLAGS="" |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
20 # Checks for programs. |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
21 AC_PROG_CC |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
22 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
23 if test -z "$LD" ; then |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
24 LD=$CC |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
25 fi |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
26 AC_SUBST(LD) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
27 |
1469
51043e868f55
Test for -Wno-pointer-sign, move CFLAGS tests into a macro
Matt Johnston <matt@ucc.asn.au>
parents:
1463
diff
changeset
|
28 AC_DEFUN(DB_TRYADDCFLAGS, |
51043e868f55
Test for -Wno-pointer-sign, move CFLAGS tests into a macro
Matt Johnston <matt@ucc.asn.au>
parents:
1463
diff
changeset
|
29 [{ |
51043e868f55
Test for -Wno-pointer-sign, move CFLAGS tests into a macro
Matt Johnston <matt@ucc.asn.au>
parents:
1463
diff
changeset
|
30 OLDFLAGS="$CFLAGS" |
51043e868f55
Test for -Wno-pointer-sign, move CFLAGS tests into a macro
Matt Johnston <matt@ucc.asn.au>
parents:
1463
diff
changeset
|
31 TESTFLAGS="$1" |
51043e868f55
Test for -Wno-pointer-sign, move CFLAGS tests into a macro
Matt Johnston <matt@ucc.asn.au>
parents:
1463
diff
changeset
|
32 CFLAGS="$CFLAGS $TESTFLAGS" |
51043e868f55
Test for -Wno-pointer-sign, move CFLAGS tests into a macro
Matt Johnston <matt@ucc.asn.au>
parents:
1463
diff
changeset
|
33 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], |
51043e868f55
Test for -Wno-pointer-sign, move CFLAGS tests into a macro
Matt Johnston <matt@ucc.asn.au>
parents:
1463
diff
changeset
|
34 [AC_MSG_NOTICE([Setting $TESTFLAGS])], |
51043e868f55
Test for -Wno-pointer-sign, move CFLAGS tests into a macro
Matt Johnston <matt@ucc.asn.au>
parents:
1463
diff
changeset
|
35 [AC_MSG_NOTICE([Not setting $TESTFLAGS]); CFLAGS="$OLDFLAGS" ] |
51043e868f55
Test for -Wno-pointer-sign, move CFLAGS tests into a macro
Matt Johnston <matt@ucc.asn.au>
parents:
1463
diff
changeset
|
36 ) |
51043e868f55
Test for -Wno-pointer-sign, move CFLAGS tests into a macro
Matt Johnston <matt@ucc.asn.au>
parents:
1463
diff
changeset
|
37 }]) |
51043e868f55
Test for -Wno-pointer-sign, move CFLAGS tests into a macro
Matt Johnston <matt@ucc.asn.au>
parents:
1463
diff
changeset
|
38 |
1427
f0e262a46d4e
set hardened compiler/linker flags by default
Matt Johnston <matt@ucc.asn.au>
parents:
1426
diff
changeset
|
39 # set compile flags prior to other tests |
1573 | 40 if test -z "$ORIGCFLAGS" && test "$GCC" = "yes"; then |
321
fa9c45d09727
change AC_MSG_RESULT to AC_MSG_NOTICE in configure.in, add AC_SYS_LARGEFILE
Matt Johnston <matt@ucc.asn.au>
parents:
262
diff
changeset
|
41 AC_MSG_NOTICE(No \$CFLAGS set... using "-Os -W -Wall" for GCC) |
1469
51043e868f55
Test for -Wno-pointer-sign, move CFLAGS tests into a macro
Matt Johnston <matt@ucc.asn.au>
parents:
1463
diff
changeset
|
42 CFLAGS="-Os -W -Wall" |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
43 fi |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
44 |
1469
51043e868f55
Test for -Wno-pointer-sign, move CFLAGS tests into a macro
Matt Johnston <matt@ucc.asn.au>
parents:
1463
diff
changeset
|
45 AC_MSG_NOTICE([Checking if compiler '$CC' supports -Wno-pointer-sign]) |
51043e868f55
Test for -Wno-pointer-sign, move CFLAGS tests into a macro
Matt Johnston <matt@ucc.asn.au>
parents:
1463
diff
changeset
|
46 DB_TRYADDCFLAGS([-Wno-pointer-sign]) |
51043e868f55
Test for -Wno-pointer-sign, move CFLAGS tests into a macro
Matt Johnston <matt@ucc.asn.au>
parents:
1463
diff
changeset
|
47 |
51043e868f55
Test for -Wno-pointer-sign, move CFLAGS tests into a macro
Matt Johnston <matt@ucc.asn.au>
parents:
1463
diff
changeset
|
48 AC_MSG_NOTICE([Checking if compiler '$CC' supports -fno-strict-overflow]) |
51043e868f55
Test for -Wno-pointer-sign, move CFLAGS tests into a macro
Matt Johnston <matt@ucc.asn.au>
parents:
1463
diff
changeset
|
49 DB_TRYADDCFLAGS([-fno-strict-overflow]) |
1416
33d90d219e03
Compile with -fno-strict-overflow if possible.
Matt Johnston <matt@ucc.asn.au>
parents:
1407
diff
changeset
|
50 |
1798
8dc43b30c6bf
Define _GNU_SOURCE properly, other header fixes
Matt Johnston <matt@ucc.asn.au>
parents:
1756
diff
changeset
|
51 # needed for various extensions. define early before autoconf tests |
8dc43b30c6bf
Define _GNU_SOURCE properly, other header fixes
Matt Johnston <matt@ucc.asn.au>
parents:
1756
diff
changeset
|
52 AC_DEFINE([_GNU_SOURCE], [], [Use GNU extensions if glibc]) |
8dc43b30c6bf
Define _GNU_SOURCE properly, other header fixes
Matt Johnston <matt@ucc.asn.au>
parents:
1756
diff
changeset
|
53 |
1446
b8764eee6bdb
add --enable-static configure argument. disable conflicting harden flags
Matt Johnston <matt@ucc.asn.au>
parents:
1444
diff
changeset
|
54 STATIC=0 |
b8764eee6bdb
add --enable-static configure argument. disable conflicting harden flags
Matt Johnston <matt@ucc.asn.au>
parents:
1444
diff
changeset
|
55 AC_ARG_ENABLE(static, |
1447
8f88f4290b22
document --enable-static in place of STATIC=1
Matt Johnston <matt@ucc.asn.au>
parents:
1446
diff
changeset
|
56 [ --enable-static Build static binaries], |
1446
b8764eee6bdb
add --enable-static configure argument. disable conflicting harden flags
Matt Johnston <matt@ucc.asn.au>
parents:
1444
diff
changeset
|
57 [ |
b8764eee6bdb
add --enable-static configure argument. disable conflicting harden flags
Matt Johnston <matt@ucc.asn.au>
parents:
1444
diff
changeset
|
58 if test "x$enableval" = "xyes"; then |
b8764eee6bdb
add --enable-static configure argument. disable conflicting harden flags
Matt Johnston <matt@ucc.asn.au>
parents:
1444
diff
changeset
|
59 STATIC=1 |
b8764eee6bdb
add --enable-static configure argument. disable conflicting harden flags
Matt Johnston <matt@ucc.asn.au>
parents:
1444
diff
changeset
|
60 AC_MSG_NOTICE(Static Build) |
b8764eee6bdb
add --enable-static configure argument. disable conflicting harden flags
Matt Johnston <matt@ucc.asn.au>
parents:
1444
diff
changeset
|
61 fi |
b8764eee6bdb
add --enable-static configure argument. disable conflicting harden flags
Matt Johnston <matt@ucc.asn.au>
parents:
1444
diff
changeset
|
62 ], []) |
b8764eee6bdb
add --enable-static configure argument. disable conflicting harden flags
Matt Johnston <matt@ucc.asn.au>
parents:
1444
diff
changeset
|
63 AC_SUBST(STATIC) |
b8764eee6bdb
add --enable-static configure argument. disable conflicting harden flags
Matt Johnston <matt@ucc.asn.au>
parents:
1444
diff
changeset
|
64 |
1427
f0e262a46d4e
set hardened compiler/linker flags by default
Matt Johnston <matt@ucc.asn.au>
parents:
1426
diff
changeset
|
65 hardenbuild=1 |
f0e262a46d4e
set hardened compiler/linker flags by default
Matt Johnston <matt@ucc.asn.au>
parents:
1426
diff
changeset
|
66 AC_ARG_ENABLE(harden, |
1444
bfed37d12d90
improve configure --help alignment
Matt Johnston <matt@ucc.asn.au>
parents:
1429
diff
changeset
|
67 [ --disable-harden Don't set hardened build flags], |
1427
f0e262a46d4e
set hardened compiler/linker flags by default
Matt Johnston <matt@ucc.asn.au>
parents:
1426
diff
changeset
|
68 [ |
f0e262a46d4e
set hardened compiler/linker flags by default
Matt Johnston <matt@ucc.asn.au>
parents:
1426
diff
changeset
|
69 if test "x$enableval" = "xno"; then |
f0e262a46d4e
set hardened compiler/linker flags by default
Matt Johnston <matt@ucc.asn.au>
parents:
1426
diff
changeset
|
70 hardenbuild=0 |
f0e262a46d4e
set hardened compiler/linker flags by default
Matt Johnston <matt@ucc.asn.au>
parents:
1426
diff
changeset
|
71 AC_MSG_NOTICE(Disabling hardened build flags) |
f0e262a46d4e
set hardened compiler/linker flags by default
Matt Johnston <matt@ucc.asn.au>
parents:
1426
diff
changeset
|
72 fi |
f0e262a46d4e
set hardened compiler/linker flags by default
Matt Johnston <matt@ucc.asn.au>
parents:
1426
diff
changeset
|
73 ], []) |
f0e262a46d4e
set hardened compiler/linker flags by default
Matt Johnston <matt@ucc.asn.au>
parents:
1426
diff
changeset
|
74 |
f0e262a46d4e
set hardened compiler/linker flags by default
Matt Johnston <matt@ucc.asn.au>
parents:
1426
diff
changeset
|
75 if test "$hardenbuild" -eq 1; then |
f0e262a46d4e
set hardened compiler/linker flags by default
Matt Johnston <matt@ucc.asn.au>
parents:
1426
diff
changeset
|
76 AC_MSG_NOTICE(Checking for available hardened build flags:) |
1446
b8764eee6bdb
add --enable-static configure argument. disable conflicting harden flags
Matt Johnston <matt@ucc.asn.au>
parents:
1444
diff
changeset
|
77 # relocation flags don't make sense for static builds |
b8764eee6bdb
add --enable-static configure argument. disable conflicting harden flags
Matt Johnston <matt@ucc.asn.au>
parents:
1444
diff
changeset
|
78 if test "$STATIC" -ne 1; then |
b8764eee6bdb
add --enable-static configure argument. disable conflicting harden flags
Matt Johnston <matt@ucc.asn.au>
parents:
1444
diff
changeset
|
79 # pie |
1469
51043e868f55
Test for -Wno-pointer-sign, move CFLAGS tests into a macro
Matt Johnston <matt@ucc.asn.au>
parents:
1463
diff
changeset
|
80 DB_TRYADDCFLAGS([-fPIE]) |
51043e868f55
Test for -Wno-pointer-sign, move CFLAGS tests into a macro
Matt Johnston <matt@ucc.asn.au>
parents:
1463
diff
changeset
|
81 |
1446
b8764eee6bdb
add --enable-static configure argument. disable conflicting harden flags
Matt Johnston <matt@ucc.asn.au>
parents:
1444
diff
changeset
|
82 OLDLDFLAGS="$LDFLAGS" |
b8764eee6bdb
add --enable-static configure argument. disable conflicting harden flags
Matt Johnston <matt@ucc.asn.au>
parents:
1444
diff
changeset
|
83 TESTFLAGS="-Wl,-pie" |
b8764eee6bdb
add --enable-static configure argument. disable conflicting harden flags
Matt Johnston <matt@ucc.asn.au>
parents:
1444
diff
changeset
|
84 LDFLAGS="$LDFLAGS $TESTFLAGS" |
b8764eee6bdb
add --enable-static configure argument. disable conflicting harden flags
Matt Johnston <matt@ucc.asn.au>
parents:
1444
diff
changeset
|
85 AC_LINK_IFELSE([AC_LANG_PROGRAM([])], |
b8764eee6bdb
add --enable-static configure argument. disable conflicting harden flags
Matt Johnston <matt@ucc.asn.au>
parents:
1444
diff
changeset
|
86 [AC_MSG_NOTICE([Setting $TESTFLAGS])], |
b8764eee6bdb
add --enable-static configure argument. disable conflicting harden flags
Matt Johnston <matt@ucc.asn.au>
parents:
1444
diff
changeset
|
87 [ |
b8764eee6bdb
add --enable-static configure argument. disable conflicting harden flags
Matt Johnston <matt@ucc.asn.au>
parents:
1444
diff
changeset
|
88 LDFLAGS="$OLDLDFLAGS" |
b8764eee6bdb
add --enable-static configure argument. disable conflicting harden flags
Matt Johnston <matt@ucc.asn.au>
parents:
1444
diff
changeset
|
89 TESTFLAGS="-pie" |
b8764eee6bdb
add --enable-static configure argument. disable conflicting harden flags
Matt Johnston <matt@ucc.asn.au>
parents:
1444
diff
changeset
|
90 LDFLAGS="$LDFLAGS $TESTFLAGS" |
b8764eee6bdb
add --enable-static configure argument. disable conflicting harden flags
Matt Johnston <matt@ucc.asn.au>
parents:
1444
diff
changeset
|
91 AC_LINK_IFELSE([AC_LANG_PROGRAM([])], |
b8764eee6bdb
add --enable-static configure argument. disable conflicting harden flags
Matt Johnston <matt@ucc.asn.au>
parents:
1444
diff
changeset
|
92 [AC_MSG_NOTICE([Setting $TESTFLAGS])], |
b8764eee6bdb
add --enable-static configure argument. disable conflicting harden flags
Matt Johnston <matt@ucc.asn.au>
parents:
1444
diff
changeset
|
93 [AC_MSG_NOTICE([Not setting $TESTFLAGS]); LDFLAGS="$OLDLDFLAGS" ] |
b8764eee6bdb
add --enable-static configure argument. disable conflicting harden flags
Matt Johnston <matt@ucc.asn.au>
parents:
1444
diff
changeset
|
94 ) |
b8764eee6bdb
add --enable-static configure argument. disable conflicting harden flags
Matt Johnston <matt@ucc.asn.au>
parents:
1444
diff
changeset
|
95 ] |
b8764eee6bdb
add --enable-static configure argument. disable conflicting harden flags
Matt Johnston <matt@ucc.asn.au>
parents:
1444
diff
changeset
|
96 ) |
b8764eee6bdb
add --enable-static configure argument. disable conflicting harden flags
Matt Johnston <matt@ucc.asn.au>
parents:
1444
diff
changeset
|
97 # readonly elf relocation sections (relro) |
b8764eee6bdb
add --enable-static configure argument. disable conflicting harden flags
Matt Johnston <matt@ucc.asn.au>
parents:
1444
diff
changeset
|
98 OLDLDFLAGS="$LDFLAGS" |
b8764eee6bdb
add --enable-static configure argument. disable conflicting harden flags
Matt Johnston <matt@ucc.asn.au>
parents:
1444
diff
changeset
|
99 TESTFLAGS="-Wl,-z,now -Wl,-z,relro" |
b8764eee6bdb
add --enable-static configure argument. disable conflicting harden flags
Matt Johnston <matt@ucc.asn.au>
parents:
1444
diff
changeset
|
100 LDFLAGS="$LDFLAGS $TESTFLAGS" |
b8764eee6bdb
add --enable-static configure argument. disable conflicting harden flags
Matt Johnston <matt@ucc.asn.au>
parents:
1444
diff
changeset
|
101 AC_LINK_IFELSE([AC_LANG_PROGRAM([])], |
b8764eee6bdb
add --enable-static configure argument. disable conflicting harden flags
Matt Johnston <matt@ucc.asn.au>
parents:
1444
diff
changeset
|
102 [AC_MSG_NOTICE([Setting $TESTFLAGS])], |
b8764eee6bdb
add --enable-static configure argument. disable conflicting harden flags
Matt Johnston <matt@ucc.asn.au>
parents:
1444
diff
changeset
|
103 [AC_MSG_NOTICE([Not setting $TESTFLAGS]); LDFLAGS="$OLDLDFLAGS" ] |
b8764eee6bdb
add --enable-static configure argument. disable conflicting harden flags
Matt Johnston <matt@ucc.asn.au>
parents:
1444
diff
changeset
|
104 ) |
b8764eee6bdb
add --enable-static configure argument. disable conflicting harden flags
Matt Johnston <matt@ucc.asn.au>
parents:
1444
diff
changeset
|
105 fi # non-static |
1427
f0e262a46d4e
set hardened compiler/linker flags by default
Matt Johnston <matt@ucc.asn.au>
parents:
1426
diff
changeset
|
106 # stack protector. -strong is good but only in gcc 4.9 or later |
f0e262a46d4e
set hardened compiler/linker flags by default
Matt Johnston <matt@ucc.asn.au>
parents:
1426
diff
changeset
|
107 OLDCFLAGS="$CFLAGS" |
f0e262a46d4e
set hardened compiler/linker flags by default
Matt Johnston <matt@ucc.asn.au>
parents:
1426
diff
changeset
|
108 TESTFLAGS="-fstack-protector-strong" |
f0e262a46d4e
set hardened compiler/linker flags by default
Matt Johnston <matt@ucc.asn.au>
parents:
1426
diff
changeset
|
109 CFLAGS="$CFLAGS $TESTFLAGS" |
f0e262a46d4e
set hardened compiler/linker flags by default
Matt Johnston <matt@ucc.asn.au>
parents:
1426
diff
changeset
|
110 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], |
f0e262a46d4e
set hardened compiler/linker flags by default
Matt Johnston <matt@ucc.asn.au>
parents:
1426
diff
changeset
|
111 [AC_MSG_NOTICE([Setting $TESTFLAGS])], |
f0e262a46d4e
set hardened compiler/linker flags by default
Matt Johnston <matt@ucc.asn.au>
parents:
1426
diff
changeset
|
112 [ |
f0e262a46d4e
set hardened compiler/linker flags by default
Matt Johnston <matt@ucc.asn.au>
parents:
1426
diff
changeset
|
113 CFLAGS="$OLDCFLAGS" |
f0e262a46d4e
set hardened compiler/linker flags by default
Matt Johnston <matt@ucc.asn.au>
parents:
1426
diff
changeset
|
114 TESTFLAGS="-fstack-protector --param=ssp-buffer-size=4" |
f0e262a46d4e
set hardened compiler/linker flags by default
Matt Johnston <matt@ucc.asn.au>
parents:
1426
diff
changeset
|
115 CFLAGS="$CFLAGS $TESTFLAGS" |
f0e262a46d4e
set hardened compiler/linker flags by default
Matt Johnston <matt@ucc.asn.au>
parents:
1426
diff
changeset
|
116 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], |
f0e262a46d4e
set hardened compiler/linker flags by default
Matt Johnston <matt@ucc.asn.au>
parents:
1426
diff
changeset
|
117 [AC_MSG_NOTICE([Setting $TESTFLAGS])], |
f0e262a46d4e
set hardened compiler/linker flags by default
Matt Johnston <matt@ucc.asn.au>
parents:
1426
diff
changeset
|
118 [AC_MSG_NOTICE([Not setting $TESTFLAGS]); CFLAGS="$OLDCFLAGS" ] |
f0e262a46d4e
set hardened compiler/linker flags by default
Matt Johnston <matt@ucc.asn.au>
parents:
1426
diff
changeset
|
119 ) |
f0e262a46d4e
set hardened compiler/linker flags by default
Matt Johnston <matt@ucc.asn.au>
parents:
1426
diff
changeset
|
120 ] |
f0e262a46d4e
set hardened compiler/linker flags by default
Matt Johnston <matt@ucc.asn.au>
parents:
1426
diff
changeset
|
121 ) |
f0e262a46d4e
set hardened compiler/linker flags by default
Matt Johnston <matt@ucc.asn.au>
parents:
1426
diff
changeset
|
122 # FORTIFY_SOURCE |
1469
51043e868f55
Test for -Wno-pointer-sign, move CFLAGS tests into a macro
Matt Johnston <matt@ucc.asn.au>
parents:
1463
diff
changeset
|
123 DB_TRYADDCFLAGS([-D_FORTIFY_SOURCE=2]) |
1505
55120acb9994
Add Spectre v2 mitigations for GCC (#54)
Loganaden Velvindron <logan@hackers.mu>
parents:
1490
diff
changeset
|
124 |
55120acb9994
Add Spectre v2 mitigations for GCC (#54)
Loganaden Velvindron <logan@hackers.mu>
parents:
1490
diff
changeset
|
125 # Spectre v2 mitigations |
55120acb9994
Add Spectre v2 mitigations for GCC (#54)
Loganaden Velvindron <logan@hackers.mu>
parents:
1490
diff
changeset
|
126 DB_TRYADDCFLAGS([-mfunction-return=thunk]) |
55120acb9994
Add Spectre v2 mitigations for GCC (#54)
Loganaden Velvindron <logan@hackers.mu>
parents:
1490
diff
changeset
|
127 DB_TRYADDCFLAGS([-mindirect-branch=thunk]) |
55120acb9994
Add Spectre v2 mitigations for GCC (#54)
Loganaden Velvindron <logan@hackers.mu>
parents:
1490
diff
changeset
|
128 |
1427
f0e262a46d4e
set hardened compiler/linker flags by default
Matt Johnston <matt@ucc.asn.au>
parents:
1426
diff
changeset
|
129 fi |
f0e262a46d4e
set hardened compiler/linker flags by default
Matt Johnston <matt@ucc.asn.au>
parents:
1426
diff
changeset
|
130 |
1849
d34f50b7b9fd
Add configure --enable-werror argument
Matt Johnston <matt@ucc.asn.au>
parents:
1837
diff
changeset
|
131 AC_ARG_ENABLE(werror, |
d34f50b7b9fd
Add configure --enable-werror argument
Matt Johnston <matt@ucc.asn.au>
parents:
1837
diff
changeset
|
132 [ --enable-werror Set -Werror when building], |
d34f50b7b9fd
Add configure --enable-werror argument
Matt Johnston <matt@ucc.asn.au>
parents:
1837
diff
changeset
|
133 [ |
d34f50b7b9fd
Add configure --enable-werror argument
Matt Johnston <matt@ucc.asn.au>
parents:
1837
diff
changeset
|
134 if test "x$enableval" = "xyes"; then |
d34f50b7b9fd
Add configure --enable-werror argument
Matt Johnston <matt@ucc.asn.au>
parents:
1837
diff
changeset
|
135 # -Werror shouldn't be set when configure runs tests. |
d34f50b7b9fd
Add configure --enable-werror argument
Matt Johnston <matt@ucc.asn.au>
parents:
1837
diff
changeset
|
136 # We add it to the Makefile's CFLAGS |
d34f50b7b9fd
Add configure --enable-werror argument
Matt Johnston <matt@ucc.asn.au>
parents:
1837
diff
changeset
|
137 LATE_CFLAGS+="$LATE_CFLAGS -Werror" |
d34f50b7b9fd
Add configure --enable-werror argument
Matt Johnston <matt@ucc.asn.au>
parents:
1837
diff
changeset
|
138 AC_MSG_NOTICE(Enabling -Werror) |
d34f50b7b9fd
Add configure --enable-werror argument
Matt Johnston <matt@ucc.asn.au>
parents:
1837
diff
changeset
|
139 fi |
d34f50b7b9fd
Add configure --enable-werror argument
Matt Johnston <matt@ucc.asn.au>
parents:
1837
diff
changeset
|
140 ], []) |
d34f50b7b9fd
Add configure --enable-werror argument
Matt Johnston <matt@ucc.asn.au>
parents:
1837
diff
changeset
|
141 |
321
fa9c45d09727
change AC_MSG_RESULT to AC_MSG_NOTICE in configure.in, add AC_SYS_LARGEFILE
Matt Johnston <matt@ucc.asn.au>
parents:
262
diff
changeset
|
142 # large file support is useful for scp |
fa9c45d09727
change AC_MSG_RESULT to AC_MSG_NOTICE in configure.in, add AC_SYS_LARGEFILE
Matt Johnston <matt@ucc.asn.au>
parents:
262
diff
changeset
|
143 AC_SYS_LARGEFILE |
fa9c45d09727
change AC_MSG_RESULT to AC_MSG_NOTICE in configure.in, add AC_SYS_LARGEFILE
Matt Johnston <matt@ucc.asn.au>
parents:
262
diff
changeset
|
144 |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
145 # Host specific options |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
146 # this isn't a definitive list of hosts, they are just added as required |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
147 AC_CANONICAL_HOST |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
148 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
149 case "$host" in |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
150 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
151 *-*-linux*) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
152 no_ptmx_check=1 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
153 ;; |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
154 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
155 *-*-solaris*) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
156 CFLAGS="$CFLAGS -I/usr/local/include" |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
157 LDFLAGS="$LDFLAGS -L/usr/local/lib -R/usr/local/lib" |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
158 conf_lastlog_location="/var/adm/lastlog" |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
159 AC_MSG_CHECKING(for obsolete utmp and wtmp in solaris2.x) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
160 sol2ver=`echo "$host"| sed -e 's/.*[[0-9]]\.//'` |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
161 if test "$sol2ver" -ge 8; then |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
162 AC_MSG_RESULT(yes) |
1399
47a3a3cb7d45
Set configure #defines to 1. Escape some strings for m4
Matt Johnston <matt@ucc.asn.au>
parents:
1397
diff
changeset
|
163 AC_DEFINE(DISABLE_UTMP,1,Disable utmp) |
47a3a3cb7d45
Set configure #defines to 1. Escape some strings for m4
Matt Johnston <matt@ucc.asn.au>
parents:
1397
diff
changeset
|
164 AC_DEFINE(DISABLE_WTMP,1,Disable wtmp) |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
165 else |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
166 AC_MSG_RESULT(no) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
167 fi |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
168 AC_CHECK_LIB(socket, socket, LIBS="$LIBS -lsocket") |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
169 AC_CHECK_LIB(nsl, yp_match, LIBS="$LIBS -lnsl") |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
170 ;; |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
171 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
172 *-*-aix*) |
1399
47a3a3cb7d45
Set configure #defines to 1. Escape some strings for m4
Matt Johnston <matt@ucc.asn.au>
parents:
1397
diff
changeset
|
173 AC_DEFINE(AIX,1,Using AIX) |
67 | 174 # OpenSSH thinks it's broken. If it isn't, let me know. |
1399
47a3a3cb7d45
Set configure #defines to 1. Escape some strings for m4
Matt Johnston <matt@ucc.asn.au>
parents:
1397
diff
changeset
|
175 AC_DEFINE(BROKEN_GETADDRINFO,1,Broken getaddrinfo) |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
176 ;; |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
177 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
178 *-*-hpux*) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
179 LIBS="$LIBS -lsec" |
67 | 180 # It's probably broken. |
1399
47a3a3cb7d45
Set configure #defines to 1. Escape some strings for m4
Matt Johnston <matt@ucc.asn.au>
parents:
1397
diff
changeset
|
181 AC_DEFINE(BROKEN_GETADDRINFO,1,Broken getaddrinfo) |
67 | 182 ;; |
183 *-dec-osf*) | |
1399
47a3a3cb7d45
Set configure #defines to 1. Escape some strings for m4
Matt Johnston <matt@ucc.asn.au>
parents:
1397
diff
changeset
|
184 AC_DEFINE(BROKEN_GETADDRINFO,1,Broken getaddrinfo) |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
185 ;; |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
186 esac |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
187 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
188 AC_CHECK_TOOL(AR, ar, :) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
189 AC_CHECK_TOOL(RANLIB, ranlib, :) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
190 AC_CHECK_TOOL(STRIP, strip, :) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
191 AC_CHECK_TOOL(INSTALL, install, :) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
192 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
193 dnl Can't use login() or logout() with uclibc |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
194 AC_CHECK_DECL(__UCLIBC__, |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
195 [ |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
196 no_loginfunc_check=1 |
321
fa9c45d09727
change AC_MSG_RESULT to AC_MSG_NOTICE in configure.in, add AC_SYS_LARGEFILE
Matt Johnston <matt@ucc.asn.au>
parents:
262
diff
changeset
|
197 AC_MSG_NOTICE([Using uClibc - login() and logout() probably don't work, so we won't use them.]) |
1399
47a3a3cb7d45
Set configure #defines to 1. Escape some strings for m4
Matt Johnston <matt@ucc.asn.au>
parents:
1397
diff
changeset
|
198 ],,) |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
199 |
1186
a4ce76e6fb63
Another attempt at test for crypt()
Matt Johnston <matt@ucc.asn.au>
parents:
1185
diff
changeset
|
200 dnl We test for crypt() specially. On Linux (and others?) it resides in libcrypt |
a4ce76e6fb63
Another attempt at test for crypt()
Matt Johnston <matt@ucc.asn.au>
parents:
1185
diff
changeset
|
201 dnl but we don't want link all binaries to -lcrypt, just dropbear server. |
a4ce76e6fb63
Another attempt at test for crypt()
Matt Johnston <matt@ucc.asn.au>
parents:
1185
diff
changeset
|
202 dnl OS X doesn't need -lcrypt |
a4ce76e6fb63
Another attempt at test for crypt()
Matt Johnston <matt@ucc.asn.au>
parents:
1185
diff
changeset
|
203 AC_CHECK_FUNC(crypt, found_crypt_func=here) |
a4ce76e6fb63
Another attempt at test for crypt()
Matt Johnston <matt@ucc.asn.au>
parents:
1185
diff
changeset
|
204 AC_CHECK_LIB(crypt, crypt, |
a4ce76e6fb63
Another attempt at test for crypt()
Matt Johnston <matt@ucc.asn.au>
parents:
1185
diff
changeset
|
205 [ |
a4ce76e6fb63
Another attempt at test for crypt()
Matt Johnston <matt@ucc.asn.au>
parents:
1185
diff
changeset
|
206 CRYPTLIB="-lcrypt" |
a4ce76e6fb63
Another attempt at test for crypt()
Matt Johnston <matt@ucc.asn.au>
parents:
1185
diff
changeset
|
207 found_crypt_func=here |
a4ce76e6fb63
Another attempt at test for crypt()
Matt Johnston <matt@ucc.asn.au>
parents:
1185
diff
changeset
|
208 ]) |
519
a1b7c6cdd48a
Only use -lcrypt for Dropbear server binary
Matt Johnston <matt@ucc.asn.au>
parents:
461
diff
changeset
|
209 AC_SUBST(CRYPTLIB) |
1193
da1ed4fcdc4a
The '==' comparision operator is not defined by POSIX, use '=' instead
Juergen Daubert <jue@jue.li>
parents:
1186
diff
changeset
|
210 if test "t$found_crypt_func" = there; then |
1186
a4ce76e6fb63
Another attempt at test for crypt()
Matt Johnston <matt@ucc.asn.au>
parents:
1185
diff
changeset
|
211 AC_DEFINE(HAVE_CRYPT, 1, [crypt() function]) |
a4ce76e6fb63
Another attempt at test for crypt()
Matt Johnston <matt@ucc.asn.au>
parents:
1185
diff
changeset
|
212 fi |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
213 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
214 # Check if zlib is needed |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
215 AC_ARG_WITH(zlib, |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
216 [ --with-zlib=PATH Use zlib in PATH], |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
217 [ |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
218 # option is given |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
219 if test -d "$withval/lib"; then |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
220 LDFLAGS="-L${withval}/lib ${LDFLAGS}" |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
221 else |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
222 LDFLAGS="-L${withval} ${LDFLAGS}" |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
223 fi |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
224 if test -d "$withval/include"; then |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
225 CPPFLAGS="-I${withval}/include ${CPPFLAGS}" |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
226 else |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
227 CPPFLAGS="-I${withval} ${CPPFLAGS}" |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
228 fi |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
229 ] |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
230 ) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
231 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
232 AC_ARG_ENABLE(zlib, |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
233 [ --disable-zlib Don't include zlib support], |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
234 [ |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
235 if test "x$enableval" = "xno"; then |
1399
47a3a3cb7d45
Set configure #defines to 1. Escape some strings for m4
Matt Johnston <matt@ucc.asn.au>
parents:
1397
diff
changeset
|
236 AC_DEFINE(DISABLE_ZLIB,1,Use zlib) |
321
fa9c45d09727
change AC_MSG_RESULT to AC_MSG_NOTICE in configure.in, add AC_SYS_LARGEFILE
Matt Johnston <matt@ucc.asn.au>
parents:
262
diff
changeset
|
237 AC_MSG_NOTICE(Disabling zlib) |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
238 else |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
239 AC_CHECK_LIB(z, deflate, , AC_MSG_ERROR([*** zlib missing - install first or check config.log ***])) |
321
fa9c45d09727
change AC_MSG_RESULT to AC_MSG_NOTICE in configure.in, add AC_SYS_LARGEFILE
Matt Johnston <matt@ucc.asn.au>
parents:
262
diff
changeset
|
240 AC_MSG_NOTICE(Enabling zlib) |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
241 fi |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
242 ], |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
243 [ |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
244 # if not disabled, check for zlib |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
245 AC_CHECK_LIB(z, deflate, , AC_MSG_ERROR([*** zlib missing - install first or check config.log ***])) |
321
fa9c45d09727
change AC_MSG_RESULT to AC_MSG_NOTICE in configure.in, add AC_SYS_LARGEFILE
Matt Johnston <matt@ucc.asn.au>
parents:
262
diff
changeset
|
246 AC_MSG_NOTICE(Enabling zlib) |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
247 ] |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
248 ) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
249 |
57
3b2a5a1c4347
svr-authpam code merged and works. needs tidying a log
Matt Johnston <matt@ucc.asn.au>
parents:
28
diff
changeset
|
250 # Check if pam is needed |
3b2a5a1c4347
svr-authpam code merged and works. needs tidying a log
Matt Johnston <matt@ucc.asn.au>
parents:
28
diff
changeset
|
251 AC_ARG_WITH(pam, |
3b2a5a1c4347
svr-authpam code merged and works. needs tidying a log
Matt Johnston <matt@ucc.asn.au>
parents:
28
diff
changeset
|
252 [ --with-pam=PATH Use pam in PATH], |
3b2a5a1c4347
svr-authpam code merged and works. needs tidying a log
Matt Johnston <matt@ucc.asn.au>
parents:
28
diff
changeset
|
253 [ |
3b2a5a1c4347
svr-authpam code merged and works. needs tidying a log
Matt Johnston <matt@ucc.asn.au>
parents:
28
diff
changeset
|
254 # option is given |
3b2a5a1c4347
svr-authpam code merged and works. needs tidying a log
Matt Johnston <matt@ucc.asn.au>
parents:
28
diff
changeset
|
255 if test -d "$withval/lib"; then |
3b2a5a1c4347
svr-authpam code merged and works. needs tidying a log
Matt Johnston <matt@ucc.asn.au>
parents:
28
diff
changeset
|
256 LDFLAGS="-L${withval}/lib ${LDFLAGS}" |
3b2a5a1c4347
svr-authpam code merged and works. needs tidying a log
Matt Johnston <matt@ucc.asn.au>
parents:
28
diff
changeset
|
257 else |
3b2a5a1c4347
svr-authpam code merged and works. needs tidying a log
Matt Johnston <matt@ucc.asn.au>
parents:
28
diff
changeset
|
258 LDFLAGS="-L${withval} ${LDFLAGS}" |
3b2a5a1c4347
svr-authpam code merged and works. needs tidying a log
Matt Johnston <matt@ucc.asn.au>
parents:
28
diff
changeset
|
259 fi |
3b2a5a1c4347
svr-authpam code merged and works. needs tidying a log
Matt Johnston <matt@ucc.asn.au>
parents:
28
diff
changeset
|
260 if test -d "$withval/include"; then |
3b2a5a1c4347
svr-authpam code merged and works. needs tidying a log
Matt Johnston <matt@ucc.asn.au>
parents:
28
diff
changeset
|
261 CPPFLAGS="-I${withval}/include ${CPPFLAGS}" |
3b2a5a1c4347
svr-authpam code merged and works. needs tidying a log
Matt Johnston <matt@ucc.asn.au>
parents:
28
diff
changeset
|
262 else |
3b2a5a1c4347
svr-authpam code merged and works. needs tidying a log
Matt Johnston <matt@ucc.asn.au>
parents:
28
diff
changeset
|
263 CPPFLAGS="-I${withval} ${CPPFLAGS}" |
3b2a5a1c4347
svr-authpam code merged and works. needs tidying a log
Matt Johnston <matt@ucc.asn.au>
parents:
28
diff
changeset
|
264 fi |
3b2a5a1c4347
svr-authpam code merged and works. needs tidying a log
Matt Johnston <matt@ucc.asn.au>
parents:
28
diff
changeset
|
265 ] |
3b2a5a1c4347
svr-authpam code merged and works. needs tidying a log
Matt Johnston <matt@ucc.asn.au>
parents:
28
diff
changeset
|
266 ) |
3b2a5a1c4347
svr-authpam code merged and works. needs tidying a log
Matt Johnston <matt@ucc.asn.au>
parents:
28
diff
changeset
|
267 |
122
cb7ef2f63bf0
propagate of f51a272341ee12268fe7028bc2f2bad66c603069 and ab35ee4292ea910d4871c3609d6100fe34300720 from branch 'matt.dbclient.rez' to 'matt.dbclient.work'
Matt Johnston <matt@ucc.asn.au>
parents:
119
diff
changeset
|
268 |
57
3b2a5a1c4347
svr-authpam code merged and works. needs tidying a log
Matt Johnston <matt@ucc.asn.au>
parents:
28
diff
changeset
|
269 AC_ARG_ENABLE(pam, |
1444
bfed37d12d90
improve configure --help alignment
Matt Johnston <matt@ucc.asn.au>
parents:
1429
diff
changeset
|
270 [ --enable-pam Try to include PAM support], |
57
3b2a5a1c4347
svr-authpam code merged and works. needs tidying a log
Matt Johnston <matt@ucc.asn.au>
parents:
28
diff
changeset
|
271 [ |
122
cb7ef2f63bf0
propagate of f51a272341ee12268fe7028bc2f2bad66c603069 and ab35ee4292ea910d4871c3609d6100fe34300720 from branch 'matt.dbclient.rez' to 'matt.dbclient.work'
Matt Johnston <matt@ucc.asn.au>
parents:
119
diff
changeset
|
272 if test "x$enableval" = "xyes"; then |
cb7ef2f63bf0
propagate of f51a272341ee12268fe7028bc2f2bad66c603069 and ab35ee4292ea910d4871c3609d6100fe34300720 from branch 'matt.dbclient.rez' to 'matt.dbclient.work'
Matt Johnston <matt@ucc.asn.au>
parents:
119
diff
changeset
|
273 AC_CHECK_LIB(pam, pam_authenticate, , AC_MSG_ERROR([*** PAM missing - install first or check config.log ***])) |
321
fa9c45d09727
change AC_MSG_RESULT to AC_MSG_NOTICE in configure.in, add AC_SYS_LARGEFILE
Matt Johnston <matt@ucc.asn.au>
parents:
262
diff
changeset
|
274 AC_MSG_NOTICE(Enabling PAM) |
573
d3ea8b9672f0
- Test for pam_fail_delay() function in configure
Matt Johnston <matt@ucc.asn.au>
parents:
519
diff
changeset
|
275 AC_CHECK_FUNCS(pam_fail_delay) |
122
cb7ef2f63bf0
propagate of f51a272341ee12268fe7028bc2f2bad66c603069 and ab35ee4292ea910d4871c3609d6100fe34300720 from branch 'matt.dbclient.rez' to 'matt.dbclient.work'
Matt Johnston <matt@ucc.asn.au>
parents:
119
diff
changeset
|
276 else |
1399
47a3a3cb7d45
Set configure #defines to 1. Escape some strings for m4
Matt Johnston <matt@ucc.asn.au>
parents:
1397
diff
changeset
|
277 AC_DEFINE(DISABLE_PAM,1,Use PAM) |
321
fa9c45d09727
change AC_MSG_RESULT to AC_MSG_NOTICE in configure.in, add AC_SYS_LARGEFILE
Matt Johnston <matt@ucc.asn.au>
parents:
262
diff
changeset
|
278 AC_MSG_NOTICE(Disabling PAM) |
57
3b2a5a1c4347
svr-authpam code merged and works. needs tidying a log
Matt Johnston <matt@ucc.asn.au>
parents:
28
diff
changeset
|
279 fi |
3b2a5a1c4347
svr-authpam code merged and works. needs tidying a log
Matt Johnston <matt@ucc.asn.au>
parents:
28
diff
changeset
|
280 ], |
3b2a5a1c4347
svr-authpam code merged and works. needs tidying a log
Matt Johnston <matt@ucc.asn.au>
parents:
28
diff
changeset
|
281 [ |
122
cb7ef2f63bf0
propagate of f51a272341ee12268fe7028bc2f2bad66c603069 and ab35ee4292ea910d4871c3609d6100fe34300720 from branch 'matt.dbclient.rez' to 'matt.dbclient.work'
Matt Johnston <matt@ucc.asn.au>
parents:
119
diff
changeset
|
282 # disable it by default |
1399
47a3a3cb7d45
Set configure #defines to 1. Escape some strings for m4
Matt Johnston <matt@ucc.asn.au>
parents:
1397
diff
changeset
|
283 AC_DEFINE(DISABLE_PAM,1,Use PAM) |
321
fa9c45d09727
change AC_MSG_RESULT to AC_MSG_NOTICE in configure.in, add AC_SYS_LARGEFILE
Matt Johnston <matt@ucc.asn.au>
parents:
262
diff
changeset
|
284 AC_MSG_NOTICE(Disabling PAM) |
57
3b2a5a1c4347
svr-authpam code merged and works. needs tidying a log
Matt Johnston <matt@ucc.asn.au>
parents:
28
diff
changeset
|
285 ] |
3b2a5a1c4347
svr-authpam code merged and works. needs tidying a log
Matt Johnston <matt@ucc.asn.au>
parents:
28
diff
changeset
|
286 ) |
3b2a5a1c4347
svr-authpam code merged and works. needs tidying a log
Matt Johnston <matt@ucc.asn.au>
parents:
28
diff
changeset
|
287 |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
288 AC_ARG_ENABLE(openpty, |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
289 [ --disable-openpty Don't use openpty, use alternative method], |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
290 [ |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
291 if test "x$enableval" = "xno"; then |
321
fa9c45d09727
change AC_MSG_RESULT to AC_MSG_NOTICE in configure.in, add AC_SYS_LARGEFILE
Matt Johnston <matt@ucc.asn.au>
parents:
262
diff
changeset
|
292 AC_MSG_NOTICE(Not using openpty) |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
293 else |
321
fa9c45d09727
change AC_MSG_RESULT to AC_MSG_NOTICE in configure.in, add AC_SYS_LARGEFILE
Matt Johnston <matt@ucc.asn.au>
parents:
262
diff
changeset
|
294 AC_MSG_NOTICE(Using openpty if available) |
1462
e017e46b1434
configure: add a variable to allow openpty check to be cached
Eric Bénard <eric@eukrea.com>
parents:
1447
diff
changeset
|
295 AC_SEARCH_LIBS(openpty, util, [dropbear_cv_func_have_openpty=yes]) |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
296 fi |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
297 ], |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
298 [ |
321
fa9c45d09727
change AC_MSG_RESULT to AC_MSG_NOTICE in configure.in, add AC_SYS_LARGEFILE
Matt Johnston <matt@ucc.asn.au>
parents:
262
diff
changeset
|
299 AC_MSG_NOTICE(Using openpty if available) |
1462
e017e46b1434
configure: add a variable to allow openpty check to be cached
Eric Bénard <eric@eukrea.com>
parents:
1447
diff
changeset
|
300 AC_SEARCH_LIBS(openpty, util, [dropbear_cv_func_have_openpty=yes]) |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
301 ] |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
302 ) |
1462
e017e46b1434
configure: add a variable to allow openpty check to be cached
Eric Bénard <eric@eukrea.com>
parents:
1447
diff
changeset
|
303 |
e017e46b1434
configure: add a variable to allow openpty check to be cached
Eric Bénard <eric@eukrea.com>
parents:
1447
diff
changeset
|
304 if test "x$dropbear_cv_func_have_openpty" = "xyes"; then |
e017e46b1434
configure: add a variable to allow openpty check to be cached
Eric Bénard <eric@eukrea.com>
parents:
1447
diff
changeset
|
305 AC_DEFINE(HAVE_OPENPTY,,Have openpty() function) |
e017e46b1434
configure: add a variable to allow openpty check to be cached
Eric Bénard <eric@eukrea.com>
parents:
1447
diff
changeset
|
306 no_ptc_check=yes |
e017e46b1434
configure: add a variable to allow openpty check to be cached
Eric Bénard <eric@eukrea.com>
parents:
1447
diff
changeset
|
307 no_ptmx_check=yes |
e017e46b1434
configure: add a variable to allow openpty check to be cached
Eric Bénard <eric@eukrea.com>
parents:
1447
diff
changeset
|
308 fi |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
309 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
310 AC_ARG_ENABLE(syslog, |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
311 [ --disable-syslog Don't include syslog support], |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
312 [ |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
313 if test "x$enableval" = "xno"; then |
1399
47a3a3cb7d45
Set configure #defines to 1. Escape some strings for m4
Matt Johnston <matt@ucc.asn.au>
parents:
1397
diff
changeset
|
314 AC_DEFINE(DISABLE_SYSLOG,1,Using syslog) |
321
fa9c45d09727
change AC_MSG_RESULT to AC_MSG_NOTICE in configure.in, add AC_SYS_LARGEFILE
Matt Johnston <matt@ucc.asn.au>
parents:
262
diff
changeset
|
315 AC_MSG_NOTICE(Disabling syslog) |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
316 else |
321
fa9c45d09727
change AC_MSG_RESULT to AC_MSG_NOTICE in configure.in, add AC_SYS_LARGEFILE
Matt Johnston <matt@ucc.asn.au>
parents:
262
diff
changeset
|
317 AC_MSG_NOTICE(Enabling syslog) |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
318 fi |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
319 ], |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
320 [ |
321
fa9c45d09727
change AC_MSG_RESULT to AC_MSG_NOTICE in configure.in, add AC_SYS_LARGEFILE
Matt Johnston <matt@ucc.asn.au>
parents:
262
diff
changeset
|
321 AC_MSG_NOTICE(Enabling syslog) |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
322 ] |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
323 ) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
324 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
325 AC_ARG_ENABLE(shadow, |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
326 [ --disable-shadow Don't use shadow passwords (if available)], |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
327 [ |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
328 if test "x$enableval" = "xno"; then |
321
fa9c45d09727
change AC_MSG_RESULT to AC_MSG_NOTICE in configure.in, add AC_SYS_LARGEFILE
Matt Johnston <matt@ucc.asn.au>
parents:
262
diff
changeset
|
329 AC_MSG_NOTICE(Not using shadow passwords) |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
330 else |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
331 AC_CHECK_HEADERS([shadow.h]) |
321
fa9c45d09727
change AC_MSG_RESULT to AC_MSG_NOTICE in configure.in, add AC_SYS_LARGEFILE
Matt Johnston <matt@ucc.asn.au>
parents:
262
diff
changeset
|
332 AC_MSG_NOTICE(Using shadow passwords if available) |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
333 fi |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
334 ], |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
335 [ |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
336 AC_CHECK_HEADERS([shadow.h]) |
321
fa9c45d09727
change AC_MSG_RESULT to AC_MSG_NOTICE in configure.in, add AC_SYS_LARGEFILE
Matt Johnston <matt@ucc.asn.au>
parents:
262
diff
changeset
|
337 AC_MSG_NOTICE(Using shadow passwords if available) |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
338 ] |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
339 ) |
1347
b28624698130
copy over some fuzzing code from AFL branch
Matt Johnston <matt@ucc.asn.au>
parents:
1280
diff
changeset
|
340 |
1654 | 341 AC_ARG_ENABLE(plugin, |
1694
39534eedf429
Mention libtom version requirements, check for poly1305 in libtomcrypt
Matt Johnston <matt@ucc.asn.au>
parents:
1692
diff
changeset
|
342 [ --enable-plugin Enable support for External Public Key Authentication plug-in], |
1653
76189c9ffea2
External Public-Key Authentication API (#72)
fabriziobertocci <fabriziobertocci@gmail.com>
parents:
1623
diff
changeset
|
343 [ |
1654 | 344 AC_DEFINE(DROPBEAR_PLUGIN, 1, External Public Key Authentication) |
1653
76189c9ffea2
External Public-Key Authentication API (#72)
fabriziobertocci <fabriziobertocci@gmail.com>
parents:
1623
diff
changeset
|
345 AC_MSG_NOTICE(Enabling support for External Public Key Authentication) |
1654 | 346 DROPBEAR_PLUGIN=1 |
1653
76189c9ffea2
External Public-Key Authentication API (#72)
fabriziobertocci <fabriziobertocci@gmail.com>
parents:
1623
diff
changeset
|
347 ], |
76189c9ffea2
External Public-Key Authentication API (#72)
fabriziobertocci <fabriziobertocci@gmail.com>
parents:
1623
diff
changeset
|
348 [ |
1654 | 349 AC_DEFINE(DROPBEAR_PLUGIN, 0, External Public Key Authentication) |
350 DROPBEAR_PLUGIN=0 | |
1653
76189c9ffea2
External Public-Key Authentication API (#72)
fabriziobertocci <fabriziobertocci@gmail.com>
parents:
1623
diff
changeset
|
351 ] |
76189c9ffea2
External Public-Key Authentication API (#72)
fabriziobertocci <fabriziobertocci@gmail.com>
parents:
1623
diff
changeset
|
352 |
76189c9ffea2
External Public-Key Authentication API (#72)
fabriziobertocci <fabriziobertocci@gmail.com>
parents:
1623
diff
changeset
|
353 ) |
1654 | 354 AC_SUBST(DROPBEAR_PLUGIN) |
1653
76189c9ffea2
External Public-Key Authentication API (#72)
fabriziobertocci <fabriziobertocci@gmail.com>
parents:
1623
diff
changeset
|
355 |
1347
b28624698130
copy over some fuzzing code from AFL branch
Matt Johnston <matt@ucc.asn.au>
parents:
1280
diff
changeset
|
356 AC_ARG_ENABLE(fuzz, |
1559
92c93b4a3646
Fix to be able to compile normal(ish) binaries with --enable-fuzz
Matt Johnston <matt@ucc.asn.au>
parents:
1558
diff
changeset
|
357 [ --enable-fuzz Build fuzzing. Not recommended for deployment.], |
1347
b28624698130
copy over some fuzzing code from AFL branch
Matt Johnston <matt@ucc.asn.au>
parents:
1280
diff
changeset
|
358 [ |
1668
49cb3cf4bd6f
When explicitly passing --disable-fuzz to ./configure fuzz was actually
Alexander Dahl <ada@thorsis.com>
parents:
1667
diff
changeset
|
359 if test "x$enableval" = "xyes"; then |
49cb3cf4bd6f
When explicitly passing --disable-fuzz to ./configure fuzz was actually
Alexander Dahl <ada@thorsis.com>
parents:
1667
diff
changeset
|
360 AC_DEFINE(DROPBEAR_FUZZ, 1, Fuzzing) |
49cb3cf4bd6f
When explicitly passing --disable-fuzz to ./configure fuzz was actually
Alexander Dahl <ada@thorsis.com>
parents:
1667
diff
changeset
|
361 AC_MSG_NOTICE(Enabling fuzzing) |
49cb3cf4bd6f
When explicitly passing --disable-fuzz to ./configure fuzz was actually
Alexander Dahl <ada@thorsis.com>
parents:
1667
diff
changeset
|
362 DROPBEAR_FUZZ=1 |
49cb3cf4bd6f
When explicitly passing --disable-fuzz to ./configure fuzz was actually
Alexander Dahl <ada@thorsis.com>
parents:
1667
diff
changeset
|
363 # libfuzzer needs linking with c++ libraries |
49cb3cf4bd6f
When explicitly passing --disable-fuzz to ./configure fuzz was actually
Alexander Dahl <ada@thorsis.com>
parents:
1667
diff
changeset
|
364 AC_PROG_CXX |
1756
d5680e12ac33
Move fuzzing code to fuzz/ subdirectory, improve Makefile.in
Matt Johnston <matt@ucc.asn.au>
parents:
1725
diff
changeset
|
365 mkdir -pv fuzz |
1668
49cb3cf4bd6f
When explicitly passing --disable-fuzz to ./configure fuzz was actually
Alexander Dahl <ada@thorsis.com>
parents:
1667
diff
changeset
|
366 else |
49cb3cf4bd6f
When explicitly passing --disable-fuzz to ./configure fuzz was actually
Alexander Dahl <ada@thorsis.com>
parents:
1667
diff
changeset
|
367 AC_DEFINE(DROPBEAR_FUZZ, 0, Fuzzing) |
49cb3cf4bd6f
When explicitly passing --disable-fuzz to ./configure fuzz was actually
Alexander Dahl <ada@thorsis.com>
parents:
1667
diff
changeset
|
368 AC_MSG_NOTICE(Disabling fuzzing) |
49cb3cf4bd6f
When explicitly passing --disable-fuzz to ./configure fuzz was actually
Alexander Dahl <ada@thorsis.com>
parents:
1667
diff
changeset
|
369 DROPBEAR_FUZZ=0 |
49cb3cf4bd6f
When explicitly passing --disable-fuzz to ./configure fuzz was actually
Alexander Dahl <ada@thorsis.com>
parents:
1667
diff
changeset
|
370 fi |
1356
3677a510f545
add wrapfd. improve fuzzer in makefile
Matt Johnston <matt@ucc.asn.au>
parents:
1347
diff
changeset
|
371 ], |
3677a510f545
add wrapfd. improve fuzzer in makefile
Matt Johnston <matt@ucc.asn.au>
parents:
1347
diff
changeset
|
372 [ |
1558
2f64cb3d3007
- #if not #ifdef for DROPBEAR_FUZZ
Matt Johnston <matt@ucc.asn.au>
parents:
1557
diff
changeset
|
373 AC_DEFINE(DROPBEAR_FUZZ, 0, Fuzzing) |
1668
49cb3cf4bd6f
When explicitly passing --disable-fuzz to ./configure fuzz was actually
Alexander Dahl <ada@thorsis.com>
parents:
1667
diff
changeset
|
374 AC_MSG_NOTICE(Disabling fuzzing) |
1356
3677a510f545
add wrapfd. improve fuzzer in makefile
Matt Johnston <matt@ucc.asn.au>
parents:
1347
diff
changeset
|
375 DROPBEAR_FUZZ=0 |
1347
b28624698130
copy over some fuzzing code from AFL branch
Matt Johnston <matt@ucc.asn.au>
parents:
1280
diff
changeset
|
376 ] |
1356
3677a510f545
add wrapfd. improve fuzzer in makefile
Matt Johnston <matt@ucc.asn.au>
parents:
1347
diff
changeset
|
377 |
1347
b28624698130
copy over some fuzzing code from AFL branch
Matt Johnston <matt@ucc.asn.au>
parents:
1280
diff
changeset
|
378 ) |
1356
3677a510f545
add wrapfd. improve fuzzer in makefile
Matt Johnston <matt@ucc.asn.au>
parents:
1347
diff
changeset
|
379 AC_SUBST(DROPBEAR_FUZZ) |
1582
68abf717328d
set up CXX for fuzzing build
Matt Johnston <matt@ucc.asn.au>
parents:
1573
diff
changeset
|
380 AC_SUBST(CXX) |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
381 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
382 # Checks for header files. |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
383 AC_HEADER_SYS_WAIT |
1550
93a3726a36d6
Remove unused tests for headers and functions
Matt Johnston <matt@ucc.asn.au>
parents:
1505
diff
changeset
|
384 AC_CHECK_HEADERS([netinet/in.h netinet/tcp.h \ |
93a3726a36d6
Remove unused tests for headers and functions
Matt Johnston <matt@ucc.asn.au>
parents:
1505
diff
changeset
|
385 crypt.h \ |
93a3726a36d6
Remove unused tests for headers and functions
Matt Johnston <matt@ucc.asn.au>
parents:
1505
diff
changeset
|
386 pty.h libutil.h libgen.h inttypes.h stropts.h utmp.h \ |
1426
89f8c5960527
test for linux/pkt-sched.h rather than SO_PRIORITY
Matt Johnston <matt@ucc.asn.au>
parents:
1416
diff
changeset
|
387 utmpx.h lastlog.h paths.h util.h netdb.h security/pam_appl.h \ |
1698
f966834f0f9c
Use Linux getrandom() to ensure random device is initialised
Matt Johnston <matt@ucc.asn.au>
parents:
1694
diff
changeset
|
388 pam/pam_appl.h netinet/in_systm.h sys/uio.h linux/pkt_sched.h \ |
1861 | 389 sys/random.h sys/prctl.h]) |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
390 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
391 # Checks for typedefs, structures, and compiler characteristics. |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
392 AC_C_CONST |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
393 AC_TYPE_UID_T |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
394 AC_TYPE_MODE_T |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
395 AC_TYPE_PID_T |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
396 AC_TYPE_SIZE_T |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
397 |
856
f56c41030c15
Replace some deprecated macros with other ones, from Daniel Richard G.
Matt Johnston <matt@ucc.asn.au>
parents:
835
diff
changeset
|
398 AC_CHECK_TYPES([uint8_t, u_int8_t, uint16_t, u_int16_t, uint32_t, u_int32_t]) |
f56c41030c15
Replace some deprecated macros with other ones, from Daniel Richard G.
Matt Johnston <matt@ucc.asn.au>
parents:
835
diff
changeset
|
399 AC_CHECK_TYPES([struct sockaddr_storage]) |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
400 AC_CHECK_TYPE([socklen_t], ,[ |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
401 AC_MSG_CHECKING([for socklen_t equivalent]) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
402 AC_CACHE_VAL([curl_cv_socklen_t_equiv], |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
403 [ |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
404 # Systems have either "struct sockaddr *" or |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
405 # "void *" as the second argument to getpeername |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
406 curl_cv_socklen_t_equiv= |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
407 for arg2 in "struct sockaddr" void; do |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
408 for t in int size_t unsigned long "unsigned long"; do |
856
f56c41030c15
Replace some deprecated macros with other ones, from Daniel Richard G.
Matt Johnston <matt@ucc.asn.au>
parents:
835
diff
changeset
|
409 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
f56c41030c15
Replace some deprecated macros with other ones, from Daniel Richard G.
Matt Johnston <matt@ucc.asn.au>
parents:
835
diff
changeset
|
410 #include <sys/types.h> |
f56c41030c15
Replace some deprecated macros with other ones, from Daniel Richard G.
Matt Johnston <matt@ucc.asn.au>
parents:
835
diff
changeset
|
411 #include <sys/socket.h> |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
412 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
413 int getpeername (int, $arg2 *, $t *); |
856
f56c41030c15
Replace some deprecated macros with other ones, from Daniel Richard G.
Matt Johnston <matt@ucc.asn.au>
parents:
835
diff
changeset
|
414 ]],[[ |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
415 $t len; |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
416 getpeername(0,0,&len); |
856
f56c41030c15
Replace some deprecated macros with other ones, from Daniel Richard G.
Matt Johnston <matt@ucc.asn.au>
parents:
835
diff
changeset
|
417 ]])],[ |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
418 curl_cv_socklen_t_equiv="$t" |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
419 break |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
420 ]) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
421 done |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
422 done |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
423 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
424 if test "x$curl_cv_socklen_t_equiv" = x; then |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
425 AC_MSG_ERROR([Cannot find a type to use in place of socklen_t]) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
426 fi |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
427 ]) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
428 AC_MSG_RESULT($curl_cv_socklen_t_equiv) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
429 AC_DEFINE_UNQUOTED(socklen_t, $curl_cv_socklen_t_equiv, |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
430 [type to use in place of socklen_t if not defined])], |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
431 [#include <sys/types.h> |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
432 #include <sys/socket.h>]) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
433 |
67 | 434 # for the fake-rfc2553 stuff - straight from OpenSSH |
435 | |
436 AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_have_struct_sockaddr_storage, [ | |
856
f56c41030c15
Replace some deprecated macros with other ones, from Daniel Richard G.
Matt Johnston <matt@ucc.asn.au>
parents:
835
diff
changeset
|
437 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
67 | 438 #include <sys/types.h> |
439 #include <sys/socket.h> | |
856
f56c41030c15
Replace some deprecated macros with other ones, from Daniel Richard G.
Matt Johnston <matt@ucc.asn.au>
parents:
835
diff
changeset
|
440 ]], |
1088
f2a3570b5110
Test struct existance against sizeof() operator
Gaël PORTAY <gael.portay@gmail.com>
parents:
1033
diff
changeset
|
441 [[ if (sizeof(struct sockaddr_storage)) return 0 ]])], |
67 | 442 [ ac_cv_have_struct_sockaddr_storage="yes" ], |
443 [ ac_cv_have_struct_sockaddr_storage="no" ] | |
444 ) | |
445 ]) | |
446 if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then | |
447 AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE) | |
448 fi | |
449 | |
450 AC_CACHE_CHECK([for struct sockaddr_in6], ac_cv_have_struct_sockaddr_in6, [ | |
856
f56c41030c15
Replace some deprecated macros with other ones, from Daniel Richard G.
Matt Johnston <matt@ucc.asn.au>
parents:
835
diff
changeset
|
451 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
67 | 452 #include <sys/types.h> |
453 #include <netinet/in.h> | |
856
f56c41030c15
Replace some deprecated macros with other ones, from Daniel Richard G.
Matt Johnston <matt@ucc.asn.au>
parents:
835
diff
changeset
|
454 ]], |
1088
f2a3570b5110
Test struct existance against sizeof() operator
Gaël PORTAY <gael.portay@gmail.com>
parents:
1033
diff
changeset
|
455 [[ if (sizeof(struct sockaddr_in6)) return 0 ]])], |
67 | 456 [ ac_cv_have_struct_sockaddr_in6="yes" ], |
457 [ ac_cv_have_struct_sockaddr_in6="no" ] | |
458 ) | |
459 ]) | |
460 if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then | |
1399
47a3a3cb7d45
Set configure #defines to 1. Escape some strings for m4
Matt Johnston <matt@ucc.asn.au>
parents:
1397
diff
changeset
|
461 AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN6,1,Have struct sockaddr_in6) |
67 | 462 fi |
463 | |
464 AC_CACHE_CHECK([for struct in6_addr], ac_cv_have_struct_in6_addr, [ | |
856
f56c41030c15
Replace some deprecated macros with other ones, from Daniel Richard G.
Matt Johnston <matt@ucc.asn.au>
parents:
835
diff
changeset
|
465 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
67 | 466 #include <sys/types.h> |
467 #include <netinet/in.h> | |
856
f56c41030c15
Replace some deprecated macros with other ones, from Daniel Richard G.
Matt Johnston <matt@ucc.asn.au>
parents:
835
diff
changeset
|
468 ]], |
1088
f2a3570b5110
Test struct existance against sizeof() operator
Gaël PORTAY <gael.portay@gmail.com>
parents:
1033
diff
changeset
|
469 [[ if (sizeof(struct in6_addr)) return 0 ]])], |
67 | 470 [ ac_cv_have_struct_in6_addr="yes" ], |
471 [ ac_cv_have_struct_in6_addr="no" ] | |
472 ) | |
473 ]) | |
474 if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then | |
1399
47a3a3cb7d45
Set configure #defines to 1. Escape some strings for m4
Matt Johnston <matt@ucc.asn.au>
parents:
1397
diff
changeset
|
475 AC_DEFINE(HAVE_STRUCT_IN6_ADDR,1,Have struct in6_addr) |
67 | 476 fi |
477 | |
478 AC_CACHE_CHECK([for struct addrinfo], ac_cv_have_struct_addrinfo, [ | |
856
f56c41030c15
Replace some deprecated macros with other ones, from Daniel Richard G.
Matt Johnston <matt@ucc.asn.au>
parents:
835
diff
changeset
|
479 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
67 | 480 #include <sys/types.h> |
481 #include <sys/socket.h> | |
482 #include <netdb.h> | |
856
f56c41030c15
Replace some deprecated macros with other ones, from Daniel Richard G.
Matt Johnston <matt@ucc.asn.au>
parents:
835
diff
changeset
|
483 ]], |
1088
f2a3570b5110
Test struct existance against sizeof() operator
Gaël PORTAY <gael.portay@gmail.com>
parents:
1033
diff
changeset
|
484 [[ if (sizeof(struct addrinfo)) return 0 ]])], |
67 | 485 [ ac_cv_have_struct_addrinfo="yes" ], |
486 [ ac_cv_have_struct_addrinfo="no" ] | |
487 ) | |
488 ]) | |
489 if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then | |
1399
47a3a3cb7d45
Set configure #defines to 1. Escape some strings for m4
Matt Johnston <matt@ucc.asn.au>
parents:
1397
diff
changeset
|
490 AC_DEFINE(HAVE_STRUCT_ADDRINFO,1,Have struct addrinfo) |
67 | 491 fi |
492 | |
493 | |
494 # IRIX has a const char return value for gai_strerror() | |
495 AC_CHECK_FUNCS(gai_strerror,[ | |
496 AC_DEFINE(HAVE_GAI_STRERROR) | |
856
f56c41030c15
Replace some deprecated macros with other ones, from Daniel Richard G.
Matt Johnston <matt@ucc.asn.au>
parents:
835
diff
changeset
|
497 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
67 | 498 #include <sys/types.h> |
499 #include <sys/socket.h> | |
500 #include <netdb.h> | |
501 | |
856
f56c41030c15
Replace some deprecated macros with other ones, from Daniel Richard G.
Matt Johnston <matt@ucc.asn.au>
parents:
835
diff
changeset
|
502 const char *gai_strerror(int);]],[[ |
67 | 503 char *str; |
504 | |
856
f56c41030c15
Replace some deprecated macros with other ones, from Daniel Richard G.
Matt Johnston <matt@ucc.asn.au>
parents:
835
diff
changeset
|
505 str = gai_strerror(0);]])],[ |
67 | 506 AC_DEFINE(HAVE_CONST_GAI_STRERROR_PROTO, 1, |
507 [Define if gai_strerror() returns const char *])])]) | |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
508 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
509 # for loginrec.c |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
510 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
511 AC_CHECK_MEMBERS([struct utmp.ut_host, struct utmp.ut_pid, struct utmp.ut_type, struct utmp.ut_tv, struct utmp.ut_id, struct utmp.ut_addr, struct utmp.ut_addr_v6, struct utmp.ut_exit, struct utmp.ut_time],,,[ |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
512 #include <sys/types.h> |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
513 #if HAVE_UTMP_H |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
514 #include <utmp.h> |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
515 #endif |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
516 ]) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
517 |
335
e17f0333c21e
Another stab at getting ss_family happy on older glibc
Matt Johnston <matt@ucc.asn.au>
parents:
321
diff
changeset
|
518 AC_CHECK_MEMBERS([struct utmpx.ut_host, struct utmpx.ut_syslen, struct utmpx.ut_type, struct utmpx.ut_id, struct utmpx.ut_addr, struct utmpx.ut_addr_v6, struct utmpx.ut_time, struct utmpx.ut_tv],,,[ |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
519 #include <sys/types.h> |
262
a3a68c25035e
* workaround for systems such as glibc 2.1 that have
Matt Johnston <matt@ucc.asn.au>
parents:
254
diff
changeset
|
520 #include <sys/socket.h> |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
521 #if HAVE_UTMPX_H |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
522 #include <utmpx.h> |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
523 #endif |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
524 ]) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
525 |
336
2dd116db1956
Can't check for ss_family without #including sys/socket.h
Matt Johnston <matt@ucc.asn.au>
parents:
335
diff
changeset
|
526 AC_CHECK_MEMBERS([struct sockaddr_storage.ss_family],,,[ |
2dd116db1956
Can't check for ss_family without #including sys/socket.h
Matt Johnston <matt@ucc.asn.au>
parents:
335
diff
changeset
|
527 #include <sys/types.h> |
2dd116db1956
Can't check for ss_family without #including sys/socket.h
Matt Johnston <matt@ucc.asn.au>
parents:
335
diff
changeset
|
528 #include <sys/socket.h> |
2dd116db1956
Can't check for ss_family without #including sys/socket.h
Matt Johnston <matt@ucc.asn.au>
parents:
335
diff
changeset
|
529 ]) |
335
e17f0333c21e
Another stab at getting ss_family happy on older glibc
Matt Johnston <matt@ucc.asn.au>
parents:
321
diff
changeset
|
530 |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
531 AC_CHECK_FUNCS(endutent getutent getutid getutline pututline setutent) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
532 AC_CHECK_FUNCS(utmpname) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
533 AC_CHECK_FUNCS(endutxent getutxent getutxid getutxline pututxline ) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
534 AC_CHECK_FUNCS(setutxent utmpxname) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
535 AC_CHECK_FUNCS(logout updwtmp logwtmp) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
536 |
1622
e11ed628708b
- Add adaptive authentication failure delay
Matt Johnston <matt@ucc.asn.au>
parents:
1582
diff
changeset
|
537 # POSIX monotonic time |
e11ed628708b
- Add adaptive authentication failure delay
Matt Johnston <matt@ucc.asn.au>
parents:
1582
diff
changeset
|
538 AC_CHECK_FUNCS(clock_gettime) |
e11ed628708b
- Add adaptive authentication failure delay
Matt Johnston <matt@ucc.asn.au>
parents:
1582
diff
changeset
|
539 |
928
7cd89d4e0335
Add new monotonic_now() wrapper so that timeouts are unaffected by
Matt Johnston <matt@ucc.asn.au>
parents:
898
diff
changeset
|
540 # OS X monotonic time |
7cd89d4e0335
Add new monotonic_now() wrapper so that timeouts are unaffected by
Matt Johnston <matt@ucc.asn.au>
parents:
898
diff
changeset
|
541 AC_CHECK_HEADERS([mach/mach_time.h]) |
7cd89d4e0335
Add new monotonic_now() wrapper so that timeouts are unaffected by
Matt Johnston <matt@ucc.asn.au>
parents:
898
diff
changeset
|
542 AC_CHECK_FUNCS(mach_absolute_time) |
7cd89d4e0335
Add new monotonic_now() wrapper so that timeouts are unaffected by
Matt Johnston <matt@ucc.asn.au>
parents:
898
diff
changeset
|
543 |
1698
f966834f0f9c
Use Linux getrandom() to ensure random device is initialised
Matt Johnston <matt@ucc.asn.au>
parents:
1694
diff
changeset
|
544 AC_CHECK_FUNCS(explicit_bzero memset_s getrandom) |
1280
94d4038bb34c
Use memset_s or explicit_bzero
Matt Johnston <matt@ucc.asn.au>
parents:
1193
diff
changeset
|
545 |
585
d194db6f9453
Use system libtomcrypt/libtommath if available. Doesn't currently
Matt Johnston <matt@ucc.asn.au>
parents:
573
diff
changeset
|
546 AC_ARG_ENABLE(bundled-libtom, |
829
4cf61252dfc3
Make --disable-bundled-libtom work, based on patch from Mike Frysinger
Matt Johnston <matt@ucc.asn.au>
parents:
800
diff
changeset
|
547 [ --enable-bundled-libtom Force using bundled libtomcrypt/libtommath even if a system version exists. |
4cf61252dfc3
Make --disable-bundled-libtom work, based on patch from Mike Frysinger
Matt Johnston <matt@ucc.asn.au>
parents:
800
diff
changeset
|
548 --disable-bundled-libtom Force using system libtomcrypt/libtommath, fail if it does not exist. |
1694
39534eedf429
Mention libtom version requirements, check for poly1305 in libtomcrypt
Matt Johnston <matt@ucc.asn.au>
parents:
1692
diff
changeset
|
549 Default is to use system if available, otherwise bundled. |
39534eedf429
Mention libtom version requirements, check for poly1305 in libtomcrypt
Matt Johnston <matt@ucc.asn.au>
parents:
1692
diff
changeset
|
550 Dropbear requires system libtommath >= 1.2.0 and libtomcrypt >= 1.18.0], |
829
4cf61252dfc3
Make --disable-bundled-libtom work, based on patch from Mike Frysinger
Matt Johnston <matt@ucc.asn.au>
parents:
800
diff
changeset
|
551 [ |
4cf61252dfc3
Make --disable-bundled-libtom work, based on patch from Mike Frysinger
Matt Johnston <matt@ucc.asn.au>
parents:
800
diff
changeset
|
552 if test "x$enableval" = "xyes"; then |
4cf61252dfc3
Make --disable-bundled-libtom work, based on patch from Mike Frysinger
Matt Johnston <matt@ucc.asn.au>
parents:
800
diff
changeset
|
553 BUNDLED_LIBTOM=1 |
4cf61252dfc3
Make --disable-bundled-libtom work, based on patch from Mike Frysinger
Matt Johnston <matt@ucc.asn.au>
parents:
800
diff
changeset
|
554 AC_MSG_NOTICE(Forcing bundled libtom*) |
4cf61252dfc3
Make --disable-bundled-libtom work, based on patch from Mike Frysinger
Matt Johnston <matt@ucc.asn.au>
parents:
800
diff
changeset
|
555 else |
4cf61252dfc3
Make --disable-bundled-libtom work, based on patch from Mike Frysinger
Matt Johnston <matt@ucc.asn.au>
parents:
800
diff
changeset
|
556 BUNDLED_LIBTOM=0 |
1692
1051e4eea25a
Update LibTomMath to 1.2.0 (#84)
Steffen Jaeckel <s@jaeckel.eu>
parents:
1668
diff
changeset
|
557 AC_CHECK_LIB(tommath, mp_to_ubin, LIBTOM_LIBS="-ltommath $LIBTOM_LIBS", |
1694
39534eedf429
Mention libtom version requirements, check for poly1305 in libtomcrypt
Matt Johnston <matt@ucc.asn.au>
parents:
1692
diff
changeset
|
558 [AC_MSG_ERROR([Missing/old system libtommath and --disable-bundled-libtom was specified])] ) |
39534eedf429
Mention libtom version requirements, check for poly1305 in libtomcrypt
Matt Johnston <matt@ucc.asn.au>
parents:
1692
diff
changeset
|
559 AC_CHECK_LIB(tomcrypt, poly1305_init, LIBTOM_LIBS="-ltomcrypt $LIBTOM_LIBS", |
39534eedf429
Mention libtom version requirements, check for poly1305 in libtomcrypt
Matt Johnston <matt@ucc.asn.au>
parents:
1692
diff
changeset
|
560 [AC_MSG_ERROR([Missing/old system libtomcrypt and --disable-bundled-libtom was specified])] ) |
829
4cf61252dfc3
Make --disable-bundled-libtom work, based on patch from Mike Frysinger
Matt Johnston <matt@ucc.asn.au>
parents:
800
diff
changeset
|
561 fi |
585
d194db6f9453
Use system libtomcrypt/libtommath if available. Doesn't currently
Matt Johnston <matt@ucc.asn.au>
parents:
573
diff
changeset
|
562 ], |
d194db6f9453
Use system libtomcrypt/libtommath if available. Doesn't currently
Matt Johnston <matt@ucc.asn.au>
parents:
573
diff
changeset
|
563 [ |
d194db6f9453
Use system libtomcrypt/libtommath if available. Doesn't currently
Matt Johnston <matt@ucc.asn.au>
parents:
573
diff
changeset
|
564 BUNDLED_LIBTOM=0 |
1692
1051e4eea25a
Update LibTomMath to 1.2.0 (#84)
Steffen Jaeckel <s@jaeckel.eu>
parents:
1668
diff
changeset
|
565 AC_CHECK_LIB(tommath, mp_to_ubin, LIBTOM_LIBS="-ltommath $LIBTOM_LIBS", BUNDLED_LIBTOM=1) |
1725
a139fe25f919
check for poly1305_init in other libtomcrypt configure test
Matt Johnston <matt@ucc.asn.au>
parents:
1698
diff
changeset
|
566 AC_CHECK_LIB(tomcrypt, poly1305_init, LIBTOM_LIBS="-ltomcrypt $LIBTOM_LIBS", BUNDLED_LIBTOM=1) |
585
d194db6f9453
Use system libtomcrypt/libtommath if available. Doesn't currently
Matt Johnston <matt@ucc.asn.au>
parents:
573
diff
changeset
|
567 ] |
d194db6f9453
Use system libtomcrypt/libtommath if available. Doesn't currently
Matt Johnston <matt@ucc.asn.au>
parents:
573
diff
changeset
|
568 ) |
d194db6f9453
Use system libtomcrypt/libtommath if available. Doesn't currently
Matt Johnston <matt@ucc.asn.au>
parents:
573
diff
changeset
|
569 |
587
1151059c5eff
Work properly again with bundled libtom*. autoconf is a hassle.
Matt Johnston <matt@ucc.asn.au>
parents:
585
diff
changeset
|
570 if test $BUNDLED_LIBTOM = 1 ; then |
1399
47a3a3cb7d45
Set configure #defines to 1. Escape some strings for m4
Matt Johnston <matt@ucc.asn.au>
parents:
1397
diff
changeset
|
571 AC_DEFINE(BUNDLED_LIBTOM,1,Use bundled libtom) |
587
1151059c5eff
Work properly again with bundled libtom*. autoconf is a hassle.
Matt Johnston <matt@ucc.asn.au>
parents:
585
diff
changeset
|
572 fi |
1151059c5eff
Work properly again with bundled libtom*. autoconf is a hassle.
Matt Johnston <matt@ucc.asn.au>
parents:
585
diff
changeset
|
573 |
898
4f1988cb79ce
Fix building with system libtomcrypt/libtommath
Matt Johnston <matt@ucc.asn.au>
parents:
866
diff
changeset
|
574 AC_SUBST(LIBTOM_LIBS) |
585
d194db6f9453
Use system libtomcrypt/libtommath if available. Doesn't currently
Matt Johnston <matt@ucc.asn.au>
parents:
573
diff
changeset
|
575 AC_SUBST(BUNDLED_LIBTOM) |
d194db6f9453
Use system libtomcrypt/libtommath if available. Doesn't currently
Matt Johnston <matt@ucc.asn.au>
parents:
573
diff
changeset
|
576 |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
577 dnl Added from OpenSSH 3.6.1p2's configure.ac |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
578 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
579 dnl allow user to disable some login recording features |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
580 AC_ARG_ENABLE(lastlog, |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
581 [ --disable-lastlog Disable use of lastlog even if detected [no]], |
1397
18c0b0e450ff
Fix configure options using AC_ARG_ENABLE
Stefan Hauser <stefan@shauser.net>
parents:
1280
diff
changeset
|
582 [ |
18c0b0e450ff
Fix configure options using AC_ARG_ENABLE
Stefan Hauser <stefan@shauser.net>
parents:
1280
diff
changeset
|
583 if test "x$enableval" = "xno" ; then |
1399
47a3a3cb7d45
Set configure #defines to 1. Escape some strings for m4
Matt Johnston <matt@ucc.asn.au>
parents:
1397
diff
changeset
|
584 AC_DEFINE(DISABLE_LASTLOG,1,Disable use of lastlog()) |
1397
18c0b0e450ff
Fix configure options using AC_ARG_ENABLE
Stefan Hauser <stefan@shauser.net>
parents:
1280
diff
changeset
|
585 fi |
18c0b0e450ff
Fix configure options using AC_ARG_ENABLE
Stefan Hauser <stefan@shauser.net>
parents:
1280
diff
changeset
|
586 ] |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
587 ) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
588 AC_ARG_ENABLE(utmp, |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
589 [ --disable-utmp Disable use of utmp even if detected [no]], |
1397
18c0b0e450ff
Fix configure options using AC_ARG_ENABLE
Stefan Hauser <stefan@shauser.net>
parents:
1280
diff
changeset
|
590 [ |
18c0b0e450ff
Fix configure options using AC_ARG_ENABLE
Stefan Hauser <stefan@shauser.net>
parents:
1280
diff
changeset
|
591 if test "x$enableval" = "xno" ; then |
1399
47a3a3cb7d45
Set configure #defines to 1. Escape some strings for m4
Matt Johnston <matt@ucc.asn.au>
parents:
1397
diff
changeset
|
592 AC_DEFINE(DISABLE_UTMP,1,Disable use of utmp) |
1397
18c0b0e450ff
Fix configure options using AC_ARG_ENABLE
Stefan Hauser <stefan@shauser.net>
parents:
1280
diff
changeset
|
593 fi |
18c0b0e450ff
Fix configure options using AC_ARG_ENABLE
Stefan Hauser <stefan@shauser.net>
parents:
1280
diff
changeset
|
594 ] |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
595 ) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
596 AC_ARG_ENABLE(utmpx, |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
597 [ --disable-utmpx Disable use of utmpx even if detected [no]], |
1397
18c0b0e450ff
Fix configure options using AC_ARG_ENABLE
Stefan Hauser <stefan@shauser.net>
parents:
1280
diff
changeset
|
598 [ |
18c0b0e450ff
Fix configure options using AC_ARG_ENABLE
Stefan Hauser <stefan@shauser.net>
parents:
1280
diff
changeset
|
599 if test "x$enableval" = "xno" ; then |
1399
47a3a3cb7d45
Set configure #defines to 1. Escape some strings for m4
Matt Johnston <matt@ucc.asn.au>
parents:
1397
diff
changeset
|
600 AC_DEFINE(DISABLE_UTMPX,1,Disable use of utmpx) |
1397
18c0b0e450ff
Fix configure options using AC_ARG_ENABLE
Stefan Hauser <stefan@shauser.net>
parents:
1280
diff
changeset
|
601 fi |
18c0b0e450ff
Fix configure options using AC_ARG_ENABLE
Stefan Hauser <stefan@shauser.net>
parents:
1280
diff
changeset
|
602 ] |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
603 ) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
604 AC_ARG_ENABLE(wtmp, |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
605 [ --disable-wtmp Disable use of wtmp even if detected [no]], |
1397
18c0b0e450ff
Fix configure options using AC_ARG_ENABLE
Stefan Hauser <stefan@shauser.net>
parents:
1280
diff
changeset
|
606 [ |
18c0b0e450ff
Fix configure options using AC_ARG_ENABLE
Stefan Hauser <stefan@shauser.net>
parents:
1280
diff
changeset
|
607 if test "x$enableval" = "xno" ; then |
1399
47a3a3cb7d45
Set configure #defines to 1. Escape some strings for m4
Matt Johnston <matt@ucc.asn.au>
parents:
1397
diff
changeset
|
608 AC_DEFINE(DISABLE_WTMP,1,Disable use of wtmp) |
1397
18c0b0e450ff
Fix configure options using AC_ARG_ENABLE
Stefan Hauser <stefan@shauser.net>
parents:
1280
diff
changeset
|
609 fi |
18c0b0e450ff
Fix configure options using AC_ARG_ENABLE
Stefan Hauser <stefan@shauser.net>
parents:
1280
diff
changeset
|
610 ] |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
611 ) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
612 AC_ARG_ENABLE(wtmpx, |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
613 [ --disable-wtmpx Disable use of wtmpx even if detected [no]], |
1397
18c0b0e450ff
Fix configure options using AC_ARG_ENABLE
Stefan Hauser <stefan@shauser.net>
parents:
1280
diff
changeset
|
614 [ |
18c0b0e450ff
Fix configure options using AC_ARG_ENABLE
Stefan Hauser <stefan@shauser.net>
parents:
1280
diff
changeset
|
615 if test "x$enableval" = "xno" ; then |
1399
47a3a3cb7d45
Set configure #defines to 1. Escape some strings for m4
Matt Johnston <matt@ucc.asn.au>
parents:
1397
diff
changeset
|
616 AC_DEFINE(DISABLE_WTMPX,1,Disable use of wtmpx) |
1397
18c0b0e450ff
Fix configure options using AC_ARG_ENABLE
Stefan Hauser <stefan@shauser.net>
parents:
1280
diff
changeset
|
617 fi |
18c0b0e450ff
Fix configure options using AC_ARG_ENABLE
Stefan Hauser <stefan@shauser.net>
parents:
1280
diff
changeset
|
618 ] |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
619 ) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
620 AC_ARG_ENABLE(loginfunc, |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
621 [ --disable-loginfunc Disable use of login() etc. [no]], |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
622 [ no_loginfunc_check=1 |
1399
47a3a3cb7d45
Set configure #defines to 1. Escape some strings for m4
Matt Johnston <matt@ucc.asn.au>
parents:
1397
diff
changeset
|
623 AC_MSG_NOTICE([Not using login() etc]) ] |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
624 ) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
625 AC_ARG_ENABLE(pututline, |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
626 [ --disable-pututline Disable use of pututline() etc. ([uw]tmp) [no]], |
1397
18c0b0e450ff
Fix configure options using AC_ARG_ENABLE
Stefan Hauser <stefan@shauser.net>
parents:
1280
diff
changeset
|
627 [ |
18c0b0e450ff
Fix configure options using AC_ARG_ENABLE
Stefan Hauser <stefan@shauser.net>
parents:
1280
diff
changeset
|
628 if test "x$enableval" = "xno" ; then |
1399
47a3a3cb7d45
Set configure #defines to 1. Escape some strings for m4
Matt Johnston <matt@ucc.asn.au>
parents:
1397
diff
changeset
|
629 AC_DEFINE(DISABLE_PUTUTLINE,1,Disable use of pututline()) |
1397
18c0b0e450ff
Fix configure options using AC_ARG_ENABLE
Stefan Hauser <stefan@shauser.net>
parents:
1280
diff
changeset
|
630 fi |
18c0b0e450ff
Fix configure options using AC_ARG_ENABLE
Stefan Hauser <stefan@shauser.net>
parents:
1280
diff
changeset
|
631 ] |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
632 ) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
633 AC_ARG_ENABLE(pututxline, |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
634 [ --disable-pututxline Disable use of pututxline() etc. ([uw]tmpx) [no]], |
1397
18c0b0e450ff
Fix configure options using AC_ARG_ENABLE
Stefan Hauser <stefan@shauser.net>
parents:
1280
diff
changeset
|
635 [ |
18c0b0e450ff
Fix configure options using AC_ARG_ENABLE
Stefan Hauser <stefan@shauser.net>
parents:
1280
diff
changeset
|
636 if test "x$enableval" = "xno" ; then |
1399
47a3a3cb7d45
Set configure #defines to 1. Escape some strings for m4
Matt Johnston <matt@ucc.asn.au>
parents:
1397
diff
changeset
|
637 AC_DEFINE(DISABLE_PUTUTXLINE,1,Disable use of pututxline()) |
1397
18c0b0e450ff
Fix configure options using AC_ARG_ENABLE
Stefan Hauser <stefan@shauser.net>
parents:
1280
diff
changeset
|
638 fi |
18c0b0e450ff
Fix configure options using AC_ARG_ENABLE
Stefan Hauser <stefan@shauser.net>
parents:
1280
diff
changeset
|
639 ] |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
640 ) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
641 AC_ARG_WITH(lastlog, |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
642 [ --with-lastlog=FILE|DIR specify lastlog location [common locations]], |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
643 [ |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
644 if test "x$withval" = "xno" ; then |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
645 AC_DEFINE(DISABLE_LASTLOG) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
646 else |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
647 conf_lastlog_location=$withval |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
648 fi |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
649 ] |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
650 ) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
651 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
652 if test -z "$no_loginfunc_check"; then |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
653 dnl Checks for libutil functions (login(), logout() etc, not openpty() ) |
1399
47a3a3cb7d45
Set configure #defines to 1. Escape some strings for m4
Matt Johnston <matt@ucc.asn.au>
parents:
1397
diff
changeset
|
654 AC_SEARCH_LIBS(login, util bsd, [AC_DEFINE(HAVE_LOGIN,1,[Have login() function])]) |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
655 AC_CHECK_FUNCS(logout updwtmp logwtmp) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
656 fi |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
657 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
658 dnl lastlog, [uw]tmpx? detection |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
659 dnl NOTE: set the paths in the platform section to avoid the |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
660 dnl need for command-line parameters |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
661 dnl lastlog and [uw]tmp are subject to a file search if all else fails |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
662 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
663 dnl lastlog detection |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
664 dnl NOTE: the code itself will detect if lastlog is a directory |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
665 AC_MSG_CHECKING([if your system defines LASTLOG_FILE]) |
856
f56c41030c15
Replace some deprecated macros with other ones, from Daniel Richard G.
Matt Johnston <matt@ucc.asn.au>
parents:
835
diff
changeset
|
666 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
667 #include <sys/types.h> |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
668 #include <utmp.h> |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
669 #ifdef HAVE_LASTLOG_H |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
670 # include <lastlog.h> |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
671 #endif |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
672 #ifdef HAVE_PATHS_H |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
673 # include <paths.h> |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
674 #endif |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
675 #ifdef HAVE_LOGIN_H |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
676 # include <login.h> |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
677 #endif |
856
f56c41030c15
Replace some deprecated macros with other ones, from Daniel Richard G.
Matt Johnston <matt@ucc.asn.au>
parents:
835
diff
changeset
|
678 ]], |
f56c41030c15
Replace some deprecated macros with other ones, from Daniel Richard G.
Matt Johnston <matt@ucc.asn.au>
parents:
835
diff
changeset
|
679 [[ char *lastlog = LASTLOG_FILE; ]])], |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
680 [ AC_MSG_RESULT(yes) ], |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
681 [ |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
682 AC_MSG_RESULT(no) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
683 AC_MSG_CHECKING([if your system defines _PATH_LASTLOG]) |
856
f56c41030c15
Replace some deprecated macros with other ones, from Daniel Richard G.
Matt Johnston <matt@ucc.asn.au>
parents:
835
diff
changeset
|
684 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
685 #include <sys/types.h> |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
686 #include <utmp.h> |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
687 #ifdef HAVE_LASTLOG_H |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
688 # include <lastlog.h> |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
689 #endif |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
690 #ifdef HAVE_PATHS_H |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
691 # include <paths.h> |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
692 #endif |
856
f56c41030c15
Replace some deprecated macros with other ones, from Daniel Richard G.
Matt Johnston <matt@ucc.asn.au>
parents:
835
diff
changeset
|
693 ]], |
f56c41030c15
Replace some deprecated macros with other ones, from Daniel Richard G.
Matt Johnston <matt@ucc.asn.au>
parents:
835
diff
changeset
|
694 [[ char *lastlog = _PATH_LASTLOG; ]])], |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
695 [ AC_MSG_RESULT(yes) ], |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
696 [ |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
697 AC_MSG_RESULT(no) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
698 system_lastlog_path=no |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
699 ]) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
700 ] |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
701 ) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
702 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
703 if test -z "$conf_lastlog_location"; then |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
704 if test x"$system_lastlog_path" = x"no" ; then |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
705 for f in /var/log/lastlog /usr/adm/lastlog /var/adm/lastlog /etc/security/lastlog ; do |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
706 if (test -d "$f" || test -f "$f") ; then |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
707 conf_lastlog_location=$f |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
708 fi |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
709 done |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
710 if test -z "$conf_lastlog_location"; then |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
711 AC_MSG_WARN([** Cannot find lastlog **]) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
712 dnl Don't define DISABLE_LASTLOG - that means we don't try wtmp/wtmpx |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
713 fi |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
714 fi |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
715 fi |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
716 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
717 if test -n "$conf_lastlog_location"; then |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
718 AC_DEFINE_UNQUOTED(CONF_LASTLOG_FILE, "$conf_lastlog_location", lastlog file location) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
719 fi |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
720 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
721 dnl utmp detection |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
722 AC_MSG_CHECKING([if your system defines UTMP_FILE]) |
856
f56c41030c15
Replace some deprecated macros with other ones, from Daniel Richard G.
Matt Johnston <matt@ucc.asn.au>
parents:
835
diff
changeset
|
723 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
724 #include <sys/types.h> |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
725 #include <utmp.h> |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
726 #ifdef HAVE_PATHS_H |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
727 # include <paths.h> |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
728 #endif |
856
f56c41030c15
Replace some deprecated macros with other ones, from Daniel Richard G.
Matt Johnston <matt@ucc.asn.au>
parents:
835
diff
changeset
|
729 ]], |
f56c41030c15
Replace some deprecated macros with other ones, from Daniel Richard G.
Matt Johnston <matt@ucc.asn.au>
parents:
835
diff
changeset
|
730 [[ char *utmp = UTMP_FILE; ]])], |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
731 [ AC_MSG_RESULT(yes) ], |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
732 [ AC_MSG_RESULT(no) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
733 system_utmp_path=no ] |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
734 ) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
735 if test -z "$conf_utmp_location"; then |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
736 if test x"$system_utmp_path" = x"no" ; then |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
737 for f in /etc/utmp /usr/adm/utmp /var/run/utmp; do |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
738 if test -f $f ; then |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
739 conf_utmp_location=$f |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
740 fi |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
741 done |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
742 if test -z "$conf_utmp_location"; then |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
743 AC_DEFINE(DISABLE_UTMP) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
744 fi |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
745 fi |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
746 fi |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
747 if test -n "$conf_utmp_location"; then |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
748 AC_DEFINE_UNQUOTED(CONF_UTMP_FILE, "$conf_utmp_location", utmp file location) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
749 fi |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
750 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
751 dnl wtmp detection |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
752 AC_MSG_CHECKING([if your system defines WTMP_FILE]) |
856
f56c41030c15
Replace some deprecated macros with other ones, from Daniel Richard G.
Matt Johnston <matt@ucc.asn.au>
parents:
835
diff
changeset
|
753 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
754 #include <sys/types.h> |
865 | 755 #ifdef HAVE_UTMP_H |
756 # include <utmp.h> | |
757 #endif | |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
758 #ifdef HAVE_PATHS_H |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
759 # include <paths.h> |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
760 #endif |
856
f56c41030c15
Replace some deprecated macros with other ones, from Daniel Richard G.
Matt Johnston <matt@ucc.asn.au>
parents:
835
diff
changeset
|
761 ]], |
f56c41030c15
Replace some deprecated macros with other ones, from Daniel Richard G.
Matt Johnston <matt@ucc.asn.au>
parents:
835
diff
changeset
|
762 [[ char *wtmp = WTMP_FILE; ]])], |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
763 [ AC_MSG_RESULT(yes) ], |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
764 [ AC_MSG_RESULT(no) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
765 system_wtmp_path=no ] |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
766 ) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
767 if test -z "$conf_wtmp_location"; then |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
768 if test x"$system_wtmp_path" = x"no" ; then |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
769 for f in /usr/adm/wtmp /var/log/wtmp; do |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
770 if test -f $f ; then |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
771 conf_wtmp_location=$f |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
772 fi |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
773 done |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
774 if test -z "$conf_wtmp_location"; then |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
775 AC_DEFINE(DISABLE_WTMP) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
776 fi |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
777 fi |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
778 fi |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
779 if test -n "$conf_wtmp_location"; then |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
780 AC_DEFINE_UNQUOTED(CONF_WTMP_FILE, "$conf_wtmp_location", wtmp file location) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
781 fi |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
782 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
783 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
784 dnl utmpx detection - I don't know any system so perverse as to require |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
785 dnl utmpx, but not define UTMPX_FILE (ditto wtmpx.) No doubt it's out |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
786 dnl there, though. |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
787 AC_MSG_CHECKING([if your system defines UTMPX_FILE]) |
856
f56c41030c15
Replace some deprecated macros with other ones, from Daniel Richard G.
Matt Johnston <matt@ucc.asn.au>
parents:
835
diff
changeset
|
788 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
789 #include <sys/types.h> |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
790 #include <utmp.h> |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
791 #ifdef HAVE_UTMPX_H |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
792 #include <utmpx.h> |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
793 #endif |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
794 #ifdef HAVE_PATHS_H |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
795 # include <paths.h> |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
796 #endif |
856
f56c41030c15
Replace some deprecated macros with other ones, from Daniel Richard G.
Matt Johnston <matt@ucc.asn.au>
parents:
835
diff
changeset
|
797 ]], |
f56c41030c15
Replace some deprecated macros with other ones, from Daniel Richard G.
Matt Johnston <matt@ucc.asn.au>
parents:
835
diff
changeset
|
798 [[ char *utmpx = UTMPX_FILE; ]])], |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
799 [ AC_MSG_RESULT(yes) ], |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
800 [ AC_MSG_RESULT(no) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
801 system_utmpx_path=no ] |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
802 ) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
803 if test -z "$conf_utmpx_location"; then |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
804 if test x"$system_utmpx_path" = x"no" ; then |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
805 AC_DEFINE(DISABLE_UTMPX) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
806 fi |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
807 else |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
808 AC_DEFINE_UNQUOTED(CONF_UTMPX_FILE, "$conf_utmpx_location", utmpx file location) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
809 fi |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
810 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
811 dnl wtmpx detection |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
812 AC_MSG_CHECKING([if your system defines WTMPX_FILE]) |
856
f56c41030c15
Replace some deprecated macros with other ones, from Daniel Richard G.
Matt Johnston <matt@ucc.asn.au>
parents:
835
diff
changeset
|
813 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
814 #include <sys/types.h> |
865 | 815 #ifdef HAVE_UTMP_H |
816 # include <utmp.h> | |
817 #endif | |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
818 #ifdef HAVE_UTMPX_H |
865 | 819 # include <utmpx.h> |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
820 #endif |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
821 #ifdef HAVE_PATHS_H |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
822 # include <paths.h> |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
823 #endif |
856
f56c41030c15
Replace some deprecated macros with other ones, from Daniel Richard G.
Matt Johnston <matt@ucc.asn.au>
parents:
835
diff
changeset
|
824 ]], |
f56c41030c15
Replace some deprecated macros with other ones, from Daniel Richard G.
Matt Johnston <matt@ucc.asn.au>
parents:
835
diff
changeset
|
825 [[ char *wtmpx = WTMPX_FILE; ]])], |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
826 [ AC_MSG_RESULT(yes) ], |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
827 [ AC_MSG_RESULT(no) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
828 system_wtmpx_path=no ] |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
829 ) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
830 if test -z "$conf_wtmpx_location"; then |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
831 if test x"$system_wtmpx_path" = x"no" ; then |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
832 AC_DEFINE(DISABLE_WTMPX) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
833 fi |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
834 else |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
835 AC_DEFINE_UNQUOTED(CONF_WTMPX_FILE, "$conf_wtmpx_location", wtmpx file location) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
836 fi |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
837 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
838 # Checks for library functions. |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
839 AC_PROG_GCC_TRADITIONAL |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
840 AC_FUNC_MEMCMP |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
841 AC_FUNC_SELECT_ARGTYPES |
1550
93a3726a36d6
Remove unused tests for headers and functions
Matt Johnston <matt@ucc.asn.au>
parents:
1505
diff
changeset
|
842 AC_CHECK_FUNCS([getpass getspnam getusershell putenv]) |
93a3726a36d6
Remove unused tests for headers and functions
Matt Johnston <matt@ucc.asn.au>
parents:
1505
diff
changeset
|
843 AC_CHECK_FUNCS([clearenv strlcpy strlcat daemon basename _getpty getaddrinfo ]) |
1861 | 844 AC_CHECK_FUNCS([freeaddrinfo getnameinfo fork writev getgrouplist fexecve]) |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
845 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
846 AC_SEARCH_LIBS(basename, gen, AC_DEFINE(HAVE_BASENAME)) |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
847 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
848 # Solaris needs ptmx |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
849 if test -z "$no_ptmx_check" ; then |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
850 if test x"$cross_compiling" = x"no" ; then |
856
f56c41030c15
Replace some deprecated macros with other ones, from Daniel Richard G.
Matt Johnston <matt@ucc.asn.au>
parents:
835
diff
changeset
|
851 if test -e /dev/ptmx ; then |
1399
47a3a3cb7d45
Set configure #defines to 1. Escape some strings for m4
Matt Johnston <matt@ucc.asn.au>
parents:
1397
diff
changeset
|
852 AC_DEFINE(USE_DEV_PTMX,1,Use /dev/ptmx) |
856
f56c41030c15
Replace some deprecated macros with other ones, from Daniel Richard G.
Matt Johnston <matt@ucc.asn.au>
parents:
835
diff
changeset
|
853 fi |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
854 else |
431
126687f635dc
Quote some message in configure
Matt Johnston <matt@ucc.asn.au>
parents:
417
diff
changeset
|
855 AC_MSG_NOTICE([Not checking for /dev/ptmx, we're cross-compiling]) |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
856 fi |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
857 fi |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
858 |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
859 if test -z "$no_ptc_check" ; then |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
860 if test x"$cross_compiling" = x"no" ; then |
856
f56c41030c15
Replace some deprecated macros with other ones, from Daniel Richard G.
Matt Johnston <matt@ucc.asn.au>
parents:
835
diff
changeset
|
861 if test -e /dev/ptc ; then |
1399
47a3a3cb7d45
Set configure #defines to 1. Escape some strings for m4
Matt Johnston <matt@ucc.asn.au>
parents:
1397
diff
changeset
|
862 AC_DEFINE(HAVE_DEV_PTS_AND_PTC,1,Use /dev/ptc & /dev/pts) |
856
f56c41030c15
Replace some deprecated macros with other ones, from Daniel Richard G.
Matt Johnston <matt@ucc.asn.au>
parents:
835
diff
changeset
|
863 fi |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
864 else |
431
126687f635dc
Quote some message in configure
Matt Johnston <matt@ucc.asn.au>
parents:
417
diff
changeset
|
865 AC_MSG_NOTICE([Not checking for /dev/ptc & /dev/pts since we're cross-compiling]) |
4
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
866 fi |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
867 fi |
fe6bca95afa7
Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff
changeset
|
868 |
67 | 869 AC_EXEEXT |
366
59531221b846
Fix up separate-directory building for libtomcrypt
Matt Johnston <matt@ucc.asn.au>
parents:
336
diff
changeset
|
870 |
998
3a32727986ee
Allow configure with libtomcrypt/libtommath directories missing
Elan Ruusamäe <glen@delfi.ee>
parents:
928
diff
changeset
|
871 if test $BUNDLED_LIBTOM = 1 ; then |
1473
67bcd5fa40c6
generate list of libtomcrypt directories automatically
Matt Johnston <matt@ucc.asn.au>
parents:
1469
diff
changeset
|
872 (cd $srcdir; find libtomcrypt -type d) | xargs mkdir -pv |
998
3a32727986ee
Allow configure with libtomcrypt/libtommath directories missing
Elan Ruusamäe <glen@delfi.ee>
parents:
928
diff
changeset
|
873 LIBTOM_FILES="libtomcrypt/Makefile libtommath/Makefile" |
3a32727986ee
Allow configure with libtomcrypt/libtommath directories missing
Elan Ruusamäe <glen@delfi.ee>
parents:
928
diff
changeset
|
874 fi |
1473
67bcd5fa40c6
generate list of libtomcrypt directories automatically
Matt Johnston <matt@ucc.asn.au>
parents:
1469
diff
changeset
|
875 |
1849
d34f50b7b9fd
Add configure --enable-werror argument
Matt Johnston <matt@ucc.asn.au>
parents:
1837
diff
changeset
|
876 # flags that should be set in Makefile but not for configure tests |
d34f50b7b9fd
Add configure --enable-werror argument
Matt Johnston <matt@ucc.asn.au>
parents:
1837
diff
changeset
|
877 CFLAGS="$CFLAGS $LATE_CFLAGS" |
d34f50b7b9fd
Add configure --enable-werror argument
Matt Johnston <matt@ucc.asn.au>
parents:
1837
diff
changeset
|
878 |
1811
7dc92355a986
Remove some obselete autoconf bits.
Matt Johnston <matt@ucc.asn.au>
parents:
1798
diff
changeset
|
879 AC_CONFIG_HEADERS([config.h]) |
1837
df7bfd2f7d45
Add "make test" target to run pytest
Matt Johnston <matt@codeconstruct.com.au>
parents:
1811
diff
changeset
|
880 AC_CONFIG_FILES(Makefile $LIBTOM_FILES test/Makefile) |
856
f56c41030c15
Replace some deprecated macros with other ones, from Daniel Richard G.
Matt Johnston <matt@ucc.asn.au>
parents:
835
diff
changeset
|
881 AC_OUTPUT |
585
d194db6f9453
Use system libtomcrypt/libtommath if available. Doesn't currently
Matt Johnston <matt@ucc.asn.au>
parents:
573
diff
changeset
|
882 |
d194db6f9453
Use system libtomcrypt/libtommath if available. Doesn't currently
Matt Johnston <matt@ucc.asn.au>
parents:
573
diff
changeset
|
883 AC_MSG_NOTICE() |
d194db6f9453
Use system libtomcrypt/libtommath if available. Doesn't currently
Matt Johnston <matt@ucc.asn.au>
parents:
573
diff
changeset
|
884 if test $BUNDLED_LIBTOM = 1 ; then |
1159
f567a4152c14
Test for crypt() rather than crypt.h
Matt Johnston <matt@ucc.asn.au>
parents:
1158
diff
changeset
|
885 AC_MSG_NOTICE([Using bundled libtomcrypt and libtommath]) |
585
d194db6f9453
Use system libtomcrypt/libtommath if available. Doesn't currently
Matt Johnston <matt@ucc.asn.au>
parents:
573
diff
changeset
|
886 else |
1159
f567a4152c14
Test for crypt() rather than crypt.h
Matt Johnston <matt@ucc.asn.au>
parents:
1158
diff
changeset
|
887 AC_MSG_NOTICE([Using system libtomcrypt and libtommath]) |
f567a4152c14
Test for crypt() rather than crypt.h
Matt Johnston <matt@ucc.asn.au>
parents:
1158
diff
changeset
|
888 fi |
f567a4152c14
Test for crypt() rather than crypt.h
Matt Johnston <matt@ucc.asn.au>
parents:
1158
diff
changeset
|
889 |
f567a4152c14
Test for crypt() rather than crypt.h
Matt Johnston <matt@ucc.asn.au>
parents:
1158
diff
changeset
|
890 |
f567a4152c14
Test for crypt() rather than crypt.h
Matt Johnston <matt@ucc.asn.au>
parents:
1158
diff
changeset
|
891 if test "x$ac_cv_func_getpass" != xyes; then |
f567a4152c14
Test for crypt() rather than crypt.h
Matt Johnston <matt@ucc.asn.au>
parents:
1158
diff
changeset
|
892 AC_MSG_NOTICE() |
f567a4152c14
Test for crypt() rather than crypt.h
Matt Johnston <matt@ucc.asn.au>
parents:
1158
diff
changeset
|
893 AC_MSG_NOTICE([getpass() not available, dbclient will only have public-key authentication]) |
f567a4152c14
Test for crypt() rather than crypt.h
Matt Johnston <matt@ucc.asn.au>
parents:
1158
diff
changeset
|
894 fi |
f567a4152c14
Test for crypt() rather than crypt.h
Matt Johnston <matt@ucc.asn.au>
parents:
1158
diff
changeset
|
895 |
1186
a4ce76e6fb63
Another attempt at test for crypt()
Matt Johnston <matt@ucc.asn.au>
parents:
1185
diff
changeset
|
896 if test "t$found_crypt_func" != there; then |
1159
f567a4152c14
Test for crypt() rather than crypt.h
Matt Johnston <matt@ucc.asn.au>
parents:
1158
diff
changeset
|
897 AC_MSG_NOTICE() |
f567a4152c14
Test for crypt() rather than crypt.h
Matt Johnston <matt@ucc.asn.au>
parents:
1158
diff
changeset
|
898 AC_MSG_NOTICE([crypt() not available, dropbear server will not have password authentication]) |
585
d194db6f9453
Use system libtomcrypt/libtommath if available. Doesn't currently
Matt Johnston <matt@ucc.asn.au>
parents:
573
diff
changeset
|
899 fi |
d194db6f9453
Use system libtomcrypt/libtommath if available. Doesn't currently
Matt Johnston <matt@ucc.asn.au>
parents:
573
diff
changeset
|
900 |
321
fa9c45d09727
change AC_MSG_RESULT to AC_MSG_NOTICE in configure.in, add AC_SYS_LARGEFILE
Matt Johnston <matt@ucc.asn.au>
parents:
262
diff
changeset
|
901 AC_MSG_NOTICE() |
1667
986126448688
Update remaining advise to edit options.h
Alexander Dahl <ada@thorsis.com>
parents:
1654
diff
changeset
|
902 AC_MSG_NOTICE([Now edit localoptions.h to choose features.]) |