acinclude/libtool.m4
author Sam Lantinga <slouken@libsdl.org>
Sun, 04 Oct 2009 20:31:21 +0000
branchSDL-1.2
changeset 4275 b73b5af69f48
child 4277 803eeeeaa8a0
permissions -rw-r--r--
Split acinclude.m4 into its constituent parts for easy upgrading
slouken@4275
     1
##############################################################################
slouken@4275
     2
# Based on libtool-1.5.22
slouken@4275
     3
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
slouken@4275
     4
## Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
slouken@4275
     5
## Free Software Foundation, Inc.
slouken@4275
     6
## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
slouken@4275
     7
##
slouken@4275
     8
## This file is free software; the Free Software Foundation gives
slouken@4275
     9
## unlimited permission to copy and/or distribute it, with or without
slouken@4275
    10
## modifications, as long as this notice is preserved.
slouken@4275
    11
slouken@4275
    12
# serial 48 AC_PROG_LIBTOOL
slouken@4275
    13
slouken@4275
    14
slouken@4275
    15
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
slouken@4275
    16
# -----------------------------------------------------------
slouken@4275
    17
# If this macro is not defined by Autoconf, define it here.
slouken@4275
    18
m4_ifdef([AC_PROVIDE_IFELSE],
slouken@4275
    19
         [],
slouken@4275
    20
         [m4_define([AC_PROVIDE_IFELSE],
slouken@4275
    21
	         [m4_ifdef([AC_PROVIDE_$1],
slouken@4275
    22
		           [$2], [$3])])])
slouken@4275
    23
slouken@4275
    24
slouken@4275
    25
# AC_PROG_LIBTOOL
slouken@4275
    26
# ---------------
slouken@4275
    27
AC_DEFUN([AC_PROG_LIBTOOL],
slouken@4275
    28
[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
slouken@4275
    29
dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
slouken@4275
    30
dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
slouken@4275
    31
  AC_PROVIDE_IFELSE([AC_PROG_CXX],
slouken@4275
    32
    [AC_LIBTOOL_CXX],
slouken@4275
    33
    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
slouken@4275
    34
  ])])
slouken@4275
    35
dnl And a similar setup for Fortran 77 support
slouken@4275
    36
  AC_PROVIDE_IFELSE([AC_PROG_F77],
slouken@4275
    37
    [AC_LIBTOOL_F77],
slouken@4275
    38
    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
slouken@4275
    39
])])
slouken@4275
    40
slouken@4275
    41
dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
slouken@4275
    42
dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
slouken@4275
    43
dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
slouken@4275
    44
  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
slouken@4275
    45
    [AC_LIBTOOL_GCJ],
slouken@4275
    46
    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
slouken@4275
    47
      [AC_LIBTOOL_GCJ],
slouken@4275
    48
      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
slouken@4275
    49
	[AC_LIBTOOL_GCJ],
slouken@4275
    50
      [ifdef([AC_PROG_GCJ],
slouken@4275
    51
	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
slouken@4275
    52
       ifdef([A][M_PROG_GCJ],
slouken@4275
    53
	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
slouken@4275
    54
       ifdef([LT_AC_PROG_GCJ],
slouken@4275
    55
	     [define([LT_AC_PROG_GCJ],
slouken@4275
    56
		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
slouken@4275
    57
])])# AC_PROG_LIBTOOL
slouken@4275
    58
slouken@4275
    59
slouken@4275
    60
# _AC_PROG_LIBTOOL
slouken@4275
    61
# ----------------
slouken@4275
    62
AC_DEFUN([_AC_PROG_LIBTOOL],
slouken@4275
    63
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
slouken@4275
    64
AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
slouken@4275
    65
AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
slouken@4275
    66
AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
slouken@4275
    67
slouken@4275
    68
# This can be used to rebuild libtool when needed
slouken@4275
    69
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
slouken@4275
    70
slouken@4275
    71
# Always use our own libtool.
slouken@4275
    72
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
slouken@4275
    73
AC_SUBST(LIBTOOL)dnl
slouken@4275
    74
slouken@4275
    75
# Prevent multiple expansion
slouken@4275
    76
define([AC_PROG_LIBTOOL], [])
slouken@4275
    77
])# _AC_PROG_LIBTOOL
slouken@4275
    78
slouken@4275
    79
slouken@4275
    80
# AC_LIBTOOL_SETUP
slouken@4275
    81
# ----------------
slouken@4275
    82
AC_DEFUN([AC_LIBTOOL_SETUP],
slouken@4275
    83
[AC_PREREQ(2.50)dnl
slouken@4275
    84
AC_REQUIRE([AC_ENABLE_SHARED])dnl
slouken@4275
    85
AC_REQUIRE([AC_ENABLE_STATIC])dnl
slouken@4275
    86
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
slouken@4275
    87
AC_REQUIRE([AC_CANONICAL_HOST])dnl
slouken@4275
    88
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
slouken@4275
    89
AC_REQUIRE([AC_PROG_CC])dnl
slouken@4275
    90
AC_REQUIRE([AC_PROG_LD])dnl
slouken@4275
    91
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
slouken@4275
    92
AC_REQUIRE([AC_PROG_NM])dnl
slouken@4275
    93
slouken@4275
    94
AC_REQUIRE([AC_PROG_LN_S])dnl
slouken@4275
    95
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
slouken@4275
    96
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
slouken@4275
    97
AC_REQUIRE([AC_OBJEXT])dnl
slouken@4275
    98
AC_REQUIRE([AC_EXEEXT])dnl
slouken@4275
    99
dnl
slouken@4275
   100
slouken@4275
   101
AC_LIBTOOL_SYS_MAX_CMD_LEN
slouken@4275
   102
AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
slouken@4275
   103
AC_LIBTOOL_OBJDIR
slouken@4275
   104
slouken@4275
   105
AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
slouken@4275
   106
_LT_AC_PROG_ECHO_BACKSLASH
slouken@4275
   107
slouken@4275
   108
case $host_os in
slouken@4275
   109
aix3*)
slouken@4275
   110
  # AIX sometimes has problems with the GCC collect2 program.  For some
slouken@4275
   111
  # reason, if we set the COLLECT_NAMES environment variable, the problems
slouken@4275
   112
  # vanish in a puff of smoke.
slouken@4275
   113
  if test "X${COLLECT_NAMES+set}" != Xset; then
slouken@4275
   114
    COLLECT_NAMES=
slouken@4275
   115
    export COLLECT_NAMES
slouken@4275
   116
  fi
slouken@4275
   117
  ;;
slouken@4275
   118
esac
slouken@4275
   119
slouken@4275
   120
# Sed substitution that helps us do robust quoting.  It backslashifies
slouken@4275
   121
# metacharacters that are still active within double-quoted strings.
slouken@4275
   122
Xsed='sed -e 1s/^X//'
slouken@4275
   123
[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
slouken@4275
   124
slouken@4275
   125
# Same as above, but do not quote variable references.
slouken@4275
   126
[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
slouken@4275
   127
slouken@4275
   128
# Sed substitution to delay expansion of an escaped shell variable in a
slouken@4275
   129
# double_quote_subst'ed string.
slouken@4275
   130
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
slouken@4275
   131
slouken@4275
   132
# Sed substitution to avoid accidental globbing in evaled expressions
slouken@4275
   133
no_glob_subst='s/\*/\\\*/g'
slouken@4275
   134
slouken@4275
   135
# Constants:
slouken@4275
   136
rm="rm -f"
slouken@4275
   137
slouken@4275
   138
# Global variables:
slouken@4275
   139
default_ofile=libtool
slouken@4275
   140
can_build_shared=yes
slouken@4275
   141
slouken@4275
   142
# All known linkers require a `.a' archive for static linking (except MSVC,
slouken@4275
   143
# which needs '.lib').
slouken@4275
   144
libext=a
slouken@4275
   145
ltmain="$ac_aux_dir/ltmain.sh"
slouken@4275
   146
ofile="$default_ofile"
slouken@4275
   147
with_gnu_ld="$lt_cv_prog_gnu_ld"
slouken@4275
   148
slouken@4275
   149
AC_CHECK_TOOL(AR, ar, false)
slouken@4275
   150
AC_CHECK_TOOL(RANLIB, ranlib, :)
slouken@4275
   151
AC_CHECK_TOOL(STRIP, strip, :)
slouken@4275
   152
slouken@4275
   153
old_CC="$CC"
slouken@4275
   154
old_CFLAGS="$CFLAGS"
slouken@4275
   155
slouken@4275
   156
# Set sane defaults for various variables
slouken@4275
   157
test -z "$AR" && AR=ar
slouken@4275
   158
test -z "$AR_FLAGS" && AR_FLAGS=cru
slouken@4275
   159
test -z "$AS" && AS=as
slouken@4275
   160
test -z "$CC" && CC=cc
slouken@4275
   161
test -z "$LTCC" && LTCC=$CC
slouken@4275
   162
test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
slouken@4275
   163
test -z "$DLLTOOL" && DLLTOOL=dlltool
slouken@4275
   164
test -z "$LD" && LD=ld
slouken@4275
   165
test -z "$LN_S" && LN_S="ln -s"
slouken@4275
   166
test -z "$MAGIC_CMD" && MAGIC_CMD=file
slouken@4275
   167
test -z "$NM" && NM=nm
slouken@4275
   168
test -z "$SED" && SED=sed
slouken@4275
   169
test -z "$OBJDUMP" && OBJDUMP=objdump
slouken@4275
   170
test -z "$RANLIB" && RANLIB=:
slouken@4275
   171
test -z "$STRIP" && STRIP=:
slouken@4275
   172
test -z "$ac_objext" && ac_objext=o
slouken@4275
   173
slouken@4275
   174
# Determine commands to create old-style static archives.
slouken@4275
   175
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
slouken@4275
   176
old_postinstall_cmds='chmod 644 $oldlib'
slouken@4275
   177
old_postuninstall_cmds=
slouken@4275
   178
slouken@4275
   179
if test -n "$RANLIB"; then
slouken@4275
   180
  case $host_os in
slouken@4275
   181
  openbsd*)
slouken@4275
   182
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
slouken@4275
   183
    ;;
slouken@4275
   184
  *)
slouken@4275
   185
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
slouken@4275
   186
    ;;
slouken@4275
   187
  esac
slouken@4275
   188
  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
slouken@4275
   189
fi
slouken@4275
   190
slouken@4275
   191
_LT_CC_BASENAME([$compiler])
slouken@4275
   192
slouken@4275
   193
# Only perform the check for file, if the check method requires it
slouken@4275
   194
case $deplibs_check_method in
slouken@4275
   195
file_magic*)
slouken@4275
   196
  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
slouken@4275
   197
    AC_PATH_MAGIC
slouken@4275
   198
  fi
slouken@4275
   199
  ;;
slouken@4275
   200
esac
slouken@4275
   201
slouken@4275
   202
AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
slouken@4275
   203
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
slouken@4275
   204
enable_win32_dll=yes, enable_win32_dll=no)
slouken@4275
   205
slouken@4275
   206
AC_ARG_ENABLE([libtool-lock],
slouken@4275
   207
    [AC_HELP_STRING([--disable-libtool-lock],
slouken@4275
   208
	[avoid locking (might break parallel builds)])])
slouken@4275
   209
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
slouken@4275
   210
slouken@4275
   211
AC_ARG_WITH([pic],
slouken@4275
   212
    [AC_HELP_STRING([--with-pic],
slouken@4275
   213
	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
slouken@4275
   214
    [pic_mode="$withval"],
slouken@4275
   215
    [pic_mode=default])
slouken@4275
   216
test -z "$pic_mode" && pic_mode=default
slouken@4275
   217
slouken@4275
   218
# Use C for the default configuration in the libtool script
slouken@4275
   219
tagname=
slouken@4275
   220
AC_LIBTOOL_LANG_C_CONFIG
slouken@4275
   221
_LT_AC_TAGCONFIG
slouken@4275
   222
])# AC_LIBTOOL_SETUP
slouken@4275
   223
slouken@4275
   224
slouken@4275
   225
# _LT_AC_SYS_COMPILER
slouken@4275
   226
# -------------------
slouken@4275
   227
AC_DEFUN([_LT_AC_SYS_COMPILER],
slouken@4275
   228
[AC_REQUIRE([AC_PROG_CC])dnl
slouken@4275
   229
slouken@4275
   230
# If no C compiler was specified, use CC.
slouken@4275
   231
LTCC=${LTCC-"$CC"}
slouken@4275
   232
slouken@4275
   233
# If no C compiler flags were specified, use CFLAGS.
slouken@4275
   234
LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
slouken@4275
   235
slouken@4275
   236
# Allow CC to be a program name with arguments.
slouken@4275
   237
compiler=$CC
slouken@4275
   238
])# _LT_AC_SYS_COMPILER
slouken@4275
   239
slouken@4275
   240
slouken@4275
   241
# _LT_CC_BASENAME(CC)
slouken@4275
   242
# -------------------
slouken@4275
   243
# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
slouken@4275
   244
AC_DEFUN([_LT_CC_BASENAME],
slouken@4275
   245
[for cc_temp in $1""; do
slouken@4275
   246
  case $cc_temp in
slouken@4275
   247
    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
slouken@4275
   248
    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
slouken@4275
   249
    \-*) ;;
slouken@4275
   250
    *) break;;
slouken@4275
   251
  esac
slouken@4275
   252
done
slouken@4275
   253
cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
slouken@4275
   254
])
slouken@4275
   255
slouken@4275
   256
slouken@4275
   257
# _LT_COMPILER_BOILERPLATE
slouken@4275
   258
# ------------------------
slouken@4275
   259
# Check for compiler boilerplate output or warnings with
slouken@4275
   260
# the simple compiler test code.
slouken@4275
   261
AC_DEFUN([_LT_COMPILER_BOILERPLATE],
slouken@4275
   262
[ac_outfile=conftest.$ac_objext
slouken@4275
   263
printf "$lt_simple_compile_test_code" >conftest.$ac_ext
slouken@4275
   264
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
slouken@4275
   265
_lt_compiler_boilerplate=`cat conftest.err`
slouken@4275
   266
$rm conftest*
slouken@4275
   267
])# _LT_COMPILER_BOILERPLATE
slouken@4275
   268
slouken@4275
   269
slouken@4275
   270
# _LT_LINKER_BOILERPLATE
slouken@4275
   271
# ----------------------
slouken@4275
   272
# Check for linker boilerplate output or warnings with
slouken@4275
   273
# the simple link test code.
slouken@4275
   274
AC_DEFUN([_LT_LINKER_BOILERPLATE],
slouken@4275
   275
[ac_outfile=conftest.$ac_objext
slouken@4275
   276
printf "$lt_simple_link_test_code" >conftest.$ac_ext
slouken@4275
   277
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
slouken@4275
   278
_lt_linker_boilerplate=`cat conftest.err`
slouken@4275
   279
$rm conftest*
slouken@4275
   280
])# _LT_LINKER_BOILERPLATE
slouken@4275
   281
slouken@4275
   282
slouken@4275
   283
# _LT_AC_SYS_LIBPATH_AIX
slouken@4275
   284
# ----------------------
slouken@4275
   285
# Links a minimal program and checks the executable
slouken@4275
   286
# for the system default hardcoded library path. In most cases,
slouken@4275
   287
# this is /usr/lib:/lib, but when the MPI compilers are used
slouken@4275
   288
# the location of the communication and MPI libs are included too.
slouken@4275
   289
# If we don't find anything, use the default library path according
slouken@4275
   290
# to the aix ld manual.
slouken@4275
   291
AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
slouken@4275
   292
[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
slouken@4275
   293
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
slouken@4275
   294
}'`
slouken@4275
   295
# Check for a 64-bit object if we didn't find anything.
slouken@4275
   296
if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
slouken@4275
   297
}'`; fi],[])
slouken@4275
   298
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
slouken@4275
   299
])# _LT_AC_SYS_LIBPATH_AIX
slouken@4275
   300
slouken@4275
   301
slouken@4275
   302
# _LT_AC_SHELL_INIT(ARG)
slouken@4275
   303
# ----------------------
slouken@4275
   304
AC_DEFUN([_LT_AC_SHELL_INIT],
slouken@4275
   305
[ifdef([AC_DIVERSION_NOTICE],
slouken@4275
   306
	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
slouken@4275
   307
	 [AC_DIVERT_PUSH(NOTICE)])
slouken@4275
   308
$1
slouken@4275
   309
AC_DIVERT_POP
slouken@4275
   310
])# _LT_AC_SHELL_INIT
slouken@4275
   311
slouken@4275
   312
slouken@4275
   313
# _LT_AC_PROG_ECHO_BACKSLASH
slouken@4275
   314
# --------------------------
slouken@4275
   315
# Add some code to the start of the generated configure script which
slouken@4275
   316
# will find an echo command which doesn't interpret backslashes.
slouken@4275
   317
AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
slouken@4275
   318
