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