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