acinclude.m4
author Sam Lantinga <slouken@libsdl.org>
Tue, 25 Jan 2005 16:57:11 +0000
changeset 1032 c1c2efca4548
parent 948 ac488ad4ef1d
child 1308 ce64900b4a47
permissions -rw-r--r--
Date: Mon, 24 Jan 2005 21:37:56 +0800
From: Chris Taylor
Subject: Patch to put back dynamic OpenGL loading for MPW

I sent a patch a while ago that removes dynamic OpenGL loading for
Macintosh Programmer's Workshop. Dynamic loading DOES actually work
when an SDL program is built with MPW, it just has to be set up for it.
(Whoops!!) This is the ideal way to get OpenGL extensions to work,
which D2X uses quite a few of.

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