annotate configure.ac @ 1544:d1a8a05216ff

make group1 client-only
author Matt Johnston <matt@ucc.asn.au>
date Mon, 26 Feb 2018 22:42:53 +0800
parents 55120acb9994
children 5916af64acd4 93a3726a36d6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
86725004a0ea fake-rfc stuff
Matt Johnston <matt@ucc.asn.au>
parents: 28
diff changeset
4 # This Autoconf file was cobbled from various locations. In particular, a bunch
86725004a0ea fake-rfc stuff
Matt Johnston <matt@ucc.asn.au>
parents: 28
diff changeset
5 # of the platform checks have been taken straight from OpenSSH's configure.ac
86725004a0ea fake-rfc stuff
Matt Johnston <matt@ucc.asn.au>
parents: 28
diff changeset
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
856
f56c41030c15 Replace some deprecated macros with other ones, from Daniel Richard G.
Matt Johnston <matt@ucc.asn.au>
parents: 835
diff changeset
8 AC_PREREQ(2.59)
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
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
12 # Checks for programs.
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
13 AC_PROG_CC
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
14
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
15 if test -z "$LD" ; then
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
16 LD=$CC
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
17 fi
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
18 AC_SUBST(LD)
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
19
1469
51043e868f55 Test for -Wno-pointer-sign, move CFLAGS tests into a macro
Matt Johnston <matt@ucc.asn.au>
parents: 1463
diff changeset
20 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
21 [{
51043e868f55 Test for -Wno-pointer-sign, move CFLAGS tests into a macro
Matt Johnston <matt@ucc.asn.au>
parents: 1463
diff changeset
22 OLDFLAGS="$CFLAGS"
51043e868f55 Test for -Wno-pointer-sign, move CFLAGS tests into a macro
Matt Johnston <matt@ucc.asn.au>
parents: 1463
diff changeset
23 TESTFLAGS="$1"
51043e868f55 Test for -Wno-pointer-sign, move CFLAGS tests into a macro
Matt Johnston <matt@ucc.asn.au>
parents: 1463
diff changeset
24 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
25 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
26 [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
27 [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
28 )
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
1427
f0e262a46d4e set hardened compiler/linker flags by default
Matt Johnston <matt@ucc.asn.au>
parents: 1426
diff changeset
31 # set compile flags prior to other tests
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
32 if test -z "$OLDCFLAGS" && 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
33 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
34 CFLAGS="-Os -W -Wall"
4
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
35 fi
fe6bca95afa7 Makefile.in contains updated files required
Matt Johnston <matt@ucc.asn.au>
parents:
diff changeset
36
1469
51043e868f55 Test for -Wno-pointer-sign, move CFLAGS tests into a macro
Matt Johnston <matt@ucc.asn.au>
parents: 1463
diff changeset
37 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
38 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
39
51043e868f55 Test for -Wno-pointer-sign, move CFLAGS tests into a macro