[_LT_AC_SHELL_INIT([
slouken@4275
   319
# Check that we are running under the correct shell.
slouken@4275
   320
SHELL=${CONFIG_SHELL-/bin/sh}
slouken@4275
   321
slouken@4275
   322
case X$ECHO in
slouken@4275
   323
X*--fallback-echo)
slouken@4275
   324
  # Remove one level of quotation (which was required for Make).
slouken@4275
   325
  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
slouken@4275
   326
  ;;
slouken@4275
   327
esac
slouken@4275
   328
slouken@4275
   329
echo=${ECHO-echo}
slouken@4275
   330
if test "X[$]1" = X--no-reexec; then
slouken@4275
   331
  # Discard the --no-reexec flag, and continue.
slouken@4275
   332
  shift
slouken@4275
   333
elif test "X[$]1" = X--fallback-echo; then
slouken@4275
   334
  # Avoid inline document here, it may be left over
slouken@4275
   335
  :
slouken@4275
   336
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
slouken@4275
   337
  # Yippee, $echo works!
slouken@4275
   338
  :
slouken@4275
   339
else
slouken@4275
   340
  # Restart under the correct shell.
slouken@4275
   341
  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
slouken@4275
   342
fi
slouken@4275
   343
slouken@4275
   344
if test "X[$]1" = X--fallback-echo; then
slouken@4275
   345
  # used as fallback echo
slouken@4275
   346
  shift
slouken@4275
   347
  cat <<EOF
slouken@4275
   348
[$]*
slouken@4275
   349
EOF
slouken@4275
   350
  exit 0
slouken@4275
   351
fi
slouken@4275
   352
slouken@4275
   353
# The HP-UX ksh and POSIX shell print the target directory to stdout
slouken@4275
   354
# if CDPATH is set.
slouken@4275
   355
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
slouken@4275
   356
slouken@4275
   357
if test -z "$ECHO"; then
slouken@4275
   358
if test "X${echo_test_string+set}" != Xset; then
slouken@4275
   359
# find a string as large as possible, as long as the shell can cope with it
slouken@4275
   360
  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
slouken@4275
   361
    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
slouken@4275
   362
    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
slouken@4275
   363
       echo_test_string=`eval $cmd` &&
slouken@4275
   364
       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
slouken@4275
   365
    then
slouken@4275
   366
      break
slouken@4275
   367
    fi
slouken@4275
   368
  done
slouken@4275
   369
fi
slouken@4275
   370
slouken@4275
   371
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
slouken@4275
   372
   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
slouken@4275
   373
   test "X$echo_testing_string" = "X$echo_test_string"; then
slouken@4275
   374
  :
slouken@4275
   375
else
slouken@4275
   376
  # The Solaris, AIX, and Digital Unix default echo programs unquote
slouken@4275
   377
  # backslashes.  This makes it impossible to quote backslashes using
slouken@4275
   378
  #   echo "$something" | sed 's/\\/\\\\/g'
slouken@4275
   379
  #
slouken@4275
   380
  # So, first we look for a working echo in the user's PATH.
slouken@4275
   381
slouken@4275
   382
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
slouken@4275
   383
  for dir in $PATH /usr/ucb; do
slouken@4275
   384
    IFS="$lt_save_ifs"
slouken@4275
   385
    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
slouken@4275
   386
       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
slouken@4275
   387
       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
slouken@4275
   388
       test "X$echo_testing_string" = "X$echo_test_string"; then
slouken@4275
   389
      echo="$dir/echo"
slouken@4275
   390
      break
slouken@4275
   391
    fi
slouken@4275
   392
  done
slouken@4275
   393
  IFS="$lt_save_ifs"
slouken@4275
   394
slouken@4275
   395
  if test "X$echo" = Xecho; then
slouken@4275
   396
    # We didn't find a better echo, so look for alternatives.
slouken@4275
   397
    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
slouken@4275
   398
       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
slouken@4275
   399
       test "X$echo_testing_string" = "X$echo_test_string"; then
slouken@4275
   400
      # This shell has a builtin print -r that does the trick.
slouken@4275
   401
      echo='print -r'
slouken@4275
   402
    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
slouken@4275
   403
	 test "X$CONFIG_SHELL" != X/bin/ksh; then
slouken@4275
   404
      # If we have ksh, try running configure again with it.
slouken@4275
   405
      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
slouken@4275
   406
      export ORIGINAL_CONFIG_SHELL
slouken@4275
   407
      CONFIG_SHELL=/bin/ksh
slouken@4275
   408
      export CONFIG_SHELL
slouken@4275
   409
      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
slouken@4275
   410
    else
slouken@4275
   411
      # Try using printf.
slouken@4275
   412
      echo='printf %s\n'
slouken@4275
   413
      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
slouken@4275
   414
	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
slouken@4275
   415
	 test "X$echo_testing_string" = "X$echo_test_string"; then
slouken@4275
   416
	# Cool, printf works
slouken@4275
   417
	:
slouken@4275
   418
      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
slouken@4275
   419
	   test "X$echo_testing_string" = 'X\t' &&
slouken@4275
   420
	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
slouken@4275
   421
	   test "X$echo_testing_string" = "X$echo_test_string"; then
slouken@4275
   422
	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
slouken@4275
   423
	export CONFIG_SHELL
slouken@4275
   424
	SHELL="$CONFIG_SHELL"
slouken@4275
   425
	export SHELL
slouken@4275
   426
	echo="$CONFIG_SHELL [$]0 --fallback-echo"
slouken@4275
   427
      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
slouken@4275
   428
	   test "X$echo_testing_string" = 'X\t' &&
slouken@4275
   429
	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
slouken@4275
   430
	   test "X$echo_testing_string" = "X$echo_test_string"; then
slouken@4275
   431
	echo="$CONFIG_SHELL [$]0 --fallback-echo"
slouken@4275
   432
      else
slouken@4275
   433
	# maybe with a smaller string...
slouken@4275
   434
	prev=:
slouken@4275
   435
slouken@4275
   436
	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
slouken@4275
   437
	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
slouken@4275
   438
	  then
slouken@4275
   439
	    break
slouken@4275
   440
	  fi
slouken@4275
   441
	  prev="$cmd"
slouken@4275
   442
	done
slouken@4275
   443
slouken@4275
   444
	if test "$prev" != 'sed 50q "[$]0"'; then
slouken@4275
   445
	  echo_test_string=`eval $prev`
slouken@4275
   446
	  export echo_test_string
slouken@4275
   447
	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
slouken@4275
   448
	else
slouken@4275
   449
	  # Oops.  We lost completely, so just stick with echo.
slouken@4275
   450
	  echo=echo
slouken@4275
   451
	fi
slouken@4275
   452
      fi
slouken@4275
   453
    fi
slouken@4275
   454
  fi
slouken@4275
   455
fi
slouken@4275
   456
fi
slouken@4275
   457
slouken@4275
   458
# Copy echo and quote the copy suitably for passing to libtool from
slouken@4275
   459
# the Makefile, instead of quoting the original, which is used later.
slouken@4275
   460
ECHO=$echo
slouken@4275
   461
if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
slouken@4275
   462
   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
slouken@4275
   463
fi
slouken@4275
   464
slouken@4275
   465
AC_SUBST(ECHO)
slouken@4275
   466
])])# _LT_AC_PROG_ECHO_BACKSLASH
slouken@4275
   467
slouken@4275
   468
slouken@4275
   469
# _LT_AC_LOCK
slouken@4275
   470
# -----------
slouken@4275
   471
AC_DEFUN([_LT_AC_LOCK],
slouken@4275
   472
[AC_ARG_ENABLE([libtool-lock],
slouken@4275
   473
    [AC_HELP_STRING([--disable-libtool-lock],
slouken@4275
   474
	[avoid locking (might break parallel builds)])])
slouken@4275
   475
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
slouken@4275
   476
slouken@4275
   477
# Some flags need to be propagated to the compiler or linker for good
slouken@4275
   478
# libtool support.
slouken@4275
   479
case $host in
slouken@4275
   480
ia64-*-hpux*)
slouken@4275
   481
  # Find out which ABI we are using.
slouken@4275
   482
  echo 'int i;' > conftest.$ac_ext
slouken@4275
   483
  if AC_TRY_EVAL(ac_compile); then
slouken@4275
   484
    case `/usr/bin/file conftest.$ac_objext` in
slouken@4275
   485
    *ELF-32*)
slouken@4275
   486
      HPUX_IA64_MODE="32"
slouken@4275
   487
      ;;
slouken@4275
   488
    *ELF-64*)
slouken@4275
   489
      HPUX_IA64_MODE="64"
slouken@4275
   490
      ;;
slouken@4275
   491
    esac
slouken@4275
   492
  fi
slouken@4275
   493
  rm -rf conftest*
slouken@4275
   494
  ;;
slouken@4275
   495
*-*-irix6*)
slouken@4275
   496
  # Find out which ABI we are using.
slouken@4275
   497
  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
slouken@4275
   498
  if AC_TRY_EVAL(ac_compile); then
slouken@4275
   499
   if test "$lt_cv_prog_gnu_ld" = yes; then
slouken@4275
   500
    case `/usr/bin/file conftest.$ac_objext` in
slouken@4275
   501
    *32-bit*)
slouken@4275
   502
      LD="${LD-ld} -melf32bsmip"
slouken@4275
   503
      ;;
slouken@4275
   504
    *N32*)
slouken@4275
   505
      LD="${LD-ld} -melf32bmipn32"
slouken@4275
   506
      ;;
slouken@4275
   507
    *64-bit*)
slouken@4275
   508
      LD="${LD-ld} -melf64bmip"
slouken@4275
   509
      ;;
slouken@4275
   510
    esac
slouken@4275
   511
   else
slouken@4275
   512
    case `/usr/bin/file conftest.$ac_objext` in
slouken@4275
   513
    *32-bit*)
slouken@4275
   514
      LD="${LD-ld} -32"
slouken@4275
   515
      ;;
slouken@4275
   516
    *N32*)
slouken@4275
   517
      LD="${LD-ld} -n32"
slouken@4275
   518
      ;;
slouken@4275
   519
    *64-bit*)
slouken@4275
   520
      LD="${LD-ld} -64"
slouken@4275
   521
      ;;
slouken@4275
   522
    esac
slouken@4275
   523
   fi
slouken@4275
   524
  fi
slouken@4275
   525
  rm -rf conftest*
slouken@4275
   526
  ;;
slouken@4275
   527
slouken@4275
   528
x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
slouken@4275
   529
  # Find out which ABI we are using.
slouken@4275
   530
  echo 'int i;' > conftest.$ac_ext
slouken@4275
   531
  if AC_TRY_EVAL(ac_compile); then
slouken@4275
   532
    case `/usr/bin/file conftest.o` in
slouken@4275
   533
    *32-bit*)
slouken@4275
   534
      case $host in
slouken@4275
   535
        x86_64-*linux*)
slouken@4275
   536
          LD="${LD-ld} -m elf_i386"
slouken@4275
   537
          ;;
slouken@4275
   538
        ppc64-*linux*|powerpc64-*linux*)
slouken@4275
   539
          LD="${LD-ld} -m elf32ppclinux"
slouken@4275
   540
          ;;
slouken@4275
   541
        s390x-*linux*)
slouken@4275
   542
          LD="${LD-ld} -m elf_s390"
slouken@4275
   543
          ;;
slouken@4275
   544
        sparc64-*linux*)
slouken@4275
   545
          LD="${LD-ld} -m elf32_sparc"
slouken@4275
   546
          ;;
slouken@4275
   547
      esac
slouken@4275
   548
      ;;
slouken@4275
   549
    *64-bit*)
slouken@4275
   550
      case $host in
slouken@4275
   551
        x86_64-*linux*)
slouken@4275
   552
          LD="${LD-ld} -m elf_x86_64"
slouken@4275
   553
          ;;
slouken@4275
   554
        ppc*-*linux*|powerpc*-*linux*)
slouken@4275
   555
          LD="${LD-ld} -m elf64ppc"
slouken@4275
   556
          ;;
slouken@4275
   557
        s390*-*linux*)
slouken@4275
   558
          LD="${LD-ld} -m elf64_s390"
slouken@4275
   559
          ;;
slouken@4275
   560
        sparc*-*linux*)
slouken@4275
   561
          LD="${LD-ld} -m elf64_sparc"
slouken@4275
   562
          ;;
slouken@4275
   563
      esac
slouken@4275
   564
      ;;
slouken@4275
   565
    esac
slouken@4275
   566
  fi
slouken@4275
   567
  rm -rf conftest*
slouken@4275
   568
  ;;
slouken@4275
   569
slouken@4275
   570
*-*-sco3.2v5*)
slouken@4275
   571
  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
slouken@4275
   572
  SAVE_CFLAGS="$CFLAGS"
slouken@4275
   573
  CFLAGS="$CFLAGS -belf"
slouken@4275
   574
  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
slouken@4275
   575
    [AC_LANG_PUSH(C)
slouken@4275
   576
     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
slouken@4275
   577
     AC_LANG_POP])
slouken@4275
   578
  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
slouken@4275
   579
    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
slouken@4275
   580
    CFLAGS="$SAVE_CFLAGS"
slouken@4275
   581
  fi
slouken@4275
   582
  ;;
slouken@4275
   583
sparc*-*solaris*)
slouken@4275
   584
  # Find out which ABI we are using.
slouken@4275
   585
  echo 'int i;' > conftest.$ac_ext
slouken@4275
   586
  if AC_TRY_EVAL(ac_compile); then
slouken@4275
   587
    case `/usr/bin/file conftest.o` in
slouken@4275
   588
    *64-bit*)
slouken@4275
   589
      case $lt_cv_prog_gnu_ld in
slouken@4275
   590
      yes*) LD="${LD-ld} -m elf64_sparc" ;;
slouken@4275
   591
      *)    LD="${LD-ld} -64" ;;
slouken@4275
   592
      esac
slouken@4275
   593
      ;;
slouken@4275
   594
    esac
slouken@4275
   595
  fi
slouken@4275
   596
  rm -rf conftest*
slouken@4275
   597
  ;;
slouken@4275
   598
slouken@4275
   599
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
slouken@4275
   600
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
slouken@4275
   601
  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
slouken@4275
   602
  AC_CHECK_TOOL(AS, as, false)
slouken@4275
   603
  AC_CHECK_TOOL(OBJDUMP, objdump, false)
slouken@4275
   604
  ;;
slouken@4275
   605
  ])
slouken@4275
   606
esac
slouken@4275
   607
slouken@4275
   608
need_locks="$enable_libtool_lock"
slouken@4275
   609
slouken@4275
   610
])# _LT_AC_LOCK
slouken@4275
   611
slouken@4275
   612
slouken@4275
   613
# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
slouken@4275
   614
#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
slouken@4275
   615
# ----------------------------------------------------------------
slouken@4275
   616
# Check whether the given compiler option works
slouken@4275
   617
AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
slouken@4275
   618
[AC_REQUIRE([LT_AC_PROG_SED])
slouken@4275
   619
AC_CACHE_CHECK([$1], [$2],
slouken@4275
   620
  [$2=no
slouken@4275
   621
  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
slouken@4275
   622
   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
slouken@4275
   623
   lt_compiler_flag="$3"
slouken@4275
   624
   # Insert the option either (1) after the last *FLAGS variable, or
slouken@4275
   625
   # (2) before a word containing "conftest.", or (3) at the end.
slouken@4275
   626
   # Note that $ac_compile itself does not contain backslashes and begins
slouken@4275
   627
   # with a dollar sign (not a hyphen), so the echo should work correctly.
slouken@4275
   628
   # The option is referenced via a variable to avoid confusing sed.
slouken@4275
   629
   lt_compile=`echo "$ac_compile" | $SED \
slouken@4275
   630
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
slouken@4275
   631
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
slouken@4275
   632
   -e 's:$: $lt_compiler_flag:'`
slouken@4275
   633
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
slouken@4275
   634
   (eval "$lt_compile" 2>conftest.err)
slouken@4275
   635
   ac_status=$?
slouken@4275
   636
   cat conftest.err >&AS_MESSAGE_LOG_FD
slouken@4275
   637
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
slouken@4275
   638
   if (exit $ac_status) && test -s "$ac_outfile"; then
slouken@4275
   639
     # The compiler can only warn and ignore the option if not recognized
slouken@4275
   640
     # So say no if there are warnings other than the usual output.
slouken@4275
   641
     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
slouken@4275
   642
     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
slouken@4275
   643
     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
slouken@4275
   644
       $2=yes
slouken@4275
   645
     fi
slouken@4275
   646
   fi
slouken@4275
   647
   $rm conftest*
slouken@4275
   648
])
slouken@4275
   649
slouken@4275
   650
if test x"[$]$2" = xyes; then
slouken@4275
   651
    ifelse([$5], , :, [$5])
slouken@4275
   652
else
slouken@4275
   653
    ifelse([$6], , :, [$6])
slouken@4275
   654
fi
slouken@4275
   655
])# AC_LIBTOOL_COMPILER_OPTION
slouken@4275
   656
