1#--------------------------------------------------------------------------- 2# 3# xc-am-iface.m4 4# 5# Copyright (C) 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# SPDX-License-Identifier: ISC 20# 21#--------------------------------------------------------------------------- 22 23# serial 1 24 25 26dnl _XC_AUTOMAKE_BODY 27dnl ------------------------------------------------- 28dnl Private macro. 29dnl 30dnl This macro performs embedding of automake initialization 31dnl code into configure script. When automake version 1.14 or 32dnl newer is used at configure script generation time, this 33dnl results in 'subdir-objects' automake option being used. 34dnl When using automake versions older than 1.14 this option 35dnl is not used when generating configure script. 36dnl 37dnl Existence of automake _AM_PROG_CC_C_O m4 private macro 38dnl is used to differentiate automake version 1.14 from older 39dnl ones which lack this macro. 40 41m4_define([_XC_AUTOMAKE_BODY], 42[dnl 43## --------------------------------------- ## 44## Start of automake initialization code ## 45## --------------------------------------- ## 46m4_ifdef([_AM_PROG_CC_C_O], 47[ 48AM_INIT_AUTOMAKE([subdir-objects]) 49],[ 50AM_INIT_AUTOMAKE 51])dnl 52## ------------------------------------- ## 53## End of automake initialization code ## 54## ------------------------------------- ## 55dnl 56m4_define([$0], [])[]dnl 57]) 58 59 60dnl XC_AUTOMAKE 61dnl ------------------------------------------------- 62dnl Public macro. 63dnl 64dnl This macro embeds automake machinery into configure 65dnl script regardless of automake version used in order 66dnl to generate configure script. 67dnl 68dnl When using automake version 1.14 or newer, automake 69dnl initialization option 'subdir-objects' is used to 70dnl generate the configure script, otherwise this option 71dnl is not used. 72 73AC_DEFUN([XC_AUTOMAKE], 74[dnl 75AC_PREREQ([2.50])dnl 76dnl 77AC_BEFORE([$0],[AM_INIT_AUTOMAKE])dnl 78dnl 79_XC_AUTOMAKE_BODY 80dnl 81m4_ifdef([AM_INIT_AUTOMAKE], 82 [m4_undefine([AM_INIT_AUTOMAKE])])dnl 83dnl 84m4_define([$0], [])[]dnl 85]) 86