File indexing completed on 2023-11-08 09:11:38
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
0015
0016
0017
0018
0019 m4_define([_LT_MANGLE_OPTION],
0020 [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
0021
0022
0023
0024
0025
0026
0027
0028 m4_define([_LT_SET_OPTION],
0029 [m4_define(_LT_MANGLE_OPTION([$1], [$2]))
0030 m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
0031 _LT_MANGLE_DEFUN([$1], [$2]),
0032 [m4_warning([Unknown $1 option `$2'])])[]dnl
0033 ])
0034
0035
0036 # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
0037 # ------------------------------------------------------------
0038 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
0039 m4_define([_LT_IF_OPTION],
0040 [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
0041
0042
0043 # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
0044 # -------------------------------------------------------
0045 # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
0046 # are set.
0047 m4_define([_LT_UNLESS_OPTIONS],
0048 [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
0049 [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
0050 [m4_define([$0_found])])])[]dnl
0051 m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
0052 ])[]dnl
0053 ])
0054
0055
0056 # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
0057 # ----------------------------------------
0058 # OPTION-LIST is a space-separated list of Libtool options associated
0059 # with MACRO-NAME. If any OPTION has a matching handler declared with
0060 # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
0061 # the unknown option and exit.
0062 m4_defun([_LT_SET_OPTIONS],
0063 [# Set options
0064 m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
0065 [_LT_SET_OPTION([$1], _LT_Option)])
0066
0067 m4_if([$1],[LT_INIT],[
0068 dnl
0069 dnl Simply set some default values (i.e off) if boolean options were not
0070 dnl specified:
0071 _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
0072 ])
0073 _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
0074 ])
0075 dnl
0076 dnl If no reference was made to various pairs of opposing options, then
0077 dnl we run the default mode handler for the pair. For example, if neither
0078 dnl `shared' nor `disable-shared' was passed, we enable building of shared
0079 dnl archives by default:
0080 _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
0081 _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
0082 _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
0083 _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
0084 [_LT_ENABLE_FAST_INSTALL])
0085 ])
0086 ])# _LT_SET_OPTIONS
0087
0088
0089 ## --------------------------------- ##
0090 ## Macros to handle LT_INIT options. ##
0091 ## --------------------------------- ##
0092
0093 # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
0094 # -----------------------------------------
0095 m4_define([_LT_MANGLE_DEFUN],
0096 [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
0097
0098
0099 # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
0100 # -----------------------------------------------
0101 m4_define([LT_OPTION_DEFINE],
0102 [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
0103 ])# LT_OPTION_DEFINE
0104
0105
0106 # dlopen
0107 # ------
0108 LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
0109 ])
0110
0111 AU_DEFUN([AC_LIBTOOL_DLOPEN],
0112 [_LT_SET_OPTION([LT_INIT], [dlopen])
0113 AC_DIAGNOSE([obsolete],
0114 [$0: Remove this warning and the call to _LT_SET_OPTION when you
0115 put the `dlopen' option into LT_INIT's first parameter.])
0116 ])
0117
0118 dnl aclocal-1.4 backwards compatibility:
0119 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
0120
0121
0122 # win32-dll
0123 # ---------
0124 # Declare package support for building win32 dll's.
0125 LT_OPTION_DEFINE([LT_INIT], [win32-dll],
0126 [enable_win32_dll=yes
0127
0128 case $host in
0129 *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
0130 AC_CHECK_TOOL(AS, as, false)
0131 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
0132 AC_CHECK_TOOL(OBJDUMP, objdump, false)
0133 ;;
0134 esac
0135
0136 test -z "$AS" && AS=as
0137 _LT_DECL([], [AS], [1], [Assembler program])
0138
0139 test -z "$DLLTOOL" && DLLTOOL=dlltool
0140 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
0141
0142 test -z "$OBJDUMP" && OBJDUMP=objdump
0143 _LT_DECL([], [OBJDUMP], [1], [Object dumper program])
0144 ])
0145
0146 AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
0147 [AC_REQUIRE([AC_CANONICAL_HOST])
0148 _LT_SET_OPTION([LT_INIT], [win32-dll])
0149 AC_DIAGNOSE([obsolete],
0150 [$0: Remove this warning and the call to _LT_SET_OPTION when you
0151 put the `win32-dll' option into LT_INIT's first parameter.])
0152 ])
0153
0154
0155
0156
0157
0158
0159
0160
0161
0162
0163 m4_define([_LT_ENABLE_SHARED],
0164 [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])
0165 AC_ARG_ENABLE([shared],
0166 [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
0167 [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
0168 [p=${PACKAGE-default}
0169 case $enableval in
0170 yes) enable_shared=yes ;;
0171 no) enable_shared=no ;;
0172 *)
0173 enable_shared=no
0174
0175 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
0176 for pkg in $enableval; do
0177 IFS="$lt_save_ifs"
0178 if test "X$pkg" = "X$p"; then
0179 enable_shared=yes
0180 fi
0181 done
0182 IFS="$lt_save_ifs"
0183 ;;
0184 esac],
0185 [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
0186
0187 _LT_DECL([build_libtool_libs], [enable_shared], [0],
0188 [Whether or not to build shared libraries])
0189 ])
0190
0191 LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
0192 LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
0193
0194
0195 AC_DEFUN([AC_ENABLE_SHARED],
0196 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
0197 ])
0198
0199 AC_DEFUN([AC_DISABLE_SHARED],
0200 [_LT_SET_OPTION([LT_INIT], [disable-shared])
0201 ])
0202
0203 AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
0204 AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
0205
0206
0207
0208
0209
0210
0211
0212
0213
0214
0215
0216
0217 m4_define([_LT_ENABLE_STATIC],
0218 [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])
0219 AC_ARG_ENABLE([static],
0220 [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
0221 [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
0222 [p=${PACKAGE-default}
0223 case $enableval in
0224 yes) enable_static=yes ;;
0225 no) enable_static=no ;;
0226 *)
0227 enable_static=no
0228
0229 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
0230 for pkg in $enableval; do
0231 IFS="$lt_save_ifs"
0232 if test "X$pkg" = "X$p"; then
0233 enable_static=yes
0234 fi
0235 done
0236 IFS="$lt_save_ifs"
0237 ;;
0238 esac],
0239 [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
0240
0241 _LT_DECL([build_old_libs], [enable_static], [0],
0242 [Whether or not to build static libraries])
0243 ])
0244
0245 LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
0246 LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
0247
0248
0249 AC_DEFUN([AC_ENABLE_STATIC],
0250 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
0251 ])
0252
0253 AC_DEFUN([AC_DISABLE_STATIC],
0254 [_LT_SET_OPTION([LT_INIT], [disable-static])
0255 ])
0256
0257 AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
0258 AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
0259
0260
0261
0262
0263
0264
0265
0266
0267
0268
0269
0270
0271 m4_define([_LT_ENABLE_FAST_INSTALL],
0272 [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])
0273 AC_ARG_ENABLE([fast-install],
0274 [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
0275 [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
0276 [p=${PACKAGE-default}
0277 case $enableval in
0278 yes) enable_fast_install=yes ;;
0279 no) enable_fast_install=no ;;
0280 *)
0281 enable_fast_install=no
0282
0283 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
0284 for pkg in $enableval; do
0285 IFS="$lt_save_ifs"
0286 if test "X$pkg" = "X$p"; then
0287 enable_fast_install=yes
0288 fi
0289 done
0290 IFS="$lt_save_ifs"
0291 ;;
0292 esac],
0293 [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
0294
0295 _LT_DECL([fast_install], [enable_fast_install], [0],
0296 [Whether or not to optimize for fast installation])
0297 ])
0298
0299 LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
0300 LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
0301
0302
0303 AU_DEFUN([AC_ENABLE_FAST_INSTALL],
0304 [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
0305 AC_DIAGNOSE([obsolete],
0306 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
0307 the `fast-install' option into LT_INIT's first parameter.])
0308 ])
0309
0310 AU_DEFUN([AC_DISABLE_FAST_INSTALL],
0311 [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
0312 AC_DIAGNOSE([obsolete],
0313 [$0: Remove this warning and the call to _LT_SET_OPTION when you put
0314 the `disable-fast-install' option into LT_INIT's first parameter.])
0315 ])
0316
0317
0318
0319
0320
0321
0322
0323
0324
0325
0326
0327 m4_define([_LT_WITH_PIC],
0328 [AC_ARG_WITH([pic],
0329 [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
0330 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
0331 [lt_p=${PACKAGE-default}
0332 case $withval in
0333 yes|no) pic_mode=$withval ;;
0334 *)
0335 pic_mode=default
0336
0337 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
0338 for lt_pkg in $withval; do
0339 IFS="$lt_save_ifs"
0340 if test "X$lt_pkg" = "X$lt_p"; then
0341 pic_mode=yes
0342 fi
0343 done
0344 IFS="$lt_save_ifs"
0345 ;;
0346 esac],
0347 [pic_mode=default])
0348
0349 test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
0350
0351 _LT_DECL([], [pic_mode], [0], [What type of objects to build])
0352 ])
0353
0354 LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
0355 LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
0356
0357
0358 AU_DEFUN([AC_LIBTOOL_PICMODE],
0359 [_LT_SET_OPTION([LT_INIT], [pic-only])
0360 AC_DIAGNOSE([obsolete],
0361 [$0: Remove this warning and the call to _LT_SET_OPTION when you
0362 put the `pic-only' option into LT_INIT's first parameter.])
0363 ])
0364
0365
0366
0367
0368
0369
0370
0371
0372 m4_define([_LTDL_MODE], [])
0373 LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
0374 [m4_define([_LTDL_MODE], [nonrecursive])])
0375 LT_OPTION_DEFINE([LTDL_INIT], [recursive],
0376 [m4_define([_LTDL_MODE], [recursive])])
0377 LT_OPTION_DEFINE([LTDL_INIT], [subproject],
0378 [m4_define([_LTDL_MODE], [subproject])])
0379
0380 m4_define([_LTDL_TYPE], [])
0381 LT_OPTION_DEFINE([LTDL_INIT], [installable],
0382 [m4_define([_LTDL_TYPE], [installable])])
0383 LT_OPTION_DEFINE([LTDL_INIT], [convenience],
0384 [m4_define([_LTDL_TYPE], [convenience])])