acinclude.m4
author Sam Lantinga <slouken@libsdl.org>
Sat, 21 Aug 2004 04:20:00 +0000
changeset 939 c7c04f811994
parent 886 05c551e5bc64
child 947 3bb035750537
permissions -rw-r--r--
Date: Tue, 01 Jun 2004 15:27:44 +0300
From: Martin_Storsj
Subject: Update for dynamic loading of ALSA

I sent you a patch a few months ago which enables SDL to load ALSA
dynamically. Now I've finally got time to tweak this yet some more. I've
added code from alsa.m4 (from alsa's dev package) to acinclude.m4, and
made the detection of the alsa library name a bit better. I've also
fixed up the loading versioned symbols with dlvsym, so that it falls
back to dlsym.

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