Mercurial > hg
comparison mcabber/macros/xc-am-iface.m4 @ 2077:f81b4a97afaa
Add XC_AUTOMAKE from Daniel Stenberg and use subdir-objects
Use XC_AUTOMAKE (from the libcurl project) to conditionally use
Automake subdir-objects option.
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sun, 29 Sep 2013 13:17:39 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
2076:9fb1ccf291cc | 2077:f81b4a97afaa |
---|---|
1 #--------------------------------------------------------------------------- | |
2 # | |
3 # xc-am-iface.m4 | |
4 # | |
5 # Copyright (c) 2013 Daniel Stenberg <daniel@haxx.se> | |
6 # | |
7 # Permission to use, copy, modify, and distribute this software for any | |
8 # purpose with or without fee is hereby granted, provided that the above | |
9 # copyright notice and this permission notice appear in all copies. | |
10 # | |
11 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
12 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
13 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | |
14 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | |
15 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | |
16 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | |
17 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |
18 # | |
19 #--------------------------------------------------------------------------- | |
20 | |
21 # serial 1 | |
22 | |
23 | |
24 dnl _XC_AUTOMAKE_BODY | |
25 dnl ------------------------------------------------- | |
26 dnl Private macro. | |
27 dnl | |
28 dnl This macro performs embedding of automake initialization | |
29 dnl code into configure script. When automake version 1.14 or | |
30 dnl newer is used at configure script generation time, this | |
31 dnl results in 'subdir-objects' automake option being used. | |
32 dnl When using automake versions older than 1.14 this option | |
33 dnl is not used when generating configure script. | |
34 | |
35 m4_define([_XC_AUTOMAKE_BODY], | |
36 [dnl | |
37 ## --------------------------------------- ## | |
38 ## Start of automake initialization code ## | |
39 ## --------------------------------------- ## | |
40 m4_ifdef([_AM_PROG_CC_C_O], | |
41 [ | |
42 AM_INIT_AUTOMAKE([subdir-objects]) | |
43 ],[ | |
44 AM_INIT_AUTOMAKE | |
45 ])dnl | |
46 ## ------------------------------------- ## | |
47 ## End of automake initialization code ## | |
48 ## ------------------------------------- ## | |
49 dnl | |
50 m4_define([$0], [])[]dnl | |
51 ]) | |
52 | |
53 | |
54 dnl XC_AUTOMAKE | |
55 dnl ------------------------------------------------- | |
56 dnl Public macro. | |
57 dnl | |
58 dnl This macro embeds automake machinery into configure | |
59 dnl script with initialization option 'subdir-objects' | |
60 dnl when using automake version 1.14 or newer. | |
61 | |
62 AC_DEFUN([XC_AUTOMAKE], | |
63 [dnl | |
64 AC_PREREQ([2.50])dnl | |
65 dnl | |
66 AC_BEFORE([$0],[AM_INIT_AUTOMAKE])dnl | |
67 dnl | |
68 _XC_AUTOMAKE_BODY | |
69 dnl | |
70 m4_ifdef([AM_INIT_AUTOMAKE], | |
71 [m4_undefine([AM_INIT_AUTOMAKE])])dnl | |
72 dnl | |
73 m4_define([$0], [])[]dnl | |
74 ]) | |
75 |