libgnomevfs2-mythtv/m4/libtool.m4
author renatofilho
Wed Aug 15 13:33:12 2007 +0100 (2007-08-15)
branchtrunk
changeset 803 b1d0964060b3
permissions -rw-r--r--
[svn r809] fixed bugs on transcode
renatofilho@642
     1
# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
renatofilho@642
     2
## Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
renatofilho@642
     3
## Free Software Foundation, Inc.
renatofilho@642
     4
## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
renatofilho@642
     5
##
renatofilho@642
     6
## This file is free software; the Free Software Foundation gives
renatofilho@642
     7
## unlimited permission to copy and/or distribute it, with or without
renatofilho@642
     8
## modifications, as long as this notice is preserved.
renatofilho@642
     9
renatofilho@642
    10
# serial 48 Debian 1.5.22-4 AC_PROG_LIBTOOL
renatofilho@642
    11
renatofilho@642
    12
renatofilho@642
    13
# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
renatofilho@642
    14
# -----------------------------------------------------------
renatofilho@642
    15
# If this macro is not defined by Autoconf, define it here.
renatofilho@642
    16
m4_ifdef([AC_PROVIDE_IFELSE],
renatofilho@642
    17
         [],
renatofilho@642
    18
         [m4_define([AC_PROVIDE_IFELSE],
renatofilho@642
    19
	         [m4_ifdef([AC_PROVIDE_$1],
renatofilho@642
    20
		           [$2], [$3])])])
renatofilho@642
    21
renatofilho@642
    22
renatofilho@642
    23
# AC_PROG_LIBTOOL
renatofilho@642
    24
# ---------------
renatofilho@642
    25
AC_DEFUN([AC_PROG_LIBTOOL],
renatofilho@642
    26
[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
renatofilho@642
    27
dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
renatofilho@642
    28
dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
renatofilho@642
    29
  AC_PROVIDE_IFELSE([AC_PROG_CXX],
renatofilho@642
    30
    [AC_LIBTOOL_CXX],
renatofilho@642
    31
    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
renatofilho@642
    32
  ])])
renatofilho@642
    33
dnl And a similar setup for Fortran 77 support
renatofilho@642
    34
  AC_PROVIDE_IFELSE([AC_PROG_F77],
renatofilho@642
    35
    [AC_LIBTOOL_F77],
renatofilho@642
    36
    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
renatofilho@642
    37
])])
renatofilho@642
    38
renatofilho@642
    39
dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
renatofilho@642
    40
dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
renatofilho@642
    41
dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
renatofilho@642
    42
  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
renatofilho@642
    43
    [AC_LIBTOOL_GCJ],
renatofilho@642
    44
    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
renatofilho@642
    45
      [AC_LIBTOOL_GCJ],
renatofilho@642
    46
      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
renatofilho@642
    47
	[AC_LIBTOOL_GCJ],
renatofilho@642
    48
      [ifdef([AC_PROG_GCJ],
renatofilho@642
    49
	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
renatofilho@642
    50
       ifdef([A][M_PROG_GCJ],
renatofilho@642
    51
	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
renatofilho@642
    52
       ifdef([LT_AC_PROG_GCJ],
renatofilho@642
    53
	     [define([LT_AC_PROG_GCJ],
renatofilho@642
    54
		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
renatofilho@642
    55
])])# AC_PROG_LIBTOOL
renatofilho@642
    56
renatofilho@642
    57
renatofilho@642
    58
# _AC_PROG_LIBTOOL
renatofilho@642
    59
# ----------------
renatofilho@642
    60
AC_DEFUN([_AC_PROG_LIBTOOL],
renatofilho@642
    61
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
renatofilho@642
    62
AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
renatofilho@642
    63
AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
renatofilho@642
    64
AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
renatofilho@642
    65
renatofilho@642
    66
# This can be used to rebuild libtool when needed
renatofilho@642
    67
LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
renatofilho@642
    68
renatofilho@642
    69
# Always use our own libtool.
renatofilho@642
    70
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
renatofilho@642
    71
AC_SUBST(LIBTOOL)dnl
renatofilho@642
    72
renatofilho@642
    73
# Prevent multiple expansion
renatofilho@642
    74
define([AC_PROG_LIBTOOL], [])
renatofilho@642
    75
])# _AC_PROG_LIBTOOL
renatofilho@642
    76
renatofilho@642
    77
renatofilho@642
    78
# AC_LIBTOOL_SETUP
renatofilho@642
    79
# ----------------
renatofilho@642
    80
AC_DEFUN([AC_LIBTOOL_SETUP],
renatofilho@642
    81
[AC_PREREQ(2.50)dnl
renatofilho@642
    82
AC_REQUIRE([AC_ENABLE_SHARED])dnl
renatofilho@642
    83
AC_REQUIRE([AC_ENABLE_STATIC])dnl
renatofilho@642
    84
AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
renatofilho@642
    85
AC_REQUIRE([AC_CANONICAL_HOST])dnl
renatofilho@642
    86
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
renatofilho@642
    87
AC_REQUIRE([AC_PROG_CC])dnl
renatofilho@642
    88
AC_REQUIRE([AC_PROG_LD])dnl
renatofilho@642
    89
AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
renatofilho@642
    90
AC_REQUIRE([AC_PROG_NM])dnl
renatofilho@642
    91
renatofilho@642
    92
AC_REQUIRE([AC_PROG_LN_S])dnl
renatofilho@642
    93
AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
renatofilho@642
    94
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
renatofilho@642
    95
AC_REQUIRE([AC_OBJEXT])dnl
renatofilho@642
    96
AC_REQUIRE([AC_EXEEXT])dnl
renatofilho@642
    97
dnl
renatofilho@642
    98
renatofilho@642
    99
AC_LIBTOOL_SYS_MAX_CMD_LEN
renatofilho@642
   100
AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
renatofilho@642
   101
AC_LIBTOOL_OBJDIR
renatofilho@642
   102
renatofilho@642
   103
AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
renatofilho@642
   104
_LT_AC_PROG_ECHO_BACKSLASH
renatofilho@642
   105
renatofilho@642
   106
case $host_os in
renatofilho@642
   107
aix3*)
renatofilho@642
   108
  # AIX sometimes has problems with the GCC collect2 program.  For some
renatofilho@642
   109
  # reason, if we set the COLLECT_NAMES environment variable, the problems
renatofilho@642
   110
  # vanish in a puff of smoke.
renatofilho@642
   111
  if test "X${COLLECT_NAMES+set}" != Xset; then
renatofilho@642
   112
    COLLECT_NAMES=
renatofilho@642
   113
    export COLLECT_NAMES
renatofilho@642
   114
  fi
renatofilho@642
   115
  ;;
renatofilho@642
   116
esac
renatofilho@642
   117
renatofilho@642
   118
# Sed substitution that helps us do robust quoting.  It backslashifies
renatofilho@642
   119
# metacharacters that are still active within double-quoted strings.
renatofilho@642
   120
Xsed='sed -e 1s/^X//'
renatofilho@642
   121
[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
renatofilho@642
   122
renatofilho@642
   123
# Same as above, but do not quote variable references.
renatofilho@642
   124
[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
renatofilho@642
   125
renatofilho@642
   126
# Sed substitution to delay expansion of an escaped shell variable in a
renatofilho@642
   127
# double_quote_subst'ed string.
renatofilho@642
   128
delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
renatofilho@642
   129
renatofilho@642
   130
# Sed substitution to avoid accidental globbing in evaled expressions
renatofilho@642
   131
no_glob_subst='s/\*/\\\*/g'
renatofilho@642
   132
renatofilho@642
   133
# Constants:
renatofilho@642
   134
rm="rm -f"
renatofilho@642
   135
renatofilho@642
   136
# Global variables:
renatofilho@642
   137
default_ofile=libtool
renatofilho@642
   138
can_build_shared=yes
renatofilho@642
   139
renatofilho@642
   140
# All known linkers require a `.a' archive for static linking (except MSVC,
renatofilho@642
   141
# which needs '.lib').
renatofilho@642
   142
libext=a
renatofilho@642
   143
ltmain="$ac_aux_dir/ltmain.sh"
renatofilho@642
   144
ofile="$default_ofile"
renatofilho@642
   145
with_gnu_ld="$lt_cv_prog_gnu_ld"
renatofilho@642
   146
renatofilho@642
   147
AC_CHECK_TOOL(AR, ar, false)
renatofilho@642
   148
AC_CHECK_TOOL(RANLIB, ranlib, :)
renatofilho@642
   149
AC_CHECK_TOOL(STRIP, strip, :)
renatofilho@642
   150
renatofilho@642
   151
old_CC="$CC"
renatofilho@642
   152
old_CFLAGS="$CFLAGS"
renatofilho@642
   153
renatofilho@642
   154
# Set sane defaults for various variables
renatofilho@642
   155
test -z "$AR" && AR=ar
renatofilho@642
   156
test -z "$AR_FLAGS" && AR_FLAGS=cru
renatofilho@642
   157
test -z "$AS" && AS=as
renatofilho@642
   158
test -z "$CC" && CC=cc
renatofilho@642
   159
test -z "$LTCC" && LTCC=$CC
renatofilho@642
   160
test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
renatofilho@642
   161
test -z "$DLLTOOL" && DLLTOOL=dlltool
renatofilho@642
   162
test -z "$LD" && LD=ld
renatofilho@642
   163
test -z "$LN_S" && LN_S="ln -s"
renatofilho@642
   164
test -z "$MAGIC_CMD" && MAGIC_CMD=file
renatofilho@642
   165
test -z "$NM" && NM=nm
renatofilho@642
   166
test -z "$SED" && SED=sed
renatofilho@642
   167
test -z "$OBJDUMP" && OBJDUMP=objdump
renatofilho@642
   168
test -z "$RANLIB" && RANLIB=:
renatofilho@642
   169
test -z "$STRIP" && STRIP=:
renatofilho@642
   170
test -z "$ac_objext" && ac_objext=o
renatofilho@642
   171
renatofilho@642
   172
# Determine commands to create old-style static archives.
renatofilho@642
   173
old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
renatofilho@642
   174
old_postinstall_cmds='chmod 644 $oldlib'
renatofilho@642
   175
old_postuninstall_cmds=
renatofilho@642
   176
renatofilho@642
   177
if test -n "$RANLIB"; then
renatofilho@642
   178
  case $host_os in
renatofilho@642
   179
  openbsd*)
renatofilho@642
   180
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
renatofilho@642
   181
    ;;
renatofilho@642
   182
  *)
renatofilho@642
   183
    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
renatofilho@642
   184
    ;;
renatofilho@642
   185
  esac
renatofilho@642
   186
  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
renatofilho@642
   187
fi
renatofilho@642
   188
renatofilho@642
   189
_LT_CC_BASENAME([$compiler])
renatofilho@642
   190
renatofilho@642
   191
# Only perform the check for file, if the check method requires it
renatofilho@642
   192
case $deplibs_check_method in
renatofilho@642
   193
file_magic*)
renatofilho@642
   194
  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
renatofilho@642
   195
    AC_PATH_MAGIC
renatofilho@642
   196
  fi
renatofilho@642
   197
  ;;
renatofilho@642
   198
esac
renatofilho@642
   199
renatofilho@642
   200
AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
renatofilho@642
   201
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
renatofilho@642
   202
enable_win32_dll=yes, enable_win32_dll=no)
renatofilho@642
   203
renatofilho@642
   204
AC_ARG_ENABLE([libtool-lock],
renatofilho@642
   205
    [AC_HELP_STRING([--disable-libtool-lock],
renatofilho@642
   206
	[avoid locking (might break parallel builds)])])
renatofilho@642
   207
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
renatofilho@642
   208
renatofilho@642
   209
AC_ARG_WITH([pic],
renatofilho@642
   210
    [AC_HELP_STRING([--with-pic],
renatofilho@642
   211
	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
renatofilho@642
   212
    [pic_mode="$withval"],
renatofilho@642
   213
    [pic_mode=default])
renatofilho@642
   214
test -z "$pic_mode" && pic_mode=default
renatofilho@642
   215
renatofilho@642
   216
# Use C for the default configuration in the libtool script
renatofilho@642
   217
tagname=
renatofilho@642
   218
AC_LIBTOOL_LANG_C_CONFIG
renatofilho@642
   219
_LT_AC_TAGCONFIG
renatofilho@642
   220
])# AC_LIBTOOL_SETUP
renatofilho@642
   221
renatofilho@642
   222
renatofilho@642
   223
# _LT_AC_SYS_COMPILER
renatofilho@642
   224
# -------------------
renatofilho@642
   225
AC_DEFUN([_LT_AC_SYS_COMPILER],
renatofilho@642
   226
[AC_REQUIRE([AC_PROG_CC])dnl
renatofilho@642
   227
renatofilho@642
   228
# If no C compiler was specified, use CC.
renatofilho@642
   229
LTCC=${LTCC-"$CC"}
renatofilho@642
   230
renatofilho@642
   231
# If no C compiler flags were specified, use CFLAGS.
renatofilho@642
   232
LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
renatofilho@642
   233
renatofilho@642
   234
# Allow CC to be a program name with arguments.
renatofilho@642
   235
compiler=$CC
renatofilho@642
   236
])# _LT_AC_SYS_COMPILER
renatofilho@642
   237
renatofilho@642
   238
renatofilho@642
   239
# _LT_CC_BASENAME(CC)
renatofilho@642
   240
# -------------------
renatofilho@642
   241
# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
renatofilho@642
   242
AC_DEFUN([_LT_CC_BASENAME],
renatofilho@642
   243
[for cc_temp in $1""; do
renatofilho@642
   244
  case $cc_temp in
renatofilho@642
   245
    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
renatofilho@642
   246
    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
renatofilho@642
   247
    \-*) ;;
renatofilho@642
   248
    *) break;;
renatofilho@642
   249
  esac
renatofilho@642
   250
done
renatofilho@642
   251
cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
renatofilho@642
   252
])
renatofilho@642
   253
renatofilho@642
   254
renatofilho@642
   255
# _LT_COMPILER_BOILERPLATE
renatofilho@642
   256
# ------------------------
renatofilho@642
   257
# Check for compiler boilerplate output or warnings with
renatofilho@642
   258
# the simple compiler test code.
renatofilho@642
   259
AC_DEFUN([_LT_COMPILER_BOILERPLATE],
renatofilho@642
   260
[ac_outfile=conftest.$ac_objext
renatofilho@642
   261
printf "$lt_simple_compile_test_code" >conftest.$ac_ext
renatofilho@642
   262
eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
renatofilho@642
   263
_lt_compiler_boilerplate=`cat conftest.err`
renatofilho@642
   264
$rm conftest*
renatofilho@642
   265
])# _LT_COMPILER_BOILERPLATE
renatofilho@642
   266
renatofilho@642
   267
renatofilho@642
   268
# _LT_LINKER_BOILERPLATE
renatofilho@642
   269
# ----------------------
renatofilho@642
   270
# Check for linker boilerplate output or warnings with
renatofilho@642
   271
# the simple link test code.
renatofilho@642
   272
AC_DEFUN([_LT_LINKER_BOILERPLATE],
renatofilho@642
   273
[ac_outfile=conftest.$ac_objext
renatofilho@642
   274
printf "$lt_simple_link_test_code" >conftest.$ac_ext
renatofilho@642
   275
eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
renatofilho@642
   276
_lt_linker_boilerplate=`cat conftest.err`
renatofilho@642
   277
$rm conftest*
renatofilho@642
   278
])# _LT_LINKER_BOILERPLATE
renatofilho@642
   279
renatofilho@642
   280
renatofilho@642
   281
# _LT_AC_SYS_LIBPATH_AIX
renatofilho@642
   282
# ----------------------
renatofilho@642
   283
# Links a minimal program and checks the executable
renatofilho@642
   284
# for the system default hardcoded library path. In most cases,
renatofilho@642
   285
# this is /usr/lib:/lib, but when the MPI compilers are used
renatofilho@642
   286
# the location of the communication and MPI libs are included too.
renatofilho@642
   287
# If we don't find anything, use the default library path according
renatofilho@642
   288
# to the aix ld manual.
renatofilho@642
   289
AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
renatofilho@642
   290
[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
renatofilho@642
   291
aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
renatofilho@642
   292
}'`
renatofilho@642
   293
# Check for a 64-bit object if we didn't find anything.
renatofilho@642
   294
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; }
renatofilho@642
   295
}'`; fi],[])
renatofilho@642
   296
if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
renatofilho@642
   297
])# _LT_AC_SYS_LIBPATH_AIX
renatofilho@642
   298
renatofilho@642
   299
renatofilho@642
   300
# _LT_AC_SHELL_INIT(ARG)
renatofilho@642
   301
# ----------------------
renatofilho@642
   302
AC_DEFUN([_LT_AC_SHELL_INIT],
renatofilho@642
   303
[ifdef([AC_DIVERSION_NOTICE],
renatofilho@642
   304
	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
renatofilho@642
   305
	 [AC_DIVERT_PUSH(NOTICE)])
renatofilho@642
   306
$1
renatofilho@642
   307
AC_DIVERT_POP
renatofilho@642
   308
])# _LT_AC_SHELL_INIT
renatofilho@642
   309
renatofilho@642
   310
renatofilho@642
   311
# _LT_AC_PROG_ECHO_BACKSLASH
renatofilho@642
   312
# --------------------------
renatofilho@642
   313
# Add some code to the start of the generated configure script which
renatofilho@642
   314
# will find an echo command which doesn't interpret backslashes.
renatofilho@642
   315
AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
renatofilho@642
   316
[_LT_AC_SHELL_INIT([
renatofilho@642
   317
# Check that we are running under the correct shell.
renatofilho@642
   318
SHELL=${CONFIG_SHELL-/bin/sh}
renatofilho@642
   319
renatofilho@642
   320
case X$ECHO in
renatofilho@642
   321
X*--fallback-echo)
renatofilho@642
   322
  # Remove one level of quotation (which was required for Make).
renatofilho@642
   323
  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
renatofilho@642
   324
  ;;
renatofilho@642
   325
esac
renatofilho@642
   326
renatofilho@642
   327
echo=${ECHO-echo}
renatofilho@642
   328
if test "X[$]1" = X--no-reexec; then
renatofilho@642
   329
  # Discard the --no-reexec flag, and continue.
renatofilho@642
   330
  shift
renatofilho@642
   331
elif test "X[$]1" = X--fallback-echo; then
renatofilho@642
   332
  # Avoid inline document here, it may be left over
renatofilho@642
   333
  :
renatofilho@642
   334
elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
renatofilho@642
   335
  # Yippee, $echo works!
renatofilho@642
   336
  :
renatofilho@642
   337
else
renatofilho@642
   338
  # Restart under the correct shell.
renatofilho@642
   339
  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
renatofilho@642
   340
fi
renatofilho@642
   341
renatofilho@642
   342
if test "X[$]1" = X--fallback-echo; then
renatofilho@642
   343
  # used as fallback echo
renatofilho@642
   344
  shift
renatofilho@642
   345
  cat <<EOF
renatofilho@642
   346
[$]*
renatofilho@642
   347
EOF
renatofilho@642
   348
  exit 0
renatofilho@642
   349
fi
renatofilho@642
   350
renatofilho@642
   351
# The HP-UX ksh and POSIX shell print the target directory to stdout
renatofilho@642
   352
# if CDPATH is set.
renatofilho@642
   353
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
renatofilho@642
   354
renatofilho@642
   355
if test -z "$ECHO"; then
renatofilho@642
   356
if test "X${echo_test_string+set}" != Xset; then
renatofilho@642
   357
# find a string as large as possible, as long as the shell can cope with it
renatofilho@642
   358
  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
renatofilho@642
   359
    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
renatofilho@642
   360
    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
renatofilho@642
   361
       echo_test_string=`eval $cmd` &&
renatofilho@642
   362
       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
renatofilho@642
   363
    then
renatofilho@642
   364
      break
renatofilho@642
   365
    fi
renatofilho@642
   366
  done
renatofilho@642
   367
fi
renatofilho@642
   368
renatofilho@642
   369
if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
renatofilho@642
   370
   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
renatofilho@642
   371
   test "X$echo_testing_string" = "X$echo_test_string"; then
renatofilho@642
   372
  :
renatofilho@642
   373
else
renatofilho@642
   374
  # The Solaris, AIX, and Digital Unix default echo programs unquote
renatofilho@642
   375
  # backslashes.  This makes it impossible to quote backslashes using
renatofilho@642
   376
  #   echo "$something" | sed 's/\\/\\\\/g'
renatofilho@642
   377
  #
renatofilho@642
   378
  # So, first we look for a working echo in the user's PATH.
renatofilho@642
   379
renatofilho@642
   380
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
renatofilho@642
   381
  for dir in $PATH /usr/ucb; do
renatofilho@642
   382
    IFS="$lt_save_ifs"
renatofilho@642
   383
    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
renatofilho@642
   384
       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
renatofilho@642
   385
       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
renatofilho@642
   386
       test "X$echo_testing_string" = "X$echo_test_string"; then
renatofilho@642
   387
      echo="$dir/echo"
renatofilho@642
   388
      break
renatofilho@642
   389
    fi
renatofilho@642
   390
  done
renatofilho@642
   391
  IFS="$lt_save_ifs"
renatofilho@642
   392
renatofilho@642
   393
  if test "X$echo" = Xecho; then
renatofilho@642
   394
    # We didn't find a better echo, so look for alternatives.
renatofilho@642
   395
    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
renatofilho@642
   396
       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
renatofilho@642
   397
       test "X$echo_testing_string" = "X$echo_test_string"; then
renatofilho@642
   398
      # This shell has a builtin print -r that does the trick.
renatofilho@642
   399
      echo='print -r'
renatofilho@642
   400
    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
renatofilho@642
   401
	 test "X$CONFIG_SHELL" != X/bin/ksh; then
renatofilho@642
   402
      # If we have ksh, try running configure again with it.
renatofilho@642
   403
      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
renatofilho@642
   404
      export ORIGINAL_CONFIG_SHELL
renatofilho@642
   405
      CONFIG_SHELL=/bin/ksh
renatofilho@642
   406
      export CONFIG_SHELL
renatofilho@642
   407
      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
renatofilho@642
   408
    else
renatofilho@642
   409
      # Try using printf.
renatofilho@642
   410
      echo='printf %s\n'
renatofilho@642
   411
      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
renatofilho@642
   412
	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
renatofilho@642
   413
	 test "X$echo_testing_string" = "X$echo_test_string"; then
renatofilho@642
   414
	# Cool, printf works
renatofilho@642
   415
	:
renatofilho@642
   416
      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
renatofilho@642
   417
	   test "X$echo_testing_string" = 'X\t' &&
renatofilho@642
   418
	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
renatofilho@642
   419
	   test "X$echo_testing_string" = "X$echo_test_string"; then
renatofilho@642
   420
	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
renatofilho@642
   421
	export CONFIG_SHELL
renatofilho@642
   422
	SHELL="$CONFIG_SHELL"
renatofilho@642
   423
	export SHELL
renatofilho@642
   424
	echo="$CONFIG_SHELL [$]0 --fallback-echo"
renatofilho@642
   425
      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
renatofilho@642
   426
	   test "X$echo_testing_string" = 'X\t' &&
renatofilho@642
   427
	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
renatofilho@642
   428
	   test "X$echo_testing_string" = "X$echo_test_string"; then
renatofilho@642
   429
	echo="$CONFIG_SHELL [$]0 --fallback-echo"
renatofilho@642
   430
      else
renatofilho@642
   431
	# maybe with a smaller string...
renatofilho@642
   432
	prev=:
renatofilho@642
   433
renatofilho@642
   434
	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
renatofilho@642
   435
	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
renatofilho@642
   436
	  then
renatofilho@642
   437
	    break
renatofilho@642
   438
	  fi
renatofilho@642
   439
	  prev="$cmd"
renatofilho@642
   440
	done
renatofilho@642
   441
renatofilho@642
   442
	if test "$prev" != 'sed 50q "[$]0"'; then
renatofilho@642
   443
	  echo_test_string=`eval $prev`
renatofilho@642
   444
	  export echo_test_string
renatofilho@642
   445
	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
renatofilho@642
   446
	else
renatofilho@642
   447
	  # Oops.  We lost completely, so just stick with echo.
renatofilho@642
   448
	  echo=echo
renatofilho@642
   449
	fi
renatofilho@642
   450
      fi
renatofilho@642
   451
    fi
renatofilho@642
   452
  fi
renatofilho@642
   453
fi
renatofilho@642
   454
fi
renatofilho@642
   455
renatofilho@642
   456
# Copy echo and quote the copy suitably for passing to libtool from
renatofilho@642
   457
# the Makefile, instead of quoting the original, which is used later.
renatofilho@642
   458
ECHO=$echo
renatofilho@642
   459
if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
renatofilho@642
   460
   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
renatofilho@642
   461
fi
renatofilho@642
   462
renatofilho@642
   463
AC_SUBST(ECHO)
renatofilho@642
   464
])])# _LT_AC_PROG_ECHO_BACKSLASH
renatofilho@642
   465
renatofilho@642
   466
renatofilho@642
   467
# _LT_AC_LOCK
renatofilho@642
   468
# -----------
renatofilho@642
   469
AC_DEFUN([_LT_AC_LOCK],
renatofilho@642
   470
[AC_ARG_ENABLE([libtool-lock],
renatofilho@642
   471
    [AC_HELP_STRING([--disable-libtool-lock],
renatofilho@642
   472
	[avoid locking (might break parallel builds)])])
renatofilho@642
   473
test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
renatofilho@642
   474
renatofilho@642
   475
# Some flags need to be propagated to the compiler or linker for good
renatofilho@642
   476
# libtool support.
renatofilho@642
   477
case $host in
renatofilho@642
   478
ia64-*-hpux*)
renatofilho@642
   479
  # Find out which ABI we are using.
renatofilho@642
   480
  echo 'int i;' > conftest.$ac_ext
renatofilho@642
   481
  if AC_TRY_EVAL(ac_compile); then
renatofilho@642
   482
    case `/usr/bin/file conftest.$ac_objext` in
renatofilho@642
   483
    *ELF-32*)
renatofilho@642
   484
      HPUX_IA64_MODE="32"
renatofilho@642
   485
      ;;
renatofilho@642
   486
    *ELF-64*)
renatofilho@642
   487
      HPUX_IA64_MODE="64"
renatofilho@642
   488
      ;;
renatofilho@642
   489
    esac
renatofilho@642
   490
  fi
renatofilho@642
   491
  rm -rf conftest*
renatofilho@642
   492
  ;;
renatofilho@642
   493
*-*-irix6*)
renatofilho@642
   494
  # Find out which ABI we are using.
renatofilho@642
   495
  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
renatofilho@642
   496
  if AC_TRY_EVAL(ac_compile); then
renatofilho@642
   497
   if test "$lt_cv_prog_gnu_ld" = yes; then
renatofilho@642
   498
    case `/usr/bin/file conftest.$ac_objext` in
renatofilho@642
   499
    *32-bit*)
renatofilho@642
   500
      LD="${LD-ld} -melf32bsmip"
renatofilho@642
   501
      ;;
renatofilho@642
   502
    *N32*)
renatofilho@642
   503
      LD="${LD-ld} -melf32bmipn32"
renatofilho@642
   504
      ;;
renatofilho@642
   505
    *64-bit*)
renatofilho@642
   506
      LD="${LD-ld} -melf64bmip"
renatofilho@642
   507
      ;;
renatofilho@642
   508
    esac
renatofilho@642
   509
   else
renatofilho@642
   510
    case `/usr/bin/file conftest.$ac_objext` in
renatofilho@642
   511
    *32-bit*)
renatofilho@642
   512
      LD="${LD-ld} -32"
renatofilho@642
   513
      ;;
renatofilho@642
   514
    *N32*)
renatofilho@642
   515
      LD="${LD-ld} -n32"
renatofilho@642
   516
      ;;
renatofilho@642
   517
    *64-bit*)
renatofilho@642
   518
      LD="${LD-ld} -64"
renatofilho@642
   519
      ;;
renatofilho@642
   520
    esac
renatofilho@642
   521
   fi
renatofilho@642
   522
  fi
renatofilho@642
   523
  rm -rf conftest*
renatofilho@642
   524
  ;;
renatofilho@642
   525
renatofilho@642
   526
x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
renatofilho@642
   527
  # Find out which ABI we are using.
renatofilho@642
   528
  echo 'int i;' > conftest.$ac_ext
renatofilho@642
   529
  if AC_TRY_EVAL(ac_compile); then
renatofilho@642
   530
    case `/usr/bin/file conftest.o` in
renatofilho@642
   531
    *32-bit*)
renatofilho@642
   532
      case $host in
renatofilho@642
   533
        x86_64-*linux*)
renatofilho@642
   534
          LD="${LD-ld} -m elf_i386"
renatofilho@642
   535
          ;;
renatofilho@642
   536
        ppc64-*linux*|powerpc64-*linux*)
renatofilho@642
   537
          LD="${LD-ld} -m elf32ppclinux"
renatofilho@642
   538
          ;;
renatofilho@642
   539
        s390x-*linux*)
renatofilho@642
   540
          LD="${LD-ld} -m elf_s390"
renatofilho@642
   541
          ;;
renatofilho@642
   542
        sparc64-*linux*)
renatofilho@642
   543
          LD="${LD-ld} -m elf32_sparc"
renatofilho@642
   544
          ;;
renatofilho@642
   545
      esac
renatofilho@642
   546
      ;;
renatofilho@642
   547
    *64-bit*)
renatofilho@642
   548
      case $host in
renatofilho@642
   549
        x86_64-*linux*)
renatofilho@642
   550
          LD="${LD-ld} -m elf_x86_64"
renatofilho@642
   551
          ;;
renatofilho@642
   552
        ppc*-*linux*|powerpc*-*linux*)
renatofilho@642
   553
          LD="${LD-ld} -m elf64ppc"
renatofilho@642
   554
          ;;
renatofilho@642
   555
        s390*-*linux*)
renatofilho@642
   556
          LD="${LD-ld} -m elf64_s390"
renatofilho@642
   557
          ;;
renatofilho@642
   558
        sparc*-*linux*)
renatofilho@642
   559
          LD="${LD-ld} -m elf64_sparc"
renatofilho@642
   560
          ;;
renatofilho@642
   561
      esac
renatofilho@642
   562
      ;;
renatofilho@642
   563
    esac
renatofilho@642
   564
  fi
renatofilho@642
   565
  rm -rf conftest*
renatofilho@642
   566
  ;;
renatofilho@642
   567
renatofilho@642
   568
*-*-sco3.2v5*)
renatofilho@642
   569
  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
renatofilho@642
   570
  SAVE_CFLAGS="$CFLAGS"
renatofilho@642
   571
  CFLAGS="$CFLAGS -belf"
renatofilho@642
   572
  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
renatofilho@642
   573
    [AC_LANG_PUSH(C)
renatofilho@642
   574
     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
renatofilho@642
   575
     AC_LANG_POP])
renatofilho@642
   576
  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
renatofilho@642
   577
    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
renatofilho@642
   578
    CFLAGS="$SAVE_CFLAGS"
renatofilho@642
   579
  fi
renatofilho@642
   580
  ;;
renatofilho@642
   581
sparc*-*solaris*)
renatofilho@642
   582
  # Find out which ABI we are using.
renatofilho@642
   583
  echo 'int i;' > conftest.$ac_ext
renatofilho@642
   584
  if AC_TRY_EVAL(ac_compile); then
renatofilho@642
   585
    case `/usr/bin/file conftest.o` in
renatofilho@642
   586
    *64-bit*)
renatofilho@642
   587
      case $lt_cv_prog_gnu_ld in
renatofilho@642
   588
      yes*) LD="${LD-ld} -m elf64_sparc" ;;
renatofilho@642
   589
      *)    LD="${LD-ld} -64" ;;
renatofilho@642
   590
      esac
renatofilho@642
   591
      ;;
renatofilho@642
   592
    esac
renatofilho@642
   593
  fi
renatofilho@642
   594
  rm -rf conftest*
renatofilho@642
   595
  ;;
renatofilho@642
   596
renatofilho@642
   597
AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
renatofilho@642
   598
[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
renatofilho@642
   599
  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
renatofilho@642
   600
  AC_CHECK_TOOL(AS, as, false)
renatofilho@642
   601
  AC_CHECK_TOOL(OBJDUMP, objdump, false)
renatofilho@642
   602
  ;;
renatofilho@642
   603
  ])
renatofilho@642
   604
esac
renatofilho@642
   605
renatofilho@642
   606
need_locks="$enable_libtool_lock"
renatofilho@642
   607
renatofilho@642
   608
])# _LT_AC_LOCK
renatofilho@642
   609
renatofilho@642
   610
renatofilho@642
   611
# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
renatofilho@642
   612
#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
renatofilho@642
   613
# ----------------------------------------------------------------
renatofilho@642
   614
# Check whether the given compiler option works
renatofilho@642
   615
AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
renatofilho@642
   616
[AC_REQUIRE([LT_AC_PROG_SED])
renatofilho@642
   617
AC_CACHE_CHECK([$1], [$2],
renatofilho@642
   618
  [$2=no
renatofilho@642
   619
  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
renatofilho@642
   620
   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
renatofilho@642
   621
   lt_compiler_flag="$3"
renatofilho@642
   622
   # Insert the option either (1) after the last *FLAGS variable, or
renatofilho@642
   623
   # (2) before a word containing "conftest.", or (3) at the end.
renatofilho@642
   624
   # Note that $ac_compile itself does not contain backslashes and begins
renatofilho@642
   625
   # with a dollar sign (not a hyphen), so the echo should work correctly.
renatofilho@642
   626
   # The option is referenced via a variable to avoid confusing sed.
renatofilho@642
   627
   lt_compile=`echo "$ac_compile" | $SED \
renatofilho@642
   628
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
renatofilho@642
   629
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
renatofilho@642
   630
   -e 's:$: $lt_compiler_flag:'`
renatofilho@642
   631
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
renatofilho@642
   632
   (eval "$lt_compile" 2>conftest.err)
renatofilho@642
   633
   ac_status=$?
renatofilho@642
   634
   cat conftest.err >&AS_MESSAGE_LOG_FD
renatofilho@642
   635
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
renatofilho@642
   636
   if (exit $ac_status) && test -s "$ac_outfile"; then
renatofilho@642
   637
     # The compiler can only warn and ignore the option if not recognized
renatofilho@642
   638
     # So say no if there are warnings other than the usual output.
renatofilho@642
   639
     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
renatofilho@642
   640
     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
renatofilho@642
   641
     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
renatofilho@642
   642
       $2=yes
renatofilho@642
   643
     fi
renatofilho@642
   644
   fi
renatofilho@642
   645
   $rm conftest*
renatofilho@642
   646
])
renatofilho@642
   647
renatofilho@642
   648
if test x"[$]$2" = xyes; then
renatofilho@642
   649
    ifelse([$5], , :, [$5])
renatofilho@642
   650
else
renatofilho@642
   651
    ifelse([$6], , :, [$6])
renatofilho@642
   652
fi
renatofilho@642
   653
])# AC_LIBTOOL_COMPILER_OPTION
renatofilho@642
   654
renatofilho@642
   655
renatofilho@642
   656
# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
renatofilho@642
   657
#                          [ACTION-SUCCESS], [ACTION-FAILURE])
renatofilho@642
   658
# ------------------------------------------------------------
renatofilho@642
   659
# Check whether the given compiler option works
renatofilho@642
   660
AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
renatofilho@642
   661
[AC_CACHE_CHECK([$1], [$2],
renatofilho@642
   662
  [$2=no
renatofilho@642
   663
   save_LDFLAGS="$LDFLAGS"
renatofilho@642
   664
   LDFLAGS="$LDFLAGS $3"
renatofilho@642
   665
   printf "$lt_simple_link_test_code" > conftest.$ac_ext
renatofilho@642
   666
   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
renatofilho@642
   667
     # The linker can only warn and ignore the option if not recognized
renatofilho@642
   668
     # So say no if there are warnings
renatofilho@642
   669
     if test -s conftest.err; then
renatofilho@642
   670
       # Append any errors to the config.log.
renatofilho@642
   671
       cat conftest.err 1>&AS_MESSAGE_LOG_FD
renatofilho@642
   672
       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
renatofilho@642
   673
       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
renatofilho@642
   674
       if diff conftest.exp conftest.er2 >/dev/null; then
renatofilho@642
   675
         $2=yes
renatofilho@642
   676
       fi
renatofilho@642
   677
     else
renatofilho@642
   678
       $2=yes
renatofilho@642
   679
     fi
renatofilho@642
   680
   fi
renatofilho@642
   681
   $rm conftest*
renatofilho@642
   682
   LDFLAGS="$save_LDFLAGS"
renatofilho@642
   683
])
renatofilho@642
   684
renatofilho@642
   685
if test x"[$]$2" = xyes; then
renatofilho@642
   686
    ifelse([$4], , :, [$4])
renatofilho@642
   687
else
renatofilho@642
   688
    ifelse([$5], , :, [$5])
renatofilho@642
   689
fi
renatofilho@642
   690
])# AC_LIBTOOL_LINKER_OPTION
renatofilho@642
   691
renatofilho@642
   692
renatofilho@642
   693
# AC_LIBTOOL_SYS_MAX_CMD_LEN
renatofilho@642
   694
# --------------------------
renatofilho@642
   695
AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
renatofilho@642
   696
[# find the maximum length of command line arguments
renatofilho@642
   697
AC_MSG_CHECKING([the maximum length of command line arguments])
renatofilho@642
   698
AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
renatofilho@642
   699
  i=0
renatofilho@642
   700
  teststring="ABCD"
renatofilho@642
   701
renatofilho@642
   702
  case $build_os in
renatofilho@642
   703
  msdosdjgpp*)
renatofilho@642
   704
    # On DJGPP, this test can blow up pretty badly due to problems in libc
renatofilho@642
   705
    # (any single argument exceeding 2000 bytes causes a buffer overrun
renatofilho@642
   706
    # during glob expansion).  Even if it were fixed, the result of this
renatofilho@642
   707
    # check would be larger than it should be.
renatofilho@642
   708
    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
renatofilho@642
   709
    ;;
renatofilho@642
   710
renatofilho@642
   711
  gnu*)
renatofilho@642
   712
    # Under GNU Hurd, this test is not required because there is
renatofilho@642
   713
    # no limit to the length of command line arguments.
renatofilho@642
   714
    # Libtool will interpret -1 as no limit whatsoever
renatofilho@642
   715
    lt_cv_sys_max_cmd_len=-1;
renatofilho@642
   716
    ;;
renatofilho@642
   717
renatofilho@642
   718
  cygwin* | mingw*)
renatofilho@642
   719
    # On Win9x/ME, this test blows up -- it succeeds, but takes
renatofilho@642
   720
    # about 5 minutes as the teststring grows exponentially.
renatofilho@642
   721
    # Worse, since 9x/ME are not pre-emptively multitasking,
renatofilho@642
   722
    # you end up with a "frozen" computer, even though with patience
renatofilho@642
   723
    # the test eventually succeeds (with a max line length of 256k).
renatofilho@642
   724
    # Instead, let's just punt: use the minimum linelength reported by
renatofilho@642
   725
    # all of the supported platforms: 8192 (on NT/2K/XP).
renatofilho@642
   726
    lt_cv_sys_max_cmd_len=8192;
renatofilho@642
   727
    ;;
renatofilho@642
   728
renatofilho@642
   729
  amigaos*)
renatofilho@642
   730
    # On AmigaOS with pdksh, this test takes hours, literally.
renatofilho@642
   731
    # So we just punt and use a minimum line length of 8192.
renatofilho@642
   732
    lt_cv_sys_max_cmd_len=8192;
renatofilho@642
   733
    ;;
renatofilho@642
   734
renatofilho@642
   735
  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
renatofilho@642
   736
    # This has been around since 386BSD, at least.  Likely further.
renatofilho@642
   737
    if test -x /sbin/sysctl; then
renatofilho@642
   738
      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
renatofilho@642
   739
    elif test -x /usr/sbin/sysctl; then
renatofilho@642
   740
      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
renatofilho@642
   741
    else
renatofilho@642
   742
      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
renatofilho@642
   743
    fi
renatofilho@642
   744
    # And add a safety zone
renatofilho@642
   745
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
renatofilho@642
   746
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
renatofilho@642
   747
    ;;
renatofilho@642
   748
renatofilho@642
   749
  interix*)
renatofilho@642
   750
    # We know the value 262144 and hardcode it with a safety zone (like BSD)
renatofilho@642
   751
    lt_cv_sys_max_cmd_len=196608
renatofilho@642
   752
    ;;
renatofilho@642
   753
renatofilho@642
   754
  osf*)
renatofilho@642
   755
    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
renatofilho@642
   756
    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
renatofilho@642
   757
    # nice to cause kernel panics so lets avoid the loop below.
renatofilho@642
   758
    # First set a reasonable default.
renatofilho@642
   759
    lt_cv_sys_max_cmd_len=16384
renatofilho@642
   760
    #
renatofilho@642
   761
    if test -x /sbin/sysconfig; then
renatofilho@642
   762
      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
renatofilho@642
   763
        *1*) lt_cv_sys_max_cmd_len=-1 ;;
renatofilho@642
   764
      esac
renatofilho@642
   765
    fi
renatofilho@642
   766
    ;;
renatofilho@642
   767
  sco3.2v5*)
renatofilho@642
   768
    lt_cv_sys_max_cmd_len=102400
renatofilho@642
   769
    ;;
renatofilho@642
   770
  sysv5* | sco5v6* | sysv4.2uw2*)
renatofilho@642
   771
    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
renatofilho@642
   772
    if test -n "$kargmax"; then
renatofilho@642
   773
      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ 	]]//'`
renatofilho@642
   774
    else
renatofilho@642
   775
      lt_cv_sys_max_cmd_len=32768
renatofilho@642
   776
    fi
renatofilho@642
   777
    ;;
renatofilho@642
   778
  *)
renatofilho@642
   779
    # If test is not a shell built-in, we'll probably end up computing a
renatofilho@642
   780
    # maximum length that is only half of the actual maximum length, but
renatofilho@642
   781
    # we can't tell.
renatofilho@642
   782
    SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
renatofilho@642
   783
    while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
renatofilho@642
   784
	       = "XX$teststring") >/dev/null 2>&1 &&
renatofilho@642
   785
	    new_result=`expr "X$teststring" : ".*" 2>&1` &&
renatofilho@642
   786
	    lt_cv_sys_max_cmd_len=$new_result &&
renatofilho@642
   787
	    test $i != 17 # 1/2 MB should be enough
renatofilho@642
   788
    do
renatofilho@642
   789
      i=`expr $i + 1`
renatofilho@642
   790
      teststring=$teststring$teststring
renatofilho@642
   791
    done
renatofilho@642
   792
    teststring=
renatofilho@642
   793
    # Add a significant safety factor because C++ compilers can tack on massive
renatofilho@642
   794
    # amounts of additional arguments before passing them to the linker.
renatofilho@642
   795
    # It appears as though 1/2 is a usable value.
renatofilho@642
   796
    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
renatofilho@642
   797
    ;;
renatofilho@642
   798
  esac
renatofilho@642
   799
])
renatofilho@642
   800
if test -n $lt_cv_sys_max_cmd_len ; then
renatofilho@642
   801
  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
renatofilho@642
   802
else
renatofilho@642
   803
  AC_MSG_RESULT(none)
renatofilho@642
   804
fi
renatofilho@642
   805
])# AC_LIBTOOL_SYS_MAX_CMD_LEN
renatofilho@642
   806
renatofilho@642
   807
renatofilho@642
   808
# _LT_AC_CHECK_DLFCN
renatofilho@642
   809
# ------------------
renatofilho@642
   810
AC_DEFUN([_LT_AC_CHECK_DLFCN],
renatofilho@642
   811
[AC_CHECK_HEADERS(dlfcn.h)dnl
renatofilho@642
   812
])# _LT_AC_CHECK_DLFCN
renatofilho@642
   813
renatofilho@642
   814
renatofilho@642
   815
# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
renatofilho@642
   816
#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
renatofilho@642
   817
# ---------------------------------------------------------------------
renatofilho@642
   818
AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
renatofilho@642
   819
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
renatofilho@642
   820
if test "$cross_compiling" = yes; then :
renatofilho@642
   821
  [$4]
renatofilho@642
   822
else
renatofilho@642
   823
  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
renatofilho@642
   824
  lt_status=$lt_dlunknown
renatofilho@642
   825
  cat > conftest.$ac_ext <<EOF
renatofilho@642
   826
[#line __oline__ "configure"
renatofilho@642
   827
#include "confdefs.h"
renatofilho@642
   828
renatofilho@642
   829
#if HAVE_DLFCN_H
renatofilho@642
   830
#include <dlfcn.h>
renatofilho@642
   831
#endif
renatofilho@642
   832
renatofilho@642
   833
#include <stdio.h>
renatofilho@642
   834
renatofilho@642
   835
#ifdef RTLD_GLOBAL
renatofilho@642
   836
#  define LT_DLGLOBAL		RTLD_GLOBAL
renatofilho@642
   837
#else
renatofilho@642
   838
#  ifdef DL_GLOBAL
renatofilho@642
   839
#    define LT_DLGLOBAL		DL_GLOBAL
renatofilho@642
   840
#  else
renatofilho@642
   841
#    define LT_DLGLOBAL		0
renatofilho@642
   842
#  endif
renatofilho@642
   843
#endif
renatofilho@642
   844
renatofilho@642
   845
/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
renatofilho@642
   846
   find out it does not work in some platform. */
renatofilho@642
   847
#ifndef LT_DLLAZY_OR_NOW
renatofilho@642
   848
#  ifdef RTLD_LAZY
renatofilho@642
   849
#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
renatofilho@642
   850
#  else
renatofilho@642
   851
#    ifdef DL_LAZY
renatofilho@642
   852
#      define LT_DLLAZY_OR_NOW		DL_LAZY
renatofilho@642
   853
#    else
renatofilho@642
   854
#      ifdef RTLD_NOW
renatofilho@642
   855
#        define LT_DLLAZY_OR_NOW	RTLD_NOW
renatofilho@642
   856
#      else
renatofilho@642
   857
#        ifdef DL_NOW
renatofilho@642
   858
#          define LT_DLLAZY_OR_NOW	DL_NOW
renatofilho@642
   859
#        else
renatofilho@642
   860
#          define LT_DLLAZY_OR_NOW	0
renatofilho@642
   861
#        endif
renatofilho@642
   862
#      endif
renatofilho@642
   863
#    endif
renatofilho@642
   864
#  endif
renatofilho@642
   865
#endif
renatofilho@642
   866
renatofilho@642
   867
#ifdef __cplusplus
renatofilho@642
   868
extern "C" void exit (int);
renatofilho@642
   869
#endif
renatofilho@642
   870
renatofilho@642
   871
void fnord() { int i=42;}
renatofilho@642
   872
int main ()
renatofilho@642
   873
{
renatofilho@642
   874
  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
renatofilho@642
   875
  int status = $lt_dlunknown;
renatofilho@642
   876
renatofilho@642
   877
  if (self)
renatofilho@642
   878
    {
renatofilho@642
   879
      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
renatofilho@642
   880
      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
renatofilho@642
   881
      /* dlclose (self); */
renatofilho@642
   882
    }
renatofilho@642
   883
  else
renatofilho@642
   884
    puts (dlerror ());
renatofilho@642
   885
renatofilho@642
   886
    exit (status);
renatofilho@642
   887
}]
renatofilho@642
   888
EOF
renatofilho@642
   889
  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
renatofilho@642
   890
    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
renatofilho@642
   891
    lt_status=$?
renatofilho@642
   892
    case x$lt_status in
renatofilho@642
   893
      x$lt_dlno_uscore) $1 ;;
renatofilho@642
   894
      x$lt_dlneed_uscore) $2 ;;
renatofilho@642
   895
      x$lt_dlunknown|x*) $3 ;;
renatofilho@642
   896
    esac
renatofilho@642
   897
  else :
renatofilho@642
   898
    # compilation failed
renatofilho@642
   899
    $3
renatofilho@642
   900
  fi
renatofilho@642
   901
fi
renatofilho@642
   902
rm -fr conftest*
renatofilho@642
   903
])# _LT_AC_TRY_DLOPEN_SELF
renatofilho@642
   904
renatofilho@642
   905
renatofilho@642
   906
# AC_LIBTOOL_DLOPEN_SELF
renatofilho@642
   907
# ----------------------
renatofilho@642
   908
AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
renatofilho@642
   909
[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
renatofilho@642
   910
if test "x$enable_dlopen" != xyes; then
renatofilho@642
   911
  enable_dlopen=unknown
renatofilho@642
   912
  enable_dlopen_self=unknown
renatofilho@642
   913
  enable_dlopen_self_static=unknown
renatofilho@642
   914
else
renatofilho@642
   915
  lt_cv_dlopen=no
renatofilho@642
   916
  lt_cv_dlopen_libs=
renatofilho@642
   917
renatofilho@642
   918
  case $host_os in
renatofilho@642
   919
  beos*)
renatofilho@642
   920
    lt_cv_dlopen="load_add_on"
renatofilho@642
   921
    lt_cv_dlopen_libs=
renatofilho@642
   922
    lt_cv_dlopen_self=yes
renatofilho@642
   923
    ;;
renatofilho@642
   924
renatofilho@642
   925
  mingw* | pw32*)
renatofilho@642
   926
    lt_cv_dlopen="LoadLibrary"
renatofilho@642
   927
    lt_cv_dlopen_libs=
renatofilho@642
   928
   ;;
renatofilho@642
   929
renatofilho@642
   930
  cygwin*)
renatofilho@642
   931
    lt_cv_dlopen="dlopen"
renatofilho@642
   932
    lt_cv_dlopen_libs=
renatofilho@642
   933
   ;;
renatofilho@642
   934
renatofilho@642
   935
  darwin*)
renatofilho@642
   936
  # if libdl is installed we need to link against it
renatofilho@642
   937
    AC_CHECK_LIB([dl], [dlopen],
renatofilho@642
   938
		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
renatofilho@642
   939
    lt_cv_dlopen="dyld"
renatofilho@642
   940
    lt_cv_dlopen_libs=
renatofilho@642
   941
    lt_cv_dlopen_self=yes
renatofilho@642
   942
    ])
renatofilho@642
   943
   ;;
renatofilho@642
   944
renatofilho@642
   945
  *)
renatofilho@642
   946
    AC_CHECK_FUNC([shl_load],
renatofilho@642
   947
	  [lt_cv_dlopen="shl_load"],
renatofilho@642
   948
      [AC_CHECK_LIB([dld], [shl_load],
renatofilho@642
   949
	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
renatofilho@642
   950
	[AC_CHECK_FUNC([dlopen],
renatofilho@642
   951
	      [lt_cv_dlopen="dlopen"],
renatofilho@642
   952
	  [AC_CHECK_LIB([dl], [dlopen],
renatofilho@642
   953
		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
renatofilho@642
   954
	    [AC_CHECK_LIB([svld], [dlopen],
renatofilho@642
   955
		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
renatofilho@642
   956
	      [AC_CHECK_LIB([dld], [dld_link],
renatofilho@642
   957
		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
renatofilho@642
   958
	      ])
renatofilho@642
   959
	    ])
renatofilho@642
   960
	  ])
renatofilho@642
   961
	])
renatofilho@642
   962
      ])
renatofilho@642
   963
    ;;
renatofilho@642
   964
  esac
renatofilho@642
   965
renatofilho@642
   966
  if test "x$lt_cv_dlopen" != xno; then
renatofilho@642
   967
    enable_dlopen=yes
renatofilho@642
   968
  else
renatofilho@642
   969
    enable_dlopen=no
renatofilho@642
   970
  fi
renatofilho@642
   971
renatofilho@642
   972
  case $lt_cv_dlopen in
renatofilho@642
   973
  dlopen)
renatofilho@642
   974
    save_CPPFLAGS="$CPPFLAGS"
renatofilho@642
   975
    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
renatofilho@642
   976
renatofilho@642
   977
    save_LDFLAGS="$LDFLAGS"
renatofilho@642
   978
    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
renatofilho@642
   979
renatofilho@642
   980
    save_LIBS="$LIBS"
renatofilho@642
   981
    LIBS="$lt_cv_dlopen_libs $LIBS"
renatofilho@642
   982
renatofilho@642
   983
    AC_CACHE_CHECK([whether a program can dlopen itself],
renatofilho@642
   984
	  lt_cv_dlopen_self, [dnl
renatofilho@642
   985
	  _LT_AC_TRY_DLOPEN_SELF(
renatofilho@642
   986
	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
renatofilho@642
   987
	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
renatofilho@642
   988
    ])
renatofilho@642
   989
renatofilho@642
   990
    if test "x$lt_cv_dlopen_self" = xyes; then
renatofilho@642
   991
      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
renatofilho@642
   992
      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
renatofilho@642
   993
    	  lt_cv_dlopen_self_static, [dnl
renatofilho@642
   994
	  _LT_AC_TRY_DLOPEN_SELF(
renatofilho@642
   995
	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
renatofilho@642
   996
	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
renatofilho@642
   997
      ])
renatofilho@642
   998
    fi
renatofilho@642
   999
renatofilho@642
  1000
    CPPFLAGS="$save_CPPFLAGS"
renatofilho@642
  1001
    LDFLAGS="$save_LDFLAGS"
renatofilho@642
  1002
    LIBS="$save_LIBS"
renatofilho@642
  1003
    ;;
renatofilho@642
  1004
  esac
renatofilho@642
  1005
renatofilho@642
  1006
  case $lt_cv_dlopen_self in
renatofilho@642
  1007
  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
renatofilho@642
  1008
  *) enable_dlopen_self=unknown ;;
renatofilho@642
  1009
  esac
renatofilho@642
  1010
renatofilho@642
  1011
  case $lt_cv_dlopen_self_static in
renatofilho@642
  1012
  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
renatofilho@642
  1013
  *) enable_dlopen_self_static=unknown ;;
renatofilho@642
  1014
  esac
renatofilho@642
  1015
fi
renatofilho@642
  1016
])# AC_LIBTOOL_DLOPEN_SELF
renatofilho@642
  1017
renatofilho@642
  1018
renatofilho@642
  1019
# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
renatofilho@642
  1020
# ---------------------------------
renatofilho@642
  1021
# Check to see if options -c and -o are simultaneously supported by compiler
renatofilho@642
  1022
AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
renatofilho@642
  1023
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
renatofilho@642
  1024
AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
renatofilho@642
  1025
  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
renatofilho@642
  1026
  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
renatofilho@642
  1027
   $rm -r conftest 2>/dev/null
renatofilho@642
  1028
   mkdir conftest
renatofilho@642
  1029
   cd conftest
renatofilho@642
  1030
   mkdir out
renatofilho@642
  1031
   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
renatofilho@642
  1032
renatofilho@642
  1033
   lt_compiler_flag="-o out/conftest2.$ac_objext"
renatofilho@642
  1034
   # Insert the option either (1) after the last *FLAGS variable, or
renatofilho@642
  1035
   # (2) before a word containing "conftest.", or (3) at the end.
renatofilho@642
  1036
   # Note that $ac_compile itself does not contain backslashes and begins
renatofilho@642
  1037
   # with a dollar sign (not a hyphen), so the echo should work correctly.
renatofilho@642
  1038
   lt_compile=`echo "$ac_compile" | $SED \
renatofilho@642
  1039
   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
renatofilho@642
  1040
   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
renatofilho@642
  1041
   -e 's:$: $lt_compiler_flag:'`
renatofilho@642
  1042
   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
renatofilho@642
  1043
   (eval "$lt_compile" 2>out/conftest.err)
renatofilho@642
  1044
   ac_status=$?
renatofilho@642
  1045
   cat out/conftest.err >&AS_MESSAGE_LOG_FD
renatofilho@642
  1046
   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
renatofilho@642
  1047
   if (exit $ac_status) && test -s out/conftest2.$ac_objext
renatofilho@642
  1048
   then
renatofilho@642
  1049
     # The compiler can only warn and ignore the option if not recognized
renatofilho@642
  1050
     # So say no if there are warnings
renatofilho@642
  1051
     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
renatofilho@642
  1052
     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
renatofilho@642
  1053
     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
renatofilho@642
  1054
       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
renatofilho@642
  1055
     fi
renatofilho@642
  1056
   fi
renatofilho@642
  1057
   chmod u+w . 2>&AS_MESSAGE_LOG_FD
renatofilho@642
  1058
   $rm conftest*
renatofilho@642
  1059
   # SGI C++ compiler will create directory out/ii_files/ for
renatofilho@642
  1060
   # template instantiation
renatofilho@642
  1061
   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
renatofilho@642
  1062
   $rm out/* && rmdir out
renatofilho@642
  1063
   cd ..
renatofilho@642
  1064
   rmdir conftest
renatofilho@642
  1065
   $rm conftest*
renatofilho@642
  1066
])
renatofilho@642
  1067
])# AC_LIBTOOL_PROG_CC_C_O
renatofilho@642
  1068
renatofilho@642
  1069
renatofilho@642
  1070
# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
renatofilho@642
  1071
# -----------------------------------------
renatofilho@642
  1072
# Check to see if we can do hard links to lock some files if needed
renatofilho@642
  1073
AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
renatofilho@642
  1074
[AC_REQUIRE([_LT_AC_LOCK])dnl
renatofilho@642
  1075
renatofilho@642
  1076
hard_links="nottested"
renatofilho@642
  1077
if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
renatofilho@642
  1078
  # do not overwrite the value of need_locks provided by the user
renatofilho@642
  1079
  AC_MSG_CHECKING([if we can lock with hard links])
renatofilho@642
  1080
  hard_links=yes
renatofilho@642
  1081
  $rm conftest*
renatofilho@642
  1082
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
renatofilho@642
  1083
  touch conftest.a
renatofilho@642
  1084
  ln conftest.a conftest.b 2>&5 || hard_links=no
renatofilho@642
  1085
  ln conftest.a conftest.b 2>/dev/null && hard_links=no
renatofilho@642
  1086
  AC_MSG_RESULT([$hard_links])
renatofilho@642
  1087
  if test "$hard_links" = no; then
renatofilho@642
  1088
    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
renatofilho@642
  1089
    need_locks=warn
renatofilho@642
  1090
  fi
renatofilho@642
  1091
else
renatofilho@642
  1092
  need_locks=no
renatofilho@642
  1093
fi
renatofilho@642
  1094
])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
renatofilho@642
  1095
renatofilho@642
  1096
renatofilho@642
  1097
# AC_LIBTOOL_OBJDIR
renatofilho@642
  1098
# -----------------
renatofilho@642
  1099
AC_DEFUN([AC_LIBTOOL_OBJDIR],
renatofilho@642
  1100
[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
renatofilho@642
  1101
[rm -f .libs 2>/dev/null
renatofilho@642
  1102
mkdir .libs 2>/dev/null
renatofilho@642
  1103
if test -d .libs; then
renatofilho@642
  1104
  lt_cv_objdir=.libs
renatofilho@642
  1105
else
renatofilho@642
  1106
  # MS-DOS does not allow filenames that begin with a dot.
renatofilho@642
  1107
  lt_cv_objdir=_libs
renatofilho@642
  1108
fi
renatofilho@642
  1109
rmdir .libs 2>/dev/null])
renatofilho@642
  1110
objdir=$lt_cv_objdir
renatofilho@642
  1111
])# AC_LIBTOOL_OBJDIR
renatofilho@642
  1112
renatofilho@642
  1113
renatofilho@642
  1114
# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
renatofilho@642
  1115
# ----------------------------------------------
renatofilho@642
  1116
# Check hardcoding attributes.
renatofilho@642
  1117
AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
renatofilho@642
  1118
[AC_MSG_CHECKING([how to hardcode library paths into programs])
renatofilho@642
  1119
_LT_AC_TAGVAR(hardcode_action, $1)=
renatofilho@642
  1120
if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
renatofilho@642
  1121
   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
renatofilho@642
  1122
   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
renatofilho@642
  1123
renatofilho@642
  1124
  # We can hardcode non-existant directories.
renatofilho@642
  1125
  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
renatofilho@642
  1126
     # If the only mechanism to avoid hardcoding is shlibpath_var, we
renatofilho@642
  1127
     # have to relink, otherwise we might link with an installed library
renatofilho@642
  1128
     # when we should be linking with a yet-to-be-installed one
renatofilho@642
  1129
     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
renatofilho@642
  1130
     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
renatofilho@642
  1131
    # Linking always hardcodes the temporary library directory.
renatofilho@642
  1132
    _LT_AC_TAGVAR(hardcode_action, $1)=relink
renatofilho@642
  1133
  else
renatofilho@642
  1134
    # We can link without hardcoding, and we can hardcode nonexisting dirs.
renatofilho@642
  1135
    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
renatofilho@642
  1136
  fi
renatofilho@642
  1137
else
renatofilho@642
  1138
  # We cannot hardcode anything, or else we can only hardcode existing
renatofilho@642
  1139
  # directories.
renatofilho@642
  1140
  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
renatofilho@642
  1141
fi
renatofilho@642
  1142
AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
renatofilho@642
  1143
renatofilho@642
  1144
if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
renatofilho@642
  1145
  # Fast installation is not supported
renatofilho@642
  1146
  enable_fast_install=no
renatofilho@642
  1147
elif test "$shlibpath_overrides_runpath" = yes ||
renatofilho@642
  1148
     test "$enable_shared" = no; then
renatofilho@642
  1149
  # Fast installation is not necessary
renatofilho@642
  1150
  enable_fast_install=needless
renatofilho@642
  1151
fi
renatofilho@642
  1152
])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
renatofilho@642
  1153
renatofilho@642
  1154
renatofilho@642
  1155
# AC_LIBTOOL_SYS_LIB_STRIP
renatofilho@642
  1156
# ------------------------
renatofilho@642
  1157
AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
renatofilho@642
  1158
[striplib=
renatofilho@642
  1159
old_striplib=
renatofilho@642
  1160
AC_MSG_CHECKING([whether stripping libraries is possible])
renatofilho@642
  1161
if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
renatofilho@642
  1162
  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
renatofilho@642
  1163
  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
renatofilho@642
  1164
  AC_MSG_RESULT([yes])
renatofilho@642
  1165
else
renatofilho@642
  1166
# FIXME - insert some real tests, host_os isn't really good enough
renatofilho@642
  1167
  case $host_os in
renatofilho@642
  1168
   darwin*)
renatofilho@642
  1169
       if test -n "$STRIP" ; then
renatofilho@642
  1170
         striplib="$STRIP -x"
renatofilho@642
  1171
         AC_MSG_RESULT([yes])
renatofilho@642
  1172
       else
renatofilho@642
  1173
  AC_MSG_RESULT([no])
renatofilho@642
  1174
fi
renatofilho@642
  1175
       ;;
renatofilho@642
  1176
   *)
renatofilho@642
  1177
  AC_MSG_RESULT([no])
renatofilho@642
  1178
    ;;
renatofilho@642
  1179
  esac
renatofilho@642
  1180
fi
renatofilho@642
  1181
])# AC_LIBTOOL_SYS_LIB_STRIP
renatofilho@642
  1182
renatofilho@642
  1183
renatofilho@642
  1184
# AC_LIBTOOL_SYS_DYNAMIC_LINKER
renatofilho@642
  1185
# -----------------------------
renatofilho@642
  1186
# PORTME Fill in your ld.so characteristics
renatofilho@642
  1187
AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
renatofilho@642
  1188
[AC_MSG_CHECKING([dynamic linker characteristics])
renatofilho@642
  1189
library_names_spec=
renatofilho@642
  1190
libname_spec='lib$name'
renatofilho@642
  1191
soname_spec=
renatofilho@642
  1192
shrext_cmds=".so"
renatofilho@642
  1193
postinstall_cmds=
renatofilho@642
  1194
postuninstall_cmds=
renatofilho@642
  1195
finish_cmds=
renatofilho@642
  1196
finish_eval=
renatofilho@642
  1197
shlibpath_var=
renatofilho@642
  1198
shlibpath_overrides_runpath=unknown
renatofilho@642
  1199
version_type=none
renatofilho@642
  1200
dynamic_linker="$host_os ld.so"
renatofilho@642
  1201
sys_lib_dlsearch_path_spec="/lib /usr/lib"
renatofilho@642
  1202
if test "$GCC" = yes; then
renatofilho@642
  1203
  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
renatofilho@642
  1204
  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
renatofilho@642
  1205
    # if the path contains ";" then we assume it to be the separator
renatofilho@642
  1206
    # otherwise default to the standard path separator (i.e. ":") - it is
renatofilho@642
  1207
    # assumed that no part of a normal pathname contains ";" but that should
renatofilho@642
  1208
    # okay in the real world where ";" in dirpaths is itself problematic.
renatofilho@642
  1209
    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
renatofilho@642
  1210
  else
renatofilho@642
  1211
    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
renatofilho@642
  1212
  fi
renatofilho@642
  1213
else
renatofilho@642
  1214
  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
renatofilho@642
  1215
fi
renatofilho@642
  1216
need_lib_prefix=unknown
renatofilho@642
  1217
hardcode_into_libs=no
renatofilho@642
  1218
renatofilho@642
  1219
# when you set need_version to no, make sure it does not cause -set_version
renatofilho@642
  1220
# flags to be left without arguments
renatofilho@642
  1221
need_version=unknown
renatofilho@642
  1222
renatofilho@642
  1223
case $host_os in
renatofilho@642
  1224
aix3*)
renatofilho@642
  1225
  version_type=linux
renatofilho@642
  1226
  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
renatofilho@642
  1227
  shlibpath_var=LIBPATH
renatofilho@642
  1228
renatofilho@642
  1229
  # AIX 3 has no versioning support, so we append a major version to the name.
renatofilho@642
  1230
  soname_spec='${libname}${release}${shared_ext}$major'
renatofilho@642
  1231
  ;;
renatofilho@642
  1232
renatofilho@642
  1233
aix4* | aix5*)
renatofilho@642
  1234
  version_type=linux
renatofilho@642
  1235
  need_lib_prefix=no
renatofilho@642
  1236
  need_version=no
renatofilho@642
  1237
  hardcode_into_libs=yes
renatofilho@642
  1238
  if test "$host_cpu" = ia64; then
renatofilho@642
  1239
    # AIX 5 supports IA64
renatofilho@642
  1240
    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
renatofilho@642
  1241
    shlibpath_var=LD_LIBRARY_PATH
renatofilho@642
  1242
  else
renatofilho@642
  1243
    # With GCC up to 2.95.x, collect2 would create an import file
renatofilho@642
  1244
    # for dependence libraries.  The import file would start with
renatofilho@642
  1245
    # the line `#! .'.  This would cause the generated library to
renatofilho@642
  1246
    # depend on `.', always an invalid library.  This was fixed in
renatofilho@642
  1247
    # development snapshots of GCC prior to 3.0.
renatofilho@642
  1248
    case $host_os in
renatofilho@642
  1249
      aix4 | aix4.[[01]] | aix4.[[01]].*)
renatofilho@642
  1250
      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
renatofilho@642
  1251
	   echo ' yes '
renatofilho@642
  1252
	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
renatofilho@642
  1253
	:
renatofilho@642
  1254
      else
renatofilho@642
  1255
	can_build_shared=no
renatofilho@642
  1256
      fi
renatofilho@642
  1257
      ;;
renatofilho@642
  1258
    esac
renatofilho@642
  1259
    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
renatofilho@642
  1260
    # soname into executable. Probably we can add versioning support to
renatofilho@642
  1261
    # collect2, so additional links can be useful in future.
renatofilho@642
  1262
    if test "$aix_use_runtimelinking" = yes; then
renatofilho@642
  1263
      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
renatofilho@642
  1264
      # instead of lib<name>.a to let people know that these are not
renatofilho@642
  1265
      # typical AIX shared libraries.
renatofilho@642
  1266
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
renatofilho@642
  1267
    else
renatofilho@642
  1268
      # We preserve .a as extension for shared libraries through AIX4.2
renatofilho@642
  1269
      # and later when we are not doing run time linking.
renatofilho@642
  1270
      library_names_spec='${libname}${release}.a $libname.a'
renatofilho@642
  1271
      soname_spec='${libname}${release}${shared_ext}$major'
renatofilho@642
  1272
    fi
renatofilho@642
  1273
    shlibpath_var=LIBPATH
renatofilho@642
  1274
  fi
renatofilho@642
  1275
  ;;
renatofilho@642
  1276
renatofilho@642
  1277
amigaos*)
renatofilho@642
  1278
  library_names_spec='$libname.ixlibrary $libname.a'
renatofilho@642
  1279
  # Create ${libname}_ixlibrary.a entries in /sys/libs.
renatofilho@642
  1280
  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'
renatofilho@642
  1281
  ;;
renatofilho@642
  1282
renatofilho@642
  1283
beos*)
renatofilho@642
  1284
  library_names_spec='${libname}${shared_ext}'
renatofilho@642
  1285
  dynamic_linker="$host_os ld.so"
renatofilho@642
  1286
  shlibpath_var=LIBRARY_PATH
renatofilho@642
  1287
  ;;
renatofilho@642
  1288
renatofilho@642
  1289
bsdi[[45]]*)
renatofilho@642
  1290
  version_type=linux
renatofilho@642
  1291
  need_version=no
renatofilho@642
  1292
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
renatofilho@642
  1293
  soname_spec='${libname}${release}${shared_ext}$major'
renatofilho@642
  1294
  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
renatofilho@642
  1295
  shlibpath_var=LD_LIBRARY_PATH
renatofilho@642
  1296
  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
renatofilho@642
  1297
  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
renatofilho@642
  1298
  # the default ld.so.conf also contains /usr/contrib/lib and
renatofilho@642
  1299
  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
renatofilho@642
  1300
  # libtool to hard-code these into programs
renatofilho@642
  1301
  ;;
renatofilho@642
  1302
renatofilho@642
  1303
cygwin* | mingw* | pw32*)
renatofilho@642
  1304
  version_type=windows
renatofilho@642
  1305
  shrext_cmds=".dll"
renatofilho@642
  1306
  need_version=no
renatofilho@642
  1307
  need_lib_prefix=no
renatofilho@642
  1308
renatofilho@642
  1309
  case $GCC,$host_os in
renatofilho@642
  1310
  yes,cygwin* | yes,mingw* | yes,pw32*)
renatofilho@642
  1311
    library_names_spec='$libname.dll.a'
renatofilho@642
  1312
    # DLL is installed to $(libdir)/../bin by postinstall_cmds
renatofilho@642
  1313
    postinstall_cmds='base_file=`basename \${file}`~
renatofilho@642
  1314
      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
renatofilho@642
  1315
      dldir=$destdir/`dirname \$dlpath`~
renatofilho@642
  1316
      test -d \$dldir || mkdir -p \$dldir~
renatofilho@642
  1317
      $install_prog $dir/$dlname \$dldir/$dlname~
renatofilho@642
  1318
      chmod a+x \$dldir/$dlname'
renatofilho@642
  1319
    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
renatofilho@642
  1320
      dlpath=$dir/\$dldll~
renatofilho@642
  1321
       $rm \$dlpath'
renatofilho@642
  1322
    shlibpath_overrides_runpath=yes
renatofilho@642
  1323
renatofilho@642
  1324
    case $host_os in
renatofilho@642
  1325
    cygwin*)
renatofilho@642
  1326
      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
renatofilho@642
  1327
      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
renatofilho@642
  1328
      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
renatofilho@642
  1329
      ;;
renatofilho@642
  1330
    mingw*)
renatofilho@642
  1331
      # MinGW DLLs use traditional 'lib' prefix
renatofilho@642
  1332
      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
renatofilho@642
  1333
      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
renatofilho@642
  1334
      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
renatofilho@642
  1335
        # It is most probably a Windows format PATH printed by
renatofilho@642
  1336
        # mingw gcc, but we are running on Cygwin. Gcc prints its search
renatofilho@642
  1337
        # path with ; separators, and with drive letters. We can handle the
renatofilho@642
  1338
        # drive letters (cygwin fileutils understands them), so leave them,
renatofilho@642
  1339
        # especially as we might pass files found there to a mingw objdump,
renatofilho@642
  1340
        # which wouldn't understand a cygwinified path. Ahh.
renatofilho@642
  1341
        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
renatofilho@642
  1342
      else
renatofilho@642
  1343
        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
renatofilho@642
  1344
      fi
renatofilho@642
  1345
      ;;
renatofilho@642
  1346
    pw32*)
renatofilho@642
  1347
      # pw32 DLLs use 'pw' prefix rather than 'lib'
renatofilho@642
  1348
      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
renatofilho@642
  1349
      ;;
renatofilho@642
  1350
    esac
renatofilho@642
  1351
    ;;
renatofilho@642
  1352
renatofilho@642
  1353
  *)
renatofilho@642
  1354
    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
renatofilho@642
  1355
    ;;
renatofilho@642
  1356
  esac
renatofilho@642
  1357
  dynamic_linker='Win32 ld.exe'
renatofilho@642
  1358
  # FIXME: first we should search . and the directory the executable is in
renatofilho@642
  1359
  shlibpath_var=PATH
renatofilho@642
  1360
  ;;
renatofilho@642
  1361
renatofilho@642
  1362
darwin* | rhapsody*)
renatofilho@642
  1363
  dynamic_linker="$host_os dyld"
renatofilho@642
  1364
  version_type=darwin
renatofilho@642
  1365
  need_lib_prefix=no
renatofilho@642
  1366
  need_version=no
renatofilho@642
  1367
  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
renatofilho@642
  1368
  soname_spec='${libname}${release}${major}$shared_ext'
renatofilho@642
  1369
  shlibpath_overrides_runpath=yes
renatofilho@642
  1370
  shlibpath_var=DYLD_LIBRARY_PATH
renatofilho@642
  1371
  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
renatofilho@642
  1372
  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
renatofilho@642
  1373
  if test "$GCC" = yes; then
renatofilho@642
  1374
    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"`
renatofilho@642
  1375
  else
renatofilho@642
  1376
    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
renatofilho@642
  1377
  fi
renatofilho@642
  1378
  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
renatofilho@642
  1379
  ;;
renatofilho@642
  1380
renatofilho@642
  1381
dgux*)
renatofilho@642
  1382
  version_type=linux
renatofilho@642
  1383
  need_lib_prefix=no
renatofilho@642
  1384
  need_version=no
renatofilho@642
  1385
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
renatofilho@642
  1386
  soname_spec='${libname}${release}${shared_ext}$major'
renatofilho@642
  1387
  shlibpath_var=LD_LIBRARY_PATH
renatofilho@642
  1388
  ;;
renatofilho@642
  1389
renatofilho@642
  1390
freebsd1*)
renatofilho@642
  1391
  dynamic_linker=no
renatofilho@642
  1392
  ;;
renatofilho@642
  1393
renatofilho@642
  1394
freebsd* | dragonfly*)
renatofilho@642
  1395
  # DragonFly does not have aout.  When/if they implement a new
renatofilho@642
  1396
  # versioning mechanism, adjust this.
renatofilho@642
  1397
  if test -x /usr/bin/objformat; then
renatofilho@642
  1398
    objformat=`/usr/bin/objformat`
renatofilho@642
  1399
  else
renatofilho@642
  1400
    case $host_os in
renatofilho@642
  1401
    freebsd[[123]]*) objformat=aout ;;
renatofilho@642
  1402
    *) objformat=elf ;;
renatofilho@642
  1403
    esac
renatofilho@642
  1404
  fi
renatofilho@642
  1405
  version_type=freebsd-$objformat
renatofilho@642
  1406
  case $version_type in
renatofilho@642
  1407
    freebsd-elf*)
renatofilho@642
  1408
      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
renatofilho@642
  1409
      need_version=no
renatofilho@642
  1410
      need_lib_prefix=no
renatofilho@642
  1411
      ;;
renatofilho@642
  1412
    freebsd-*)
renatofilho@642
  1413
      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
renatofilho@642
  1414
      need_version=yes
renatofilho@642
  1415
      ;;
renatofilho@642
  1416
  esac
renatofilho@642
  1417
  shlibpath_var=LD_LIBRARY_PATH
renatofilho@642
  1418
  case $host_os in
renatofilho@642
  1419
  freebsd2*)
renatofilho@642
  1420
    shlibpath_overrides_runpath=yes
renatofilho@642
  1421
    ;;
renatofilho@642
  1422
  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
renatofilho@642
  1423
    shlibpath_overrides_runpath=yes
renatofilho@642
  1424
    hardcode_into_libs=yes
renatofilho@642
  1425
    ;;
renatofilho@642
  1426
  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
renatofilho@642
  1427
  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
renatofilho@642
  1428
    shlibpath_overrides_runpath=no
renatofilho@642
  1429
    hardcode_into_libs=yes
renatofilho@642
  1430
    ;;
renatofilho@642
  1431
  freebsd*) # from 4.6 on
renatofilho@642
  1432
    shlibpath_overrides_runpath=yes
renatofilho@642
  1433
    hardcode_into_libs=yes
renatofilho@642
  1434
    ;;
renatofilho@642
  1435
  esac
renatofilho@642
  1436
  ;;
renatofilho@642
  1437
renatofilho@642
  1438
gnu*)
renatofilho@642
  1439
  version_type=linux
renatofilho@642
  1440
  need_lib_prefix=no
renatofilho@642
  1441
  need_version=no
renatofilho@642
  1442
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
renatofilho@642
  1443
  soname_spec='${libname}${release}${shared_ext}$major'
renatofilho@642
  1444
  shlibpath_var=LD_LIBRARY_PATH
renatofilho@642
  1445
  hardcode_into_libs=yes
renatofilho@642
  1446
  ;;
renatofilho@642
  1447
renatofilho@642
  1448
hpux9* | hpux10* | hpux11*)
renatofilho@642
  1449
  # Give a soname corresponding to the major version so that dld.sl refuses to
renatofilho@642
  1450
  # link against other versions.
renatofilho@642
  1451
  version_type=sunos
renatofilho@642
  1452
  need_lib_prefix=no
renatofilho@642
  1453
  need_version=no
renatofilho@642
  1454
  case $host_cpu in
renatofilho@642
  1455
  ia64*)
renatofilho@642
  1456
    shrext_cmds='.so'
renatofilho@642
  1457
    hardcode_into_libs=yes
renatofilho@642
  1458
    dynamic_linker="$host_os dld.so"
renatofilho@642
  1459
    shlibpath_var=LD_LIBRARY_PATH
renatofilho@642
  1460
    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
renatofilho@642
  1461
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
renatofilho@642
  1462
    soname_spec='${libname}${release}${shared_ext}$major'
renatofilho@642
  1463
    if test "X$HPUX_IA64_MODE" = X32; then
renatofilho@642
  1464
      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
renatofilho@642
  1465
    else
renatofilho@642
  1466
      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
renatofilho@642
  1467
    fi
renatofilho@642
  1468
    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
renatofilho@642
  1469
    ;;
renatofilho@642
  1470
   hppa*64*)
renatofilho@642
  1471
     shrext_cmds='.sl'
renatofilho@642
  1472
     hardcode_into_libs=yes
renatofilho@642
  1473
     dynamic_linker="$host_os dld.sl"
renatofilho@642
  1474
     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
renatofilho@642
  1475
     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
renatofilho@642
  1476
     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
renatofilho@642
  1477
     soname_spec='${libname}${release}${shared_ext}$major'
renatofilho@642
  1478
     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
renatofilho@642
  1479
     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
renatofilho@642
  1480
     ;;
renatofilho@642
  1481
   *)
renatofilho@642
  1482
    shrext_cmds='.sl'
renatofilho@642
  1483
    dynamic_linker="$host_os dld.sl"
renatofilho@642
  1484
    shlibpath_var=SHLIB_PATH
renatofilho@642
  1485
    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
renatofilho@642
  1486
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
renatofilho@642
  1487
    soname_spec='${libname}${release}${shared_ext}$major'
renatofilho@642
  1488
    ;;
renatofilho@642
  1489
  esac
renatofilho@642
  1490
  # HP-UX runs *really* slowly unless shared libraries are mode 555.
renatofilho@642
  1491
  postinstall_cmds='chmod 555 $lib'
renatofilho@642
  1492
  ;;
renatofilho@642
  1493
renatofilho@642
  1494
interix3*)
renatofilho@642
  1495
  version_type=linux
renatofilho@642
  1496
  need_lib_prefix=no
renatofilho@642
  1497
  need_version=no
renatofilho@642
  1498
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
renatofilho@642
  1499
  soname_spec='${libname}${release}${shared_ext}$major'
renatofilho@642
  1500
  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
renatofilho@642
  1501
  shlibpath_var=LD_LIBRARY_PATH
renatofilho@642
  1502
  shlibpath_overrides_runpath=no
renatofilho@642
  1503
  hardcode_into_libs=yes
renatofilho@642
  1504
  ;;
renatofilho@642
  1505
renatofilho@642
  1506
irix5* | irix6* | nonstopux*)
renatofilho@642
  1507
  case $host_os in
renatofilho@642
  1508
    nonstopux*) version_type=nonstopux ;;
renatofilho@642
  1509
    *)
renatofilho@642
  1510
	if test "$lt_cv_prog_gnu_ld" = yes; then
renatofilho@642
  1511
		version_type=linux
renatofilho@642
  1512
	else
renatofilho@642
  1513
		version_type=irix
renatofilho@642
  1514
	fi ;;
renatofilho@642
  1515
  esac
renatofilho@642
  1516
  need_lib_prefix=no
renatofilho@642
  1517
  need_version=no
renatofilho@642
  1518
  soname_spec='${libname}${release}${shared_ext}$major'
renatofilho@642
  1519
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
renatofilho@642
  1520
  case $host_os in
renatofilho@642
  1521
  irix5* | nonstopux*)
renatofilho@642
  1522
    libsuff= shlibsuff=
renatofilho@642
  1523
    ;;
renatofilho@642
  1524
  *)
renatofilho@642
  1525
    case $LD in # libtool.m4 will add one of these switches to LD
renatofilho@642
  1526
    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
renatofilho@642
  1527
      libsuff= shlibsuff= libmagic=32-bit;;
renatofilho@642
  1528
    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
renatofilho@642
  1529
      libsuff=32 shlibsuff=N32 libmagic=N32;;
renatofilho@642
  1530
    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
renatofilho@642
  1531
      libsuff=64 shlibsuff=64 libmagic=64-bit;;
renatofilho@642
  1532
    *) libsuff= shlibsuff= libmagic=never-match;;
renatofilho@642
  1533
    esac
renatofilho@642
  1534
    ;;
renatofilho@642
  1535
  esac
renatofilho@642
  1536
  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
renatofilho@642
  1537
  shlibpath_overrides_runpath=no
renatofilho@642
  1538
  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
renatofilho@642
  1539
  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
renatofilho@642
  1540
  hardcode_into_libs=yes
renatofilho@642
  1541
  ;;
renatofilho@642
  1542
renatofilho@642
  1543
# No shared lib support for Linux oldld, aout, or coff.
renatofilho@642
  1544
linux*oldld* | linux*aout* | linux*coff*)
renatofilho@642
  1545
  dynamic_linker=no
renatofilho@642
  1546
  ;;
renatofilho@642
  1547
renatofilho@642
  1548
# This must be Linux ELF.
renatofilho@642
  1549
linux* | k*bsd*-gnu)
renatofilho@642
  1550
  version_type=linux
renatofilho@642
  1551
  need_lib_prefix=no
renatofilho@642
  1552
  need_version=no
renatofilho@642
  1553
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
renatofilho@642
  1554
  soname_spec='${libname}${release}${shared_ext}$major'
renatofilho@642
  1555
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
renatofilho@642
  1556
  shlibpath_var=LD_LIBRARY_PATH
renatofilho@642
  1557
  shlibpath_overrides_runpath=no
renatofilho@642
  1558
  # This implies no fast_install, which is unacceptable.
renatofilho@642
  1559
  # Some rework will be needed to allow for fast_install
renatofilho@642
  1560
  # before this can be enabled.
renatofilho@642
  1561
  hardcode_into_libs=yes
renatofilho@642
  1562
renatofilho@642
  1563
  # Append ld.so.conf contents to the search path
renatofilho@642
  1564
  if test -f /etc/ld.so.conf; then
renatofilho@642
  1565
    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' ' '`
renatofilho@642
  1566
    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
renatofilho@642
  1567
  fi
renatofilho@642
  1568
renatofilho@642
  1569
  # We used to test for /lib/ld.so.1 and disable shared libraries on
renatofilho@642
  1570
  # powerpc, because MkLinux only supported shared libraries with the
renatofilho@642
  1571
  # GNU dynamic linker.  Since this was broken with cross compilers,
renatofilho@642
  1572
  # most powerpc-linux boxes support dynamic linking these days and
renatofilho@642
  1573
  # people can always --disable-shared, the test was removed, and we
renatofilho@642
  1574
  # assume the GNU/Linux dynamic linker is in use.
renatofilho@642
  1575
  dynamic_linker='GNU/Linux ld.so'
renatofilho@642
  1576
  ;;
renatofilho@642
  1577
renatofilho@642
  1578
netbsdelf*-gnu)
renatofilho@642
  1579
  version_type=linux
renatofilho@642
  1580
  need_lib_prefix=no
renatofilho@642
  1581
  need_version=no
renatofilho@642
  1582
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
renatofilho@642
  1583
  soname_spec='${libname}${release}${shared_ext}$major'
renatofilho@642
  1584
  shlibpath_var=LD_LIBRARY_PATH
renatofilho@642
  1585
  shlibpath_overrides_runpath=no
renatofilho@642
  1586
  hardcode_into_libs=yes
renatofilho@642
  1587
  dynamic_linker='NetBSD ld.elf_so'
renatofilho@642
  1588
  ;;
renatofilho@642
  1589
renatofilho@642
  1590
netbsd*)
renatofilho@642
  1591
  version_type=sunos
renatofilho@642
  1592
  need_lib_prefix=no
renatofilho@642
  1593
  need_version=no
renatofilho@642
  1594
  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
renatofilho@642
  1595
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
renatofilho@642
  1596
    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
renatofilho@642
  1597
    dynamic_linker='NetBSD (a.out) ld.so'
renatofilho@642
  1598
  else
renatofilho@642
  1599
    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
renatofilho@642
  1600
    soname_spec='${libname}${release}${shared_ext}$major'
renatofilho@642
  1601
    dynamic_linker='NetBSD ld.elf_so'
renatofilho@642
  1602
  fi
renatofilho@642
  1603
  shlibpath_var=LD_LIBRARY_PATH
renatofilho@642
  1604
  shlibpath_overrides_runpath=yes
renatofilho@642
  1605
  hardcode_into_libs=yes
renatofilho@642
  1606
  ;;
renatofilho@642
  1607
renatofilho@642
  1608
newsos6)
renatofilho@642
  1609
  version_type=linux
renatofilho@642
  1610
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
renatofilho@642
  1611
  shlibpath_var=LD_LIBRARY_PATH
renatofilho@642
  1612
  shlibpath_overrides_runpath=yes
renatofilho@642
  1613
  ;;
renatofilho@642
  1614
renatofilho@642
  1615
nto-qnx*)
renatofilho@642
  1616
  version_type=linux
renatofilho@642
  1617
  need_lib_prefix=no
renatofilho@642
  1618
  need_version=no
renatofilho@642
  1619
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
renatofilho@642
  1620
  soname_spec='${libname}${release}${shared_ext}$major'
renatofilho@642
  1621
  shlibpath_var=LD_LIBRARY_PATH
renatofilho@642
  1622
  shlibpath_overrides_runpath=yes
renatofilho@642
  1623
  ;;
renatofilho@642
  1624
renatofilho@642
  1625
openbsd*)
renatofilho@642
  1626
  version_type=sunos
renatofilho@642
  1627
  sys_lib_dlsearch_path_spec="/usr/lib"
renatofilho@642
  1628
  need_lib_prefix=no
renatofilho@642
  1629
  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
renatofilho@642
  1630
  case $host_os in
renatofilho@642
  1631
    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
renatofilho@642
  1632
    *)                         need_version=no  ;;
renatofilho@642
  1633
  esac
renatofilho@642
  1634
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
renatofilho@642
  1635
  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
renatofilho@642
  1636
  shlibpath_var=LD_LIBRARY_PATH
renatofilho@642
  1637
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
renatofilho@642
  1638
    case $host_os in
renatofilho@642
  1639
      openbsd2.[[89]] | openbsd2.[[89]].*)
renatofilho@642
  1640
	shlibpath_overrides_runpath=no
renatofilho@642
  1641
	;;
renatofilho@642
  1642
      *)
renatofilho@642
  1643
	shlibpath_overrides_runpath=yes
renatofilho@642
  1644
	;;
renatofilho@642
  1645
      esac
renatofilho@642
  1646
  else
renatofilho@642
  1647
    shlibpath_overrides_runpath=yes
renatofilho@642
  1648
  fi
renatofilho@642
  1649
  ;;
renatofilho@642
  1650
renatofilho@642
  1651
os2*)
renatofilho@642
  1652
  libname_spec='$name'
renatofilho@642
  1653
  shrext_cmds=".dll"
renatofilho@642
  1654
  need_lib_prefix=no
renatofilho@642
  1655
  library_names_spec='$libname${shared_ext} $libname.a'
renatofilho@642
  1656
  dynamic_linker='OS/2 ld.exe'
renatofilho@642
  1657
  shlibpath_var=LIBPATH
renatofilho@642
  1658
  ;;
renatofilho@642
  1659
renatofilho@642
  1660
osf3* | osf4* | osf5*)
renatofilho@642
  1661
  version_type=osf
renatofilho@642
  1662
  need_lib_prefix=no
renatofilho@642
  1663
  need_version=no
renatofilho@642
  1664
  soname_spec='${libname}${release}${shared_ext}$major'
renatofilho@642
  1665
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
renatofilho@642
  1666
  shlibpath_var=LD_LIBRARY_PATH
renatofilho@642
  1667
  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
renatofilho@642
  1668
  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
renatofilho@642
  1669
  ;;
renatofilho@642
  1670
renatofilho@642
  1671
solaris*)
renatofilho@642
  1672
  version_type=linux
renatofilho@642
  1673
  need_lib_prefix=no
renatofilho@642
  1674
  need_version=no
renatofilho@642
  1675
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
renatofilho@642
  1676
  soname_spec='${libname}${release}${shared_ext}$major'
renatofilho@642
  1677
  shlibpath_var=LD_LIBRARY_PATH
renatofilho@642
  1678
  shlibpath_overrides_runpath=yes
renatofilho@642
  1679
  hardcode_into_libs=yes
renatofilho@642
  1680
  # ldd complains unless libraries are executable
renatofilho@642
  1681
  postinstall_cmds='chmod +x $lib'
renatofilho@642
  1682
  ;;
renatofilho@642
  1683
renatofilho@642
  1684
sunos4*)
renatofilho@642
  1685
  version_type=sunos
renatofilho@642
  1686
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
renatofilho@642
  1687
  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
renatofilho@642
  1688
  shlibpath_var=LD_LIBRARY_PATH
renatofilho@642
  1689
  shlibpath_overrides_runpath=yes
renatofilho@642
  1690
  if test "$with_gnu_ld" = yes; then
renatofilho@642
  1691
    need_lib_prefix=no
renatofilho@642
  1692
  fi
renatofilho@642
  1693
  need_version=yes
renatofilho@642
  1694
  ;;
renatofilho@642
  1695
renatofilho@642
  1696
sysv4 | sysv4.3*)
renatofilho@642
  1697
  version_type=linux
renatofilho@642
  1698
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
renatofilho@642
  1699
  soname_spec='${libname}${release}${shared_ext}$major'
renatofilho@642
  1700
  shlibpath_var=LD_LIBRARY_PATH
renatofilho@642
  1701
  case $host_vendor in
renatofilho@642
  1702
    sni)
renatofilho@642
  1703
      shlibpath_overrides_runpath=no
renatofilho@642
  1704
      need_lib_prefix=no
renatofilho@642
  1705
      export_dynamic_flag_spec='${wl}-Blargedynsym'
renatofilho@642
  1706
      runpath_var=LD_RUN_PATH
renatofilho@642
  1707
      ;;
renatofilho@642
  1708
    siemens)
renatofilho@642
  1709
      need_lib_prefix=no
renatofilho@642
  1710
      ;;
renatofilho@642
  1711
    motorola)
renatofilho@642
  1712
      need_lib_prefix=no
renatofilho@642
  1713
      need_version=no
renatofilho@642
  1714
      shlibpath_overrides_runpath=no
renatofilho@642
  1715
      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
renatofilho@642
  1716
      ;;
renatofilho@642
  1717
  esac
renatofilho@642
  1718
  ;;
renatofilho@642
  1719
renatofilho@642
  1720
sysv4*MP*)
renatofilho@642
  1721
  if test -d /usr/nec ;then
renatofilho@642
  1722
    version_type=linux
renatofilho@642
  1723
    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
renatofilho@642
  1724
    soname_spec='$libname${shared_ext}.$major'
renatofilho@642
  1725
    shlibpath_var=LD_LIBRARY_PATH
renatofilho@642
  1726
  fi
renatofilho@642
  1727
  ;;
renatofilho@642
  1728
renatofilho@642
  1729
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
renatofilho@642
  1730
  version_type=freebsd-elf
renatofilho@642
  1731
  need_lib_prefix=no
renatofilho@642
  1732
  need_version=no
renatofilho@642
  1733
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
renatofilho@642
  1734
  soname_spec='${libname}${release}${shared_ext}$major'
renatofilho@642
  1735
  shlibpath_var=LD_LIBRARY_PATH
renatofilho@642
  1736
  hardcode_into_libs=yes
renatofilho@642
  1737
  if test "$with_gnu_ld" = yes; then
renatofilho@642
  1738
    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
renatofilho@642
  1739
    shlibpath_overrides_runpath=no
renatofilho@642
  1740
  else
renatofilho@642
  1741
    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
renatofilho@642
  1742
    shlibpath_overrides_runpath=yes
renatofilho@642
  1743
    case $host_os in
renatofilho@642
  1744
      sco3.2v5*)
renatofilho@642
  1745
        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
renatofilho@642
  1746
	;;
renatofilho@642
  1747
    esac
renatofilho@642
  1748
  fi
renatofilho@642
  1749
  sys_lib_dlsearch_path_spec='/usr/lib'
renatofilho@642
  1750
  ;;
renatofilho@642
  1751
renatofilho@642
  1752
uts4*)
renatofilho@642
  1753
  version_type=linux
renatofilho@642
  1754
  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
renatofilho@642
  1755
  soname_spec='${libname}${release}${shared_ext}$major'
renatofilho@642
  1756
  shlibpath_var=LD_LIBRARY_PATH
renatofilho@642
  1757
  ;;
renatofilho@642
  1758
renatofilho@642
  1759
*)
renatofilho@642
  1760
  dynamic_linker=no
renatofilho@642
  1761
  ;;
renatofilho@642
  1762
esac
renatofilho@642
  1763
AC_MSG_RESULT([$dynamic_linker])
renatofilho@642
  1764
test "$dynamic_linker" = no && can_build_shared=no
renatofilho@642
  1765
renatofilho@642
  1766
variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
renatofilho@642
  1767
if test "$GCC" = yes; then
renatofilho@642
  1768
  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
renatofilho@642
  1769
fi
renatofilho@642
  1770
])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
renatofilho@642
  1771
renatofilho@642
  1772
renatofilho@642
  1773
# _LT_AC_TAGCONFIG
renatofilho@642
  1774
# ----------------
renatofilho@642
  1775
AC_DEFUN([_LT_AC_TAGCONFIG],
renatofilho@642
  1776
[AC_ARG_WITH([tags],
renatofilho@642
  1777
    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
renatofilho@642
  1778
        [include additional configurations @<:@automatic@:>@])],
renatofilho@642
  1779
    [tagnames="$withval"])
renatofilho@642
  1780
renatofilho@642
  1781
if test -f "$ltmain" && test -n "$tagnames"; then
renatofilho@642
  1782
  if test ! -f "${ofile}"; then
renatofilho@642
  1783
    AC_MSG_WARN([output file `$ofile' does not exist])
renatofilho@642
  1784
  fi
renatofilho@642
  1785
renatofilho@642
  1786
  if test -z "$LTCC"; then
renatofilho@642
  1787
    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
renatofilho@642
  1788
    if test -z "$LTCC"; then
renatofilho@642
  1789
      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
renatofilho@642
  1790
    else
renatofilho@642
  1791
      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
renatofilho@642
  1792
    fi
renatofilho@642
  1793
  fi
renatofilho@642
  1794
  if test -z "$LTCFLAGS"; then
renatofilho@642
  1795
    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
renatofilho@642
  1796
  fi
renatofilho@642
  1797
renatofilho@642
  1798
  # Extract list of available tagged configurations in $ofile.
renatofilho@642
  1799
  # Note that this assumes the entire list is on one line.
renatofilho@642
  1800
  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
renatofilho@642
  1801
renatofilho@642
  1802
  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
renatofilho@642
  1803
  for tagname in $tagnames; do
renatofilho@642
  1804
    IFS="$lt_save_ifs"
renatofilho@642
  1805
    # Check whether tagname contains only valid characters
renatofilho@642
  1806
    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
renatofilho@642
  1807
    "") ;;
renatofilho@642
  1808
    *)  AC_MSG_ERROR([invalid tag name: $tagname])
renatofilho@642
  1809
	;;
renatofilho@642
  1810
    esac
renatofilho@642
  1811
renatofilho@642
  1812
    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
renatofilho@642
  1813
    then
renatofilho@642
  1814
      AC_MSG_ERROR([tag name \"$tagname\" already exists])
renatofilho@642
  1815
    fi
renatofilho@642
  1816
renatofilho@642
  1817
    # Update the list of available tags.
renatofilho@642
  1818
    if test -n "$tagname"; then
renatofilho@642
  1819
      echo appending configuration tag \"$tagname\" to $ofile
renatofilho@642
  1820
renatofilho@642
  1821
      case $tagname in
renatofilho@642
  1822
      CXX)
renatofilho@642
  1823
	if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
renatofilho@642
  1824
	    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
renatofilho@642
  1825
	    (test "X$CXX" != "Xg++"))) ; then
renatofilho@642
  1826
	  AC_LIBTOOL_LANG_CXX_CONFIG
renatofilho@642
  1827
	else
renatofilho@642
  1828
	  tagname=""
renatofilho@642
  1829
	fi
renatofilho@642
  1830
	;;
renatofilho@642
  1831
renatofilho@642
  1832
      F77)
renatofilho@642
  1833
	if test -n "$F77" && test "X$F77" != "Xno"; then
renatofilho@642
  1834
	  AC_LIBTOOL_LANG_F77_CONFIG
renatofilho@642
  1835
	else
renatofilho@642
  1836
	  tagname=""
renatofilho@642
  1837
	fi
renatofilho@642
  1838
	;;
renatofilho@642
  1839
renatofilho@642
  1840
      GCJ)
renatofilho@642
  1841
	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
renatofilho@642
  1842
	  AC_LIBTOOL_LANG_GCJ_CONFIG
renatofilho@642
  1843
	else
renatofilho@642
  1844
	  tagname=""
renatofilho@642
  1845
	fi
renatofilho@642
  1846
	;;
renatofilho@642
  1847
renatofilho@642
  1848
      RC)
renatofilho@642
  1849
	AC_LIBTOOL_LANG_RC_CONFIG
renatofilho@642
  1850
	;;
renatofilho@642
  1851
renatofilho@642
  1852
      *)
renatofilho@642
  1853
	AC_MSG_ERROR([Unsupported tag name: $tagname])
renatofilho@642
  1854
	;;
renatofilho@642
  1855
      esac
renatofilho@642
  1856
renatofilho@642
  1857
      # Append the new tag name to the list of available tags.
renatofilho@642
  1858
      if test -n "$tagname" ; then
renatofilho@642
  1859
      available_tags="$available_tags $tagname"
renatofilho@642
  1860
    fi
renatofilho@642
  1861
    fi
renatofilho@642
  1862
  done
renatofilho@642
  1863
  IFS="$lt_save_ifs"
renatofilho@642
  1864
renatofilho@642
  1865
  # Now substitute the updated list of available tags.
renatofilho@642
  1866
  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
renatofilho@642
  1867
    mv "${ofile}T" "$ofile"
renatofilho@642
  1868
    chmod +x "$ofile"
renatofilho@642
  1869
  else
renatofilho@642
  1870
    rm -f "${ofile}T"
renatofilho@642
  1871
    AC_MSG_ERROR([unable to update list of available tagged configurations.])
renatofilho@642
  1872
  fi
renatofilho@642
  1873
fi
renatofilho@642
  1874
])# _LT_AC_TAGCONFIG
renatofilho@642
  1875
renatofilho@642
  1876
renatofilho@642
  1877
# AC_LIBTOOL_DLOPEN
renatofilho@642
  1878
# -----------------
renatofilho@642
  1879
# enable checks for dlopen support
renatofilho@642
  1880
AC_DEFUN([AC_LIBTOOL_DLOPEN],
renatofilho@642
  1881
 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
renatofilho@642
  1882
])# AC_LIBTOOL_DLOPEN
renatofilho@642
  1883
renatofilho@642
  1884
renatofilho@642
  1885
# AC_LIBTOOL_WIN32_DLL
renatofilho@642
  1886
# --------------------
renatofilho@642
  1887
# declare package support for building win32 DLLs
renatofilho@642
  1888
AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
renatofilho@642
  1889
[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
renatofilho@642
  1890
])# AC_LIBTOOL_WIN32_DLL
renatofilho@642
  1891
renatofilho@642
  1892
renatofilho@642
  1893
# AC_ENABLE_SHARED([DEFAULT])
renatofilho@642
  1894
# ---------------------------
renatofilho@642
  1895
# implement the --enable-shared flag
renatofilho@642
  1896
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
renatofilho@642
  1897
AC_DEFUN([AC_ENABLE_SHARED],
renatofilho@642
  1898
[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
renatofilho@642
  1899
AC_ARG_ENABLE([shared],
renatofilho@642
  1900
    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
renatofilho@642
  1901
	[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
renatofilho@642
  1902
    [p=${PACKAGE-default}
renatofilho@642
  1903
    case $enableval in
renatofilho@642
  1904
    yes) enable_shared=yes ;;
renatofilho@642
  1905
    no) enable_shared=no ;;
renatofilho@642
  1906
    *)
renatofilho@642
  1907
      enable_shared=no
renatofilho@642
  1908
      # Look at the argument we got.  We use all the common list separators.
renatofilho@642
  1909
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
renatofilho@642
  1910
      for pkg in $enableval; do
renatofilho@642
  1911
	IFS="$lt_save_ifs"
renatofilho@642
  1912
	if test "X$pkg" = "X$p"; then
renatofilho@642
  1913
	  enable_shared=yes
renatofilho@642
  1914
	fi
renatofilho@642
  1915
      done
renatofilho@642
  1916
      IFS="$lt_save_ifs"
renatofilho@642
  1917
      ;;
renatofilho@642
  1918
    esac],
renatofilho@642
  1919
    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
renatofilho@642
  1920
])# AC_ENABLE_SHARED
renatofilho@642
  1921
renatofilho@642
  1922
renatofilho@642
  1923
# AC_DISABLE_SHARED
renatofilho@642
  1924
# -----------------
renatofilho@642
  1925
# set the default shared flag to --disable-shared
renatofilho@642
  1926
AC_DEFUN([AC_DISABLE_SHARED],
renatofilho@642
  1927
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
renatofilho@642
  1928
AC_ENABLE_SHARED(no)
renatofilho@642
  1929
])# AC_DISABLE_SHARED
renatofilho@642
  1930
renatofilho@642
  1931
renatofilho@642
  1932
# AC_ENABLE_STATIC([DEFAULT])
renatofilho@642
  1933
# ---------------------------
renatofilho@642
  1934
# implement the --enable-static flag
renatofilho@642
  1935
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
renatofilho@642
  1936
AC_DEFUN([AC_ENABLE_STATIC],
renatofilho@642
  1937
[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
renatofilho@642
  1938
AC_ARG_ENABLE([static],
renatofilho@642
  1939
    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
renatofilho@642
  1940
	[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
renatofilho@642
  1941
    [p=${PACKAGE-default}
renatofilho@642
  1942
    case $enableval in
renatofilho@642
  1943
    yes) enable_static=yes ;;
renatofilho@642
  1944
    no) enable_static=no ;;
renatofilho@642
  1945
    *)
renatofilho@642
  1946
     enable_static=no
renatofilho@642
  1947
      # Look at the argument we got.  We use all the common list separators.
renatofilho@642
  1948
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
renatofilho@642
  1949
      for pkg in $enableval; do
renatofilho@642
  1950
	IFS="$lt_save_ifs"
renatofilho@642
  1951
	if test "X$pkg" = "X$p"; then
renatofilho@642
  1952
	  enable_static=yes
renatofilho@642
  1953
	fi
renatofilho@642
  1954
      done
renatofilho@642
  1955
      IFS="$lt_save_ifs"
renatofilho@642
  1956
      ;;
renatofilho@642
  1957
    esac],
renatofilho@642
  1958
    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
renatofilho@642
  1959
])# AC_ENABLE_STATIC
renatofilho@642
  1960
renatofilho@642
  1961
renatofilho@642
  1962
# AC_DISABLE_STATIC
renatofilho@642
  1963
# -----------------
renatofilho@642
  1964
# set the default static flag to --disable-static
renatofilho@642
  1965
AC_DEFUN([AC_DISABLE_STATIC],
renatofilho@642
  1966
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
renatofilho@642
  1967
AC_ENABLE_STATIC(no)
renatofilho@642
  1968
])# AC_DISABLE_STATIC
renatofilho@642
  1969
renatofilho@642
  1970
renatofilho@642
  1971
# AC_ENABLE_FAST_INSTALL([DEFAULT])
renatofilho@642
  1972
# ---------------------------------
renatofilho@642
  1973
# implement the --enable-fast-install flag
renatofilho@642
  1974
# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
renatofilho@642
  1975
AC_DEFUN([AC_ENABLE_FAST_INSTALL],
renatofilho@642
  1976
[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
renatofilho@642
  1977
AC_ARG_ENABLE([fast-install],
renatofilho@642
  1978
    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
renatofilho@642
  1979
    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
renatofilho@642
  1980
    [p=${PACKAGE-default}
renatofilho@642
  1981
    case $enableval in
renatofilho@642
  1982
    yes) enable_fast_install=yes ;;
renatofilho@642
  1983
    no) enable_fast_install=no ;;
renatofilho@642
  1984
    *)
renatofilho@642
  1985
      enable_fast_install=no
renatofilho@642
  1986
      # Look at the argument we got.  We use all the common list separators.
renatofilho@642
  1987
      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
renatofilho@642
  1988
      for pkg in $enableval; do
renatofilho@642
  1989
	IFS="$lt_save_ifs"
renatofilho@642
  1990
	if test "X$pkg" = "X$p"; then
renatofilho@642
  1991
	  enable_fast_install=yes
renatofilho@642
  1992
	fi
renatofilho@642
  1993
      done
renatofilho@642
  1994
      IFS="$lt_save_ifs"
renatofilho@642
  1995
      ;;
renatofilho@642
  1996
    esac],
renatofilho@642
  1997
    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
renatofilho@642
  1998
])# AC_ENABLE_FAST_INSTALL
renatofilho@642
  1999
renatofilho@642
  2000
renatofilho@642
  2001
# AC_DISABLE_FAST_INSTALL
renatofilho@642
  2002
# -----------------------
renatofilho@642
  2003
# set the default to --disable-fast-install
renatofilho@642
  2004
AC_DEFUN([AC_DISABLE_FAST_INSTALL],
renatofilho@642
  2005
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
renatofilho@642
  2006
AC_ENABLE_FAST_INSTALL(no)
renatofilho@642
  2007
])# AC_DISABLE_FAST_INSTALL
renatofilho@642
  2008
renatofilho@642
  2009
renatofilho@642
  2010
# AC_LIBTOOL_PICMODE([MODE])
renatofilho@642
  2011
# --------------------------
renatofilho@642
  2012
# implement the --with-pic flag
renatofilho@642
  2013
# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
renatofilho@642
  2014
AC_DEFUN([AC_LIBTOOL_PICMODE],
renatofilho@642
  2015
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
renatofilho@642
  2016
pic_mode=ifelse($#,1,$1,default)
renatofilho@642
  2017
])# AC_LIBTOOL_PICMODE
renatofilho@642
  2018
renatofilho@642
  2019
renatofilho@642
  2020
# AC_PROG_EGREP
renatofilho@642
  2021
# -------------
renatofilho@642
  2022
# This is predefined starting with Autoconf 2.54, so this conditional
renatofilho@642
  2023
# definition can be removed once we require Autoconf 2.54 or later.
renatofilho@642
  2024
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
renatofilho@642
  2025
[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
renatofilho@642
  2026
   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
renatofilho@642
  2027
    then ac_cv_prog_egrep='grep -E'
renatofilho@642
  2028
    else ac_cv_prog_egrep='egrep'
renatofilho@642
  2029
    fi])
renatofilho@642
  2030
 EGREP=$ac_cv_prog_egrep
renatofilho@642
  2031
 AC_SUBST([EGREP])
renatofilho@642
  2032
])])
renatofilho@642
  2033
renatofilho@642
  2034
renatofilho@642
  2035
# AC_PATH_TOOL_PREFIX
renatofilho@642
  2036
# -------------------
renatofilho@642
  2037
# find a file program which can recognise shared library
renatofilho@642
  2038
AC_DEFUN([AC_PATH_TOOL_PREFIX],
renatofilho@642
  2039
[AC_REQUIRE([AC_PROG_EGREP])dnl
renatofilho@642
  2040
AC_MSG_CHECKING([for $1])
renatofilho@642
  2041
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
renatofilho@642
  2042
[case $MAGIC_CMD in
renatofilho@642
  2043
[[\\/*] |  ?:[\\/]*])
renatofilho@642
  2044
  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
renatofilho@642
  2045
  ;;
renatofilho@642
  2046
*)
renatofilho@642
  2047
  lt_save_MAGIC_CMD="$MAGIC_CMD"
renatofilho@642
  2048
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
renatofilho@642
  2049
dnl $ac_dummy forces splitting on constant user-supplied paths.
renatofilho@642
  2050
dnl POSIX.2 word splitting is done only on the output of word expansions,
renatofilho@642
  2051
dnl not every word.  This closes a longstanding sh security hole.
renatofilho@642
  2052
  ac_dummy="ifelse([$2], , $PATH, [$2])"
renatofilho@642
  2053
  for ac_dir in $ac_dummy; do
renatofilho@642
  2054
    IFS="$lt_save_ifs"
renatofilho@642
  2055
    test -z "$ac_dir" && ac_dir=.
renatofilho@642
  2056
    if test -f $ac_dir/$1; then
renatofilho@642
  2057
      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
renatofilho@642
  2058
      if test -n "$file_magic_test_file"; then
renatofilho@642
  2059
	case $deplibs_check_method in
renatofilho@642
  2060
	"file_magic "*)
renatofilho@642
  2061
	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
renatofilho@642
  2062
	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
renatofilho@642
  2063
	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
renatofilho@642
  2064
	    $EGREP "$file_magic_regex" > /dev/null; then
renatofilho@642
  2065
	    :
renatofilho@642
  2066
	  else
renatofilho@642
  2067
	    cat <<EOF 1>&2
renatofilho@642
  2068
renatofilho@642
  2069
*** Warning: the command libtool uses to detect shared libraries,
renatofilho@642
  2070
*** $file_magic_cmd, produces output that libtool cannot recognize.
renatofilho@642
  2071
*** The result is that libtool may fail to recognize shared libraries
renatofilho@642
  2072
*** as such.  This will affect the creation of libtool libraries that
renatofilho@642
  2073
*** depend on shared libraries, but programs linked with such libtool
renatofilho@642
  2074
*** libraries will work regardless of this problem.  Nevertheless, you
renatofilho@642
  2075
*** may want to report the problem to your system manager and/or to
renatofilho@642
  2076
*** bug-libtool@gnu.org
renatofilho@642
  2077
renatofilho@642
  2078
EOF
renatofilho@642
  2079
	  fi ;;
renatofilho@642
  2080
	esac
renatofilho@642
  2081
      fi
renatofilho@642
  2082
      break
renatofilho@642
  2083
    fi
renatofilho@642
  2084
  done
renatofilho@642
  2085
  IFS="$lt_save_ifs"
renatofilho@642
  2086
  MAGIC_CMD="$lt_save_MAGIC_CMD"
renatofilho@642
  2087
  ;;
renatofilho@642
  2088
esac])
renatofilho@642
  2089
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
renatofilho@642
  2090
if test -n "$MAGIC_CMD"; then
renatofilho@642
  2091
  AC_MSG_RESULT($MAGIC_CMD)
renatofilho@642
  2092
else
renatofilho@642
  2093
  AC_MSG_RESULT(no)
renatofilho@642
  2094
fi
renatofilho@642
  2095
])# AC_PATH_TOOL_PREFIX
renatofilho@642
  2096
renatofilho@642
  2097
renatofilho@642
  2098
# AC_PATH_MAGIC
renatofilho@642
  2099
# -------------
renatofilho@642
  2100
# find a file program which can recognise a shared library
renatofilho@642
  2101
AC_DEFUN([AC_PATH_MAGIC],
renatofilho@642
  2102
[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
renatofilho@642
  2103
if test -z "$lt_cv_path_MAGIC_CMD"; then
renatofilho@642
  2104
  if test -n "$ac_tool_prefix"; then
renatofilho@642
  2105
    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
renatofilho@642
  2106
  else
renatofilho@642
  2107
    MAGIC_CMD=:
renatofilho@642
  2108
  fi
renatofilho@642
  2109
fi
renatofilho@642
  2110
])# AC_PATH_MAGIC
renatofilho@642
  2111
renatofilho@642
  2112
renatofilho@642
  2113
# AC_PROG_LD
renatofilho@642
  2114
# ----------
renatofilho@642
  2115
# find the pathname to the GNU or non-GNU linker
renatofilho@642
  2116
AC_DEFUN([AC_PROG_LD],
renatofilho@642
  2117
[AC_ARG_WITH([gnu-ld],
renatofilho@642
  2118
    [AC_HELP_STRING([--with-gnu-ld],
renatofilho@642
  2119
	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
renatofilho@642
  2120
    [test "$withval" = no || with_gnu_ld=yes],
renatofilho@642
  2121
    [with_gnu_ld=no])
renatofilho@642
  2122
AC_REQUIRE([LT_AC_PROG_SED])dnl
renatofilho@642
  2123
AC_REQUIRE([AC_PROG_CC])dnl
renatofilho@642
  2124
AC_REQUIRE([AC_CANONICAL_HOST])dnl
renatofilho@642
  2125
AC_REQUIRE([AC_CANONICAL_BUILD])dnl
renatofilho@642
  2126
ac_prog=ld
renatofilho@642
  2127
if test "$GCC" = yes; then
renatofilho@642
  2128
  # Check if gcc -print-prog-name=ld gives a path.
renatofilho@642
  2129
  AC_MSG_CHECKING([for ld used by $CC])
renatofilho@642
  2130
  case $host in
renatofilho@642
  2131
  *-*-mingw*)
renatofilho@642
  2132
    # gcc leaves a trailing carriage return which upsets mingw
renatofilho@642
  2133
    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
renatofilho@642
  2134
  *)
renatofilho@642
  2135
    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
renatofilho@642
  2136
  esac
renatofilho@642
  2137
  case $ac_prog in
renatofilho@642
  2138
    # Accept absolute paths.
renatofilho@642
  2139
    [[\\/]]* | ?:[[\\/]]*)
renatofilho@642
  2140
      re_direlt='/[[^/]][[^/]]*/\.\./'
renatofilho@642
  2141
      # Canonicalize the pathname of ld
renatofilho@642
  2142
      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
renatofilho@642
  2143
      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
renatofilho@642
  2144
	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
renatofilho@642
  2145
      done
renatofilho@642
  2146
      test -z "$LD" && LD="$ac_prog"
renatofilho@642
  2147
      ;;
renatofilho@642
  2148
  "")
renatofilho@642
  2149
    # If it fails, then pretend we aren't using GCC.
renatofilho@642
  2150
    ac_prog=ld
renatofilho@642
  2151
    ;;
renatofilho@642
  2152
  *)
renatofilho@642
  2153
    # If it is relative, then search for the first ld in PATH.
renatofilho@642
  2154
    with_gnu_ld=unknown
renatofilho@642
  2155
    ;;
renatofilho@642
  2156
  esac
renatofilho@642
  2157
elif test "$with_gnu_ld" = yes; then
renatofilho@642
  2158
  AC_MSG_CHECKING([for GNU ld])
renatofilho@642
  2159
else
renatofilho@642
  2160
  AC_MSG_CHECKING([for non-GNU ld])
renatofilho@642
  2161
fi
renatofilho@642
  2162
AC_CACHE_VAL(lt_cv_path_LD,
renatofilho@642
  2163
[if test -z "$LD"; then
renatofilho@642
  2164
  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
renatofilho@642
  2165
  for ac_dir in $PATH; do
renatofilho@642
  2166
    IFS="$lt_save_ifs"
renatofilho@642
  2167
    test -z "$ac_dir" && ac_dir=.
renatofilho@642
  2168
    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
renatofilho@642
  2169
      lt_cv_path_LD="$ac_dir/$ac_prog"
renatofilho@642
  2170
      # Check to see if the program is GNU ld.  I'd rather use --version,
renatofilho@642
  2171
      # but apparently some variants of GNU ld only accept -v.
renatofilho@642
  2172
      # Break only if it was the GNU/non-GNU ld that we prefer.
renatofilho@642
  2173
      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
renatofilho@642
  2174
      *GNU* | *'with BFD'*)
renatofilho@642
  2175
	test "$with_gnu_ld" != no && break
renatofilho@642
  2176
	;;
renatofilho@642
  2177
      *)
renatofilho@642
  2178
	test "$with_gnu_ld" != yes && break
renatofilho@642
  2179
	;;
renatofilho@642
  2180
      esac
renatofilho@642
  2181
    fi
renatofilho@642
  2182
  done
renatofilho@642
  2183
  IFS="$lt_save_ifs"
renatofilho@642
  2184
else
renatofilho@642
  2185
  lt_cv_path_LD="$LD" # Let the user override the test with a path.
renatofilho@642
  2186
fi])
renatofilho@642
  2187
LD="$lt_cv_path_LD"
renatofilho@642
  2188
if test -n "$LD"; then
renatofilho@642
  2189
  AC_MSG_RESULT($LD)
renatofilho@642
  2190
else
renatofilho@642
  2191
  AC_MSG_RESULT(no)
renatofilho@642
  2192
fi
renatofilho@642
  2193
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
renatofilho@642
  2194
AC_PROG_LD_GNU
renatofilho@642
  2195
])# AC_PROG_LD
renatofilho@642
  2196
renatofilho@642
  2197
renatofilho@642
  2198
# AC_PROG_LD_GNU
renatofilho@642
  2199
# --------------
renatofilho@642
  2200
AC_DEFUN([AC_PROG_LD_GNU],
renatofilho@642
  2201
[AC_REQUIRE([AC_PROG_EGREP])dnl
renatofilho@642
  2202
AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
renatofilho@642
  2203
[# I'd rather use --version here, but apparently some GNU lds only accept -v.
renatofilho@642
  2204
case `$LD -v 2>&1 </dev/null` in
renatofilho@642
  2205
*GNU* | *'with BFD'*)
renatofilho@642
  2206
  lt_cv_prog_gnu_ld=yes
renatofilho@642
  2207
  ;;
renatofilho@642
  2208
*)
renatofilho@642
  2209
  lt_cv_prog_gnu_ld=no
renatofilho@642
  2210
  ;;
renatofilho@642
  2211
esac])
renatofilho@642
  2212
with_gnu_ld=$lt_cv_prog_gnu_ld
renatofilho@642
  2213
])# AC_PROG_LD_GNU
renatofilho@642
  2214
renatofilho@642
  2215
renatofilho@642
  2216
# AC_PROG_LD_RELOAD_FLAG
renatofilho@642
  2217
# ----------------------
renatofilho@642
  2218
# find reload flag for linker
renatofilho@642
  2219
#   -- PORTME Some linkers may need a different reload flag.
renatofilho@642
  2220
AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
renatofilho@642
  2221
[AC_CACHE_CHECK([for $LD option to reload object files],
renatofilho@642
  2222
  lt_cv_ld_reload_flag,
renatofilho@642
  2223
  [lt_cv_ld_reload_flag='-r'])
renatofilho@642
  2224
reload_flag=$lt_cv_ld_reload_flag
renatofilho@642
  2225
case $reload_flag in
renatofilho@642
  2226
"" | " "*) ;;
renatofilho@642
  2227
*) reload_flag=" $reload_flag" ;;
renatofilho@642
  2228
esac
renatofilho@642
  2229
reload_cmds='$LD$reload_flag -o $output$reload_objs'
renatofilho@642
  2230
case $host_os in
renatofilho@642
  2231
  darwin*)
renatofilho@642
  2232
    if test "$GCC" = yes; then
renatofilho@642
  2233
      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
renatofilho@642
  2234
    else
renatofilho@642
  2235
      reload_cmds='$LD$reload_flag -o $output$reload_objs'
renatofilho@642
  2236
    fi
renatofilho@642
  2237
    ;;
renatofilho@642
  2238
esac
renatofilho@642
  2239
])# AC_PROG_LD_RELOAD_FLAG
renatofilho@642
  2240
renatofilho@642
  2241
renatofilho@642
  2242
# AC_DEPLIBS_CHECK_METHOD
renatofilho@642
  2243
# -----------------------
renatofilho@642
  2244
# how to check for library dependencies
renatofilho@642
  2245
#  -- PORTME fill in with the dynamic library characteristics
renatofilho@642
  2246
AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
renatofilho@642
  2247
[AC_CACHE_CHECK([how to recognise dependent libraries],
renatofilho@642
  2248
lt_cv_deplibs_check_method,
renatofilho@642
  2249
[lt_cv_file_magic_cmd='$MAGIC_CMD'
renatofilho@642
  2250
lt_cv_file_magic_test_file=
renatofilho@642
  2251
lt_cv_deplibs_check_method='unknown'
renatofilho@642
  2252
# Need to set the preceding variable on all platforms that support
renatofilho@642
  2253
# interlibrary dependencies.
renatofilho@642
  2254
# 'none' -- dependencies not supported.
renatofilho@642
  2255
# `unknown' -- same as none, but documents that we really don't know.
renatofilho@642
  2256
# 'pass_all' -- all dependencies passed with no checks.
renatofilho@642
  2257
# 'test_compile' -- check by making test program.
renatofilho@642
  2258
# 'file_magic [[regex]]' -- check by looking for files in library path
renatofilho@642
  2259
# which responds to the $file_magic_cmd with a given extended regex.
renatofilho@642
  2260
# If you have `file' or equivalent on your system and you're not sure
renatofilho@642
  2261
# whether `pass_all' will *always* work, you probably want this one.
renatofilho@642
  2262
renatofilho@642
  2263
case $host_os in
renatofilho@642
  2264
aix4* | aix5*)
renatofilho@642
  2265
  lt_cv_deplibs_check_method=pass_all
renatofilho@642
  2266
  ;;
renatofilho@642
  2267
renatofilho@642
  2268
beos*)
renatofilho@642
  2269
  lt_cv_deplibs_check_method=pass_all
renatofilho@642
  2270
  ;;
renatofilho@642
  2271
renatofilho@642
  2272
bsdi[[45]]*)
renatofilho@642
  2273
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
renatofilho@642
  2274
  lt_cv_file_magic_cmd='/usr/bin/file -L'
renatofilho@642
  2275
  lt_cv_file_magic_test_file=/shlib/libc.so
renatofilho@642
  2276
  ;;
renatofilho@642
  2277
renatofilho@642
  2278
cygwin*)
renatofilho@642
  2279
  # func_win32_libid is a shell function defined in ltmain.sh
renatofilho@642
  2280
  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
renatofilho@642
  2281
  lt_cv_file_magic_cmd='func_win32_libid'
renatofilho@642
  2282
  ;;
renatofilho@642
  2283
renatofilho@642
  2284
mingw* | pw32*)
renatofilho@642
  2285
  # Base MSYS/MinGW do not provide the 'file' command needed by
renatofilho@642
  2286
  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
renatofilho@642
  2287
  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
renatofilho@642
  2288
  lt_cv_file_magic_cmd='$OBJDUMP -f'
renatofilho@642
  2289
  ;;
renatofilho@642
  2290
renatofilho@642
  2291
darwin* | rhapsody*)
renatofilho@642
  2292
  lt_cv_deplibs_check_method=pass_all
renatofilho@642
  2293
  ;;
renatofilho@642
  2294
renatofilho@642
  2295
freebsd* | dragonfly*)
renatofilho@642
  2296
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
renatofilho@642
  2297
    case $host_cpu in
renatofilho@642
  2298
    i*86 )
renatofilho@642
  2299
      # Not sure whether the presence of OpenBSD here was a mistake.
renatofilho@642
  2300
      # Let's accept both of them until this is cleared up.
renatofilho@642
  2301
      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
renatofilho@642
  2302
      lt_cv_file_magic_cmd=/usr/bin/file
renatofilho@642
  2303
      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
renatofilho@642
  2304
      ;;
renatofilho@642
  2305
    esac
renatofilho@642
  2306
  else
renatofilho@642
  2307
    lt_cv_deplibs_check_method=pass_all
renatofilho@642
  2308
  fi
renatofilho@642
  2309
  ;;
renatofilho@642
  2310
renatofilho@642
  2311
gnu*)
renatofilho@642
  2312
  lt_cv_deplibs_check_method=pass_all
renatofilho@642
  2313
  ;;
renatofilho@642
  2314
renatofilho@642
  2315
hpux10.20* | hpux11*)
renatofilho@642
  2316
  lt_cv_file_magic_cmd=/usr/bin/file
renatofilho@642
  2317
  case $host_cpu in
renatofilho@642
  2318
  ia64*)
renatofilho@642
  2319
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
renatofilho@642
  2320
    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
renatofilho@642
  2321
    ;;
renatofilho@642
  2322
  hppa*64*)
renatofilho@642
  2323
    [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]']
renatofilho@642
  2324
    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
renatofilho@642
  2325
    ;;
renatofilho@642
  2326
  *)
renatofilho@642
  2327
    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
renatofilho@642
  2328
    lt_cv_file_magic_test_file=/usr/lib/libc.sl
renatofilho@642
  2329
    ;;
renatofilho@642
  2330
  esac
renatofilho@642
  2331
  ;;
renatofilho@642
  2332
renatofilho@642
  2333
interix3*)
renatofilho@642
  2334
  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
renatofilho@642
  2335
  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
renatofilho@642
  2336
  ;;
renatofilho@642
  2337
renatofilho@642
  2338
irix5* | irix6* | nonstopux*)
renatofilho@642
  2339
  case $LD in
renatofilho@642
  2340
  *-32|*"-32 ") libmagic=32-bit;;
renatofilho@642
  2341
  *-n32|*"-n32 ") libmagic=N32;;
renatofilho@642
  2342
  *-64|*"-64 ") libmagic=64-bit;;
renatofilho@642
  2343
  *) libmagic=never-match;;
renatofilho@642
  2344
  esac
renatofilho@642
  2345
  lt_cv_deplibs_check_method=pass_all
renatofilho@642
  2346
  ;;
renatofilho@642
  2347
renatofilho@642
  2348
# This must be Linux ELF.
renatofilho@642
  2349
linux* | k*bsd*-gnu)
renatofilho@642
  2350
  lt_cv_deplibs_check_method=pass_all
renatofilho@642
  2351
  ;;
renatofilho@642
  2352
renatofilho@642
  2353
netbsd* | netbsdelf*-gnu)
renatofilho@642
  2354
  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
renatofilho@642
  2355
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
renatofilho@642
  2356
  else
renatofilho@642
  2357
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
renatofilho@642
  2358
  fi
renatofilho@642
  2359
  ;;
renatofilho@642
  2360
renatofilho@642
  2361
newos6*)
renatofilho@642
  2362
  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
renatofilho@642
  2363
  lt_cv_file_magic_cmd=/usr/bin/file
renatofilho@642
  2364
  lt_cv_file_magic_test_file=/usr/lib/libnls.so
renatofilho@642
  2365
  ;;
renatofilho@642
  2366
renatofilho@642
  2367
nto-qnx*)
renatofilho@642
  2368
  lt_cv_deplibs_check_method=unknown
renatofilho@642
  2369
  ;;
renatofilho@642
  2370
renatofilho@642
  2371
openbsd*)
renatofilho@642
  2372
  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
renatofilho@642
  2373
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
renatofilho@642
  2374
  else
renatofilho@642
  2375
    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
renatofilho@642
  2376
  fi
renatofilho@642
  2377
  ;;
renatofilho@642
  2378
renatofilho@642
  2379
osf3* | osf4* | osf5*)
renatofilho@642
  2380
  lt_cv_deplibs_check_method=pass_all
renatofilho@642
  2381
  ;;
renatofilho@642
  2382
renatofilho@642
  2383
solaris*)
renatofilho@642
  2384
  lt_cv_deplibs_check_method=pass_all
renatofilho@642
  2385
  ;;
renatofilho@642
  2386
renatofilho@642
  2387
sysv4 | sysv4.3*)
renatofilho@642
  2388
  case $host_vendor in
renatofilho@642
  2389
  motorola)
renatofilho@642
  2390
    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]]'
renatofilho@642
  2391
    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
renatofilho@642
  2392
    ;;
renatofilho@642
  2393
  ncr)
renatofilho@642
  2394
    lt_cv_deplibs_check_method=pass_all
renatofilho@642
  2395
    ;;
renatofilho@642
  2396
  sequent)
renatofilho@642
  2397
    lt_cv_file_magic_cmd='/bin/file'
renatofilho@642
  2398
    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
renatofilho@642
  2399
    ;;
renatofilho@642
  2400
  sni)
renatofilho@642
  2401
    lt_cv_file_magic_cmd='/bin/file'
renatofilho@642
  2402
    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
renatofilho@642
  2403
    lt_cv_file_magic_test_file=/lib/libc.so
renatofilho@642
  2404
    ;;
renatofilho@642
  2405
  siemens)
renatofilho@642
  2406
    lt_cv_deplibs_check_method=pass_all
renatofilho@642
  2407
    ;;
renatofilho@642
  2408
  pc)
renatofilho@642
  2409
    lt_cv_deplibs_check_method=pass_all
renatofilho@642
  2410
    ;;
renatofilho@642
  2411
  esac
renatofilho@642
  2412
  ;;
renatofilho@642
  2413
renatofilho@642
  2414
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
renatofilho@642
  2415
  lt_cv_deplibs_check_method=pass_all
renatofilho@642
  2416
  ;;
renatofilho@642
  2417
esac
renatofilho@642
  2418
])
renatofilho@642
  2419
file_magic_cmd=$lt_cv_file_magic_cmd
renatofilho@642
  2420
deplibs_check_method=$lt_cv_deplibs_check_method
renatofilho@642
  2421
test -z "$deplibs_check_method" && deplibs_check_method=unknown
renatofilho@642
  2422
])# AC_DEPLIBS_CHECK_METHOD
renatofilho@642
  2423
renatofilho@642
  2424
renatofilho@642
  2425
# AC_PROG_NM
renatofilho@642
  2426
# ----------
renatofilho@642
  2427
# find the pathname to a BSD-compatible name lister
renatofilho@642
  2428
AC_DEFUN([AC_PROG_NM],
renatofilho@642
  2429
[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
renatofilho@642
  2430
[if test -n "$NM"; then
renatofilho@642
  2431
  # Let the user override the test.
renatofilho@642
  2432
  lt_cv_path_NM="$NM"
renatofilho@642
  2433
else
renatofilho@642
  2434
  lt_nm_to_check="${ac_tool_prefix}nm"
renatofilho@642
  2435
  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 
renatofilho@642
  2436
    lt_nm_to_check="$lt_nm_to_check nm"
renatofilho@642
  2437
  fi
renatofilho@642
  2438
  for lt_tmp_nm in $lt_nm_to_check; do
renatofilho@642
  2439
    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
renatofilho@642
  2440
    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
renatofilho@642
  2441
      IFS="$lt_save_ifs"
renatofilho@642
  2442
      test -z "$ac_dir" && ac_dir=.
renatofilho@642
  2443
      tmp_nm="$ac_dir/$lt_tmp_nm"
renatofilho@642
  2444
      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
renatofilho@642
  2445
	# Check to see if the nm accepts a BSD-compat flag.
renatofilho@642
  2446
	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
renatofilho@642
  2447
	#   nm: unknown option "B" ignored
renatofilho@642
  2448
	# Tru64's nm complains that /dev/null is an invalid object file
renatofilho@642
  2449
	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
renatofilho@642
  2450
	*/dev/null* | *'Invalid file or object type'*)
renatofilho@642
  2451
	  lt_cv_path_NM="$tmp_nm -B"
renatofilho@642
  2452
	  break
renatofilho@642
  2453
	  ;;
renatofilho@642
  2454
	*)
renatofilho@642
  2455
	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
renatofilho@642
  2456
	  */dev/null*)
renatofilho@642
  2457
	    lt_cv_path_NM="$tmp_nm -p"
renatofilho@642
  2458
	    break
renatofilho@642
  2459
	    ;;
renatofilho@642
  2460
	  *)
renatofilho@642
  2461
	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
renatofilho@642
  2462
	    continue # so that we can try to find one that supports BSD flags
renatofilho@642
  2463
	    ;;
renatofilho@642
  2464
	  esac
renatofilho@642
  2465
	  ;;
renatofilho@642
  2466
	esac
renatofilho@642
  2467
      fi
renatofilho@642
  2468
    done
renatofilho@642
  2469
    IFS="$lt_save_ifs"
renatofilho@642
  2470
  done
renatofilho@642
  2471
  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
renatofilho@642
  2472
fi])
renatofilho@642
  2473
NM="$lt_cv_path_NM"
renatofilho@642
  2474
])# AC_PROG_NM
renatofilho@642
  2475
renatofilho@642
  2476
renatofilho@642
  2477
# AC_CHECK_LIBM
renatofilho@642
  2478
# -------------
renatofilho@642
  2479
# check for math library
renatofilho@642
  2480
AC_DEFUN([AC_CHECK_LIBM],
renatofilho@642
  2481
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
renatofilho@642
  2482
LIBM=
renatofilho@642
  2483
case $host in
renatofilho@642
  2484
*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
renatofilho@642
  2485
  # These system don't have libm, or don't need it
renatofilho@642
  2486
  ;;
renatofilho@642
  2487
*-ncr-sysv4.3*)
renatofilho@642
  2488
  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
renatofilho@642
  2489
  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
renatofilho@642
  2490
  ;;
renatofilho@642
  2491
*)
renatofilho@642
  2492
  AC_CHECK_LIB(m, cos, LIBM="-lm")
renatofilho@642
  2493
  ;;
renatofilho@642
  2494
esac
renatofilho@642
  2495
])# AC_CHECK_LIBM
renatofilho@642
  2496
renatofilho@642
  2497
renatofilho@642
  2498
# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
renatofilho@642
  2499
# -----------------------------------
renatofilho@642
  2500
# sets LIBLTDL to the link flags for the libltdl convenience library and
renatofilho@642
  2501
# LTDLINCL to the include flags for the libltdl header and adds
renatofilho@642
  2502
# --enable-ltdl-convenience to the configure arguments.  Note that
renatofilho@642
  2503
# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
renatofilho@642
  2504
# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
renatofilho@642
  2505
# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
renatofilho@642
  2506
# (note the single quotes!).  If your package is not flat and you're not
renatofilho@642
  2507
# using automake, define top_builddir and top_srcdir appropriately in
renatofilho@642
  2508
# the Makefiles.
renatofilho@642
  2509
AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
renatofilho@642
  2510
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
renatofilho@642
  2511
  case $enable_ltdl_convenience in
renatofilho@642
  2512
  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
renatofilho@642
  2513
  "") enable_ltdl_convenience=yes
renatofilho@642
  2514
      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
renatofilho@642
  2515
  esac
renatofilho@642
  2516
  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
renatofilho@642
  2517
  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
renatofilho@642
  2518
  # For backwards non-gettext consistent compatibility...
renatofilho@642
  2519
  INCLTDL="$LTDLINCL"
renatofilho@642
  2520
])# AC_LIBLTDL_CONVENIENCE
renatofilho@642
  2521
renatofilho@642
  2522
renatofilho@642
  2523
# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
renatofilho@642
  2524
# -----------------------------------
renatofilho@642
  2525
# sets LIBLTDL to the link flags for the libltdl installable library and
renatofilho@642
  2526
# LTDLINCL to the include flags for the libltdl header and adds
renatofilho@642
  2527
# --enable-ltdl-install to the configure arguments.  Note that
renatofilho@642
  2528
# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
renatofilho@642
  2529
# and an installed libltdl is not found, it is assumed to be `libltdl'.
renatofilho@642
  2530
# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
renatofilho@642
  2531
# '${top_srcdir}/' (note the single quotes!).  If your package is not
renatofilho@642
  2532
# flat and you're not using automake, define top_builddir and top_srcdir
renatofilho@642
  2533
# appropriately in the Makefiles.
renatofilho@642
  2534
# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
renatofilho@642
  2535
AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
renatofilho@642
  2536
[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
renatofilho@642
  2537
  AC_CHECK_LIB(ltdl, lt_dlinit,
renatofilho@642
  2538
  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
renatofilho@642
  2539
  [if test x"$enable_ltdl_install" = xno; then
renatofilho@642
  2540
     AC_MSG_WARN([libltdl not installed, but installation disabled])
renatofilho@642
  2541
   else
renatofilho@642
  2542
     enable_ltdl_install=yes
renatofilho@642
  2543
   fi
renatofilho@642
  2544
  ])
renatofilho@642
  2545
  if test x"$enable_ltdl_install" = x"yes"; then
renatofilho@642
  2546
    ac_configure_args="$ac_configure_args --enable-ltdl-install"
renatofilho@642
  2547
    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
renatofilho@642
  2548
    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
renatofilho@642
  2549
  else
renatofilho@642
  2550
    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
renatofilho@642
  2551
    LIBLTDL="-lltdl"
renatofilho@642
  2552
    LTDLINCL=
renatofilho@642
  2553
  fi
renatofilho@642
  2554
  # For backwards non-gettext consistent compatibility...
renatofilho@642
  2555
  INCLTDL="$LTDLINCL"
renatofilho@642
  2556
])# AC_LIBLTDL_INSTALLABLE
renatofilho@642
  2557
renatofilho@642
  2558
renatofilho@642
  2559
# AC_LIBTOOL_CXX
renatofilho@642
  2560
# --------------
renatofilho@642
  2561
# enable support for C++ libraries
renatofilho@642
  2562
AC_DEFUN([AC_LIBTOOL_CXX],
renatofilho@642
  2563
[AC_REQUIRE([_LT_AC_LANG_CXX])
renatofilho@642
  2564
])# AC_LIBTOOL_CXX
renatofilho@642
  2565
renatofilho@642
  2566
renatofilho@642
  2567
# _LT_AC_LANG_CXX
renatofilho@642
  2568
# ---------------
renatofilho@642
  2569
AC_DEFUN([_LT_AC_LANG_CXX],
renatofilho@642
  2570
[AC_REQUIRE([AC_PROG_CXX])
renatofilho@642
  2571
AC_REQUIRE([_LT_AC_PROG_CXXCPP])
renatofilho@642
  2572
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
renatofilho@642
  2573
])# _LT_AC_LANG_CXX
renatofilho@642
  2574
renatofilho@642
  2575
# _LT_AC_PROG_CXXCPP
renatofilho@642
  2576
# ------------------
renatofilho@642
  2577
AC_DEFUN([_LT_AC_PROG_CXXCPP],
renatofilho@642
  2578
[
renatofilho@642
  2579
AC_REQUIRE([AC_PROG_CXX])
renatofilho@642
  2580
if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
renatofilho@642
  2581
    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
renatofilho@642
  2582
    (test "X$CXX" != "Xg++"))) ; then
renatofilho@642
  2583
  AC_PROG_CXXCPP
renatofilho@642
  2584
fi
renatofilho@642
  2585
])# _LT_AC_PROG_CXXCPP
renatofilho@642
  2586
renatofilho@642
  2587
# AC_LIBTOOL_F77
renatofilho@642
  2588
# --------------
renatofilho@642
  2589
# enable support for Fortran 77 libraries
renatofilho@642
  2590
AC_DEFUN([AC_LIBTOOL_F77],
renatofilho@642
  2591
[AC_REQUIRE([_LT_AC_LANG_F77])
renatofilho@642
  2592
])# AC_LIBTOOL_F77
renatofilho@642
  2593
renatofilho@642
  2594
renatofilho@642
  2595
# _LT_AC_LANG_F77
renatofilho@642
  2596
# ---------------
renatofilho@642
  2597
AC_DEFUN([_LT_AC_LANG_F77],
renatofilho@642
  2598
[AC_REQUIRE([AC_PROG_F77])
renatofilho@642
  2599
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
renatofilho@642
  2600
])# _LT_AC_LANG_F77
renatofilho@642
  2601
renatofilho@642
  2602
renatofilho@642
  2603
# AC_LIBTOOL_GCJ
renatofilho@642
  2604
# --------------
renatofilho@642
  2605
# enable support for GCJ libraries
renatofilho@642
  2606
AC_DEFUN([AC_LIBTOOL_GCJ],
renatofilho@642
  2607
[AC_REQUIRE([_LT_AC_LANG_GCJ])
renatofilho@642
  2608
])# AC_LIBTOOL_GCJ
renatofilho@642
  2609
renatofilho@642
  2610
renatofilho@642
  2611
# _LT_AC_LANG_GCJ
renatofilho@642
  2612
# ---------------
renatofilho@642
  2613
AC_DEFUN([_LT_AC_LANG_GCJ],
renatofilho@642
  2614
[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
renatofilho@642
  2615
  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
renatofilho@642
  2616
    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
renatofilho@642
  2617
      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
renatofilho@642
  2618
	 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
renatofilho@642
  2619
	   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
renatofilho@642
  2620
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
renatofilho@642
  2621
])# _LT_AC_LANG_GCJ
renatofilho@642
  2622
renatofilho@642
  2623
renatofilho@642
  2624
# AC_LIBTOOL_RC
renatofilho@642
  2625
# -------------
renatofilho@642
  2626
# enable support for Windows resource files
renatofilho@642
  2627
AC_DEFUN([AC_LIBTOOL_RC],
renatofilho@642
  2628
[AC_REQUIRE([LT_AC_PROG_RC])
renatofilho@642
  2629
_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
renatofilho@642
  2630
])# AC_LIBTOOL_RC
renatofilho@642
  2631
renatofilho@642
  2632
renatofilho@642
  2633
# AC_LIBTOOL_LANG_C_CONFIG
renatofilho@642
  2634
# ------------------------
renatofilho@642
  2635
# Ensure that the configuration vars for the C compiler are
renatofilho@642
  2636
# suitably defined.  Those variables are subsequently used by
renatofilho@642
  2637
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
renatofilho@642
  2638
AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
renatofilho@642
  2639
AC_DEFUN([_LT_AC_LANG_C_CONFIG],
renatofilho@642
  2640
[lt_save_CC="$CC"
renatofilho@642
  2641
AC_LANG_PUSH(C)
renatofilho@642
  2642
renatofilho@642
  2643
# Source file extension for C test sources.
renatofilho@642
  2644
ac_ext=c
renatofilho@642
  2645
renatofilho@642
  2646
# Object file extension for compiled C test sources.
renatofilho@642
  2647
objext=o
renatofilho@642
  2648
_LT_AC_TAGVAR(objext, $1)=$objext
renatofilho@642
  2649
renatofilho@642
  2650
# Code to be used in simple compile tests
renatofilho@642
  2651
lt_simple_compile_test_code="int some_variable = 0;\n"
renatofilho@642
  2652
renatofilho@642
  2653
# Code to be used in simple link tests
renatofilho@642
  2654
lt_simple_link_test_code='int main(){return(0);}\n'
renatofilho@642
  2655
renatofilho@642
  2656
_LT_AC_SYS_COMPILER
renatofilho@642
  2657
renatofilho@642
  2658
# save warnings/boilerplate of simple test code
renatofilho@642
  2659
_LT_COMPILER_BOILERPLATE
renatofilho@642
  2660
_LT_LINKER_BOILERPLATE
renatofilho@642
  2661
renatofilho@642
  2662
## CAVEAT EMPTOR:
renatofilho@642
  2663
## There is no encapsulation within the following macros, do not change
renatofilho@642
  2664
## the running order or otherwise move them around unless you know exactly
renatofilho@642
  2665
## what you are doing...
renatofilho@642
  2666
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
renatofilho@642
  2667
AC_LIBTOOL_PROG_COMPILER_PIC($1)
renatofilho@642
  2668
AC_LIBTOOL_PROG_CC_C_O($1)
renatofilho@642
  2669
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
renatofilho@642
  2670
AC_LIBTOOL_PROG_LD_SHLIBS($1)
renatofilho@642
  2671
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
renatofilho@642
  2672
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
renatofilho@642
  2673
AC_LIBTOOL_SYS_LIB_STRIP
renatofilho@642
  2674
AC_LIBTOOL_DLOPEN_SELF
renatofilho@642
  2675
renatofilho@642
  2676
# Report which library types will actually be built
renatofilho@642
  2677
AC_MSG_CHECKING([if libtool supports shared libraries])
renatofilho@642
  2678
AC_MSG_RESULT([$can_build_shared])
renatofilho@642
  2679
renatofilho@642
  2680
AC_MSG_CHECKING([whether to build shared libraries])
renatofilho@642
  2681
test "$can_build_shared" = "no" && enable_shared=no
renatofilho@642
  2682
renatofilho@642
  2683
# On AIX, shared libraries and static libraries use the same namespace, and
renatofilho@642
  2684
# are all built from PIC.
renatofilho@642
  2685
case $host_os in
renatofilho@642
  2686
aix3*)
renatofilho@642
  2687
  test "$enable_shared" = yes && enable_static=no
renatofilho@642
  2688
  if test -n "$RANLIB"; then
renatofilho@642
  2689
    archive_cmds="$archive_cmds~\$RANLIB \$lib"
renatofilho@642
  2690
    postinstall_cmds='$RANLIB $lib'
renatofilho@642
  2691
  fi
renatofilho@642
  2692
  ;;
renatofilho@642
  2693
renatofilho@642
  2694
aix4* | aix5*)
renatofilho@642
  2695
  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
renatofilho@642
  2696
    test "$enable_shared" = yes && enable_static=no
renatofilho@642
  2697
  fi
renatofilho@642
  2698
    ;;
renatofilho@642
  2699
esac
renatofilho@642
  2700
AC_MSG_RESULT([$enable_shared])
renatofilho@642
  2701
renatofilho@642
  2702
AC_MSG_CHECKING([whether to build static libraries])
renatofilho@642
  2703
# Make sure either enable_shared or enable_static is yes.
renatofilho@642
  2704
test "$enable_shared" = yes || enable_static=yes
renatofilho@642
  2705
AC_MSG_RESULT([$enable_static])
renatofilho@642
  2706
renatofilho@642
  2707
AC_LIBTOOL_CONFIG($1)
renatofilho@642
  2708
renatofilho@642
  2709
AC_LANG_POP
renatofilho@642
  2710
CC="$lt_save_CC"
renatofilho@642
  2711
])# AC_LIBTOOL_LANG_C_CONFIG
renatofilho@642
  2712
renatofilho@642
  2713
renatofilho@642
  2714
# AC_LIBTOOL_LANG_CXX_CONFIG
renatofilho@642
  2715
# --------------------------
renatofilho@642
  2716
# Ensure that the configuration vars for the C compiler are
renatofilho@642
  2717
# suitably defined.  Those variables are subsequently used by
renatofilho@642
  2718
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
renatofilho@642
  2719
AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
renatofilho@642
  2720
AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
renatofilho@642
  2721
[AC_LANG_PUSH(C++)
renatofilho@642
  2722
AC_REQUIRE([AC_PROG_CXX])
renatofilho@642
  2723
AC_REQUIRE([_LT_AC_PROG_CXXCPP])
renatofilho@642
  2724
renatofilho@642
  2725
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
renatofilho@642
  2726
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
renatofilho@642
  2727
_LT_AC_TAGVAR(always_export_symbols, $1)=no
renatofilho@642
  2728
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
renatofilho@642
  2729
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
renatofilho@642
  2730
_LT_AC_TAGVAR(hardcode_direct, $1)=no
renatofilho@642
  2731
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
renatofilho@642
  2732
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
renatofilho@642
  2733
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
renatofilho@642
  2734
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
renatofilho@642
  2735
_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
renatofilho@642
  2736
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
renatofilho@642
  2737
_LT_AC_TAGVAR(module_cmds, $1)=
renatofilho@642
  2738
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
renatofilho@642
  2739
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
renatofilho@642
  2740
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
renatofilho@642
  2741
_LT_AC_TAGVAR(no_undefined_flag, $1)=
renatofilho@642
  2742
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
renatofilho@642
  2743
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
renatofilho@642
  2744
renatofilho@642
  2745
# Dependencies to place before and after the object being linked:
renatofilho@642
  2746
_LT_AC_TAGVAR(predep_objects, $1)=
renatofilho@642
  2747
_LT_AC_TAGVAR(postdep_objects, $1)=
renatofilho@642
  2748
_LT_AC_TAGVAR(predeps, $1)=
renatofilho@642
  2749
_LT_AC_TAGVAR(postdeps, $1)=
renatofilho@642
  2750
_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
renatofilho@642
  2751
renatofilho@642
  2752
# Source file extension for C++ test sources.
renatofilho@642
  2753
ac_ext=cpp
renatofilho@642
  2754
renatofilho@642
  2755
# Object file extension for compiled C++ test sources.
renatofilho@642
  2756
objext=o
renatofilho@642
  2757
_LT_AC_TAGVAR(objext, $1)=$objext
renatofilho@642
  2758
renatofilho@642
  2759
# Code to be used in simple compile tests
renatofilho@642
  2760
lt_simple_compile_test_code="int some_variable = 0;\n"
renatofilho@642
  2761
renatofilho@642
  2762
# Code to be used in simple link tests
renatofilho@642
  2763
lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
renatofilho@642
  2764
renatofilho@642
  2765
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
renatofilho@642
  2766
_LT_AC_SYS_COMPILER
renatofilho@642
  2767
renatofilho@642
  2768
# save warnings/boilerplate of simple test code
renatofilho@642
  2769
_LT_COMPILER_BOILERPLATE
renatofilho@642
  2770
_LT_LINKER_BOILERPLATE
renatofilho@642
  2771
renatofilho@642
  2772
# Allow CC to be a program name with arguments.
renatofilho@642
  2773
lt_save_CC=$CC
renatofilho@642
  2774
lt_save_LD=$LD
renatofilho@642
  2775
lt_save_GCC=$GCC
renatofilho@642
  2776
GCC=$GXX
renatofilho@642
  2777
lt_save_with_gnu_ld=$with_gnu_ld
renatofilho@642
  2778
lt_save_path_LD=$lt_cv_path_LD
renatofilho@642
  2779
if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
renatofilho@642
  2780
  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
renatofilho@642
  2781
else
renatofilho@642
  2782
  $as_unset lt_cv_prog_gnu_ld
renatofilho@642
  2783
fi
renatofilho@642
  2784
if test -n "${lt_cv_path_LDCXX+set}"; then
renatofilho@642
  2785
  lt_cv_path_LD=$lt_cv_path_LDCXX
renatofilho@642
  2786
else
renatofilho@642
  2787
  $as_unset lt_cv_path_LD
renatofilho@642
  2788
fi
renatofilho@642
  2789
test -z "${LDCXX+set}" || LD=$LDCXX
renatofilho@642
  2790
CC=${CXX-"c++"}
renatofilho@642
  2791
compiler=$CC
renatofilho@642
  2792
_LT_AC_TAGVAR(compiler, $1)=$CC
renatofilho@642
  2793
_LT_CC_BASENAME([$compiler])
renatofilho@642
  2794
renatofilho@642
  2795
# We don't want -fno-exception wen compiling C++ code, so set the
renatofilho@642
  2796
# no_builtin_flag separately
renatofilho@642
  2797
if test "$GXX" = yes; then
renatofilho@642
  2798
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
renatofilho@642
  2799
else
renatofilho@642
  2800
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
renatofilho@642
  2801
fi
renatofilho@642
  2802
renatofilho@642
  2803
if test "$GXX" = yes; then
renatofilho@642
  2804
  # Set up default GNU C++ configuration
renatofilho@642
  2805
renatofilho@642
  2806
  AC_PROG_LD
renatofilho@642
  2807
renatofilho@642
  2808
  # Check if GNU C++ uses GNU ld as the underlying linker, since the
renatofilho@642
  2809
  # archiving commands below assume that GNU ld is being used.
renatofilho@642
  2810
  if test "$with_gnu_ld" = yes; then
renatofilho@642
  2811
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
renatofilho@642
  2812
    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
renatofilho@642
  2813
renatofilho@642
  2814
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
renatofilho@642
  2815
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
renatofilho@642
  2816
renatofilho@642
  2817
    # If archive_cmds runs LD, not CC, wlarc should be empty
renatofilho@642
  2818
    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
renatofilho@642
  2819
    #     investigate it a little bit more. (MM)
renatofilho@642
  2820
    wlarc='${wl}'
renatofilho@642
  2821
renatofilho@642
  2822
    # ancient GNU ld didn't support --whole-archive et. al.
renatofilho@642
  2823
    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
renatofilho@642
  2824
	grep 'no-whole-archive' > /dev/null; then
renatofilho@642
  2825
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
renatofilho@642
  2826
    else
renatofilho@642
  2827
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
renatofilho@642
  2828
    fi
renatofilho@642
  2829
  else
renatofilho@642
  2830
    with_gnu_ld=no
renatofilho@642
  2831
    wlarc=
renatofilho@642
  2832
renatofilho@642
  2833
    # A generic and very simple default shared library creation
renatofilho@642
  2834
    # command for GNU C++ for the case where it uses the native
renatofilho@642
  2835
    # linker, instead of GNU ld.  If possible, this setting should
renatofilho@642
  2836
    # overridden to take advantage of the native linker features on
renatofilho@642
  2837
    # the platform it is being used on.
renatofilho@642
  2838
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
renatofilho@642
  2839
  fi
renatofilho@642
  2840
renatofilho@642
  2841
  # Commands to make compiler produce verbose output that lists
renatofilho@642
  2842
  # what "hidden" libraries, object files and flags are used when
renatofilho@642
  2843
  # linking a shared library.
renatofilho@642
  2844
  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
renatofilho@642
  2845
renatofilho@642
  2846
else
renatofilho@642
  2847
  GXX=no
renatofilho@642
  2848
  with_gnu_ld=no
renatofilho@642
  2849
  wlarc=
renatofilho@642
  2850
fi
renatofilho@642
  2851
renatofilho@642
  2852
# PORTME: fill in a description of your system's C++ link characteristics
renatofilho@642
  2853
AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
renatofilho@642
  2854
_LT_AC_TAGVAR(ld_shlibs, $1)=yes
renatofilho@642
  2855
case $host_os in
renatofilho@642
  2856
  aix3*)
renatofilho@642
  2857
    # FIXME: insert proper C++ library support
renatofilho@642
  2858
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
renatofilho@642
  2859
    ;;
renatofilho@642
  2860
  aix4* | aix5*)
renatofilho@642
  2861
    if test "$host_cpu" = ia64; then
renatofilho@642
  2862
      # On IA64, the linker does run time linking by default, so we don't
renatofilho@642
  2863
      # have to do anything special.
renatofilho@642
  2864
      aix_use_runtimelinking=no
renatofilho@642
  2865
      exp_sym_flag='-Bexport'
renatofilho@642
  2866
      no_entry_flag=""
renatofilho@642
  2867
    else
renatofilho@642
  2868
      aix_use_runtimelinking=no
renatofilho@642
  2869
renatofilho@642
  2870
      # Test if we are trying to use run time linking or normal
renatofilho@642
  2871
      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
renatofilho@642
  2872
      # need to do runtime linking.
renatofilho@642
  2873
      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
renatofilho@642
  2874
	for ld_flag in $LDFLAGS; do
renatofilho@642
  2875
	  case $ld_flag in
renatofilho@642
  2876
	  *-brtl*)
renatofilho@642
  2877
	    aix_use_runtimelinking=yes
renatofilho@642
  2878
	    break
renatofilho@642
  2879
	    ;;
renatofilho@642
  2880
	  esac
renatofilho@642
  2881
	done
renatofilho@642
  2882
	;;
renatofilho@642
  2883
      esac
renatofilho@642
  2884
renatofilho@642
  2885
      exp_sym_flag='-bexport'
renatofilho@642
  2886
      no_entry_flag='-bnoentry'
renatofilho@642
  2887
    fi
renatofilho@642
  2888
renatofilho@642
  2889
    # When large executables or shared objects are built, AIX ld can
renatofilho@642
  2890
    # have problems creating the table of contents.  If linking a library
renatofilho@642
  2891
    # or program results in "error TOC overflow" add -mminimal-toc to
renatofilho@642
  2892
    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
renatofilho@642
  2893
    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
renatofilho@642
  2894
renatofilho@642
  2895
    _LT_AC_TAGVAR(archive_cmds, $1)=''
renatofilho@642
  2896
    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
renatofilho@642
  2897
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
renatofilho@642
  2898
    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
renatofilho@642
  2899
renatofilho@642
  2900
    if test "$GXX" = yes; then
renatofilho@642
  2901
      case $host_os in aix4.[[012]]|aix4.[[012]].*)
renatofilho@642
  2902
      # We only want to do this on AIX 4.2 and lower, the check
renatofilho@642
  2903
      # below for broken collect2 doesn't work under 4.3+
renatofilho@642
  2904
	collect2name=`${CC} -print-prog-name=collect2`
renatofilho@642
  2905
	if test -f "$collect2name" && \
renatofilho@642
  2906
	   strings "$collect2name" | grep resolve_lib_name >/dev/null
renatofilho@642
  2907
	then
renatofilho@642
  2908
	  # We have reworked collect2
renatofilho@642
  2909
	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
renatofilho@642
  2910
	else
renatofilho@642
  2911
	  # We have old collect2
renatofilho@642
  2912
	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
renatofilho@642
  2913
	  # It fails to find uninstalled libraries when the uninstalled
renatofilho@642
  2914
	  # path is not listed in the libpath.  Setting hardcode_minus_L
renatofilho@642
  2915
	  # to unsupported forces relinking
renatofilho@642
  2916
	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
renatofilho@642
  2917
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
renatofilho@642
  2918
	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
renatofilho@642
  2919
	fi
renatofilho@642
  2920
	;;
renatofilho@642
  2921
      esac
renatofilho@642
  2922
      shared_flag='-shared'
renatofilho@642
  2923
      if test "$aix_use_runtimelinking" = yes; then
renatofilho@642
  2924
	shared_flag="$shared_flag "'${wl}-G'
renatofilho@642
  2925
      fi
renatofilho@642
  2926
    else
renatofilho@642
  2927
      # not using gcc
renatofilho@642
  2928
      if test "$host_cpu" = ia64; then
renatofilho@642
  2929
	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
renatofilho@642
  2930
	# chokes on -Wl,-G. The following line is correct:
renatofilho@642
  2931
	shared_flag='-G'
renatofilho@642
  2932
      else
renatofilho@642
  2933
	if test "$aix_use_runtimelinking" = yes; then
renatofilho@642
  2934
	  shared_flag='${wl}-G'
renatofilho@642
  2935
	else
renatofilho@642
  2936
	  shared_flag='${wl}-bM:SRE'
renatofilho@642
  2937
	fi
renatofilho@642
  2938
      fi
renatofilho@642
  2939
    fi
renatofilho@642
  2940
renatofilho@642
  2941
    # It seems that -bexpall does not export symbols beginning with
renatofilho@642
  2942
    # underscore (_), so it is better to generate a list of symbols to export.
renatofilho@642
  2943
    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
renatofilho@642
  2944
    if test "$aix_use_runtimelinking" = yes; then
renatofilho@642
  2945
      # Warning - without using the other runtime loading flags (-brtl),
renatofilho@642
  2946
      # -berok will link without error, but may produce a broken library.
renatofilho@642
  2947
      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
renatofilho@642
  2948
      # Determine the default libpath from the value encoded in an empty executable.
renatofilho@642
  2949
      _LT_AC_SYS_LIBPATH_AIX
renatofilho@642
  2950
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
renatofilho@642
  2951
renatofilho@642
  2952
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
renatofilho@642
  2953
     else
renatofilho@642
  2954
      if test "$host_cpu" = ia64; then
renatofilho@642
  2955
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
renatofilho@642
  2956
	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
renatofilho@642
  2957
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
renatofilho@642
  2958
      else
renatofilho@642
  2959
	# Determine the default libpath from the value encoded in an empty executable.
renatofilho@642
  2960
	_LT_AC_SYS_LIBPATH_AIX
renatofilho@642
  2961
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
renatofilho@642
  2962
	# Warning - without using the other run time loading flags,
renatofilho@642
  2963
	# -berok will link without error, but may produce a broken library.
renatofilho@642
  2964
	_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
renatofilho@642
  2965
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
renatofilho@642
  2966
	# Exported symbols can be pulled into shared objects from archives
renatofilho@642
  2967
	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
renatofilho@642
  2968
	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
renatofilho@642
  2969
	# This is similar to how AIX traditionally builds its shared libraries.
renatofilho@642
  2970
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
renatofilho@642
  2971
      fi
renatofilho@642
  2972
    fi
renatofilho@642
  2973
    ;;
renatofilho@642
  2974
renatofilho@642
  2975
  beos*)
renatofilho@642
  2976
    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
renatofilho@642
  2977
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
renatofilho@642
  2978
      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
renatofilho@642
  2979
      # support --undefined.  This deserves some investigation.  FIXME
renatofilho@642
  2980
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
renatofilho@642
  2981
    else
renatofilho@642
  2982
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
renatofilho@642
  2983
    fi
renatofilho@642
  2984
    ;;
renatofilho@642
  2985
renatofilho@642
  2986
  chorus*)
renatofilho@642
  2987
    case $cc_basename in
renatofilho@642
  2988
      *)
renatofilho@642
  2989
	# FIXME: insert proper C++ library support
renatofilho@642
  2990
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
renatofilho@642
  2991
	;;
renatofilho@642
  2992
    esac
renatofilho@642
  2993
    ;;
renatofilho@642
  2994
renatofilho@642
  2995
  cygwin* | mingw* | pw32*)
renatofilho@642
  2996
    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
renatofilho@642
  2997
    # as there is no search path for DLLs.
renatofilho@642
  2998
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
renatofilho@642
  2999
    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
renatofilho@642
  3000
    _LT_AC_TAGVAR(always_export_symbols, $1)=no
renatofilho@642
  3001
    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
renatofilho@642
  3002
renatofilho@642
  3003
    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
renatofilho@642
  3004
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
renatofilho@642
  3005
      # If the export-symbols file already is a .def file (1st line
renatofilho@642
  3006
      # is EXPORTS), use it as is; otherwise, prepend...
renatofilho@642
  3007
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
renatofilho@642
  3008
	cp $export_symbols $output_objdir/$soname.def;
renatofilho@642
  3009
      else
renatofilho@642
  3010
	echo EXPORTS > $output_objdir/$soname.def;
renatofilho@642
  3011
	cat $export_symbols >> $output_objdir/$soname.def;
renatofilho@642
  3012
      fi~
renatofilho@642
  3013
      $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
renatofilho@642
  3014
    else
renatofilho@642
  3015
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
renatofilho@642
  3016
    fi
renatofilho@642
  3017
  ;;
renatofilho@642
  3018
      darwin* | rhapsody*)
renatofilho@642
  3019
        case $host_os in
renatofilho@642
  3020
        rhapsody* | darwin1.[[012]])
renatofilho@642
  3021
         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
renatofilho@642
  3022
         ;;
renatofilho@642
  3023
       *) # Darwin 1.3 on
renatofilho@642
  3024
         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
renatofilho@642
  3025
           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
renatofilho@642
  3026
         else
renatofilho@642
  3027
           case ${MACOSX_DEPLOYMENT_TARGET} in
renatofilho@642
  3028
             10.[[012]])
renatofilho@642
  3029
               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
renatofilho@642
  3030
               ;;
renatofilho@642
  3031
             10.*)
renatofilho@642
  3032
               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
renatofilho@642
  3033
               ;;
renatofilho@642
  3034
           esac
renatofilho@642
  3035
         fi
renatofilho@642
  3036
         ;;
renatofilho@642
  3037
        esac
renatofilho@642
  3038
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
renatofilho@642
  3039
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
renatofilho@642
  3040
      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
renatofilho@642
  3041
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
renatofilho@642
  3042
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
renatofilho@642
  3043
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
renatofilho@642
  3044
renatofilho@642
  3045
    if test "$GXX" = yes ; then
renatofilho@642
  3046
      lt_int_apple_cc_single_mod=no
renatofilho@642
  3047
      output_verbose_link_cmd='echo'
renatofilho@642
  3048
      if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
renatofilho@642
  3049
       lt_int_apple_cc_single_mod=yes
renatofilho@642
  3050
      fi
renatofilho@642
  3051
      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
renatofilho@642
  3052
       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
renatofilho@642
  3053
      else
renatofilho@642
  3054
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
renatofilho@642
  3055
        fi
renatofilho@642
  3056
        _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
renatofilho@642
  3057
        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
renatofilho@642
  3058
          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
renatofilho@642
  3059
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
renatofilho@642
  3060
          else
renatofilho@642
  3061
            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
renatofilho@642
  3062
          fi
renatofilho@642
  3063
            _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
renatofilho@642
  3064
      else
renatofilho@642
  3065
      case $cc_basename in
renatofilho@642
  3066
        xlc*)
renatofilho@642
  3067
         output_verbose_link_cmd='echo'
renatofilho@642
  3068
          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
renatofilho@642
  3069
          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
renatofilho@642
  3070
          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
renatofilho@642
  3071
          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
renatofilho@642
  3072
          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
renatofilho@642
  3073
          ;;
renatofilho@642
  3074
       *)
renatofilho@642
  3075
         _LT_AC_TAGVAR(ld_shlibs, $1)=no
renatofilho@642
  3076
          ;;
renatofilho@642
  3077
      esac
renatofilho@642
  3078
      fi
renatofilho@642
  3079
        ;;
renatofilho@642
  3080
renatofilho@642
  3081
  dgux*)
renatofilho@642
  3082
    case $cc_basename in
renatofilho@642
  3083
      ec++*)
renatofilho@642
  3084
	# FIXME: insert proper C++ library support
renatofilho@642
  3085
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
renatofilho@642
  3086
	;;
renatofilho@642
  3087
      ghcx*)
renatofilho@642
  3088
	# Green Hills C++ Compiler
renatofilho@642
  3089
	# FIXME: insert proper C++ library support
renatofilho@642
  3090
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
renatofilho@642
  3091
	;;
renatofilho@642
  3092
      *)
renatofilho@642
  3093
	# FIXME: insert proper C++ library support
renatofilho@642
  3094
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
renatofilho@642
  3095
	;;
renatofilho@642
  3096
    esac
renatofilho@642
  3097
    ;;
renatofilho@642
  3098
  freebsd[[12]]*)
renatofilho@642
  3099
    # C++ shared libraries reported to be fairly broken before switch to ELF
renatofilho@642
  3100
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
renatofilho@642
  3101
    ;;
renatofilho@642
  3102
  freebsd-elf*)
renatofilho@642
  3103
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
renatofilho@642
  3104
    ;;
renatofilho@642
  3105
  freebsd* | dragonfly*)
renatofilho@642
  3106
    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
renatofilho@642
  3107
    # conventions
renatofilho@642
  3108
    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
renatofilho@642
  3109
    ;;
renatofilho@642
  3110
  gnu*)
renatofilho@642
  3111
    ;;
renatofilho@642
  3112
  hpux9*)
renatofilho@642
  3113
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
renatofilho@642
  3114
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
renatofilho@642
  3115
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
renatofilho@642
  3116
    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
renatofilho@642
  3117
    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
renatofilho@642
  3118
				# but as the default
renatofilho@642
  3119
				# location of the library.
renatofilho@642
  3120
renatofilho@642
  3121
    case $cc_basename in
renatofilho@642
  3122
    CC*)
renatofilho@642
  3123
      # FIXME: insert proper C++ library support
renatofilho@642
  3124
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
renatofilho@642
  3125
      ;;
renatofilho@642
  3126
    aCC*)
renatofilho@642
  3127
      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
renatofilho@642
  3128
      # Commands to make compiler produce verbose output that lists
renatofilho@642
  3129
      # what "hidden" libraries, object files and flags are used when
renatofilho@642
  3130
      # linking a shared library.
renatofilho@642
  3131
      #
renatofilho@642
  3132
      # There doesn't appear to be a way to prevent this compiler from
renatofilho@642
  3133
      # explicitly linking system object files so we need to strip them
renatofilho@642
  3134
      # from the output so that they don't get included in the library
renatofilho@642
  3135
      # dependencies.
renatofilho@642
  3136
      output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
renatofilho@642
  3137
      ;;
renatofilho@642
  3138
    *)
renatofilho@642
  3139
      if test "$GXX" = yes; then
renatofilho@642
  3140
        _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
renatofilho@642
  3141
      else
renatofilho@642
  3142
        # FIXME: insert proper C++ library support
renatofilho@642
  3143
        _LT_AC_TAGVAR(ld_shlibs, $1)=no
renatofilho@642
  3144
      fi
renatofilho@642
  3145
      ;;
renatofilho@642
  3146
    esac
renatofilho@642
  3147
    ;;
renatofilho@642
  3148
  hpux10*|hpux11*)
renatofilho@642
  3149
    if test $with_gnu_ld = no; then
renatofilho@642
  3150
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
renatofilho@642
  3151
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
renatofilho@642
  3152
renatofilho@642
  3153
      case $host_cpu in
renatofilho@642
  3154
      hppa*64*|ia64*)
renatofilho@642
  3155
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
renatofilho@642
  3156
        ;;
renatofilho@642
  3157
      *)
renatofilho@642
  3158
	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
renatofilho@642
  3159
        ;;
renatofilho@642
  3160
      esac
renatofilho@642
  3161
    fi
renatofilho@642
  3162
    case $host_cpu in
renatofilho@642
  3163
    hppa*64*|ia64*)
renatofilho@642
  3164
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
renatofilho@642
  3165
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
renatofilho@642
  3166
      ;;
renatofilho@642
  3167
    *)
renatofilho@642
  3168
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
renatofilho@642
  3169
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
renatofilho@642
  3170
					      # but as the default
renatofilho@642
  3171
					      # location of the library.
renatofilho@642
  3172
      ;;
renatofilho@642
  3173
    esac
renatofilho@642
  3174
renatofilho@642
  3175
    case $cc_basename in
renatofilho@642
  3176
      CC*)
renatofilho@642
  3177
	# FIXME: insert proper C++ library support
renatofilho@642
  3178
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
renatofilho@642
  3179
	;;
renatofilho@642
  3180
      aCC*)
renatofilho@642
  3181
	case $host_cpu in
renatofilho@642
  3182
	hppa*64*)
renatofilho@642
  3183
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
renatofilho@642
  3184
	  ;;
renatofilho@642
  3185
	ia64*)
renatofilho@642
  3186
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
renatofilho@642
  3187
	  ;;
renatofilho@642
  3188
	*)
renatofilho@642
  3189
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
renatofilho@642
  3190
	  ;;
renatofilho@642
  3191
	esac
renatofilho@642
  3192
	# Commands to make compiler produce verbose output that lists
renatofilho@642
  3193
	# what "hidden" libraries, object files and flags are used when
renatofilho@642
  3194
	# linking a shared library.
renatofilho@642
  3195
	#
renatofilho@642
  3196
	# There doesn't appear to be a way to prevent this compiler from
renatofilho@642
  3197
	# explicitly linking system object files so we need to strip them
renatofilho@642
  3198
	# from the output so that they don't get included in the library
renatofilho@642
  3199
	# dependencies.
renatofilho@642
  3200
	output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
renatofilho@642
  3201
	;;
renatofilho@642
  3202
      *)
renatofilho@642
  3203
	if test "$GXX" = yes; then
renatofilho@642
  3204
	  if test $with_gnu_ld = no; then
renatofilho@642
  3205
	    case $host_cpu in
renatofilho@642
  3206
	    hppa*64*)
renatofilho@642
  3207
	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
renatofilho@642
  3208
	      ;;
renatofilho@642
  3209
	    ia64*)
renatofilho@642
  3210
	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
renatofilho@642
  3211
	      ;;
renatofilho@642
  3212
	    *)
renatofilho@642
  3213
	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
renatofilho@642
  3214
	      ;;
renatofilho@642
  3215
	    esac
renatofilho@642
  3216
	  fi
renatofilho@642
  3217
	else
renatofilho@642
  3218
	  # FIXME: insert proper C++ library support
renatofilho@642
  3219
	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
renatofilho@642
  3220
	fi
renatofilho@642
  3221
	;;
renatofilho@642
  3222
    esac
renatofilho@642
  3223
    ;;
renatofilho@642
  3224
  interix3*)
renatofilho@642
  3225
    _LT_AC_TAGVAR(hardcode_direct, $1)=no
renatofilho@642
  3226
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
renatofilho@642
  3227
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
renatofilho@642
  3228
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
renatofilho@642
  3229
    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
renatofilho@642
  3230
    # Instead, shared libraries are loaded at an image base (0x10000000 by
renatofilho@642
  3231
    # default) and relocated if they conflict, which is a slow very memory
renatofilho@642
  3232
    # consuming and fragmenting process.  To avoid this, we pick a random,
renatofilho@642
  3233
    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
renatofilho@642
  3234
    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
renatofilho@642
  3235
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
renatofilho@642
  3236
    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
renatofilho@642
  3237
    ;;
renatofilho@642
  3238
  irix5* | irix6*)
renatofilho@642
  3239
    case $cc_basename in
renatofilho@642
  3240
      CC*)
renatofilho@642
  3241
	# SGI C++
renatofilho@642
  3242
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
renatofilho@642
  3243
renatofilho@642
  3244
	# Archives containing C++ object files must be created using
renatofilho@642
  3245
	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
renatofilho@642
  3246
	# necessary to make sure instantiated templates are included
renatofilho@642
  3247
	# in the archive.
renatofilho@642
  3248
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
renatofilho@642
  3249
	;;
renatofilho@642
  3250
      *)
renatofilho@642
  3251
	if test "$GXX" = yes; then
renatofilho@642
  3252
	  if test "$with_gnu_ld" = no; then
renatofilho@642
  3253
	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
renatofilho@642
  3254
	  else
renatofilho@642
  3255
	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
renatofilho@642
  3256
	  fi
renatofilho@642
  3257
	fi
renatofilho@642
  3258
	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
renatofilho@642
  3259
	;;
renatofilho@642
  3260
    esac
renatofilho@642
  3261
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
renatofilho@642
  3262
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
renatofilho@642
  3263
    ;;
renatofilho@642
  3264
  linux* | k*bsd*-gnu)
renatofilho@642
  3265
    case $cc_basename in
renatofilho@642
  3266
      KCC*)
renatofilho@642
  3267
	# Kuck and Associates, Inc. (KAI) C++ Compiler
renatofilho@642
  3268
renatofilho@642
  3269
	# KCC will only create a shared library if the output file
renatofilho@642
  3270
	# ends with ".so" (or ".sl" for HP-UX), so rename the library
renatofilho@642
  3271
	# to its proper name (with version) after linking.
renatofilho@642
  3272
	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
renatofilho@642
  3273
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
renatofilho@642
  3274
	# Commands to make compiler produce verbose output that lists
renatofilho@642
  3275
	# what "hidden" libraries, object files and flags are used when
renatofilho@642
  3276
	# linking a shared library.
renatofilho@642
  3277
	#
renatofilho@642
  3278
	# There doesn't appear to be a way to prevent this compiler from
renatofilho@642
  3279
	# explicitly linking system object files so we need to strip them
renatofilho@642
  3280
	# from the output so that they don't get included in the library
renatofilho@642
  3281
	# dependencies.
renatofilho@642
  3282
	output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
renatofilho@642
  3283
renatofilho@642
  3284
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
renatofilho@642
  3285
	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
renatofilho@642
  3286
renatofilho@642
  3287
	# Archives containing C++ object files must be created using
renatofilho@642
  3288
	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
renatofilho@642
  3289
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
renatofilho@642
  3290
	;;
renatofilho@642
  3291
      icpc*)
renatofilho@642
  3292
	# Intel C++
renatofilho@642
  3293
	with_gnu_ld=yes
renatofilho@642
  3294
	# version 8.0 and above of icpc choke on multiply defined symbols
renatofilho@642
  3295
	# if we add $predep_objects and $postdep_objects, however 7.1 and
renatofilho@642
  3296
	# earlier do not add the objects themselves.
renatofilho@642
  3297
	case `$CC -V 2>&1` in
renatofilho@642
  3298
	*"Version 7."*)
renatofilho@642
  3299
  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
renatofilho@642
  3300
  	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
renatofilho@642
  3301
	  ;;
renatofilho@642
  3302
	*)  # Version 8.0 or newer
renatofilho@642
  3303
	  tmp_idyn=
renatofilho@642
  3304
	  case $host_cpu in
renatofilho@642
  3305
	    ia64*) tmp_idyn=' -i_dynamic';;
renatofilho@642
  3306
	  esac
renatofilho@642
  3307
  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
renatofilho@642
  3308
	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
renatofilho@642
  3309
	  ;;
renatofilho@642
  3310
	esac
renatofilho@642
  3311
	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
renatofilho@642
  3312
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
renatofilho@642
  3313
	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
renatofilho@642
  3314
	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
renatofilho@642
  3315
	;;
renatofilho@642
  3316
      pgCC*)
renatofilho@642
  3317
        # Portland Group C++ compiler
renatofilho@642
  3318
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
renatofilho@642
  3319
  	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
renatofilho@642
  3320
renatofilho@642
  3321
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
renatofilho@642
  3322
	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
renatofilho@642
  3323
	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
renatofilho@642
  3324
        ;;
renatofilho@642
  3325
      cxx*)
renatofilho@642
  3326
	# Compaq C++
renatofilho@642
  3327
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
renatofilho@642
  3328
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
renatofilho@642
  3329
renatofilho@642
  3330
	runpath_var=LD_RUN_PATH
renatofilho@642
  3331
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
renatofilho@642
  3332
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
renatofilho@642
  3333
renatofilho@642
  3334
	# Commands to make compiler produce verbose output that lists
renatofilho@642
  3335
	# what "hidden" libraries, object files and flags are used when
renatofilho@642
  3336
	# linking a shared library.
renatofilho@642
  3337
	#
renatofilho@642
  3338
	# There doesn't appear to be a way to prevent this compiler from
renatofilho@642
  3339
	# explicitly linking system object files so we need to strip them
renatofilho@642
  3340
	# from the output so that they don't get included in the library
renatofilho@642
  3341
	# dependencies.
renatofilho@642
  3342
	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
renatofilho@642
  3343
	;;
renatofilho@642
  3344
    esac
renatofilho@642
  3345
    ;;
renatofilho@642
  3346
  lynxos*)
renatofilho@642
  3347
    # FIXME: insert proper C++ library support
renatofilho@642
  3348
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
renatofilho@642
  3349
    ;;
renatofilho@642
  3350
  m88k*)
renatofilho@642
  3351
    # FIXME: insert proper C++ library support
renatofilho@642
  3352
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
renatofilho@642
  3353
    ;;
renatofilho@642
  3354
  mvs*)
renatofilho@642
  3355
    case $cc_basename in
renatofilho@642
  3356
      cxx*)
renatofilho@642
  3357
	# FIXME: insert proper C++ library support
renatofilho@642
  3358
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
renatofilho@642
  3359
	;;
renatofilho@642
  3360
      *)
renatofilho@642
  3361
	# FIXME: insert proper C++ library support
renatofilho@642
  3362
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
renatofilho@642
  3363
	;;
renatofilho@642
  3364
    esac
renatofilho@642
  3365
    ;;
renatofilho@642
  3366
  netbsd* | netbsdelf*-gnu)
renatofilho@642
  3367
    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
renatofilho@642
  3368
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
renatofilho@642
  3369
      wlarc=
renatofilho@642
  3370
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
renatofilho@642
  3371
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
renatofilho@642
  3372
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
renatofilho@642
  3373
    fi
renatofilho@642
  3374
    # Workaround some broken pre-1.5 toolchains
renatofilho@642
  3375
    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
renatofilho@642
  3376
    ;;
renatofilho@642
  3377
  openbsd2*)
renatofilho@642
  3378
    # C++ shared libraries are fairly broken
renatofilho@642
  3379
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
renatofilho@642
  3380
    ;;
renatofilho@642
  3381
  openbsd*)
renatofilho@642
  3382
    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
renatofilho@642
  3383
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
renatofilho@642
  3384
    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
renatofilho@642
  3385
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
renatofilho@642
  3386
    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
renatofilho@642
  3387
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
renatofilho@642
  3388
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
renatofilho@642
  3389
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
renatofilho@642
  3390
    fi
renatofilho@642
  3391
    output_verbose_link_cmd='echo'
renatofilho@642
  3392
    ;;
renatofilho@642
  3393
  osf3*)
renatofilho@642
  3394
    case $cc_basename in
renatofilho@642
  3395
      KCC*)
renatofilho@642
  3396
	# Kuck and Associates, Inc. (KAI) C++ Compiler
renatofilho@642
  3397
renatofilho@642
  3398
	# KCC will only create a shared library if the output file
renatofilho@642
  3399
	# ends with ".so" (or ".sl" for HP-UX), so rename the library
renatofilho@642
  3400
	# to its proper name (with version) after linking.
renatofilho@642
  3401
	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
renatofilho@642
  3402
renatofilho@642
  3403
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
renatofilho@642
  3404
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
renatofilho@642
  3405
renatofilho@642
  3406
	# Archives containing C++ object files must be created using
renatofilho@642
  3407
	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
renatofilho@642
  3408
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
renatofilho@642
  3409
renatofilho@642
  3410
	;;
renatofilho@642
  3411
      RCC*)
renatofilho@642
  3412
	# Rational C++ 2.4.1
renatofilho@642
  3413
	# FIXME: insert proper C++ library support
renatofilho@642
  3414
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
renatofilho@642
  3415
	;;
renatofilho@642
  3416
      cxx*)
renatofilho@642
  3417
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
renatofilho@642
  3418
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
renatofilho@642
  3419
renatofilho@642
  3420
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
renatofilho@642
  3421
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
renatofilho@642
  3422
renatofilho@642
  3423
	# Commands to make compiler produce verbose output that lists
renatofilho@642
  3424
	# what "hidden" libraries, object files and flags are used when
renatofilho@642
  3425
	# linking a shared library.
renatofilho@642
  3426
	#
renatofilho@642
  3427
	# There doesn't appear to be a way to prevent this compiler from
renatofilho@642
  3428
	# explicitly linking system object files so we need to strip them
renatofilho@642
  3429
	# from the output so that they don't get included in the library
renatofilho@642
  3430
	# dependencies.
renatofilho@642
  3431
	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
renatofilho@642
  3432
	;;
renatofilho@642
  3433
      *)
renatofilho@642
  3434
	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
renatofilho@642
  3435
	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
renatofilho@642
  3436
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
renatofilho@642
  3437
renatofilho@642
  3438
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
renatofilho@642
  3439
	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
renatofilho@642
  3440
renatofilho@642
  3441
	  # Commands to make compiler produce verbose output that lists
renatofilho@642
  3442
	  # what "hidden" libraries, object files and flags are used when
renatofilho@642
  3443
	  # linking a shared library.
renatofilho@642
  3444
	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
renatofilho@642
  3445
renatofilho@642
  3446
	else
renatofilho@642
  3447
	  # FIXME: insert proper C++ library support
renatofilho@642
  3448
	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
renatofilho@642
  3449
	fi
renatofilho@642
  3450
	;;
renatofilho@642
  3451
    esac
renatofilho@642
  3452
    ;;
renatofilho@642
  3453
  osf4* | osf5*)
renatofilho@642
  3454
    case $cc_basename in
renatofilho@642
  3455
      KCC*)
renatofilho@642
  3456
	# Kuck and Associates, Inc. (KAI) C++ Compiler
renatofilho@642
  3457
renatofilho@642
  3458
	# KCC will only create a shared library if the output file
renatofilho@642
  3459
	# ends with ".so" (or ".sl" for HP-UX), so rename the library
renatofilho@642
  3460
	# to its proper name (with version) after linking.
renatofilho@642
  3461
	_LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
renatofilho@642
  3462
renatofilho@642
  3463
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
renatofilho@642
  3464
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
renatofilho@642
  3465
renatofilho@642
  3466
	# Archives containing C++ object files must be created using
renatofilho@642
  3467
	# the KAI C++ compiler.
renatofilho@642
  3468
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
renatofilho@642
  3469
	;;
renatofilho@642
  3470
      RCC*)
renatofilho@642
  3471
	# Rational C++ 2.4.1
renatofilho@642
  3472
	# FIXME: insert proper C++ library support
renatofilho@642
  3473
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
renatofilho@642
  3474
	;;
renatofilho@642
  3475
      cxx*)
renatofilho@642
  3476
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
renatofilho@642
  3477
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
renatofilho@642
  3478
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
renatofilho@642
  3479
	  echo "-hidden">> $lib.exp~
renatofilho@642
  3480
	  $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp  `test -n "$verstring" && echo -set_version	$verstring` -update_registry ${output_objdir}/so_locations -o $lib~
renatofilho@642
  3481
	  $rm $lib.exp'
renatofilho@642
  3482
renatofilho@642
  3483
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
renatofilho@642
  3484
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
renatofilho@642
  3485
renatofilho@642
  3486
	# Commands to make compiler produce verbose output that lists
renatofilho@642
  3487
	# what "hidden" libraries, object files and flags are used when
renatofilho@642
  3488
	# linking a shared library.
renatofilho@642
  3489
	#
renatofilho@642
  3490
	# There doesn't appear to be a way to prevent this compiler from
renatofilho@642
  3491
	# explicitly linking system object files so we need to strip them
renatofilho@642
  3492
	# from the output so that they don't get included in the library
renatofilho@642
  3493
	# dependencies.
renatofilho@642
  3494
	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
renatofilho@642
  3495
	;;
renatofilho@642
  3496
      *)
renatofilho@642
  3497
	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
renatofilho@642
  3498
	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
renatofilho@642
  3499
	 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
renatofilho@642
  3500
renatofilho@642
  3501
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
renatofilho@642
  3502
	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
renatofilho@642
  3503
renatofilho@642
  3504
	  # Commands to make compiler produce verbose output that lists
renatofilho@642
  3505
	  # what "hidden" libraries, object files and flags are used when
renatofilho@642
  3506
	  # linking a shared library.
renatofilho@642
  3507
	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
renatofilho@642
  3508
renatofilho@642
  3509
	else
renatofilho@642
  3510
	  # FIXME: insert proper C++ library support
renatofilho@642
  3511
	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
renatofilho@642
  3512
	fi
renatofilho@642
  3513
	;;
renatofilho@642
  3514
    esac
renatofilho@642
  3515
    ;;
renatofilho@642
  3516
  psos*)
renatofilho@642
  3517
    # FIXME: insert proper C++ library support
renatofilho@642
  3518
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
renatofilho@642
  3519
    ;;
renatofilho@642
  3520
  sunos4*)
renatofilho@642
  3521
    case $cc_basename in
renatofilho@642
  3522
      CC*)
renatofilho@642
  3523
	# Sun C++ 4.x
renatofilho@642
  3524
	# FIXME: insert proper C++ library support
renatofilho@642
  3525
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
renatofilho@642
  3526
	;;
renatofilho@642
  3527
      lcc*)
renatofilho@642
  3528
	# Lucid
renatofilho@642
  3529
	# FIXME: insert proper C++ library support
renatofilho@642
  3530
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
renatofilho@642
  3531
	;;
renatofilho@642
  3532
      *)
renatofilho@642
  3533
	# FIXME: insert proper C++ library support
renatofilho@642
  3534
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
renatofilho@642
  3535
	;;
renatofilho@642
  3536
    esac
renatofilho@642
  3537
    ;;
renatofilho@642
  3538
  solaris*)
renatofilho@642
  3539
    case $cc_basename in
renatofilho@642
  3540
      CC*)
renatofilho@642
  3541
	# Sun C++ 4.2, 5.x and Centerline C++
renatofilho@642
  3542
        _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
renatofilho@642
  3543
	_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
renatofilho@642
  3544
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
renatofilho@642
  3545
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
renatofilho@642
  3546
	$CC -G${allow_undefined_flag}  ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
renatofilho@642
  3547
renatofilho@642
  3548
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
renatofilho@642
  3549
	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
renatofilho@642
  3550
	case $host_os in
renatofilho@642
  3551
	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
renatofilho@642
  3552
	  *)
renatofilho@642
  3553
	    # The C++ compiler is used as linker so we must use $wl
renatofilho@642
  3554
	    # flag to pass the commands to the underlying system
renatofilho@642
  3555
	    # linker. We must also pass each convience library through
renatofilho@642
  3556
	    # to the system linker between allextract/defaultextract.
renatofilho@642
  3557
	    # The C++ compiler will combine linker options so we
renatofilho@642
  3558
	    # cannot just pass the convience library names through
renatofilho@642
  3559
	    # without $wl.
renatofilho@642
  3560
	    # Supported since Solaris 2.6 (maybe 2.5.1?)
renatofilho@642
  3561
	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
renatofilho@642
  3562
	    ;;
renatofilho@642
  3563
	esac
renatofilho@642
  3564
	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
renatofilho@642
  3565
renatofilho@642
  3566
	output_verbose_link_cmd='echo'
renatofilho@642
  3567
renatofilho@642
  3568
	# Archives containing C++ object files must be created using
renatofilho@642
  3569
	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
renatofilho@642
  3570
	# necessary to make sure instantiated templates are included
renatofilho@642
  3571
	# in the archive.
renatofilho@642
  3572
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
renatofilho@642
  3573
	;;
renatofilho@642
  3574
      gcx*)
renatofilho@642
  3575
	# Green Hills C++ Compiler
renatofilho@642
  3576
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
renatofilho@642
  3577
renatofilho@642
  3578
	# The C++ compiler must be used to create the archive.
renatofilho@642
  3579
	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
renatofilho@642
  3580
	;;
renatofilho@642
  3581
      *)
renatofilho@642
  3582
	# GNU C++ compiler with Solaris linker
renatofilho@642
  3583
	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
renatofilho@642
  3584
	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
renatofilho@642
  3585
	  if $CC --version | grep -v '^2\.7' > /dev/null; then
renatofilho@642
  3586
	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
renatofilho@642
  3587
	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
renatofilho@642
  3588
		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
renatofilho@642
  3589
renatofilho@642
  3590
	    # Commands to make compiler produce verbose output that lists
renatofilho@642
  3591
	    # what "hidden" libraries, object files and flags are used when
renatofilho@642
  3592
	    # linking a shared library.
renatofilho@642
  3593
	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
renatofilho@642
  3594
	  else
renatofilho@642
  3595
	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
renatofilho@642
  3596
	    # platform.
renatofilho@642
  3597
	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
renatofilho@642
  3598
	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
renatofilho@642
  3599
		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
renatofilho@642
  3600
renatofilho@642
  3601
	    # Commands to make compiler produce verbose output that lists
renatofilho@642
  3602
	    # what "hidden" libraries, object files and flags are used when
renatofilho@642
  3603
	    # linking a shared library.
renatofilho@642
  3604
	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
renatofilho@642
  3605
	  fi
renatofilho@642
  3606
renatofilho@642
  3607
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
renatofilho@642
  3608
	fi
renatofilho@642
  3609
	;;
renatofilho@642
  3610
    esac
renatofilho@642
  3611
    ;;
renatofilho@642
  3612
  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
renatofilho@642
  3613
    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
renatofilho@642
  3614
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
renatofilho@642
  3615
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
renatofilho@642
  3616
    runpath_var='LD_RUN_PATH'
renatofilho@642
  3617
renatofilho@642
  3618
    case $cc_basename in
renatofilho@642
  3619
      CC*)
renatofilho@642
  3620
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
renatofilho@642
  3621
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
renatofilho@642
  3622
	;;
renatofilho@642
  3623
      *)
renatofilho@642
  3624
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
renatofilho@642
  3625
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
renatofilho@642
  3626
	;;
renatofilho@642
  3627
    esac
renatofilho@642
  3628
    ;;
renatofilho@642
  3629
  sysv5* | sco3.2v5* | sco5v6*)
renatofilho@642
  3630
    # Note: We can NOT use -z defs as we might desire, because we do not
renatofilho@642
  3631
    # link with -lc, and that would cause any symbols used from libc to
renatofilho@642
  3632
    # always be unresolved, which means just about no library would
renatofilho@642
  3633
    # ever link correctly.  If we're not using GNU ld we use -z text
renatofilho@642
  3634
    # though, which does catch some bad symbols but isn't as heavy-handed
renatofilho@642
  3635
    # as -z defs.
renatofilho@642
  3636
    # For security reasons, it is highly recommended that you always
renatofilho@642
  3637
    # use absolute paths for naming shared libraries, and exclude the
renatofilho@642
  3638
    # DT_RUNPATH tag from executables and libraries.  But doing so
renatofilho@642
  3639
    # requires that you compile everything twice, which is a pain.
renatofilho@642
  3640
    # So that behaviour is only enabled if SCOABSPATH is set to a
renatofilho@642
  3641
    # non-empty value in the environment.  Most likely only useful for
renatofilho@642
  3642
    # creating official distributions of packages.
renatofilho@642
  3643
    # This is a hack until libtool officially supports absolute path
renatofilho@642
  3644
    # names for shared libraries.
renatofilho@642
  3645
    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
renatofilho@642
  3646
    _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
renatofilho@642
  3647
    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
renatofilho@642
  3648
    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
renatofilho@642
  3649
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
renatofilho@642
  3650
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
renatofilho@642
  3651
    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
renatofilho@642
  3652
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
renatofilho@642
  3653
    runpath_var='LD_RUN_PATH'
renatofilho@642
  3654
renatofilho@642
  3655
    case $cc_basename in
renatofilho@642
  3656
      CC*)
renatofilho@642
  3657
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
renatofilho@642
  3658
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
renatofilho@642
  3659
	;;
renatofilho@642
  3660
      *)
renatofilho@642
  3661
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
renatofilho@642
  3662
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
renatofilho@642
  3663
	;;
renatofilho@642
  3664
    esac
renatofilho@642
  3665
    ;;
renatofilho@642
  3666
  tandem*)
renatofilho@642
  3667
    case $cc_basename in
renatofilho@642
  3668
      NCC*)
renatofilho@642
  3669
	# NonStop-UX NCC 3.20
renatofilho@642
  3670
	# FIXME: insert proper C++ library support
renatofilho@642
  3671
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
renatofilho@642
  3672
	;;
renatofilho@642
  3673
      *)
renatofilho@642
  3674
	# FIXME: insert proper C++ library support
renatofilho@642
  3675
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
renatofilho@642
  3676
	;;
renatofilho@642
  3677
    esac
renatofilho@642
  3678
    ;;
renatofilho@642
  3679
  vxworks*)
renatofilho@642
  3680
    # FIXME: insert proper C++ library support
renatofilho@642
  3681
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
renatofilho@642
  3682
    ;;
renatofilho@642
  3683
  *)
renatofilho@642
  3684
    # FIXME: insert proper C++ library support
renatofilho@642
  3685
    _LT_AC_TAGVAR(ld_shlibs, $1)=no
renatofilho@642
  3686
    ;;
renatofilho@642
  3687
esac
renatofilho@642
  3688
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
renatofilho@642
  3689
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
renatofilho@642
  3690
renatofilho@642
  3691
_LT_AC_TAGVAR(GCC, $1)="$GXX"
renatofilho@642
  3692
_LT_AC_TAGVAR(LD, $1)="$LD"
renatofilho@642
  3693
renatofilho@642
  3694
## CAVEAT EMPTOR:
renatofilho@642
  3695
## There is no encapsulation within the following macros, do not change
renatofilho@642
  3696
## the running order or otherwise move them around unless you know exactly
renatofilho@642
  3697
## what you are doing...
renatofilho@642
  3698
AC_LIBTOOL_POSTDEP_PREDEP($1)
renatofilho@642
  3699
AC_LIBTOOL_PROG_COMPILER_PIC($1)
renatofilho@642
  3700
AC_LIBTOOL_PROG_CC_C_O($1)
renatofilho@642
  3701
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
renatofilho@642
  3702
AC_LIBTOOL_PROG_LD_SHLIBS($1)
renatofilho@642
  3703
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
renatofilho@642
  3704
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
renatofilho@642
  3705
renatofilho@642
  3706
AC_LIBTOOL_CONFIG($1)
renatofilho@642
  3707
renatofilho@642
  3708
AC_LANG_POP
renatofilho@642
  3709
CC=$lt_save_CC
renatofilho@642
  3710
LDCXX=$LD
renatofilho@642
  3711
LD=$lt_save_LD
renatofilho@642
  3712
GCC=$lt_save_GCC
renatofilho@642
  3713
with_gnu_ldcxx=$with_gnu_ld
renatofilho@642
  3714
with_gnu_ld=$lt_save_with_gnu_ld
renatofilho@642
  3715
lt_cv_path_LDCXX=$lt_cv_path_LD
renatofilho@642
  3716
lt_cv_path_LD=$lt_save_path_LD
renatofilho@642
  3717
lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
renatofilho@642
  3718
lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
renatofilho@642
  3719
])# AC_LIBTOOL_LANG_CXX_CONFIG
renatofilho@642
  3720
renatofilho@642
  3721
# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
renatofilho@642
  3722
# ------------------------------------
renatofilho@642
  3723
# Figure out "hidden" library dependencies from verbose
renatofilho@642
  3724
# compiler output when linking a shared library.
renatofilho@642
  3725
# Parse the compiler output and extract the necessary
renatofilho@642
  3726
# objects, libraries and library flags.
renatofilho@642
  3727
AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
renatofilho@642
  3728
dnl we can't use the lt_simple_compile_test_code here,
renatofilho@642
  3729
dnl because it contains code intended for an executable,
renatofilho@642
  3730
dnl not a library.  It's possible we should let each
renatofilho@642
  3731
dnl tag define a new lt_????_link_test_code variable,
renatofilho@642
  3732
dnl but it's only used here...
renatofilho@642
  3733
ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
renatofilho@642
  3734
int a;
renatofilho@642
  3735
void foo (void) { a = 0; }
renatofilho@642
  3736
EOF
renatofilho@642
  3737
],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
renatofilho@642
  3738
class Foo
renatofilho@642
  3739
{
renatofilho@642
  3740
public:
renatofilho@642
  3741
  Foo (void) { a = 0; }
renatofilho@642
  3742
private:
renatofilho@642
  3743
  int a;
renatofilho@642
  3744
};
renatofilho@642
  3745
EOF
renatofilho@642
  3746
],[$1],[F77],[cat > conftest.$ac_ext <<EOF
renatofilho@642
  3747
      subroutine foo
renatofilho@642
  3748
      implicit none
renatofilho@642
  3749
      integer*4 a
renatofilho@642
  3750
      a=0
renatofilho@642
  3751
      return
renatofilho@642
  3752
      end
renatofilho@642
  3753
EOF
renatofilho@642
  3754
],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
renatofilho@642
  3755
public class foo {
renatofilho@642
  3756
  private int a;
renatofilho@642
  3757
  public void bar (void) {
renatofilho@642
  3758
    a = 0;
renatofilho@642
  3759
  }
renatofilho@642
  3760
};
renatofilho@642
  3761
EOF
renatofilho@642
  3762
])
renatofilho@642
  3763
dnl Parse the compiler output and extract the necessary
renatofilho@642
  3764
dnl objects, libraries and library flags.
renatofilho@642
  3765
if AC_TRY_EVAL(ac_compile); then
renatofilho@642
  3766
  # Parse the compiler output and extract the necessary
renatofilho@642
  3767
  # objects, libraries and library flags.
renatofilho@642
  3768
renatofilho@642
  3769
  # Sentinel used to keep track of whether or not we are before
renatofilho@642
  3770
  # the conftest object file.
renatofilho@642
  3771
  pre_test_object_deps_done=no
renatofilho@642
  3772
renatofilho@642
  3773
  # The `*' in the case matches for architectures that use `case' in
renatofilho@642
  3774
  # $output_verbose_cmd can trigger glob expansion during the loop
renatofilho@642
  3775
  # eval without this substitution.
renatofilho@642
  3776
  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
renatofilho@642
  3777
renatofilho@642
  3778
  for p in `eval $output_verbose_link_cmd`; do
renatofilho@642
  3779
    case $p in
renatofilho@642
  3780
renatofilho@642
  3781
    -L* | -R* | -l*)
renatofilho@642
  3782
       # Some compilers place space between "-{L,R}" and the path.
renatofilho@642
  3783
       # Remove the space.
renatofilho@642
  3784
       if test $p = "-L" \
renatofilho@642
  3785
	  || test $p = "-R"; then
renatofilho@642
  3786
	 prev=$p
renatofilho@642
  3787
	 continue
renatofilho@642
  3788
       else
renatofilho@642
  3789
	 prev=
renatofilho@642
  3790
       fi
renatofilho@642
  3791
renatofilho@642
  3792
       if test "$pre_test_object_deps_done" = no; then
renatofilho@642
  3793
	 case $p in
renatofilho@642
  3794
	 -L* | -R*)
renatofilho@642
  3795
	   # Internal compiler library paths should come after those
renatofilho@642
  3796
	   # provided the user.  The postdeps already come after the
renatofilho@642
  3797
	   # user supplied libs so there is no need to process them.
renatofilho@642
  3798
	   if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
renatofilho@642
  3799
	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
renatofilho@642
  3800
	   else
renatofilho@642
  3801
	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
renatofilho@642
  3802
	   fi
renatofilho@642
  3803
	   ;;
renatofilho@642
  3804
	 # The "-l" case would never come before the object being
renatofilho@642
  3805
	 # linked, so don't bother handling this case.
renatofilho@642
  3806
	 esac
renatofilho@642
  3807
       else
renatofilho@642
  3808
	 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
renatofilho@642
  3809
	   _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
renatofilho@642
  3810
	 else
renatofilho@642
  3811
	   _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
renatofilho@642
  3812
	 fi
renatofilho@642
  3813
       fi
renatofilho@642
  3814
       ;;
renatofilho@642
  3815
renatofilho@642
  3816
    *.$objext)
renatofilho@642
  3817
       # This assumes that the test object file only shows up
renatofilho@642
  3818
       # once in the compiler output.
renatofilho@642
  3819
       if test "$p" = "conftest.$objext"; then
renatofilho@642
  3820
	 pre_test_object_deps_done=yes
renatofilho@642
  3821
	 continue
renatofilho@642
  3822
       fi
renatofilho@642
  3823
renatofilho@642
  3824
       if test "$pre_test_object_deps_done" = no; then
renatofilho@642
  3825
	 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
renatofilho@642
  3826
	   _LT_AC_TAGVAR(predep_objects, $1)="$p"
renatofilho@642
  3827
	 else
renatofilho@642
  3828
	   _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
renatofilho@642
  3829
	 fi
renatofilho@642
  3830
       else
renatofilho@642
  3831
	 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
renatofilho@642
  3832
	   _LT_AC_TAGVAR(postdep_objects, $1)="$p"
renatofilho@642
  3833
	 else
renatofilho@642
  3834
	   _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
renatofilho@642
  3835
	 fi
renatofilho@642
  3836
       fi
renatofilho@642
  3837
       ;;
renatofilho@642
  3838
renatofilho@642
  3839
    *) ;; # Ignore the rest.
renatofilho@642
  3840
renatofilho@642
  3841
    esac
renatofilho@642
  3842
  done
renatofilho@642
  3843
renatofilho@642
  3844
  # Clean up.
renatofilho@642
  3845
  rm -f a.out a.exe
renatofilho@642
  3846
else
renatofilho@642
  3847
  echo "libtool.m4: error: problem compiling $1 test program"
renatofilho@642
  3848
fi
renatofilho@642
  3849
renatofilho@642
  3850
$rm -f confest.$objext
renatofilho@642
  3851
renatofilho@642
  3852
# PORTME: override above test on systems where it is broken
renatofilho@642
  3853
ifelse([$1],[CXX],
renatofilho@642
  3854
[case $host_os in
renatofilho@642
  3855
interix3*)
renatofilho@642
  3856
  # Interix 3.5 installs completely hosed .la files for C++, so rather than
renatofilho@642
  3857
  # hack all around it, let's just trust "g++" to DTRT.
renatofilho@642
  3858
  _LT_AC_TAGVAR(predep_objects,$1)=
renatofilho@642
  3859
  _LT_AC_TAGVAR(postdep_objects,$1)=
renatofilho@642
  3860
  _LT_AC_TAGVAR(postdeps,$1)=
renatofilho@642
  3861
  ;;
renatofilho@642
  3862
renatofilho@642
  3863
solaris*)
renatofilho@642
  3864
  case $cc_basename in
renatofilho@642
  3865
  CC*)
renatofilho@642
  3866
    # Adding this requires a known-good setup of shared libraries for
renatofilho@642
  3867
    # Sun compiler versions before 5.6, else PIC objects from an old
renatofilho@642
  3868
    # archive will be linked into the output, leading to subtle bugs.
renatofilho@642
  3869
    _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
renatofilho@642
  3870
    ;;
renatofilho@642
  3871
  esac
renatofilho@642
  3872
  ;;
renatofilho@642
  3873
esac
renatofilho@642
  3874
])
renatofilho@642
  3875
renatofilho@642
  3876
case " $_LT_AC_TAGVAR(postdeps, $1) " in
renatofilho@642
  3877
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
renatofilho@642
  3878
esac
renatofilho@642
  3879
])# AC_LIBTOOL_POSTDEP_PREDEP
renatofilho@642
  3880
renatofilho@642
  3881
# AC_LIBTOOL_LANG_F77_CONFIG
renatofilho@642
  3882
# --------------------------
renatofilho@642
  3883
# Ensure that the configuration vars for the C compiler are
renatofilho@642
  3884
# suitably defined.  Those variables are subsequently used by
renatofilho@642
  3885
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
renatofilho@642
  3886
AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
renatofilho@642
  3887
AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
renatofilho@642
  3888
[AC_REQUIRE([AC_PROG_F77])
renatofilho@642
  3889
AC_LANG_PUSH(Fortran 77)
renatofilho@642
  3890
renatofilho@642
  3891
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
renatofilho@642
  3892
_LT_AC_TAGVAR(allow_undefined_flag, $1)=
renatofilho@642
  3893
_LT_AC_TAGVAR(always_export_symbols, $1)=no
renatofilho@642
  3894
_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
renatofilho@642
  3895
_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
renatofilho@642
  3896
_LT_AC_TAGVAR(hardcode_direct, $1)=no
renatofilho@642
  3897
_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
renatofilho@642
  3898
_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
renatofilho@642
  3899
_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
renatofilho@642
  3900
_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
renatofilho@642
  3901
_LT_AC_TAGVAR(hardcode_automatic, $1)=no
renatofilho@642
  3902
_LT_AC_TAGVAR(module_cmds, $1)=
renatofilho@642
  3903
_LT_AC_TAGVAR(module_expsym_cmds, $1)=
renatofilho@642
  3904
_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
renatofilho@642
  3905
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
renatofilho@642
  3906
_LT_AC_TAGVAR(no_undefined_flag, $1)=
renatofilho@642
  3907
_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
renatofilho@642
  3908
_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
renatofilho@642
  3909
renatofilho@642
  3910
# Source file extension for f77 test sources.
renatofilho@642
  3911
ac_ext=f
renatofilho@642
  3912
renatofilho@642
  3913
# Object file extension for compiled f77 test sources.
renatofilho@642
  3914
objext=o
renatofilho@642
  3915
_LT_AC_TAGVAR(objext, $1)=$objext
renatofilho@642
  3916
renatofilho@642
  3917
# Code to be used in simple compile tests
renatofilho@642
  3918
lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
renatofilho@642
  3919
renatofilho@642
  3920
# Code to be used in simple link tests
renatofilho@642
  3921
lt_simple_link_test_code="      program t\n      end\n"
renatofilho@642
  3922
renatofilho@642
  3923
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
renatofilho@642
  3924
_LT_AC_SYS_COMPILER
renatofilho@642
  3925
renatofilho@642
  3926
# save warnings/boilerplate of simple test code
renatofilho@642
  3927
_LT_COMPILER_BOILERPLATE
renatofilho@642
  3928
_LT_LINKER_BOILERPLATE
renatofilho@642
  3929
renatofilho@642
  3930
# Allow CC to be a program name with arguments.
renatofilho@642
  3931
lt_save_CC="$CC"
renatofilho@642
  3932
CC=${F77-"f77"}
renatofilho@642
  3933
compiler=$CC
renatofilho@642
  3934
_LT_AC_TAGVAR(compiler, $1)=$CC
renatofilho@642
  3935
_LT_CC_BASENAME([$compiler])
renatofilho@642
  3936
renatofilho@642
  3937
AC_MSG_CHECKING([if libtool supports shared libraries])
renatofilho@642
  3938
AC_MSG_RESULT([$can_build_shared])
renatofilho@642
  3939
renatofilho@642
  3940
AC_MSG_CHECKING([whether to build shared libraries])
renatofilho@642
  3941
test "$can_build_shared" = "no" && enable_shared=no
renatofilho@642
  3942
renatofilho@642
  3943
# On AIX, shared libraries and static libraries use the same namespace, and
renatofilho@642
  3944
# are all built from PIC.
renatofilho@642
  3945
case $host_os in
renatofilho@642
  3946
aix3*)
renatofilho@642
  3947
  test "$enable_shared" = yes && enable_static=no
renatofilho@642
  3948
  if test -n "$RANLIB"; then
renatofilho@642
  3949
    archive_cmds="$archive_cmds~\$RANLIB \$lib"
renatofilho@642
  3950
    postinstall_cmds='$RANLIB $lib'
renatofilho@642
  3951
  fi
renatofilho@642
  3952
  ;;
renatofilho@642
  3953
aix4* | aix5*)
renatofilho@642
  3954
  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
renatofilho@642
  3955
    test "$enable_shared" = yes && enable_static=no
renatofilho@642
  3956
  fi
renatofilho@642
  3957
  ;;
renatofilho@642
  3958
esac
renatofilho@642
  3959
AC_MSG_RESULT([$enable_shared])
renatofilho@642
  3960
renatofilho@642
  3961
AC_MSG_CHECKING([whether to build static libraries])
renatofilho@642
  3962
# Make sure either enable_shared or enable_static is yes.
renatofilho@642
  3963
test "$enable_shared" = yes || enable_static=yes
renatofilho@642
  3964
AC_MSG_RESULT([$enable_static])
renatofilho@642
  3965
renatofilho@642
  3966
_LT_AC_TAGVAR(GCC, $1)="$G77"
renatofilho@642
  3967
_LT_AC_TAGVAR(LD, $1)="$LD"
renatofilho@642
  3968
renatofilho@642
  3969
AC_LIBTOOL_PROG_COMPILER_PIC($1)
renatofilho@642
  3970
AC_LIBTOOL_PROG_CC_C_O($1)
renatofilho@642
  3971
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
renatofilho@642
  3972
AC_LIBTOOL_PROG_LD_SHLIBS($1)
renatofilho@642
  3973
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
renatofilho@642
  3974
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
renatofilho@642
  3975
renatofilho@642
  3976
AC_LIBTOOL_CONFIG($1)
renatofilho@642
  3977
renatofilho@642
  3978
AC_LANG_POP
renatofilho@642
  3979
CC="$lt_save_CC"
renatofilho@642
  3980
])# AC_LIBTOOL_LANG_F77_CONFIG
renatofilho@642
  3981
renatofilho@642
  3982
renatofilho@642
  3983
# AC_LIBTOOL_LANG_GCJ_CONFIG
renatofilho@642
  3984
# --------------------------
renatofilho@642
  3985
# Ensure that the configuration vars for the C compiler are
renatofilho@642
  3986
# suitably defined.  Those variables are subsequently used by
renatofilho@642
  3987
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
renatofilho@642
  3988
AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
renatofilho@642
  3989
AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
renatofilho@642
  3990
[AC_LANG_SAVE
renatofilho@642
  3991
renatofilho@642
  3992
# Source file extension for Java test sources.
renatofilho@642
  3993
ac_ext=java
renatofilho@642
  3994
renatofilho@642
  3995
# Object file extension for compiled Java test sources.
renatofilho@642
  3996
objext=o
renatofilho@642
  3997
_LT_AC_TAGVAR(objext, $1)=$objext
renatofilho@642
  3998
renatofilho@642
  3999
# Code to be used in simple compile tests
renatofilho@642
  4000
lt_simple_compile_test_code="class foo {}\n"
renatofilho@642
  4001
renatofilho@642
  4002
# Code to be used in simple link tests
renatofilho@642
  4003
lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
renatofilho@642
  4004
renatofilho@642
  4005
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
renatofilho@642
  4006
_LT_AC_SYS_COMPILER
renatofilho@642
  4007
renatofilho@642
  4008
# save warnings/boilerplate of simple test code
renatofilho@642
  4009
_LT_COMPILER_BOILERPLATE
renatofilho@642
  4010
_LT_LINKER_BOILERPLATE
renatofilho@642
  4011
renatofilho@642
  4012
# Allow CC to be a program name with arguments.
renatofilho@642
  4013
lt_save_CC="$CC"
renatofilho@642
  4014
CC=${GCJ-"gcj"}
renatofilho@642
  4015
compiler=$CC
renatofilho@642
  4016
_LT_AC_TAGVAR(compiler, $1)=$CC
renatofilho@642
  4017
_LT_CC_BASENAME([$compiler])
renatofilho@642
  4018
renatofilho@642
  4019
# GCJ did not exist at the time GCC didn't implicitly link libc in.
renatofilho@642
  4020
_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
renatofilho@642
  4021
renatofilho@642
  4022
_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
renatofilho@642
  4023
renatofilho@642
  4024
## CAVEAT EMPTOR:
renatofilho@642
  4025
## There is no encapsulation within the following macros, do not change
renatofilho@642
  4026
## the running order or otherwise move them around unless you know exactly
renatofilho@642
  4027
## what you are doing...
renatofilho@642
  4028
AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
renatofilho@642
  4029
AC_LIBTOOL_PROG_COMPILER_PIC($1)
renatofilho@642
  4030
AC_LIBTOOL_PROG_CC_C_O($1)
renatofilho@642
  4031
AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
renatofilho@642
  4032
AC_LIBTOOL_PROG_LD_SHLIBS($1)
renatofilho@642
  4033
AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
renatofilho@642
  4034
AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
renatofilho@642
  4035
renatofilho@642
  4036
AC_LIBTOOL_CONFIG($1)
renatofilho@642
  4037
renatofilho@642
  4038
AC_LANG_RESTORE
renatofilho@642
  4039
CC="$lt_save_CC"
renatofilho@642
  4040
])# AC_LIBTOOL_LANG_GCJ_CONFIG
renatofilho@642
  4041
renatofilho@642
  4042
renatofilho@642
  4043
# AC_LIBTOOL_LANG_RC_CONFIG
renatofilho@642
  4044
# -------------------------
renatofilho@642
  4045
# Ensure that the configuration vars for the Windows resource compiler are
renatofilho@642
  4046
# suitably defined.  Those variables are subsequently used by
renatofilho@642
  4047
# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
renatofilho@642
  4048
AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
renatofilho@642
  4049
AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
renatofilho@642
  4050
[AC_LANG_SAVE
renatofilho@642
  4051
renatofilho@642
  4052
# Source file extension for RC test sources.
renatofilho@642
  4053
ac_ext=rc
renatofilho@642
  4054
renatofilho@642
  4055
# Object file extension for compiled RC test sources.
renatofilho@642
  4056
objext=o
renatofilho@642
  4057
_LT_AC_TAGVAR(objext, $1)=$objext
renatofilho@642
  4058
renatofilho@642
  4059
# Code to be used in simple compile tests
renatofilho@642
  4060
lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
renatofilho@642
  4061
renatofilho@642
  4062
# Code to be used in simple link tests
renatofilho@642
  4063
lt_simple_link_test_code="$lt_simple_compile_test_code"
renatofilho@642
  4064
renatofilho@642
  4065
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
renatofilho@642
  4066
_LT_AC_SYS_COMPILER
renatofilho@642
  4067
renatofilho@642
  4068
# save warnings/boilerplate of simple test code
renatofilho@642
  4069
_LT_COMPILER_BOILERPLATE
renatofilho@642
  4070
_LT_LINKER_BOILERPLATE
renatofilho@642
  4071
renatofilho@642
  4072
# Allow CC to be a program name with arguments.
renatofilho@642
  4073
lt_save_CC="$CC"
renatofilho@642
  4074
CC=${RC-"windres"}
renatofilho@642
  4075
compiler=$CC
renatofilho@642
  4076
_LT_AC_TAGVAR(compiler, $1)=$CC
renatofilho@642
  4077
_LT_CC_BASENAME([$compiler])
renatofilho@642
  4078
_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
renatofilho@642
  4079
renatofilho@642
  4080
AC_LIBTOOL_CONFIG($1)
renatofilho@642
  4081
renatofilho@642
  4082
AC_LANG_RESTORE
renatofilho@642
  4083
CC="$lt_save_CC"
renatofilho@642
  4084
])# AC_LIBTOOL_LANG_RC_CONFIG
renatofilho@642
  4085
renatofilho@642
  4086
renatofilho@642
  4087
# AC_LIBTOOL_CONFIG([TAGNAME])
renatofilho@642
  4088
# ----------------------------
renatofilho@642
  4089
# If TAGNAME is not passed, then create an initial libtool script
renatofilho@642
  4090
# with a default configuration from the untagged config vars.  Otherwise
renatofilho@642
  4091
# add code to config.status for appending the configuration named by
renatofilho@642
  4092
# TAGNAME from the matching tagged config vars.
renatofilho@642
  4093
AC_DEFUN([AC_LIBTOOL_CONFIG],
renatofilho@642
  4094
[# The else clause should only fire when bootstrapping the
renatofilho@642
  4095
# libtool distribution, otherwise you forgot to ship ltmain.sh
renatofilho@642
  4096
# with your package, and you will get complaints that there are
renatofilho@642
  4097
# no rules to generate ltmain.sh.
renatofilho@642
  4098
if test -f "$ltmain"; then
renatofilho@642
  4099
  # See if we are running on zsh, and set the options which allow our commands through
renatofilho@642
  4100
  # without removal of \ escapes.
renatofilho@642
  4101
  if test -n "${ZSH_VERSION+set}" ; then
renatofilho@642
  4102
    setopt NO_GLOB_SUBST
renatofilho@642
  4103
  fi
renatofilho@642
  4104
  # Now quote all the things that may contain metacharacters while being
renatofilho@642
  4105
  # careful not to overquote the AC_SUBSTed values.  We take copies of the
renatofilho@642
  4106
  # variables and quote the copies for generation of the libtool script.
renatofilho@642
  4107
  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
renatofilho@642
  4108
    SED SHELL STRIP \
renatofilho@642
  4109
    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
renatofilho@642
  4110
    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
renatofilho@642
  4111
    deplibs_check_method reload_flag reload_cmds need_locks \
renatofilho@642
  4112
    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
renatofilho@642
  4113
    lt_cv_sys_global_symbol_to_c_name_address \
renatofilho@642
  4114
    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
renatofilho@642
  4115
    old_postinstall_cmds old_postuninstall_cmds \
renatofilho@642
  4116
    _LT_AC_TAGVAR(compiler, $1) \
renatofilho@642
  4117
    _LT_AC_TAGVAR(CC, $1) \
renatofilho@642
  4118
    _LT_AC_TAGVAR(LD, $1) \
renatofilho@642
  4119
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
renatofilho@642
  4120
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
renatofilho@642
  4121
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
renatofilho@642
  4122
    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
renatofilho@642
  4123
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
renatofilho@642
  4124
    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
renatofilho@642
  4125
    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
renatofilho@642
  4126
    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
renatofilho@642
  4127
    _LT_AC_TAGVAR(old_archive_cmds, $1) \
renatofilho@642
  4128
    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
renatofilho@642
  4129
    _LT_AC_TAGVAR(predep_objects, $1) \
renatofilho@642
  4130
    _LT_AC_TAGVAR(postdep_objects, $1) \
renatofilho@642
  4131
    _LT_AC_TAGVAR(predeps, $1) \
renatofilho@642
  4132
    _LT_AC_TAGVAR(postdeps, $1) \
renatofilho@642
  4133
    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
renatofilho@642
  4134
    _LT_AC_TAGVAR(archive_cmds, $1) \
renatofilho@642
  4135
    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
renatofilho@642
  4136
    _LT_AC_TAGVAR(postinstall_cmds, $1) \
renatofilho@642
  4137
    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
renatofilho@642
  4138
    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
renatofilho@642
  4139
    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
renatofilho@642
  4140
    _LT_AC_TAGVAR(no_undefined_flag, $1) \
renatofilho@642
  4141
    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
renatofilho@642
  4142
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
renatofilho@642
  4143
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
renatofilho@642
  4144
    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
renatofilho@642
  4145
    _LT_AC_TAGVAR(hardcode_automatic, $1) \
renatofilho@642
  4146
    _LT_AC_TAGVAR(module_cmds, $1) \
renatofilho@642
  4147
    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
renatofilho@642
  4148
    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
renatofilho@642
  4149
    _LT_AC_TAGVAR(exclude_expsyms, $1) \
renatofilho@642
  4150
    _LT_AC_TAGVAR(include_expsyms, $1); do
renatofilho@642
  4151
renatofilho@642
  4152
    case $var in
renatofilho@642
  4153
    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
renatofilho@642
  4154
    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
renatofilho@642
  4155
    _LT_AC_TAGVAR(archive_cmds, $1) | \
renatofilho@642
  4156
    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
renatofilho@642
  4157
    _LT_AC_TAGVAR(module_cmds, $1) | \
renatofilho@642
  4158
    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
renatofilho@642
  4159
    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
renatofilho@642
  4160
    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
renatofilho@642
  4161
    extract_expsyms_cmds | reload_cmds | finish_cmds | \
renatofilho@642
  4162
    postinstall_cmds | postuninstall_cmds | \
renatofilho@642
  4163
    old_postinstall_cmds | old_postuninstall_cmds | \
renatofilho@642
  4164
    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
renatofilho@642
  4165
      # Double-quote double-evaled strings.
renatofilho@642
  4166
      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
renatofilho@642
  4167
      ;;
renatofilho@642
  4168
    *)
renatofilho@642
  4169
      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
renatofilho@642
  4170
      ;;
renatofilho@642
  4171
    esac
renatofilho@642
  4172
  done
renatofilho@642
  4173
renatofilho@642
  4174
  case $lt_echo in
renatofilho@642
  4175
  *'\[$]0 --fallback-echo"')
renatofilho@642
  4176
    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
renatofilho@642
  4177
    ;;
renatofilho@642
  4178
  esac
renatofilho@642
  4179
renatofilho@642
  4180
ifelse([$1], [],
renatofilho@642
  4181
  [cfgfile="${ofile}T"
renatofilho@642
  4182
  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
renatofilho@642
  4183
  $rm -f "$cfgfile"
renatofilho@642
  4184
  AC_MSG_NOTICE([creating $ofile])],
renatofilho@642
  4185
  [cfgfile="$ofile"])
renatofilho@642
  4186
renatofilho@642
  4187
  cat <<__EOF__ >> "$cfgfile"
renatofilho@642
  4188
ifelse([$1], [],
renatofilho@642
  4189
[#! $SHELL
renatofilho@642
  4190
renatofilho@642
  4191
# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
renatofilho@642
  4192
# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
renatofilho@642
  4193
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
renatofilho@642
  4194
#
renatofilho@642
  4195
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
renatofilho@642
  4196
# Free Software Foundation, Inc.
renatofilho@642
  4197
#
renatofilho@642
  4198
# This file is part of GNU Libtool:
renatofilho@642
  4199
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
renatofilho@642
  4200
#
renatofilho@642
  4201
# This program is free software; you can redistribute it and/or modify
renatofilho@642
  4202
# it under the terms of the GNU General Public License as published by
renatofilho@642
  4203
# the Free Software Foundation; either version 2 of the License, or
renatofilho@642
  4204
# (at your option) any later version.
renatofilho@642
  4205
#
renatofilho@642
  4206
# This program is distributed in the hope that it will be useful, but
renatofilho@642
  4207
# WITHOUT ANY WARRANTY; without even the implied warranty of
renatofilho@642
  4208
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
renatofilho@642
  4209
# General Public License for more details.
renatofilho@642
  4210
#
renatofilho@642
  4211
# You should have received a copy of the GNU General Public License
renatofilho@642
  4212
# along with this program; if not, write to the Free Software
renatofilho@642
  4213
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
renatofilho@642
  4214
#
renatofilho@642
  4215
# As a special exception to the GNU General Public License, if you
renatofilho@642
  4216
# distribute this file as part of a program that contains a
renatofilho@642
  4217
# configuration script generated by Autoconf, you may include it under
renatofilho@642
  4218
# the same distribution terms that you use for the rest of that program.
renatofilho@642
  4219
renatofilho@642
  4220
# A sed program that does not truncate output.
renatofilho@642
  4221
SED=$lt_SED
renatofilho@642
  4222
renatofilho@642
  4223
# Sed that helps us avoid accidentally triggering echo(1) options like -n.
renatofilho@642
  4224
Xsed="$SED -e 1s/^X//"
renatofilho@642
  4225
renatofilho@642
  4226
# The HP-UX ksh and POSIX shell print the target directory to stdout
renatofilho@642
  4227
# if CDPATH is set.
renatofilho@642
  4228
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
renatofilho@642
  4229
renatofilho@642
  4230
# The names of the tagged configurations supported by this script.
renatofilho@642
  4231
available_tags=
renatofilho@642
  4232
renatofilho@642
  4233
# ### BEGIN LIBTOOL CONFIG],
renatofilho@642
  4234
[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
renatofilho@642
  4235
renatofilho@642
  4236
# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
renatofilho@642
  4237
renatofilho@642
  4238
# Shell to use when invoking shell scripts.
renatofilho@642
  4239
SHELL=$lt_SHELL
renatofilho@642
  4240
renatofilho@642
  4241
# Whether or not to build shared libraries.
renatofilho@642
  4242
build_libtool_libs=$enable_shared
renatofilho@642
  4243
renatofilho@642
  4244
# Whether or not to build static libraries.
renatofilho@642
  4245
build_old_libs=$enable_static
renatofilho@642
  4246
renatofilho@642
  4247
# Whether or not to add -lc for building shared libraries.
renatofilho@642
  4248
build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
renatofilho@642
  4249
renatofilho@642
  4250
# Whether or not to disallow shared libs when runtime libs are static
renatofilho@642
  4251
allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
renatofilho@642
  4252
renatofilho@642
  4253
# Whether or not to optimize for fast installation.
renatofilho@642
  4254
fast_install=$enable_fast_install
renatofilho@642
  4255
renatofilho@642
  4256
# The host system.
renatofilho@642
  4257
host_alias=$host_alias
renatofilho@642
  4258
host=$host
renatofilho@642
  4259
host_os=$host_os
renatofilho@642
  4260
renatofilho@642
  4261
# The build system.
renatofilho@642
  4262
build_alias=$build_alias
renatofilho@642
  4263
build=$build
renatofilho@642
  4264
build_os=$build_os
renatofilho@642
  4265
renatofilho@642
  4266
# An echo program that does not interpret backslashes.
renatofilho@642
  4267
echo=$lt_echo
renatofilho@642
  4268
renatofilho@642
  4269
# The archiver.
renatofilho@642
  4270
AR=$lt_AR
renatofilho@642
  4271
AR_FLAGS=$lt_AR_FLAGS
renatofilho@642
  4272
renatofilho@642
  4273
# A C compiler.
renatofilho@642
  4274
LTCC=$lt_LTCC
renatofilho@642
  4275
renatofilho@642
  4276
# LTCC compiler flags.
renatofilho@642
  4277
LTCFLAGS=$lt_LTCFLAGS
renatofilho@642
  4278
renatofilho@642
  4279
# A language-specific compiler.
renatofilho@642
  4280
CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
renatofilho@642
  4281
renatofilho@642
  4282
# Is the compiler the GNU C compiler?
renatofilho@642
  4283
with_gcc=$_LT_AC_TAGVAR(GCC, $1)
renatofilho@642
  4284
renatofilho@642
  4285
# An ERE matcher.
renatofilho@642
  4286
EGREP=$lt_EGREP
renatofilho@642
  4287
renatofilho@642
  4288
# The linker used to build libraries.
renatofilho@642
  4289
LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
renatofilho@642
  4290
renatofilho@642
  4291
# Whether we need hard or soft links.
renatofilho@642
  4292
LN_S=$lt_LN_S
renatofilho@642
  4293
renatofilho@642
  4294
# A BSD-compatible nm program.
renatofilho@642
  4295
NM=$lt_NM
renatofilho@642
  4296
renatofilho@642
  4297
# A symbol stripping program
renatofilho@642
  4298
STRIP=$lt_STRIP
renatofilho@642
  4299
renatofilho@642
  4300
# Used to examine libraries when file_magic_cmd begins "file"
renatofilho@642
  4301
MAGIC_CMD=$MAGIC_CMD
renatofilho@642
  4302
renatofilho@642
  4303
# Used on cygwin: DLL creation program.
renatofilho@642
  4304
DLLTOOL="$DLLTOOL"
renatofilho@642
  4305
renatofilho@642
  4306
# Used on cygwin: object dumper.
renatofilho@642
  4307
OBJDUMP="$OBJDUMP"
renatofilho@642
  4308
renatofilho@642
  4309
# Used on cygwin: assembler.
renatofilho@642
  4310
AS="$AS"
renatofilho@642
  4311
renatofilho@642
  4312
# The name of the directory that contains temporary libtool files.
renatofilho@642
  4313
objdir=$objdir
renatofilho@642
  4314
renatofilho@642
  4315
# How to create reloadable object files.
renatofilho@642
  4316
reload_flag=$lt_reload_flag
renatofilho@642
  4317
reload_cmds=$lt_reload_cmds
renatofilho@642
  4318
renatofilho@642
  4319
# How to pass a linker flag through the compiler.
renatofilho@642
  4320
wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
renatofilho@642
  4321
renatofilho@642
  4322
# Object file suffix (normally "o").
renatofilho@642
  4323
objext="$ac_objext"
renatofilho@642
  4324
renatofilho@642
  4325
# Old archive suffix (normally "a").
renatofilho@642
  4326
libext="$libext"
renatofilho@642
  4327
renatofilho@642
  4328
# Shared library suffix (normally ".so").
renatofilho@642
  4329
shrext_cmds='$shrext_cmds'
renatofilho@642
  4330
renatofilho@642
  4331
# Executable file suffix (normally "").
renatofilho@642
  4332
exeext="$exeext"
renatofilho@642
  4333
renatofilho@642
  4334
# Additional compiler flags for building library objects.
renatofilho@642
  4335
pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
renatofilho@642
  4336
pic_mode=$pic_mode
renatofilho@642
  4337
renatofilho@642
  4338
# What is the maximum length of a command?
renatofilho@642
  4339
max_cmd_len=$lt_cv_sys_max_cmd_len
renatofilho@642
  4340
renatofilho@642
  4341
# Does compiler simultaneously support -c and -o options?
renatofilho@642
  4342
compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
renatofilho@642
  4343
renatofilho@642
  4344
# Must we lock files when doing compilation?
renatofilho@642
  4345
need_locks=$lt_need_locks
renatofilho@642
  4346
renatofilho@642
  4347
# Do we need the lib prefix for modules?
renatofilho@642
  4348
need_lib_prefix=$need_lib_prefix
renatofilho@642
  4349
renatofilho@642
  4350
# Do we need a version for libraries?
renatofilho@642
  4351
need_version=$need_version
renatofilho@642
  4352
renatofilho@642
  4353
# Whether dlopen is supported.
renatofilho@642
  4354
dlopen_support=$enable_dlopen
renatofilho@642
  4355
renatofilho@642
  4356
# Whether dlopen of programs is supported.
renatofilho@642
  4357
dlopen_self=$enable_dlopen_self
renatofilho@642
  4358
renatofilho@642
  4359
# Whether dlopen of statically linked programs is supported.
renatofilho@642
  4360
dlopen_self_static=$enable_dlopen_self_static
renatofilho@642
  4361
renatofilho@642
  4362
# Compiler flag to prevent dynamic linking.
renatofilho@642
  4363
link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
renatofilho@642
  4364
renatofilho@642
  4365
# Compiler flag to turn off builtin functions.
renatofilho@642
  4366
no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
renatofilho@642
  4367
renatofilho@642
  4368
# Compiler flag to allow reflexive dlopens.
renatofilho@642
  4369
export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
renatofilho@642
  4370
renatofilho@642
  4371
# Compiler flag to generate shared objects directly from archives.
renatofilho@642
  4372
whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
renatofilho@642
  4373
renatofilho@642
  4374
# Compiler flag to generate thread-safe objects.
renatofilho@642
  4375
thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
renatofilho@642
  4376
renatofilho@642
  4377
# Library versioning type.
renatofilho@642
  4378
version_type=$version_type
renatofilho@642
  4379
renatofilho@642
  4380
# Format of library name prefix.
renatofilho@642
  4381
libname_spec=$lt_libname_spec
renatofilho@642
  4382
renatofilho@642
  4383
# List of archive names.  First name is the real one, the rest are links.
renatofilho@642
  4384
# The last name is the one that the linker finds with -lNAME.
renatofilho@642
  4385
library_names_spec=$lt_library_names_spec
renatofilho@642
  4386
renatofilho@642
  4387
# The coded name of the library, if different from the real name.
renatofilho@642
  4388
soname_spec=$lt_soname_spec
renatofilho@642
  4389
renatofilho@642
  4390
# Commands used to build and install an old-style archive.
renatofilho@642
  4391
RANLIB=$lt_RANLIB
renatofilho@642
  4392
old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
renatofilho@642
  4393
old_postinstall_cmds=$lt_old_postinstall_cmds
renatofilho@642
  4394
old_postuninstall_cmds=$lt_old_postuninstall_cmds
renatofilho@642
  4395
renatofilho@642
  4396
# Create an old-style archive from a shared archive.
renatofilho@642
  4397
old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
renatofilho@642
  4398
renatofilho@642
  4399
# Create a temporary old-style archive to link instead of a shared archive.
renatofilho@642
  4400
old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
renatofilho@642
  4401
renatofilho@642
  4402
# Commands used to build and install a shared archive.
renatofilho@642
  4403
archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
renatofilho@642
  4404
archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
renatofilho@642
  4405
postinstall_cmds=$lt_postinstall_cmds
renatofilho@642
  4406
postuninstall_cmds=$lt_postuninstall_cmds
renatofilho@642
  4407
renatofilho@642
  4408
# Commands used to build a loadable module (assumed same as above if empty)
renatofilho@642
  4409
module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
renatofilho@642
  4410
module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
renatofilho@642
  4411
renatofilho@642
  4412
# Commands to strip libraries.
renatofilho@642
  4413
old_striplib=$lt_old_striplib
renatofilho@642
  4414
striplib=$lt_striplib
renatofilho@642
  4415
renatofilho@642
  4416
# Dependencies to place before the objects being linked to create a
renatofilho@642
  4417
# shared library.
renatofilho@642
  4418
predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
renatofilho@642
  4419
renatofilho@642
  4420
# Dependencies to place after the objects being linked to create a
renatofilho@642
  4421
# shared library.
renatofilho@642
  4422
postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
renatofilho@642
  4423
renatofilho@642
  4424
# Dependencies to place before the objects being linked to create a
renatofilho@642
  4425
# shared library.
renatofilho@642
  4426
predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
renatofilho@642
  4427
renatofilho@642
  4428
# Dependencies to place after the objects being linked to create a
renatofilho@642
  4429
# shared library.
renatofilho@642
  4430
postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
renatofilho@642
  4431
renatofilho@642
  4432
# The library search path used internally by the compiler when linking
renatofilho@642
  4433
# a shared library.
renatofilho@642
  4434
compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
renatofilho@642
  4435
renatofilho@642
  4436
# Method to check whether dependent libraries are shared objects.
renatofilho@642
  4437
deplibs_check_method=$lt_deplibs_check_method
renatofilho@642
  4438
renatofilho@642
  4439
# Command to use when deplibs_check_method == file_magic.
renatofilho@642
  4440
file_magic_cmd=$lt_file_magic_cmd
renatofilho@642
  4441
renatofilho@642
  4442
# Flag that allows shared libraries with undefined symbols to be built.
renatofilho@642
  4443
allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
renatofilho@642
  4444
renatofilho@642
  4445
# Flag that forces no undefined symbols.
renatofilho@642
  4446
no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
renatofilho@642
  4447
renatofilho@642
  4448
# Commands used to finish a libtool library installation in a directory.
renatofilho@642
  4449
finish_cmds=$lt_finish_cmds
renatofilho@642
  4450
renatofilho@642
  4451
# Same as above, but a single script fragment to be evaled but not shown.
renatofilho@642
  4452
finish_eval=$lt_finish_eval
renatofilho@642
  4453
renatofilho@642
  4454
# Take the output of nm and produce a listing of raw symbols and C names.
renatofilho@642
  4455
global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
renatofilho@642
  4456
renatofilho@642
  4457
# Transform the output of nm in a proper C declaration
renatofilho@642
  4458
global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
renatofilho@642
  4459
renatofilho@642
  4460
# Transform the output of nm in a C name address pair
renatofilho@642
  4461
global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
renatofilho@642
  4462
renatofilho@642
  4463
# This is the shared library runtime path variable.
renatofilho@642
  4464
runpath_var=$runpath_var
renatofilho@642
  4465
renatofilho@642
  4466
# This is the shared library path variable.
renatofilho@642
  4467
shlibpath_var=$shlibpath_var
renatofilho@642
  4468
renatofilho@642
  4469
# Is shlibpath searched before the hard-coded library search path?
renatofilho@642
  4470
shlibpath_overrides_runpath=$shlibpath_overrides_runpath
renatofilho@642
  4471
renatofilho@642
  4472
# How to hardcode a shared library path into an executable.
renatofilho@642
  4473
hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
renatofilho@642
  4474
renatofilho@642
  4475
# Whether we should hardcode library paths into libraries.
renatofilho@642
  4476
hardcode_into_libs=$hardcode_into_libs
renatofilho@642
  4477
renatofilho@642
  4478
# Flag to hardcode \$libdir into a binary during linking.
renatofilho@642
  4479
# This must work even if \$libdir does not exist.
renatofilho@642
  4480
hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
renatofilho@642
  4481
renatofilho@642
  4482
# If ld is used when linking, flag to hardcode \$libdir into
renatofilho@642
  4483
# a binary during linking. This must work even if \$libdir does
renatofilho@642
  4484
# not exist.
renatofilho@642
  4485
hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
renatofilho@642
  4486
renatofilho@642
  4487
# Whether we need a single -rpath flag with a separated argument.
renatofilho@642
  4488
hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
renatofilho@642
  4489
renatofilho@642
  4490
# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
renatofilho@642
  4491
# resulting binary.
renatofilho@642
  4492
hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
renatofilho@642
  4493
renatofilho@642
  4494
# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
renatofilho@642
  4495
# resulting binary.
renatofilho@642
  4496
hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
renatofilho@642
  4497
renatofilho@642
  4498
# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
renatofilho@642
  4499
# the resulting binary.
renatofilho@642
  4500
hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
renatofilho@642
  4501
renatofilho@642
  4502
# Set to yes if building a shared library automatically hardcodes DIR into the library
renatofilho@642
  4503
# and all subsequent libraries and executables linked against it.
renatofilho@642
  4504
hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
renatofilho@642
  4505
renatofilho@642
  4506
# Variables whose values should be saved in libtool wrapper scripts and
renatofilho@642
  4507
# restored at relink time.
renatofilho@642
  4508
variables_saved_for_relink="$variables_saved_for_relink"
renatofilho@642
  4509
renatofilho@642
  4510
# Whether libtool must link a program against all its dependency libraries.
renatofilho@642
  4511
link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
renatofilho@642
  4512
renatofilho@642
  4513
# Compile-time system search path for libraries
renatofilho@642
  4514
sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
renatofilho@642
  4515
renatofilho@642
  4516
# Run-time system search path for libraries
renatofilho@642
  4517
sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
renatofilho@642
  4518
renatofilho@642
  4519
# Fix the shell variable \$srcfile for the compiler.
renatofilho@642
  4520
fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
renatofilho@642
  4521
renatofilho@642
  4522
# Set to yes if exported symbols are required.
renatofilho@642
  4523
always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
renatofilho@642
  4524
renatofilho@642
  4525
# The commands to list exported symbols.
renatofilho@642
  4526
export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
renatofilho@642
  4527
renatofilho@642
  4528
# The commands to extract the exported symbol list from a shared archive.
renatofilho@642
  4529
extract_expsyms_cmds=$lt_extract_expsyms_cmds
renatofilho@642
  4530
renatofilho@642
  4531
# Symbols that should not be listed in the preloaded symbols.
renatofilho@642
  4532
exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
renatofilho@642
  4533
renatofilho@642
  4534
# Symbols that must always be exported.
renatofilho@642
  4535
include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
renatofilho@642
  4536
renatofilho@642
  4537
ifelse([$1],[],
renatofilho@642
  4538
[# ### END LIBTOOL CONFIG],
renatofilho@642
  4539
[# ### END LIBTOOL TAG CONFIG: $tagname])
renatofilho@642
  4540
renatofilho@642
  4541
__EOF__
renatofilho@642
  4542
renatofilho@642
  4543
ifelse([$1],[], [
renatofilho@642
  4544
  case $host_os in
renatofilho@642
  4545
  aix3*)
renatofilho@642
  4546
    cat <<\EOF >> "$cfgfile"
renatofilho@642
  4547
renatofilho@642
  4548
# AIX sometimes has problems with the GCC collect2 program.  For some
renatofilho@642
  4549
# reason, if we set the COLLECT_NAMES environment variable, the problems
renatofilho@642
  4550
# vanish in a puff of smoke.
renatofilho@642
  4551
if test "X${COLLECT_NAMES+set}" != Xset; then
renatofilho@642
  4552
  COLLECT_NAMES=
renatofilho@642
  4553
  export COLLECT_NAMES
renatofilho@642
  4554
fi
renatofilho@642
  4555
EOF
renatofilho@642
  4556
    ;;
renatofilho@642
  4557
  esac
renatofilho@642
  4558
renatofilho@642
  4559
  # We use sed instead of cat because bash on DJGPP gets confused if
renatofilho@642
  4560
  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
renatofilho@642
  4561
  # text mode, it properly converts lines to CR/LF.  This bash problem
renatofilho@642
  4562
  # is reportedly fixed, but why not run on old versions too?
renatofilho@642
  4563
  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
renatofilho@642
  4564
renatofilho@642
  4565
  mv -f "$cfgfile" "$ofile" || \
renatofilho@642
  4566
    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
renatofilho@642
  4567
  chmod +x "$ofile"
renatofilho@642
  4568
])
renatofilho@642
  4569
else
renatofilho@642
  4570
  # If there is no Makefile yet, we rely on a make rule to execute
renatofilho@642
  4571
  # `config.status --recheck' to rerun these tests and create the
renatofilho@642
  4572
  # libtool script then.
renatofilho@642
  4573
  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
renatofilho@642
  4574
  if test -f "$ltmain_in"; then
renatofilho@642
  4575
    test -f Makefile && make "$ltmain"
renatofilho@642
  4576
  fi
renatofilho@642
  4577
fi
renatofilho@642
  4578
])# AC_LIBTOOL_CONFIG
renatofilho@642
  4579
renatofilho@642
  4580
renatofilho@642
  4581
# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
renatofilho@642
  4582
# -------------------------------------------
renatofilho@642
  4583
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
renatofilho@642
  4584
[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
renatofilho@642
  4585
renatofilho@642
  4586
_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
renatofilho@642
  4587
renatofilho@642
  4588
if test "$GCC" = yes; then
renatofilho@642
  4589
  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
renatofilho@642
  4590
renatofilho@642
  4591
  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
renatofilho@642
  4592
    lt_cv_prog_compiler_rtti_exceptions,
renatofilho@642
  4593
    [-fno-rtti -fno-exceptions], [],
renatofilho@642
  4594
    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
renatofilho@642
  4595
fi
renatofilho@642
  4596
])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
renatofilho@642
  4597
renatofilho@642
  4598
renatofilho@642
  4599
# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
renatofilho@642
  4600
# ---------------------------------
renatofilho@642
  4601
AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
renatofilho@642
  4602
[AC_REQUIRE([AC_CANONICAL_HOST])
renatofilho@642
  4603
AC_REQUIRE([AC_PROG_NM])
renatofilho@642
  4604
AC_REQUIRE([AC_OBJEXT])
renatofilho@642
  4605
# Check for command to grab the raw symbol name followed by C symbol from nm.
renatofilho@642
  4606
AC_MSG_CHECKING([command to parse $NM output from $compiler object])
renatofilho@642
  4607
AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
renatofilho@642
  4608
[
renatofilho@642
  4609
# These are sane defaults that work on at least a few old systems.
renatofilho@642
  4610
# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
renatofilho@642
  4611
renatofilho@642
  4612
# Character class describing NM global symbol codes.
renatofilho@642
  4613
symcode='[[BCDEGRST]]'
renatofilho@642
  4614
renatofilho@642
  4615
# Regexp to match symbols that can be accessed directly from C.
renatofilho@642
  4616
sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
renatofilho@642
  4617
renatofilho@642
  4618
# Transform an extracted symbol line into a proper C declaration
renatofilho@642
  4619
lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
renatofilho@642
  4620
renatofilho@642
  4621
# Transform an extracted symbol line into symbol name and symbol address
renatofilho@642
  4622
lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
renatofilho@642
  4623
renatofilho@642
  4624
# Define system-specific variables.
renatofilho@642
  4625
case $host_os in
renatofilho@642
  4626
aix*)
renatofilho@642
  4627
  symcode='[[BCDT]]'
renatofilho@642
  4628
  ;;
renatofilho@642
  4629
cygwin* | mingw* | pw32*)
renatofilho@642
  4630
  symcode='[[ABCDGISTW]]'
renatofilho@642
  4631
  ;;
renatofilho@642
  4632
hpux*) # Its linker distinguishes data from code symbols
renatofilho@642
  4633
  if test "$host_cpu" = ia64; then
renatofilho@642
  4634
    symcode='[[ABCDEGRST]]'
renatofilho@642
  4635
  fi
renatofilho@642
  4636
  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
renatofilho@642
  4637
  lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
renatofilho@642
  4638
  ;;
renatofilho@642
  4639
linux* | k*bsd*-gnu)
renatofilho@642
  4640
  if test "$host_cpu" = ia64; then
renatofilho@642
  4641
    symcode='[[ABCDGIRSTW]]'
renatofilho@642
  4642
    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
renatofilho@642
  4643
    lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
renatofilho@642
  4644
  fi
renatofilho@642
  4645
  ;;
renatofilho@642
  4646
irix* | nonstopux*)
renatofilho@642
  4647
  symcode='[[BCDEGRST]]'
renatofilho@642
  4648
  ;;
renatofilho@642
  4649
osf*)
renatofilho@642
  4650
  symcode='[[BCDEGQRST]]'
renatofilho@642
  4651
  ;;
renatofilho@642
  4652
solaris*)
renatofilho@642
  4653
  symcode='[[BDRT]]'
renatofilho@642
  4654
  ;;
renatofilho@642
  4655
sco3.2v5*)
renatofilho@642
  4656
  symcode='[[DT]]'
renatofilho@642
  4657
  ;;
renatofilho@642
  4658
sysv4.2uw2*)
renatofilho@642
  4659
  symcode='[[DT]]'
renatofilho@642
  4660
  ;;
renatofilho@642
  4661
sysv5* | sco5v6* | unixware* | OpenUNIX*)
renatofilho@642
  4662
  symcode='[[ABDT]]'
renatofilho@642
  4663
  ;;
renatofilho@642
  4664
sysv4)
renatofilho@642
  4665
  symcode='[[DFNSTU]]'
renatofilho@642
  4666
  ;;
renatofilho@642
  4667
esac
renatofilho@642
  4668
renatofilho@642
  4669
# Handle CRLF in mingw tool chain
renatofilho@642
  4670
opt_cr=
renatofilho@642
  4671
case $build_os in
renatofilho@642
  4672
mingw*)
renatofilho@642
  4673
  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
renatofilho@642
  4674
  ;;
renatofilho@642
  4675
esac
renatofilho@642
  4676
renatofilho@642
  4677
# If we're using GNU nm, then use its standard symbol codes.
renatofilho@642
  4678
case `$NM -V 2>&1` in
renatofilho@642
  4679
*GNU* | *'with BFD'*)
renatofilho@642
  4680
  symcode='[[ABCDGIRSTW]]' ;;
renatofilho@642
  4681
esac
renatofilho@642
  4682
renatofilho@642
  4683
# Try without a prefix undercore, then with it.
renatofilho@642
  4684
for ac_symprfx in "" "_"; do
renatofilho@642
  4685
renatofilho@642
  4686
  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
renatofilho@642
  4687
  symxfrm="\\1 $ac_symprfx\\2 \\2"
renatofilho@642
  4688
renatofilho@642
  4689
  # Write the raw and C identifiers.
renatofilho@642
  4690
  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
renatofilho@642
  4691
renatofilho@642
  4692
  # Check to see that the pipe works correctly.
renatofilho@642
  4693
  pipe_works=no
renatofilho@642
  4694
renatofilho@642
  4695
  rm -f conftest*
renatofilho@642
  4696
  cat > conftest.$ac_ext <<EOF
renatofilho@642
  4697
#ifdef __cplusplus
renatofilho@642
  4698
extern "C" {
renatofilho@642
  4699
#endif
renatofilho@642
  4700
char nm_test_var;
renatofilho@642
  4701
void nm_test_func(){}
renatofilho@642
  4702
#ifdef __cplusplus
renatofilho@642
  4703
}
renatofilho@642
  4704
#endif
renatofilho@642
  4705
int main(){nm_test_var='a';nm_test_func();return(0);}
renatofilho@642
  4706
EOF
renatofilho@642
  4707
renatofilho@642
  4708
  if AC_TRY_EVAL(ac_compile); then
renatofilho@642
  4709
    # Now try to grab the symbols.
renatofilho@642
  4710
    nlist=conftest.nm
renatofilho@642
  4711
    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
renatofilho@642
  4712
      # Try sorting and uniquifying the output.
renatofilho@642
  4713
      if sort "$nlist" | uniq > "$nlist"T; then
renatofilho@642
  4714
	mv -f "$nlist"T "$nlist"
renatofilho@642
  4715
      else
renatofilho@642
  4716
	rm -f "$nlist"T
renatofilho@642
  4717
      fi
renatofilho@642
  4718
renatofilho@642
  4719
      # Make sure that we snagged all the symbols we need.
renatofilho@642
  4720
      if grep ' nm_test_var$' "$nlist" >/dev/null; then
renatofilho@642
  4721
	if grep ' nm_test_func$' "$nlist" >/dev/null; then
renatofilho@642
  4722
	  cat <<EOF > conftest.$ac_ext
renatofilho@642
  4723
#ifdef __cplusplus
renatofilho@642
  4724
extern "C" {
renatofilho@642
  4725
#endif
renatofilho@642
  4726
renatofilho@642
  4727
EOF
renatofilho@642
  4728
	  # Now generate the symbol file.
renatofilho@642
  4729
	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
renatofilho@642
  4730
renatofilho@642
  4731
	  cat <<EOF >> conftest.$ac_ext
renatofilho@642
  4732
#if defined (__STDC__) && __STDC__
renatofilho@642
  4733
# define lt_ptr_t void *
renatofilho@642
  4734
#else
renatofilho@642
  4735
# define lt_ptr_t char *
renatofilho@642
  4736
# define const
renatofilho@642
  4737
#endif
renatofilho@642
  4738
renatofilho@642
  4739
/* The mapping between symbol names and symbols. */
renatofilho@642
  4740
const struct {
renatofilho@642
  4741
  const char *name;
renatofilho@642
  4742
  lt_ptr_t address;
renatofilho@642
  4743
}
renatofilho@642
  4744
lt_preloaded_symbols[[]] =
renatofilho@642
  4745
{
renatofilho@642
  4746
EOF
renatofilho@642
  4747
	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
renatofilho@642
  4748
	  cat <<\EOF >> conftest.$ac_ext
renatofilho@642
  4749
  {0, (lt_ptr_t) 0}
renatofilho@642
  4750
};
renatofilho@642
  4751
renatofilho@642
  4752
#ifdef __cplusplus
renatofilho@642
  4753
}
renatofilho@642
  4754
#endif
renatofilho@642
  4755
EOF
renatofilho@642
  4756
	  # Now try linking the two files.
renatofilho@642
  4757
	  mv conftest.$ac_objext conftstm.$ac_objext
renatofilho@642
  4758
	  lt_save_LIBS="$LIBS"
renatofilho@642
  4759
	  lt_save_CFLAGS="$CFLAGS"
renatofilho@642
  4760
	  LIBS="conftstm.$ac_objext"
renatofilho@642
  4761
	  CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
renatofilho@642
  4762
	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
renatofilho@642
  4763
	    pipe_works=yes
renatofilho@642
  4764
	  fi
renatofilho@642
  4765
	  LIBS="$lt_save_LIBS"
renatofilho@642
  4766
	  CFLAGS="$lt_save_CFLAGS"
renatofilho@642
  4767
	else
renatofilho@642
  4768
	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
renatofilho@642
  4769
	fi
renatofilho@642
  4770
      else
renatofilho@642
  4771
	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
renatofilho@642
  4772
      fi
renatofilho@642
  4773
    else
renatofilho@642
  4774
      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
renatofilho@642
  4775
    fi
renatofilho@642
  4776
  else
renatofilho@642
  4777
    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
renatofilho@642
  4778
    cat conftest.$ac_ext >&5
renatofilho@642
  4779
  fi
renatofilho@642
  4780
  rm -f conftest* conftst*
renatofilho@642
  4781
renatofilho@642
  4782
  # Do not use the global_symbol_pipe unless it works.
renatofilho@642
  4783
  if test "$pipe_works" = yes; then
renatofilho@642
  4784
    break
renatofilho@642
  4785
  else
renatofilho@642
  4786
    lt_cv_sys_global_symbol_pipe=
renatofilho@642
  4787
  fi
renatofilho@642
  4788
done
renatofilho@642
  4789
])
renatofilho@642
  4790
if test -z "$lt_cv_sys_global_symbol_pipe"; then
renatofilho@642
  4791
  lt_cv_sys_global_symbol_to_cdecl=
renatofilho@642
  4792
fi
renatofilho@642
  4793
if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
renatofilho@642
  4794
  AC_MSG_RESULT(failed)
renatofilho@642
  4795
else
renatofilho@642
  4796
  AC_MSG_RESULT(ok)
renatofilho@642
  4797
fi
renatofilho@642
  4798
]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
renatofilho@642
  4799
renatofilho@642
  4800
renatofilho@642
  4801
# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
renatofilho@642
  4802
# ---------------------------------------
renatofilho@642
  4803
AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
renatofilho@642
  4804
[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
renatofilho@642
  4805
_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
renatofilho@642
  4806
_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
renatofilho@642
  4807
renatofilho@642
  4808
AC_MSG_CHECKING([for $compiler option to produce PIC])
renatofilho@642
  4809
 ifelse([$1],[CXX],[
renatofilho@642
  4810
  # C++ specific cases for pic, static, wl, etc.
renatofilho@642
  4811
  if test "$GXX" = yes; then
renatofilho@642
  4812
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
renatofilho@642
  4813
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
renatofilho@642
  4814
renatofilho@642
  4815
    case $host_os in
renatofilho@642
  4816
    aix*)
renatofilho@642
  4817
      # All AIX code is PIC.
renatofilho@642
  4818
      if test "$host_cpu" = ia64; then
renatofilho@642
  4819
	# AIX 5 now supports IA64 processor
renatofilho@642
  4820
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
renatofilho@642
  4821
      fi
renatofilho@642
  4822
      ;;
renatofilho@642
  4823
    amigaos*)
renatofilho@642
  4824
      # FIXME: we need at least 68020 code to build shared libraries, but
renatofilho@642
  4825
      # adding the `-m68020' flag to GCC prevents building anything better,
renatofilho@642
  4826
      # like `-m68040'.
renatofilho@642
  4827
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
renatofilho@642
  4828
      ;;
renatofilho@642
  4829
    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
renatofilho@642
  4830
      # PIC is the default for these OSes.
renatofilho@642
  4831
      ;;
renatofilho@642
  4832
    mingw* | os2* | pw32*)
renatofilho@642
  4833
      # This hack is so that the source file can tell whether it is being
renatofilho@642
  4834
      # built for inclusion in a dll (and should export symbols for example).
renatofilho@642
  4835
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
renatofilho@642
  4836
      ;;
renatofilho@642
  4837
    darwin* | rhapsody*)
renatofilho@642
  4838
      # PIC is the default on this platform
renatofilho@642
  4839
      # Common symbols not allowed in MH_DYLIB files
renatofilho@642
  4840
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
renatofilho@642
  4841
      ;;
renatofilho@642
  4842
    *djgpp*)
renatofilho@642
  4843
      # DJGPP does not support shared libraries at all
renatofilho@642
  4844
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
renatofilho@642
  4845
      ;;
renatofilho@642
  4846
    interix3*)
renatofilho@642
  4847
      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
renatofilho@642
  4848
      # Instead, we relocate shared libraries at runtime.
renatofilho@642
  4849
      ;;
renatofilho@642
  4850
    sysv4*MP*)
renatofilho@642
  4851
      if test -d /usr/nec; then
renatofilho@642
  4852
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
renatofilho@642
  4853
      fi
renatofilho@642
  4854
      ;;
renatofilho@642
  4855
    hpux*)
renatofilho@642
  4856
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
renatofilho@642
  4857
      # not for PA HP-UX.
renatofilho@642
  4858
      case $host_cpu in
renatofilho@642
  4859
      hppa*64*|ia64*)
renatofilho@642
  4860
	;;
renatofilho@642
  4861
      *)
renatofilho@642
  4862
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
renatofilho@642
  4863
	;;
renatofilho@642
  4864
      esac
renatofilho@642
  4865
      ;;
renatofilho@642
  4866
    *)
renatofilho@642
  4867
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
renatofilho@642
  4868
      ;;
renatofilho@642
  4869
    esac
renatofilho@642
  4870
  else
renatofilho@642
  4871
    case $host_os in
renatofilho@642
  4872
      aix4* | aix5*)
renatofilho@642
  4873
	# All AIX code is PIC.
renatofilho@642
  4874
	if test "$host_cpu" = ia64; then
renatofilho@642
  4875
	  # AIX 5 now supports IA64 processor
renatofilho@642
  4876
	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
renatofilho@642
  4877
	else
renatofilho@642
  4878
	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
renatofilho@642
  4879
	fi
renatofilho@642
  4880
	;;
renatofilho@642
  4881
      chorus*)
renatofilho@642
  4882
	case $cc_basename in
renatofilho@642
  4883
	cxch68*)
renatofilho@642
  4884
	  # Green Hills C++ Compiler
renatofilho@642
  4885
	  # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
renatofilho@642
  4886
	  ;;
renatofilho@642
  4887
	esac
renatofilho@642
  4888
	;;
renatofilho@642
  4889
       darwin*)
renatofilho@642
  4890
         # PIC is the default on this platform
renatofilho@642
  4891
         # Common symbols not allowed in MH_DYLIB files
renatofilho@642
  4892
         case $cc_basename in
renatofilho@642
  4893
           xlc*)
renatofilho@642
  4894
           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
renatofilho@642
  4895
           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
renatofilho@642
  4896
           ;;
renatofilho@642
  4897
         esac
renatofilho@642
  4898
       ;;
renatofilho@642
  4899
      dgux*)
renatofilho@642
  4900
	case $cc_basename in
renatofilho@642
  4901
	  ec++*)
renatofilho@642
  4902
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
renatofilho@642
  4903
	    ;;
renatofilho@642
  4904
	  ghcx*)
renatofilho@642
  4905
	    # Green Hills C++ Compiler
renatofilho@642
  4906
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
renatofilho@642
  4907
	    ;;
renatofilho@642
  4908
	  *)
renatofilho@642
  4909
	    ;;
renatofilho@642
  4910
	esac
renatofilho@642
  4911
	;;
renatofilho@642
  4912
      freebsd* | dragonfly*)
renatofilho@642
  4913
	# FreeBSD uses GNU C++
renatofilho@642
  4914
	;;
renatofilho@642
  4915
      hpux9* | hpux10* | hpux11*)
renatofilho@642
  4916
	case $cc_basename in
renatofilho@642
  4917
	  CC*)
renatofilho@642
  4918
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
renatofilho@642
  4919
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
renatofilho@642
  4920
	    if test "$host_cpu" != ia64; then
renatofilho@642
  4921
	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
renatofilho@642
  4922
	    fi
renatofilho@642
  4923
	    ;;
renatofilho@642
  4924
	  aCC*)
renatofilho@642
  4925
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
renatofilho@642
  4926
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
renatofilho@642
  4927
	    case $host_cpu in
renatofilho@642
  4928
	    hppa*64*|ia64*)
renatofilho@642
  4929
	      # +Z the default
renatofilho@642
  4930
	      ;;
renatofilho@642
  4931
	    *)
renatofilho@642
  4932
	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
renatofilho@642
  4933
	      ;;
renatofilho@642
  4934
	    esac
renatofilho@642
  4935
	    ;;
renatofilho@642
  4936
	  *)
renatofilho@642
  4937
	    ;;
renatofilho@642
  4938
	esac
renatofilho@642
  4939
	;;
renatofilho@642
  4940
      interix*)
renatofilho@642
  4941
	# This is c89, which is MS Visual C++ (no shared libs)
renatofilho@642
  4942
	# Anyone wants to do a port?
renatofilho@642
  4943
	;;
renatofilho@642
  4944
      irix5* | irix6* | nonstopux*)
renatofilho@642
  4945
	case $cc_basename in
renatofilho@642
  4946
	  CC*)
renatofilho@642
  4947
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
renatofilho@642
  4948
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
renatofilho@642
  4949
	    # CC pic flag -KPIC is the default.
renatofilho@642
  4950
	    ;;
renatofilho@642
  4951
	  *)
renatofilho@642
  4952
	    ;;
renatofilho@642
  4953
	esac
renatofilho@642
  4954
	;;
renatofilho@642
  4955
      linux* | k*bsd*-gnu)
renatofilho@642
  4956
	case $cc_basename in
renatofilho@642
  4957
	  KCC*)
renatofilho@642
  4958
	    # KAI C++ Compiler
renatofilho@642
  4959
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
renatofilho@642
  4960
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
renatofilho@642
  4961
	    ;;
renatofilho@642
  4962
	  icpc* | ecpc*)
renatofilho@642
  4963
	    # Intel C++
renatofilho@642
  4964
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
renatofilho@642
  4965
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
renatofilho@642
  4966
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
renatofilho@642
  4967
	    ;;
renatofilho@642
  4968
	  pgCC*)
renatofilho@642
  4969
	    # Portland Group C++ compiler.
renatofilho@642
  4970
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
renatofilho@642
  4971
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
renatofilho@642
  4972
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
renatofilho@642
  4973
	    ;;
renatofilho@642
  4974
	  cxx*)
renatofilho@642
  4975
	    # Compaq C++
renatofilho@642
  4976
	    # Make sure the PIC flag is empty.  It appears that all Alpha
renatofilho@642
  4977
	    # Linux and Compaq Tru64 Unix objects are PIC.
renatofilho@642
  4978
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
renatofilho@642
  4979
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
renatofilho@642
  4980
	    ;;
renatofilho@642
  4981
	  *)
renatofilho@642
  4982
	    ;;
renatofilho@642
  4983
	esac
renatofilho@642
  4984
	;;
renatofilho@642
  4985
      lynxos*)
renatofilho@642
  4986
	;;
renatofilho@642
  4987
      m88k*)
renatofilho@642
  4988
	;;
renatofilho@642
  4989
      mvs*)
renatofilho@642
  4990
	case $cc_basename in
renatofilho@642
  4991
	  cxx*)
renatofilho@642
  4992
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
renatofilho@642
  4993
	    ;;
renatofilho@642
  4994
	  *)
renatofilho@642
  4995
	    ;;
renatofilho@642
  4996
	esac
renatofilho@642
  4997
	;;
renatofilho@642
  4998
      netbsd* | netbsdelf*-gnu)
renatofilho@642
  4999
	;;
renatofilho@642
  5000
      osf3* | osf4* | osf5*)
renatofilho@642
  5001
	case $cc_basename in
renatofilho@642
  5002
	  KCC*)
renatofilho@642
  5003
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
renatofilho@642
  5004
	    ;;
renatofilho@642
  5005
	  RCC*)
renatofilho@642
  5006
	    # Rational C++ 2.4.1
renatofilho@642
  5007
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
renatofilho@642
  5008
	    ;;
renatofilho@642
  5009
	  cxx*)
renatofilho@642
  5010
	    # Digital/Compaq C++
renatofilho@642
  5011
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
renatofilho@642
  5012
	    # Make sure the PIC flag is empty.  It appears that all Alpha
renatofilho@642
  5013
	    # Linux and Compaq Tru64 Unix objects are PIC.
renatofilho@642
  5014
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
renatofilho@642
  5015
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
renatofilho@642
  5016
	    ;;
renatofilho@642
  5017
	  *)
renatofilho@642
  5018
	    ;;
renatofilho@642
  5019
	esac
renatofilho@642
  5020
	;;
renatofilho@642
  5021
      psos*)
renatofilho@642
  5022
	;;
renatofilho@642
  5023
      solaris*)
renatofilho@642
  5024
	case $cc_basename in
renatofilho@642
  5025
	  CC*)
renatofilho@642
  5026
	    # Sun C++ 4.2, 5.x and Centerline C++
renatofilho@642
  5027
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
renatofilho@642
  5028
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
renatofilho@642
  5029
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
renatofilho@642
  5030
	    ;;
renatofilho@642
  5031
	  gcx*)
renatofilho@642
  5032
	    # Green Hills C++ Compiler
renatofilho@642
  5033
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
renatofilho@642
  5034
	    ;;
renatofilho@642
  5035
	  *)
renatofilho@642
  5036
	    ;;
renatofilho@642
  5037
	esac
renatofilho@642
  5038
	;;
renatofilho@642
  5039
      sunos4*)
renatofilho@642
  5040
	case $cc_basename in
renatofilho@642
  5041
	  CC*)
renatofilho@642
  5042
	    # Sun C++ 4.x
renatofilho@642
  5043
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
renatofilho@642
  5044
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
renatofilho@642
  5045
	    ;;
renatofilho@642
  5046
	  lcc*)
renatofilho@642
  5047
	    # Lucid
renatofilho@642
  5048
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
renatofilho@642
  5049
	    ;;
renatofilho@642
  5050
	  *)
renatofilho@642
  5051
	    ;;
renatofilho@642
  5052
	esac
renatofilho@642
  5053
	;;
renatofilho@642
  5054
      tandem*)
renatofilho@642
  5055
	case $cc_basename in
renatofilho@642
  5056
	  NCC*)
renatofilho@642
  5057
	    # NonStop-UX NCC 3.20
renatofilho@642
  5058
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
renatofilho@642
  5059
	    ;;
renatofilho@642
  5060
	  *)
renatofilho@642
  5061
	    ;;
renatofilho@642
  5062
	esac
renatofilho@642
  5063
	;;
renatofilho@642
  5064
      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
renatofilho@642
  5065
	case $cc_basename in
renatofilho@642
  5066
	  CC*)
renatofilho@642
  5067
	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
renatofilho@642
  5068
	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
renatofilho@642
  5069
	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
renatofilho@642
  5070
	    ;;
renatofilho@642
  5071
	esac
renatofilho@642
  5072
	;;
renatofilho@642
  5073
      vxworks*)
renatofilho@642
  5074
	;;
renatofilho@642
  5075
      *)
renatofilho@642
  5076
	_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
renatofilho@642
  5077
	;;
renatofilho@642
  5078
    esac
renatofilho@642
  5079
  fi
renatofilho@642
  5080
],
renatofilho@642
  5081
[
renatofilho@642
  5082
  if test "$GCC" = yes; then
renatofilho@642
  5083
    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
renatofilho@642
  5084
    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
renatofilho@642
  5085
renatofilho@642
  5086
    case $host_os in
renatofilho@642
  5087
      aix*)
renatofilho@642
  5088
      # All AIX code is PIC.
renatofilho@642
  5089
      if test "$host_cpu" = ia64; then
renatofilho@642
  5090
	# AIX 5 now supports IA64 processor
renatofilho@642
  5091
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
renatofilho@642
  5092
      fi
renatofilho@642
  5093
      ;;
renatofilho@642
  5094
renatofilho@642
  5095
    amigaos*)
renatofilho@642
  5096
      # FIXME: we need at least 68020 code to build shared libraries, but
renatofilho@642
  5097
      # adding the `-m68020' flag to GCC prevents building anything better,
renatofilho@642
  5098
      # like `-m68040'.
renatofilho@642
  5099
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
renatofilho@642
  5100
      ;;
renatofilho@642
  5101
renatofilho@642
  5102
    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
renatofilho@642
  5103
      # PIC is the default for these OSes.
renatofilho@642
  5104
      ;;
renatofilho@642
  5105
renatofilho@642
  5106
    mingw* | pw32* | os2*)
renatofilho@642
  5107
      # This hack is so that the source file can tell whether it is being
renatofilho@642
  5108
      # built for inclusion in a dll (and should export symbols for example).
renatofilho@642
  5109
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
renatofilho@642
  5110
      ;;
renatofilho@642
  5111
renatofilho@642
  5112
    darwin* | rhapsody*)
renatofilho@642
  5113
      # PIC is the default on this platform
renatofilho@642
  5114
      # Common symbols not allowed in MH_DYLIB files
renatofilho@642
  5115
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
renatofilho@642
  5116
      ;;
renatofilho@642
  5117
renatofilho@642
  5118
    interix3*)
renatofilho@642
  5119
      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
renatofilho@642
  5120
      # Instead, we relocate shared libraries at runtime.
renatofilho@642
  5121
      ;;
renatofilho@642
  5122
renatofilho@642
  5123
    msdosdjgpp*)
renatofilho@642
  5124
      # Just because we use GCC doesn't mean we suddenly get shared libraries
renatofilho@642
  5125
      # on systems that don't support them.
renatofilho@642
  5126
      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
renatofilho@642
  5127
      enable_shared=no
renatofilho@642
  5128
      ;;
renatofilho@642
  5129
renatofilho@642
  5130
    sysv4*MP*)
renatofilho@642
  5131
      if test -d /usr/nec; then
renatofilho@642
  5132
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
renatofilho@642
  5133
      fi
renatofilho@642
  5134
      ;;
renatofilho@642
  5135
renatofilho@642
  5136
    hpux*)
renatofilho@642
  5137
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
renatofilho@642
  5138
      # not for PA HP-UX.
renatofilho@642
  5139
      case $host_cpu in
renatofilho@642
  5140
      hppa*64*|ia64*)
renatofilho@642
  5141
	# +Z the default
renatofilho@642
  5142
	;;
renatofilho@642
  5143
      *)
renatofilho@642
  5144
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
renatofilho@642
  5145
	;;
renatofilho@642
  5146
      esac
renatofilho@642
  5147
      ;;
renatofilho@642
  5148
renatofilho@642
  5149
    *)
renatofilho@642
  5150
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
renatofilho@642
  5151
      ;;
renatofilho@642
  5152
    esac
renatofilho@642
  5153
  else
renatofilho@642
  5154
    # PORTME Check for flag to pass linker flags through the system compiler.
renatofilho@642
  5155
    case $host_os in
renatofilho@642
  5156
    aix*)
renatofilho@642
  5157
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
renatofilho@642
  5158
      if test "$host_cpu" = ia64; then
renatofilho@642
  5159
	# AIX 5 now supports IA64 processor
renatofilho@642
  5160
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
renatofilho@642
  5161
      else
renatofilho@642
  5162
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
renatofilho@642
  5163
      fi
renatofilho@642
  5164
      ;;
renatofilho@642
  5165
      darwin*)
renatofilho@642
  5166
        # PIC is the default on this platform
renatofilho@642
  5167
        # Common symbols not allowed in MH_DYLIB files
renatofilho@642
  5168
       case $cc_basename in
renatofilho@642
  5169
         xlc*)
renatofilho@642
  5170
         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
renatofilho@642
  5171
         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
renatofilho@642
  5172
         ;;
renatofilho@642
  5173
       esac
renatofilho@642
  5174
       ;;
renatofilho@642
  5175
renatofilho@642
  5176
    mingw* | pw32* | os2*)
renatofilho@642
  5177
      # This hack is so that the source file can tell whether it is being
renatofilho@642
  5178
      # built for inclusion in a dll (and should export symbols for example).
renatofilho@642
  5179
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
renatofilho@642
  5180
      ;;
renatofilho@642
  5181
renatofilho@642
  5182
    hpux9* | hpux10* | hpux11*)
renatofilho@642
  5183
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
renatofilho@642
  5184
      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
renatofilho@642
  5185
      # not for PA HP-UX.
renatofilho@642
  5186
      case $host_cpu in
renatofilho@642
  5187
      hppa*64*|ia64*)
renatofilho@642
  5188
	# +Z the default
renatofilho@642
  5189
	;;
renatofilho@642
  5190
      *)
renatofilho@642
  5191
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
renatofilho@642
  5192
	;;
renatofilho@642
  5193
      esac
renatofilho@642
  5194
      # Is there a better lt_prog_compiler_static that works with the bundled CC?
renatofilho@642
  5195
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
renatofilho@642
  5196
      ;;
renatofilho@642
  5197
renatofilho@642
  5198
    irix5* | irix6* | nonstopux*)
renatofilho@642
  5199
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
renatofilho@642
  5200
      # PIC (with -KPIC) is the default.
renatofilho@642
  5201
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
renatofilho@642
  5202
      ;;
renatofilho@642
  5203
renatofilho@642
  5204
    newsos6)
renatofilho@642
  5205
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
renatofilho@642
  5206
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
renatofilho@642
  5207
      ;;
renatofilho@642
  5208
renatofilho@642
  5209
    linux* | k*bsd*-gnu)
renatofilho@642
  5210
      case $cc_basename in
renatofilho@642
  5211
      icc* | ecc*)
renatofilho@642
  5212
	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
renatofilho@642
  5213
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
renatofilho@642
  5214
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
renatofilho@642
  5215
        ;;
renatofilho@642
  5216
      pgcc* | pgf77* | pgf90* | pgf95*)
renatofilho@642
  5217
        # Portland Group compilers (*not* the Pentium gcc compiler,
renatofilho@642
  5218
	# which looks to be a dead project)
renatofilho@642
  5219
	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
renatofilho@642
  5220
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
renatofilho@642
  5221
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
renatofilho@642
  5222
        ;;
renatofilho@642
  5223
      ccc*)
renatofilho@642
  5224
        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
renatofilho@642
  5225
        # All Alpha code is PIC.
renatofilho@642
  5226
        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
renatofilho@642
  5227
        ;;
renatofilho@642
  5228
      esac
renatofilho@642
  5229
      ;;
renatofilho@642
  5230
renatofilho@642
  5231
    osf3* | osf4* | osf5*)
renatofilho@642
  5232
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
renatofilho@642
  5233
      # All OSF/1 code is PIC.
renatofilho@642
  5234
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
renatofilho@642
  5235
      ;;
renatofilho@642
  5236
renatofilho@642
  5237
    solaris*)
renatofilho@642
  5238
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
renatofilho@642
  5239
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
renatofilho@642
  5240
      case $cc_basename in
renatofilho@642
  5241
      f77* | f90* | f95*)
renatofilho@642
  5242
	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
renatofilho@642
  5243
      *)
renatofilho@642
  5244
	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
renatofilho@642
  5245
      esac
renatofilho@642
  5246
      ;;
renatofilho@642
  5247
renatofilho@642
  5248
    sunos4*)
renatofilho@642
  5249
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
renatofilho@642
  5250
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
renatofilho@642
  5251
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
renatofilho@642
  5252
      ;;
renatofilho@642
  5253
renatofilho@642
  5254
    sysv4 | sysv4.2uw2* | sysv4.3*)
renatofilho@642
  5255
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
renatofilho@642
  5256
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
renatofilho@642
  5257
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
renatofilho@642
  5258
      ;;
renatofilho@642
  5259
renatofilho@642
  5260
    sysv4*MP*)
renatofilho@642
  5261
      if test -d /usr/nec ;then
renatofilho@642
  5262
	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
renatofilho@642
  5263
	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
renatofilho@642
  5264
      fi
renatofilho@642
  5265
      ;;
renatofilho@642
  5266
renatofilho@642
  5267
    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
renatofilho@642
  5268
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
renatofilho@642
  5269
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
renatofilho@642
  5270
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
renatofilho@642
  5271
      ;;
renatofilho@642
  5272
renatofilho@642
  5273
    unicos*)
renatofilho@642
  5274
      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
renatofilho@642
  5275
      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
renatofilho@642
  5276
      ;;
renatofilho@642
  5277
renatofilho@642
  5278
    uts4*)
renatofilho@642
  5279
      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
renatofilho@642
  5280
      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
renatofilho@642
  5281
      ;;
renatofilho@642
  5282
renatofilho@642
  5283
    *)
renatofilho@642
  5284
      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
renatofilho@642
  5285
      ;;
renatofilho@642
  5286
    esac
renatofilho@642
  5287
  fi
renatofilho@642
  5288
])
renatofilho@642
  5289
AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
renatofilho@642
  5290
renatofilho@642
  5291
#
renatofilho@642
  5292
# Check to make sure the PIC flag actually works.
renatofilho@642
  5293
#
renatofilho@642
  5294
if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
renatofilho@642
  5295
  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
renatofilho@642
  5296
    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
renatofilho@642
  5297
    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
renatofilho@642
  5298
    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
renatofilho@642
  5299
     "" | " "*) ;;
renatofilho@642
  5300
     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
renatofilho@642
  5301
     esac],
renatofilho@642
  5302
    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
renatofilho@642
  5303
     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
renatofilho@642
  5304
fi
renatofilho@642
  5305
case $host_os in
renatofilho@642
  5306
  # For platforms which do not support PIC, -DPIC is meaningless:
renatofilho@642
  5307
  *djgpp*)
renatofilho@642
  5308
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
renatofilho@642
  5309
    ;;
renatofilho@642
  5310
  *)
renatofilho@642
  5311
    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
renatofilho@642
  5312
    ;;
renatofilho@642
  5313
esac
renatofilho@642
  5314
renatofilho@642
  5315
#
renatofilho@642
  5316
# Check to make sure the static flag actually works.
renatofilho@642
  5317
#
renatofilho@642
  5318
wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
renatofilho@642
  5319
AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
renatofilho@642
  5320
  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
renatofilho@642
  5321
  $lt_tmp_static_flag,
renatofilho@642
  5322
  [],
renatofilho@642
  5323
  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
renatofilho@642
  5324
])
renatofilho@642
  5325
renatofilho@642
  5326
renatofilho@642
  5327
# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
renatofilho@642
  5328
# ------------------------------------
renatofilho@642
  5329
# See if the linker supports building shared libraries.
renatofilho@642
  5330
AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
renatofilho@642
  5331
[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
renatofilho@642
  5332
ifelse([$1],[CXX],[
renatofilho@642
  5333
  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
renatofilho@642
  5334
  case $host_os in
renatofilho@642
  5335
  aix4* | aix5*)
renatofilho@642
  5336
    # If we're using GNU nm, then we don't want the "-C" option.
renatofilho@642
  5337
    # -C means demangle to AIX nm, but means don't demangle with GNU nm
renatofilho@642
  5338
    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
renatofilho@642
  5339
      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
renatofilho@642
  5340
    else
renatofilho@642
  5341
      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
renatofilho@642
  5342
    fi
renatofilho@642
  5343
    ;;
renatofilho@642
  5344
  pw32*)
renatofilho@642
  5345
    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
renatofilho@642
  5346
  ;;
renatofilho@642
  5347
  cygwin* | mingw*)
renatofilho@642
  5348
    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
renatofilho@642
  5349
  ;;
renatofilho@642
  5350
  linux* | k*bsd*-gnu)
renatofilho@642
  5351
    _LT_AC_TAGVAR(link_all_deplibs, $1)=no
renatofilho@642
  5352
  ;;
renatofilho@642
  5353
  *)
renatofilho@642
  5354
    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
renatofilho@642
  5355
  ;;
renatofilho@642
  5356
  esac
renatofilho@642
  5357
],[
renatofilho@642
  5358
  runpath_var=
renatofilho@642
  5359
  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
renatofilho@642
  5360
  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
renatofilho@642
  5361
  _LT_AC_TAGVAR(archive_cmds, $1)=
renatofilho@642
  5362
  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
renatofilho@642
  5363
  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
renatofilho@642
  5364
  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
renatofilho@642
  5365
  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
renatofilho@642
  5366
  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
renatofilho@642
  5367
  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
renatofilho@642
  5368
  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
renatofilho@642
  5369
  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
renatofilho@642
  5370
  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
renatofilho@642
  5371
  _LT_AC_TAGVAR(hardcode_direct, $1)=no
renatofilho@642
  5372
  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
renatofilho@642
  5373
  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
renatofilho@642
  5374
  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
renatofilho@642
  5375
  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
renatofilho@642
  5376
  _LT_AC_TAGVAR(module_cmds, $1)=
renatofilho@642
  5377
  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
renatofilho@642
  5378
  _LT_AC_TAGVAR(always_export_symbols, $1)=no
renatofilho@642
  5379
  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
renatofilho@642
  5380
  # include_expsyms should be a list of space-separated symbols to be *always*
renatofilho@642
  5381
  # included in the symbol list
renatofilho@642
  5382
  _LT_AC_TAGVAR(include_expsyms, $1)=
renatofilho@642
  5383
  # exclude_expsyms can be an extended regexp of symbols to exclude
renatofilho@642
  5384
  # it will be wrapped by ` (' and `)$', so one must not match beginning or
renatofilho@642
  5385
  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
renatofilho@642
  5386
  # as well as any symbol that contains `d'.
renatofilho@642
  5387
  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
renatofilho@642
  5388
  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
renatofilho@642
  5389
  # platforms (ab)use it in PIC code, but their linkers get confused if
renatofilho@642
  5390
  # the symbol is explicitly referenced.  Since portable code cannot
renatofilho@642
  5391
  # rely on this symbol name, it's probably fine to never include it in
renatofilho@642
  5392
  # preloaded symbol tables.
renatofilho@642
  5393
  extract_expsyms_cmds=
renatofilho@642
  5394
  # Just being paranoid about ensuring that cc_basename is set.
renatofilho@642
  5395
  _LT_CC_BASENAME([$compiler])
renatofilho@642
  5396
  case $host_os in
renatofilho@642
  5397
  cygwin* | mingw* | pw32*)
renatofilho@642
  5398
    # FIXME: the MSVC++ port hasn't been tested in a loooong time
renatofilho@642
  5399
    # When not using gcc, we currently assume that we are using
renatofilho@642
  5400
    # Microsoft Visual C++.
renatofilho@642
  5401
    if test "$GCC" != yes; then
renatofilho@642
  5402
      with_gnu_ld=no
renatofilho@642
  5403
    fi
renatofilho@642
  5404
    ;;
renatofilho@642
  5405
  interix*)
renatofilho@642
  5406
    # we just hope/assume this is gcc and not c89 (= MSVC++)
renatofilho@642
  5407
    with_gnu_ld=yes
renatofilho@642
  5408
    ;;
renatofilho@642
  5409
  openbsd*)
renatofilho@642
  5410
    with_gnu_ld=no
renatofilho@642
  5411
    ;;
renatofilho@642
  5412
  esac
renatofilho@642
  5413
renatofilho@642
  5414
  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
renatofilho@642
  5415
  if test "$with_gnu_ld" = yes; then
renatofilho@642
  5416
    # If archive_cmds runs LD, not CC, wlarc should be empty
renatofilho@642
  5417
    wlarc='${wl}'
renatofilho@642
  5418
renatofilho@642
  5419
    # Set some defaults for GNU ld with shared library support. These
renatofilho@642
  5420
    # are reset later if shared libraries are not supported. Putting them
renatofilho@642
  5421
    # here allows them to be overridden if necessary.
renatofilho@642
  5422
    runpath_var=LD_RUN_PATH
renatofilho@642
  5423
    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
renatofilho@642
  5424
    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
renatofilho@642
  5425
    # ancient GNU ld didn't support --whole-archive et. al.
renatofilho@642
  5426
    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
renatofilho@642
  5427
	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
renatofilho@642
  5428
      else
renatofilho@642
  5429
  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
renatofilho@642
  5430
    fi
renatofilho@642
  5431
    supports_anon_versioning=no
renatofilho@642
  5432
    case `$LD -v 2>/dev/null` in
renatofilho@642
  5433
      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
renatofilho@642
  5434
      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
renatofilho@642
  5435
      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
renatofilho@642
  5436
      *\ 2.11.*) ;; # other 2.11 versions
renatofilho@642
  5437
      *) supports_anon_versioning=yes ;;
renatofilho@642
  5438
    esac
renatofilho@642
  5439
renatofilho@642
  5440
    # See if GNU ld supports shared libraries.
renatofilho@642
  5441
    case $host_os in
renatofilho@642
  5442
    aix3* | aix4* | aix5*)
renatofilho@642
  5443
      # On AIX/PPC, the GNU linker is very broken
renatofilho@642
  5444
      if test "$host_cpu" != ia64; then
renatofilho@642
  5445
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
renatofilho@642
  5446
	cat <<EOF 1>&2
renatofilho@642
  5447
renatofilho@642
  5448
*** Warning: the GNU linker, at least up to release 2.9.1, is reported
renatofilho@642
  5449
*** to be unable to reliably create shared libraries on AIX.
renatofilho@642
  5450
*** Therefore, libtool is disabling shared libraries support.  If you
renatofilho@642
  5451
*** really care for shared libraries, you may want to modify your PATH
renatofilho@642
  5452
*** so that a non-GNU linker is found, and then restart.
renatofilho@642
  5453
renatofilho@642
  5454
EOF
renatofilho@642
  5455
      fi
renatofilho@642
  5456
      ;;
renatofilho@642
  5457
renatofilho@642
  5458
    amigaos*)
renatofilho@642
  5459
      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
renatofilho@642
  5460
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
renatofilho@642
  5461
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
renatofilho@642
  5462
renatofilho@642
  5463
      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
renatofilho@642
  5464
      # that the semantics of dynamic libraries on AmigaOS, at least up
renatofilho@642
  5465
      # to version 4, is to share data among multiple programs linked
renatofilho@642
  5466
      # with the same dynamic library.  Since this doesn't match the
renatofilho@642
  5467
      # behavior of shared libraries on other platforms, we can't use
renatofilho@642
  5468
      # them.
renatofilho@642
  5469
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
renatofilho@642
  5470
      ;;
renatofilho@642
  5471
renatofilho@642
  5472
    beos*)
renatofilho@642
  5473
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
renatofilho@642
  5474
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
renatofilho@642
  5475
	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
renatofilho@642
  5476
	# support --undefined.  This deserves some investigation.  FIXME
renatofilho@642
  5477
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
renatofilho@642
  5478
      else
renatofilho@642
  5479
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
renatofilho@642
  5480
      fi
renatofilho@642
  5481
      ;;
renatofilho@642
  5482
renatofilho@642
  5483
    cygwin* | mingw* | pw32*)
renatofilho@642
  5484
      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
renatofilho@642
  5485
      # as there is no search path for DLLs.
renatofilho@642
  5486
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
renatofilho@642
  5487
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
renatofilho@642
  5488
      _LT_AC_TAGVAR(always_export_symbols, $1)=no
renatofilho@642
  5489
      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
renatofilho@642
  5490
      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
renatofilho@642
  5491
renatofilho@642
  5492
      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
renatofilho@642
  5493
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
renatofilho@642
  5494
	# If the export-symbols file already is a .def file (1st line
renatofilho@642
  5495
	# is EXPORTS), use it as is; otherwise, prepend...
renatofilho@642
  5496
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
renatofilho@642
  5497
	  cp $export_symbols $output_objdir/$soname.def;
renatofilho@642
  5498
	else
renatofilho@642
  5499
	  echo EXPORTS > $output_objdir/$soname.def;
renatofilho@642
  5500
	  cat $export_symbols >> $output_objdir/$soname.def;
renatofilho@642
  5501
	fi~
renatofilho@642
  5502
	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
renatofilho@642
  5503
      else
renatofilho@642
  5504
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
renatofilho@642
  5505
      fi
renatofilho@642
  5506
      ;;
renatofilho@642
  5507
renatofilho@642
  5508
    interix3*)
renatofilho@642
  5509
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
renatofilho@642
  5510
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
renatofilho@642
  5511
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
renatofilho@642
  5512
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
renatofilho@642
  5513
      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
renatofilho@642
  5514
      # Instead, shared libraries are loaded at an image base (0x10000000 by
renatofilho@642
  5515
      # default) and relocated if they conflict, which is a slow very memory
renatofilho@642
  5516
      # consuming and fragmenting process.  To avoid this, we pick a random,
renatofilho@642
  5517
      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
renatofilho@642
  5518
      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
renatofilho@642
  5519
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
renatofilho@642
  5520
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
renatofilho@642
  5521
      ;;
renatofilho@642
  5522
renatofilho@642
  5523
    linux* | k*bsd*-gnu)
renatofilho@642
  5524
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
renatofilho@642
  5525
	tmp_addflag=
renatofilho@642
  5526
	case $cc_basename,$host_cpu in
renatofilho@642
  5527
	pgcc*)				# Portland Group C compiler
renatofilho@642
  5528
	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
renatofilho@642
  5529
	  tmp_addflag=' $pic_flag'
renatofilho@642
  5530
	  ;;
renatofilho@642
  5531
	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
renatofilho@642
  5532
	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
renatofilho@642
  5533
	  tmp_addflag=' $pic_flag -Mnomain' ;;
renatofilho@642
  5534
	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
renatofilho@642
  5535
	  tmp_addflag=' -i_dynamic' ;;
renatofilho@642
  5536
	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
renatofilho@642
  5537
	  tmp_addflag=' -i_dynamic -nofor_main' ;;
renatofilho@642
  5538
	ifc* | ifort*)			# Intel Fortran compiler
renatofilho@642
  5539
	  tmp_addflag=' -nofor_main' ;;
renatofilho@642
  5540
	esac
renatofilho@642
  5541
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
renatofilho@642
  5542
renatofilho@642
  5543
	if test $supports_anon_versioning = yes; then
renatofilho@642
  5544
	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
renatofilho@642
  5545
  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
renatofilho@642
  5546
  $echo "local: *; };" >> $output_objdir/$libname.ver~
renatofilho@642
  5547
	  $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
renatofilho@642
  5548
	fi
renatofilho@642
  5549
	_LT_AC_TAGVAR(link_all_deplibs, $1)=no
renatofilho@642
  5550
      else
renatofilho@642
  5551
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
renatofilho@642
  5552
      fi
renatofilho@642
  5553
      ;;
renatofilho@642
  5554
renatofilho@642
  5555
    netbsd* | netbsdelf*-gnu)
renatofilho@642
  5556
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
renatofilho@642
  5557
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
renatofilho@642
  5558
	wlarc=
renatofilho@642
  5559
      else
renatofilho@642
  5560
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
renatofilho@642
  5561
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
renatofilho@642
  5562
      fi
renatofilho@642
  5563
      ;;
renatofilho@642
  5564
renatofilho@642
  5565
    solaris*)
renatofilho@642
  5566
      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
renatofilho@642
  5567
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
renatofilho@642
  5568
	cat <<EOF 1>&2
renatofilho@642
  5569
renatofilho@642
  5570
*** Warning: The releases 2.8.* of the GNU linker cannot reliably
renatofilho@642
  5571
*** create shared libraries on Solaris systems.  Therefore, libtool
renatofilho@642
  5572
*** is disabling shared libraries support.  We urge you to upgrade GNU
renatofilho@642
  5573
*** binutils to release 2.9.1 or newer.  Another option is to modify
renatofilho@642
  5574
*** your PATH or compiler configuration so that the native linker is
renatofilho@642
  5575
*** used, and then restart.
renatofilho@642
  5576
renatofilho@642
  5577
EOF
renatofilho@642
  5578
      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
renatofilho@642
  5579
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
renatofilho@642
  5580
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
renatofilho@642
  5581
      else
renatofilho@642
  5582
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
renatofilho@642
  5583
      fi
renatofilho@642
  5584
      ;;
renatofilho@642
  5585
renatofilho@642
  5586
    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
renatofilho@642
  5587
      case `$LD -v 2>&1` in
renatofilho@642
  5588
        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 
renatofilho@642
  5589
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
renatofilho@642
  5590
	cat <<_LT_EOF 1>&2
renatofilho@642
  5591
renatofilho@642
  5592
*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
renatofilho@642
  5593
*** reliably create shared libraries on SCO systems.  Therefore, libtool
renatofilho@642
  5594
*** is disabling shared libraries support.  We urge you to upgrade GNU
renatofilho@642
  5595
*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
renatofilho@642
  5596
*** your PATH or compiler configuration so that the native linker is
renatofilho@642
  5597
*** used, and then restart.
renatofilho@642
  5598
renatofilho@642
  5599
_LT_EOF
renatofilho@642
  5600
	;;
renatofilho@642
  5601
	*)
renatofilho@642
  5602
	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
renatofilho@642
  5603
	    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
renatofilho@642
  5604
	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
renatofilho@642
  5605
	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
renatofilho@642
  5606
	  else
renatofilho@642
  5607
	    _LT_AC_TAGVAR(ld_shlibs, $1)=no
renatofilho@642
  5608
	  fi
renatofilho@642
  5609
	;;
renatofilho@642
  5610
      esac
renatofilho@642
  5611
      ;;
renatofilho@642
  5612
renatofilho@642
  5613
    sunos4*)
renatofilho@642
  5614
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
renatofilho@642
  5615
      wlarc=
renatofilho@642
  5616
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
renatofilho@642
  5617
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
renatofilho@642
  5618
      ;;
renatofilho@642
  5619
renatofilho@642
  5620
    *)
renatofilho@642
  5621
      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
renatofilho@642
  5622
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
renatofilho@642
  5623
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
renatofilho@642
  5624
      else
renatofilho@642
  5625
	_LT_AC_TAGVAR(ld_shlibs, $1)=no
renatofilho@642
  5626
      fi
renatofilho@642
  5627
      ;;
renatofilho@642
  5628
    esac
renatofilho@642
  5629
renatofilho@642
  5630
    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
renatofilho@642
  5631
      runpath_var=
renatofilho@642
  5632
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
renatofilho@642
  5633
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
renatofilho@642
  5634
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
renatofilho@642
  5635
    fi
renatofilho@642
  5636
  else
renatofilho@642
  5637
    # PORTME fill in a description of your system's linker (not GNU ld)
renatofilho@642
  5638
    case $host_os in
renatofilho@642
  5639
    aix3*)
renatofilho@642
  5640
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
renatofilho@642
  5641
      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
renatofilho@642
  5642
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
renatofilho@642
  5643
      # Note: this linker hardcodes the directories in LIBPATH if there
renatofilho@642
  5644
      # are no directories specified by -L.
renatofilho@642
  5645
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
renatofilho@642
  5646
      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
renatofilho@642
  5647
	# Neither direct hardcoding nor static linking is supported with a
renatofilho@642
  5648
	# broken collect2.
renatofilho@642
  5649
	_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
renatofilho@642
  5650
      fi
renatofilho@642
  5651
      ;;
renatofilho@642
  5652
renatofilho@642
  5653
    aix4* | aix5*)
renatofilho@642
  5654
      if test "$host_cpu" = ia64; then
renatofilho@642
  5655
	# On IA64, the linker does run time linking by default, so we don't
renatofilho@642
  5656
	# have to do anything special.
renatofilho@642
  5657
	aix_use_runtimelinking=no
renatofilho@642
  5658
	exp_sym_flag='-Bexport'
renatofilho@642
  5659
	no_entry_flag=""
renatofilho@642
  5660
      else
renatofilho@642
  5661
	# If we're using GNU nm, then we don't want the "-C" option.
renatofilho@642
  5662
	# -C means demangle to AIX nm, but means don't demangle with GNU nm
renatofilho@642
  5663
	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
renatofilho@642
  5664
	  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
renatofilho@642
  5665
	else
renatofilho@642
  5666
	  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
renatofilho@642
  5667
	fi
renatofilho@642
  5668
	aix_use_runtimelinking=no
renatofilho@642
  5669
renatofilho@642
  5670
	# Test if we are trying to use run time linking or normal
renatofilho@642
  5671
	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
renatofilho@642
  5672
	# need to do runtime linking.
renatofilho@642
  5673
	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
renatofilho@642
  5674
	  for ld_flag in $LDFLAGS; do
renatofilho@642
  5675
  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
renatofilho@642
  5676
  	    aix_use_runtimelinking=yes
renatofilho@642
  5677
  	    break
renatofilho@642
  5678
  	  fi
renatofilho@642
  5679
	  done
renatofilho@642
  5680
	  ;;
renatofilho@642
  5681
	esac
renatofilho@642
  5682
renatofilho@642
  5683
	exp_sym_flag='-bexport'
renatofilho@642
  5684
	no_entry_flag='-bnoentry'
renatofilho@642
  5685
      fi
renatofilho@642
  5686
renatofilho@642
  5687
      # When large executables or shared objects are built, AIX ld can
renatofilho@642
  5688
      # have problems creating the table of contents.  If linking a library
renatofilho@642
  5689
      # or program results in "error TOC overflow" add -mminimal-toc to
renatofilho@642
  5690
      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
renatofilho@642
  5691
      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
renatofilho@642
  5692
renatofilho@642
  5693
      _LT_AC_TAGVAR(archive_cmds, $1)=''
renatofilho@642
  5694
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
renatofilho@642
  5695
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
renatofilho@642
  5696
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
renatofilho@642
  5697
renatofilho@642
  5698
      if test "$GCC" = yes; then
renatofilho@642
  5699
	case $host_os in aix4.[[012]]|aix4.[[012]].*)
renatofilho@642
  5700
	# We only want to do this on AIX 4.2 and lower, the check
renatofilho@642
  5701
	# below for broken collect2 doesn't work under 4.3+
renatofilho@642
  5702
	  collect2name=`${CC} -print-prog-name=collect2`
renatofilho@642
  5703
	  if test -f "$collect2name" && \
renatofilho@642
  5704
  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
renatofilho@642
  5705
	  then
renatofilho@642
  5706
  	  # We have reworked collect2
renatofilho@642
  5707
  	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
renatofilho@642
  5708
	  else
renatofilho@642
  5709
  	  # We have old collect2
renatofilho@642
  5710
  	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
renatofilho@642
  5711
  	  # It fails to find uninstalled libraries when the uninstalled
renatofilho@642
  5712
  	  # path is not listed in the libpath.  Setting hardcode_minus_L
renatofilho@642
  5713
  	  # to unsupported forces relinking
renatofilho@642
  5714
  	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
renatofilho@642
  5715
  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
renatofilho@642
  5716
  	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
renatofilho@642
  5717
	  fi
renatofilho@642
  5718
	  ;;
renatofilho@642
  5719
	esac
renatofilho@642
  5720
	shared_flag='-shared'
renatofilho@642
  5721
	if test "$aix_use_runtimelinking" = yes; then
renatofilho@642
  5722
	  shared_flag="$shared_flag "'${wl}-G'
renatofilho@642
  5723
	fi
renatofilho@642
  5724
      else
renatofilho@642
  5725
	# not using gcc
renatofilho@642
  5726
	if test "$host_cpu" = ia64; then
renatofilho@642
  5727
  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
renatofilho@642
  5728
  	# chokes on -Wl,-G. The following line is correct:
renatofilho@642
  5729
	  shared_flag='-G'
renatofilho@642
  5730
	else
renatofilho@642
  5731
	  if test "$aix_use_runtimelinking" = yes; then
renatofilho@642
  5732
	    shared_flag='${wl}-G'
renatofilho@642
  5733
	  else
renatofilho@642
  5734
	    shared_flag='${wl}-bM:SRE'
renatofilho@642
  5735
	  fi
renatofilho@642
  5736
	fi
renatofilho@642
  5737
      fi
renatofilho@642
  5738
renatofilho@642
  5739
      # It seems that -bexpall does not export symbols beginning with
renatofilho@642
  5740
      # underscore (_), so it is better to generate a list of symbols to export.
renatofilho@642
  5741
      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
renatofilho@642
  5742
      if test "$aix_use_runtimelinking" = yes; then
renatofilho@642
  5743
	# Warning - without using the other runtime loading flags (-brtl),
renatofilho@642
  5744
	# -berok will link without error, but may produce a broken library.
renatofilho@642
  5745
	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
renatofilho@642
  5746
       # Determine the default libpath from the value encoded in an empty executable.
renatofilho@642
  5747
       _LT_AC_SYS_LIBPATH_AIX
renatofilho@642
  5748
       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
renatofilho@642
  5749
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
renatofilho@642
  5750
       else
renatofilho@642
  5751
	if test "$host_cpu" = ia64; then
renatofilho@642
  5752
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
renatofilho@642
  5753
	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
renatofilho@642
  5754
	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
renatofilho@642
  5755
	else
renatofilho@642
  5756
	 # Determine the default libpath from the value encoded in an empty executable.
renatofilho@642
  5757
	 _LT_AC_SYS_LIBPATH_AIX
renatofilho@642
  5758
	 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
renatofilho@642
  5759
	  # Warning - without using the other run time loading flags,
renatofilho@642
  5760
	  # -berok will link without error, but may produce a broken library.
renatofilho@642
  5761
	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
renatofilho@642
  5762
	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
renatofilho@642
  5763
	  # Exported symbols can be pulled into shared objects from archives
renatofilho@642
  5764
	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
renatofilho@642
  5765
	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
renatofilho@642
  5766
	  # This is similar to how AIX traditionally builds its shared libraries.
renatofilho@642
  5767
	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
renatofilho@642
  5768
	fi
renatofilho@642
  5769
      fi
renatofilho@642
  5770
      ;;
renatofilho@642
  5771
renatofilho@642
  5772
    amigaos*)
renatofilho@642
  5773
      _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
renatofilho@642
  5774
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
renatofilho@642
  5775
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
renatofilho@642
  5776
      # see comment about different semantics on the GNU ld section
renatofilho@642
  5777
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
renatofilho@642
  5778
      ;;
renatofilho@642
  5779
renatofilho@642
  5780
    bsdi[[45]]*)
renatofilho@642
  5781
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
renatofilho@642
  5782
      ;;
renatofilho@642
  5783
renatofilho@642
  5784
    cygwin* | mingw* | pw32*)
renatofilho@642
  5785
      # When not using gcc, we currently assume that we are using
renatofilho@642
  5786
      # Microsoft Visual C++.
renatofilho@642
  5787
      # hardcode_libdir_flag_spec is actually meaningless, as there is
renatofilho@642
  5788
      # no search path for DLLs.
renatofilho@642
  5789
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
renatofilho@642
  5790
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
renatofilho@642
  5791
      # Tell ltmain to make .lib files, not .a files.
renatofilho@642
  5792
      libext=lib
renatofilho@642
  5793
      # Tell ltmain to make .dll files, not .so files.
renatofilho@642
  5794
      shrext_cmds=".dll"
renatofilho@642
  5795
      # FIXME: Setting linknames here is a bad hack.
renatofilho@642
  5796
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
renatofilho@642
  5797
      # The linker will automatically build a .lib file if we build a DLL.
renatofilho@642
  5798
      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
renatofilho@642
  5799
      # FIXME: Should let the user specify the lib program.
renatofilho@642
  5800
      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
renatofilho@642
  5801
      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
renatofilho@642
  5802
      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
renatofilho@642
  5803
      ;;
renatofilho@642
  5804
renatofilho@642
  5805
    darwin* | rhapsody*)
renatofilho@642
  5806
      case $host_os in
renatofilho@642
  5807
        rhapsody* | darwin1.[[012]])
renatofilho@642
  5808
         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
renatofilho@642
  5809
         ;;
renatofilho@642
  5810
       *) # Darwin 1.3 on
renatofilho@642
  5811
         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
renatofilho@642
  5812
           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
renatofilho@642
  5813
         else
renatofilho@642
  5814
           case ${MACOSX_DEPLOYMENT_TARGET} in
renatofilho@642
  5815
             10.[[012]])
renatofilho@642
  5816
               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
renatofilho@642
  5817
               ;;
renatofilho@642
  5818
             10.*)
renatofilho@642
  5819
               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
renatofilho@642
  5820
               ;;
renatofilho@642
  5821
           esac
renatofilho@642
  5822
         fi
renatofilho@642
  5823
         ;;
renatofilho@642
  5824
      esac
renatofilho@642
  5825
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
renatofilho@642
  5826
      _LT_AC_TAGVAR(hardcode_direct, $1)=no
renatofilho@642
  5827
      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
renatofilho@642
  5828
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
renatofilho@642
  5829
      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
renatofilho@642
  5830
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
renatofilho@642
  5831
    if test "$GCC" = yes ; then
renatofilho@642
  5832
    	output_verbose_link_cmd='echo'
renatofilho@642
  5833
        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
renatofilho@642
  5834
      _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
renatofilho@642
  5835
      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
renatofilho@642
  5836
      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
renatofilho@642
  5837
      _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
renatofilho@642
  5838
    else
renatofilho@642
  5839
      case $cc_basename in
renatofilho@642
  5840
        xlc*)
renatofilho@642
  5841
         output_verbose_link_cmd='echo'
renatofilho@642
  5842
         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
renatofilho@642
  5843
         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
renatofilho@642
  5844
          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
renatofilho@642
  5845
         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
renatofilho@642
  5846
          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
renatofilho@642
  5847
          ;;
renatofilho@642
  5848
       *)
renatofilho@642
  5849
         _LT_AC_TAGVAR(ld_shlibs, $1)=no
renatofilho@642
  5850
          ;;
renatofilho@642
  5851
      esac
renatofilho@642
  5852
    fi
renatofilho@642
  5853
      ;;
renatofilho@642
  5854
renatofilho@642
  5855
    dgux*)
renatofilho@642
  5856
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
renatofilho@642
  5857
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
renatofilho@642
  5858
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
renatofilho@642
  5859
      ;;
renatofilho@642
  5860
renatofilho@642
  5861
    freebsd1*)
renatofilho@642
  5862
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
renatofilho@642
  5863
      ;;
renatofilho@642
  5864
renatofilho@642
  5865
    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
renatofilho@642
  5866
    # support.  Future versions do this automatically, but an explicit c++rt0.o
renatofilho@642
  5867
    # does not break anything, and helps significantly (at the cost of a little
renatofilho@642
  5868
    # extra space).
renatofilho@642
  5869
    freebsd2.2*)
renatofilho@642
  5870
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
renatofilho@642
  5871
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
renatofilho@642
  5872
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
renatofilho@642
  5873
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
renatofilho@642
  5874
      ;;
renatofilho@642
  5875
renatofilho@642
  5876
    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
renatofilho@642
  5877
    freebsd2*)
renatofilho@642
  5878
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
renatofilho@642
  5879
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
renatofilho@642
  5880
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
renatofilho@642
  5881
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
renatofilho@642
  5882
      ;;
renatofilho@642
  5883
renatofilho@642
  5884
    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
renatofilho@642
  5885
    freebsd* | dragonfly*)
renatofilho@642
  5886
      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
renatofilho@642
  5887
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
renatofilho@642
  5888
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
renatofilho@642
  5889
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
renatofilho@642
  5890
      ;;
renatofilho@642
  5891
renatofilho@642
  5892
    hpux9*)
renatofilho@642
  5893
      if test "$GCC" = yes; then
renatofilho@642
  5894
	_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
renatofilho@642
  5895
      else
renatofilho@642
  5896
	_LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
renatofilho@642
  5897
      fi
renatofilho@642
  5898
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
renatofilho@642
  5899
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
renatofilho@642
  5900
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
renatofilho@642
  5901
renatofilho@642
  5902
      # hardcode_minus_L: Not really in the search PATH,
renatofilho@642
  5903
      # but as the default location of the library.
renatofilho@642
  5904
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
renatofilho@642
  5905
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
renatofilho@642
  5906
      ;;
renatofilho@642
  5907
renatofilho@642
  5908
    hpux10*)
renatofilho@642
  5909
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
renatofilho@642
  5910
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
renatofilho@642
  5911
      else
renatofilho@642
  5912
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
renatofilho@642
  5913
      fi
renatofilho@642
  5914
      if test "$with_gnu_ld" = no; then
renatofilho@642
  5915
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
renatofilho@642
  5916
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
renatofilho@642
  5917
renatofilho@642
  5918
	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
renatofilho@642
  5919
	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
renatofilho@642
  5920
renatofilho@642
  5921
	# hardcode_minus_L: Not really in the search PATH,
renatofilho@642
  5922
	# but as the default location of the library.
renatofilho@642
  5923
	_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
renatofilho@642
  5924
      fi
renatofilho@642
  5925
      ;;
renatofilho@642
  5926
renatofilho@642
  5927
    hpux11*)
renatofilho@642
  5928
      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
renatofilho@642
  5929
	case $host_cpu in
renatofilho@642
  5930
	hppa*64*)
renatofilho@642
  5931
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
renatofilho@642
  5932
	  ;;
renatofilho@642
  5933
	ia64*)
renatofilho@642
  5934
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
renatofilho@642
  5935
	  ;;
renatofilho@642
  5936
	*)
renatofilho@642
  5937
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
renatofilho@642
  5938
	  ;;
renatofilho@642
  5939
	esac
renatofilho@642
  5940
      else
renatofilho@642
  5941
	case $host_cpu in
renatofilho@642
  5942
	hppa*64*)
renatofilho@642
  5943
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
renatofilho@642
  5944
	  ;;
renatofilho@642
  5945
	ia64*)
renatofilho@642
  5946
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
renatofilho@642
  5947
	  ;;
renatofilho@642
  5948
	*)
renatofilho@642
  5949
	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
renatofilho@642
  5950
	  ;;
renatofilho@642
  5951
	esac
renatofilho@642
  5952
      fi
renatofilho@642
  5953
      if test "$with_gnu_ld" = no; then
renatofilho@642
  5954
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
renatofilho@642
  5955
	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
renatofilho@642
  5956
renatofilho@642
  5957
	case $host_cpu in
renatofilho@642
  5958
	hppa*64*|ia64*)
renatofilho@642
  5959
	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
renatofilho@642
  5960
	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
renatofilho@642
  5961
	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
renatofilho@642
  5962
	  ;;
renatofilho@642
  5963
	*)
renatofilho@642
  5964
	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
renatofilho@642
  5965
	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
renatofilho@642
  5966
renatofilho@642
  5967
	  # hardcode_minus_L: Not really in the search PATH,
renatofilho@642
  5968
	  # but as the default location of the library.
renatofilho@642
  5969
	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
renatofilho@642
  5970
	  ;;
renatofilho@642
  5971
	esac
renatofilho@642
  5972
      fi
renatofilho@642
  5973
      ;;
renatofilho@642
  5974
renatofilho@642
  5975
    irix5* | irix6* | nonstopux*)
renatofilho@642
  5976
      if test "$GCC" = yes; then
renatofilho@642
  5977
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
renatofilho@642
  5978
      else
renatofilho@642
  5979
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
renatofilho@642
  5980
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
renatofilho@642
  5981
      fi
renatofilho@642
  5982
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
renatofilho@642
  5983
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
renatofilho@642
  5984
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
renatofilho@642
  5985
      ;;
renatofilho@642
  5986
renatofilho@642
  5987
    netbsd* | netbsdelf*-gnu)
renatofilho@642
  5988
      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
renatofilho@642
  5989
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
renatofilho@642
  5990
      else
renatofilho@642
  5991
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
renatofilho@642
  5992
      fi
renatofilho@642
  5993
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
renatofilho@642
  5994
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
renatofilho@642
  5995
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
renatofilho@642
  5996
      ;;
renatofilho@642
  5997
renatofilho@642
  5998
    newsos6)
renatofilho@642
  5999
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
renatofilho@642
  6000
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
renatofilho@642
  6001
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
renatofilho@642
  6002
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
renatofilho@642
  6003
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
renatofilho@642
  6004
      ;;
renatofilho@642
  6005
renatofilho@642
  6006
    openbsd*)
renatofilho@642
  6007
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
renatofilho@642
  6008
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
renatofilho@642
  6009
      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
renatofilho@642
  6010
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
renatofilho@642
  6011
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
renatofilho@642
  6012
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
renatofilho@642
  6013
	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
renatofilho@642
  6014
      else
renatofilho@642
  6015
       case $host_os in
renatofilho@642
  6016
	 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
renatofilho@642
  6017
	   _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
renatofilho@642
  6018
	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
renatofilho@642
  6019
	   ;;
renatofilho@642
  6020
	 *)
renatofilho@642
  6021
	   _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
renatofilho@642
  6022
	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
renatofilho@642
  6023
	   ;;
renatofilho@642
  6024
       esac
renatofilho@642
  6025
      fi
renatofilho@642
  6026
      ;;
renatofilho@642
  6027
renatofilho@642
  6028
    os2*)
renatofilho@642
  6029
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
renatofilho@642
  6030
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
renatofilho@642
  6031
      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
renatofilho@642
  6032
      _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
renatofilho@642
  6033
      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
renatofilho@642
  6034
      ;;
renatofilho@642
  6035
renatofilho@642
  6036
    osf3*)
renatofilho@642
  6037
      if test "$GCC" = yes; then
renatofilho@642
  6038
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
renatofilho@642
  6039
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
renatofilho@642
  6040
      else
renatofilho@642
  6041
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
renatofilho@642
  6042
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
renatofilho@642
  6043
      fi
renatofilho@642
  6044
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
renatofilho@642
  6045
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
renatofilho@642
  6046
      ;;
renatofilho@642
  6047
renatofilho@642
  6048
    osf4* | osf5*)	# as osf3* with the addition of -msym flag
renatofilho@642
  6049
      if test "$GCC" = yes; then
renatofilho@642
  6050
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
renatofilho@642
  6051
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
renatofilho@642
  6052
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
renatofilho@642
  6053
      else
renatofilho@642
  6054
	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
renatofilho@642
  6055
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
renatofilho@642
  6056
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
renatofilho@642
  6057
	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
renatofilho@642
  6058
renatofilho@642
  6059
	# Both c and cxx compiler support -rpath directly
renatofilho@642
  6060
	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
renatofilho@642
  6061
      fi
renatofilho@642
  6062
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
renatofilho@642
  6063
      ;;
renatofilho@642
  6064
renatofilho@642
  6065
    solaris*)
renatofilho@642
  6066
      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
renatofilho@642
  6067
      if test "$GCC" = yes; then
renatofilho@642
  6068
	wlarc='${wl}'
renatofilho@642
  6069
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
renatofilho@642
  6070
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
renatofilho@642
  6071
	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
renatofilho@642
  6072
      else
renatofilho@642
  6073
	wlarc=''
renatofilho@642
  6074
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
renatofilho@642
  6075
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
renatofilho@642
  6076
  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
renatofilho@642
  6077
      fi
renatofilho@642
  6078
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
renatofilho@642
  6079
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
renatofilho@642
  6080
      case $host_os in
renatofilho@642
  6081
      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
renatofilho@642
  6082
      *)
renatofilho@642
  6083
 	# The compiler driver will combine linker options so we
renatofilho@642
  6084
 	# cannot just pass the convience library names through
renatofilho@642
  6085
 	# without $wl, iff we do not link with $LD.
renatofilho@642
  6086
 	# Luckily, gcc supports the same syntax we need for Sun Studio.
renatofilho@642
  6087
 	# Supported since Solaris 2.6 (maybe 2.5.1?)
renatofilho@642
  6088
 	case $wlarc in
renatofilho@642
  6089
 	'')
renatofilho@642
  6090
 	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
renatofilho@642
  6091
 	*)
renatofilho@642
  6092
 	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
renatofilho@642
  6093
 	esac ;;
renatofilho@642
  6094
      esac
renatofilho@642
  6095
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
renatofilho@642
  6096
      ;;
renatofilho@642
  6097
renatofilho@642
  6098
    sunos4*)
renatofilho@642
  6099
      if test "x$host_vendor" = xsequent; then
renatofilho@642
  6100
	# Use $CC to link under sequent, because it throws in some extra .o
renatofilho@642
  6101
	# files that make .init and .fini sections work.
renatofilho@642
  6102
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
renatofilho@642
  6103
      else
renatofilho@642
  6104
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
renatofilho@642
  6105
      fi
renatofilho@642
  6106
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
renatofilho@642
  6107
      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
renatofilho@642
  6108
      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
renatofilho@642
  6109
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
renatofilho@642
  6110
      ;;
renatofilho@642
  6111
renatofilho@642
  6112
    sysv4)
renatofilho@642
  6113
      case $host_vendor in
renatofilho@642
  6114
	sni)
renatofilho@642
  6115
	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
renatofilho@642
  6116
	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
renatofilho@642
  6117
	;;
renatofilho@642
  6118
	siemens)
renatofilho@642
  6119
	  ## LD is ld it makes a PLAMLIB
renatofilho@642
  6120
	  ## CC just makes a GrossModule.
renatofilho@642
  6121
	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
renatofilho@642
  6122
	  _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
renatofilho@642
  6123
	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
renatofilho@642
  6124
        ;;
renatofilho@642
  6125
	motorola)
renatofilho@642
  6126
	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
renatofilho@642
  6127
	  _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
renatofilho@642
  6128
	;;
renatofilho@642
  6129
      esac
renatofilho@642
  6130
      runpath_var='LD_RUN_PATH'
renatofilho@642
  6131
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
renatofilho@642
  6132
      ;;
renatofilho@642
  6133
renatofilho@642
  6134
    sysv4.3*)
renatofilho@642
  6135
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
renatofilho@642
  6136
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
renatofilho@642
  6137
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
renatofilho@642
  6138
      ;;
renatofilho@642
  6139
renatofilho@642
  6140
    sysv4*MP*)
renatofilho@642
  6141
      if test -d /usr/nec; then
renatofilho@642
  6142
	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
renatofilho@642
  6143
	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
renatofilho@642
  6144
	runpath_var=LD_RUN_PATH
renatofilho@642
  6145
	hardcode_runpath_var=yes
renatofilho@642
  6146
	_LT_AC_TAGVAR(ld_shlibs, $1)=yes
renatofilho@642
  6147
      fi
renatofilho@642
  6148
      ;;
renatofilho@642
  6149
renatofilho@642
  6150
    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*)
renatofilho@642
  6151
      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
renatofilho@642
  6152
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
renatofilho@642
  6153
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
renatofilho@642
  6154
      runpath_var='LD_RUN_PATH'
renatofilho@642
  6155
renatofilho@642
  6156
      if test "$GCC" = yes; then
renatofilho@642
  6157
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
renatofilho@642
  6158
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
renatofilho@642
  6159
      else
renatofilho@642
  6160
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
renatofilho@642
  6161
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
renatofilho@642
  6162
      fi
renatofilho@642
  6163
      ;;
renatofilho@642
  6164
renatofilho@642
  6165
    sysv5* | sco3.2v5* | sco5v6*)
renatofilho@642
  6166
      # Note: We can NOT use -z defs as we might desire, because we do not
renatofilho@642
  6167
      # link with -lc, and that would cause any symbols used from libc to
renatofilho@642
  6168
      # always be unresolved, which means just about no library would
renatofilho@642
  6169
      # ever link correctly.  If we're not using GNU ld we use -z text
renatofilho@642
  6170
      # though, which does catch some bad symbols but isn't as heavy-handed
renatofilho@642
  6171
      # as -z defs.
renatofilho@642
  6172
      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
renatofilho@642
  6173
      _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
renatofilho@642
  6174
      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
renatofilho@642
  6175
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
renatofilho@642
  6176
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
renatofilho@642
  6177
      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
renatofilho@642
  6178
      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
renatofilho@642
  6179
      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
renatofilho@642
  6180
      runpath_var='LD_RUN_PATH'
renatofilho@642
  6181
renatofilho@642
  6182
      if test "$GCC" = yes; then
renatofilho@642
  6183
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
renatofilho@642
  6184
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
renatofilho@642
  6185
      else
renatofilho@642
  6186
	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
renatofilho@642
  6187
	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
renatofilho@642
  6188
      fi
renatofilho@642
  6189
      ;;
renatofilho@642
  6190
renatofilho@642
  6191
    uts4*)
renatofilho@642
  6192
      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
renatofilho@642
  6193
      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
renatofilho@642
  6194
      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
renatofilho@642
  6195
      ;;
renatofilho@642
  6196
renatofilho@642
  6197
    *)
renatofilho@642
  6198
      _LT_AC_TAGVAR(ld_shlibs, $1)=no
renatofilho@642
  6199
      ;;
renatofilho@642
  6200
    esac
renatofilho@642
  6201
  fi
renatofilho@642
  6202
])
renatofilho@642
  6203
AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
renatofilho@642
  6204
test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
renatofilho@642
  6205
renatofilho@642
  6206
#
renatofilho@642
  6207
# Do we need to explicitly link libc?
renatofilho@642
  6208
#
renatofilho@642
  6209
case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
renatofilho@642
  6210
x|xyes)
renatofilho@642
  6211
  # Assume -lc should be added
renatofilho@642
  6212
  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
renatofilho@642
  6213
renatofilho@642
  6214
  if test "$enable_shared" = yes && test "$GCC" = yes; then
renatofilho@642
  6215
    case $_LT_AC_TAGVAR(archive_cmds, $1) in
renatofilho@642
  6216
    *'~'*)
renatofilho@642
  6217
      # FIXME: we may have to deal with multi-command sequences.
renatofilho@642
  6218
      ;;
renatofilho@642
  6219
    '$CC '*)
renatofilho@642
  6220
      # Test whether the compiler implicitly links with -lc since on some
renatofilho@642
  6221
      # systems, -lgcc has to come before -lc. If gcc already passes -lc
renatofilho@642
  6222
      # to ld, don't add -lc before -lgcc.
renatofilho@642
  6223
      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
renatofilho@642
  6224
      $rm conftest*
renatofilho@642
  6225
      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
renatofilho@642
  6226
renatofilho@642
  6227
      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
renatofilho@642
  6228
        soname=conftest
renatofilho@642
  6229
        lib=conftest
renatofilho@642
  6230
        libobjs=conftest.$ac_objext
renatofilho@642
  6231
        deplibs=
renatofilho@642
  6232
        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
renatofilho@642
  6233
	pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
renatofilho@642
  6234
        compiler_flags=-v
renatofilho@642
  6235
        linker_flags=-v
renatofilho@642
  6236
        verstring=
renatofilho@642
  6237
        output_objdir=.
renatofilho@642
  6238
        libname=conftest
renatofilho@642
  6239
        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
renatofilho@642
  6240
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
renatofilho@642
  6241
        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
renatofilho@642
  6242
        then
renatofilho@642
  6243
	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
renatofilho@642
  6244
        else
renatofilho@642
  6245
	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
renatofilho@642
  6246
        fi
renatofilho@642
  6247
        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
renatofilho@642
  6248
      else
renatofilho@642
  6249
        cat conftest.err 1>&5
renatofilho@642
  6250
      fi
renatofilho@642
  6251
      $rm conftest*
renatofilho@642
  6252
      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
renatofilho@642
  6253
      ;;
renatofilho@642
  6254
    esac
renatofilho@642
  6255
  fi
renatofilho@642
  6256
  ;;
renatofilho@642
  6257
esac
renatofilho@642
  6258
])# AC_LIBTOOL_PROG_LD_SHLIBS
renatofilho@642
  6259
renatofilho@642
  6260
renatofilho@642
  6261
# _LT_AC_FILE_LTDLL_C
renatofilho@642
  6262
# -------------------
renatofilho@642
  6263
# Be careful that the start marker always follows a newline.
renatofilho@642
  6264
AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
renatofilho@642
  6265
# /* ltdll.c starts here */
renatofilho@642
  6266
# #define WIN32_LEAN_AND_MEAN
renatofilho@642
  6267
# #include <windows.h>
renatofilho@642
  6268
# #undef WIN32_LEAN_AND_MEAN
renatofilho@642
  6269
# #include <stdio.h>
renatofilho@642
  6270
#
renatofilho@642
  6271
# #ifndef __CYGWIN__
renatofilho@642
  6272
# #  ifdef __CYGWIN32__
renatofilho@642
  6273
# #    define __CYGWIN__ __CYGWIN32__
renatofilho@642
  6274
# #  endif
renatofilho@642
  6275
# #endif
renatofilho@642
  6276
#
renatofilho@642
  6277
# #ifdef __cplusplus
renatofilho@642
  6278
# extern "C" {
renatofilho@642
  6279
# #endif
renatofilho@642
  6280
# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
renatofilho@642
  6281
# #ifdef __cplusplus
renatofilho@642
  6282
# }
renatofilho@642
  6283
# #endif
renatofilho@642
  6284
#
renatofilho@642
  6285
# #ifdef __CYGWIN__
renatofilho@642
  6286
# #include <cygwin/cygwin_dll.h>
renatofilho@642
  6287
# DECLARE_CYGWIN_DLL( DllMain );
renatofilho@642
  6288
# #endif
renatofilho@642
  6289
# HINSTANCE __hDllInstance_base;
renatofilho@642
  6290
#
renatofilho@642
  6291
# BOOL APIENTRY
renatofilho@642
  6292
# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
renatofilho@642
  6293
# {
renatofilho@642
  6294
#   __hDllInstance_base = hInst;
renatofilho@642
  6295
#   return TRUE;
renatofilho@642
  6296
# }
renatofilho@642
  6297
# /* ltdll.c ends here */
renatofilho@642
  6298
])# _LT_AC_FILE_LTDLL_C
renatofilho@642
  6299
renatofilho@642
  6300
renatofilho@642
  6301
# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
renatofilho@642
  6302
# ---------------------------------
renatofilho@642
  6303
AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
renatofilho@642
  6304
renatofilho@642
  6305
renatofilho@642
  6306
# old names
renatofilho@642
  6307
AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
renatofilho@642
  6308
AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
renatofilho@642
  6309
AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
renatofilho@642
  6310
AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
renatofilho@642
  6311
AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
renatofilho@642
  6312
AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
renatofilho@642
  6313
AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
renatofilho@642
  6314
renatofilho@642
  6315
# This is just to silence aclocal about the macro not being used
renatofilho@642
  6316
ifelse([AC_DISABLE_FAST_INSTALL])
renatofilho@642
  6317
renatofilho@642
  6318
AC_DEFUN([LT_AC_PROG_GCJ],
renatofilho@642
  6319
[AC_CHECK_TOOL(GCJ, gcj, no)
renatofilho@642
  6320
  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
renatofilho@642
  6321
  AC_SUBST(GCJFLAGS)
renatofilho@642
  6322
])
renatofilho@642
  6323
renatofilho@642
  6324
AC_DEFUN([LT_AC_PROG_RC],
renatofilho@642
  6325
[AC_CHECK_TOOL(RC, windres, no)
renatofilho@642
  6326
])
renatofilho@642
  6327
renatofilho@642
  6328
############################################################
renatofilho@642
  6329
# NOTE: This macro has been submitted for inclusion into   #
renatofilho@642
  6330
#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
renatofilho@642
  6331
#  a released version of Autoconf we should remove this    #
renatofilho@642
  6332
#  macro and use it instead.                               #
renatofilho@642
  6333
############################################################
renatofilho@642
  6334
# LT_AC_PROG_SED
renatofilho@642
  6335
# --------------
renatofilho@642
  6336
# Check for a fully-functional sed program, that truncates
renatofilho@642
  6337
# as few characters as possible.  Prefer GNU sed if found.
renatofilho@642
  6338
AC_DEFUN([LT_AC_PROG_SED],
renatofilho@642
  6339
[AC_MSG_CHECKING([for a sed that does not truncate output])
renatofilho@642
  6340
AC_CACHE_VAL(lt_cv_path_SED,
renatofilho@642
  6341
[# Loop through the user's path and test for sed and gsed.
renatofilho@642
  6342
# Then use that list of sed's as ones to test for truncation.
renatofilho@642
  6343
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
renatofilho@642
  6344
for as_dir in $PATH
renatofilho@642
  6345
do
renatofilho@642
  6346
  IFS=$as_save_IFS
renatofilho@642
  6347
  test -z "$as_dir" && as_dir=.
renatofilho@642
  6348
  for lt_ac_prog in sed gsed; do
renatofilho@642
  6349
    for ac_exec_ext in '' $ac_executable_extensions; do
renatofilho@642
  6350
      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
renatofilho@642
  6351
        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
renatofilho@642
  6352
      fi
renatofilho@642
  6353
    done
renatofilho@642
  6354
  done
renatofilho@642
  6355
done
renatofilho@642
  6356
lt_ac_max=0
renatofilho@642
  6357
lt_ac_count=0
renatofilho@642
  6358
# Add /usr/xpg4/bin/sed as it is typically found on Solaris
renatofilho@642
  6359
# along with /bin/sed that truncates output.
renatofilho@642
  6360
for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
renatofilho@642
  6361
  test ! -f $lt_ac_sed && continue
renatofilho@642
  6362
  cat /dev/null > conftest.in
renatofilho@642
  6363
  lt_ac_count=0
renatofilho@642
  6364
  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
renatofilho@642
  6365
  # Check for GNU sed and select it if it is found.
renatofilho@642
  6366
  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
renatofilho@642
  6367
    lt_cv_path_SED=$lt_ac_sed
renatofilho@642
  6368
    break
renatofilho@642
  6369
  fi
renatofilho@642
  6370
  while true; do
renatofilho@642
  6371
    cat conftest.in conftest.in >conftest.tmp
renatofilho@642
  6372
    mv conftest.tmp conftest.in
renatofilho@642
  6373
    cp conftest.in conftest.nl
renatofilho@642
  6374
    echo >>conftest.nl
renatofilho@642
  6375
    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
renatofilho@642
  6376
    cmp -s conftest.out conftest.nl || break
renatofilho@642
  6377
    # 10000 chars as input seems more than enough
renatofilho@642
  6378
    test $lt_ac_count -gt 10 && break
renatofilho@642
  6379
    lt_ac_count=`expr $lt_ac_count + 1`
renatofilho@642
  6380
    if test $lt_ac_count -gt $lt_ac_max; then
renatofilho@642
  6381
      lt_ac_max=$lt_ac_count
renatofilho@642
  6382
      lt_cv_path_SED=$lt_ac_sed
renatofilho@642
  6383
    fi
renatofilho@642
  6384
  done
renatofilho@642
  6385
done
renatofilho@642
  6386
])
renatofilho@642
  6387
SED=$lt_cv_path_SED
renatofilho@642
  6388
AC_MSG_RESULT([$SED])
renatofilho@642
  6389
])