slouken@4275
   657
slouken@4275
   658
# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
slouken@4275
   659
#                          [ACTION-SUCCESS], [ACTION-FAILURE])
slouken@4275
   660
# ------------------------------------------------------------
slouken@4275
   661
# Check whether the given compiler option works
slouken@4275
   662
AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
slouken@4275
   663
[AC_CACHE_CHECK([$1], [$2],
slouken@4275
   664
  [$2=no
slouken@4275
   665
   save_LDFLAGS="$LDFLAGS"
slouken@4275
   666
   LDFLAGS="$LDFLAGS $3"
slouken@4275
   667
   printf "$lt_simple_link_test_code" > conftest.$ac_ext
slouken@4275
   668
   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
slouken@4275
   669
     # The linker can only warn and ignore the option if not recognized
slouken@4275
   670
     # So say no if there are warnings
slouken@4275
   671
     if test -s conftest.err; then
slouken@4275
   672
       # Append any errors to the config.log.
slouken@4275
   673
       cat conftest.err 1>&AS_MESSAGE_LOG_FD
slouken@4275
   674
       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
slouken@4275
   675
       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
slouken@4275
   676
       if diff conftest.exp conftest.er2 >/dev/null; then
slouken@4275
   677
         $2=yes
slouken@4275
   678
       fi
slouken@4275
   679
     else
slouken@4275
   680
       $2=yes
slouken@4275
   681
     fi
slouken@4275
   682
   fi
slouken@4275
   683
   $rm conftest*
slouken@4275
   684
   LDFLAGS="$save_LDFLAGS"
slouken@4275
   685
])
slouken@4275
   686
slouken@4275
   687
if test x"[$]$2" = xyes; then
slouken@4275
   688
    ifelse([$4], , :, [$4])
slouken@4275
   689
else
slouken@4275
   690
    ifelse([$5], , :, [$5])
slouken@4275
   691
fi
slouken@4275
   692
])# AC_LIBTOOL_LINKER_OPTION
slouken@4275
   693
slouken@4275
   694
slouken@4275
   695
# AC_LIBTOOL_SYS_MAX_CMD_LEN
slouken@4275
   696
# --------------------------
slouken@4275
   697
AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
slouken@4275
   698
[# find the maximum length of command line arguments
slouken@4275
   699
AC_MSG_CHECKING([the maximum length of command line arguments])
slouken@4275
   700
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
slouken@4275
   701
  i=0
slouken@4275
   702
  teststring="ABCD"
slouken@4275
   703
slouken@4275
   704
  case $build_os in
slouken@4275
   705
  msdosdjgpp*)
slouken@4275
   706
    # On DJGPP, this test can blow up pretty badly due to problems in libc
slouken@4275
   707
    # (any single argument exceeding 2000 bytes causes a buffer overrun
slouken@4275
   708
    # during glob expansion).  Even if it were fixed, the result of this
slouken@4275
   709
    # check would be larger than it should be.
slouken@4275
   710
    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
slouken@4275
   711
    ;;
slouken@4275
   712
slouken@4275
   713
  gnu*)
slouken@4275
   714
    # Under GNU Hurd, this test is not required because there is
slouken@4275
   715
    # no limit to the length of command line arguments.
slouken@4275
   716
    # Libtool will interpret -1 as no limit whatsoever
slouken@4275
   717
    lt_cv_sys_max_cmd_len=-1;
slouken@4275
   718
    ;;
slouken@4275
   719
slouken@4275
   720
  cygwin* | mingw*)
slouken@4275
   721
    # On Win9x/ME, this test blows up -- it succeeds, but takes
slouken@4275
   722
    # about 5 minutes as the teststring grows exponentially.
slouken@4275
   723
    # Worse, since 9x/ME are not pre-emptively multitasking,
slouken@4275
   724
    # you end up with a "frozen" computer, even though with patience
slouken@4275
   725
    # the test eventually succeeds (with a max line length of 256k).
slouken@4275
   726
    # Instead, let's just punt: use the minimum linelength reported by
slouken@4275
   727
    # all of the supported platforms: 8192 (on NT/2K/XP).
slouken@4275
   728
    lt_cv_sys_max_cmd_len=8192;
slouken@4275
   729
    ;;
slouken@4275
   730
slouken@4275
   731
  beos*)
slouken@4275
   732
    # On BeOS, this test takes a really really long time.
slouken@4275
   733
    # So we just punt and use a minimum line length of 8192.
slouken@4275
   734
    lt_cv_sys_max_cmd_len=8192;
slouken@4275
   735
    ;;
slouken@4275
   736
slouken@4275
   737
  amigaos*)
slouken@4275
   738
    # On AmigaOS with pdksh, this test takes hours, literally.
slouken@4275
   739
    # So we just punt and use a minimum line length of 8192.
slouken@4275
   740
    lt_cv_sys_max_cmd_len=8192;
slouken@4275
   741
    ;;
slouken@4275
   742
slouken@4275
   743
  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
slouken@4275
   744
    # This has been around since 386BSD, at least.  Likely further.
slouken@4275
   745
    if test -x /sbin/sysctl; then
slouken@4275
   746
      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
slouken@4275
   747
    elif test -x /usr/sbin/sysctl; then
slouken@4275
   748
      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
slouken@4275
   749
    else
slouken@4275
   750
      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
slouken@4275
   751
    fi
slouken@4275
   752
    # And add a safety zone
slouken@4275
   753
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
slouken@4275
   754
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
slouken@4275
   755
    ;;
slouken@4275
   756
slouken@4275
   757
  interix*)
slouken@4275
   758
    # We know the value 262144 and hardcode it with a safety zone (like BSD)
slouken@4275
   759
    lt_cv_sys_max_cmd_len=196608
slouken@4275
   760
    ;;
slouken@4275
   761
slouken@4275
   762
  osf*)
slouken@4275
   763
    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
slouken@4275
   764
    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
slouken@4275
   765
    # nice to cause kernel panics so lets avoid the loop below.
slouken@4275
   766
    # First set a reasonable default.
slouken@4275
   767
    lt_cv_sys_max_cmd_len=16384
slouken@4275
   768
    #
slouken@4275
   769
    if test -x /sbin/sysconfig; then
slouken@4275
   770
      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
slouken@4275
   771
        *1*) lt_cv_sys_max_cmd_len=-1 ;;
slouken@4275
   772
      esac
slouken@4275
   773
    fi
slouken@4275
   774
    ;;
slouken@4275
   775
  sco3.2v5*)
slouken@4275
   776
    lt_cv_sys_max_cmd_len=102400
slouken@4275
   777
    ;;
slouken@4275
   778
  sysv5* | sco5v6* | sysv4.2uw2*)
slouken@4275
   779
    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
slouken@4275
   780
    if test -n "$kargmax"; then
slouken@4275
   781
      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ 	]]//'`
slouken@4275
   782
    else
slouken@4275
   783
      lt_cv_sys_max_cmd_len=32768
slouken@4275
   784
    fi
slouken@4275
   785
    ;;
slouken@4275
   786
  *)
slouken@4275
   787
    # If test is not a shell built-in, we'll probably end up computing a
slouken@4275
   788
    # maximum length that is only half of the actual maximum length, but
slouken@4275
   789
    # we can't tell.
slouken@4275
   790
    SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
slouken@4275
   791
    while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
slouken@4275
   792
	       = "XX$teststring") >/dev/null 2>&1 &&
slouken@4275
   793
	    new_result=`expr "X$teststring" : ".*" 2>&1` &&
slouken@4275
   794
	    lt_cv_sys_max_cmd_len=$new_result &&
slouken@4275
   795
	    test $i != 17 # 1/2 MB should be enough
slouken@4275
   796
    do
slouken@4275
   797
      i=`expr $i + 1`
slouken@4275
   798
      teststring=$teststring$teststring
slouken@4275
   799
    done
slouken@4275
   800
    teststring=
slouken@4275
   801
    # Add a significant safety factor because C++ compilers can tack on massive
slouken@4275
   802
    # amounts of additional arguments before passing them to the linker.
slouken@4275
   803
    # It appears as though 1/2 is a usable value.
slouken@4275
   804
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
slouken@4275
   805
    ;;
slouken@4275
   806
  esac
slouken@4275
   807
])
slouken@4275
   808
if test -n $lt_cv_sys_max_cmd_len ; then
slouken@4275
   809
  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
slouken@4275
   810
else
slouken@4275
   811
  AC_MSG_RESULT(none)
slouken@4275
   812
fi
slouken@4275
   813
])# AC_LIBTOOL_SYS_MAX_CMD_LEN
slouken@4275
   814
slouken@4275
   815
slouken@4275
   816
# _LT_AC_CHECK_DLFCN
slouken@4275
   817
# ------------------
slouken@4275
   818
AC_DEFUN([_LT_AC_CHECK_DLFCN],
slouken@4275
   819
[AC_CHECK_HEADERS(dlfcn.h)dnl
slouken@4275
   820
])# _LT_AC_CHECK_DLFCN
slouken@4275
   821
slouken@4275
   822
slouken@4275
   823
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
slouken@4275
   824
#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
slouken@4275
   825
# ---------------------------------------------------------------------
slouken@4275
   826
AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
slouken@4275
   827
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
slouken@4275
   828
if test "$cross_compiling" = yes; then :
slouken@4275
   829
  [$4]
slouken@4275
   830
else
slouken@4275
   831
  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
slouken@4275
   832
  lt_status=$lt_dlunknown
slouken@4275
   833
  cat > conftest.$ac_ext <<EOF
slouken@4275
   834
[#line __oline__ "configure"
slouken@4275
   835
#include "confdefs.h"
slouken@4275
   836
slouken@4275
   837
#if HAVE_DLFCN_H
slouken@4275
   838
#include <dlfcn.h>
slouken@4275
   839
#endif
slouken@4275
   840
slouken@4275
   841
#include <stdio.h>
slouken@4275
   842
slouken@4275
   843
#ifdef RTLD_GLOBAL
slouken@4275
   844
#  define LT_DLGLOBAL		RTLD_GLOBAL
slouken@4275
   845
#else
slouken@4275
   846
#  ifdef DL_GLOBAL
slouken@4275
   847
#    define LT_DLGLOBAL		DL_GLOBAL
slouken@4275
   848
#  else
slouken@4275
   849
#    define LT_DLGLOBAL		0
slouken@4275
   850
#  endif
slouken@4275
   851
#endif
slouken@4275
   852
slouken@4275
   853
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
slouken@4275
   854
   find out it does not work in some platform. */
slouken@4275
   855
#ifndef LT_DLLAZY_OR_NOW
slouken@4275
   856
#  ifdef RTLD_LAZY
slouken@4275
   857
#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
slouken@4275
   858
#  else
slouken@4275
   859
#    ifdef DL_LAZY
slouken@4275
   860
#      define LT_DLLAZY_OR_NOW		DL_LAZY
slouken@4275
   861
#    else
slouken@4275
   862
#      ifdef RTLD_NOW
slouken@4275
   863
#        define LT_DLLAZY_OR_NOW	RTLD_NOW
slouken@4275
   864
#      else
slouken@4275
   865
#        ifdef DL_NOW
slouken@4275
   866
#          define LT_DLLAZY_OR_NOW	DL_NOW
slouken@4275
   867
#        else
slouken@4275
   868
#          define LT_DLLAZY_OR_NOW	0
slouken@4275
   869
#        endif
slouken@4275
   870
#      endif
slouken@4275
   871
#    endif
slouken@4275
   872
#  endif
slouken@4275
   873
#endif
slouken@4275
   874
slouken@4275
   875
#ifdef __cplusplus
slouken@4275
   876
extern "C" void exit (int);
slouken@4275
   877
#endif
slouken@4275
   878
slouken@4275
   879
void fnord() { int i=42;}
slouken@4275
   880
int main ()
slouken@4275
   881
{
slouken@4275
   882
  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
slouken@4275
   883
  int status = $lt_dlunknown;
slouken@4275
   884
slouken@4275
   885
  if (self)
slouken@4275
   886
    {
slouken@4275
   887
      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
slouken@4275
   888
      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
slouken@4275
   889
      /* dlclose (self); */
slouken@4275
   890
    }
slouken@4275
   891
  else
slouken@4275
   892
    puts (dlerror ());
slouken@4275
   893
slouken@4275
   894
    exit (status);
slouken@4275
   895
}]
slouken@4275
   896
EOF
slouken@4275
   897
  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
slouken@4275
   898
    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
slouken@4275
   899
    lt_status=$?
slouken@4275
   900
    case x$lt_status in
slouken@4275
   901
      x$lt_dlno_uscore) $1 ;;
slouken@4275
   902
      x$lt_dlneed_uscore) $2 ;;
slouken@4275
   903
      x$lt_dlunknown|x*) $3 ;;
slouken@4275
   904
    esac
slouken@4275
   905
  else :
slouken@4275
   906
    # compilation failed
slouken@4275
   907
    $3
slouken@4275
   908
  fi
slouken@4275
   909
fi
slouken@4275
   910
rm -fr conftest*
slouken@4275
   911
])# _LT_AC_TRY_DLOPEN_SELF
slouken@4275
   912
slouken@4275
   913
slouken@4275
   914
# AC_LIBTOOL_DLOPEN_SELF
slouken@4275
   915
# ----------------------
slouken@4275
   916
AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
slouken@4275
   917
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
slouken@4275
   918
if test "x$enable_dlopen" != xyes; then
slouken@4275
   919
  enable_dlopen=unknown
slouken@4275
   920
  enable_dlopen_self=unknown
slouken@4275
   921
  enable_dlopen_self_static=unknown
slouken@4275
   922
else
slouken@4275
   923
  lt_cv_dlopen=no
slouken@4275
   924
  lt_cv_dlopen_libs=
slouken@4275
   925
slouken@4275
   926
  case $host_os in
slouken@4275
   927
  beos*)
slouken@4275
   928
    lt_cv_dlopen="load_add_on"
slouken@4275
   929
    lt_cv_dlopen_libs=
slouken@4275
   930
    lt_cv_dlopen_self=yes
slouken@4275
   931
    ;;
slouken@4275
   932
slouken@4275
   933
  mingw* | pw32*)
slouken@4275
   934
    lt_cv_dlopen="LoadLibrary"
slouken@4275
   935
    lt_cv_dlopen_libs=
slouken@4275
   936
   ;;
slouken@4275
   937
slouken@4275
   938
  cygwin*)
slouken@4275
   939
    lt_cv_dlopen="dlopen"
slouken@4275
   940
    lt_cv_dlopen_libs=
slouken@4275
   941
   ;;
slouken@4275
   942
slouken@4275
   943
  darwin*)
slouken@4275
   944
  # if libdl is installed we need to link against it
slouken@4275
   945
    AC_CHECK_LIB([dl], [dlopen],
slouken@4275
   946
		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
slouken@4275
   947
    lt_cv_dlopen="dyld"
slouken@4275
   948
    lt_cv_dlopen_libs=
slouken@4275
   949
    lt_cv_dlopen_self=yes
slouken@4275
   950
    ])
slouken@4275
   951
   ;;
slouken@4275
   952
slouken@4275
   953
  *)
slouken@4275
   954
    AC_CHECK_FUNC([shl_load],
slouken@4275
   955
	  [lt_cv_dlopen="shl_load"],
slouken@4275
   956
      [AC_CHECK_LIB([dld], [shl_load],
slouken@4275
   957
	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
slouken@4275
   958
	[AC_CHECK_FUNC([dlopen],
slouken@4275
   959
	      [lt_cv_dlopen="dlopen"],
slouken@4275
   960
	  [AC_CHECK_LIB([dl], [dlopen],
slouken@4275
   961
		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
slouken@4275
   962
	    [AC_CHECK_LIB([svld], [dlopen],
slouken@4275
   963
		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
slouken@4275
   964
	      [AC_CHECK_LIB([dld], [dld_link],
slouken@4275
   965
		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
slouken@4275
   966
	      ])
slouken@4275
   967
	    ])
slouken@4275
   968
	  ])
slouken@4275
   969
	])
slouken@4275
   970
      ])
slouken@4275
   971
    ;;
slouken@4275
   972
  esac
slouken@4275
   973
slouken@4275
   974
  if test "x$lt_cv_dlopen" != xno; then
slouken@4275
   975
    enable_dlopen=yes
slouken@4275
   976
  else
slouken@4275
   977
    enable_dlopen=no
slouken@4275
   978
  fi
slouken@4275
   979
slouken@4275
   980
  case $lt_cv_dlopen in
slouken@4275
   981
  dlopen)
slouken@4275
   982
    save_CPPFLAGS="$CPPFLAGS"
slouken@4275
   983
    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
slouken@4275
   984
slouken@4275
   985
    save_LDFLAGS="$LDFLAGS"
slouken@4275
   986
    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
slouken@4275
   987
