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