aclocal.m4 revision d514b0f3
1d514b0f3Smrg# generated automatically by aclocal 1.16.5 -*- Autoconf -*- 2d514b0f3Smrg 3d514b0f3Smrg# Copyright (C) 1996-2021 Free Software Foundation, Inc. 4d514b0f3Smrg 5d514b0f3Smrg# This file is free software; the Free Software Foundation 6d514b0f3Smrg# gives unlimited permission to copy and/or distribute it, 7d514b0f3Smrg# with or without modifications, as long as this notice is preserved. 8d514b0f3Smrg 9d514b0f3Smrg# This program is distributed in the hope that it will be useful, 10d514b0f3Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11d514b0f3Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12d514b0f3Smrg# PARTICULAR PURPOSE. 13d514b0f3Smrg 14d514b0f3Smrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 15d514b0f3Smrgm4_ifndef([AC_AUTOCONF_VERSION], 16d514b0f3Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 17d514b0f3Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],, 18d514b0f3Smrg[m4_warning([this file was generated for autoconf 2.71. 19d514b0f3SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 20d514b0f3SmrgIf you have problems, you may need to regenerate the build system entirely. 21d514b0f3SmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 22d514b0f3Smrg 23d514b0f3Smrg# Helper functions for option handling. -*- Autoconf -*- 24d514b0f3Smrg# 25d514b0f3Smrg# Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free 26d514b0f3Smrg# Software Foundation, Inc. 27d514b0f3Smrg# Written by Gary V. Vaughan, 2004 28d514b0f3Smrg# 29d514b0f3Smrg# This file is free software; the Free Software Foundation gives 30d514b0f3Smrg# unlimited permission to copy and/or distribute it, with or without 31d514b0f3Smrg# modifications, as long as this notice is preserved. 32d514b0f3Smrg 33d514b0f3Smrg# serial 8 ltoptions.m4 34d514b0f3Smrg 35d514b0f3Smrg# This is to help aclocal find these macros, as it can't see m4_define. 36d514b0f3SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 37d514b0f3Smrg 38d514b0f3Smrg 39d514b0f3Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 40d514b0f3Smrg# ------------------------------------------ 41d514b0f3Smrgm4_define([_LT_MANGLE_OPTION], 42d514b0f3Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 43d514b0f3Smrg 44d514b0f3Smrg 45d514b0f3Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 46d514b0f3Smrg# --------------------------------------- 47d514b0f3Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 48d514b0f3Smrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 49d514b0f3Smrg# saved as a flag. 50d514b0f3Smrgm4_define([_LT_SET_OPTION], 51d514b0f3Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 52d514b0f3Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 53d514b0f3Smrg _LT_MANGLE_DEFUN([$1], [$2]), 54d514b0f3Smrg [m4_warning([Unknown $1 option '$2'])])[]dnl 55d514b0f3Smrg]) 56d514b0f3Smrg 57d514b0f3Smrg 58d514b0f3Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 59d514b0f3Smrg# ------------------------------------------------------------ 60d514b0f3Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 61d514b0f3Smrgm4_define([_LT_IF_OPTION], 62d514b0f3Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 63d514b0f3Smrg 64d514b0f3Smrg 65d514b0f3Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 66d514b0f3Smrg# ------------------------------------------------------- 67d514b0f3Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 68d514b0f3Smrg# are set. 69d514b0f3Smrgm4_define([_LT_UNLESS_OPTIONS], 70d514b0f3Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 71d514b0f3Smrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 72d514b0f3Smrg [m4_define([$0_found])])])[]dnl 73d514b0f3Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 74d514b0f3Smrg])[]dnl 75d514b0f3Smrg]) 76d514b0f3Smrg 77d514b0f3Smrg 78d514b0f3Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 79d514b0f3Smrg# ---------------------------------------- 80d514b0f3Smrg# OPTION-LIST is a space-separated list of Libtool options associated 81d514b0f3Smrg# with MACRO-NAME. If any OPTION has a matching handler declared with 82d514b0f3Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 83d514b0f3Smrg# the unknown option and exit. 84d514b0f3Smrgm4_defun([_LT_SET_OPTIONS], 85d514b0f3Smrg[# Set options 86d514b0f3Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 87d514b0f3Smrg [_LT_SET_OPTION([$1], _LT_Option)]) 88d514b0f3Smrg 89d514b0f3Smrgm4_if([$1],[LT_INIT],[ 90d514b0f3Smrg dnl 91d514b0f3Smrg dnl Simply set some default values (i.e off) if boolean options were not 92d514b0f3Smrg dnl specified: 93d514b0f3Smrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 94d514b0f3Smrg ]) 95d514b0f3Smrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 96d514b0f3Smrg ]) 97d514b0f3Smrg dnl 98d514b0f3Smrg dnl If no reference was made to various pairs of opposing options, then 99d514b0f3Smrg dnl we run the default mode handler for the pair. For example, if neither 100d514b0f3Smrg dnl 'shared' nor 'disable-shared' was passed, we enable building of shared 101d514b0f3Smrg dnl archives by default: 102d514b0f3Smrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 103d514b0f3Smrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 104d514b0f3Smrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 105d514b0f3Smrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 106d514b0f3Smrg [_LT_ENABLE_FAST_INSTALL]) 107d514b0f3Smrg _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], 108d514b0f3Smrg [_LT_WITH_AIX_SONAME([aix])]) 109d514b0f3Smrg ]) 110d514b0f3Smrg])# _LT_SET_OPTIONS 111d514b0f3Smrg 112d514b0f3Smrg 113d514b0f3Smrg 114d514b0f3Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 115d514b0f3Smrg# ----------------------------------------- 116d514b0f3Smrgm4_define([_LT_MANGLE_DEFUN], 117d514b0f3Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 118d514b0f3Smrg 119d514b0f3Smrg 120d514b0f3Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 121d514b0f3Smrg# ----------------------------------------------- 122d514b0f3Smrgm4_define([LT_OPTION_DEFINE], 123d514b0f3Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 124d514b0f3Smrg])# LT_OPTION_DEFINE 125d514b0f3Smrg 126d514b0f3Smrg 127d514b0f3Smrg# dlopen 128d514b0f3Smrg# ------ 129d514b0f3SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 130d514b0f3Smrg]) 131d514b0f3Smrg 132d514b0f3SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 133d514b0f3Smrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 134d514b0f3SmrgAC_DIAGNOSE([obsolete], 135d514b0f3Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 136d514b0f3Smrgput the 'dlopen' option into LT_INIT's first parameter.]) 137d514b0f3Smrg]) 138d514b0f3Smrg 139d514b0f3Smrgdnl aclocal-1.4 backwards compatibility: 140d514b0f3Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 141d514b0f3Smrg 142d514b0f3Smrg 143d514b0f3Smrg# win32-dll 144d514b0f3Smrg# --------- 145d514b0f3Smrg# Declare package support for building win32 dll's. 146d514b0f3SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 147d514b0f3Smrg[enable_win32_dll=yes 148d514b0f3Smrg 149d514b0f3Smrgcase $host in 150d514b0f3Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 151d514b0f3Smrg AC_CHECK_TOOL(AS, as, false) 152d514b0f3Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 153d514b0f3Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 154d514b0f3Smrg ;; 155d514b0f3Smrgesac 156d514b0f3Smrg 157d514b0f3Smrgtest -z "$AS" && AS=as 158d514b0f3Smrg_LT_DECL([], [AS], [1], [Assembler program])dnl 159d514b0f3Smrg 160d514b0f3Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 161d514b0f3Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 162d514b0f3Smrg 163d514b0f3Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 164d514b0f3Smrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 165d514b0f3Smrg])# win32-dll 166d514b0f3Smrg 167d514b0f3SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 168d514b0f3Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 169d514b0f3Smrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 170d514b0f3SmrgAC_DIAGNOSE([obsolete], 171d514b0f3Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 172d514b0f3Smrgput the 'win32-dll' option into LT_INIT's first parameter.]) 173d514b0f3Smrg]) 174d514b0f3Smrg 175d514b0f3Smrgdnl aclocal-1.4 backwards compatibility: 176d514b0f3Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 177d514b0f3Smrg 178d514b0f3Smrg 179d514b0f3Smrg# _LT_ENABLE_SHARED([DEFAULT]) 180d514b0f3Smrg# ---------------------------- 181d514b0f3Smrg# implement the --enable-shared flag, and supports the 'shared' and 182d514b0f3Smrg# 'disable-shared' LT_INIT options. 183d514b0f3Smrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 184d514b0f3Smrgm4_define([_LT_ENABLE_SHARED], 185d514b0f3Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 186d514b0f3SmrgAC_ARG_ENABLE([shared], 187d514b0f3Smrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 188d514b0f3Smrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 189d514b0f3Smrg [p=${PACKAGE-default} 190d514b0f3Smrg case $enableval in 191d514b0f3Smrg yes) enable_shared=yes ;; 192d514b0f3Smrg no) enable_shared=no ;; 193d514b0f3Smrg *) 194d514b0f3Smrg enable_shared=no 195d514b0f3Smrg # Look at the argument we got. We use all the common list separators. 196d514b0f3Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 197d514b0f3Smrg for pkg in $enableval; do 198d514b0f3Smrg IFS=$lt_save_ifs 199d514b0f3Smrg if test "X$pkg" = "X$p"; then 200d514b0f3Smrg enable_shared=yes 201d514b0f3Smrg fi 202d514b0f3Smrg done 203d514b0f3Smrg IFS=$lt_save_ifs 204d514b0f3Smrg ;; 205d514b0f3Smrg esac], 206d514b0f3Smrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 207d514b0f3Smrg 208d514b0f3Smrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 209d514b0f3Smrg [Whether or not to build shared libraries]) 210d514b0f3Smrg])# _LT_ENABLE_SHARED 211d514b0f3Smrg 212d514b0f3SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 213d514b0f3SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 214d514b0f3Smrg 215d514b0f3Smrg# Old names: 216d514b0f3SmrgAC_DEFUN([AC_ENABLE_SHARED], 217d514b0f3Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 218d514b0f3Smrg]) 219d514b0f3Smrg 220d514b0f3SmrgAC_DEFUN([AC_DISABLE_SHARED], 221d514b0f3Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 222d514b0f3Smrg]) 223d514b0f3Smrg 224d514b0f3SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 225d514b0f3SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 226d514b0f3Smrg 227d514b0f3Smrgdnl aclocal-1.4 backwards compatibility: 228d514b0f3Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 229d514b0f3Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 230d514b0f3Smrg 231d514b0f3Smrg 232d514b0f3Smrg 233d514b0f3Smrg# _LT_ENABLE_STATIC([DEFAULT]) 234d514b0f3Smrg# ---------------------------- 235d514b0f3Smrg# implement the --enable-static flag, and support the 'static' and 236d514b0f3Smrg# 'disable-static' LT_INIT options. 237d514b0f3Smrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 238d514b0f3Smrgm4_define([_LT_ENABLE_STATIC], 239d514b0f3Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 240d514b0f3SmrgAC_ARG_ENABLE([static], 241d514b0f3Smrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 242d514b0f3Smrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 243d514b0f3Smrg [p=${PACKAGE-default} 244d514b0f3Smrg case $enableval in 245d514b0f3Smrg yes) enable_static=yes ;; 246d514b0f3Smrg no) enable_static=no ;; 247d514b0f3Smrg *) 248d514b0f3Smrg enable_static=no 249d514b0f3Smrg # Look at the argument we got. We use all the common list separators. 250d514b0f3Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 251d514b0f3Smrg for pkg in $enableval; do 252d514b0f3Smrg IFS=$lt_save_ifs 253d514b0f3Smrg if test "X$pkg" = "X$p"; then 254d514b0f3Smrg enable_static=yes 255d514b0f3Smrg fi 256d514b0f3Smrg done 257d514b0f3Smrg IFS=$lt_save_ifs 258d514b0f3Smrg ;; 259d514b0f3Smrg esac], 260d514b0f3Smrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 261d514b0f3Smrg 262d514b0f3Smrg _LT_DECL([build_old_libs], [enable_static], [0], 263d514b0f3Smrg [Whether or not to build static libraries]) 264d514b0f3Smrg])# _LT_ENABLE_STATIC 265d514b0f3Smrg 266d514b0f3SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 267d514b0f3SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 268d514b0f3Smrg 269d514b0f3Smrg# Old names: 270d514b0f3SmrgAC_DEFUN([AC_ENABLE_STATIC], 271d514b0f3Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 272d514b0f3Smrg]) 273d514b0f3Smrg 274d514b0f3SmrgAC_DEFUN([AC_DISABLE_STATIC], 275d514b0f3Smrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 276d514b0f3Smrg]) 277d514b0f3Smrg 278d514b0f3SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 279d514b0f3SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 280d514b0f3Smrg 281d514b0f3Smrgdnl aclocal-1.4 backwards compatibility: 282d514b0f3Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 283d514b0f3Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 284d514b0f3Smrg 285d514b0f3Smrg 286d514b0f3Smrg 287d514b0f3Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 288d514b0f3Smrg# ---------------------------------- 289d514b0f3Smrg# implement the --enable-fast-install flag, and support the 'fast-install' 290d514b0f3Smrg# and 'disable-fast-install' LT_INIT options. 291d514b0f3Smrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 292d514b0f3Smrgm4_define([_LT_ENABLE_FAST_INSTALL], 293d514b0f3Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 294d514b0f3SmrgAC_ARG_ENABLE([fast-install], 295d514b0f3Smrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 296d514b0f3Smrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 297d514b0f3Smrg [p=${PACKAGE-default} 298d514b0f3Smrg case $enableval in 299d514b0f3Smrg yes) enable_fast_install=yes ;; 300d514b0f3Smrg no) enable_fast_install=no ;; 301d514b0f3Smrg *) 302d514b0f3Smrg enable_fast_install=no 303d514b0f3Smrg # Look at the argument we got. We use all the common list separators. 304d514b0f3Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 305d514b0f3Smrg for pkg in $enableval; do 306d514b0f3Smrg IFS=$lt_save_ifs 307d514b0f3Smrg if test "X$pkg" = "X$p"; then 308d514b0f3Smrg enable_fast_install=yes 309d514b0f3Smrg fi 310d514b0f3Smrg done 311d514b0f3Smrg IFS=$lt_save_ifs 312d514b0f3Smrg ;; 313d514b0f3Smrg esac], 314d514b0f3Smrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 315d514b0f3Smrg 316d514b0f3Smrg_LT_DECL([fast_install], [enable_fast_install], [0], 317d514b0f3Smrg [Whether or not to optimize for fast installation])dnl 318d514b0f3Smrg])# _LT_ENABLE_FAST_INSTALL 319d514b0f3Smrg 320d514b0f3SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 321d514b0f3SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 322d514b0f3Smrg 323d514b0f3Smrg# Old names: 324d514b0f3SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 325d514b0f3Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 326d514b0f3SmrgAC_DIAGNOSE([obsolete], 327d514b0f3Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 328d514b0f3Smrgthe 'fast-install' option into LT_INIT's first parameter.]) 329d514b0f3Smrg]) 330d514b0f3Smrg 331d514b0f3SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 332d514b0f3Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 333d514b0f3SmrgAC_DIAGNOSE([obsolete], 334d514b0f3Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 335d514b0f3Smrgthe 'disable-fast-install' option into LT_INIT's first parameter.]) 336d514b0f3Smrg]) 337d514b0f3Smrg 338d514b0f3Smrgdnl aclocal-1.4 backwards compatibility: 339d514b0f3Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 340d514b0f3Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 341d514b0f3Smrg 342d514b0f3Smrg 343d514b0f3Smrg# _LT_WITH_AIX_SONAME([DEFAULT]) 344d514b0f3Smrg# ---------------------------------- 345d514b0f3Smrg# implement the --with-aix-soname flag, and support the `aix-soname=aix' 346d514b0f3Smrg# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT 347d514b0f3Smrg# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. 348d514b0f3Smrgm4_define([_LT_WITH_AIX_SONAME], 349d514b0f3Smrg[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl 350d514b0f3Smrgshared_archive_member_spec= 351d514b0f3Smrgcase $host,$enable_shared in 352d514b0f3Smrgpower*-*-aix[[5-9]]*,yes) 353d514b0f3Smrg AC_MSG_CHECKING([which variant of shared library versioning to provide]) 354d514b0f3Smrg AC_ARG_WITH([aix-soname], 355d514b0f3Smrg [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], 356d514b0f3Smrg [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], 357d514b0f3Smrg [case $withval in 358d514b0f3Smrg aix|svr4|both) 359d514b0f3Smrg ;; 360d514b0f3Smrg *) 361d514b0f3Smrg AC_MSG_ERROR([Unknown argument to --with-aix-soname]) 362d514b0f3Smrg ;; 363d514b0f3Smrg esac 364d514b0f3Smrg lt_cv_with_aix_soname=$with_aix_soname], 365d514b0f3Smrg [AC_CACHE_VAL([lt_cv_with_aix_soname], 366d514b0f3Smrg [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) 367d514b0f3Smrg with_aix_soname=$lt_cv_with_aix_soname]) 368d514b0f3Smrg AC_MSG_RESULT([$with_aix_soname]) 369d514b0f3Smrg if test aix != "$with_aix_soname"; then 370d514b0f3Smrg # For the AIX way of multilib, we name the shared archive member 371d514b0f3Smrg # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', 372d514b0f3Smrg # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. 373d514b0f3Smrg # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, 374d514b0f3Smrg # the AIX toolchain works better with OBJECT_MODE set (default 32). 375d514b0f3Smrg if test 64 = "${OBJECT_MODE-32}"; then 376d514b0f3Smrg shared_archive_member_spec=shr_64 377d514b0f3Smrg else 378d514b0f3Smrg shared_archive_member_spec=shr 379d514b0f3Smrg fi 380d514b0f3Smrg fi 381d514b0f3Smrg ;; 382d514b0f3Smrg*) 383d514b0f3Smrg with_aix_soname=aix 384d514b0f3Smrg ;; 385d514b0f3Smrgesac 386d514b0f3Smrg 387d514b0f3Smrg_LT_DECL([], [shared_archive_member_spec], [0], 388d514b0f3Smrg [Shared archive member basename, for filename based shared library versioning on AIX])dnl 389d514b0f3Smrg])# _LT_WITH_AIX_SONAME 390d514b0f3Smrg 391d514b0f3SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) 392d514b0f3SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) 393d514b0f3SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) 394d514b0f3Smrg 395d514b0f3Smrg 396d514b0f3Smrg# _LT_WITH_PIC([MODE]) 397d514b0f3Smrg# -------------------- 398d514b0f3Smrg# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' 399d514b0f3Smrg# LT_INIT options. 400d514b0f3Smrg# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. 401d514b0f3Smrgm4_define([_LT_WITH_PIC], 402d514b0f3Smrg[AC_ARG_WITH([pic], 403d514b0f3Smrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 404d514b0f3Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 405d514b0f3Smrg [lt_p=${PACKAGE-default} 406d514b0f3Smrg case $withval in 407d514b0f3Smrg yes|no) pic_mode=$withval ;; 408d514b0f3Smrg *) 409d514b0f3Smrg pic_mode=default 410d514b0f3Smrg # Look at the argument we got. We use all the common list separators. 411d514b0f3Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 412d514b0f3Smrg for lt_pkg in $withval; do 413d514b0f3Smrg IFS=$lt_save_ifs 414d514b0f3Smrg if test "X$lt_pkg" = "X$lt_p"; then 415d514b0f3Smrg pic_mode=yes 416d514b0f3Smrg fi 417d514b0f3Smrg done 418d514b0f3Smrg IFS=$lt_save_ifs 419d514b0f3Smrg ;; 420d514b0f3Smrg esac], 421d514b0f3Smrg [pic_mode=m4_default([$1], [default])]) 422d514b0f3Smrg 423d514b0f3Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 424d514b0f3Smrg])# _LT_WITH_PIC 425d514b0f3Smrg 426d514b0f3SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 427d514b0f3SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 428d514b0f3Smrg 429d514b0f3Smrg# Old name: 430d514b0f3SmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 431d514b0f3Smrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 432d514b0f3SmrgAC_DIAGNOSE([obsolete], 433d514b0f3Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 434d514b0f3Smrgput the 'pic-only' option into LT_INIT's first parameter.]) 435d514b0f3Smrg]) 436d514b0f3Smrg 437d514b0f3Smrgdnl aclocal-1.4 backwards compatibility: 438d514b0f3Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 439d514b0f3Smrg 440d514b0f3Smrg 441d514b0f3Smrgm4_define([_LTDL_MODE], []) 442d514b0f3SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 443d514b0f3Smrg [m4_define([_LTDL_MODE], [nonrecursive])]) 444d514b0f3SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 445d514b0f3Smrg [m4_define([_LTDL_MODE], [recursive])]) 446d514b0f3SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 447d514b0f3Smrg [m4_define([_LTDL_MODE], [subproject])]) 448d514b0f3Smrg 449d514b0f3Smrgm4_define([_LTDL_TYPE], []) 450d514b0f3SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 451d514b0f3Smrg [m4_define([_LTDL_TYPE], [installable])]) 452d514b0f3SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 453d514b0f3Smrg [m4_define([_LTDL_TYPE], [convenience])]) 454d514b0f3Smrg 455d514b0f3Smrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 456d514b0f3Smrg# 457d514b0f3Smrg# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software 458d514b0f3Smrg# Foundation, Inc. 459d514b0f3Smrg# Written by Gary V. Vaughan, 2004 460d514b0f3Smrg# 461d514b0f3Smrg# This file is free software; the Free Software Foundation gives 462d514b0f3Smrg# unlimited permission to copy and/or distribute it, with or without 463d514b0f3Smrg# modifications, as long as this notice is preserved. 464d514b0f3Smrg 465d514b0f3Smrg# serial 6 ltsugar.m4 466d514b0f3Smrg 467d514b0f3Smrg# This is to help aclocal find these macros, as it can't see m4_define. 468d514b0f3SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 469d514b0f3Smrg 470d514b0f3Smrg 471d514b0f3Smrg# lt_join(SEP, ARG1, [ARG2...]) 472d514b0f3Smrg# ----------------------------- 473d514b0f3Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 474d514b0f3Smrg# associated separator. 475d514b0f3Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 476d514b0f3Smrg# versions in m4sugar had bugs. 477d514b0f3Smrgm4_define([lt_join], 478d514b0f3Smrg[m4_if([$#], [1], [], 479d514b0f3Smrg [$#], [2], [[$2]], 480d514b0f3Smrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 481d514b0f3Smrgm4_define([_lt_join], 482d514b0f3Smrg[m4_if([$#$2], [2], [], 483d514b0f3Smrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 484d514b0f3Smrg 485d514b0f3Smrg 486d514b0f3Smrg# lt_car(LIST) 487d514b0f3Smrg# lt_cdr(LIST) 488d514b0f3Smrg# ------------ 489d514b0f3Smrg# Manipulate m4 lists. 490d514b0f3Smrg# These macros are necessary as long as will still need to support 491d514b0f3Smrg# Autoconf-2.59, which quotes differently. 492d514b0f3Smrgm4_define([lt_car], [[$1]]) 493d514b0f3Smrgm4_define([lt_cdr], 494d514b0f3Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 495d514b0f3Smrg [$#], 1, [], 496d514b0f3Smrg [m4_dquote(m4_shift($@))])]) 497d514b0f3Smrgm4_define([lt_unquote], $1) 498d514b0f3Smrg 499d514b0f3Smrg 500d514b0f3Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 501d514b0f3Smrg# ------------------------------------------ 502d514b0f3Smrg# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. 503d514b0f3Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 504d514b0f3Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 505d514b0f3Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 506d514b0f3Smrg# than defined and empty). 507d514b0f3Smrg# 508d514b0f3Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 509d514b0f3Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 510d514b0f3Smrgm4_define([lt_append], 511d514b0f3Smrg[m4_define([$1], 512d514b0f3Smrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 513d514b0f3Smrg 514d514b0f3Smrg 515d514b0f3Smrg 516d514b0f3Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 517d514b0f3Smrg# ---------------------------------------------------------- 518d514b0f3Smrg# Produce a SEP delimited list of all paired combinations of elements of 519d514b0f3Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 520d514b0f3Smrg# has the form PREFIXmINFIXSUFFIXn. 521d514b0f3Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 522d514b0f3Smrgm4_define([lt_combine], 523d514b0f3Smrg[m4_if(m4_eval([$# > 3]), [1], 524d514b0f3Smrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 525d514b0f3Smrg[[m4_foreach([_Lt_prefix], [$2], 526d514b0f3Smrg [m4_foreach([_Lt_suffix], 527d514b0f3Smrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 528d514b0f3Smrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 529d514b0f3Smrg 530d514b0f3Smrg 531d514b0f3Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 532d514b0f3Smrg# ----------------------------------------------------------------------- 533d514b0f3Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 534d514b0f3Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 535d514b0f3Smrgm4_define([lt_if_append_uniq], 536d514b0f3Smrg[m4_ifdef([$1], 537d514b0f3Smrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 538d514b0f3Smrg [lt_append([$1], [$2], [$3])$4], 539d514b0f3Smrg [$5])], 540d514b0f3Smrg [lt_append([$1], [$2], [$3])$4])]) 541d514b0f3Smrg 542d514b0f3Smrg 543d514b0f3Smrg# lt_dict_add(DICT, KEY, VALUE) 544d514b0f3Smrg# ----------------------------- 545d514b0f3Smrgm4_define([lt_dict_add], 546d514b0f3Smrg[m4_define([$1($2)], [$3])]) 547d514b0f3Smrg 548d514b0f3Smrg 549d514b0f3Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 550d514b0f3Smrg# -------------------------------------------- 551d514b0f3Smrgm4_define([lt_dict_add_subkey], 552d514b0f3Smrg[m4_define([$1($2:$3)], [$4])]) 553d514b0f3Smrg 554d514b0f3Smrg 555d514b0f3Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 556d514b0f3Smrg# ---------------------------------- 557d514b0f3Smrgm4_define([lt_dict_fetch], 558d514b0f3Smrg[m4_ifval([$3], 559d514b0f3Smrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 560d514b0f3Smrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 561d514b0f3Smrg 562d514b0f3Smrg 563d514b0f3Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 564d514b0f3Smrg# ----------------------------------------------------------------- 565d514b0f3Smrgm4_define([lt_if_dict_fetch], 566d514b0f3Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 567d514b0f3Smrg [$5], 568d514b0f3Smrg [$6])]) 569d514b0f3Smrg 570d514b0f3Smrg 571d514b0f3Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 572d514b0f3Smrg# -------------------------------------------------------------- 573d514b0f3Smrgm4_define([lt_dict_filter], 574d514b0f3Smrg[m4_if([$5], [], [], 575d514b0f3Smrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 576d514b0f3Smrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 577d514b0f3Smrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 578d514b0f3Smrg]) 579d514b0f3Smrg 580d514b0f3Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 581d514b0f3Smrg# 582d514b0f3Smrg# Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free 583d514b0f3Smrg# Software Foundation, Inc. 584d514b0f3Smrg# Written by Scott James Remnant, 2004. 585d514b0f3Smrg# 586d514b0f3Smrg# This file is free software; the Free Software Foundation gives 587d514b0f3Smrg# unlimited permission to copy and/or distribute it, with or without 588d514b0f3Smrg# modifications, as long as this notice is preserved. 589d514b0f3Smrg 590d514b0f3Smrg# serial 5 lt~obsolete.m4 591d514b0f3Smrg 592d514b0f3Smrg# These exist entirely to fool aclocal when bootstrapping libtool. 593d514b0f3Smrg# 594d514b0f3Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), 595d514b0f3Smrg# which have later been changed to m4_define as they aren't part of the 596d514b0f3Smrg# exported API, or moved to Autoconf or Automake where they belong. 597d514b0f3Smrg# 598d514b0f3Smrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 599d514b0f3Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 600d514b0f3Smrg# using a macro with the same name in our local m4/libtool.m4 it'll 601d514b0f3Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 602d514b0f3Smrg# and doesn't know about Autoconf macros at all.) 603d514b0f3Smrg# 604d514b0f3Smrg# So we provide this file, which has a silly filename so it's always 605d514b0f3Smrg# included after everything else. This provides aclocal with the 606d514b0f3Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 607d514b0f3Smrg# because those macros already exist, or will be overwritten later. 608d514b0f3Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 609d514b0f3Smrg# 610d514b0f3Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 611d514b0f3Smrg# Yes, that means every name once taken will need to remain here until 612d514b0f3Smrg# we give up compatibility with versions before 1.7, at which point 613d514b0f3Smrg# we need to keep only those names which we still refer to. 614d514b0f3Smrg 615d514b0f3Smrg# This is to help aclocal find these macros, as it can't see m4_define. 616d514b0f3SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 617d514b0f3Smrg 618d514b0f3Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 619d514b0f3Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 620d514b0f3Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 621d514b0f3Smrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 622d514b0f3Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 623d514b0f3Smrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 624d514b0f3Smrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 625d514b0f3Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 626d514b0f3Smrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 627d514b0f3Smrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 628d514b0f3Smrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 629d514b0f3Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 630d514b0f3Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 631d514b0f3Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 632d514b0f3Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 633d514b0f3Smrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 634d514b0f3Smrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 635d514b0f3Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 636d514b0f3Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 637d514b0f3Smrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 638d514b0f3Smrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 639d514b0f3Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 640d514b0f3Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 641d514b0f3Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 642d514b0f3Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 643d514b0f3Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 644d514b0f3Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 645d514b0f3Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 646d514b0f3Smrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 647d514b0f3Smrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 648d514b0f3Smrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 649d514b0f3Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 650d514b0f3Smrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 651d514b0f3Smrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 652d514b0f3Smrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 653d514b0f3Smrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 654d514b0f3Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 655d514b0f3Smrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 656d514b0f3Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 657d514b0f3Smrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 658d514b0f3Smrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 659d514b0f3Smrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 660d514b0f3Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 661d514b0f3Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 662d514b0f3Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 663d514b0f3Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 664d514b0f3Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 665d514b0f3Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 666d514b0f3Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 667d514b0f3Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 668d514b0f3Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 669d514b0f3Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 670d514b0f3Smrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 671d514b0f3Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 672d514b0f3Smrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 673d514b0f3Smrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 674d514b0f3Smrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 675d514b0f3Smrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 676d514b0f3Smrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 677d514b0f3Smrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 678d514b0f3Smrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 679d514b0f3Smrg 680d514b0f3Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 681d514b0f3Smrg# serial 11 (pkg-config-0.29.1) 682d514b0f3Smrg 683d514b0f3Smrgdnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 684d514b0f3Smrgdnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> 685d514b0f3Smrgdnl 686d514b0f3Smrgdnl This program is free software; you can redistribute it and/or modify 687d514b0f3Smrgdnl it under the terms of the GNU General Public License as published by 688d514b0f3Smrgdnl the Free Software Foundation; either version 2 of the License, or 689d514b0f3Smrgdnl (at your option) any later version. 690d514b0f3Smrgdnl 691d514b0f3Smrgdnl This program is distributed in the hope that it will be useful, but 692d514b0f3Smrgdnl WITHOUT ANY WARRANTY; without even the implied warranty of 693d514b0f3Smrgdnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 694d514b0f3Smrgdnl General Public License for more details. 695d514b0f3Smrgdnl 696d514b0f3Smrgdnl You should have received a copy of the GNU General Public License 697d514b0f3Smrgdnl along with this program; if not, write to the Free Software 698d514b0f3Smrgdnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 699d514b0f3Smrgdnl 02111-1307, USA. 700d514b0f3Smrgdnl 701d514b0f3Smrgdnl As a special exception to the GNU General Public License, if you 702d514b0f3Smrgdnl distribute this file as part of a program that contains a 703d514b0f3Smrgdnl configuration script generated by Autoconf, you may include it under 704d514b0f3Smrgdnl the same distribution terms that you use for the rest of that 705d514b0f3Smrgdnl program. 706d514b0f3Smrg 707d514b0f3Smrgdnl PKG_PREREQ(MIN-VERSION) 708d514b0f3Smrgdnl ----------------------- 709d514b0f3Smrgdnl Since: 0.29 710d514b0f3Smrgdnl 711d514b0f3Smrgdnl Verify that the version of the pkg-config macros are at least 712d514b0f3Smrgdnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's 713d514b0f3Smrgdnl installed version of pkg-config, this checks the developer's version 714d514b0f3Smrgdnl of pkg.m4 when generating configure. 715d514b0f3Smrgdnl 716d514b0f3Smrgdnl To ensure that this macro is defined, also add: 717d514b0f3Smrgdnl m4_ifndef([PKG_PREREQ], 718d514b0f3Smrgdnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) 719d514b0f3Smrgdnl 720d514b0f3Smrgdnl See the "Since" comment for each macro you use to see what version 721d514b0f3Smrgdnl of the macros you require. 722d514b0f3Smrgm4_defun([PKG_PREREQ], 723d514b0f3Smrg[m4_define([PKG_MACROS_VERSION], [0.29.1]) 724d514b0f3Smrgm4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, 725d514b0f3Smrg [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) 726d514b0f3Smrg])dnl PKG_PREREQ 727d514b0f3Smrg 728d514b0f3Smrgdnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) 729d514b0f3Smrgdnl ---------------------------------- 730d514b0f3Smrgdnl Since: 0.16 731d514b0f3Smrgdnl 732d514b0f3Smrgdnl Search for the pkg-config tool and set the PKG_CONFIG variable to 733d514b0f3Smrgdnl first found in the path. Checks that the version of pkg-config found 734d514b0f3Smrgdnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is 735d514b0f3Smrgdnl used since that's the first version where most current features of 736d514b0f3Smrgdnl pkg-config existed. 737d514b0f3SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 738d514b0f3Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 739d514b0f3Smrgm4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 740d514b0f3Smrgm4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 741d514b0f3SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 742d514b0f3SmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 743d514b0f3SmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 744d514b0f3Smrg 745d514b0f3Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 746d514b0f3Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 747d514b0f3Smrgfi 748d514b0f3Smrgif test -n "$PKG_CONFIG"; then 749d514b0f3Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 750d514b0f3Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 751d514b0f3Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 752d514b0f3Smrg AC_MSG_RESULT([yes]) 753d514b0f3Smrg else 754d514b0f3Smrg AC_MSG_RESULT([no]) 755d514b0f3Smrg PKG_CONFIG="" 756d514b0f3Smrg fi 757d514b0f3Smrgfi[]dnl 758d514b0f3Smrg])dnl PKG_PROG_PKG_CONFIG 759d514b0f3Smrg 760d514b0f3Smrgdnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 761d514b0f3Smrgdnl ------------------------------------------------------------------- 762d514b0f3Smrgdnl Since: 0.18 763d514b0f3Smrgdnl 764d514b0f3Smrgdnl Check to see whether a particular set of modules exists. Similar to 765d514b0f3Smrgdnl PKG_CHECK_MODULES(), but does not set variables or print errors. 766d514b0f3Smrgdnl 767d514b0f3Smrgdnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 768d514b0f3Smrgdnl only at the first occurence in configure.ac, so if the first place 769d514b0f3Smrgdnl it's called might be skipped (such as if it is within an "if", you 770d514b0f3Smrgdnl have to call PKG_CHECK_EXISTS manually 771d514b0f3SmrgAC_DEFUN([PKG_CHECK_EXISTS], 772d514b0f3Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 773d514b0f3Smrgif test -n "$PKG_CONFIG" && \ 774d514b0f3Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 775d514b0f3Smrg m4_default([$2], [:]) 776d514b0f3Smrgm4_ifvaln([$3], [else 777d514b0f3Smrg $3])dnl 778d514b0f3Smrgfi]) 779d514b0f3Smrg 780d514b0f3Smrgdnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 781d514b0f3Smrgdnl --------------------------------------------- 782d514b0f3Smrgdnl Internal wrapper calling pkg-config via PKG_CONFIG and setting 783d514b0f3Smrgdnl pkg_failed based on the result. 784d514b0f3Smrgm4_define([_PKG_CONFIG], 785d514b0f3Smrg[if test -n "$$1"; then 786d514b0f3Smrg pkg_cv_[]$1="$$1" 787d514b0f3Smrg elif test -n "$PKG_CONFIG"; then 788d514b0f3Smrg PKG_CHECK_EXISTS([$3], 789d514b0f3Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 790d514b0f3Smrg test "x$?" != "x0" && pkg_failed=yes ], 791d514b0f3Smrg [pkg_failed=yes]) 792d514b0f3Smrg else 793d514b0f3Smrg pkg_failed=untried 794d514b0f3Smrgfi[]dnl 795d514b0f3Smrg])dnl _PKG_CONFIG 796d514b0f3Smrg 797d514b0f3Smrgdnl _PKG_SHORT_ERRORS_SUPPORTED 798d514b0f3Smrgdnl --------------------------- 799d514b0f3Smrgdnl Internal check to see if pkg-config supports short errors. 800d514b0f3SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 801d514b0f3Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 802d514b0f3Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 803d514b0f3Smrg _pkg_short_errors_supported=yes 804d514b0f3Smrgelse 805d514b0f3Smrg _pkg_short_errors_supported=no 806d514b0f3Smrgfi[]dnl 807d514b0f3Smrg])dnl _PKG_SHORT_ERRORS_SUPPORTED 808d514b0f3Smrg 809d514b0f3Smrg 810d514b0f3Smrgdnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 811d514b0f3Smrgdnl [ACTION-IF-NOT-FOUND]) 812d514b0f3Smrgdnl -------------------------------------------------------------- 813d514b0f3Smrgdnl Since: 0.4.0 814d514b0f3Smrgdnl 815d514b0f3Smrgdnl Note that if there is a possibility the first call to 816d514b0f3Smrgdnl PKG_CHECK_MODULES might not happen, you should be sure to include an 817d514b0f3Smrgdnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 818d514b0f3SmrgAC_DEFUN([PKG_CHECK_MODULES], 819d514b0f3Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 820d514b0f3SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 821d514b0f3SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 822d514b0f3Smrg 823d514b0f3Smrgpkg_failed=no 824d514b0f3SmrgAC_MSG_CHECKING([for $1]) 825d514b0f3Smrg 826d514b0f3Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 827d514b0f3Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 828d514b0f3Smrg 829d514b0f3Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 830d514b0f3Smrgand $1[]_LIBS to avoid the need to call pkg-config. 831d514b0f3SmrgSee the pkg-config man page for more details.]) 832d514b0f3Smrg 833d514b0f3Smrgif test $pkg_failed = yes; then 834d514b0f3Smrg AC_MSG_RESULT([no]) 835d514b0f3Smrg _PKG_SHORT_ERRORS_SUPPORTED 836d514b0f3Smrg if test $_pkg_short_errors_supported = yes; then 837d514b0f3Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 838d514b0f3Smrg else 839d514b0f3Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 840d514b0f3Smrg fi 841d514b0f3Smrg # Put the nasty error message in config.log where it belongs 842d514b0f3Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 843d514b0f3Smrg 844d514b0f3Smrg m4_default([$4], [AC_MSG_ERROR( 845d514b0f3Smrg[Package requirements ($2) were not met: 846d514b0f3Smrg 847d514b0f3Smrg$$1_PKG_ERRORS 848d514b0f3Smrg 849d514b0f3SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 850d514b0f3Smrginstalled software in a non-standard prefix. 851d514b0f3Smrg 852d514b0f3Smrg_PKG_TEXT])[]dnl 853d514b0f3Smrg ]) 854d514b0f3Smrgelif test $pkg_failed = untried; then 855d514b0f3Smrg AC_MSG_RESULT([no]) 856d514b0f3Smrg m4_default([$4], [AC_MSG_FAILURE( 857d514b0f3Smrg[The pkg-config script could not be found or is too old. Make sure it 858d514b0f3Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 859d514b0f3Smrgpath to pkg-config. 860d514b0f3Smrg 861d514b0f3Smrg_PKG_TEXT 862d514b0f3Smrg 863d514b0f3SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 864d514b0f3Smrg ]) 865d514b0f3Smrgelse 866d514b0f3Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 867d514b0f3Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 868d514b0f3Smrg AC_MSG_RESULT([yes]) 869d514b0f3Smrg $3 870d514b0f3Smrgfi[]dnl 871d514b0f3Smrg])dnl PKG_CHECK_MODULES 872d514b0f3Smrg 873d514b0f3Smrg 874d514b0f3Smrgdnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 875d514b0f3Smrgdnl [ACTION-IF-NOT-FOUND]) 876d514b0f3Smrgdnl --------------------------------------------------------------------- 877d514b0f3Smrgdnl Since: 0.29 878d514b0f3Smrgdnl 879d514b0f3Smrgdnl Checks for existence of MODULES and gathers its build flags with 880d514b0f3Smrgdnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags 881d514b0f3Smrgdnl and VARIABLE-PREFIX_LIBS from --libs. 882d514b0f3Smrgdnl 883d514b0f3Smrgdnl Note that if there is a possibility the first call to 884d514b0f3Smrgdnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to 885d514b0f3Smrgdnl include an explicit call to PKG_PROG_PKG_CONFIG in your 886d514b0f3Smrgdnl configure.ac. 887d514b0f3SmrgAC_DEFUN([PKG_CHECK_MODULES_STATIC], 888d514b0f3Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 889d514b0f3Smrg_save_PKG_CONFIG=$PKG_CONFIG 890d514b0f3SmrgPKG_CONFIG="$PKG_CONFIG --static" 891d514b0f3SmrgPKG_CHECK_MODULES($@) 892d514b0f3SmrgPKG_CONFIG=$_save_PKG_CONFIG[]dnl 893d514b0f3Smrg])dnl PKG_CHECK_MODULES_STATIC 894d514b0f3Smrg 895d514b0f3Smrg 896d514b0f3Smrgdnl PKG_INSTALLDIR([DIRECTORY]) 897d514b0f3Smrgdnl ------------------------- 898d514b0f3Smrgdnl Since: 0.27 899d514b0f3Smrgdnl 900d514b0f3Smrgdnl Substitutes the variable pkgconfigdir as the location where a module 901d514b0f3Smrgdnl should install pkg-config .pc files. By default the directory is 902d514b0f3Smrgdnl $libdir/pkgconfig, but the default can be changed by passing 903d514b0f3Smrgdnl DIRECTORY. The user can override through the --with-pkgconfigdir 904d514b0f3Smrgdnl parameter. 905d514b0f3SmrgAC_DEFUN([PKG_INSTALLDIR], 906d514b0f3Smrg[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 907d514b0f3Smrgm4_pushdef([pkg_description], 908d514b0f3Smrg [pkg-config installation directory @<:@]pkg_default[@:>@]) 909d514b0f3SmrgAC_ARG_WITH([pkgconfigdir], 910d514b0f3Smrg [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 911d514b0f3Smrg [with_pkgconfigdir=]pkg_default) 912d514b0f3SmrgAC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 913d514b0f3Smrgm4_popdef([pkg_default]) 914d514b0f3Smrgm4_popdef([pkg_description]) 915d514b0f3Smrg])dnl PKG_INSTALLDIR 916d514b0f3Smrg 917d514b0f3Smrg 918d514b0f3Smrgdnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) 919d514b0f3Smrgdnl -------------------------------- 920d514b0f3Smrgdnl Since: 0.27 921d514b0f3Smrgdnl 922d514b0f3Smrgdnl Substitutes the variable noarch_pkgconfigdir as the location where a 923d514b0f3Smrgdnl module should install arch-independent pkg-config .pc files. By 924d514b0f3Smrgdnl default the directory is $datadir/pkgconfig, but the default can be 925d514b0f3Smrgdnl changed by passing DIRECTORY. The user can override through the 926d514b0f3Smrgdnl --with-noarch-pkgconfigdir parameter. 927d514b0f3SmrgAC_DEFUN([PKG_NOARCH_INSTALLDIR], 928d514b0f3Smrg[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 929d514b0f3Smrgm4_pushdef([pkg_description], 930d514b0f3Smrg [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 931d514b0f3SmrgAC_ARG_WITH([noarch-pkgconfigdir], 932d514b0f3Smrg [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 933d514b0f3Smrg [with_noarch_pkgconfigdir=]pkg_default) 934d514b0f3SmrgAC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 935d514b0f3Smrgm4_popdef([pkg_default]) 936d514b0f3Smrgm4_popdef([pkg_description]) 937d514b0f3Smrg])dnl PKG_NOARCH_INSTALLDIR 938d514b0f3Smrg 939d514b0f3Smrg 940d514b0f3Smrgdnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 941d514b0f3Smrgdnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 942d514b0f3Smrgdnl ------------------------------------------- 943d514b0f3Smrgdnl Since: 0.28 944d514b0f3Smrgdnl 945d514b0f3Smrgdnl Retrieves the value of the pkg-config variable for the given module. 946d514b0f3SmrgAC_DEFUN([PKG_CHECK_VAR], 947d514b0f3Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 948d514b0f3SmrgAC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 949d514b0f3Smrg 950d514b0f3Smrg_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 951d514b0f3SmrgAS_VAR_COPY([$1], [pkg_cv_][$1]) 952d514b0f3Smrg 953d514b0f3SmrgAS_VAR_IF([$1], [""], [$5], [$4])dnl 954d514b0f3Smrg])dnl PKG_CHECK_VAR 955d514b0f3Smrg 956d514b0f3Smrgdnl PKG_WITH_MODULES(VARIABLE-PREFIX, MODULES, 957d514b0f3Smrgdnl [ACTION-IF-FOUND],[ACTION-IF-NOT-FOUND], 958d514b0f3Smrgdnl [DESCRIPTION], [DEFAULT]) 959d514b0f3Smrgdnl ------------------------------------------ 960d514b0f3Smrgdnl 961d514b0f3Smrgdnl Prepare a "--with-" configure option using the lowercase 962d514b0f3Smrgdnl [VARIABLE-PREFIX] name, merging the behaviour of AC_ARG_WITH and 963d514b0f3Smrgdnl PKG_CHECK_MODULES in a single macro. 964d514b0f3SmrgAC_DEFUN([PKG_WITH_MODULES], 965d514b0f3Smrg[ 966d514b0f3Smrgm4_pushdef([with_arg], m4_tolower([$1])) 967d514b0f3Smrg 968d514b0f3Smrgm4_pushdef([description], 969d514b0f3Smrg [m4_default([$5], [build with ]with_arg[ support])]) 970d514b0f3Smrg 971d514b0f3Smrgm4_pushdef([def_arg], [m4_default([$6], [auto])]) 972d514b0f3Smrgm4_pushdef([def_action_if_found], [AS_TR_SH([with_]with_arg)=yes]) 973d514b0f3Smrgm4_pushdef([def_action_if_not_found], [AS_TR_SH([with_]with_arg)=no]) 974d514b0f3Smrg 975d514b0f3Smrgm4_case(def_arg, 976d514b0f3Smrg [yes],[m4_pushdef([with_without], [--without-]with_arg)], 977d514b0f3Smrg [m4_pushdef([with_without],[--with-]with_arg)]) 978d514b0f3Smrg 979d514b0f3SmrgAC_ARG_WITH(with_arg, 980d514b0f3Smrg AS_HELP_STRING(with_without, description[ @<:@default=]def_arg[@:>@]),, 981d514b0f3Smrg [AS_TR_SH([with_]with_arg)=def_arg]) 982d514b0f3Smrg 983d514b0f3SmrgAS_CASE([$AS_TR_SH([with_]with_arg)], 984d514b0f3Smrg [yes],[PKG_CHECK_MODULES([$1],[$2],$3,$4)], 985d514b0f3Smrg [auto],[PKG_CHECK_MODULES([$1],[$2], 986d514b0f3Smrg [m4_n([def_action_if_found]) $3], 987d514b0f3Smrg [m4_n([def_action_if_not_found]) $4])]) 988d514b0f3Smrg 989d514b0f3Smrgm4_popdef([with_arg]) 990d514b0f3Smrgm4_popdef([description]) 991d514b0f3Smrgm4_popdef([def_arg]) 992d514b0f3Smrg 993d514b0f3Smrg])dnl PKG_WITH_MODULES 994d514b0f3Smrg 995d514b0f3Smrgdnl PKG_HAVE_WITH_MODULES(VARIABLE-PREFIX, MODULES, 996d514b0f3Smrgdnl [DESCRIPTION], [DEFAULT]) 997d514b0f3Smrgdnl ----------------------------------------------- 998d514b0f3Smrgdnl 999d514b0f3Smrgdnl Convenience macro to trigger AM_CONDITIONAL after PKG_WITH_MODULES 1000d514b0f3Smrgdnl check._[VARIABLE-PREFIX] is exported as make variable. 1001d514b0f3SmrgAC_DEFUN([PKG_HAVE_WITH_MODULES], 1002d514b0f3Smrg[ 1003d514b0f3SmrgPKG_WITH_MODULES([$1],[$2],,,[$3],[$4]) 1004d514b0f3Smrg 1005d514b0f3SmrgAM_CONDITIONAL([HAVE_][$1], 1006d514b0f3Smrg [test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"]) 1007d514b0f3Smrg])dnl PKG_HAVE_WITH_MODULES 1008d514b0f3Smrg 1009d514b0f3Smrgdnl PKG_HAVE_DEFINE_WITH_MODULES(VARIABLE-PREFIX, MODULES, 1010d514b0f3Smrgdnl [DESCRIPTION], [DEFAULT]) 1011d514b0f3Smrgdnl ------------------------------------------------------ 1012d514b0f3Smrgdnl 1013d514b0f3Smrgdnl Convenience macro to run AM_CONDITIONAL and AC_DEFINE after 1014d514b0f3Smrgdnl PKG_WITH_MODULES check. HAVE_[VARIABLE-PREFIX] is exported as make 1015d514b0f3Smrgdnl and preprocessor variable. 1016d514b0f3SmrgAC_DEFUN([PKG_HAVE_DEFINE_WITH_MODULES], 1017d514b0f3Smrg[ 1018d514b0f3SmrgPKG_HAVE_WITH_MODULES([$1],[$2],[$3],[$4]) 1019d514b0f3Smrg 1020d514b0f3SmrgAS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"], 1021d514b0f3Smrg [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])]) 1022d514b0f3Smrg])dnl PKG_HAVE_DEFINE_WITH_MODULES 1023d514b0f3Smrg 1024d514b0f3Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 1025d514b0f3Smrgdnl 1026d514b0f3Smrgdnl Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. 1027d514b0f3Smrgdnl 1028d514b0f3Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 1029d514b0f3Smrgdnl copy of this software and associated documentation files (the "Software"), 1030d514b0f3Smrgdnl to deal in the Software without restriction, including without limitation 1031d514b0f3Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 1032d514b0f3Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 1033d514b0f3Smrgdnl Software is furnished to do so, subject to the following conditions: 1034d514b0f3Smrgdnl 1035d514b0f3Smrgdnl The above copyright notice and this permission notice (including the next 1036d514b0f3Smrgdnl paragraph) shall be included in all copies or substantial portions of the 1037d514b0f3Smrgdnl Software. 1038d514b0f3Smrgdnl 1039d514b0f3Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1040d514b0f3Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1041d514b0f3Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 1042d514b0f3Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 1043d514b0f3Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 1044d514b0f3Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 1045d514b0f3Smrgdnl DEALINGS IN THE SOFTWARE. 1046d514b0f3Smrg 1047d514b0f3Smrg# XORG_MACROS_VERSION(required-version) 1048d514b0f3Smrg# ------------------------------------- 1049d514b0f3Smrg# Minimum version: 1.1.0 1050d514b0f3Smrg# 1051d514b0f3Smrg# If you're using a macro added in Version 1.1 or newer, include this in 1052d514b0f3Smrg# your configure.ac with the minimum required version, such as: 1053d514b0f3Smrg# XORG_MACROS_VERSION(1.1) 1054d514b0f3Smrg# 1055d514b0f3Smrg# To ensure that this macro is defined, also add: 1056d514b0f3Smrg# m4_ifndef([XORG_MACROS_VERSION], 1057d514b0f3Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 1058d514b0f3Smrg# 1059d514b0f3Smrg# 1060d514b0f3Smrg# See the "minimum version" comment for each macro you use to see what 1061d514b0f3Smrg# version you require. 1062d514b0f3Smrgm4_defun([XORG_MACROS_VERSION],[ 1063d514b0f3Smrgm4_define([vers_have], [1.19.3]) 1064d514b0f3Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 1065d514b0f3Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 1066d514b0f3Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 1067d514b0f3Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 1068d514b0f3Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 1069d514b0f3Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 1070d514b0f3Smrgm4_undefine([vers_have]) 1071d514b0f3Smrgm4_undefine([maj_have]) 1072d514b0f3Smrgm4_undefine([maj_needed]) 1073d514b0f3Smrg]) # XORG_MACROS_VERSION 1074d514b0f3Smrg 1075d514b0f3Smrg# XORG_PROG_RAWCPP() 1076d514b0f3Smrg# ------------------ 1077d514b0f3Smrg# Minimum version: 1.0.0 1078d514b0f3Smrg# 1079d514b0f3Smrg# Find cpp program and necessary flags for use in pre-processing text files 1080d514b0f3Smrg# such as man pages and config files 1081d514b0f3SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 1082d514b0f3SmrgAC_REQUIRE([AC_PROG_CPP]) 1083d514b0f3SmrgAC_PATH_TOOL(RAWCPP, [cpp], [${CPP}], 1084d514b0f3Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 1085d514b0f3Smrg 1086d514b0f3Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 1087d514b0f3Smrg# which is not the best choice for supporting other OS'es, but covers most 1088d514b0f3Smrg# of the ones we need for now. 1089d514b0f3SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 1090d514b0f3SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 1091d514b0f3Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1092d514b0f3Smrg AC_MSG_RESULT([no]) 1093d514b0f3Smrgelse 1094d514b0f3Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1095d514b0f3Smrg RAWCPPFLAGS=-undef 1096d514b0f3Smrg AC_MSG_RESULT([yes]) 1097d514b0f3Smrg # under Cygwin unix is still defined even with -undef 1098d514b0f3Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1099d514b0f3Smrg RAWCPPFLAGS="-undef -ansi" 1100d514b0f3Smrg AC_MSG_RESULT([yes, with -ansi]) 1101d514b0f3Smrg else 1102d514b0f3Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 1103d514b0f3Smrg fi 1104d514b0f3Smrgfi 1105d514b0f3Smrgrm -f conftest.$ac_ext 1106d514b0f3Smrg 1107d514b0f3SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 1108d514b0f3SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 1109d514b0f3Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1110d514b0f3Smrg AC_MSG_RESULT([no]) 1111d514b0f3Smrgelse 1112d514b0f3Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1113d514b0f3Smrg TRADITIONALCPPFLAGS="-traditional" 1114d514b0f3Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 1115d514b0f3Smrg AC_MSG_RESULT([yes]) 1116d514b0f3Smrg else 1117d514b0f3Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 1118d514b0f3Smrg fi 1119d514b0f3Smrgfi 1120d514b0f3Smrgrm -f conftest.$ac_ext 1121d514b0f3SmrgAC_SUBST(RAWCPPFLAGS) 1122d514b0f3SmrgAC_SUBST(TRADITIONALCPPFLAGS) 1123d514b0f3Smrg]) # XORG_PROG_RAWCPP 1124d514b0f3Smrg 1125d514b0f3Smrg# XORG_MANPAGE_SECTIONS() 1126d514b0f3Smrg# ----------------------- 1127d514b0f3Smrg# Minimum version: 1.0.0 1128d514b0f3Smrg# 1129d514b0f3Smrg# Determine which sections man pages go in for the different man page types 1130d514b0f3Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 1131d514b0f3Smrg# Not sure if there's any better way than just hardcoding by OS name. 1132d514b0f3Smrg# Override default settings by setting environment variables 1133d514b0f3Smrg# Added MAN_SUBSTS in version 1.8 1134d514b0f3Smrg# Added AC_PROG_SED in version 1.8 1135d514b0f3Smrg 1136d514b0f3SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 1137d514b0f3SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 1138d514b0f3SmrgAC_REQUIRE([AC_PROG_SED]) 1139d514b0f3Smrg 1140d514b0f3Smrgcase $host_os in 1141d514b0f3Smrg solaris*) 1142d514b0f3Smrg # Solaris 2.0 - 11.3 use SysV man page section numbers, so we 1143d514b0f3Smrg # check for a man page file found in later versions that use 1144d514b0f3Smrg # traditional section numbers instead 1145d514b0f3Smrg AC_CHECK_FILE([/usr/share/man/man7/attributes.7], 1146d514b0f3Smrg [SYSV_MAN_SECTIONS=false], [SYSV_MAN_SECTIONS=true]) 1147d514b0f3Smrg ;; 1148d514b0f3Smrg *) SYSV_MAN_SECTIONS=false ;; 1149d514b0f3Smrgesac 1150d514b0f3Smrg 1151d514b0f3Smrgif test x$APP_MAN_SUFFIX = x ; then 1152d514b0f3Smrg APP_MAN_SUFFIX=1 1153d514b0f3Smrgfi 1154d514b0f3Smrgif test x$APP_MAN_DIR = x ; then 1155d514b0f3Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 1156d514b0f3Smrgfi 1157d514b0f3Smrg 1158d514b0f3Smrgif test x$LIB_MAN_SUFFIX = x ; then 1159d514b0f3Smrg LIB_MAN_SUFFIX=3 1160d514b0f3Smrgfi 1161d514b0f3Smrgif test x$LIB_MAN_DIR = x ; then 1162d514b0f3Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 1163d514b0f3Smrgfi 1164d514b0f3Smrg 1165d514b0f3Smrgif test x$FILE_MAN_SUFFIX = x ; then 1166d514b0f3Smrg case $SYSV_MAN_SECTIONS in 1167d514b0f3Smrg true) FILE_MAN_SUFFIX=4 ;; 1168d514b0f3Smrg *) FILE_MAN_SUFFIX=5 ;; 1169d514b0f3Smrg esac 1170d514b0f3Smrgfi 1171d514b0f3Smrgif test x$FILE_MAN_DIR = x ; then 1172d514b0f3Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 1173d514b0f3Smrgfi 1174d514b0f3Smrg 1175d514b0f3Smrgif test x$MISC_MAN_SUFFIX = x ; then 1176d514b0f3Smrg case $SYSV_MAN_SECTIONS in 1177d514b0f3Smrg true) MISC_MAN_SUFFIX=5 ;; 1178d514b0f3Smrg *) MISC_MAN_SUFFIX=7 ;; 1179d514b0f3Smrg esac 1180d514b0f3Smrgfi 1181d514b0f3Smrgif test x$MISC_MAN_DIR = x ; then 1182d514b0f3Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 1183d514b0f3Smrgfi 1184d514b0f3Smrg 1185d514b0f3Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 1186d514b0f3Smrg case $SYSV_MAN_SECTIONS in 1187d514b0f3Smrg true) DRIVER_MAN_SUFFIX=7 ;; 1188d514b0f3Smrg *) DRIVER_MAN_SUFFIX=4 ;; 1189d514b0f3Smrg esac 1190d514b0f3Smrgfi 1191d514b0f3Smrgif test x$DRIVER_MAN_DIR = x ; then 1192d514b0f3Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 1193d514b0f3Smrgfi 1194d514b0f3Smrg 1195d514b0f3Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 1196d514b0f3Smrg case $SYSV_MAN_SECTIONS in 1197d514b0f3Smrg true) ADMIN_MAN_SUFFIX=1m ;; 1198d514b0f3Smrg *) ADMIN_MAN_SUFFIX=8 ;; 1199d514b0f3Smrg esac 1200d514b0f3Smrgfi 1201d514b0f3Smrgif test x$ADMIN_MAN_DIR = x ; then 1202d514b0f3Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 1203d514b0f3Smrgfi 1204d514b0f3Smrg 1205d514b0f3Smrg 1206d514b0f3SmrgAC_SUBST([APP_MAN_SUFFIX]) 1207d514b0f3SmrgAC_SUBST([LIB_MAN_SUFFIX]) 1208d514b0f3SmrgAC_SUBST([FILE_MAN_SUFFIX]) 1209d514b0f3SmrgAC_SUBST([MISC_MAN_SUFFIX]) 1210d514b0f3SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 1211d514b0f3SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 1212d514b0f3SmrgAC_SUBST([APP_MAN_DIR]) 1213d514b0f3SmrgAC_SUBST([LIB_MAN_DIR]) 1214d514b0f3SmrgAC_SUBST([FILE_MAN_DIR]) 1215d514b0f3SmrgAC_SUBST([MISC_MAN_DIR]) 1216d514b0f3SmrgAC_SUBST([DRIVER_MAN_DIR]) 1217d514b0f3SmrgAC_SUBST([ADMIN_MAN_DIR]) 1218d514b0f3Smrg 1219d514b0f3SmrgXORG_MAN_PAGE="X Version 11" 1220d514b0f3SmrgAC_SUBST([XORG_MAN_PAGE]) 1221d514b0f3SmrgMAN_SUBSTS="\ 1222d514b0f3Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 1223d514b0f3Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 1224d514b0f3Smrg -e 's|__xservername__|Xorg|g' \ 1225d514b0f3Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 1226d514b0f3Smrg -e 's|__projectroot__|\$(prefix)|g' \ 1227d514b0f3Smrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 1228d514b0f3Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 1229d514b0f3Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 1230d514b0f3Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 1231d514b0f3Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 1232d514b0f3Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 1233d514b0f3Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 1234d514b0f3SmrgAC_SUBST([MAN_SUBSTS]) 1235d514b0f3Smrg 1236d514b0f3Smrg]) # XORG_MANPAGE_SECTIONS 1237d514b0f3Smrg 1238d514b0f3Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 1239d514b0f3Smrg# ------------------------ 1240d514b0f3Smrg# Minimum version: 1.7.0 1241d514b0f3Smrg# 1242d514b0f3Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 1243d514b0f3Smrg# provided by xorg-sgml-doctools, if installed. 1244d514b0f3SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 1245d514b0f3SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 1246d514b0f3SmrgXORG_SGML_PATH= 1247d514b0f3SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 1248d514b0f3Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 1249d514b0f3Smrg [m4_ifval([$1],[:], 1250d514b0f3Smrg [if test x"$cross_compiling" != x"yes" ; then 1251d514b0f3Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 1252d514b0f3Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 1253d514b0f3Smrg fi]) 1254d514b0f3Smrg ]) 1255d514b0f3Smrg 1256d514b0f3Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 1257d514b0f3Smrg# the path and the name of the doc stylesheet 1258d514b0f3Smrgif test "x$XORG_SGML_PATH" != "x" ; then 1259d514b0f3Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 1260d514b0f3Smrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 1261d514b0f3Smrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 1262d514b0f3Smrgelse 1263d514b0f3Smrg AC_MSG_RESULT([no]) 1264d514b0f3Smrgfi 1265d514b0f3Smrg 1266d514b0f3SmrgAC_SUBST(XORG_SGML_PATH) 1267d514b0f3SmrgAC_SUBST(STYLESHEET_SRCDIR) 1268d514b0f3SmrgAC_SUBST(XSL_STYLESHEET) 1269d514b0f3SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 1270d514b0f3Smrg]) # XORG_CHECK_SGML_DOCTOOLS 1271d514b0f3Smrg 1272d514b0f3Smrg# XORG_CHECK_LINUXDOC 1273d514b0f3Smrg# ------------------- 1274d514b0f3Smrg# Minimum version: 1.0.0 1275d514b0f3Smrg# 1276d514b0f3Smrg# Defines the variable MAKE_TEXT if the necessary tools and 1277d514b0f3Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 1278d514b0f3Smrg# Whether or not the necessary tools and files are found can be checked 1279d514b0f3Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 1280d514b0f3SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 1281d514b0f3SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 1282d514b0f3SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 1283d514b0f3Smrg 1284d514b0f3SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 1285d514b0f3Smrg 1286d514b0f3SmrgAC_MSG_CHECKING([whether to build documentation]) 1287d514b0f3Smrg 1288d514b0f3Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 1289d514b0f3Smrg BUILDDOC=yes 1290d514b0f3Smrgelse 1291d514b0f3Smrg BUILDDOC=no 1292d514b0f3Smrgfi 1293d514b0f3Smrg 1294d514b0f3SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 1295d514b0f3Smrg 1296d514b0f3SmrgAC_MSG_RESULT([$BUILDDOC]) 1297d514b0f3Smrg 1298d514b0f3SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 1299d514b0f3Smrg 1300d514b0f3Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 1301d514b0f3Smrg BUILDPDFDOC=yes 1302d514b0f3Smrgelse 1303d514b0f3Smrg BUILDPDFDOC=no 1304d514b0f3Smrgfi 1305d514b0f3Smrg 1306d514b0f3SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1307d514b0f3Smrg 1308d514b0f3SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 1309d514b0f3Smrg 1310d514b0f3SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 1311d514b0f3SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 1312d514b0f3SmrgMAKE_PDF="$PS2PDF" 1313d514b0f3SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 1314d514b0f3Smrg 1315d514b0f3SmrgAC_SUBST(MAKE_TEXT) 1316d514b0f3SmrgAC_SUBST(MAKE_PS) 1317d514b0f3SmrgAC_SUBST(MAKE_PDF) 1318d514b0f3SmrgAC_SUBST(MAKE_HTML) 1319d514b0f3Smrg]) # XORG_CHECK_LINUXDOC 1320d514b0f3Smrg 1321d514b0f3Smrg# XORG_CHECK_DOCBOOK 1322d514b0f3Smrg# ------------------- 1323d514b0f3Smrg# Minimum version: 1.0.0 1324d514b0f3Smrg# 1325d514b0f3Smrg# Checks for the ability to build output formats from SGML DocBook source. 1326d514b0f3Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 1327d514b0f3Smrg# indicates whether the necessary tools and files are found and, if set, 1328d514b0f3Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 1329d514b0f3SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 1330d514b0f3SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 1331d514b0f3Smrg 1332d514b0f3SmrgBUILDTXTDOC=no 1333d514b0f3SmrgBUILDPDFDOC=no 1334d514b0f3SmrgBUILDPSDOC=no 1335d514b0f3SmrgBUILDHTMLDOC=no 1336d514b0f3Smrg 1337d514b0f3SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 1338d514b0f3SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 1339d514b0f3SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 1340d514b0f3SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 1341d514b0f3Smrg 1342d514b0f3SmrgAC_MSG_CHECKING([whether to build text documentation]) 1343d514b0f3Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 1344d514b0f3Smrg test x$BUILD_TXTDOC != xno; then 1345d514b0f3Smrg BUILDTXTDOC=yes 1346d514b0f3Smrgfi 1347d514b0f3SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 1348d514b0f3SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 1349d514b0f3Smrg 1350d514b0f3SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 1351d514b0f3Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 1352d514b0f3Smrg test x$BUILD_PDFDOC != xno; then 1353d514b0f3Smrg BUILDPDFDOC=yes 1354d514b0f3Smrgfi 1355d514b0f3SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1356d514b0f3SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 1357d514b0f3Smrg 1358d514b0f3SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 1359d514b0f3Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 1360d514b0f3Smrg test x$BUILD_PSDOC != xno; then 1361d514b0f3Smrg BUILDPSDOC=yes 1362d514b0f3Smrgfi 1363d514b0f3SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 1364d514b0f3SmrgAC_MSG_RESULT([$BUILDPSDOC]) 1365d514b0f3Smrg 1366d514b0f3SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 1367d514b0f3Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 1368d514b0f3Smrg test x$BUILD_HTMLDOC != xno; then 1369d514b0f3Smrg BUILDHTMLDOC=yes 1370d514b0f3Smrgfi 1371d514b0f3SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 1372d514b0f3SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 1373d514b0f3Smrg 1374d514b0f3SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 1375d514b0f3SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 1376d514b0f3SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 1377d514b0f3SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 1378d514b0f3Smrg 1379d514b0f3SmrgAC_SUBST(MAKE_TEXT) 1380d514b0f3SmrgAC_SUBST(MAKE_PS) 1381d514b0f3SmrgAC_SUBST(MAKE_PDF) 1382d514b0f3SmrgAC_SUBST(MAKE_HTML) 1383d514b0f3Smrg]) # XORG_CHECK_DOCBOOK 1384d514b0f3Smrg 1385d514b0f3Smrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 1386d514b0f3Smrg# ---------------- 1387d514b0f3Smrg# Minimum version: 1.5.0 1388d514b0f3Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1389d514b0f3Smrg# 1390d514b0f3Smrg# Documentation tools are not always available on all platforms and sometimes 1391d514b0f3Smrg# not at the appropriate level. This macro enables a module to test for the 1392d514b0f3Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1393d514b0f3Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 1394d514b0f3Smrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 1395d514b0f3Smrg# --with-xmlto assumes 'auto'. 1396d514b0f3Smrg# 1397d514b0f3Smrg# Interface to module: 1398d514b0f3Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 1399d514b0f3Smrg# XMLTO: returns the path of the xmlto program found 1400d514b0f3Smrg# returns the path set by the user in the environment 1401d514b0f3Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 1402d514b0f3Smrg# 'no' user instructs the module not to use xmlto 1403d514b0f3Smrg# 1404d514b0f3Smrg# Added in version 1.10.0 1405d514b0f3Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 1406d514b0f3Smrg# xmlto for text output requires either lynx, links, or w3m browsers 1407d514b0f3Smrg# 1408d514b0f3Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 1409d514b0f3Smrg# 1410d514b0f3SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 1411d514b0f3SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 1412d514b0f3Smrgm4_define([_defopt], m4_default([$2], [auto])) 1413d514b0f3SmrgAC_ARG_WITH(xmlto, 1414d514b0f3Smrg AS_HELP_STRING([--with-xmlto], 1415d514b0f3Smrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 1416d514b0f3Smrg [use_xmlto=$withval], [use_xmlto=]_defopt) 1417d514b0f3Smrgm4_undefine([_defopt]) 1418d514b0f3Smrg 1419d514b0f3Smrgif test "x$use_xmlto" = x"auto"; then 1420d514b0f3Smrg AC_PATH_PROG([XMLTO], [xmlto]) 1421d514b0f3Smrg if test "x$XMLTO" = "x"; then 1422d514b0f3Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 1423d514b0f3Smrg have_xmlto=no 1424d514b0f3Smrg else 1425d514b0f3Smrg have_xmlto=yes 1426d514b0f3Smrg fi 1427d514b0f3Smrgelif test "x$use_xmlto" = x"yes" ; then 1428d514b0f3Smrg AC_PATH_PROG([XMLTO], [xmlto]) 1429d514b0f3Smrg if test "x$XMLTO" = "x"; then 1430d514b0f3Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 1431d514b0f3Smrg fi 1432d514b0f3Smrg have_xmlto=yes 1433d514b0f3Smrgelif test "x$use_xmlto" = x"no" ; then 1434d514b0f3Smrg if test "x$XMLTO" != "x"; then 1435d514b0f3Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 1436d514b0f3Smrg fi 1437d514b0f3Smrg have_xmlto=no 1438d514b0f3Smrgelse 1439d514b0f3Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 1440d514b0f3Smrgfi 1441d514b0f3Smrg 1442d514b0f3Smrg# Test for a minimum version of xmlto, if provided. 1443d514b0f3Smrgm4_ifval([$1], 1444d514b0f3Smrg[if test "$have_xmlto" = yes; then 1445d514b0f3Smrg # scrape the xmlto version 1446d514b0f3Smrg AC_MSG_CHECKING([the xmlto version]) 1447d514b0f3Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 1448d514b0f3Smrg AC_MSG_RESULT([$xmlto_version]) 1449d514b0f3Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 1450d514b0f3Smrg [if test "x$use_xmlto" = xauto; then 1451d514b0f3Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 1452d514b0f3Smrg have_xmlto=no 1453d514b0f3Smrg else 1454d514b0f3Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 1455d514b0f3Smrg fi]) 1456d514b0f3Smrgfi]) 1457d514b0f3Smrg 1458d514b0f3Smrg# Test for the ability of xmlto to generate a text target 1459d514b0f3Smrg# 1460d514b0f3Smrg# NOTE: xmlto 0.0.27 or higher return a non-zero return code in the 1461d514b0f3Smrg# following test for empty XML docbook files. 1462d514b0f3Smrg# For compatibility reasons use the following empty XML docbook file and if 1463d514b0f3Smrg# it fails try it again with a non-empty XML file. 1464d514b0f3Smrghave_xmlto_text=no 1465d514b0f3Smrgcat > conftest.xml << "EOF" 1466d514b0f3SmrgEOF 1467d514b0f3SmrgAS_IF([test "$have_xmlto" = yes], 1468d514b0f3Smrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 1469d514b0f3Smrg [have_xmlto_text=yes], 1470d514b0f3Smrg [# Try it again with a non-empty XML file. 1471d514b0f3Smrg cat > conftest.xml << "EOF" 1472d514b0f3Smrg<x></x> 1473d514b0f3SmrgEOF 1474d514b0f3Smrg AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 1475d514b0f3Smrg [have_xmlto_text=yes], 1476d514b0f3Smrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])]) 1477d514b0f3Smrgrm -f conftest.xml 1478d514b0f3SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 1479d514b0f3SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 1480d514b0f3Smrg]) # XORG_WITH_XMLTO 1481d514b0f3Smrg 1482d514b0f3Smrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 1483d514b0f3Smrg# -------------------------------------------- 1484d514b0f3Smrg# Minimum version: 1.12.0 1485d514b0f3Smrg# Minimum version for optional DEFAULT argument: 1.12.0 1486d514b0f3Smrg# 1487d514b0f3Smrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 1488d514b0f3Smrg# XML-based language used for the transformation of XML documents. 1489d514b0f3Smrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 1490d514b0f3Smrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 1491d514b0f3Smrg# The XSLT processor is often used as a standalone tool for transformations. 1492d514b0f3Smrg# It should not be assumed that this tool is used only to work with documnetation. 1493d514b0f3Smrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 1494d514b0f3Smrg# 1495d514b0f3Smrg# Interface to module: 1496d514b0f3Smrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 1497d514b0f3Smrg# XSLTPROC: returns the path of the xsltproc program found 1498d514b0f3Smrg# returns the path set by the user in the environment 1499d514b0f3Smrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 1500d514b0f3Smrg# 'no' user instructs the module not to use xsltproc 1501d514b0f3Smrg# have_xsltproc: returns yes if xsltproc found in PATH or no 1502d514b0f3Smrg# 1503d514b0f3Smrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 1504d514b0f3Smrg# 1505d514b0f3SmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 1506d514b0f3SmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 1507d514b0f3Smrg# Preserves the interface, should it be implemented later 1508d514b0f3Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 1509d514b0f3Smrgm4_define([_defopt], m4_default([$2], [auto])) 1510d514b0f3SmrgAC_ARG_WITH(xsltproc, 1511d514b0f3Smrg AS_HELP_STRING([--with-xsltproc], 1512d514b0f3Smrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 1513d514b0f3Smrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 1514d514b0f3Smrgm4_undefine([_defopt]) 1515d514b0f3Smrg 1516d514b0f3Smrgif test "x$use_xsltproc" = x"auto"; then 1517d514b0f3Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 1518d514b0f3Smrg if test "x$XSLTPROC" = "x"; then 1519d514b0f3Smrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 1520d514b0f3Smrg have_xsltproc=no 1521d514b0f3Smrg else 1522d514b0f3Smrg have_xsltproc=yes 1523d514b0f3Smrg fi 1524d514b0f3Smrgelif test "x$use_xsltproc" = x"yes" ; then 1525d514b0f3Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 1526d514b0f3Smrg if test "x$XSLTPROC" = "x"; then 1527d514b0f3Smrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 1528d514b0f3Smrg fi 1529d514b0f3Smrg have_xsltproc=yes 1530d514b0f3Smrgelif test "x$use_xsltproc" = x"no" ; then 1531d514b0f3Smrg if test "x$XSLTPROC" != "x"; then 1532d514b0f3Smrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 1533d514b0f3Smrg fi 1534d514b0f3Smrg have_xsltproc=no 1535d514b0f3Smrgelse 1536d514b0f3Smrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 1537d514b0f3Smrgfi 1538d514b0f3Smrg 1539d514b0f3SmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 1540d514b0f3Smrg]) # XORG_WITH_XSLTPROC 1541d514b0f3Smrg 1542d514b0f3Smrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 1543d514b0f3Smrg# ---------------------------------------- 1544d514b0f3Smrg# Minimum version: 1.15.0 1545d514b0f3Smrg# 1546d514b0f3Smrg# PERL (Practical Extraction and Report Language) is a language optimized for 1547d514b0f3Smrg# scanning arbitrary text files, extracting information from those text files, 1548d514b0f3Smrg# and printing reports based on that information. 1549d514b0f3Smrg# 1550d514b0f3Smrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 1551d514b0f3Smrg# 1552d514b0f3Smrg# Interface to module: 1553d514b0f3Smrg# HAVE_PERL: used in makefiles to conditionally scan text files 1554d514b0f3Smrg# PERL: returns the path of the perl program found 1555d514b0f3Smrg# returns the path set by the user in the environment 1556d514b0f3Smrg# --with-perl: 'yes' user instructs the module to use perl 1557d514b0f3Smrg# 'no' user instructs the module not to use perl 1558d514b0f3Smrg# have_perl: returns yes if perl found in PATH or no 1559d514b0f3Smrg# 1560d514b0f3Smrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 1561d514b0f3Smrg# 1562d514b0f3SmrgAC_DEFUN([XORG_WITH_PERL],[ 1563d514b0f3SmrgAC_ARG_VAR([PERL], [Path to perl command]) 1564d514b0f3Smrg# Preserves the interface, should it be implemented later 1565d514b0f3Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 1566d514b0f3Smrgm4_define([_defopt], m4_default([$2], [auto])) 1567d514b0f3SmrgAC_ARG_WITH(perl, 1568d514b0f3Smrg AS_HELP_STRING([--with-perl], 1569d514b0f3Smrg [Use perl for extracting information from files (default: ]_defopt[)]), 1570d514b0f3Smrg [use_perl=$withval], [use_perl=]_defopt) 1571d514b0f3Smrgm4_undefine([_defopt]) 1572d514b0f3Smrg 1573d514b0f3Smrgif test "x$use_perl" = x"auto"; then 1574d514b0f3Smrg AC_PATH_PROG([PERL], [perl]) 1575d514b0f3Smrg if test "x$PERL" = "x"; then 1576d514b0f3Smrg AC_MSG_WARN([perl not found - cannot extract information and report]) 1577d514b0f3Smrg have_perl=no 1578d514b0f3Smrg else 1579d514b0f3Smrg have_perl=yes 1580d514b0f3Smrg fi 1581d514b0f3Smrgelif test "x$use_perl" = x"yes" ; then 1582d514b0f3Smrg AC_PATH_PROG([PERL], [perl]) 1583d514b0f3Smrg if test "x$PERL" = "x"; then 1584d514b0f3Smrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 1585d514b0f3Smrg fi 1586d514b0f3Smrg have_perl=yes 1587d514b0f3Smrgelif test "x$use_perl" = x"no" ; then 1588d514b0f3Smrg if test "x$PERL" != "x"; then 1589d514b0f3Smrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 1590d514b0f3Smrg fi 1591d514b0f3Smrg have_perl=no 1592d514b0f3Smrgelse 1593d514b0f3Smrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 1594d514b0f3Smrgfi 1595d514b0f3Smrg 1596d514b0f3SmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 1597d514b0f3Smrg]) # XORG_WITH_PERL 1598d514b0f3Smrg 1599d514b0f3Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 1600d514b0f3Smrg# ---------------- 1601d514b0f3Smrg# Minimum version: 1.5.0 1602d514b0f3Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1603d514b0f3Smrg# 1604d514b0f3Smrg# Documentation tools are not always available on all platforms and sometimes 1605d514b0f3Smrg# not at the appropriate level. This macro enables a module to test for the 1606d514b0f3Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1607d514b0f3Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 1608d514b0f3Smrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 1609d514b0f3Smrg# --with-asciidoc assumes 'auto'. 1610d514b0f3Smrg# 1611d514b0f3Smrg# Interface to module: 1612d514b0f3Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 1613d514b0f3Smrg# ASCIIDOC: returns the path of the asciidoc program found 1614d514b0f3Smrg# returns the path set by the user in the environment 1615d514b0f3Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 1616d514b0f3Smrg# 'no' user instructs the module not to use asciidoc 1617d514b0f3Smrg# 1618d514b0f3Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 1619d514b0f3Smrg# 1620d514b0f3SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 1621d514b0f3SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 1622d514b0f3Smrgm4_define([_defopt], m4_default([$2], [auto])) 1623d514b0f3SmrgAC_ARG_WITH(asciidoc, 1624d514b0f3Smrg AS_HELP_STRING([--with-asciidoc], 1625d514b0f3Smrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 1626d514b0f3Smrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 1627d514b0f3Smrgm4_undefine([_defopt]) 1628d514b0f3Smrg 1629d514b0f3Smrgif test "x$use_asciidoc" = x"auto"; then 1630d514b0f3Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 1631d514b0f3Smrg if test "x$ASCIIDOC" = "x"; then 1632d514b0f3Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 1633d514b0f3Smrg have_asciidoc=no 1634d514b0f3Smrg else 1635d514b0f3Smrg have_asciidoc=yes 1636d514b0f3Smrg fi 1637d514b0f3Smrgelif test "x$use_asciidoc" = x"yes" ; then 1638d514b0f3Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 1639d514b0f3Smrg if test "x$ASCIIDOC" = "x"; then 1640d514b0f3Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 1641d514b0f3Smrg fi 1642d514b0f3Smrg have_asciidoc=yes 1643d514b0f3Smrgelif test "x$use_asciidoc" = x"no" ; then 1644d514b0f3Smrg if test "x$ASCIIDOC" != "x"; then 1645d514b0f3Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 1646d514b0f3Smrg fi 1647d514b0f3Smrg have_asciidoc=no 1648d514b0f3Smrgelse 1649d514b0f3Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 1650d514b0f3Smrgfi 1651d514b0f3Smrgm4_ifval([$1], 1652d514b0f3Smrg[if test "$have_asciidoc" = yes; then 1653d514b0f3Smrg # scrape the asciidoc version 1654d514b0f3Smrg AC_MSG_CHECKING([the asciidoc version]) 1655d514b0f3Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 1656d514b0f3Smrg AC_MSG_RESULT([$asciidoc_version]) 1657d514b0f3Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 1658d514b0f3Smrg [if test "x$use_asciidoc" = xauto; then 1659d514b0f3Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 1660d514b0f3Smrg have_asciidoc=no 1661d514b0f3Smrg else 1662d514b0f3Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 1663d514b0f3Smrg fi]) 1664d514b0f3Smrgfi]) 1665d514b0f3SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 1666d514b0f3Smrg]) # XORG_WITH_ASCIIDOC 1667d514b0f3Smrg 1668d514b0f3Smrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 1669d514b0f3Smrg# ------------------------------------------- 1670d514b0f3Smrg# Minimum version: 1.5.0 1671d514b0f3Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1672d514b0f3Smrg# Minimum version for optional DOT checking: 1.18.0 1673d514b0f3Smrg# 1674d514b0f3Smrg# Documentation tools are not always available on all platforms and sometimes 1675d514b0f3Smrg# not at the appropriate level. This macro enables a module to test for the 1676d514b0f3Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1677d514b0f3Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 1678d514b0f3Smrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 1679d514b0f3Smrg# --with-doxygen assumes 'auto'. 1680d514b0f3Smrg# 1681d514b0f3Smrg# Interface to module: 1682d514b0f3Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 1683d514b0f3Smrg# DOXYGEN: returns the path of the doxygen program found 1684d514b0f3Smrg# returns the path set by the user in the environment 1685d514b0f3Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 1686d514b0f3Smrg# 'no' user instructs the module not to use doxygen 1687d514b0f3Smrg# 1688d514b0f3Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 1689d514b0f3Smrg# 1690d514b0f3SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 1691d514b0f3SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 1692d514b0f3SmrgAC_ARG_VAR([DOT], [Path to the dot graphics utility]) 1693d514b0f3Smrgm4_define([_defopt], m4_default([$2], [auto])) 1694d514b0f3SmrgAC_ARG_WITH(doxygen, 1695d514b0f3Smrg AS_HELP_STRING([--with-doxygen], 1696d514b0f3Smrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 1697d514b0f3Smrg [use_doxygen=$withval], [use_doxygen=]_defopt) 1698d514b0f3Smrgm4_undefine([_defopt]) 1699d514b0f3Smrg 1700d514b0f3Smrgif test "x$use_doxygen" = x"auto"; then 1701d514b0f3Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 1702d514b0f3Smrg if test "x$DOXYGEN" = "x"; then 1703d514b0f3Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 1704d514b0f3Smrg have_doxygen=no 1705d514b0f3Smrg else 1706d514b0f3Smrg have_doxygen=yes 1707d514b0f3Smrg fi 1708d514b0f3Smrgelif test "x$use_doxygen" = x"yes" ; then 1709d514b0f3Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 1710d514b0f3Smrg if test "x$DOXYGEN" = "x"; then 1711d514b0f3Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 1712d514b0f3Smrg fi 1713d514b0f3Smrg have_doxygen=yes 1714d514b0f3Smrgelif test "x$use_doxygen" = x"no" ; then 1715d514b0f3Smrg if test "x$DOXYGEN" != "x"; then 1716d514b0f3Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 1717d514b0f3Smrg fi 1718d514b0f3Smrg have_doxygen=no 1719d514b0f3Smrgelse 1720d514b0f3Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 1721d514b0f3Smrgfi 1722d514b0f3Smrgm4_ifval([$1], 1723d514b0f3Smrg[if test "$have_doxygen" = yes; then 1724d514b0f3Smrg # scrape the doxygen version 1725d514b0f3Smrg AC_MSG_CHECKING([the doxygen version]) 1726d514b0f3Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 1727d514b0f3Smrg AC_MSG_RESULT([$doxygen_version]) 1728d514b0f3Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 1729d514b0f3Smrg [if test "x$use_doxygen" = xauto; then 1730d514b0f3Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 1731d514b0f3Smrg have_doxygen=no 1732d514b0f3Smrg else 1733d514b0f3Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 1734d514b0f3Smrg fi]) 1735d514b0f3Smrgfi]) 1736d514b0f3Smrg 1737d514b0f3Smrgdnl Check for DOT if we have doxygen. The caller decides if it is mandatory 1738d514b0f3Smrgdnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 1739d514b0f3Smrgdnl HAVE_DOT = @HAVE_DOT@ 1740d514b0f3SmrgHAVE_DOT=no 1741d514b0f3Smrgif test "x$have_doxygen" = "xyes"; then 1742d514b0f3Smrg AC_PATH_PROG([DOT], [dot]) 1743d514b0f3Smrg if test "x$DOT" != "x"; then 1744d514b0f3Smrg HAVE_DOT=yes 1745d514b0f3Smrg fi 1746d514b0f3Smrgfi 1747d514b0f3Smrg 1748d514b0f3SmrgAC_SUBST([HAVE_DOT]) 1749d514b0f3SmrgAM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 1750d514b0f3SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 1751d514b0f3Smrg]) # XORG_WITH_DOXYGEN 1752d514b0f3Smrg 1753d514b0f3Smrg# XORG_WITH_GROFF([DEFAULT]) 1754d514b0f3Smrg# ---------------- 1755d514b0f3Smrg# Minimum version: 1.6.0 1756d514b0f3Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1757d514b0f3Smrg# 1758d514b0f3Smrg# Documentation tools are not always available on all platforms and sometimes 1759d514b0f3Smrg# not at the appropriate level. This macro enables a module to test for the 1760d514b0f3Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1761d514b0f3Smrg# the --with-groff option, it allows maximum flexibilty in making decisions 1762d514b0f3Smrg# as whether or not to use the groff package. When DEFAULT is not specified, 1763d514b0f3Smrg# --with-groff assumes 'auto'. 1764d514b0f3Smrg# 1765d514b0f3Smrg# Interface to module: 1766d514b0f3Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 1767d514b0f3Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 1768d514b0f3Smrg# HAVE_GROFF_MS: the -ms macros package 1769d514b0f3Smrg# GROFF: returns the path of the groff program found 1770d514b0f3Smrg# returns the path set by the user in the environment 1771d514b0f3Smrg# --with-groff: 'yes' user instructs the module to use groff 1772d514b0f3Smrg# 'no' user instructs the module not to use groff 1773d514b0f3Smrg# 1774d514b0f3Smrg# Added in version 1.9.0: 1775d514b0f3Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 1776d514b0f3Smrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 1777d514b0f3Smrg# psselect from the psutils package. 1778d514b0f3Smrg# the ghostcript package. Refer to the grohtml man pages 1779d514b0f3Smrg# 1780d514b0f3Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 1781d514b0f3Smrg# 1782d514b0f3Smrg# OS and distros often splits groff in a basic and full package, the former 1783d514b0f3Smrg# having the groff program and the later having devices, fonts and macros 1784d514b0f3Smrg# Checking for the groff executable is not enough. 1785d514b0f3Smrg# 1786d514b0f3Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 1787d514b0f3Smrg# unset HAVE_GROFF or GROFF env variables. 1788d514b0f3Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 1789d514b0f3Smrg# 1790d514b0f3SmrgAC_DEFUN([XORG_WITH_GROFF],[ 1791d514b0f3SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 1792d514b0f3Smrgm4_define([_defopt], m4_default([$1], [auto])) 1793d514b0f3SmrgAC_ARG_WITH(groff, 1794d514b0f3Smrg AS_HELP_STRING([--with-groff], 1795d514b0f3Smrg [Use groff to regenerate documentation (default: ]_defopt[)]), 1796d514b0f3Smrg [use_groff=$withval], [use_groff=]_defopt) 1797d514b0f3Smrgm4_undefine([_defopt]) 1798d514b0f3Smrg 1799d514b0f3Smrgif test "x$use_groff" = x"auto"; then 1800d514b0f3Smrg AC_PATH_PROG([GROFF], [groff]) 1801d514b0f3Smrg if test "x$GROFF" = "x"; then 1802d514b0f3Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 1803d514b0f3Smrg have_groff=no 1804d514b0f3Smrg else 1805d514b0f3Smrg have_groff=yes 1806d514b0f3Smrg fi 1807d514b0f3Smrgelif test "x$use_groff" = x"yes" ; then 1808d514b0f3Smrg AC_PATH_PROG([GROFF], [groff]) 1809d514b0f3Smrg if test "x$GROFF" = "x"; then 1810d514b0f3Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 1811d514b0f3Smrg fi 1812d514b0f3Smrg have_groff=yes 1813d514b0f3Smrgelif test "x$use_groff" = x"no" ; then 1814d514b0f3Smrg if test "x$GROFF" != "x"; then 1815d514b0f3Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 1816d514b0f3Smrg fi 1817d514b0f3Smrg have_groff=no 1818d514b0f3Smrgelse 1819d514b0f3Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 1820d514b0f3Smrgfi 1821d514b0f3Smrg 1822d514b0f3Smrg# We have groff, test for the presence of the macro packages 1823d514b0f3Smrgif test "x$have_groff" = x"yes"; then 1824d514b0f3Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 1825d514b0f3Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 1826d514b0f3Smrg groff_ms_works=yes 1827d514b0f3Smrg else 1828d514b0f3Smrg groff_ms_works=no 1829d514b0f3Smrg fi 1830d514b0f3Smrg AC_MSG_RESULT([$groff_ms_works]) 1831d514b0f3Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 1832d514b0f3Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 1833d514b0f3Smrg groff_mm_works=yes 1834d514b0f3Smrg else 1835d514b0f3Smrg groff_mm_works=no 1836d514b0f3Smrg fi 1837d514b0f3Smrg AC_MSG_RESULT([$groff_mm_works]) 1838d514b0f3Smrgfi 1839d514b0f3Smrg 1840d514b0f3Smrg# We have groff, test for HTML dependencies, one command per package 1841d514b0f3Smrgif test "x$have_groff" = x"yes"; then 1842d514b0f3Smrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 1843d514b0f3Smrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 1844d514b0f3Smrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 1845d514b0f3Smrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 1846d514b0f3Smrg have_groff_html=yes 1847d514b0f3Smrg else 1848d514b0f3Smrg have_groff_html=no 1849d514b0f3Smrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 1850d514b0f3Smrg fi 1851d514b0f3Smrgfi 1852d514b0f3Smrg 1853d514b0f3Smrg# Set Automake conditionals for Makefiles 1854d514b0f3SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 1855d514b0f3SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 1856d514b0f3SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 1857d514b0f3SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 1858d514b0f3Smrg]) # XORG_WITH_GROFF 1859d514b0f3Smrg 1860d514b0f3Smrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 1861d514b0f3Smrg# --------------------------------------- 1862d514b0f3Smrg# Minimum version: 1.6.0 1863d514b0f3Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1864d514b0f3Smrg# Minimum version for optional MIN-VERSION argument: 1.15.0 1865d514b0f3Smrg# 1866d514b0f3Smrg# Documentation tools are not always available on all platforms and sometimes 1867d514b0f3Smrg# not at the appropriate level. This macro enables a module to test for the 1868d514b0f3Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1869d514b0f3Smrg# the --with-fop option, it allows maximum flexibilty in making decisions 1870d514b0f3Smrg# as whether or not to use the fop package. When DEFAULT is not specified, 1871d514b0f3Smrg# --with-fop assumes 'auto'. 1872d514b0f3Smrg# 1873d514b0f3Smrg# Interface to module: 1874d514b0f3Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 1875d514b0f3Smrg# FOP: returns the path of the fop program found 1876d514b0f3Smrg# returns the path set by the user in the environment 1877d514b0f3Smrg# --with-fop: 'yes' user instructs the module to use fop 1878d514b0f3Smrg# 'no' user instructs the module not to use fop 1879d514b0f3Smrg# 1880d514b0f3Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 1881d514b0f3Smrg# 1882d514b0f3SmrgAC_DEFUN([XORG_WITH_FOP],[ 1883d514b0f3SmrgAC_ARG_VAR([FOP], [Path to fop command]) 1884d514b0f3Smrgm4_define([_defopt], m4_default([$2], [auto])) 1885d514b0f3SmrgAC_ARG_WITH(fop, 1886d514b0f3Smrg AS_HELP_STRING([--with-fop], 1887d514b0f3Smrg [Use fop to regenerate documentation (default: ]_defopt[)]), 1888d514b0f3Smrg [use_fop=$withval], [use_fop=]_defopt) 1889d514b0f3Smrgm4_undefine([_defopt]) 1890d514b0f3Smrg 1891d514b0f3Smrgif test "x$use_fop" = x"auto"; then 1892d514b0f3Smrg AC_PATH_PROG([FOP], [fop]) 1893d514b0f3Smrg if test "x$FOP" = "x"; then 1894d514b0f3Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 1895d514b0f3Smrg have_fop=no 1896d514b0f3Smrg else 1897d514b0f3Smrg have_fop=yes 1898d514b0f3Smrg fi 1899d514b0f3Smrgelif test "x$use_fop" = x"yes" ; then 1900d514b0f3Smrg AC_PATH_PROG([FOP], [fop]) 1901d514b0f3Smrg if test "x$FOP" = "x"; then 1902d514b0f3Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 1903d514b0f3Smrg fi 1904d514b0f3Smrg have_fop=yes 1905d514b0f3Smrgelif test "x$use_fop" = x"no" ; then 1906d514b0f3Smrg if test "x$FOP" != "x"; then 1907d514b0f3Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 1908d514b0f3Smrg fi 1909d514b0f3Smrg have_fop=no 1910d514b0f3Smrgelse 1911d514b0f3Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 1912d514b0f3Smrgfi 1913d514b0f3Smrg 1914d514b0f3Smrg# Test for a minimum version of fop, if provided. 1915d514b0f3Smrgm4_ifval([$1], 1916d514b0f3Smrg[if test "$have_fop" = yes; then 1917d514b0f3Smrg # scrape the fop version 1918d514b0f3Smrg AC_MSG_CHECKING([for fop minimum version]) 1919d514b0f3Smrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 1920d514b0f3Smrg AC_MSG_RESULT([$fop_version]) 1921d514b0f3Smrg AS_VERSION_COMPARE([$fop_version], [$1], 1922d514b0f3Smrg [if test "x$use_fop" = xauto; then 1923d514b0f3Smrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 1924d514b0f3Smrg have_fop=no 1925d514b0f3Smrg else 1926d514b0f3Smrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 1927d514b0f3Smrg fi]) 1928d514b0f3Smrgfi]) 1929d514b0f3SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 1930d514b0f3Smrg]) # XORG_WITH_FOP 1931d514b0f3Smrg 1932d514b0f3Smrg# XORG_WITH_M4([MIN-VERSION]) 1933d514b0f3Smrg# --------------------------- 1934d514b0f3Smrg# Minimum version: 1.19.0 1935d514b0f3Smrg# 1936d514b0f3Smrg# This macro attempts to locate an m4 macro processor which supports 1937d514b0f3Smrg# -I option and is only useful for modules relying on M4 in order to 1938d514b0f3Smrg# expand macros in source code files. 1939d514b0f3Smrg# 1940d514b0f3Smrg# Interface to module: 1941d514b0f3Smrg# M4: returns the path of the m4 program found 1942d514b0f3Smrg# returns the path set by the user in the environment 1943d514b0f3Smrg# 1944d514b0f3SmrgAC_DEFUN([XORG_WITH_M4], [ 1945d514b0f3SmrgAC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], 1946d514b0f3Smrg [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], 1947d514b0f3Smrg [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ 1948d514b0f3Smrg ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], 1949d514b0f3Smrg [AC_MSG_ERROR([could not find m4 that supports -I option])], 1950d514b0f3Smrg [$PATH:/usr/gnu/bin])]) 1951d514b0f3Smrg 1952d514b0f3SmrgAC_SUBST([M4], [$ac_cv_path_M4]) 1953d514b0f3Smrg]) # XORG_WITH_M4 1954d514b0f3Smrg 1955d514b0f3Smrg# XORG_WITH_PS2PDF([DEFAULT]) 1956d514b0f3Smrg# ---------------- 1957d514b0f3Smrg# Minimum version: 1.6.0 1958d514b0f3Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1959d514b0f3Smrg# 1960d514b0f3Smrg# Documentation tools are not always available on all platforms and sometimes 1961d514b0f3Smrg# not at the appropriate level. This macro enables a module to test for the 1962d514b0f3Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1963d514b0f3Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 1964d514b0f3Smrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 1965d514b0f3Smrg# --with-ps2pdf assumes 'auto'. 1966d514b0f3Smrg# 1967d514b0f3Smrg# Interface to module: 1968d514b0f3Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 1969d514b0f3Smrg# PS2PDF: returns the path of the ps2pdf program found 1970d514b0f3Smrg# returns the path set by the user in the environment 1971d514b0f3Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 1972d514b0f3Smrg# 'no' user instructs the module not to use ps2pdf 1973d514b0f3Smrg# 1974d514b0f3Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 1975d514b0f3Smrg# 1976d514b0f3SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 1977d514b0f3SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 1978d514b0f3Smrgm4_define([_defopt], m4_default([$1], [auto])) 1979d514b0f3SmrgAC_ARG_WITH(ps2pdf, 1980d514b0f3Smrg AS_HELP_STRING([--with-ps2pdf], 1981d514b0f3Smrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 1982d514b0f3Smrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 1983d514b0f3Smrgm4_undefine([_defopt]) 1984d514b0f3Smrg 1985d514b0f3Smrgif test "x$use_ps2pdf" = x"auto"; then 1986d514b0f3Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 1987d514b0f3Smrg if test "x$PS2PDF" = "x"; then 1988d514b0f3Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 1989d514b0f3Smrg have_ps2pdf=no 1990d514b0f3Smrg else 1991d514b0f3Smrg have_ps2pdf=yes 1992d514b0f3Smrg fi 1993d514b0f3Smrgelif test "x$use_ps2pdf" = x"yes" ; then 1994d514b0f3Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 1995d514b0f3Smrg if test "x$PS2PDF" = "x"; then 1996d514b0f3Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 1997d514b0f3Smrg fi 1998d514b0f3Smrg have_ps2pdf=yes 1999d514b0f3Smrgelif test "x$use_ps2pdf" = x"no" ; then 2000d514b0f3Smrg if test "x$PS2PDF" != "x"; then 2001d514b0f3Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 2002d514b0f3Smrg fi 2003d514b0f3Smrg have_ps2pdf=no 2004d514b0f3Smrgelse 2005d514b0f3Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 2006d514b0f3Smrgfi 2007d514b0f3SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 2008d514b0f3Smrg]) # XORG_WITH_PS2PDF 2009d514b0f3Smrg 2010d514b0f3Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 2011d514b0f3Smrg# ---------------- 2012d514b0f3Smrg# Minimum version: 1.6.0 2013d514b0f3Smrg# 2014d514b0f3Smrg# Documentation tools are not always available on all platforms and sometimes 2015d514b0f3Smrg# not at the appropriate level. This macro enables a builder to skip all 2016d514b0f3Smrg# documentation targets except traditional man pages. 2017d514b0f3Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 2018d514b0f3Smrg# maximum flexibilty in controlling documentation building. 2019d514b0f3Smrg# Refer to: 2020d514b0f3Smrg# XORG_WITH_XMLTO --with-xmlto 2021d514b0f3Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 2022d514b0f3Smrg# XORG_WITH_DOXYGEN --with-doxygen 2023d514b0f3Smrg# XORG_WITH_FOP --with-fop 2024d514b0f3Smrg# XORG_WITH_GROFF --with-groff 2025d514b0f3Smrg# XORG_WITH_PS2PDF --with-ps2pdf 2026d514b0f3Smrg# 2027d514b0f3Smrg# Interface to module: 2028d514b0f3Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 2029d514b0f3Smrg# --enable-docs: 'yes' user instructs the module to generate docs 2030d514b0f3Smrg# 'no' user instructs the module not to generate docs 2031d514b0f3Smrg# parm1: specify the default value, yes or no. 2032d514b0f3Smrg# 2033d514b0f3SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 2034d514b0f3Smrgm4_define([docs_default], m4_default([$1], [yes])) 2035d514b0f3SmrgAC_ARG_ENABLE(docs, 2036d514b0f3Smrg AS_HELP_STRING([--enable-docs], 2037d514b0f3Smrg [Enable building the documentation (default: ]docs_default[)]), 2038d514b0f3Smrg [build_docs=$enableval], [build_docs=]docs_default) 2039d514b0f3Smrgm4_undefine([docs_default]) 2040d514b0f3SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 2041d514b0f3SmrgAC_MSG_CHECKING([whether to build documentation]) 2042d514b0f3SmrgAC_MSG_RESULT([$build_docs]) 2043d514b0f3Smrg]) # XORG_ENABLE_DOCS 2044d514b0f3Smrg 2045d514b0f3Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 2046d514b0f3Smrg# ---------------- 2047d514b0f3Smrg# Minimum version: 1.6.0 2048d514b0f3Smrg# 2049d514b0f3Smrg# This macro enables a builder to skip all developer documentation. 2050d514b0f3Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 2051d514b0f3Smrg# maximum flexibilty in controlling documentation building. 2052d514b0f3Smrg# Refer to: 2053d514b0f3Smrg# XORG_WITH_XMLTO --with-xmlto 2054d514b0f3Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 2055d514b0f3Smrg# XORG_WITH_DOXYGEN --with-doxygen 2056d514b0f3Smrg# XORG_WITH_FOP --with-fop 2057d514b0f3Smrg# XORG_WITH_GROFF --with-groff 2058d514b0f3Smrg# XORG_WITH_PS2PDF --with-ps2pdf 2059d514b0f3Smrg# 2060d514b0f3Smrg# Interface to module: 2061d514b0f3Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 2062d514b0f3Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 2063d514b0f3Smrg# 'no' user instructs the module not to generate developer docs 2064d514b0f3Smrg# parm1: specify the default value, yes or no. 2065d514b0f3Smrg# 2066d514b0f3SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 2067d514b0f3Smrgm4_define([devel_default], m4_default([$1], [yes])) 2068d514b0f3SmrgAC_ARG_ENABLE(devel-docs, 2069d514b0f3Smrg AS_HELP_STRING([--enable-devel-docs], 2070d514b0f3Smrg [Enable building the developer documentation (default: ]devel_default[)]), 2071d514b0f3Smrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 2072d514b0f3Smrgm4_undefine([devel_default]) 2073d514b0f3SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 2074d514b0f3SmrgAC_MSG_CHECKING([whether to build developer documentation]) 2075d514b0f3SmrgAC_MSG_RESULT([$build_devel_docs]) 2076d514b0f3Smrg]) # XORG_ENABLE_DEVEL_DOCS 2077d514b0f3Smrg 2078d514b0f3Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 2079d514b0f3Smrg# ---------------- 2080d514b0f3Smrg# Minimum version: 1.6.0 2081d514b0f3Smrg# 2082d514b0f3Smrg# This macro enables a builder to skip all functional specification targets. 2083d514b0f3Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 2084d514b0f3Smrg# maximum flexibilty in controlling documentation building. 2085d514b0f3Smrg# Refer to: 2086d514b0f3Smrg# XORG_WITH_XMLTO --with-xmlto 2087d514b0f3Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 2088d514b0f3Smrg# XORG_WITH_DOXYGEN --with-doxygen 2089d514b0f3Smrg# XORG_WITH_FOP --with-fop 2090d514b0f3Smrg# XORG_WITH_GROFF --with-groff 2091d514b0f3Smrg# XORG_WITH_PS2PDF --with-ps2pdf 2092d514b0f3Smrg# 2093d514b0f3Smrg# Interface to module: 2094d514b0f3Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 2095d514b0f3Smrg# --enable-specs: 'yes' user instructs the module to generate specs 2096d514b0f3Smrg# 'no' user instructs the module not to generate specs 2097d514b0f3Smrg# parm1: specify the default value, yes or no. 2098d514b0f3Smrg# 2099d514b0f3SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 2100d514b0f3Smrgm4_define([spec_default], m4_default([$1], [yes])) 2101d514b0f3SmrgAC_ARG_ENABLE(specs, 2102d514b0f3Smrg AS_HELP_STRING([--enable-specs], 2103d514b0f3Smrg [Enable building the specs (default: ]spec_default[)]), 2104d514b0f3Smrg [build_specs=$enableval], [build_specs=]spec_default) 2105d514b0f3Smrgm4_undefine([spec_default]) 2106d514b0f3SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 2107d514b0f3SmrgAC_MSG_CHECKING([whether to build functional specifications]) 2108d514b0f3SmrgAC_MSG_RESULT([$build_specs]) 2109d514b0f3Smrg]) # XORG_ENABLE_SPECS 2110d514b0f3Smrg 2111d514b0f3Smrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 2112d514b0f3Smrg# ---------------------------------------------- 2113d514b0f3Smrg# Minimum version: 1.13.0 2114d514b0f3Smrg# 2115d514b0f3Smrg# This macro enables a builder to enable/disable unit testing 2116d514b0f3Smrg# It makes no assumption about the test cases implementation 2117d514b0f3Smrg# Test cases may or may not use Automake "Support for test suites" 2118d514b0f3Smrg# They may or may not use the software utility library GLib 2119d514b0f3Smrg# 2120d514b0f3Smrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 2121d514b0f3Smrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 2122d514b0f3Smrg# The variable enable_unit_tests is used by other macros in this file. 2123d514b0f3Smrg# 2124d514b0f3Smrg# Interface to module: 2125d514b0f3Smrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 2126d514b0f3Smrg# enable_unit_tests: used in configure.ac for additional configuration 2127d514b0f3Smrg# --enable-unit-tests: 'yes' user instructs the module to build tests 2128d514b0f3Smrg# 'no' user instructs the module not to build tests 2129d514b0f3Smrg# parm1: specify the default value, yes or no. 2130d514b0f3Smrg# 2131d514b0f3SmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 2132d514b0f3SmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 2133d514b0f3SmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 2134d514b0f3SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 2135d514b0f3Smrgm4_define([_defopt], m4_default([$1], [auto])) 2136d514b0f3SmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 2137d514b0f3Smrg [Enable building unit test cases (default: ]_defopt[)]), 2138d514b0f3Smrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 2139d514b0f3Smrgm4_undefine([_defopt]) 2140d514b0f3SmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 2141d514b0f3SmrgAC_MSG_CHECKING([whether to build unit test cases]) 2142d514b0f3SmrgAC_MSG_RESULT([$enable_unit_tests]) 2143d514b0f3Smrg]) # XORG_ENABLE_UNIT_TESTS 2144d514b0f3Smrg 2145d514b0f3Smrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 2146d514b0f3Smrg# ------------------------------------------------------ 2147d514b0f3Smrg# Minimum version: 1.17.0 2148d514b0f3Smrg# 2149d514b0f3Smrg# This macro enables a builder to enable/disable integration testing 2150d514b0f3Smrg# It makes no assumption about the test cases' implementation 2151d514b0f3Smrg# Test cases may or may not use Automake "Support for test suites" 2152d514b0f3Smrg# 2153d514b0f3Smrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 2154d514b0f3Smrg# usually requires less dependencies and may be built and run under less 2155d514b0f3Smrg# stringent environments than integration tests. 2156d514b0f3Smrg# 2157d514b0f3Smrg# Interface to module: 2158d514b0f3Smrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 2159d514b0f3Smrg# enable_integration_tests: used in configure.ac for additional configuration 2160d514b0f3Smrg# --enable-integration-tests: 'yes' user instructs the module to build tests 2161d514b0f3Smrg# 'no' user instructs the module not to build tests 2162d514b0f3Smrg# parm1: specify the default value, yes or no. 2163d514b0f3Smrg# 2164d514b0f3SmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 2165d514b0f3SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 2166d514b0f3Smrgm4_define([_defopt], m4_default([$1], [auto])) 2167d514b0f3SmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 2168d514b0f3Smrg [Enable building integration test cases (default: ]_defopt[)]), 2169d514b0f3Smrg [enable_integration_tests=$enableval], 2170d514b0f3Smrg [enable_integration_tests=]_defopt) 2171d514b0f3Smrgm4_undefine([_defopt]) 2172d514b0f3SmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 2173d514b0f3Smrg [test "x$enable_integration_tests" != xno]) 2174d514b0f3SmrgAC_MSG_CHECKING([whether to build unit test cases]) 2175d514b0f3SmrgAC_MSG_RESULT([$enable_integration_tests]) 2176d514b0f3Smrg]) # XORG_ENABLE_INTEGRATION_TESTS 2177d514b0f3Smrg 2178d514b0f3Smrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 2179d514b0f3Smrg# ---------------------------------------- 2180d514b0f3Smrg# Minimum version: 1.13.0 2181d514b0f3Smrg# 2182d514b0f3Smrg# GLib is a library which provides advanced data structures and functions. 2183d514b0f3Smrg# This macro enables a module to test for the presence of Glib. 2184d514b0f3Smrg# 2185d514b0f3Smrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 2186d514b0f3Smrg# Otherwise the value of $enable_unit_tests is blank. 2187d514b0f3Smrg# 2188d514b0f3Smrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 2189d514b0f3Smrg# test support usually requires less dependencies and may be built and run under 2190d514b0f3Smrg# less stringent environments than integration tests. 2191d514b0f3Smrg# 2192d514b0f3Smrg# Interface to module: 2193d514b0f3Smrg# HAVE_GLIB: used in makefiles to conditionally build targets 2194d514b0f3Smrg# with_glib: used in configure.ac to know if GLib has been found 2195d514b0f3Smrg# --with-glib: 'yes' user instructs the module to use glib 2196d514b0f3Smrg# 'no' user instructs the module not to use glib 2197d514b0f3Smrg# 2198d514b0f3SmrgAC_DEFUN([XORG_WITH_GLIB],[ 2199d514b0f3SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 2200d514b0f3Smrgm4_define([_defopt], m4_default([$2], [auto])) 2201d514b0f3SmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 2202d514b0f3Smrg [Use GLib library for unit testing (default: ]_defopt[)]), 2203d514b0f3Smrg [with_glib=$withval], [with_glib=]_defopt) 2204d514b0f3Smrgm4_undefine([_defopt]) 2205d514b0f3Smrg 2206d514b0f3Smrghave_glib=no 2207d514b0f3Smrg# Do not probe GLib if user explicitly disabled unit testing 2208d514b0f3Smrgif test "x$enable_unit_tests" != x"no"; then 2209d514b0f3Smrg # Do not probe GLib if user explicitly disabled it 2210d514b0f3Smrg if test "x$with_glib" != x"no"; then 2211d514b0f3Smrg m4_ifval( 2212d514b0f3Smrg [$1], 2213d514b0f3Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 2214d514b0f3Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 2215d514b0f3Smrg ) 2216d514b0f3Smrg fi 2217d514b0f3Smrgfi 2218d514b0f3Smrg 2219d514b0f3Smrg# Not having GLib when unit testing has been explicitly requested is an error 2220d514b0f3Smrgif test "x$enable_unit_tests" = x"yes"; then 2221d514b0f3Smrg if test "x$have_glib" = x"no"; then 2222d514b0f3Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 2223d514b0f3Smrg fi 2224d514b0f3Smrgfi 2225d514b0f3Smrg 2226d514b0f3Smrg# Having unit testing disabled when GLib has been explicitly requested is an error 2227d514b0f3Smrgif test "x$enable_unit_tests" = x"no"; then 2228d514b0f3Smrg if test "x$with_glib" = x"yes"; then 2229d514b0f3Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 2230d514b0f3Smrg fi 2231d514b0f3Smrgfi 2232d514b0f3Smrg 2233d514b0f3Smrg# Not having GLib when it has been explicitly requested is an error 2234d514b0f3Smrgif test "x$with_glib" = x"yes"; then 2235d514b0f3Smrg if test "x$have_glib" = x"no"; then 2236d514b0f3Smrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 2237d514b0f3Smrg fi 2238d514b0f3Smrgfi 2239d514b0f3Smrg 2240d514b0f3SmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 2241d514b0f3Smrg]) # XORG_WITH_GLIB 2242d514b0f3Smrg 2243d514b0f3Smrg# XORG_LD_WRAP([required|optional]) 2244d514b0f3Smrg# --------------------------------- 2245d514b0f3Smrg# Minimum version: 1.13.0 2246d514b0f3Smrg# 2247d514b0f3Smrg# Check if linker supports -wrap, passed via compiler flags 2248d514b0f3Smrg# 2249d514b0f3Smrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 2250d514b0f3Smrg# Otherwise the value of $enable_unit_tests is blank. 2251d514b0f3Smrg# 2252d514b0f3Smrg# Argument added in 1.16.0 - default is "required", to match existing behavior 2253d514b0f3Smrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 2254d514b0f3Smrg# available, an argument of "optional" allows use when some unit tests require 2255d514b0f3Smrg# ld -wrap and others do not. 2256d514b0f3Smrg# 2257d514b0f3SmrgAC_DEFUN([XORG_LD_WRAP],[ 2258d514b0f3SmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 2259d514b0f3Smrg [AC_LANG_PROGRAM([#include <stdlib.h> 2260d514b0f3Smrg void __wrap_exit(int status) { return; }], 2261d514b0f3Smrg [exit(0);])]) 2262d514b0f3Smrg# Not having ld wrap when unit testing has been explicitly requested is an error 2263d514b0f3Smrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 2264d514b0f3Smrg if test "x$have_ld_wrap" = x"no"; then 2265d514b0f3Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 2266d514b0f3Smrg fi 2267d514b0f3Smrgfi 2268d514b0f3SmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 2269d514b0f3Smrg# 2270d514b0f3Smrg]) # XORG_LD_WRAP 2271d514b0f3Smrg 2272d514b0f3Smrg# XORG_CHECK_LINKER_FLAGS 2273d514b0f3Smrg# ----------------------- 2274d514b0f3Smrg# SYNOPSIS 2275d514b0f3Smrg# 2276d514b0f3Smrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 2277d514b0f3Smrg# 2278d514b0f3Smrg# DESCRIPTION 2279d514b0f3Smrg# 2280d514b0f3Smrg# Check whether the given linker FLAGS work with the current language's 2281d514b0f3Smrg# linker, or whether they give an error. 2282d514b0f3Smrg# 2283d514b0f3Smrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 2284d514b0f3Smrg# success/failure. 2285d514b0f3Smrg# 2286d514b0f3Smrg# PROGRAM-SOURCE is the program source to link with, if needed 2287d514b0f3Smrg# 2288d514b0f3Smrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 2289d514b0f3Smrg# 2290d514b0f3Smrg# LICENSE 2291d514b0f3Smrg# 2292d514b0f3Smrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 2293d514b0f3Smrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 2294d514b0f3Smrg# Copyright (c) 2009 Matteo Frigo 2295d514b0f3Smrg# 2296d514b0f3Smrg# This program is free software: you can redistribute it and/or modify it 2297d514b0f3Smrg# under the terms of the GNU General Public License as published by the 2298d514b0f3Smrg# Free Software Foundation, either version 3 of the License, or (at your 2299d514b0f3Smrg# option) any later version. 2300d514b0f3Smrg# 2301d514b0f3Smrg# This program is distributed in the hope that it will be useful, but 2302d514b0f3Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 2303d514b0f3Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 2304d514b0f3Smrg# Public License for more details. 2305d514b0f3Smrg# 2306d514b0f3Smrg# You should have received a copy of the GNU General Public License along 2307d514b0f3Smrg# with this program. If not, see <http://www.gnu.org/licenses/>. 2308d514b0f3Smrg# 2309d514b0f3Smrg# As a special exception, the respective Autoconf Macro's copyright owner 2310d514b0f3Smrg# gives unlimited permission to copy, distribute and modify the configure 2311d514b0f3Smrg# scripts that are the output of Autoconf when processing the Macro. You 2312d514b0f3Smrg# need not follow the terms of the GNU General Public License when using 2313d514b0f3Smrg# or distributing such scripts, even though portions of the text of the 2314d514b0f3Smrg# Macro appear in them. The GNU General Public License (GPL) does govern 2315d514b0f3Smrg# all other use of the material that constitutes the Autoconf Macro. 2316d514b0f3Smrg# 2317d514b0f3Smrg# This special exception to the GPL applies to versions of the Autoconf 2318d514b0f3Smrg# Macro released by the Autoconf Archive. When you make and distribute a 2319d514b0f3Smrg# modified version of the Autoconf Macro, you may extend this special 2320d514b0f3Smrg# exception to the GPL to apply to your modified version as well.# 2321d514b0f3SmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 2322d514b0f3Smrg[AC_MSG_CHECKING([whether the linker accepts $1]) 2323d514b0f3Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 2324d514b0f3SmrgAS_LITERAL_IF([$1], 2325d514b0f3Smrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 2326d514b0f3Smrg ax_save_FLAGS=$LDFLAGS 2327d514b0f3Smrg LDFLAGS="$1" 2328d514b0f3Smrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 2329d514b0f3Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 2330d514b0f3Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 2331d514b0f3Smrg LDFLAGS=$ax_save_FLAGS])], 2332d514b0f3Smrg [ax_save_FLAGS=$LDFLAGS 2333d514b0f3Smrg LDFLAGS="$1" 2334d514b0f3Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 2335d514b0f3Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 2336d514b0f3Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 2337d514b0f3Smrg LDFLAGS=$ax_save_FLAGS]) 2338d514b0f3Smrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 2339d514b0f3SmrgAC_MSG_RESULT($xorg_check_linker_flags) 2340d514b0f3Smrgif test "x$xorg_check_linker_flags" = xyes; then 2341d514b0f3Smrg m4_default([$2], :) 2342d514b0f3Smrgelse 2343d514b0f3Smrg m4_default([$3], :) 2344d514b0f3Smrgfi 2345d514b0f3Smrg]) # XORG_CHECK_LINKER_FLAGS 2346d514b0f3Smrg 2347d514b0f3Smrg# XORG_MEMORY_CHECK_FLAGS 2348d514b0f3Smrg# ----------------------- 2349d514b0f3Smrg# Minimum version: 1.16.0 2350d514b0f3Smrg# 2351d514b0f3Smrg# This macro attempts to find appropriate memory checking functionality 2352d514b0f3Smrg# for various platforms which unit testing code may use to catch various 2353d514b0f3Smrg# forms of memory allocation and access errors in testing. 2354d514b0f3Smrg# 2355d514b0f3Smrg# Interface to module: 2356d514b0f3Smrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 2357d514b0f3Smrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 2358d514b0f3Smrg# 2359d514b0f3Smrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 2360d514b0f3Smrg# 2361d514b0f3SmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 2362d514b0f3Smrg 2363d514b0f3SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 2364d514b0f3SmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 2365d514b0f3Smrg [Environment variables to enable memory checking in tests]) 2366d514b0f3Smrg 2367d514b0f3Smrg# Check for different types of support on different platforms 2368d514b0f3Smrgcase $host_os in 2369d514b0f3Smrg solaris*) 2370d514b0f3Smrg AC_CHECK_LIB([umem], [umem_alloc], 2371d514b0f3Smrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 2372d514b0f3Smrg ;; 2373d514b0f3Smrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 2374d514b0f3Smrg # both directly and inverted, so should not be 0 or 255. 2375d514b0f3Smrg malloc_debug_env='MALLOC_PERTURB_=15' 2376d514b0f3Smrg ;; 2377d514b0f3Smrg darwin*) 2378d514b0f3Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 2379d514b0f3Smrg ;; 2380d514b0f3Smrg *bsd*) 2381d514b0f3Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 2382d514b0f3Smrg ;; 2383d514b0f3Smrgesac 2384d514b0f3Smrg 2385d514b0f3Smrg# User supplied flags override default flags 2386d514b0f3Smrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 2387d514b0f3Smrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 2388d514b0f3Smrgfi 2389d514b0f3Smrg 2390d514b0f3SmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 2391d514b0f3Smrg]) # XORG_WITH_LINT 2392d514b0f3Smrg 2393d514b0f3Smrg# XORG_CHECK_MALLOC_ZERO 2394d514b0f3Smrg# ---------------------- 2395d514b0f3Smrg# Minimum version: 1.0.0 2396d514b0f3Smrg# 2397d514b0f3Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 2398d514b0f3Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 2399d514b0f3Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 2400d514b0f3SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 2401d514b0f3SmrgAC_ARG_ENABLE(malloc0returnsnull, 2402d514b0f3Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 2403d514b0f3Smrg [malloc(0) returns NULL (default: auto)]), 2404d514b0f3Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 2405d514b0f3Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 2406d514b0f3Smrg 2407d514b0f3SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 2408d514b0f3Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 2409d514b0f3SmrgAC_CACHE_VAL([xorg_cv_malloc0_returns_null], 2410d514b0f3Smrg [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 2411d514b0f3Smrg#include <stdlib.h> 2412d514b0f3Smrg],[ 2413d514b0f3Smrg char *m0, *r0, *c0, *p; 2414d514b0f3Smrg m0 = malloc(0); 2415d514b0f3Smrg p = malloc(10); 2416d514b0f3Smrg r0 = realloc(p,0); 2417d514b0f3Smrg c0 = calloc(0,10); 2418d514b0f3Smrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 2419d514b0f3Smrg])], 2420d514b0f3Smrg [xorg_cv_malloc0_returns_null=yes], 2421d514b0f3Smrg [xorg_cv_malloc0_returns_null=no])]) 2422d514b0f3SmrgMALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 2423d514b0f3Smrgfi 2424d514b0f3SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 2425d514b0f3Smrg 2426d514b0f3Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 2427d514b0f3Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 2428d514b0f3Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 2429d514b0f3Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 2430d514b0f3Smrgelse 2431d514b0f3Smrg MALLOC_ZERO_CFLAGS="" 2432d514b0f3Smrg XMALLOC_ZERO_CFLAGS="" 2433d514b0f3Smrg XTMALLOC_ZERO_CFLAGS="" 2434d514b0f3Smrgfi 2435d514b0f3Smrg 2436d514b0f3SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 2437d514b0f3SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 2438d514b0f3SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 2439d514b0f3Smrg]) # XORG_CHECK_MALLOC_ZERO 2440d514b0f3Smrg 2441d514b0f3Smrg# XORG_WITH_LINT() 2442d514b0f3Smrg# ---------------- 2443d514b0f3Smrg# Minimum version: 1.1.0 2444d514b0f3Smrg# 2445d514b0f3Smrg# This macro enables the use of a tool that flags some suspicious and 2446d514b0f3Smrg# non-portable constructs (likely to be bugs) in C language source code. 2447d514b0f3Smrg# It will attempt to locate the tool and use appropriate options. 2448d514b0f3Smrg# There are various lint type tools on different platforms. 2449d514b0f3Smrg# 2450d514b0f3Smrg# Interface to module: 2451d514b0f3Smrg# LINT: returns the path to the tool found on the platform 2452d514b0f3Smrg# or the value set to LINT on the configure cmd line 2453d514b0f3Smrg# also an Automake conditional 2454d514b0f3Smrg# LINT_FLAGS: an Automake variable with appropriate flags 2455d514b0f3Smrg# 2456d514b0f3Smrg# --with-lint: 'yes' user instructs the module to use lint 2457d514b0f3Smrg# 'no' user instructs the module not to use lint (default) 2458d514b0f3Smrg# 2459d514b0f3Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 2460d514b0f3Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 2461d514b0f3Smrg# 2462d514b0f3SmrgAC_DEFUN([XORG_WITH_LINT],[ 2463d514b0f3Smrg 2464d514b0f3SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 2465d514b0f3SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 2466d514b0f3SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 2467d514b0f3Smrg [Use a lint-style source code checker (default: disabled)])], 2468d514b0f3Smrg [use_lint=$withval], [use_lint=no]) 2469d514b0f3Smrg 2470d514b0f3Smrg# Obtain platform specific info like program name and options 2471d514b0f3Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 2472d514b0f3Smrgcase $host_os in 2473d514b0f3Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 2474d514b0f3Smrg lint_name=splint 2475d514b0f3Smrg lint_options="-badflag" 2476d514b0f3Smrg ;; 2477d514b0f3Smrg *freebsd* | *netbsd*) 2478d514b0f3Smrg lint_name=lint 2479d514b0f3Smrg lint_options="-u -b" 2480d514b0f3Smrg ;; 2481d514b0f3Smrg *solaris*) 2482d514b0f3Smrg lint_name=lint 2483d514b0f3Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 2484d514b0f3Smrg ;; 2485d514b0f3Smrgesac 2486d514b0f3Smrg 2487d514b0f3Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 2488d514b0f3Smrgif test "x$use_lint" = x"yes" ; then 2489d514b0f3Smrg AC_PATH_PROG([LINT], [$lint_name]) 2490d514b0f3Smrg if test "x$LINT" = "x"; then 2491d514b0f3Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 2492d514b0f3Smrg fi 2493d514b0f3Smrgelif test "x$use_lint" = x"no" ; then 2494d514b0f3Smrg if test "x$LINT" != "x"; then 2495d514b0f3Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 2496d514b0f3Smrg fi 2497d514b0f3Smrgelse 2498d514b0f3Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 2499d514b0f3Smrgfi 2500d514b0f3Smrg 2501d514b0f3Smrg# User supplied flags override default flags 2502d514b0f3Smrgif test "x$LINT_FLAGS" != "x"; then 2503d514b0f3Smrg lint_options=$LINT_FLAGS 2504d514b0f3Smrgfi 2505d514b0f3Smrg 2506d514b0f3SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 2507d514b0f3SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 2508d514b0f3Smrg 2509d514b0f3Smrg]) # XORG_WITH_LINT 2510d514b0f3Smrg 2511d514b0f3Smrg# XORG_LINT_LIBRARY(LIBNAME) 2512d514b0f3Smrg# -------------------------- 2513d514b0f3Smrg# Minimum version: 1.1.0 2514d514b0f3Smrg# 2515d514b0f3Smrg# Sets up flags for building lint libraries for checking programs that call 2516d514b0f3Smrg# functions in the library. 2517d514b0f3Smrg# 2518d514b0f3Smrg# Interface to module: 2519d514b0f3Smrg# LINTLIB - Automake variable with the name of lint library file to make 2520d514b0f3Smrg# MAKE_LINT_LIB - Automake conditional 2521d514b0f3Smrg# 2522d514b0f3Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 2523d514b0f3Smrg# - 'no' user instructs the module not to create a lint library (default) 2524d514b0f3Smrg 2525d514b0f3SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 2526d514b0f3SmrgAC_REQUIRE([XORG_WITH_LINT]) 2527d514b0f3SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 2528d514b0f3Smrg [Create lint library (default: disabled)])], 2529d514b0f3Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 2530d514b0f3Smrg 2531d514b0f3Smrgif test "x$make_lint_lib" = x"yes" ; then 2532d514b0f3Smrg LINTLIB=llib-l$1.ln 2533d514b0f3Smrg if test "x$LINT" = "x"; then 2534d514b0f3Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 2535d514b0f3Smrg fi 2536d514b0f3Smrgelif test "x$make_lint_lib" != x"no" ; then 2537d514b0f3Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 2538d514b0f3Smrgfi 2539d514b0f3Smrg 2540d514b0f3SmrgAC_SUBST(LINTLIB) 2541d514b0f3SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 2542d514b0f3Smrg 2543d514b0f3Smrg]) # XORG_LINT_LIBRARY 2544d514b0f3Smrg 2545d514b0f3Smrg# XORG_COMPILER_BRAND 2546d514b0f3Smrg# ------------------- 2547d514b0f3Smrg# Minimum version: 1.14.0 2548d514b0f3Smrg# 2549d514b0f3Smrg# Checks for various brands of compilers and sets flags as appropriate: 2550d514b0f3Smrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 2551d514b0f3Smrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 2552d514b0f3Smrg# clang compiler - sets CLANGCC to "yes" 2553d514b0f3Smrg# Intel compiler - sets INTELCC to "yes" 2554d514b0f3Smrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 2555d514b0f3Smrg# 2556d514b0f3SmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 2557d514b0f3SmrgAC_LANG_CASE( 2558d514b0f3Smrg [C], [ 2559d514b0f3Smrg AC_REQUIRE([AC_PROG_CC_C99]) 2560d514b0f3Smrg ], 2561d514b0f3Smrg [C++], [ 2562d514b0f3Smrg AC_REQUIRE([AC_PROG_CXX]) 2563d514b0f3Smrg ] 2564d514b0f3Smrg) 2565d514b0f3SmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 2566d514b0f3SmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 2567d514b0f3SmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 2568d514b0f3Smrg]) # XORG_COMPILER_BRAND 2569d514b0f3Smrg 2570d514b0f3Smrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 2571d514b0f3Smrg# --------------- 2572d514b0f3Smrg# Minimum version: 1.16.0 2573d514b0f3Smrg# 2574d514b0f3Smrg# Test if the compiler works when passed the given flag as a command line argument. 2575d514b0f3Smrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 2576d514b0f3Smrg# next flag in the list until there are no more options. 2577d514b0f3Smrg# 2578d514b0f3Smrg# Note that this does not guarantee that the compiler supports the flag as some 2579d514b0f3Smrg# compilers will simply ignore arguments that they do not understand, but we do 2580d514b0f3Smrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 2581d514b0f3Smrg# -Werror=unused-command-line-argument 2582d514b0f3Smrg# 2583d514b0f3SmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 2584d514b0f3Smrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 2585d514b0f3Smrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 2586d514b0f3Smrg 2587d514b0f3SmrgAC_LANG_COMPILER_REQUIRE 2588d514b0f3Smrg 2589d514b0f3SmrgAC_LANG_CASE( 2590d514b0f3Smrg [C], [ 2591d514b0f3Smrg AC_REQUIRE([AC_PROG_CC_C99]) 2592d514b0f3Smrg define([PREFIX], [C]) 2593d514b0f3Smrg define([CACHE_PREFIX], [cc]) 2594d514b0f3Smrg define([COMPILER], [$CC]) 2595d514b0f3Smrg ], 2596d514b0f3Smrg [C++], [ 2597d514b0f3Smrg define([PREFIX], [CXX]) 2598d514b0f3Smrg define([CACHE_PREFIX], [cxx]) 2599d514b0f3Smrg define([COMPILER], [$CXX]) 2600d514b0f3Smrg ] 2601d514b0f3Smrg) 2602d514b0f3Smrg 2603d514b0f3Smrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 2604d514b0f3Smrg 2605d514b0f3Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 2606d514b0f3Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 2607d514b0f3Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 2608d514b0f3Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 2609d514b0f3Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 2610d514b0f3Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 2611d514b0f3Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 2612d514b0f3Smrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 2613d514b0f3Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 2614d514b0f3Smrgfi 2615d514b0f3Smrg 2616d514b0f3Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 2617d514b0f3Smrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 2618d514b0f3Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 2619d514b0f3Smrg fi 2620d514b0f3Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 2621d514b0f3Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 2622d514b0f3Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 2623d514b0f3Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 2624d514b0f3Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 2625d514b0f3Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 2626d514b0f3Smrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 2627d514b0f3Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 2628d514b0f3Smrgfi 2629d514b0f3Smrg 2630d514b0f3Smrgfound="no" 2631d514b0f3Smrgm4_foreach([flag], m4_cdr($@), [ 2632d514b0f3Smrg if test $found = "no" ; then 2633d514b0f3Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 2634d514b0f3Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 2635d514b0f3Smrg fi 2636d514b0f3Smrg 2637d514b0f3Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 2638d514b0f3Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 2639d514b0f3Smrg fi 2640d514b0f3Smrg 2641d514b0f3Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 2642d514b0f3Smrg 2643d514b0f3Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 2644d514b0f3Smrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 2645d514b0f3Smrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 2646d514b0f3Smrg AC_CACHE_VAL($cacheid, 2647d514b0f3Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 2648d514b0f3Smrg [eval $cacheid=yes], 2649d514b0f3Smrg [eval $cacheid=no])]) 2650d514b0f3Smrg 2651d514b0f3Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 2652d514b0f3Smrg 2653d514b0f3Smrg eval supported=\$$cacheid 2654d514b0f3Smrg AC_MSG_RESULT([$supported]) 2655d514b0f3Smrg if test "$supported" = "yes" ; then 2656d514b0f3Smrg $1="$$1 ]flag[" 2657d514b0f3Smrg found="yes" 2658d514b0f3Smrg fi 2659d514b0f3Smrg fi 2660d514b0f3Smrg]) 2661d514b0f3Smrg]) # XORG_TESTSET_CFLAG 2662d514b0f3Smrg 2663d514b0f3Smrg# XORG_COMPILER_FLAGS 2664d514b0f3Smrg# --------------- 2665d514b0f3Smrg# Minimum version: 1.16.0 2666d514b0f3Smrg# 2667d514b0f3Smrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 2668d514b0f3Smrg# arguments supported by the selected compiler which do NOT alter the generated 2669d514b0f3Smrg# code. These arguments will cause the compiler to print various warnings 2670d514b0f3Smrg# during compilation AND turn a conservative set of warnings into errors. 2671d514b0f3Smrg# 2672d514b0f3Smrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 2673d514b0f3Smrg# future versions of util-macros as options are added to new compilers. 2674d514b0f3Smrg# 2675d514b0f3SmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 2676d514b0f3SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 2677d514b0f3Smrg 2678d514b0f3SmrgAC_ARG_ENABLE(selective-werror, 2679d514b0f3Smrg AS_HELP_STRING([--disable-selective-werror], 2680d514b0f3Smrg [Turn off selective compiler errors. (default: enabled)]), 2681d514b0f3Smrg [SELECTIVE_WERROR=$enableval], 2682d514b0f3Smrg [SELECTIVE_WERROR=yes]) 2683d514b0f3Smrg 2684d514b0f3SmrgAC_LANG_CASE( 2685d514b0f3Smrg [C], [ 2686d514b0f3Smrg define([PREFIX], [C]) 2687d514b0f3Smrg ], 2688d514b0f3Smrg [C++], [ 2689d514b0f3Smrg define([PREFIX], [CXX]) 2690d514b0f3Smrg ] 2691d514b0f3Smrg) 2692d514b0f3Smrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 2693d514b0f3Smrgif test "x$SUNCC" = "xyes"; then 2694d514b0f3Smrg [BASE_]PREFIX[FLAGS]="-v" 2695d514b0f3Smrgelse 2696d514b0f3Smrg [BASE_]PREFIX[FLAGS]="" 2697d514b0f3Smrgfi 2698d514b0f3Smrg 2699d514b0f3Smrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 2700d514b0f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 2701d514b0f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 2702d514b0f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 2703d514b0f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 2704d514b0f3Smrg 2705d514b0f3SmrgAC_LANG_CASE( 2706d514b0f3Smrg [C], [ 2707d514b0f3Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 2708d514b0f3Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 2709d514b0f3Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 2710d514b0f3Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 2711d514b0f3Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 2712d514b0f3Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 2713d514b0f3Smrg ] 2714d514b0f3Smrg) 2715d514b0f3Smrg 2716d514b0f3Smrg# This chunk adds additional warnings that could catch undesired effects. 2717d514b0f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 2718d514b0f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 2719d514b0f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 2720d514b0f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 2721d514b0f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 2722d514b0f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 2723d514b0f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 2724d514b0f3Smrg 2725d514b0f3Smrg# These are currently disabled because they are noisy. They will be enabled 2726d514b0f3Smrg# in the future once the codebase is sufficiently modernized to silence 2727d514b0f3Smrg# them. For now, I don't want them to drown out the other warnings. 2728d514b0f3Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 2729d514b0f3Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 2730d514b0f3Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 2731d514b0f3Smrg 2732d514b0f3Smrg# Turn some warnings into errors, so we don't accidently get successful builds 2733d514b0f3Smrg# when there are problems that should be fixed. 2734d514b0f3Smrg 2735d514b0f3Smrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 2736d514b0f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 2737d514b0f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 2738d514b0f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 2739d514b0f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 2740d514b0f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 2741d514b0f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 2742d514b0f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 2743d514b0f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 2744d514b0f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 2745d514b0f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 2746d514b0f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 2747d514b0f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 2748d514b0f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 2749d514b0f3Smrgelse 2750d514b0f3SmrgAC_MSG_WARN([You have chosen not to turn some select compiler warnings into errors. This should not be necessary. Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT]) 2751d514b0f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 2752d514b0f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 2753d514b0f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 2754d514b0f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 2755d514b0f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 2756d514b0f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 2757d514b0f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 2758d514b0f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 2759d514b0f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 2760d514b0f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 2761d514b0f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 2762d514b0f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 2763d514b0f3SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 2764d514b0f3Smrgfi 2765d514b0f3Smrg 2766d514b0f3SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 2767d514b0f3Smrg]) # XORG_COMPILER_FLAGS 2768d514b0f3Smrg 2769d514b0f3Smrg# XORG_CWARNFLAGS 2770d514b0f3Smrg# --------------- 2771d514b0f3Smrg# Minimum version: 1.2.0 2772d514b0f3Smrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 2773d514b0f3Smrg# 2774d514b0f3Smrg# Defines CWARNFLAGS to enable C compiler warnings. 2775d514b0f3Smrg# 2776d514b0f3Smrg# This function is deprecated because it defines -fno-strict-aliasing 2777d514b0f3Smrg# which alters the code generated by the compiler. If -fno-strict-aliasing 2778d514b0f3Smrg# is needed, then it should be added explicitly in the module when 2779d514b0f3Smrg# it is updated to use BASE_CFLAGS. 2780d514b0f3Smrg# 2781d514b0f3SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 2782d514b0f3SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 2783d514b0f3SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 2784d514b0f3SmrgAC_LANG_CASE( 2785d514b0f3Smrg [C], [ 2786d514b0f3Smrg CWARNFLAGS="$BASE_CFLAGS" 2787d514b0f3Smrg if test "x$GCC" = xyes ; then 2788d514b0f3Smrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 2789d514b0f3Smrg fi 2790d514b0f3Smrg AC_SUBST(CWARNFLAGS) 2791d514b0f3Smrg ] 2792d514b0f3Smrg) 2793d514b0f3Smrg]) # XORG_CWARNFLAGS 2794d514b0f3Smrg 2795d514b0f3Smrg# XORG_STRICT_OPTION 2796d514b0f3Smrg# ----------------------- 2797d514b0f3Smrg# Minimum version: 1.3.0 2798d514b0f3Smrg# 2799d514b0f3Smrg# Add configure option to enable strict compilation flags, such as treating 2800d514b0f3Smrg# warnings as fatal errors. 2801d514b0f3Smrg# If --enable-strict-compilation is passed to configure, adds strict flags to 2802d514b0f3Smrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 2803d514b0f3Smrg# 2804d514b0f3Smrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 2805d514b0f3Smrg# when strict compilation is unconditionally desired. 2806d514b0f3SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 2807d514b0f3SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 2808d514b0f3SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 2809d514b0f3Smrg 2810d514b0f3SmrgAC_ARG_ENABLE(strict-compilation, 2811d514b0f3Smrg AS_HELP_STRING([--enable-strict-compilation], 2812d514b0f3Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 2813d514b0f3Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 2814d514b0f3Smrg 2815d514b0f3SmrgAC_LANG_CASE( 2816d514b0f3Smrg [C], [ 2817d514b0f3Smrg define([PREFIX], [C]) 2818d514b0f3Smrg ], 2819d514b0f3Smrg [C++], [ 2820d514b0f3Smrg define([PREFIX], [CXX]) 2821d514b0f3Smrg ] 2822d514b0f3Smrg) 2823d514b0f3Smrg 2824d514b0f3Smrg[STRICT_]PREFIX[FLAGS]="" 2825d514b0f3SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 2826d514b0f3SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 2827d514b0f3Smrg 2828d514b0f3Smrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 2829d514b0f3Smrg# activate it with -Werror, so we add it here explicitly. 2830d514b0f3SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 2831d514b0f3Smrg 2832d514b0f3Smrgif test "x$STRICT_COMPILE" = "xyes"; then 2833d514b0f3Smrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 2834d514b0f3Smrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 2835d514b0f3Smrgfi 2836d514b0f3SmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 2837d514b0f3SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 2838d514b0f3SmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 2839d514b0f3Smrg]) # XORG_STRICT_OPTION 2840d514b0f3Smrg 2841d514b0f3Smrg# XORG_DEFAULT_OPTIONS 2842d514b0f3Smrg# -------------------- 2843d514b0f3Smrg# Minimum version: 1.3.0 2844d514b0f3Smrg# 2845d514b0f3Smrg# Defines default options for X.Org modules. 2846d514b0f3Smrg# 2847d514b0f3SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 2848d514b0f3SmrgAC_REQUIRE([AC_PROG_INSTALL]) 2849d514b0f3SmrgXORG_COMPILER_FLAGS 2850d514b0f3SmrgXORG_CWARNFLAGS 2851d514b0f3SmrgXORG_STRICT_OPTION 2852d514b0f3SmrgXORG_RELEASE_VERSION 2853d514b0f3SmrgXORG_CHANGELOG 2854d514b0f3SmrgXORG_INSTALL 2855d514b0f3SmrgXORG_MANPAGE_SECTIONS 2856d514b0f3Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 2857d514b0f3Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 2858d514b0f3Smrg]) # XORG_DEFAULT_OPTIONS 2859d514b0f3Smrg 2860d514b0f3Smrg# XORG_INSTALL() 2861d514b0f3Smrg# ---------------- 2862d514b0f3Smrg# Minimum version: 1.4.0 2863d514b0f3Smrg# 2864d514b0f3Smrg# Defines the variable INSTALL_CMD as the command to copy 2865d514b0f3Smrg# INSTALL from $prefix/share/util-macros. 2866d514b0f3Smrg# 2867d514b0f3SmrgAC_DEFUN([XORG_INSTALL], [ 2868d514b0f3SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 2869d514b0f3Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 2870d514b0f3SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 2871d514b0f3Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 2872d514b0f3Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; test -e \$(top_srcdir)/INSTALL || ( \ 2873d514b0f3Smrgtouch \$(top_srcdir)/INSTALL; \ 2874d514b0f3Smrgecho 'failed to copy INSTALL from util-macros: installing empty INSTALL.' >&2))" 2875d514b0f3SmrgAC_SUBST([INSTALL_CMD]) 2876d514b0f3Smrg]) # XORG_INSTALL 2877d514b0f3Smrgdnl Copyright 2005 Red Hat, Inc 2878d514b0f3Smrgdnl 2879d514b0f3Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 2880d514b0f3Smrgdnl documentation for any purpose is hereby granted without fee, provided that 2881d514b0f3Smrgdnl the above copyright notice appear in all copies and that both that 2882d514b0f3Smrgdnl copyright notice and this permission notice appear in supporting 2883d514b0f3Smrgdnl documentation. 2884d514b0f3Smrgdnl 2885d514b0f3Smrgdnl The above copyright notice and this permission notice shall be included 2886d514b0f3Smrgdnl in all copies or substantial portions of the Software. 2887d514b0f3Smrgdnl 2888d514b0f3Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 2889d514b0f3Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 2890d514b0f3Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 2891d514b0f3Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 2892d514b0f3Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 2893d514b0f3Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 2894d514b0f3Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 2895d514b0f3Smrgdnl 2896d514b0f3Smrgdnl Except as contained in this notice, the name of the copyright holders shall 2897d514b0f3Smrgdnl not be used in advertising or otherwise to promote the sale, use or 2898d514b0f3Smrgdnl other dealings in this Software without prior written authorization 2899d514b0f3Smrgdnl from the copyright holders. 2900d514b0f3Smrgdnl 2901d514b0f3Smrg 2902d514b0f3Smrg# XORG_RELEASE_VERSION 2903d514b0f3Smrg# -------------------- 2904d514b0f3Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 2905d514b0f3Smrg 2906d514b0f3SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 2907d514b0f3Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 2908d514b0f3Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 2909d514b0f3Smrg [Major version of this package]) 2910d514b0f3Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 2911d514b0f3Smrg if test "x$PVM" = "x"; then 2912d514b0f3Smrg PVM="0" 2913d514b0f3Smrg fi 2914d514b0f3Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 2915d514b0f3Smrg [$PVM], 2916d514b0f3Smrg [Minor version of this package]) 2917d514b0f3Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 2918d514b0f3Smrg if test "x$PVP" = "x"; then 2919d514b0f3Smrg PVP="0" 2920d514b0f3Smrg fi 2921d514b0f3Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 2922d514b0f3Smrg [$PVP], 2923d514b0f3Smrg [Patch version of this package]) 2924d514b0f3Smrg]) 2925d514b0f3Smrg 2926d514b0f3Smrg# XORG_CHANGELOG() 2927d514b0f3Smrg# ---------------- 2928d514b0f3Smrg# Minimum version: 1.2.0 2929d514b0f3Smrg# 2930d514b0f3Smrg# Defines the variable CHANGELOG_CMD as the command to generate 2931d514b0f3Smrg# ChangeLog from git. 2932d514b0f3Smrg# 2933d514b0f3Smrg# 2934d514b0f3SmrgAC_DEFUN([XORG_CHANGELOG], [ 2935d514b0f3SmrgCHANGELOG_CMD="((GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp) 2>/dev/null && \ 2936d514b0f3Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 2937d514b0f3Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \ 2938d514b0f3Smrgtouch \$(top_srcdir)/ChangeLog; \ 2939d514b0f3Smrgecho 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))" 2940d514b0f3SmrgAC_SUBST([CHANGELOG_CMD]) 2941d514b0f3Smrg]) # XORG_CHANGELOG 2942d514b0f3Smrg 2943d514b0f3Smrg# Copyright (C) 2002-2021 Free Software Foundation, Inc. 2944d514b0f3Smrg# 2945d514b0f3Smrg# This file is free software; the Free Software Foundation 2946d514b0f3Smrg# gives unlimited permission to copy and/or distribute it, 2947d514b0f3Smrg# with or without modifications, as long as this notice is preserved. 2948d514b0f3Smrg 2949d514b0f3Smrg# AM_AUTOMAKE_VERSION(VERSION) 2950d514b0f3Smrg# ---------------------------- 2951d514b0f3Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 2952d514b0f3Smrg# generated from the m4 files accompanying Automake X.Y. 2953d514b0f3Smrg# (This private macro should not be called outside this file.) 2954d514b0f3SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 2955d514b0f3Smrg[am__api_version='1.16' 2956d514b0f3Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 2957d514b0f3Smrgdnl require some minimum version. Point them to the right macro. 2958d514b0f3Smrgm4_if([$1], [1.16.5], [], 2959d514b0f3Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 2960d514b0f3Smrg]) 2961d514b0f3Smrg 2962d514b0f3Smrg# _AM_AUTOCONF_VERSION(VERSION) 2963d514b0f3Smrg# ----------------------------- 2964d514b0f3Smrg# aclocal traces this macro to find the Autoconf version. 2965d514b0f3Smrg# This is a private macro too. Using m4_define simplifies 2966d514b0f3Smrg# the logic in aclocal, which can simply ignore this definition. 2967d514b0f3Smrgm4_define([_AM_AUTOCONF_VERSION], []) 2968d514b0f3Smrg 2969d514b0f3Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 2970d514b0f3Smrg# ------------------------------- 2971d514b0f3Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 2972d514b0f3Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 2973d514b0f3SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 2974d514b0f3Smrg[AM_AUTOMAKE_VERSION([1.16.5])dnl 2975d514b0f3Smrgm4_ifndef([AC_AUTOCONF_VERSION], 2976d514b0f3Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 2977d514b0f3Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 2978d514b0f3Smrg 2979d514b0f3Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 2980d514b0f3Smrg 2981d514b0f3Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 2982d514b0f3Smrg# 2983d514b0f3Smrg# This file is free software; the Free Software Foundation 2984d514b0f3Smrg# gives unlimited permission to copy and/or distribute it, 2985d514b0f3Smrg# with or without modifications, as long as this notice is preserved. 2986d514b0f3Smrg 2987d514b0f3Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 2988d514b0f3Smrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 2989d514b0f3Smrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 2990d514b0f3Smrg# 2991d514b0f3Smrg# Of course, Automake must honor this variable whenever it calls a 2992d514b0f3Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 2993d514b0f3Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 2994d514b0f3Smrg# depending on how configure is run. This is pretty annoying, since 2995d514b0f3Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 2996d514b0f3Smrg# source directory, any form will work fine, but in subdirectories a 2997d514b0f3Smrg# relative path needs to be adjusted first. 2998d514b0f3Smrg# 2999d514b0f3Smrg# $ac_aux_dir/missing 3000d514b0f3Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 3001d514b0f3Smrg# $top_srcdir/$ac_aux_dir/missing 3002d514b0f3Smrg# fails if $ac_aux_dir is absolute, 3003d514b0f3Smrg# fails when called from a subdirectory in a VPATH build with 3004d514b0f3Smrg# a relative $ac_aux_dir 3005d514b0f3Smrg# 3006d514b0f3Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 3007d514b0f3Smrg# are both prefixed by $srcdir. In an in-source build this is usually 3008d514b0f3Smrg# harmless because $srcdir is '.', but things will broke when you 3009d514b0f3Smrg# start a VPATH build or use an absolute $srcdir. 3010d514b0f3Smrg# 3011d514b0f3Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 3012d514b0f3Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 3013d514b0f3Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 3014d514b0f3Smrg# and then we would define $MISSING as 3015d514b0f3Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 3016d514b0f3Smrg# This will work as long as MISSING is not called from configure, because 3017d514b0f3Smrg# unfortunately $(top_srcdir) has no meaning in configure. 3018d514b0f3Smrg# However there are other variables, like CC, which are often used in 3019d514b0f3Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 3020d514b0f3Smrg# 3021d514b0f3Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 3022d514b0f3Smrg# absolute PATH. The drawback is that using absolute paths prevent a 3023d514b0f3Smrg# configured tree to be moved without reconfiguration. 3024d514b0f3Smrg 3025d514b0f3SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 3026d514b0f3Smrg[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 3027d514b0f3Smrg# Expand $ac_aux_dir to an absolute path. 3028d514b0f3Smrgam_aux_dir=`cd "$ac_aux_dir" && pwd` 3029d514b0f3Smrg]) 3030d514b0f3Smrg 3031d514b0f3Smrg# AM_CONDITIONAL -*- Autoconf -*- 3032d514b0f3Smrg 3033d514b0f3Smrg# Copyright (C) 1997-2021 Free Software Foundation, Inc. 3034d514b0f3Smrg# 3035d514b0f3Smrg# This file is free software; the Free Software Foundation 3036d514b0f3Smrg# gives unlimited permission to copy and/or distribute it, 3037d514b0f3Smrg# with or without modifications, as long as this notice is preserved. 3038d514b0f3Smrg 3039d514b0f3Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 3040d514b0f3Smrg# ------------------------------------- 3041d514b0f3Smrg# Define a conditional. 3042d514b0f3SmrgAC_DEFUN([AM_CONDITIONAL], 3043d514b0f3Smrg[AC_PREREQ([2.52])dnl 3044d514b0f3Smrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 3045d514b0f3Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 3046d514b0f3SmrgAC_SUBST([$1_TRUE])dnl 3047d514b0f3SmrgAC_SUBST([$1_FALSE])dnl 3048d514b0f3Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 3049d514b0f3Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 3050d514b0f3Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 3051d514b0f3Smrgif $2; then 3052d514b0f3Smrg $1_TRUE= 3053d514b0f3Smrg $1_FALSE='#' 3054d514b0f3Smrgelse 3055d514b0f3Smrg $1_TRUE='#' 3056d514b0f3Smrg $1_FALSE= 3057d514b0f3Smrgfi 3058d514b0f3SmrgAC_CONFIG_COMMANDS_PRE( 3059d514b0f3Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 3060d514b0f3Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 3061d514b0f3SmrgUsually this means the macro was only invoked conditionally.]]) 3062d514b0f3Smrgfi])]) 3063d514b0f3Smrg 3064d514b0f3Smrg# Copyright (C) 1999-2021 Free Software Foundation, Inc. 3065d514b0f3Smrg# 3066d514b0f3Smrg# This file is free software; the Free Software Foundation 3067d514b0f3Smrg# gives unlimited permission to copy and/or distribute it, 3068d514b0f3Smrg# with or without modifications, as long as this notice is preserved. 3069d514b0f3Smrg 3070d514b0f3Smrg 3071d514b0f3Smrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 3072d514b0f3Smrg# written in clear, in which case automake, when reading aclocal.m4, 3073d514b0f3Smrg# will think it sees a *use*, and therefore will trigger all it's 3074d514b0f3Smrg# C support machinery. Also note that it means that autoscan, seeing 3075d514b0f3Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 3076d514b0f3Smrg 3077d514b0f3Smrg 3078d514b0f3Smrg# _AM_DEPENDENCIES(NAME) 3079d514b0f3Smrg# ---------------------- 3080d514b0f3Smrg# See how the compiler implements dependency checking. 3081d514b0f3Smrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 3082d514b0f3Smrg# We try a few techniques and use that to set a single cache variable. 3083d514b0f3Smrg# 3084d514b0f3Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 3085d514b0f3Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 3086d514b0f3Smrg# dependency, and given that the user is not expected to run this macro, 3087d514b0f3Smrg# just rely on AC_PROG_CC. 3088d514b0f3SmrgAC_DEFUN([_AM_DEPENDENCIES], 3089d514b0f3Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 3090d514b0f3SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 3091d514b0f3SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 3092d514b0f3SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 3093d514b0f3Smrg 3094d514b0f3Smrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 3095d514b0f3Smrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 3096d514b0f3Smrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 3097d514b0f3Smrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 3098d514b0f3Smrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 3099d514b0f3Smrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 3100d514b0f3Smrg [depcc="$$1" am_compiler_list=]) 3101d514b0f3Smrg 3102d514b0f3SmrgAC_CACHE_CHECK([dependency style of $depcc], 3103d514b0f3Smrg [am_cv_$1_dependencies_compiler_type], 3104d514b0f3Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 3105d514b0f3Smrg # We make a subdir and do the tests there. Otherwise we can end up 3106d514b0f3Smrg # making bogus files that we don't know about and never remove. For 3107d514b0f3Smrg # instance it was reported that on HP-UX the gcc test will end up 3108d514b0f3Smrg # making a dummy file named 'D' -- because '-MD' means "put the output 3109d514b0f3Smrg # in D". 3110d514b0f3Smrg rm -rf conftest.dir 3111d514b0f3Smrg mkdir conftest.dir 3112d514b0f3Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 3113d514b0f3Smrg # using a relative directory. 3114d514b0f3Smrg cp "$am_depcomp" conftest.dir 3115d514b0f3Smrg cd conftest.dir 3116d514b0f3Smrg # We will build objects and dependencies in a subdirectory because 3117d514b0f3Smrg # it helps to detect inapplicable dependency modes. For instance 3118d514b0f3Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 3119d514b0f3Smrg # side effect of compilation, but ICC will put the dependencies in 3120d514b0f3Smrg # the current directory while Tru64 will put them in the object 3121d514b0f3Smrg # directory. 3122d514b0f3Smrg mkdir sub 3123d514b0f3Smrg 3124d514b0f3Smrg am_cv_$1_dependencies_compiler_type=none 3125d514b0f3Smrg if test "$am_compiler_list" = ""; then 3126d514b0f3Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 3127d514b0f3Smrg fi 3128d514b0f3Smrg am__universal=false 3129d514b0f3Smrg m4_case([$1], [CC], 3130d514b0f3Smrg [case " $depcc " in #( 3131d514b0f3Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 3132d514b0f3Smrg esac], 3133d514b0f3Smrg [CXX], 3134d514b0f3Smrg [case " $depcc " in #( 3135d514b0f3Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 3136d514b0f3Smrg esac]) 3137d514b0f3Smrg 3138d514b0f3Smrg for depmode in $am_compiler_list; do 3139d514b0f3Smrg # Setup a source with many dependencies, because some compilers 3140d514b0f3Smrg # like to wrap large dependency lists on column 80 (with \), and 3141d514b0f3Smrg # we should not choose a depcomp mode which is confused by this. 3142d514b0f3Smrg # 3143d514b0f3Smrg # We need to recreate these files for each test, as the compiler may 3144d514b0f3Smrg # overwrite some of them when testing with obscure command lines. 3145d514b0f3Smrg # This happens at least with the AIX C compiler. 3146d514b0f3Smrg : > sub/conftest.c 3147d514b0f3Smrg for i in 1 2 3 4 5 6; do 3148d514b0f3Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 3149d514b0f3Smrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 3150d514b0f3Smrg # Solaris 10 /bin/sh. 3151d514b0f3Smrg echo '/* dummy */' > sub/conftst$i.h 3152d514b0f3Smrg done 3153d514b0f3Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 3154d514b0f3Smrg 3155d514b0f3Smrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 3156d514b0f3Smrg # mode. It turns out that the SunPro C++ compiler does not properly 3157d514b0f3Smrg # handle '-M -o', and we need to detect this. Also, some Intel 3158d514b0f3Smrg # versions had trouble with output in subdirs. 3159d514b0f3Smrg am__obj=sub/conftest.${OBJEXT-o} 3160d514b0f3Smrg am__minus_obj="-o $am__obj" 3161d514b0f3Smrg case $depmode in 3162d514b0f3Smrg gcc) 3163d514b0f3Smrg # This depmode causes a compiler race in universal mode. 3164d514b0f3Smrg test "$am__universal" = false || continue 3165d514b0f3Smrg ;; 3166d514b0f3Smrg nosideeffect) 3167d514b0f3Smrg # After this tag, mechanisms are not by side-effect, so they'll 3168d514b0f3Smrg # only be used when explicitly requested. 3169d514b0f3Smrg if test "x$enable_dependency_tracking" = xyes; then 3170d514b0f3Smrg continue 3171d514b0f3Smrg else 3172d514b0f3Smrg break 3173d514b0f3Smrg fi 3174d514b0f3Smrg ;; 3175d514b0f3Smrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 3176d514b0f3Smrg # This compiler won't grok '-c -o', but also, the minuso test has 3177d514b0f3Smrg # not run yet. These depmodes are late enough in the game, and 3178d514b0f3Smrg # so weak that their functioning should not be impacted. 3179d514b0f3Smrg am__obj=conftest.${OBJEXT-o} 3180d514b0f3Smrg am__minus_obj= 3181d514b0f3Smrg ;; 3182d514b0f3Smrg none) break ;; 3183d514b0f3Smrg esac 3184d514b0f3Smrg if depmode=$depmode \ 3185d514b0f3Smrg source=sub/conftest.c object=$am__obj \ 3186d514b0f3Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 3187d514b0f3Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 3188d514b0f3Smrg >/dev/null 2>conftest.err && 3189d514b0f3Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 3190d514b0f3Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 3191d514b0f3Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 3192d514b0f3Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 3193d514b0f3Smrg # icc doesn't choke on unknown options, it will just issue warnings 3194d514b0f3Smrg # or remarks (even with -Werror). So we grep stderr for any message 3195d514b0f3Smrg # that says an option was ignored or not supported. 3196d514b0f3Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 3197d514b0f3Smrg # icc: Command line warning: ignoring option '-M'; no argument required 3198d514b0f3Smrg # The diagnosis changed in icc 8.0: 3199d514b0f3Smrg # icc: Command line remark: option '-MP' not supported 3200d514b0f3Smrg if (grep 'ignoring option' conftest.err || 3201d514b0f3Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 3202d514b0f3Smrg am_cv_$1_dependencies_compiler_type=$depmode 3203d514b0f3Smrg break 3204d514b0f3Smrg fi 3205d514b0f3Smrg fi 3206d514b0f3Smrg done 3207d514b0f3Smrg 3208d514b0f3Smrg cd .. 3209d514b0f3Smrg rm -rf conftest.dir 3210d514b0f3Smrgelse 3211d514b0f3Smrg am_cv_$1_dependencies_compiler_type=none 3212d514b0f3Smrgfi 3213d514b0f3Smrg]) 3214d514b0f3SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 3215d514b0f3SmrgAM_CONDITIONAL([am__fastdep$1], [ 3216d514b0f3Smrg test "x$enable_dependency_tracking" != xno \ 3217d514b0f3Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 3218d514b0f3Smrg]) 3219d514b0f3Smrg 3220d514b0f3Smrg 3221d514b0f3Smrg# AM_SET_DEPDIR 3222d514b0f3Smrg# ------------- 3223d514b0f3Smrg# Choose a directory name for dependency files. 3224d514b0f3Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 3225d514b0f3SmrgAC_DEFUN([AM_SET_DEPDIR], 3226d514b0f3Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 3227d514b0f3SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 3228d514b0f3Smrg]) 3229d514b0f3Smrg 3230d514b0f3Smrg 3231d514b0f3Smrg# AM_DEP_TRACK 3232d514b0f3Smrg# ------------ 3233d514b0f3SmrgAC_DEFUN([AM_DEP_TRACK], 3234d514b0f3Smrg[AC_ARG_ENABLE([dependency-tracking], [dnl 3235d514b0f3SmrgAS_HELP_STRING( 3236d514b0f3Smrg [--enable-dependency-tracking], 3237d514b0f3Smrg [do not reject slow dependency extractors]) 3238d514b0f3SmrgAS_HELP_STRING( 3239d514b0f3Smrg [--disable-dependency-tracking], 3240d514b0f3Smrg [speeds up one-time build])]) 3241d514b0f3Smrgif test "x$enable_dependency_tracking" != xno; then 3242d514b0f3Smrg am_depcomp="$ac_aux_dir/depcomp" 3243d514b0f3Smrg AMDEPBACKSLASH='\' 3244d514b0f3Smrg am__nodep='_no' 3245d514b0f3Smrgfi 3246d514b0f3SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 3247d514b0f3SmrgAC_SUBST([AMDEPBACKSLASH])dnl 3248d514b0f3Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 3249d514b0f3SmrgAC_SUBST([am__nodep])dnl 3250d514b0f3Smrg_AM_SUBST_NOTMAKE([am__nodep])dnl 3251d514b0f3Smrg]) 3252d514b0f3Smrg 3253d514b0f3Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 3254d514b0f3Smrg 3255d514b0f3Smrg# Copyright (C) 1999-2021 Free Software Foundation, Inc. 3256d514b0f3Smrg# 3257d514b0f3Smrg# This file is free software; the Free Software Foundation 3258d514b0f3Smrg# gives unlimited permission to copy and/or distribute it, 3259d514b0f3Smrg# with or without modifications, as long as this notice is preserved. 3260d514b0f3Smrg 3261d514b0f3Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 3262d514b0f3Smrg# ------------------------------ 3263d514b0f3SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 3264d514b0f3Smrg[{ 3265d514b0f3Smrg # Older Autoconf quotes --file arguments for eval, but not when files 3266d514b0f3Smrg # are listed without --file. Let's play safe and only enable the eval 3267d514b0f3Smrg # if we detect the quoting. 3268d514b0f3Smrg # TODO: see whether this extra hack can be removed once we start 3269d514b0f3Smrg # requiring Autoconf 2.70 or later. 3270d514b0f3Smrg AS_CASE([$CONFIG_FILES], 3271d514b0f3Smrg [*\'*], [eval set x "$CONFIG_FILES"], 3272d514b0f3Smrg [*], [set x $CONFIG_FILES]) 3273d514b0f3Smrg shift 3274d514b0f3Smrg # Used to flag and report bootstrapping failures. 3275d514b0f3Smrg am_rc=0 3276d514b0f3Smrg for am_mf 3277d514b0f3Smrg do 3278d514b0f3Smrg # Strip MF so we end up with the name of the file. 3279d514b0f3Smrg am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` 3280d514b0f3Smrg # Check whether this is an Automake generated Makefile which includes 3281d514b0f3Smrg # dependency-tracking related rules and includes. 3282d514b0f3Smrg # Grep'ing the whole file directly is not great: AIX grep has a line 3283d514b0f3Smrg # limit of 2048, but all sed's we know have understand at least 4000. 3284d514b0f3Smrg sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ 3285d514b0f3Smrg || continue 3286d514b0f3Smrg am_dirpart=`AS_DIRNAME(["$am_mf"])` 3287d514b0f3Smrg am_filepart=`AS_BASENAME(["$am_mf"])` 3288d514b0f3Smrg AM_RUN_LOG([cd "$am_dirpart" \ 3289d514b0f3Smrg && sed -e '/# am--include-marker/d' "$am_filepart" \ 3290d514b0f3Smrg | $MAKE -f - am--depfiles]) || am_rc=$? 3291d514b0f3Smrg done 3292d514b0f3Smrg if test $am_rc -ne 0; then 3293d514b0f3Smrg AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments 3294d514b0f3Smrg for automatic dependency tracking. If GNU make was not used, consider 3295d514b0f3Smrg re-running the configure script with MAKE="gmake" (or whatever is 3296d514b0f3Smrg necessary). You can also try re-running configure with the 3297d514b0f3Smrg '--disable-dependency-tracking' option to at least be able to build 3298d514b0f3Smrg the package (albeit without support for automatic dependency tracking).]) 3299d514b0f3Smrg fi 3300d514b0f3Smrg AS_UNSET([am_dirpart]) 3301d514b0f3Smrg AS_UNSET([am_filepart]) 3302d514b0f3Smrg AS_UNSET([am_mf]) 3303d514b0f3Smrg AS_UNSET([am_rc]) 3304d514b0f3Smrg rm -f conftest-deps.mk 3305d514b0f3Smrg} 3306d514b0f3Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 3307d514b0f3Smrg 3308d514b0f3Smrg 3309d514b0f3Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 3310d514b0f3Smrg# ----------------------------- 3311d514b0f3Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 3312d514b0f3Smrg# 3313d514b0f3Smrg# This code is only required when automatic dependency tracking is enabled. 3314d514b0f3Smrg# This creates each '.Po' and '.Plo' makefile fragment that we'll need in 3315d514b0f3Smrg# order to bootstrap the dependency handling code. 3316d514b0f3SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 3317d514b0f3Smrg[AC_CONFIG_COMMANDS([depfiles], 3318d514b0f3Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 3319d514b0f3Smrg [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) 3320d514b0f3Smrg 3321d514b0f3Smrg# Do all the work for Automake. -*- Autoconf -*- 3322d514b0f3Smrg 3323d514b0f3Smrg# Copyright (C) 1996-2021 Free Software Foundation, Inc. 3324d514b0f3Smrg# 3325d514b0f3Smrg# This file is free software; the Free Software Foundation 3326d514b0f3Smrg# gives unlimited permission to copy and/or distribute it, 3327d514b0f3Smrg# with or without modifications, as long as this notice is preserved. 3328d514b0f3Smrg 3329d514b0f3Smrg# This macro actually does too much. Some checks are only needed if 3330d514b0f3Smrg# your package does certain things. But this isn't really a big deal. 3331d514b0f3Smrg 3332d514b0f3Smrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 3333d514b0f3Smrgm4_define([AC_PROG_CC], 3334d514b0f3Smrgm4_defn([AC_PROG_CC]) 3335d514b0f3Smrg[_AM_PROG_CC_C_O 3336d514b0f3Smrg]) 3337d514b0f3Smrg 3338d514b0f3Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 3339d514b0f3Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 3340d514b0f3Smrg# ----------------------------------------------- 3341d514b0f3Smrg# The call with PACKAGE and VERSION arguments is the old style 3342d514b0f3Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 3343d514b0f3Smrg# and VERSION should now be passed to AC_INIT and removed from 3344d514b0f3Smrg# the call to AM_INIT_AUTOMAKE. 3345d514b0f3Smrg# We support both call styles for the transition. After 3346d514b0f3Smrg# the next Automake release, Autoconf can make the AC_INIT 3347d514b0f3Smrg# arguments mandatory, and then we can depend on a new Autoconf 3348d514b0f3Smrg# release and drop the old call support. 3349d514b0f3SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 3350d514b0f3Smrg[AC_PREREQ([2.65])dnl 3351d514b0f3Smrgm4_ifdef([_$0_ALREADY_INIT], 3352d514b0f3Smrg [m4_fatal([$0 expanded multiple times 3353d514b0f3Smrg]m4_defn([_$0_ALREADY_INIT]))], 3354d514b0f3Smrg [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl 3355d514b0f3Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 3356d514b0f3Smrgdnl the ones we care about. 3357d514b0f3Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 3358d514b0f3SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 3359d514b0f3SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 3360d514b0f3Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 3361d514b0f3Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 3362d514b0f3Smrg # is not polluted with repeated "-I." 3363d514b0f3Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 3364d514b0f3Smrg # test to see if srcdir already configured 3365d514b0f3Smrg if test -f $srcdir/config.status; then 3366d514b0f3Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 3367d514b0f3Smrg fi 3368d514b0f3Smrgfi 3369d514b0f3Smrg 3370d514b0f3Smrg# test whether we have cygpath 3371d514b0f3Smrgif test -z "$CYGPATH_W"; then 3372d514b0f3Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 3373d514b0f3Smrg CYGPATH_W='cygpath -w' 3374d514b0f3Smrg else 3375d514b0f3Smrg CYGPATH_W=echo 3376d514b0f3Smrg fi 3377d514b0f3Smrgfi 3378d514b0f3SmrgAC_SUBST([CYGPATH_W]) 3379d514b0f3Smrg 3380d514b0f3Smrg# Define the identity of the package. 3381d514b0f3Smrgdnl Distinguish between old-style and new-style calls. 3382d514b0f3Smrgm4_ifval([$2], 3383d514b0f3Smrg[AC_DIAGNOSE([obsolete], 3384d514b0f3Smrg [$0: two- and three-arguments forms are deprecated.]) 3385d514b0f3Smrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 3386d514b0f3Smrg AC_SUBST([PACKAGE], [$1])dnl 3387d514b0f3Smrg AC_SUBST([VERSION], [$2])], 3388d514b0f3Smrg[_AM_SET_OPTIONS([$1])dnl 3389d514b0f3Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 3390d514b0f3Smrgm4_if( 3391d514b0f3Smrg m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]), 3392d514b0f3Smrg [ok:ok],, 3393d514b0f3Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 3394d514b0f3Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 3395d514b0f3Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 3396d514b0f3Smrg 3397d514b0f3Smrg_AM_IF_OPTION([no-define],, 3398d514b0f3Smrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 3399d514b0f3Smrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 3400d514b0f3Smrg 3401d514b0f3Smrg# Some tools Automake needs. 3402d514b0f3SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 3403d514b0f3SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 3404d514b0f3SmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 3405d514b0f3SmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 3406d514b0f3SmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 3407d514b0f3SmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 3408d514b0f3SmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 3409d514b0f3SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 3410d514b0f3SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 3411d514b0f3SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 3412d514b0f3Smrg# For better backward compatibility. To be removed once Automake 1.9.x 3413d514b0f3Smrg# dies out for good. For more background, see: 3414d514b0f3Smrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 3415d514b0f3Smrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 3416d514b0f3SmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 3417d514b0f3Smrg# We need awk for the "check" target (and possibly the TAP driver). The 3418d514b0f3Smrg# system "awk" is bad on some platforms. 3419d514b0f3SmrgAC_REQUIRE([AC_PROG_AWK])dnl 3420d514b0f3SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 3421d514b0f3SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 3422d514b0f3Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 3423d514b0f3Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 3424d514b0f3Smrg [_AM_PROG_TAR([v7])])]) 3425d514b0f3Smrg_AM_IF_OPTION([no-dependencies],, 3426d514b0f3Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 3427d514b0f3Smrg [_AM_DEPENDENCIES([CC])], 3428d514b0f3Smrg [m4_define([AC_PROG_CC], 3429d514b0f3Smrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 3430d514b0f3SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 3431d514b0f3Smrg [_AM_DEPENDENCIES([CXX])], 3432d514b0f3Smrg [m4_define([AC_PROG_CXX], 3433d514b0f3Smrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 3434d514b0f3SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 3435d514b0f3Smrg [_AM_DEPENDENCIES([OBJC])], 3436d514b0f3Smrg [m4_define([AC_PROG_OBJC], 3437d514b0f3Smrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 3438d514b0f3SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 3439d514b0f3Smrg [_AM_DEPENDENCIES([OBJCXX])], 3440d514b0f3Smrg [m4_define([AC_PROG_OBJCXX], 3441d514b0f3Smrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 3442d514b0f3Smrg]) 3443d514b0f3Smrg# Variables for tags utilities; see am/tags.am 3444d514b0f3Smrgif test -z "$CTAGS"; then 3445d514b0f3Smrg CTAGS=ctags 3446d514b0f3Smrgfi 3447d514b0f3SmrgAC_SUBST([CTAGS]) 3448d514b0f3Smrgif test -z "$ETAGS"; then 3449d514b0f3Smrg ETAGS=etags 3450d514b0f3Smrgfi 3451d514b0f3SmrgAC_SUBST([ETAGS]) 3452d514b0f3Smrgif test -z "$CSCOPE"; then 3453d514b0f3Smrg CSCOPE=cscope 3454d514b0f3Smrgfi 3455d514b0f3SmrgAC_SUBST([CSCOPE]) 3456d514b0f3Smrg 3457d514b0f3SmrgAC_REQUIRE([AM_SILENT_RULES])dnl 3458d514b0f3Smrgdnl The testsuite driver may need to know about EXEEXT, so add the 3459d514b0f3Smrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 3460d514b0f3Smrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 3461d514b0f3SmrgAC_CONFIG_COMMANDS_PRE(dnl 3462d514b0f3Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 3463d514b0f3Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 3464d514b0f3Smrg 3465d514b0f3Smrg# POSIX will say in a future version that running "rm -f" with no argument 3466d514b0f3Smrg# is OK; and we want to be able to make that assumption in our Makefile 3467d514b0f3Smrg# recipes. So use an aggressive probe to check that the usage we want is 3468d514b0f3Smrg# actually supported "in the wild" to an acceptable degree. 3469d514b0f3Smrg# See automake bug#10828. 3470d514b0f3Smrg# To make any issue more visible, cause the running configure to be aborted 3471d514b0f3Smrg# by default if the 'rm' program in use doesn't match our expectations; the 3472d514b0f3Smrg# user can still override this though. 3473d514b0f3Smrgif rm -f && rm -fr && rm -rf; then : OK; else 3474d514b0f3Smrg cat >&2 <<'END' 3475d514b0f3SmrgOops! 3476d514b0f3Smrg 3477d514b0f3SmrgYour 'rm' program seems unable to run without file operands specified 3478d514b0f3Smrgon the command line, even when the '-f' option is present. This is contrary 3479d514b0f3Smrgto the behaviour of most rm programs out there, and not conforming with 3480d514b0f3Smrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 3481d514b0f3Smrg 3482d514b0f3SmrgPlease tell bug-automake@gnu.org about your system, including the value 3483d514b0f3Smrgof your $PATH and any error possibly output before this message. This 3484d514b0f3Smrgcan help us improve future automake versions. 3485d514b0f3Smrg 3486d514b0f3SmrgEND 3487d514b0f3Smrg if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 3488d514b0f3Smrg echo 'Configuration will proceed anyway, since you have set the' >&2 3489d514b0f3Smrg echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 3490d514b0f3Smrg echo >&2 3491d514b0f3Smrg else 3492d514b0f3Smrg cat >&2 <<'END' 3493d514b0f3SmrgAborting the configuration process, to ensure you take notice of the issue. 3494d514b0f3Smrg 3495d514b0f3SmrgYou can download and install GNU coreutils to get an 'rm' implementation 3496d514b0f3Smrgthat behaves properly: <https://www.gnu.org/software/coreutils/>. 3497d514b0f3Smrg 3498d514b0f3SmrgIf you want to complete the configuration process using your problematic 3499d514b0f3Smrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 3500d514b0f3Smrgto "yes", and re-run configure. 3501d514b0f3Smrg 3502d514b0f3SmrgEND 3503d514b0f3Smrg AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 3504d514b0f3Smrg fi 3505d514b0f3Smrgfi 3506d514b0f3Smrgdnl The trailing newline in this macro's definition is deliberate, for 3507d514b0f3Smrgdnl backward compatibility and to allow trailing 'dnl'-style comments 3508d514b0f3Smrgdnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. 3509d514b0f3Smrg]) 3510d514b0f3Smrg 3511d514b0f3Smrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 3512d514b0f3Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 3513d514b0f3Smrgdnl mangled by Autoconf and run in a shell conditional statement. 3514d514b0f3Smrgm4_define([_AC_COMPILER_EXEEXT], 3515d514b0f3Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 3516d514b0f3Smrg 3517d514b0f3Smrg# When config.status generates a header, we must update the stamp-h file. 3518d514b0f3Smrg# This file resides in the same directory as the config header 3519d514b0f3Smrg# that is generated. The stamp files are numbered to have different names. 3520d514b0f3Smrg 3521d514b0f3Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 3522d514b0f3Smrg# loop where config.status creates the headers, so we can generate 3523d514b0f3Smrg# our stamp files there. 3524d514b0f3SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 3525d514b0f3Smrg[# Compute $1's index in $config_headers. 3526d514b0f3Smrg_am_arg=$1 3527d514b0f3Smrg_am_stamp_count=1 3528d514b0f3Smrgfor _am_header in $config_headers :; do 3529d514b0f3Smrg case $_am_header in 3530d514b0f3Smrg $_am_arg | $_am_arg:* ) 3531d514b0f3Smrg break ;; 3532d514b0f3Smrg * ) 3533d514b0f3Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 3534d514b0f3Smrg esac 3535d514b0f3Smrgdone 3536d514b0f3Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 3537d514b0f3Smrg 3538d514b0f3Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 3539d514b0f3Smrg# 3540d514b0f3Smrg# This file is free software; the Free Software Foundation 3541d514b0f3Smrg# gives unlimited permission to copy and/or distribute it, 3542d514b0f3Smrg# with or without modifications, as long as this notice is preserved. 3543d514b0f3Smrg 3544d514b0f3Smrg# AM_PROG_INSTALL_SH 3545d514b0f3Smrg# ------------------ 3546d514b0f3Smrg# Define $install_sh. 3547d514b0f3SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 3548d514b0f3Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 3549d514b0f3Smrgif test x"${install_sh+set}" != xset; then 3550d514b0f3Smrg case $am_aux_dir in 3551d514b0f3Smrg *\ * | *\ *) 3552d514b0f3Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 3553d514b0f3Smrg *) 3554d514b0f3Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 3555d514b0f3Smrg esac 3556d514b0f3Smrgfi 3557d514b0f3SmrgAC_SUBST([install_sh])]) 3558d514b0f3Smrg 3559d514b0f3Smrg# Copyright (C) 2003-2021 Free Software Foundation, Inc. 3560d514b0f3Smrg# 3561d514b0f3Smrg# This file is free software; the Free Software Foundation 3562d514b0f3Smrg# gives unlimited permission to copy and/or distribute it, 3563d514b0f3Smrg# with or without modifications, as long as this notice is preserved. 3564d514b0f3Smrg 3565d514b0f3Smrg# Check whether the underlying file-system supports filenames 3566d514b0f3Smrg# with a leading dot. For instance MS-DOS doesn't. 3567d514b0f3SmrgAC_DEFUN([AM_SET_LEADING_DOT], 3568d514b0f3Smrg[rm -rf .tst 2>/dev/null 3569d514b0f3Smrgmkdir .tst 2>/dev/null 3570d514b0f3Smrgif test -d .tst; then 3571d514b0f3Smrg am__leading_dot=. 3572d514b0f3Smrgelse 3573d514b0f3Smrg am__leading_dot=_ 3574d514b0f3Smrgfi 3575d514b0f3Smrgrmdir .tst 2>/dev/null 3576d514b0f3SmrgAC_SUBST([am__leading_dot])]) 3577d514b0f3Smrg 3578d514b0f3Smrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 3579d514b0f3Smrg# From Jim Meyering 3580d514b0f3Smrg 3581d514b0f3Smrg# Copyright (C) 1996-2021 Free Software Foundation, Inc. 3582d514b0f3Smrg# 3583d514b0f3Smrg# This file is free software; the Free Software Foundation 3584d514b0f3Smrg# gives unlimited permission to copy and/or distribute it, 3585d514b0f3Smrg# with or without modifications, as long as this notice is preserved. 3586d514b0f3Smrg 3587d514b0f3Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 3588d514b0f3Smrg# ---------------------------------- 3589d514b0f3Smrg# Control maintainer-specific portions of Makefiles. 3590d514b0f3Smrg# Default is to disable them, unless 'enable' is passed literally. 3591d514b0f3Smrg# For symmetry, 'disable' may be passed as well. Anyway, the user 3592d514b0f3Smrg# can override the default with the --enable/--disable switch. 3593d514b0f3SmrgAC_DEFUN([AM_MAINTAINER_MODE], 3594d514b0f3Smrg[m4_case(m4_default([$1], [disable]), 3595d514b0f3Smrg [enable], [m4_define([am_maintainer_other], [disable])], 3596d514b0f3Smrg [disable], [m4_define([am_maintainer_other], [enable])], 3597d514b0f3Smrg [m4_define([am_maintainer_other], [enable]) 3598d514b0f3Smrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 3599d514b0f3SmrgAC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 3600d514b0f3Smrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 3601d514b0f3Smrg AC_ARG_ENABLE([maintainer-mode], 3602d514b0f3Smrg [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], 3603d514b0f3Smrg am_maintainer_other[ make rules and dependencies not useful 3604d514b0f3Smrg (and sometimes confusing) to the casual installer])], 3605d514b0f3Smrg [USE_MAINTAINER_MODE=$enableval], 3606d514b0f3Smrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 3607d514b0f3Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 3608d514b0f3Smrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 3609d514b0f3Smrg MAINT=$MAINTAINER_MODE_TRUE 3610d514b0f3Smrg AC_SUBST([MAINT])dnl 3611d514b0f3Smrg] 3612d514b0f3Smrg) 3613d514b0f3Smrg 3614d514b0f3Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 3615d514b0f3Smrg 3616d514b0f3Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 3617d514b0f3Smrg# 3618d514b0f3Smrg# This file is free software; the Free Software Foundation 3619d514b0f3Smrg# gives unlimited permission to copy and/or distribute it, 3620d514b0f3Smrg# with or without modifications, as long as this notice is preserved. 3621d514b0f3Smrg 3622d514b0f3Smrg# AM_MAKE_INCLUDE() 3623d514b0f3Smrg# ----------------- 3624d514b0f3Smrg# Check whether make has an 'include' directive that can support all 3625d514b0f3Smrg# the idioms we need for our automatic dependency tracking code. 3626d514b0f3SmrgAC_DEFUN([AM_MAKE_INCLUDE], 3627d514b0f3Smrg[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) 3628d514b0f3Smrgcat > confinc.mk << 'END' 3629d514b0f3Smrgam__doit: 3630d514b0f3Smrg @echo this is the am__doit target >confinc.out 3631d514b0f3Smrg.PHONY: am__doit 3632d514b0f3SmrgEND 3633d514b0f3Smrgam__include="#" 3634d514b0f3Smrgam__quote= 3635d514b0f3Smrg# BSD make does it like this. 3636d514b0f3Smrgecho '.include "confinc.mk" # ignored' > confmf.BSD 3637d514b0f3Smrg# Other make implementations (GNU, Solaris 10, AIX) do it like this. 3638d514b0f3Smrgecho 'include confinc.mk # ignored' > confmf.GNU 3639d514b0f3Smrg_am_result=no 3640d514b0f3Smrgfor s in GNU BSD; do 3641d514b0f3Smrg AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) 3642d514b0f3Smrg AS_CASE([$?:`cat confinc.out 2>/dev/null`], 3643d514b0f3Smrg ['0:this is the am__doit target'], 3644d514b0f3Smrg [AS_CASE([$s], 3645d514b0f3Smrg [BSD], [am__include='.include' am__quote='"'], 3646d514b0f3Smrg [am__include='include' am__quote=''])]) 3647d514b0f3Smrg if test "$am__include" != "#"; then 3648d514b0f3Smrg _am_result="yes ($s style)" 3649d514b0f3Smrg break 3650d514b0f3Smrg fi 3651d514b0f3Smrgdone 3652d514b0f3Smrgrm -f confinc.* confmf.* 3653d514b0f3SmrgAC_MSG_RESULT([${_am_result}]) 3654d514b0f3SmrgAC_SUBST([am__include])]) 3655d514b0f3SmrgAC_SUBST([am__quote])]) 3656d514b0f3Smrg 3657d514b0f3Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 3658d514b0f3Smrg 3659d514b0f3Smrg# Copyright (C) 1997-2021 Free Software Foundation, Inc. 3660d514b0f3Smrg# 3661d514b0f3Smrg# This file is free software; the Free Software Foundation 3662d514b0f3Smrg# gives unlimited permission to copy and/or distribute it, 3663d514b0f3Smrg# with or without modifications, as long as this notice is preserved. 3664d514b0f3Smrg 3665d514b0f3Smrg# AM_MISSING_PROG(NAME, PROGRAM) 3666d514b0f3Smrg# ------------------------------ 3667d514b0f3SmrgAC_DEFUN([AM_MISSING_PROG], 3668d514b0f3Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 3669d514b0f3Smrg$1=${$1-"${am_missing_run}$2"} 3670d514b0f3SmrgAC_SUBST($1)]) 3671d514b0f3Smrg 3672d514b0f3Smrg# AM_MISSING_HAS_RUN 3673d514b0f3Smrg# ------------------ 3674d514b0f3Smrg# Define MISSING if not defined so far and test if it is modern enough. 3675d514b0f3Smrg# If it is, set am_missing_run to use it, otherwise, to nothing. 3676d514b0f3SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 3677d514b0f3Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 3678d514b0f3SmrgAC_REQUIRE_AUX_FILE([missing])dnl 3679d514b0f3Smrgif test x"${MISSING+set}" != xset; then 3680d514b0f3Smrg MISSING="\${SHELL} '$am_aux_dir/missing'" 3681d514b0f3Smrgfi 3682d514b0f3Smrg# Use eval to expand $SHELL 3683d514b0f3Smrgif eval "$MISSING --is-lightweight"; then 3684d514b0f3Smrg am_missing_run="$MISSING " 3685d514b0f3Smrgelse 3686d514b0f3Smrg am_missing_run= 3687d514b0f3Smrg AC_MSG_WARN(['missing' script is too old or missing]) 3688d514b0f3Smrgfi 3689d514b0f3Smrg]) 3690d514b0f3Smrg 3691d514b0f3Smrg# Helper functions for option handling. -*- Autoconf -*- 3692d514b0f3Smrg 3693d514b0f3Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 3694d514b0f3Smrg# 3695d514b0f3Smrg# This file is free software; the Free Software Foundation 3696d514b0f3Smrg# gives unlimited permission to copy and/or distribute it, 3697d514b0f3Smrg# with or without modifications, as long as this notice is preserved. 3698d514b0f3Smrg 3699d514b0f3Smrg# _AM_MANGLE_OPTION(NAME) 3700d514b0f3Smrg# ----------------------- 3701d514b0f3SmrgAC_DEFUN([_AM_MANGLE_OPTION], 3702d514b0f3Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 3703d514b0f3Smrg 3704d514b0f3Smrg# _AM_SET_OPTION(NAME) 3705d514b0f3Smrg# -------------------- 3706d514b0f3Smrg# Set option NAME. Presently that only means defining a flag for this option. 3707d514b0f3SmrgAC_DEFUN([_AM_SET_OPTION], 3708d514b0f3Smrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 3709d514b0f3Smrg 3710d514b0f3Smrg# _AM_SET_OPTIONS(OPTIONS) 3711d514b0f3Smrg# ------------------------ 3712d514b0f3Smrg# OPTIONS is a space-separated list of Automake options. 3713d514b0f3SmrgAC_DEFUN([_AM_SET_OPTIONS], 3714d514b0f3Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 3715d514b0f3Smrg 3716d514b0f3Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 3717d514b0f3Smrg# ------------------------------------------- 3718d514b0f3Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 3719d514b0f3SmrgAC_DEFUN([_AM_IF_OPTION], 3720d514b0f3Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 3721d514b0f3Smrg 3722d514b0f3Smrg# Copyright (C) 1999-2021 Free Software Foundation, Inc. 3723d514b0f3Smrg# 3724d514b0f3Smrg# This file is free software; the Free Software Foundation 3725d514b0f3Smrg# gives unlimited permission to copy and/or distribute it, 3726d514b0f3Smrg# with or without modifications, as long as this notice is preserved. 3727d514b0f3Smrg 3728d514b0f3Smrg# _AM_PROG_CC_C_O 3729d514b0f3Smrg# --------------- 3730d514b0f3Smrg# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 3731d514b0f3Smrg# to automatically call this. 3732d514b0f3SmrgAC_DEFUN([_AM_PROG_CC_C_O], 3733d514b0f3Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 3734d514b0f3SmrgAC_REQUIRE_AUX_FILE([compile])dnl 3735d514b0f3SmrgAC_LANG_PUSH([C])dnl 3736d514b0f3SmrgAC_CACHE_CHECK( 3737d514b0f3Smrg [whether $CC understands -c and -o together], 3738d514b0f3Smrg [am_cv_prog_cc_c_o], 3739d514b0f3Smrg [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 3740d514b0f3Smrg # Make sure it works both with $CC and with simple cc. 3741d514b0f3Smrg # Following AC_PROG_CC_C_O, we do the test twice because some 3742d514b0f3Smrg # compilers refuse to overwrite an existing .o file with -o, 3743d514b0f3Smrg # though they will create one. 3744d514b0f3Smrg am_cv_prog_cc_c_o=yes 3745d514b0f3Smrg for am_i in 1 2; do 3746d514b0f3Smrg if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 3747d514b0f3Smrg && test -f conftest2.$ac_objext; then 3748d514b0f3Smrg : OK 3749d514b0f3Smrg else 3750d514b0f3Smrg am_cv_prog_cc_c_o=no 3751d514b0f3Smrg break 3752d514b0f3Smrg fi 3753d514b0f3Smrg done 3754d514b0f3Smrg rm -f core conftest* 3755d514b0f3Smrg unset am_i]) 3756d514b0f3Smrgif test "$am_cv_prog_cc_c_o" != yes; then 3757d514b0f3Smrg # Losing compiler, so override with the script. 3758d514b0f3Smrg # FIXME: It is wrong to rewrite CC. 3759d514b0f3Smrg # But if we don't then we get into trouble of one sort or another. 3760d514b0f3Smrg # A longer-term fix would be to have automake use am__CC in this case, 3761d514b0f3Smrg # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 3762d514b0f3Smrg CC="$am_aux_dir/compile $CC" 3763d514b0f3Smrgfi 3764d514b0f3SmrgAC_LANG_POP([C])]) 3765d514b0f3Smrg 3766d514b0f3Smrg# For backward compatibility. 3767d514b0f3SmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 3768d514b0f3Smrg 3769d514b0f3Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 3770d514b0f3Smrg# 3771d514b0f3Smrg# This file is free software; the Free Software Foundation 3772d514b0f3Smrg# gives unlimited permission to copy and/or distribute it, 3773d514b0f3Smrg# with or without modifications, as long as this notice is preserved. 3774d514b0f3Smrg 3775d514b0f3Smrg# AM_RUN_LOG(COMMAND) 3776d514b0f3Smrg# ------------------- 3777d514b0f3Smrg# Run COMMAND, save the exit status in ac_status, and log it. 3778d514b0f3Smrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 3779d514b0f3SmrgAC_DEFUN([AM_RUN_LOG], 3780d514b0f3Smrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 3781d514b0f3Smrg ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 3782d514b0f3Smrg ac_status=$? 3783d514b0f3Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 3784d514b0f3Smrg (exit $ac_status); }]) 3785d514b0f3Smrg 3786d514b0f3Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 3787d514b0f3Smrg 3788d514b0f3Smrg# Copyright (C) 1996-2021 Free Software Foundation, Inc. 3789d514b0f3Smrg# 3790d514b0f3Smrg# This file is free software; the Free Software Foundation 3791d514b0f3Smrg# gives unlimited permission to copy and/or distribute it, 3792d514b0f3Smrg# with or without modifications, as long as this notice is preserved. 3793d514b0f3Smrg 3794d514b0f3Smrg# AM_SANITY_CHECK 3795d514b0f3Smrg# --------------- 3796d514b0f3SmrgAC_DEFUN([AM_SANITY_CHECK], 3797d514b0f3Smrg[AC_MSG_CHECKING([whether build environment is sane]) 3798d514b0f3Smrg# Reject unsafe characters in $srcdir or the absolute working directory 3799d514b0f3Smrg# name. Accept space and tab only in the latter. 3800d514b0f3Smrgam_lf=' 3801d514b0f3Smrg' 3802d514b0f3Smrgcase `pwd` in 3803d514b0f3Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 3804d514b0f3Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 3805d514b0f3Smrgesac 3806d514b0f3Smrgcase $srcdir in 3807d514b0f3Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 3808d514b0f3Smrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 3809d514b0f3Smrgesac 3810d514b0f3Smrg 3811d514b0f3Smrg# Do 'set' in a subshell so we don't clobber the current shell's 3812d514b0f3Smrg# arguments. Must try -L first in case configure is actually a 3813d514b0f3Smrg# symlink; some systems play weird games with the mod time of symlinks 3814d514b0f3Smrg# (eg FreeBSD returns the mod time of the symlink's containing 3815d514b0f3Smrg# directory). 3816d514b0f3Smrgif ( 3817d514b0f3Smrg am_has_slept=no 3818d514b0f3Smrg for am_try in 1 2; do 3819d514b0f3Smrg echo "timestamp, slept: $am_has_slept" > conftest.file 3820d514b0f3Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 3821d514b0f3Smrg if test "$[*]" = "X"; then 3822d514b0f3Smrg # -L didn't work. 3823d514b0f3Smrg set X `ls -t "$srcdir/configure" conftest.file` 3824d514b0f3Smrg fi 3825d514b0f3Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 3826d514b0f3Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 3827d514b0f3Smrg 3828d514b0f3Smrg # If neither matched, then we have a broken ls. This can happen 3829d514b0f3Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 3830d514b0f3Smrg # broken ls alias from the environment. This has actually 3831d514b0f3Smrg # happened. Such a system could not be considered "sane". 3832d514b0f3Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 3833d514b0f3Smrg alias in your environment]) 3834d514b0f3Smrg fi 3835d514b0f3Smrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 3836d514b0f3Smrg break 3837d514b0f3Smrg fi 3838d514b0f3Smrg # Just in case. 3839d514b0f3Smrg sleep 1 3840d514b0f3Smrg am_has_slept=yes 3841d514b0f3Smrg done 3842d514b0f3Smrg test "$[2]" = conftest.file 3843d514b0f3Smrg ) 3844d514b0f3Smrgthen 3845d514b0f3Smrg # Ok. 3846d514b0f3Smrg : 3847d514b0f3Smrgelse 3848d514b0f3Smrg AC_MSG_ERROR([newly created file is older than distributed files! 3849d514b0f3SmrgCheck your system clock]) 3850d514b0f3Smrgfi 3851d514b0f3SmrgAC_MSG_RESULT([yes]) 3852d514b0f3Smrg# If we didn't sleep, we still need to ensure time stamps of config.status and 3853d514b0f3Smrg# generated files are strictly newer. 3854d514b0f3Smrgam_sleep_pid= 3855d514b0f3Smrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 3856d514b0f3Smrg ( sleep 1 ) & 3857d514b0f3Smrg am_sleep_pid=$! 3858d514b0f3Smrgfi 3859d514b0f3SmrgAC_CONFIG_COMMANDS_PRE( 3860d514b0f3Smrg [AC_MSG_CHECKING([that generated files are newer than configure]) 3861d514b0f3Smrg if test -n "$am_sleep_pid"; then 3862d514b0f3Smrg # Hide warnings about reused PIDs. 3863d514b0f3Smrg wait $am_sleep_pid 2>/dev/null 3864d514b0f3Smrg fi 3865d514b0f3Smrg AC_MSG_RESULT([done])]) 3866d514b0f3Smrgrm -f conftest.file 3867d514b0f3Smrg]) 3868d514b0f3Smrg 3869d514b0f3Smrg# Copyright (C) 2009-2021 Free Software Foundation, Inc. 3870d514b0f3Smrg# 3871d514b0f3Smrg# This file is free software; the Free Software Foundation 3872d514b0f3Smrg# gives unlimited permission to copy and/or distribute it, 3873d514b0f3Smrg# with or without modifications, as long as this notice is preserved. 3874d514b0f3Smrg 3875d514b0f3Smrg# AM_SILENT_RULES([DEFAULT]) 3876d514b0f3Smrg# -------------------------- 3877d514b0f3Smrg# Enable less verbose build rules; with the default set to DEFAULT 3878d514b0f3Smrg# ("yes" being less verbose, "no" or empty being verbose). 3879d514b0f3SmrgAC_DEFUN([AM_SILENT_RULES], 3880d514b0f3Smrg[AC_ARG_ENABLE([silent-rules], [dnl 3881d514b0f3SmrgAS_HELP_STRING( 3882d514b0f3Smrg [--enable-silent-rules], 3883d514b0f3Smrg [less verbose build output (undo: "make V=1")]) 3884d514b0f3SmrgAS_HELP_STRING( 3885d514b0f3Smrg [--disable-silent-rules], 3886d514b0f3Smrg [verbose build output (undo: "make V=0")])dnl 3887d514b0f3Smrg]) 3888d514b0f3Smrgcase $enable_silent_rules in @%:@ ((( 3889d514b0f3Smrg yes) AM_DEFAULT_VERBOSITY=0;; 3890d514b0f3Smrg no) AM_DEFAULT_VERBOSITY=1;; 3891d514b0f3Smrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 3892d514b0f3Smrgesac 3893d514b0f3Smrgdnl 3894d514b0f3Smrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 3895d514b0f3Smrgdnl do not support nested variable expansions. 3896d514b0f3Smrgdnl See automake bug#9928 and bug#10237. 3897d514b0f3Smrgam_make=${MAKE-make} 3898d514b0f3SmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 3899d514b0f3Smrg [am_cv_make_support_nested_variables], 3900d514b0f3Smrg [if AS_ECHO([['TRUE=$(BAR$(V)) 3901d514b0f3SmrgBAR0=false 3902d514b0f3SmrgBAR1=true 3903d514b0f3SmrgV=1 3904d514b0f3Smrgam__doit: 3905d514b0f3Smrg @$(TRUE) 3906d514b0f3Smrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 3907d514b0f3Smrg am_cv_make_support_nested_variables=yes 3908d514b0f3Smrgelse 3909d514b0f3Smrg am_cv_make_support_nested_variables=no 3910d514b0f3Smrgfi]) 3911d514b0f3Smrgif test $am_cv_make_support_nested_variables = yes; then 3912d514b0f3Smrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 3913d514b0f3Smrg AM_V='$(V)' 3914d514b0f3Smrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 3915d514b0f3Smrgelse 3916d514b0f3Smrg AM_V=$AM_DEFAULT_VERBOSITY 3917d514b0f3Smrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 3918d514b0f3Smrgfi 3919d514b0f3SmrgAC_SUBST([AM_V])dnl 3920d514b0f3SmrgAM_SUBST_NOTMAKE([AM_V])dnl 3921d514b0f3SmrgAC_SUBST([AM_DEFAULT_V])dnl 3922d514b0f3SmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 3923d514b0f3SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 3924d514b0f3SmrgAM_BACKSLASH='\' 3925d514b0f3SmrgAC_SUBST([AM_BACKSLASH])dnl 3926d514b0f3Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 3927d514b0f3Smrg]) 3928d514b0f3Smrg 3929d514b0f3Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc. 3930d514b0f3Smrg# 3931d514b0f3Smrg# This file is free software; the Free Software Foundation 3932d514b0f3Smrg# gives unlimited permission to copy and/or distribute it, 3933d514b0f3Smrg# with or without modifications, as long as this notice is preserved. 3934d514b0f3Smrg 3935d514b0f3Smrg# AM_PROG_INSTALL_STRIP 3936d514b0f3Smrg# --------------------- 3937d514b0f3Smrg# One issue with vendor 'install' (even GNU) is that you can't 3938d514b0f3Smrg# specify the program used to strip binaries. This is especially 3939d514b0f3Smrg# annoying in cross-compiling environments, where the build's strip 3940d514b0f3Smrg# is unlikely to handle the host's binaries. 3941d514b0f3Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 3942d514b0f3Smrg# always use install-sh in "make install-strip", and initialize 3943d514b0f3Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 3944d514b0f3SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 3945d514b0f3Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 3946d514b0f3Smrg# Installed binaries are usually stripped using 'strip' when the user 3947d514b0f3Smrg# run "make install-strip". However 'strip' might not be the right 3948d514b0f3Smrg# tool to use in cross-compilation environments, therefore Automake 3949d514b0f3Smrg# will honor the 'STRIP' environment variable to overrule this program. 3950d514b0f3Smrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 3951d514b0f3Smrgif test "$cross_compiling" != no; then 3952d514b0f3Smrg AC_CHECK_TOOL([STRIP], [strip], :) 3953d514b0f3Smrgfi 3954d514b0f3SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 3955d514b0f3SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 3956d514b0f3Smrg 3957d514b0f3Smrg# Copyright (C) 2006-2021 Free Software Foundation, Inc. 3958d514b0f3Smrg# 3959d514b0f3Smrg# This file is free software; the Free Software Foundation 3960d514b0f3Smrg# gives unlimited permission to copy and/or distribute it, 3961d514b0f3Smrg# with or without modifications, as long as this notice is preserved. 3962d514b0f3Smrg 3963d514b0f3Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 3964d514b0f3Smrg# --------------------------- 3965d514b0f3Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 3966d514b0f3Smrg# This macro is traced by Automake. 3967d514b0f3SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 3968d514b0f3Smrg 3969d514b0f3Smrg# AM_SUBST_NOTMAKE(VARIABLE) 3970d514b0f3Smrg# -------------------------- 3971d514b0f3Smrg# Public sister of _AM_SUBST_NOTMAKE. 3972d514b0f3SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 3973d514b0f3Smrg 3974d514b0f3Smrg# Check how to create a tarball. -*- Autoconf -*- 3975d514b0f3Smrg 3976d514b0f3Smrg# Copyright (C) 2004-2021 Free Software Foundation, Inc. 3977d514b0f3Smrg# 3978d514b0f3Smrg# This file is free software; the Free Software Foundation 3979d514b0f3Smrg# gives unlimited permission to copy and/or distribute it, 3980d514b0f3Smrg# with or without modifications, as long as this notice is preserved. 3981d514b0f3Smrg 3982d514b0f3Smrg# _AM_PROG_TAR(FORMAT) 3983d514b0f3Smrg# -------------------- 3984d514b0f3Smrg# Check how to create a tarball in format FORMAT. 3985d514b0f3Smrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 3986d514b0f3Smrg# 3987d514b0f3Smrg# Substitute a variable $(am__tar) that is a command 3988d514b0f3Smrg# writing to stdout a FORMAT-tarball containing the directory 3989d514b0f3Smrg# $tardir. 3990d514b0f3Smrg# tardir=directory && $(am__tar) > result.tar 3991d514b0f3Smrg# 3992d514b0f3Smrg# Substitute a variable $(am__untar) that extract such 3993d514b0f3Smrg# a tarball read from stdin. 3994d514b0f3Smrg# $(am__untar) < result.tar 3995d514b0f3Smrg# 3996d514b0f3SmrgAC_DEFUN([_AM_PROG_TAR], 3997d514b0f3Smrg[# Always define AMTAR for backward compatibility. Yes, it's still used 3998d514b0f3Smrg# in the wild :-( We should find a proper way to deprecate it ... 3999d514b0f3SmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 4000d514b0f3Smrg 4001d514b0f3Smrg# We'll loop over all known methods to create a tar archive until one works. 4002d514b0f3Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 4003d514b0f3Smrg 4004d514b0f3Smrgm4_if([$1], [v7], 4005d514b0f3Smrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 4006d514b0f3Smrg 4007d514b0f3Smrg [m4_case([$1], 4008d514b0f3Smrg [ustar], 4009d514b0f3Smrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 4010d514b0f3Smrg # There is notably a 21 bits limit for the UID and the GID. In fact, 4011d514b0f3Smrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 4012d514b0f3Smrg # and bug#13588). 4013d514b0f3Smrg am_max_uid=2097151 # 2^21 - 1 4014d514b0f3Smrg am_max_gid=$am_max_uid 4015d514b0f3Smrg # The $UID and $GID variables are not portable, so we need to resort 4016d514b0f3Smrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 4017d514b0f3Smrg # below are definitely unexpected, so allow the users to see them 4018d514b0f3Smrg # (that is, avoid stderr redirection). 4019d514b0f3Smrg am_uid=`id -u || echo unknown` 4020d514b0f3Smrg am_gid=`id -g || echo unknown` 4021d514b0f3Smrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 4022d514b0f3Smrg if test $am_uid -le $am_max_uid; then 4023d514b0f3Smrg AC_MSG_RESULT([yes]) 4024d514b0f3Smrg else 4025d514b0f3Smrg AC_MSG_RESULT([no]) 4026d514b0f3Smrg _am_tools=none 4027d514b0f3Smrg fi 4028d514b0f3Smrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 4029d514b0f3Smrg if test $am_gid -le $am_max_gid; then 4030d514b0f3Smrg AC_MSG_RESULT([yes]) 4031d514b0f3Smrg else 4032d514b0f3Smrg AC_MSG_RESULT([no]) 4033d514b0f3Smrg _am_tools=none 4034d514b0f3Smrg fi], 4035d514b0f3Smrg 4036d514b0f3Smrg [pax], 4037d514b0f3Smrg [], 4038d514b0f3Smrg 4039d514b0f3Smrg [m4_fatal([Unknown tar format])]) 4040d514b0f3Smrg 4041d514b0f3Smrg AC_MSG_CHECKING([how to create a $1 tar archive]) 4042d514b0f3Smrg 4043d514b0f3Smrg # Go ahead even if we have the value already cached. We do so because we 4044d514b0f3Smrg # need to set the values for the 'am__tar' and 'am__untar' variables. 4045d514b0f3Smrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 4046d514b0f3Smrg 4047d514b0f3Smrg for _am_tool in $_am_tools; do 4048d514b0f3Smrg case $_am_tool in 4049d514b0f3Smrg gnutar) 4050d514b0f3Smrg for _am_tar in tar gnutar gtar; do 4051d514b0f3Smrg AM_RUN_LOG([$_am_tar --version]) && break 4052d514b0f3Smrg done 4053d514b0f3Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 4054d514b0f3Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 4055d514b0f3Smrg am__untar="$_am_tar -xf -" 4056d514b0f3Smrg ;; 4057d514b0f3Smrg plaintar) 4058d514b0f3Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 4059d514b0f3Smrg # ustar tarball either. 4060d514b0f3Smrg (tar --version) >/dev/null 2>&1 && continue 4061d514b0f3Smrg am__tar='tar chf - "$$tardir"' 4062d514b0f3Smrg am__tar_='tar chf - "$tardir"' 4063d514b0f3Smrg am__untar='tar xf -' 4064d514b0f3Smrg ;; 4065d514b0f3Smrg pax) 4066d514b0f3Smrg am__tar='pax -L -x $1 -w "$$tardir"' 4067d514b0f3Smrg am__tar_='pax -L -x $1 -w "$tardir"' 4068d514b0f3Smrg am__untar='pax -r' 4069d514b0f3Smrg ;; 4070d514b0f3Smrg cpio) 4071d514b0f3Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 4072d514b0f3Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 4073d514b0f3Smrg am__untar='cpio -i -H $1 -d' 4074d514b0f3Smrg ;; 4075d514b0f3Smrg none) 4076d514b0f3Smrg am__tar=false 4077d514b0f3Smrg am__tar_=false 4078d514b0f3Smrg am__untar=false 4079d514b0f3Smrg ;; 4080d514b0f3Smrg esac 4081d514b0f3Smrg 4082d514b0f3Smrg # If the value was cached, stop now. We just wanted to have am__tar 4083d514b0f3Smrg # and am__untar set. 4084d514b0f3Smrg test -n "${am_cv_prog_tar_$1}" && break 4085d514b0f3Smrg 4086d514b0f3Smrg # tar/untar a dummy directory, and stop if the command works. 4087d514b0f3Smrg rm -rf conftest.dir 4088d514b0f3Smrg mkdir conftest.dir 4089d514b0f3Smrg echo GrepMe > conftest.dir/file 4090d514b0f3Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 4091d514b0f3Smrg rm -rf conftest.dir 4092d514b0f3Smrg if test -s conftest.tar; then 4093d514b0f3Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 4094d514b0f3Smrg AM_RUN_LOG([cat conftest.dir/file]) 4095d514b0f3Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 4096d514b0f3Smrg fi 4097d514b0f3Smrg done 4098d514b0f3Smrg rm -rf conftest.dir 4099d514b0f3Smrg 4100d514b0f3Smrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 4101d514b0f3Smrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 4102d514b0f3Smrg 4103d514b0f3SmrgAC_SUBST([am__tar]) 4104d514b0f3SmrgAC_SUBST([am__untar]) 4105d514b0f3Smrg]) # _AM_PROG_TAR 4106d514b0f3Smrg 4107d514b0f3Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 4108d514b0f3Smrg# 4109d514b0f3Smrg# Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software 4110d514b0f3Smrg# Foundation, Inc. 4111d514b0f3Smrg# Written by Gordon Matzigkeit, 1996 4112d514b0f3Smrg# 4113d514b0f3Smrg# This file is free software; the Free Software Foundation gives 4114d514b0f3Smrg# unlimited permission to copy and/or distribute it, with or without 4115d514b0f3Smrg# modifications, as long as this notice is preserved. 4116d514b0f3Smrg 4117d514b0f3Smrgm4_define([_LT_COPYING], [dnl 4118d514b0f3Smrg# Copyright (C) 2014 Free Software Foundation, Inc. 4119d514b0f3Smrg# This is free software; see the source for copying conditions. There is NO 4120d514b0f3Smrg# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 4121d514b0f3Smrg 4122d514b0f3Smrg# GNU Libtool is free software; you can redistribute it and/or modify 4123d514b0f3Smrg# it under the terms of the GNU General Public License as published by 4124d514b0f3Smrg# the Free Software Foundation; either version 2 of of the License, or 4125d514b0f3Smrg# (at your option) any later version. 4126d514b0f3Smrg# 4127d514b0f3Smrg# As a special exception to the GNU General Public License, if you 4128d514b0f3Smrg# distribute this file as part of a program or library that is built 4129d514b0f3Smrg# using GNU Libtool, you may include this file under the same 4130d514b0f3Smrg# distribution terms that you use for the rest of that program. 4131d514b0f3Smrg# 4132d514b0f3Smrg# GNU Libtool is distributed in the hope that it will be useful, but 4133d514b0f3Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 4134d514b0f3Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 4135d514b0f3Smrg# GNU General Public License for more details. 4136d514b0f3Smrg# 4137d514b0f3Smrg# You should have received a copy of the GNU General Public License 4138d514b0f3Smrg# along with this program. If not, see <http://www.gnu.org/licenses/>. 4139d514b0f3Smrg]) 4140d514b0f3Smrg 4141d514b0f3Smrg# serial 59 LT_INIT 4142d514b0f3Smrg 4143d514b0f3Smrg 4144d514b0f3Smrg# LT_PREREQ(VERSION) 4145d514b0f3Smrg# ------------------ 4146d514b0f3Smrg# Complain and exit if this libtool version is less that VERSION. 4147d514b0f3Smrgm4_defun([LT_PREREQ], 4148d514b0f3Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 4149d514b0f3Smrg [m4_default([$3], 4150d514b0f3Smrg [m4_fatal([Libtool version $1 or higher is required], 4151d514b0f3Smrg 63)])], 4152d514b0f3Smrg [$2])]) 4153d514b0f3Smrg 4154d514b0f3Smrg 4155d514b0f3Smrg# _LT_CHECK_BUILDDIR 4156d514b0f3Smrg# ------------------ 4157d514b0f3Smrg# Complain if the absolute build directory name contains unusual characters 4158d514b0f3Smrgm4_defun([_LT_CHECK_BUILDDIR], 4159d514b0f3Smrg[case `pwd` in 4160d514b0f3Smrg *\ * | *\ *) 4161d514b0f3Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 4162d514b0f3Smrgesac 4163d514b0f3Smrg]) 4164d514b0f3Smrg 4165d514b0f3Smrg 4166d514b0f3Smrg# LT_INIT([OPTIONS]) 4167d514b0f3Smrg# ------------------ 4168d514b0f3SmrgAC_DEFUN([LT_INIT], 4169d514b0f3Smrg[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK 4170d514b0f3SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 4171d514b0f3SmrgAC_BEFORE([$0], [LT_LANG])dnl 4172d514b0f3SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 4173d514b0f3SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 4174d514b0f3Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 4175d514b0f3Smrg 4176d514b0f3Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 4177d514b0f3Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 4178d514b0f3Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 4179d514b0f3Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 4180d514b0f3Smrgdnl unless we require an AC_DEFUNed macro: 4181d514b0f3SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 4182d514b0f3SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 4183d514b0f3SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 4184d514b0f3SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 4185d514b0f3Smrgm4_require([_LT_PROG_LTMAIN])dnl 4186d514b0f3Smrg 4187d514b0f3Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 4188d514b0f3Smrg 4189d514b0f3Smrgdnl Parse OPTIONS 4190d514b0f3Smrg_LT_SET_OPTIONS([$0], [$1]) 4191d514b0f3Smrg 4192d514b0f3Smrg# This can be used to rebuild libtool when needed 4193d514b0f3SmrgLIBTOOL_DEPS=$ltmain 4194d514b0f3Smrg 4195d514b0f3Smrg# Always use our own libtool. 4196d514b0f3SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 4197d514b0f3SmrgAC_SUBST(LIBTOOL)dnl 4198d514b0f3Smrg 4199d514b0f3Smrg_LT_SETUP 4200d514b0f3Smrg 4201d514b0f3Smrg# Only expand once: 4202d514b0f3Smrgm4_define([LT_INIT]) 4203d514b0f3Smrg])# LT_INIT 4204d514b0f3Smrg 4205d514b0f3Smrg# Old names: 4206d514b0f3SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 4207d514b0f3SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 4208d514b0f3Smrgdnl aclocal-1.4 backwards compatibility: 4209d514b0f3Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 4210d514b0f3Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 4211d514b0f3Smrg 4212d514b0f3Smrg 4213d514b0f3Smrg# _LT_PREPARE_CC_BASENAME 4214d514b0f3Smrg# ----------------------- 4215d514b0f3Smrgm4_defun([_LT_PREPARE_CC_BASENAME], [ 4216d514b0f3Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 4217d514b0f3Smrgfunc_cc_basename () 4218d514b0f3Smrg{ 4219d514b0f3Smrg for cc_temp in @S|@*""; do 4220d514b0f3Smrg case $cc_temp in 4221d514b0f3Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 4222d514b0f3Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 4223d514b0f3Smrg \-*) ;; 4224d514b0f3Smrg *) break;; 4225d514b0f3Smrg esac 4226d514b0f3Smrg done 4227d514b0f3Smrg func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 4228d514b0f3Smrg} 4229d514b0f3Smrg])# _LT_PREPARE_CC_BASENAME 4230d514b0f3Smrg 4231d514b0f3Smrg 4232d514b0f3Smrg# _LT_CC_BASENAME(CC) 4233d514b0f3Smrg# ------------------- 4234d514b0f3Smrg# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, 4235d514b0f3Smrg# but that macro is also expanded into generated libtool script, which 4236d514b0f3Smrg# arranges for $SED and $ECHO to be set by different means. 4237d514b0f3Smrgm4_defun([_LT_CC_BASENAME], 4238d514b0f3Smrg[m4_require([_LT_PREPARE_CC_BASENAME])dnl 4239d514b0f3SmrgAC_REQUIRE([_LT_DECL_SED])dnl 4240d514b0f3SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 4241d514b0f3Smrgfunc_cc_basename $1 4242d514b0f3Smrgcc_basename=$func_cc_basename_result 4243d514b0f3Smrg]) 4244d514b0f3Smrg 4245d514b0f3Smrg 4246d514b0f3Smrg# _LT_FILEUTILS_DEFAULTS 4247d514b0f3Smrg# ---------------------- 4248d514b0f3Smrg# It is okay to use these file commands and assume they have been set 4249d514b0f3Smrg# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 4250d514b0f3Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 4251d514b0f3Smrg[: ${CP="cp -f"} 4252d514b0f3Smrg: ${MV="mv -f"} 4253d514b0f3Smrg: ${RM="rm -f"} 4254d514b0f3Smrg])# _LT_FILEUTILS_DEFAULTS 4255d514b0f3Smrg 4256d514b0f3Smrg 4257d514b0f3Smrg# _LT_SETUP 4258d514b0f3Smrg# --------- 4259d514b0f3Smrgm4_defun([_LT_SETUP], 4260d514b0f3Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 4261d514b0f3SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 4262d514b0f3SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 4263d514b0f3SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 4264d514b0f3Smrg 4265d514b0f3Smrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 4266d514b0f3Smrgdnl 4267d514b0f3Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 4268d514b0f3Smrg_LT_DECL([], [host], [0])dnl 4269d514b0f3Smrg_LT_DECL([], [host_os], [0])dnl 4270d514b0f3Smrgdnl 4271d514b0f3Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 4272d514b0f3Smrg_LT_DECL([], [build], [0])dnl 4273d514b0f3Smrg_LT_DECL([], [build_os], [0])dnl 4274d514b0f3Smrgdnl 4275d514b0f3SmrgAC_REQUIRE([AC_PROG_CC])dnl 4276d514b0f3SmrgAC_REQUIRE([LT_PATH_LD])dnl 4277d514b0f3SmrgAC_REQUIRE([LT_PATH_NM])dnl 4278d514b0f3Smrgdnl 4279d514b0f3SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 4280d514b0f3Smrgtest -z "$LN_S" && LN_S="ln -s" 4281d514b0f3Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 4282d514b0f3Smrgdnl 4283d514b0f3SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 4284d514b0f3Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 4285d514b0f3Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 4286d514b0f3Smrgdnl 4287d514b0f3Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 4288d514b0f3Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 4289d514b0f3Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 4290d514b0f3Smrgm4_require([_LT_CMD_RELOAD])dnl 4291d514b0f3Smrgm4_require([_LT_DECL_FILECMD])dnl 4292d514b0f3Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 4293d514b0f3Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 4294d514b0f3Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 4295d514b0f3Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 4296d514b0f3Smrgm4_require([_LT_WITH_SYSROOT])dnl 4297d514b0f3Smrgm4_require([_LT_CMD_TRUNCATE])dnl 4298d514b0f3Smrg 4299d514b0f3Smrg_LT_CONFIG_LIBTOOL_INIT([ 4300d514b0f3Smrg# See if we are running on zsh, and set the options that allow our 4301d514b0f3Smrg# commands through without removal of \ escapes INIT. 4302d514b0f3Smrgif test -n "\${ZSH_VERSION+set}"; then 4303d514b0f3Smrg setopt NO_GLOB_SUBST 4304d514b0f3Smrgfi 4305d514b0f3Smrg]) 4306d514b0f3Smrgif test -n "${ZSH_VERSION+set}"; then 4307d514b0f3Smrg setopt NO_GLOB_SUBST 4308d514b0f3Smrgfi 4309d514b0f3Smrg 4310d514b0f3Smrg_LT_CHECK_OBJDIR 4311d514b0f3Smrg 4312d514b0f3Smrgm4_require([_LT_TAG_COMPILER])dnl 4313d514b0f3Smrg 4314d514b0f3Smrgcase $host_os in 4315d514b0f3Smrgaix3*) 4316d514b0f3Smrg # AIX sometimes has problems with the GCC collect2 program. For some 4317d514b0f3Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 4318d514b0f3Smrg # vanish in a puff of smoke. 4319d514b0f3Smrg if test set != "${COLLECT_NAMES+set}"; then 4320d514b0f3Smrg COLLECT_NAMES= 4321d514b0f3Smrg export COLLECT_NAMES 4322d514b0f3Smrg fi 4323d514b0f3Smrg ;; 4324d514b0f3Smrgesac 4325d514b0f3Smrg 4326d514b0f3Smrg# Global variables: 4327d514b0f3Smrgofile=libtool 4328d514b0f3Smrgcan_build_shared=yes 4329d514b0f3Smrg 4330d514b0f3Smrg# All known linkers require a '.a' archive for static linking (except MSVC and 4331d514b0f3Smrg# ICC, which need '.lib'). 4332d514b0f3Smrglibext=a 4333d514b0f3Smrg 4334d514b0f3Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 4335d514b0f3Smrg 4336d514b0f3Smrgold_CC=$CC 4337d514b0f3Smrgold_CFLAGS=$CFLAGS 4338d514b0f3Smrg 4339d514b0f3Smrg# Set sane defaults for various variables 4340d514b0f3Smrgtest -z "$CC" && CC=cc 4341d514b0f3Smrgtest -z "$LTCC" && LTCC=$CC 4342d514b0f3Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 4343d514b0f3Smrgtest -z "$LD" && LD=ld 4344d514b0f3Smrgtest -z "$ac_objext" && ac_objext=o 4345d514b0f3Smrg 4346d514b0f3Smrg_LT_CC_BASENAME([$compiler]) 4347d514b0f3Smrg 4348d514b0f3Smrg# Only perform the check for file, if the check method requires it 4349d514b0f3Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 4350d514b0f3Smrgcase $deplibs_check_method in 4351d514b0f3Smrgfile_magic*) 4352d514b0f3Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 4353d514b0f3Smrg _LT_PATH_MAGIC 4354d514b0f3Smrg fi 4355d514b0f3Smrg ;; 4356d514b0f3Smrgesac 4357d514b0f3Smrg 4358d514b0f3Smrg# Use C for the default configuration in the libtool script 4359d514b0f3SmrgLT_SUPPORTED_TAG([CC]) 4360d514b0f3Smrg_LT_LANG_C_CONFIG 4361d514b0f3Smrg_LT_LANG_DEFAULT_CONFIG 4362d514b0f3Smrg_LT_CONFIG_COMMANDS 4363d514b0f3Smrg])# _LT_SETUP 4364d514b0f3Smrg 4365d514b0f3Smrg 4366d514b0f3Smrg# _LT_PREPARE_SED_QUOTE_VARS 4367d514b0f3Smrg# -------------------------- 4368d514b0f3Smrg# Define a few sed substitution that help us do robust quoting. 4369d514b0f3Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 4370d514b0f3Smrg[# Backslashify metacharacters that are still active within 4371d514b0f3Smrg# double-quoted strings. 4372d514b0f3Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 4373d514b0f3Smrg 4374d514b0f3Smrg# Same as above, but do not quote variable references. 4375d514b0f3Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 4376d514b0f3Smrg 4377d514b0f3Smrg# Sed substitution to delay expansion of an escaped shell variable in a 4378d514b0f3Smrg# double_quote_subst'ed string. 4379d514b0f3Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 4380d514b0f3Smrg 4381d514b0f3Smrg# Sed substitution to delay expansion of an escaped single quote. 4382d514b0f3Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 4383d514b0f3Smrg 4384d514b0f3Smrg# Sed substitution to avoid accidental globbing in evaled expressions 4385d514b0f3Smrgno_glob_subst='s/\*/\\\*/g' 4386d514b0f3Smrg]) 4387d514b0f3Smrg 4388d514b0f3Smrg# _LT_PROG_LTMAIN 4389d514b0f3Smrg# --------------- 4390d514b0f3Smrg# Note that this code is called both from 'configure', and 'config.status' 4391d514b0f3Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 4392d514b0f3Smrg# 'config.status' has no value for ac_aux_dir unless we are using Automake, 4393d514b0f3Smrg# so we pass a copy along to make sure it has a sensible value anyway. 4394d514b0f3Smrgm4_defun([_LT_PROG_LTMAIN], 4395d514b0f3Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 4396d514b0f3Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 4397d514b0f3Smrgltmain=$ac_aux_dir/ltmain.sh 4398d514b0f3Smrg])# _LT_PROG_LTMAIN 4399d514b0f3Smrg 4400d514b0f3Smrg 4401d514b0f3Smrg 4402d514b0f3Smrg# So that we can recreate a full libtool script including additional 4403d514b0f3Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 4404d514b0f3Smrg# in macros and then make a single call at the end using the 'libtool' 4405d514b0f3Smrg# label. 4406d514b0f3Smrg 4407d514b0f3Smrg 4408d514b0f3Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 4409d514b0f3Smrg# ---------------------------------------- 4410d514b0f3Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 4411d514b0f3Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 4412d514b0f3Smrg[m4_ifval([$1], 4413d514b0f3Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 4414d514b0f3Smrg [$1 4415d514b0f3Smrg])])]) 4416d514b0f3Smrg 4417d514b0f3Smrg# Initialize. 4418d514b0f3Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 4419d514b0f3Smrg 4420d514b0f3Smrg 4421d514b0f3Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 4422d514b0f3Smrg# ------------------------------ 4423d514b0f3Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 4424d514b0f3Smrgm4_define([_LT_CONFIG_LIBTOOL], 4425d514b0f3Smrg[m4_ifval([$1], 4426d514b0f3Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 4427d514b0f3Smrg [$1 4428d514b0f3Smrg])])]) 4429d514b0f3Smrg 4430d514b0f3Smrg# Initialize. 4431d514b0f3Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 4432d514b0f3Smrg 4433d514b0f3Smrg 4434d514b0f3Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 4435d514b0f3Smrg# ----------------------------------------------------- 4436d514b0f3Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 4437d514b0f3Smrg[_LT_CONFIG_LIBTOOL([$1]) 4438d514b0f3Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 4439d514b0f3Smrg]) 4440d514b0f3Smrg 4441d514b0f3Smrg 4442d514b0f3Smrg# _LT_FORMAT_COMMENT([COMMENT]) 4443d514b0f3Smrg# ----------------------------- 4444d514b0f3Smrg# Add leading comment marks to the start of each line, and a trailing 4445d514b0f3Smrg# full-stop to the whole comment if one is not present already. 4446d514b0f3Smrgm4_define([_LT_FORMAT_COMMENT], 4447d514b0f3Smrg[m4_ifval([$1], [ 4448d514b0f3Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 4449d514b0f3Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 4450d514b0f3Smrg)]) 4451d514b0f3Smrg 4452d514b0f3Smrg 4453d514b0f3Smrg 4454d514b0f3Smrg 4455d514b0f3Smrg 4456d514b0f3Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 4457d514b0f3Smrg# ------------------------------------------------------------------- 4458d514b0f3Smrg# CONFIGNAME is the name given to the value in the libtool script. 4459d514b0f3Smrg# VARNAME is the (base) name used in the configure script. 4460d514b0f3Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 4461d514b0f3Smrg# VARNAME. Any other value will be used directly. 4462d514b0f3Smrgm4_define([_LT_DECL], 4463d514b0f3Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 4464d514b0f3Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 4465d514b0f3Smrg [m4_ifval([$1], [$1], [$2])]) 4466d514b0f3Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 4467d514b0f3Smrg m4_ifval([$4], 4468d514b0f3Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 4469d514b0f3Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 4470d514b0f3Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 4471d514b0f3Smrg]) 4472d514b0f3Smrg 4473d514b0f3Smrg 4474d514b0f3Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 4475d514b0f3Smrg# -------------------------------------------------------- 4476d514b0f3Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 4477d514b0f3Smrg 4478d514b0f3Smrg 4479d514b0f3Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 4480d514b0f3Smrg# ------------------------------------------------ 4481d514b0f3Smrgm4_define([lt_decl_tag_varnames], 4482d514b0f3Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 4483d514b0f3Smrg 4484d514b0f3Smrg 4485d514b0f3Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 4486d514b0f3Smrg# --------------------------------------------------------- 4487d514b0f3Smrgm4_define([_lt_decl_filter], 4488d514b0f3Smrg[m4_case([$#], 4489d514b0f3Smrg [0], [m4_fatal([$0: too few arguments: $#])], 4490d514b0f3Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 4491d514b0f3Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 4492d514b0f3Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 4493d514b0f3Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 4494d514b0f3Smrg]) 4495d514b0f3Smrg 4496d514b0f3Smrg 4497d514b0f3Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 4498d514b0f3Smrg# -------------------------------------------------- 4499d514b0f3Smrgm4_define([lt_decl_quote_varnames], 4500d514b0f3Smrg[_lt_decl_filter([value], [1], $@)]) 4501d514b0f3Smrg 4502d514b0f3Smrg 4503d514b0f3Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 4504d514b0f3Smrg# --------------------------------------------------- 4505d514b0f3Smrgm4_define([lt_decl_dquote_varnames], 4506d514b0f3Smrg[_lt_decl_filter([value], [2], $@)]) 4507d514b0f3Smrg 4508d514b0f3Smrg 4509d514b0f3Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 4510d514b0f3Smrg# --------------------------------------------------- 4511d514b0f3Smrgm4_define([lt_decl_varnames_tagged], 4512d514b0f3Smrg[m4_assert([$# <= 2])dnl 4513d514b0f3Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 4514d514b0f3Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 4515d514b0f3Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 4516d514b0f3Smrgm4_define([_lt_decl_varnames_tagged], 4517d514b0f3Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 4518d514b0f3Smrg 4519d514b0f3Smrg 4520d514b0f3Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 4521d514b0f3Smrg# ------------------------------------------------ 4522d514b0f3Smrgm4_define([lt_decl_all_varnames], 4523d514b0f3Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 4524d514b0f3Smrg m4_if([$2], [], 4525d514b0f3Smrg m4_quote(lt_decl_varnames), 4526d514b0f3Smrg m4_quote(m4_shift($@))))[]dnl 4527d514b0f3Smrg]) 4528d514b0f3Smrgm4_define([_lt_decl_all_varnames], 4529d514b0f3Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 4530d514b0f3Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 4531d514b0f3Smrg]) 4532d514b0f3Smrg 4533d514b0f3Smrg 4534d514b0f3Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 4535d514b0f3Smrg# ------------------------------------ 4536d514b0f3Smrg# Quote a variable value, and forward it to 'config.status' so that its 4537d514b0f3Smrg# declaration there will have the same value as in 'configure'. VARNAME 4538d514b0f3Smrg# must have a single quote delimited value for this to work. 4539d514b0f3Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 4540d514b0f3Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 4541d514b0f3Smrg 4542d514b0f3Smrg 4543d514b0f3Smrg# _LT_CONFIG_STATUS_DECLARATIONS 4544d514b0f3Smrg# ------------------------------ 4545d514b0f3Smrg# We delimit libtool config variables with single quotes, so when 4546d514b0f3Smrg# we write them to config.status, we have to be sure to quote all 4547d514b0f3Smrg# embedded single quotes properly. In configure, this macro expands 4548d514b0f3Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 4549d514b0f3Smrg# 4550d514b0f3Smrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 4551d514b0f3Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 4552d514b0f3Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 4553d514b0f3Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 4554d514b0f3Smrg 4555d514b0f3Smrg 4556d514b0f3Smrg# _LT_LIBTOOL_TAGS 4557d514b0f3Smrg# ---------------- 4558d514b0f3Smrg# Output comment and list of tags supported by the script 4559d514b0f3Smrgm4_defun([_LT_LIBTOOL_TAGS], 4560d514b0f3Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 4561d514b0f3Smrgavailable_tags='_LT_TAGS'dnl 4562d514b0f3Smrg]) 4563d514b0f3Smrg 4564d514b0f3Smrg 4565d514b0f3Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 4566d514b0f3Smrg# ----------------------------------- 4567d514b0f3Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 4568d514b0f3Smrg# expand to a commented shell variable setting: 4569d514b0f3Smrg# 4570d514b0f3Smrg# # Some comment about what VAR is for. 4571d514b0f3Smrg# visible_name=$lt_internal_name 4572d514b0f3Smrgm4_define([_LT_LIBTOOL_DECLARE], 4573d514b0f3Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 4574d514b0f3Smrg [description])))[]dnl 4575d514b0f3Smrgm4_pushdef([_libtool_name], 4576d514b0f3Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 4577d514b0f3Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 4578d514b0f3Smrg [0], [_libtool_name=[$]$1], 4579d514b0f3Smrg [1], [_libtool_name=$lt_[]$1], 4580d514b0f3Smrg [2], [_libtool_name=$lt_[]$1], 4581d514b0f3Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 4582d514b0f3Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 4583d514b0f3Smrg]) 4584d514b0f3Smrg 4585d514b0f3Smrg 4586d514b0f3Smrg# _LT_LIBTOOL_CONFIG_VARS 4587d514b0f3Smrg# ----------------------- 4588d514b0f3Smrg# Produce commented declarations of non-tagged libtool config variables 4589d514b0f3Smrg# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 4590d514b0f3Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 4591d514b0f3Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 4592d514b0f3Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 4593d514b0f3Smrg[m4_foreach([_lt_var], 4594d514b0f3Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 4595d514b0f3Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 4596d514b0f3Smrg 4597d514b0f3Smrg 4598d514b0f3Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 4599d514b0f3Smrg# ------------------------- 4600d514b0f3Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 4601d514b0f3Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 4602d514b0f3Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 4603d514b0f3Smrg 4604d514b0f3Smrg 4605d514b0f3Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 4606d514b0f3Smrg# ------------------------------ 4607d514b0f3Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 4608d514b0f3Smrg 4609d514b0f3Smrg 4610d514b0f3Smrg# _LT_CONFIG_COMMANDS 4611d514b0f3Smrg# ------------------- 4612d514b0f3Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 4613d514b0f3Smrg# variables for single and double quote escaping we saved from calls 4614d514b0f3Smrg# to _LT_DECL, we can put quote escaped variables declarations 4615d514b0f3Smrg# into 'config.status', and then the shell code to quote escape them in 4616d514b0f3Smrg# for loops in 'config.status'. Finally, any additional code accumulated 4617d514b0f3Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 4618d514b0f3Smrgm4_defun([_LT_CONFIG_COMMANDS], 4619d514b0f3Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 4620d514b0f3Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 4621d514b0f3Smrg dnl instead of duplicating it all over again into config.status, 4622d514b0f3Smrg dnl then we will have config.status run $CONFIG_LT later, so it 4623d514b0f3Smrg dnl needs to know what name is stored there: 4624d514b0f3Smrg [AC_CONFIG_COMMANDS([libtool], 4625d514b0f3Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 4626d514b0f3Smrg dnl If the libtool generation code is destined for config.status, 4627d514b0f3Smrg dnl expand the accumulated commands and init code now: 4628d514b0f3Smrg [AC_CONFIG_COMMANDS([libtool], 4629d514b0f3Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 4630d514b0f3Smrg])#_LT_CONFIG_COMMANDS 4631d514b0f3Smrg 4632d514b0f3Smrg 4633d514b0f3Smrg# Initialize. 4634d514b0f3Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 4635d514b0f3Smrg[ 4636d514b0f3Smrg 4637d514b0f3Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 4638d514b0f3Smrg# if CDPATH is set. 4639d514b0f3Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 4640d514b0f3Smrg 4641d514b0f3Smrgsed_quote_subst='$sed_quote_subst' 4642d514b0f3Smrgdouble_quote_subst='$double_quote_subst' 4643d514b0f3Smrgdelay_variable_subst='$delay_variable_subst' 4644d514b0f3Smrg_LT_CONFIG_STATUS_DECLARATIONS 4645d514b0f3SmrgLTCC='$LTCC' 4646d514b0f3SmrgLTCFLAGS='$LTCFLAGS' 4647d514b0f3Smrgcompiler='$compiler_DEFAULT' 4648d514b0f3Smrg 4649d514b0f3Smrg# A function that is used when there is no print builtin or printf. 4650d514b0f3Smrgfunc_fallback_echo () 4651d514b0f3Smrg{ 4652d514b0f3Smrg eval 'cat <<_LTECHO_EOF 4653d514b0f3Smrg\$[]1 4654d514b0f3Smrg_LTECHO_EOF' 4655d514b0f3Smrg} 4656d514b0f3Smrg 4657d514b0f3Smrg# Quote evaled strings. 4658d514b0f3Smrgfor var in lt_decl_all_varnames([[ \ 4659d514b0f3Smrg]], lt_decl_quote_varnames); do 4660d514b0f3Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 4661d514b0f3Smrg *[[\\\\\\\`\\"\\\$]]*) 4662d514b0f3Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 4663d514b0f3Smrg ;; 4664d514b0f3Smrg *) 4665d514b0f3Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 4666d514b0f3Smrg ;; 4667d514b0f3Smrg esac 4668d514b0f3Smrgdone 4669d514b0f3Smrg 4670d514b0f3Smrg# Double-quote double-evaled strings. 4671d514b0f3Smrgfor var in lt_decl_all_varnames([[ \ 4672d514b0f3Smrg]], lt_decl_dquote_varnames); do 4673d514b0f3Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 4674d514b0f3Smrg *[[\\\\\\\`\\"\\\$]]*) 4675d514b0f3Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 4676d514b0f3Smrg ;; 4677d514b0f3Smrg *) 4678d514b0f3Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 4679d514b0f3Smrg ;; 4680d514b0f3Smrg esac 4681d514b0f3Smrgdone 4682d514b0f3Smrg 4683d514b0f3Smrg_LT_OUTPUT_LIBTOOL_INIT 4684d514b0f3Smrg]) 4685d514b0f3Smrg 4686d514b0f3Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 4687d514b0f3Smrg# ------------------------------------ 4688d514b0f3Smrg# Generate a child script FILE with all initialization necessary to 4689d514b0f3Smrg# reuse the environment learned by the parent script, and make the 4690d514b0f3Smrg# file executable. If COMMENT is supplied, it is inserted after the 4691d514b0f3Smrg# '#!' sequence but before initialization text begins. After this 4692d514b0f3Smrg# macro, additional text can be appended to FILE to form the body of 4693d514b0f3Smrg# the child script. The macro ends with non-zero status if the 4694d514b0f3Smrg# file could not be fully written (such as if the disk is full). 4695d514b0f3Smrgm4_ifdef([AS_INIT_GENERATED], 4696d514b0f3Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 4697d514b0f3Smrg[m4_defun([_LT_GENERATED_FILE_INIT], 4698d514b0f3Smrg[m4_require([AS_PREPARE])]dnl 4699d514b0f3Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 4700d514b0f3Smrg[lt_write_fail=0 4701d514b0f3Smrgcat >$1 <<_ASEOF || lt_write_fail=1 4702d514b0f3Smrg#! $SHELL 4703d514b0f3Smrg# Generated by $as_me. 4704d514b0f3Smrg$2 4705d514b0f3SmrgSHELL=\${CONFIG_SHELL-$SHELL} 4706d514b0f3Smrgexport SHELL 4707d514b0f3Smrg_ASEOF 4708d514b0f3Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1 4709d514b0f3SmrgAS_SHELL_SANITIZE 4710d514b0f3Smrg_AS_PREPARE 4711d514b0f3Smrgexec AS_MESSAGE_FD>&1 4712d514b0f3Smrg_ASEOF 4713d514b0f3Smrgtest 0 = "$lt_write_fail" && chmod +x $1[]dnl 4714d514b0f3Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 4715d514b0f3Smrg 4716d514b0f3Smrg# LT_OUTPUT 4717d514b0f3Smrg# --------- 4718d514b0f3Smrg# This macro allows early generation of the libtool script (before 4719d514b0f3Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 4720d514b0f3Smrg# tests. 4721d514b0f3SmrgAC_DEFUN([LT_OUTPUT], 4722d514b0f3Smrg[: ${CONFIG_LT=./config.lt} 4723d514b0f3SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 4724d514b0f3Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 4725d514b0f3Smrg[# Run this file to recreate a libtool stub with the current configuration.]) 4726d514b0f3Smrg 4727d514b0f3Smrgcat >>"$CONFIG_LT" <<\_LTEOF 4728d514b0f3Smrglt_cl_silent=false 4729d514b0f3Smrgexec AS_MESSAGE_LOG_FD>>config.log 4730d514b0f3Smrg{ 4731d514b0f3Smrg echo 4732d514b0f3Smrg AS_BOX([Running $as_me.]) 4733d514b0f3Smrg} >&AS_MESSAGE_LOG_FD 4734d514b0f3Smrg 4735d514b0f3Smrglt_cl_help="\ 4736d514b0f3Smrg'$as_me' creates a local libtool stub from the current configuration, 4737d514b0f3Smrgfor use in further configure time tests before the real libtool is 4738d514b0f3Smrggenerated. 4739d514b0f3Smrg 4740d514b0f3SmrgUsage: $[0] [[OPTIONS]] 4741d514b0f3Smrg 4742d514b0f3Smrg -h, --help print this help, then exit 4743d514b0f3Smrg -V, --version print version number, then exit 4744d514b0f3Smrg -q, --quiet do not print progress messages 4745d514b0f3Smrg -d, --debug don't remove temporary files 4746d514b0f3Smrg 4747d514b0f3SmrgReport bugs to <bug-libtool@gnu.org>." 4748d514b0f3Smrg 4749d514b0f3Smrglt_cl_version="\ 4750d514b0f3Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 4751d514b0f3Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 4752d514b0f3Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 4753d514b0f3Smrg 4754d514b0f3SmrgCopyright (C) 2011 Free Software Foundation, Inc. 4755d514b0f3SmrgThis config.lt script is free software; the Free Software Foundation 4756d514b0f3Smrggives unlimited permision to copy, distribute and modify it." 4757d514b0f3Smrg 4758d514b0f3Smrgwhile test 0 != $[#] 4759d514b0f3Smrgdo 4760d514b0f3Smrg case $[1] in 4761d514b0f3Smrg --version | --v* | -V ) 4762d514b0f3Smrg echo "$lt_cl_version"; exit 0 ;; 4763d514b0f3Smrg --help | --h* | -h ) 4764d514b0f3Smrg echo "$lt_cl_help"; exit 0 ;; 4765d514b0f3Smrg --debug | --d* | -d ) 4766d514b0f3Smrg debug=: ;; 4767d514b0f3Smrg --quiet | --q* | --silent | --s* | -q ) 4768d514b0f3Smrg lt_cl_silent=: ;; 4769d514b0f3Smrg 4770d514b0f3Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 4771d514b0f3SmrgTry '$[0] --help' for more information.]) ;; 4772d514b0f3Smrg 4773d514b0f3Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 4774d514b0f3SmrgTry '$[0] --help' for more information.]) ;; 4775d514b0f3Smrg esac 4776d514b0f3Smrg shift 4777d514b0f3Smrgdone 4778d514b0f3Smrg 4779d514b0f3Smrgif $lt_cl_silent; then 4780d514b0f3Smrg exec AS_MESSAGE_FD>/dev/null 4781d514b0f3Smrgfi 4782d514b0f3Smrg_LTEOF 4783d514b0f3Smrg 4784d514b0f3Smrgcat >>"$CONFIG_LT" <<_LTEOF 4785d514b0f3Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 4786d514b0f3Smrg_LTEOF 4787d514b0f3Smrg 4788d514b0f3Smrgcat >>"$CONFIG_LT" <<\_LTEOF 4789d514b0f3SmrgAC_MSG_NOTICE([creating $ofile]) 4790d514b0f3Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 4791d514b0f3SmrgAS_EXIT(0) 4792d514b0f3Smrg_LTEOF 4793d514b0f3Smrgchmod +x "$CONFIG_LT" 4794d514b0f3Smrg 4795d514b0f3Smrg# configure is writing to config.log, but config.lt does its own redirection, 4796d514b0f3Smrg# appending to config.log, which fails on DOS, as config.log is still kept 4797d514b0f3Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 4798d514b0f3Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 4799d514b0f3Smrglt_cl_success=: 4800d514b0f3Smrgtest yes = "$silent" && 4801d514b0f3Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 4802d514b0f3Smrgexec AS_MESSAGE_LOG_FD>/dev/null 4803d514b0f3Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 4804d514b0f3Smrgexec AS_MESSAGE_LOG_FD>>config.log 4805d514b0f3Smrg$lt_cl_success || AS_EXIT(1) 4806d514b0f3Smrg])# LT_OUTPUT 4807d514b0f3Smrg 4808d514b0f3Smrg 4809d514b0f3Smrg# _LT_CONFIG(TAG) 4810d514b0f3Smrg# --------------- 4811d514b0f3Smrg# If TAG is the built-in tag, create an initial libtool script with a 4812d514b0f3Smrg# default configuration from the untagged config vars. Otherwise add code 4813d514b0f3Smrg# to config.status for appending the configuration named by TAG from the 4814d514b0f3Smrg# matching tagged config vars. 4815d514b0f3Smrgm4_defun([_LT_CONFIG], 4816d514b0f3Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 4817d514b0f3Smrg_LT_CONFIG_SAVE_COMMANDS([ 4818d514b0f3Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 4819d514b0f3Smrg m4_if(_LT_TAG, [C], [ 4820d514b0f3Smrg # See if we are running on zsh, and set the options that allow our 4821d514b0f3Smrg # commands through without removal of \ escapes. 4822d514b0f3Smrg if test -n "${ZSH_VERSION+set}"; then 4823d514b0f3Smrg setopt NO_GLOB_SUBST 4824d514b0f3Smrg fi 4825d514b0f3Smrg 4826d514b0f3Smrg cfgfile=${ofile}T 4827d514b0f3Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 4828d514b0f3Smrg $RM "$cfgfile" 4829d514b0f3Smrg 4830d514b0f3Smrg cat <<_LT_EOF >> "$cfgfile" 4831d514b0f3Smrg#! $SHELL 4832d514b0f3Smrg# Generated automatically by $as_me ($PACKAGE) $VERSION 4833d514b0f3Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 4834d514b0f3Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 4835d514b0f3Smrg 4836d514b0f3Smrg# Provide generalized library-building support services. 4837d514b0f3Smrg# Written by Gordon Matzigkeit, 1996 4838d514b0f3Smrg 4839d514b0f3Smrg_LT_COPYING 4840d514b0f3Smrg_LT_LIBTOOL_TAGS 4841d514b0f3Smrg 4842d514b0f3Smrg# Configured defaults for sys_lib_dlsearch_path munging. 4843d514b0f3Smrg: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 4844d514b0f3Smrg 4845d514b0f3Smrg# ### BEGIN LIBTOOL CONFIG 4846d514b0f3Smrg_LT_LIBTOOL_CONFIG_VARS 4847d514b0f3Smrg_LT_LIBTOOL_TAG_VARS 4848d514b0f3Smrg# ### END LIBTOOL CONFIG 4849d514b0f3Smrg 4850d514b0f3Smrg_LT_EOF 4851d514b0f3Smrg 4852d514b0f3Smrg cat <<'_LT_EOF' >> "$cfgfile" 4853d514b0f3Smrg 4854d514b0f3Smrg# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 4855d514b0f3Smrg 4856d514b0f3Smrg_LT_PREPARE_MUNGE_PATH_LIST 4857d514b0f3Smrg_LT_PREPARE_CC_BASENAME 4858d514b0f3Smrg 4859d514b0f3Smrg# ### END FUNCTIONS SHARED WITH CONFIGURE 4860d514b0f3Smrg 4861d514b0f3Smrg_LT_EOF 4862d514b0f3Smrg 4863d514b0f3Smrg case $host_os in 4864d514b0f3Smrg aix3*) 4865d514b0f3Smrg cat <<\_LT_EOF >> "$cfgfile" 4866d514b0f3Smrg# AIX sometimes has problems with the GCC collect2 program. For some 4867d514b0f3Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 4868d514b0f3Smrg# vanish in a puff of smoke. 4869d514b0f3Smrgif test set != "${COLLECT_NAMES+set}"; then 4870d514b0f3Smrg COLLECT_NAMES= 4871d514b0f3Smrg export COLLECT_NAMES 4872d514b0f3Smrgfi 4873d514b0f3Smrg_LT_EOF 4874d514b0f3Smrg ;; 4875d514b0f3Smrg esac 4876d514b0f3Smrg 4877d514b0f3Smrg _LT_PROG_LTMAIN 4878d514b0f3Smrg 4879d514b0f3Smrg # We use sed instead of cat because bash on DJGPP gets confused if 4880d514b0f3Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 4881d514b0f3Smrg # text mode, it properly converts lines to CR/LF. This bash problem 4882d514b0f3Smrg # is reportedly fixed, but why not run on old versions too? 4883d514b0f3Smrg $SED '$q' "$ltmain" >> "$cfgfile" \ 4884d514b0f3Smrg || (rm -f "$cfgfile"; exit 1) 4885d514b0f3Smrg 4886d514b0f3Smrg mv -f "$cfgfile" "$ofile" || 4887d514b0f3Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 4888d514b0f3Smrg chmod +x "$ofile" 4889d514b0f3Smrg], 4890d514b0f3Smrg[cat <<_LT_EOF >> "$ofile" 4891d514b0f3Smrg 4892d514b0f3Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 4893d514b0f3Smrgdnl in a comment (ie after a #). 4894d514b0f3Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 4895d514b0f3Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 4896d514b0f3Smrg# ### END LIBTOOL TAG CONFIG: $1 4897d514b0f3Smrg_LT_EOF 4898d514b0f3Smrg])dnl /m4_if 4899d514b0f3Smrg], 4900d514b0f3Smrg[m4_if([$1], [], [ 4901d514b0f3Smrg PACKAGE='$PACKAGE' 4902d514b0f3Smrg VERSION='$VERSION' 4903d514b0f3Smrg RM='$RM' 4904d514b0f3Smrg ofile='$ofile'], []) 4905d514b0f3Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 4906d514b0f3Smrg])# _LT_CONFIG 4907d514b0f3Smrg 4908d514b0f3Smrg 4909d514b0f3Smrg# LT_SUPPORTED_TAG(TAG) 4910d514b0f3Smrg# --------------------- 4911d514b0f3Smrg# Trace this macro to discover what tags are supported by the libtool 4912d514b0f3Smrg# --tag option, using: 4913d514b0f3Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 4914d514b0f3SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 4915d514b0f3Smrg 4916d514b0f3Smrg 4917d514b0f3Smrg# C support is built-in for now 4918d514b0f3Smrgm4_define([_LT_LANG_C_enabled], []) 4919d514b0f3Smrgm4_define([_LT_TAGS], []) 4920d514b0f3Smrg 4921d514b0f3Smrg 4922d514b0f3Smrg# LT_LANG(LANG) 4923d514b0f3Smrg# ------------- 4924d514b0f3Smrg# Enable libtool support for the given language if not already enabled. 4925d514b0f3SmrgAC_DEFUN([LT_LANG], 4926d514b0f3Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 4927d514b0f3Smrgm4_case([$1], 4928d514b0f3Smrg [C], [_LT_LANG(C)], 4929d514b0f3Smrg [C++], [_LT_LANG(CXX)], 4930d514b0f3Smrg [Go], [_LT_LANG(GO)], 4931d514b0f3Smrg [Java], [_LT_LANG(GCJ)], 4932d514b0f3Smrg [Fortran 77], [_LT_LANG(F77)], 4933d514b0f3Smrg [Fortran], [_LT_LANG(FC)], 4934d514b0f3Smrg [Windows Resource], [_LT_LANG(RC)], 4935d514b0f3Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 4936d514b0f3Smrg [_LT_LANG($1)], 4937d514b0f3Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 4938d514b0f3Smrg])# LT_LANG 4939d514b0f3Smrg 4940d514b0f3Smrg 4941d514b0f3Smrg# _LT_LANG(LANGNAME) 4942d514b0f3Smrg# ------------------ 4943d514b0f3Smrgm4_defun([_LT_LANG], 4944d514b0f3Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 4945d514b0f3Smrg [LT_SUPPORTED_TAG([$1])dnl 4946d514b0f3Smrg m4_append([_LT_TAGS], [$1 ])dnl 4947d514b0f3Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 4948d514b0f3Smrg _LT_LANG_$1_CONFIG($1)])dnl 4949d514b0f3Smrg])# _LT_LANG 4950d514b0f3Smrg 4951d514b0f3Smrg 4952d514b0f3Smrgm4_ifndef([AC_PROG_GO], [ 4953d514b0f3Smrg# NOTE: This macro has been submitted for inclusion into # 4954d514b0f3Smrg# GNU Autoconf as AC_PROG_GO. When it is available in # 4955d514b0f3Smrg# a released version of Autoconf we should remove this # 4956d514b0f3Smrg# macro and use it instead. # 4957d514b0f3Smrgm4_defun([AC_PROG_GO], 4958d514b0f3Smrg[AC_LANG_PUSH(Go)dnl 4959d514b0f3SmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 4960d514b0f3SmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 4961d514b0f3Smrg_AC_ARG_VAR_LDFLAGS()dnl 4962d514b0f3SmrgAC_CHECK_TOOL(GOC, gccgo) 4963d514b0f3Smrgif test -z "$GOC"; then 4964d514b0f3Smrg if test -n "$ac_tool_prefix"; then 4965d514b0f3Smrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 4966d514b0f3Smrg fi 4967d514b0f3Smrgfi 4968d514b0f3Smrgif test -z "$GOC"; then 4969d514b0f3Smrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 4970d514b0f3Smrgfi 4971d514b0f3Smrg])#m4_defun 4972d514b0f3Smrg])#m4_ifndef 4973d514b0f3Smrg 4974d514b0f3Smrg 4975d514b0f3Smrg# _LT_LANG_DEFAULT_CONFIG 4976d514b0f3Smrg# ----------------------- 4977d514b0f3Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 4978d514b0f3Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 4979d514b0f3Smrg [LT_LANG(CXX)], 4980d514b0f3Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 4981d514b0f3Smrg 4982d514b0f3SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 4983d514b0f3Smrg [LT_LANG(F77)], 4984d514b0f3Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 4985d514b0f3Smrg 4986d514b0f3SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 4987d514b0f3Smrg [LT_LANG(FC)], 4988d514b0f3Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 4989d514b0f3Smrg 4990d514b0f3Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 4991d514b0f3Smrgdnl pulling things in needlessly. 4992d514b0f3SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 4993d514b0f3Smrg [LT_LANG(GCJ)], 4994d514b0f3Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 4995d514b0f3Smrg [LT_LANG(GCJ)], 4996d514b0f3Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 4997d514b0f3Smrg [LT_LANG(GCJ)], 4998d514b0f3Smrg [m4_ifdef([AC_PROG_GCJ], 4999d514b0f3Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 5000d514b0f3Smrg m4_ifdef([A][M_PROG_GCJ], 5001d514b0f3Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 5002d514b0f3Smrg m4_ifdef([LT_PROG_GCJ], 5003d514b0f3Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 5004d514b0f3Smrg 5005d514b0f3SmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 5006d514b0f3Smrg [LT_LANG(GO)], 5007d514b0f3Smrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 5008d514b0f3Smrg 5009d514b0f3SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 5010d514b0f3Smrg [LT_LANG(RC)], 5011d514b0f3Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 5012d514b0f3Smrg])# _LT_LANG_DEFAULT_CONFIG 5013d514b0f3Smrg 5014d514b0f3Smrg# Obsolete macros: 5015d514b0f3SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 5016d514b0f3SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 5017d514b0f3SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 5018d514b0f3SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 5019d514b0f3SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 5020d514b0f3Smrgdnl aclocal-1.4 backwards compatibility: 5021d514b0f3Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 5022d514b0f3Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 5023d514b0f3Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 5024d514b0f3Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 5025d514b0f3Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 5026d514b0f3Smrg 5027d514b0f3Smrg 5028d514b0f3Smrg# _LT_TAG_COMPILER 5029d514b0f3Smrg# ---------------- 5030d514b0f3Smrgm4_defun([_LT_TAG_COMPILER], 5031d514b0f3Smrg[AC_REQUIRE([AC_PROG_CC])dnl 5032d514b0f3Smrg 5033d514b0f3Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 5034d514b0f3Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 5035d514b0f3Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 5036d514b0f3Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 5037d514b0f3Smrg 5038d514b0f3Smrg# If no C compiler was specified, use CC. 5039d514b0f3SmrgLTCC=${LTCC-"$CC"} 5040d514b0f3Smrg 5041d514b0f3Smrg# If no C compiler flags were specified, use CFLAGS. 5042d514b0f3SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 5043d514b0f3Smrg 5044d514b0f3Smrg# Allow CC to be a program name with arguments. 5045d514b0f3Smrgcompiler=$CC 5046d514b0f3Smrg])# _LT_TAG_COMPILER 5047d514b0f3Smrg 5048d514b0f3Smrg 5049d514b0f3Smrg# _LT_COMPILER_BOILERPLATE 5050d514b0f3Smrg# ------------------------ 5051d514b0f3Smrg# Check for compiler boilerplate output or warnings with 5052d514b0f3Smrg# the simple compiler test code. 5053d514b0f3Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 5054d514b0f3Smrg[m4_require([_LT_DECL_SED])dnl 5055d514b0f3Smrgac_outfile=conftest.$ac_objext 5056d514b0f3Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 5057d514b0f3Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 5058d514b0f3Smrg_lt_compiler_boilerplate=`cat conftest.err` 5059d514b0f3Smrg$RM conftest* 5060d514b0f3Smrg])# _LT_COMPILER_BOILERPLATE 5061d514b0f3Smrg 5062d514b0f3Smrg 5063d514b0f3Smrg# _LT_LINKER_BOILERPLATE 5064d514b0f3Smrg# ---------------------- 5065d514b0f3Smrg# Check for linker boilerplate output or warnings with 5066d514b0f3Smrg# the simple link test code. 5067d514b0f3Smrgm4_defun([_LT_LINKER_BOILERPLATE], 5068d514b0f3Smrg[m4_require([_LT_DECL_SED])dnl 5069d514b0f3Smrgac_outfile=conftest.$ac_objext 5070d514b0f3Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 5071d514b0f3Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 5072d514b0f3Smrg_lt_linker_boilerplate=`cat conftest.err` 5073d514b0f3Smrg$RM -r conftest* 5074d514b0f3Smrg])# _LT_LINKER_BOILERPLATE 5075d514b0f3Smrg 5076d514b0f3Smrg# _LT_REQUIRED_DARWIN_CHECKS 5077d514b0f3Smrg# ------------------------- 5078d514b0f3Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 5079d514b0f3Smrg case $host_os in 5080d514b0f3Smrg rhapsody* | darwin*) 5081d514b0f3Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 5082d514b0f3Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 5083d514b0f3Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 5084d514b0f3Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 5085d514b0f3Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 5086d514b0f3Smrg _LT_DECL([], [DSYMUTIL], [1], 5087d514b0f3Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 5088d514b0f3Smrg _LT_DECL([], [NMEDIT], [1], 5089d514b0f3Smrg [Tool to change global to local symbols on Mac OS X]) 5090d514b0f3Smrg _LT_DECL([], [LIPO], [1], 5091d514b0f3Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 5092d514b0f3Smrg _LT_DECL([], [OTOOL], [1], 5093d514b0f3Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 5094d514b0f3Smrg _LT_DECL([], [OTOOL64], [1], 5095d514b0f3Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 5096d514b0f3Smrg 5097d514b0f3Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 5098d514b0f3Smrg [lt_cv_apple_cc_single_mod=no 5099d514b0f3Smrg if test -z "$LT_MULTI_MODULE"; then 5100d514b0f3Smrg # By default we will add the -single_module flag. You can override 5101d514b0f3Smrg # by either setting the environment variable LT_MULTI_MODULE 5102d514b0f3Smrg # non-empty at configure time, or by adding -multi_module to the 5103d514b0f3Smrg # link flags. 5104d514b0f3Smrg rm -rf libconftest.dylib* 5105d514b0f3Smrg echo "int foo(void){return 1;}" > conftest.c 5106d514b0f3Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 5107d514b0f3Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 5108d514b0f3Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 5109d514b0f3Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 5110d514b0f3Smrg _lt_result=$? 5111d514b0f3Smrg # If there is a non-empty error log, and "single_module" 5112d514b0f3Smrg # appears in it, assume the flag caused a linker warning 5113d514b0f3Smrg if test -s conftest.err && $GREP single_module conftest.err; then 5114d514b0f3Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 5115d514b0f3Smrg # Otherwise, if the output was created with a 0 exit code from 5116d514b0f3Smrg # the compiler, it worked. 5117d514b0f3Smrg elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 5118d514b0f3Smrg lt_cv_apple_cc_single_mod=yes 5119d514b0f3Smrg else 5120d514b0f3Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 5121d514b0f3Smrg fi 5122d514b0f3Smrg rm -rf libconftest.dylib* 5123d514b0f3Smrg rm -f conftest.* 5124d514b0f3Smrg fi]) 5125d514b0f3Smrg 5126d514b0f3Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 5127d514b0f3Smrg [lt_cv_ld_exported_symbols_list], 5128d514b0f3Smrg [lt_cv_ld_exported_symbols_list=no 5129d514b0f3Smrg save_LDFLAGS=$LDFLAGS 5130d514b0f3Smrg echo "_main" > conftest.sym 5131d514b0f3Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 5132d514b0f3Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 5133d514b0f3Smrg [lt_cv_ld_exported_symbols_list=yes], 5134d514b0f3Smrg [lt_cv_ld_exported_symbols_list=no]) 5135d514b0f3Smrg LDFLAGS=$save_LDFLAGS 5136d514b0f3Smrg ]) 5137d514b0f3Smrg 5138d514b0f3Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 5139d514b0f3Smrg [lt_cv_ld_force_load=no 5140d514b0f3Smrg cat > conftest.c << _LT_EOF 5141d514b0f3Smrgint forced_loaded() { return 2;} 5142d514b0f3Smrg_LT_EOF 5143d514b0f3Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 5144d514b0f3Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 5145d514b0f3Smrg echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 5146d514b0f3Smrg $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 5147d514b0f3Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 5148d514b0f3Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 5149d514b0f3Smrg cat > conftest.c << _LT_EOF 5150d514b0f3Smrgint main() { return 0;} 5151d514b0f3Smrg_LT_EOF 5152d514b0f3Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 5153d514b0f3Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 5154d514b0f3Smrg _lt_result=$? 5155d514b0f3Smrg if test -s conftest.err && $GREP force_load conftest.err; then 5156d514b0f3Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 5157d514b0f3Smrg elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 5158d514b0f3Smrg lt_cv_ld_force_load=yes 5159d514b0f3Smrg else 5160d514b0f3Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 5161d514b0f3Smrg fi 5162d514b0f3Smrg rm -f conftest.err libconftest.a conftest conftest.c 5163d514b0f3Smrg rm -rf conftest.dSYM 5164d514b0f3Smrg ]) 5165d514b0f3Smrg case $host_os in 5166d514b0f3Smrg rhapsody* | darwin1.[[012]]) 5167d514b0f3Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 5168d514b0f3Smrg darwin1.*) 5169d514b0f3Smrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 5170d514b0f3Smrg darwin*) 5171d514b0f3Smrg case $MACOSX_DEPLOYMENT_TARGET,$host in 5172d514b0f3Smrg 10.[[012]],*|,*powerpc*-darwin[[5-8]]*) 5173d514b0f3Smrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 5174d514b0f3Smrg *) 5175d514b0f3Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 5176d514b0f3Smrg esac 5177d514b0f3Smrg ;; 5178d514b0f3Smrg esac 5179d514b0f3Smrg if test yes = "$lt_cv_apple_cc_single_mod"; then 5180d514b0f3Smrg _lt_dar_single_mod='$single_module' 5181d514b0f3Smrg fi 5182d514b0f3Smrg if test yes = "$lt_cv_ld_exported_symbols_list"; then 5183d514b0f3Smrg _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 5184d514b0f3Smrg else 5185d514b0f3Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 5186d514b0f3Smrg fi 5187d514b0f3Smrg if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 5188d514b0f3Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 5189d514b0f3Smrg else 5190d514b0f3Smrg _lt_dsymutil= 5191d514b0f3Smrg fi 5192d514b0f3Smrg ;; 5193d514b0f3Smrg esac 5194d514b0f3Smrg]) 5195d514b0f3Smrg 5196d514b0f3Smrg 5197d514b0f3Smrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 5198d514b0f3Smrg# --------------------------------- 5199d514b0f3Smrg# Checks for linker and compiler features on darwin 5200d514b0f3Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 5201d514b0f3Smrg[ 5202d514b0f3Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 5203d514b0f3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5204d514b0f3Smrg _LT_TAGVAR(hardcode_direct, $1)=no 5205d514b0f3Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 5206d514b0f3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5207d514b0f3Smrg if test yes = "$lt_cv_ld_force_load"; then 5208d514b0f3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' 5209d514b0f3Smrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 5210d514b0f3Smrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 5211d514b0f3Smrg else 5212d514b0f3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 5213d514b0f3Smrg fi 5214d514b0f3Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5215d514b0f3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 5216d514b0f3Smrg case $cc_basename in 5217d514b0f3Smrg ifort*|nagfor*) _lt_dar_can_shared=yes ;; 5218d514b0f3Smrg *) _lt_dar_can_shared=$GCC ;; 5219d514b0f3Smrg esac 5220d514b0f3Smrg if test yes = "$_lt_dar_can_shared"; then 5221d514b0f3Smrg output_verbose_link_cmd=func_echo_all 5222d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" 5223d514b0f3Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 5224d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" 5225d514b0f3Smrg _LT_TAGVAR(module_expsym_cmds, $1)="$SED -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" 5226d514b0f3Smrg m4_if([$1], [CXX], 5227d514b0f3Smrg[ if test yes != "$lt_cv_apple_cc_single_mod"; then 5228d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" 5229d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$SED 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" 5230d514b0f3Smrg fi 5231d514b0f3Smrg],[]) 5232d514b0f3Smrg else 5233d514b0f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5234d514b0f3Smrg fi 5235d514b0f3Smrg]) 5236d514b0f3Smrg 5237d514b0f3Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 5238d514b0f3Smrg# ---------------------------------- 5239d514b0f3Smrg# Links a minimal program and checks the executable 5240d514b0f3Smrg# for the system default hardcoded library path. In most cases, 5241d514b0f3Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 5242d514b0f3Smrg# the location of the communication and MPI libs are included too. 5243d514b0f3Smrg# If we don't find anything, use the default library path according 5244d514b0f3Smrg# to the aix ld manual. 5245d514b0f3Smrg# Store the results from the different compilers for each TAGNAME. 5246d514b0f3Smrg# Allow to override them for all tags through lt_cv_aix_libpath. 5247d514b0f3Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 5248d514b0f3Smrg[m4_require([_LT_DECL_SED])dnl 5249d514b0f3Smrgif test set = "${lt_cv_aix_libpath+set}"; then 5250d514b0f3Smrg aix_libpath=$lt_cv_aix_libpath 5251d514b0f3Smrgelse 5252d514b0f3Smrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 5253d514b0f3Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 5254d514b0f3Smrg lt_aix_libpath_sed='[ 5255d514b0f3Smrg /Import File Strings/,/^$/ { 5256d514b0f3Smrg /^0/ { 5257d514b0f3Smrg s/^0 *\([^ ]*\) *$/\1/ 5258d514b0f3Smrg p 5259d514b0f3Smrg } 5260d514b0f3Smrg }]' 5261d514b0f3Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 5262d514b0f3Smrg # Check for a 64-bit object if we didn't find anything. 5263d514b0f3Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 5264d514b0f3Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 5265d514b0f3Smrg fi],[]) 5266d514b0f3Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 5267d514b0f3Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 5268d514b0f3Smrg fi 5269d514b0f3Smrg ]) 5270d514b0f3Smrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 5271d514b0f3Smrgfi 5272d514b0f3Smrg])# _LT_SYS_MODULE_PATH_AIX 5273d514b0f3Smrg 5274d514b0f3Smrg 5275d514b0f3Smrg# _LT_SHELL_INIT(ARG) 5276d514b0f3Smrg# ------------------- 5277d514b0f3Smrgm4_define([_LT_SHELL_INIT], 5278d514b0f3Smrg[m4_divert_text([M4SH-INIT], [$1 5279d514b0f3Smrg])])# _LT_SHELL_INIT 5280d514b0f3Smrg 5281d514b0f3Smrg 5282d514b0f3Smrg 5283d514b0f3Smrg# _LT_PROG_ECHO_BACKSLASH 5284d514b0f3Smrg# ----------------------- 5285d514b0f3Smrg# Find how we can fake an echo command that does not interpret backslash. 5286d514b0f3Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 5287d514b0f3Smrg# of the generated configure script that will find a shell with a builtin 5288d514b0f3Smrg# printf (that we can use as an echo command). 5289d514b0f3Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 5290d514b0f3Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 5291d514b0f3SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 5292d514b0f3SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 5293d514b0f3Smrg 5294d514b0f3SmrgAC_MSG_CHECKING([how to print strings]) 5295d514b0f3Smrg# Test print first, because it will be a builtin if present. 5296d514b0f3Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 5297d514b0f3Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 5298d514b0f3Smrg ECHO='print -r --' 5299d514b0f3Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 5300d514b0f3Smrg ECHO='printf %s\n' 5301d514b0f3Smrgelse 5302d514b0f3Smrg # Use this function as a fallback that always works. 5303d514b0f3Smrg func_fallback_echo () 5304d514b0f3Smrg { 5305d514b0f3Smrg eval 'cat <<_LTECHO_EOF 5306d514b0f3Smrg$[]1 5307d514b0f3Smrg_LTECHO_EOF' 5308d514b0f3Smrg } 5309d514b0f3Smrg ECHO='func_fallback_echo' 5310d514b0f3Smrgfi 5311d514b0f3Smrg 5312d514b0f3Smrg# func_echo_all arg... 5313d514b0f3Smrg# Invoke $ECHO with all args, space-separated. 5314d514b0f3Smrgfunc_echo_all () 5315d514b0f3Smrg{ 5316d514b0f3Smrg $ECHO "$*" 5317d514b0f3Smrg} 5318d514b0f3Smrg 5319d514b0f3Smrgcase $ECHO in 5320d514b0f3Smrg printf*) AC_MSG_RESULT([printf]) ;; 5321d514b0f3Smrg print*) AC_MSG_RESULT([print -r]) ;; 5322d514b0f3Smrg *) AC_MSG_RESULT([cat]) ;; 5323d514b0f3Smrgesac 5324d514b0f3Smrg 5325d514b0f3Smrgm4_ifdef([_AS_DETECT_SUGGESTED], 5326d514b0f3Smrg[_AS_DETECT_SUGGESTED([ 5327d514b0f3Smrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 5328d514b0f3Smrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 5329d514b0f3Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 5330d514b0f3Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 5331d514b0f3Smrg PATH=/empty FPATH=/empty; export PATH FPATH 5332d514b0f3Smrg test "X`printf %s $ECHO`" = "X$ECHO" \ 5333d514b0f3Smrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 5334d514b0f3Smrg 5335d514b0f3Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 5336d514b0f3Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 5337d514b0f3Smrg])# _LT_PROG_ECHO_BACKSLASH 5338d514b0f3Smrg 5339d514b0f3Smrg 5340d514b0f3Smrg# _LT_WITH_SYSROOT 5341d514b0f3Smrg# ---------------- 5342d514b0f3SmrgAC_DEFUN([_LT_WITH_SYSROOT], 5343d514b0f3Smrg[m4_require([_LT_DECL_SED])dnl 5344d514b0f3SmrgAC_MSG_CHECKING([for sysroot]) 5345d514b0f3SmrgAC_ARG_WITH([sysroot], 5346d514b0f3Smrg[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 5347d514b0f3Smrg [Search for dependent libraries within DIR (or the compiler's sysroot 5348d514b0f3Smrg if not specified).])], 5349d514b0f3Smrg[], [with_sysroot=no]) 5350d514b0f3Smrg 5351d514b0f3Smrgdnl lt_sysroot will always be passed unquoted. We quote it here 5352d514b0f3Smrgdnl in case the user passed a directory name. 5353d514b0f3Smrglt_sysroot= 5354d514b0f3Smrgcase $with_sysroot in #( 5355d514b0f3Smrg yes) 5356d514b0f3Smrg if test yes = "$GCC"; then 5357d514b0f3Smrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 5358d514b0f3Smrg fi 5359d514b0f3Smrg ;; #( 5360d514b0f3Smrg /*) 5361d514b0f3Smrg lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"` 5362d514b0f3Smrg ;; #( 5363d514b0f3Smrg no|'') 5364d514b0f3Smrg ;; #( 5365d514b0f3Smrg *) 5366d514b0f3Smrg AC_MSG_RESULT([$with_sysroot]) 5367d514b0f3Smrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 5368d514b0f3Smrg ;; 5369d514b0f3Smrgesac 5370d514b0f3Smrg 5371d514b0f3Smrg AC_MSG_RESULT([${lt_sysroot:-no}]) 5372d514b0f3Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 5373d514b0f3Smrg[dependent libraries, and where our libraries should be installed.])]) 5374d514b0f3Smrg 5375d514b0f3Smrg# _LT_ENABLE_LOCK 5376d514b0f3Smrg# --------------- 5377d514b0f3Smrgm4_defun([_LT_ENABLE_LOCK], 5378d514b0f3Smrg[AC_ARG_ENABLE([libtool-lock], 5379d514b0f3Smrg [AS_HELP_STRING([--disable-libtool-lock], 5380d514b0f3Smrg [avoid locking (might break parallel builds)])]) 5381d514b0f3Smrgtest no = "$enable_libtool_lock" || enable_libtool_lock=yes 5382d514b0f3Smrg 5383d514b0f3Smrg# Some flags need to be propagated to the compiler or linker for good 5384d514b0f3Smrg# libtool support. 5385d514b0f3Smrgcase $host in 5386d514b0f3Smrgia64-*-hpux*) 5387d514b0f3Smrg # Find out what ABI is being produced by ac_compile, and set mode 5388d514b0f3Smrg # options accordingly. 5389d514b0f3Smrg echo 'int i;' > conftest.$ac_ext 5390d514b0f3Smrg if AC_TRY_EVAL(ac_compile); then 5391d514b0f3Smrg case `$FILECMD conftest.$ac_objext` in 5392d514b0f3Smrg *ELF-32*) 5393d514b0f3Smrg HPUX_IA64_MODE=32 5394d514b0f3Smrg ;; 5395d514b0f3Smrg *ELF-64*) 5396d514b0f3Smrg HPUX_IA64_MODE=64 5397d514b0f3Smrg ;; 5398d514b0f3Smrg esac 5399d514b0f3Smrg fi 5400d514b0f3Smrg rm -rf conftest* 5401d514b0f3Smrg ;; 5402d514b0f3Smrg*-*-irix6*) 5403d514b0f3Smrg # Find out what ABI is being produced by ac_compile, and set linker 5404d514b0f3Smrg # options accordingly. 5405d514b0f3Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 5406d514b0f3Smrg if AC_TRY_EVAL(ac_compile); then 5407d514b0f3Smrg if test yes = "$lt_cv_prog_gnu_ld"; then 5408d514b0f3Smrg case `$FILECMD conftest.$ac_objext` in 5409d514b0f3Smrg *32-bit*) 5410d514b0f3Smrg LD="${LD-ld} -melf32bsmip" 5411d514b0f3Smrg ;; 5412d514b0f3Smrg *N32*) 5413d514b0f3Smrg LD="${LD-ld} -melf32bmipn32" 5414d514b0f3Smrg ;; 5415d514b0f3Smrg *64-bit*) 5416d514b0f3Smrg LD="${LD-ld} -melf64bmip" 5417d514b0f3Smrg ;; 5418d514b0f3Smrg esac 5419d514b0f3Smrg else 5420d514b0f3Smrg case `$FILECMD conftest.$ac_objext` in 5421d514b0f3Smrg *32-bit*) 5422d514b0f3Smrg LD="${LD-ld} -32" 5423d514b0f3Smrg ;; 5424d514b0f3Smrg *N32*) 5425d514b0f3Smrg LD="${LD-ld} -n32" 5426d514b0f3Smrg ;; 5427d514b0f3Smrg *64-bit*) 5428d514b0f3Smrg LD="${LD-ld} -64" 5429d514b0f3Smrg ;; 5430d514b0f3Smrg esac 5431d514b0f3Smrg fi 5432d514b0f3Smrg fi 5433d514b0f3Smrg rm -rf conftest* 5434d514b0f3Smrg ;; 5435d514b0f3Smrg 5436d514b0f3Smrgmips64*-*linux*) 5437d514b0f3Smrg # Find out what ABI is being produced by ac_compile, and set linker 5438d514b0f3Smrg # options accordingly. 5439d514b0f3Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 5440d514b0f3Smrg if AC_TRY_EVAL(ac_compile); then 5441d514b0f3Smrg emul=elf 5442d514b0f3Smrg case `$FILECMD conftest.$ac_objext` in 5443d514b0f3Smrg *32-bit*) 5444d514b0f3Smrg emul="${emul}32" 5445d514b0f3Smrg ;; 5446d514b0f3Smrg *64-bit*) 5447d514b0f3Smrg emul="${emul}64" 5448d514b0f3Smrg ;; 5449d514b0f3Smrg esac 5450d514b0f3Smrg case `$FILECMD conftest.$ac_objext` in 5451d514b0f3Smrg *MSB*) 5452d514b0f3Smrg emul="${emul}btsmip" 5453d514b0f3Smrg ;; 5454d514b0f3Smrg *LSB*) 5455d514b0f3Smrg emul="${emul}ltsmip" 5456d514b0f3Smrg ;; 5457d514b0f3Smrg esac 5458d514b0f3Smrg case `$FILECMD conftest.$ac_objext` in 5459d514b0f3Smrg *N32*) 5460d514b0f3Smrg emul="${emul}n32" 5461d514b0f3Smrg ;; 5462d514b0f3Smrg esac 5463d514b0f3Smrg LD="${LD-ld} -m $emul" 5464d514b0f3Smrg fi 5465d514b0f3Smrg rm -rf conftest* 5466d514b0f3Smrg ;; 5467d514b0f3Smrg 5468d514b0f3Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 5469d514b0f3Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 5470d514b0f3Smrg # Find out what ABI is being produced by ac_compile, and set linker 5471d514b0f3Smrg # options accordingly. Note that the listed cases only cover the 5472d514b0f3Smrg # situations where additional linker options are needed (such as when 5473d514b0f3Smrg # doing 32-bit compilation for a host where ld defaults to 64-bit, or 5474d514b0f3Smrg # vice versa); the common cases where no linker options are needed do 5475d514b0f3Smrg # not appear in the list. 5476d514b0f3Smrg echo 'int i;' > conftest.$ac_ext 5477d514b0f3Smrg if AC_TRY_EVAL(ac_compile); then 5478d514b0f3Smrg case `$FILECMD conftest.o` in 5479d514b0f3Smrg *32-bit*) 5480d514b0f3Smrg case $host in 5481d514b0f3Smrg x86_64-*kfreebsd*-gnu) 5482d514b0f3Smrg LD="${LD-ld} -m elf_i386_fbsd" 5483d514b0f3Smrg ;; 5484d514b0f3Smrg x86_64-*linux*) 5485d514b0f3Smrg case `$FILECMD conftest.o` in 5486d514b0f3Smrg *x86-64*) 5487d514b0f3Smrg LD="${LD-ld} -m elf32_x86_64" 5488d514b0f3Smrg ;; 5489d514b0f3Smrg *) 5490d514b0f3Smrg LD="${LD-ld} -m elf_i386" 5491d514b0f3Smrg ;; 5492d514b0f3Smrg esac 5493d514b0f3Smrg ;; 5494d514b0f3Smrg powerpc64le-*linux*) 5495d514b0f3Smrg LD="${LD-ld} -m elf32lppclinux" 5496d514b0f3Smrg ;; 5497d514b0f3Smrg powerpc64-*linux*) 5498d514b0f3Smrg LD="${LD-ld} -m elf32ppclinux" 5499d514b0f3Smrg ;; 5500d514b0f3Smrg s390x-*linux*) 5501d514b0f3Smrg LD="${LD-ld} -m elf_s390" 5502d514b0f3Smrg ;; 5503d514b0f3Smrg sparc64-*linux*) 5504d514b0f3Smrg LD="${LD-ld} -m elf32_sparc" 5505d514b0f3Smrg ;; 5506d514b0f3Smrg esac 5507d514b0f3Smrg ;; 5508d514b0f3Smrg *64-bit*) 5509d514b0f3Smrg case $host in 5510d514b0f3Smrg x86_64-*kfreebsd*-gnu) 5511d514b0f3Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 5512d514b0f3Smrg ;; 5513d514b0f3Smrg x86_64-*linux*) 5514d514b0f3Smrg LD="${LD-ld} -m elf_x86_64" 5515d514b0f3Smrg ;; 5516d514b0f3Smrg powerpcle-*linux*) 5517d514b0f3Smrg LD="${LD-ld} -m elf64lppc" 5518d514b0f3Smrg ;; 5519d514b0f3Smrg powerpc-*linux*) 5520d514b0f3Smrg LD="${LD-ld} -m elf64ppc" 5521d514b0f3Smrg ;; 5522d514b0f3Smrg s390*-*linux*|s390*-*tpf*) 5523d514b0f3Smrg LD="${LD-ld} -m elf64_s390" 5524d514b0f3Smrg ;; 5525d514b0f3Smrg sparc*-*linux*) 5526d514b0f3Smrg LD="${LD-ld} -m elf64_sparc" 5527d514b0f3Smrg ;; 5528d514b0f3Smrg esac 5529d514b0f3Smrg ;; 5530d514b0f3Smrg esac 5531d514b0f3Smrg fi 5532d514b0f3Smrg rm -rf conftest* 5533d514b0f3Smrg ;; 5534d514b0f3Smrg 5535d514b0f3Smrg*-*-sco3.2v5*) 5536d514b0f3Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 5537d514b0f3Smrg SAVE_CFLAGS=$CFLAGS 5538d514b0f3Smrg CFLAGS="$CFLAGS -belf" 5539d514b0f3Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 5540d514b0f3Smrg [AC_LANG_PUSH(C) 5541d514b0f3Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 5542d514b0f3Smrg AC_LANG_POP]) 5543d514b0f3Smrg if test yes != "$lt_cv_cc_needs_belf"; then 5544d514b0f3Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 5545d514b0f3Smrg CFLAGS=$SAVE_CFLAGS 5546d514b0f3Smrg fi 5547d514b0f3Smrg ;; 5548d514b0f3Smrg*-*solaris*) 5549d514b0f3Smrg # Find out what ABI is being produced by ac_compile, and set linker 5550d514b0f3Smrg # options accordingly. 5551d514b0f3Smrg echo 'int i;' > conftest.$ac_ext 5552d514b0f3Smrg if AC_TRY_EVAL(ac_compile); then 5553d514b0f3Smrg case `$FILECMD conftest.o` in 5554d514b0f3Smrg *64-bit*) 5555d514b0f3Smrg case $lt_cv_prog_gnu_ld in 5556d514b0f3Smrg yes*) 5557d514b0f3Smrg case $host in 5558d514b0f3Smrg i?86-*-solaris*|x86_64-*-solaris*) 5559d514b0f3Smrg LD="${LD-ld} -m elf_x86_64" 5560d514b0f3Smrg ;; 5561d514b0f3Smrg sparc*-*-solaris*) 5562d514b0f3Smrg LD="${LD-ld} -m elf64_sparc" 5563d514b0f3Smrg ;; 5564d514b0f3Smrg esac 5565d514b0f3Smrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 5566d514b0f3Smrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 5567d514b0f3Smrg LD=${LD-ld}_sol2 5568d514b0f3Smrg fi 5569d514b0f3Smrg ;; 5570d514b0f3Smrg *) 5571d514b0f3Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 5572d514b0f3Smrg LD="${LD-ld} -64" 5573d514b0f3Smrg fi 5574d514b0f3Smrg ;; 5575d514b0f3Smrg esac 5576d514b0f3Smrg ;; 5577d514b0f3Smrg esac 5578d514b0f3Smrg fi 5579d514b0f3Smrg rm -rf conftest* 5580d514b0f3Smrg ;; 5581d514b0f3Smrgesac 5582d514b0f3Smrg 5583d514b0f3Smrgneed_locks=$enable_libtool_lock 5584d514b0f3Smrg])# _LT_ENABLE_LOCK 5585d514b0f3Smrg 5586d514b0f3Smrg 5587d514b0f3Smrg# _LT_PROG_AR 5588d514b0f3Smrg# ----------- 5589d514b0f3Smrgm4_defun([_LT_PROG_AR], 5590d514b0f3Smrg[AC_CHECK_TOOLS(AR, [ar], false) 5591d514b0f3Smrg: ${AR=ar} 5592d514b0f3Smrg_LT_DECL([], [AR], [1], [The archiver]) 5593d514b0f3Smrg 5594d514b0f3Smrg# Use ARFLAGS variable as AR's operation code to sync the variable naming with 5595d514b0f3Smrg# Automake. If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have 5596d514b0f3Smrg# higher priority because thats what people were doing historically (setting 5597d514b0f3Smrg# ARFLAGS for automake and AR_FLAGS for libtool). FIXME: Make the AR_FLAGS 5598d514b0f3Smrg# variable obsoleted/removed. 5599d514b0f3Smrg 5600d514b0f3Smrgtest ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr} 5601d514b0f3Smrglt_ar_flags=$AR_FLAGS 5602d514b0f3Smrg_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)]) 5603d514b0f3Smrg 5604d514b0f3Smrg# Make AR_FLAGS overridable by 'make ARFLAGS='. Don't try to run-time override 5605d514b0f3Smrg# by AR_FLAGS because that was never working and AR_FLAGS is about to die. 5606d514b0f3Smrg_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}], 5607d514b0f3Smrg [Flags to create an archive]) 5608d514b0f3Smrg 5609d514b0f3SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 5610d514b0f3Smrg [lt_cv_ar_at_file=no 5611d514b0f3Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 5612d514b0f3Smrg [echo conftest.$ac_objext > conftest.lst 5613d514b0f3Smrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 5614d514b0f3Smrg AC_TRY_EVAL([lt_ar_try]) 5615d514b0f3Smrg if test 0 -eq "$ac_status"; then 5616d514b0f3Smrg # Ensure the archiver fails upon bogus file names. 5617d514b0f3Smrg rm -f conftest.$ac_objext libconftest.a 5618d514b0f3Smrg AC_TRY_EVAL([lt_ar_try]) 5619d514b0f3Smrg if test 0 -ne "$ac_status"; then 5620d514b0f3Smrg lt_cv_ar_at_file=@ 5621d514b0f3Smrg fi 5622d514b0f3Smrg fi 5623d514b0f3Smrg rm -f conftest.* libconftest.a 5624d514b0f3Smrg ]) 5625d514b0f3Smrg ]) 5626d514b0f3Smrg 5627d514b0f3Smrgif test no = "$lt_cv_ar_at_file"; then 5628d514b0f3Smrg archiver_list_spec= 5629d514b0f3Smrgelse 5630d514b0f3Smrg archiver_list_spec=$lt_cv_ar_at_file 5631d514b0f3Smrgfi 5632d514b0f3Smrg_LT_DECL([], [archiver_list_spec], [1], 5633d514b0f3Smrg [How to feed a file listing to the archiver]) 5634d514b0f3Smrg])# _LT_PROG_AR 5635d514b0f3Smrg 5636d514b0f3Smrg 5637d514b0f3Smrg# _LT_CMD_OLD_ARCHIVE 5638d514b0f3Smrg# ------------------- 5639d514b0f3Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 5640d514b0f3Smrg[_LT_PROG_AR 5641d514b0f3Smrg 5642d514b0f3SmrgAC_CHECK_TOOL(STRIP, strip, :) 5643d514b0f3Smrgtest -z "$STRIP" && STRIP=: 5644d514b0f3Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 5645d514b0f3Smrg 5646d514b0f3SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 5647d514b0f3Smrgtest -z "$RANLIB" && RANLIB=: 5648d514b0f3Smrg_LT_DECL([], [RANLIB], [1], 5649d514b0f3Smrg [Commands used to install an old-style archive]) 5650d514b0f3Smrg 5651d514b0f3Smrg# Determine commands to create old-style static archives. 5652d514b0f3Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 5653d514b0f3Smrgold_postinstall_cmds='chmod 644 $oldlib' 5654d514b0f3Smrgold_postuninstall_cmds= 5655d514b0f3Smrg 5656d514b0f3Smrgif test -n "$RANLIB"; then 5657d514b0f3Smrg case $host_os in 5658d514b0f3Smrg bitrig* | openbsd*) 5659d514b0f3Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 5660d514b0f3Smrg ;; 5661d514b0f3Smrg *) 5662d514b0f3Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 5663d514b0f3Smrg ;; 5664d514b0f3Smrg esac 5665d514b0f3Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 5666d514b0f3Smrgfi 5667d514b0f3Smrg 5668d514b0f3Smrgcase $host_os in 5669d514b0f3Smrg darwin*) 5670d514b0f3Smrg lock_old_archive_extraction=yes ;; 5671d514b0f3Smrg *) 5672d514b0f3Smrg lock_old_archive_extraction=no ;; 5673d514b0f3Smrgesac 5674d514b0f3Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 5675d514b0f3Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 5676d514b0f3Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 5677d514b0f3Smrg [Commands used to build an old-style archive]) 5678d514b0f3Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 5679d514b0f3Smrg [Whether to use a lock for old archive extraction]) 5680d514b0f3Smrg])# _LT_CMD_OLD_ARCHIVE 5681d514b0f3Smrg 5682d514b0f3Smrg 5683d514b0f3Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 5684d514b0f3Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 5685d514b0f3Smrg# ---------------------------------------------------------------- 5686d514b0f3Smrg# Check whether the given compiler option works 5687d514b0f3SmrgAC_DEFUN([_LT_COMPILER_OPTION], 5688d514b0f3Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 5689d514b0f3Smrgm4_require([_LT_DECL_SED])dnl 5690d514b0f3SmrgAC_CACHE_CHECK([$1], [$2], 5691d514b0f3Smrg [$2=no 5692d514b0f3Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 5693d514b0f3Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 5694d514b0f3Smrg lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 5695d514b0f3Smrg # Insert the option either (1) after the last *FLAGS variable, or 5696d514b0f3Smrg # (2) before a word containing "conftest.", or (3) at the end. 5697d514b0f3Smrg # Note that $ac_compile itself does not contain backslashes and begins 5698d514b0f3Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 5699d514b0f3Smrg # The option is referenced via a variable to avoid confusing sed. 5700d514b0f3Smrg lt_compile=`echo "$ac_compile" | $SED \ 5701d514b0f3Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 5702d514b0f3Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 5703d514b0f3Smrg -e 's:$: $lt_compiler_flag:'` 5704d514b0f3Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 5705d514b0f3Smrg (eval "$lt_compile" 2>conftest.err) 5706d514b0f3Smrg ac_status=$? 5707d514b0f3Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 5708d514b0f3Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 5709d514b0f3Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 5710d514b0f3Smrg # The compiler can only warn and ignore the option if not recognized 5711d514b0f3Smrg # So say no if there are warnings other than the usual output. 5712d514b0f3Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 5713d514b0f3Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 5714d514b0f3Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 5715d514b0f3Smrg $2=yes 5716d514b0f3Smrg fi 5717d514b0f3Smrg fi 5718d514b0f3Smrg $RM conftest* 5719d514b0f3Smrg]) 5720d514b0f3Smrg 5721d514b0f3Smrgif test yes = "[$]$2"; then 5722d514b0f3Smrg m4_if([$5], , :, [$5]) 5723d514b0f3Smrgelse 5724d514b0f3Smrg m4_if([$6], , :, [$6]) 5725d514b0f3Smrgfi 5726d514b0f3Smrg])# _LT_COMPILER_OPTION 5727d514b0f3Smrg 5728d514b0f3Smrg# Old name: 5729d514b0f3SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 5730d514b0f3Smrgdnl aclocal-1.4 backwards compatibility: 5731d514b0f3Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 5732d514b0f3Smrg 5733d514b0f3Smrg 5734d514b0f3Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 5735d514b0f3Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 5736d514b0f3Smrg# ---------------------------------------------------- 5737d514b0f3Smrg# Check whether the given linker option works 5738d514b0f3SmrgAC_DEFUN([_LT_LINKER_OPTION], 5739d514b0f3Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 5740d514b0f3Smrgm4_require([_LT_DECL_SED])dnl 5741d514b0f3SmrgAC_CACHE_CHECK([$1], [$2], 5742d514b0f3Smrg [$2=no 5743d514b0f3Smrg save_LDFLAGS=$LDFLAGS 5744d514b0f3Smrg LDFLAGS="$LDFLAGS $3" 5745d514b0f3Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 5746d514b0f3Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 5747d514b0f3Smrg # The linker can only warn and ignore the option if not recognized 5748d514b0f3Smrg # So say no if there are warnings 5749d514b0f3Smrg if test -s conftest.err; then 5750d514b0f3Smrg # Append any errors to the config.log. 5751d514b0f3Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 5752d514b0f3Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 5753d514b0f3Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 5754d514b0f3Smrg if diff conftest.exp conftest.er2 >/dev/null; then 5755d514b0f3Smrg $2=yes 5756d514b0f3Smrg fi 5757d514b0f3Smrg else 5758d514b0f3Smrg $2=yes 5759d514b0f3Smrg fi 5760d514b0f3Smrg fi 5761d514b0f3Smrg $RM -r conftest* 5762d514b0f3Smrg LDFLAGS=$save_LDFLAGS 5763d514b0f3Smrg]) 5764d514b0f3Smrg 5765d514b0f3Smrgif test yes = "[$]$2"; then 5766d514b0f3Smrg m4_if([$4], , :, [$4]) 5767d514b0f3Smrgelse 5768d514b0f3Smrg m4_if([$5], , :, [$5]) 5769d514b0f3Smrgfi 5770d514b0f3Smrg])# _LT_LINKER_OPTION 5771d514b0f3Smrg 5772d514b0f3Smrg# Old name: 5773d514b0f3SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 5774d514b0f3Smrgdnl aclocal-1.4 backwards compatibility: 5775d514b0f3Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 5776d514b0f3Smrg 5777d514b0f3Smrg 5778d514b0f3Smrg# LT_CMD_MAX_LEN 5779d514b0f3Smrg#--------------- 5780d514b0f3SmrgAC_DEFUN([LT_CMD_MAX_LEN], 5781d514b0f3Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 5782d514b0f3Smrg# find the maximum length of command line arguments 5783d514b0f3SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 5784d514b0f3SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 5785d514b0f3Smrg i=0 5786d514b0f3Smrg teststring=ABCD 5787d514b0f3Smrg 5788d514b0f3Smrg case $build_os in 5789d514b0f3Smrg msdosdjgpp*) 5790d514b0f3Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 5791d514b0f3Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 5792d514b0f3Smrg # during glob expansion). Even if it were fixed, the result of this 5793d514b0f3Smrg # check would be larger than it should be. 5794d514b0f3Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 5795d514b0f3Smrg ;; 5796d514b0f3Smrg 5797d514b0f3Smrg gnu*) 5798d514b0f3Smrg # Under GNU Hurd, this test is not required because there is 5799d514b0f3Smrg # no limit to the length of command line arguments. 5800d514b0f3Smrg # Libtool will interpret -1 as no limit whatsoever 5801d514b0f3Smrg lt_cv_sys_max_cmd_len=-1; 5802d514b0f3Smrg ;; 5803d514b0f3Smrg 5804d514b0f3Smrg cygwin* | mingw* | cegcc*) 5805d514b0f3Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 5806d514b0f3Smrg # about 5 minutes as the teststring grows exponentially. 5807d514b0f3Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 5808d514b0f3Smrg # you end up with a "frozen" computer, even though with patience 5809d514b0f3Smrg # the test eventually succeeds (with a max line length of 256k). 5810d514b0f3Smrg # Instead, let's just punt: use the minimum linelength reported by 5811d514b0f3Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 5812d514b0f3Smrg lt_cv_sys_max_cmd_len=8192; 5813d514b0f3Smrg ;; 5814d514b0f3Smrg 5815d514b0f3Smrg mint*) 5816d514b0f3Smrg # On MiNT this can take a long time and run out of memory. 5817d514b0f3Smrg lt_cv_sys_max_cmd_len=8192; 5818d514b0f3Smrg ;; 5819d514b0f3Smrg 5820d514b0f3Smrg amigaos*) 5821d514b0f3Smrg # On AmigaOS with pdksh, this test takes hours, literally. 5822d514b0f3Smrg # So we just punt and use a minimum line length of 8192. 5823d514b0f3Smrg lt_cv_sys_max_cmd_len=8192; 5824d514b0f3Smrg ;; 5825d514b0f3Smrg 5826d514b0f3Smrg bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*) 5827d514b0f3Smrg # This has been around since 386BSD, at least. Likely further. 5828d514b0f3Smrg if test -x /sbin/sysctl; then 5829d514b0f3Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 5830d514b0f3Smrg elif test -x /usr/sbin/sysctl; then 5831d514b0f3Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 5832d514b0f3Smrg else 5833d514b0f3Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 5834d514b0f3Smrg fi 5835d514b0f3Smrg # And add a safety zone 5836d514b0f3Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 5837d514b0f3Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 5838d514b0f3Smrg ;; 5839d514b0f3Smrg 5840d514b0f3Smrg interix*) 5841d514b0f3Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 5842d514b0f3Smrg lt_cv_sys_max_cmd_len=196608 5843d514b0f3Smrg ;; 5844d514b0f3Smrg 5845d514b0f3Smrg os2*) 5846d514b0f3Smrg # The test takes a long time on OS/2. 5847d514b0f3Smrg lt_cv_sys_max_cmd_len=8192 5848d514b0f3Smrg ;; 5849d514b0f3Smrg 5850d514b0f3Smrg osf*) 5851d514b0f3Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 5852d514b0f3Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 5853d514b0f3Smrg # nice to cause kernel panics so lets avoid the loop below. 5854d514b0f3Smrg # First set a reasonable default. 5855d514b0f3Smrg lt_cv_sys_max_cmd_len=16384 5856d514b0f3Smrg # 5857d514b0f3Smrg if test -x /sbin/sysconfig; then 5858d514b0f3Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 5859d514b0f3Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 5860d514b0f3Smrg esac 5861d514b0f3Smrg fi 5862d514b0f3Smrg ;; 5863d514b0f3Smrg sco3.2v5*) 5864d514b0f3Smrg lt_cv_sys_max_cmd_len=102400 5865d514b0f3Smrg ;; 5866d514b0f3Smrg sysv5* | sco5v6* | sysv4.2uw2*) 5867d514b0f3Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 5868d514b0f3Smrg if test -n "$kargmax"; then 5869d514b0f3Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[ ]]//'` 5870d514b0f3Smrg else 5871d514b0f3Smrg lt_cv_sys_max_cmd_len=32768 5872d514b0f3Smrg fi 5873d514b0f3Smrg ;; 5874d514b0f3Smrg *) 5875d514b0f3Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 5876d514b0f3Smrg if test -n "$lt_cv_sys_max_cmd_len" && \ 5877d514b0f3Smrg test undefined != "$lt_cv_sys_max_cmd_len"; then 5878d514b0f3Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 5879d514b0f3Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 5880d514b0f3Smrg else 5881d514b0f3Smrg # Make teststring a little bigger before we do anything with it. 5882d514b0f3Smrg # a 1K string should be a reasonable start. 5883d514b0f3Smrg for i in 1 2 3 4 5 6 7 8; do 5884d514b0f3Smrg teststring=$teststring$teststring 5885d514b0f3Smrg done 5886d514b0f3Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 5887d514b0f3Smrg # If test is not a shell built-in, we'll probably end up computing a 5888d514b0f3Smrg # maximum length that is only half of the actual maximum length, but 5889d514b0f3Smrg # we can't tell. 5890d514b0f3Smrg while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 5891d514b0f3Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 5892d514b0f3Smrg test 17 != "$i" # 1/2 MB should be enough 5893d514b0f3Smrg do 5894d514b0f3Smrg i=`expr $i + 1` 5895d514b0f3Smrg teststring=$teststring$teststring 5896d514b0f3Smrg done 5897d514b0f3Smrg # Only check the string length outside the loop. 5898d514b0f3Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 5899d514b0f3Smrg teststring= 5900d514b0f3Smrg # Add a significant safety factor because C++ compilers can tack on 5901d514b0f3Smrg # massive amounts of additional arguments before passing them to the 5902d514b0f3Smrg # linker. It appears as though 1/2 is a usable value. 5903d514b0f3Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 5904d514b0f3Smrg fi 5905d514b0f3Smrg ;; 5906d514b0f3Smrg esac 5907d514b0f3Smrg]) 5908d514b0f3Smrgif test -n "$lt_cv_sys_max_cmd_len"; then 5909d514b0f3Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 5910d514b0f3Smrgelse 5911d514b0f3Smrg AC_MSG_RESULT(none) 5912d514b0f3Smrgfi 5913d514b0f3Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 5914d514b0f3Smrg_LT_DECL([], [max_cmd_len], [0], 5915d514b0f3Smrg [What is the maximum length of a command?]) 5916d514b0f3Smrg])# LT_CMD_MAX_LEN 5917d514b0f3Smrg 5918d514b0f3Smrg# Old name: 5919d514b0f3SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 5920d514b0f3Smrgdnl aclocal-1.4 backwards compatibility: 5921d514b0f3Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 5922d514b0f3Smrg 5923d514b0f3Smrg 5924d514b0f3Smrg# _LT_HEADER_DLFCN 5925d514b0f3Smrg# ---------------- 5926d514b0f3Smrgm4_defun([_LT_HEADER_DLFCN], 5927d514b0f3Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 5928d514b0f3Smrg])# _LT_HEADER_DLFCN 5929d514b0f3Smrg 5930d514b0f3Smrg 5931d514b0f3Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 5932d514b0f3Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 5933d514b0f3Smrg# ---------------------------------------------------------------- 5934d514b0f3Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 5935d514b0f3Smrg[m4_require([_LT_HEADER_DLFCN])dnl 5936d514b0f3Smrgif test yes = "$cross_compiling"; then : 5937d514b0f3Smrg [$4] 5938d514b0f3Smrgelse 5939d514b0f3Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 5940d514b0f3Smrg lt_status=$lt_dlunknown 5941d514b0f3Smrg cat > conftest.$ac_ext <<_LT_EOF 5942d514b0f3Smrg[#line $LINENO "configure" 5943d514b0f3Smrg#include "confdefs.h" 5944d514b0f3Smrg 5945d514b0f3Smrg#if HAVE_DLFCN_H 5946d514b0f3Smrg#include <dlfcn.h> 5947d514b0f3Smrg#endif 5948d514b0f3Smrg 5949d514b0f3Smrg#include <stdio.h> 5950d514b0f3Smrg 5951d514b0f3Smrg#ifdef RTLD_GLOBAL 5952d514b0f3Smrg# define LT_DLGLOBAL RTLD_GLOBAL 5953d514b0f3Smrg#else 5954d514b0f3Smrg# ifdef DL_GLOBAL 5955d514b0f3Smrg# define LT_DLGLOBAL DL_GLOBAL 5956d514b0f3Smrg# else 5957d514b0f3Smrg# define LT_DLGLOBAL 0 5958d514b0f3Smrg# endif 5959d514b0f3Smrg#endif 5960d514b0f3Smrg 5961d514b0f3Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 5962d514b0f3Smrg find out it does not work in some platform. */ 5963d514b0f3Smrg#ifndef LT_DLLAZY_OR_NOW 5964d514b0f3Smrg# ifdef RTLD_LAZY 5965d514b0f3Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 5966d514b0f3Smrg# else 5967d514b0f3Smrg# ifdef DL_LAZY 5968d514b0f3Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 5969d514b0f3Smrg# else 5970d514b0f3Smrg# ifdef RTLD_NOW 5971d514b0f3Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 5972d514b0f3Smrg# else 5973d514b0f3Smrg# ifdef DL_NOW 5974d514b0f3Smrg# define LT_DLLAZY_OR_NOW DL_NOW 5975d514b0f3Smrg# else 5976d514b0f3Smrg# define LT_DLLAZY_OR_NOW 0 5977d514b0f3Smrg# endif 5978d514b0f3Smrg# endif 5979d514b0f3Smrg# endif 5980d514b0f3Smrg# endif 5981d514b0f3Smrg#endif 5982d514b0f3Smrg 5983d514b0f3Smrg/* When -fvisibility=hidden is used, assume the code has been annotated 5984d514b0f3Smrg correspondingly for the symbols needed. */ 5985d514b0f3Smrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 5986d514b0f3Smrgint fnord () __attribute__((visibility("default"))); 5987d514b0f3Smrg#endif 5988d514b0f3Smrg 5989d514b0f3Smrgint fnord () { return 42; } 5990d514b0f3Smrgint main () 5991d514b0f3Smrg{ 5992d514b0f3Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 5993d514b0f3Smrg int status = $lt_dlunknown; 5994d514b0f3Smrg 5995d514b0f3Smrg if (self) 5996d514b0f3Smrg { 5997d514b0f3Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 5998d514b0f3Smrg else 5999d514b0f3Smrg { 6000d514b0f3Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 6001d514b0f3Smrg else puts (dlerror ()); 6002d514b0f3Smrg } 6003d514b0f3Smrg /* dlclose (self); */ 6004d514b0f3Smrg } 6005d514b0f3Smrg else 6006d514b0f3Smrg puts (dlerror ()); 6007d514b0f3Smrg 6008d514b0f3Smrg return status; 6009d514b0f3Smrg}] 6010d514b0f3Smrg_LT_EOF 6011d514b0f3Smrg if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 6012d514b0f3Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 6013d514b0f3Smrg lt_status=$? 6014d514b0f3Smrg case x$lt_status in 6015d514b0f3Smrg x$lt_dlno_uscore) $1 ;; 6016d514b0f3Smrg x$lt_dlneed_uscore) $2 ;; 6017d514b0f3Smrg x$lt_dlunknown|x*) $3 ;; 6018d514b0f3Smrg esac 6019d514b0f3Smrg else : 6020d514b0f3Smrg # compilation failed 6021d514b0f3Smrg $3 6022d514b0f3Smrg fi 6023d514b0f3Smrgfi 6024d514b0f3Smrgrm -fr conftest* 6025d514b0f3Smrg])# _LT_TRY_DLOPEN_SELF 6026d514b0f3Smrg 6027d514b0f3Smrg 6028d514b0f3Smrg# LT_SYS_DLOPEN_SELF 6029d514b0f3Smrg# ------------------ 6030d514b0f3SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 6031d514b0f3Smrg[m4_require([_LT_HEADER_DLFCN])dnl 6032d514b0f3Smrgif test yes != "$enable_dlopen"; then 6033d514b0f3Smrg enable_dlopen=unknown 6034d514b0f3Smrg enable_dlopen_self=unknown 6035d514b0f3Smrg enable_dlopen_self_static=unknown 6036d514b0f3Smrgelse 6037d514b0f3Smrg lt_cv_dlopen=no 6038d514b0f3Smrg lt_cv_dlopen_libs= 6039d514b0f3Smrg 6040d514b0f3Smrg case $host_os in 6041d514b0f3Smrg beos*) 6042d514b0f3Smrg lt_cv_dlopen=load_add_on 6043d514b0f3Smrg lt_cv_dlopen_libs= 6044d514b0f3Smrg lt_cv_dlopen_self=yes 6045d514b0f3Smrg ;; 6046d514b0f3Smrg 6047d514b0f3Smrg mingw* | pw32* | cegcc*) 6048d514b0f3Smrg lt_cv_dlopen=LoadLibrary 6049d514b0f3Smrg lt_cv_dlopen_libs= 6050d514b0f3Smrg ;; 6051d514b0f3Smrg 6052d514b0f3Smrg cygwin*) 6053d514b0f3Smrg lt_cv_dlopen=dlopen 6054d514b0f3Smrg lt_cv_dlopen_libs= 6055d514b0f3Smrg ;; 6056d514b0f3Smrg 6057d514b0f3Smrg darwin*) 6058d514b0f3Smrg # if libdl is installed we need to link against it 6059d514b0f3Smrg AC_CHECK_LIB([dl], [dlopen], 6060d514b0f3Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 6061d514b0f3Smrg lt_cv_dlopen=dyld 6062d514b0f3Smrg lt_cv_dlopen_libs= 6063d514b0f3Smrg lt_cv_dlopen_self=yes 6064d514b0f3Smrg ]) 6065d514b0f3Smrg ;; 6066d514b0f3Smrg 6067d514b0f3Smrg tpf*) 6068d514b0f3Smrg # Don't try to run any link tests for TPF. We know it's impossible 6069d514b0f3Smrg # because TPF is a cross-compiler, and we know how we open DSOs. 6070d514b0f3Smrg lt_cv_dlopen=dlopen 6071d514b0f3Smrg lt_cv_dlopen_libs= 6072d514b0f3Smrg lt_cv_dlopen_self=no 6073d514b0f3Smrg ;; 6074d514b0f3Smrg 6075d514b0f3Smrg *) 6076d514b0f3Smrg AC_CHECK_FUNC([shl_load], 6077d514b0f3Smrg [lt_cv_dlopen=shl_load], 6078d514b0f3Smrg [AC_CHECK_LIB([dld], [shl_load], 6079d514b0f3Smrg [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 6080d514b0f3Smrg [AC_CHECK_FUNC([dlopen], 6081d514b0f3Smrg [lt_cv_dlopen=dlopen], 6082d514b0f3Smrg [AC_CHECK_LIB([dl], [dlopen], 6083d514b0f3Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 6084d514b0f3Smrg [AC_CHECK_LIB([svld], [dlopen], 6085d514b0f3Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 6086d514b0f3Smrg [AC_CHECK_LIB([dld], [dld_link], 6087d514b0f3Smrg [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 6088d514b0f3Smrg ]) 6089d514b0f3Smrg ]) 6090d514b0f3Smrg ]) 6091d514b0f3Smrg ]) 6092d514b0f3Smrg ]) 6093d514b0f3Smrg ;; 6094d514b0f3Smrg esac 6095d514b0f3Smrg 6096d514b0f3Smrg if test no = "$lt_cv_dlopen"; then 6097d514b0f3Smrg enable_dlopen=no 6098d514b0f3Smrg else 6099d514b0f3Smrg enable_dlopen=yes 6100d514b0f3Smrg fi 6101d514b0f3Smrg 6102d514b0f3Smrg case $lt_cv_dlopen in 6103d514b0f3Smrg dlopen) 6104d514b0f3Smrg save_CPPFLAGS=$CPPFLAGS 6105d514b0f3Smrg test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 6106d514b0f3Smrg 6107d514b0f3Smrg save_LDFLAGS=$LDFLAGS 6108d514b0f3Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 6109d514b0f3Smrg 6110d514b0f3Smrg save_LIBS=$LIBS 6111d514b0f3Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 6112d514b0f3Smrg 6113d514b0f3Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 6114d514b0f3Smrg lt_cv_dlopen_self, [dnl 6115d514b0f3Smrg _LT_TRY_DLOPEN_SELF( 6116d514b0f3Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 6117d514b0f3Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 6118d514b0f3Smrg ]) 6119d514b0f3Smrg 6120d514b0f3Smrg if test yes = "$lt_cv_dlopen_self"; then 6121d514b0f3Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 6122d514b0f3Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 6123d514b0f3Smrg lt_cv_dlopen_self_static, [dnl 6124d514b0f3Smrg _LT_TRY_DLOPEN_SELF( 6125d514b0f3Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 6126d514b0f3Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 6127d514b0f3Smrg ]) 6128d514b0f3Smrg fi 6129d514b0f3Smrg 6130d514b0f3Smrg CPPFLAGS=$save_CPPFLAGS 6131d514b0f3Smrg LDFLAGS=$save_LDFLAGS 6132d514b0f3Smrg LIBS=$save_LIBS 6133d514b0f3Smrg ;; 6134d514b0f3Smrg esac 6135d514b0f3Smrg 6136d514b0f3Smrg case $lt_cv_dlopen_self in 6137d514b0f3Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 6138d514b0f3Smrg *) enable_dlopen_self=unknown ;; 6139d514b0f3Smrg esac 6140d514b0f3Smrg 6141d514b0f3Smrg case $lt_cv_dlopen_self_static in 6142d514b0f3Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 6143d514b0f3Smrg *) enable_dlopen_self_static=unknown ;; 6144d514b0f3Smrg esac 6145d514b0f3Smrgfi 6146d514b0f3Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 6147d514b0f3Smrg [Whether dlopen is supported]) 6148d514b0f3Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 6149d514b0f3Smrg [Whether dlopen of programs is supported]) 6150d514b0f3Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 6151d514b0f3Smrg [Whether dlopen of statically linked programs is supported]) 6152d514b0f3Smrg])# LT_SYS_DLOPEN_SELF 6153d514b0f3Smrg 6154d514b0f3Smrg# Old name: 6155d514b0f3SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 6156d514b0f3Smrgdnl aclocal-1.4 backwards compatibility: 6157d514b0f3Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 6158d514b0f3Smrg 6159d514b0f3Smrg 6160d514b0f3Smrg# _LT_COMPILER_C_O([TAGNAME]) 6161d514b0f3Smrg# --------------------------- 6162d514b0f3Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 6163d514b0f3Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 6164d514b0f3Smrgm4_defun([_LT_COMPILER_C_O], 6165d514b0f3Smrg[m4_require([_LT_DECL_SED])dnl 6166d514b0f3Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 6167d514b0f3Smrgm4_require([_LT_TAG_COMPILER])dnl 6168d514b0f3SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 6169d514b0f3Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 6170d514b0f3Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 6171d514b0f3Smrg $RM -r conftest 2>/dev/null 6172d514b0f3Smrg mkdir conftest 6173d514b0f3Smrg cd conftest 6174d514b0f3Smrg mkdir out 6175d514b0f3Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 6176d514b0f3Smrg 6177d514b0f3Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 6178d514b0f3Smrg # Insert the option either (1) after the last *FLAGS variable, or 6179d514b0f3Smrg # (2) before a word containing "conftest.", or (3) at the end. 6180d514b0f3Smrg # Note that $ac_compile itself does not contain backslashes and begins 6181d514b0f3Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 6182d514b0f3Smrg lt_compile=`echo "$ac_compile" | $SED \ 6183d514b0f3Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 6184d514b0f3Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 6185d514b0f3Smrg -e 's:$: $lt_compiler_flag:'` 6186d514b0f3Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 6187d514b0f3Smrg (eval "$lt_compile" 2>out/conftest.err) 6188d514b0f3Smrg ac_status=$? 6189d514b0f3Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 6190d514b0f3Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 6191d514b0f3Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 6192d514b0f3Smrg then 6193d514b0f3Smrg # The compiler can only warn and ignore the option if not recognized 6194d514b0f3Smrg # So say no if there are warnings 6195d514b0f3Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 6196d514b0f3Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 6197d514b0f3Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 6198d514b0f3Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 6199d514b0f3Smrg fi 6200d514b0f3Smrg fi 6201d514b0f3Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 6202d514b0f3Smrg $RM conftest* 6203d514b0f3Smrg # SGI C++ compiler will create directory out/ii_files/ for 6204d514b0f3Smrg # template instantiation 6205d514b0f3Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 6206d514b0f3Smrg $RM out/* && rmdir out 6207d514b0f3Smrg cd .. 6208d514b0f3Smrg $RM -r conftest 6209d514b0f3Smrg $RM conftest* 6210d514b0f3Smrg]) 6211d514b0f3Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 6212d514b0f3Smrg [Does compiler simultaneously support -c and -o options?]) 6213d514b0f3Smrg])# _LT_COMPILER_C_O 6214d514b0f3Smrg 6215d514b0f3Smrg 6216d514b0f3Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 6217d514b0f3Smrg# ---------------------------------- 6218d514b0f3Smrg# Check to see if we can do hard links to lock some files if needed 6219d514b0f3Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 6220d514b0f3Smrg[m4_require([_LT_ENABLE_LOCK])dnl 6221d514b0f3Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 6222d514b0f3Smrg_LT_COMPILER_C_O([$1]) 6223d514b0f3Smrg 6224d514b0f3Smrghard_links=nottested 6225d514b0f3Smrgif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 6226d514b0f3Smrg # do not overwrite the value of need_locks provided by the user 6227d514b0f3Smrg AC_MSG_CHECKING([if we can lock with hard links]) 6228d514b0f3Smrg hard_links=yes 6229d514b0f3Smrg $RM conftest* 6230d514b0f3Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 6231d514b0f3Smrg touch conftest.a 6232d514b0f3Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 6233d514b0f3Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 6234d514b0f3Smrg AC_MSG_RESULT([$hard_links]) 6235d514b0f3Smrg if test no = "$hard_links"; then 6236d514b0f3Smrg AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 6237d514b0f3Smrg need_locks=warn 6238d514b0f3Smrg fi 6239d514b0f3Smrgelse 6240d514b0f3Smrg need_locks=no 6241d514b0f3Smrgfi 6242d514b0f3Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 6243d514b0f3Smrg])# _LT_COMPILER_FILE_LOCKS 6244d514b0f3Smrg 6245d514b0f3Smrg 6246d514b0f3Smrg# _LT_CHECK_OBJDIR 6247d514b0f3Smrg# ---------------- 6248d514b0f3Smrgm4_defun([_LT_CHECK_OBJDIR], 6249d514b0f3Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 6250d514b0f3Smrg[rm -f .libs 2>/dev/null 6251d514b0f3Smrgmkdir .libs 2>/dev/null 6252d514b0f3Smrgif test -d .libs; then 6253d514b0f3Smrg lt_cv_objdir=.libs 6254d514b0f3Smrgelse 6255d514b0f3Smrg # MS-DOS does not allow filenames that begin with a dot. 6256d514b0f3Smrg lt_cv_objdir=_libs 6257d514b0f3Smrgfi 6258d514b0f3Smrgrmdir .libs 2>/dev/null]) 6259d514b0f3Smrgobjdir=$lt_cv_objdir 6260d514b0f3Smrg_LT_DECL([], [objdir], [0], 6261d514b0f3Smrg [The name of the directory that contains temporary libtool files])dnl 6262d514b0f3Smrgm4_pattern_allow([LT_OBJDIR])dnl 6263d514b0f3SmrgAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 6264d514b0f3Smrg [Define to the sub-directory where libtool stores uninstalled libraries.]) 6265d514b0f3Smrg])# _LT_CHECK_OBJDIR 6266d514b0f3Smrg 6267d514b0f3Smrg 6268d514b0f3Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 6269d514b0f3Smrg# -------------------------------------- 6270d514b0f3Smrg# Check hardcoding attributes. 6271d514b0f3Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 6272d514b0f3Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 6273d514b0f3Smrg_LT_TAGVAR(hardcode_action, $1)= 6274d514b0f3Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 6275d514b0f3Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 6276d514b0f3Smrg test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 6277d514b0f3Smrg 6278d514b0f3Smrg # We can hardcode non-existent directories. 6279d514b0f3Smrg if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 6280d514b0f3Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 6281d514b0f3Smrg # have to relink, otherwise we might link with an installed library 6282d514b0f3Smrg # when we should be linking with a yet-to-be-installed one 6283d514b0f3Smrg ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 6284d514b0f3Smrg test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 6285d514b0f3Smrg # Linking always hardcodes the temporary library directory. 6286d514b0f3Smrg _LT_TAGVAR(hardcode_action, $1)=relink 6287d514b0f3Smrg else 6288d514b0f3Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 6289d514b0f3Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 6290d514b0f3Smrg fi 6291d514b0f3Smrgelse 6292d514b0f3Smrg # We cannot hardcode anything, or else we can only hardcode existing 6293d514b0f3Smrg # directories. 6294d514b0f3Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 6295d514b0f3Smrgfi 6296d514b0f3SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 6297d514b0f3Smrg 6298d514b0f3Smrgif test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 6299d514b0f3Smrg test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 6300d514b0f3Smrg # Fast installation is not supported 6301d514b0f3Smrg enable_fast_install=no 6302d514b0f3Smrgelif test yes = "$shlibpath_overrides_runpath" || 6303d514b0f3Smrg test no = "$enable_shared"; then 6304d514b0f3Smrg # Fast installation is not necessary 6305d514b0f3Smrg enable_fast_install=needless 6306d514b0f3Smrgfi 6307d514b0f3Smrg_LT_TAGDECL([], [hardcode_action], [0], 6308d514b0f3Smrg [How to hardcode a shared library path into an executable]) 6309d514b0f3Smrg])# _LT_LINKER_HARDCODE_LIBPATH 6310d514b0f3Smrg 6311d514b0f3Smrg 6312d514b0f3Smrg# _LT_CMD_STRIPLIB 6313d514b0f3Smrg# ---------------- 6314d514b0f3Smrgm4_defun([_LT_CMD_STRIPLIB], 6315d514b0f3Smrg[m4_require([_LT_DECL_EGREP]) 6316d514b0f3Smrgstriplib= 6317d514b0f3Smrgold_striplib= 6318d514b0f3SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 6319d514b0f3Smrgif test -z "$STRIP"; then 6320d514b0f3Smrg AC_MSG_RESULT([no]) 6321d514b0f3Smrgelse 6322d514b0f3Smrg if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 6323d514b0f3Smrg old_striplib="$STRIP --strip-debug" 6324d514b0f3Smrg striplib="$STRIP --strip-unneeded" 6325d514b0f3Smrg AC_MSG_RESULT([yes]) 6326d514b0f3Smrg else 6327d514b0f3Smrg case $host_os in 6328d514b0f3Smrg darwin*) 6329d514b0f3Smrg # FIXME - insert some real tests, host_os isn't really good enough 6330d514b0f3Smrg striplib="$STRIP -x" 6331d514b0f3Smrg old_striplib="$STRIP -S" 6332d514b0f3Smrg AC_MSG_RESULT([yes]) 6333d514b0f3Smrg ;; 6334d514b0f3Smrg freebsd*) 6335d514b0f3Smrg if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then 6336d514b0f3Smrg old_striplib="$STRIP --strip-debug" 6337d514b0f3Smrg striplib="$STRIP --strip-unneeded" 6338d514b0f3Smrg AC_MSG_RESULT([yes]) 6339d514b0f3Smrg else 6340d514b0f3Smrg AC_MSG_RESULT([no]) 6341d514b0f3Smrg fi 6342d514b0f3Smrg ;; 6343d514b0f3Smrg *) 6344d514b0f3Smrg AC_MSG_RESULT([no]) 6345d514b0f3Smrg ;; 6346d514b0f3Smrg esac 6347d514b0f3Smrg fi 6348d514b0f3Smrgfi 6349d514b0f3Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 6350d514b0f3Smrg_LT_DECL([], [striplib], [1]) 6351d514b0f3Smrg])# _LT_CMD_STRIPLIB 6352d514b0f3Smrg 6353d514b0f3Smrg 6354d514b0f3Smrg# _LT_PREPARE_MUNGE_PATH_LIST 6355d514b0f3Smrg# --------------------------- 6356d514b0f3Smrg# Make sure func_munge_path_list() is defined correctly. 6357d514b0f3Smrgm4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 6358d514b0f3Smrg[[# func_munge_path_list VARIABLE PATH 6359d514b0f3Smrg# ----------------------------------- 6360d514b0f3Smrg# VARIABLE is name of variable containing _space_ separated list of 6361d514b0f3Smrg# directories to be munged by the contents of PATH, which is string 6362d514b0f3Smrg# having a format: 6363d514b0f3Smrg# "DIR[:DIR]:" 6364d514b0f3Smrg# string "DIR[ DIR]" will be prepended to VARIABLE 6365d514b0f3Smrg# ":DIR[:DIR]" 6366d514b0f3Smrg# string "DIR[ DIR]" will be appended to VARIABLE 6367d514b0f3Smrg# "DIRP[:DIRP]::[DIRA:]DIRA" 6368d514b0f3Smrg# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 6369d514b0f3Smrg# "DIRA[ DIRA]" will be appended to VARIABLE 6370d514b0f3Smrg# "DIR[:DIR]" 6371d514b0f3Smrg# VARIABLE will be replaced by "DIR[ DIR]" 6372d514b0f3Smrgfunc_munge_path_list () 6373d514b0f3Smrg{ 6374d514b0f3Smrg case x@S|@2 in 6375d514b0f3Smrg x) 6376d514b0f3Smrg ;; 6377d514b0f3Smrg *:) 6378d514b0f3Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 6379d514b0f3Smrg ;; 6380d514b0f3Smrg x:*) 6381d514b0f3Smrg eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 6382d514b0f3Smrg ;; 6383d514b0f3Smrg *::*) 6384d514b0f3Smrg eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 6385d514b0f3Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 6386d514b0f3Smrg ;; 6387d514b0f3Smrg *) 6388d514b0f3Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 6389d514b0f3Smrg ;; 6390d514b0f3Smrg esac 6391d514b0f3Smrg} 6392d514b0f3Smrg]])# _LT_PREPARE_PATH_LIST 6393d514b0f3Smrg 6394d514b0f3Smrg 6395d514b0f3Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 6396d514b0f3Smrg# ----------------------------- 6397d514b0f3Smrg# PORTME Fill in your ld.so characteristics 6398d514b0f3Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 6399d514b0f3Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 6400d514b0f3Smrgm4_require([_LT_DECL_EGREP])dnl 6401d514b0f3Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 6402d514b0f3Smrgm4_require([_LT_DECL_OBJDUMP])dnl 6403d514b0f3Smrgm4_require([_LT_DECL_SED])dnl 6404d514b0f3Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 6405d514b0f3Smrgm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 6406d514b0f3SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 6407d514b0f3Smrgm4_if([$1], 6408d514b0f3Smrg [], [ 6409d514b0f3Smrgif test yes = "$GCC"; then 6410d514b0f3Smrg case $host_os in 6411d514b0f3Smrg darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 6412d514b0f3Smrg *) lt_awk_arg='/^libraries:/' ;; 6413d514b0f3Smrg esac 6414d514b0f3Smrg case $host_os in 6415d514b0f3Smrg mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 6416d514b0f3Smrg *) lt_sed_strip_eq='s|=/|/|g' ;; 6417d514b0f3Smrg esac 6418d514b0f3Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 6419d514b0f3Smrg case $lt_search_path_spec in 6420d514b0f3Smrg *\;*) 6421d514b0f3Smrg # if the path contains ";" then we assume it to be the separator 6422d514b0f3Smrg # otherwise default to the standard path separator (i.e. ":") - it is 6423d514b0f3Smrg # assumed that no part of a normal pathname contains ";" but that should 6424d514b0f3Smrg # okay in the real world where ";" in dirpaths is itself problematic. 6425d514b0f3Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 6426d514b0f3Smrg ;; 6427d514b0f3Smrg *) 6428d514b0f3Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 6429d514b0f3Smrg ;; 6430d514b0f3Smrg esac 6431d514b0f3Smrg # Ok, now we have the path, separated by spaces, we can step through it 6432d514b0f3Smrg # and add multilib dir if necessary... 6433d514b0f3Smrg lt_tmp_lt_search_path_spec= 6434d514b0f3Smrg lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 6435d514b0f3Smrg # ...but if some path component already ends with the multilib dir we assume 6436d514b0f3Smrg # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 6437d514b0f3Smrg case "$lt_multi_os_dir; $lt_search_path_spec " in 6438d514b0f3Smrg "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 6439d514b0f3Smrg lt_multi_os_dir= 6440d514b0f3Smrg ;; 6441d514b0f3Smrg esac 6442d514b0f3Smrg for lt_sys_path in $lt_search_path_spec; do 6443d514b0f3Smrg if test -d "$lt_sys_path$lt_multi_os_dir"; then 6444d514b0f3Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 6445d514b0f3Smrg elif test -n "$lt_multi_os_dir"; then 6446d514b0f3Smrg test -d "$lt_sys_path" && \ 6447d514b0f3Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 6448d514b0f3Smrg fi 6449d514b0f3Smrg done 6450d514b0f3Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 6451d514b0f3SmrgBEGIN {RS = " "; FS = "/|\n";} { 6452d514b0f3Smrg lt_foo = ""; 6453d514b0f3Smrg lt_count = 0; 6454d514b0f3Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 6455d514b0f3Smrg if ($lt_i != "" && $lt_i != ".") { 6456d514b0f3Smrg if ($lt_i == "..") { 6457d514b0f3Smrg lt_count++; 6458d514b0f3Smrg } else { 6459d514b0f3Smrg if (lt_count == 0) { 6460d514b0f3Smrg lt_foo = "/" $lt_i lt_foo; 6461d514b0f3Smrg } else { 6462d514b0f3Smrg lt_count--; 6463d514b0f3Smrg } 6464d514b0f3Smrg } 6465d514b0f3Smrg } 6466d514b0f3Smrg } 6467d514b0f3Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 6468d514b0f3Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 6469d514b0f3Smrg}'` 6470d514b0f3Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 6471d514b0f3Smrg # for these hosts. 6472d514b0f3Smrg case $host_os in 6473d514b0f3Smrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 6474d514b0f3Smrg $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 6475d514b0f3Smrg esac 6476d514b0f3Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 6477d514b0f3Smrgelse 6478d514b0f3Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 6479d514b0f3Smrgfi]) 6480d514b0f3Smrglibrary_names_spec= 6481d514b0f3Smrglibname_spec='lib$name' 6482d514b0f3Smrgsoname_spec= 6483d514b0f3Smrgshrext_cmds=.so 6484d514b0f3Smrgpostinstall_cmds= 6485d514b0f3Smrgpostuninstall_cmds= 6486d514b0f3Smrgfinish_cmds= 6487d514b0f3Smrgfinish_eval= 6488d514b0f3Smrgshlibpath_var= 6489d514b0f3Smrgshlibpath_overrides_runpath=unknown 6490d514b0f3Smrgversion_type=none 6491d514b0f3Smrgdynamic_linker="$host_os ld.so" 6492d514b0f3Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 6493d514b0f3Smrgneed_lib_prefix=unknown 6494d514b0f3Smrghardcode_into_libs=no 6495d514b0f3Smrg 6496d514b0f3Smrg# when you set need_version to no, make sure it does not cause -set_version 6497d514b0f3Smrg# flags to be left without arguments 6498d514b0f3Smrgneed_version=unknown 6499d514b0f3Smrg 6500d514b0f3SmrgAC_ARG_VAR([LT_SYS_LIBRARY_PATH], 6501d514b0f3Smrg[User-defined run-time library search path.]) 6502d514b0f3Smrg 6503d514b0f3Smrgcase $host_os in 6504d514b0f3Smrgaix3*) 6505d514b0f3Smrg version_type=linux # correct to gnu/linux during the next big refactor 6506d514b0f3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 6507d514b0f3Smrg shlibpath_var=LIBPATH 6508d514b0f3Smrg 6509d514b0f3Smrg # AIX 3 has no versioning support, so we append a major version to the name. 6510d514b0f3Smrg soname_spec='$libname$release$shared_ext$major' 6511d514b0f3Smrg ;; 6512d514b0f3Smrg 6513d514b0f3Smrgaix[[4-9]]*) 6514d514b0f3Smrg version_type=linux # correct to gnu/linux during the next big refactor 6515d514b0f3Smrg need_lib_prefix=no 6516d514b0f3Smrg need_version=no 6517d514b0f3Smrg hardcode_into_libs=yes 6518d514b0f3Smrg if test ia64 = "$host_cpu"; then 6519d514b0f3Smrg # AIX 5 supports IA64 6520d514b0f3Smrg library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 6521d514b0f3Smrg shlibpath_var=LD_LIBRARY_PATH 6522d514b0f3Smrg else 6523d514b0f3Smrg # With GCC up to 2.95.x, collect2 would create an import file 6524d514b0f3Smrg # for dependence libraries. The import file would start with 6525d514b0f3Smrg # the line '#! .'. This would cause the generated library to 6526d514b0f3Smrg # depend on '.', always an invalid library. This was fixed in 6527d514b0f3Smrg # development snapshots of GCC prior to 3.0. 6528d514b0f3Smrg case $host_os in 6529d514b0f3Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 6530d514b0f3Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 6531d514b0f3Smrg echo ' yes ' 6532d514b0f3Smrg echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 6533d514b0f3Smrg : 6534d514b0f3Smrg else 6535d514b0f3Smrg can_build_shared=no 6536d514b0f3Smrg fi 6537d514b0f3Smrg ;; 6538d514b0f3Smrg esac 6539d514b0f3Smrg # Using Import Files as archive members, it is possible to support 6540d514b0f3Smrg # filename-based versioning of shared library archives on AIX. While 6541d514b0f3Smrg # this would work for both with and without runtime linking, it will 6542d514b0f3Smrg # prevent static linking of such archives. So we do filename-based 6543d514b0f3Smrg # shared library versioning with .so extension only, which is used 6544d514b0f3Smrg # when both runtime linking and shared linking is enabled. 6545d514b0f3Smrg # Unfortunately, runtime linking may impact performance, so we do 6546d514b0f3Smrg # not want this to be the default eventually. Also, we use the 6547d514b0f3Smrg # versioned .so libs for executables only if there is the -brtl 6548d514b0f3Smrg # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 6549d514b0f3Smrg # To allow for filename-based versioning support, we need to create 6550d514b0f3Smrg # libNAME.so.V as an archive file, containing: 6551d514b0f3Smrg # *) an Import File, referring to the versioned filename of the 6552d514b0f3Smrg # archive as well as the shared archive member, telling the 6553d514b0f3Smrg # bitwidth (32 or 64) of that shared object, and providing the 6554d514b0f3Smrg # list of exported symbols of that shared object, eventually 6555d514b0f3Smrg # decorated with the 'weak' keyword 6556d514b0f3Smrg # *) the shared object with the F_LOADONLY flag set, to really avoid 6557d514b0f3Smrg # it being seen by the linker. 6558d514b0f3Smrg # At run time we better use the real file rather than another symlink, 6559d514b0f3Smrg # but for link time we create the symlink libNAME.so -> libNAME.so.V 6560d514b0f3Smrg 6561d514b0f3Smrg case $with_aix_soname,$aix_use_runtimelinking in 6562d514b0f3Smrg # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 6563d514b0f3Smrg # soname into executable. Probably we can add versioning support to 6564d514b0f3Smrg # collect2, so additional links can be useful in future. 6565d514b0f3Smrg aix,yes) # traditional libtool 6566d514b0f3Smrg dynamic_linker='AIX unversionable lib.so' 6567d514b0f3Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 6568d514b0f3Smrg # instead of lib<name>.a to let people know that these are not 6569d514b0f3Smrg # typical AIX shared libraries. 6570d514b0f3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6571d514b0f3Smrg ;; 6572d514b0f3Smrg aix,no) # traditional AIX only 6573d514b0f3Smrg dynamic_linker='AIX lib.a[(]lib.so.V[)]' 6574d514b0f3Smrg # We preserve .a as extension for shared libraries through AIX4.2 6575d514b0f3Smrg # and later when we are not doing run time linking. 6576d514b0f3Smrg library_names_spec='$libname$release.a $libname.a' 6577d514b0f3Smrg soname_spec='$libname$release$shared_ext$major' 6578d514b0f3Smrg ;; 6579d514b0f3Smrg svr4,*) # full svr4 only 6580d514b0f3Smrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 6581d514b0f3Smrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 6582d514b0f3Smrg # We do not specify a path in Import Files, so LIBPATH fires. 6583d514b0f3Smrg shlibpath_overrides_runpath=yes 6584d514b0f3Smrg ;; 6585d514b0f3Smrg *,yes) # both, prefer svr4 6586d514b0f3Smrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 6587d514b0f3Smrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 6588d514b0f3Smrg # unpreferred sharedlib libNAME.a needs extra handling 6589d514b0f3Smrg postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' 6590d514b0f3Smrg postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' 6591d514b0f3Smrg # We do not specify a path in Import Files, so LIBPATH fires. 6592d514b0f3Smrg shlibpath_overrides_runpath=yes 6593d514b0f3Smrg ;; 6594d514b0f3Smrg *,no) # both, prefer aix 6595d514b0f3Smrg dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 6596d514b0f3Smrg library_names_spec='$libname$release.a $libname.a' 6597d514b0f3Smrg soname_spec='$libname$release$shared_ext$major' 6598d514b0f3Smrg # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 6599d514b0f3Smrg postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' 6600d514b0f3Smrg postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' 6601d514b0f3Smrg ;; 6602d514b0f3Smrg esac 6603d514b0f3Smrg shlibpath_var=LIBPATH 6604d514b0f3Smrg fi 6605d514b0f3Smrg ;; 6606d514b0f3Smrg 6607d514b0f3Smrgamigaos*) 6608d514b0f3Smrg case $host_cpu in 6609d514b0f3Smrg powerpc) 6610d514b0f3Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 6611d514b0f3Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 6612d514b0f3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6613d514b0f3Smrg ;; 6614d514b0f3Smrg m68k) 6615d514b0f3Smrg library_names_spec='$libname.ixlibrary $libname.a' 6616d514b0f3Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 6617d514b0f3Smrg finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' 6618d514b0f3Smrg ;; 6619d514b0f3Smrg esac 6620d514b0f3Smrg ;; 6621d514b0f3Smrg 6622d514b0f3Smrgbeos*) 6623d514b0f3Smrg library_names_spec='$libname$shared_ext' 6624d514b0f3Smrg dynamic_linker="$host_os ld.so" 6625d514b0f3Smrg shlibpath_var=LIBRARY_PATH 6626d514b0f3Smrg ;; 6627d514b0f3Smrg 6628d514b0f3Smrgbsdi[[45]]*) 6629d514b0f3Smrg version_type=linux # correct to gnu/linux during the next big refactor 6630d514b0f3Smrg need_version=no 6631d514b0f3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6632d514b0f3Smrg soname_spec='$libname$release$shared_ext$major' 6633d514b0f3Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 6634d514b0f3Smrg shlibpath_var=LD_LIBRARY_PATH 6635d514b0f3Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 6636d514b0f3Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 6637d514b0f3Smrg # the default ld.so.conf also contains /usr/contrib/lib and 6638d514b0f3Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 6639d514b0f3Smrg # libtool to hard-code these into programs 6640d514b0f3Smrg ;; 6641d514b0f3Smrg 6642d514b0f3Smrgcygwin* | mingw* | pw32* | cegcc*) 6643d514b0f3Smrg version_type=windows 6644d514b0f3Smrg shrext_cmds=.dll 6645d514b0f3Smrg need_version=no 6646d514b0f3Smrg need_lib_prefix=no 6647d514b0f3Smrg 6648d514b0f3Smrg case $GCC,$cc_basename in 6649d514b0f3Smrg yes,*) 6650d514b0f3Smrg # gcc 6651d514b0f3Smrg library_names_spec='$libname.dll.a' 6652d514b0f3Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 6653d514b0f3Smrg postinstall_cmds='base_file=`basename \$file`~ 6654d514b0f3Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 6655d514b0f3Smrg dldir=$destdir/`dirname \$dlpath`~ 6656d514b0f3Smrg test -d \$dldir || mkdir -p \$dldir~ 6657d514b0f3Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 6658d514b0f3Smrg chmod a+x \$dldir/$dlname~ 6659d514b0f3Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 6660d514b0f3Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 6661d514b0f3Smrg fi' 6662d514b0f3Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 6663d514b0f3Smrg dlpath=$dir/\$dldll~ 6664d514b0f3Smrg $RM \$dlpath' 6665d514b0f3Smrg shlibpath_overrides_runpath=yes 6666d514b0f3Smrg 6667d514b0f3Smrg case $host_os in 6668d514b0f3Smrg cygwin*) 6669d514b0f3Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 6670d514b0f3Smrg soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 6671d514b0f3Smrgm4_if([$1], [],[ 6672d514b0f3Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 6673d514b0f3Smrg ;; 6674d514b0f3Smrg mingw* | cegcc*) 6675d514b0f3Smrg # MinGW DLLs use traditional 'lib' prefix 6676d514b0f3Smrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 6677d514b0f3Smrg ;; 6678d514b0f3Smrg pw32*) 6679d514b0f3Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 6680d514b0f3Smrg library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 6681d514b0f3Smrg ;; 6682d514b0f3Smrg esac 6683d514b0f3Smrg dynamic_linker='Win32 ld.exe' 6684d514b0f3Smrg ;; 6685d514b0f3Smrg 6686d514b0f3Smrg *,cl* | *,icl*) 6687d514b0f3Smrg # Native MSVC or ICC 6688d514b0f3Smrg libname_spec='$name' 6689d514b0f3Smrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 6690d514b0f3Smrg library_names_spec='$libname.dll.lib' 6691d514b0f3Smrg 6692d514b0f3Smrg case $build_os in 6693d514b0f3Smrg mingw*) 6694d514b0f3Smrg sys_lib_search_path_spec= 6695d514b0f3Smrg lt_save_ifs=$IFS 6696d514b0f3Smrg IFS=';' 6697d514b0f3Smrg for lt_path in $LIB 6698d514b0f3Smrg do 6699d514b0f3Smrg IFS=$lt_save_ifs 6700d514b0f3Smrg # Let DOS variable expansion print the short 8.3 style file name. 6701d514b0f3Smrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 6702d514b0f3Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 6703d514b0f3Smrg done 6704d514b0f3Smrg IFS=$lt_save_ifs 6705d514b0f3Smrg # Convert to MSYS style. 6706d514b0f3Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 6707d514b0f3Smrg ;; 6708d514b0f3Smrg cygwin*) 6709d514b0f3Smrg # Convert to unix form, then to dos form, then back to unix form 6710d514b0f3Smrg # but this time dos style (no spaces!) so that the unix form looks 6711d514b0f3Smrg # like /cygdrive/c/PROGRA~1:/cygdr... 6712d514b0f3Smrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 6713d514b0f3Smrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 6714d514b0f3Smrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 6715d514b0f3Smrg ;; 6716d514b0f3Smrg *) 6717d514b0f3Smrg sys_lib_search_path_spec=$LIB 6718d514b0f3Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 6719d514b0f3Smrg # It is most probably a Windows format PATH. 6720d514b0f3Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 6721d514b0f3Smrg else 6722d514b0f3Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 6723d514b0f3Smrg fi 6724d514b0f3Smrg # FIXME: find the short name or the path components, as spaces are 6725d514b0f3Smrg # common. (e.g. "Program Files" -> "PROGRA~1") 6726d514b0f3Smrg ;; 6727d514b0f3Smrg esac 6728d514b0f3Smrg 6729d514b0f3Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 6730d514b0f3Smrg postinstall_cmds='base_file=`basename \$file`~ 6731d514b0f3Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 6732d514b0f3Smrg dldir=$destdir/`dirname \$dlpath`~ 6733d514b0f3Smrg test -d \$dldir || mkdir -p \$dldir~ 6734d514b0f3Smrg $install_prog $dir/$dlname \$dldir/$dlname' 6735d514b0f3Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 6736d514b0f3Smrg dlpath=$dir/\$dldll~ 6737d514b0f3Smrg $RM \$dlpath' 6738d514b0f3Smrg shlibpath_overrides_runpath=yes 6739d514b0f3Smrg dynamic_linker='Win32 link.exe' 6740d514b0f3Smrg ;; 6741d514b0f3Smrg 6742d514b0f3Smrg *) 6743d514b0f3Smrg # Assume MSVC and ICC wrapper 6744d514b0f3Smrg library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 6745d514b0f3Smrg dynamic_linker='Win32 ld.exe' 6746d514b0f3Smrg ;; 6747d514b0f3Smrg esac 6748d514b0f3Smrg # FIXME: first we should search . and the directory the executable is in 6749d514b0f3Smrg shlibpath_var=PATH 6750d514b0f3Smrg ;; 6751d514b0f3Smrg 6752d514b0f3Smrgdarwin* | rhapsody*) 6753d514b0f3Smrg dynamic_linker="$host_os dyld" 6754d514b0f3Smrg version_type=darwin 6755d514b0f3Smrg need_lib_prefix=no 6756d514b0f3Smrg need_version=no 6757d514b0f3Smrg library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' 6758d514b0f3Smrg soname_spec='$libname$release$major$shared_ext' 6759d514b0f3Smrg shlibpath_overrides_runpath=yes 6760d514b0f3Smrg shlibpath_var=DYLD_LIBRARY_PATH 6761d514b0f3Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 6762d514b0f3Smrgm4_if([$1], [],[ 6763d514b0f3Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 6764d514b0f3Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 6765d514b0f3Smrg ;; 6766d514b0f3Smrg 6767d514b0f3Smrgdgux*) 6768d514b0f3Smrg version_type=linux # correct to gnu/linux during the next big refactor 6769d514b0f3Smrg need_lib_prefix=no 6770d514b0f3Smrg need_version=no 6771d514b0f3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6772d514b0f3Smrg soname_spec='$libname$release$shared_ext$major' 6773d514b0f3Smrg shlibpath_var=LD_LIBRARY_PATH 6774d514b0f3Smrg ;; 6775d514b0f3Smrg 6776d514b0f3Smrgfreebsd* | dragonfly* | midnightbsd*) 6777d514b0f3Smrg # DragonFly does not have aout. When/if they implement a new 6778d514b0f3Smrg # versioning mechanism, adjust this. 6779d514b0f3Smrg if test -x /usr/bin/objformat; then 6780d514b0f3Smrg objformat=`/usr/bin/objformat` 6781d514b0f3Smrg else 6782d514b0f3Smrg case $host_os in 6783d514b0f3Smrg freebsd[[23]].*) objformat=aout ;; 6784d514b0f3Smrg *) objformat=elf ;; 6785d514b0f3Smrg esac 6786d514b0f3Smrg fi 6787d514b0f3Smrg version_type=freebsd-$objformat 6788d514b0f3Smrg case $version_type in 6789d514b0f3Smrg freebsd-elf*) 6790d514b0f3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6791d514b0f3Smrg soname_spec='$libname$release$shared_ext$major' 6792d514b0f3Smrg need_version=no 6793d514b0f3Smrg need_lib_prefix=no 6794d514b0f3Smrg ;; 6795d514b0f3Smrg freebsd-*) 6796d514b0f3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 6797d514b0f3Smrg need_version=yes 6798d514b0f3Smrg ;; 6799d514b0f3Smrg esac 6800d514b0f3Smrg shlibpath_var=LD_LIBRARY_PATH 6801d514b0f3Smrg case $host_os in 6802d514b0f3Smrg freebsd2.*) 6803d514b0f3Smrg shlibpath_overrides_runpath=yes 6804d514b0f3Smrg ;; 6805d514b0f3Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 6806d514b0f3Smrg shlibpath_overrides_runpath=yes 6807d514b0f3Smrg hardcode_into_libs=yes 6808d514b0f3Smrg ;; 6809d514b0f3Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 6810d514b0f3Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 6811d514b0f3Smrg shlibpath_overrides_runpath=no 6812d514b0f3Smrg hardcode_into_libs=yes 6813d514b0f3Smrg ;; 6814d514b0f3Smrg *) # from 4.6 on, and DragonFly 6815d514b0f3Smrg shlibpath_overrides_runpath=yes 6816d514b0f3Smrg hardcode_into_libs=yes 6817d514b0f3Smrg ;; 6818d514b0f3Smrg esac 6819d514b0f3Smrg ;; 6820d514b0f3Smrg 6821d514b0f3Smrghaiku*) 6822d514b0f3Smrg version_type=linux # correct to gnu/linux during the next big refactor 6823d514b0f3Smrg need_lib_prefix=no 6824d514b0f3Smrg need_version=no 6825d514b0f3Smrg dynamic_linker="$host_os runtime_loader" 6826d514b0f3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6827d514b0f3Smrg soname_spec='$libname$release$shared_ext$major' 6828d514b0f3Smrg shlibpath_var=LIBRARY_PATH 6829d514b0f3Smrg shlibpath_overrides_runpath=no 6830d514b0f3Smrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 6831d514b0f3Smrg hardcode_into_libs=yes 6832d514b0f3Smrg ;; 6833d514b0f3Smrg 6834d514b0f3Smrghpux9* | hpux10* | hpux11*) 6835d514b0f3Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 6836d514b0f3Smrg # link against other versions. 6837d514b0f3Smrg version_type=sunos 6838d514b0f3Smrg need_lib_prefix=no 6839d514b0f3Smrg need_version=no 6840d514b0f3Smrg case $host_cpu in 6841d514b0f3Smrg ia64*) 6842d514b0f3Smrg shrext_cmds='.so' 6843d514b0f3Smrg hardcode_into_libs=yes 6844d514b0f3Smrg dynamic_linker="$host_os dld.so" 6845d514b0f3Smrg shlibpath_var=LD_LIBRARY_PATH 6846d514b0f3Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 6847d514b0f3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6848d514b0f3Smrg soname_spec='$libname$release$shared_ext$major' 6849d514b0f3Smrg if test 32 = "$HPUX_IA64_MODE"; then 6850d514b0f3Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 6851d514b0f3Smrg sys_lib_dlsearch_path_spec=/usr/lib/hpux32 6852d514b0f3Smrg else 6853d514b0f3Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 6854d514b0f3Smrg sys_lib_dlsearch_path_spec=/usr/lib/hpux64 6855d514b0f3Smrg fi 6856d514b0f3Smrg ;; 6857d514b0f3Smrg hppa*64*) 6858d514b0f3Smrg shrext_cmds='.sl' 6859d514b0f3Smrg hardcode_into_libs=yes 6860d514b0f3Smrg dynamic_linker="$host_os dld.sl" 6861d514b0f3Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 6862d514b0f3Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 6863d514b0f3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6864d514b0f3Smrg soname_spec='$libname$release$shared_ext$major' 6865d514b0f3Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 6866d514b0f3Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 6867d514b0f3Smrg ;; 6868d514b0f3Smrg *) 6869d514b0f3Smrg shrext_cmds='.sl' 6870d514b0f3Smrg dynamic_linker="$host_os dld.sl" 6871d514b0f3Smrg shlibpath_var=SHLIB_PATH 6872d514b0f3Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 6873d514b0f3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6874d514b0f3Smrg soname_spec='$libname$release$shared_ext$major' 6875d514b0f3Smrg ;; 6876d514b0f3Smrg esac 6877d514b0f3Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 6878d514b0f3Smrg postinstall_cmds='chmod 555 $lib' 6879d514b0f3Smrg # or fails outright, so override atomically: 6880d514b0f3Smrg install_override_mode=555 6881d514b0f3Smrg ;; 6882d514b0f3Smrg 6883d514b0f3Smrginterix[[3-9]]*) 6884d514b0f3Smrg version_type=linux # correct to gnu/linux during the next big refactor 6885d514b0f3Smrg need_lib_prefix=no 6886d514b0f3Smrg need_version=no 6887d514b0f3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6888d514b0f3Smrg soname_spec='$libname$release$shared_ext$major' 6889d514b0f3Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 6890d514b0f3Smrg shlibpath_var=LD_LIBRARY_PATH 6891d514b0f3Smrg shlibpath_overrides_runpath=no 6892d514b0f3Smrg hardcode_into_libs=yes 6893d514b0f3Smrg ;; 6894d514b0f3Smrg 6895d514b0f3Smrgirix5* | irix6* | nonstopux*) 6896d514b0f3Smrg case $host_os in 6897d514b0f3Smrg nonstopux*) version_type=nonstopux ;; 6898d514b0f3Smrg *) 6899d514b0f3Smrg if test yes = "$lt_cv_prog_gnu_ld"; then 6900d514b0f3Smrg version_type=linux # correct to gnu/linux during the next big refactor 6901d514b0f3Smrg else 6902d514b0f3Smrg version_type=irix 6903d514b0f3Smrg fi ;; 6904d514b0f3Smrg esac 6905d514b0f3Smrg need_lib_prefix=no 6906d514b0f3Smrg need_version=no 6907d514b0f3Smrg soname_spec='$libname$release$shared_ext$major' 6908d514b0f3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 6909d514b0f3Smrg case $host_os in 6910d514b0f3Smrg irix5* | nonstopux*) 6911d514b0f3Smrg libsuff= shlibsuff= 6912d514b0f3Smrg ;; 6913d514b0f3Smrg *) 6914d514b0f3Smrg case $LD in # libtool.m4 will add one of these switches to LD 6915d514b0f3Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 6916d514b0f3Smrg libsuff= shlibsuff= libmagic=32-bit;; 6917d514b0f3Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 6918d514b0f3Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 6919d514b0f3Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 6920d514b0f3Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 6921d514b0f3Smrg *) libsuff= shlibsuff= libmagic=never-match;; 6922d514b0f3Smrg esac 6923d514b0f3Smrg ;; 6924d514b0f3Smrg esac 6925d514b0f3Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 6926d514b0f3Smrg shlibpath_overrides_runpath=no 6927d514b0f3Smrg sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 6928d514b0f3Smrg sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 6929d514b0f3Smrg hardcode_into_libs=yes 6930d514b0f3Smrg ;; 6931d514b0f3Smrg 6932d514b0f3Smrg# No shared lib support for Linux oldld, aout, or coff. 6933d514b0f3Smrglinux*oldld* | linux*aout* | linux*coff*) 6934d514b0f3Smrg dynamic_linker=no 6935d514b0f3Smrg ;; 6936d514b0f3Smrg 6937d514b0f3Smrglinux*android*) 6938d514b0f3Smrg version_type=none # Android doesn't support versioned libraries. 6939d514b0f3Smrg need_lib_prefix=no 6940d514b0f3Smrg need_version=no 6941d514b0f3Smrg library_names_spec='$libname$release$shared_ext' 6942d514b0f3Smrg soname_spec='$libname$release$shared_ext' 6943d514b0f3Smrg finish_cmds= 6944d514b0f3Smrg shlibpath_var=LD_LIBRARY_PATH 6945d514b0f3Smrg shlibpath_overrides_runpath=yes 6946d514b0f3Smrg 6947d514b0f3Smrg # This implies no fast_install, which is unacceptable. 6948d514b0f3Smrg # Some rework will be needed to allow for fast_install 6949d514b0f3Smrg # before this can be enabled. 6950d514b0f3Smrg hardcode_into_libs=yes 6951d514b0f3Smrg 6952d514b0f3Smrg dynamic_linker='Android linker' 6953d514b0f3Smrg # Don't embed -rpath directories since the linker doesn't support them. 6954d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6955d514b0f3Smrg ;; 6956d514b0f3Smrg 6957d514b0f3Smrg# This must be glibc/ELF. 6958d514b0f3Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 6959d514b0f3Smrg version_type=linux # correct to gnu/linux during the next big refactor 6960d514b0f3Smrg need_lib_prefix=no 6961d514b0f3Smrg need_version=no 6962d514b0f3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 6963d514b0f3Smrg soname_spec='$libname$release$shared_ext$major' 6964d514b0f3Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 6965d514b0f3Smrg shlibpath_var=LD_LIBRARY_PATH 6966d514b0f3Smrg shlibpath_overrides_runpath=no 6967d514b0f3Smrg 6968d514b0f3Smrg # Some binutils ld are patched to set DT_RUNPATH 6969d514b0f3Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 6970d514b0f3Smrg [lt_cv_shlibpath_overrides_runpath=no 6971d514b0f3Smrg save_LDFLAGS=$LDFLAGS 6972d514b0f3Smrg save_libdir=$libdir 6973d514b0f3Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 6974d514b0f3Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 6975d514b0f3Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 6976d514b0f3Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 6977d514b0f3Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 6978d514b0f3Smrg LDFLAGS=$save_LDFLAGS 6979d514b0f3Smrg libdir=$save_libdir 6980d514b0f3Smrg ]) 6981d514b0f3Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 6982d514b0f3Smrg 6983d514b0f3Smrg # This implies no fast_install, which is unacceptable. 6984d514b0f3Smrg # Some rework will be needed to allow for fast_install 6985d514b0f3Smrg # before this can be enabled. 6986d514b0f3Smrg hardcode_into_libs=yes 6987d514b0f3Smrg 6988d514b0f3Smrg # Add ABI-specific directories to the system library path. 6989d514b0f3Smrg sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" 6990d514b0f3Smrg 6991d514b0f3Smrg # Ideally, we could use ldconfig to report *all* directores which are 6992d514b0f3Smrg # searched for libraries, however this is still not possible. Aside from not 6993d514b0f3Smrg # being certain /sbin/ldconfig is available, command 6994d514b0f3Smrg # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 6995d514b0f3Smrg # even though it is searched at run-time. Try to do the best guess by 6996d514b0f3Smrg # appending ld.so.conf contents (and includes) to the search path. 6997d514b0f3Smrg if test -f /etc/ld.so.conf; then 6998d514b0f3Smrg lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` 6999d514b0f3Smrg sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" 7000d514b0f3Smrg fi 7001d514b0f3Smrg 7002d514b0f3Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 7003d514b0f3Smrg # powerpc, because MkLinux only supported shared libraries with the 7004d514b0f3Smrg # GNU dynamic linker. Since this was broken with cross compilers, 7005d514b0f3Smrg # most powerpc-linux boxes support dynamic linking these days and 7006d514b0f3Smrg # people can always --disable-shared, the test was removed, and we 7007d514b0f3Smrg # assume the GNU/Linux dynamic linker is in use. 7008d514b0f3Smrg dynamic_linker='GNU/Linux ld.so' 7009d514b0f3Smrg ;; 7010d514b0f3Smrg 7011d514b0f3Smrgnetbsd*) 7012d514b0f3Smrg version_type=sunos 7013d514b0f3Smrg need_lib_prefix=no 7014d514b0f3Smrg need_version=no 7015d514b0f3Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 7016d514b0f3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 7017d514b0f3Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 7018d514b0f3Smrg dynamic_linker='NetBSD (a.out) ld.so' 7019d514b0f3Smrg else 7020d514b0f3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 7021d514b0f3Smrg soname_spec='$libname$release$shared_ext$major' 7022d514b0f3Smrg dynamic_linker='NetBSD ld.elf_so' 7023d514b0f3Smrg fi 7024d514b0f3Smrg shlibpath_var=LD_LIBRARY_PATH 7025d514b0f3Smrg shlibpath_overrides_runpath=yes 7026d514b0f3Smrg hardcode_into_libs=yes 7027d514b0f3Smrg ;; 7028d514b0f3Smrg 7029d514b0f3Smrgnewsos6) 7030d514b0f3Smrg version_type=linux # correct to gnu/linux during the next big refactor 7031d514b0f3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 7032d514b0f3Smrg shlibpath_var=LD_LIBRARY_PATH 7033d514b0f3Smrg shlibpath_overrides_runpath=yes 7034d514b0f3Smrg ;; 7035d514b0f3Smrg 7036d514b0f3Smrg*nto* | *qnx*) 7037d514b0f3Smrg version_type=qnx 7038d514b0f3Smrg need_lib_prefix=no 7039d514b0f3Smrg need_version=no 7040d514b0f3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 7041d514b0f3Smrg soname_spec='$libname$release$shared_ext$major' 7042d514b0f3Smrg shlibpath_var=LD_LIBRARY_PATH 7043d514b0f3Smrg shlibpath_overrides_runpath=no 7044d514b0f3Smrg hardcode_into_libs=yes 7045d514b0f3Smrg dynamic_linker='ldqnx.so' 7046d514b0f3Smrg ;; 7047d514b0f3Smrg 7048d514b0f3Smrgopenbsd* | bitrig*) 7049d514b0f3Smrg version_type=sunos 7050d514b0f3Smrg sys_lib_dlsearch_path_spec=/usr/lib 7051d514b0f3Smrg need_lib_prefix=no 7052d514b0f3Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 7053d514b0f3Smrg need_version=no 7054d514b0f3Smrg else 7055d514b0f3Smrg need_version=yes 7056d514b0f3Smrg fi 7057d514b0f3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 7058d514b0f3Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 7059d514b0f3Smrg shlibpath_var=LD_LIBRARY_PATH 7060d514b0f3Smrg shlibpath_overrides_runpath=yes 7061d514b0f3Smrg ;; 7062d514b0f3Smrg 7063d514b0f3Smrgos2*) 7064d514b0f3Smrg libname_spec='$name' 7065d514b0f3Smrg version_type=windows 7066d514b0f3Smrg shrext_cmds=.dll 7067d514b0f3Smrg need_version=no 7068d514b0f3Smrg need_lib_prefix=no 7069d514b0f3Smrg # OS/2 can only load a DLL with a base name of 8 characters or less. 7070d514b0f3Smrg soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 7071d514b0f3Smrg v=$($ECHO $release$versuffix | tr -d .-); 7072d514b0f3Smrg n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 7073d514b0f3Smrg $ECHO $n$v`$shared_ext' 7074d514b0f3Smrg library_names_spec='${libname}_dll.$libext' 7075d514b0f3Smrg dynamic_linker='OS/2 ld.exe' 7076d514b0f3Smrg shlibpath_var=BEGINLIBPATH 7077d514b0f3Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 7078d514b0f3Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 7079d514b0f3Smrg postinstall_cmds='base_file=`basename \$file`~ 7080d514b0f3Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 7081d514b0f3Smrg dldir=$destdir/`dirname \$dlpath`~ 7082d514b0f3Smrg test -d \$dldir || mkdir -p \$dldir~ 7083d514b0f3Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 7084d514b0f3Smrg chmod a+x \$dldir/$dlname~ 7085d514b0f3Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 7086d514b0f3Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 7087d514b0f3Smrg fi' 7088d514b0f3Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 7089d514b0f3Smrg dlpath=$dir/\$dldll~ 7090d514b0f3Smrg $RM \$dlpath' 7091d514b0f3Smrg ;; 7092d514b0f3Smrg 7093d514b0f3Smrgosf3* | osf4* | osf5*) 7094d514b0f3Smrg version_type=osf 7095d514b0f3Smrg need_lib_prefix=no 7096d514b0f3Smrg need_version=no 7097d514b0f3Smrg soname_spec='$libname$release$shared_ext$major' 7098d514b0f3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 7099d514b0f3Smrg shlibpath_var=LD_LIBRARY_PATH 7100d514b0f3Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 7101d514b0f3Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 7102d514b0f3Smrg ;; 7103d514b0f3Smrg 7104d514b0f3Smrgrdos*) 7105d514b0f3Smrg dynamic_linker=no 7106d514b0f3Smrg ;; 7107d514b0f3Smrg 7108d514b0f3Smrgsolaris*) 7109d514b0f3Smrg version_type=linux # correct to gnu/linux during the next big refactor 7110d514b0f3Smrg need_lib_prefix=no 7111d514b0f3Smrg need_version=no 7112d514b0f3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 7113d514b0f3Smrg soname_spec='$libname$release$shared_ext$major' 7114d514b0f3Smrg shlibpath_var=LD_LIBRARY_PATH 7115d514b0f3Smrg shlibpath_overrides_runpath=yes 7116d514b0f3Smrg hardcode_into_libs=yes 7117d514b0f3Smrg # ldd complains unless libraries are executable 7118d514b0f3Smrg postinstall_cmds='chmod +x $lib' 7119d514b0f3Smrg ;; 7120d514b0f3Smrg 7121d514b0f3Smrgsunos4*) 7122d514b0f3Smrg version_type=sunos 7123d514b0f3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 7124d514b0f3Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 7125d514b0f3Smrg shlibpath_var=LD_LIBRARY_PATH 7126d514b0f3Smrg shlibpath_overrides_runpath=yes 7127d514b0f3Smrg if test yes = "$with_gnu_ld"; then 7128d514b0f3Smrg need_lib_prefix=no 7129d514b0f3Smrg fi 7130d514b0f3Smrg need_version=yes 7131d514b0f3Smrg ;; 7132d514b0f3Smrg 7133d514b0f3Smrgsysv4 | sysv4.3*) 7134d514b0f3Smrg version_type=linux # correct to gnu/linux during the next big refactor 7135d514b0f3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 7136d514b0f3Smrg soname_spec='$libname$release$shared_ext$major' 7137d514b0f3Smrg shlibpath_var=LD_LIBRARY_PATH 7138d514b0f3Smrg case $host_vendor in 7139d514b0f3Smrg sni) 7140d514b0f3Smrg shlibpath_overrides_runpath=no 7141d514b0f3Smrg need_lib_prefix=no 7142d514b0f3Smrg runpath_var=LD_RUN_PATH 7143d514b0f3Smrg ;; 7144d514b0f3Smrg siemens) 7145d514b0f3Smrg need_lib_prefix=no 7146d514b0f3Smrg ;; 7147d514b0f3Smrg motorola) 7148d514b0f3Smrg need_lib_prefix=no 7149d514b0f3Smrg need_version=no 7150d514b0f3Smrg shlibpath_overrides_runpath=no 7151d514b0f3Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 7152d514b0f3Smrg ;; 7153d514b0f3Smrg esac 7154d514b0f3Smrg ;; 7155d514b0f3Smrg 7156d514b0f3Smrgsysv4*MP*) 7157d514b0f3Smrg if test -d /usr/nec; then 7158d514b0f3Smrg version_type=linux # correct to gnu/linux during the next big refactor 7159d514b0f3Smrg library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 7160d514b0f3Smrg soname_spec='$libname$shared_ext.$major' 7161d514b0f3Smrg shlibpath_var=LD_LIBRARY_PATH 7162d514b0f3Smrg fi 7163d514b0f3Smrg ;; 7164d514b0f3Smrg 7165d514b0f3Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 7166d514b0f3Smrg version_type=sco 7167d514b0f3Smrg need_lib_prefix=no 7168d514b0f3Smrg need_version=no 7169d514b0f3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 7170d514b0f3Smrg soname_spec='$libname$release$shared_ext$major' 7171d514b0f3Smrg shlibpath_var=LD_LIBRARY_PATH 7172d514b0f3Smrg shlibpath_overrides_runpath=yes 7173d514b0f3Smrg hardcode_into_libs=yes 7174d514b0f3Smrg if test yes = "$with_gnu_ld"; then 7175d514b0f3Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 7176d514b0f3Smrg else 7177d514b0f3Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 7178d514b0f3Smrg case $host_os in 7179d514b0f3Smrg sco3.2v5*) 7180d514b0f3Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 7181d514b0f3Smrg ;; 7182d514b0f3Smrg esac 7183d514b0f3Smrg fi 7184d514b0f3Smrg sys_lib_dlsearch_path_spec='/usr/lib' 7185d514b0f3Smrg ;; 7186d514b0f3Smrg 7187d514b0f3Smrgtpf*) 7188d514b0f3Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 7189d514b0f3Smrg version_type=linux # correct to gnu/linux during the next big refactor 7190d514b0f3Smrg need_lib_prefix=no 7191d514b0f3Smrg need_version=no 7192d514b0f3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 7193d514b0f3Smrg shlibpath_var=LD_LIBRARY_PATH 7194d514b0f3Smrg shlibpath_overrides_runpath=no 7195d514b0f3Smrg hardcode_into_libs=yes 7196d514b0f3Smrg ;; 7197d514b0f3Smrg 7198d514b0f3Smrguts4*) 7199d514b0f3Smrg version_type=linux # correct to gnu/linux during the next big refactor 7200d514b0f3Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 7201d514b0f3Smrg soname_spec='$libname$release$shared_ext$major' 7202d514b0f3Smrg shlibpath_var=LD_LIBRARY_PATH 7203d514b0f3Smrg ;; 7204d514b0f3Smrg 7205d514b0f3Smrg*) 7206d514b0f3Smrg dynamic_linker=no 7207d514b0f3Smrg ;; 7208d514b0f3Smrgesac 7209d514b0f3SmrgAC_MSG_RESULT([$dynamic_linker]) 7210d514b0f3Smrgtest no = "$dynamic_linker" && can_build_shared=no 7211d514b0f3Smrg 7212d514b0f3Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 7213d514b0f3Smrgif test yes = "$GCC"; then 7214d514b0f3Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 7215d514b0f3Smrgfi 7216d514b0f3Smrg 7217d514b0f3Smrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 7218d514b0f3Smrg sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 7219d514b0f3Smrgfi 7220d514b0f3Smrg 7221d514b0f3Smrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 7222d514b0f3Smrg sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 7223d514b0f3Smrgfi 7224d514b0f3Smrg 7225d514b0f3Smrg# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 7226d514b0f3Smrgconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 7227d514b0f3Smrg 7228d514b0f3Smrg# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 7229d514b0f3Smrgfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 7230d514b0f3Smrg 7231d514b0f3Smrg# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 7232d514b0f3Smrgconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 7233d514b0f3Smrg 7234d514b0f3Smrg_LT_DECL([], [variables_saved_for_relink], [1], 7235d514b0f3Smrg [Variables whose values should be saved in libtool wrapper scripts and 7236d514b0f3Smrg restored at link time]) 7237d514b0f3Smrg_LT_DECL([], [need_lib_prefix], [0], 7238d514b0f3Smrg [Do we need the "lib" prefix for modules?]) 7239d514b0f3Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 7240d514b0f3Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 7241d514b0f3Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 7242d514b0f3Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 7243d514b0f3Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 7244d514b0f3Smrg [Is shlibpath searched before the hard-coded library search path?]) 7245d514b0f3Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 7246d514b0f3Smrg_LT_DECL([], [library_names_spec], [1], 7247d514b0f3Smrg [[List of archive names. First name is the real one, the rest are links. 7248d514b0f3Smrg The last name is the one that the linker finds with -lNAME]]) 7249d514b0f3Smrg_LT_DECL([], [soname_spec], [1], 7250d514b0f3Smrg [[The coded name of the library, if different from the real name]]) 7251d514b0f3Smrg_LT_DECL([], [install_override_mode], [1], 7252d514b0f3Smrg [Permission mode override for installation of shared libraries]) 7253d514b0f3Smrg_LT_DECL([], [postinstall_cmds], [2], 7254d514b0f3Smrg [Command to use after installation of a shared archive]) 7255d514b0f3Smrg_LT_DECL([], [postuninstall_cmds], [2], 7256d514b0f3Smrg [Command to use after uninstallation of a shared archive]) 7257d514b0f3Smrg_LT_DECL([], [finish_cmds], [2], 7258d514b0f3Smrg [Commands used to finish a libtool library installation in a directory]) 7259d514b0f3Smrg_LT_DECL([], [finish_eval], [1], 7260d514b0f3Smrg [[As "finish_cmds", except a single script fragment to be evaled but 7261d514b0f3Smrg not shown]]) 7262d514b0f3Smrg_LT_DECL([], [hardcode_into_libs], [0], 7263d514b0f3Smrg [Whether we should hardcode library paths into libraries]) 7264d514b0f3Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 7265d514b0f3Smrg [Compile-time system search path for libraries]) 7266d514b0f3Smrg_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 7267d514b0f3Smrg [Detected run-time system search path for libraries]) 7268d514b0f3Smrg_LT_DECL([], [configure_time_lt_sys_library_path], [2], 7269d514b0f3Smrg [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 7270d514b0f3Smrg])# _LT_SYS_DYNAMIC_LINKER 7271d514b0f3Smrg 7272d514b0f3Smrg 7273d514b0f3Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 7274d514b0f3Smrg# -------------------------- 7275d514b0f3Smrg# find a file program that can recognize shared library 7276d514b0f3SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 7277d514b0f3Smrg[m4_require([_LT_DECL_EGREP])dnl 7278d514b0f3SmrgAC_MSG_CHECKING([for $1]) 7279d514b0f3SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 7280d514b0f3Smrg[case $MAGIC_CMD in 7281d514b0f3Smrg[[\\/*] | ?:[\\/]*]) 7282d514b0f3Smrg lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 7283d514b0f3Smrg ;; 7284d514b0f3Smrg*) 7285d514b0f3Smrg lt_save_MAGIC_CMD=$MAGIC_CMD 7286d514b0f3Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 7287d514b0f3Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 7288d514b0f3Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 7289d514b0f3Smrgdnl not every word. This closes a longstanding sh security hole. 7290d514b0f3Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 7291d514b0f3Smrg for ac_dir in $ac_dummy; do 7292d514b0f3Smrg IFS=$lt_save_ifs 7293d514b0f3Smrg test -z "$ac_dir" && ac_dir=. 7294d514b0f3Smrg if test -f "$ac_dir/$1"; then 7295d514b0f3Smrg lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 7296d514b0f3Smrg if test -n "$file_magic_test_file"; then 7297d514b0f3Smrg case $deplibs_check_method in 7298d514b0f3Smrg "file_magic "*) 7299d514b0f3Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 7300d514b0f3Smrg MAGIC_CMD=$lt_cv_path_MAGIC_CMD 7301d514b0f3Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 7302d514b0f3Smrg $EGREP "$file_magic_regex" > /dev/null; then 7303d514b0f3Smrg : 7304d514b0f3Smrg else 7305d514b0f3Smrg cat <<_LT_EOF 1>&2 7306d514b0f3Smrg 7307d514b0f3Smrg*** Warning: the command libtool uses to detect shared libraries, 7308d514b0f3Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 7309d514b0f3Smrg*** The result is that libtool may fail to recognize shared libraries 7310d514b0f3Smrg*** as such. This will affect the creation of libtool libraries that 7311d514b0f3Smrg*** depend on shared libraries, but programs linked with such libtool 7312d514b0f3Smrg*** libraries will work regardless of this problem. Nevertheless, you 7313d514b0f3Smrg*** may want to report the problem to your system manager and/or to 7314d514b0f3Smrg*** bug-libtool@gnu.org 7315d514b0f3Smrg 7316d514b0f3Smrg_LT_EOF 7317d514b0f3Smrg fi ;; 7318d514b0f3Smrg esac 7319d514b0f3Smrg fi 7320d514b0f3Smrg break 7321d514b0f3Smrg fi 7322d514b0f3Smrg done 7323d514b0f3Smrg IFS=$lt_save_ifs 7324d514b0f3Smrg MAGIC_CMD=$lt_save_MAGIC_CMD 7325d514b0f3Smrg ;; 7326d514b0f3Smrgesac]) 7327d514b0f3SmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD 7328d514b0f3Smrgif test -n "$MAGIC_CMD"; then 7329d514b0f3Smrg AC_MSG_RESULT($MAGIC_CMD) 7330d514b0f3Smrgelse 7331d514b0f3Smrg AC_MSG_RESULT(no) 7332d514b0f3Smrgfi 7333d514b0f3Smrg_LT_DECL([], [MAGIC_CMD], [0], 7334d514b0f3Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 7335d514b0f3Smrg])# _LT_PATH_TOOL_PREFIX 7336d514b0f3Smrg 7337d514b0f3Smrg# Old name: 7338d514b0f3SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 7339d514b0f3Smrgdnl aclocal-1.4 backwards compatibility: 7340d514b0f3Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 7341d514b0f3Smrg 7342d514b0f3Smrg 7343d514b0f3Smrg# _LT_PATH_MAGIC 7344d514b0f3Smrg# -------------- 7345d514b0f3Smrg# find a file program that can recognize a shared library 7346d514b0f3Smrgm4_defun([_LT_PATH_MAGIC], 7347d514b0f3Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 7348d514b0f3Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 7349d514b0f3Smrg if test -n "$ac_tool_prefix"; then 7350d514b0f3Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 7351d514b0f3Smrg else 7352d514b0f3Smrg MAGIC_CMD=: 7353d514b0f3Smrg fi 7354d514b0f3Smrgfi 7355d514b0f3Smrg])# _LT_PATH_MAGIC 7356d514b0f3Smrg 7357d514b0f3Smrg 7358d514b0f3Smrg# LT_PATH_LD 7359d514b0f3Smrg# ---------- 7360d514b0f3Smrg# find the pathname to the GNU or non-GNU linker 7361d514b0f3SmrgAC_DEFUN([LT_PATH_LD], 7362d514b0f3Smrg[AC_REQUIRE([AC_PROG_CC])dnl 7363d514b0f3SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 7364d514b0f3SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 7365d514b0f3Smrgm4_require([_LT_DECL_SED])dnl 7366d514b0f3Smrgm4_require([_LT_DECL_EGREP])dnl 7367d514b0f3Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 7368d514b0f3Smrg 7369d514b0f3SmrgAC_ARG_WITH([gnu-ld], 7370d514b0f3Smrg [AS_HELP_STRING([--with-gnu-ld], 7371d514b0f3Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 7372d514b0f3Smrg [test no = "$withval" || with_gnu_ld=yes], 7373d514b0f3Smrg [with_gnu_ld=no])dnl 7374d514b0f3Smrg 7375d514b0f3Smrgac_prog=ld 7376d514b0f3Smrgif test yes = "$GCC"; then 7377d514b0f3Smrg # Check if gcc -print-prog-name=ld gives a path. 7378d514b0f3Smrg AC_MSG_CHECKING([for ld used by $CC]) 7379d514b0f3Smrg case $host in 7380d514b0f3Smrg *-*-mingw*) 7381d514b0f3Smrg # gcc leaves a trailing carriage return, which upsets mingw 7382d514b0f3Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 7383d514b0f3Smrg *) 7384d514b0f3Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 7385d514b0f3Smrg esac 7386d514b0f3Smrg case $ac_prog in 7387d514b0f3Smrg # Accept absolute paths. 7388d514b0f3Smrg [[\\/]]* | ?:[[\\/]]*) 7389d514b0f3Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 7390d514b0f3Smrg # Canonicalize the pathname of ld 7391d514b0f3Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 7392d514b0f3Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 7393d514b0f3Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 7394d514b0f3Smrg done 7395d514b0f3Smrg test -z "$LD" && LD=$ac_prog 7396d514b0f3Smrg ;; 7397d514b0f3Smrg "") 7398d514b0f3Smrg # If it fails, then pretend we aren't using GCC. 7399d514b0f3Smrg ac_prog=ld 7400d514b0f3Smrg ;; 7401d514b0f3Smrg *) 7402d514b0f3Smrg # If it is relative, then search for the first ld in PATH. 7403d514b0f3Smrg with_gnu_ld=unknown 7404d514b0f3Smrg ;; 7405d514b0f3Smrg esac 7406d514b0f3Smrgelif test yes = "$with_gnu_ld"; then 7407d514b0f3Smrg AC_MSG_CHECKING([for GNU ld]) 7408d514b0f3Smrgelse 7409d514b0f3Smrg AC_MSG_CHECKING([for non-GNU ld]) 7410d514b0f3Smrgfi 7411d514b0f3SmrgAC_CACHE_VAL(lt_cv_path_LD, 7412d514b0f3Smrg[if test -z "$LD"; then 7413d514b0f3Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 7414d514b0f3Smrg for ac_dir in $PATH; do 7415d514b0f3Smrg IFS=$lt_save_ifs 7416d514b0f3Smrg test -z "$ac_dir" && ac_dir=. 7417d514b0f3Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 7418d514b0f3Smrg lt_cv_path_LD=$ac_dir/$ac_prog 7419d514b0f3Smrg # Check to see if the program is GNU ld. I'd rather use --version, 7420d514b0f3Smrg # but apparently some variants of GNU ld only accept -v. 7421d514b0f3Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 7422d514b0f3Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 7423d514b0f3Smrg *GNU* | *'with BFD'*) 7424d514b0f3Smrg test no != "$with_gnu_ld" && break 7425d514b0f3Smrg ;; 7426d514b0f3Smrg *) 7427d514b0f3Smrg test yes != "$with_gnu_ld" && break 7428d514b0f3Smrg ;; 7429d514b0f3Smrg esac 7430d514b0f3Smrg fi 7431d514b0f3Smrg done 7432d514b0f3Smrg IFS=$lt_save_ifs 7433d514b0f3Smrgelse 7434d514b0f3Smrg lt_cv_path_LD=$LD # Let the user override the test with a path. 7435d514b0f3Smrgfi]) 7436d514b0f3SmrgLD=$lt_cv_path_LD 7437d514b0f3Smrgif test -n "$LD"; then 7438d514b0f3Smrg AC_MSG_RESULT($LD) 7439d514b0f3Smrgelse 7440d514b0f3Smrg AC_MSG_RESULT(no) 7441d514b0f3Smrgfi 7442d514b0f3Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 7443d514b0f3Smrg_LT_PATH_LD_GNU 7444d514b0f3SmrgAC_SUBST([LD]) 7445d514b0f3Smrg 7446d514b0f3Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 7447d514b0f3Smrg])# LT_PATH_LD 7448d514b0f3Smrg 7449d514b0f3Smrg# Old names: 7450d514b0f3SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 7451d514b0f3SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 7452d514b0f3Smrgdnl aclocal-1.4 backwards compatibility: 7453d514b0f3Smrgdnl AC_DEFUN([AM_PROG_LD], []) 7454d514b0f3Smrgdnl AC_DEFUN([AC_PROG_LD], []) 7455d514b0f3Smrg 7456d514b0f3Smrg 7457d514b0f3Smrg# _LT_PATH_LD_GNU 7458d514b0f3Smrg#- -------------- 7459d514b0f3Smrgm4_defun([_LT_PATH_LD_GNU], 7460d514b0f3Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 7461d514b0f3Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 7462d514b0f3Smrgcase `$LD -v 2>&1 </dev/null` in 7463d514b0f3Smrg*GNU* | *'with BFD'*) 7464d514b0f3Smrg lt_cv_prog_gnu_ld=yes 7465d514b0f3Smrg ;; 7466d514b0f3Smrg*) 7467d514b0f3Smrg lt_cv_prog_gnu_ld=no 7468d514b0f3Smrg ;; 7469d514b0f3Smrgesac]) 7470d514b0f3Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 7471d514b0f3Smrg])# _LT_PATH_LD_GNU 7472d514b0f3Smrg 7473d514b0f3Smrg 7474d514b0f3Smrg# _LT_CMD_RELOAD 7475d514b0f3Smrg# -------------- 7476d514b0f3Smrg# find reload flag for linker 7477d514b0f3Smrg# -- PORTME Some linkers may need a different reload flag. 7478d514b0f3Smrgm4_defun([_LT_CMD_RELOAD], 7479d514b0f3Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 7480d514b0f3Smrg lt_cv_ld_reload_flag, 7481d514b0f3Smrg [lt_cv_ld_reload_flag='-r']) 7482d514b0f3Smrgreload_flag=$lt_cv_ld_reload_flag 7483d514b0f3Smrgcase $reload_flag in 7484d514b0f3Smrg"" | " "*) ;; 7485d514b0f3Smrg*) reload_flag=" $reload_flag" ;; 7486d514b0f3Smrgesac 7487d514b0f3Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 7488d514b0f3Smrgcase $host_os in 7489d514b0f3Smrg cygwin* | mingw* | pw32* | cegcc*) 7490d514b0f3Smrg if test yes != "$GCC"; then 7491d514b0f3Smrg reload_cmds=false 7492d514b0f3Smrg fi 7493d514b0f3Smrg ;; 7494d514b0f3Smrg darwin*) 7495d514b0f3Smrg if test yes = "$GCC"; then 7496d514b0f3Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 7497d514b0f3Smrg else 7498d514b0f3Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 7499d514b0f3Smrg fi 7500d514b0f3Smrg ;; 7501d514b0f3Smrgesac 7502d514b0f3Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 7503d514b0f3Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 7504d514b0f3Smrg])# _LT_CMD_RELOAD 7505d514b0f3Smrg 7506d514b0f3Smrg 7507d514b0f3Smrg# _LT_PATH_DD 7508d514b0f3Smrg# ----------- 7509d514b0f3Smrg# find a working dd 7510d514b0f3Smrgm4_defun([_LT_PATH_DD], 7511d514b0f3Smrg[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 7512d514b0f3Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i 7513d514b0f3Smrgcat conftest.i conftest.i >conftest2.i 7514d514b0f3Smrg: ${lt_DD:=$DD} 7515d514b0f3SmrgAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 7516d514b0f3Smrg[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 7517d514b0f3Smrg cmp -s conftest.i conftest.out \ 7518d514b0f3Smrg && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 7519d514b0f3Smrgfi]) 7520d514b0f3Smrgrm -f conftest.i conftest2.i conftest.out]) 7521d514b0f3Smrg])# _LT_PATH_DD 7522d514b0f3Smrg 7523d514b0f3Smrg 7524d514b0f3Smrg# _LT_CMD_TRUNCATE 7525d514b0f3Smrg# ---------------- 7526d514b0f3Smrg# find command to truncate a binary pipe 7527d514b0f3Smrgm4_defun([_LT_CMD_TRUNCATE], 7528d514b0f3Smrg[m4_require([_LT_PATH_DD]) 7529d514b0f3SmrgAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 7530d514b0f3Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i 7531d514b0f3Smrgcat conftest.i conftest.i >conftest2.i 7532d514b0f3Smrglt_cv_truncate_bin= 7533d514b0f3Smrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 7534d514b0f3Smrg cmp -s conftest.i conftest.out \ 7535d514b0f3Smrg && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 7536d514b0f3Smrgfi 7537d514b0f3Smrgrm -f conftest.i conftest2.i conftest.out 7538d514b0f3Smrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 7539d514b0f3Smrg_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 7540d514b0f3Smrg [Command to truncate a binary pipe]) 7541d514b0f3Smrg])# _LT_CMD_TRUNCATE 7542d514b0f3Smrg 7543d514b0f3Smrg 7544d514b0f3Smrg# _LT_CHECK_MAGIC_METHOD 7545d514b0f3Smrg# ---------------------- 7546d514b0f3Smrg# how to check for library dependencies 7547d514b0f3Smrg# -- PORTME fill in with the dynamic library characteristics 7548d514b0f3Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 7549d514b0f3Smrg[m4_require([_LT_DECL_EGREP]) 7550d514b0f3Smrgm4_require([_LT_DECL_OBJDUMP]) 7551d514b0f3SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 7552d514b0f3Smrglt_cv_deplibs_check_method, 7553d514b0f3Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 7554d514b0f3Smrglt_cv_file_magic_test_file= 7555d514b0f3Smrglt_cv_deplibs_check_method='unknown' 7556d514b0f3Smrg# Need to set the preceding variable on all platforms that support 7557d514b0f3Smrg# interlibrary dependencies. 7558d514b0f3Smrg# 'none' -- dependencies not supported. 7559d514b0f3Smrg# 'unknown' -- same as none, but documents that we really don't know. 7560d514b0f3Smrg# 'pass_all' -- all dependencies passed with no checks. 7561d514b0f3Smrg# 'test_compile' -- check by making test program. 7562d514b0f3Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 7563d514b0f3Smrg# that responds to the $file_magic_cmd with a given extended regex. 7564d514b0f3Smrg# If you have 'file' or equivalent on your system and you're not sure 7565d514b0f3Smrg# whether 'pass_all' will *always* work, you probably want this one. 7566d514b0f3Smrg 7567d514b0f3Smrgcase $host_os in 7568d514b0f3Smrgaix[[4-9]]*) 7569d514b0f3Smrg lt_cv_deplibs_check_method=pass_all 7570d514b0f3Smrg ;; 7571d514b0f3Smrg 7572d514b0f3Smrgbeos*) 7573d514b0f3Smrg lt_cv_deplibs_check_method=pass_all 7574d514b0f3Smrg ;; 7575d514b0f3Smrg 7576d514b0f3Smrgbsdi[[45]]*) 7577d514b0f3Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 7578d514b0f3Smrg lt_cv_file_magic_cmd='$FILECMD -L' 7579d514b0f3Smrg lt_cv_file_magic_test_file=/shlib/libc.so 7580d514b0f3Smrg ;; 7581d514b0f3Smrg 7582d514b0f3Smrgcygwin*) 7583d514b0f3Smrg # func_win32_libid is a shell function defined in ltmain.sh 7584d514b0f3Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 7585d514b0f3Smrg lt_cv_file_magic_cmd='func_win32_libid' 7586d514b0f3Smrg ;; 7587d514b0f3Smrg 7588d514b0f3Smrgmingw* | pw32*) 7589d514b0f3Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 7590d514b0f3Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 7591d514b0f3Smrg # unless we find 'file', for example because we are cross-compiling. 7592d514b0f3Smrg if ( file / ) >/dev/null 2>&1; then 7593d514b0f3Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 7594d514b0f3Smrg lt_cv_file_magic_cmd='func_win32_libid' 7595d514b0f3Smrg else 7596d514b0f3Smrg # Keep this pattern in sync with the one in func_win32_libid. 7597d514b0f3Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 7598d514b0f3Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 7599d514b0f3Smrg fi 7600d514b0f3Smrg ;; 7601d514b0f3Smrg 7602d514b0f3Smrgcegcc*) 7603d514b0f3Smrg # use the weaker test based on 'objdump'. See mingw*. 7604d514b0f3Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 7605d514b0f3Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 7606d514b0f3Smrg ;; 7607d514b0f3Smrg 7608d514b0f3Smrgdarwin* | rhapsody*) 7609d514b0f3Smrg lt_cv_deplibs_check_method=pass_all 7610d514b0f3Smrg ;; 7611d514b0f3Smrg 7612d514b0f3Smrgfreebsd* | dragonfly* | midnightbsd*) 7613d514b0f3Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 7614d514b0f3Smrg case $host_cpu in 7615d514b0f3Smrg i*86 ) 7616d514b0f3Smrg # Not sure whether the presence of OpenBSD here was a mistake. 7617d514b0f3Smrg # Let's accept both of them until this is cleared up. 7618d514b0f3Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 7619d514b0f3Smrg lt_cv_file_magic_cmd=$FILECMD 7620d514b0f3Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 7621d514b0f3Smrg ;; 7622d514b0f3Smrg esac 7623d514b0f3Smrg else 7624d514b0f3Smrg lt_cv_deplibs_check_method=pass_all 7625d514b0f3Smrg fi 7626d514b0f3Smrg ;; 7627d514b0f3Smrg 7628d514b0f3Smrghaiku*) 7629d514b0f3Smrg lt_cv_deplibs_check_method=pass_all 7630d514b0f3Smrg ;; 7631d514b0f3Smrg 7632d514b0f3Smrghpux10.20* | hpux11*) 7633d514b0f3Smrg lt_cv_file_magic_cmd=$FILECMD 7634d514b0f3Smrg case $host_cpu in 7635d514b0f3Smrg ia64*) 7636d514b0f3Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 7637d514b0f3Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 7638d514b0f3Smrg ;; 7639d514b0f3Smrg hppa*64*) 7640d514b0f3Smrg [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] 7641d514b0f3Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 7642d514b0f3Smrg ;; 7643d514b0f3Smrg *) 7644d514b0f3Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 7645d514b0f3Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 7646d514b0f3Smrg ;; 7647d514b0f3Smrg esac 7648d514b0f3Smrg ;; 7649d514b0f3Smrg 7650d514b0f3Smrginterix[[3-9]]*) 7651d514b0f3Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 7652d514b0f3Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 7653d514b0f3Smrg ;; 7654d514b0f3Smrg 7655d514b0f3Smrgirix5* | irix6* | nonstopux*) 7656d514b0f3Smrg case $LD in 7657d514b0f3Smrg *-32|*"-32 ") libmagic=32-bit;; 7658d514b0f3Smrg *-n32|*"-n32 ") libmagic=N32;; 7659d514b0f3Smrg *-64|*"-64 ") libmagic=64-bit;; 7660d514b0f3Smrg *) libmagic=never-match;; 7661d514b0f3Smrg esac 7662d514b0f3Smrg lt_cv_deplibs_check_method=pass_all 7663d514b0f3Smrg ;; 7664d514b0f3Smrg 7665d514b0f3Smrg# This must be glibc/ELF. 7666d514b0f3Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 7667d514b0f3Smrg lt_cv_deplibs_check_method=pass_all 7668d514b0f3Smrg ;; 7669d514b0f3Smrg 7670d514b0f3Smrgnetbsd*) 7671d514b0f3Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 7672d514b0f3Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 7673d514b0f3Smrg else 7674d514b0f3Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 7675d514b0f3Smrg fi 7676d514b0f3Smrg ;; 7677d514b0f3Smrg 7678d514b0f3Smrgnewos6*) 7679d514b0f3Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 7680d514b0f3Smrg lt_cv_file_magic_cmd=$FILECMD 7681d514b0f3Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 7682d514b0f3Smrg ;; 7683d514b0f3Smrg 7684d514b0f3Smrg*nto* | *qnx*) 7685d514b0f3Smrg lt_cv_deplibs_check_method=pass_all 7686d514b0f3Smrg ;; 7687d514b0f3Smrg 7688d514b0f3Smrgopenbsd* | bitrig*) 7689d514b0f3Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 7690d514b0f3Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 7691d514b0f3Smrg else 7692d514b0f3Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 7693d514b0f3Smrg fi 7694d514b0f3Smrg ;; 7695d514b0f3Smrg 7696d514b0f3Smrgosf3* | osf4* | osf5*) 7697d514b0f3Smrg lt_cv_deplibs_check_method=pass_all 7698d514b0f3Smrg ;; 7699d514b0f3Smrg 7700d514b0f3Smrgrdos*) 7701d514b0f3Smrg lt_cv_deplibs_check_method=pass_all 7702d514b0f3Smrg ;; 7703d514b0f3Smrg 7704d514b0f3Smrgsolaris*) 7705d514b0f3Smrg lt_cv_deplibs_check_method=pass_all 7706d514b0f3Smrg ;; 7707d514b0f3Smrg 7708d514b0f3Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 7709d514b0f3Smrg lt_cv_deplibs_check_method=pass_all 7710d514b0f3Smrg ;; 7711d514b0f3Smrg 7712d514b0f3Smrgsysv4 | sysv4.3*) 7713d514b0f3Smrg case $host_vendor in 7714d514b0f3Smrg motorola) 7715d514b0f3Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' 7716d514b0f3Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 7717d514b0f3Smrg ;; 7718d514b0f3Smrg ncr) 7719d514b0f3Smrg lt_cv_deplibs_check_method=pass_all 7720d514b0f3Smrg ;; 7721d514b0f3Smrg sequent) 7722d514b0f3Smrg lt_cv_file_magic_cmd='/bin/file' 7723d514b0f3Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 7724d514b0f3Smrg ;; 7725d514b0f3Smrg sni) 7726d514b0f3Smrg lt_cv_file_magic_cmd='/bin/file' 7727d514b0f3Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 7728d514b0f3Smrg lt_cv_file_magic_test_file=/lib/libc.so 7729d514b0f3Smrg ;; 7730d514b0f3Smrg siemens) 7731d514b0f3Smrg lt_cv_deplibs_check_method=pass_all 7732d514b0f3Smrg ;; 7733d514b0f3Smrg pc) 7734d514b0f3Smrg lt_cv_deplibs_check_method=pass_all 7735d514b0f3Smrg ;; 7736d514b0f3Smrg esac 7737d514b0f3Smrg ;; 7738d514b0f3Smrg 7739d514b0f3Smrgtpf*) 7740d514b0f3Smrg lt_cv_deplibs_check_method=pass_all 7741d514b0f3Smrg ;; 7742d514b0f3Smrgos2*) 7743d514b0f3Smrg lt_cv_deplibs_check_method=pass_all 7744d514b0f3Smrg ;; 7745d514b0f3Smrgesac 7746d514b0f3Smrg]) 7747d514b0f3Smrg 7748d514b0f3Smrgfile_magic_glob= 7749d514b0f3Smrgwant_nocaseglob=no 7750d514b0f3Smrgif test "$build" = "$host"; then 7751d514b0f3Smrg case $host_os in 7752d514b0f3Smrg mingw* | pw32*) 7753d514b0f3Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 7754d514b0f3Smrg want_nocaseglob=yes 7755d514b0f3Smrg else 7756d514b0f3Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 7757d514b0f3Smrg fi 7758d514b0f3Smrg ;; 7759d514b0f3Smrg esac 7760d514b0f3Smrgfi 7761d514b0f3Smrg 7762d514b0f3Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 7763d514b0f3Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 7764d514b0f3Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 7765d514b0f3Smrg 7766d514b0f3Smrg_LT_DECL([], [deplibs_check_method], [1], 7767d514b0f3Smrg [Method to check whether dependent libraries are shared objects]) 7768d514b0f3Smrg_LT_DECL([], [file_magic_cmd], [1], 7769d514b0f3Smrg [Command to use when deplibs_check_method = "file_magic"]) 7770d514b0f3Smrg_LT_DECL([], [file_magic_glob], [1], 7771d514b0f3Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 7772d514b0f3Smrg_LT_DECL([], [want_nocaseglob], [1], 7773d514b0f3Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 7774d514b0f3Smrg])# _LT_CHECK_MAGIC_METHOD 7775d514b0f3Smrg 7776d514b0f3Smrg 7777d514b0f3Smrg# LT_PATH_NM 7778d514b0f3Smrg# ---------- 7779d514b0f3Smrg# find the pathname to a BSD- or MS-compatible name lister 7780d514b0f3SmrgAC_DEFUN([LT_PATH_NM], 7781d514b0f3Smrg[AC_REQUIRE([AC_PROG_CC])dnl 7782d514b0f3SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 7783d514b0f3Smrg[if test -n "$NM"; then 7784d514b0f3Smrg # Let the user override the test. 7785d514b0f3Smrg lt_cv_path_NM=$NM 7786d514b0f3Smrgelse 7787d514b0f3Smrg lt_nm_to_check=${ac_tool_prefix}nm 7788d514b0f3Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 7789d514b0f3Smrg lt_nm_to_check="$lt_nm_to_check nm" 7790d514b0f3Smrg fi 7791d514b0f3Smrg for lt_tmp_nm in $lt_nm_to_check; do 7792d514b0f3Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 7793d514b0f3Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 7794d514b0f3Smrg IFS=$lt_save_ifs 7795d514b0f3Smrg test -z "$ac_dir" && ac_dir=. 7796d514b0f3Smrg tmp_nm=$ac_dir/$lt_tmp_nm 7797d514b0f3Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 7798d514b0f3Smrg # Check to see if the nm accepts a BSD-compat flag. 7799d514b0f3Smrg # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 7800d514b0f3Smrg # nm: unknown option "B" ignored 7801d514b0f3Smrg # Tru64's nm complains that /dev/null is an invalid object file 7802d514b0f3Smrg # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 7803d514b0f3Smrg case $build_os in 7804d514b0f3Smrg mingw*) lt_bad_file=conftest.nm/nofile ;; 7805d514b0f3Smrg *) lt_bad_file=/dev/null ;; 7806d514b0f3Smrg esac 7807d514b0f3Smrg case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in 7808d514b0f3Smrg *$lt_bad_file* | *'Invalid file or object type'*) 7809d514b0f3Smrg lt_cv_path_NM="$tmp_nm -B" 7810d514b0f3Smrg break 2 7811d514b0f3Smrg ;; 7812d514b0f3Smrg *) 7813d514b0f3Smrg case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in 7814d514b0f3Smrg */dev/null*) 7815d514b0f3Smrg lt_cv_path_NM="$tmp_nm -p" 7816d514b0f3Smrg break 2 7817d514b0f3Smrg ;; 7818d514b0f3Smrg *) 7819d514b0f3Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 7820d514b0f3Smrg continue # so that we can try to find one that supports BSD flags 7821d514b0f3Smrg ;; 7822d514b0f3Smrg esac 7823d514b0f3Smrg ;; 7824d514b0f3Smrg esac 7825d514b0f3Smrg fi 7826d514b0f3Smrg done 7827d514b0f3Smrg IFS=$lt_save_ifs 7828d514b0f3Smrg done 7829d514b0f3Smrg : ${lt_cv_path_NM=no} 7830d514b0f3Smrgfi]) 7831d514b0f3Smrgif test no != "$lt_cv_path_NM"; then 7832d514b0f3Smrg NM=$lt_cv_path_NM 7833d514b0f3Smrgelse 7834d514b0f3Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 7835d514b0f3Smrg if test -n "$DUMPBIN"; then : 7836d514b0f3Smrg # Let the user override the test. 7837d514b0f3Smrg else 7838d514b0f3Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 7839d514b0f3Smrg case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in 7840d514b0f3Smrg *COFF*) 7841d514b0f3Smrg DUMPBIN="$DUMPBIN -symbols -headers" 7842d514b0f3Smrg ;; 7843d514b0f3Smrg *) 7844d514b0f3Smrg DUMPBIN=: 7845d514b0f3Smrg ;; 7846d514b0f3Smrg esac 7847d514b0f3Smrg fi 7848d514b0f3Smrg AC_SUBST([DUMPBIN]) 7849d514b0f3Smrg if test : != "$DUMPBIN"; then 7850d514b0f3Smrg NM=$DUMPBIN 7851d514b0f3Smrg fi 7852d514b0f3Smrgfi 7853d514b0f3Smrgtest -z "$NM" && NM=nm 7854d514b0f3SmrgAC_SUBST([NM]) 7855d514b0f3Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 7856d514b0f3Smrg 7857d514b0f3SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 7858d514b0f3Smrg [lt_cv_nm_interface="BSD nm" 7859d514b0f3Smrg echo "int some_variable = 0;" > conftest.$ac_ext 7860d514b0f3Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 7861d514b0f3Smrg (eval "$ac_compile" 2>conftest.err) 7862d514b0f3Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 7863d514b0f3Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 7864d514b0f3Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 7865d514b0f3Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 7866d514b0f3Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 7867d514b0f3Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 7868d514b0f3Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 7869d514b0f3Smrg lt_cv_nm_interface="MS dumpbin" 7870d514b0f3Smrg fi 7871d514b0f3Smrg rm -f conftest*]) 7872d514b0f3Smrg])# LT_PATH_NM 7873d514b0f3Smrg 7874d514b0f3Smrg# Old names: 7875d514b0f3SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 7876d514b0f3SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 7877d514b0f3Smrgdnl aclocal-1.4 backwards compatibility: 7878d514b0f3Smrgdnl AC_DEFUN([AM_PROG_NM], []) 7879d514b0f3Smrgdnl AC_DEFUN([AC_PROG_NM], []) 7880d514b0f3Smrg 7881d514b0f3Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 7882d514b0f3Smrg# -------------------------------- 7883d514b0f3Smrg# how to determine the name of the shared library 7884d514b0f3Smrg# associated with a specific link library. 7885d514b0f3Smrg# -- PORTME fill in with the dynamic library characteristics 7886d514b0f3Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 7887d514b0f3Smrg[m4_require([_LT_DECL_EGREP]) 7888d514b0f3Smrgm4_require([_LT_DECL_OBJDUMP]) 7889d514b0f3Smrgm4_require([_LT_DECL_DLLTOOL]) 7890d514b0f3SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 7891d514b0f3Smrglt_cv_sharedlib_from_linklib_cmd, 7892d514b0f3Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 7893d514b0f3Smrg 7894d514b0f3Smrgcase $host_os in 7895d514b0f3Smrgcygwin* | mingw* | pw32* | cegcc*) 7896d514b0f3Smrg # two different shell functions defined in ltmain.sh; 7897d514b0f3Smrg # decide which one to use based on capabilities of $DLLTOOL 7898d514b0f3Smrg case `$DLLTOOL --help 2>&1` in 7899d514b0f3Smrg *--identify-strict*) 7900d514b0f3Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 7901d514b0f3Smrg ;; 7902d514b0f3Smrg *) 7903d514b0f3Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 7904d514b0f3Smrg ;; 7905d514b0f3Smrg esac 7906d514b0f3Smrg ;; 7907d514b0f3Smrg*) 7908d514b0f3Smrg # fallback: assume linklib IS sharedlib 7909d514b0f3Smrg lt_cv_sharedlib_from_linklib_cmd=$ECHO 7910d514b0f3Smrg ;; 7911d514b0f3Smrgesac 7912d514b0f3Smrg]) 7913d514b0f3Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 7914d514b0f3Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 7915d514b0f3Smrg 7916d514b0f3Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 7917d514b0f3Smrg [Command to associate shared and link libraries]) 7918d514b0f3Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 7919d514b0f3Smrg 7920d514b0f3Smrg 7921d514b0f3Smrg# _LT_PATH_MANIFEST_TOOL 7922d514b0f3Smrg# ---------------------- 7923d514b0f3Smrg# locate the manifest tool 7924d514b0f3Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 7925d514b0f3Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 7926d514b0f3Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 7927d514b0f3SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 7928d514b0f3Smrg [lt_cv_path_mainfest_tool=no 7929d514b0f3Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 7930d514b0f3Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 7931d514b0f3Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 7932d514b0f3Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 7933d514b0f3Smrg lt_cv_path_mainfest_tool=yes 7934d514b0f3Smrg fi 7935d514b0f3Smrg rm -f conftest*]) 7936d514b0f3Smrgif test yes != "$lt_cv_path_mainfest_tool"; then 7937d514b0f3Smrg MANIFEST_TOOL=: 7938d514b0f3Smrgfi 7939d514b0f3Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 7940d514b0f3Smrg])# _LT_PATH_MANIFEST_TOOL 7941d514b0f3Smrg 7942d514b0f3Smrg 7943d514b0f3Smrg# _LT_DLL_DEF_P([FILE]) 7944d514b0f3Smrg# --------------------- 7945d514b0f3Smrg# True iff FILE is a Windows DLL '.def' file. 7946d514b0f3Smrg# Keep in sync with func_dll_def_p in the libtool script 7947d514b0f3SmrgAC_DEFUN([_LT_DLL_DEF_P], 7948d514b0f3Smrg[dnl 7949d514b0f3Smrg test DEF = "`$SED -n dnl 7950d514b0f3Smrg -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 7951d514b0f3Smrg -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 7952d514b0f3Smrg -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 7953d514b0f3Smrg -e q dnl Only consider the first "real" line 7954d514b0f3Smrg $1`" dnl 7955d514b0f3Smrg])# _LT_DLL_DEF_P 7956d514b0f3Smrg 7957d514b0f3Smrg 7958d514b0f3Smrg# LT_LIB_M 7959d514b0f3Smrg# -------- 7960d514b0f3Smrg# check for math library 7961d514b0f3SmrgAC_DEFUN([LT_LIB_M], 7962d514b0f3Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7963d514b0f3SmrgLIBM= 7964d514b0f3Smrgcase $host in 7965d514b0f3Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 7966d514b0f3Smrg # These system don't have libm, or don't need it 7967d514b0f3Smrg ;; 7968d514b0f3Smrg*-ncr-sysv4.3*) 7969d514b0f3Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 7970d514b0f3Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 7971d514b0f3Smrg ;; 7972d514b0f3Smrg*) 7973d514b0f3Smrg AC_CHECK_LIB(m, cos, LIBM=-lm) 7974d514b0f3Smrg ;; 7975d514b0f3Smrgesac 7976d514b0f3SmrgAC_SUBST([LIBM]) 7977d514b0f3Smrg])# LT_LIB_M 7978d514b0f3Smrg 7979d514b0f3Smrg# Old name: 7980d514b0f3SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 7981d514b0f3Smrgdnl aclocal-1.4 backwards compatibility: 7982d514b0f3Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 7983d514b0f3Smrg 7984d514b0f3Smrg 7985d514b0f3Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 7986d514b0f3Smrg# ------------------------------- 7987d514b0f3Smrgm4_defun([_LT_COMPILER_NO_RTTI], 7988d514b0f3Smrg[m4_require([_LT_TAG_COMPILER])dnl 7989d514b0f3Smrg 7990d514b0f3Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 7991d514b0f3Smrg 7992d514b0f3Smrgif test yes = "$GCC"; then 7993d514b0f3Smrg case $cc_basename in 7994d514b0f3Smrg nvcc*) 7995d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 7996d514b0f3Smrg *) 7997d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 7998d514b0f3Smrg esac 7999d514b0f3Smrg 8000d514b0f3Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 8001d514b0f3Smrg lt_cv_prog_compiler_rtti_exceptions, 8002d514b0f3Smrg [-fno-rtti -fno-exceptions], [], 8003d514b0f3Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 8004d514b0f3Smrgfi 8005d514b0f3Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 8006d514b0f3Smrg [Compiler flag to turn off builtin functions]) 8007d514b0f3Smrg])# _LT_COMPILER_NO_RTTI 8008d514b0f3Smrg 8009d514b0f3Smrg 8010d514b0f3Smrg# _LT_CMD_GLOBAL_SYMBOLS 8011d514b0f3Smrg# ---------------------- 8012d514b0f3Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 8013d514b0f3Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 8014d514b0f3SmrgAC_REQUIRE([AC_PROG_CC])dnl 8015d514b0f3SmrgAC_REQUIRE([AC_PROG_AWK])dnl 8016d514b0f3SmrgAC_REQUIRE([LT_PATH_NM])dnl 8017d514b0f3SmrgAC_REQUIRE([LT_PATH_LD])dnl 8018d514b0f3Smrgm4_require([_LT_DECL_SED])dnl 8019d514b0f3Smrgm4_require([_LT_DECL_EGREP])dnl 8020d514b0f3Smrgm4_require([_LT_TAG_COMPILER])dnl 8021d514b0f3Smrg 8022d514b0f3Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 8023d514b0f3SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 8024d514b0f3SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 8025d514b0f3Smrg[ 8026d514b0f3Smrg# These are sane defaults that work on at least a few old systems. 8027d514b0f3Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 8028d514b0f3Smrg 8029d514b0f3Smrg# Character class describing NM global symbol codes. 8030d514b0f3Smrgsymcode='[[BCDEGRST]]' 8031d514b0f3Smrg 8032d514b0f3Smrg# Regexp to match symbols that can be accessed directly from C. 8033d514b0f3Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 8034d514b0f3Smrg 8035d514b0f3Smrg# Define system-specific variables. 8036d514b0f3Smrgcase $host_os in 8037d514b0f3Smrgaix*) 8038d514b0f3Smrg symcode='[[BCDT]]' 8039d514b0f3Smrg ;; 8040d514b0f3Smrgcygwin* | mingw* | pw32* | cegcc*) 8041d514b0f3Smrg symcode='[[ABCDGISTW]]' 8042d514b0f3Smrg ;; 8043d514b0f3Smrghpux*) 8044d514b0f3Smrg if test ia64 = "$host_cpu"; then 8045d514b0f3Smrg symcode='[[ABCDEGRST]]' 8046d514b0f3Smrg fi 8047d514b0f3Smrg ;; 8048d514b0f3Smrgirix* | nonstopux*) 8049d514b0f3Smrg symcode='[[BCDEGRST]]' 8050d514b0f3Smrg ;; 8051d514b0f3Smrgosf*) 8052d514b0f3Smrg symcode='[[BCDEGQRST]]' 8053d514b0f3Smrg ;; 8054d514b0f3Smrgsolaris*) 8055d514b0f3Smrg symcode='[[BDRT]]' 8056d514b0f3Smrg ;; 8057d514b0f3Smrgsco3.2v5*) 8058d514b0f3Smrg symcode='[[DT]]' 8059d514b0f3Smrg ;; 8060d514b0f3Smrgsysv4.2uw2*) 8061d514b0f3Smrg symcode='[[DT]]' 8062d514b0f3Smrg ;; 8063d514b0f3Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 8064d514b0f3Smrg symcode='[[ABDT]]' 8065d514b0f3Smrg ;; 8066d514b0f3Smrgsysv4) 8067d514b0f3Smrg symcode='[[DFNSTU]]' 8068d514b0f3Smrg ;; 8069d514b0f3Smrgesac 8070d514b0f3Smrg 8071d514b0f3Smrg# If we're using GNU nm, then use its standard symbol codes. 8072d514b0f3Smrgcase `$NM -V 2>&1` in 8073d514b0f3Smrg*GNU* | *'with BFD'*) 8074d514b0f3Smrg symcode='[[ABCDGIRSTW]]' ;; 8075d514b0f3Smrgesac 8076d514b0f3Smrg 8077d514b0f3Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 8078d514b0f3Smrg # Gets list of data symbols to import. 8079d514b0f3Smrg lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'" 8080d514b0f3Smrg # Adjust the below global symbol transforms to fixup imported variables. 8081d514b0f3Smrg lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 8082d514b0f3Smrg lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 8083d514b0f3Smrg lt_c_name_lib_hook="\ 8084d514b0f3Smrg -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 8085d514b0f3Smrg -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 8086d514b0f3Smrgelse 8087d514b0f3Smrg # Disable hooks by default. 8088d514b0f3Smrg lt_cv_sys_global_symbol_to_import= 8089d514b0f3Smrg lt_cdecl_hook= 8090d514b0f3Smrg lt_c_name_hook= 8091d514b0f3Smrg lt_c_name_lib_hook= 8092d514b0f3Smrgfi 8093d514b0f3Smrg 8094d514b0f3Smrg# Transform an extracted symbol line into a proper C declaration. 8095d514b0f3Smrg# Some systems (esp. on ia64) link data and code symbols differently, 8096d514b0f3Smrg# so use this general approach. 8097d514b0f3Smrglt_cv_sys_global_symbol_to_cdecl="$SED -n"\ 8098d514b0f3Smrg$lt_cdecl_hook\ 8099d514b0f3Smrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 8100d514b0f3Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 8101d514b0f3Smrg 8102d514b0f3Smrg# Transform an extracted symbol line into symbol name and symbol address 8103d514b0f3Smrglt_cv_sys_global_symbol_to_c_name_address="$SED -n"\ 8104d514b0f3Smrg$lt_c_name_hook\ 8105d514b0f3Smrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 8106d514b0f3Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 8107d514b0f3Smrg 8108d514b0f3Smrg# Transform an extracted symbol line into symbol name with lib prefix and 8109d514b0f3Smrg# symbol address. 8110d514b0f3Smrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\ 8111d514b0f3Smrg$lt_c_name_lib_hook\ 8112d514b0f3Smrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 8113d514b0f3Smrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 8114d514b0f3Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 8115d514b0f3Smrg 8116d514b0f3Smrg# Handle CRLF in mingw tool chain 8117d514b0f3Smrgopt_cr= 8118d514b0f3Smrgcase $build_os in 8119d514b0f3Smrgmingw*) 8120d514b0f3Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 8121d514b0f3Smrg ;; 8122d514b0f3Smrgesac 8123d514b0f3Smrg 8124d514b0f3Smrg# Try without a prefix underscore, then with it. 8125d514b0f3Smrgfor ac_symprfx in "" "_"; do 8126d514b0f3Smrg 8127d514b0f3Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 8128d514b0f3Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 8129d514b0f3Smrg 8130d514b0f3Smrg # Write the raw and C identifiers. 8131d514b0f3Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 8132d514b0f3Smrg # Fake it for dumpbin and say T for any non-static function, 8133d514b0f3Smrg # D for any global variable and I for any imported variable. 8134d514b0f3Smrg # Also find C++ and __fastcall symbols from MSVC++ or ICC, 8135d514b0f3Smrg # which start with @ or ?. 8136d514b0f3Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 8137d514b0f3Smrg" {last_section=section; section=\$ 3};"\ 8138d514b0f3Smrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 8139d514b0f3Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 8140d514b0f3Smrg" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 8141d514b0f3Smrg" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 8142d514b0f3Smrg" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 8143d514b0f3Smrg" \$ 0!~/External *\|/{next};"\ 8144d514b0f3Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 8145d514b0f3Smrg" {if(hide[section]) next};"\ 8146d514b0f3Smrg" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 8147d514b0f3Smrg" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 8148d514b0f3Smrg" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 8149d514b0f3Smrg" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 8150d514b0f3Smrg" ' prfx=^$ac_symprfx]" 8151d514b0f3Smrg else 8152d514b0f3Smrg lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 8153d514b0f3Smrg fi 8154d514b0f3Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'" 8155d514b0f3Smrg 8156d514b0f3Smrg # Check to see that the pipe works correctly. 8157d514b0f3Smrg pipe_works=no 8158d514b0f3Smrg 8159d514b0f3Smrg rm -f conftest* 8160d514b0f3Smrg cat > conftest.$ac_ext <<_LT_EOF 8161d514b0f3Smrg#ifdef __cplusplus 8162d514b0f3Smrgextern "C" { 8163d514b0f3Smrg#endif 8164d514b0f3Smrgchar nm_test_var; 8165d514b0f3Smrgvoid nm_test_func(void); 8166d514b0f3Smrgvoid nm_test_func(void){} 8167d514b0f3Smrg#ifdef __cplusplus 8168d514b0f3Smrg} 8169d514b0f3Smrg#endif 8170d514b0f3Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 8171d514b0f3Smrg_LT_EOF 8172d514b0f3Smrg 8173d514b0f3Smrg if AC_TRY_EVAL(ac_compile); then 8174d514b0f3Smrg # Now try to grab the symbols. 8175d514b0f3Smrg nlist=conftest.nm 8176d514b0f3Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 8177d514b0f3Smrg # Try sorting and uniquifying the output. 8178d514b0f3Smrg if sort "$nlist" | uniq > "$nlist"T; then 8179d514b0f3Smrg mv -f "$nlist"T "$nlist" 8180d514b0f3Smrg else 8181d514b0f3Smrg rm -f "$nlist"T 8182d514b0f3Smrg fi 8183d514b0f3Smrg 8184d514b0f3Smrg # Make sure that we snagged all the symbols we need. 8185d514b0f3Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 8186d514b0f3Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 8187d514b0f3Smrg cat <<_LT_EOF > conftest.$ac_ext 8188d514b0f3Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 8189d514b0f3Smrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 8190d514b0f3Smrg/* DATA imports from DLLs on WIN32 can't be const, because runtime 8191d514b0f3Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 8192d514b0f3Smrg# define LT@&t@_DLSYM_CONST 8193d514b0f3Smrg#elif defined __osf__ 8194d514b0f3Smrg/* This system does not cope well with relocations in const data. */ 8195d514b0f3Smrg# define LT@&t@_DLSYM_CONST 8196d514b0f3Smrg#else 8197d514b0f3Smrg# define LT@&t@_DLSYM_CONST const 8198d514b0f3Smrg#endif 8199d514b0f3Smrg 8200d514b0f3Smrg#ifdef __cplusplus 8201d514b0f3Smrgextern "C" { 8202d514b0f3Smrg#endif 8203d514b0f3Smrg 8204d514b0f3Smrg_LT_EOF 8205d514b0f3Smrg # Now generate the symbol file. 8206d514b0f3Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 8207d514b0f3Smrg 8208d514b0f3Smrg cat <<_LT_EOF >> conftest.$ac_ext 8209d514b0f3Smrg 8210d514b0f3Smrg/* The mapping between symbol names and symbols. */ 8211d514b0f3SmrgLT@&t@_DLSYM_CONST struct { 8212d514b0f3Smrg const char *name; 8213d514b0f3Smrg void *address; 8214d514b0f3Smrg} 8215d514b0f3Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 8216d514b0f3Smrg{ 8217d514b0f3Smrg { "@PROGRAM@", (void *) 0 }, 8218d514b0f3Smrg_LT_EOF 8219d514b0f3Smrg $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 8220d514b0f3Smrg cat <<\_LT_EOF >> conftest.$ac_ext 8221d514b0f3Smrg {0, (void *) 0} 8222d514b0f3Smrg}; 8223d514b0f3Smrg 8224d514b0f3Smrg/* This works around a problem in FreeBSD linker */ 8225d514b0f3Smrg#ifdef FREEBSD_WORKAROUND 8226d514b0f3Smrgstatic const void *lt_preloaded_setup() { 8227d514b0f3Smrg return lt__PROGRAM__LTX_preloaded_symbols; 8228d514b0f3Smrg} 8229d514b0f3Smrg#endif 8230d514b0f3Smrg 8231d514b0f3Smrg#ifdef __cplusplus 8232d514b0f3Smrg} 8233d514b0f3Smrg#endif 8234d514b0f3Smrg_LT_EOF 8235d514b0f3Smrg # Now try linking the two files. 8236d514b0f3Smrg mv conftest.$ac_objext conftstm.$ac_objext 8237d514b0f3Smrg lt_globsym_save_LIBS=$LIBS 8238d514b0f3Smrg lt_globsym_save_CFLAGS=$CFLAGS 8239d514b0f3Smrg LIBS=conftstm.$ac_objext 8240d514b0f3Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 8241d514b0f3Smrg if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 8242d514b0f3Smrg pipe_works=yes 8243d514b0f3Smrg fi 8244d514b0f3Smrg LIBS=$lt_globsym_save_LIBS 8245d514b0f3Smrg CFLAGS=$lt_globsym_save_CFLAGS 8246d514b0f3Smrg else 8247d514b0f3Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 8248d514b0f3Smrg fi 8249d514b0f3Smrg else 8250d514b0f3Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 8251d514b0f3Smrg fi 8252d514b0f3Smrg else 8253d514b0f3Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 8254d514b0f3Smrg fi 8255d514b0f3Smrg else 8256d514b0f3Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 8257d514b0f3Smrg cat conftest.$ac_ext >&5 8258d514b0f3Smrg fi 8259d514b0f3Smrg rm -rf conftest* conftst* 8260d514b0f3Smrg 8261d514b0f3Smrg # Do not use the global_symbol_pipe unless it works. 8262d514b0f3Smrg if test yes = "$pipe_works"; then 8263d514b0f3Smrg break 8264d514b0f3Smrg else 8265d514b0f3Smrg lt_cv_sys_global_symbol_pipe= 8266d514b0f3Smrg fi 8267d514b0f3Smrgdone 8268d514b0f3Smrg]) 8269d514b0f3Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 8270d514b0f3Smrg lt_cv_sys_global_symbol_to_cdecl= 8271d514b0f3Smrgfi 8272d514b0f3Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 8273d514b0f3Smrg AC_MSG_RESULT(failed) 8274d514b0f3Smrgelse 8275d514b0f3Smrg AC_MSG_RESULT(ok) 8276d514b0f3Smrgfi 8277d514b0f3Smrg 8278d514b0f3Smrg# Response file support. 8279d514b0f3Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 8280d514b0f3Smrg nm_file_list_spec='@' 8281d514b0f3Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 8282d514b0f3Smrg nm_file_list_spec='@' 8283d514b0f3Smrgfi 8284d514b0f3Smrg 8285d514b0f3Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 8286d514b0f3Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 8287d514b0f3Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 8288d514b0f3Smrg [Transform the output of nm in a proper C declaration]) 8289d514b0f3Smrg_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 8290d514b0f3Smrg [Transform the output of nm into a list of symbols to manually relocate]) 8291d514b0f3Smrg_LT_DECL([global_symbol_to_c_name_address], 8292d514b0f3Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 8293d514b0f3Smrg [Transform the output of nm in a C name address pair]) 8294d514b0f3Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 8295d514b0f3Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 8296d514b0f3Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 8297d514b0f3Smrg_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 8298d514b0f3Smrg [The name lister interface]) 8299d514b0f3Smrg_LT_DECL([], [nm_file_list_spec], [1], 8300d514b0f3Smrg [Specify filename containing input files for $NM]) 8301d514b0f3Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 8302d514b0f3Smrg 8303d514b0f3Smrg 8304d514b0f3Smrg# _LT_COMPILER_PIC([TAGNAME]) 8305d514b0f3Smrg# --------------------------- 8306d514b0f3Smrgm4_defun([_LT_COMPILER_PIC], 8307d514b0f3Smrg[m4_require([_LT_TAG_COMPILER])dnl 8308d514b0f3Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 8309d514b0f3Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 8310d514b0f3Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 8311d514b0f3Smrg 8312d514b0f3Smrgm4_if([$1], [CXX], [ 8313d514b0f3Smrg # C++ specific cases for pic, static, wl, etc. 8314d514b0f3Smrg if test yes = "$GXX"; then 8315d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8316d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8317d514b0f3Smrg 8318d514b0f3Smrg case $host_os in 8319d514b0f3Smrg aix*) 8320d514b0f3Smrg # All AIX code is PIC. 8321d514b0f3Smrg if test ia64 = "$host_cpu"; then 8322d514b0f3Smrg # AIX 5 now supports IA64 processor 8323d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8324d514b0f3Smrg fi 8325d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8326d514b0f3Smrg ;; 8327d514b0f3Smrg 8328d514b0f3Smrg amigaos*) 8329d514b0f3Smrg case $host_cpu in 8330d514b0f3Smrg powerpc) 8331d514b0f3Smrg # see comment about AmigaOS4 .so support 8332d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8333d514b0f3Smrg ;; 8334d514b0f3Smrg m68k) 8335d514b0f3Smrg # FIXME: we need at least 68020 code to build shared libraries, but 8336d514b0f3Smrg # adding the '-m68020' flag to GCC prevents building anything better, 8337d514b0f3Smrg # like '-m68040'. 8338d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 8339d514b0f3Smrg ;; 8340d514b0f3Smrg esac 8341d514b0f3Smrg ;; 8342d514b0f3Smrg 8343d514b0f3Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 8344d514b0f3Smrg # PIC is the default for these OSes. 8345d514b0f3Smrg ;; 8346d514b0f3Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 8347d514b0f3Smrg # This hack is so that the source file can tell whether it is being 8348d514b0f3Smrg # built for inclusion in a dll (and should export symbols for example). 8349d514b0f3Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 8350d514b0f3Smrg # (--disable-auto-import) libraries 8351d514b0f3Smrg m4_if([$1], [GCJ], [], 8352d514b0f3Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 8353d514b0f3Smrg case $host_os in 8354d514b0f3Smrg os2*) 8355d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 8356d514b0f3Smrg ;; 8357d514b0f3Smrg esac 8358d514b0f3Smrg ;; 8359d514b0f3Smrg darwin* | rhapsody*) 8360d514b0f3Smrg # PIC is the default on this platform 8361d514b0f3Smrg # Common symbols not allowed in MH_DYLIB files 8362d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 8363d514b0f3Smrg ;; 8364d514b0f3Smrg *djgpp*) 8365d514b0f3Smrg # DJGPP does not support shared libraries at all 8366d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 8367d514b0f3Smrg ;; 8368d514b0f3Smrg haiku*) 8369d514b0f3Smrg # PIC is the default for Haiku. 8370d514b0f3Smrg # The "-static" flag exists, but is broken. 8371d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 8372d514b0f3Smrg ;; 8373d514b0f3Smrg interix[[3-9]]*) 8374d514b0f3Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 8375d514b0f3Smrg # Instead, we relocate shared libraries at runtime. 8376d514b0f3Smrg ;; 8377d514b0f3Smrg sysv4*MP*) 8378d514b0f3Smrg if test -d /usr/nec; then 8379d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 8380d514b0f3Smrg fi 8381d514b0f3Smrg ;; 8382d514b0f3Smrg hpux*) 8383d514b0f3Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 8384d514b0f3Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 8385d514b0f3Smrg # sets the default TLS model and affects inlining. 8386d514b0f3Smrg case $host_cpu in 8387d514b0f3Smrg hppa*64*) 8388d514b0f3Smrg ;; 8389d514b0f3Smrg *) 8390d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8391d514b0f3Smrg ;; 8392d514b0f3Smrg esac 8393d514b0f3Smrg ;; 8394d514b0f3Smrg *qnx* | *nto*) 8395d514b0f3Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 8396d514b0f3Smrg # it will coredump. 8397d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 8398d514b0f3Smrg ;; 8399d514b0f3Smrg *) 8400d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8401d514b0f3Smrg ;; 8402d514b0f3Smrg esac 8403d514b0f3Smrg else 8404d514b0f3Smrg case $host_os in 8405d514b0f3Smrg aix[[4-9]]*) 8406d514b0f3Smrg # All AIX code is PIC. 8407d514b0f3Smrg if test ia64 = "$host_cpu"; then 8408d514b0f3Smrg # AIX 5 now supports IA64 processor 8409d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8410d514b0f3Smrg else 8411d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 8412d514b0f3Smrg fi 8413d514b0f3Smrg ;; 8414d514b0f3Smrg chorus*) 8415d514b0f3Smrg case $cc_basename in 8416d514b0f3Smrg cxch68*) 8417d514b0f3Smrg # Green Hills C++ Compiler 8418d514b0f3Smrg # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" 8419d514b0f3Smrg ;; 8420d514b0f3Smrg esac 8421d514b0f3Smrg ;; 8422d514b0f3Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 8423d514b0f3Smrg # This hack is so that the source file can tell whether it is being 8424d514b0f3Smrg # built for inclusion in a dll (and should export symbols for example). 8425d514b0f3Smrg m4_if([$1], [GCJ], [], 8426d514b0f3Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 8427d514b0f3Smrg ;; 8428d514b0f3Smrg dgux*) 8429d514b0f3Smrg case $cc_basename in 8430d514b0f3Smrg ec++*) 8431d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8432d514b0f3Smrg ;; 8433d514b0f3Smrg ghcx*) 8434d514b0f3Smrg # Green Hills C++ Compiler 8435d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 8436d514b0f3Smrg ;; 8437d514b0f3Smrg *) 8438d514b0f3Smrg ;; 8439d514b0f3Smrg esac 8440d514b0f3Smrg ;; 8441d514b0f3Smrg freebsd* | dragonfly* | midnightbsd*) 8442d514b0f3Smrg # FreeBSD uses GNU C++ 8443d514b0f3Smrg ;; 8444d514b0f3Smrg hpux9* | hpux10* | hpux11*) 8445d514b0f3Smrg case $cc_basename in 8446d514b0f3Smrg CC*) 8447d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8448d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 8449d514b0f3Smrg if test ia64 != "$host_cpu"; then 8450d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 8451d514b0f3Smrg fi 8452d514b0f3Smrg ;; 8453d514b0f3Smrg aCC*) 8454d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8455d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 8456d514b0f3Smrg case $host_cpu in 8457d514b0f3Smrg hppa*64*|ia64*) 8458d514b0f3Smrg # +Z the default 8459d514b0f3Smrg ;; 8460d514b0f3Smrg *) 8461d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 8462d514b0f3Smrg ;; 8463d514b0f3Smrg esac 8464d514b0f3Smrg ;; 8465d514b0f3Smrg *) 8466d514b0f3Smrg ;; 8467d514b0f3Smrg esac 8468d514b0f3Smrg ;; 8469d514b0f3Smrg interix*) 8470d514b0f3Smrg # This is c89, which is MS Visual C++ (no shared libs) 8471d514b0f3Smrg # Anyone wants to do a port? 8472d514b0f3Smrg ;; 8473d514b0f3Smrg irix5* | irix6* | nonstopux*) 8474d514b0f3Smrg case $cc_basename in 8475d514b0f3Smrg CC*) 8476d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8477d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8478d514b0f3Smrg # CC pic flag -KPIC is the default. 8479d514b0f3Smrg ;; 8480d514b0f3Smrg *) 8481d514b0f3Smrg ;; 8482d514b0f3Smrg esac 8483d514b0f3Smrg ;; 8484d514b0f3Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 8485d514b0f3Smrg case $cc_basename in 8486d514b0f3Smrg KCC*) 8487d514b0f3Smrg # KAI C++ Compiler 8488d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 8489d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8490d514b0f3Smrg ;; 8491d514b0f3Smrg ecpc* ) 8492d514b0f3Smrg # old Intel C++ for x86_64, which still supported -KPIC. 8493d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8494d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8495d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8496d514b0f3Smrg ;; 8497d514b0f3Smrg icpc* ) 8498d514b0f3Smrg # Intel C++, used to be incompatible with GCC. 8499d514b0f3Smrg # ICC 10 doesn't accept -KPIC any more. 8500d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8501d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8502d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8503d514b0f3Smrg ;; 8504d514b0f3Smrg pgCC* | pgcpp*) 8505d514b0f3Smrg # Portland Group C++ compiler 8506d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8507d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 8508d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8509d514b0f3Smrg ;; 8510d514b0f3Smrg cxx*) 8511d514b0f3Smrg # Compaq C++ 8512d514b0f3Smrg # Make sure the PIC flag is empty. It appears that all Alpha 8513d514b0f3Smrg # Linux and Compaq Tru64 Unix objects are PIC. 8514d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 8515d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8516d514b0f3Smrg ;; 8517d514b0f3Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 8518d514b0f3Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 8519d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8520d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 8521d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 8522d514b0f3Smrg ;; 8523d514b0f3Smrg *) 8524d514b0f3Smrg case `$CC -V 2>&1 | $SED 5q` in 8525d514b0f3Smrg *Sun\ C*) 8526d514b0f3Smrg # Sun C++ 5.9 8527d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8528d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8529d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 8530d514b0f3Smrg ;; 8531d514b0f3Smrg esac 8532d514b0f3Smrg ;; 8533d514b0f3Smrg esac 8534d514b0f3Smrg ;; 8535d514b0f3Smrg lynxos*) 8536d514b0f3Smrg ;; 8537d514b0f3Smrg m88k*) 8538d514b0f3Smrg ;; 8539d514b0f3Smrg mvs*) 8540d514b0f3Smrg case $cc_basename in 8541d514b0f3Smrg cxx*) 8542d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 8543d514b0f3Smrg ;; 8544d514b0f3Smrg *) 8545d514b0f3Smrg ;; 8546d514b0f3Smrg esac 8547d514b0f3Smrg ;; 8548d514b0f3Smrg netbsd*) 8549d514b0f3Smrg ;; 8550d514b0f3Smrg *qnx* | *nto*) 8551d514b0f3Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 8552d514b0f3Smrg # it will coredump. 8553d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 8554d514b0f3Smrg ;; 8555d514b0f3Smrg osf3* | osf4* | osf5*) 8556d514b0f3Smrg case $cc_basename in 8557d514b0f3Smrg KCC*) 8558d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 8559d514b0f3Smrg ;; 8560d514b0f3Smrg RCC*) 8561d514b0f3Smrg # Rational C++ 2.4.1 8562d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 8563d514b0f3Smrg ;; 8564d514b0f3Smrg cxx*) 8565d514b0f3Smrg # Digital/Compaq C++ 8566d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8567d514b0f3Smrg # Make sure the PIC flag is empty. It appears that all Alpha 8568d514b0f3Smrg # Linux and Compaq Tru64 Unix objects are PIC. 8569d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 8570d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8571d514b0f3Smrg ;; 8572d514b0f3Smrg *) 8573d514b0f3Smrg ;; 8574d514b0f3Smrg esac 8575d514b0f3Smrg ;; 8576d514b0f3Smrg psos*) 8577d514b0f3Smrg ;; 8578d514b0f3Smrg solaris*) 8579d514b0f3Smrg case $cc_basename in 8580d514b0f3Smrg CC* | sunCC*) 8581d514b0f3Smrg # Sun C++ 4.2, 5.x and Centerline C++ 8582d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8583d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8584d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 8585d514b0f3Smrg ;; 8586d514b0f3Smrg gcx*) 8587d514b0f3Smrg # Green Hills C++ Compiler 8588d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 8589d514b0f3Smrg ;; 8590d514b0f3Smrg *) 8591d514b0f3Smrg ;; 8592d514b0f3Smrg esac 8593d514b0f3Smrg ;; 8594d514b0f3Smrg sunos4*) 8595d514b0f3Smrg case $cc_basename in 8596d514b0f3Smrg CC*) 8597d514b0f3Smrg # Sun C++ 4.x 8598d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 8599d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8600d514b0f3Smrg ;; 8601d514b0f3Smrg lcc*) 8602d514b0f3Smrg # Lucid 8603d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 8604d514b0f3Smrg ;; 8605d514b0f3Smrg *) 8606d514b0f3Smrg ;; 8607d514b0f3Smrg esac 8608d514b0f3Smrg ;; 8609d514b0f3Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 8610d514b0f3Smrg case $cc_basename in 8611d514b0f3Smrg CC*) 8612d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8613d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8614d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8615d514b0f3Smrg ;; 8616d514b0f3Smrg esac 8617d514b0f3Smrg ;; 8618d514b0f3Smrg tandem*) 8619d514b0f3Smrg case $cc_basename in 8620d514b0f3Smrg NCC*) 8621d514b0f3Smrg # NonStop-UX NCC 3.20 8622d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8623d514b0f3Smrg ;; 8624d514b0f3Smrg *) 8625d514b0f3Smrg ;; 8626d514b0f3Smrg esac 8627d514b0f3Smrg ;; 8628d514b0f3Smrg vxworks*) 8629d514b0f3Smrg ;; 8630d514b0f3Smrg *) 8631d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 8632d514b0f3Smrg ;; 8633d514b0f3Smrg esac 8634d514b0f3Smrg fi 8635d514b0f3Smrg], 8636d514b0f3Smrg[ 8637d514b0f3Smrg if test yes = "$GCC"; then 8638d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8639d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8640d514b0f3Smrg 8641d514b0f3Smrg case $host_os in 8642d514b0f3Smrg aix*) 8643d514b0f3Smrg # All AIX code is PIC. 8644d514b0f3Smrg if test ia64 = "$host_cpu"; then 8645d514b0f3Smrg # AIX 5 now supports IA64 processor 8646d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8647d514b0f3Smrg fi 8648d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8649d514b0f3Smrg ;; 8650d514b0f3Smrg 8651d514b0f3Smrg amigaos*) 8652d514b0f3Smrg case $host_cpu in 8653d514b0f3Smrg powerpc) 8654d514b0f3Smrg # see comment about AmigaOS4 .so support 8655d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8656d514b0f3Smrg ;; 8657d514b0f3Smrg m68k) 8658d514b0f3Smrg # FIXME: we need at least 68020 code to build shared libraries, but 8659d514b0f3Smrg # adding the '-m68020' flag to GCC prevents building anything better, 8660d514b0f3Smrg # like '-m68040'. 8661d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 8662d514b0f3Smrg ;; 8663d514b0f3Smrg esac 8664d514b0f3Smrg ;; 8665d514b0f3Smrg 8666d514b0f3Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 8667d514b0f3Smrg # PIC is the default for these OSes. 8668d514b0f3Smrg ;; 8669d514b0f3Smrg 8670d514b0f3Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 8671d514b0f3Smrg # This hack is so that the source file can tell whether it is being 8672d514b0f3Smrg # built for inclusion in a dll (and should export symbols for example). 8673d514b0f3Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 8674d514b0f3Smrg # (--disable-auto-import) libraries 8675d514b0f3Smrg m4_if([$1], [GCJ], [], 8676d514b0f3Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 8677d514b0f3Smrg case $host_os in 8678d514b0f3Smrg os2*) 8679d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 8680d514b0f3Smrg ;; 8681d514b0f3Smrg esac 8682d514b0f3Smrg ;; 8683d514b0f3Smrg 8684d514b0f3Smrg darwin* | rhapsody*) 8685d514b0f3Smrg # PIC is the default on this platform 8686d514b0f3Smrg # Common symbols not allowed in MH_DYLIB files 8687d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 8688d514b0f3Smrg ;; 8689d514b0f3Smrg 8690d514b0f3Smrg haiku*) 8691d514b0f3Smrg # PIC is the default for Haiku. 8692d514b0f3Smrg # The "-static" flag exists, but is broken. 8693d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 8694d514b0f3Smrg ;; 8695d514b0f3Smrg 8696d514b0f3Smrg hpux*) 8697d514b0f3Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 8698d514b0f3Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 8699d514b0f3Smrg # sets the default TLS model and affects inlining. 8700d514b0f3Smrg case $host_cpu in 8701d514b0f3Smrg hppa*64*) 8702d514b0f3Smrg # +Z the default 8703d514b0f3Smrg ;; 8704d514b0f3Smrg *) 8705d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8706d514b0f3Smrg ;; 8707d514b0f3Smrg esac 8708d514b0f3Smrg ;; 8709d514b0f3Smrg 8710d514b0f3Smrg interix[[3-9]]*) 8711d514b0f3Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 8712d514b0f3Smrg # Instead, we relocate shared libraries at runtime. 8713d514b0f3Smrg ;; 8714d514b0f3Smrg 8715d514b0f3Smrg msdosdjgpp*) 8716d514b0f3Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 8717d514b0f3Smrg # on systems that don't support them. 8718d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 8719d514b0f3Smrg enable_shared=no 8720d514b0f3Smrg ;; 8721d514b0f3Smrg 8722d514b0f3Smrg *nto* | *qnx*) 8723d514b0f3Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 8724d514b0f3Smrg # it will coredump. 8725d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 8726d514b0f3Smrg ;; 8727d514b0f3Smrg 8728d514b0f3Smrg sysv4*MP*) 8729d514b0f3Smrg if test -d /usr/nec; then 8730d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 8731d514b0f3Smrg fi 8732d514b0f3Smrg ;; 8733d514b0f3Smrg 8734d514b0f3Smrg *) 8735d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8736d514b0f3Smrg ;; 8737d514b0f3Smrg esac 8738d514b0f3Smrg 8739d514b0f3Smrg case $cc_basename in 8740d514b0f3Smrg nvcc*) # Cuda Compiler Driver 2.2 8741d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 8742d514b0f3Smrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 8743d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 8744d514b0f3Smrg fi 8745d514b0f3Smrg ;; 8746d514b0f3Smrg esac 8747d514b0f3Smrg else 8748d514b0f3Smrg # PORTME Check for flag to pass linker flags through the system compiler. 8749d514b0f3Smrg case $host_os in 8750d514b0f3Smrg aix*) 8751d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8752d514b0f3Smrg if test ia64 = "$host_cpu"; then 8753d514b0f3Smrg # AIX 5 now supports IA64 processor 8754d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8755d514b0f3Smrg else 8756d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 8757d514b0f3Smrg fi 8758d514b0f3Smrg ;; 8759d514b0f3Smrg 8760d514b0f3Smrg darwin* | rhapsody*) 8761d514b0f3Smrg # PIC is the default on this platform 8762d514b0f3Smrg # Common symbols not allowed in MH_DYLIB files 8763d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 8764d514b0f3Smrg case $cc_basename in 8765d514b0f3Smrg nagfor*) 8766d514b0f3Smrg # NAG Fortran compiler 8767d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 8768d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 8769d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8770d514b0f3Smrg ;; 8771d514b0f3Smrg esac 8772d514b0f3Smrg ;; 8773d514b0f3Smrg 8774d514b0f3Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 8775d514b0f3Smrg # This hack is so that the source file can tell whether it is being 8776d514b0f3Smrg # built for inclusion in a dll (and should export symbols for example). 8777d514b0f3Smrg m4_if([$1], [GCJ], [], 8778d514b0f3Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 8779d514b0f3Smrg case $host_os in 8780d514b0f3Smrg os2*) 8781d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 8782d514b0f3Smrg ;; 8783d514b0f3Smrg esac 8784d514b0f3Smrg ;; 8785d514b0f3Smrg 8786d514b0f3Smrg hpux9* | hpux10* | hpux11*) 8787d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8788d514b0f3Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 8789d514b0f3Smrg # not for PA HP-UX. 8790d514b0f3Smrg case $host_cpu in 8791d514b0f3Smrg hppa*64*|ia64*) 8792d514b0f3Smrg # +Z the default 8793d514b0f3Smrg ;; 8794d514b0f3Smrg *) 8795d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 8796d514b0f3Smrg ;; 8797d514b0f3Smrg esac 8798d514b0f3Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 8799d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 8800d514b0f3Smrg ;; 8801d514b0f3Smrg 8802d514b0f3Smrg irix5* | irix6* | nonstopux*) 8803d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8804d514b0f3Smrg # PIC (with -KPIC) is the default. 8805d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8806d514b0f3Smrg ;; 8807d514b0f3Smrg 8808d514b0f3Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 8809d514b0f3Smrg case $cc_basename in 8810d514b0f3Smrg # old Intel for x86_64, which still supported -KPIC. 8811d514b0f3Smrg ecc*) 8812d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8813d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8814d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8815d514b0f3Smrg ;; 8816d514b0f3Smrg # icc used to be incompatible with GCC. 8817d514b0f3Smrg # ICC 10 doesn't accept -KPIC any more. 8818d514b0f3Smrg icc* | ifort*) 8819d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8820d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8821d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8822d514b0f3Smrg ;; 8823d514b0f3Smrg # Lahey Fortran 8.1. 8824d514b0f3Smrg lf95*) 8825d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8826d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 8827d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 8828d514b0f3Smrg ;; 8829d514b0f3Smrg nagfor*) 8830d514b0f3Smrg # NAG Fortran compiler 8831d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 8832d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 8833d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8834d514b0f3Smrg ;; 8835d514b0f3Smrg tcc*) 8836d514b0f3Smrg # Fabrice Bellard et al's Tiny C Compiler 8837d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8838d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8839d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8840d514b0f3Smrg ;; 8841d514b0f3Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 8842d514b0f3Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 8843d514b0f3Smrg # which looks to be a dead project) 8844d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8845d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 8846d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8847d514b0f3Smrg ;; 8848d514b0f3Smrg ccc*) 8849d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8850d514b0f3Smrg # All Alpha code is PIC. 8851d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8852d514b0f3Smrg ;; 8853d514b0f3Smrg xl* | bgxl* | bgf* | mpixl*) 8854d514b0f3Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 8855d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8856d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 8857d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 8858d514b0f3Smrg ;; 8859d514b0f3Smrg *) 8860d514b0f3Smrg case `$CC -V 2>&1 | $SED 5q` in 8861d514b0f3Smrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 8862d514b0f3Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 8863d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8864d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8865d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 8866d514b0f3Smrg ;; 8867d514b0f3Smrg *Sun\ F* | *Sun*Fortran*) 8868d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8869d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8870d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 8871d514b0f3Smrg ;; 8872d514b0f3Smrg *Sun\ C*) 8873d514b0f3Smrg # Sun C 5.9 8874d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8875d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8876d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8877d514b0f3Smrg ;; 8878d514b0f3Smrg *Intel*\ [[CF]]*Compiler*) 8879d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8880d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 8881d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 8882d514b0f3Smrg ;; 8883d514b0f3Smrg *Portland\ Group*) 8884d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8885d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 8886d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8887d514b0f3Smrg ;; 8888d514b0f3Smrg esac 8889d514b0f3Smrg ;; 8890d514b0f3Smrg esac 8891d514b0f3Smrg ;; 8892d514b0f3Smrg 8893d514b0f3Smrg newsos6) 8894d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8895d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8896d514b0f3Smrg ;; 8897d514b0f3Smrg 8898d514b0f3Smrg *nto* | *qnx*) 8899d514b0f3Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 8900d514b0f3Smrg # it will coredump. 8901d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 8902d514b0f3Smrg ;; 8903d514b0f3Smrg 8904d514b0f3Smrg osf3* | osf4* | osf5*) 8905d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8906d514b0f3Smrg # All OSF/1 code is PIC. 8907d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8908d514b0f3Smrg ;; 8909d514b0f3Smrg 8910d514b0f3Smrg rdos*) 8911d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 8912d514b0f3Smrg ;; 8913d514b0f3Smrg 8914d514b0f3Smrg solaris*) 8915d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8916d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8917d514b0f3Smrg case $cc_basename in 8918d514b0f3Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 8919d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 8920d514b0f3Smrg *) 8921d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 8922d514b0f3Smrg esac 8923d514b0f3Smrg ;; 8924d514b0f3Smrg 8925d514b0f3Smrg sunos4*) 8926d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 8927d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 8928d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8929d514b0f3Smrg ;; 8930d514b0f3Smrg 8931d514b0f3Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 8932d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8933d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8934d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8935d514b0f3Smrg ;; 8936d514b0f3Smrg 8937d514b0f3Smrg sysv4*MP*) 8938d514b0f3Smrg if test -d /usr/nec; then 8939d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 8940d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8941d514b0f3Smrg fi 8942d514b0f3Smrg ;; 8943d514b0f3Smrg 8944d514b0f3Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 8945d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8946d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 8947d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8948d514b0f3Smrg ;; 8949d514b0f3Smrg 8950d514b0f3Smrg unicos*) 8951d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 8952d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 8953d514b0f3Smrg ;; 8954d514b0f3Smrg 8955d514b0f3Smrg uts4*) 8956d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 8957d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 8958d514b0f3Smrg ;; 8959d514b0f3Smrg 8960d514b0f3Smrg *) 8961d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 8962d514b0f3Smrg ;; 8963d514b0f3Smrg esac 8964d514b0f3Smrg fi 8965d514b0f3Smrg]) 8966d514b0f3Smrgcase $host_os in 8967d514b0f3Smrg # For platforms that do not support PIC, -DPIC is meaningless: 8968d514b0f3Smrg *djgpp*) 8969d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 8970d514b0f3Smrg ;; 8971d514b0f3Smrg *) 8972d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 8973d514b0f3Smrg ;; 8974d514b0f3Smrgesac 8975d514b0f3Smrg 8976d514b0f3SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 8977d514b0f3Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 8978d514b0f3Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 8979d514b0f3Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 8980d514b0f3Smrg 8981d514b0f3Smrg# 8982d514b0f3Smrg# Check to make sure the PIC flag actually works. 8983d514b0f3Smrg# 8984d514b0f3Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 8985d514b0f3Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 8986d514b0f3Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 8987d514b0f3Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 8988d514b0f3Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 8989d514b0f3Smrg "" | " "*) ;; 8990d514b0f3Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 8991d514b0f3Smrg esac], 8992d514b0f3Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 8993d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 8994d514b0f3Smrgfi 8995d514b0f3Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 8996d514b0f3Smrg [Additional compiler flags for building library objects]) 8997d514b0f3Smrg 8998d514b0f3Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 8999d514b0f3Smrg [How to pass a linker flag through the compiler]) 9000d514b0f3Smrg# 9001d514b0f3Smrg# Check to make sure the static flag actually works. 9002d514b0f3Smrg# 9003d514b0f3Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 9004d514b0f3Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 9005d514b0f3Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 9006d514b0f3Smrg $lt_tmp_static_flag, 9007d514b0f3Smrg [], 9008d514b0f3Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 9009d514b0f3Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 9010d514b0f3Smrg [Compiler flag to prevent dynamic linking]) 9011d514b0f3Smrg])# _LT_COMPILER_PIC 9012d514b0f3Smrg 9013d514b0f3Smrg 9014d514b0f3Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 9015d514b0f3Smrg# ---------------------------- 9016d514b0f3Smrg# See if the linker supports building shared libraries. 9017d514b0f3Smrgm4_defun([_LT_LINKER_SHLIBS], 9018d514b0f3Smrg[AC_REQUIRE([LT_PATH_LD])dnl 9019d514b0f3SmrgAC_REQUIRE([LT_PATH_NM])dnl 9020d514b0f3Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 9021d514b0f3Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 9022d514b0f3Smrgm4_require([_LT_DECL_EGREP])dnl 9023d514b0f3Smrgm4_require([_LT_DECL_SED])dnl 9024d514b0f3Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 9025d514b0f3Smrgm4_require([_LT_TAG_COMPILER])dnl 9026d514b0f3SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 9027d514b0f3Smrgm4_if([$1], [CXX], [ 9028d514b0f3Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 9029d514b0f3Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 9030d514b0f3Smrg case $host_os in 9031d514b0f3Smrg aix[[4-9]]*) 9032d514b0f3Smrg # If we're using GNU nm, then we don't want the "-C" option. 9033d514b0f3Smrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 9034d514b0f3Smrg # Without the "-l" option, or with the "-B" option, AIX nm treats 9035d514b0f3Smrg # weak defined symbols like other global defined symbols, whereas 9036d514b0f3Smrg # GNU nm marks them as "W". 9037d514b0f3Smrg # While the 'weak' keyword is ignored in the Export File, we need 9038d514b0f3Smrg # it in the Import File for the 'aix-soname' feature, so we have 9039d514b0f3Smrg # to replace the "-B" option with "-P" for AIX nm. 9040d514b0f3Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 9041d514b0f3Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' 9042d514b0f3Smrg else 9043d514b0f3Smrg _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' 9044d514b0f3Smrg fi 9045d514b0f3Smrg ;; 9046d514b0f3Smrg pw32*) 9047d514b0f3Smrg _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 9048d514b0f3Smrg ;; 9049d514b0f3Smrg cygwin* | mingw* | cegcc*) 9050d514b0f3Smrg case $cc_basename in 9051d514b0f3Smrg cl* | icl*) 9052d514b0f3Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 9053d514b0f3Smrg ;; 9054d514b0f3Smrg *) 9055d514b0f3Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' 9056d514b0f3Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 9057d514b0f3Smrg ;; 9058d514b0f3Smrg esac 9059d514b0f3Smrg ;; 9060d514b0f3Smrg *) 9061d514b0f3Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 9062d514b0f3Smrg ;; 9063d514b0f3Smrg esac 9064d514b0f3Smrg], [ 9065d514b0f3Smrg runpath_var= 9066d514b0f3Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 9067d514b0f3Smrg _LT_TAGVAR(always_export_symbols, $1)=no 9068d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)= 9069d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 9070d514b0f3Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 9071d514b0f3Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 9072d514b0f3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 9073d514b0f3Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 9074d514b0f3Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 9075d514b0f3Smrg _LT_TAGVAR(hardcode_direct, $1)=no 9076d514b0f3Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 9077d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 9078d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 9079d514b0f3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 9080d514b0f3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 9081d514b0f3Smrg _LT_TAGVAR(inherit_rpath, $1)=no 9082d514b0f3Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 9083d514b0f3Smrg _LT_TAGVAR(module_cmds, $1)= 9084d514b0f3Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 9085d514b0f3Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 9086d514b0f3Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 9087d514b0f3Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 9088d514b0f3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 9089d514b0f3Smrg # include_expsyms should be a list of space-separated symbols to be *always* 9090d514b0f3Smrg # included in the symbol list 9091d514b0f3Smrg _LT_TAGVAR(include_expsyms, $1)= 9092d514b0f3Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 9093d514b0f3Smrg # it will be wrapped by ' (' and ')$', so one must not match beginning or 9094d514b0f3Smrg # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 9095d514b0f3Smrg # as well as any symbol that contains 'd'. 9096d514b0f3Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 9097d514b0f3Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 9098d514b0f3Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 9099d514b0f3Smrg # the symbol is explicitly referenced. Since portable code cannot 9100d514b0f3Smrg # rely on this symbol name, it's probably fine to never include it in 9101d514b0f3Smrg # preloaded symbol tables. 9102d514b0f3Smrg # Exclude shared library initialization/finalization symbols. 9103d514b0f3Smrgdnl Note also adjust exclude_expsyms for C++ above. 9104d514b0f3Smrg extract_expsyms_cmds= 9105d514b0f3Smrg 9106d514b0f3Smrg case $host_os in 9107d514b0f3Smrg cygwin* | mingw* | pw32* | cegcc*) 9108d514b0f3Smrg # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time 9109d514b0f3Smrg # When not using gcc, we currently assume that we are using 9110d514b0f3Smrg # Microsoft Visual C++ or Intel C++ Compiler. 9111d514b0f3Smrg if test yes != "$GCC"; then 9112d514b0f3Smrg with_gnu_ld=no 9113d514b0f3Smrg fi 9114d514b0f3Smrg ;; 9115d514b0f3Smrg interix*) 9116d514b0f3Smrg # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC) 9117d514b0f3Smrg with_gnu_ld=yes 9118d514b0f3Smrg ;; 9119d514b0f3Smrg openbsd* | bitrig*) 9120d514b0f3Smrg with_gnu_ld=no 9121d514b0f3Smrg ;; 9122d514b0f3Smrg esac 9123d514b0f3Smrg 9124d514b0f3Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 9125d514b0f3Smrg 9126d514b0f3Smrg # On some targets, GNU ld is compatible enough with the native linker 9127d514b0f3Smrg # that we're better off using the native interface for both. 9128d514b0f3Smrg lt_use_gnu_ld_interface=no 9129d514b0f3Smrg if test yes = "$with_gnu_ld"; then 9130d514b0f3Smrg case $host_os in 9131d514b0f3Smrg aix*) 9132d514b0f3Smrg # The AIX port of GNU ld has always aspired to compatibility 9133d514b0f3Smrg # with the native linker. However, as the warning in the GNU ld 9134d514b0f3Smrg # block says, versions before 2.19.5* couldn't really create working 9135d514b0f3Smrg # shared libraries, regardless of the interface used. 9136d514b0f3Smrg case `$LD -v 2>&1` in 9137d514b0f3Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 9138d514b0f3Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 9139d514b0f3Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 9140d514b0f3Smrg *) 9141d514b0f3Smrg lt_use_gnu_ld_interface=yes 9142d514b0f3Smrg ;; 9143d514b0f3Smrg esac 9144d514b0f3Smrg ;; 9145d514b0f3Smrg *) 9146d514b0f3Smrg lt_use_gnu_ld_interface=yes 9147d514b0f3Smrg ;; 9148d514b0f3Smrg esac 9149d514b0f3Smrg fi 9150d514b0f3Smrg 9151d514b0f3Smrg if test yes = "$lt_use_gnu_ld_interface"; then 9152d514b0f3Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 9153d514b0f3Smrg wlarc='$wl' 9154d514b0f3Smrg 9155d514b0f3Smrg # Set some defaults for GNU ld with shared library support. These 9156d514b0f3Smrg # are reset later if shared libraries are not supported. Putting them 9157d514b0f3Smrg # here allows them to be overridden if necessary. 9158d514b0f3Smrg runpath_var=LD_RUN_PATH 9159d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9160d514b0f3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 9161d514b0f3Smrg # ancient GNU ld didn't support --whole-archive et. al. 9162d514b0f3Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 9163d514b0f3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 9164d514b0f3Smrg else 9165d514b0f3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 9166d514b0f3Smrg fi 9167d514b0f3Smrg supports_anon_versioning=no 9168d514b0f3Smrg case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in 9169d514b0f3Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 9170d514b0f3Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 9171d514b0f3Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 9172d514b0f3Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 9173d514b0f3Smrg *\ 2.11.*) ;; # other 2.11 versions 9174d514b0f3Smrg *) supports_anon_versioning=yes ;; 9175d514b0f3Smrg esac 9176d514b0f3Smrg 9177d514b0f3Smrg # See if GNU ld supports shared libraries. 9178d514b0f3Smrg case $host_os in 9179d514b0f3Smrg aix[[3-9]]*) 9180d514b0f3Smrg # On AIX/PPC, the GNU linker is very broken 9181d514b0f3Smrg if test ia64 != "$host_cpu"; then 9182d514b0f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 9183d514b0f3Smrg cat <<_LT_EOF 1>&2 9184d514b0f3Smrg 9185d514b0f3Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 9186d514b0f3Smrg*** to be unable to reliably create shared libraries on AIX. 9187d514b0f3Smrg*** Therefore, libtool is disabling shared libraries support. If you 9188d514b0f3Smrg*** really care for shared libraries, you may want to install binutils 9189d514b0f3Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 9190d514b0f3Smrg*** You will then need to restart the configuration process. 9191d514b0f3Smrg 9192d514b0f3Smrg_LT_EOF 9193d514b0f3Smrg fi 9194d514b0f3Smrg ;; 9195d514b0f3Smrg 9196d514b0f3Smrg amigaos*) 9197d514b0f3Smrg case $host_cpu in 9198d514b0f3Smrg powerpc) 9199d514b0f3Smrg # see comment about AmigaOS4 .so support 9200d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 9201d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 9202d514b0f3Smrg ;; 9203d514b0f3Smrg m68k) 9204d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' 9205d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9206d514b0f3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9207d514b0f3Smrg ;; 9208d514b0f3Smrg esac 9209d514b0f3Smrg ;; 9210d514b0f3Smrg 9211d514b0f3Smrg beos*) 9212d514b0f3Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 9213d514b0f3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 9214d514b0f3Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 9215d514b0f3Smrg # support --undefined. This deserves some investigation. FIXME 9216d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 9217d514b0f3Smrg else 9218d514b0f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 9219d514b0f3Smrg fi 9220d514b0f3Smrg ;; 9221d514b0f3Smrg 9222d514b0f3Smrg cygwin* | mingw* | pw32* | cegcc*) 9223d514b0f3Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 9224d514b0f3Smrg # as there is no search path for DLLs. 9225d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9226d514b0f3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 9227d514b0f3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 9228d514b0f3Smrg _LT_TAGVAR(always_export_symbols, $1)=no 9229d514b0f3Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 9230d514b0f3Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' 9231d514b0f3Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 9232d514b0f3Smrg 9233d514b0f3Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 9234d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 9235d514b0f3Smrg # If the export-symbols file already is a .def file, use it as 9236d514b0f3Smrg # is; otherwise, prepend EXPORTS... 9237d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 9238d514b0f3Smrg cp $export_symbols $output_objdir/$soname.def; 9239d514b0f3Smrg else 9240d514b0f3Smrg echo EXPORTS > $output_objdir/$soname.def; 9241d514b0f3Smrg cat $export_symbols >> $output_objdir/$soname.def; 9242d514b0f3Smrg fi~ 9243d514b0f3Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 9244d514b0f3Smrg else 9245d514b0f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 9246d514b0f3Smrg fi 9247d514b0f3Smrg ;; 9248d514b0f3Smrg 9249d514b0f3Smrg haiku*) 9250d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 9251d514b0f3Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 9252d514b0f3Smrg ;; 9253d514b0f3Smrg 9254d514b0f3Smrg os2*) 9255d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9256d514b0f3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9257d514b0f3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 9258d514b0f3Smrg shrext_cmds=.dll 9259d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 9260d514b0f3Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 9261d514b0f3Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 9262d514b0f3Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 9263d514b0f3Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 9264d514b0f3Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 9265d514b0f3Smrg emximp -o $lib $output_objdir/$libname.def' 9266d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 9267d514b0f3Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 9268d514b0f3Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 9269d514b0f3Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 9270d514b0f3Smrg prefix_cmds="$SED"~ 9271d514b0f3Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 9272d514b0f3Smrg prefix_cmds="$prefix_cmds -e 1d"; 9273d514b0f3Smrg fi~ 9274d514b0f3Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 9275d514b0f3Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 9276d514b0f3Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 9277d514b0f3Smrg emximp -o $lib $output_objdir/$libname.def' 9278d514b0f3Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 9279d514b0f3Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 9280d514b0f3Smrg _LT_TAGVAR(file_list_spec, $1)='@' 9281d514b0f3Smrg ;; 9282d514b0f3Smrg 9283d514b0f3Smrg interix[[3-9]]*) 9284d514b0f3Smrg _LT_TAGVAR(hardcode_direct, $1)=no 9285d514b0f3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9286d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 9287d514b0f3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9288d514b0f3Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 9289d514b0f3Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 9290d514b0f3Smrg # default) and relocated if they conflict, which is a slow very memory 9291d514b0f3Smrg # consuming and fragmenting process. To avoid this, we pick a random, 9292d514b0f3Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 9293d514b0f3Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 9294d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' 9295d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' 9296d514b0f3Smrg ;; 9297d514b0f3Smrg 9298d514b0f3Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 9299d514b0f3Smrg tmp_diet=no 9300d514b0f3Smrg if test linux-dietlibc = "$host_os"; then 9301d514b0f3Smrg case $cc_basename in 9302d514b0f3Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 9303d514b0f3Smrg esac 9304d514b0f3Smrg fi 9305d514b0f3Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 9306d514b0f3Smrg && test no = "$tmp_diet" 9307d514b0f3Smrg then 9308d514b0f3Smrg tmp_addflag=' $pic_flag' 9309d514b0f3Smrg tmp_sharedflag='-shared' 9310d514b0f3Smrg case $cc_basename,$host_cpu in 9311d514b0f3Smrg pgcc*) # Portland Group C compiler 9312d514b0f3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' 9313d514b0f3Smrg tmp_addflag=' $pic_flag' 9314d514b0f3Smrg ;; 9315d514b0f3Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 9316d514b0f3Smrg # Portland Group f77 and f90 compilers 9317d514b0f3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' 9318d514b0f3Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 9319d514b0f3Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 9320d514b0f3Smrg tmp_addflag=' -i_dynamic' ;; 9321d514b0f3Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 9322d514b0f3Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 9323d514b0f3Smrg ifc* | ifort*) # Intel Fortran compiler 9324d514b0f3Smrg tmp_addflag=' -nofor_main' ;; 9325d514b0f3Smrg lf95*) # Lahey Fortran 8.1 9326d514b0f3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 9327d514b0f3Smrg tmp_sharedflag='--shared' ;; 9328d514b0f3Smrg nagfor*) # NAGFOR 5.3 9329d514b0f3Smrg tmp_sharedflag='-Wl,-shared' ;; 9330d514b0f3Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 9331d514b0f3Smrg tmp_sharedflag='-qmkshrobj' 9332d514b0f3Smrg tmp_addflag= ;; 9333d514b0f3Smrg nvcc*) # Cuda Compiler Driver 2.2 9334d514b0f3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' 9335d514b0f3Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 9336d514b0f3Smrg ;; 9337d514b0f3Smrg esac 9338d514b0f3Smrg case `$CC -V 2>&1 | $SED 5q` in 9339d514b0f3Smrg *Sun\ C*) # Sun C 5.9 9340d514b0f3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' 9341d514b0f3Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 9342d514b0f3Smrg tmp_sharedflag='-G' ;; 9343d514b0f3Smrg *Sun\ F*) # Sun Fortran 8.3 9344d514b0f3Smrg tmp_sharedflag='-G' ;; 9345d514b0f3Smrg esac 9346d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 9347d514b0f3Smrg 9348d514b0f3Smrg if test yes = "$supports_anon_versioning"; then 9349d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 9350d514b0f3Smrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 9351d514b0f3Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 9352d514b0f3Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 9353d514b0f3Smrg fi 9354d514b0f3Smrg 9355d514b0f3Smrg case $cc_basename in 9356d514b0f3Smrg tcc*) 9357d514b0f3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 9358d514b0f3Smrg ;; 9359d514b0f3Smrg xlf* | bgf* | bgxlf* | mpixlf*) 9360d514b0f3Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 9361d514b0f3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 9362d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9363d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 9364d514b0f3Smrg if test yes = "$supports_anon_versioning"; then 9365d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 9366d514b0f3Smrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 9367d514b0f3Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 9368d514b0f3Smrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 9369d514b0f3Smrg fi 9370d514b0f3Smrg ;; 9371d514b0f3Smrg esac 9372d514b0f3Smrg else 9373d514b0f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 9374d514b0f3Smrg fi 9375d514b0f3Smrg ;; 9376d514b0f3Smrg 9377d514b0f3Smrg netbsd*) 9378d514b0f3Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 9379d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 9380d514b0f3Smrg wlarc= 9381d514b0f3Smrg else 9382d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 9383d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 9384d514b0f3Smrg fi 9385d514b0f3Smrg ;; 9386d514b0f3Smrg 9387d514b0f3Smrg solaris*) 9388d514b0f3Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 9389d514b0f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 9390d514b0f3Smrg cat <<_LT_EOF 1>&2 9391d514b0f3Smrg 9392d514b0f3Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 9393d514b0f3Smrg*** create shared libraries on Solaris systems. Therefore, libtool 9394d514b0f3Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 9395d514b0f3Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 9396d514b0f3Smrg*** your PATH or compiler configuration so that the native linker is 9397d514b0f3Smrg*** used, and then restart. 9398d514b0f3Smrg 9399d514b0f3Smrg_LT_EOF 9400d514b0f3Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 9401d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 9402d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 9403d514b0f3Smrg else 9404d514b0f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 9405d514b0f3Smrg fi 9406d514b0f3Smrg ;; 9407d514b0f3Smrg 9408d514b0f3Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 9409d514b0f3Smrg case `$LD -v 2>&1` in 9410d514b0f3Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 9411d514b0f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 9412d514b0f3Smrg cat <<_LT_EOF 1>&2 9413d514b0f3Smrg 9414d514b0f3Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 9415d514b0f3Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 9416d514b0f3Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 9417d514b0f3Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 9418d514b0f3Smrg*** your PATH or compiler configuration so that the native linker is 9419d514b0f3Smrg*** used, and then restart. 9420d514b0f3Smrg 9421d514b0f3Smrg_LT_EOF 9422d514b0f3Smrg ;; 9423d514b0f3Smrg *) 9424d514b0f3Smrg # For security reasons, it is highly recommended that you always 9425d514b0f3Smrg # use absolute paths for naming shared libraries, and exclude the 9426d514b0f3Smrg # DT_RUNPATH tag from executables and libraries. But doing so 9427d514b0f3Smrg # requires that you compile everything twice, which is a pain. 9428d514b0f3Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 9429d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9430d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 9431d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 9432d514b0f3Smrg else 9433d514b0f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 9434d514b0f3Smrg fi 9435d514b0f3Smrg ;; 9436d514b0f3Smrg esac 9437d514b0f3Smrg ;; 9438d514b0f3Smrg 9439d514b0f3Smrg sunos4*) 9440d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 9441d514b0f3Smrg wlarc= 9442d514b0f3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9443d514b0f3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9444d514b0f3Smrg ;; 9445d514b0f3Smrg 9446d514b0f3Smrg *) 9447d514b0f3Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 9448d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 9449d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 9450d514b0f3Smrg else 9451d514b0f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 9452d514b0f3Smrg fi 9453d514b0f3Smrg ;; 9454d514b0f3Smrg esac 9455d514b0f3Smrg 9456d514b0f3Smrg if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 9457d514b0f3Smrg runpath_var= 9458d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 9459d514b0f3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 9460d514b0f3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 9461d514b0f3Smrg fi 9462d514b0f3Smrg else 9463d514b0f3Smrg # PORTME fill in a description of your system's linker (not GNU ld) 9464d514b0f3Smrg case $host_os in 9465d514b0f3Smrg aix3*) 9466d514b0f3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 9467d514b0f3Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 9468d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' 9469d514b0f3Smrg # Note: this linker hardcodes the directories in LIBPATH if there 9470d514b0f3Smrg # are no directories specified by -L. 9471d514b0f3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9472d514b0f3Smrg if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 9473d514b0f3Smrg # Neither direct hardcoding nor static linking is supported with a 9474d514b0f3Smrg # broken collect2. 9475d514b0f3Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 9476d514b0f3Smrg fi 9477d514b0f3Smrg ;; 9478d514b0f3Smrg 9479d514b0f3Smrg aix[[4-9]]*) 9480d514b0f3Smrg if test ia64 = "$host_cpu"; then 9481d514b0f3Smrg # On IA64, the linker does run time linking by default, so we don't 9482d514b0f3Smrg # have to do anything special. 9483d514b0f3Smrg aix_use_runtimelinking=no 9484d514b0f3Smrg exp_sym_flag='-Bexport' 9485d514b0f3Smrg no_entry_flag= 9486d514b0f3Smrg else 9487d514b0f3Smrg # If we're using GNU nm, then we don't want the "-C" option. 9488d514b0f3Smrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 9489d514b0f3Smrg # Without the "-l" option, or with the "-B" option, AIX nm treats 9490d514b0f3Smrg # weak defined symbols like other global defined symbols, whereas 9491d514b0f3Smrg # GNU nm marks them as "W". 9492d514b0f3Smrg # While the 'weak' keyword is ignored in the Export File, we need 9493d514b0f3Smrg # it in the Import File for the 'aix-soname' feature, so we have 9494d514b0f3Smrg # to replace the "-B" option with "-P" for AIX nm. 9495d514b0f3Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 9496d514b0f3Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' 9497d514b0f3Smrg else 9498d514b0f3Smrg _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' 9499d514b0f3Smrg fi 9500d514b0f3Smrg aix_use_runtimelinking=no 9501d514b0f3Smrg 9502d514b0f3Smrg # Test if we are trying to use run time linking or normal 9503d514b0f3Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 9504d514b0f3Smrg # have runtime linking enabled, and use it for executables. 9505d514b0f3Smrg # For shared libraries, we enable/disable runtime linking 9506d514b0f3Smrg # depending on the kind of the shared library created - 9507d514b0f3Smrg # when "with_aix_soname,aix_use_runtimelinking" is: 9508d514b0f3Smrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 9509d514b0f3Smrg # "aix,yes" lib.so shared, rtl:yes, for executables 9510d514b0f3Smrg # lib.a static archive 9511d514b0f3Smrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 9512d514b0f3Smrg # lib.a(lib.so.V) shared, rtl:no, for executables 9513d514b0f3Smrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 9514d514b0f3Smrg # lib.a(lib.so.V) shared, rtl:no 9515d514b0f3Smrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 9516d514b0f3Smrg # lib.a static archive 9517d514b0f3Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 9518d514b0f3Smrg for ld_flag in $LDFLAGS; do 9519d514b0f3Smrg if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 9520d514b0f3Smrg aix_use_runtimelinking=yes 9521d514b0f3Smrg break 9522d514b0f3Smrg fi 9523d514b0f3Smrg done 9524d514b0f3Smrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 9525d514b0f3Smrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 9526d514b0f3Smrg # so we don't have lib.a shared libs to link our executables. 9527d514b0f3Smrg # We have to force runtime linking in this case. 9528d514b0f3Smrg aix_use_runtimelinking=yes 9529d514b0f3Smrg LDFLAGS="$LDFLAGS -Wl,-brtl" 9530d514b0f3Smrg fi 9531d514b0f3Smrg ;; 9532d514b0f3Smrg esac 9533d514b0f3Smrg 9534d514b0f3Smrg exp_sym_flag='-bexport' 9535d514b0f3Smrg no_entry_flag='-bnoentry' 9536d514b0f3Smrg fi 9537d514b0f3Smrg 9538d514b0f3Smrg # When large executables or shared objects are built, AIX ld can 9539d514b0f3Smrg # have problems creating the table of contents. If linking a library 9540d514b0f3Smrg # or program results in "error TOC overflow" add -mminimal-toc to 9541d514b0f3Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 9542d514b0f3Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 9543d514b0f3Smrg 9544d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='' 9545d514b0f3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9546d514b0f3Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9547d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 9548d514b0f3Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 9549d514b0f3Smrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 9550d514b0f3Smrg case $with_aix_soname,$aix_use_runtimelinking in 9551d514b0f3Smrg aix,*) ;; # traditional, no import file 9552d514b0f3Smrg svr4,* | *,yes) # use import file 9553d514b0f3Smrg # The Import File defines what to hardcode. 9554d514b0f3Smrg _LT_TAGVAR(hardcode_direct, $1)=no 9555d514b0f3Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 9556d514b0f3Smrg ;; 9557d514b0f3Smrg esac 9558d514b0f3Smrg 9559d514b0f3Smrg if test yes = "$GCC"; then 9560d514b0f3Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 9561d514b0f3Smrg # We only want to do this on AIX 4.2 and lower, the check 9562d514b0f3Smrg # below for broken collect2 doesn't work under 4.3+ 9563d514b0f3Smrg collect2name=`$CC -print-prog-name=collect2` 9564d514b0f3Smrg if test -f "$collect2name" && 9565d514b0f3Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 9566d514b0f3Smrg then 9567d514b0f3Smrg # We have reworked collect2 9568d514b0f3Smrg : 9569d514b0f3Smrg else 9570d514b0f3Smrg # We have old collect2 9571d514b0f3Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 9572d514b0f3Smrg # It fails to find uninstalled libraries when the uninstalled 9573d514b0f3Smrg # path is not listed in the libpath. Setting hardcode_minus_L 9574d514b0f3Smrg # to unsupported forces relinking 9575d514b0f3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9576d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9577d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 9578d514b0f3Smrg fi 9579d514b0f3Smrg ;; 9580d514b0f3Smrg esac 9581d514b0f3Smrg shared_flag='-shared' 9582d514b0f3Smrg if test yes = "$aix_use_runtimelinking"; then 9583d514b0f3Smrg shared_flag="$shared_flag "'$wl-G' 9584d514b0f3Smrg fi 9585d514b0f3Smrg # Need to ensure runtime linking is disabled for the traditional 9586d514b0f3Smrg # shared library, or the linker may eventually find shared libraries 9587d514b0f3Smrg # /with/ Import File - we do not want to mix them. 9588d514b0f3Smrg shared_flag_aix='-shared' 9589d514b0f3Smrg shared_flag_svr4='-shared $wl-G' 9590d514b0f3Smrg else 9591d514b0f3Smrg # not using gcc 9592d514b0f3Smrg if test ia64 = "$host_cpu"; then 9593d514b0f3Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 9594d514b0f3Smrg # chokes on -Wl,-G. The following line is correct: 9595d514b0f3Smrg shared_flag='-G' 9596d514b0f3Smrg else 9597d514b0f3Smrg if test yes = "$aix_use_runtimelinking"; then 9598d514b0f3Smrg shared_flag='$wl-G' 9599d514b0f3Smrg else 9600d514b0f3Smrg shared_flag='$wl-bM:SRE' 9601d514b0f3Smrg fi 9602d514b0f3Smrg shared_flag_aix='$wl-bM:SRE' 9603d514b0f3Smrg shared_flag_svr4='$wl-G' 9604d514b0f3Smrg fi 9605d514b0f3Smrg fi 9606d514b0f3Smrg 9607d514b0f3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 9608d514b0f3Smrg # It seems that -bexpall does not export symbols beginning with 9609d514b0f3Smrg # underscore (_), so it is better to generate a list of symbols to export. 9610d514b0f3Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 9611d514b0f3Smrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 9612d514b0f3Smrg # Warning - without using the other runtime loading flags (-brtl), 9613d514b0f3Smrg # -berok will link without error, but may produce a broken library. 9614d514b0f3Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 9615d514b0f3Smrg # Determine the default libpath from the value encoded in an 9616d514b0f3Smrg # empty executable. 9617d514b0f3Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 9618d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 9619d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag 9620d514b0f3Smrg else 9621d514b0f3Smrg if test ia64 = "$host_cpu"; then 9622d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 9623d514b0f3Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 9624d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" 9625d514b0f3Smrg else 9626d514b0f3Smrg # Determine the default libpath from the value encoded in an 9627d514b0f3Smrg # empty executable. 9628d514b0f3Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 9629d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 9630d514b0f3Smrg # Warning - without using the other run time loading flags, 9631d514b0f3Smrg # -berok will link without error, but may produce a broken library. 9632d514b0f3Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 9633d514b0f3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 9634d514b0f3Smrg if test yes = "$with_gnu_ld"; then 9635d514b0f3Smrg # We only use this code for GNU lds that support --whole-archive. 9636d514b0f3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 9637d514b0f3Smrg else 9638d514b0f3Smrg # Exported symbols can be pulled into shared objects from archives 9639d514b0f3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 9640d514b0f3Smrg fi 9641d514b0f3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 9642d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 9643d514b0f3Smrg # -brtl affects multiple linker settings, -berok does not and is overridden later 9644d514b0f3Smrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 9645d514b0f3Smrg if test svr4 != "$with_aix_soname"; then 9646d514b0f3Smrg # This is similar to how AIX traditionally builds its shared libraries. 9647d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' 9648d514b0f3Smrg fi 9649d514b0f3Smrg if test aix != "$with_aix_soname"; then 9650d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' 9651d514b0f3Smrg else 9652d514b0f3Smrg # used by -dlpreopen to get the symbols 9653d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 9654d514b0f3Smrg fi 9655d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 9656d514b0f3Smrg fi 9657d514b0f3Smrg fi 9658d514b0f3Smrg ;; 9659d514b0f3Smrg 9660d514b0f3Smrg amigaos*) 9661d514b0f3Smrg case $host_cpu in 9662d514b0f3Smrg powerpc) 9663d514b0f3Smrg # see comment about AmigaOS4 .so support 9664d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 9665d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 9666d514b0f3Smrg ;; 9667d514b0f3Smrg m68k) 9668d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' 9669d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9670d514b0f3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9671d514b0f3Smrg ;; 9672d514b0f3Smrg esac 9673d514b0f3Smrg ;; 9674d514b0f3Smrg 9675d514b0f3Smrg bsdi[[45]]*) 9676d514b0f3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 9677d514b0f3Smrg ;; 9678d514b0f3Smrg 9679d514b0f3Smrg cygwin* | mingw* | pw32* | cegcc*) 9680d514b0f3Smrg # When not using gcc, we currently assume that we are using 9681d514b0f3Smrg # Microsoft Visual C++ or Intel C++ Compiler. 9682d514b0f3Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 9683d514b0f3Smrg # no search path for DLLs. 9684d514b0f3Smrg case $cc_basename in 9685d514b0f3Smrg cl* | icl*) 9686d514b0f3Smrg # Native MSVC or ICC 9687d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 9688d514b0f3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 9689d514b0f3Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 9690d514b0f3Smrg _LT_TAGVAR(file_list_spec, $1)='@' 9691d514b0f3Smrg # Tell ltmain to make .lib files, not .a files. 9692d514b0f3Smrg libext=lib 9693d514b0f3Smrg # Tell ltmain to make .dll files, not .so files. 9694d514b0f3Smrg shrext_cmds=.dll 9695d514b0f3Smrg # FIXME: Setting linknames here is a bad hack. 9696d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 9697d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 9698d514b0f3Smrg cp "$export_symbols" "$output_objdir/$soname.def"; 9699d514b0f3Smrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 9700d514b0f3Smrg else 9701d514b0f3Smrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 9702d514b0f3Smrg fi~ 9703d514b0f3Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 9704d514b0f3Smrg linknames=' 9705d514b0f3Smrg # The linker will not automatically build a static lib if we build a DLL. 9706d514b0f3Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 9707d514b0f3Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 9708d514b0f3Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 9709d514b0f3Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' 9710d514b0f3Smrg # Don't use ranlib 9711d514b0f3Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 9712d514b0f3Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 9713d514b0f3Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 9714d514b0f3Smrg case $lt_outputfile in 9715d514b0f3Smrg *.exe|*.EXE) ;; 9716d514b0f3Smrg *) 9717d514b0f3Smrg lt_outputfile=$lt_outputfile.exe 9718d514b0f3Smrg lt_tool_outputfile=$lt_tool_outputfile.exe 9719d514b0f3Smrg ;; 9720d514b0f3Smrg esac~ 9721d514b0f3Smrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 9722d514b0f3Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 9723d514b0f3Smrg $RM "$lt_outputfile.manifest"; 9724d514b0f3Smrg fi' 9725d514b0f3Smrg ;; 9726d514b0f3Smrg *) 9727d514b0f3Smrg # Assume MSVC and ICC wrapper 9728d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 9729d514b0f3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 9730d514b0f3Smrg # Tell ltmain to make .lib files, not .a files. 9731d514b0f3Smrg libext=lib 9732d514b0f3Smrg # Tell ltmain to make .dll files, not .so files. 9733d514b0f3Smrg shrext_cmds=.dll 9734d514b0f3Smrg # FIXME: Setting linknames here is a bad hack. 9735d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 9736d514b0f3Smrg # The linker will automatically build a .lib file if we build a DLL. 9737d514b0f3Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 9738d514b0f3Smrg # FIXME: Should let the user specify the lib program. 9739d514b0f3Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 9740d514b0f3Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 9741d514b0f3Smrg ;; 9742d514b0f3Smrg esac 9743d514b0f3Smrg ;; 9744d514b0f3Smrg 9745d514b0f3Smrg darwin* | rhapsody*) 9746d514b0f3Smrg _LT_DARWIN_LINKER_FEATURES($1) 9747d514b0f3Smrg ;; 9748d514b0f3Smrg 9749d514b0f3Smrg dgux*) 9750d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9751d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9752d514b0f3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9753d514b0f3Smrg ;; 9754d514b0f3Smrg 9755d514b0f3Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 9756d514b0f3Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 9757d514b0f3Smrg # does not break anything, and helps significantly (at the cost of a little 9758d514b0f3Smrg # extra space). 9759d514b0f3Smrg freebsd2.2*) 9760d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 9761d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9762d514b0f3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9763d514b0f3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9764d514b0f3Smrg ;; 9765d514b0f3Smrg 9766d514b0f3Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 9767d514b0f3Smrg freebsd2.*) 9768d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 9769d514b0f3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9770d514b0f3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9771d514b0f3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9772d514b0f3Smrg ;; 9773d514b0f3Smrg 9774d514b0f3Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 9775d514b0f3Smrg freebsd* | dragonfly* | midnightbsd*) 9776d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9777d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9778d514b0f3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9779d514b0f3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9780d514b0f3Smrg ;; 9781d514b0f3Smrg 9782d514b0f3Smrg hpux9*) 9783d514b0f3Smrg if test yes = "$GCC"; then 9784d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 9785d514b0f3Smrg else 9786d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 9787d514b0f3Smrg fi 9788d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 9789d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9790d514b0f3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9791d514b0f3Smrg 9792d514b0f3Smrg # hardcode_minus_L: Not really in the search PATH, 9793d514b0f3Smrg # but as the default location of the library. 9794d514b0f3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9795d514b0f3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9796d514b0f3Smrg ;; 9797d514b0f3Smrg 9798d514b0f3Smrg hpux10*) 9799d514b0f3Smrg if test yes,no = "$GCC,$with_gnu_ld"; then 9800d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 9801d514b0f3Smrg else 9802d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 9803d514b0f3Smrg fi 9804d514b0f3Smrg if test no = "$with_gnu_ld"; then 9805d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 9806d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9807d514b0f3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9808d514b0f3Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9809d514b0f3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9810d514b0f3Smrg # hardcode_minus_L: Not really in the search PATH, 9811d514b0f3Smrg # but as the default location of the library. 9812d514b0f3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9813d514b0f3Smrg fi 9814d514b0f3Smrg ;; 9815d514b0f3Smrg 9816d514b0f3Smrg hpux11*) 9817d514b0f3Smrg if test yes,no = "$GCC,$with_gnu_ld"; then 9818d514b0f3Smrg case $host_cpu in 9819d514b0f3Smrg hppa*64*) 9820d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 9821d514b0f3Smrg ;; 9822d514b0f3Smrg ia64*) 9823d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 9824d514b0f3Smrg ;; 9825d514b0f3Smrg *) 9826d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 9827d514b0f3Smrg ;; 9828d514b0f3Smrg esac 9829d514b0f3Smrg else 9830d514b0f3Smrg case $host_cpu in 9831d514b0f3Smrg hppa*64*) 9832d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 9833d514b0f3Smrg ;; 9834d514b0f3Smrg ia64*) 9835d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 9836d514b0f3Smrg ;; 9837d514b0f3Smrg *) 9838d514b0f3Smrg m4_if($1, [], [ 9839d514b0f3Smrg # Older versions of the 11.00 compiler do not understand -b yet 9840d514b0f3Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 9841d514b0f3Smrg _LT_LINKER_OPTION([if $CC understands -b], 9842d514b0f3Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 9843d514b0f3Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 9844d514b0f3Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 9845d514b0f3Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 9846d514b0f3Smrg ;; 9847d514b0f3Smrg esac 9848d514b0f3Smrg fi 9849d514b0f3Smrg if test no = "$with_gnu_ld"; then 9850d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 9851d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9852d514b0f3Smrg 9853d514b0f3Smrg case $host_cpu in 9854d514b0f3Smrg hppa*64*|ia64*) 9855d514b0f3Smrg _LT_TAGVAR(hardcode_direct, $1)=no 9856d514b0f3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9857d514b0f3Smrg ;; 9858d514b0f3Smrg *) 9859d514b0f3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9860d514b0f3Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9861d514b0f3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9862d514b0f3Smrg 9863d514b0f3Smrg # hardcode_minus_L: Not really in the search PATH, 9864d514b0f3Smrg # but as the default location of the library. 9865d514b0f3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9866d514b0f3Smrg ;; 9867d514b0f3Smrg esac 9868d514b0f3Smrg fi 9869d514b0f3Smrg ;; 9870d514b0f3Smrg 9871d514b0f3Smrg irix5* | irix6* | nonstopux*) 9872d514b0f3Smrg if test yes = "$GCC"; then 9873d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' 9874d514b0f3Smrg # Try to use the -exported_symbol ld option, if it does not 9875d514b0f3Smrg # work, assume that -exports_file does not work either and 9876d514b0f3Smrg # implicitly export all symbols. 9877d514b0f3Smrg # This should be the same for all languages, so no per-tag cache variable. 9878d514b0f3Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 9879d514b0f3Smrg [lt_cv_irix_exported_symbol], 9880d514b0f3Smrg [save_LDFLAGS=$LDFLAGS 9881d514b0f3Smrg LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 9882d514b0f3Smrg AC_LINK_IFELSE( 9883d514b0f3Smrg [AC_LANG_SOURCE( 9884d514b0f3Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 9885d514b0f3Smrg [C++], [[int foo (void) { return 0; }]], 9886d514b0f3Smrg [Fortran 77], [[ 9887d514b0f3Smrg subroutine foo 9888d514b0f3Smrg end]], 9889d514b0f3Smrg [Fortran], [[ 9890d514b0f3Smrg subroutine foo 9891d514b0f3Smrg end]])])], 9892d514b0f3Smrg [lt_cv_irix_exported_symbol=yes], 9893d514b0f3Smrg [lt_cv_irix_exported_symbol=no]) 9894d514b0f3Smrg LDFLAGS=$save_LDFLAGS]) 9895d514b0f3Smrg if test yes = "$lt_cv_irix_exported_symbol"; then 9896d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' 9897d514b0f3Smrg fi 9898d514b0f3Smrg else 9899d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' 9900d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' 9901d514b0f3Smrg fi 9902d514b0f3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 9903d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9904d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9905d514b0f3Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 9906d514b0f3Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 9907d514b0f3Smrg ;; 9908d514b0f3Smrg 9909d514b0f3Smrg linux*) 9910d514b0f3Smrg case $cc_basename in 9911d514b0f3Smrg tcc*) 9912d514b0f3Smrg # Fabrice Bellard et al's Tiny C Compiler 9913d514b0f3Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 9914d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9915d514b0f3Smrg ;; 9916d514b0f3Smrg esac 9917d514b0f3Smrg ;; 9918d514b0f3Smrg 9919d514b0f3Smrg netbsd*) 9920d514b0f3Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 9921d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 9922d514b0f3Smrg else 9923d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 9924d514b0f3Smrg fi 9925d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 9926d514b0f3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9927d514b0f3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9928d514b0f3Smrg ;; 9929d514b0f3Smrg 9930d514b0f3Smrg newsos6) 9931d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 9932d514b0f3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9933d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9934d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 9935d514b0f3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9936d514b0f3Smrg ;; 9937d514b0f3Smrg 9938d514b0f3Smrg *nto* | *qnx*) 9939d514b0f3Smrg ;; 9940d514b0f3Smrg 9941d514b0f3Smrg openbsd* | bitrig*) 9942d514b0f3Smrg if test -f /usr/libexec/ld.so; then 9943d514b0f3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 9944d514b0f3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 9945d514b0f3Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 9946d514b0f3Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 9947d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9948d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 9949d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 9950d514b0f3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 9951d514b0f3Smrg else 9952d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 9953d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 9954d514b0f3Smrg fi 9955d514b0f3Smrg else 9956d514b0f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 9957d514b0f3Smrg fi 9958d514b0f3Smrg ;; 9959d514b0f3Smrg 9960d514b0f3Smrg os2*) 9961d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 9962d514b0f3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 9963d514b0f3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 9964d514b0f3Smrg shrext_cmds=.dll 9965d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 9966d514b0f3Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 9967d514b0f3Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 9968d514b0f3Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 9969d514b0f3Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 9970d514b0f3Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 9971d514b0f3Smrg emximp -o $lib $output_objdir/$libname.def' 9972d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 9973d514b0f3Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 9974d514b0f3Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 9975d514b0f3Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 9976d514b0f3Smrg prefix_cmds="$SED"~ 9977d514b0f3Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 9978d514b0f3Smrg prefix_cmds="$prefix_cmds -e 1d"; 9979d514b0f3Smrg fi~ 9980d514b0f3Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 9981d514b0f3Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 9982d514b0f3Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 9983d514b0f3Smrg emximp -o $lib $output_objdir/$libname.def' 9984d514b0f3Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 9985d514b0f3Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 9986d514b0f3Smrg _LT_TAGVAR(file_list_spec, $1)='@' 9987d514b0f3Smrg ;; 9988d514b0f3Smrg 9989d514b0f3Smrg osf3*) 9990d514b0f3Smrg if test yes = "$GCC"; then 9991d514b0f3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 9992d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' 9993d514b0f3Smrg else 9994d514b0f3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 9995d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' 9996d514b0f3Smrg fi 9997d514b0f3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 9998d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 9999d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10000d514b0f3Smrg ;; 10001d514b0f3Smrg 10002d514b0f3Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 10003d514b0f3Smrg if test yes = "$GCC"; then 10004d514b0f3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 10005d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' 10006d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10007d514b0f3Smrg else 10008d514b0f3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 10009d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' 10010d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ 10011d514b0f3Smrg $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' 10012d514b0f3Smrg 10013d514b0f3Smrg # Both c and cxx compiler support -rpath directly 10014d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 10015d514b0f3Smrg fi 10016d514b0f3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 10017d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10018d514b0f3Smrg ;; 10019d514b0f3Smrg 10020d514b0f3Smrg solaris*) 10021d514b0f3Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 10022d514b0f3Smrg if test yes = "$GCC"; then 10023d514b0f3Smrg wlarc='$wl' 10024d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 10025d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 10026d514b0f3Smrg $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 10027d514b0f3Smrg else 10028d514b0f3Smrg case `$CC -V 2>&1` in 10029d514b0f3Smrg *"Compilers 5.0"*) 10030d514b0f3Smrg wlarc='' 10031d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 10032d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 10033d514b0f3Smrg $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 10034d514b0f3Smrg ;; 10035d514b0f3Smrg *) 10036d514b0f3Smrg wlarc='$wl' 10037d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 10038d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 10039d514b0f3Smrg $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 10040d514b0f3Smrg ;; 10041d514b0f3Smrg esac 10042d514b0f3Smrg fi 10043d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 10044d514b0f3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10045d514b0f3Smrg case $host_os in 10046d514b0f3Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 10047d514b0f3Smrg *) 10048d514b0f3Smrg # The compiler driver will combine and reorder linker options, 10049d514b0f3Smrg # but understands '-z linker_flag'. GCC discards it without '$wl', 10050d514b0f3Smrg # but is careful enough not to reorder. 10051d514b0f3Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 10052d514b0f3Smrg if test yes = "$GCC"; then 10053d514b0f3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 10054d514b0f3Smrg else 10055d514b0f3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 10056d514b0f3Smrg fi 10057d514b0f3Smrg ;; 10058d514b0f3Smrg esac 10059d514b0f3Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 10060d514b0f3Smrg ;; 10061d514b0f3Smrg 10062d514b0f3Smrg sunos4*) 10063d514b0f3Smrg if test sequent = "$host_vendor"; then 10064d514b0f3Smrg # Use $CC to link under sequent, because it throws in some extra .o 10065d514b0f3Smrg # files that make .init and .fini sections work. 10066d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 10067d514b0f3Smrg else 10068d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 10069d514b0f3Smrg fi 10070d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 10071d514b0f3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 10072d514b0f3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 10073d514b0f3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10074d514b0f3Smrg ;; 10075d514b0f3Smrg 10076d514b0f3Smrg sysv4) 10077d514b0f3Smrg case $host_vendor in 10078d514b0f3Smrg sni) 10079d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 10080d514b0f3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 10081d514b0f3Smrg ;; 10082d514b0f3Smrg siemens) 10083d514b0f3Smrg ## LD is ld it makes a PLAMLIB 10084d514b0f3Smrg ## CC just makes a GrossModule. 10085d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 10086d514b0f3Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 10087d514b0f3Smrg _LT_TAGVAR(hardcode_direct, $1)=no 10088d514b0f3Smrg ;; 10089d514b0f3Smrg motorola) 10090d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 10091d514b0f3Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 10092d514b0f3Smrg ;; 10093d514b0f3Smrg esac 10094d514b0f3Smrg runpath_var='LD_RUN_PATH' 10095d514b0f3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10096d514b0f3Smrg ;; 10097d514b0f3Smrg 10098d514b0f3Smrg sysv4.3*) 10099d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 10100d514b0f3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10101d514b0f3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 10102d514b0f3Smrg ;; 10103d514b0f3Smrg 10104d514b0f3Smrg sysv4*MP*) 10105d514b0f3Smrg if test -d /usr/nec; then 10106d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 10107d514b0f3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10108d514b0f3Smrg runpath_var=LD_RUN_PATH 10109d514b0f3Smrg hardcode_runpath_var=yes 10110d514b0f3Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 10111d514b0f3Smrg fi 10112d514b0f3Smrg ;; 10113d514b0f3Smrg 10114d514b0f3Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 10115d514b0f3Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 10116d514b0f3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10117d514b0f3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10118d514b0f3Smrg runpath_var='LD_RUN_PATH' 10119d514b0f3Smrg 10120d514b0f3Smrg if test yes = "$GCC"; then 10121d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10122d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10123d514b0f3Smrg else 10124d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10125d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10126d514b0f3Smrg fi 10127d514b0f3Smrg ;; 10128d514b0f3Smrg 10129d514b0f3Smrg sysv5* | sco3.2v5* | sco5v6*) 10130d514b0f3Smrg # Note: We CANNOT use -z defs as we might desire, because we do not 10131d514b0f3Smrg # link with -lc, and that would cause any symbols used from libc to 10132d514b0f3Smrg # always be unresolved, which means just about no library would 10133d514b0f3Smrg # ever link correctly. If we're not using GNU ld we use -z text 10134d514b0f3Smrg # though, which does catch some bad symbols but isn't as heavy-handed 10135d514b0f3Smrg # as -z defs. 10136d514b0f3Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 10137d514b0f3Smrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 10138d514b0f3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10139d514b0f3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10140d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 10141d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 10142d514b0f3Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 10143d514b0f3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 10144d514b0f3Smrg runpath_var='LD_RUN_PATH' 10145d514b0f3Smrg 10146d514b0f3Smrg if test yes = "$GCC"; then 10147d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10148d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10149d514b0f3Smrg else 10150d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10151d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 10152d514b0f3Smrg fi 10153d514b0f3Smrg ;; 10154d514b0f3Smrg 10155d514b0f3Smrg uts4*) 10156d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 10157d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 10158d514b0f3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10159d514b0f3Smrg ;; 10160d514b0f3Smrg 10161d514b0f3Smrg *) 10162d514b0f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10163d514b0f3Smrg ;; 10164d514b0f3Smrg esac 10165d514b0f3Smrg 10166d514b0f3Smrg if test sni = "$host_vendor"; then 10167d514b0f3Smrg case $host in 10168d514b0f3Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 10169d514b0f3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 10170d514b0f3Smrg ;; 10171d514b0f3Smrg esac 10172d514b0f3Smrg fi 10173d514b0f3Smrg fi 10174d514b0f3Smrg]) 10175d514b0f3SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 10176d514b0f3Smrgtest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 10177d514b0f3Smrg 10178d514b0f3Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 10179d514b0f3Smrg 10180d514b0f3Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 10181d514b0f3Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 10182d514b0f3Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 10183d514b0f3Smrg [The commands to extract the exported symbol list from a shared archive]) 10184d514b0f3Smrg 10185d514b0f3Smrg# 10186d514b0f3Smrg# Do we need to explicitly link libc? 10187d514b0f3Smrg# 10188d514b0f3Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 10189d514b0f3Smrgx|xyes) 10190d514b0f3Smrg # Assume -lc should be added 10191d514b0f3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 10192d514b0f3Smrg 10193d514b0f3Smrg if test yes,yes = "$GCC,$enable_shared"; then 10194d514b0f3Smrg case $_LT_TAGVAR(archive_cmds, $1) in 10195d514b0f3Smrg *'~'*) 10196d514b0f3Smrg # FIXME: we may have to deal with multi-command sequences. 10197d514b0f3Smrg ;; 10198d514b0f3Smrg '$CC '*) 10199d514b0f3Smrg # Test whether the compiler implicitly links with -lc since on some 10200d514b0f3Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 10201d514b0f3Smrg # to ld, don't add -lc before -lgcc. 10202d514b0f3Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 10203d514b0f3Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 10204d514b0f3Smrg [$RM conftest* 10205d514b0f3Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 10206d514b0f3Smrg 10207d514b0f3Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 10208d514b0f3Smrg soname=conftest 10209d514b0f3Smrg lib=conftest 10210d514b0f3Smrg libobjs=conftest.$ac_objext 10211d514b0f3Smrg deplibs= 10212d514b0f3Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 10213d514b0f3Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 10214d514b0f3Smrg compiler_flags=-v 10215d514b0f3Smrg linker_flags=-v 10216d514b0f3Smrg verstring= 10217d514b0f3Smrg output_objdir=. 10218d514b0f3Smrg libname=conftest 10219d514b0f3Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 10220d514b0f3Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 10221d514b0f3Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 10222d514b0f3Smrg then 10223d514b0f3Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 10224d514b0f3Smrg else 10225d514b0f3Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 10226d514b0f3Smrg fi 10227d514b0f3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 10228d514b0f3Smrg else 10229d514b0f3Smrg cat conftest.err 1>&5 10230d514b0f3Smrg fi 10231d514b0f3Smrg $RM conftest* 10232d514b0f3Smrg ]) 10233d514b0f3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 10234d514b0f3Smrg ;; 10235d514b0f3Smrg esac 10236d514b0f3Smrg fi 10237d514b0f3Smrg ;; 10238d514b0f3Smrgesac 10239d514b0f3Smrg 10240d514b0f3Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 10241d514b0f3Smrg [Whether or not to add -lc for building shared libraries]) 10242d514b0f3Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 10243d514b0f3Smrg [enable_shared_with_static_runtimes], [0], 10244d514b0f3Smrg [Whether or not to disallow shared libs when runtime libs are static]) 10245d514b0f3Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 10246d514b0f3Smrg [Compiler flag to allow reflexive dlopens]) 10247d514b0f3Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 10248d514b0f3Smrg [Compiler flag to generate shared objects directly from archives]) 10249d514b0f3Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 10250d514b0f3Smrg [Whether the compiler copes with passing no objects directly]) 10251d514b0f3Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 10252d514b0f3Smrg [Create an old-style archive from a shared archive]) 10253d514b0f3Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 10254d514b0f3Smrg [Create a temporary old-style archive to link instead of a shared archive]) 10255d514b0f3Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 10256d514b0f3Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 10257d514b0f3Smrg_LT_TAGDECL([], [module_cmds], [2], 10258d514b0f3Smrg [Commands used to build a loadable module if different from building 10259d514b0f3Smrg a shared archive.]) 10260d514b0f3Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 10261d514b0f3Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 10262d514b0f3Smrg [Whether we are building with GNU ld or not]) 10263d514b0f3Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 10264d514b0f3Smrg [Flag that allows shared libraries with undefined symbols to be built]) 10265d514b0f3Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 10266d514b0f3Smrg [Flag that enforces no undefined symbols]) 10267d514b0f3Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 10268d514b0f3Smrg [Flag to hardcode $libdir into a binary during linking. 10269d514b0f3Smrg This must work even if $libdir does not exist]) 10270d514b0f3Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 10271d514b0f3Smrg [Whether we need a single "-rpath" flag with a separated argument]) 10272d514b0f3Smrg_LT_TAGDECL([], [hardcode_direct], [0], 10273d514b0f3Smrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 10274d514b0f3Smrg DIR into the resulting binary]) 10275d514b0f3Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 10276d514b0f3Smrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 10277d514b0f3Smrg DIR into the resulting binary and the resulting library dependency is 10278d514b0f3Smrg "absolute", i.e impossible to change by setting $shlibpath_var if the 10279d514b0f3Smrg library is relocated]) 10280d514b0f3Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 10281d514b0f3Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 10282d514b0f3Smrg into the resulting binary]) 10283d514b0f3Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 10284d514b0f3Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 10285d514b0f3Smrg into the resulting binary]) 10286d514b0f3Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 10287d514b0f3Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 10288d514b0f3Smrg into the library and all subsequent libraries and executables linked 10289d514b0f3Smrg against it]) 10290d514b0f3Smrg_LT_TAGDECL([], [inherit_rpath], [0], 10291d514b0f3Smrg [Set to yes if linker adds runtime paths of dependent libraries 10292d514b0f3Smrg to runtime path list]) 10293d514b0f3Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 10294d514b0f3Smrg [Whether libtool must link a program against all its dependency libraries]) 10295d514b0f3Smrg_LT_TAGDECL([], [always_export_symbols], [0], 10296d514b0f3Smrg [Set to "yes" if exported symbols are required]) 10297d514b0f3Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 10298d514b0f3Smrg [The commands to list exported symbols]) 10299d514b0f3Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 10300d514b0f3Smrg [Symbols that should not be listed in the preloaded symbols]) 10301d514b0f3Smrg_LT_TAGDECL([], [include_expsyms], [1], 10302d514b0f3Smrg [Symbols that must always be exported]) 10303d514b0f3Smrg_LT_TAGDECL([], [prelink_cmds], [2], 10304d514b0f3Smrg [Commands necessary for linking programs (against libraries) with templates]) 10305d514b0f3Smrg_LT_TAGDECL([], [postlink_cmds], [2], 10306d514b0f3Smrg [Commands necessary for finishing linking programs]) 10307d514b0f3Smrg_LT_TAGDECL([], [file_list_spec], [1], 10308d514b0f3Smrg [Specify filename containing input files]) 10309d514b0f3Smrgdnl FIXME: Not yet implemented 10310d514b0f3Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 10311d514b0f3Smrgdnl [Compiler flag to generate thread safe objects]) 10312d514b0f3Smrg])# _LT_LINKER_SHLIBS 10313d514b0f3Smrg 10314d514b0f3Smrg 10315d514b0f3Smrg# _LT_LANG_C_CONFIG([TAG]) 10316d514b0f3Smrg# ------------------------ 10317d514b0f3Smrg# Ensure that the configuration variables for a C compiler are suitably 10318d514b0f3Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 10319d514b0f3Smrg# the compiler configuration to 'libtool'. 10320d514b0f3Smrgm4_defun([_LT_LANG_C_CONFIG], 10321d514b0f3Smrg[m4_require([_LT_DECL_EGREP])dnl 10322d514b0f3Smrglt_save_CC=$CC 10323d514b0f3SmrgAC_LANG_PUSH(C) 10324d514b0f3Smrg 10325d514b0f3Smrg# Source file extension for C test sources. 10326d514b0f3Smrgac_ext=c 10327d514b0f3Smrg 10328d514b0f3Smrg# Object file extension for compiled C test sources. 10329d514b0f3Smrgobjext=o 10330d514b0f3Smrg_LT_TAGVAR(objext, $1)=$objext 10331d514b0f3Smrg 10332d514b0f3Smrg# Code to be used in simple compile tests 10333d514b0f3Smrglt_simple_compile_test_code="int some_variable = 0;" 10334d514b0f3Smrg 10335d514b0f3Smrg# Code to be used in simple link tests 10336d514b0f3Smrglt_simple_link_test_code='int main(){return(0);}' 10337d514b0f3Smrg 10338d514b0f3Smrg_LT_TAG_COMPILER 10339d514b0f3Smrg# Save the default compiler, since it gets overwritten when the other 10340d514b0f3Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 10341d514b0f3Smrgcompiler_DEFAULT=$CC 10342d514b0f3Smrg 10343d514b0f3Smrg# save warnings/boilerplate of simple test code 10344d514b0f3Smrg_LT_COMPILER_BOILERPLATE 10345d514b0f3Smrg_LT_LINKER_BOILERPLATE 10346d514b0f3Smrg 10347d514b0f3Smrgif test -n "$compiler"; then 10348d514b0f3Smrg _LT_COMPILER_NO_RTTI($1) 10349d514b0f3Smrg _LT_COMPILER_PIC($1) 10350d514b0f3Smrg _LT_COMPILER_C_O($1) 10351d514b0f3Smrg _LT_COMPILER_FILE_LOCKS($1) 10352d514b0f3Smrg _LT_LINKER_SHLIBS($1) 10353d514b0f3Smrg _LT_SYS_DYNAMIC_LINKER($1) 10354d514b0f3Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 10355d514b0f3Smrg LT_SYS_DLOPEN_SELF 10356d514b0f3Smrg _LT_CMD_STRIPLIB 10357d514b0f3Smrg 10358d514b0f3Smrg # Report what library types will actually be built 10359d514b0f3Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 10360d514b0f3Smrg AC_MSG_RESULT([$can_build_shared]) 10361d514b0f3Smrg 10362d514b0f3Smrg AC_MSG_CHECKING([whether to build shared libraries]) 10363d514b0f3Smrg test no = "$can_build_shared" && enable_shared=no 10364d514b0f3Smrg 10365d514b0f3Smrg # On AIX, shared libraries and static libraries use the same namespace, and 10366d514b0f3Smrg # are all built from PIC. 10367d514b0f3Smrg case $host_os in 10368d514b0f3Smrg aix3*) 10369d514b0f3Smrg test yes = "$enable_shared" && enable_static=no 10370d514b0f3Smrg if test -n "$RANLIB"; then 10371d514b0f3Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 10372d514b0f3Smrg postinstall_cmds='$RANLIB $lib' 10373d514b0f3Smrg fi 10374d514b0f3Smrg ;; 10375d514b0f3Smrg 10376d514b0f3Smrg aix[[4-9]]*) 10377d514b0f3Smrg if test ia64 != "$host_cpu"; then 10378d514b0f3Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 10379d514b0f3Smrg yes,aix,yes) ;; # shared object as lib.so file only 10380d514b0f3Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 10381d514b0f3Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 10382d514b0f3Smrg esac 10383d514b0f3Smrg fi 10384d514b0f3Smrg ;; 10385d514b0f3Smrg esac 10386d514b0f3Smrg AC_MSG_RESULT([$enable_shared]) 10387d514b0f3Smrg 10388d514b0f3Smrg AC_MSG_CHECKING([whether to build static libraries]) 10389d514b0f3Smrg # Make sure either enable_shared or enable_static is yes. 10390d514b0f3Smrg test yes = "$enable_shared" || enable_static=yes 10391d514b0f3Smrg AC_MSG_RESULT([$enable_static]) 10392d514b0f3Smrg 10393d514b0f3Smrg _LT_CONFIG($1) 10394d514b0f3Smrgfi 10395d514b0f3SmrgAC_LANG_POP 10396d514b0f3SmrgCC=$lt_save_CC 10397d514b0f3Smrg])# _LT_LANG_C_CONFIG 10398d514b0f3Smrg 10399d514b0f3Smrg 10400d514b0f3Smrg# _LT_LANG_CXX_CONFIG([TAG]) 10401d514b0f3Smrg# -------------------------- 10402d514b0f3Smrg# Ensure that the configuration variables for a C++ compiler are suitably 10403d514b0f3Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 10404d514b0f3Smrg# the compiler configuration to 'libtool'. 10405d514b0f3Smrgm4_defun([_LT_LANG_CXX_CONFIG], 10406d514b0f3Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 10407d514b0f3Smrgm4_require([_LT_DECL_EGREP])dnl 10408d514b0f3Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 10409d514b0f3Smrgif test -n "$CXX" && ( test no != "$CXX" && 10410d514b0f3Smrg ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 10411d514b0f3Smrg (test g++ != "$CXX"))); then 10412d514b0f3Smrg AC_PROG_CXXCPP 10413d514b0f3Smrgelse 10414d514b0f3Smrg _lt_caught_CXX_error=yes 10415d514b0f3Smrgfi 10416d514b0f3Smrg 10417d514b0f3SmrgAC_LANG_PUSH(C++) 10418d514b0f3Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 10419d514b0f3Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 10420d514b0f3Smrg_LT_TAGVAR(always_export_symbols, $1)=no 10421d514b0f3Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 10422d514b0f3Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 10423d514b0f3Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 10424d514b0f3Smrg_LT_TAGVAR(hardcode_direct, $1)=no 10425d514b0f3Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 10426d514b0f3Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 10427d514b0f3Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 10428d514b0f3Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 10429d514b0f3Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 10430d514b0f3Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 10431d514b0f3Smrg_LT_TAGVAR(inherit_rpath, $1)=no 10432d514b0f3Smrg_LT_TAGVAR(module_cmds, $1)= 10433d514b0f3Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 10434d514b0f3Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 10435d514b0f3Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 10436d514b0f3Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 10437d514b0f3Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 10438d514b0f3Smrg_LT_TAGVAR(no_undefined_flag, $1)= 10439d514b0f3Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 10440d514b0f3Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 10441d514b0f3Smrg 10442d514b0f3Smrg# Source file extension for C++ test sources. 10443d514b0f3Smrgac_ext=cpp 10444d514b0f3Smrg 10445d514b0f3Smrg# Object file extension for compiled C++ test sources. 10446d514b0f3Smrgobjext=o 10447d514b0f3Smrg_LT_TAGVAR(objext, $1)=$objext 10448d514b0f3Smrg 10449d514b0f3Smrg# No sense in running all these tests if we already determined that 10450d514b0f3Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 10451d514b0f3Smrg# are currently assumed to apply to all compilers on this platform, 10452d514b0f3Smrg# and will be corrupted by setting them based on a non-working compiler. 10453d514b0f3Smrgif test yes != "$_lt_caught_CXX_error"; then 10454d514b0f3Smrg # Code to be used in simple compile tests 10455d514b0f3Smrg lt_simple_compile_test_code="int some_variable = 0;" 10456d514b0f3Smrg 10457d514b0f3Smrg # Code to be used in simple link tests 10458d514b0f3Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 10459d514b0f3Smrg 10460d514b0f3Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 10461d514b0f3Smrg _LT_TAG_COMPILER 10462d514b0f3Smrg 10463d514b0f3Smrg # save warnings/boilerplate of simple test code 10464d514b0f3Smrg _LT_COMPILER_BOILERPLATE 10465d514b0f3Smrg _LT_LINKER_BOILERPLATE 10466d514b0f3Smrg 10467d514b0f3Smrg # Allow CC to be a program name with arguments. 10468d514b0f3Smrg lt_save_CC=$CC 10469d514b0f3Smrg lt_save_CFLAGS=$CFLAGS 10470d514b0f3Smrg lt_save_LD=$LD 10471d514b0f3Smrg lt_save_GCC=$GCC 10472d514b0f3Smrg GCC=$GXX 10473d514b0f3Smrg lt_save_with_gnu_ld=$with_gnu_ld 10474d514b0f3Smrg lt_save_path_LD=$lt_cv_path_LD 10475d514b0f3Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 10476d514b0f3Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 10477d514b0f3Smrg else 10478d514b0f3Smrg $as_unset lt_cv_prog_gnu_ld 10479d514b0f3Smrg fi 10480d514b0f3Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 10481d514b0f3Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 10482d514b0f3Smrg else 10483d514b0f3Smrg $as_unset lt_cv_path_LD 10484d514b0f3Smrg fi 10485d514b0f3Smrg test -z "${LDCXX+set}" || LD=$LDCXX 10486d514b0f3Smrg CC=${CXX-"c++"} 10487d514b0f3Smrg CFLAGS=$CXXFLAGS 10488d514b0f3Smrg compiler=$CC 10489d514b0f3Smrg _LT_TAGVAR(compiler, $1)=$CC 10490d514b0f3Smrg _LT_CC_BASENAME([$compiler]) 10491d514b0f3Smrg 10492d514b0f3Smrg if test -n "$compiler"; then 10493d514b0f3Smrg # We don't want -fno-exception when compiling C++ code, so set the 10494d514b0f3Smrg # no_builtin_flag separately 10495d514b0f3Smrg if test yes = "$GXX"; then 10496d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 10497d514b0f3Smrg else 10498d514b0f3Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 10499d514b0f3Smrg fi 10500d514b0f3Smrg 10501d514b0f3Smrg if test yes = "$GXX"; then 10502d514b0f3Smrg # Set up default GNU C++ configuration 10503d514b0f3Smrg 10504d514b0f3Smrg LT_PATH_LD 10505d514b0f3Smrg 10506d514b0f3Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 10507d514b0f3Smrg # archiving commands below assume that GNU ld is being used. 10508d514b0f3Smrg if test yes = "$with_gnu_ld"; then 10509d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 10510d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 10511d514b0f3Smrg 10512d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 10513d514b0f3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 10514d514b0f3Smrg 10515d514b0f3Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 10516d514b0f3Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 10517d514b0f3Smrg # investigate it a little bit more. (MM) 10518d514b0f3Smrg wlarc='$wl' 10519d514b0f3Smrg 10520d514b0f3Smrg # ancient GNU ld didn't support --whole-archive et. al. 10521d514b0f3Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 10522d514b0f3Smrg $GREP 'no-whole-archive' > /dev/null; then 10523d514b0f3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 10524d514b0f3Smrg else 10525d514b0f3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 10526d514b0f3Smrg fi 10527d514b0f3Smrg else 10528d514b0f3Smrg with_gnu_ld=no 10529d514b0f3Smrg wlarc= 10530d514b0f3Smrg 10531d514b0f3Smrg # A generic and very simple default shared library creation 10532d514b0f3Smrg # command for GNU C++ for the case where it uses the native 10533d514b0f3Smrg # linker, instead of GNU ld. If possible, this setting should 10534d514b0f3Smrg # overridden to take advantage of the native linker features on 10535d514b0f3Smrg # the platform it is being used on. 10536d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 10537d514b0f3Smrg fi 10538d514b0f3Smrg 10539d514b0f3Smrg # Commands to make compiler produce verbose output that lists 10540d514b0f3Smrg # what "hidden" libraries, object files and flags are used when 10541d514b0f3Smrg # linking a shared library. 10542d514b0f3Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 10543d514b0f3Smrg 10544d514b0f3Smrg else 10545d514b0f3Smrg GXX=no 10546d514b0f3Smrg with_gnu_ld=no 10547d514b0f3Smrg wlarc= 10548d514b0f3Smrg fi 10549d514b0f3Smrg 10550d514b0f3Smrg # PORTME: fill in a description of your system's C++ link characteristics 10551d514b0f3Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 10552d514b0f3Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 10553d514b0f3Smrg case $host_os in 10554d514b0f3Smrg aix3*) 10555d514b0f3Smrg # FIXME: insert proper C++ library support 10556d514b0f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10557d514b0f3Smrg ;; 10558d514b0f3Smrg aix[[4-9]]*) 10559d514b0f3Smrg if test ia64 = "$host_cpu"; then 10560d514b0f3Smrg # On IA64, the linker does run time linking by default, so we don't 10561d514b0f3Smrg # have to do anything special. 10562d514b0f3Smrg aix_use_runtimelinking=no 10563d514b0f3Smrg exp_sym_flag='-Bexport' 10564d514b0f3Smrg no_entry_flag= 10565d514b0f3Smrg else 10566d514b0f3Smrg aix_use_runtimelinking=no 10567d514b0f3Smrg 10568d514b0f3Smrg # Test if we are trying to use run time linking or normal 10569d514b0f3Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 10570d514b0f3Smrg # have runtime linking enabled, and use it for executables. 10571d514b0f3Smrg # For shared libraries, we enable/disable runtime linking 10572d514b0f3Smrg # depending on the kind of the shared library created - 10573d514b0f3Smrg # when "with_aix_soname,aix_use_runtimelinking" is: 10574d514b0f3Smrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 10575d514b0f3Smrg # "aix,yes" lib.so shared, rtl:yes, for executables 10576d514b0f3Smrg # lib.a static archive 10577d514b0f3Smrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 10578d514b0f3Smrg # lib.a(lib.so.V) shared, rtl:no, for executables 10579d514b0f3Smrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 10580d514b0f3Smrg # lib.a(lib.so.V) shared, rtl:no 10581d514b0f3Smrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 10582d514b0f3Smrg # lib.a static archive 10583d514b0f3Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 10584d514b0f3Smrg for ld_flag in $LDFLAGS; do 10585d514b0f3Smrg case $ld_flag in 10586d514b0f3Smrg *-brtl*) 10587d514b0f3Smrg aix_use_runtimelinking=yes 10588d514b0f3Smrg break 10589d514b0f3Smrg ;; 10590d514b0f3Smrg esac 10591d514b0f3Smrg done 10592d514b0f3Smrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 10593d514b0f3Smrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 10594d514b0f3Smrg # so we don't have lib.a shared libs to link our executables. 10595d514b0f3Smrg # We have to force runtime linking in this case. 10596d514b0f3Smrg aix_use_runtimelinking=yes 10597d514b0f3Smrg LDFLAGS="$LDFLAGS -Wl,-brtl" 10598d514b0f3Smrg fi 10599d514b0f3Smrg ;; 10600d514b0f3Smrg esac 10601d514b0f3Smrg 10602d514b0f3Smrg exp_sym_flag='-bexport' 10603d514b0f3Smrg no_entry_flag='-bnoentry' 10604d514b0f3Smrg fi 10605d514b0f3Smrg 10606d514b0f3Smrg # When large executables or shared objects are built, AIX ld can 10607d514b0f3Smrg # have problems creating the table of contents. If linking a library 10608d514b0f3Smrg # or program results in "error TOC overflow" add -mminimal-toc to 10609d514b0f3Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 10610d514b0f3Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 10611d514b0f3Smrg 10612d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='' 10613d514b0f3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 10614d514b0f3Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 10615d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 10616d514b0f3Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 10617d514b0f3Smrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 10618d514b0f3Smrg case $with_aix_soname,$aix_use_runtimelinking in 10619d514b0f3Smrg aix,*) ;; # no import file 10620d514b0f3Smrg svr4,* | *,yes) # use import file 10621d514b0f3Smrg # The Import File defines what to hardcode. 10622d514b0f3Smrg _LT_TAGVAR(hardcode_direct, $1)=no 10623d514b0f3Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 10624d514b0f3Smrg ;; 10625d514b0f3Smrg esac 10626d514b0f3Smrg 10627d514b0f3Smrg if test yes = "$GXX"; then 10628d514b0f3Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 10629d514b0f3Smrg # We only want to do this on AIX 4.2 and lower, the check 10630d514b0f3Smrg # below for broken collect2 doesn't work under 4.3+ 10631d514b0f3Smrg collect2name=`$CC -print-prog-name=collect2` 10632d514b0f3Smrg if test -f "$collect2name" && 10633d514b0f3Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 10634d514b0f3Smrg then 10635d514b0f3Smrg # We have reworked collect2 10636d514b0f3Smrg : 10637d514b0f3Smrg else 10638d514b0f3Smrg # We have old collect2 10639d514b0f3Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 10640d514b0f3Smrg # It fails to find uninstalled libraries when the uninstalled 10641d514b0f3Smrg # path is not listed in the libpath. Setting hardcode_minus_L 10642d514b0f3Smrg # to unsupported forces relinking 10643d514b0f3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 10644d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 10645d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 10646d514b0f3Smrg fi 10647d514b0f3Smrg esac 10648d514b0f3Smrg shared_flag='-shared' 10649d514b0f3Smrg if test yes = "$aix_use_runtimelinking"; then 10650d514b0f3Smrg shared_flag=$shared_flag' $wl-G' 10651d514b0f3Smrg fi 10652d514b0f3Smrg # Need to ensure runtime linking is disabled for the traditional 10653d514b0f3Smrg # shared library, or the linker may eventually find shared libraries 10654d514b0f3Smrg # /with/ Import File - we do not want to mix them. 10655d514b0f3Smrg shared_flag_aix='-shared' 10656d514b0f3Smrg shared_flag_svr4='-shared $wl-G' 10657d514b0f3Smrg else 10658d514b0f3Smrg # not using gcc 10659d514b0f3Smrg if test ia64 = "$host_cpu"; then 10660d514b0f3Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 10661d514b0f3Smrg # chokes on -Wl,-G. The following line is correct: 10662d514b0f3Smrg shared_flag='-G' 10663d514b0f3Smrg else 10664d514b0f3Smrg if test yes = "$aix_use_runtimelinking"; then 10665d514b0f3Smrg shared_flag='$wl-G' 10666d514b0f3Smrg else 10667d514b0f3Smrg shared_flag='$wl-bM:SRE' 10668d514b0f3Smrg fi 10669d514b0f3Smrg shared_flag_aix='$wl-bM:SRE' 10670d514b0f3Smrg shared_flag_svr4='$wl-G' 10671d514b0f3Smrg fi 10672d514b0f3Smrg fi 10673d514b0f3Smrg 10674d514b0f3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 10675d514b0f3Smrg # It seems that -bexpall does not export symbols beginning with 10676d514b0f3Smrg # underscore (_), so it is better to generate a list of symbols to 10677d514b0f3Smrg # export. 10678d514b0f3Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 10679d514b0f3Smrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 10680d514b0f3Smrg # Warning - without using the other runtime loading flags (-brtl), 10681d514b0f3Smrg # -berok will link without error, but may produce a broken library. 10682d514b0f3Smrg # The "-G" linker flag allows undefined symbols. 10683d514b0f3Smrg _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 10684d514b0f3Smrg # Determine the default libpath from the value encoded in an empty 10685d514b0f3Smrg # executable. 10686d514b0f3Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 10687d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 10688d514b0f3Smrg 10689d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag 10690d514b0f3Smrg else 10691d514b0f3Smrg if test ia64 = "$host_cpu"; then 10692d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 10693d514b0f3Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 10694d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" 10695d514b0f3Smrg else 10696d514b0f3Smrg # Determine the default libpath from the value encoded in an 10697d514b0f3Smrg # empty executable. 10698d514b0f3Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 10699d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 10700d514b0f3Smrg # Warning - without using the other run time loading flags, 10701d514b0f3Smrg # -berok will link without error, but may produce a broken library. 10702d514b0f3Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 10703d514b0f3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 10704d514b0f3Smrg if test yes = "$with_gnu_ld"; then 10705d514b0f3Smrg # We only use this code for GNU lds that support --whole-archive. 10706d514b0f3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 10707d514b0f3Smrg else 10708d514b0f3Smrg # Exported symbols can be pulled into shared objects from archives 10709d514b0f3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 10710d514b0f3Smrg fi 10711d514b0f3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 10712d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 10713d514b0f3Smrg # -brtl affects multiple linker settings, -berok does not and is overridden later 10714d514b0f3Smrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 10715d514b0f3Smrg if test svr4 != "$with_aix_soname"; then 10716d514b0f3Smrg # This is similar to how AIX traditionally builds its shared 10717d514b0f3Smrg # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 10718d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' 10719d514b0f3Smrg fi 10720d514b0f3Smrg if test aix != "$with_aix_soname"; then 10721d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' 10722d514b0f3Smrg else 10723d514b0f3Smrg # used by -dlpreopen to get the symbols 10724d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 10725d514b0f3Smrg fi 10726d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 10727d514b0f3Smrg fi 10728d514b0f3Smrg fi 10729d514b0f3Smrg ;; 10730d514b0f3Smrg 10731d514b0f3Smrg beos*) 10732d514b0f3Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 10733d514b0f3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 10734d514b0f3Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 10735d514b0f3Smrg # support --undefined. This deserves some investigation. FIXME 10736d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10737d514b0f3Smrg else 10738d514b0f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10739d514b0f3Smrg fi 10740d514b0f3Smrg ;; 10741d514b0f3Smrg 10742d514b0f3Smrg chorus*) 10743d514b0f3Smrg case $cc_basename in 10744d514b0f3Smrg *) 10745d514b0f3Smrg # FIXME: insert proper C++ library support 10746d514b0f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10747d514b0f3Smrg ;; 10748d514b0f3Smrg esac 10749d514b0f3Smrg ;; 10750d514b0f3Smrg 10751d514b0f3Smrg cygwin* | mingw* | pw32* | cegcc*) 10752d514b0f3Smrg case $GXX,$cc_basename in 10753d514b0f3Smrg ,cl* | no,cl* | ,icl* | no,icl*) 10754d514b0f3Smrg # Native MSVC or ICC 10755d514b0f3Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 10756d514b0f3Smrg # no search path for DLLs. 10757d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 10758d514b0f3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 10759d514b0f3Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 10760d514b0f3Smrg _LT_TAGVAR(file_list_spec, $1)='@' 10761d514b0f3Smrg # Tell ltmain to make .lib files, not .a files. 10762d514b0f3Smrg libext=lib 10763d514b0f3Smrg # Tell ltmain to make .dll files, not .so files. 10764d514b0f3Smrg shrext_cmds=.dll 10765d514b0f3Smrg # FIXME: Setting linknames here is a bad hack. 10766d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 10767d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 10768d514b0f3Smrg cp "$export_symbols" "$output_objdir/$soname.def"; 10769d514b0f3Smrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 10770d514b0f3Smrg else 10771d514b0f3Smrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 10772d514b0f3Smrg fi~ 10773d514b0f3Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 10774d514b0f3Smrg linknames=' 10775d514b0f3Smrg # The linker will not automatically build a static lib if we build a DLL. 10776d514b0f3Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 10777d514b0f3Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 10778d514b0f3Smrg # Don't use ranlib 10779d514b0f3Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 10780d514b0f3Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 10781d514b0f3Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 10782d514b0f3Smrg case $lt_outputfile in 10783d514b0f3Smrg *.exe|*.EXE) ;; 10784d514b0f3Smrg *) 10785d514b0f3Smrg lt_outputfile=$lt_outputfile.exe 10786d514b0f3Smrg lt_tool_outputfile=$lt_tool_outputfile.exe 10787d514b0f3Smrg ;; 10788d514b0f3Smrg esac~ 10789d514b0f3Smrg func_to_tool_file "$lt_outputfile"~ 10790d514b0f3Smrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 10791d514b0f3Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 10792d514b0f3Smrg $RM "$lt_outputfile.manifest"; 10793d514b0f3Smrg fi' 10794d514b0f3Smrg ;; 10795d514b0f3Smrg *) 10796d514b0f3Smrg # g++ 10797d514b0f3Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 10798d514b0f3Smrg # as there is no search path for DLLs. 10799d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 10800d514b0f3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 10801d514b0f3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 10802d514b0f3Smrg _LT_TAGVAR(always_export_symbols, $1)=no 10803d514b0f3Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 10804d514b0f3Smrg 10805d514b0f3Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 10806d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 10807d514b0f3Smrg # If the export-symbols file already is a .def file, use it as 10808d514b0f3Smrg # is; otherwise, prepend EXPORTS... 10809d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 10810d514b0f3Smrg cp $export_symbols $output_objdir/$soname.def; 10811d514b0f3Smrg else 10812d514b0f3Smrg echo EXPORTS > $output_objdir/$soname.def; 10813d514b0f3Smrg cat $export_symbols >> $output_objdir/$soname.def; 10814d514b0f3Smrg fi~ 10815d514b0f3Smrg $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 10816d514b0f3Smrg else 10817d514b0f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10818d514b0f3Smrg fi 10819d514b0f3Smrg ;; 10820d514b0f3Smrg esac 10821d514b0f3Smrg ;; 10822d514b0f3Smrg darwin* | rhapsody*) 10823d514b0f3Smrg _LT_DARWIN_LINKER_FEATURES($1) 10824d514b0f3Smrg ;; 10825d514b0f3Smrg 10826d514b0f3Smrg os2*) 10827d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 10828d514b0f3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 10829d514b0f3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 10830d514b0f3Smrg shrext_cmds=.dll 10831d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 10832d514b0f3Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 10833d514b0f3Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 10834d514b0f3Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 10835d514b0f3Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 10836d514b0f3Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 10837d514b0f3Smrg emximp -o $lib $output_objdir/$libname.def' 10838d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 10839d514b0f3Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 10840d514b0f3Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 10841d514b0f3Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 10842d514b0f3Smrg prefix_cmds="$SED"~ 10843d514b0f3Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 10844d514b0f3Smrg prefix_cmds="$prefix_cmds -e 1d"; 10845d514b0f3Smrg fi~ 10846d514b0f3Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 10847d514b0f3Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 10848d514b0f3Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 10849d514b0f3Smrg emximp -o $lib $output_objdir/$libname.def' 10850d514b0f3Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 10851d514b0f3Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 10852d514b0f3Smrg _LT_TAGVAR(file_list_spec, $1)='@' 10853d514b0f3Smrg ;; 10854d514b0f3Smrg 10855d514b0f3Smrg dgux*) 10856d514b0f3Smrg case $cc_basename in 10857d514b0f3Smrg ec++*) 10858d514b0f3Smrg # FIXME: insert proper C++ library support 10859d514b0f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10860d514b0f3Smrg ;; 10861d514b0f3Smrg ghcx*) 10862d514b0f3Smrg # Green Hills C++ Compiler 10863d514b0f3Smrg # FIXME: insert proper C++ library support 10864d514b0f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10865d514b0f3Smrg ;; 10866d514b0f3Smrg *) 10867d514b0f3Smrg # FIXME: insert proper C++ library support 10868d514b0f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10869d514b0f3Smrg ;; 10870d514b0f3Smrg esac 10871d514b0f3Smrg ;; 10872d514b0f3Smrg 10873d514b0f3Smrg freebsd2.*) 10874d514b0f3Smrg # C++ shared libraries reported to be fairly broken before 10875d514b0f3Smrg # switch to ELF 10876d514b0f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10877d514b0f3Smrg ;; 10878d514b0f3Smrg 10879d514b0f3Smrg freebsd-elf*) 10880d514b0f3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10881d514b0f3Smrg ;; 10882d514b0f3Smrg 10883d514b0f3Smrg freebsd* | dragonfly* | midnightbsd*) 10884d514b0f3Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 10885d514b0f3Smrg # conventions 10886d514b0f3Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 10887d514b0f3Smrg ;; 10888d514b0f3Smrg 10889d514b0f3Smrg haiku*) 10890d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 10891d514b0f3Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 10892d514b0f3Smrg ;; 10893d514b0f3Smrg 10894d514b0f3Smrg hpux9*) 10895d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 10896d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10897d514b0f3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10898d514b0f3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 10899d514b0f3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 10900d514b0f3Smrg # but as the default 10901d514b0f3Smrg # location of the library. 10902d514b0f3Smrg 10903d514b0f3Smrg case $cc_basename in 10904d514b0f3Smrg CC*) 10905d514b0f3Smrg # FIXME: insert proper C++ library support 10906d514b0f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10907d514b0f3Smrg ;; 10908d514b0f3Smrg aCC*) 10909d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 10910d514b0f3Smrg # Commands to make compiler produce verbose output that lists 10911d514b0f3Smrg # what "hidden" libraries, object files and flags are used when 10912d514b0f3Smrg # linking a shared library. 10913d514b0f3Smrg # 10914d514b0f3Smrg # There doesn't appear to be a way to prevent this compiler from 10915d514b0f3Smrg # explicitly linking system object files so we need to strip them 10916d514b0f3Smrg # from the output so that they don't get included in the library 10917d514b0f3Smrg # dependencies. 10918d514b0f3Smrg output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' 10919d514b0f3Smrg ;; 10920d514b0f3Smrg *) 10921d514b0f3Smrg if test yes = "$GXX"; then 10922d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 10923d514b0f3Smrg else 10924d514b0f3Smrg # FIXME: insert proper C++ library support 10925d514b0f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10926d514b0f3Smrg fi 10927d514b0f3Smrg ;; 10928d514b0f3Smrg esac 10929d514b0f3Smrg ;; 10930d514b0f3Smrg 10931d514b0f3Smrg hpux10*|hpux11*) 10932d514b0f3Smrg if test no = "$with_gnu_ld"; then 10933d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 10934d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 10935d514b0f3Smrg 10936d514b0f3Smrg case $host_cpu in 10937d514b0f3Smrg hppa*64*|ia64*) 10938d514b0f3Smrg ;; 10939d514b0f3Smrg *) 10940d514b0f3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 10941d514b0f3Smrg ;; 10942d514b0f3Smrg esac 10943d514b0f3Smrg fi 10944d514b0f3Smrg case $host_cpu in 10945d514b0f3Smrg hppa*64*|ia64*) 10946d514b0f3Smrg _LT_TAGVAR(hardcode_direct, $1)=no 10947d514b0f3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 10948d514b0f3Smrg ;; 10949d514b0f3Smrg *) 10950d514b0f3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 10951d514b0f3Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 10952d514b0f3Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 10953d514b0f3Smrg # but as the default 10954d514b0f3Smrg # location of the library. 10955d514b0f3Smrg ;; 10956d514b0f3Smrg esac 10957d514b0f3Smrg 10958d514b0f3Smrg case $cc_basename in 10959d514b0f3Smrg CC*) 10960d514b0f3Smrg # FIXME: insert proper C++ library support 10961d514b0f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 10962d514b0f3Smrg ;; 10963d514b0f3Smrg aCC*) 10964d514b0f3Smrg case $host_cpu in 10965d514b0f3Smrg hppa*64*) 10966d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10967d514b0f3Smrg ;; 10968d514b0f3Smrg ia64*) 10969d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10970d514b0f3Smrg ;; 10971d514b0f3Smrg *) 10972d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10973d514b0f3Smrg ;; 10974d514b0f3Smrg esac 10975d514b0f3Smrg # Commands to make compiler produce verbose output that lists 10976d514b0f3Smrg # what "hidden" libraries, object files and flags are used when 10977d514b0f3Smrg # linking a shared library. 10978d514b0f3Smrg # 10979d514b0f3Smrg # There doesn't appear to be a way to prevent this compiler from 10980d514b0f3Smrg # explicitly linking system object files so we need to strip them 10981d514b0f3Smrg # from the output so that they don't get included in the library 10982d514b0f3Smrg # dependencies. 10983d514b0f3Smrg output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' 10984d514b0f3Smrg ;; 10985d514b0f3Smrg *) 10986d514b0f3Smrg if test yes = "$GXX"; then 10987d514b0f3Smrg if test no = "$with_gnu_ld"; then 10988d514b0f3Smrg case $host_cpu in 10989d514b0f3Smrg hppa*64*) 10990d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10991d514b0f3Smrg ;; 10992d514b0f3Smrg ia64*) 10993d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10994d514b0f3Smrg ;; 10995d514b0f3Smrg *) 10996d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 10997d514b0f3Smrg ;; 10998d514b0f3Smrg esac 10999d514b0f3Smrg fi 11000d514b0f3Smrg else 11001d514b0f3Smrg # FIXME: insert proper C++ library support 11002d514b0f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 11003d514b0f3Smrg fi 11004d514b0f3Smrg ;; 11005d514b0f3Smrg esac 11006d514b0f3Smrg ;; 11007d514b0f3Smrg 11008d514b0f3Smrg interix[[3-9]]*) 11009d514b0f3Smrg _LT_TAGVAR(hardcode_direct, $1)=no 11010d514b0f3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 11011d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 11012d514b0f3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 11013d514b0f3Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 11014d514b0f3Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 11015d514b0f3Smrg # default) and relocated if they conflict, which is a slow very memory 11016d514b0f3Smrg # consuming and fragmenting process. To avoid this, we pick a random, 11017d514b0f3Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 11018d514b0f3Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 11019d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' 11020d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$SED "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' 11021d514b0f3Smrg ;; 11022d514b0f3Smrg irix5* | irix6*) 11023d514b0f3Smrg case $cc_basename in 11024d514b0f3Smrg CC*) 11025d514b0f3Smrg # SGI C++ 11026d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' 11027d514b0f3Smrg 11028d514b0f3Smrg # Archives containing C++ object files must be created using 11029d514b0f3Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 11030d514b0f3Smrg # necessary to make sure instantiated templates are included 11031d514b0f3Smrg # in the archive. 11032d514b0f3Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 11033d514b0f3Smrg ;; 11034d514b0f3Smrg *) 11035d514b0f3Smrg if test yes = "$GXX"; then 11036d514b0f3Smrg if test no = "$with_gnu_ld"; then 11037d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' 11038d514b0f3Smrg else 11039d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' 11040d514b0f3Smrg fi 11041d514b0f3Smrg fi 11042d514b0f3Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 11043d514b0f3Smrg ;; 11044d514b0f3Smrg esac 11045d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 11046d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 11047d514b0f3Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 11048d514b0f3Smrg ;; 11049d514b0f3Smrg 11050d514b0f3Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 11051d514b0f3Smrg case $cc_basename in 11052d514b0f3Smrg KCC*) 11053d514b0f3Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 11054d514b0f3Smrg 11055d514b0f3Smrg # KCC will only create a shared library if the output file 11056d514b0f3Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 11057d514b0f3Smrg # to its proper name (with version) after linking. 11058d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' 11059d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' 11060d514b0f3Smrg # Commands to make compiler produce verbose output that lists 11061d514b0f3Smrg # what "hidden" libraries, object files and flags are used when 11062d514b0f3Smrg # linking a shared library. 11063d514b0f3Smrg # 11064d514b0f3Smrg # There doesn't appear to be a way to prevent this compiler from 11065d514b0f3Smrg # explicitly linking system object files so we need to strip them 11066d514b0f3Smrg # from the output so that they don't get included in the library 11067d514b0f3Smrg # dependencies. 11068d514b0f3Smrg output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' 11069d514b0f3Smrg 11070d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 11071d514b0f3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 11072d514b0f3Smrg 11073d514b0f3Smrg # Archives containing C++ object files must be created using 11074d514b0f3Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 11075d514b0f3Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 11076d514b0f3Smrg ;; 11077d514b0f3Smrg icpc* | ecpc* ) 11078d514b0f3Smrg # Intel C++ 11079d514b0f3Smrg with_gnu_ld=yes 11080d514b0f3Smrg # version 8.0 and above of icpc choke on multiply defined symbols 11081d514b0f3Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 11082d514b0f3Smrg # earlier do not add the objects themselves. 11083d514b0f3Smrg case `$CC -V 2>&1` in 11084d514b0f3Smrg *"Version 7."*) 11085d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 11086d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 11087d514b0f3Smrg ;; 11088d514b0f3Smrg *) # Version 8.0 or newer 11089d514b0f3Smrg tmp_idyn= 11090d514b0f3Smrg case $host_cpu in 11091d514b0f3Smrg ia64*) tmp_idyn=' -i_dynamic';; 11092d514b0f3Smrg esac 11093d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 11094d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 11095d514b0f3Smrg ;; 11096d514b0f3Smrg esac 11097d514b0f3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 11098d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 11099d514b0f3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 11100d514b0f3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 11101d514b0f3Smrg ;; 11102d514b0f3Smrg pgCC* | pgcpp*) 11103d514b0f3Smrg # Portland Group C++ compiler 11104d514b0f3Smrg case `$CC -V` in 11105d514b0f3Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 11106d514b0f3Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 11107d514b0f3Smrg rm -rf $tpldir~ 11108d514b0f3Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 11109d514b0f3Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 11110d514b0f3Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 11111d514b0f3Smrg rm -rf $tpldir~ 11112d514b0f3Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 11113d514b0f3Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 11114d514b0f3Smrg $RANLIB $oldlib' 11115d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 11116d514b0f3Smrg rm -rf $tpldir~ 11117d514b0f3Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 11118d514b0f3Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 11119d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 11120d514b0f3Smrg rm -rf $tpldir~ 11121d514b0f3Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 11122d514b0f3Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 11123d514b0f3Smrg ;; 11124d514b0f3Smrg *) # Version 6 and above use weak symbols 11125d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 11126d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' 11127d514b0f3Smrg ;; 11128d514b0f3Smrg esac 11129d514b0f3Smrg 11130d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 11131d514b0f3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 11132d514b0f3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' 11133d514b0f3Smrg ;; 11134d514b0f3Smrg cxx*) 11135d514b0f3Smrg # Compaq C++ 11136d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 11137d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' 11138d514b0f3Smrg 11139d514b0f3Smrg runpath_var=LD_RUN_PATH 11140d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 11141d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 11142d514b0f3Smrg 11143d514b0f3Smrg # Commands to make compiler produce verbose output that lists 11144d514b0f3Smrg # what "hidden" libraries, object files and flags are used when 11145d514b0f3Smrg # linking a shared library. 11146d514b0f3Smrg # 11147d514b0f3Smrg # There doesn't appear to be a way to prevent this compiler from 11148d514b0f3Smrg # explicitly linking system object files so we need to strip them 11149d514b0f3Smrg # from the output so that they don't get included in the library 11150d514b0f3Smrg # dependencies. 11151d514b0f3Smrg output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' 11152d514b0f3Smrg ;; 11153d514b0f3Smrg xl* | mpixl* | bgxl*) 11154d514b0f3Smrg # IBM XL 8.0 on PPC, with GNU ld 11155d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 11156d514b0f3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 11157d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 11158d514b0f3Smrg if test yes = "$supports_anon_versioning"; then 11159d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 11160d514b0f3Smrg cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 11161d514b0f3Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 11162d514b0f3Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 11163d514b0f3Smrg fi 11164d514b0f3Smrg ;; 11165d514b0f3Smrg *) 11166d514b0f3Smrg case `$CC -V 2>&1 | $SED 5q` in 11167d514b0f3Smrg *Sun\ C*) 11168d514b0f3Smrg # Sun C++ 5.9 11169d514b0f3Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 11170d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 11171d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' 11172d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 11173d514b0f3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' 11174d514b0f3Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 11175d514b0f3Smrg 11176d514b0f3Smrg # Not sure whether something based on 11177d514b0f3Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 11178d514b0f3Smrg # would be better. 11179d514b0f3Smrg output_verbose_link_cmd='func_echo_all' 11180d514b0f3Smrg 11181d514b0f3Smrg # Archives containing C++ object files must be created using 11182d514b0f3Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 11183d514b0f3Smrg # necessary to make sure instantiated templates are included 11184d514b0f3Smrg # in the archive. 11185d514b0f3Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 11186d514b0f3Smrg ;; 11187d514b0f3Smrg esac 11188d514b0f3Smrg ;; 11189d514b0f3Smrg esac 11190d514b0f3Smrg ;; 11191d514b0f3Smrg 11192d514b0f3Smrg lynxos*) 11193d514b0f3Smrg # FIXME: insert proper C++ library support 11194d514b0f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 11195d514b0f3Smrg ;; 11196d514b0f3Smrg 11197d514b0f3Smrg m88k*) 11198d514b0f3Smrg # FIXME: insert proper C++ library support 11199d514b0f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 11200d514b0f3Smrg ;; 11201d514b0f3Smrg 11202d514b0f3Smrg mvs*) 11203d514b0f3Smrg case $cc_basename in 11204d514b0f3Smrg cxx*) 11205d514b0f3Smrg # FIXME: insert proper C++ library support 11206d514b0f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 11207d514b0f3Smrg ;; 11208d514b0f3Smrg *) 11209d514b0f3Smrg # FIXME: insert proper C++ library support 11210d514b0f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 11211d514b0f3Smrg ;; 11212d514b0f3Smrg esac 11213d514b0f3Smrg ;; 11214d514b0f3Smrg 11215d514b0f3Smrg netbsd*) 11216d514b0f3Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 11217d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 11218d514b0f3Smrg wlarc= 11219d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 11220d514b0f3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 11221d514b0f3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 11222d514b0f3Smrg fi 11223d514b0f3Smrg # Workaround some broken pre-1.5 toolchains 11224d514b0f3Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 11225d514b0f3Smrg ;; 11226d514b0f3Smrg 11227d514b0f3Smrg *nto* | *qnx*) 11228d514b0f3Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 11229d514b0f3Smrg ;; 11230d514b0f3Smrg 11231d514b0f3Smrg openbsd* | bitrig*) 11232d514b0f3Smrg if test -f /usr/libexec/ld.so; then 11233d514b0f3Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 11234d514b0f3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 11235d514b0f3Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 11236d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 11237d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 11238d514b0f3Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 11239d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' 11240d514b0f3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 11241d514b0f3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 11242d514b0f3Smrg fi 11243d514b0f3Smrg output_verbose_link_cmd=func_echo_all 11244d514b0f3Smrg else 11245d514b0f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 11246d514b0f3Smrg fi 11247d514b0f3Smrg ;; 11248d514b0f3Smrg 11249d514b0f3Smrg osf3* | osf4* | osf5*) 11250d514b0f3Smrg case $cc_basename in 11251d514b0f3Smrg KCC*) 11252d514b0f3Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 11253d514b0f3Smrg 11254d514b0f3Smrg # KCC will only create a shared library if the output file 11255d514b0f3Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 11256d514b0f3Smrg # to its proper name (with version) after linking. 11257d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' 11258d514b0f3Smrg 11259d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 11260d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 11261d514b0f3Smrg 11262d514b0f3Smrg # Archives containing C++ object files must be created using 11263d514b0f3Smrg # the KAI C++ compiler. 11264d514b0f3Smrg case $host in 11265d514b0f3Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 11266d514b0f3Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 11267d514b0f3Smrg esac 11268d514b0f3Smrg ;; 11269d514b0f3Smrg RCC*) 11270d514b0f3Smrg # Rational C++ 2.4.1 11271d514b0f3Smrg # FIXME: insert proper C++ library support 11272d514b0f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 11273d514b0f3Smrg ;; 11274d514b0f3Smrg cxx*) 11275d514b0f3Smrg case $host in 11276d514b0f3Smrg osf3*) 11277d514b0f3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 11278d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' 11279d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 11280d514b0f3Smrg ;; 11281d514b0f3Smrg *) 11282d514b0f3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 11283d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' 11284d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 11285d514b0f3Smrg echo "-hidden">> $lib.exp~ 11286d514b0f3Smrg $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ 11287d514b0f3Smrg $RM $lib.exp' 11288d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 11289d514b0f3Smrg ;; 11290d514b0f3Smrg esac 11291d514b0f3Smrg 11292d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 11293d514b0f3Smrg 11294d514b0f3Smrg # Commands to make compiler produce verbose output that lists 11295d514b0f3Smrg # what "hidden" libraries, object files and flags are used when 11296d514b0f3Smrg # linking a shared library. 11297d514b0f3Smrg # 11298d514b0f3Smrg # There doesn't appear to be a way to prevent this compiler from 11299d514b0f3Smrg # explicitly linking system object files so we need to strip them 11300d514b0f3Smrg # from the output so that they don't get included in the library 11301d514b0f3Smrg # dependencies. 11302d514b0f3Smrg output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' 11303d514b0f3Smrg ;; 11304d514b0f3Smrg *) 11305d514b0f3Smrg if test yes,no = "$GXX,$with_gnu_ld"; then 11306d514b0f3Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 11307d514b0f3Smrg case $host in 11308d514b0f3Smrg osf3*) 11309d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' 11310d514b0f3Smrg ;; 11311d514b0f3Smrg *) 11312d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' 11313d514b0f3Smrg ;; 11314d514b0f3Smrg esac 11315d514b0f3Smrg 11316d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 11317d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 11318d514b0f3Smrg 11319d514b0f3Smrg # Commands to make compiler produce verbose output that lists 11320d514b0f3Smrg # what "hidden" libraries, object files and flags are used when 11321d514b0f3Smrg # linking a shared library. 11322d514b0f3Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 11323d514b0f3Smrg 11324d514b0f3Smrg else 11325d514b0f3Smrg # FIXME: insert proper C++ library support 11326d514b0f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 11327d514b0f3Smrg fi 11328d514b0f3Smrg ;; 11329d514b0f3Smrg esac 11330d514b0f3Smrg ;; 11331d514b0f3Smrg 11332d514b0f3Smrg psos*) 11333d514b0f3Smrg # FIXME: insert proper C++ library support 11334d514b0f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 11335d514b0f3Smrg ;; 11336d514b0f3Smrg 11337d514b0f3Smrg sunos4*) 11338d514b0f3Smrg case $cc_basename in 11339d514b0f3Smrg CC*) 11340d514b0f3Smrg # Sun C++ 4.x 11341d514b0f3Smrg # FIXME: insert proper C++ library support 11342d514b0f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 11343d514b0f3Smrg ;; 11344d514b0f3Smrg lcc*) 11345d514b0f3Smrg # Lucid 11346d514b0f3Smrg # FIXME: insert proper C++ library support 11347d514b0f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 11348d514b0f3Smrg ;; 11349d514b0f3Smrg *) 11350d514b0f3Smrg # FIXME: insert proper C++ library support 11351d514b0f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 11352d514b0f3Smrg ;; 11353d514b0f3Smrg esac 11354d514b0f3Smrg ;; 11355d514b0f3Smrg 11356d514b0f3Smrg solaris*) 11357d514b0f3Smrg case $cc_basename in 11358d514b0f3Smrg CC* | sunCC*) 11359d514b0f3Smrg # Sun C++ 4.2, 5.x and Centerline C++ 11360d514b0f3Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 11361d514b0f3Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 11362d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 11363d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 11364d514b0f3Smrg $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 11365d514b0f3Smrg 11366d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 11367d514b0f3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 11368d514b0f3Smrg case $host_os in 11369d514b0f3Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 11370d514b0f3Smrg *) 11371d514b0f3Smrg # The compiler driver will combine and reorder linker options, 11372d514b0f3Smrg # but understands '-z linker_flag'. 11373d514b0f3Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 11374d514b0f3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 11375d514b0f3Smrg ;; 11376d514b0f3Smrg esac 11377d514b0f3Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 11378d514b0f3Smrg 11379d514b0f3Smrg output_verbose_link_cmd='func_echo_all' 11380d514b0f3Smrg 11381d514b0f3Smrg # Archives containing C++ object files must be created using 11382d514b0f3Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 11383d514b0f3Smrg # necessary to make sure instantiated templates are included 11384d514b0f3Smrg # in the archive. 11385d514b0f3Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 11386d514b0f3Smrg ;; 11387d514b0f3Smrg gcx*) 11388d514b0f3Smrg # Green Hills C++ Compiler 11389d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 11390d514b0f3Smrg 11391d514b0f3Smrg # The C++ compiler must be used to create the archive. 11392d514b0f3Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 11393d514b0f3Smrg ;; 11394d514b0f3Smrg *) 11395d514b0f3Smrg # GNU C++ compiler with Solaris linker 11396d514b0f3Smrg if test yes,no = "$GXX,$with_gnu_ld"; then 11397d514b0f3Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 11398d514b0f3Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 11399d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 11400d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 11401d514b0f3Smrg $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 11402d514b0f3Smrg 11403d514b0f3Smrg # Commands to make compiler produce verbose output that lists 11404d514b0f3Smrg # what "hidden" libraries, object files and flags are used when 11405d514b0f3Smrg # linking a shared library. 11406d514b0f3Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 11407d514b0f3Smrg else 11408d514b0f3Smrg # g++ 2.7 appears to require '-G' NOT '-shared' on this 11409d514b0f3Smrg # platform. 11410d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 11411d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 11412d514b0f3Smrg $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 11413d514b0f3Smrg 11414d514b0f3Smrg # Commands to make compiler produce verbose output that lists 11415d514b0f3Smrg # what "hidden" libraries, object files and flags are used when 11416d514b0f3Smrg # linking a shared library. 11417d514b0f3Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 11418d514b0f3Smrg fi 11419d514b0f3Smrg 11420d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 11421d514b0f3Smrg case $host_os in 11422d514b0f3Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 11423d514b0f3Smrg *) 11424d514b0f3Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 11425d514b0f3Smrg ;; 11426d514b0f3Smrg esac 11427d514b0f3Smrg fi 11428d514b0f3Smrg ;; 11429d514b0f3Smrg esac 11430d514b0f3Smrg ;; 11431d514b0f3Smrg 11432d514b0f3Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 11433d514b0f3Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 11434d514b0f3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 11435d514b0f3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 11436d514b0f3Smrg runpath_var='LD_RUN_PATH' 11437d514b0f3Smrg 11438d514b0f3Smrg case $cc_basename in 11439d514b0f3Smrg CC*) 11440d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 11441d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 11442d514b0f3Smrg ;; 11443d514b0f3Smrg *) 11444d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 11445d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 11446d514b0f3Smrg ;; 11447d514b0f3Smrg esac 11448d514b0f3Smrg ;; 11449d514b0f3Smrg 11450d514b0f3Smrg sysv5* | sco3.2v5* | sco5v6*) 11451d514b0f3Smrg # Note: We CANNOT use -z defs as we might desire, because we do not 11452d514b0f3Smrg # link with -lc, and that would cause any symbols used from libc to 11453d514b0f3Smrg # always be unresolved, which means just about no library would 11454d514b0f3Smrg # ever link correctly. If we're not using GNU ld we use -z text 11455d514b0f3Smrg # though, which does catch some bad symbols but isn't as heavy-handed 11456d514b0f3Smrg # as -z defs. 11457d514b0f3Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 11458d514b0f3Smrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 11459d514b0f3Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 11460d514b0f3Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 11461d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 11462d514b0f3Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 11463d514b0f3Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 11464d514b0f3Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 11465d514b0f3Smrg runpath_var='LD_RUN_PATH' 11466d514b0f3Smrg 11467d514b0f3Smrg case $cc_basename in 11468d514b0f3Smrg CC*) 11469d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 11470d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 11471d514b0f3Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 11472d514b0f3Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 11473d514b0f3Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 11474d514b0f3Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 11475d514b0f3Smrg ;; 11476d514b0f3Smrg *) 11477d514b0f3Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 11478d514b0f3Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 11479d514b0f3Smrg ;; 11480d514b0f3Smrg esac 11481d514b0f3Smrg ;; 11482d514b0f3Smrg 11483d514b0f3Smrg tandem*) 11484d514b0f3Smrg case $cc_basename in 11485d514b0f3Smrg NCC*) 11486d514b0f3Smrg # NonStop-UX NCC 3.20 11487d514b0f3Smrg # FIXME: insert proper C++ library support 11488d514b0f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 11489d514b0f3Smrg ;; 11490d514b0f3Smrg *) 11491d514b0f3Smrg # FIXME: insert proper C++ library support 11492d514b0f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 11493d514b0f3Smrg ;; 11494d514b0f3Smrg esac 11495d514b0f3Smrg ;; 11496d514b0f3Smrg 11497d514b0f3Smrg vxworks*) 11498d514b0f3Smrg # FIXME: insert proper C++ library support 11499d514b0f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 11500d514b0f3Smrg ;; 11501d514b0f3Smrg 11502d514b0f3Smrg *) 11503d514b0f3Smrg # FIXME: insert proper C++ library support 11504d514b0f3Smrg _LT_TAGVAR(ld_shlibs, $1)=no 11505d514b0f3Smrg ;; 11506d514b0f3Smrg esac 11507d514b0f3Smrg 11508d514b0f3Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 11509d514b0f3Smrg test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 11510d514b0f3Smrg 11511d514b0f3Smrg _LT_TAGVAR(GCC, $1)=$GXX 11512d514b0f3Smrg _LT_TAGVAR(LD, $1)=$LD 11513d514b0f3Smrg 11514d514b0f3Smrg ## CAVEAT EMPTOR: 11515d514b0f3Smrg ## There is no encapsulation within the following macros, do not change 11516d514b0f3Smrg ## the running order or otherwise move them around unless you know exactly 11517d514b0f3Smrg ## what you are doing... 11518d514b0f3Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 11519d514b0f3Smrg _LT_COMPILER_PIC($1) 11520d514b0f3Smrg _LT_COMPILER_C_O($1) 11521d514b0f3Smrg _LT_COMPILER_FILE_LOCKS($1) 11522d514b0f3Smrg _LT_LINKER_SHLIBS($1) 11523d514b0f3Smrg _LT_SYS_DYNAMIC_LINKER($1) 11524d514b0f3Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 11525d514b0f3Smrg 11526d514b0f3Smrg _LT_CONFIG($1) 11527d514b0f3Smrg fi # test -n "$compiler" 11528d514b0f3Smrg 11529d514b0f3Smrg CC=$lt_save_CC 11530d514b0f3Smrg CFLAGS=$lt_save_CFLAGS 11531d514b0f3Smrg LDCXX=$LD 11532d514b0f3Smrg LD=$lt_save_LD 11533d514b0f3Smrg GCC=$lt_save_GCC 11534d514b0f3Smrg with_gnu_ld=$lt_save_with_gnu_ld 11535d514b0f3Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 11536d514b0f3Smrg lt_cv_path_LD=$lt_save_path_LD 11537d514b0f3Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 11538d514b0f3Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 11539d514b0f3Smrgfi # test yes != "$_lt_caught_CXX_error" 11540d514b0f3Smrg 11541d514b0f3SmrgAC_LANG_POP 11542d514b0f3Smrg])# _LT_LANG_CXX_CONFIG 11543d514b0f3Smrg 11544d514b0f3Smrg 11545d514b0f3Smrg# _LT_FUNC_STRIPNAME_CNF 11546d514b0f3Smrg# ---------------------- 11547d514b0f3Smrg# func_stripname_cnf prefix suffix name 11548d514b0f3Smrg# strip PREFIX and SUFFIX off of NAME. 11549d514b0f3Smrg# PREFIX and SUFFIX must not contain globbing or regex special 11550d514b0f3Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 11551d514b0f3Smrg# dot (in which case that matches only a dot). 11552d514b0f3Smrg# 11553d514b0f3Smrg# This function is identical to the (non-XSI) version of func_stripname, 11554d514b0f3Smrg# except this one can be used by m4 code that may be executed by configure, 11555d514b0f3Smrg# rather than the libtool script. 11556d514b0f3Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 11557d514b0f3SmrgAC_REQUIRE([_LT_DECL_SED]) 11558d514b0f3SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 11559d514b0f3Smrgfunc_stripname_cnf () 11560d514b0f3Smrg{ 11561d514b0f3Smrg case @S|@2 in 11562d514b0f3Smrg .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 11563d514b0f3Smrg *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 11564d514b0f3Smrg esac 11565d514b0f3Smrg} # func_stripname_cnf 11566d514b0f3Smrg])# _LT_FUNC_STRIPNAME_CNF 11567d514b0f3Smrg 11568d514b0f3Smrg 11569d514b0f3Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 11570d514b0f3Smrg# --------------------------------- 11571d514b0f3Smrg# Figure out "hidden" library dependencies from verbose 11572d514b0f3Smrg# compiler output when linking a shared library. 11573d514b0f3Smrg# Parse the compiler output and extract the necessary 11574d514b0f3Smrg# objects, libraries and library flags. 11575d514b0f3Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 11576d514b0f3Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 11577d514b0f3SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 11578d514b0f3Smrg# Dependencies to place before and after the object being linked: 11579d514b0f3Smrg_LT_TAGVAR(predep_objects, $1)= 11580d514b0f3Smrg_LT_TAGVAR(postdep_objects, $1)= 11581d514b0f3Smrg_LT_TAGVAR(predeps, $1)= 11582d514b0f3Smrg_LT_TAGVAR(postdeps, $1)= 11583d514b0f3Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 11584d514b0f3Smrg 11585d514b0f3Smrgdnl we can't use the lt_simple_compile_test_code here, 11586d514b0f3Smrgdnl because it contains code intended for an executable, 11587d514b0f3Smrgdnl not a library. It's possible we should let each 11588d514b0f3Smrgdnl tag define a new lt_????_link_test_code variable, 11589d514b0f3Smrgdnl but it's only used here... 11590d514b0f3Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 11591d514b0f3Smrgint a; 11592d514b0f3Smrgvoid foo (void) { a = 0; } 11593d514b0f3Smrg_LT_EOF 11594d514b0f3Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 11595d514b0f3Smrgclass Foo 11596d514b0f3Smrg{ 11597d514b0f3Smrgpublic: 11598d514b0f3Smrg Foo (void) { a = 0; } 11599d514b0f3Smrgprivate: 11600d514b0f3Smrg int a; 11601d514b0f3Smrg}; 11602d514b0f3Smrg_LT_EOF 11603d514b0f3Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 11604d514b0f3Smrg subroutine foo 11605d514b0f3Smrg implicit none 11606d514b0f3Smrg integer*4 a 11607d514b0f3Smrg a=0 11608d514b0f3Smrg return 11609d514b0f3Smrg end 11610d514b0f3Smrg_LT_EOF 11611d514b0f3Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 11612d514b0f3Smrg subroutine foo 11613d514b0f3Smrg implicit none 11614d514b0f3Smrg integer a 11615d514b0f3Smrg a=0 11616d514b0f3Smrg return 11617d514b0f3Smrg end 11618d514b0f3Smrg_LT_EOF 11619d514b0f3Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 11620d514b0f3Smrgpublic class foo { 11621d514b0f3Smrg private int a; 11622d514b0f3Smrg public void bar (void) { 11623d514b0f3Smrg a = 0; 11624d514b0f3Smrg } 11625d514b0f3Smrg}; 11626d514b0f3Smrg_LT_EOF 11627d514b0f3Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 11628d514b0f3Smrgpackage foo 11629d514b0f3Smrgfunc foo() { 11630d514b0f3Smrg} 11631d514b0f3Smrg_LT_EOF 11632d514b0f3Smrg]) 11633d514b0f3Smrg 11634d514b0f3Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 11635d514b0f3Smrgcase "$CC $CFLAGS " in #( 11636d514b0f3Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 11637d514b0f3Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 11638d514b0f3Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 11639d514b0f3Smrgesac 11640d514b0f3Smrg 11641d514b0f3Smrgdnl Parse the compiler output and extract the necessary 11642d514b0f3Smrgdnl objects, libraries and library flags. 11643d514b0f3Smrgif AC_TRY_EVAL(ac_compile); then 11644d514b0f3Smrg # Parse the compiler output and extract the necessary 11645d514b0f3Smrg # objects, libraries and library flags. 11646d514b0f3Smrg 11647d514b0f3Smrg # Sentinel used to keep track of whether or not we are before 11648d514b0f3Smrg # the conftest object file. 11649d514b0f3Smrg pre_test_object_deps_done=no 11650d514b0f3Smrg 11651d514b0f3Smrg for p in `eval "$output_verbose_link_cmd"`; do 11652d514b0f3Smrg case $prev$p in 11653d514b0f3Smrg 11654d514b0f3Smrg -L* | -R* | -l*) 11655d514b0f3Smrg # Some compilers place space between "-{L,R}" and the path. 11656d514b0f3Smrg # Remove the space. 11657d514b0f3Smrg if test x-L = "$p" || 11658d514b0f3Smrg test x-R = "$p"; then 11659d514b0f3Smrg prev=$p 11660d514b0f3Smrg continue 11661d514b0f3Smrg fi 11662d514b0f3Smrg 11663d514b0f3Smrg # Expand the sysroot to ease extracting the directories later. 11664d514b0f3Smrg if test -z "$prev"; then 11665d514b0f3Smrg case $p in 11666d514b0f3Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 11667d514b0f3Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 11668d514b0f3Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 11669d514b0f3Smrg esac 11670d514b0f3Smrg fi 11671d514b0f3Smrg case $p in 11672d514b0f3Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 11673d514b0f3Smrg esac 11674d514b0f3Smrg if test no = "$pre_test_object_deps_done"; then 11675d514b0f3Smrg case $prev in 11676d514b0f3Smrg -L | -R) 11677d514b0f3Smrg # Internal compiler library paths should come after those 11678d514b0f3Smrg # provided the user. The postdeps already come after the 11679d514b0f3Smrg # user supplied libs so there is no need to process them. 11680d514b0f3Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 11681d514b0f3Smrg _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 11682d514b0f3Smrg else 11683d514b0f3Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 11684d514b0f3Smrg fi 11685d514b0f3Smrg ;; 11686d514b0f3Smrg # The "-l" case would never come before the object being 11687d514b0f3Smrg # linked, so don't bother handling this case. 11688d514b0f3Smrg esac 11689d514b0f3Smrg else 11690d514b0f3Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 11691d514b0f3Smrg _LT_TAGVAR(postdeps, $1)=$prev$p 11692d514b0f3Smrg else 11693d514b0f3Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 11694d514b0f3Smrg fi 11695d514b0f3Smrg fi 11696d514b0f3Smrg prev= 11697d514b0f3Smrg ;; 11698d514b0f3Smrg 11699d514b0f3Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 11700d514b0f3Smrg *.$objext) 11701d514b0f3Smrg # This assumes that the test object file only shows up 11702d514b0f3Smrg # once in the compiler output. 11703d514b0f3Smrg if test "$p" = "conftest.$objext"; then 11704d514b0f3Smrg pre_test_object_deps_done=yes 11705d514b0f3Smrg continue 11706d514b0f3Smrg fi 11707d514b0f3Smrg 11708d514b0f3Smrg if test no = "$pre_test_object_deps_done"; then 11709d514b0f3Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 11710d514b0f3Smrg _LT_TAGVAR(predep_objects, $1)=$p 11711d514b0f3Smrg else 11712d514b0f3Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 11713d514b0f3Smrg fi 11714d514b0f3Smrg else 11715d514b0f3Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 11716d514b0f3Smrg _LT_TAGVAR(postdep_objects, $1)=$p 11717d514b0f3Smrg else 11718d514b0f3Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 11719d514b0f3Smrg fi 11720d514b0f3Smrg fi 11721d514b0f3Smrg ;; 11722d514b0f3Smrg 11723d514b0f3Smrg *) ;; # Ignore the rest. 11724d514b0f3Smrg 11725d514b0f3Smrg esac 11726d514b0f3Smrg done 11727d514b0f3Smrg 11728d514b0f3Smrg # Clean up. 11729d514b0f3Smrg rm -f a.out a.exe 11730d514b0f3Smrgelse 11731d514b0f3Smrg echo "libtool.m4: error: problem compiling $1 test program" 11732d514b0f3Smrgfi 11733d514b0f3Smrg 11734d514b0f3Smrg$RM -f confest.$objext 11735d514b0f3SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 11736d514b0f3Smrg 11737d514b0f3Smrg# PORTME: override above test on systems where it is broken 11738d514b0f3Smrgm4_if([$1], [CXX], 11739d514b0f3Smrg[case $host_os in 11740d514b0f3Smrginterix[[3-9]]*) 11741d514b0f3Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 11742d514b0f3Smrg # hack all around it, let's just trust "g++" to DTRT. 11743d514b0f3Smrg _LT_TAGVAR(predep_objects,$1)= 11744d514b0f3Smrg _LT_TAGVAR(postdep_objects,$1)= 11745d514b0f3Smrg _LT_TAGVAR(postdeps,$1)= 11746d514b0f3Smrg ;; 11747d514b0f3Smrgesac 11748d514b0f3Smrg]) 11749d514b0f3Smrg 11750d514b0f3Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 11751d514b0f3Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 11752d514b0f3Smrgesac 11753d514b0f3Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 11754d514b0f3Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 11755d514b0f3Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 11756d514b0f3Smrgfi 11757d514b0f3Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 11758d514b0f3Smrg [The directories searched by this compiler when creating a shared library]) 11759d514b0f3Smrg_LT_TAGDECL([], [predep_objects], [1], 11760d514b0f3Smrg [Dependencies to place before and after the objects being linked to 11761d514b0f3Smrg create a shared library]) 11762d514b0f3Smrg_LT_TAGDECL([], [postdep_objects], [1]) 11763d514b0f3Smrg_LT_TAGDECL([], [predeps], [1]) 11764d514b0f3Smrg_LT_TAGDECL([], [postdeps], [1]) 11765d514b0f3Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 11766d514b0f3Smrg [The library search path used internally by the compiler when linking 11767d514b0f3Smrg a shared library]) 11768d514b0f3Smrg])# _LT_SYS_HIDDEN_LIBDEPS 11769d514b0f3Smrg 11770d514b0f3Smrg 11771d514b0f3Smrg# _LT_LANG_F77_CONFIG([TAG]) 11772d514b0f3Smrg# -------------------------- 11773d514b0f3Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 11774d514b0f3Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 11775d514b0f3Smrg# to write the compiler configuration to 'libtool'. 11776d514b0f3Smrgm4_defun([_LT_LANG_F77_CONFIG], 11777d514b0f3Smrg[AC_LANG_PUSH(Fortran 77) 11778d514b0f3Smrgif test -z "$F77" || test no = "$F77"; then 11779d514b0f3Smrg _lt_disable_F77=yes 11780d514b0f3Smrgfi 11781d514b0f3Smrg 11782d514b0f3Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 11783d514b0f3Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 11784d514b0f3Smrg_LT_TAGVAR(always_export_symbols, $1)=no 11785d514b0f3Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 11786d514b0f3Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 11787d514b0f3Smrg_LT_TAGVAR(hardcode_direct, $1)=no 11788d514b0f3Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 11789d514b0f3Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 11790d514b0f3Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 11791d514b0f3Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 11792d514b0f3Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 11793d514b0f3Smrg_LT_TAGVAR(inherit_rpath, $1)=no 11794d514b0f3Smrg_LT_TAGVAR(module_cmds, $1)= 11795d514b0f3Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 11796d514b0f3Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 11797d514b0f3Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11798d514b0f3Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 11799d514b0f3Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 11800d514b0f3Smrg_LT_TAGVAR(no_undefined_flag, $1)= 11801d514b0f3Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 11802d514b0f3Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 11803d514b0f3Smrg 11804d514b0f3Smrg# Source file extension for f77 test sources. 11805d514b0f3Smrgac_ext=f 11806d514b0f3Smrg 11807d514b0f3Smrg# Object file extension for compiled f77 test sources. 11808d514b0f3Smrgobjext=o 11809d514b0f3Smrg_LT_TAGVAR(objext, $1)=$objext 11810d514b0f3Smrg 11811d514b0f3Smrg# No sense in running all these tests if we already determined that 11812d514b0f3Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 11813d514b0f3Smrg# are currently assumed to apply to all compilers on this platform, 11814d514b0f3Smrg# and will be corrupted by setting them based on a non-working compiler. 11815d514b0f3Smrgif test yes != "$_lt_disable_F77"; then 11816d514b0f3Smrg # Code to be used in simple compile tests 11817d514b0f3Smrg lt_simple_compile_test_code="\ 11818d514b0f3Smrg subroutine t 11819d514b0f3Smrg return 11820d514b0f3Smrg end 11821d514b0f3Smrg" 11822d514b0f3Smrg 11823d514b0f3Smrg # Code to be used in simple link tests 11824d514b0f3Smrg lt_simple_link_test_code="\ 11825d514b0f3Smrg program t 11826d514b0f3Smrg end 11827d514b0f3Smrg" 11828d514b0f3Smrg 11829d514b0f3Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 11830d514b0f3Smrg _LT_TAG_COMPILER 11831d514b0f3Smrg 11832d514b0f3Smrg # save warnings/boilerplate of simple test code 11833d514b0f3Smrg _LT_COMPILER_BOILERPLATE 11834d514b0f3Smrg _LT_LINKER_BOILERPLATE 11835d514b0f3Smrg 11836d514b0f3Smrg # Allow CC to be a program name with arguments. 11837d514b0f3Smrg lt_save_CC=$CC 11838d514b0f3Smrg lt_save_GCC=$GCC 11839d514b0f3Smrg lt_save_CFLAGS=$CFLAGS 11840d514b0f3Smrg CC=${F77-"f77"} 11841d514b0f3Smrg CFLAGS=$FFLAGS 11842d514b0f3Smrg compiler=$CC 11843d514b0f3Smrg _LT_TAGVAR(compiler, $1)=$CC 11844d514b0f3Smrg _LT_CC_BASENAME([$compiler]) 11845d514b0f3Smrg GCC=$G77 11846d514b0f3Smrg if test -n "$compiler"; then 11847d514b0f3Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 11848d514b0f3Smrg AC_MSG_RESULT([$can_build_shared]) 11849d514b0f3Smrg 11850d514b0f3Smrg AC_MSG_CHECKING([whether to build shared libraries]) 11851d514b0f3Smrg test no = "$can_build_shared" && enable_shared=no 11852d514b0f3Smrg 11853d514b0f3Smrg # On AIX, shared libraries and static libraries use the same namespace, and 11854d514b0f3Smrg # are all built from PIC. 11855d514b0f3Smrg case $host_os in 11856d514b0f3Smrg aix3*) 11857d514b0f3Smrg test yes = "$enable_shared" && enable_static=no 11858d514b0f3Smrg if test -n "$RANLIB"; then 11859d514b0f3Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 11860d514b0f3Smrg postinstall_cmds='$RANLIB $lib' 11861d514b0f3Smrg fi 11862d514b0f3Smrg ;; 11863d514b0f3Smrg aix[[4-9]]*) 11864d514b0f3Smrg if test ia64 != "$host_cpu"; then 11865d514b0f3Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 11866d514b0f3Smrg yes,aix,yes) ;; # shared object as lib.so file only 11867d514b0f3Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 11868d514b0f3Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 11869d514b0f3Smrg esac 11870d514b0f3Smrg fi 11871d514b0f3Smrg ;; 11872d514b0f3Smrg esac 11873d514b0f3Smrg AC_MSG_RESULT([$enable_shared]) 11874d514b0f3Smrg 11875d514b0f3Smrg AC_MSG_CHECKING([whether to build static libraries]) 11876d514b0f3Smrg # Make sure either enable_shared or enable_static is yes. 11877d514b0f3Smrg test yes = "$enable_shared" || enable_static=yes 11878d514b0f3Smrg AC_MSG_RESULT([$enable_static]) 11879d514b0f3Smrg 11880d514b0f3Smrg _LT_TAGVAR(GCC, $1)=$G77 11881d514b0f3Smrg _LT_TAGVAR(LD, $1)=$LD 11882d514b0f3Smrg 11883d514b0f3Smrg ## CAVEAT EMPTOR: 11884d514b0f3Smrg ## There is no encapsulation within the following macros, do not change 11885d514b0f3Smrg ## the running order or otherwise move them around unless you know exactly 11886d514b0f3Smrg ## what you are doing... 11887d514b0f3Smrg _LT_COMPILER_PIC($1) 11888d514b0f3Smrg _LT_COMPILER_C_O($1) 11889d514b0f3Smrg _LT_COMPILER_FILE_LOCKS($1) 11890d514b0f3Smrg _LT_LINKER_SHLIBS($1) 11891d514b0f3Smrg _LT_SYS_DYNAMIC_LINKER($1) 11892d514b0f3Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 11893d514b0f3Smrg 11894d514b0f3Smrg _LT_CONFIG($1) 11895d514b0f3Smrg fi # test -n "$compiler" 11896d514b0f3Smrg 11897d514b0f3Smrg GCC=$lt_save_GCC 11898d514b0f3Smrg CC=$lt_save_CC 11899d514b0f3Smrg CFLAGS=$lt_save_CFLAGS 11900d514b0f3Smrgfi # test yes != "$_lt_disable_F77" 11901d514b0f3Smrg 11902d514b0f3SmrgAC_LANG_POP 11903d514b0f3Smrg])# _LT_LANG_F77_CONFIG 11904d514b0f3Smrg 11905d514b0f3Smrg 11906d514b0f3Smrg# _LT_LANG_FC_CONFIG([TAG]) 11907d514b0f3Smrg# ------------------------- 11908d514b0f3Smrg# Ensure that the configuration variables for a Fortran compiler are 11909d514b0f3Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 11910d514b0f3Smrg# to write the compiler configuration to 'libtool'. 11911d514b0f3Smrgm4_defun([_LT_LANG_FC_CONFIG], 11912d514b0f3Smrg[AC_LANG_PUSH(Fortran) 11913d514b0f3Smrg 11914d514b0f3Smrgif test -z "$FC" || test no = "$FC"; then 11915d514b0f3Smrg _lt_disable_FC=yes 11916d514b0f3Smrgfi 11917d514b0f3Smrg 11918d514b0f3Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 11919d514b0f3Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 11920d514b0f3Smrg_LT_TAGVAR(always_export_symbols, $1)=no 11921d514b0f3Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 11922d514b0f3Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 11923d514b0f3Smrg_LT_TAGVAR(hardcode_direct, $1)=no 11924d514b0f3Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 11925d514b0f3Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 11926d514b0f3Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 11927d514b0f3Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 11928d514b0f3Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 11929d514b0f3Smrg_LT_TAGVAR(inherit_rpath, $1)=no 11930d514b0f3Smrg_LT_TAGVAR(module_cmds, $1)= 11931d514b0f3Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 11932d514b0f3Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 11933d514b0f3Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 11934d514b0f3Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 11935d514b0f3Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 11936d514b0f3Smrg_LT_TAGVAR(no_undefined_flag, $1)= 11937d514b0f3Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 11938d514b0f3Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 11939d514b0f3Smrg 11940d514b0f3Smrg# Source file extension for fc test sources. 11941d514b0f3Smrgac_ext=${ac_fc_srcext-f} 11942d514b0f3Smrg 11943d514b0f3Smrg# Object file extension for compiled fc test sources. 11944d514b0f3Smrgobjext=o 11945d514b0f3Smrg_LT_TAGVAR(objext, $1)=$objext 11946d514b0f3Smrg 11947d514b0f3Smrg# No sense in running all these tests if we already determined that 11948d514b0f3Smrg# the FC compiler isn't working. Some variables (like enable_shared) 11949d514b0f3Smrg# are currently assumed to apply to all compilers on this platform, 11950d514b0f3Smrg# and will be corrupted by setting them based on a non-working compiler. 11951d514b0f3Smrgif test yes != "$_lt_disable_FC"; then 11952d514b0f3Smrg # Code to be used in simple compile tests 11953d514b0f3Smrg lt_simple_compile_test_code="\ 11954d514b0f3Smrg subroutine t 11955d514b0f3Smrg return 11956d514b0f3Smrg end 11957d514b0f3Smrg" 11958d514b0f3Smrg 11959d514b0f3Smrg # Code to be used in simple link tests 11960d514b0f3Smrg lt_simple_link_test_code="\ 11961d514b0f3Smrg program t 11962d514b0f3Smrg end 11963d514b0f3Smrg" 11964d514b0f3Smrg 11965d514b0f3Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 11966d514b0f3Smrg _LT_TAG_COMPILER 11967d514b0f3Smrg 11968d514b0f3Smrg # save warnings/boilerplate of simple test code 11969d514b0f3Smrg _LT_COMPILER_BOILERPLATE 11970d514b0f3Smrg _LT_LINKER_BOILERPLATE 11971d514b0f3Smrg 11972d514b0f3Smrg # Allow CC to be a program name with arguments. 11973d514b0f3Smrg lt_save_CC=$CC 11974d514b0f3Smrg lt_save_GCC=$GCC 11975d514b0f3Smrg lt_save_CFLAGS=$CFLAGS 11976d514b0f3Smrg CC=${FC-"f95"} 11977d514b0f3Smrg CFLAGS=$FCFLAGS 11978d514b0f3Smrg compiler=$CC 11979d514b0f3Smrg GCC=$ac_cv_fc_compiler_gnu 11980d514b0f3Smrg 11981d514b0f3Smrg _LT_TAGVAR(compiler, $1)=$CC 11982d514b0f3Smrg _LT_CC_BASENAME([$compiler]) 11983d514b0f3Smrg 11984d514b0f3Smrg if test -n "$compiler"; then 11985d514b0f3Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 11986d514b0f3Smrg AC_MSG_RESULT([$can_build_shared]) 11987d514b0f3Smrg 11988d514b0f3Smrg AC_MSG_CHECKING([whether to build shared libraries]) 11989d514b0f3Smrg test no = "$can_build_shared" && enable_shared=no 11990d514b0f3Smrg 11991d514b0f3Smrg # On AIX, shared libraries and static libraries use the same namespace, and 11992d514b0f3Smrg # are all built from PIC. 11993d514b0f3Smrg case $host_os in 11994d514b0f3Smrg aix3*) 11995d514b0f3Smrg test yes = "$enable_shared" && enable_static=no 11996d514b0f3Smrg if test -n "$RANLIB"; then 11997d514b0f3Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 11998d514b0f3Smrg postinstall_cmds='$RANLIB $lib' 11999d514b0f3Smrg fi 12000d514b0f3Smrg ;; 12001d514b0f3Smrg aix[[4-9]]*) 12002d514b0f3Smrg if test ia64 != "$host_cpu"; then 12003d514b0f3Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 12004d514b0f3Smrg yes,aix,yes) ;; # shared object as lib.so file only 12005d514b0f3Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 12006d514b0f3Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 12007d514b0f3Smrg esac 12008d514b0f3Smrg fi 12009d514b0f3Smrg ;; 12010d514b0f3Smrg esac 12011d514b0f3Smrg AC_MSG_RESULT([$enable_shared]) 12012d514b0f3Smrg 12013d514b0f3Smrg AC_MSG_CHECKING([whether to build static libraries]) 12014d514b0f3Smrg # Make sure either enable_shared or enable_static is yes. 12015d514b0f3Smrg test yes = "$enable_shared" || enable_static=yes 12016d514b0f3Smrg AC_MSG_RESULT([$enable_static]) 12017d514b0f3Smrg 12018d514b0f3Smrg _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 12019d514b0f3Smrg _LT_TAGVAR(LD, $1)=$LD 12020d514b0f3Smrg 12021d514b0f3Smrg ## CAVEAT EMPTOR: 12022d514b0f3Smrg ## There is no encapsulation within the following macros, do not change 12023d514b0f3Smrg ## the running order or otherwise move them around unless you know exactly 12024d514b0f3Smrg ## what you are doing... 12025d514b0f3Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 12026d514b0f3Smrg _LT_COMPILER_PIC($1) 12027d514b0f3Smrg _LT_COMPILER_C_O($1) 12028d514b0f3Smrg _LT_COMPILER_FILE_LOCKS($1) 12029d514b0f3Smrg _LT_LINKER_SHLIBS($1) 12030d514b0f3Smrg _LT_SYS_DYNAMIC_LINKER($1) 12031d514b0f3Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 12032d514b0f3Smrg 12033d514b0f3Smrg _LT_CONFIG($1) 12034d514b0f3Smrg fi # test -n "$compiler" 12035d514b0f3Smrg 12036d514b0f3Smrg GCC=$lt_save_GCC 12037d514b0f3Smrg CC=$lt_save_CC 12038d514b0f3Smrg CFLAGS=$lt_save_CFLAGS 12039d514b0f3Smrgfi # test yes != "$_lt_disable_FC" 12040d514b0f3Smrg 12041d514b0f3SmrgAC_LANG_POP 12042d514b0f3Smrg])# _LT_LANG_FC_CONFIG 12043d514b0f3Smrg 12044d514b0f3Smrg 12045d514b0f3Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 12046d514b0f3Smrg# -------------------------- 12047d514b0f3Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 12048d514b0f3Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 12049d514b0f3Smrg# to write the compiler configuration to 'libtool'. 12050d514b0f3Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 12051d514b0f3Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 12052d514b0f3SmrgAC_LANG_SAVE 12053d514b0f3Smrg 12054d514b0f3Smrg# Source file extension for Java test sources. 12055d514b0f3Smrgac_ext=java 12056d514b0f3Smrg 12057d514b0f3Smrg# Object file extension for compiled Java test sources. 12058d514b0f3Smrgobjext=o 12059d514b0f3Smrg_LT_TAGVAR(objext, $1)=$objext 12060d514b0f3Smrg 12061d514b0f3Smrg# Code to be used in simple compile tests 12062d514b0f3Smrglt_simple_compile_test_code="class foo {}" 12063d514b0f3Smrg 12064d514b0f3Smrg# Code to be used in simple link tests 12065d514b0f3Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 12066d514b0f3Smrg 12067d514b0f3Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 12068d514b0f3Smrg_LT_TAG_COMPILER 12069d514b0f3Smrg 12070d514b0f3Smrg# save warnings/boilerplate of simple test code 12071d514b0f3Smrg_LT_COMPILER_BOILERPLATE 12072d514b0f3Smrg_LT_LINKER_BOILERPLATE 12073d514b0f3Smrg 12074d514b0f3Smrg# Allow CC to be a program name with arguments. 12075d514b0f3Smrglt_save_CC=$CC 12076d514b0f3Smrglt_save_CFLAGS=$CFLAGS 12077d514b0f3Smrglt_save_GCC=$GCC 12078d514b0f3SmrgGCC=yes 12079d514b0f3SmrgCC=${GCJ-"gcj"} 12080d514b0f3SmrgCFLAGS=$GCJFLAGS 12081d514b0f3Smrgcompiler=$CC 12082d514b0f3Smrg_LT_TAGVAR(compiler, $1)=$CC 12083d514b0f3Smrg_LT_TAGVAR(LD, $1)=$LD 12084d514b0f3Smrg_LT_CC_BASENAME([$compiler]) 12085d514b0f3Smrg 12086d514b0f3Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 12087d514b0f3Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 12088d514b0f3Smrg 12089d514b0f3Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 12090d514b0f3Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 12091d514b0f3Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 12092d514b0f3Smrg 12093d514b0f3Smrgif test -n "$compiler"; then 12094d514b0f3Smrg _LT_COMPILER_NO_RTTI($1) 12095d514b0f3Smrg _LT_COMPILER_PIC($1) 12096d514b0f3Smrg _LT_COMPILER_C_O($1) 12097d514b0f3Smrg _LT_COMPILER_FILE_LOCKS($1) 12098d514b0f3Smrg _LT_LINKER_SHLIBS($1) 12099d514b0f3Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 12100d514b0f3Smrg 12101d514b0f3Smrg _LT_CONFIG($1) 12102d514b0f3Smrgfi 12103d514b0f3Smrg 12104d514b0f3SmrgAC_LANG_RESTORE 12105d514b0f3Smrg 12106d514b0f3SmrgGCC=$lt_save_GCC 12107d514b0f3SmrgCC=$lt_save_CC 12108d514b0f3SmrgCFLAGS=$lt_save_CFLAGS 12109d514b0f3Smrg])# _LT_LANG_GCJ_CONFIG 12110d514b0f3Smrg 12111d514b0f3Smrg 12112d514b0f3Smrg# _LT_LANG_GO_CONFIG([TAG]) 12113d514b0f3Smrg# -------------------------- 12114d514b0f3Smrg# Ensure that the configuration variables for the GNU Go compiler 12115d514b0f3Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 12116d514b0f3Smrg# to write the compiler configuration to 'libtool'. 12117d514b0f3Smrgm4_defun([_LT_LANG_GO_CONFIG], 12118d514b0f3Smrg[AC_REQUIRE([LT_PROG_GO])dnl 12119d514b0f3SmrgAC_LANG_SAVE 12120d514b0f3Smrg 12121d514b0f3Smrg# Source file extension for Go test sources. 12122d514b0f3Smrgac_ext=go 12123d514b0f3Smrg 12124d514b0f3Smrg# Object file extension for compiled Go test sources. 12125d514b0f3Smrgobjext=o 12126d514b0f3Smrg_LT_TAGVAR(objext, $1)=$objext 12127d514b0f3Smrg 12128d514b0f3Smrg# Code to be used in simple compile tests 12129d514b0f3Smrglt_simple_compile_test_code="package main; func main() { }" 12130d514b0f3Smrg 12131d514b0f3Smrg# Code to be used in simple link tests 12132d514b0f3Smrglt_simple_link_test_code='package main; func main() { }' 12133d514b0f3Smrg 12134d514b0f3Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 12135d514b0f3Smrg_LT_TAG_COMPILER 12136d514b0f3Smrg 12137d514b0f3Smrg# save warnings/boilerplate of simple test code 12138d514b0f3Smrg_LT_COMPILER_BOILERPLATE 12139d514b0f3Smrg_LT_LINKER_BOILERPLATE 12140d514b0f3Smrg 12141d514b0f3Smrg# Allow CC to be a program name with arguments. 12142d514b0f3Smrglt_save_CC=$CC 12143d514b0f3Smrglt_save_CFLAGS=$CFLAGS 12144d514b0f3Smrglt_save_GCC=$GCC 12145d514b0f3SmrgGCC=yes 12146d514b0f3SmrgCC=${GOC-"gccgo"} 12147d514b0f3SmrgCFLAGS=$GOFLAGS 12148d514b0f3Smrgcompiler=$CC 12149d514b0f3Smrg_LT_TAGVAR(compiler, $1)=$CC 12150d514b0f3Smrg_LT_TAGVAR(LD, $1)=$LD 12151d514b0f3Smrg_LT_CC_BASENAME([$compiler]) 12152d514b0f3Smrg 12153d514b0f3Smrg# Go did not exist at the time GCC didn't implicitly link libc in. 12154d514b0f3Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 12155d514b0f3Smrg 12156d514b0f3Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 12157d514b0f3Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 12158d514b0f3Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 12159d514b0f3Smrg 12160d514b0f3Smrgif test -n "$compiler"; then 12161d514b0f3Smrg _LT_COMPILER_NO_RTTI($1) 12162d514b0f3Smrg _LT_COMPILER_PIC($1) 12163d514b0f3Smrg _LT_COMPILER_C_O($1) 12164d514b0f3Smrg _LT_COMPILER_FILE_LOCKS($1) 12165d514b0f3Smrg _LT_LINKER_SHLIBS($1) 12166d514b0f3Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 12167d514b0f3Smrg 12168d514b0f3Smrg _LT_CONFIG($1) 12169d514b0f3Smrgfi 12170d514b0f3Smrg 12171d514b0f3SmrgAC_LANG_RESTORE 12172d514b0f3Smrg 12173d514b0f3SmrgGCC=$lt_save_GCC 12174d514b0f3SmrgCC=$lt_save_CC 12175d514b0f3SmrgCFLAGS=$lt_save_CFLAGS 12176d514b0f3Smrg])# _LT_LANG_GO_CONFIG 12177d514b0f3Smrg 12178d514b0f3Smrg 12179d514b0f3Smrg# _LT_LANG_RC_CONFIG([TAG]) 12180d514b0f3Smrg# ------------------------- 12181d514b0f3Smrg# Ensure that the configuration variables for the Windows resource compiler 12182d514b0f3Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 12183d514b0f3Smrg# to write the compiler configuration to 'libtool'. 12184d514b0f3Smrgm4_defun([_LT_LANG_RC_CONFIG], 12185d514b0f3Smrg[AC_REQUIRE([LT_PROG_RC])dnl 12186d514b0f3SmrgAC_LANG_SAVE 12187d514b0f3Smrg 12188d514b0f3Smrg# Source file extension for RC test sources. 12189d514b0f3Smrgac_ext=rc 12190d514b0f3Smrg 12191d514b0f3Smrg# Object file extension for compiled RC test sources. 12192d514b0f3Smrgobjext=o 12193d514b0f3Smrg_LT_TAGVAR(objext, $1)=$objext 12194d514b0f3Smrg 12195d514b0f3Smrg# Code to be used in simple compile tests 12196d514b0f3Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 12197d514b0f3Smrg 12198d514b0f3Smrg# Code to be used in simple link tests 12199d514b0f3Smrglt_simple_link_test_code=$lt_simple_compile_test_code 12200d514b0f3Smrg 12201d514b0f3Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 12202d514b0f3Smrg_LT_TAG_COMPILER 12203d514b0f3Smrg 12204d514b0f3Smrg# save warnings/boilerplate of simple test code 12205d514b0f3Smrg_LT_COMPILER_BOILERPLATE 12206d514b0f3Smrg_LT_LINKER_BOILERPLATE 12207d514b0f3Smrg 12208d514b0f3Smrg# Allow CC to be a program name with arguments. 12209d514b0f3Smrglt_save_CC=$CC 12210d514b0f3Smrglt_save_CFLAGS=$CFLAGS 12211d514b0f3Smrglt_save_GCC=$GCC 12212d514b0f3SmrgGCC= 12213d514b0f3SmrgCC=${RC-"windres"} 12214d514b0f3SmrgCFLAGS= 12215d514b0f3Smrgcompiler=$CC 12216d514b0f3Smrg_LT_TAGVAR(compiler, $1)=$CC 12217d514b0f3Smrg_LT_CC_BASENAME([$compiler]) 12218d514b0f3Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 12219d514b0f3Smrg 12220d514b0f3Smrgif test -n "$compiler"; then 12221d514b0f3Smrg : 12222d514b0f3Smrg _LT_CONFIG($1) 12223d514b0f3Smrgfi 12224d514b0f3Smrg 12225d514b0f3SmrgGCC=$lt_save_GCC 12226d514b0f3SmrgAC_LANG_RESTORE 12227d514b0f3SmrgCC=$lt_save_CC 12228d514b0f3SmrgCFLAGS=$lt_save_CFLAGS 12229d514b0f3Smrg])# _LT_LANG_RC_CONFIG 12230d514b0f3Smrg 12231d514b0f3Smrg 12232d514b0f3Smrg# LT_PROG_GCJ 12233d514b0f3Smrg# ----------- 12234d514b0f3SmrgAC_DEFUN([LT_PROG_GCJ], 12235d514b0f3Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 12236d514b0f3Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 12237d514b0f3Smrg [AC_CHECK_TOOL(GCJ, gcj,) 12238d514b0f3Smrg test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 12239d514b0f3Smrg AC_SUBST(GCJFLAGS)])])[]dnl 12240d514b0f3Smrg]) 12241d514b0f3Smrg 12242d514b0f3Smrg# Old name: 12243d514b0f3SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 12244d514b0f3Smrgdnl aclocal-1.4 backwards compatibility: 12245d514b0f3Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 12246d514b0f3Smrg 12247d514b0f3Smrg 12248d514b0f3Smrg# LT_PROG_GO 12249d514b0f3Smrg# ---------- 12250d514b0f3SmrgAC_DEFUN([LT_PROG_GO], 12251d514b0f3Smrg[AC_CHECK_TOOL(GOC, gccgo,) 12252d514b0f3Smrg]) 12253d514b0f3Smrg 12254d514b0f3Smrg 12255d514b0f3Smrg# LT_PROG_RC 12256d514b0f3Smrg# ---------- 12257d514b0f3SmrgAC_DEFUN([LT_PROG_RC], 12258d514b0f3Smrg[AC_CHECK_TOOL(RC, windres,) 12259d514b0f3Smrg]) 12260d514b0f3Smrg 12261d514b0f3Smrg# Old name: 12262d514b0f3SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 12263d514b0f3Smrgdnl aclocal-1.4 backwards compatibility: 12264d514b0f3Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 12265d514b0f3Smrg 12266d514b0f3Smrg 12267d514b0f3Smrg# _LT_DECL_EGREP 12268d514b0f3Smrg# -------------- 12269d514b0f3Smrg# If we don't have a new enough Autoconf to choose the best grep 12270d514b0f3Smrg# available, choose the one first in the user's PATH. 12271d514b0f3Smrgm4_defun([_LT_DECL_EGREP], 12272d514b0f3Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 12273d514b0f3SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 12274d514b0f3Smrgtest -z "$GREP" && GREP=grep 12275d514b0f3Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 12276d514b0f3Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 12277d514b0f3Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 12278d514b0f3Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 12279d514b0f3SmrgAC_SUBST([GREP]) 12280d514b0f3Smrg]) 12281d514b0f3Smrg 12282d514b0f3Smrg 12283d514b0f3Smrg# _LT_DECL_OBJDUMP 12284d514b0f3Smrg# -------------- 12285d514b0f3Smrg# If we don't have a new enough Autoconf to choose the best objdump 12286d514b0f3Smrg# available, choose the one first in the user's PATH. 12287d514b0f3Smrgm4_defun([_LT_DECL_OBJDUMP], 12288d514b0f3Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 12289d514b0f3Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 12290d514b0f3Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 12291d514b0f3SmrgAC_SUBST([OBJDUMP]) 12292d514b0f3Smrg]) 12293d514b0f3Smrg 12294d514b0f3Smrg# _LT_DECL_DLLTOOL 12295d514b0f3Smrg# ---------------- 12296d514b0f3Smrg# Ensure DLLTOOL variable is set. 12297d514b0f3Smrgm4_defun([_LT_DECL_DLLTOOL], 12298d514b0f3Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 12299d514b0f3Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 12300d514b0f3Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 12301d514b0f3SmrgAC_SUBST([DLLTOOL]) 12302d514b0f3Smrg]) 12303d514b0f3Smrg 12304d514b0f3Smrg# _LT_DECL_FILECMD 12305d514b0f3Smrg# ---------------- 12306d514b0f3Smrg# Check for a file(cmd) program that can be used to detect file type and magic 12307d514b0f3Smrgm4_defun([_LT_DECL_FILECMD], 12308d514b0f3Smrg[AC_CHECK_TOOL([FILECMD], [file], [:]) 12309d514b0f3Smrg_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types]) 12310d514b0f3Smrg])# _LD_DECL_FILECMD 12311d514b0f3Smrg 12312d514b0f3Smrg# _LT_DECL_SED 12313d514b0f3Smrg# ------------ 12314d514b0f3Smrg# Check for a fully-functional sed program, that truncates 12315d514b0f3Smrg# as few characters as possible. Prefer GNU sed if found. 12316d514b0f3Smrgm4_defun([_LT_DECL_SED], 12317d514b0f3Smrg[AC_PROG_SED 12318d514b0f3Smrgtest -z "$SED" && SED=sed 12319d514b0f3SmrgXsed="$SED -e 1s/^X//" 12320d514b0f3Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 12321d514b0f3Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 12322d514b0f3Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 12323d514b0f3Smrg])# _LT_DECL_SED 12324d514b0f3Smrg 12325d514b0f3Smrgm4_ifndef([AC_PROG_SED], [ 12326d514b0f3Smrg# NOTE: This macro has been submitted for inclusion into # 12327d514b0f3Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 12328d514b0f3Smrg# a released version of Autoconf we should remove this # 12329d514b0f3Smrg# macro and use it instead. # 12330d514b0f3Smrg 12331d514b0f3Smrgm4_defun([AC_PROG_SED], 12332d514b0f3Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 12333d514b0f3SmrgAC_CACHE_VAL(lt_cv_path_SED, 12334d514b0f3Smrg[# Loop through the user's path and test for sed and gsed. 12335d514b0f3Smrg# Then use that list of sed's as ones to test for truncation. 12336d514b0f3Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 12337d514b0f3Smrgfor as_dir in $PATH 12338d514b0f3Smrgdo 12339d514b0f3Smrg IFS=$as_save_IFS 12340d514b0f3Smrg test -z "$as_dir" && as_dir=. 12341d514b0f3Smrg for lt_ac_prog in sed gsed; do 12342d514b0f3Smrg for ac_exec_ext in '' $ac_executable_extensions; do 12343d514b0f3Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 12344d514b0f3Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 12345d514b0f3Smrg fi 12346d514b0f3Smrg done 12347d514b0f3Smrg done 12348d514b0f3Smrgdone 12349d514b0f3SmrgIFS=$as_save_IFS 12350d514b0f3Smrglt_ac_max=0 12351d514b0f3Smrglt_ac_count=0 12352d514b0f3Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 12353d514b0f3Smrg# along with /bin/sed that truncates output. 12354d514b0f3Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 12355d514b0f3Smrg test ! -f "$lt_ac_sed" && continue 12356d514b0f3Smrg cat /dev/null > conftest.in 12357d514b0f3Smrg lt_ac_count=0 12358d514b0f3Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 12359d514b0f3Smrg # Check for GNU sed and select it if it is found. 12360d514b0f3Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 12361d514b0f3Smrg lt_cv_path_SED=$lt_ac_sed 12362d514b0f3Smrg break 12363d514b0f3Smrg fi 12364d514b0f3Smrg while true; do 12365d514b0f3Smrg cat conftest.in conftest.in >conftest.tmp 12366d514b0f3Smrg mv conftest.tmp conftest.in 12367d514b0f3Smrg cp conftest.in conftest.nl 12368d514b0f3Smrg echo >>conftest.nl 12369d514b0f3Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 12370d514b0f3Smrg cmp -s conftest.out conftest.nl || break 12371d514b0f3Smrg # 10000 chars as input seems more than enough 12372d514b0f3Smrg test 10 -lt "$lt_ac_count" && break 12373d514b0f3Smrg lt_ac_count=`expr $lt_ac_count + 1` 12374d514b0f3Smrg if test "$lt_ac_count" -gt "$lt_ac_max"; then 12375d514b0f3Smrg lt_ac_max=$lt_ac_count 12376d514b0f3Smrg lt_cv_path_SED=$lt_ac_sed 12377d514b0f3Smrg fi 12378d514b0f3Smrg done 12379d514b0f3Smrgdone 12380d514b0f3Smrg]) 12381d514b0f3SmrgSED=$lt_cv_path_SED 12382d514b0f3SmrgAC_SUBST([SED]) 12383d514b0f3SmrgAC_MSG_RESULT([$SED]) 12384d514b0f3Smrg])#AC_PROG_SED 12385d514b0f3Smrg])#m4_ifndef 12386d514b0f3Smrg 12387d514b0f3Smrg# Old name: 12388d514b0f3SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 12389d514b0f3Smrgdnl aclocal-1.4 backwards compatibility: 12390d514b0f3Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 12391d514b0f3Smrg 12392d514b0f3Smrg 12393d514b0f3Smrg# _LT_CHECK_SHELL_FEATURES 12394d514b0f3Smrg# ------------------------ 12395d514b0f3Smrg# Find out whether the shell is Bourne or XSI compatible, 12396d514b0f3Smrg# or has some other useful features. 12397d514b0f3Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 12398d514b0f3Smrg[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 12399d514b0f3Smrg lt_unset=unset 12400d514b0f3Smrgelse 12401d514b0f3Smrg lt_unset=false 12402d514b0f3Smrgfi 12403d514b0f3Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 12404d514b0f3Smrg 12405d514b0f3Smrg# test EBCDIC or ASCII 12406d514b0f3Smrgcase `echo X|tr X '\101'` in 12407d514b0f3Smrg A) # ASCII based system 12408d514b0f3Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 12409d514b0f3Smrg lt_SP2NL='tr \040 \012' 12410d514b0f3Smrg lt_NL2SP='tr \015\012 \040\040' 12411d514b0f3Smrg ;; 12412d514b0f3Smrg *) # EBCDIC based system 12413d514b0f3Smrg lt_SP2NL='tr \100 \n' 12414d514b0f3Smrg lt_NL2SP='tr \r\n \100\100' 12415d514b0f3Smrg ;; 12416d514b0f3Smrgesac 12417d514b0f3Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 12418d514b0f3Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 12419d514b0f3Smrg])# _LT_CHECK_SHELL_FEATURES 12420d514b0f3Smrg 12421d514b0f3Smrg 12422d514b0f3Smrg# _LT_PATH_CONVERSION_FUNCTIONS 12423d514b0f3Smrg# ----------------------------- 12424d514b0f3Smrg# Determine what file name conversion functions should be used by 12425d514b0f3Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 12426d514b0f3Smrg# for certain cross-compile configurations and native mingw. 12427d514b0f3Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 12428d514b0f3Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 12429d514b0f3SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 12430d514b0f3SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 12431d514b0f3SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 12432d514b0f3Smrg[case $host in 12433d514b0f3Smrg *-*-mingw* ) 12434d514b0f3Smrg case $build in 12435d514b0f3Smrg *-*-mingw* ) # actually msys 12436d514b0f3Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 12437d514b0f3Smrg ;; 12438d514b0f3Smrg *-*-cygwin* ) 12439d514b0f3Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 12440d514b0f3Smrg ;; 12441d514b0f3Smrg * ) # otherwise, assume *nix 12442d514b0f3Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 12443d514b0f3Smrg ;; 12444d514b0f3Smrg esac 12445d514b0f3Smrg ;; 12446d514b0f3Smrg *-*-cygwin* ) 12447d514b0f3Smrg case $build in 12448d514b0f3Smrg *-*-mingw* ) # actually msys 12449d514b0f3Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 12450d514b0f3Smrg ;; 12451d514b0f3Smrg *-*-cygwin* ) 12452d514b0f3Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 12453d514b0f3Smrg ;; 12454d514b0f3Smrg * ) # otherwise, assume *nix 12455d514b0f3Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 12456d514b0f3Smrg ;; 12457d514b0f3Smrg esac 12458d514b0f3Smrg ;; 12459d514b0f3Smrg * ) # unhandled hosts (and "normal" native builds) 12460d514b0f3Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 12461d514b0f3Smrg ;; 12462d514b0f3Smrgesac 12463d514b0f3Smrg]) 12464d514b0f3Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 12465d514b0f3SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 12466d514b0f3Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 12467d514b0f3Smrg [0], [convert $build file names to $host format])dnl 12468d514b0f3Smrg 12469d514b0f3SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 12470d514b0f3SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 12471d514b0f3Smrg[#assume ordinary cross tools, or native build. 12472d514b0f3Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 12473d514b0f3Smrgcase $host in 12474d514b0f3Smrg *-*-mingw* ) 12475d514b0f3Smrg case $build in 12476d514b0f3Smrg *-*-mingw* ) # actually msys 12477d514b0f3Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 12478d514b0f3Smrg ;; 12479d514b0f3Smrg esac 12480d514b0f3Smrg ;; 12481d514b0f3Smrgesac 12482d514b0f3Smrg]) 12483d514b0f3Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 12484d514b0f3SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 12485d514b0f3Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 12486d514b0f3Smrg [0], [convert $build files to toolchain format])dnl 12487d514b0f3Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 12488d514b0f3Smrg 12489d514b0f3Smrg# ltversion.m4 -- version numbers -*- Autoconf -*- 12490d514b0f3Smrg# 12491d514b0f3Smrg# Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation, 12492d514b0f3Smrg# Inc. 12493d514b0f3Smrg# Written by Scott James Remnant, 2004 12494d514b0f3Smrg# 12495d514b0f3Smrg# This file is free software; the Free Software Foundation gives 12496d514b0f3Smrg# unlimited permission to copy and/or distribute it, with or without 12497d514b0f3Smrg# modifications, as long as this notice is preserved. 12498d514b0f3Smrg 12499d514b0f3Smrg# @configure_input@ 12500d514b0f3Smrg 12501d514b0f3Smrg# serial 4245 ltversion.m4 12502d514b0f3Smrg# This file is part of GNU Libtool 12503d514b0f3Smrg 12504d514b0f3Smrgm4_define([LT_PACKAGE_VERSION], [2.4.7]) 12505d514b0f3Smrgm4_define([LT_PACKAGE_REVISION], [2.4.7]) 12506d514b0f3Smrg 12507d514b0f3SmrgAC_DEFUN([LTVERSION_VERSION], 12508d514b0f3Smrg[macro_version='2.4.7' 12509d514b0f3Smrgmacro_revision='2.4.7' 12510d514b0f3Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 12511d514b0f3Smrg_LT_DECL(, macro_revision, 0) 12512d514b0f3Smrg]) 12513d514b0f3Smrg 12514d514b0f3Smrgdnl Copyright 2005 Red Hat, Inc 12515d514b0f3Smrgdnl 12516d514b0f3Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 12517d514b0f3Smrgdnl documentation for any purpose is hereby granted without fee, provided that 12518d514b0f3Smrgdnl the above copyright notice appear in all copies and that both that 12519d514b0f3Smrgdnl copyright notice and this permission notice appear in supporting 12520d514b0f3Smrgdnl documentation. 12521d514b0f3Smrgdnl 12522d514b0f3Smrgdnl The above copyright notice and this permission notice shall be included 12523d514b0f3Smrgdnl in all copies or substantial portions of the Software. 12524d514b0f3Smrgdnl 12525d514b0f3Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 12526d514b0f3Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 12527d514b0f3Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 12528d514b0f3Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 12529d514b0f3Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 12530d514b0f3Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 12531d514b0f3Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 12532d514b0f3Smrgdnl 12533d514b0f3Smrgdnl Except as contained in this notice, the name of the copyright holders shall 12534d514b0f3Smrgdnl not be used in advertising or otherwise to promote the sale, use or 12535d514b0f3Smrgdnl other dealings in this Software without prior written authorization 12536d514b0f3Smrgdnl from the copyright holders. 12537d514b0f3Smrgdnl 12538d514b0f3Smrg 12539d514b0f3Smrg# XORG_DRIVER_CHECK_EXT(MACRO, PROTO) 12540d514b0f3Smrg# -------------------------- 12541d514b0f3Smrg# Checks for the MACRO define in xorg-server.h (from the sdk). If it 12542d514b0f3Smrg# is defined, then add the given PROTO to $REQUIRED_MODULES. 12543d514b0f3Smrg 12544d514b0f3SmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 12545d514b0f3Smrg AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 12546d514b0f3Smrg SAVE_CFLAGS="$CFLAGS" 12547d514b0f3Smrg CFLAGS="$CFLAGS `$PKG_CONFIG --cflags xorg-server`" 12548d514b0f3Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 12549d514b0f3Smrg#include "xorg-server.h" 12550d514b0f3Smrg#if !defined $1 12551d514b0f3Smrg#error $1 not defined 12552d514b0f3Smrg#endif 12553d514b0f3Smrg ]])], 12554d514b0f3Smrg [_EXT_CHECK=yes], 12555d514b0f3Smrg [_EXT_CHECK=no]) 12556d514b0f3Smrg CFLAGS="$SAVE_CFLAGS" 12557d514b0f3Smrg AC_MSG_CHECKING([if $1 is defined]) 12558d514b0f3Smrg AC_MSG_RESULT([$_EXT_CHECK]) 12559d514b0f3Smrg if test "$_EXT_CHECK" != no; then 12560d514b0f3Smrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 12561d514b0f3Smrg fi 12562d514b0f3Smrg]) 12563d514b0f3Smrg 12564