slouken@4275
   988
    save_LIBS="$LIBS"
slouken@4275
   989
    LIBS="$lt_cv_dlopen_libs $LIBS"
slouken@4275
   990
slouken@4275
   991
    AC_CACHE_CHECK([whether a program can dlopen itself],
slouken@4275
   992
	  lt_cv_dlopen_self, [dnl
slouken@4275
   993
	  _LT_AC_TRY_DLOPEN_SELF(
slouken@4275
   994
	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
slouken@4275
   995
	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
slouken@4275
   996
    ])
slouken@4275
   997
slouken@4275
   998
    if test "x$lt_cv_dlopen_self" = xyes; then
slouken@4275
   999
      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
slouken@4275
  1000
      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
slouken@4275
  1001
    	  lt_cv_dlopen_self_static, [dnl
slouken@4275
  1002
	  _LT_AC_TRY_DLOPEN_SELF(
slouken@4275
  1003
	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
slouken@4275
  1004
	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
slouken@4275
  1005
      ])
slouken@4275
  1006
    fi
slouken@4275
  1007
slouken@4275
  1008
    CPPFLAGS="$save_CPPFLAGS"
slouken@4275
  1009
    LDFLAGS="$save_LDFLAGS"
slouken@4275
  1010
    LIBS="$save_LIBS"
slouken@4275
  1011
    ;;
slouken@4275
  1012
  esac
slouken@4275
  1013
slouken@4275
  1014
  case $lt_cv_dlopen_self in
slouken@4275
  1015
  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
slouken@4275
  1016
  *) enable_dlopen_self=unknown ;;
slouken@4275
  1017
  esac
slouken@4275
  1018
slouken@4275
  1019
  case $lt_cv_dlopen_self_static in
slouken@4275
  1020
  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
slouken@4275
  1021
  *) enable_dlopen_self_static=unknown ;;
slouken@4275
  1022
  esac
slouken@4275
  1023
fi
slouken@4275
  1024
])# AC_LIBTOOL_DLOPEN_SELF
slouken@4275
  1025
slouken@4275
  1026
slouken@4275
  1027
# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
slouken@4275
  1028
# ---------------------------------
slouken@4275
  1029
# Check to see if options -c and -o are simultaneously supported by compiler
slouken@4275
  1030
AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
slouken@4275
  1031
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
slouken@4275
  1032
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
slouken@4275
  1033
  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
slouken@4275
  1034
  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
slouken@4275
  1035
   $rm -r conftest 2>/dev/null
slouken@4275
  1036
   mkdir conftest
slouken@4275
  1037
   cd conftest
slouken@4275
  1038
   mkdir out
slouken@4275
  1039
   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
slouken@4275
  1040
slouken@4275
  1041
   lt_compiler_flag="-o out/conftest2.$ac_objext"
slouken@4275
  1042
   # Insert the option either (1) after the last *FLAGS variable, or
slouken@4275
  1043
   # (2) before a word containing "conftest.", or (3) at the end.
slouken@4275
  1044
   # Note that $ac_compile itself does not contain backslashes and begins
slouken@4275
  1045
   # with a dollar sign (not a hyphen), so the echo should work correctly.
slouken@4275
  1046
   lt_compile=`echo "$ac_compile" | $SED \
slouken@4275
  1047
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
slouken@4275
  1048
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
slouken@4275
  1049
   -e 's:$: $lt_compiler_flag:'`
slouken@4275
  1050
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
slouken@4275
  1051
   (eval "$lt_compile" 2>out/conftest.err)
slouken@4275
  1052
   ac_status=$?
slouken@4275
  1053
   cat out/conftest.err >&AS_MESSAGE_LOG_FD
slouken@4275
  1054
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
slouken@4275
  1055
   if (exit $ac_status) && test -s out/conftest2.$ac_objext
slouken@4275
  1056
   then
slouken@4275
  1057
     # The compiler can only warn and ignore the option if not recognized
slouken@4275
  1058
     # So say no if there are warnings
slouken@4275
  1059
     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
slouken@4275
  1060
     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
slouken@4275
  1061
     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
slouken@4275
  1062
       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
slouken@4275
  1063
     fi
slouken@4275
  1064
   fi
slouken@4275
  1065
   chmod u+w . 2>&AS_MESSAGE_LOG_FD
slouken@4275
  1066
   $rm conftest*
slouken@4275
  1067
   # SGI C++ compiler will create directory out/ii_files/ for
slouken@4275
  1068
   # template instantiation
slouken@4275
  1069
   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
