summaryrefslogtreecommitdiff
path: root/whatsnew-2.2.txt
blob: 7e09e61f8204193673a41095ff6e371c9549a180 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
...

* Building libevent as a sub-project using GNU Auto* tools

Some projects will choose to include libevent in their source distribution,
and build libevent as a sub-project.  This may be effected by putting the
line:

 AC_CONFIG_SUBDIRS([path/to/libevent])

in the master configure.ac file for the master project.

There are cases where the master project will want to pass in additional
flags for CFLAGS, CPPFLAGS, or LDFLAGS.  Since these variables are reserved
for the user, and AM_CFLAGS, AM_CPPFLAGS, and AM_LDFLAGS are reserved for
each package, libevent offers the following variables for a master package
to tell libevent that there are additional compile/link values:

 LIBEVENT_CFLAGS
 LIBEVENT_CPPFLAGS
 LIBEVENT_LDFLAGS

A master package can set these variables in its configure.ac file.

Here's an example:

configure.ac:
...
EXTRA_CFLAGS=...
EXTRA_CPPFLAGS=...
EXTRA_LDFLAGS=...
...
dnl ac_configure_args is undocumented but widely abused, as here,
dnl to modify the defaults of the libevent subpackage, by prefixing
dnl our changes to the child configure arguments already assembled.
dnl User-supplied contradictory choices should prevail thanks to
dnl "last wins".
ac_configure_args=" --disable-openssl${ac_configure_args}"
ac_configure_args=" --disable-shared${ac_configure_args}"
ac_configure_args=" --disable-libevent-regress${ac_configure_args}"
ac_configure_args=" --disable-libevent-install${ac_configure_args}"
ac_configure_args=" --enable-silent-rules${ac_configure_args}"
ac_configure_args=" --enable-function-sections${ac_configure_args}"
ac_configure_args=" LIBEVENT_CFLAGS='${EXTRA_CFLAGS}'${ac_configure_args}"
ac_configure_args=" LIBEVENT_CPPFLAGS='${EXTRA_CPPFLAGS}'${ac_configure_args}"
ac_configure_args=" LIBEVENT_LDFLAGS='${EXTRA_LDFLAGS}'${ac_configure_args}"
AC_CONFIG_SUBDIRS([libevent])
...

The space after the initial '"' is significant.