annotate src/fftw-3.3.3/m4/ltoptions.m4 @ 169:223a55898ab9 tip default

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