slouken@4275
  1070
   $rm out/* && rmdir out
slouken@4275
  1071
   cd ..
slouken@4275
  1072
   rmdir conftest
slouken@4275
  1073
   $rm conftest*
slouken@4275
  1074
])
slouken@4275
  1075
])# AC_LIBTOOL_PROG_CC_C_O
slouken@4275
  1076
slouken@4275
  1077
slouken@4275
  1078
# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
slouken@4275
  1079
# -----------------------------------------
slouken@4275
  1080
# Check to see if we can do hard links to lock some files if needed
slouken@4275
  1081
AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
slouken@4275
  1082
[AC_REQUIRE([_LT_AC_LOCK])dnl
slouken@4275
  1083
slouken@4275
  1084
hard_links="nottested"
slouken@4275
  1085
if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
slouken@4275
  1086
  # do not overwrite the value of need_locks provided by the user
slouken@4275
  1087
  AC_MSG_CHECKING([if we can lock with hard links])
slouken@4275
  1088
  hard_links=yes
slouken@4275
  1089
  $rm conftest*
slouken@4275
  1090
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
slouken@4275
  1091
  touch conftest.a
slouken@4275
  1092
  ln conftest.a conftest.b 2>&5 || hard_links=no
slouken@4275
  1093
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
slouken@4275
  1094
  AC_MSG_RESULT([$hard_links])
slouken@4275
  1095
  if test "$hard_links" = no; then
slouken@4275
  1096
    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
slouken@4275
  1097
    need_locks=warn
slouken@4275
  1098
  fi
slouken@4275
  1099
else
slouken@4275
  1100
  need_locks=no
slouken@4275
  1101
fi
slouken@4275
  1102
])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
slouken@4275
  1103
slouken@4275
  1104
slouken@4275
  1105
# AC_LIBTOOL_OBJDIR
slouken@4275
  1106
# -----------------
slouken@4275
  1107
AC_DEFUN([AC_LIBTOOL_OBJDIR],
slouken@4275
  1108
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
slouken@4275
  1109
[rm -f .libs 2>/dev/null
slouken@4275
  1110
mkdir .libs 2>/dev/null
slouken@4275
  1111
if test -d .libs; then
slouken@4275
  1112
  lt_cv_objdir=.libs
slouken@4275
  1113
else
slouken@4275
  1114
  # MS-DOS does not allow filenames that begin with a dot.
slouken@4275
  1115
  lt_cv_objdir=_libs
slouken@4275
  1116
fi
slouken@4275
  1117
rmdir .libs 2>/dev/null])
slouken@4275
  1118
objdir=$lt_cv_objdir
slouken@4275
  1119
])# AC_LIBTOOL_OBJDIR
slouken@4275
  1120
slouken@4275
  1121
slouken@4275
  1122
# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
slouken@4275
  1123
# ----------------------------------------------
slouken@4275
  1124
# Check hardcoding attributes.
slouken@4275
  1125
AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
slouken@4275
  1126
[AC_MSG_CHECKING([how to hardcode library paths into programs])
slouken@4275
  1127
_LT_AC_TAGVAR(hardcode_action, $1)=
slouken@4275
  1128
if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
slouken@4275
  1129
   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
slouken@4275
  1130
   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
slouken@4275
  1131
slouken@4275
  1132
  # We can hardcode non-existant directories.
slouken@4275
  1133
  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
slouken@4275
  1134
     # If the only mechanism to avoid hardcoding is shlibpath_var, we
slouken@4275
  1135
     # have to relink, otherwise we might link with an installed library
slouken@4275
  1136
     # when we should be linking with a yet-to-be-installed one
slouken@4275
  1137
     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
slouken@4275
  1138
     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
slouken@4275
  1139
    # Linking always hardcodes the temporary library directory.
slouken@4275
  1140
    _LT_AC_TAGVAR(hardcode_action, $1)=relink
slouken@4275
  1141
  else
slouken@4275
  1142
    # We can link without hardcoding, and we can hardcode nonexisting dirs.
slouken@4275
  1143
    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
slouken@4275
  1144
  fi
slouken@4275
  1145
else
slouken@4275
  1146
  # We cannot hardcode anything, or else we can only hardcode existing
slouken@4275
  1147
  # directories.
slouken@4275
  1148
  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
slouken@4275
  1149
fi
slouken@4275
  1150
AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
slouken@4275
  1151
slouken@4275
  1152
if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
slouken@4275
  1153
  # Fast installation is not supported
slouken@4275
  1154
  enable_fast_install=no
slouken@4275
  1155
elif test "$shlibpath_overrides_runpath" = yes ||
slouken@4275
  1156
     test "$enable_shared" = no; then
slouken@4275
  1157
  # Fast installation is not necessary
slouken@4275
  1158
  enable_fast_install=needless
slouken@4275
  1159
fi
slouken@4275
  1160
])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
slouken@4275
  1161
slouken@4275
  1162
slouken@4275
  1163
# AC_LIBTOOL_SYS_LIB_STRIP
slouken@4275
  1164
# ------------------------
slouken@4275
  1165
AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
slouken@4275
  1166
[striplib=
slouken@4275
  1167
old_striplib=
slouken@4275
  1168
AC_MSG_CHECKING([whether stripping libraries is possible])
slouken@4275
  1169
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
slouken@4275
  1170
  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
slouken@4275
  1171
  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
slouken@4275
  1172
  AC_MSG_RESULT([yes])
slouken@4275
  1173
else
slouken@4275
  1174
# FIXME - insert some real tests, host_os isn't really good enough
slouken@4275
  1175
  case $host_os in
slouken@4275
  1176
   darwin*)
slouken@4275
  1177
       if test -n "$STRIP" ; then
slouken@4275
  1178
         striplib="$STRIP -x"
slouken@4275
  1179
         AC_MSG_RESULT([yes])
slouken@4275
  1180
       else
slouken@4275
  1181
  AC_MSG_RESULT([no])
slouken@4275
  1182
fi
slouken@4275
  1183
       ;;
slouken@4275
  1184
   *)
slouken@4275
  1185
  AC_MSG_RESULT([no])
slouken@4275
  1186
    ;;
slouken@4275
  1187
  esac
slouken@4275
  1188
fi
slouken@4275
  1189
])# AC_LIBTOOL_SYS_LIB_STRIP
slouken@4275
  1190
slouken@4275
  1191
slouken@4275
  1192
# AC_LIBTOOL_SYS_DYNAMIC_LINKER
slouken@4275
  1193
# -----------------------------
slouken@4275
  1194
# PORTME Fill in your ld.so characteristics
slouken@4275
  1195
AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
slouken@4275
  1196
[AC_MSG_CHECKING([dynamic linker characteristics])
slouken@4275
  1197
library_names_spec=
slouken@4275
  1198
libname_spec='lib$name'
slouken@4275
  1199
soname_spec=
slouken@4275
  1200
shrext_cmds=".so"
slouken@4275
  1201
postinstall_cmds=
slouken@4275
  1202
postuninstall_cmds=
slouken@4275
  1203
finish_cmds=
slouken@4275
  1204
finish_eval=
slouken@4275
  1205
shlibpath_var=
slouken@4275
  1206
shlibpath_overrides_runpath=unknown
slouken@4275
  1207
version_type=none
slouken@4275
  1208
dynamic_linker="$host_os ld.so"
slouken@4275
  1209
sys_lib_dlsearch_path_spec="/lib /usr/lib"
slouken@4275
  1210
if test "$GCC" = yes; then
slouken@4275
  1211
  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
slouken@4275
  1212
  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
slouken@4275
  1213
    # if the path contains ";" then we assume it to be the separator
slouken@4275
  1214
    # otherwise default to the standard path separator (i.e. ":") - it is
slouken@4275
  1215
    # assumed that no part of a normal pathname contains ";" but that should
slouken@4275
  1216
    # okay in the real world where ";" in dirpaths is itself problematic.
slouken@4275
  1217
    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
slouken@4275
  1218
  else
slouken@4275
  1219
    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
slouken@4275
  1220
  fi
slouken@4275
  1221
else
slouken@4275
  1222
  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
slouken@4275
  1223
fi
slouken@4275
  1224
need_lib_prefix=unknown
slouken@4275
  1225
hardcode_into_libs=no
slouken@4275
  1226
slouken@4275
  1227
# when you set need_version to no, make sure it does not cause -set_version
slouken@4275
  1228
# flags to be left without arguments
slouken@4275
  1229
need_version=unknown
slouken@4275
  1230
slouken@4275
  1231
case $host_os in
slouken@4275
  1232
aix3*)
slouken@4275
  1233
  version_type=linux
slouken@4275
  1234
  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
slouken@4275
  1235
  shlibpath_var=LIBPATH
slouken@4275
  1236
slouken@4275
  1237
  # AIX 3 has no versioning support, so we append a major version to the name.
slouken@4275
  1238
  soname_spec='${libname}${release}${shared_ext}$major'
slouken@4275
  1239
  ;;
slouken@4275
  1240
slouken@4275
  1241
aix4* | aix5*)
slouken@4275
  1242
  version_type=linux
slouken@4275
  1243
  need_lib_prefix=no
slouken@4275
  1244
  need_version=no
slouken@4275
  1245
  hardcode_into_libs=yes
slouken@4275
  1246
  if test "$host_cpu" = ia64; then
slouken@4275
  1247
    # AIX 5 supports IA64
slouken@4275
  1248
    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
slouken@4275
  1249
    shlibpath_var=LD_LIBRARY_PATH
slouken@4275
  1250
  else
slouken@4275
  1251
    # With GCC up to 2.95.x, collect2 would create an import file
slouken@4275
  1252
    # for dependence libraries.  The import file would start with
slouken@4275
  1253
    # the line `#! .'.  This would cause the generated library to
slouken@4275
  1254
    # depend on `.', always an invalid library.  This was fixed in
slouken@4275
  1255
    # development snapshots of GCC prior to 3.0.
slouken@4275
  1256
    case $host_os in
slouken@4275
  1257
      aix4 | aix4.[[01]] | aix4.[[01]].*)
slouken@4275
  1258
      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
slouken@4275
  1259
	   echo ' yes '
slouken@4275
  1260
	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
slouken@4275
  1261
	:
slouken@4275
  1262
      else
slouken@4275
  1263
	can_build_shared=no
slouken@4275
  1264
      fi
slouken@4275
  1265
      ;;
slouken@4275
  1266
    esac
slouken@4275
  1267
    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
slouken@4275
  1268
    # soname into executable. Probably we can add versioning support to
slouken@4275
  1269
    # collect2, so additional links can be useful in future.
slouken@4275
  1270
    if test "$aix_use_runtimelinking" = yes; then
slouken@4275
  1271
      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
slouken@4275
  1272
      # instead of lib<name>.a to let people know that these are not
slouken@4275
  1273
      # typical AIX shared libraries.
slouken@4275
  1274
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
slouken@4275
  1275
    else
slouken@4275
  1276
      # We preserve .a as extension for shared libraries through AIX4.2
slouken@4275
  1277
      # and later when we are not doing run time linking.
slouken@4275
  1278
      library_names_spec='${libname}${release}.a $libname.a'
slouken@4275
  1279
      soname_spec='${libname}${release}${shared_ext}$major'
slouken@4275
  1280
    fi
slouken@4275
  1281
    shlibpath_var=LIBPATH
slouken@4275
  1282
  fi
slouken@4275
  1283
  ;;
slouken@4275
  1284
slouken@4275
  1285
amigaos*)
slouken@4275
  1286
  library_names_spec='$libname.ixlibrary $libname.a'
slouken@4275
  1287
  # Create ${libname}_ixlibrary.a entries in /sys/libs.
slouken@4275
  1288
  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
slouken@4275
  1289
  ;;
slouken@4275
  1290
slouken@4275
  1291
beos*)
slouken@4275
  1292
  library_names_spec='${libname}${shared_ext}'
slouken@4275
  1293
  dynamic_linker="$host_os ld.so"
slouken@4275
  1294
  shlibpath_var=LIBRARY_PATH
slouken@4275
  1295
  ;;
slouken@4275
  1296
slouken@4275
  1297
bsdi[[45]]*)
slouken@4275
  1298
  version_type=linux
slouken@4275
  1299
  need_version=no
slouken@4275
  1300
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
slouken@4275
  1301
  soname_spec='${libname}${release}${shared_ext}$major'
slouken@4275
  1302
  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
slouken@4275
  1303
  shlibpath_var=LD_LIBRARY_PATH
slouken@4275
  1304
  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
slouken@4275
  1305
  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
slouken@4275
  1306
  # the default ld.so.conf also contains /usr/contrib/lib and
slouken@4275
  1307
  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
slouken@4275
  1308
  # libtool to hard-code these into programs
slouken@4275
  1309
  ;;
slouken@4275
  1310
slouken@4275
  1311
cygwin* | mingw* | pw32*)
slouken@4275
  1312
  version_type=windows
slouken@4275
  1313
  shrext_cmds=".dll"
slouken@4275
  1314
  need_version=no
slouken@4275
  1315
  need_lib_prefix=no
slouken@4275
  1316
slouken@4275
  1317
  case $GCC,$host_os in
slouken@4275
  1318
  yes,cygwin* | yes,mingw* | yes,pw32*)
slouken@4275
  1319
    library_names_spec='$libname.dll.a'
slouken@4275
  1320
    # DLL is installed to $(libdir)/../bin by postinstall_cmds
slouken@4275
  1321
    postinstall_cmds='base_file=`basename \${file}`~
slouken@4275
  1322
      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
slouken@4275
  1323
      dldir=$destdir/`dirname \$dlpath`~
slouken@4275
  1324
      test -d \$dldir || mkdir -p \$dldir~
slouken@4275
  1325
      $install_prog $dir/$dlname \$dldir/$dlname~
slouken@4275
  1326
      chmod a+x \$dldir/$dlname'
slouken@4275
  1327
    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
slouken@4275
  1328
      dlpath=$dir/\$dldll~
slouken@4275
  1329
       $rm \$dlpath'
slouken@4275
  1330
    shlibpath_overrides_runpath=yes
slouken@4275
  1331
slouken@4275
  1332
    case $host_os in
slouken@4275
  1333
    cygwin*)
slouken@4275
  1334
      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
slouken@4275
  1335
      #soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
slouken@4275
  1336
      soname_spec='`echo ${libname} | sed -e 's/^lib//'`${shared_ext}'
slouken@4275
  1337
      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
slouken@4275
  1338
      ;;
slouken@4275
  1339
    mingw*)
slouken@4275
  1340
      # MinGW DLLs use traditional 'lib' prefix
slouken@4275
  1341
      #soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
slouken@4275
  1342
      soname_spec='`echo ${libname} | sed -e 's/^lib//'`${shared_ext}'
slouken@4275
  1343
      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
slouken@4275
  1344
      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
slouken@4275
  1345
        # It is most probably a Windows format PATH printed by
slouken@4275
  1346
        # mingw gcc, but we are running on Cygwin. Gcc prints its search
slouken@4275
  1347
        # path with ; separators, and with drive letters. We can handle the
slouken@4275
  1348
        # drive letters (cygwin fileutils understands them), so leave them,
slouken@4275
  1349
        # especially as we might pass files found there to a mingw objdump,
slouken@4275
  1350
        # which wouldn't understand a cygwinified path. Ahh.
slouken@4275
  1351
        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
slouken@4275
  1352
      else
slouken@4275
  1353
        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
slouken@4275
  1354
      fi
slouken@4275
  1355
      ;;
slouken@4275
  1356
    pw32*)
slouken@4275
  1357
      # pw32 DLLs use 'pw' prefix rather than 'lib'
slouken@4275
  1358
      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
slouken@4275
  1359
      ;;
slouken@4275
  1360
    esac
slouken@4275
  1361
    ;;
slouken@4275
  1362
slouken@4275
  1363
  *)
slouken@4275
  1364
    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
slouken@4275
  1365
    ;;
slouken@4275
  1366
  esac
slouken@4275
  1367
  dynamic_linker='Win32 ld.exe'
slouken@4275
  1368
  # FIXME: first we should search . and the directory the executable is in
slouken@4275
  1369
  shlibpath_var=PATH
slouken@4275
  1370
  ;;
slouken@4275
  1371
slouken@4275
  1372
darwin* | rhapsody*)
slouken@4275
  1373
  dynamic_linker="$host_os dyld"
slouken@4275
  1374
  version_type=darwin
slouken@4275
  1375
  need_lib_prefix=no
slouken@4275
  1376
  need_version=no
slouken@4275
  1377
  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
slouken@4275
  1378
  soname_spec='${libname}${release}${major}$shared_ext'
slouken@4275
  1379
  shlibpath_overrides_runpath=yes
slouken@4275
  1380
  shlibpath_var=DYLD_LIBRARY_PATH
slouken@4275
  1381
  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
slouken@4275
  1382
  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
slouken@4275
  1383
  if test "$GCC" = yes; then
slouken@4275
  1384
    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
slouken@4275
  1385
  else
slouken@4275
  1386
    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
slouken@4275
  1387
  fi
slouken@4275
  1388
  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
slouken@4275
  1389
  ;;
slouken@4275
  1390
slouken@4275
  1391
dgux*)
slouken@4275
  1392
  version_type=linux
slouken@4275
  1393
  need_lib_prefix=no
slouken@4275
  1394
  need_version=no
slouken@4275
  1395
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
slouken@4275
  1396
  soname_spec='${libname}${release}${shared_ext}$major'
slouken@4275
  1397
  shlibpath_var=LD_LIBRARY_PATH
slouken@4275
  1398
  ;;
slouken@4275
  1399
slouken@4275
  1400
freebsd1*)
slouken@4275
  1401
  dynamic_linker=no
slouken@4275
  1402
  ;;
slouken@4275
  1403
slouken@4275
  1404
kfreebsd*-gnu)
slouken@4275
  1405
  version_type=linux
slouken@4275
  1406
  need_lib_prefix=no
slouken@4275
  1407
  need_version=no
slouken@4275
  1408
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
slouken@4275
  1409
  soname_spec='${libname}${release}${shared_ext}$major'
slouken@4275
  1410
  shlibpath_var=LD_LIBRARY_PATH
slouken@4275
  1411
  shlibpath_overrides_runpath=no
slouken@4275
  1412
  hardcode_into_libs=yes
slouken@4275
  1413
  dynamic_linker='GNU ld.so'
slouken@4275
  1414
  ;;
slouken@4275
  1415
slouken@4275
  1416
freebsd* | dragonfly*)
slouken@4275
  1417
  # DragonFly does not have aout.  When/if they implement a new
slouken@4275
  1418
  # versioning mechanism, adjust this.
slouken@4275
  1419
  if test -x /usr/bin/objformat; then
slouken@4275
  1420
    objformat=`/usr/bin/objformat`
slouken@4275
  1421
  else
slouken@4275
  1422
    case $host_os in
slouken@4275
  1423
    freebsd[[123]]*) objformat=aout ;;
slouken@4275
  1424
    *) objformat=elf ;;
slouken@4275
  1425
    esac
slouken@4275
  1426
  fi
slouken@4275
  1427
  version_type=freebsd-$objformat
slouken@4275
  1428
  case $version_type in
slouken@4275
  1429
    freebsd-elf*)
slouken@4275
  1430
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
slouken@4275
  1431
      need_version=no
slouken@4275
  1432
      need_lib_prefix=no
slouken@4275
  1433
      ;;
slouken@4275
  1434
    freebsd-*)
slouken@4275
  1435
      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
slouken@4275
  1436
      need_version=yes
slouken@4275
  1437
      ;;
slouken@4275
  1438
  esac
slouken@4275
  1439
  shlibpath_var=LD_LIBRARY_PATH
slouken@4275
  1440
  case $host_os in
slouken@4275
  1441
  freebsd2*)
slouken@4275
  1442
    shlibpath_overrides_runpath=yes
slouken@4275
  1443
    ;;
slouken@4275
  1444
  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
slouken@4275
  1445
    shlibpath_overrides_runpath=yes
slouken@4275
  1446
    hardcode_into_libs=yes
slouken@4275
  1447
    ;;
slouken@4275
  1448
  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
slouken@4275
  1449
  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
slouken@4275
  1450
    shlibpath_overrides_runpath=no
slouken@4275
  1451
    hardcode_into_libs=yes
slouken@4275
  1452
    ;;
slouken@4275
  1453
  freebsd*) # from 4.6 on
slouken@4275
  1454
    shlibpath_overrides_runpath=yes
slouken@4275
  1455
    hardcode_into_libs=yes
slouken@4275
  1456
    ;;
slouken@4275
  1457
  esac
slouken@4275
  1458
  ;;
slouken@4275
  1459
slouken@4275
  1460
gnu*)
slouken@4275
  1461
  version_type=linux
slouken@4275
  1462
  need_lib_prefix=no
slouken@4275
  1463
  need_version=no
slouken@4275
  1464
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
slouken@4275
  1465
  soname_spec='${libname}${release}${shared_ext}$major'
slouken@4275
  1466
  shlibpath_var=LD_LIBRARY_PATH
slouken@4275
  1467
  hardcode_into_libs=yes
slouken@4275
  1468
  ;;
slouken@4275
  1469
slouken@4275
  1470
hpux9* | hpux10* | hpux11*)
slouken@4275
  1471
  # Give a soname corresponding to the major version so that dld.sl refuses to
slouken@4275
  1472
  # link against other versions.
slouken@4275
  1473
  version_type=sunos
slouken@4275
  1474
  need_lib_prefix=no
slouken@4275
  1475
  need_version=no
slouken@4275
  1476
  case $host_cpu in
slouken@4275
  1477
  ia64*)
slouken@4275
  1478
    shrext_cmds='.so'
slouken@4275
  1479
    hardcode_into_libs=yes
slouken@4275
  1480
    dynamic_linker="$host_os dld.so"
slouken@4275
  1481
    shlibpath_var=LD_LIBRARY_PATH
slouken@4275
  1482
    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
slouken@4275
  1483
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
slouken@4275
  1484
    soname_spec='${libname}${release}${shared_ext}$major'
slouken@4275
  1485
    if test "X$HPUX_IA64_MODE" = X32; then
slouken@4275
  1486
      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
slouken@4275
  1487
    else
slouken@4275
  1488
      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
slouken@4275
  1489
    fi
slouken@4275
  1490
    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
slouken@4275
  1491
    ;;
slouken@4275
  1492
   hppa*64*)
slouken@4275
  1493
     shrext_cmds='.sl'
slouken@4275
  1494
     hardcode_into_libs=yes
slouken@4275
  1495
     dynamic_linker="$host_os dld.sl"
slouken@4275
  1496
     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
slouken@4275
  1497
     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
slouken@4275
  1498
     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
slouken@4275
  1499
     soname_spec='${libname}${release}${shared_ext}$major'
slouken@4275
  1500
     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
slouken@4275
  1501
     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
slouken@4275
  1502
     ;;
slouken@4275
  1503
   *)
slouken@4275
  1504
    shrext_cmds='.sl'
slouken@4275
  1505
    dynamic_linker="$host_os dld.sl"
slouken@4275
  1506
    shlibpath_var=SHLIB_PATH
slouken@4275
  1507
    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
slouken@4275
  1508
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
slouken@4275
  1509
    soname_spec='${libname}${release}${shared_ext}$major'
slouken@4275
  1510
    ;;
slouken@4275
  1511
  esac
slouken@4275
  1512
  # HP-UX runs *really* slowly unless shared libraries are mode 555.
slouken@4275
  1513
  postinstall_cmds='chmod 555 $lib'
slouken@4275
  1514
  ;;
slouken@4275
  1515
slouken@4275
  1516
interix3*)
slouken@4275
  1517
  version_type=linux
slouken@4275
  1518
  need_lib_prefix=no
slouken@4275
  1519
  need_version=no
slouken@4275
  1520
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
slouken@4275
  1521
  soname_spec='${libname}${release}${shared_ext}$major'
slouken@4275
  1522
  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
slouken@4275
  1523
  shlibpath_var=LD_LIBRARY_PATH
slouken@4275
  1524
  shlibpath_overrides_runpath=no
slouken@4275
  1525
  hardcode_into_libs=yes
slouken@4275
  1526
  ;;
slouken@4275
  1527
slouken@4275
  1528
irix5* | irix6* | nonstopux*)
slouken@4275
  1529
  case $host_os in
slouken@4275
  1530
    nonstopux*) version_type=nonstopux ;;
slouken@4275
  1531
    *)
slouken@4275
  1532
	if test "$lt_cv_prog_gnu_ld" = yes; then
slouken@4275
  1533
		version_type=linux
slouken@4275
  1534
	else
slouken@4275
  1535
		version_type=irix
slouken@4275
  1536
	fi ;;
slouken@4275
  1537
  esac
slouken@4275
  1538
  need_lib_prefix=no
slouken@4275
  1539
  need_version=no
slouken@4275
  1540
  soname_spec='${libname}${release}${shared_ext}$major'
slouken@4275
  1541
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
slouken@4275
  1542
  case $host_os in
slouken@4275
  1543
  irix5* | nonstopux*)
slouken@4275
  1544
    libsuff= shlibsuff=
slouken@4275
  1545
    ;;
slouken@4275
  1546
  *)
slouken@4275
  1547
    case $LD in # libtool.m4 will add one of these switches to LD
slouken@4275
  1548
    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
slouken@4275
  1549
      libsuff= shlibsuff= libmagic=32-bit;;
slouken@4275
  1550
    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
slouken@4275
  1551
      libsuff=32 shlibsuff=N32 libmagic=N32;;
slouken@4275
  1552
    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
slouken@4275
  1553
      libsuff=64 shlibsuff=64 libmagic=64-bit;;
slouken@4275
  1554
    *) libsuff= shlibsuff= libmagic=never-match;;
slouken@4275
  1555
    esac
slouken@4275
  1556
    ;;
slouken@4275
  1557
  esac
slouken@4275
  1558
  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
slouken@4275
  1559
  shlibpath_overrides_runpath=no
slouken@4275
  1560
  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
slouken@4275
  1561
  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
slouken@4275
  1562
  hardcode_into_libs=yes
slouken@4275
  1563
  ;;
slouken@4275
  1564
slouken@4275
  1565
# No shared lib support for Linux oldld, aout, or coff.
slouken@4275
  1566
linux*oldld* | linux*aout* | linux*coff*)
slouken@4275
  1567
  dynamic_linker=no
slouken@4275
  1568
  ;;
slouken@4275
  1569
slouken@4275
  1570
# This must be Linux ELF.
slouken@4275
  1571
linux*)
slouken@4275
  1572
  version_type=linux
slouken@4275
  1573
  need_lib_prefix=no
slouken@4275
  1574
  need_version=no
slouken@4275
  1575
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
slouken@4275
  1576
  soname_spec='${libname}${release}${shared_ext}$major'
slouken@4275
  1577
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
slouken@4275
  1578
  shlibpath_var=LD_LIBRARY_PATH
slouken@4275
  1579
  shlibpath_overrides_runpath=no
slouken@4275
  1580
  # This implies no fast_install, which is unacceptable.
slouken@4275
  1581
  # Some rework will be needed to allow for fast_install
slouken@4275
  1582
  # before this can be enabled.
slouken@4275
  1583
  hardcode_into_libs=yes
slouken@4275
  1584
slouken@4275
  1585
  # Append ld.so.conf contents to the search path
slouken@4275
  1586
  if test -f /etc/ld.so.conf; then
slouken@4275
  1587
    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
slouken@4275
  1588
    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
slouken@4275
  1589
  fi
slouken@4275
  1590
slouken@4275
  1591
  # We used to test for /lib/ld.so.1 and disable shared libraries on
slouken@4275
  1592
  # powerpc, because MkLinux only supported shared libraries with the
slouken@4275
  1593
  # GNU dynamic linker.  Since this was broken with cross compilers,
slouken@4275
  1594
  # most powerpc-linux boxes support dynamic linking these days and
slouken@4275
  1595
  # people can always --disable-shared, the test was removed, and we
slouken@4275
  1596
  # assume the GNU/Linux dynamic linker is in use.
slouken@4275
  1597
  dynamic_linker='GNU/Linux ld.so'
slouken@4275
  1598
  ;;
slouken@4275
  1599
slouken@4275
  1600
knetbsd*-gnu)
slouken@4275
  1601
  version_type=linux
slouken@4275
  1602
  need_lib_prefix=no
slouken@4275
  1603
  need_version=no
slouken@4275
  1604
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
slouken@4275
  1605
  soname_spec='${libname}${release}${shared_ext}$major'
slouken@4275
  1606
  shlibpath_var=LD_LIBRARY_PATH
slouken@4275
  1607
  shlibpath_overrides_runpath=no
slouken@4275
  1608
  hardcode_into_libs=yes
slouken@4275
  1609
  dynamic_linker='GNU ld.so'
slouken@4275
  1610
  ;;
slouken@4275
  1611
slouken@4275
  1612
netbsd*)
slouken@4275
  1613
  version_type=sunos
slouken@4275
  1614
  need_lib_prefix=no
slouken@4275
  1615
  need_version=no
slouken@4275
  1616
  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
slouken@4275
  1617
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
slouken@4275
  1618
    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
slouken@4275
  1619
    dynamic_linker='NetBSD (a.out) ld.so'
slouken@4275
  1620
  else
slouken@4275
  1621
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
slouken@4275
  1622
    soname_spec='${libname}${release}${shared_ext}$major'
slouken@4275
  1623
    dynamic_linker='NetBSD ld.elf_so'
slouken@4275
  1624
  fi
slouken@4275
  1625
  shlibpath_var=LD_LIBRARY_PATH
slouken@4275
  1626
  shlibpath_overrides_runpath=yes
slouken@4275
  1627
  hardcode_into_libs=yes
slouken@4275
  1628
  ;;
slouken@4275
  1629
slouken@4275
  1630
newsos6)
slouken@4275
  1631
  version_type=linux
slouken@4275
  1632
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
slouken@4275
  1633
  shlibpath_var=LD_LIBRARY_PATH
slouken@4275
  1634
  shlibpath_overrides_runpath=yes
slouken@4275
  1635
  ;;
slouken@4275
  1636
slouken@4275
  1637
nto-qnx*)
slouken@4275
  1638
  version_type=linux
slouken@4275
  1639
  need_lib_prefix=no
slouken@4275
  1640
  need_version=no
slouken@4275
  1641
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
slouken@4275
  1642
  soname_spec='${libname}${release}${shared_ext}$major'
slouken@4275
  1643
  shlibpath_var=LD_LIBRARY_PATH
slouken@4275
  1644
  shlibpath_overrides_runpath=yes
slouken@4275
  1645
  ;;
slouken@4275
  1646
slouken@4275
  1647
openbsd*)
slouken@4275
  1648
  version_type=sunos
slouken@4275
  1649
  sys_lib_dlsearch_path_spec="/usr/lib"
slouken@4275
  1650
  need_lib_prefix=no
slouken@4275
  1651
  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
slouken@4275
  1652
  case $host_os in
slouken@4275
  1653
    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
slouken@4275
  1654
    *)                         need_version=no  ;;
slouken@4275
  1655
  esac
slouken@4275
  1656
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
slouken@4275
  1657
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
slouken@4275
  1658
  shlibpath_var=LD_LIBRARY_PATH
slouken@4275
  1659
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
slouken@4275
  1660
    case $host_os in
slouken@4275
  1661
      openbsd2.[[89]] | openbsd2.[[89]].*)
slouken@4275
  1662
	shlibpath_overrides_runpath=no
slouken@4275
  1663
	;;
slouken@4275
  1664
      *)
slouken@4275
  1665
	shlibpath_overrides_runpath=yes
slouken@4275
  1666
	;;
slouken@4275
  1667
      esac
slouken@4275
  1668
  else
slouken@4275
  1669
    shlibpath_overrides_runpath=yes
slouken@4275
  1670
  fi
slouken@4275
  1671
  ;;
slouken@4275
  1672
slouken@4275
  1673
os2*)
slouken@4275
  1674
  libname_spec='$name'
slouken@4275
  1675
  shrext_cmds=".dll"
slouken@4275
  1676
  need_lib_prefix=no
slouken@4275
  1677
  library_names_spec='$libname${shared_ext} $libname.a'
slouken@4275
  1678
  dynamic_linker='OS/2 ld.exe'
slouken@4275
  1679
  shlibpath_var=LIBPATH
slouken@4275
  1680
  ;;
slouken@4275
  1681
slouken@4275
  1682
osf3* | osf4* | osf5*)
slouken@4275
  1683
  version_type=osf
slouken@4275
  1684
  need_lib_prefix=no
slouken@4275
  1685
  need_version=no
slouken@4275
  1686
  soname_spec='${libname}${release}${shared_ext}$major'
slouken@4275
  1687
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
slouken@4275
  1688
  shlibpath_var=LD_LIBRARY_PATH
slouken@4275
  1689
  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
slouken@4275
  1690
  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
slouken@4275
  1691
  ;;
slouken@4275
  1692
slouken@4275
  1693
solaris*)
slouken@4275
  1694
  version_type=linux
slouken@4275
  1695
  need_lib_prefix=no
slouken@4275
  1696
  need_version=no
slouken@4275
  1697
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
slouken@4275
  1698
  soname_spec='${libname}${release}${shared_ext}$major'
slouken@4275
  1699
  shlibpath_var=LD_LIBRARY_PATH
slouken@4275
  1700
  shlibpath_overrides_runpath=yes
slouken@4275
  1701
  hardcode_into_libs=yes
slouken@4275
  1702
  # ldd complains unless libraries are executable
slouken@4275
  1703
  postinstall_cmds='chmod +x $lib'
slouken@4275
  1704
  ;;
slouken@4275
  1705
slouken@4275
  1706
sunos4*)
slouken@4275
  1707
  version_type=sunos
slouken@4275
  1708
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
slouken@4275
  1709
  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
slouken@4275
  1710
  shlibpath_var=LD_LIBRARY_PATH
slouken@4275
  1711
  shlibpath_overrides_runpath=yes
slouken@4275
  1712
  if test "$with_gnu_ld" = yes; then
slouken@4275
  1713
    need_lib_prefix=no
slouken@4275
  1714
  fi
slouken@4275
  1715
  need_version=yes
slouken@4275
  1716
  ;;
slouken@4275
  1717
slouken@4275
  1718
sysv4 | sysv4.3*)
slouken@4275
  1719
  version_type=linux
slouken@4275
  1720
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
slouken@4275
  1721
  soname_spec='${libname}${release}${shared_ext}$major'
slouken@4275
  1722
  shlibpath_var=LD_LIBRARY_PATH
slouken@4275
  1723
  case $host_vendor in
slouken@4275
  1724
    sni)
slouken@4275
  1725
      shlibpath_overrides_runpath=no
slouken@4275
  1726
      need_lib_prefix=no
slouken@4275
  1727
      export_dynamic_flag_spec='${wl}-Blargedynsym'
slouken@4275
  1728
      runpath_var=LD_RUN_PATH
slouken@4275
  1729
      ;;
slouken@4275
  1730
    siemens)
slouken@4275
  1731
      need_lib_prefix=no
slouken@4275
  1732
      ;;
slouken@4275
  1733
    motorola)
slouken@4275
  1734
      need_lib_prefix=no
slouken@4275
  1735
      need_version=no
slouken@4275
  1736
      shlibpath_overrides_runpath=no
slouken@4275
  1737
      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
slouken@4275
  1738
      ;;
slouken@4275
  1739
  esac
slouken@4275
  1740
  ;;
slouken@4275
  1741
slouken@4275
  1742
sysv4*MP*)
slouken@4275
  1743
  if test -d /usr/nec ;then
slouken@4275
  1744
    version_type=linux
slouken@4275
  1745
    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
slouken@4275
  1746
    soname_spec='$libname${shared_ext}.$major'
slouken@4275
  1747
    shlibpath_var=LD_LIBRARY_PATH
slouken@4275
  1748
  fi
slouken@4275
  1749
  ;;
slouken@4275
  1750
slouken@4275
  1751
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
slouken@4275
  1752
  version_type=freebsd-elf
slouken@4275
  1753
  need_lib_prefix=no
slouken@4275
  1754
  need_version=no
slouken@4275
  1755
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
slouken@4275
  1756
  soname_spec='${libname}${release}${shared_ext}$major'
slouken@4275
  1757
  shlibpath_var=LD_LIBRARY_PATH
slouken@4275
  1758
  hardcode_into_libs=yes
slouken@4275
  1759
  if test "$with_gnu_ld" = yes; then
slouken@4275
  1760
    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
slouken@4275
  1761
    shlibpath_overrides_runpath=no
slouken@4275
  1762
  else
slouken@4275
  1763
    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
slouken@4275
  1764
    shlibpath_overrides_runpath=yes
slouken@4275
  1765
    case $host_os in
slouken@4275
  1766
      sco3.2v5*)
slouken@4275
  1767
        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
slouken@4275
  1768
	;;
slouken@4275
  1769
    esac
slouken@4275
  1770
  fi
slouken@4275
  1771
  sys_lib_dlsearch_path_spec='/usr/lib'
slouken@4275
  1772
  ;;
slouken@4275
  1773
slouken@4275
  1774
uts4*)
slouken@4275
  1775
  version_type=linux
slouken@4275
  1776
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
slouken@4275
  1777
  soname_spec='${libname}${release}${shared_ext}$major'
slouken@4275
  1778
  shlibpath_var=LD_LIBRARY_PATH
slouken@4275
  1779
  ;;
slouken@4275
  1780
slouken@4275
  1781
*)
slouken@4275
  1782
  dynamic_linker=no
slouken@4275
  1783
  ;;
slouken@4275
  1784
esac
slouken@4275
  1785
AC_MSG_RESULT([$dynamic_linker])
slouken@4275
  1786
test "$dynamic_linker" = no && can_build_shared=no
slouken@4275
  1787
slouken@4275
  1788
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
slouken@4275
  1789
if test "$GCC" = yes; then
slouken@4275
  1790
  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
slouken@4275
  1791
fi
slouken@4275
  1792
])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
slouken@4275
  1793
slouken@4275
  1794
slouken@4275
  1795
# _LT_AC_TAGCONFIG
slouken@4275
  1796
# ----------------
slouken@4275
  1797
AC_DEFUN([_LT_AC_TAGCONFIG],
slouken@4275
  1798
[AC_ARG_WITH([tags],
slouken@4275
  1799
    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
slouken@4275
  1800
        [include additional configurations @<:@automatic@:>@])],
slouken@4275
  1801
    [tagnames="$withval"])
slouken@4275
  1802
slouken@4275
  1803
if test -f "$ltmain" && test -n "$tagnames"; then
slouken@4275
  1804
  if test ! -f "${ofile}"; then
slouken@4275
  1805
    AC_MSG_WARN([output file `$ofile' does not exist])
slouken@4275
  1806
  fi
slouken@4275
  1807
slouken@4275
  1808
  if test -z "$LTCC"; then
slouken@4275
  1809
    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
slouken@4275
  1810
    if test -z "$LTCC"; then
slouken@4275
  1811
      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
slouken@4275
  1812
    else
slouken@4275
  1813
      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
slouken@4275
  1814
    fi
slouken@4275
  1815
  fi
slouken@4275
  1816
  if test -z "$LTCFLAGS"; then
slouken@4275
  1817
    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
slouken@4275
  1818
  fi
slouken@4275
  1819
slouken@4275
  1820
  # Extract list of available tagged configurations in $ofile.
slouken@4275
  1821
  # Note that this assumes the entire list is on one line.
slouken@4275
  1822
  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
slouken@4275
  1823
slouken@4275
  1824
  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
slouken@4275
  1825
  for tagname in $tagnames; do
slouken@4275
  1826
    IFS="$lt_save_ifs"
slouken@4275
  1827
    # Check whether tagname contains only valid characters
slouken@4275
  1828
    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
slouken@4275
  1829
    "") ;;
slouken@4275
  1830
    *)  AC_MSG_ERROR([invalid tag name: $tagname])
slouken@4275
  1831
	;;
slouken@4275
  1832
    esac
slouken@4275
  1833
slouken@4275
  1834
    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
slouken@4275
  1835
    then
slouken@4275
  1836
      AC_MSG_ERROR([tag name \"$tagname\" already exists])
slouken@4275
  1837
    fi
slouken@4275
  1838
slouken@4275
  1839
    # Update the list of available tags.
slouken@4275
  1840
    if test -n "$tagname"; then
slouken@4275
  1841
      echo appending configuration tag \"$tagname\" to $ofile
slouken@4275
  1842
slouken@4275
  1843
      case $tagname in
slouken@4275
  1844
      CXX)
slouken@4275
  1845
	if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
slouken@4275
  1846
	    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
slouken@4275
  1847
	    (test "X$CXX" != "Xg++"))) ; then
slouken@4275
  1848
	  AC_LIBTOOL_LANG_CXX_CONFIG
slouken@4275
  1849
	else
slouken@4275
  1850
	  tagname=""
slouken@4275
  1851
	fi
slouken@4275
  1852
	;;
slouken@4275
  1853
slouken@4275
  1854
      F77)
slouken@4275
  1855
	if test -n "$F77" && test "X$F77" != "Xno"; then
slouken@4275
  1856
	  AC_LIBTOOL_LANG_F77_CONFIG
slouken@4275
  1857
	else
slouken@4275
  1858
	  tagname=""
slouken@4275
  1859
	fi
slouken@4275
  1860
	;;
slouken@4275
  1861
slouken@4275
  1862
      GCJ)
slouken@4275
  1863
	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
slouken@4275
  1864
	  AC_LIBTOOL_LANG_GCJ_CONFIG
slouken@4275
  1865
	else
slouken@4275
  1866
	  tagname=""
slouken@4275
  1867
	fi
slouken@4275
  1868
	;;
slouken@4275
  1869
slouken@4275
  1870
      RC)
slouken@4275
  1871
	AC_LIBTOOL_LANG_RC_CONFIG
slouken@4275
  1872
	;;
slouken@4275
  1873
slouken@4275
  1874
      *)
slouken@4275
  1875
	AC_MSG_ERROR([Unsupported tag name: $tagname])
slouken@4275
  1876
	;;
slouken@4275
  1877
      esac
slouken@4275
  1878
slouken@4275
  1879
      # Append the new tag name to the list of available tags.
slouken@4275
  1880
      if test -n "$tagname" ; then
slouken@4275
  1881
      available_tags="$available_tags $tagname"
slouken@4275
  1882
    fi
slouken@4275
  1883
    fi
slouken@4275
  1884
  done
slouken@4275
  1885
  IFS="$lt_save_ifs"
slouken@4275
  1886
slouken@4275
  1887
  # Now substitute the updated list of available tags.
slouken@4275
  1888
  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
slouken@4275
  1889
    mv "${ofile}T" "$ofile"
slouken@4275
  1890
    chmod +x "$ofile"
slouken@4275
  1891
  else
slouken@4275
  1892
    rm -f "${ofile}T"
slouken@4275
  1893
    AC_MSG_ERROR([unable to update list of available tagged configurations.])
slouken@4275
  1894
  fi
slouken@4275
  1895
fi
slouken@4275
  1896
])# _LT_AC_TAGCONFIG
slouken@4275
  1897
slouken@4275
  1898
slouken@4275
  1899
# AC_LIBTOOL_DLOPEN
slouken@4275
  1900
# -----------------
slouken@4275
  1901
# enable checks for dlopen support
slouken@4275
  1902
AC_DEFUN([AC_LIBTOOL_DLOPEN],
slouken@4275
  1903
 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
slouken@4275
  1904
])# AC_LIBTOOL_DLOPEN
slouken@4275
  1905
slouken@4275
  1906
slouken@4275
  1907
# AC_LIBTOOL_WIN32_DLL
slouken@4275
  1908
# --------------------
slouken@4275
  1909
# declare package support for building win32 DLLs
slouken@4275
  1910
AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
slouken@4275
  1911
[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
slouken@4275
  1912
])# AC_LIBTOOL_WIN32_DLL
slouken@4275
  1913
slouken@4275
  1914
slouken@4275
  1915
# AC_ENABLE_SHARED([DEFAULT])
slouken@4275
  1916
# ---------------------------
slouken@4275
  1917
# implement the --enable-shared flag
slouken@4275
  1918
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
slouken@4275
  1919
AC_DEFUN([AC_ENABLE_SHARED],
slouken@4275
  1920
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
slouken@4275
  1921
AC_ARG_ENABLE([shared],
slouken@4275
  1922
    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
slouken@4275
  1923
	[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
slouken@4275
  1924
    [p=${PACKAGE-default}
slouken@4275
  1925
    case $enableval in
slouken@4275
  1926
    yes) enable_shared=yes ;;
slouken@4275
  1927
    no) enable_shared=no ;;
slouken@4275
  1928
    *)
slouken@4275
  1929
      enable_shared=no
slouken@4275
  1930
      # Look at the argument we got.  We use all the common list separators.
slouken@4275
  1931
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
slouken@4275
  1932
      for pkg in $enableval; do
slouken@4275
  1933
	IFS="$lt_save_ifs"
slouken@4275
  1934
	if test "X$pkg" = "X$p"; then
slouken@4275
  1935
	  enable_shared=yes
slouken@4275
  1936
	fi
slouken@4275
  1937
      done
slouken@4275
  1938
      IFS="$lt_save_ifs"
slouken@4275
  1939
      ;;
slouken@4275
  1940
    esac],
slouken@4275
  1941
    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
slouken@4275
  1942
])# AC_ENABLE_SHARED
slouken@4275
  1943
slouken@4275
  1944
slouken@4275
  1945
# AC_DISABLE_SHARED
slouken@4275
  1946
# -----------------
slouken@4275
  1947
# set the default shared flag to --disable-shared
slouken@4275
  1948
AC_DEFUN([AC_DISABLE_SHARED],
slouken@4275
  1949
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
slouken@4275
  1950
AC_ENABLE_SHARED(no)
slouken@4275
  1951
])# AC_DISABLE_SHARED
slouken@4275
  1952
slouken@4275
  1953
slouken@4275
  1954
# AC_ENABLE_STATIC([DEFAULT])
slouken@4275
  1955
# ---------------------------
slouken@4275
  1956
# implement the --enable-static flag
slouken@4275
  1957
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
slouken@4275
  1958
AC_DEFUN([AC_ENABLE_STATIC],
slouken@4275
  1959
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
slouken@4275
  1960
AC_ARG_ENABLE([static],
slouken@4275
  1961
    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
slouken@4275
  1962
	[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
slouken@4275
  1963
    [p=${PACKAGE-default}
slouken@4275
  1964
    case $enableval in
slouken@4275
  1965
    yes) enable_static=yes ;;
slouken@4275
  1966
    no) enable_static=no ;;
slouken@4275
  1967
    *)
slouken@4275
  1968
     enable_static=no
slouken@4275
  1969
      # Look at the argument we got.  We use all the common list separators.
slouken@4275
  1970
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
slouken@4275
  1971
      for pkg in $enableval; do
slouken@4275
  1972
	IFS="$lt_save_ifs"
slouken@4275
  1973
	if test "X$pkg" = "X$p"; then
slouken@4275
  1974
	  enable_static=yes
slouken@4275
  1975
	fi
slouken@4275
  1976
      done
slouken@4275
  1977
      IFS="$lt_save_ifs"
slouken@4275
  1978
      ;;
slouken@4275
  1979
    esac],
slouken@4275
  1980
    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
slouken@4275
  1981
])# AC_ENABLE_STATIC
slouken@4275
  1982
slouken@4275
  1983
slouken@4275
  1984
# AC_DISABLE_STATIC
slouken@4275
  1985
# -----------------
slouken@4275
  1986
# set the default static flag to --disable-static
slouken@4275
  1987
AC_DEFUN([AC_DISABLE_STATIC],
slouken@4275
  1988
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
slouken@4275
  1989
AC_ENABLE_STATIC(no)
slouken@4275
  1990
])# AC_DISABLE_STATIC
slouken@4275
  1991
slouken@4275
  1992
slouken@4275
  1993
# AC_ENABLE_FAST_INSTALL([DEFAULT])
slouken@4275
  1994
# ---------------------------------
slouken@4275
  1995
# implement the --enable-fast-install flag
slouken@4275
  1996
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
slouken@4275
  1997
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
slouken@4275
  1998
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
slouken@4275
  1999
AC_ARG_ENABLE([fast-install],
slouken@4275
  2000
    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
slouken@4275
  2001
    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
slouken@4275
  2002
    [p=${PACKAGE-default}
slouken@4275
  2003
    case $enableval in
slouken@4275
  2004
    yes) enable_fast_install=yes ;;
slouken@4275
  2005
    no) enable_fast_install=no ;;
slouken@4275
  2006
    *)
slouken@4275
  2007
      enable_fast_install=no
slouken@4275
  2008
      # Look at the argument we got.  We use all the common list separators.
slouken@4275
  2009
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
slouken@4275
  2010
      for pkg in $enableval; do
slouken@4275
  2011
	IFS="$lt_save_ifs"
slouken@4275
  2012
	if test "X$pkg" = "X$p"; then
slouken@4275
  2013
	  enable_fast_install=yes
slouken@4275
  2014
	fi
slouken@4275
  2015
      done
slouken@4275
  2016
      IFS="$lt_save_ifs"
slouken@4275
  2017
      ;;
slouken@4275
  2018
    esac],
slouken@4275
  2019
    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
slouken@4275
  2020
])# AC_ENABLE_FAST_INSTALL
slouken@4275
  2021
slouken@4275
  2022
slouken@4275
  2023
# AC_DISABLE_FAST_INSTALL
slouken@4275
  2024
# -----------------------
slouken@4275
  2025
# set the default to --disable-fast-install
slouken@4275
  2026
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
slouken@4275
  2027
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
slouken@4275
  2028
AC_ENABLE_FAST_INSTALL(no)
slouken@4275
  2029
])# AC_DISABLE_FAST_INSTALL
slouken@4275
  2030
slouken@4275
  2031
slouken@4275
  2032
# AC_LIBTOOL_PICMODE([MODE])
slouken@4275
  2033
# --------------------------
slouken@4275
  2034
# implement the --with-pic flag
slouken@4275
  2035
# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
slouken@4275
  2036
AC_DEFUN([AC_LIBTOOL_PICMODE],
slouken@4275
  2037
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
slouken@4275
  2038
pic_mode=ifelse($#,1,$1,default)
slouken@4275
  2039
])# AC_LIBTOOL_PICMODE
slouken@4275
  2040
slouken@4275
  2041
slouken@4275
  2042
# AC_PROG_EGREP
slouken@4275
  2043
# -------------
slouken@4275
  2044
# This is predefined starting with Autoconf 2.54, so this conditional
slouken@4275
  2045
# definition can be removed once we require Autoconf 2.54 or later.
slouken@4275
  2046
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
slouken@4275
  2047
[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
slouken@4275
  2048
   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
slouken@4275
  2049
    then ac_cv_prog_egrep='grep -E'
slouken@4275
  2050
    else ac_cv_prog_egrep='egrep'
slouken@4275
  2051
    fi])
slouken@4275
  2052
 EGREP=$ac_cv_prog_egrep
slouken@4275
  2053
 AC_SUBST([EGREP])
slouken@4275
  2054
])])
slouken@4275
  2055
slouken@4275
  2056
slouken@4275
  2057
# AC_PATH_TOOL_PREFIX
slouken@4275
  2058
# -------------------
slouken@4275
  2059
# find a file program which can recognise shared library
slouken@4275
  2060
AC_DEFUN([AC_PATH_TOOL_PREFIX],
slouken@4275
  2061
[AC_REQUIRE([AC_PROG_EGREP])dnl
slouken@4275
  2062
AC_MSG_CHECKING([for $1])
slouken@4275
  2063
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
slouken@4275
  2064
[case $MAGIC_CMD in
slouken@4275
  2065
[[\\/*] |  ?:[\\/]*])
slouken@4275
  2066
  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
slouken@4275
  2067
  ;;
slouken@4275
  2068
*)
slouken@4275
  2069
  lt_save_MAGIC_CMD="$MAGIC_CMD"
slouken@4275
  2070
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
slouken@4275
  2071
dnl $ac_dummy forces splitting on constant user-supplied paths.
slouken@4275
  2072
dnl POSIX.2 word splitting is done only on the output of word expansions,
slouken@4275
  2073
dnl not every word.  This closes a longstanding sh security hole.
slouken@4275
  2074
  ac_dummy="ifelse([$2], , $PATH, [$2])"
slouken@4275
  2075
  for ac_dir in $ac_dummy; do
slouken@4275
  2076
    IFS="$lt_save_ifs"
slouken@4275
  2077
    test -z "$ac_dir" && ac_dir=.
slouken@4275
  2078
    if test -f $ac_dir/$1; then
slouken@4275
  2079
      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
slouken@4275
  2080
      if test -n "$file_magic_test_file"; then
slouken@4275
  2081
	case $deplibs_check_method in
slouken@4275
  2082
	"file_magic "*)
slouken@4275
  2083
	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
slouken@4275
  2084
	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
slouken@4275
  2085
	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
slouken@4275
  2086
	    $EGREP "$file_magic_regex" > /dev/null; then
slouken@4275
  2087
	    :
slouken@4275
  2088
	  else
slouken@4275
  2089
	    cat <<EOF 1>&2
slouken@4275
  2090
slouken@4275
  2091
*** Warning: the command libtool uses to detect shared libraries,
slouken@4275
  2092
*** $file_magic_cmd, produces output that libtool cannot recognize.
slouken@4275
  2093
*** The result is that libtool may fail to recognize shared libraries
slouken@4275
  2094
*** as such.  This will affect the creation of libtool libraries that
slouken@4275
  2095
*** depend on shared libraries, but programs linked with such libtool
slouken@4275
  2096
*** libraries will work regardless of this problem.  Nevertheless, you
slouken@4275
  2097
*** may want to report the problem to your system manager and/or to
slouken@4275
  2098
*** bug-libtool@gnu.org
slouken@4275
  2099
slouken@4275
  2100
EOF
slouken@4275
  2101
	  fi ;;
slouken@4275
  2102
	esac
slouken@4275
  2103
      fi
slouken@4275
  2104
      break
slouken@4275
  2105
    fi
slouken@4275
  2106
  done
slouken@4275
  2107
  IFS="$lt_save_ifs"
slouken@4275
  2108
  MAGIC_CMD="$lt_save_MAGIC_CMD"
slouken@4275
  2109
  ;;
slouken@4275
  2110
esac])
slouken@4275
  2111
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
slouken@4275
  2112
if test -n "$MAGIC_CMD"; then
slouken@4275
  2113
  AC_MSG_RESULT($MAGIC_CMD)
slouken@4275
  2114
else
slouken@4275
  2115
  AC_MSG_RESULT(no)
slouken@4275
  2116
fi
slouken@4275
  2117
])# AC_PATH_TOOL_PREFIX
slouken@4275
  2118
slouken@4275
  2119
slouken@4275
  2120
# AC_PATH_MAGIC
slouken@4275
  2121
# -------------
slouken@4275
  2122
# find a file program which can recognise a shared library
slouken@4275
  2123
AC_DEFUN([AC_PATH_MAGIC],
slouken@4275
  2124
[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
slouken@4275
  2125
if test -z "$lt_cv_path_MAGIC_CMD"; then
slouken@4275
  2126
  if test -n "$ac_tool_prefix"; then
slouken@4275
  2127
    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
slouken@4275
  2128
  else
slouken@4275
  2129
    MAGIC_CMD=:
slouken@4275
  2130
  fi
slouken@4275
  2131
fi
slouken@4275
  2132
])# AC_PATH_MAGIC
slouken@4275
  2133
slouken@4275
  2134
slouken@4275
  2135
# AC_PROG_LD
slouken@4275
  2136
# ----------
slouken@4275
  2137
# find the pathname to the GNU or non-GNU linker
slouken@4275
  2138
AC_DEFUN([AC_PROG_LD],
slouken@4275
  2139
[AC_ARG_WITH([gnu-ld],
slouken@4275
  2140
    [AC_HELP_STRING([--with-gnu-ld],
slouken@4275
  2141
	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
slouken@4275
  2142
    [test "$withval" = no || with_gnu_ld=yes],
slouken@4275
  2143
    [with_gnu_ld=no])
slouken@4275
  2144
AC_REQUIRE([LT_AC_PROG_SED])dnl
slouken@4275
  2145
AC_REQUIRE([AC_PROG_CC])dnl
slouken@4275
  2146
AC_REQUIRE([AC_CANONICAL_HOST])dnl
slouken@4275
  2147
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
slouken@4275
  2148
ac_prog=ld
slouken@4275
  2149
if test "$GCC" = yes; then
slouken@4275
  2150
  # Check if gcc -print-prog-name=ld gives a path.
slouken@4275
  2151
  AC_MSG_CHECKING([for ld used by $CC])
slouken@4275
  2152
  case $host in
slouken@4275
  2153
  *-*-mingw*)
slouken@4275
  2154
    # gcc leaves a trailing carriage return which upsets mingw
slouken@4275
  2155
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
slouken@4275
  2156
  *)
slouken@4275
  2157
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
slouken@4275
  2158
  esac
slouken@4275
  2159
  case $ac_prog in
slouken@4275
  2160
    # Accept absolute paths.
slouken@4275
  2161
    [[\\/]]* | ?:[[\\/]]*)
slouken@4275
  2162
      re_direlt='/[[^/]][[^/]]*/\.\./'
