xref: /third_party/curl/m4/xc-am-iface.m4 (revision 13498266)
113498266Sopenharmony_ci#---------------------------------------------------------------------------
213498266Sopenharmony_ci#
313498266Sopenharmony_ci# xc-am-iface.m4
413498266Sopenharmony_ci#
513498266Sopenharmony_ci# Copyright (C) Daniel Stenberg <daniel@haxx.se>
613498266Sopenharmony_ci#
713498266Sopenharmony_ci# Permission to use, copy, modify, and distribute this software for any
813498266Sopenharmony_ci# purpose with or without fee is hereby granted, provided that the above
913498266Sopenharmony_ci# copyright notice and this permission notice appear in all copies.
1013498266Sopenharmony_ci#
1113498266Sopenharmony_ci# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
1213498266Sopenharmony_ci# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
1313498266Sopenharmony_ci# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
1413498266Sopenharmony_ci# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
1513498266Sopenharmony_ci# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
1613498266Sopenharmony_ci# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
1713498266Sopenharmony_ci# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
1813498266Sopenharmony_ci#
1913498266Sopenharmony_ci# SPDX-License-Identifier: ISC
2013498266Sopenharmony_ci#
2113498266Sopenharmony_ci#---------------------------------------------------------------------------
2213498266Sopenharmony_ci
2313498266Sopenharmony_ci# serial 1
2413498266Sopenharmony_ci
2513498266Sopenharmony_ci
2613498266Sopenharmony_cidnl _XC_AUTOMAKE_BODY
2713498266Sopenharmony_cidnl -------------------------------------------------
2813498266Sopenharmony_cidnl Private macro.
2913498266Sopenharmony_cidnl
3013498266Sopenharmony_cidnl This macro performs embedding of automake initialization
3113498266Sopenharmony_cidnl code into configure script. When automake version 1.14 or
3213498266Sopenharmony_cidnl newer is used at configure script generation time, this
3313498266Sopenharmony_cidnl results in 'subdir-objects' automake option being used.
3413498266Sopenharmony_cidnl When using automake versions older than 1.14 this option
3513498266Sopenharmony_cidnl is not used when generating configure script.
3613498266Sopenharmony_cidnl
3713498266Sopenharmony_cidnl Existence of automake _AM_PROG_CC_C_O m4 private macro
3813498266Sopenharmony_cidnl is used to differentiate automake version 1.14 from older
3913498266Sopenharmony_cidnl ones which lack this macro.
4013498266Sopenharmony_ci
4113498266Sopenharmony_cim4_define([_XC_AUTOMAKE_BODY],
4213498266Sopenharmony_ci[dnl
4313498266Sopenharmony_ci## --------------------------------------- ##
4413498266Sopenharmony_ci##  Start of automake initialization code  ##
4513498266Sopenharmony_ci## --------------------------------------- ##
4613498266Sopenharmony_cim4_ifdef([_AM_PROG_CC_C_O],
4713498266Sopenharmony_ci[
4813498266Sopenharmony_ciAM_INIT_AUTOMAKE([subdir-objects])
4913498266Sopenharmony_ci],[
5013498266Sopenharmony_ciAM_INIT_AUTOMAKE
5113498266Sopenharmony_ci])dnl
5213498266Sopenharmony_ci## ------------------------------------- ##
5313498266Sopenharmony_ci##  End of automake initialization code  ##
5413498266Sopenharmony_ci## ------------------------------------- ##
5513498266Sopenharmony_cidnl
5613498266Sopenharmony_cim4_define([$0], [])[]dnl
5713498266Sopenharmony_ci])
5813498266Sopenharmony_ci
5913498266Sopenharmony_ci
6013498266Sopenharmony_cidnl XC_AUTOMAKE
6113498266Sopenharmony_cidnl -------------------------------------------------
6213498266Sopenharmony_cidnl Public macro.
6313498266Sopenharmony_cidnl
6413498266Sopenharmony_cidnl This macro embeds automake machinery into configure
6513498266Sopenharmony_cidnl script regardless of automake version used in order
6613498266Sopenharmony_cidnl to generate configure script.
6713498266Sopenharmony_cidnl
6813498266Sopenharmony_cidnl When using automake version 1.14 or newer, automake
6913498266Sopenharmony_cidnl initialization option 'subdir-objects' is used to
7013498266Sopenharmony_cidnl generate the configure script, otherwise this option
7113498266Sopenharmony_cidnl is not used.
7213498266Sopenharmony_ci
7313498266Sopenharmony_ciAC_DEFUN([XC_AUTOMAKE],
7413498266Sopenharmony_ci[dnl
7513498266Sopenharmony_ciAC_PREREQ([2.50])dnl
7613498266Sopenharmony_cidnl
7713498266Sopenharmony_ciAC_BEFORE([$0],[AM_INIT_AUTOMAKE])dnl
7813498266Sopenharmony_cidnl
7913498266Sopenharmony_ci_XC_AUTOMAKE_BODY
8013498266Sopenharmony_cidnl
8113498266Sopenharmony_cim4_ifdef([AM_INIT_AUTOMAKE],
8213498266Sopenharmony_ci  [m4_undefine([AM_INIT_AUTOMAKE])])dnl
8313498266Sopenharmony_cidnl
8413498266Sopenharmony_cim4_define([$0], [])[]dnl
8513498266Sopenharmony_ci])
86