Mercurial > hg
changeset 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 | 9fb1ccf291cc |
children | 2a62243f6da9 |
files | mcabber/configure.ac mcabber/macros/xc-am-iface.m4 |
diffstat | 2 files changed, 76 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mcabber/configure.ac Wed May 15 13:32:42 2013 +0300 +++ b/mcabber/configure.ac Sun Sep 29 13:17:39 2013 +0200 @@ -3,7 +3,7 @@ AC_PREREQ(2.59) AC_INIT([mcabber],[0.10.3-dev],[mcabber@lilotux.net]) -AM_INIT_AUTOMAKE +XC_AUTOMAKE AC_CONFIG_SRCDIR([mcabber]) AM_CONFIG_HEADER(mcabber/config.h) AC_CONFIG_HEADER(include/config.h)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mcabber/macros/xc-am-iface.m4 Sun Sep 29 13:17:39 2013 +0200 @@ -0,0 +1,75 @@ +#--------------------------------------------------------------------------- +# +# xc-am-iface.m4 +# +# Copyright (c) 2013 Daniel Stenberg <daniel@haxx.se> +# +# Permission to use, copy, modify, and distribute this software for any +# purpose with or without fee is hereby granted, provided that the above +# copyright notice and this permission notice appear in all copies. +# +# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +# +#--------------------------------------------------------------------------- + +# serial 1 + + +dnl _XC_AUTOMAKE_BODY +dnl ------------------------------------------------- +dnl Private macro. +dnl +dnl This macro performs embedding of automake initialization +dnl code into configure script. When automake version 1.14 or +dnl newer is used at configure script generation time, this +dnl results in 'subdir-objects' automake option being used. +dnl When using automake versions older than 1.14 this option +dnl is not used when generating configure script. + +m4_define([_XC_AUTOMAKE_BODY], +[dnl +## --------------------------------------- ## +## Start of automake initialization code ## +## --------------------------------------- ## +m4_ifdef([_AM_PROG_CC_C_O], +[ +AM_INIT_AUTOMAKE([subdir-objects]) +],[ +AM_INIT_AUTOMAKE +])dnl +## ------------------------------------- ## +## End of automake initialization code ## +## ------------------------------------- ## +dnl +m4_define([$0], [])[]dnl +]) + + +dnl XC_AUTOMAKE +dnl ------------------------------------------------- +dnl Public macro. +dnl +dnl This macro embeds automake machinery into configure +dnl script with initialization option 'subdir-objects' +dnl when using automake version 1.14 or newer. + +AC_DEFUN([XC_AUTOMAKE], +[dnl +AC_PREREQ([2.50])dnl +dnl +AC_BEFORE([$0],[AM_INIT_AUTOMAKE])dnl +dnl +_XC_AUTOMAKE_BODY +dnl +m4_ifdef([AM_INIT_AUTOMAKE], + [m4_undefine([AM_INIT_AUTOMAKE])])dnl +dnl +m4_define([$0], [])[]dnl +]) +