1*e2b1b9c0Schristos# Helper functions for option handling. -*- Autoconf -*- 2*e2b1b9c0Schristos# 3*e2b1b9c0Schristos# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software 4*e2b1b9c0Schristos# Foundation, Inc. 5*e2b1b9c0Schristos# Written by Gary V. Vaughan, 2004 6*e2b1b9c0Schristos# 7*e2b1b9c0Schristos# This file is free software; the Free Software Foundation gives 8*e2b1b9c0Schristos# unlimited permission to copy and/or distribute it, with or without 9*e2b1b9c0Schristos# modifications, as long as this notice is preserved. 10*e2b1b9c0Schristos 11*e2b1b9c0Schristos# serial 8 ltoptions.m4 12*e2b1b9c0Schristos 13*e2b1b9c0Schristos# This is to help aclocal find these macros, as it can't see m4_define. 14*e2b1b9c0SchristosAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 15*e2b1b9c0Schristos 16*e2b1b9c0Schristos 17*e2b1b9c0Schristos# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 18*e2b1b9c0Schristos# ------------------------------------------ 19*e2b1b9c0Schristosm4_define([_LT_MANGLE_OPTION], 20*e2b1b9c0Schristos[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 21*e2b1b9c0Schristos 22*e2b1b9c0Schristos 23*e2b1b9c0Schristos# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 24*e2b1b9c0Schristos# --------------------------------------- 25*e2b1b9c0Schristos# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 26*e2b1b9c0Schristos# matching handler defined, dispatch to it. Other OPTION-NAMEs are 27*e2b1b9c0Schristos# saved as a flag. 28*e2b1b9c0Schristosm4_define([_LT_SET_OPTION], 29*e2b1b9c0Schristos[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 30*e2b1b9c0Schristosm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 31*e2b1b9c0Schristos _LT_MANGLE_DEFUN([$1], [$2]), 32*e2b1b9c0Schristos [m4_warning([Unknown $1 option '$2'])])[]dnl 33*e2b1b9c0Schristos]) 34*e2b1b9c0Schristos 35*e2b1b9c0Schristos 36*e2b1b9c0Schristos# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 37*e2b1b9c0Schristos# ------------------------------------------------------------ 38*e2b1b9c0Schristos# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 39*e2b1b9c0Schristosm4_define([_LT_IF_OPTION], 40*e2b1b9c0Schristos[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 41*e2b1b9c0Schristos 42*e2b1b9c0Schristos 43*e2b1b9c0Schristos# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 44*e2b1b9c0Schristos# ------------------------------------------------------- 45*e2b1b9c0Schristos# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 46*e2b1b9c0Schristos# are set. 47*e2b1b9c0Schristosm4_define([_LT_UNLESS_OPTIONS], 48*e2b1b9c0Schristos[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 49*e2b1b9c0Schristos [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 50*e2b1b9c0Schristos [m4_define([$0_found])])])[]dnl 51*e2b1b9c0Schristosm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 52*e2b1b9c0Schristos])[]dnl 53*e2b1b9c0Schristos]) 54*e2b1b9c0Schristos 55*e2b1b9c0Schristos 56*e2b1b9c0Schristos# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 57*e2b1b9c0Schristos# ---------------------------------------- 58*e2b1b9c0Schristos# OPTION-LIST is a space-separated list of Libtool options associated 59*e2b1b9c0Schristos# with MACRO-NAME. If any OPTION has a matching handler declared with 60*e2b1b9c0Schristos# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 61*e2b1b9c0Schristos# the unknown option and exit. 62*e2b1b9c0Schristosm4_defun([_LT_SET_OPTIONS], 63*e2b1b9c0Schristos[# Set options 64*e2b1b9c0Schristosm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 65*e2b1b9c0Schristos [_LT_SET_OPTION([$1], _LT_Option)]) 66*e2b1b9c0Schristos 67*e2b1b9c0Schristosm4_if([$1],[LT_INIT],[ 68*e2b1b9c0Schristos dnl 69*e2b1b9c0Schristos dnl Simply set some default values (i.e off) if boolean options were not 70*e2b1b9c0Schristos dnl specified: 71*e2b1b9c0Schristos _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 72*e2b1b9c0Schristos ]) 73*e2b1b9c0Schristos _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 74*e2b1b9c0Schristos ]) 75*e2b1b9c0Schristos dnl 76*e2b1b9c0Schristos dnl If no reference was made to various pairs of opposing options, then 77*e2b1b9c0Schristos dnl we run the default mode handler for the pair. For example, if neither 78*e2b1b9c0Schristos dnl 'shared' nor 'disable-shared' was passed, we enable building of shared 79*e2b1b9c0Schristos dnl archives by default: 80*e2b1b9c0Schristos _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 81*e2b1b9c0Schristos _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 82*e2b1b9c0Schristos _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 83*e2b1b9c0Schristos _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 84*e2b1b9c0Schristos [_LT_ENABLE_FAST_INSTALL]) 85*e2b1b9c0Schristos _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], 86*e2b1b9c0Schristos [_LT_WITH_AIX_SONAME([aix])]) 87*e2b1b9c0Schristos ]) 88*e2b1b9c0Schristos])# _LT_SET_OPTIONS 89*e2b1b9c0Schristos 90*e2b1b9c0Schristos 91*e2b1b9c0Schristos## --------------------------------- ## 92*e2b1b9c0Schristos## Macros to handle LT_INIT options. ## 93*e2b1b9c0Schristos## --------------------------------- ## 94*e2b1b9c0Schristos 95*e2b1b9c0Schristos# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 96*e2b1b9c0Schristos# ----------------------------------------- 97*e2b1b9c0Schristosm4_define([_LT_MANGLE_DEFUN], 98*e2b1b9c0Schristos[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 99*e2b1b9c0Schristos 100*e2b1b9c0Schristos 101*e2b1b9c0Schristos# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 102*e2b1b9c0Schristos# ----------------------------------------------- 103*e2b1b9c0Schristosm4_define([LT_OPTION_DEFINE], 104*e2b1b9c0Schristos[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 105*e2b1b9c0Schristos])# LT_OPTION_DEFINE 106*e2b1b9c0Schristos 107*e2b1b9c0Schristos 108*e2b1b9c0Schristos# dlopen 109*e2b1b9c0Schristos# ------ 110*e2b1b9c0SchristosLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 111*e2b1b9c0Schristos]) 112*e2b1b9c0Schristos 113*e2b1b9c0SchristosAU_DEFUN([AC_LIBTOOL_DLOPEN], 114*e2b1b9c0Schristos[_LT_SET_OPTION([LT_INIT], [dlopen]) 115*e2b1b9c0SchristosAC_DIAGNOSE([obsolete], 116*e2b1b9c0Schristos[$0: Remove this warning and the call to _LT_SET_OPTION when you 117*e2b1b9c0Schristosput the 'dlopen' option into LT_INIT's first parameter.]) 118*e2b1b9c0Schristos]) 119*e2b1b9c0Schristos 120*e2b1b9c0Schristosdnl aclocal-1.4 backwards compatibility: 121*e2b1b9c0Schristosdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 122*e2b1b9c0Schristos 123*e2b1b9c0Schristos 124*e2b1b9c0Schristos# win32-dll 125*e2b1b9c0Schristos# --------- 126*e2b1b9c0Schristos# Declare package support for building win32 dll's. 127*e2b1b9c0SchristosLT_OPTION_DEFINE([LT_INIT], [win32-dll], 128*e2b1b9c0Schristos[enable_win32_dll=yes 129*e2b1b9c0Schristos 130*e2b1b9c0Schristoscase $host in 131*e2b1b9c0Schristos*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 132*e2b1b9c0Schristos AC_CHECK_TOOL(AS, as, false) 133*e2b1b9c0Schristos AC_CHECK_TOOL(DLLTOOL, dlltool, false) 134*e2b1b9c0Schristos AC_CHECK_TOOL(OBJDUMP, objdump, false) 135*e2b1b9c0Schristos ;; 136*e2b1b9c0Schristosesac 137*e2b1b9c0Schristos 138*e2b1b9c0Schristostest -z "$AS" && AS=as 139*e2b1b9c0Schristos_LT_DECL([], [AS], [1], [Assembler program])dnl 140*e2b1b9c0Schristos 141*e2b1b9c0Schristostest -z "$DLLTOOL" && DLLTOOL=dlltool 142*e2b1b9c0Schristos_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 143*e2b1b9c0Schristos 144*e2b1b9c0Schristostest -z "$OBJDUMP" && OBJDUMP=objdump 145*e2b1b9c0Schristos_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 146*e2b1b9c0Schristos])# win32-dll 147*e2b1b9c0Schristos 148*e2b1b9c0SchristosAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 149*e2b1b9c0Schristos[AC_REQUIRE([AC_CANONICAL_HOST])dnl 150*e2b1b9c0Schristos_LT_SET_OPTION([LT_INIT], [win32-dll]) 151*e2b1b9c0SchristosAC_DIAGNOSE([obsolete], 152*e2b1b9c0Schristos[$0: Remove this warning and the call to _LT_SET_OPTION when you 153*e2b1b9c0Schristosput the 'win32-dll' option into LT_INIT's first parameter.]) 154*e2b1b9c0Schristos]) 155*e2b1b9c0Schristos 156*e2b1b9c0Schristosdnl aclocal-1.4 backwards compatibility: 157*e2b1b9c0Schristosdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 158*e2b1b9c0Schristos 159*e2b1b9c0Schristos 160*e2b1b9c0Schristos# _LT_ENABLE_SHARED([DEFAULT]) 161*e2b1b9c0Schristos# ---------------------------- 162*e2b1b9c0Schristos# implement the --enable-shared flag, and supports the 'shared' and 163*e2b1b9c0Schristos# 'disable-shared' LT_INIT options. 164*e2b1b9c0Schristos# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 165*e2b1b9c0Schristosm4_define([_LT_ENABLE_SHARED], 166*e2b1b9c0Schristos[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 167*e2b1b9c0SchristosAC_ARG_ENABLE([shared], 168*e2b1b9c0Schristos [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 169*e2b1b9c0Schristos [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 170*e2b1b9c0Schristos [p=${PACKAGE-default} 171*e2b1b9c0Schristos case $enableval in 172*e2b1b9c0Schristos yes) enable_shared=yes ;; 173*e2b1b9c0Schristos no) enable_shared=no ;; 174*e2b1b9c0Schristos *) 175*e2b1b9c0Schristos enable_shared=no 176*e2b1b9c0Schristos # Look at the argument we got. We use all the common list separators. 177*e2b1b9c0Schristos lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 178*e2b1b9c0Schristos for pkg in $enableval; do 179*e2b1b9c0Schristos IFS=$lt_save_ifs 180*e2b1b9c0Schristos if test "X$pkg" = "X$p"; then 181*e2b1b9c0Schristos enable_shared=yes 182*e2b1b9c0Schristos fi 183*e2b1b9c0Schristos done 184*e2b1b9c0Schristos IFS=$lt_save_ifs 185*e2b1b9c0Schristos ;; 186*e2b1b9c0Schristos esac], 187*e2b1b9c0Schristos [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 188*e2b1b9c0Schristos 189*e2b1b9c0Schristos _LT_DECL([build_libtool_libs], [enable_shared], [0], 190*e2b1b9c0Schristos [Whether or not to build shared libraries]) 191*e2b1b9c0Schristos])# _LT_ENABLE_SHARED 192*e2b1b9c0Schristos 193*e2b1b9c0SchristosLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 194*e2b1b9c0SchristosLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 195*e2b1b9c0Schristos 196*e2b1b9c0Schristos# Old names: 197*e2b1b9c0SchristosAC_DEFUN([AC_ENABLE_SHARED], 198*e2b1b9c0Schristos[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 199*e2b1b9c0Schristos]) 200*e2b1b9c0Schristos 201*e2b1b9c0SchristosAC_DEFUN([AC_DISABLE_SHARED], 202*e2b1b9c0Schristos[_LT_SET_OPTION([LT_INIT], [disable-shared]) 203*e2b1b9c0Schristos]) 204*e2b1b9c0Schristos 205*e2b1b9c0SchristosAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 206*e2b1b9c0SchristosAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 207*e2b1b9c0Schristos 208*e2b1b9c0Schristosdnl aclocal-1.4 backwards compatibility: 209*e2b1b9c0Schristosdnl AC_DEFUN([AM_ENABLE_SHARED], []) 210*e2b1b9c0Schristosdnl AC_DEFUN([AM_DISABLE_SHARED], []) 211*e2b1b9c0Schristos 212*e2b1b9c0Schristos 213*e2b1b9c0Schristos 214*e2b1b9c0Schristos# _LT_ENABLE_STATIC([DEFAULT]) 215*e2b1b9c0Schristos# ---------------------------- 216*e2b1b9c0Schristos# implement the --enable-static flag, and support the 'static' and 217*e2b1b9c0Schristos# 'disable-static' LT_INIT options. 218*e2b1b9c0Schristos# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 219*e2b1b9c0Schristosm4_define([_LT_ENABLE_STATIC], 220*e2b1b9c0Schristos[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 221*e2b1b9c0SchristosAC_ARG_ENABLE([static], 222*e2b1b9c0Schristos [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 223*e2b1b9c0Schristos [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 224*e2b1b9c0Schristos [p=${PACKAGE-default} 225*e2b1b9c0Schristos case $enableval in 226*e2b1b9c0Schristos yes) enable_static=yes ;; 227*e2b1b9c0Schristos no) enable_static=no ;; 228*e2b1b9c0Schristos *) 229*e2b1b9c0Schristos enable_static=no 230*e2b1b9c0Schristos # Look at the argument we got. We use all the common list separators. 231*e2b1b9c0Schristos lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 232*e2b1b9c0Schristos for pkg in $enableval; do 233*e2b1b9c0Schristos IFS=$lt_save_ifs 234*e2b1b9c0Schristos if test "X$pkg" = "X$p"; then 235*e2b1b9c0Schristos enable_static=yes 236*e2b1b9c0Schristos fi 237*e2b1b9c0Schristos done 238*e2b1b9c0Schristos IFS=$lt_save_ifs 239*e2b1b9c0Schristos ;; 240*e2b1b9c0Schristos esac], 241*e2b1b9c0Schristos [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 242*e2b1b9c0Schristos 243*e2b1b9c0Schristos _LT_DECL([build_old_libs], [enable_static], [0], 244*e2b1b9c0Schristos [Whether or not to build static libraries]) 245*e2b1b9c0Schristos])# _LT_ENABLE_STATIC 246*e2b1b9c0Schristos 247*e2b1b9c0SchristosLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 248*e2b1b9c0SchristosLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 249*e2b1b9c0Schristos 250*e2b1b9c0Schristos# Old names: 251*e2b1b9c0SchristosAC_DEFUN([AC_ENABLE_STATIC], 252*e2b1b9c0Schristos[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 253*e2b1b9c0Schristos]) 254*e2b1b9c0Schristos 255*e2b1b9c0SchristosAC_DEFUN([AC_DISABLE_STATIC], 256*e2b1b9c0Schristos[_LT_SET_OPTION([LT_INIT], [disable-static]) 257*e2b1b9c0Schristos]) 258*e2b1b9c0Schristos 259*e2b1b9c0SchristosAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 260*e2b1b9c0SchristosAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 261*e2b1b9c0Schristos 262*e2b1b9c0Schristosdnl aclocal-1.4 backwards compatibility: 263*e2b1b9c0Schristosdnl AC_DEFUN([AM_ENABLE_STATIC], []) 264*e2b1b9c0Schristosdnl AC_DEFUN([AM_DISABLE_STATIC], []) 265*e2b1b9c0Schristos 266*e2b1b9c0Schristos 267*e2b1b9c0Schristos 268*e2b1b9c0Schristos# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 269*e2b1b9c0Schristos# ---------------------------------- 270*e2b1b9c0Schristos# implement the --enable-fast-install flag, and support the 'fast-install' 271*e2b1b9c0Schristos# and 'disable-fast-install' LT_INIT options. 272*e2b1b9c0Schristos# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 273*e2b1b9c0Schristosm4_define([_LT_ENABLE_FAST_INSTALL], 274*e2b1b9c0Schristos[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 275*e2b1b9c0SchristosAC_ARG_ENABLE([fast-install], 276*e2b1b9c0Schristos [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 277*e2b1b9c0Schristos [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 278*e2b1b9c0Schristos [p=${PACKAGE-default} 279*e2b1b9c0Schristos case $enableval in 280*e2b1b9c0Schristos yes) enable_fast_install=yes ;; 281*e2b1b9c0Schristos no) enable_fast_install=no ;; 282*e2b1b9c0Schristos *) 283*e2b1b9c0Schristos enable_fast_install=no 284*e2b1b9c0Schristos # Look at the argument we got. We use all the common list separators. 285*e2b1b9c0Schristos lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 286*e2b1b9c0Schristos for pkg in $enableval; do 287*e2b1b9c0Schristos IFS=$lt_save_ifs 288*e2b1b9c0Schristos if test "X$pkg" = "X$p"; then 289*e2b1b9c0Schristos enable_fast_install=yes 290*e2b1b9c0Schristos fi 291*e2b1b9c0Schristos done 292*e2b1b9c0Schristos IFS=$lt_save_ifs 293*e2b1b9c0Schristos ;; 294*e2b1b9c0Schristos esac], 295*e2b1b9c0Schristos [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 296*e2b1b9c0Schristos 297*e2b1b9c0Schristos_LT_DECL([fast_install], [enable_fast_install], [0], 298*e2b1b9c0Schristos [Whether or not to optimize for fast installation])dnl 299*e2b1b9c0Schristos])# _LT_ENABLE_FAST_INSTALL 300*e2b1b9c0Schristos 301*e2b1b9c0SchristosLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 302*e2b1b9c0SchristosLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 303*e2b1b9c0Schristos 304*e2b1b9c0Schristos# Old names: 305*e2b1b9c0SchristosAU_DEFUN([AC_ENABLE_FAST_INSTALL], 306*e2b1b9c0Schristos[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 307*e2b1b9c0SchristosAC_DIAGNOSE([obsolete], 308*e2b1b9c0Schristos[$0: Remove this warning and the call to _LT_SET_OPTION when you put 309*e2b1b9c0Schristosthe 'fast-install' option into LT_INIT's first parameter.]) 310*e2b1b9c0Schristos]) 311*e2b1b9c0Schristos 312*e2b1b9c0SchristosAU_DEFUN([AC_DISABLE_FAST_INSTALL], 313*e2b1b9c0Schristos[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 314*e2b1b9c0SchristosAC_DIAGNOSE([obsolete], 315*e2b1b9c0Schristos[$0: Remove this warning and the call to _LT_SET_OPTION when you put 316*e2b1b9c0Schristosthe 'disable-fast-install' option into LT_INIT's first parameter.]) 317*e2b1b9c0Schristos]) 318*e2b1b9c0Schristos 319*e2b1b9c0Schristosdnl aclocal-1.4 backwards compatibility: 320*e2b1b9c0Schristosdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 321*e2b1b9c0Schristosdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 322*e2b1b9c0Schristos 323*e2b1b9c0Schristos 324*e2b1b9c0Schristos# _LT_WITH_AIX_SONAME([DEFAULT]) 325*e2b1b9c0Schristos# ---------------------------------- 326*e2b1b9c0Schristos# implement the --with-aix-soname flag, and support the `aix-soname=aix' 327*e2b1b9c0Schristos# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT 328*e2b1b9c0Schristos# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. 329*e2b1b9c0Schristosm4_define([_LT_WITH_AIX_SONAME], 330*e2b1b9c0Schristos[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl 331*e2b1b9c0Schristosshared_archive_member_spec= 332*e2b1b9c0Schristoscase $host,$enable_shared in 333*e2b1b9c0Schristospower*-*-aix[[5-9]]*,yes) 334*e2b1b9c0Schristos AC_MSG_CHECKING([which variant of shared library versioning to provide]) 335*e2b1b9c0Schristos AC_ARG_WITH([aix-soname], 336*e2b1b9c0Schristos [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], 337*e2b1b9c0Schristos [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], 338*e2b1b9c0Schristos [case $withval in 339*e2b1b9c0Schristos aix|svr4|both) 340*e2b1b9c0Schristos ;; 341*e2b1b9c0Schristos *) 342*e2b1b9c0Schristos AC_MSG_ERROR([Unknown argument to --with-aix-soname]) 343*e2b1b9c0Schristos ;; 344*e2b1b9c0Schristos esac 345*e2b1b9c0Schristos lt_cv_with_aix_soname=$with_aix_soname], 346*e2b1b9c0Schristos [AC_CACHE_VAL([lt_cv_with_aix_soname], 347*e2b1b9c0Schristos [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) 348*e2b1b9c0Schristos with_aix_soname=$lt_cv_with_aix_soname]) 349*e2b1b9c0Schristos AC_MSG_RESULT([$with_aix_soname]) 350*e2b1b9c0Schristos if test aix != "$with_aix_soname"; then 351*e2b1b9c0Schristos # For the AIX way of multilib, we name the shared archive member 352*e2b1b9c0Schristos # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', 353*e2b1b9c0Schristos # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. 354*e2b1b9c0Schristos # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, 355*e2b1b9c0Schristos # the AIX toolchain works better with OBJECT_MODE set (default 32). 356*e2b1b9c0Schristos if test 64 = "${OBJECT_MODE-32}"; then 357*e2b1b9c0Schristos shared_archive_member_spec=shr_64 358*e2b1b9c0Schristos else 359*e2b1b9c0Schristos shared_archive_member_spec=shr 360*e2b1b9c0Schristos fi 361*e2b1b9c0Schristos fi 362*e2b1b9c0Schristos ;; 363*e2b1b9c0Schristos*) 364*e2b1b9c0Schristos with_aix_soname=aix 365*e2b1b9c0Schristos ;; 366*e2b1b9c0Schristosesac 367*e2b1b9c0Schristos 368*e2b1b9c0Schristos_LT_DECL([], [shared_archive_member_spec], [0], 369*e2b1b9c0Schristos [Shared archive member basename, for filename based shared library versioning on AIX])dnl 370*e2b1b9c0Schristos])# _LT_WITH_AIX_SONAME 371*e2b1b9c0Schristos 372*e2b1b9c0SchristosLT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) 373*e2b1b9c0SchristosLT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) 374*e2b1b9c0SchristosLT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) 375*e2b1b9c0Schristos 376*e2b1b9c0Schristos 377*e2b1b9c0Schristos# _LT_WITH_PIC([MODE]) 378*e2b1b9c0Schristos# -------------------- 379*e2b1b9c0Schristos# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' 380*e2b1b9c0Schristos# LT_INIT options. 381*e2b1b9c0Schristos# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. 382*e2b1b9c0Schristosm4_define([_LT_WITH_PIC], 383*e2b1b9c0Schristos[AC_ARG_WITH([pic], 384*e2b1b9c0Schristos [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 385*e2b1b9c0Schristos [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 386*e2b1b9c0Schristos [lt_p=${PACKAGE-default} 387*e2b1b9c0Schristos case $withval in 388*e2b1b9c0Schristos yes|no) pic_mode=$withval ;; 389*e2b1b9c0Schristos *) 390*e2b1b9c0Schristos pic_mode=default 391*e2b1b9c0Schristos # Look at the argument we got. We use all the common list separators. 392*e2b1b9c0Schristos lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 393*e2b1b9c0Schristos for lt_pkg in $withval; do 394*e2b1b9c0Schristos IFS=$lt_save_ifs 395*e2b1b9c0Schristos if test "X$lt_pkg" = "X$lt_p"; then 396*e2b1b9c0Schristos pic_mode=yes 397*e2b1b9c0Schristos fi 398*e2b1b9c0Schristos done 399*e2b1b9c0Schristos IFS=$lt_save_ifs 400*e2b1b9c0Schristos ;; 401*e2b1b9c0Schristos esac], 402*e2b1b9c0Schristos [pic_mode=m4_default([$1], [default])]) 403*e2b1b9c0Schristos 404*e2b1b9c0Schristos_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 405*e2b1b9c0Schristos])# _LT_WITH_PIC 406*e2b1b9c0Schristos 407*e2b1b9c0SchristosLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 408*e2b1b9c0SchristosLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 409*e2b1b9c0Schristos 410*e2b1b9c0Schristos# Old name: 411*e2b1b9c0SchristosAU_DEFUN([AC_LIBTOOL_PICMODE], 412*e2b1b9c0Schristos[_LT_SET_OPTION([LT_INIT], [pic-only]) 413*e2b1b9c0SchristosAC_DIAGNOSE([obsolete], 414*e2b1b9c0Schristos[$0: Remove this warning and the call to _LT_SET_OPTION when you 415*e2b1b9c0Schristosput the 'pic-only' option into LT_INIT's first parameter.]) 416*e2b1b9c0Schristos]) 417*e2b1b9c0Schristos 418*e2b1b9c0Schristosdnl aclocal-1.4 backwards compatibility: 419*e2b1b9c0Schristosdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 420*e2b1b9c0Schristos 421*e2b1b9c0Schristos## ----------------- ## 422*e2b1b9c0Schristos## LTDL_INIT Options ## 423*e2b1b9c0Schristos## ----------------- ## 424*e2b1b9c0Schristos 425*e2b1b9c0Schristosm4_define([_LTDL_MODE], []) 426*e2b1b9c0SchristosLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 427*e2b1b9c0Schristos [m4_define([_LTDL_MODE], [nonrecursive])]) 428*e2b1b9c0SchristosLT_OPTION_DEFINE([LTDL_INIT], [recursive], 429*e2b1b9c0Schristos [m4_define([_LTDL_MODE], [recursive])]) 430*e2b1b9c0SchristosLT_OPTION_DEFINE([LTDL_INIT], [subproject], 431*e2b1b9c0Schristos [m4_define([_LTDL_MODE], [subproject])]) 432*e2b1b9c0Schristos 433*e2b1b9c0Schristosm4_define([_LTDL_TYPE], []) 434*e2b1b9c0SchristosLT_OPTION_DEFINE([LTDL_INIT], [installable], 435*e2b1b9c0Schristos [m4_define([_LTDL_TYPE], [installable])]) 436*e2b1b9c0SchristosLT_OPTION_DEFINE([LTDL_INIT], [convenience], 437*e2b1b9c0Schristos [m4_define([_LTDL_TYPE], [convenience])]) 438