acinclude/ltoptions.m4
author Sam Lantinga
Tue, 10 Jan 2017 08:54:33 -0800
changeset 10806 36f40b8cc979
parent 6442 2d3caa191dc4
permissions -rw-r--r--
Fixed bugs 2570, 3145, improved OpenGL ES context support on Windows and X11

Mark Callow

The attached patch does the following for the X11 and Windows platforms, the only ones where SDL attempts to use context_create_es_profile:

- Adds SDL_HINT_OPENGL_ES_DRIVER by which the application can
say to use the OpenGL ES driver & EGL rather than the Open GL
driver. (For bug #2570)
- Adds code to {WIN,X11}_GL_InitExtensions to determine the maximum
OpenGL ES version supported by the OpenGL driver (for bug #3145)
- Modifies the test that determines whether to use the OpenGL
driver or the real OpenGL ES driver to take into account the
hint, the requested and supported ES version and whether ES 1.X
is being requested. (For bug #2570 & bug #3145)
- Enables the testgles2 test for __WINDOWS__ and __LINUX__ and adds
the test to the VisualC projects.

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