113498266Sopenharmony_ci#---------------------------------------------------------------------------
213498266Sopenharmony_ci#
313498266Sopenharmony_ci# xc-lt-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_LIBTOOL_PREAMBLE
2713498266Sopenharmony_cidnl -------------------------------------------------
2813498266Sopenharmony_cidnl Private macro.
2913498266Sopenharmony_cidnl
3013498266Sopenharmony_cidnl Checks some configure script options related with
3113498266Sopenharmony_cidnl libtool and customizes its default behavior before
3213498266Sopenharmony_cidnl libtool code is actually used in script.
3313498266Sopenharmony_ci
3413498266Sopenharmony_cim4_define([_XC_LIBTOOL_PREAMBLE],
3513498266Sopenharmony_ci[dnl
3613498266Sopenharmony_ci# ------------------------------------ #
3713498266Sopenharmony_ci#  Determine libtool default behavior  #
3813498266Sopenharmony_ci# ------------------------------------ #
3913498266Sopenharmony_ci
4013498266Sopenharmony_ci#
4113498266Sopenharmony_ci# Default behavior is to enable shared and static libraries on systems
4213498266Sopenharmony_ci# where libtool knows how to build both library versions, and does not
4313498266Sopenharmony_ci# require separate configuration and build runs for each flavor.
4413498266Sopenharmony_ci#
4513498266Sopenharmony_ci
4613498266Sopenharmony_cixc_lt_want_enable_shared='yes'
4713498266Sopenharmony_cixc_lt_want_enable_static='yes'
4813498266Sopenharmony_ci
4913498266Sopenharmony_ci#
5013498266Sopenharmony_ci# User may have disabled shared or static libraries.
5113498266Sopenharmony_ci#
5213498266Sopenharmony_cicase "x$enable_shared" in @%:@ (
5313498266Sopenharmony_ci  xno)
5413498266Sopenharmony_ci    xc_lt_want_enable_shared='no'
5513498266Sopenharmony_ci    ;;
5613498266Sopenharmony_ciesac
5713498266Sopenharmony_cicase "x$enable_static" in @%:@ (
5813498266Sopenharmony_ci  xno)
5913498266Sopenharmony_ci    xc_lt_want_enable_static='no'
6013498266Sopenharmony_ci    ;;
6113498266Sopenharmony_ciesac
6213498266Sopenharmony_ciif test "x$xc_lt_want_enable_shared" = 'xno' &&
6313498266Sopenharmony_ci  test "x$xc_lt_want_enable_static" = 'xno'; then
6413498266Sopenharmony_ci  AC_MSG_ERROR([can not disable shared and static libraries simultaneously])
6513498266Sopenharmony_cifi
6613498266Sopenharmony_ci
6713498266Sopenharmony_ci#
6813498266Sopenharmony_ci# Default behavior on systems that require independent configuration
6913498266Sopenharmony_ci# and build runs for shared and static is to enable shared libraries
7013498266Sopenharmony_ci# and disable static ones. On these systems option '--disable-shared'
7113498266Sopenharmony_ci# must be used in order to build a proper static library.
7213498266Sopenharmony_ci#
7313498266Sopenharmony_ci
7413498266Sopenharmony_ciif test "x$xc_lt_want_enable_shared" = 'xyes' &&
7513498266Sopenharmony_ci  test "x$xc_lt_want_enable_static" = 'xyes'; then
7613498266Sopenharmony_ci  case $host_os in @%:@ (
7713498266Sopenharmony_ci    pw32* | cegcc* | os2* | aix*)
7813498266Sopenharmony_ci      xc_lt_want_enable_static='no'
7913498266Sopenharmony_ci      ;;
8013498266Sopenharmony_ci  esac
8113498266Sopenharmony_cifi
8213498266Sopenharmony_ci
8313498266Sopenharmony_ci#
8413498266Sopenharmony_ci# Make libtool aware of current shared and static library preferences
8513498266Sopenharmony_ci# taking in account that, depending on host characteristics, libtool
8613498266Sopenharmony_ci# may modify these option preferences later in this configure script.
8713498266Sopenharmony_ci#
8813498266Sopenharmony_ci
8913498266Sopenharmony_cienable_shared=$xc_lt_want_enable_shared
9013498266Sopenharmony_cienable_static=$xc_lt_want_enable_static
9113498266Sopenharmony_ci
9213498266Sopenharmony_ci#
9313498266Sopenharmony_ci# Default behavior is to build PIC objects for shared libraries and
9413498266Sopenharmony_ci# non-PIC objects for static libraries.
9513498266Sopenharmony_ci#
9613498266Sopenharmony_ci
9713498266Sopenharmony_cixc_lt_want_with_pic='default'
9813498266Sopenharmony_ci
9913498266Sopenharmony_ci#
10013498266Sopenharmony_ci# User may have specified PIC preference.
10113498266Sopenharmony_ci#
10213498266Sopenharmony_ci
10313498266Sopenharmony_cicase "x$with_pic" in @%:@ ((
10413498266Sopenharmony_ci  xno)
10513498266Sopenharmony_ci    xc_lt_want_with_pic='no'
10613498266Sopenharmony_ci    ;;
10713498266Sopenharmony_ci  xyes)
10813498266Sopenharmony_ci    xc_lt_want_with_pic='yes'
10913498266Sopenharmony_ci    ;;
11013498266Sopenharmony_ciesac
11113498266Sopenharmony_ci
11213498266Sopenharmony_ci#
11313498266Sopenharmony_ci# Default behavior on some systems where building a shared library out
11413498266Sopenharmony_ci# of non-PIC compiled objects will fail with following linker error
11513498266Sopenharmony_ci# "relocation R_X86_64_32 can not be used when making a shared object"
11613498266Sopenharmony_ci# is to build PIC objects even for static libraries. This behavior may
11713498266Sopenharmony_ci# be overridden using 'configure --disable-shared --without-pic'.
11813498266Sopenharmony_ci#
11913498266Sopenharmony_ci
12013498266Sopenharmony_ciif test "x$xc_lt_want_with_pic" = 'xdefault'; then
12113498266Sopenharmony_ci  case $host_cpu in @%:@ (
12213498266Sopenharmony_ci    x86_64 | amd64 | ia64)
12313498266Sopenharmony_ci      case $host_os in @%:@ (
12413498266Sopenharmony_ci        linux* | freebsd* | midnightbsd*)
12513498266Sopenharmony_ci          xc_lt_want_with_pic='yes'
12613498266Sopenharmony_ci          ;;
12713498266Sopenharmony_ci      esac
12813498266Sopenharmony_ci      ;;
12913498266Sopenharmony_ci  esac
13013498266Sopenharmony_cifi
13113498266Sopenharmony_ci
13213498266Sopenharmony_ci#
13313498266Sopenharmony_ci# Make libtool aware of current PIC preference taking in account that,
13413498266Sopenharmony_ci# depending on host characteristics, libtool may modify PIC default
13513498266Sopenharmony_ci# behavior to fit host system idiosyncrasies later in this script.
13613498266Sopenharmony_ci#
13713498266Sopenharmony_ci
13813498266Sopenharmony_ciwith_pic=$xc_lt_want_with_pic
13913498266Sopenharmony_cidnl
14013498266Sopenharmony_cim4_define([$0],[])dnl
14113498266Sopenharmony_ci])
14213498266Sopenharmony_ci
14313498266Sopenharmony_ci
14413498266Sopenharmony_cidnl _XC_LIBTOOL_BODY
14513498266Sopenharmony_cidnl -------------------------------------------------
14613498266Sopenharmony_cidnl Private macro.
14713498266Sopenharmony_cidnl
14813498266Sopenharmony_cidnl This macro performs embedding of libtool code into
14913498266Sopenharmony_cidnl configure script, regardless of libtool version in
15013498266Sopenharmony_cidnl use when generating configure script.
15113498266Sopenharmony_ci
15213498266Sopenharmony_cim4_define([_XC_LIBTOOL_BODY],
15313498266Sopenharmony_ci[dnl
15413498266Sopenharmony_ci## ----------------------- ##
15513498266Sopenharmony_ci##  Start of libtool code  ##
15613498266Sopenharmony_ci## ----------------------- ##
15713498266Sopenharmony_cim4_ifdef([LT_INIT],
15813498266Sopenharmony_ci[dnl
15913498266Sopenharmony_ciLT_INIT([win32-dll])
16013498266Sopenharmony_ci],[dnl
16113498266Sopenharmony_ciAC_LIBTOOL_WIN32_DLL
16213498266Sopenharmony_ciAC_PROG_LIBTOOL
16313498266Sopenharmony_ci])dnl
16413498266Sopenharmony_ci## --------------------- ##
16513498266Sopenharmony_ci##  End of libtool code  ##
16613498266Sopenharmony_ci## --------------------- ##
16713498266Sopenharmony_cidnl
16813498266Sopenharmony_cim4_define([$0], [])[]dnl
16913498266Sopenharmony_ci])
17013498266Sopenharmony_ci
17113498266Sopenharmony_ci
17213498266Sopenharmony_cidnl _XC_CHECK_LT_BUILD_LIBRARIES
17313498266Sopenharmony_cidnl -------------------------------------------------
17413498266Sopenharmony_cidnl Private macro.
17513498266Sopenharmony_cidnl
17613498266Sopenharmony_cidnl Checks whether libtool shared and static libraries
17713498266Sopenharmony_cidnl are finally built depending on user input, default
17813498266Sopenharmony_cidnl behavior and knowledge that libtool has about host
17913498266Sopenharmony_cidnl characteristics.
18013498266Sopenharmony_cidnl Results stored in following shell variables:
18113498266Sopenharmony_cidnl   xc_lt_build_shared
18213498266Sopenharmony_cidnl   xc_lt_build_static
18313498266Sopenharmony_ci
18413498266Sopenharmony_cim4_define([_XC_CHECK_LT_BUILD_LIBRARIES],
18513498266Sopenharmony_ci[dnl
18613498266Sopenharmony_ci#
18713498266Sopenharmony_ci# Verify if finally libtool shared libraries will be built
18813498266Sopenharmony_ci#
18913498266Sopenharmony_ci
19013498266Sopenharmony_cicase "x$enable_shared" in @%:@ ((
19113498266Sopenharmony_ci  xyes | xno)
19213498266Sopenharmony_ci    xc_lt_build_shared=$enable_shared
19313498266Sopenharmony_ci    ;;
19413498266Sopenharmony_ci  *)
19513498266Sopenharmony_ci    AC_MSG_ERROR([unexpected libtool enable_shared value: $enable_shared])
19613498266Sopenharmony_ci    ;;
19713498266Sopenharmony_ciesac
19813498266Sopenharmony_ci
19913498266Sopenharmony_ci#
20013498266Sopenharmony_ci# Verify if finally libtool static libraries will be built
20113498266Sopenharmony_ci#
20213498266Sopenharmony_ci
20313498266Sopenharmony_cicase "x$enable_static" in @%:@ ((
20413498266Sopenharmony_ci  xyes | xno)
20513498266Sopenharmony_ci    xc_lt_build_static=$enable_static
20613498266Sopenharmony_ci    ;;
20713498266Sopenharmony_ci  *)
20813498266Sopenharmony_ci    AC_MSG_ERROR([unexpected libtool enable_static value: $enable_static])
20913498266Sopenharmony_ci    ;;
21013498266Sopenharmony_ciesac
21113498266Sopenharmony_cidnl
21213498266Sopenharmony_cim4_define([$0],[])dnl
21313498266Sopenharmony_ci])
21413498266Sopenharmony_ci
21513498266Sopenharmony_ci
21613498266Sopenharmony_cidnl _XC_CHECK_LT_SHLIB_USE_VERSION_INFO
21713498266Sopenharmony_cidnl -------------------------------------------------
21813498266Sopenharmony_cidnl Private macro.
21913498266Sopenharmony_cidnl
22013498266Sopenharmony_cidnl Checks if the -version-info linker flag must be
22113498266Sopenharmony_cidnl provided when building libtool shared libraries.
22213498266Sopenharmony_cidnl Result stored in xc_lt_shlib_use_version_info.
22313498266Sopenharmony_ci
22413498266Sopenharmony_cim4_define([_XC_CHECK_LT_SHLIB_USE_VERSION_INFO],
22513498266Sopenharmony_ci[dnl
22613498266Sopenharmony_ci#
22713498266Sopenharmony_ci# Verify if libtool shared libraries should be linked using flag -version-info
22813498266Sopenharmony_ci#
22913498266Sopenharmony_ci
23013498266Sopenharmony_ciAC_MSG_CHECKING([whether to build shared libraries with -version-info])
23113498266Sopenharmony_cixc_lt_shlib_use_version_info='yes'
23213498266Sopenharmony_ciif test "x$version_type" = 'xnone'; then
23313498266Sopenharmony_ci  xc_lt_shlib_use_version_info='no'
23413498266Sopenharmony_cifi
23513498266Sopenharmony_cicase $host_os in @%:@ (
23613498266Sopenharmony_ci  amigaos*)
23713498266Sopenharmony_ci    xc_lt_shlib_use_version_info='yes'
23813498266Sopenharmony_ci    ;;
23913498266Sopenharmony_ciesac
24013498266Sopenharmony_ciAC_MSG_RESULT([$xc_lt_shlib_use_version_info])
24113498266Sopenharmony_cidnl
24213498266Sopenharmony_cim4_define([$0], [])[]dnl
24313498266Sopenharmony_ci])
24413498266Sopenharmony_ci
24513498266Sopenharmony_ci
24613498266Sopenharmony_cidnl _XC_CHECK_LT_SHLIB_USE_NO_UNDEFINED
24713498266Sopenharmony_cidnl -------------------------------------------------
24813498266Sopenharmony_cidnl Private macro.
24913498266Sopenharmony_cidnl
25013498266Sopenharmony_cidnl Checks if the -no-undefined linker flag must be
25113498266Sopenharmony_cidnl provided when building libtool shared libraries.
25213498266Sopenharmony_cidnl Result stored in xc_lt_shlib_use_no_undefined.
25313498266Sopenharmony_ci
25413498266Sopenharmony_cim4_define([_XC_CHECK_LT_SHLIB_USE_NO_UNDEFINED],
25513498266Sopenharmony_ci[dnl
25613498266Sopenharmony_ci#
25713498266Sopenharmony_ci# Verify if libtool shared libraries should be linked using flag -no-undefined
25813498266Sopenharmony_ci#
25913498266Sopenharmony_ci
26013498266Sopenharmony_ciAC_MSG_CHECKING([whether to build shared libraries with -no-undefined])
26113498266Sopenharmony_cixc_lt_shlib_use_no_undefined='no'
26213498266Sopenharmony_ciif test "x$allow_undefined" = 'xno'; then
26313498266Sopenharmony_ci  xc_lt_shlib_use_no_undefined='yes'
26413498266Sopenharmony_cielif test "x$allow_undefined_flag" = 'xunsupported'; then
26513498266Sopenharmony_ci  xc_lt_shlib_use_no_undefined='yes'
26613498266Sopenharmony_cifi
26713498266Sopenharmony_cicase $host_os in @%:@ (
26813498266Sopenharmony_ci  cygwin* | mingw* | pw32* | cegcc* | os2* | aix*)
26913498266Sopenharmony_ci    xc_lt_shlib_use_no_undefined='yes'
27013498266Sopenharmony_ci    ;;
27113498266Sopenharmony_ciesac
27213498266Sopenharmony_ciAC_MSG_RESULT([$xc_lt_shlib_use_no_undefined])
27313498266Sopenharmony_cidnl
27413498266Sopenharmony_cim4_define([$0], [])[]dnl
27513498266Sopenharmony_ci])
27613498266Sopenharmony_ci
27713498266Sopenharmony_ci
27813498266Sopenharmony_cidnl _XC_CHECK_LT_SHLIB_USE_MIMPURE_TEXT
27913498266Sopenharmony_cidnl -------------------------------------------------
28013498266Sopenharmony_cidnl Private macro.
28113498266Sopenharmony_cidnl
28213498266Sopenharmony_cidnl Checks if the -mimpure-text linker flag must be
28313498266Sopenharmony_cidnl provided when building libtool shared libraries.
28413498266Sopenharmony_cidnl Result stored in xc_lt_shlib_use_mimpure_text.
28513498266Sopenharmony_ci
28613498266Sopenharmony_cim4_define([_XC_CHECK_LT_SHLIB_USE_MIMPURE_TEXT],
28713498266Sopenharmony_ci[dnl
28813498266Sopenharmony_ci#
28913498266Sopenharmony_ci# Verify if libtool shared libraries should be linked using flag -mimpure-text
29013498266Sopenharmony_ci#
29113498266Sopenharmony_ci
29213498266Sopenharmony_ciAC_MSG_CHECKING([whether to build shared libraries with -mimpure-text])
29313498266Sopenharmony_cixc_lt_shlib_use_mimpure_text='no'
29413498266Sopenharmony_cicase $host_os in @%:@ (
29513498266Sopenharmony_ci  solaris2*)
29613498266Sopenharmony_ci    if test "x$GCC" = 'xyes'; then
29713498266Sopenharmony_ci      xc_lt_shlib_use_mimpure_text='yes'
29813498266Sopenharmony_ci    fi
29913498266Sopenharmony_ci    ;;
30013498266Sopenharmony_ciesac
30113498266Sopenharmony_ciAC_MSG_RESULT([$xc_lt_shlib_use_mimpure_text])
30213498266Sopenharmony_cidnl
30313498266Sopenharmony_cim4_define([$0], [])[]dnl
30413498266Sopenharmony_ci])
30513498266Sopenharmony_ci
30613498266Sopenharmony_ci
30713498266Sopenharmony_cidnl _XC_CHECK_LT_BUILD_WITH_PIC
30813498266Sopenharmony_cidnl -------------------------------------------------
30913498266Sopenharmony_cidnl Private macro.
31013498266Sopenharmony_cidnl
31113498266Sopenharmony_cidnl Checks whether libtool shared and static libraries
31213498266Sopenharmony_cidnl would be built with PIC depending on user input,
31313498266Sopenharmony_cidnl default behavior and knowledge that libtool has
31413498266Sopenharmony_cidnl about host characteristics.
31513498266Sopenharmony_cidnl Results stored in following shell variables:
31613498266Sopenharmony_cidnl   xc_lt_build_shared_with_pic
31713498266Sopenharmony_cidnl   xc_lt_build_static_with_pic
31813498266Sopenharmony_ci
31913498266Sopenharmony_cim4_define([_XC_CHECK_LT_BUILD_WITH_PIC],
32013498266Sopenharmony_ci[dnl
32113498266Sopenharmony_ci#
32213498266Sopenharmony_ci# Find out whether libtool libraries would be built with PIC
32313498266Sopenharmony_ci#
32413498266Sopenharmony_ci
32513498266Sopenharmony_cicase "x$pic_mode" in @%:@ ((((
32613498266Sopenharmony_ci  xdefault)
32713498266Sopenharmony_ci    xc_lt_build_shared_with_pic='yes'
32813498266Sopenharmony_ci    xc_lt_build_static_with_pic='no'
32913498266Sopenharmony_ci    ;;
33013498266Sopenharmony_ci  xyes)
33113498266Sopenharmony_ci    xc_lt_build_shared_with_pic='yes'
33213498266Sopenharmony_ci    xc_lt_build_static_with_pic='yes'
33313498266Sopenharmony_ci    ;;
33413498266Sopenharmony_ci  xno)
33513498266Sopenharmony_ci    xc_lt_build_shared_with_pic='no'
33613498266Sopenharmony_ci    xc_lt_build_static_with_pic='no'
33713498266Sopenharmony_ci    ;;
33813498266Sopenharmony_ci  *)
33913498266Sopenharmony_ci    xc_lt_build_shared_with_pic='unknown'
34013498266Sopenharmony_ci    xc_lt_build_static_with_pic='unknown'
34113498266Sopenharmony_ci    AC_MSG_WARN([unexpected libtool pic_mode value: $pic_mode])
34213498266Sopenharmony_ci    ;;
34313498266Sopenharmony_ciesac
34413498266Sopenharmony_ciAC_MSG_CHECKING([whether to build shared libraries with PIC])
34513498266Sopenharmony_ciAC_MSG_RESULT([$xc_lt_build_shared_with_pic])
34613498266Sopenharmony_ciAC_MSG_CHECKING([whether to build static libraries with PIC])
34713498266Sopenharmony_ciAC_MSG_RESULT([$xc_lt_build_static_with_pic])
34813498266Sopenharmony_cidnl
34913498266Sopenharmony_cim4_define([$0],[])dnl
35013498266Sopenharmony_ci])
35113498266Sopenharmony_ci
35213498266Sopenharmony_ci
35313498266Sopenharmony_cidnl _XC_CHECK_LT_BUILD_SINGLE_VERSION
35413498266Sopenharmony_cidnl -------------------------------------------------
35513498266Sopenharmony_cidnl Private macro.
35613498266Sopenharmony_cidnl
35713498266Sopenharmony_cidnl Checks whether a libtool shared or static library
35813498266Sopenharmony_cidnl is finally built exclusively without the other.
35913498266Sopenharmony_cidnl Results stored in following shell variables:
36013498266Sopenharmony_cidnl   xc_lt_build_shared_only
36113498266Sopenharmony_cidnl   xc_lt_build_static_only
36213498266Sopenharmony_ci
36313498266Sopenharmony_cim4_define([_XC_CHECK_LT_BUILD_SINGLE_VERSION],
36413498266Sopenharmony_ci[dnl
36513498266Sopenharmony_ci#
36613498266Sopenharmony_ci# Verify if libtool shared libraries will be built while static not built
36713498266Sopenharmony_ci#
36813498266Sopenharmony_ci
36913498266Sopenharmony_ciAC_MSG_CHECKING([whether to build shared libraries only])
37013498266Sopenharmony_ciif test "$xc_lt_build_shared" = 'yes' &&
37113498266Sopenharmony_ci  test "$xc_lt_build_static" = 'no'; then
37213498266Sopenharmony_ci  xc_lt_build_shared_only='yes'
37313498266Sopenharmony_cielse
37413498266Sopenharmony_ci  xc_lt_build_shared_only='no'
37513498266Sopenharmony_cifi
37613498266Sopenharmony_ciAC_MSG_RESULT([$xc_lt_build_shared_only])
37713498266Sopenharmony_ci
37813498266Sopenharmony_ci#
37913498266Sopenharmony_ci# Verify if libtool static libraries will be built while shared not built
38013498266Sopenharmony_ci#
38113498266Sopenharmony_ci
38213498266Sopenharmony_ciAC_MSG_CHECKING([whether to build static libraries only])
38313498266Sopenharmony_ciif test "$xc_lt_build_static" = 'yes' &&
38413498266Sopenharmony_ci  test "$xc_lt_build_shared" = 'no'; then
38513498266Sopenharmony_ci  xc_lt_build_static_only='yes'
38613498266Sopenharmony_cielse
38713498266Sopenharmony_ci  xc_lt_build_static_only='no'
38813498266Sopenharmony_cifi
38913498266Sopenharmony_ciAC_MSG_RESULT([$xc_lt_build_static_only])
39013498266Sopenharmony_cidnl
39113498266Sopenharmony_cim4_define([$0],[])dnl
39213498266Sopenharmony_ci])
39313498266Sopenharmony_ci
39413498266Sopenharmony_ci
39513498266Sopenharmony_cidnl _XC_LIBTOOL_POSTLUDE
39613498266Sopenharmony_cidnl -------------------------------------------------
39713498266Sopenharmony_cidnl Private macro.
39813498266Sopenharmony_cidnl
39913498266Sopenharmony_cidnl Performs several checks related with libtool that
40013498266Sopenharmony_cidnl can not be done unless libtool code has already
40113498266Sopenharmony_cidnl been executed. See individual check descriptions
40213498266Sopenharmony_cidnl for further info.
40313498266Sopenharmony_ci
40413498266Sopenharmony_cim4_define([_XC_LIBTOOL_POSTLUDE],
40513498266Sopenharmony_ci[dnl
40613498266Sopenharmony_ci_XC_CHECK_LT_BUILD_LIBRARIES
40713498266Sopenharmony_ci_XC_CHECK_LT_SHLIB_USE_VERSION_INFO
40813498266Sopenharmony_ci_XC_CHECK_LT_SHLIB_USE_NO_UNDEFINED
40913498266Sopenharmony_ci_XC_CHECK_LT_SHLIB_USE_MIMPURE_TEXT
41013498266Sopenharmony_ci_XC_CHECK_LT_BUILD_WITH_PIC
41113498266Sopenharmony_ci_XC_CHECK_LT_BUILD_SINGLE_VERSION
41213498266Sopenharmony_cidnl
41313498266Sopenharmony_cim4_define([$0],[])dnl
41413498266Sopenharmony_ci])
41513498266Sopenharmony_ci
41613498266Sopenharmony_ci
41713498266Sopenharmony_cidnl XC_LIBTOOL
41813498266Sopenharmony_cidnl -------------------------------------------------
41913498266Sopenharmony_cidnl Public macro.
42013498266Sopenharmony_cidnl
42113498266Sopenharmony_cidnl This macro embeds libtool machinery into configure
42213498266Sopenharmony_cidnl script, regardless of libtool version, and performs
42313498266Sopenharmony_cidnl several additional checks whose results can be used
42413498266Sopenharmony_cidnl later on.
42513498266Sopenharmony_cidnl
42613498266Sopenharmony_cidnl Usage of this macro ensures that generated configure
42713498266Sopenharmony_cidnl script uses equivalent logic irrespective of autoconf
42813498266Sopenharmony_cidnl or libtool version being used to generate configure
42913498266Sopenharmony_cidnl script.
43013498266Sopenharmony_cidnl
43113498266Sopenharmony_cidnl Results stored in following shell variables:
43213498266Sopenharmony_cidnl   xc_lt_build_shared
43313498266Sopenharmony_cidnl   xc_lt_build_static
43413498266Sopenharmony_cidnl   xc_lt_shlib_use_version_info
43513498266Sopenharmony_cidnl   xc_lt_shlib_use_no_undefined
43613498266Sopenharmony_cidnl   xc_lt_shlib_use_mimpure_text
43713498266Sopenharmony_cidnl   xc_lt_build_shared_with_pic
43813498266Sopenharmony_cidnl   xc_lt_build_static_with_pic
43913498266Sopenharmony_cidnl   xc_lt_build_shared_only
44013498266Sopenharmony_cidnl   xc_lt_build_static_only
44113498266Sopenharmony_ci
44213498266Sopenharmony_ciAC_DEFUN([XC_LIBTOOL],
44313498266Sopenharmony_ci[dnl
44413498266Sopenharmony_ciAC_PREREQ([2.50])dnl
44513498266Sopenharmony_cidnl
44613498266Sopenharmony_ciAC_BEFORE([$0],[LT_INIT])dnl
44713498266Sopenharmony_ciAC_BEFORE([$0],[AC_PROG_LIBTOOL])dnl
44813498266Sopenharmony_ciAC_BEFORE([$0],[AC_LIBTOOL_WIN32_DLL])dnl
44913498266Sopenharmony_cidnl
45013498266Sopenharmony_ciAC_REQUIRE([XC_CHECK_PATH_SEPARATOR])dnl
45113498266Sopenharmony_ciAC_REQUIRE([AC_CANONICAL_HOST])dnl
45213498266Sopenharmony_ciAC_REQUIRE([AC_PROG_CC])dnl
45313498266Sopenharmony_cidnl
45413498266Sopenharmony_ci_XC_LIBTOOL_PREAMBLE
45513498266Sopenharmony_ci_XC_LIBTOOL_BODY
45613498266Sopenharmony_ci_XC_LIBTOOL_POSTLUDE
45713498266Sopenharmony_cidnl
45813498266Sopenharmony_cim4_ifdef([AC_LIBTOOL_WIN32_DLL],
45913498266Sopenharmony_ci  [m4_undefine([AC_LIBTOOL_WIN32_DLL])])dnl
46013498266Sopenharmony_cim4_ifdef([AC_PROG_LIBTOOL],
46113498266Sopenharmony_ci  [m4_undefine([AC_PROG_LIBTOOL])])dnl
46213498266Sopenharmony_cim4_ifdef([LT_INIT],
46313498266Sopenharmony_ci  [m4_undefine([LT_INIT])])dnl
46413498266Sopenharmony_cidnl
46513498266Sopenharmony_cim4_define([$0],[])dnl
46613498266Sopenharmony_ci])
467