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