slouken@4275
  2163
      # Canonicalize the pathname of ld
slouken@4275
  2164
      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
slouken@4275
  2165
      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
slouken@4275
  2166
	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
slouken@4275
  2167
      done
slouken@4275
  2168
      test -z "$LD" && LD="$ac_prog"
slouken@4275
  2169
      ;;
slouken@4275
  2170
  "")
slouken@4275
  2171
    # If it fails, then pretend we aren't using GCC.
slouken@4275
  2172
    ac_prog=ld
slouken@4275
  2173
    ;;
slouken@4275
  2174
  *)
slouken@4275
  2175
    # If it is relative, then search for the first ld in PATH.
slouken@4275
  2176
    with_gnu_ld=unknown
slouken@4275
  2177
    ;;
slouken@4275
  2178
  esac
slouken@4275
  2179
elif test "$with_gnu_ld" = yes; then
slouken@4275
  2180
  AC_MSG_CHECKING([for GNU ld])
slouken@4275
  2181
else
slouken@4275
  2182
  AC_MSG_CHECKING([for non-GNU ld])
slouken@4275
  2183
fi
slouken@4275
  2184
AC_CACHE_VAL(lt_cv_path_LD,
slouken@4275
  2185
[if test -z "$LD"; then
slouken@4275
  2186
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
slouken@4275
  2187
  for ac_dir in $PATH; do
slouken@4275
  2188
    IFS="$lt_save_ifs"
slouken@4275
  2189
    test -z "$ac_dir" && ac_dir=.
slouken@4275
  2190
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
slouken@4275
  2191
      lt_cv_path_LD="$ac_dir/$ac_prog"
slouken@4275
  2192
      # Check to see if the program is GNU ld.  I'd rather use --version,
slouken@4275
  2193
      # but apparently some variants of GNU ld only accept -v.
slouken@4275
  2194
      # Break only if it was the GNU/non-GNU ld that we prefer.
slouken@4275
  2195
      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
slouken@4275
  2196
      *GNU* | *'with BFD'*)
slouken@4275
  2197
	test "$with_gnu_ld" != no && break
slouken@4275
  2198
	;;
slouken@4275
  2199
      *)
