annotate src/fftw-3.3.5/m4/ltoptions.m4 @ 56:af97cad61ff0

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