slouken@4275
  2200
	test "$with_gnu_ld" != yes && break
slouken@4275
  2201
	;;
slouken@4275
  2202
      esac
slouken@4275
  2203
    fi
slouken@4275
  2204
  done
slouken@4275
  2205
  IFS="$lt_save_ifs"
slouken@4275
  2206
else
slouken@4275
  2207
  lt_cv_path_LD="$LD" # Let the user override the test with a path.
slouken@4275
  2208
fi])
slouken@4275
  2209
LD="$lt_cv_path_LD"
slouken@4275
  2210
if test -n "$LD"; then
slouken@4275
  2211
  AC_MSG_RESULT($LD)
slouken@4275
  2212
else
slouken@4275
  2213
  AC_MSG_RESULT(no)
slouken@4275
  2214
fi
slouken@4275
  2215
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
slouken@4275
  2216
AC_PROG_LD_GNU
slouken@4275
  2217
])# AC_PROG_LD
slouken@4275
  2218
slouken@4275
  2219
slouken@4275
  2220
# AC_PROG_LD_GNU
slouken@4275
  2221
# --------------
slouken@4275
  2222
AC_DEFUN([AC_PROG_LD_GNU],
slouken@4275
  2223
[AC_REQUIRE([AC_PROG_EGREP])dnl
slouken@4275
  2224
AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
slouken@4275
  2225
[# I'd rather use --version here, but apparently some GNU lds only accept -v.
slouken@4275
  2226
case `$LD -v 2>&1 </dev/null` in
slouken@4275
  2227
*GNU* | *'with BFD'*)
slouken@4275
  2228
  lt_cv_prog_gnu_ld=yes
slouken@4275
  2229
  ;;
slouken@4275
  2230
*)
slouken@4275
  2231
  lt_cv_prog_gnu_ld=no
slouken@4275
  2232
  ;;
slouken@4275
  2233
esac])
slouken@4275
  2234
with_gnu_ld=$lt_cv_prog_gnu_ld
slouken@4275
  2235
])# AC_PROG_LD_GNU
slouken@4275
  2236
slouken@4275
  2237
slouken@4275
  2238
# AC_PROG_LD_RELOAD_FLAG
slouken@4275
  2239
# ----------------------
slouken@4275
  2240
# find reload flag for linker
slouken@4275
  2241
#   -- PORTME Some linkers may need a different reload flag.
slouken@4275
  2242
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
slouken@4275
  2243
[AC_CACHE_CHECK([for $LD option to reload object files],
slouken@4275
  2244
  lt_cv_ld_reload_flag,
slouken@4275
  2245
  [lt_cv_ld_reload_flag='-r'])
slouken@4275
  2246
reload_flag=$lt_cv_ld_reload_flag
slouken@4275
  2247
case $reload_flag in
slouken@4275
  2248
"" | " "*) ;;
slouken@4275
  2249
*) reload_flag=" $reload_flag" ;;
slouken@4275
  2250
esac
slouken@4275
  2251
reload_cmds='$LD$reload_flag -o $output$reload_objs'
slouken@4275
  2252
case $host_os in
slouken@4275
  2253
  darwin*)
slouken@4275
  2254
    if test "$GCC" = yes; then
slouken@4275
  2255
      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
slouken@4275
  2256
    else
slouken@4275
  2257
      reload_cmds='$LD$reload_flag -o $output$reload_objs'
slouken@4275
  2258
    fi
slouken@4275
  2259
    ;;
slouken@4275
  2260
esac
slouken@4275
  2261
])# AC_PROG_LD_RELOAD_FLAG
slouken@4275
  2262
slouken@4275
  2263
slouken@4275
  2264
# AC_DEPLIBS_CHECK_METHOD
slouken@4275
  2265
# -----------------------
slouken@4275
  2266
# how to check for library dependencies
slouken@4275
  2267
#  -- PORTME fill in with the dynamic library characteristics
slouken@4275
  2268
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
slouken@4275
  2269
[AC_CACHE_CHECK([how to recognise dependent libraries],
slouken@4275
  2270
lt_cv_deplibs_check_method,
slouken@4275
  2271
[lt_cv_file_magic_cmd='$MAGIC_CMD'
slouken@4275
  2272
lt_cv_file_magic_test_file=
slouken@4275
  2273
lt_cv_deplibs_check_method='unknown'
slouken@4275
  2274
# Need to set the preceding variable on all platforms that support
slouken@4275
  2275
# interlibrary dependencies.
slouken@4275
  2276
# 'none' -- dependencies not supported.
slouken@4275
  2277
# `unknown' -- same as none, but documents that we really don't know.
slouken@4275
  2278
# 'pass_all' -- all dependencies passed with no checks.
slouken@4275
  2279
# 'test_compile' -- check by making test program.
slouken@4275
  2280
# 'file_magic [[regex]]' -- check by looking for files in library path
slouken@4275
  2281
# which responds to the $file_magic_cmd with a given extended regex.
slouken@4275
  2282
# If you have `file' or equivalent on your system and you're not sure
slouken@4275
  2283
# whether `pass_all' will *always* work, you probably want this one.
slouken@4275
  2284
slouken@4275
  2285
case $host_os in
slouken@4275
  2286
aix4* | aix5*)
slouken@4275
  2287
  lt_cv_deplibs_check_method=pass_all
slouken@4275
  2288
  ;;
slouken@4275
  2289
slouken@4275
  2290
beos*)
slouken@4275
  2291
  lt_cv_deplibs_check_method=pass_all
slouken@4275
  2292
  ;;
slouken@4275
  2293
slouken@4275
  2294
bsdi[[45]]*)
slouken@4275
  2295
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
slouken@4275
  2296
  lt_cv_file_magic_cmd='/usr/bin/file -L'
slouken@4275
  2297
  lt_cv_file_magic_test_file=/shlib/libc.so
slouken@4275
  2298
  ;;
slouken@4275
  2299
slouken@4275
  2300
cygwin*)
slouken@4275
  2301
  # func_win32_libid is a shell function defined in ltmain.sh
slouken@4275
  2302
  #lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
slouken@4275
  2303
  lt_cv_deplibs_check_method=pass_all
slouken@4275
  2304
  lt_cv_file_magic_cmd='func_win32_libid'
slouken@4275
  2305
  ;;
slouken@4275
  2306
slouken@4275
  2307
mingw* | pw32*)
slouken@4275
  2308
  # Base MSYS/MinGW do not provide the 'file' command needed by
slouken@4275
  2309
  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
slouken@4275
  2310
  #lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
slouken@4275
  2311
  lt_cv_deplibs_check_method=pass_all
slouken@4275
  2312
  lt_cv_file_magic_cmd='$OBJDUMP -f'
slouken@4275
  2313
  ;;
slouken@4275
  2314
slouken@4275
  2315
darwin* | rhapsody*)
slouken@4275
  2316
  lt_cv_deplibs_check_method=pass_all
slouken@4275
  2317
  ;;
slouken@4275
  2318
slouken@4275
  2319
freebsd* | kfreebsd*-gnu | dragonfly*)
slouken@4275
  2320
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
slouken@4275
  2321
    case $host_cpu in
slouken@4275
  2322
    i*86 )
slouken@4275
  2323
      # Not sure whether the presence of OpenBSD here was a mistake.
slouken@4275
  2324
      # Let's accept both of them until this is cleared up.
slouken@4275
  2325
      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
slouken@4275
  2326
      lt_cv_file_magic_cmd=/usr/bin/file
slouken@4275
  2327
      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
slouken@4275
  2328
      ;;
slouken@4275
  2329
    esac
slouken@4275
  2330
  else
slouken@4275
  2331
    lt_cv_deplibs_check_method=pass_all
slouken@4275
  2332
  fi
slouken@4275
  2333
  ;;
slouken@4275
  2334
slouken@4275
  2335
gnu*)
slouken@4275
  2336
  lt_cv_deplibs_check_method=pass_all
slouken@4275
  2337
  ;;
slouken@4275
  2338
slouken@4275
  2339
hpux10.20* | hpux11*)
slouken@4275
  2340
  lt_cv_file_magic_cmd=/usr/bin/file
slouken@4275
  2341
  case $host_cpu in
slouken@4275
  2342
  ia64*)
slouken@4275
  2343
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
slouken@4275
  2344
    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
slouken@4275
  2345
    ;;
slouken@4275
  2346
  hppa*64*)
slouken@4275
  2347
    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
slouken@4275
  2348
    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
slouken@4275
  2349
    ;;
slouken@4275
  2350
  *)
slouken@4275
  2351
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
slouken@4275
  2352
    lt_cv_file_magic_test_file=/usr/lib/libc.sl
slouken@4275
  2353
    ;;
slouken@4275
  2354
  esac
slouken@4275
  2355
  ;;
slouken@4275
  2356
slouken@4275
  2357
interix3*)
slouken@4275
  2358
  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
slouken@4275
  2359
  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
slouken@4275
  2360
  ;;
slouken@4275
  2361
slouken@4275
  2362
irix5* | irix6* | nonstopux*)
slouken@4275
  2363
  case $LD in
slouken@4275
  2364
  *-32|*"-32 ") libmagic=32-bit;;
slouken@4275
  2365
  *-n32|*"-n32 ") libmagic=N32;;
slouken@4275
  2366
  *-64|*"-64 ") libmagic=64-bit;;
slouken@4275
  2367
  *) libmagic=never-match;;
slouken@4275
  2368
  esac
slouken@4275
  2369
  lt_cv_deplibs_check_method=pass_all
slouken@4275
  2370
  ;;
slouken@4275
  2371
slouken@4275
  2372
# This must be Linux ELF.
slouken@4275
  2373
linux*)
slouken@4275
  2374
  lt_cv_deplibs_check_method=pass_all
slouken@4275
  2375
  ;;
slouken@4275
  2376
slouken@4275
  2377
netbsd*)
slouken@4275
  2378
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
slouken@4275
  2379
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
slouken@4275
  2380
  else
slouken@4275
  2381
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
slouken@4275
  2382
  fi
slouken@4275
  2383
  ;;
slouken@4275
  2384
slouken@4275
  2385
newos6*)
slouken@4275
  2386
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
slouken@4275
  2387
  lt_cv_file_magic_cmd=/usr/bin/file
slouken@4275
  2388
  lt_cv_file_magic_test_file=/usr/lib/libnls.so
slouken@4275
  2389
  ;;
slouken@4275
  2390
slouken@4275
  2391
nto-qnx*)
slouken@4275
  2392
  lt_cv_deplibs_check_method=unknown
slouken@4275
  2393
  ;;
slouken@4275
  2394
slouken@4275
  2395
openbsd*)
slouken@4275
  2396
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
slouken@4275
  2397
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
slouken@4275
  2398
  else
slouken@4275
  2399
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
slouken@4275
  2400
  fi
slouken@4275
  2401
  ;;
slouken@4275
  2402
slouken@4275
  2403
osf3* | osf4* | osf5*)
slouken@4275
  2404
  lt_cv_deplibs_check_method=pass_all
slouken@4275
  2405
  ;;
slouken@4275
  2406
slouken@4275
  2407
solaris*)
slouken@4275
  2408
  lt_cv_deplibs_check_method=pass_all
slouken@4275
  2409
  ;;
slouken@4275
  2410
slouken@4275
  2411
sysv4 | sysv4.3*)
slouken@4275
  2412
  case $host_vendor in
slouken@4275
  2413
  motorola)
slouken@4275
  2414
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
slouken@4275
  2415
    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
slouken@4275
  2416
    ;;
slouken@4275
  2417
  ncr)
slouken@4275
  2418
    lt_cv_deplibs_check_method=pass_all
slouken@4275
  2419
    ;;
slouken@4275
  2420
  sequent)
slouken@4275
  2421
    lt_cv_file_magic_cmd='/bin/file'
slouken@4275
  2422
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
slouken@4275
  2423
    ;;
slouken@4275
  2424
  sni)
slouken@4275
  2425
    lt_cv_file_magic_cmd='/bin/file'
slouken@4275
  2426
    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
slouken@4275
  2427
    lt_cv_file_magic_test_file=/lib/libc.so
slouken@4275
  2428
    ;;
slouken@4275
  2429
  siemens)
slouken@4275
  2430
    lt_cv_deplibs_check_method=pass_all
slouken@4275
  2431
    ;;
slouken@4275
  2432
  pc)
slouken@4275
  2433
    lt_cv_deplibs_check_method=pass_all
slouken@4275
  2434
    ;;
slouken@4275
  2435
  esac
slouken@4275
  2436
  ;;
slouken@4275
  2437
slouken@4275
  2438
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
slouken@4275
  2439
  lt_cv_deplibs_check_method=pass_all
slouken@4275
  2440
  ;;
slouken@4275
  2441
esac
slouken@4275
  2442
])
slouken@4275
  2443
file_magic_cmd=$lt_cv_file_magic_cmd
slouken@4275
  2444
deplibs_check_method=$lt_cv_deplibs_check_method
slouken@4275
  2445
test -z "$deplibs_check_method" && deplibs_check_method=unknown
slouken@4275
  2446
])# AC_DEPLIBS_CHECK_METHOD
slouken@4275
  2447
slouken@4275
  2448
slouken@4275
  2449
# AC_PROG_NM
slouken@4275
  2450
# ----------
slouken@4275
  2451
# find the pathname to a BSD-compatible name lister
slouken@4275
  2452
AC_DEFUN([AC_PROG_NM],
slouken@4275
  2453
[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
slouken@4275
  2454
[if test -n "$NM"; then
slouken@4275
  2455
  # Let the user override the test.
slouken@4275
  2456
  lt_cv_path_NM="$NM"
slouken@4275
  2457
else
slouken@4275
  2458
  lt_nm_to_check="${ac_tool_prefix}nm"
slouken@4275
  2459
  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 
slouken@4275
  2460
    lt_nm_to_check="$lt_nm_to_check nm"
slouken@4275
  2461
  fi
slouken@4275
  2462
  for lt_tmp_nm in $lt_nm_to_check; do
slouken@4275
  2463
    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
slouken@4275
  2464
    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
slouken@4275
  2465
      IFS="$lt_save_ifs"
slouken@4275
  2466
      test -z "$ac_dir" && ac_dir=.
slouken@4275
  2467
      tmp_nm="$ac_dir/$lt_tmp_nm"
slouken@4275
  2468
      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
slouken@4275
  2469
	# Check to see if the nm accepts a BSD-compat flag.
slouken@4275
  2470
	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
slouken@4275
  2471
	#   nm: unknown option "B" ignored
slouken@4275
  2472
	# Tru64's nm complains that /dev/null is an invalid object file
slouken@4275
  2473
	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
slouken@4275
  2474
	*/dev/null* | *'Invalid file or object type'*)
slouken@4275
  2475
	  lt_cv_path_NM="$tmp_nm -B"
slouken@4275
  2476
	  break
slouken@4275
  2477
	  ;;
slouken@4275
  2478
	*)
slouken@4275
  2479
	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
slouken@4275
  2480
	  */dev/null*)
slouken@4275
  2481
	    lt_cv_path_NM="$tmp_nm -p"
slouken@4275
  2482
	    break
slouken@4275
  2483
	    ;;
slouken@4275
  2484
	  *)
slouken@4275
  2485
	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
slouken@4275
  2486
	    continue # so that we can try to find one that supports BSD flags
slouken@4275
  2487
	    ;;
slouken@4275
  2488
	  esac
slouken@4275
  2489
	  ;;
slouken@4275
  2490
	esac
slouken@4275
  2491
      fi
slouken@4275
  2492
    done
slouken@4275
  2493
    IFS="$lt_save_ifs"
slouken@4275
  2494
  done
slouken@4275
  2495
  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
slouken@4275
  2496
fi])
slouken@4275
  2497
NM="$lt_cv_path_NM"
slouken@4275
  2498
])# AC_PROG_NM
slouken@4275
  2499
slouken@4275
  2500
slouken@4275
  2501
# AC_CHECK_LIBM
slouken@4275
  2502
# -------------
slouken@4275
  2503
# check for math library
slouken@4275
  2504
AC_DEFUN([AC_CHECK_LIBM],
slouken@4275
  2505
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
slouken@4275
  2506
LIBM=
slouken@4275
  2507
case $host in
slouken@4275
  2508
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
slouken@4275
  2509
  # These system don't have libm, or don't need it
slouken@4275
  2510
  ;;
slouken@4275
  2511
*-ncr-sysv4.3*)
slouken@4275
  2512
  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
slouken@4275
  2513
  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
slouken@4275
  2514
  ;;
slouken@4275
  2515
*)
slouken@4275
  2516
  AC_CHECK_LIB(m, cos, LIBM="-lm")
slouken@4275
  2517
  ;;
slouken@4275
  2518
esac
slouken@4275
  2519
])# AC_CHECK_LIBM
slouken@4275
  2520
slouken@4275
  2521
slouken@4275
  2522
# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
slouken@4275
  2523
# -----------------------------------
slouken@4275
  2524
# sets LIBLTDL to the link flags for the libltdl convenience library and
slouken@4275
  2525
# LTDLINCL to the include flags for the libltdl header and adds
slouken@4275
  2526
# --enable-ltdl-convenience to the configure arguments.  Note that
slouken@4275
  2527
# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
slouken@4275
  2528
# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
slouken@4275
  2529
# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
slouken@4275
  2530
# (note the single quotes!).  If your package is not flat and you're not
slouken@4275
  2531
# using automake, define top_builddir and top_srcdir appropriately in
slouken@4275
  2532
# the Makefiles.
slouken@4275
  2533
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
slouken@4275
  2534
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
slouken@4275
  2535
  case $enable_ltdl_convenience in
slouken@4275
  2536
  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
slouken@4275
  2537
  "") enable_ltdl_convenience=yes
slouken@4275
  2538
      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
slouken@4275
  2539
  esac
slouken@4275
  2540
  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
slouken@4275
  2541
  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
slouken@4275
  2542
  # For backwards non-gettext consistent compatibility...
slouken@4275
  2543
  INCLTDL="$LTDLINCL"
slouken@4275
  2544
])# AC_LIBLTDL_CONVENIENCE
slouken@4275
  2545
slouken@4275
  2546
slouken@4275
  2547
# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
slouken@4275
  2548
# -----------------------------------
slouken@4275
  2549
# sets LIBLTDL to the link flags for the libltdl installable library and
slouken@4275
  2550
# LTDLINCL to the include flags for the libltdl header and adds
slouken@4275
  2551
# --enable-ltdl-install to the configure arguments.  Note that
slouken@4275
  2552
# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
slouken@4275
  2553
# and an installed libltdl is not found, it is assumed to be `libltdl'.
slouken@4275
  2554
# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
slouken@4275
  2555
# '${top_srcdir}/' (note the single quotes!).  If your package is not
slouken@4275
  2556
# flat and you're not using automake, define top_builddir and top_srcdir
slouken@4275
  2557
# appropriately in the Makefiles.
slouken@4275
  2558
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
slouken@4275
  2559
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
slouken@4275
  2560
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
slouken@4275
  2561
  AC_CHECK_LIB(ltdl, lt_dlinit,
slouken@4275
  2562
  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
slouken@4275
  2563
  [if test x"$enable_ltdl_install" = xno; then
slouken@4275
  2564
     AC_MSG_WARN([libltdl not installed, but installation disabled])
slouken@4275
  2565
   else
slouken@4275
  2566
     enable_ltdl_install=yes
slouken@4275
  2567
   fi
slouken@4275
  2568
  ])
slouken@4275
  2569
  if test x"$enable_ltdl_install" = x"yes"; then
slouken@4275
  2570
    ac_configure_args="$ac_configure_args --enable-ltdl-install"
slouken@4275
  2571
    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
slouken@4275
  2572
    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
slouken@4275
  2573
  else
slouken@4275
  2574
    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
slouken@4275
  2575
    LIBLTDL="-lltdl"
slouken@4275
  2576
    LTDLINCL=
slouken@4275
  2577
  fi
slouken@4275
  2578
  # For backwards non-gettext consistent compatibility...
slouken@4275
  2579
  INCLTDL="$LTDLINCL"